@sureshdsk/devflow-mcp 3.0.1 → 3.0.2

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 (182) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +2 -2
  3. package/.next/standalone/.next/server/app/_global-error.html +2 -2
  4. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  5. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  6. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  7. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  11. package/.next/standalone/.next/server/app/_not-found.rsc +1 -1
  12. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  13. package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  14. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  15. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  16. package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  17. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  18. package/.next/standalone/.next/server/app/index.html +1 -1
  19. package/.next/standalone/.next/server/app/index.rsc +1 -1
  20. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  21. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +1 -1
  22. package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
  23. package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
  24. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  25. package/.next/standalone/.next/server/pages/404.html +1 -1
  26. package/.next/standalone/.next/server/pages/500.html +2 -2
  27. package/.next/standalone/.next/static/static/V6JvQiyb7wzYpHUOLB6BC/_buildManifest.js +11 -0
  28. package/.next/standalone/.next/static/static/V6JvQiyb7wzYpHUOLB6BC/_clientMiddlewareManifest.json +1 -0
  29. package/.next/standalone/.next/static/static/V6JvQiyb7wzYpHUOLB6BC/_ssgManifest.js +1 -0
  30. package/.next/standalone/.next/static/static/chunks/01c05b0fdc89fc0c.js +2 -0
  31. package/.next/standalone/.next/static/static/chunks/034e8cfdbd1cf3ac.js +24 -0
  32. package/.next/standalone/.next/static/static/chunks/0356b23e9d8fbd11.js +160 -0
  33. package/.next/standalone/.next/static/static/chunks/0697f660af9a95f1.js +1 -0
  34. package/.next/standalone/.next/static/static/chunks/09e4e9409aadc2fe.js +1 -0
  35. package/.next/standalone/.next/static/static/chunks/09ec2e3c3d2d294f.js +29 -0
  36. package/.next/standalone/.next/static/static/chunks/1bdb5b021c9a4e61.js +62 -0
  37. package/.next/standalone/.next/static/static/chunks/1cec4d71237d0c89.js +15 -0
  38. package/.next/standalone/.next/static/static/chunks/20337e5244416041.js +1 -0
  39. package/.next/standalone/.next/static/static/chunks/20c1169c30c95e0f.js +1 -0
  40. package/.next/standalone/.next/static/static/chunks/27f5fab49d8a5395.js +1 -0
  41. package/.next/standalone/.next/static/static/chunks/31965ae569bf807f.js +24 -0
  42. package/.next/standalone/.next/static/static/chunks/34e2788a0be7ee63.js +1 -0
  43. package/.next/standalone/.next/static/static/chunks/3e6042c77fa8e7ac.js +1 -0
  44. package/.next/standalone/.next/static/static/chunks/46d959abf8046f0e.js +15 -0
  45. package/.next/standalone/.next/static/static/chunks/483effa74d32093a.js +1 -0
  46. package/.next/standalone/.next/static/static/chunks/4f23f64d46848f57.js +1 -0
  47. package/.next/standalone/.next/static/static/chunks/53081dcdcad4f31e.js +1 -0
  48. package/.next/standalone/.next/static/static/chunks/539636bf51e84308.js +1 -0
  49. package/.next/standalone/.next/static/static/chunks/559e55a53f22f5d1.js +1 -0
  50. package/.next/standalone/.next/static/static/chunks/5623d8a1c99eba62.js +1 -0
  51. package/.next/standalone/.next/static/static/chunks/581c7f8a86cc86fb.js +1 -0
  52. package/.next/standalone/.next/static/static/chunks/5c05dda6ed4d92bf.js +1 -0
  53. package/.next/standalone/.next/static/static/chunks/5eac621951969859.js +60 -0
  54. package/.next/standalone/.next/static/static/chunks/6f4c5a75f38f686b.js +1 -0
  55. package/.next/standalone/.next/static/static/chunks/6fee5c7b5d483c8a.js +5 -0
  56. package/.next/standalone/.next/static/static/chunks/701cfcbb41e0ab47.js +1 -0
  57. package/.next/standalone/.next/static/static/chunks/70b3258c508216b5.js +4 -0
  58. package/.next/standalone/.next/static/static/chunks/762121739217e5da.js +1 -0
  59. package/.next/standalone/.next/static/static/chunks/808075c416a273c9.js +2 -0
  60. package/.next/standalone/.next/static/static/chunks/8321c26033c9fc5b.js +1 -0
  61. package/.next/standalone/.next/static/static/chunks/87f01c0a5d4010ab.js +1 -0
  62. package/.next/standalone/.next/static/static/chunks/89ebb4231102677a.js +77 -0
  63. package/.next/standalone/.next/static/static/chunks/909ac8a87c0dd9cb.js +215 -0
  64. package/.next/standalone/.next/static/static/chunks/9525dc246b363870.js +262 -0
  65. package/.next/standalone/.next/static/static/chunks/957a5dae245bbc84.js +1 -0
  66. package/.next/standalone/.next/static/static/chunks/9a52b8ded6a9ee38.js +215 -0
  67. package/.next/standalone/.next/static/static/chunks/9eb0474ddf7f6238.js +80 -0
  68. package/.next/standalone/.next/static/static/chunks/a6dad97d9634a72d.js +1 -0
  69. package/.next/standalone/.next/static/static/chunks/a6dad97d9634a72d.js.map +1 -0
  70. package/.next/standalone/.next/static/static/chunks/a85d55e8b6841436.js +1 -0
  71. package/.next/standalone/.next/static/static/chunks/ac4b6b4d5b7e486e.css +1 -0
  72. package/.next/standalone/.next/static/static/chunks/ad24b3b0881818aa.js +4 -0
  73. package/.next/standalone/.next/static/static/chunks/ae52f8e72d4127b1.js +59 -0
  74. package/.next/standalone/.next/static/static/chunks/af66c50a65af610b.js +93 -0
  75. package/.next/standalone/.next/static/static/chunks/b8b36494d4330f5f.js +152 -0
  76. package/.next/standalone/.next/static/static/chunks/b8ca88454bfa8e05.js +148 -0
  77. package/.next/standalone/.next/static/static/chunks/b9a047fc90291dbd.js +63 -0
  78. package/.next/standalone/.next/static/static/chunks/be28d13ded360528.js +117 -0
  79. package/.next/standalone/.next/static/static/chunks/c231010aae14914b.js +1 -0
  80. package/.next/standalone/.next/static/static/chunks/c36e148ece9c20ae.js +43 -0
  81. package/.next/standalone/.next/static/static/chunks/cb863a7e46548566.js +15 -0
  82. package/.next/standalone/.next/static/static/chunks/ce4052f386943efb.js +1 -0
  83. package/.next/standalone/.next/static/static/chunks/d0309ea872db5d9f.js +1 -0
  84. package/.next/standalone/.next/static/static/chunks/d4cf8893a018e965.js +1 -0
  85. package/.next/standalone/.next/static/static/chunks/d5b700b8aafeea3b.js +55 -0
  86. package/.next/standalone/.next/static/static/chunks/dc16aeb5aabadbd8.js +136 -0
  87. package/.next/standalone/.next/static/static/chunks/de9c5219846f92bb.js +53 -0
  88. package/.next/standalone/.next/static/static/chunks/df3c9c7fcf3e0a3d.js +15 -0
  89. package/.next/standalone/.next/static/static/chunks/e6c0233269a4bd69.js +13 -0
  90. package/.next/standalone/.next/static/static/chunks/e7d83ce855afe416.js +5 -0
  91. package/.next/standalone/.next/static/static/chunks/eb22f55ae829d296.js +36 -0
  92. package/.next/standalone/.next/static/static/chunks/ec0de430276c8209.js +1 -0
  93. package/.next/standalone/.next/static/static/chunks/ed2e02f2db03c1dc.js +1 -0
  94. package/.next/standalone/.next/static/static/chunks/ee7035560fc9e5e9.js +1 -0
  95. package/.next/standalone/.next/static/static/chunks/f1f8594d5ec7b93e.js +1 -0
  96. package/.next/standalone/.next/static/static/chunks/f42ff7863eb4c3ff.js +1 -0
  97. package/.next/standalone/.next/static/static/chunks/f678cdcec3cea0de.js +1 -0
  98. package/.next/standalone/.next/static/static/chunks/f7a6fed60fb079dd.js +1 -0
  99. package/.next/standalone/.next/static/static/chunks/f9eb3f4ff87b8d8d.js +56 -0
  100. package/.next/standalone/.next/static/static/chunks/ff1a16fafef87110.js +1 -0
  101. package/.next/standalone/.next/static/static/chunks/ff49535ba8193dec.js +1 -0
  102. package/.next/standalone/.next/static/static/chunks/turbopack-8b3b66a22a5e0fb4.js +4 -0
  103. package/.next/standalone/.next/static/static/media/favicon.0b3bf435.ico +0 -0
  104. package/.next/standalone/package.json +3 -3
  105. package/package.json +3 -3
  106. /package/.next/{static/Ql6qo0GYLL23WRu6ec4N5 → standalone/.next/static/V6JvQiyb7wzYpHUOLB6BC}/_buildManifest.js +0 -0
  107. /package/.next/{static/Ql6qo0GYLL23WRu6ec4N5 → standalone/.next/static/V6JvQiyb7wzYpHUOLB6BC}/_clientMiddlewareManifest.json +0 -0
  108. /package/.next/{static/Ql6qo0GYLL23WRu6ec4N5 → standalone/.next/static/V6JvQiyb7wzYpHUOLB6BC}/_ssgManifest.js +0 -0
  109. /package/.next/{static → standalone/.next/static}/chunks/01c05b0fdc89fc0c.js +0 -0
  110. /package/.next/{static → standalone/.next/static}/chunks/034e8cfdbd1cf3ac.js +0 -0
  111. /package/.next/{static → standalone/.next/static}/chunks/0356b23e9d8fbd11.js +0 -0
  112. /package/.next/{static → standalone/.next/static}/chunks/0697f660af9a95f1.js +0 -0
  113. /package/.next/{static → standalone/.next/static}/chunks/09e4e9409aadc2fe.js +0 -0
  114. /package/.next/{static → standalone/.next/static}/chunks/09ec2e3c3d2d294f.js +0 -0
  115. /package/.next/{static → standalone/.next/static}/chunks/1bdb5b021c9a4e61.js +0 -0
  116. /package/.next/{static → standalone/.next/static}/chunks/1cec4d71237d0c89.js +0 -0
  117. /package/.next/{static → standalone/.next/static}/chunks/20337e5244416041.js +0 -0
  118. /package/.next/{static → standalone/.next/static}/chunks/20c1169c30c95e0f.js +0 -0
  119. /package/.next/{static → standalone/.next/static}/chunks/27f5fab49d8a5395.js +0 -0
  120. /package/.next/{static → standalone/.next/static}/chunks/31965ae569bf807f.js +0 -0
  121. /package/.next/{static → standalone/.next/static}/chunks/34e2788a0be7ee63.js +0 -0
  122. /package/.next/{static → standalone/.next/static}/chunks/3e6042c77fa8e7ac.js +0 -0
  123. /package/.next/{static → standalone/.next/static}/chunks/46d959abf8046f0e.js +0 -0
  124. /package/.next/{static → standalone/.next/static}/chunks/483effa74d32093a.js +0 -0
  125. /package/.next/{static → standalone/.next/static}/chunks/4f23f64d46848f57.js +0 -0
  126. /package/.next/{static → standalone/.next/static}/chunks/53081dcdcad4f31e.js +0 -0
  127. /package/.next/{static → standalone/.next/static}/chunks/539636bf51e84308.js +0 -0
  128. /package/.next/{static → standalone/.next/static}/chunks/559e55a53f22f5d1.js +0 -0
  129. /package/.next/{static → standalone/.next/static}/chunks/5623d8a1c99eba62.js +0 -0
  130. /package/.next/{static → standalone/.next/static}/chunks/581c7f8a86cc86fb.js +0 -0
  131. /package/.next/{static → standalone/.next/static}/chunks/5c05dda6ed4d92bf.js +0 -0
  132. /package/.next/{static → standalone/.next/static}/chunks/5eac621951969859.js +0 -0
  133. /package/.next/{static → standalone/.next/static}/chunks/6f4c5a75f38f686b.js +0 -0
  134. /package/.next/{static → standalone/.next/static}/chunks/6fee5c7b5d483c8a.js +0 -0
  135. /package/.next/{static → standalone/.next/static}/chunks/701cfcbb41e0ab47.js +0 -0
  136. /package/.next/{static → standalone/.next/static}/chunks/70b3258c508216b5.js +0 -0
  137. /package/.next/{static → standalone/.next/static}/chunks/762121739217e5da.js +0 -0
  138. /package/.next/{static → standalone/.next/static}/chunks/808075c416a273c9.js +0 -0
  139. /package/.next/{static → standalone/.next/static}/chunks/8321c26033c9fc5b.js +0 -0
  140. /package/.next/{static → standalone/.next/static}/chunks/87f01c0a5d4010ab.js +0 -0
  141. /package/.next/{static → standalone/.next/static}/chunks/89ebb4231102677a.js +0 -0
  142. /package/.next/{static → standalone/.next/static}/chunks/909ac8a87c0dd9cb.js +0 -0
  143. /package/.next/{static → standalone/.next/static}/chunks/9525dc246b363870.js +0 -0
  144. /package/.next/{static → standalone/.next/static}/chunks/957a5dae245bbc84.js +0 -0
  145. /package/.next/{static → standalone/.next/static}/chunks/9a52b8ded6a9ee38.js +0 -0
  146. /package/.next/{static → standalone/.next/static}/chunks/9eb0474ddf7f6238.js +0 -0
  147. /package/.next/{static → standalone/.next/static}/chunks/a6dad97d9634a72d.js +0 -0
  148. /package/.next/{static → standalone/.next/static}/chunks/a6dad97d9634a72d.js.map +0 -0
  149. /package/.next/{static → standalone/.next/static}/chunks/a85d55e8b6841436.js +0 -0
  150. /package/.next/{static → standalone/.next/static}/chunks/ac4b6b4d5b7e486e.css +0 -0
  151. /package/.next/{static → standalone/.next/static}/chunks/ad24b3b0881818aa.js +0 -0
  152. /package/.next/{static → standalone/.next/static}/chunks/ae52f8e72d4127b1.js +0 -0
  153. /package/.next/{static → standalone/.next/static}/chunks/af66c50a65af610b.js +0 -0
  154. /package/.next/{static → standalone/.next/static}/chunks/b8b36494d4330f5f.js +0 -0
  155. /package/.next/{static → standalone/.next/static}/chunks/b8ca88454bfa8e05.js +0 -0
  156. /package/.next/{static → standalone/.next/static}/chunks/b9a047fc90291dbd.js +0 -0
  157. /package/.next/{static → standalone/.next/static}/chunks/be28d13ded360528.js +0 -0
  158. /package/.next/{static → standalone/.next/static}/chunks/c231010aae14914b.js +0 -0
  159. /package/.next/{static → standalone/.next/static}/chunks/c36e148ece9c20ae.js +0 -0
  160. /package/.next/{static → standalone/.next/static}/chunks/cb863a7e46548566.js +0 -0
  161. /package/.next/{static → standalone/.next/static}/chunks/ce4052f386943efb.js +0 -0
  162. /package/.next/{static → standalone/.next/static}/chunks/d0309ea872db5d9f.js +0 -0
  163. /package/.next/{static → standalone/.next/static}/chunks/d4cf8893a018e965.js +0 -0
  164. /package/.next/{static → standalone/.next/static}/chunks/d5b700b8aafeea3b.js +0 -0
  165. /package/.next/{static → standalone/.next/static}/chunks/dc16aeb5aabadbd8.js +0 -0
  166. /package/.next/{static → standalone/.next/static}/chunks/de9c5219846f92bb.js +0 -0
  167. /package/.next/{static → standalone/.next/static}/chunks/df3c9c7fcf3e0a3d.js +0 -0
  168. /package/.next/{static → standalone/.next/static}/chunks/e6c0233269a4bd69.js +0 -0
  169. /package/.next/{static → standalone/.next/static}/chunks/e7d83ce855afe416.js +0 -0
  170. /package/.next/{static → standalone/.next/static}/chunks/eb22f55ae829d296.js +0 -0
  171. /package/.next/{static → standalone/.next/static}/chunks/ec0de430276c8209.js +0 -0
  172. /package/.next/{static → standalone/.next/static}/chunks/ed2e02f2db03c1dc.js +0 -0
  173. /package/.next/{static → standalone/.next/static}/chunks/ee7035560fc9e5e9.js +0 -0
  174. /package/.next/{static → standalone/.next/static}/chunks/f1f8594d5ec7b93e.js +0 -0
  175. /package/.next/{static → standalone/.next/static}/chunks/f42ff7863eb4c3ff.js +0 -0
  176. /package/.next/{static → standalone/.next/static}/chunks/f678cdcec3cea0de.js +0 -0
  177. /package/.next/{static → standalone/.next/static}/chunks/f7a6fed60fb079dd.js +0 -0
  178. /package/.next/{static → standalone/.next/static}/chunks/f9eb3f4ff87b8d8d.js +0 -0
  179. /package/.next/{static → standalone/.next/static}/chunks/ff1a16fafef87110.js +0 -0
  180. /package/.next/{static → standalone/.next/static}/chunks/ff49535ba8193dec.js +0 -0
  181. /package/.next/{static → standalone/.next/static}/chunks/turbopack-8b3b66a22a5e0fb4.js +0 -0
  182. /package/.next/{static → standalone/.next/static}/media/favicon.0b3bf435.ico +0 -0
@@ -0,0 +1,117 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52409,t=>{"use strict";var e=t.i(72247),a=t.i(20502),r=t.i(2256),i=t.i(80262),s=t.i(95923),n=t.i(80926),l=t.i(71206),o=t.i(89066),c=t.i(69696),d=t.i(50241);t.i(47716);var h=t.i(23685);t.i(66661);var g=t.i(4642),u=t.i(85833),y=t.i(104),p=function(){var t=(0,l.__name)(function(t,e,a,r){for(a=a||{},r=t.length;r--;a[t[r]]=e);return a},"o"),e=[1,15],a=[1,7],r=[1,13],i=[1,14],s=[1,19],n=[1,16],o=[1,17],c=[1,18],d=[8,30],h=[8,10,21,28,29,30,31,39,43,46],g=[1,23],u=[1,24],y=[8,10,15,16,21,28,29,30,31,39,43,46],p=[8,10,15,16,21,27,28,29,30,31,39,43,46],x=[1,49],b={trace:(0,l.__name)(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:(0,l.__name)(function(t,e,a,r,i,s,n){var l=s.length-1;switch(i){case 4:r.getLogger().debug("Rule: separator (NL) ");break;case 5:r.getLogger().debug("Rule: separator (Space) ");break;case 6:r.getLogger().debug("Rule: separator (EOF) ");break;case 7:r.getLogger().debug("Rule: hierarchy: ",s[l-1]),r.setHierarchy(s[l-1]);break;case 8:r.getLogger().debug("Stop NL ");break;case 9:r.getLogger().debug("Stop EOF ");break;case 10:r.getLogger().debug("Stop NL2 ");break;case 11:r.getLogger().debug("Stop EOF2 ");break;case 12:r.getLogger().debug("Rule: statement: ",s[l]),"number"==typeof s[l].length?this.$=s[l]:this.$=[s[l]];break;case 13:r.getLogger().debug("Rule: statement #2: ",s[l-1]),this.$=[s[l-1]].concat(s[l]);break;case 14:r.getLogger().debug("Rule: link: ",s[l],t),this.$={edgeTypeStr:s[l],label:""};break;case 15:r.getLogger().debug("Rule: LABEL link: ",s[l-3],s[l-1],s[l]),this.$={edgeTypeStr:s[l],label:s[l-1]};break;case 18:let o=parseInt(s[l]),c=r.generateId();this.$={id:c,type:"space",label:"",width:o,children:[]};break;case 23:r.getLogger().debug("Rule: (nodeStatement link node) ",s[l-2],s[l-1],s[l]," typestr: ",s[l-1].edgeTypeStr);let d=r.edgeStrToEdgeData(s[l-1].edgeTypeStr);this.$=[{id:s[l-2].id,label:s[l-2].label,type:s[l-2].type,directions:s[l-2].directions},{id:s[l-2].id+"-"+s[l].id,start:s[l-2].id,end:s[l].id,label:s[l-1].label,type:"edge",directions:s[l].directions,arrowTypeEnd:d,arrowTypeStart:"arrow_open"},{id:s[l].id,label:s[l].label,type:r.typeStr2Type(s[l].typeStr),directions:s[l].directions}];break;case 24:r.getLogger().debug("Rule: nodeStatement (abc88 node size) ",s[l-1],s[l]),this.$={id:s[l-1].id,label:s[l-1].label,type:r.typeStr2Type(s[l-1].typeStr),directions:s[l-1].directions,widthInColumns:parseInt(s[l],10)};break;case 25:r.getLogger().debug("Rule: nodeStatement (node) ",s[l]),this.$={id:s[l].id,label:s[l].label,type:r.typeStr2Type(s[l].typeStr),directions:s[l].directions,widthInColumns:1};break;case 26:r.getLogger().debug("APA123",this?this:"na"),r.getLogger().debug("COLUMNS: ",s[l]),this.$={type:"column-setting",columns:"auto"===s[l]?-1:parseInt(s[l])};break;case 27:r.getLogger().debug("Rule: id-block statement : ",s[l-2],s[l-1]),r.generateId(),this.$={...s[l-2],type:"composite",children:s[l-1]};break;case 28:r.getLogger().debug("Rule: blockStatement : ",s[l-2],s[l-1],s[l]);let h=r.generateId();this.$={id:h,type:"composite",label:"",children:s[l-1]};break;case 29:r.getLogger().debug("Rule: node (NODE_ID separator): ",s[l]),this.$={id:s[l]};break;case 30:r.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",s[l-1],s[l]),this.$={id:s[l-1],label:s[l].label,typeStr:s[l].typeStr,directions:s[l].directions};break;case 31:r.getLogger().debug("Rule: dirList: ",s[l]),this.$=[s[l]];break;case 32:r.getLogger().debug("Rule: dirList: ",s[l-1],s[l]),this.$=[s[l-1]].concat(s[l]);break;case 33:r.getLogger().debug("Rule: nodeShapeNLabel: ",s[l-2],s[l-1],s[l]),this.$={typeStr:s[l-2]+s[l],label:s[l-1]};break;case 34:r.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",s[l-3],s[l-2]," #3:",s[l-1],s[l]),this.$={typeStr:s[l-3]+s[l],label:s[l-2],directions:s[l-1]};break;case 35:case 36:this.$={type:"classDef",id:s[l-1].trim(),css:s[l].trim()};break;case 37:this.$={type:"applyClass",id:s[l-1].trim(),styleClass:s[l].trim()};break;case 38:this.$={type:"applyStyles",id:s[l-1].trim(),stylesStr:s[l].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:e,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:s,39:n,43:o,46:c},{8:[1,20]},t(d,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:e,21:a,28:r,29:i,31:s,39:n,43:o,46:c}),t(h,[2,16],{14:22,15:g,16:u}),t(h,[2,17]),t(h,[2,18]),t(h,[2,19]),t(h,[2,20]),t(h,[2,21]),t(h,[2,22]),t(y,[2,25],{27:[1,25]}),t(h,[2,26]),{19:26,26:12,31:s},{10:e,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:s,39:n,43:o,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(p,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(d,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},t(y,[2,24]),{10:e,11:37,13:4,14:22,15:g,16:u,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:r,29:i,31:s,39:n,43:o,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(p,[2,30]),{18:[1,43]},{18:[1,44]},t(y,[2,23]),{18:[1,45]},{30:[1,46]},t(h,[2,28]),t(h,[2,35]),t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),{36:[1,47]},{33:48,34:x},{15:[1,50]},t(h,[2,27]),t(p,[2,33]),{38:[1,51]},{33:52,34:x,38:[2,31]},{31:[2,15]},t(p,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,l.__name)(function(t,e){if(e.recoverable)this.trace(t);else{var a=Error(t);throw a.hash=e,a}},"parseError"),parse:(0,l.__name)(function(t){var e=this,a=[0],r=[],i=[null],s=[],n=this.table,o="",c=0,d=0,h=0,g=s.slice.call(arguments,1),u=Object.create(this.lexer),y={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(y[p]=this.yy[p]);u.setInput(t,y),y.lexer=u,y.parser=this,void 0===u.yylloc&&(u.yylloc={});var x=u.yylloc;s.push(x);var b=u.options&&u.options.ranges;function f(){var t;return"number"!=typeof(t=r.pop()||u.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.parseError?this.parseError=y.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.__name)(function(t){a.length=a.length-2*t,i.length=i.length-t,s.length=s.length-t},"popStack"),(0,l.__name)(f,"lex");for(var m,_,w,k,L,S,E,C,$,D={};;){if(w=a[a.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==m&&(m=f()),k=n[w]&&n[w][m]),void 0===k||!k.length||!k[0]){var T="";for(S in $=[],n[w])this.terminals_[S]&&S>2&&$.push("'"+this.terminals_[S]+"'");T=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(T,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:x,expected:$})}if(k[0]instanceof Array&&k.length>1)throw Error("Parse Error: multiple actions possible at state: "+w+", token: "+m);switch(k[0]){case 1:a.push(m),i.push(u.yytext),s.push(u.yylloc),a.push(k[1]),m=null,_?(m=_,_=null):(d=u.yyleng,o=u.yytext,c=u.yylineno,x=u.yylloc,h>0&&h--);break;case 2:if(E=this.productions_[k[1]][1],D.$=i[i.length-E],D._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},b&&(D._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),void 0!==(L=this.performAction.apply(D,[o,d,c,y,k[1],i,s].concat(g))))return L;E&&(a=a.slice(0,-1*E*2),i=i.slice(0,-1*E),s=s.slice(0,-1*E)),a.push(this.productions_[k[1]][0]),i.push(D.$),s.push(D._$),C=n[a[a.length-2]][a[a.length-1]],a.push(C);break;case 3:return!0}}return!0},"parse")};function f(){this.yy={}}return b.lexer={EOF:1,parseError:(0,l.__name)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,l.__name)(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:(0,l.__name)(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:(0,l.__name)(function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=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),a.length-1&&(this.yylineno-=a.length-1);var i=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:a?(a.length===r.length?this.yylloc.first_column:0)+r[r.length-a.length].length-a[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:(0,l.__name)(function(){return this._more=!0,this},"more"),reject:(0,l.__name)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,l.__name)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.__name)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.__name)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,l.__name)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,l.__name)(function(t,e){var a,r,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))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.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],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack)for(var s in i)this[s]=i[s];return!1},"test_match"),next:(0,l.__name)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,a,r,i=this._currentRules(),s=0;s<i.length;s++)if((a=this._input.match(this.rules[i[s]]))&&(!e||a[0].length>e[0].length)){if(e=a,r=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,i[s])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&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:(0,l.__name)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,l.__name)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.__name)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.__name)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,l.__name)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.__name)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.__name)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,l.__name)(function(t,e,a,r){switch(a){case 0:return t.getLogger().debug("Found block-beta"),10;case 1:return t.getLogger().debug("Found id-block"),29;case 2:return t.getLogger().debug("Found block"),10;case 3:t.getLogger().debug(".",e.yytext);break;case 4:t.getLogger().debug("_",e.yytext);break;case 5:return 5;case 6:return e.yytext=-1,28;case 7:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.yytext),28;case 8:case 76:case 77:case 99:this.pushState("md_string");break;case 9:return"MD_STR";case 10:case 34:case 79:this.popState();break;case 11:this.pushState("string");break;case 12:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 13:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 14:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 15:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:case 40:case 41:case 44:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),t.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),t.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),t.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),t.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return t.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return t.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),37;case 74:return t.getLogger().debug("Lex: NODE_ID",e.yytext),31;case 75:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 78:return"NODE_DESCR";case 80:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 83:t.getLogger().debug("LEX POPPING"),this.popState();break;case 84:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 91:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 93:case 94:case 95:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 96:case 97:case 98:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 100:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 102:case 103:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 104:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}},(0,l.__name)(f,"Parser"),f.prototype=b,b.Parser=f,new f}();p.parser=p;var x=new Map,b=[],f=new Map,m="color",_="fill",w=(0,n.getConfig2)(),k=new Map,L=(0,l.__name)(t=>n.common_default.sanitizeText(t,w),"sanitizeText"),S=(0,l.__name)(function(t,e=""){let a=k.get(t);a||(a={id:t,styles:[],textStyles:[]},k.set(t,a)),null!=e&&e.split(",").forEach(t=>{let e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(m).exec(t)){let t=e.replace(_,"bgFill").replace(m,_);a.textStyles.push(t)}a.styles.push(e)})},"addStyleClass"),E=(0,l.__name)(function(t,e=""){let a=x.get(t);null!=e&&(a.styles=e.split(","))},"addStyle2Node"),C=(0,l.__name)(function(t,e){t.split(",").forEach(function(t){let a=x.get(t);if(void 0===a){let e=t.trim();a={id:e,type:"na",children:[]},x.set(e,a)}a.classes||(a.classes=[]),a.classes.push(e)})},"setCssClass"),$=(0,l.__name)((t,e)=>{let a=t.flat(),r=[],i=a.find(t=>t?.type==="column-setting"),s=i?.columns??-1;for(let t of a){if("number"==typeof s&&s>0&&"column-setting"!==t.type&&"number"==typeof t.widthInColumns&&t.widthInColumns>s&&l.log.warn(`Block ${t.id} width ${t.widthInColumns} exceeds configured column width ${s}`),t.label&&(t.label=L(t.label)),"classDef"===t.type){S(t.id,t.css);continue}if("applyClass"===t.type){C(t.id,t?.styleClass??"");continue}if("applyStyles"===t.type){t?.stylesStr&&E(t.id,t?.stylesStr);continue}if("column-setting"===t.type)e.columns=t.columns??-1;else if("edge"===t.type){let e=(f.get(t.id)??0)+1;f.set(t.id,e),t.id=e+"-"+t.id,b.push(t)}else{t.label||("composite"===t.type?t.label="":t.label=t.id);let e=x.get(t.id);if(void 0===e?x.set(t.id,t):("na"!==t.type&&(e.type=t.type),t.label!==t.id&&(e.label=t.label)),t.children&&$(t.children,t),"space"===t.type){let e=t.width??1;for(let a=0;a<e;a++){let e=(0,o.default)(t);e.id=e.id+"-"+a,x.set(e.id,e),r.push(e)}}else void 0===e&&r.push(t)}}e.children=r},"populateBlockDatabase"),D=[],T={id:"root",type:"composite",children:[],columns:-1},v=(0,l.__name)(()=>{l.log.debug("Clear called"),(0,n.clear)(),x=new Map([["root",T={id:"root",type:"composite",children:[],columns:-1}]]),D=[],k=new Map,b=[],f=new Map},"clear");function N(t){switch(l.log.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return l.log.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function I(t){return(l.log.debug("typeStr2Type",t),"=="===t)?"thick":"normal"}function B(t){switch(t.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}(0,l.__name)(N,"typeStr2Type"),(0,l.__name)(I,"edgeTypeStr2Type"),(0,l.__name)(B,"edgeStrToEdgeData");var z=0,R=(0,l.__name)(()=>(z++,"id-"+Math.random().toString(36).substr(2,12)+"-"+z),"generateId"),O=(0,l.__name)(t=>{T.children=t,$(t,T),D=T.children},"setHierarchy"),A=(0,l.__name)(t=>{let e=x.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),M=(0,l.__name)(()=>[...x.values()],"getBlocksFlat"),P=(0,l.__name)(()=>D||[],"getBlocks"),W=(0,l.__name)(()=>b,"getEdges"),Y=(0,l.__name)(t=>x.get(t),"getBlock"),F=(0,l.__name)(t=>{x.set(t.id,t)},"setBlock"),X=(0,l.__name)(()=>l.log,"getLogger"),U=(0,l.__name)(function(){return k},"getClasses"),K={getConfig:(0,l.__name)(()=>(0,n.getConfig)().block,"getConfig"),typeStr2Type:N,edgeTypeStr2Type:I,edgeStrToEdgeData:B,getLogger:X,getBlocksFlat:M,getBlocks:P,getEdges:W,setHierarchy:O,getBlock:Y,setBlock:F,getColumns:A,getClasses:U,clear:v,generateId:R},H=(0,l.__name)((t,e)=>{let a=c.channel,r=a(t,"r"),i=a(t,"g"),s=a(t,"b");return d.rgba(r,i,s,e)},"fade"),j=(0,l.__name)(t=>`.label {
2
+ font-family: ${t.fontFamily};
3
+ color: ${t.nodeTextColor||t.textColor};
4
+ }
5
+ .cluster-label text {
6
+ fill: ${t.titleColor};
7
+ }
8
+ .cluster-label span,p {
9
+ color: ${t.titleColor};
10
+ }
11
+
12
+
13
+
14
+ .label text,span,p {
15
+ fill: ${t.nodeTextColor||t.textColor};
16
+ color: ${t.nodeTextColor||t.textColor};
17
+ }
18
+
19
+ .node rect,
20
+ .node circle,
21
+ .node ellipse,
22
+ .node polygon,
23
+ .node path {
24
+ fill: ${t.mainBkg};
25
+ stroke: ${t.nodeBorder};
26
+ stroke-width: 1px;
27
+ }
28
+ .flowchart-label text {
29
+ text-anchor: middle;
30
+ }
31
+ // .flowchart-label .text-outer-tspan {
32
+ // text-anchor: middle;
33
+ // }
34
+ // .flowchart-label .text-inner-tspan {
35
+ // text-anchor: start;
36
+ // }
37
+
38
+ .node .label {
39
+ text-align: center;
40
+ }
41
+ .node.clickable {
42
+ cursor: pointer;
43
+ }
44
+
45
+ .arrowheadPath {
46
+ fill: ${t.arrowheadColor};
47
+ }
48
+
49
+ .edgePath .path {
50
+ stroke: ${t.lineColor};
51
+ stroke-width: 2.0px;
52
+ }
53
+
54
+ .flowchart-link {
55
+ stroke: ${t.lineColor};
56
+ fill: none;
57
+ }
58
+
59
+ .edgeLabel {
60
+ background-color: ${t.edgeLabelBackground};
61
+ rect {
62
+ opacity: 0.5;
63
+ background-color: ${t.edgeLabelBackground};
64
+ fill: ${t.edgeLabelBackground};
65
+ }
66
+ text-align: center;
67
+ }
68
+
69
+ /* For html labels only */
70
+ .labelBkg {
71
+ background-color: ${H(t.edgeLabelBackground,.5)};
72
+ // background-color:
73
+ }
74
+
75
+ .node .cluster {
76
+ // fill: ${H(t.mainBkg,.5)};
77
+ fill: ${H(t.clusterBkg,.5)};
78
+ stroke: ${H(t.clusterBorder,.2)};
79
+ box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
80
+ stroke-width: 1px;
81
+ }
82
+
83
+ .cluster text {
84
+ fill: ${t.titleColor};
85
+ }
86
+
87
+ .cluster span,p {
88
+ color: ${t.titleColor};
89
+ }
90
+ /* .cluster div {
91
+ color: ${t.titleColor};
92
+ } */
93
+
94
+ div.mermaidTooltip {
95
+ position: absolute;
96
+ text-align: center;
97
+ max-width: 200px;
98
+ padding: 2px;
99
+ font-family: ${t.fontFamily};
100
+ font-size: 12px;
101
+ background: ${t.tertiaryColor};
102
+ border: 1px solid ${t.border2};
103
+ border-radius: 2px;
104
+ pointer-events: none;
105
+ z-index: 100;
106
+ }
107
+
108
+ .flowchartTitleText {
109
+ text-anchor: middle;
110
+ font-size: 18px;
111
+ fill: ${t.textColor};
112
+ }
113
+ ${(0,e.getIconStyles)()}
114
+ `,"getStyles"),Z=(0,l.__name)((t,e,a,r)=>{e.forEach(e=>{ta[e](t,a,r)})},"insertMarkers"),q=(0,l.__name)((t,e,a)=>{l.log.trace("Making markers for ",a),t.append("defs").append("marker").attr("id",a+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",a+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),G=(0,l.__name)((t,e,a)=>{t.append("defs").append("marker").attr("id",a+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",a+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),J=(0,l.__name)((t,e,a)=>{t.append("defs").append("marker").attr("id",a+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",a+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Q=(0,l.__name)((t,e,a)=>{t.append("defs").append("marker").attr("id",a+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",a+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),V=(0,l.__name)((t,e,a)=>{t.append("defs").append("marker").attr("id",a+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",a+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),tt=(0,l.__name)((t,e,a)=>{t.append("marker").attr("id",a+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",a+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),te=(0,l.__name)((t,e,a)=>{t.append("marker").attr("id",a+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",a+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),ta={extension:q,composition:G,aggregation:J,dependency:Q,lollipop:V,point:tt,circle:te,cross:(0,l.__name)((t,e,a)=>{t.append("marker").attr("id",a+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",a+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),barb:(0,l.__name)((t,e,a)=>{t.append("defs").append("marker").attr("id",a+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb")},tr=(0,n.getConfig2)()?.block?.padding??8;function ti(t,e){if(0===t||!Number.isInteger(t))throw Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw Error("Position must be a non-negative integer."+e);return t<0?{px:e,py:0}:1===t?{px:0,py:e}:{px:e%t,py:Math.floor(e/t)}}(0,l.__name)(ti,"calculateBlockPosition");var ts=(0,l.__name)(t=>{let e=0,a=0;for(let r of t.children){let{width:i,height:s,x:n,y:o}=r.size??{width:0,height:0,x:0,y:0};l.log.debug("getMaxChildSize abc95 child:",r.id,"width:",i,"height:",s,"x:",n,"y:",o,r.type),"space"!==r.type&&(i>e&&(e=i/(t.widthInColumns??1)),s>a&&(a=s))}return{width:e,height:a}},"getMaxChildSize");function tn(t,e,a=0,r=0){l.log.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"siblingWidth",a),t?.size?.width||(t.size={width:a,height:r,x:0,y:0});let i=0,s=0;if(t.children?.length>0){for(let a of t.children)tn(a,e);let n=ts(t);for(let e of(i=n.width,s=n.height,l.log.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",i,s),t.children))e.size&&(l.log.debug(`abc95 Setting size of children of ${t.id} id=${e.id} ${i} ${s} ${JSON.stringify(e.size)}`),e.size.width=i*(e.widthInColumns??1)+tr*((e.widthInColumns??1)-1),e.size.height=s,e.size.x=0,e.size.y=0,l.log.debug(`abc95 updating size of ${t.id} children child:${e.id} maxWidth:${i} maxHeight:${s}`));for(let a of t.children)tn(a,e,i,s);let o=t.columns??-1,c=0;for(let e of t.children)c+=e.widthInColumns??1;let d=t.children.length;o>0&&o<c&&(d=o);let h=Math.ceil(c/d),g=d*(i+tr)+tr,u=h*(s+tr)+tr;if(g<a){l.log.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${a} siblingHeight ${r} width ${g}`),g=a,u=r;let e=(a-d*tr-tr)/d,n=(r-h*tr-tr)/h;for(let a of(l.log.debug("Size indata abc88",t.id,"childWidth",e,"maxWidth",i),l.log.debug("Size indata abc88",t.id,"childHeight",n,"maxHeight",s),l.log.debug("Size indata abc88 xSize",d,"padding",tr),t.children))a.size&&(a.size.width=e,a.size.height=n,a.size.x=0,a.size.y=0)}if(l.log.debug(`abc95 (finale calc) ${t.id} xSize ${d} ySize ${h} columns ${o}${t.children.length} width=${Math.max(g,t.size?.width||0)}`),g<(t?.size?.width||0)){g=t?.size?.width||0;let e=o>0?Math.min(t.children.length,o):t.children.length;if(e>0){let a=(g-e*tr-tr)/e;for(let e of(l.log.debug("abc95 (growing to fit) width",t.id,g,t.size?.width,a),t.children))e.size&&(e.size.width=a)}}t.size={width:g,height:u,x:0,y:0}}l.log.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function tl(t,e){l.log.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);let a=t.columns??-1;if(l.log.debug("layoutBlocks columns abc95",t.id,"=>",a,t),t.children&&t.children.length>0){let r=t?.children[0]?.size?.width??0,i=t.children.length*r+(t.children.length-1)*tr;l.log.debug("widthOfChildren 88",i,"posX");let s=0;l.log.debug("abc91 block?.size?.x",t.id,t?.size?.x);let n=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-tr,o=0;for(let r of t.children){if(!r.size)continue;let{width:i,height:c}=r.size,{px:d,py:h}=ti(a,s);if(h!=o&&(o=h,n=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-tr,l.log.debug("New row in layout for block",t.id," and child ",r.id,o)),l.log.debug(`abc89 layout blocks (child) id: ${r.id} Pos: ${s} (px, py) ${d},${h} (${t?.size?.x},${t?.size?.y}) parent: ${t.id} width: ${i}${tr}`),t.size){let e=i/2;r.size.x=n+tr+e,l.log.debug(`abc91 layout blocks (calc) px, pyid:${r.id} startingPos=X${n} new startingPosX${r.size.x} ${e} padding=${tr} width=${i} halfWidth=${e} => x:${r.size.x} y:${r.size.y} ${r.widthInColumns} (width * (child?.w || 1)) / 2 ${i*(r?.widthInColumns??1)/2}`),n=r.size.x+e,r.size.y=t.size.y-t.size.height/2+h*(c+tr)+c/2+tr,l.log.debug(`abc88 layout blocks (calc) px, pyid:${r.id}startingPosX${n}${tr}${e}=>x:${r.size.x}y:${r.size.y}${r.widthInColumns}(width * (child?.w || 1)) / 2${i*(r?.widthInColumns??1)/2}`)}r.children&&tl(r,e);let g=r?.widthInColumns??1;a>0&&(g=Math.min(g,a-s%a)),s+=g,l.log.debug("abc88 columnsPos",r,s)}}l.log.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}function to(t,{minX:e,minY:a,maxX:r,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&"root"!==t.id){let{x:s,y:n,width:l,height:o}=t.size;s-l/2<e&&(e=s-l/2),n-o/2<a&&(a=n-o/2),s+l/2>r&&(r=s+l/2),n+o/2>i&&(i=n+o/2)}if(t.children)for(let s of t.children)({minX:e,minY:a,maxX:r,maxY:i}=to(s,{minX:e,minY:a,maxX:r,maxY:i}));return{minX:e,minY:a,maxX:r,maxY:i}}function tc(t){let e=t.getBlock("root");if(!e)return;tn(e,t,0,0),tl(e,t),l.log.debug("getBlocks",JSON.stringify(e,null,2));let{minX:a,minY:r,maxX:i,maxY:s}=to(e);return{x:a,y:r,width:i-a,height:s-r}}function td(t,e){e&&t.attr("style",e)}function th(t,e){let a=(0,h.select)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=a.append("xhtml:div"),i=t.label,s=t.isNode?"nodeLabel":"edgeLabel",l=r.append("span");return l.html((0,n.sanitizeText)(i,e)),td(l,t.labelStyle),l.attr("class",s),td(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),a.node()}(0,l.__name)(tn,"setBlockSizes"),(0,l.__name)(tl,"layoutBlocks"),(0,l.__name)(to,"findBounds"),(0,l.__name)(tc,"layout"),(0,l.__name)(td,"applyStyle"),(0,l.__name)(th,"addHtmlLabel");var tg=(0,l.__name)(async(t,e,a,r)=>{let o=t||"";"object"==typeof o&&(o=o[0]);let c=(0,n.getConfig2)();if((0,n.evaluate)(c.flowchart.htmlLabels))return o=o.replace(/\\n|\n/g,"<br />"),l.log.debug("vertexText"+o),th({isNode:r,label:await (0,i.replaceIconSubstring)((0,s.decodeEntities)(o)),labelStyle:e.replace("fill:","color:")},c);{let t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));for(let e of"string"==typeof o?o.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(o)?o:[]){let r=document.createElementNS("http://www.w3.org/2000/svg","tspan");r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.setAttribute("dy","1em"),r.setAttribute("x","0"),a?r.setAttribute("class","title-row"):r.setAttribute("class","row"),r.textContent=e.trim(),t.appendChild(r)}return t}},"createLabel"),tu=(0,l.__name)((t,e,a,r,i)=>{e.arrowTypeStart&&tp(t,"start",e.arrowTypeStart,a,r,i),e.arrowTypeEnd&&tp(t,"end",e.arrowTypeEnd,a,r,i)},"addEdgeMarkers"),ty={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},tp=(0,l.__name)((t,e,a,r,i,s)=>{let n=ty[a];n?t.attr(`marker-${e}`,`url(${r}#${i}_${s}-${n}${"start"===e?"Start":"End"})`):l.log.warn(`Unknown arrow type: ${a}`)},"addEdgeMarker"),tx={},tb={},tf=(0,l.__name)(async(t,e)=>{let a,r=(0,n.getConfig2)(),s=(0,n.evaluate)(r.flowchart.htmlLabels),l="markdown"===e.labelType?(0,i.createText)(t,e.label,{style:e.labelStyle,useHtmlLabels:s,addSvgBackground:!0},r):await tg(e.label,e.labelStyle),o=t.insert("g").attr("class","edgeLabel"),c=o.insert("g").attr("class","label");c.node().appendChild(l);let d=l.getBBox();if(s){let t=l.children[0],e=(0,h.select)(l);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}if(c.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),tx[e.id]=o,e.width=d.width,e.height=d.height,e.startLabelLeft){let r=await tg(e.startLabelLeft,e.labelStyle),i=t.insert("g").attr("class","edgeTerminals"),s=i.insert("g").attr("class","inner");a=s.node().appendChild(r);let n=r.getBBox();s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),tb[e.id]||(tb[e.id]={}),tb[e.id].startLeft=i,tm(a,e.startLabelLeft)}if(e.startLabelRight){let r=await tg(e.startLabelRight,e.labelStyle),i=t.insert("g").attr("class","edgeTerminals"),s=i.insert("g").attr("class","inner");a=i.node().appendChild(r),s.node().appendChild(r);let n=r.getBBox();s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),tb[e.id]||(tb[e.id]={}),tb[e.id].startRight=i,tm(a,e.startLabelRight)}if(e.endLabelLeft){let r=await tg(e.endLabelLeft,e.labelStyle),i=t.insert("g").attr("class","edgeTerminals"),s=i.insert("g").attr("class","inner");a=s.node().appendChild(r);let n=r.getBBox();s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),i.node().appendChild(r),tb[e.id]||(tb[e.id]={}),tb[e.id].endLeft=i,tm(a,e.endLabelLeft)}if(e.endLabelRight){let r=await tg(e.endLabelRight,e.labelStyle),i=t.insert("g").attr("class","edgeTerminals"),s=i.insert("g").attr("class","inner");a=s.node().appendChild(r);let n=r.getBBox();s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),i.node().appendChild(r),tb[e.id]||(tb[e.id]={}),tb[e.id].endRight=i,tm(a,e.endLabelRight)}return l},"insertEdgeLabel");function tm(t,e){(0,n.getConfig2)().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,l.__name)(tm,"setTerminalWidth");var t_=(0,l.__name)((t,e)=>{l.log.debug("Moving label abc88 ",t.id,t.label,tx[t.id],e);let a=e.updatedPath?e.updatedPath:e.originalPath,i=(0,n.getConfig2)(),{subGraphTitleTotalMargin:o}=(0,r.getSubGraphTitleMargins)(i);if(t.label){let r=tx[t.id],i=t.x,n=t.y;if(a){let r=s.utils_default.calcLabelPosition(a);l.log.debug("Moving label "+t.label+" from (",i,",",n,") to (",r.x,",",r.y,") abc88"),e.updatedPath&&(i=r.x,n=r.y)}r.attr("transform",`translate(${i}, ${n+o/2})`)}if(t.startLabelLeft){let e=tb[t.id].startLeft,r=t.x,i=t.y;if(a){let e=s.utils_default.calcTerminalLabelPosition(10*!!t.arrowTypeStart,"start_left",a);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.startLabelRight){let e=tb[t.id].startRight,r=t.x,i=t.y;if(a){let e=s.utils_default.calcTerminalLabelPosition(10*!!t.arrowTypeStart,"start_right",a);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.endLabelLeft){let e=tb[t.id].endLeft,r=t.x,i=t.y;if(a){let e=s.utils_default.calcTerminalLabelPosition(10*!!t.arrowTypeEnd,"end_left",a);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.endLabelRight){let e=tb[t.id].endRight,r=t.x,i=t.y;if(a){let e=s.utils_default.calcTerminalLabelPosition(10*!!t.arrowTypeEnd,"end_right",a);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}},"positionEdgeLabel"),tw=(0,l.__name)((t,e)=>{let a=t.x,r=t.y,i=Math.abs(e.x-a),s=Math.abs(e.y-r),n=t.width/2,l=t.height/2;return!!(i>=n)||!!(s>=l)},"outsideNode"),tk=(0,l.__name)((t,e,a)=>{l.log.debug(`intersection calc abc89:
115
+ outsidePoint: ${JSON.stringify(e)}
116
+ insidePoint : ${JSON.stringify(a)}
117
+ node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let r=t.x,i=t.y,s=Math.abs(r-a.x),n=t.width/2,o=a.x<e.x?n-s:n+s,c=t.height/2,d=Math.abs(e.y-a.y),h=Math.abs(e.x-a.x);if(Math.abs(i-e.y)*n>Math.abs(r-e.x)*c){let t=a.y<e.y?e.y-c-i:i-c-e.y;o=h*t/d;let r={x:a.x<e.x?a.x+o:a.x-h+o,y:a.y<e.y?a.y+d-t:a.y-d+t};return 0===o&&(r.x=e.x,r.y=e.y),0===h&&(r.x=e.x),0===d&&(r.y=e.y),l.log.debug(`abc89 topp/bott calc, Q ${d}, q ${t}, R ${h}, r ${o}`,r),r}{let t=d*(o=a.x<e.x?e.x-n-r:r-n-e.x)/h,i=a.x<e.x?a.x+h-o:a.x-h+o,s=a.y<e.y?a.y+t:a.y-t;return l.log.debug(`sides calc abc89, Q ${d}, q ${t}, R ${h}, r ${o}`,{_x:i,_y:s}),0===o&&(i=e.x,s=e.y),0===h&&(i=e.x),0===d&&(s=e.y),{x:i,y:s}}},"intersection"),tL=(0,l.__name)((t,e)=>{l.log.debug("abc88 cutPathAtIntersect",t,e);let a=[],r=t[0],i=!1;return t.forEach(t=>{if(tw(e,t)||i)r=t,i||a.push(t);else{let s=tk(e,r,t),n=!1;a.forEach(t=>{n=n||t.x===s.x&&t.y===s.y}),a.some(t=>t.x===s.x&&t.y===s.y)||a.push(s),i=!0}}),a},"cutPathAtIntersect"),tS=(0,l.__name)(function(t,e,r,i,s,o,c){let d,h=r.points;l.log.debug("abc88 InsertEdge: edge=",r,"e=",e);let g=!1,p=o.node(e.v);var x=o.node(e.w);x?.intersect&&p?.intersect&&((h=h.slice(1,r.points.length-1)).unshift(p.intersect(h[0])),h.push(x.intersect(h[h.length-1]))),r.toCluster&&(l.log.debug("to cluster abc88",i[r.toCluster]),h=tL(r.points,i[r.toCluster].node),g=!0),r.fromCluster&&(l.log.debug("from cluster abc88",i[r.fromCluster]),h=tL(h.reverse(),i[r.fromCluster].node).reverse(),g=!0);let b=h.filter(t=>!Number.isNaN(t.y)),f=y.curveBasis;r.curve&&("graph"===s||"flowchart"===s)&&(f=r.curve);let{x:m,y:_}=(0,a.getLineFunctionsWithOffset)(r),w=(0,u.line)().x(m).y(_).curve(f);switch(r.thickness){case"normal":d="edge-thickness-normal";break;case"thick":case"invisible":d="edge-thickness-thick";break;default:d=""}switch(r.pattern){case"solid":d+=" edge-pattern-solid";break;case"dotted":d+=" edge-pattern-dotted";break;case"dashed":d+=" edge-pattern-dashed"}let k=t.append("path").attr("d",w(b)).attr("id",r.id).attr("class"," "+d+(r.classes?" "+r.classes:"")).attr("style",r.style),L="";((0,n.getConfig2)().flowchart.arrowMarkerAbsolute||(0,n.getConfig2)().state.arrowMarkerAbsolute)&&(L=(0,n.getUrl)(!0)),tu(k,r,L,c,s);let S={};return g&&(S.updatedPath=h),S.originalPath=r.points,S},"insertEdge"),tE=(0,l.__name)(t=>{let e=new Set;for(let a of t)switch(a){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(a)}return e},"expandAndDeduplicateDirections"),tC=(0,l.__name)((t,e,a)=>{let r=tE(t),i=e.height+2*a.padding,s=i/2,n=e.width+2*s+a.padding,l=a.padding/2;return r.has("right")&&r.has("left")&&r.has("up")&&r.has("down")?[{x:0,y:0},{x:s,y:0},{x:n/2,y:2*l},{x:n-s,y:0},{x:n,y:0},{x:n,y:-i/3},{x:n+2*l,y:-i/2},{x:n,y:-2*i/3},{x:n,y:-i},{x:n-s,y:-i},{x:n/2,y:-i-2*l},{x:s,y:-i},{x:0,y:-i},{x:0,y:-2*i/3},{x:-2*l,y:-i/2},{x:0,y:-i/3}]:r.has("right")&&r.has("left")&&r.has("up")?[{x:s,y:0},{x:n-s,y:0},{x:n,y:-i/2},{x:n-s,y:-i},{x:s,y:-i},{x:0,y:-i/2}]:r.has("right")&&r.has("left")&&r.has("down")?[{x:0,y:0},{x:s,y:-i},{x:n-s,y:-i},{x:n,y:0}]:r.has("right")&&r.has("up")&&r.has("down")?[{x:0,y:0},{x:n,y:-s},{x:n,y:-i+s},{x:0,y:-i}]:r.has("left")&&r.has("up")&&r.has("down")?[{x:n,y:0},{x:0,y:-s},{x:0,y:-i+s},{x:n,y:-i}]:r.has("right")&&r.has("left")?[{x:s,y:0},{x:s,y:-l},{x:n-s,y:-l},{x:n-s,y:0},{x:n,y:-i/2},{x:n-s,y:-i},{x:n-s,y:-i+l},{x:s,y:-i+l},{x:s,y:-i},{x:0,y:-i/2}]:r.has("up")&&r.has("down")?[{x:n/2,y:0},{x:0,y:-l},{x:s,y:-l},{x:s,y:-i+l},{x:0,y:-i+l},{x:n/2,y:-i},{x:n,y:-i+l},{x:n-s,y:-i+l},{x:n-s,y:-l},{x:n,y:-l}]:r.has("right")&&r.has("up")?[{x:0,y:0},{x:n,y:-s},{x:0,y:-i}]:r.has("right")&&r.has("down")?[{x:0,y:0},{x:n,y:0},{x:0,y:-i}]:r.has("left")&&r.has("up")?[{x:n,y:0},{x:0,y:-s},{x:n,y:-i}]:r.has("left")&&r.has("down")?[{x:n,y:0},{x:0,y:0},{x:n,y:-i}]:r.has("right")?[{x:s,y:-l},{x:s,y:-l},{x:n-s,y:-l},{x:n-s,y:0},{x:n,y:-i/2},{x:n-s,y:-i},{x:n-s,y:-i+l},{x:s,y:-i+l},{x:s,y:-i+l}]:r.has("left")?[{x:s,y:0},{x:s,y:-l},{x:n-s,y:-l},{x:n-s,y:-i+l},{x:s,y:-i+l},{x:s,y:-i},{x:0,y:-i/2}]:r.has("up")?[{x:s,y:-l},{x:s,y:-i+l},{x:0,y:-i+l},{x:n/2,y:-i},{x:n,y:-i+l},{x:n-s,y:-i+l},{x:n-s,y:-l}]:r.has("down")?[{x:n/2,y:0},{x:0,y:-l},{x:s,y:-l},{x:s,y:-i+l},{x:n-s,y:-i+l},{x:n-s,y:-l},{x:n,y:-l}]:[{x:0,y:0}]},"getArrowPoints");function t$(t,e,a,r){var i=t.x,s=t.y,n=i-r.x,l=s-r.y,o=Math.sqrt(e*e*l*l+a*a*n*n),c=Math.abs(e*a*n/o);r.x<i&&(c=-c);var d=Math.abs(e*a*l/o);return r.y<s&&(d=-d),{x:i+c,y:s+d}}function tD(t,e,a){return t$(t,e,e,a)}function tT(t,e,a,r){var i,s,n,l,o,c,d,h,g,u,y,p,x;if(i=e.y-t.y,n=t.x-e.x,o=e.x*t.y-t.x*e.y,g=i*a.x+n*a.y+o,u=i*r.x+n*r.y+o,!(0!==g&&0!==u&&tv(g,u))){if((s=r.y-a.y,l=a.x-r.x,c=r.x*a.y-a.x*r.y,d=s*t.x+l*t.y+c,h=s*e.x+l*e.y+c,!(0!==d&&0!==h&&tv(d,h)))&&0!=(y=i*l-s*n))return p=Math.abs(y/2),{x:(x=n*c-l*o)<0?(x-p)/y:(x+p)/y,y:(x=s*o-i*c)<0?(x-p)/y:(x+p)/y}}}function tv(t,e){return t*e>0}function tN(t,e,a){var r=t.x,i=t.y,s=[],n=1/0,l=1/0;"function"==typeof e.forEach?e.forEach(function(t){n=Math.min(n,t.x),l=Math.min(l,t.y)}):(n=Math.min(n,e.x),l=Math.min(l,e.y));for(var o=r-t.width/2-n,c=i-t.height/2-l,d=0;d<e.length;d++){var h=e[d],g=e[d<e.length-1?d+1:0],u=tT(t,a,{x:o+h.x,y:c+h.y},{x:o+g.x,y:c+g.y});u&&s.push(u)}return s.length?(s.length>1&&s.sort(function(t,e){var r=t.x-a.x,i=t.y-a.y,s=Math.sqrt(r*r+i*i),n=e.x-a.x,l=e.y-a.y,o=Math.sqrt(n*n+l*l);return s<o?-1:+(s!==o)}),s[0]):t}(0,l.__name)(function(t,e){return t.intersect(e)},"intersectNode"),(0,l.__name)(t$,"intersectEllipse"),(0,l.__name)(tD,"intersectCircle"),(0,l.__name)(tT,"intersectLine"),(0,l.__name)(tv,"sameSign"),(0,l.__name)(tN,"intersectPolygon");var tI=(0,l.__name)((t,e)=>{var a,r,i=t.x,s=t.y,n=e.x-i,l=e.y-s,o=t.width/2,c=t.height/2;return Math.abs(l)*o>Math.abs(n)*c?(l<0&&(c=-c),a=0===l?0:c*n/l,r=c):(n<0&&(o=-o),a=o,r=0===n?0:o*l/n),{x:i+a,y:s+r}},"intersectRect"),tB=(0,l.__name)(async(t,e,a,r)=>{let o,c,d=(0,n.getConfig2)(),g=e.useHtmlLabels||(0,n.evaluate)(d.flowchart.htmlLabels),u=t.insert("g").attr("class",a||"node default").attr("id",e.domId||e.id),y=u.insert("g").attr("class","label").attr("style",e.labelStyle);o=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0];let p=y.node(),x=(c="markdown"===e.labelType?(0,i.createText)(y,(0,n.sanitizeText)((0,s.decodeEntities)(o),d),{useHtmlLabels:g,width:e.width||d.flowchart.wrappingWidth,classes:"markdown-node-label"},d):p.appendChild(await tg((0,n.sanitizeText)((0,s.decodeEntities)(o),d),e.labelStyle,!1,r))).getBBox(),b=e.padding/2;if((0,n.evaluate)(d.flowchart.htmlLabels)){let t=c.children[0],e=(0,h.select)(c),a=t.getElementsByTagName("img");if(a){let t=""===o.replace(/<img[^>]*>/g,"").trim();await Promise.all([...a].map(e=>new Promise(a=>{function r(){if(e.style.display="flex",e.style.flexDirection="column",t){let t=5*parseInt(d.fontSize?d.fontSize:window.getComputedStyle(document.body).fontSize,10)+"px";e.style.minWidth=t,e.style.maxWidth=t}else e.style.width="100%";a(e)}(0,l.__name)(r,"setupImage"),setTimeout(()=>{e.complete&&r()}),e.addEventListener("error",r),e.addEventListener("load",r)})))}x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}return g?y.attr("transform","translate("+-x.width/2+", "+-x.height/2+")"):y.attr("transform","translate(0, "+-x.height/2+")"),e.centerLabel&&y.attr("transform","translate("+-x.width/2+", "+-x.height/2+")"),y.insert("rect",":first-child"),{shapeSvg:u,bbox:x,halfPadding:b,label:y}},"labelHelper"),tz=(0,l.__name)((t,e)=>{let a=e.node().getBBox();t.width=a.width,t.height=a.height},"updateNodeBounds");function tR(t,e,a,r){return t.insert("polygon",":first-child").attr("points",r.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+a/2+")")}(0,l.__name)(tR,"insertPolygonShape");var tO=(0,l.__name)(async(t,e)=>{e.useHtmlLabels||(0,n.getConfig2)().flowchart.htmlLabels||(e.centerLabel=!0);let{shapeSvg:a,bbox:r,halfPadding:i}=await tB(t,e,"node "+e.classes,!0);l.log.info("Classes = ",e.classes);let s=a.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-r.width/2-i).attr("y",-r.height/2-i).attr("width",r.width+e.padding).attr("height",r.height+e.padding),tz(e,s),e.intersect=function(t){return tI(e,t)},a},"note"),tA=(0,l.__name)(t=>t?" "+t:"","formatClass"),tM=(0,l.__name)((t,e)=>`${e||"node default"}${tA(t.classes)} ${tA(t.class)}`,"getClassesFromNode"),tP=(0,l.__name)(async(t,e)=>{let{shapeSvg:a,bbox:r}=await tB(t,e,tM(e,void 0),!0),i=r.width+e.padding+(r.height+e.padding),s=[{x:i/2,y:0},{x:i,y:-i/2},{x:i/2,y:-i},{x:0,y:-i/2}];l.log.info("Question main (Circle)");let n=tR(a,i,i,s);return n.attr("style",e.style),tz(e,n),e.intersect=function(t){return l.log.warn("Intersect called"),tN(e,s,t)},a},"question"),tW=(0,l.__name)((t,e)=>{let a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);return a.insert("polygon",":first-child").attr("points",[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map(function(t){return t.x+","+t.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return tD(e,14,t)},a},"choice"),tY=(0,l.__name)(async(t,e)=>{let{shapeSvg:a,bbox:r}=await tB(t,e,tM(e,void 0),!0),i=r.height+e.padding,s=i/4,n=r.width+2*s+e.padding,l=[{x:s,y:0},{x:n-s,y:0},{x:n,y:-i/2},{x:n-s,y:-i},{x:s,y:-i},{x:0,y:-i/2}],o=tR(a,n,i,l);return o.attr("style",e.style),tz(e,o),e.intersect=function(t){return tN(e,l,t)},a},"hexagon"),tF=(0,l.__name)(async(t,e)=>{let{shapeSvg:a,bbox:r}=await tB(t,e,void 0,!0),i=r.height+2*e.padding,s=i/2,n=r.width+2*s+e.padding,l=tC(e.directions,r,e),o=tR(a,n,i,l);return o.attr("style",e.style),tz(e,o),e.intersect=function(t){return tN(e,l,t)},a},"block_arrow"),tX=(0,l.__name)(async(t,e)=>{let{shapeSvg:a,bbox:r}=await tB(t,e,tM(e,void 0),!0),i=r.width+e.padding,s=r.height+e.padding,n=[{x:-s/2,y:0},{x:i,y:0},{x:i,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}];return tR(a,i,s,n).attr("style",e.style),e.width=i+s,e.height=s,e.intersect=function(t){return tN(e,n,t)},a},"rect_left_inv_arrow"),tU=(0,l.__name)(async(t,e)=>{let{shapeSvg:a,bbox:r}=await tB(t,e,tM(e),!0),i=r.width+e.padding,s=r.height+e.padding,n=[{x:-2*s/6,y:0},{x:i-s/6,y:0},{x:i+2*s/6,y:-s},{x:s/6,y:-s}],l=tR(a,i,s,n);return l.attr("style",e.style),tz(e,l),e.intersect=function(t){return tN(e,n,t)},a},"lean_right"),tK=(0,l.__name)(async(t,e)=>{let{shapeSvg:a,bbox:r}=await tB(t,e,tM(e,void 0),!0),i=r.width+e.padding,s=r.height+e.padding,n=[{x:2*s/6,y:0},{x:i+s/6,y:0},{x:i-2*s/6,y:-s},{x:-s/6,y:-s}],l=tR(a,i,s,n);return l.attr("style",e.style),tz(e,l),e.intersect=function(t){return tN(e,n,t)},a},"lean_left"),tH=(0,l.__name)(async(t,e)=>{let{shapeSvg:a,bbox:r}=await tB(t,e,tM(e,void 0),!0),i=r.width+e.padding,s=r.height+e.padding,n=[{x:-2*s/6,y:0},{x:i+2*s/6,y:0},{x:i-s/6,y:-s},{x:s/6,y:-s}],l=tR(a,i,s,n);return l.attr("style",e.style),tz(e,l),e.intersect=function(t){return tN(e,n,t)},a},"trapezoid"),tj=(0,l.__name)(async(t,e)=>{let{shapeSvg:a,bbox:r}=await tB(t,e,tM(e,void 0),!0),i=r.width+e.padding,s=r.height+e.padding,n=[{x:s/6,y:0},{x:i-s/6,y:0},{x:i+2*s/6,y:-s},{x:-2*s/6,y:-s}],l=tR(a,i,s,n);return l.attr("style",e.style),tz(e,l),e.intersect=function(t){return tN(e,n,t)},a},"inv_trapezoid"),tZ=(0,l.__name)(async(t,e)=>{let{shapeSvg:a,bbox:r}=await tB(t,e,tM(e,void 0),!0),i=r.width+e.padding,s=r.height+e.padding,n=[{x:0,y:0},{x:i+s/2,y:0},{x:i,y:-s/2},{x:i+s/2,y:-s},{x:0,y:-s}],l=tR(a,i,s,n);return l.attr("style",e.style),tz(e,l),e.intersect=function(t){return tN(e,n,t)},a},"rect_right_inv_arrow"),tq=(0,l.__name)(async(t,e)=>{let{shapeSvg:a,bbox:r}=await tB(t,e,tM(e,void 0),!0),i=r.width+e.padding,s=i/2,n=s/(2.5+i/50),l=r.height+n+e.padding,o="M 0,"+n+" a "+s+","+n+" 0,0,0 "+i+" 0 a "+s+","+n+" 0,0,0 "+-i+" 0 l 0,"+l+" a "+s+","+n+" 0,0,0 "+i+" 0 l 0,"+-l,c=a.attr("label-offset-y",n).insert("path",":first-child").attr("style",e.style).attr("d",o).attr("transform","translate("+-i/2+","+-(l/2+n)+")");return tz(e,c),e.intersect=function(t){let a=tI(e,t),r=a.x-e.x;if(0!=s&&(Math.abs(r)<e.width/2||Math.abs(r)==e.width/2&&Math.abs(a.y-e.y)>e.height/2-n)){let i=n*n*(1-r*r/(s*s));0!=i&&(i=Math.sqrt(i)),i=n-i,t.y-e.y>0&&(i=-i),a.y+=i}return a},a},"cylinder"),tG=(0,l.__name)(async(t,e)=>{let{shapeSvg:a,bbox:r,halfPadding:i}=await tB(t,e,"node "+e.classes+" "+e.class,!0),s=a.insert("rect",":first-child"),n=e.positioned?e.width:r.width+e.padding,o=e.positioned?e.height:r.height+e.padding,c=e.positioned?-n/2:-r.width/2-i,d=e.positioned?-o/2:-r.height/2-i;if(s.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",c).attr("y",d).attr("width",n).attr("height",o),e.props){let t=new Set(Object.keys(e.props));e.props.borders&&(tV(s,e.props.borders,n,o),t.delete("borders")),t.forEach(t=>{l.log.warn(`Unknown node property ${t}`)})}return tz(e,s),e.intersect=function(t){return tI(e,t)},a},"rect"),tJ=(0,l.__name)(async(t,e)=>{let{shapeSvg:a,bbox:r,halfPadding:i}=await tB(t,e,"node "+e.classes,!0),s=a.insert("rect",":first-child"),n=e.positioned?e.width:r.width+e.padding,o=e.positioned?e.height:r.height+e.padding,c=e.positioned?-n/2:-r.width/2-i,d=e.positioned?-o/2:-r.height/2-i;if(s.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",c).attr("y",d).attr("width",n).attr("height",o),e.props){let t=new Set(Object.keys(e.props));e.props.borders&&(tV(s,e.props.borders,n,o),t.delete("borders")),t.forEach(t=>{l.log.warn(`Unknown node property ${t}`)})}return tz(e,s),e.intersect=function(t){return tI(e,t)},a},"composite"),tQ=(0,l.__name)(async(t,e)=>{let{shapeSvg:a}=await tB(t,e,"label",!0);l.log.trace("Classes = ",e.class);let r=a.insert("rect",":first-child");if(r.attr("width",0).attr("height",0),a.attr("class","label edgeLabel"),e.props){let t=new Set(Object.keys(e.props));e.props.borders&&(tV(r,e.props.borders,0,0),t.delete("borders")),t.forEach(t=>{l.log.warn(`Unknown node property ${t}`)})}return tz(e,r),e.intersect=function(t){return tI(e,t)},a},"labelRect");function tV(t,e,a,r){let i=[],s=(0,l.__name)(t=>{i.push(t,0)},"addBorder"),n=(0,l.__name)(t=>{i.push(0,t)},"skipBorder");e.includes("t")?(l.log.debug("add top border"),s(a)):n(a),e.includes("r")?(l.log.debug("add right border"),s(r)):n(r),e.includes("b")?(l.log.debug("add bottom border"),s(a)):n(a),e.includes("l")?(l.log.debug("add left border"),s(r)):n(r),t.attr("stroke-dasharray",i.join(" "))}(0,l.__name)(tV,"applyNodePropertyBorders");var t0=(0,l.__name)(async(t,e)=>{let a;a=e.classes?"node "+e.classes:"node default";let r=t.insert("g").attr("class",a).attr("id",e.domId||e.id),i=r.insert("rect",":first-child"),s=r.insert("line"),o=r.insert("g").attr("class","label"),c=e.labelText.flat?e.labelText.flat():e.labelText,d="";d="object"==typeof c?c[0]:c,l.log.info("Label text abc79",d,c,"object"==typeof c);let g=o.node().appendChild(await tg(d,e.labelStyle,!0,!0)),u={width:0,height:0};if((0,n.evaluate)((0,n.getConfig2)().flowchart.htmlLabels)){let t=g.children[0],e=(0,h.select)(g);u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}l.log.info("Text 2",c);let y=c.slice(1,c.length),p=g.getBBox(),x=o.node().appendChild(await tg(y.join?y.join("<br/>"):y,e.labelStyle,!0,!0));if((0,n.evaluate)((0,n.getConfig2)().flowchart.htmlLabels)){let t=x.children[0],e=(0,h.select)(x);u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}let b=e.padding/2;return(0,h.select)(x).attr("transform","translate( "+(u.width>p.width?0:(p.width-u.width)/2)+", "+(p.height+b+5)+")"),(0,h.select)(g).attr("transform","translate( "+(u.width<p.width?0:-(p.width-u.width)/2)+", 0)"),u=o.node().getBBox(),o.attr("transform","translate("+-u.width/2+", "+(-u.height/2-b+3)+")"),i.attr("class","outer title-state").attr("x",-u.width/2-b).attr("y",-u.height/2-b).attr("width",u.width+e.padding).attr("height",u.height+e.padding),s.attr("class","divider").attr("x1",-u.width/2-b).attr("x2",u.width/2+b).attr("y1",-u.height/2-b+p.height+b).attr("y2",-u.height/2-b+p.height+b),tz(e,i),e.intersect=function(t){return tI(e,t)},r},"rectWithTitle"),t1=(0,l.__name)(async(t,e)=>{let{shapeSvg:a,bbox:r}=await tB(t,e,tM(e,void 0),!0),i=r.height+e.padding,s=r.width+i/4+e.padding,n=a.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-s/2).attr("y",-i/2).attr("width",s).attr("height",i);return tz(e,n),e.intersect=function(t){return tI(e,t)},a},"stadium"),t2=(0,l.__name)(async(t,e)=>{let{shapeSvg:a,bbox:r,halfPadding:i}=await tB(t,e,tM(e,void 0),!0),s=a.insert("circle",":first-child");return s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+i).attr("width",r.width+e.padding).attr("height",r.height+e.padding),l.log.info("Circle main"),tz(e,s),e.intersect=function(t){return l.log.info("Circle intersect",e,r.width/2+i,t),tD(e,r.width/2+i,t)},a},"circle"),t3=(0,l.__name)(async(t,e)=>{let{shapeSvg:a,bbox:r,halfPadding:i}=await tB(t,e,tM(e,void 0),!0),s=a.insert("g",":first-child"),n=s.insert("circle"),o=s.insert("circle");return s.attr("class",e.class),n.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+i+5).attr("width",r.width+e.padding+10).attr("height",r.height+e.padding+10),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+i).attr("width",r.width+e.padding).attr("height",r.height+e.padding),l.log.info("DoubleCircle main"),tz(e,n),e.intersect=function(t){return l.log.info("DoubleCircle intersect",e,r.width/2+i+5,t),tD(e,r.width/2+i+5,t)},a},"doublecircle"),t4=(0,l.__name)(async(t,e)=>{let{shapeSvg:a,bbox:r}=await tB(t,e,tM(e,void 0),!0),i=r.width+e.padding,s=r.height+e.padding,n=[{x:0,y:0},{x:i,y:0},{x:i,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-s},{x:-8,y:-s},{x:-8,y:0}],l=tR(a,i,s,n);return l.attr("style",e.style),tz(e,l),e.intersect=function(t){return tN(e,n,t)},a},"subroutine"),t8=(0,l.__name)((t,e)=>{let a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=a.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),tz(e,r),e.intersect=function(t){return tD(e,7,t)},a},"start"),t5=(0,l.__name)((t,e,a)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,s=10;return"LR"===a&&(i=10,s=70),tz(e,r.append("rect").attr("x",-1*i/2).attr("y",-1*s/2).attr("width",i).attr("height",s).attr("class","fork-join")),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return tI(e,t)},r},"forkJoin"),t9={rhombus:tP,composite:tJ,question:tP,rect:tG,labelRect:tQ,rectWithTitle:t0,choice:tW,circle:t2,doublecircle:t3,stadium:t1,hexagon:tY,block_arrow:tF,rect_left_inv_arrow:tX,lean_right:tU,lean_left:tK,trapezoid:tH,inv_trapezoid:tj,rect_right_inv_arrow:tZ,cylinder:tq,start:t8,end:(0,l.__name)((t,e)=>{let a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=a.insert("circle",":first-child"),i=a.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),tz(e,i),e.intersect=function(t){return tD(e,7,t)},a},"end"),note:tO,subroutine:t4,fork:t5,join:t5,class_box:(0,l.__name)(async(t,e)=>{let a,r=e.padding/2;a=e.classes?"node "+e.classes:"node default";let i=t.insert("g").attr("class",a).attr("id",e.domId||e.id),s=i.insert("rect",":first-child"),l=i.insert("line"),o=i.insert("line"),c=0,d=4,g=i.insert("g").attr("class","label"),u=0,y=e.classData.annotations?.[0],p=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",x=g.node().appendChild(await tg(p,e.labelStyle,!0,!0)),b=x.getBBox();if((0,n.evaluate)((0,n.getConfig2)().flowchart.htmlLabels)){let t=x.children[0],e=(0,h.select)(x);b=t.getBoundingClientRect(),e.attr("width",b.width),e.attr("height",b.height)}e.classData.annotations[0]&&(d+=b.height+4,c+=b.width);let f=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&((0,n.getConfig2)().flowchart.htmlLabels?f+="&lt;"+e.classData.type+"&gt;":f+="<"+e.classData.type+">");let m=g.node().appendChild(await tg(f,e.labelStyle,!0,!0));(0,h.select)(m).attr("class","classTitle");let _=m.getBBox();if((0,n.evaluate)((0,n.getConfig2)().flowchart.htmlLabels)){let t=m.children[0],e=(0,h.select)(m);_=t.getBoundingClientRect(),e.attr("width",_.width),e.attr("height",_.height)}d+=_.height+4,_.width>c&&(c=_.width);let w=[];e.classData.members.forEach(async t=>{let a=t.getDisplayDetails(),r=a.displayText;(0,n.getConfig2)().flowchart.htmlLabels&&(r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;"));let i=g.node().appendChild(await tg(r,a.cssStyle?a.cssStyle:e.labelStyle,!0,!0)),s=i.getBBox();if((0,n.evaluate)((0,n.getConfig2)().flowchart.htmlLabels)){let t=i.children[0],e=(0,h.select)(i);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}s.width>c&&(c=s.width),d+=s.height+4,w.push(i)}),d+=8;let k=[];if(e.classData.methods.forEach(async t=>{let a=t.getDisplayDetails(),r=a.displayText;(0,n.getConfig2)().flowchart.htmlLabels&&(r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;"));let i=g.node().appendChild(await tg(r,a.cssStyle?a.cssStyle:e.labelStyle,!0,!0)),s=i.getBBox();if((0,n.evaluate)((0,n.getConfig2)().flowchart.htmlLabels)){let t=i.children[0],e=(0,h.select)(i);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}s.width>c&&(c=s.width),d+=s.height+4,k.push(i)}),d+=8,y){let t=(c-b.width)/2;(0,h.select)(x).attr("transform","translate( "+(-1*c/2+t)+", "+-1*d/2+")"),u=b.height+4}let L=(c-_.width)/2;return(0,h.select)(m).attr("transform","translate( "+(-1*c/2+L)+", "+(-1*d/2+u)+")"),u+=_.height+4,l.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-d/2-r+8+u).attr("y2",-d/2-r+8+u),u+=8,w.forEach(t=>{(0,h.select)(t).attr("transform","translate( "+-c/2+", "+(-1*d/2+u+4)+")");let e=t?.getBBox();u+=(e?.height??0)+4}),u+=8,o.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-d/2-r+8+u).attr("y2",-d/2-r+8+u),u+=8,k.forEach(t=>{(0,h.select)(t).attr("transform","translate( "+-c/2+", "+(-1*d/2+u)+")");let e=t?.getBBox();u+=(e?.height??0)+4}),s.attr("style",e.style).attr("class","outer title-state").attr("x",-c/2-r).attr("y",-(d/2)-r).attr("width",c+e.padding).attr("height",d+e.padding),tz(e,s),e.intersect=function(t){return tI(e,t)},i},"class_box")},t6={},t7=(0,l.__name)(async(t,e,a)=>{let r,i;if(e.link){let s;"sandbox"===(0,n.getConfig2)().securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),r=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s),i=await t9[e.shape](r,e,a)}else r=i=await t9[e.shape](t,e,a);return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),t6[e.id]=r,e.haveCallback&&t6[e.id].attr("class",t6[e.id].attr("class")+" clickable"),r},"insertNode"),et=(0,l.__name)(t=>{let e=t6[t.id];l.log.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let a=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+a-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),a},"positionNode");function ee(t,e,a=!1){let r,i="default";(t?.classes?.length||0)>0&&(i=(t?.classes??[]).join(" ")),i+=" flowchart-label";let l=0,o="";switch(t.type){case"round":l=5,o="rect";break;case"composite":l=0,o="composite",r=0;break;case"square":case"group":default:o="rect";break;case"diamond":o="question";break;case"hexagon":o="hexagon";break;case"block_arrow":o="block_arrow";break;case"odd":case"rect_left_inv_arrow":o="rect_left_inv_arrow";break;case"lean_right":o="lean_right";break;case"lean_left":o="lean_left";break;case"trapezoid":o="trapezoid";break;case"inv_trapezoid":o="inv_trapezoid";break;case"circle":o="circle";break;case"ellipse":o="ellipse";break;case"stadium":o="stadium";break;case"subroutine":o="subroutine";break;case"cylinder":o="cylinder";break;case"doublecircle":o="doublecircle"}let c=(0,s.getStylesFromArray)(t?.styles??[]),d=t.label,h=t.size??{width:0,height:0,x:0,y:0};return{labelStyle:c.labelStyle,shape:o,labelText:d,rx:l,ry:l,class:i,style:c.style,id:t.id,directions:t.directions,width:h.width,height:h.height,x:h.x,y:h.y,positioned:a,intersect:void 0,type:t.type,padding:r??(0,n.getConfig)()?.block?.padding??0}}async function ea(t,e,a){let r=ee(e,a,!1);if("group"===r.type)return;let i=(0,n.getConfig)(),s=await t7(t,r,{config:i}),l=s.node().getBBox(),o=a.getBlock(r.id);o.size={width:l.width,height:l.height,x:0,y:0,node:s},a.setBlock(o),s.remove()}async function er(t,e,a){let r=ee(e,a,!0);if("space"!==a.getBlock(r.id).type){let a=(0,n.getConfig)();await t7(t,r,{config:a}),e.intersect=r?.intersect,et(r)}}async function ei(t,e,a,r){for(let i of e)await r(t,i,a),i.children&&await ei(t,i.children,a,r)}async function es(t,e,a){await ei(t,e,a,ea)}async function en(t,e,a){await ei(t,e,a,er)}async function el(t,e,a,r,i){let s=new g.Graph({multigraph:!0,compound:!0});for(let t of(s.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8}),a))t.size&&s.setNode(t.id,{width:t.size.width,height:t.size.height,intersect:t.intersect});for(let a of e)if(a.start&&a.end){let e=r.getBlock(a.start),n=r.getBlock(a.end);if(e?.size&&n?.size){let r=e.size,l=n.size,o=[{x:r.x,y:r.y},{x:r.x+(l.x-r.x)/2,y:r.y+(l.y-r.y)/2},{x:l.x,y:l.y}];tS(t,{v:a.start,w:a.end,name:a.id},{...a,arrowTypeEnd:a.arrowTypeEnd,arrowTypeStart:a.arrowTypeStart,points:o,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",s,i),a.label&&(await tf(t,{...a,label:a.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:a.arrowTypeEnd,arrowTypeStart:a.arrowTypeStart,points:o,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),t_({...a,x:o[1].x,y:o[1].y},{originalPath:o}))}}}(0,l.__name)(ee,"getNodeFromBlock"),(0,l.__name)(ea,"calculateBlockSize"),(0,l.__name)(er,"insertBlockPositioned"),(0,l.__name)(ei,"performOperations"),(0,l.__name)(es,"calculateBlockSizes"),(0,l.__name)(en,"insertBlocks"),(0,l.__name)(el,"insertEdges");var eo=(0,l.__name)(function(t,e){return e.db.getClasses()},"getClasses"),ec={parser:p,db:K,renderer:{draw:(0,l.__name)(async function(t,e,a,r){let i,{securityLevel:s,block:o}=(0,n.getConfig)(),c=r.db;"sandbox"===s&&(i=(0,h.select)("#i"+e));let d="sandbox"===s?(0,h.select)(i.nodes()[0].contentDocument.body):(0,h.select)("body"),g="sandbox"===s?d.select(`[id="${e}"]`):(0,h.select)(`[id="${e}"]`);Z(g,["point","circle","cross"],r.type,e);let u=c.getBlocks(),y=c.getBlocksFlat(),p=c.getEdges(),x=g.insert("g").attr("class","block");await es(x,u,c);let b=tc(c);if(await en(x,u,c),await el(x,p,y,c,e),b){let t=Math.max(1,Math.round(.125*(b.width/b.height))),e=b.height+t+10,a=b.width+10,{useMaxWidth:r}=o;(0,n.configureSvgSize)(g,e,a,!!r),l.log.debug("Here Bounds",b,b),g.attr("viewBox",`${b.x-5} ${b.y-5} ${b.width+10} ${b.height+10}`)}},"draw"),getClasses:eo},styles:j};t.s(["diagram",()=>ec])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,51273,(t,e,i)=>{t.e,e.exports=function(){var t=[function(t,e,i){"use strict";function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,t.exports=r},function(t,e,i){"use strict";var r=i(2),n=i(8),o=i(9);function s(t,e,i){r.call(this,i),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=i,this.bendpoints=[],this.source=t,this.target=e}for(var a in s.prototype=Object.create(r.prototype),r)s[a]=r[a];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(t,e){for(var i=this.getOtherEnd(t),r=e.getGraphManager().getRoot();;){if(i.getOwner()==e)return i;if(i.getOwner()==r)break;i=i.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=[,,,,];this.isOverlapingSourceAndTarget=n.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],1>Math.abs(this.lengthX)&&(this.lengthX=o.sign(this.lengthX)),1>Math.abs(this.lengthY)&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),1>Math.abs(this.lengthX)&&(this.lengthX=o.sign(this.lengthX)),1>Math.abs(this.lengthY)&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,i){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,e,i){"use strict";var r=i(2),n=i(10),o=i(13),s=i(0),a=i(16),h=i(4);function l(t,e,i,s){null==i&&null==s&&(s=e),r.call(this,s),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=n.MIN_VALUE,this.inclusionTreeDepth=n.MAX_VALUE,this.vGraphObject=s,this.edges=[],this.graphManager=t,null!=i&&null!=e?this.rect=new o(e.x,e.y,i.width,i.height):this.rect=new o}for(var g in l.prototype=Object.create(r.prototype),r)l[g]=r[g];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(t){this.rect.width=t},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(t){this.rect.height=t},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},l.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},l.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},l.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},l.prototype.getEdgeListToNode=function(t){var e=[],i=this;return i.edges.forEach(function(r){if(r.target==t){if(r.source!=i)throw"Incorrect edge source!";e.push(r)}}),e},l.prototype.getEdgesBetween=function(t){var e=[],i=this;return i.edges.forEach(function(r){if(r.source!=i&&r.target!=i)throw"Incorrect edge source and/or target";(r.target==t||r.source==t)&&e.push(r)}),e},l.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach(function(i){if(i.source==e)t.add(i.target);else{if(i.target!=e)throw"Incorrect incidency!";t.add(i.source)}}),t},l.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),i=0;i<e.length;i++)e[i].withChildren().forEach(function(e){t.add(e)});return t},l.prototype.getNoOfChildren=function(){var t=0;if(null==this.child)t=1;else for(var e=this.child.getNodes(),i=0;i<e.length;i++)t+=e[i].getNoOfChildren();return 0==t&&(t=1),t},l.prototype.getEstimatedSize=function(){if(this.estimatedSize==n.MIN_VALUE)throw"assert failed";return this.estimatedSize},l.prototype.calcEstimatedSize=function(){return null==this.child?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},l.prototype.scatter=function(){var t,e,i=-s.INITIAL_WORLD_BOUNDARY,r=s.INITIAL_WORLD_BOUNDARY;t=s.WORLD_CENTER_X+a.nextDouble()*(r-i)+i;var n=-s.INITIAL_WORLD_BOUNDARY,o=s.INITIAL_WORLD_BOUNDARY;e=s.WORLD_CENTER_Y+a.nextDouble()*(o-n)+n,this.rect.x=t,this.rect.y=e},l.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";if(0!=this.getChild().getNodes().length){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),s.NODE_DIMENSIONS_INCLUDE_LABELS){var e=t.getRight()-t.getLeft(),i=t.getBottom()-t.getTop();this.labelWidth>e&&(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)),this.labelHeight>i&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-i)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-i),this.setHeight(this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==n.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},l.prototype.transform=function(t){var e=this.rect.x;e>s.WORLD_BOUNDARY?e=s.WORLD_BOUNDARY:e<-s.WORLD_BOUNDARY&&(e=-s.WORLD_BOUNDARY);var i=this.rect.y;i>s.WORLD_BOUNDARY?i=s.WORLD_BOUNDARY:i<-s.WORLD_BOUNDARY&&(i=-s.WORLD_BOUNDARY);var r=new h(e,i),n=t.inverseTransformPoint(r);this.setLocation(n.x,n.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=l},function(t,e,i){"use strict";function r(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(t){this.x=t},r.prototype.setY=function(t){this.y=t},r.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=r},function(t,e,i){"use strict";var r=i(2),n=i(10),o=i(0),s=i(6),a=i(3),h=i(1),l=i(13),g=i(12),u=i(11);function c(t,e,i){r.call(this,i),this.estimatedSize=n.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var d in c.prototype=Object.create(r.prototype),r)c[d]=r[d];c.prototype.getNodes=function(){return this.nodes},c.prototype.getEdges=function(){return this.edges},c.prototype.getGraphManager=function(){return this.graphManager},c.prototype.getParent=function(){return this.parent},c.prototype.getLeft=function(){return this.left},c.prototype.getRight=function(){return this.right},c.prototype.getTop=function(){return this.top},c.prototype.getBottom=function(){return this.bottom},c.prototype.isConnected=function(){return this.isConnected},c.prototype.add=function(t,e,i){if(null==e&&null==i){if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(t)>-1)throw"Node already in graph!";return t.owner=this,this.getNodes().push(t),t}if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(i)>-1))throw"Source or target not in graph!";if(e.owner!=i.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=i.owner?null:(t.source=e,t.target=i,t.isInterGraph=!1,this.getEdges().push(t),e.edges.push(t),i!=e&&i.edges.push(t),t)},c.prototype.remove=function(t){if(t instanceof a){if(null==t)throw"Node is null!";if(null==t.owner||t.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var e,i=t.edges.slice(),r=i.length,n=0;n<r;n++)(e=i[n]).isInterGraph?this.graphManager.remove(e):e.source.owner.remove(e);var o=this.nodes.indexOf(t);if(-1==o)throw"Node not in owner node list!";this.nodes.splice(o,1)}else if(t instanceof h){var e=t;if(null==e)throw"Edge is null!";if(null==e.source||null==e.target)throw"Source and/or target is null!";if(null==e.source.owner||null==e.target.owner||e.source.owner!=this||e.target.owner!=this)throw"Source and/or target owner is invalid!";var s=e.source.edges.indexOf(e),l=e.target.edges.indexOf(e);if(!(s>-1&&l>-1))throw"Source and/or target doesn't know this edge!";e.source.edges.splice(s,1),e.target!=e.source&&e.target.edges.splice(l,1);var o=e.source.owner.getEdges().indexOf(e);if(-1==o)throw"Not in owner's edge list!";e.source.owner.getEdges().splice(o,1)}},c.prototype.updateLeftTop=function(){for(var t,e,i,r=n.MAX_VALUE,o=n.MAX_VALUE,s=this.getNodes(),a=s.length,h=0;h<a;h++){var l=s[h];t=l.getTop(),e=l.getLeft(),r>t&&(r=t),o>e&&(o=e)}return r==n.MAX_VALUE?null:(i=void 0!=s[0].getParent().paddingLeft?s[0].getParent().paddingLeft:this.margin,this.left=o-i,this.top=r-i,new g(this.left,this.top))},c.prototype.updateBounds=function(t){for(var e,i,r,o,s,a=n.MAX_VALUE,h=-n.MAX_VALUE,g=n.MAX_VALUE,u=-n.MAX_VALUE,c=this.nodes,d=c.length,p=0;p<d;p++){var f=c[p];t&&null!=f.child&&f.updateBounds(),e=f.getLeft(),i=f.getRight(),r=f.getTop(),o=f.getBottom(),a>e&&(a=e),h<i&&(h=i),g>r&&(g=r),u<o&&(u=o)}var y=new l(a,g,h-a,u-g);a==n.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),s=void 0!=c[0].getParent().paddingLeft?c[0].getParent().paddingLeft:this.margin,this.left=y.x-s,this.right=y.x+y.width+s,this.top=y.y-s,this.bottom=y.y+y.height+s},c.calculateBounds=function(t){for(var e,i,r,o,s=n.MAX_VALUE,a=-n.MAX_VALUE,h=n.MAX_VALUE,g=-n.MAX_VALUE,u=t.length,c=0;c<u;c++){var d=t[c];e=d.getLeft(),i=d.getRight(),r=d.getTop(),o=d.getBottom(),s>e&&(s=e),a<i&&(a=i),h>r&&(h=r),g<o&&(g=o)}return new l(s,h,a-s,g-h)},c.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},c.prototype.getEstimatedSize=function(){if(this.estimatedSize==n.MIN_VALUE)throw"assert failed";return this.estimatedSize},c.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,i=e.length,r=0;r<i;r++)t+=e[r].calcEstimatedSize();return 0==t?this.estimatedSize=o.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=t/Math.sqrt(this.nodes.length),this.estimatedSize},c.prototype.updateConnected=function(){var t,e,i=this;if(0==this.nodes.length){this.isConnected=!0;return}var r=new u,n=new Set,o=this.nodes[0];for(o.withChildren().forEach(function(t){r.push(t),n.add(t)});0!==r.length;)for(var s=(t=(o=r.shift()).getEdges()).length,a=0;a<s;a++)null==(e=t[a].getOtherEndInGraph(o,this))||n.has(e)||e.withChildren().forEach(function(t){r.push(t),n.add(t)});if(this.isConnected=!1,n.size>=this.nodes.length){var h=0;n.forEach(function(t){t.owner==i&&h++}),h==this.nodes.length&&(this.isConnected=!0)}},t.exports=c},function(t,e,i){"use strict";var r,n=i(1);function o(t){r=i(5),this.layout=t,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),i=this.add(t,e);return this.setRootGraph(i),this.rootGraph},o.prototype.add=function(t,e,i,r,n){if(null==i&&null==r&&null==n){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}n=i,r=e,i=t;var o=r.getOwner(),s=n.getOwner();if(null==o||o.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==s||s.getGraphManager()!=this)throw"Target not in this graph mgr!";if(o==s)return i.isInterGraph=!1,o.add(i,r,n);if(i.isInterGraph=!0,i.source=r,i.target=n,this.edges.indexOf(i)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(i),null==i.source||null==i.target)throw"Edge source and/or target is null!";if(-1!=i.source.edges.indexOf(i)||-1!=i.target.edges.indexOf(i))throw"Edge already in source and/or target incidency list!";return i.source.edges.push(i),i.target.edges.push(i),i},o.prototype.remove=function(t){if(t instanceof r){if(t.getGraphManager()!=this)throw"Graph not in this graph mgr";if(t!=this.rootGraph&&(null==t.parent||t.parent.graphManager!=this))throw"Invalid parent node!";for(var e,i,o=[],s=(o=o.concat(t.getEdges())).length,a=0;a<s;a++)e=o[a],t.remove(e);var h=[];s=(h=h.concat(t.getNodes())).length;for(var a=0;a<s;a++)i=h[a],t.remove(i);t==this.rootGraph&&this.setRootGraph(null);var l=this.graphs.indexOf(t);this.graphs.splice(l,1),t.parent=null}else if(t instanceof n){if(null==(e=t))throw"Edge is null!";if(!e.isInterGraph)throw"Not an inter-graph edge!";if(null==e.source||null==e.target)throw"Source and/or target is null!";if(-1==e.source.edges.indexOf(e)||-1==e.target.edges.indexOf(e))throw"Source and/or target doesn't know this edge!";var l=e.source.edges.indexOf(e);if(e.source.edges.splice(l,1),l=e.target.edges.indexOf(e),e.target.edges.splice(l,1),null==e.source.owner||null==e.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==e.source.owner.getGraphManager().edges.indexOf(e))throw"Not in owner graph manager's edge list!";var l=e.source.owner.getGraphManager().edges.indexOf(e);e.source.owner.getGraphManager().edges.splice(l,1)}},o.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},o.prototype.getGraphs=function(){return this.graphs},o.prototype.getAllNodes=function(){if(null==this.allNodes){for(var t=[],e=this.getGraphs(),i=e.length,r=0;r<i;r++)t=t.concat(e[r].getNodes());this.allNodes=t}return this.allNodes},o.prototype.resetAllNodes=function(){this.allNodes=null},o.prototype.resetAllEdges=function(){this.allEdges=null},o.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},o.prototype.getAllEdges=function(){if(null==this.allEdges){var t=[],e=this.getGraphs();e.length;for(var i=0;i<e.length;i++)t=t.concat(e[i].getEdges());t=t.concat(this.edges),this.allEdges=t}return this.allEdges},o.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},o.prototype.setAllNodesToApplyGravitation=function(t){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=t},o.prototype.getRoot=function(){return this.rootGraph},o.prototype.setRootGraph=function(t){if(t.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=t,null==t.parent&&(t.parent=this.layout.newNode("Root node"))},o.prototype.getLayout=function(){return this.layout},o.prototype.isOneAncestorOfOther=function(t,e){if(null==t||null==e)throw"assert failed";if(t==e)return!0;for(var i,r=t.getOwner();null!=(i=r.getParent());){if(i==e)return!0;if(null==(r=i.getOwner()))break}for(r=e.getOwner();null!=(i=r.getParent());){if(i==t)return!0;if(null==(r=i.getOwner()))break}return!1},o.prototype.calcLowestCommonAncestors=function(){for(var t,e,i,r,n,o=this.getAllEdges(),s=o.length,a=0;a<s;a++){if(e=(t=o[a]).source,i=t.target,t.lca=null,t.sourceInLca=e,t.targetInLca=i,e==i){t.lca=e.getOwner();continue}for(r=e.getOwner();null==t.lca;){for(t.targetInLca=i,n=i.getOwner();null==t.lca;){if(n==r){t.lca=n;break}if(n==this.rootGraph)break;if(null!=t.lca)throw"assert failed";t.targetInLca=n.getParent(),n=t.targetInLca.getOwner()}if(r==this.rootGraph)break;null==t.lca&&(t.sourceInLca=r.getParent(),r=t.sourceInLca.getOwner())}if(null==t.lca)throw"assert failed"}},o.prototype.calcLowestCommonAncestor=function(t,e){if(t==e)return t.getOwner();for(var i=t.getOwner();null!=i;){for(var r=e.getOwner();null!=r;){if(r==i)return r;r=r.getParent().getOwner()}i=i.getParent().getOwner()}return i},o.prototype.calcInclusionTreeDepths=function(t,e){null==t&&null==e&&(t=this.rootGraph,e=1);for(var i,r=t.getNodes(),n=r.length,o=0;o<n;o++)(i=r[o]).inclusionTreeDepth=e,null!=i.child&&this.calcInclusionTreeDepths(i.child,e+1)},o.prototype.includesInvalidEdge=function(){for(var t,e=this.edges.length,i=0;i<e;i++)if(t=this.edges[i],this.isOneAncestorOfOther(t.source,t.target))return!0;return!1},t.exports=o},function(t,e,i){"use strict";var r=i(0);function n(){}for(var o in r)n[o]=r[o];n.MAX_ITERATIONS=2500,n.DEFAULT_EDGE_LENGTH=50,n.DEFAULT_SPRING_STRENGTH=.45,n.DEFAULT_REPULSION_STRENGTH=4500,n.DEFAULT_GRAVITY_STRENGTH=.4,n.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,n.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,n.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,n.COOLING_ADAPTATION_FACTOR=.33,n.ADAPTATION_LOWER_NODE_LIMIT=1e3,n.ADAPTATION_UPPER_NODE_LIMIT=5e3,n.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,n.MAX_NODE_DISPLACEMENT=3*n.MAX_NODE_DISPLACEMENT_INCREMENTAL,n.MIN_REPULSION_DIST=n.DEFAULT_EDGE_LENGTH/10,n.CONVERGENCE_CHECK_PERIOD=100,n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,n.MIN_EDGE_LENGTH=1,n.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=n},function(t,e,i){"use strict";var r=i(12);function n(){}n.calcSeparationAmount=function(t,e,i,r){if(!t.intersects(e))throw"assert failed";var n=[,,];this.decideDirectionsForOverlappingNodes(t,e,n),i[0]=Math.min(t.getRight(),e.getRight())-Math.max(t.x,e.x),i[1]=Math.min(t.getBottom(),e.getBottom())-Math.max(t.y,e.y),t.getX()<=e.getX()&&t.getRight()>=e.getRight()?i[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(i[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(i[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var o=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(o=1);var s=o*i[0],a=i[1]/o;i[0]<a?a=i[0]:s=i[1],i[0]=-1*n[0]*(a/2+r),i[1]=-1*n[1]*(s/2+r)},n.decideDirectionsForOverlappingNodes=function(t,e,i){t.getCenterX()<e.getCenterX()?i[0]=-1:i[0]=1,t.getCenterY()<e.getCenterY()?i[1]=-1:i[1]=1},n.getIntersection2=function(t,e,i){var r=t.getCenterX(),n=t.getCenterY(),o=e.getCenterX(),s=e.getCenterY();if(t.intersects(e))return i[0]=r,i[1]=n,i[2]=o,i[3]=s,!0;var a=t.getX(),h=t.getY(),l=t.getRight(),g=t.getX(),u=t.getBottom(),c=t.getRight(),d=t.getWidthHalf(),p=t.getHeightHalf(),f=e.getX(),y=e.getY(),E=e.getRight(),v=e.getX(),A=e.getBottom(),T=e.getRight(),N=e.getWidthHalf(),_=e.getHeightHalf(),L=!1,m=!1;if(r===o)n>s?(i[0]=r,i[1]=h,i[2]=o,i[3]=A):n<s&&(i[0]=r,i[1]=u,i[2]=o,i[3]=y);else if(n===s)r>o?(i[0]=a,i[1]=n,i[2]=E,i[3]=s):r<o&&(i[0]=l,i[1]=n,i[2]=f,i[3]=s);else{var O=t.height/t.width,I=e.height/e.width,D=(s-n)/(o-r),w=void 0,R=void 0,C=void 0,M=void 0,G=void 0,x=void 0;if(-O===D?(r>o?(i[0]=g,i[1]=u):(i[0]=l,i[1]=h),L=!0):O===D&&(r>o?(i[0]=a,i[1]=h):(i[0]=c,i[1]=u),L=!0),-I===D?(o>r?(i[2]=v,i[3]=A):(i[2]=E,i[3]=y),m=!0):I===D&&(o>r?(i[2]=f,i[3]=y):(i[2]=T,i[3]=A),m=!0),L&&m)return!1;if(r>o?n>s?(w=this.getCardinalDirection(O,D,4),R=this.getCardinalDirection(I,D,2)):(w=this.getCardinalDirection(-O,D,3),R=this.getCardinalDirection(-I,D,1)):n>s?(w=this.getCardinalDirection(-O,D,1),R=this.getCardinalDirection(-I,D,3)):(w=this.getCardinalDirection(O,D,2),R=this.getCardinalDirection(I,D,4)),!L)switch(w){case 1:M=h,C=r+-p/D,i[0]=C,i[1]=M;break;case 2:C=c,M=n+d*D,i[0]=C,i[1]=M;break;case 3:M=u,C=r+p/D,i[0]=C,i[1]=M;break;case 4:C=g,M=n+-d*D,i[0]=C,i[1]=M}if(!m)switch(R){case 1:x=y,G=o+-_/D,i[2]=G,i[3]=x;break;case 2:G=T,x=s+N*D,i[2]=G,i[3]=x;break;case 3:x=A,G=o+_/D,i[2]=G,i[3]=x;break;case 4:G=v,x=s+-N*D,i[2]=G,i[3]=x}}return!1},n.getCardinalDirection=function(t,e,i){return t>e?i:1+i%4},n.getIntersection=function(t,e,i,n){if(null==n)return this.getIntersection2(t,e,i);var o=t.x,s=t.y,a=e.x,h=e.y,l=i.x,g=i.y,u=n.x,c=n.y,d=void 0,p=void 0,f=void 0,y=void 0,E=void 0,v=void 0,A=void 0;return(d=h-s,f=o-a,E=a*s-o*h,p=c-g,y=l-u,v=u*g-l*c,0==(A=d*y-p*f))?null:new r((f*v-y*E)/A,(p*E-d*v)/A)},n.angleOfVector=function(t,e,i,r){var n=void 0;return t!==i?(n=Math.atan((r-e)/(i-t)),i<t?n+=Math.PI:r<e&&(n+=this.TWO_PI)):n=r<e?this.ONE_AND_HALF_PI:this.HALF_PI,n},n.doIntersect=function(t,e,i,r){var n=t.x,o=t.y,s=e.x,a=e.y,h=i.x,l=i.y,g=r.x,u=r.y,c=(s-n)*(u-l)-(g-h)*(a-o);if(0===c)return!1;var d=((u-l)*(g-n)+(h-g)*(u-o))/c,p=((o-a)*(g-n)+(s-n)*(u-o))/c;return 0<d&&d<1&&0<p&&p<1},n.HALF_PI=.5*Math.PI,n.ONE_AND_HALF_PI=1.5*Math.PI,n.TWO_PI=2*Math.PI,n.THREE_PI=3*Math.PI,t.exports=n},function(t,e,i){"use strict";function r(){}r.sign=function(t){return t>0?1:t<0?-1:0},r.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},r.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=r},function(t,e,i){"use strict";function r(){}r.MAX_VALUE=0x7fffffff,r.MIN_VALUE=-0x80000000,t.exports=r},function(t,e,i){"use strict";var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=function(t){return{value:t,next:null,prev:null}},o=function(t,e,i,r){return null!==t?t.next=e:r.head=e,null!==i?i.prev=e:r.tail=e,e.prev=t,e.next=i,r.length++,e},s=function(t,e){var i=t.prev,r=t.next;return null!==i?i.next=r:e.head=r,null!==r?r.prev=i:e.tail=i,t.prev=t.next=null,e.length--,t};t.exports=function(){function t(e){var i=this;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.length=0,this.head=null,this.tail=null,null!=e&&e.forEach(function(t){return i.push(t)})}return r(t,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,e){return o(e.prev,n(t),e,this)}},{key:"insertAfter",value:function(t,e){return o(e,n(t),e.next,this)}},{key:"insertNodeBefore",value:function(t,e){return o(e.prev,t,e,this)}},{key:"insertNodeAfter",value:function(t,e){return o(e,t,e.next,this)}},{key:"push",value:function(t){return o(this.tail,n(t),null,this)}},{key:"unshift",value:function(t){return o(null,n(t),this.head,this)}},{key:"remove",value:function(t){return s(t,this)}},{key:"pop",value:function(){return s(this.tail,this).value}},{key:"popNode",value:function(){return s(this.tail,this)}},{key:"shift",value:function(){return s(this.head,this).value}},{key:"shiftNode",value:function(){return s(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var e=1,i=this.head;e<t;)i=i.next,e++;return i.value}}},{key:"set_object_at",value:function(t,e){if(t<=this.length()){for(var i=1,r=this.head;i<t;)r=r.next,i++;r.value=e}}}]),t}()},function(t,e,i){"use strict";function r(t,e,i){this.x=null,this.y=null,null==t&&null==e&&null==i?(this.x=0,this.y=0):"number"==typeof t&&"number"==typeof e&&null==i?(this.x=t,this.y=e):"Point"==t.constructor.name&&null==e&&null==i&&(i=t,this.x=i.x,this.y=i.y)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.getLocation=function(){return new r(this.x,this.y)},r.prototype.setLocation=function(t,e,i){"Point"==t.constructor.name&&null==e&&null==i?(i=t,this.setLocation(i.x,i.y)):"number"==typeof t&&"number"==typeof e&&null==i&&(parseInt(t)==t&&parseInt(e)==e?this.move(t,e):(this.x=Math.floor(t+.5),this.y=Math.floor(e+.5)))},r.prototype.move=function(t,e){this.x=t,this.y=e},r.prototype.translate=function(t,e){this.x+=t,this.y+=e},r.prototype.equals=function(t){return"Point"==t.constructor.name?this.x==t.x&&this.y==t.y:this==t},r.prototype.toString=function(){return new r().constructor.name+"[x="+this.x+",y="+this.y+"]"},t.exports=r},function(t,e,i){"use strict";function r(t,e,i,r){this.x=0,this.y=0,this.width=0,this.height=0,null!=t&&null!=e&&null!=i&&null!=r&&(this.x=t,this.y=e,this.width=i,this.height=r)}r.prototype.getX=function(){return this.x},r.prototype.setX=function(t){this.x=t},r.prototype.getY=function(){return this.y},r.prototype.setY=function(t){this.y=t},r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(t){this.width=t},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(t){this.height=t},r.prototype.getRight=function(){return this.x+this.width},r.prototype.getBottom=function(){return this.y+this.height},r.prototype.intersects=function(t){return!(this.getRight()<t.x||this.getBottom()<t.y||t.getRight()<this.x||t.getBottom()<this.y)},r.prototype.getCenterX=function(){return this.x+this.width/2},r.prototype.getMinX=function(){return this.getX()},r.prototype.getMaxX=function(){return this.getX()+this.width},r.prototype.getCenterY=function(){return this.y+this.height/2},r.prototype.getMinY=function(){return this.getY()},r.prototype.getMaxY=function(){return this.getY()+this.height},r.prototype.getWidthHalf=function(){return this.width/2},r.prototype.getHeightHalf=function(){return this.height/2},t.exports=r},function(t,e,i){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function n(){}n.lastID=0,n.createID=function(t){return n.isPrimitive(t)?t:(null!=t.uniqueID||(t.uniqueID=n.getString(),n.lastID++),t.uniqueID)},n.getString=function(t){return null==t&&(t=n.lastID),"Object#"+t},n.isPrimitive=function(t){var e=void 0===t?"undefined":r(t);return null==t||"object"!=e&&"function"!=e},t.exports=n},function(t,e,i){"use strict";function r(t){if(!Array.isArray(t))return Array.from(t);for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}var n=i(0),o=i(6),s=i(3),a=i(1),h=i(5),l=i(4),g=i(17),u=i(27);function c(t){u.call(this),this.layoutQuality=n.QUALITY,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=n.DEFAULT_INCREMENTAL,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=n.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new o(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=t&&(this.isRemoteUse=t)}c.RANDOM_SEED=1,c.prototype=Object.create(u.prototype),c.prototype.getGraphManager=function(){return this.graphManager},c.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},c.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},c.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},c.prototype.newGraphManager=function(){var t=new o(this);return this.graphManager=t,t},c.prototype.newGraph=function(t){return new h(null,this.graphManager,t)},c.prototype.newNode=function(t){return new s(this.graphManager,t)},c.prototype.newEdge=function(t){return new a(null,null,t)},c.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},c.prototype.runLayout=function(){var t;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),t=!this.checkLayoutSuccess()&&this.layout(),"during"!==n.ANIMATE&&(t&&!this.isSubLayout&&this.doPostLayout(),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,t)},c.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},c.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var t=this.graphManager.getAllEdges(),e=0;e<t.length;e++)t[e];for(var i=this.graphManager.getRoot().getNodes(),e=0;e<i.length;e++)i[e];this.update(this.graphManager.getRoot())}},c.prototype.update=function(t){if(null==t)this.update2();else if(t instanceof s){if(null!=t.getChild())for(var e=t.getChild().getNodes(),i=0;i<e.length;i++)update(e[i]);null!=t.vGraphObject&&t.vGraphObject.update(t)}else t instanceof a?null!=t.vGraphObject&&t.vGraphObject.update(t):t instanceof h&&null!=t.vGraphObject&&t.vGraphObject.update(t)},c.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=n.QUALITY,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=n.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=n.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},c.prototype.transform=function(t){if(void 0==t)this.transform(new l(0,0));else{var e=new g,i=this.graphManager.getRoot().updateLeftTop();if(null!=i){e.setWorldOrgX(t.x),e.setWorldOrgY(t.y),e.setDeviceOrgX(i.x),e.setDeviceOrgY(i.y);for(var r=this.getAllNodes(),n=0;n<r.length;n++)r[n].transform(e)}}},c.prototype.positionNodesRandomly=function(t){if(void 0==t)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var e,i,r=t.getNodes(),n=0;n<r.length;n++)null==(i=(e=r[n]).getChild())||0==i.getNodes().length?e.scatter():(this.positionNodesRandomly(i),e.updateBounds())},c.prototype.getFlatForest=function(){for(var t=[],e=!0,i=this.graphManager.getRoot().getNodes(),n=!0,o=0;o<i.length;o++)null!=i[o].getChild()&&(n=!1);if(!n)return t;var s=new Set,a=[],h=new Map,l=[];for(l=l.concat(i);l.length>0&&e;){for(a.push(l[0]);a.length>0&&e;){var g=a[0];a.splice(0,1),s.add(g);for(var u=g.getEdges(),o=0;o<u.length;o++){var c=u[o].getOtherEnd(g);if(h.get(g)!=c)if(s.has(c)){e=!1;break}else a.push(c),h.set(c,g)}}if(e){var d=[].concat(r(s));t.push(d);for(var o=0;o<d.length;o++){var p=d[o],f=l.indexOf(p);f>-1&&l.splice(f,1)}s=new Set,h=new Map}else t=[]}return t},c.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],i=t.source,r=this.graphManager.calcLowestCommonAncestor(t.source,t.target),n=0;n<t.bendpoints.length;n++){var o=this.newNode(null);o.setRect(new Point(0,0),new Dimension(1,1)),r.add(o);var s=this.newEdge(null);this.graphManager.add(s,i,o),e.add(o),i=o}var s=this.newEdge(null);return this.graphManager.add(s,i,t.target),this.edgeToDummyNodes.set(t,e),t.isInterGraph()?this.graphManager.remove(t):r.remove(t),e},c.prototype.createBendpointsFromDummyNodes=function(){var t=[];t=t.concat(this.graphManager.getAllEdges()),t=[].concat(r(this.edgeToDummyNodes.keys())).concat(t);for(var e=0;e<t.length;e++){var i=t[e];if(i.bendpoints.length>0){for(var n=this.edgeToDummyNodes.get(i),o=0;o<n.length;o++){var s=n[o],a=new l(s.getCenterX(),s.getCenterY()),h=i.bendpoints.get(o);h.x=a.x,h.y=a.y,s.getOwner().remove(s)}this.graphManager.add(i,i.source,i.target)}}},c.transform=function(t,e,i,r){if(void 0==i||void 0==r)return t<=50?(n=9*e/500,o=e/10):(n=9*e/50,o=-8*e),n*t+o;var n,o,s=e;return t<=50?s-=(e-e/i)/50*(50-t):s+=(e*r-e)/50*(t-50),s},c.findCenterOfTree=function(t){var e=[];e=e.concat(t);var i=[],r=new Map,n=!1,o=null;(1==e.length||2==e.length)&&(n=!0,o=e[0]);for(var s=0;s<e.length;s++){var a=e[s],h=a.getNeighborsList().size;r.set(a,a.getNeighborsList().size),1==h&&i.push(a)}var l=[];for(l=l.concat(i);!n;){var g=[];g=g.concat(l),l=[];for(var s=0;s<e.length;s++){var a=e[s],u=e.indexOf(a);u>=0&&e.splice(u,1),a.getNeighborsList().forEach(function(t){if(0>i.indexOf(t)){var e=r.get(t)-1;1==e&&l.push(t),r.set(t,e)}})}i=i.concat(l),(1==e.length||2==e.length)&&(n=!0,o=e[0])}return o},c.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=c},function(t,e,i){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},t.exports=r},function(t,e,i){"use strict";var r=i(4);function n(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}n.prototype.getWorldOrgX=function(){return this.lworldOrgX},n.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},n.prototype.getWorldOrgY=function(){return this.lworldOrgY},n.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},n.prototype.getWorldExtX=function(){return this.lworldExtX},n.prototype.setWorldExtX=function(t){this.lworldExtX=t},n.prototype.getWorldExtY=function(){return this.lworldExtY},n.prototype.setWorldExtY=function(t){this.lworldExtY=t},n.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},n.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},n.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},n.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},n.prototype.getDeviceExtX=function(){return this.ldeviceExtX},n.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},n.prototype.getDeviceExtY=function(){return this.ldeviceExtY},n.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},n.prototype.transformX=function(t){var e=0,i=this.lworldExtX;return 0!=i&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/i),e},n.prototype.transformY=function(t){var e=0,i=this.lworldExtY;return 0!=i&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/i),e},n.prototype.inverseTransformX=function(t){var e=0,i=this.ldeviceExtX;return 0!=i&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/i),e},n.prototype.inverseTransformY=function(t){var e=0,i=this.ldeviceExtY;return 0!=i&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/i),e},n.prototype.inverseTransformPoint=function(t){return new r(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=n},function(t,e,i){"use strict";var r=i(15),n=i(7),o=i(0),s=i(8),a=i(9);function h(){r.call(this),this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=n.DEFAULT_EDGE_LENGTH,this.springConstant=n.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=n.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=n.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=n.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=n.MAX_ITERATIONS}for(var l in h.prototype=Object.create(r.prototype),r)h[l]=r[l];h.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},h.prototype.calcIdealEdgeLengths=function(){for(var t,e,i,r,s,a,h=this.getGraphManager().getAllEdges(),l=0;l<h.length;l++)(t=h[l]).idealLength=this.idealEdgeLength,t.isInterGraph&&(i=t.getSource(),r=t.getTarget(),s=t.getSourceInLca().getEstimatedSize(),a=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=s+a-2*o.SIMPLE_NODE_SIZE),e=t.getLca().getInclusionTreeDepth(),t.idealLength+=n.DEFAULT_EDGE_LENGTH*n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(i.getInclusionTreeDepth()+r.getInclusionTreeDepth()-2*e))},h.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>n.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},h.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),i=0;i<e.length;i++)t=e[i],this.calcSpringForce(t,t.idealLength)},h.prototype.calcRepulsionForces=function(){var t,e,i,r,o,s=!(arguments.length>0)||void 0===arguments[0]||arguments[0],a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],h=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),o=new Set,t=0;t<h.length;t++)i=h[t],this.calculateRepulsionForceOfANode(i,o,s,a),o.add(i);else for(t=0;t<h.length;t++)for(i=h[t],e=t+1;e<h.length;e++)r=h[e],i.getOwner()==r.getOwner()&&this.calcRepulsionForce(i,r)},h.prototype.calcGravitationalForces=function(){for(var t,e=this.getAllNodesToApplyGravitation(),i=0;i<e.length;i++)t=e[i],this.calcGravitationalForce(t)},h.prototype.moveNodes=function(){for(var t=this.getAllNodes(),e=0;e<t.length;e++)t[e].move()},h.prototype.calcSpringForce=function(t,e){var i,r,n,o,s=t.getSource(),a=t.getTarget();if(this.uniformLeafNodeSizes&&null==s.getChild()&&null==a.getChild())t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;0!=(i=t.getLength())&&(n=(r=this.springConstant*(i-e))*(t.lengthX/i),o=r*(t.lengthY/i),s.springForceX+=n,s.springForceY+=o,a.springForceX-=n,a.springForceY-=o)},h.prototype.calcRepulsionForce=function(t,e){var i,r,o,h,l,g,u,c=t.getRect(),d=e.getRect(),p=[,,],f=[,,,,];if(c.intersects(d)){s.calcSeparationAmount(c,d,p,n.DEFAULT_EDGE_LENGTH/2),g=2*p[0],u=2*p[1];var y=t.noOfChildren*e.noOfChildren/(t.noOfChildren+e.noOfChildren);t.repulsionForceX-=y*g,t.repulsionForceY-=y*u,e.repulsionForceX+=y*g,e.repulsionForceY+=y*u}else this.uniformLeafNodeSizes&&null==t.getChild()&&null==e.getChild()?(i=d.getCenterX()-c.getCenterX(),r=d.getCenterY()-c.getCenterY()):(s.getIntersection(c,d,f),i=f[2]-f[0],r=f[3]-f[1]),Math.abs(i)<n.MIN_REPULSION_DIST&&(i=a.sign(i)*n.MIN_REPULSION_DIST),Math.abs(r)<n.MIN_REPULSION_DIST&&(r=a.sign(r)*n.MIN_REPULSION_DIST),h=Math.sqrt(o=i*i+r*r),g=(l=this.repulsionConstant*t.noOfChildren*e.noOfChildren/o)*i/h,u=l*r/h,t.repulsionForceX-=g,t.repulsionForceY-=u,e.repulsionForceX+=g,e.repulsionForceY+=u},h.prototype.calcGravitationalForce=function(t){var e,i,r,n,o,s,a,h;i=((e=t.getOwner()).getRight()+e.getLeft())/2,r=(e.getTop()+e.getBottom())/2,n=t.getCenterX()-i,o=t.getCenterY()-r,s=Math.abs(n)+t.getWidth()/2,a=Math.abs(o)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(s>(h=e.getEstimatedSize()*this.gravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*n,t.gravitationForceY=-this.gravityConstant*o):(s>(h=e.getEstimatedSize()*this.compoundGravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*n*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*o*this.compoundGravityConstant)},h.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=2>Math.abs(this.totalDisplacement-this.oldTotalDisplacement)),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||e},h.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},h.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,e=this.graphManager.getAllNodes(),i=0;i<e.length;i++)(t=e[i]).noOfChildren=t.getNoOfChildren()},h.prototype.calcGrid=function(t){var e=0,i=0;e=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),i=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var r=Array(e),n=0;n<e;n++)r[n]=Array(i);for(var n=0;n<e;n++)for(var o=0;o<i;o++)r[n][o]=[];return r},h.prototype.addNodeToGrid=function(t,e,i){var r=0,n=0,o=0,s=0;r=parseInt(Math.floor((t.getRect().x-e)/this.repulsionRange)),n=parseInt(Math.floor((t.getRect().width+t.getRect().x-e)/this.repulsionRange)),o=parseInt(Math.floor((t.getRect().y-i)/this.repulsionRange)),s=parseInt(Math.floor((t.getRect().height+t.getRect().y-i)/this.repulsionRange));for(var a=r;a<=n;a++)for(var h=o;h<=s;h++)this.grid[a][h].push(t),t.setGridCoordinates(r,n,o,s)},h.prototype.updateGrid=function(){var t,e,i=this.getAllNodes();for(t=0,this.grid=this.calcGrid(this.graphManager.getRoot());t<i.length;t++)e=i[t],this.addNodeToGrid(e,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},h.prototype.calculateRepulsionForceOfANode=function(t,e,i,r){if(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&i||r){var o,s=new Set;t.surrounding=[];for(var a=this.grid,h=t.startX-1;h<t.finishX+2;h++)for(var l=t.startY-1;l<t.finishY+2;l++)if(!(h<0||l<0||h>=a.length||l>=a[0].length)){for(var g=0;g<a[h][l].length;g++)if(o=a[h][l][g],t.getOwner()==o.getOwner()&&t!=o&&!e.has(o)&&!s.has(o)){var u=Math.abs(t.getCenterX()-o.getCenterX())-(t.getWidth()/2+o.getWidth()/2),c=Math.abs(t.getCenterY()-o.getCenterY())-(t.getHeight()/2+o.getHeight()/2);u<=this.repulsionRange&&c<=this.repulsionRange&&s.add(o)}}t.surrounding=[].concat(function(t){if(!Array.isArray(t))return Array.from(t);for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}(s))}for(h=0;h<t.surrounding.length;h++)this.calcRepulsionForce(t,t.surrounding[h])},h.prototype.calcRepulsionRange=function(){return 0},t.exports=h},function(t,e,i){"use strict";var r=i(1),n=i(7);function o(t,e,i){r.call(this,t,e,i),this.idealLength=n.DEFAULT_EDGE_LENGTH}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];t.exports=o},function(t,e,i){"use strict";var r=i(3);function n(t,e,i,n){r.call(this,t,e,i,n),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var o in n.prototype=Object.create(r.prototype),r)n[o]=r[o];n.prototype.setGridCoordinates=function(t,e,i,r){this.startX=t,this.finishX=e,this.startY=i,this.finishY=r},t.exports=n},function(t,e,i){"use strict";function r(t,e){this.width=0,this.height=0,null!==t&&null!==e&&(this.height=e,this.width=t)}r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(t){this.width=t},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(t){this.height=t},t.exports=r},function(t,e,i){"use strict";var r=i(14);function n(){this.map={},this.keys=[]}n.prototype.put=function(t,e){var i=r.createID(t);this.contains(i)||(this.map[i]=e,this.keys.push(t))},n.prototype.contains=function(t){return r.createID(t),null!=this.map[t]},n.prototype.get=function(t){var e=r.createID(t);return this.map[e]},n.prototype.keySet=function(){return this.keys},t.exports=n},function(t,e,i){"use strict";var r=i(14);function n(){this.set={}}n.prototype.add=function(t){var e=r.createID(t);this.contains(e)||(this.set[e]=t)},n.prototype.remove=function(t){delete this.set[r.createID(t)]},n.prototype.clear=function(){this.set={}},n.prototype.contains=function(t){return this.set[r.createID(t)]==t},n.prototype.isEmpty=function(){return 0===this.size()},n.prototype.size=function(){return Object.keys(this.set).length},n.prototype.addAllTo=function(t){for(var e=Object.keys(this.set),i=e.length,r=0;r<i;r++)t.push(this.set[e[r]])},n.prototype.size=function(){return Object.keys(this.set).length},n.prototype.addAll=function(t){for(var e=t.length,i=0;i<e;i++){var r=t[i];this.add(r)}},t.exports=n},function(t,e,i){"use strict";var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=i(11);t.exports=function(){function t(e,i){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");(null!==i||void 0!==i)&&(this.compareFunction=this._defaultCompareFunction);var r=void 0;r=e instanceof n?e.size():e.length,this._quicksort(e,0,r-1)}return r(t,[{key:"_quicksort",value:function(t,e,i){if(e<i){var r=this._partition(t,e,i);this._quicksort(t,e,r),this._quicksort(t,r+1,i)}}},{key:"_partition",value:function(t,e,i){for(var r=this._get(t,e),n=e,o=i;;){for(;this.compareFunction(r,this._get(t,o));)o--;for(;this.compareFunction(this._get(t,n),r);)n++;if(!(n<o))return o;this._swap(t,n,o),n++,o--}}},{key:"_get",value:function(t,e){return t instanceof n?t.get_object_at(e):t[e]}},{key:"_set",value:function(t,e,i){t instanceof n?t.set_object_at(e,i):t[e]=i}},{key:"_swap",value:function(t,e,i){var r=this._get(t,e);this._set(t,e,this._get(t,i)),this._set(t,i,r)}},{key:"_defaultCompareFunction",value:function(t,e){return e>t}}]),t}()},function(t,e,i){"use strict";var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}();t.exports=function(){function t(e,i){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.sequence1=e,this.sequence2=i,this.match_score=r,this.mismatch_penalty=n,this.gap_penalty=o,this.iMax=e.length+1,this.jMax=i.length+1,this.grid=Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=Array(this.jMax);for(var a=0;a<this.jMax;a++)this.grid[s][a]=0}this.tracebackGrid=Array(this.iMax);for(var h=0;h<this.iMax;h++){this.tracebackGrid[h]=Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[h][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return r(t,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var t=1;t<this.jMax;t++)this.grid[0][t]=this.grid[0][t-1]+this.gap_penalty,this.tracebackGrid[0][t]=[!1,!1,!0];for(var e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][0]=[!1,!0,!1];for(var i=1;i<this.iMax;i++)for(var r=1;r<this.jMax;r++){var n=[this.sequence1[i-1]===this.sequence2[r-1]?this.grid[i-1][r-1]+this.match_score:this.grid[i-1][r-1]+this.mismatch_penalty,this.grid[i-1][r]+this.gap_penalty,this.grid[i][r-1]+this.gap_penalty],o=this.arrayAllMaxIndexes(n);this.grid[i][r]=n[o[0]],this.tracebackGrid[i][r]=[o.includes(0),o.includes(1),o.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var t=[];for(t.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});t[0];){var e=t[0],i=this.tracebackGrid[e.pos[0]][e.pos[1]];i[0]&&t.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),i[1]&&t.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),i[2]&&t.push({pos:[e.pos[0],e.pos[1]-1],seq1:"-"+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),0===e.pos[0]&&0===e.pos[1]&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),t.shift()}return this.alignments}},{key:"getAllIndexes",value:function(t,e){for(var i=[],r=-1;-1!==(r=t.indexOf(e,r+1));)i.push(r);return i}},{key:"arrayAllMaxIndexes",value:function(t){return this.getAllIndexes(t,Math.max.apply(null,t))}}]),t}()},function(t,e,i){"use strict";var r=function(){};r.FDLayout=i(18),r.FDLayoutConstants=i(7),r.FDLayoutEdge=i(19),r.FDLayoutNode=i(20),r.DimensionD=i(21),r.HashMap=i(22),r.HashSet=i(23),r.IGeometry=i(8),r.IMath=i(9),r.Integer=i(10),r.Point=i(12),r.PointD=i(4),r.RandomSeed=i(16),r.RectangleD=i(13),r.Transform=i(17),r.UniqueIDGeneretor=i(14),r.Quicksort=i(24),r.LinkedList=i(11),r.LGraphObject=i(2),r.LGraph=i(5),r.LEdge=i(1),r.LGraphManager=i(6),r.LNode=i(3),r.Layout=i(15),r.LayoutConstants=i(0),r.NeedlemanWunsch=i(25),t.exports=r},function(t,e,i){"use strict";function r(){this.listeners=[]}var n=r.prototype;n.addListener=function(t,e){this.listeners.push({event:t,callback:e})},n.removeListener=function(t,e){for(var i=this.listeners.length;i>=0;i--){var r=this.listeners[i];r.event===t&&r.callback===e&&this.listeners.splice(i,1)}},n.emit=function(t,e){for(var i=0;i<this.listeners.length;i++){var r=this.listeners[i];t===r.event&&r.callback(e)}},t.exports=r}],e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=26)}()},97659,(t,e,i)=>{t.e,e.exports=function(t){var e=[function(e,i){e.exports=t},function(t,e,i){"use strict";var r=i(0).FDLayoutConstants;function n(){}for(var o in r)n[o]=r[o];n.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,n.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,n.DEFAULT_COMPONENT_SEPERATION=60,n.TILE=!0,n.TILING_PADDING_VERTICAL=10,n.TILING_PADDING_HORIZONTAL=10,n.TREE_REDUCTION_ON_INCREMENTAL=!1,t.exports=n},function(t,e,i){"use strict";var r=i(0).FDLayoutEdge;function n(t,e,i){r.call(this,t,e,i)}for(var o in n.prototype=Object.create(r.prototype),r)n[o]=r[o];t.exports=n},function(t,e,i){"use strict";var r=i(0).LGraph;function n(t,e,i){r.call(this,t,e,i)}for(var o in n.prototype=Object.create(r.prototype),r)n[o]=r[o];t.exports=n},function(t,e,i){"use strict";var r=i(0).LGraphManager;function n(t){r.call(this,t)}for(var o in n.prototype=Object.create(r.prototype),r)n[o]=r[o];t.exports=n},function(t,e,i){"use strict";var r=i(0).FDLayoutNode,n=i(0).IMath;function o(t,e,i,n){r.call(this,t,e,i,n)}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.prototype.move=function(){var t=this.graphManager.getLayout();this.displacementX=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*n.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*n.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),t.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},o.prototype.propogateDisplacementToChildren=function(t,e){for(var i,r=this.getChild().getNodes(),n=0;n<r.length;n++)null==(i=r[n]).getChild()?(i.moveBy(t,e),i.displacementX+=t,i.displacementY+=e):i.propogateDisplacementToChildren(t,e)},o.prototype.setPred1=function(t){this.pred1=t},o.prototype.getPred1=function(){return pred1},o.prototype.getPred2=function(){return pred2},o.prototype.setNext=function(t){this.next=t},o.prototype.getNext=function(){return next},o.prototype.setProcessed=function(t){this.processed=t},o.prototype.isProcessed=function(){return processed},t.exports=o},function(t,e,i){"use strict";var r=i(0).FDLayout,n=i(4),o=i(3),s=i(5),a=i(2),h=i(1),l=i(0).FDLayoutConstants,g=i(0).LayoutConstants,u=i(0).Point,c=i(0).PointD,d=i(0).Layout,p=i(0).Integer,f=i(0).IGeometry,y=i(0).LGraph,E=i(0).Transform;function v(){r.call(this),this.toBeTiled={}}for(var A in v.prototype=Object.create(r.prototype),r)v[A]=r[A];v.prototype.newGraphManager=function(){var t=new n(this);return this.graphManager=t,t},v.prototype.newGraph=function(t){return new o(null,this.graphManager,t)},v.prototype.newNode=function(t){return new s(this.graphManager,t)},v.prototype.newEdge=function(t){return new a(null,null,t)},v.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=l.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=l.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=l.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},v.prototype.layout=function(){return g.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},v.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(h.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(e)}}else{var i=this.getFlatForest();if(i.length>0)this.positionNodesRadially(i);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(e),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},v.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(!(this.prunedNodesAll.length>0))return!0;else this.isTreeGrowing=!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(!(this.prunedNodesAll.length>0))return!0;else this.isTreeGrowing=!0;this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var i=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(i,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},v.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},i=0;i<t.length;i++){var r=t[i].rect,n=t[i].id;e[n]={id:n,x:r.getCenterX(),y:r.getCenterY(),w:r.width,h:r.height}}return e},v.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var t=!1;if("during"===l.ANIMATE)this.emit("layoutstarted");else{for(;!t;)t=this.tick();this.graphManager.updateBounds()}},v.prototype.calculateNodesToApplyGravitationTo=function(){var t,e,i=[],r=this.graphManager.getGraphs(),n=r.length;for(e=0;e<n;e++)(t=r[e]).updateConnected(),t.isConnected||(i=i.concat(t.getNodes()));return i},v.prototype.createBendpoints=function(){var t=[];t=t.concat(this.graphManager.getAllEdges());var e=new Set;for(o=0;o<t.length;o++){var i=t[o];if(!e.has(i)){var r=i.getSource(),n=i.getTarget();if(r==n)i.getBendpoints().push(new c),i.getBendpoints().push(new c),this.createDummyNodesForBendpoints(i),e.add(i);else{var o,s,a=[];if(a=(a=a.concat(r.getEdgeListToNode(n))).concat(n.getEdgeListToNode(r)),!e.has(a[0])){if(a.length>1)for(s=0;s<a.length;s++){var h=a[s];h.getBendpoints().push(new c),this.createDummyNodesForBendpoints(h)}a.forEach(function(t){e.add(t)})}}}if(e.size==t.length)break}},v.prototype.positionNodesRadially=function(t){for(var e=new u(0,0),i=Math.ceil(Math.sqrt(t.length)),r=0,n=0,o=0,s=new c(0,0),a=0;a<t.length;a++){a%i==0&&(o=0,n=r,0!=a&&(n+=h.DEFAULT_COMPONENT_SEPERATION),r=0);var l=t[a],p=d.findCenterOfTree(l);e.x=o,e.y=n,(s=v.radialLayout(l,p,e)).y>r&&(r=Math.floor(s.y)),o=Math.floor(s.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new c(g.WORLD_CENTER_X-s.x/2,g.WORLD_CENTER_Y-s.y/2))},v.radialLayout=function(t,e,i){var r=Math.max(this.maxDiagonalInTree(t),h.DEFAULT_RADIAL_SEPARATION);v.branchRadialLayout(e,null,0,359,0,r);var n=y.calculateBounds(t),o=new E;o.setDeviceOrgX(n.getMinX()),o.setDeviceOrgY(n.getMinY()),o.setWorldOrgX(i.x),o.setWorldOrgY(i.y);for(var s=0;s<t.length;s++)t[s].transform(o);var a=new c(n.getMaxX(),n.getMaxY());return o.inverseTransformPoint(a)},v.branchRadialLayout=function(t,e,i,r,n,o){var s,a=(r-i+1)/2;a<0&&(a+=180);var h=(a+i)%360*f.TWO_PI/360,l=n*Math.cos(h),g=n*Math.sin(h);t.setCenter(l,g);var u=[],c=(u=u.concat(t.getEdges())).length;null!=e&&c--;for(var d=0,p=u.length,y=t.getEdgesBetween(e);y.length>1;){var E=y[0];y.splice(0,1);var A=u.indexOf(E);A>=0&&u.splice(A,1),p--,c--}s=null!=e?(u.indexOf(y[0])+1)%p:0;for(var T=Math.abs(r-i)/c,N=s;d!=c;N=++N%p){var _=u[N].getOtherEnd(t);if(_!=e){var L=(i+d*T)%360,m=(L+T)%360;v.branchRadialLayout(_,t,L,m,n+o,o),d++}}},v.maxDiagonalInTree=function(t){for(var e=p.MIN_VALUE,i=0;i<t.length;i++){var r=t[i].getDiagonal();r>e&&(e=r)}return e},v.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},v.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var i=[],r=this.graphManager.getAllNodes(),n=0;n<r.length;n++){var o=r[n],a=o.getParent();0!==this.getNodeDegreeWithChildren(o)||void 0!=a.id&&this.getToBeTiled(a)||i.push(o)}for(var n=0;n<i.length;n++){var o=i[n],h=o.getParent().id;void 0===e[h]&&(e[h]=[]),e[h]=e[h].concat(o)}Object.keys(e).forEach(function(i){if(e[i].length>1){var r="DummyCompound_"+i;t.memberGroups[r]=e[i];var n=e[i][0].getParent(),o=new s(t.graphManager);o.id=r,o.paddingLeft=n.paddingLeft||0,o.paddingRight=n.paddingRight||0,o.paddingBottom=n.paddingBottom||0,o.paddingTop=n.paddingTop||0,t.idToDummyNode[r]=o;var a=t.getGraphManager().add(t.newGraph(),o),h=n.getChild();h.add(o);for(var l=0;l<e[i].length;l++){var g=e[i][l];h.remove(g),a.add(g)}}})},v.prototype.clearCompounds=function(){var t={},e={};this.performDFSOnCompounds();for(var i=0;i<this.compoundOrder.length;i++)e[this.compoundOrder[i].id]=this.compoundOrder[i],t[this.compoundOrder[i].id]=[].concat(this.compoundOrder[i].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[i].getChild()),this.compoundOrder[i].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(t,e)},v.prototype.clearZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(i){var r=t.idToDummyNode[i];e[i]=t.tileNodes(t.memberGroups[i],r.paddingLeft+r.paddingRight),r.rect.width=e[i].width,r.rect.height=e[i].height})},v.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var e=this.compoundOrder[t],i=e.id,r=e.paddingLeft,n=e.paddingTop;this.adjustLocations(this.tiledMemberPack[i],e.rect.x,e.rect.y,r,n)}},v.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach(function(i){var r=t.idToDummyNode[i],n=r.paddingLeft,o=r.paddingTop;t.adjustLocations(e[i],r.rect.x,r.rect.y,n,o)})},v.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var i=t.getChild();if(null==i)return this.toBeTiled[e]=!1,!1;for(var r=i.getNodes(),n=0;n<r.length;n++){var o=r[n];if(this.getNodeDegree(o)>0)return this.toBeTiled[e]=!1,!1;if(null==o.getChild()){this.toBeTiled[o.id]=!1;continue}if(!this.getToBeTiled(o))return this.toBeTiled[e]=!1,!1}return this.toBeTiled[e]=!0,!0},v.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),i=0,r=0;r<e.length;r++){var n=e[r];n.getSource().id!==n.getTarget().id&&(i+=1)}return i},v.prototype.getNodeDegreeWithChildren=function(t){var e=this.getNodeDegree(t);if(null==t.getChild())return e;for(var i=t.getChild().getNodes(),r=0;r<i.length;r++){var n=i[r];e+=this.getNodeDegreeWithChildren(n)}return e},v.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},v.prototype.fillCompexOrderByDFS=function(t){for(var e=0;e<t.length;e++){var i=t[e];null!=i.getChild()&&this.fillCompexOrderByDFS(i.getChild().getNodes()),this.getToBeTiled(i)&&this.compoundOrder.push(i)}},v.prototype.adjustLocations=function(t,e,i,r,n){e+=r,i+=n;for(var o=e,s=0;s<t.rows.length;s++){var a=t.rows[s];e=o;for(var h=0,l=0;l<a.length;l++){var g=a[l];g.rect.x=e,g.rect.y=i,e+=g.rect.width+t.horizontalPadding,g.rect.height>h&&(h=g.rect.height)}i+=h+t.verticalPadding}},v.prototype.tileCompoundMembers=function(t,e){var i=this;this.tiledMemberPack=[],Object.keys(t).forEach(function(r){var n=e[r];i.tiledMemberPack[r]=i.tileNodes(t[r],n.paddingLeft+n.paddingRight),n.rect.width=i.tiledMemberPack[r].width,n.rect.height=i.tiledMemberPack[r].height})},v.prototype.tileNodes=function(t,e){var i={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:h.TILING_PADDING_VERTICAL,horizontalPadding:h.TILING_PADDING_HORIZONTAL};t.sort(function(t,e){return t.rect.width*t.rect.height>e.rect.width*e.rect.height?-1:+(t.rect.width*t.rect.height<e.rect.width*e.rect.height)});for(var r=0;r<t.length;r++){var n=t[r];0==i.rows.length?this.insertNodeToRow(i,n,0,e):this.canAddHorizontal(i,n.rect.width,n.rect.height)?this.insertNodeToRow(i,n,this.getShortestRowIndex(i),e):this.insertNodeToRow(i,n,i.rows.length,e),this.shiftToLastRow(i)}return i},v.prototype.insertNodeToRow=function(t,e,i,r){i==t.rows.length&&(t.rows.push([]),t.rowWidth.push(r),t.rowHeight.push(0));var n=t.rowWidth[i]+e.rect.width;t.rows[i].length>0&&(n+=t.horizontalPadding),t.rowWidth[i]=n,t.width<n&&(t.width=n);var o=e.rect.height;i>0&&(o+=t.verticalPadding);var s=0;o>t.rowHeight[i]&&(s=t.rowHeight[i],t.rowHeight[i]=o,s=t.rowHeight[i]-s),t.height+=s,t.rows[i].push(e)},v.prototype.getShortestRowIndex=function(t){for(var e=-1,i=Number.MAX_VALUE,r=0;r<t.rows.length;r++)t.rowWidth[r]<i&&(e=r,i=t.rowWidth[r]);return e},v.prototype.getLongestRowIndex=function(t){for(var e=-1,i=5e-324,r=0;r<t.rows.length;r++)t.rowWidth[r]>i&&(e=r,i=t.rowWidth[r]);return e},v.prototype.canAddHorizontal=function(t,e,i){var r,n,o=this.getShortestRowIndex(t);if(o<0)return!0;var s=t.rowWidth[o];if(s+t.horizontalPadding+e<=t.width)return!0;var a=0;return t.rowHeight[o]<i&&o>0&&(a=i+t.verticalPadding-t.rowHeight[o]),r=t.width-s>=e+t.horizontalPadding?(t.height+a)/(s+e+t.horizontalPadding):(t.height+a)/t.width,a=i+t.verticalPadding,(n=t.width<e?(t.height+a)/e:(t.height+a)/t.width)<1&&(n=1/n),r<1&&(r=1/r),r<n},v.prototype.shiftToLastRow=function(t){var e=this.getLongestRowIndex(t),i=t.rowWidth.length-1,r=t.rows[e],n=r[r.length-1],o=n.width+t.horizontalPadding;if(t.width-t.rowWidth[i]>o&&e!=i){r.splice(-1,1),t.rows[i].push(n),t.rowWidth[e]=t.rowWidth[e]-o,t.rowWidth[i]=t.rowWidth[i]+o,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=5e-324,a=0;a<r.length;a++)r[a].height>s&&(s=r[a].height);e>0&&(s+=t.verticalPadding);var h=t.rowHeight[e]+t.rowHeight[i];t.rowHeight[e]=s,t.rowHeight[i]<n.height+t.verticalPadding&&(t.rowHeight[i]=n.height+t.verticalPadding);var l=t.rowHeight[e]+t.rowHeight[i];t.height+=l-h,this.shiftToLastRow(t)}},v.prototype.tilingPreLayout=function(){h.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},v.prototype.tilingPostLayout=function(){h.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},v.prototype.reduceTrees=function(){for(var t,e=[],i=!0;i;){var r=this.graphManager.getAllNodes(),n=[];i=!1;for(var o=0;o<r.length;o++)1!=(t=r[o]).getEdges().length||t.getEdges()[0].isInterGraph||null!=t.getChild()||(n.push([t,t.getEdges()[0],t.getOwner()]),i=!0);if(!0==i){for(var s=[],a=0;a<n.length;a++)1==n[a][0].getEdges().length&&(s.push(n[a]),n[a][0].getOwner().remove(n[a][0]));e.push(s),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},v.prototype.growTree=function(t){for(var e,i=t.length,r=t[i-1],n=0;n<r.length;n++)e=r[n],this.findPlaceforPrunedNode(e),e[2].add(e[0]),e[2].add(e[1],e[1].source,e[1].target);t.splice(t.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},v.prototype.findPlaceforPrunedNode=function(t){var e,i,r,n,o=t[0],s=(i=o==t[1].source?t[1].target:t[1].source).startX,a=i.finishX,h=i.startY,g=i.finishY,u=[0,0,0,0];if(h>0)for(var c=s;c<=a;c++)u[0]+=this.grid[c][h-1].length+this.grid[c][h].length-1;if(a<this.grid.length-1)for(var c=h;c<=g;c++)u[1]+=this.grid[a+1][c].length+this.grid[a][c].length-1;if(g<this.grid[0].length-1)for(var c=s;c<=a;c++)u[2]+=this.grid[c][g+1].length+this.grid[c][g].length-1;if(s>0)for(var c=h;c<=g;c++)u[3]+=this.grid[s-1][c].length+this.grid[s][c].length-1;for(var d=p.MAX_VALUE,f=0;f<u.length;f++)u[f]<d?(d=u[f],r=1,n=f):u[f]==d&&r++;if(3==r&&0==d)0==u[0]&&0==u[1]&&0==u[2]?e=1:0==u[0]&&0==u[1]&&0==u[3]?e=0:0==u[0]&&0==u[2]&&0==u[3]?e=3:0==u[1]&&0==u[2]&&0==u[3]&&(e=2);else if(2==r&&0==d){var y=Math.floor(2*Math.random());e=0==u[0]&&0==u[1]?+(0!=y):0==u[0]&&0==u[2]?2*(0!=y):0==u[0]&&0==u[3]?3*(0!=y):0==u[1]&&0==u[2]?0==y?1:2:0==u[1]&&0==u[3]?0==y?1:3:0==y?2:3}else if(4==r&&0==d){var y=Math.floor(4*Math.random());e=y}else e=n;0==e?o.setCenter(i.getCenterX(),i.getCenterY()-i.getHeight()/2-l.DEFAULT_EDGE_LENGTH-o.getHeight()/2):1==e?o.setCenter(i.getCenterX()+i.getWidth()/2+l.DEFAULT_EDGE_LENGTH+o.getWidth()/2,i.getCenterY()):2==e?o.setCenter(i.getCenterX(),i.getCenterY()+i.getHeight()/2+l.DEFAULT_EDGE_LENGTH+o.getHeight()/2):o.setCenter(i.getCenterX()-i.getWidth()/2-l.DEFAULT_EDGE_LENGTH-o.getWidth()/2,i.getCenterY())},t.exports=v},function(t,e,i){"use strict";var r={};r.layoutBase=i(0),r.CoSEConstants=i(1),r.CoSEEdge=i(2),r.CoSEGraph=i(3),r.CoSEGraphManager=i(4),r.CoSELayout=i(6),r.CoSENode=i(5),t.exports=r}],i={};function r(t){if(i[t])return i[t].exports;var n=i[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=i,r.i=function(t){return t},r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=7)}(t.r(51273))},15363,(t,e,i)=>{t.e,e.exports=function(t){var e=[function(e,i){e.exports=t},function(t,e,i){"use strict";var r=i(0).layoutBase.LayoutConstants,n=i(0).layoutBase.FDLayoutConstants,o=i(0).CoSEConstants,s=i(0).CoSELayout,a=i(0).CoSENode,h=i(0).layoutBase.PointD,l=i(0).layoutBase.DimensionD,g={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function u(t){this.options=function(t,e){var i={};for(var r in t)i[r]=t[r];for(var r in e)i[r]=e[r];return i}(g,t),c(this.options)}var c=function(t){null!=t.nodeRepulsion&&(o.DEFAULT_REPULSION_STRENGTH=n.DEFAULT_REPULSION_STRENGTH=t.nodeRepulsion),null!=t.idealEdgeLength&&(o.DEFAULT_EDGE_LENGTH=n.DEFAULT_EDGE_LENGTH=t.idealEdgeLength),null!=t.edgeElasticity&&(o.DEFAULT_SPRING_STRENGTH=n.DEFAULT_SPRING_STRENGTH=t.edgeElasticity),null!=t.nestingFactor&&(o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(o.DEFAULT_GRAVITY_STRENGTH=n.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(o.MAX_ITERATIONS=n.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(o.DEFAULT_GRAVITY_RANGE_FACTOR=n.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(o.DEFAULT_COOLING_FACTOR_INCREMENTAL=n.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),"draft"==t.quality?r.QUALITY=0:"proof"==t.quality?r.QUALITY=2:r.QUALITY=1,o.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,o.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!t.randomize,o.ANIMATE=n.ANIMATE=r.ANIMATE=t.animate,o.TILE=t.tile,o.TILING_PADDING_VERTICAL="function"==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,o.TILING_PADDING_HORIZONTAL="function"==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal};u.prototype.run=function(){var t,e,i=this.options;this.idToLNode={};var r=this.layout=new s,n=this;n.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var o=r.newGraphManager();this.gm=o;var a=this.options.eles.nodes(),h=this.options.eles.edges();this.root=o.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(a),r);for(var l=0;l<h.length;l++){var g=h[l],u=this.idToLNode[g.data("source")],c=this.idToLNode[g.data("target")];u!==c&&0==u.getEdgesBetween(c).length&&(o.add(r.newEdge(),u,c).id=g.id())}var d=function(t,e){"number"==typeof t&&(t=e);var i=t.data("id"),r=n.idToLNode[i];return{x:r.getRect().getCenterX(),y:r.getRect().getCenterY()}},p=function o(){for(var s,a=function(){i.fit&&i.cy.fit(i.eles,i.padding),t||(t=!0,n.cy.one("layoutready",i.ready),n.cy.trigger({type:"layoutready",layout:n}))},h=n.options.refresh,l=0;l<h&&!s;l++)s=n.stopped||n.layout.tick();if(s){r.checkLayoutSuccess()&&!r.isSubLayout&&r.doPostLayout(),r.tilingPostLayout&&r.tilingPostLayout(),r.isLayoutFinished=!0,n.options.eles.nodes().positions(d),a(),n.cy.one("layoutstop",n.options.stop),n.cy.trigger({type:"layoutstop",layout:n}),e&&cancelAnimationFrame(e),t=!1;return}var g=n.layout.getPositionsData();i.eles.nodes().positions(function(t,e){if("number"==typeof t&&(t=e),!t.isParent()){for(var i=t.id(),r=g[i],n=t;null==r&&(r=g[n.data("parent")]||g["DummyCompound_"+n.data("parent")],g[i]=r,void 0!=(n=n.parent()[0])););return null!=r?{x:r.x,y:r.y}:{x:t.position("x"),y:t.position("y")}}}),a(),e=requestAnimationFrame(o)};return r.addListener("layoutstarted",function(){"during"===n.options.animate&&(e=requestAnimationFrame(p))}),r.runLayout(),"during"!==this.options.animate&&(n.options.eles.nodes().not(":parent").layoutPositions(n,n.options,d),t=!1),this},u.prototype.getTopMostNodes=function(t){for(var e={},i=0;i<t.length;i++)e[t[i].id()]=!0;return t.filter(function(t,i){"number"==typeof t&&(t=i);for(var r=t.parent()[0];null!=r;){if(e[r.id()])return!1;r=r.parent()[0]}return!0})},u.prototype.processChildrenList=function(t,e,i){for(var r=e.length,n=0;n<r;n++){var o,s,g=e[n],u=g.children(),c=g.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if((o=null!=g.outerWidth()&&null!=g.outerHeight()?t.add(new a(i.graphManager,new h(g.position("x")-c.w/2,g.position("y")-c.h/2),new l(parseFloat(c.w),parseFloat(c.h)))):t.add(new a(this.graphManager))).id=g.data("id"),o.paddingLeft=parseInt(g.css("padding")),o.paddingTop=parseInt(g.css("padding")),o.paddingRight=parseInt(g.css("padding")),o.paddingBottom=parseInt(g.css("padding")),this.options.nodeDimensionsIncludeLabels&&g.isParent()){var d=g.boundingBox({includeLabels:!0,includeNodes:!1}).w,p=g.boundingBox({includeLabels:!0,includeNodes:!1}).h,f=g.css("text-halign");o.labelWidth=d,o.labelHeight=p,o.labelPos=f}this.idToLNode[g.data("id")]=o,isNaN(o.rect.x)&&(o.rect.x=0),isNaN(o.rect.y)&&(o.rect.y=0),null!=u&&u.length>0&&(s=i.getGraphManager().add(i.newGraph(),o),this.processChildrenList(s,u,i))}},u.prototype.stop=function(){return this.stopped=!0,this};var d=function(t){t("layout","cose-bilkent",u)};"u">typeof cytoscape&&d(cytoscape),t.exports=d}],i={};function r(t){if(i[t])return i[t].exports;var n=i[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=i,r.i=function(t){return t},r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1)}(t.r(97659))},97810,t=>{"use strict";var e=t.i(71206),i=t.i(77871),r=t.i(15363);t.i(47716);var n=t.i(23685);function o(t,e){t.forEach(t=>{let i={id:t.id,labelText:t.label,height:t.height,width:t.width,padding:t.padding??0};Object.keys(t).forEach(e=>{["id","label","height","width","padding","x","y"].includes(e)||(i[e]=t[e])}),e.add({group:"nodes",data:i,position:{x:t.x??0,y:t.y??0}})})}function s(t,e){t.forEach(t=>{let i={id:t.id,source:t.start,target:t.end};Object.keys(t).forEach(e=>{["id","start","end"].includes(e)||(i[e]=t[e])}),e.add({group:"edges",data:i})})}function a(t){return new Promise(r=>{let a=(0,n.select)("body").append("div").attr("id","cy").attr("style","display:none"),h=(0,i.default)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});a.remove(),o(t.nodes,h),s(t.edges,h),h.nodes().forEach(function(t){t.layoutDimensions=()=>{let e=t.data();return{w:e.width,h:e.height}}}),h.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),h.ready(t=>{e.log.info("Cytoscape ready",t),r(h)})})}function h(t){return t.nodes().map(t=>{let e=t.data(),i=t.position(),r={id:e.id,x:i.x,y:i.y};return Object.keys(e).forEach(t=>{"id"!==t&&(r[t]=e[t])}),r})}function l(t){return t.edges().map(t=>{let e=t.data(),i=t._private.rscratch,r={id:e.id,source:e.source,target:e.target,startX:i.startX,startY:i.startY,midX:i.midX,midY:i.midY,endX:i.endX,endY:i.endY};return Object.keys(e).forEach(t=>{["id","source","target"].includes(t)||(r[t]=e[t])}),r})}async function g(t,i){e.log.debug("Starting cose-bilkent layout algorithm");try{u(t);let i=await a(t),r=h(i),n=l(i);return e.log.debug(`Layout completed: ${r.length} nodes, ${n.length} edges`),{nodes:r,edges:n}}catch(t){throw e.log.error("Error in cose-bilkent layout algorithm:",t),t}}function u(t){if(!t)throw Error("Layout data is required");if(!t.config)throw Error("Configuration is required in layout data");if(!t.rootNode)throw Error("Root node is required");if(!t.nodes||!Array.isArray(t.nodes))throw Error("No nodes found in layout data");if(!Array.isArray(t.edges))throw Error("Edges array is required in layout data");return!0}i.default.use(r.default),(0,e.__name)(o,"addNodes"),(0,e.__name)(s,"addEdges"),(0,e.__name)(a,"createCytoscapeInstance"),(0,e.__name)(h,"extractPositionedNodes"),(0,e.__name)(l,"extractPositionedEdges"),(0,e.__name)(g,"executeCoseBilkentLayout"),(0,e.__name)(u,"validateLayoutData");var c=(0,e.__name)(async(t,e,{insertCluster:i,insertEdge:r,insertEdgeLabel:n,insertMarkers:o,insertNode:s,log:a,positionEdgeLabel:h},{algorithm:l})=>{let u={},c={},d=e.select("g");o(d,t.markers,t.type,t.diagramId);let p=d.insert("g").attr("class","subgraphs"),f=d.insert("g").attr("class","edgePaths"),y=d.insert("g").attr("class","edgeLabels"),E=d.insert("g").attr("class","nodes");a.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(t.nodes.map(async e=>{if(e.isGroup){let t={...e};c[e.id]=t,u[e.id]=t,await i(p,e)}else{let i={...e};u[e.id]=i;let r=await s(E,e,{config:t.config,dir:t.direction||"TB"}),n=r.node().getBBox();i.width=n.width,i.height=n.height,i.domId=r,a.debug(`Node ${e.id} dimensions: ${n.width}x${n.height}`)}})),a.debug("Running cose-bilkent layout algorithm");let v={...t,nodes:t.nodes.map(t=>{let e=u[t.id];return{...t,width:e.width,height:e.height}})},A=await g(v,t.config);a.debug("Positioning nodes based on layout results"),A.nodes.forEach(t=>{let e=u[t.id];e?.domId&&(e.domId.attr("transform",`translate(${t.x}, ${t.y})`),e.x=t.x,e.y=t.y,a.debug(`Positioned node ${e.id} at center (${t.x}, ${t.y})`))}),A.edges.forEach(e=>{let i=t.edges.find(t=>t.id===e.id);i&&(i.points=[{x:e.startX,y:e.startY},{x:e.midX,y:e.midY},{x:e.endX,y:e.endY}])}),a.debug("Inserting and positioning edges"),await Promise.all(t.edges.map(async e=>{await n(y,e);let i=u[e.start??""],o=u[e.end??""];if(i&&o){let n=A.edges.find(t=>t.id===e.id);if(n){a.debug("APA01 positionedEdge",n);let s={...e},l=r(f,s,c,t.type,i,o,t.diagramId);h(s,l)}else{let n={...e,points:[{x:i.x||0,y:i.y||0},{x:o.x||0,y:o.y||0}]},s=r(f,n,c,t.type,i,o,t.diagramId);h(n,s)}}})),a.debug("Cose-bilkent rendering completed")},"render");t.s(["render",()=>c])}]);
@@ -0,0 +1,43 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,26895,e=>{"use strict";var t=e.i(86780),r=e.i(72724),a=e.i(46440),i=e.i(99238),n=class extends t.AbstractMermaidTokenBuilder{static{(0,t.__name)(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},s=class extends t.AbstractMermaidValueConverter{static{(0,t.__name)(this,"ArchitectureValueConverter")}runCustomConverter(e,t,r){return"ARCH_ICON"===e.name?t.replace(/[()]/g,"").trim():"ARCH_TEXT_ICON"===e.name?t.replace(/["()]/g,""):"ARCH_TITLE"===e.name?t.replace(/[[\]]/g,"").trim():void 0}},l={parser:{TokenBuilder:(0,t.__name)(()=>new n,"TokenBuilder"),ValueConverter:(0,t.__name)(()=>new s,"ValueConverter")}};function o(e=r.EmptyFileSystem){let n=(0,i.inject)((0,a.createDefaultSharedCoreModule)(e),t.MermaidGeneratedSharedModule),s=(0,i.inject)((0,a.createDefaultCoreModule)({shared:n}),t.ArchitectureGrammarGeneratedModule,l);return n.ServiceRegistry.register(s),{shared:n,Architecture:s}}(0,t.__name)(o,"createArchitectureServices"),e.s(["ArchitectureModule",()=>l,"createArchitectureServices",()=>o])},26882,e=>{"use strict";var t=e.i(86780),r=e.i(72724),a=e.i(46440),i=e.i(99238),n=class extends t.AbstractMermaidTokenBuilder{static{(0,t.__name)(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},s=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,l=class extends t.AbstractMermaidValueConverter{static{(0,t.__name)(this,"TreemapValueConverter")}runCustomConverter(e,t,r){if("NUMBER2"===e.name)return parseFloat(t.replace(/,/g,""));if("SEPARATOR"===e.name)return t.substring(1,t.length-1);if("STRING2"===e.name)return t.substring(1,t.length-1);if("INDENTATION"===e.name)return t.length;if("ClassDef"===e.name){if("string"!=typeof t)return t;let e=s.exec(t);if(e)return{$type:"ClassDefStatement",className:e[1],styleText:e[2]||void 0}}}};function o(e){let t=e.validation.TreemapValidator,r=e.validation.ValidationRegistry;if(r){let e={Treemap:t.checkSingleRoot.bind(t)};r.register(e,t)}}(0,t.__name)(o,"registerValidationChecks");var c=class{static{(0,t.__name)(this,"TreemapValidator")}checkSingleRoot(e,t){let r;for(let a of e.TreemapRows)a.item&&(void 0===r&&void 0===a.indent?r=0:void 0===a.indent?t("error","Multiple root nodes are not allowed in a treemap.",{node:a,property:"item"}):void 0!==r&&r>=parseInt(a.indent,10)&&t("error","Multiple root nodes are not allowed in a treemap.",{node:a,property:"item"}))}},u={parser:{TokenBuilder:(0,t.__name)(()=>new n,"TokenBuilder"),ValueConverter:(0,t.__name)(()=>new l,"ValueConverter")},validation:{TreemapValidator:(0,t.__name)(()=>new c,"TreemapValidator")}};function d(e=r.EmptyFileSystem){let n=(0,i.inject)((0,a.createDefaultSharedCoreModule)(e),t.MermaidGeneratedSharedModule),s=(0,i.inject)((0,a.createDefaultCoreModule)({shared:n}),t.TreemapGrammarGeneratedModule,u);return n.ServiceRegistry.register(s),o(s),{shared:n,Treemap:s}}(0,t.__name)(d,"createTreemapServices"),e.s(["TreemapModule",()=>u,"createTreemapServices",()=>d])},89590,e=>{"use strict";e.i(19040),e.i(8838),e.i(61786),e.i(53415),e.i(26895),e.i(50588),e.i(26882);var t=e.i(86780),r={},a={info:(0,t.__name)(async()=>{let{createInfoServices:t}=await e.A(48135);r.info=t().Info.parser.LangiumParser},"info"),packet:(0,t.__name)(async()=>{let{createPacketServices:t}=await e.A(66078);r.packet=t().Packet.parser.LangiumParser},"packet"),pie:(0,t.__name)(async()=>{let{createPieServices:t}=await e.A(66967);r.pie=t().Pie.parser.LangiumParser},"pie"),architecture:(0,t.__name)(async()=>{let{createArchitectureServices:t}=await e.A(49503);r.architecture=t().Architecture.parser.LangiumParser},"architecture"),gitGraph:(0,t.__name)(async()=>{let{createGitGraphServices:t}=await e.A(74196);r.gitGraph=t().GitGraph.parser.LangiumParser},"gitGraph"),radar:(0,t.__name)(async()=>{let{createRadarServices:t}=await e.A(76577);r.radar=t().Radar.parser.LangiumParser},"radar"),treemap:(0,t.__name)(async()=>{let{createTreemapServices:t}=await e.A(40242);r.treemap=t().Treemap.parser.LangiumParser},"treemap")};async function i(e,t){let i=a[e];if(!i)throw Error(`Unknown diagram type: ${e}`);r[e]||await i();let s=r[e].parse(t);if(s.lexerErrors.length>0||s.parserErrors.length>0)throw new n(s);return s.value}(0,t.__name)(i,"parse");var n=class extends Error{constructor(e){super(`Parsing failed: ${e.lexerErrors.map(e=>e.message).join("\n")} ${e.parserErrors.map(e=>e.message).join("\n")}`),this.result=e}static{(0,t.__name)(this,"MermaidParseError")}};e.s(["parse",()=>i])},19040,e=>{"use strict";var t=e.i(86780),r=e.i(99238),a=e.i(46440),i=e.i(72724),n=class extends t.AbstractMermaidTokenBuilder{static{(0,t.__name)(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},s={parser:{TokenBuilder:(0,t.__name)(()=>new n,"TokenBuilder"),ValueConverter:(0,t.__name)(()=>new t.CommonValueConverter,"ValueConverter")}};function l(e=i.EmptyFileSystem){let n=(0,r.inject)((0,a.createDefaultSharedCoreModule)(e),t.MermaidGeneratedSharedModule),o=(0,r.inject)((0,a.createDefaultCoreModule)({shared:n}),t.GitGraphGrammarGeneratedModule,s);return n.ServiceRegistry.register(o),{shared:n,GitGraph:o}}(0,t.__name)(l,"createGitGraphServices"),e.s(["GitGraphModule",()=>s,"createGitGraphServices",()=>l])},53415,e=>{"use strict";var t=e.i(86780),r=e.i(72724),a=e.i(46440),i=e.i(99238),n=class extends t.AbstractMermaidTokenBuilder{static{(0,t.__name)(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},s=class extends t.AbstractMermaidValueConverter{static{(0,t.__name)(this,"PieValueConverter")}runCustomConverter(e,t,r){if("PIE_SECTION_LABEL"===e.name)return t.replace(/"/g,"").trim()}},l={parser:{TokenBuilder:(0,t.__name)(()=>new n,"TokenBuilder"),ValueConverter:(0,t.__name)(()=>new s,"ValueConverter")}};function o(e=r.EmptyFileSystem){let n=(0,i.inject)((0,a.createDefaultSharedCoreModule)(e),t.MermaidGeneratedSharedModule),s=(0,i.inject)((0,a.createDefaultCoreModule)({shared:n}),t.PieGrammarGeneratedModule,l);return n.ServiceRegistry.register(s),{shared:n,Pie:s}}(0,t.__name)(o,"createPieServices"),e.s(["PieModule",()=>l,"createPieServices",()=>o])},88471,e=>{"use strict";var t=e.i(89066);e.s(["clone",()=>t.default])},89066,e=>{"use strict";var t=e.i(42038);e.s(["default",0,function(e){return(0,t.default)(e,4)}])},17782,e=>{"use strict";var t=e.i(84891);e.s(["forEach",()=>t.default])},85186,e=>{"use strict";var t=Object.prototype.hasOwnProperty;let r=function(e,r){return null!=e&&t.call(e,r)};var a=e.i(78978);e.s(["has",0,function(e,t){return null!=e&&(0,a.default)(e,t,r)}],85186)},53908,98545,44515,49205,e=>{"use strict";var t=e.i(82735),r=e.i(50266),a=e.i(69104),i=e.i(41338);let n=function(e,t){var r=-1,n=(0,i.default)(e)?Array(e.length):[];return(0,a.default)(e,function(e,a,i){n[++r]=t(e,a,i)}),n};e.s(["default",0,n],98545);var s=e.i(44071);let l=function(e,a){return((0,s.default)(e)?t.default:n)(e,(0,r.default)(a,3))};e.s(["default",0,l],44515),e.s(["map",0,l],53908);var o=/\s/;let c=function(e){for(var t=e.length;t--&&o.test(e.charAt(t)););return t};var u=/^\s+/,d=e.i(59110),m=e.i(16827),f=0/0,p=/^[-+]0x[0-9a-f]+$/i,h=/^0b[01]+$/i,v=/^0o[0-7]+$/i,g=parseInt;let _=function(e){if("number"==typeof e)return e;if((0,m.default)(e))return f;if((0,d.default)(e)){var t,r="function"==typeof e.valueOf?e.valueOf():e;e=(0,d.default)(r)?r+"":r}if("string"!=typeof e)return 0===e?e:+e;e=(t=e)?t.slice(0,c(t)+1).replace(u,""):t;var a=h.test(e);return a||v.test(e)?g(e.slice(2),a?2:8):p.test(e)?f:+e};var x=1/0;e.s(["default",0,function(e){return e?(e=_(e))===x||e===-x?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}],49205)},37557,e=>{"use strict";var t=e.i(49205);e.s(["default",0,function(e){var r=(0,t.default)(e),a=r%1;return r==r?a?r-a:r:0}])},92474,e=>{"use strict";var t=e.i(35287),r=e.i(44071),a=e.i(63615);e.s(["default",0,function(e){return"string"==typeof e||!(0,r.default)(e)&&(0,a.default)(e)&&"[object String]"==(0,t.default)(e)}])},33837,e=>{"use strict";var t=e.i(26881),r=e.i(8888),a=e.i(72778),i=e.i(48178),n=e.i(59110),s=e.i(77734);let l=function(e,t,l,o){if(!(0,n.default)(e))return e;t=(0,a.default)(t,e);for(var c=-1,u=t.length,d=u-1,m=e;null!=m&&++c<u;){var f=(0,s.default)(t[c]),p=l;if("__proto__"===f||"constructor"===f||"prototype"===f)break;if(c!=d){var h=m[f];void 0===(p=o?o(h,f,m):void 0)&&(p=(0,n.default)(h)?h:(0,i.default)(t[c+1])?[]:{})}(0,r.default)(m,f,p),m=m[f]}return e};e.s(["default",0,function(e,r,i){for(var n=-1,s=r.length,o={};++n<s;){var c=r[n],u=(0,t.default)(e,c);i(u,c)&&l(o,(0,a.default)(c,e),u)}return o}],33837)},69109,22030,e=>{"use strict";var t=e.i(61196);let r=function(e){return(null==e?0:e.length)?(0,t.default)(e,1):[]};e.s(["default",0,r],22030),e.s(["flatten",0,r],69109)},61378,e=>{"use strict";var t=e.i(90104),r=e.i(8986),a=e.i(27925),i=e.i(72585),n=Object.prototype,s=n.hasOwnProperty,l=(0,t.default)(function(e,t){e=Object(e);var l=-1,o=t.length,c=o>2?t[2]:void 0;for(c&&(0,a.default)(t[0],t[1],c)&&(o=1);++l<o;)for(var u=t[l],d=(0,i.default)(u),m=-1,f=d.length;++m<f;){var p=d[m],h=e[p];(void 0===h||(0,r.default)(h,n[p])&&!s.call(e,p))&&(e[p]=u[p])}return e});e.s(["defaults",0,l],61378)},77811,e=>{"use strict";var t=e.i(50266),r=e.i(41338),a=e.i(54069);e.s(["default",0,function(e){return function(i,n,s){var l=Object(i);if(!(0,r.default)(i)){var o=(0,t.default)(n,3);i=(0,a.default)(i),n=function(e){return o(l[e],e,l)}}var c=e(i,n,s);return c>-1?l[o?i[c]:c]:void 0}}])},35962,e=>{"use strict";var t=e.i(77811),r=e.i(53411),a=e.i(50266),i=e.i(37557),n=Math.max,s=(0,t.default)(function(e,t,s){var l=null==e?0:e.length;if(!l)return -1;var o=null==s?0:(0,i.default)(s);return o<0&&(o=n(l+o,0)),(0,r.default)(e,(0,a.default)(t,3),o)});e.s(["find",0,s],35962)},67168,e=>{"use strict";var t=e.i(44071);e.s(["isArray",()=>t.default])},21813,e=>{"use strict";e.s(["last",0,function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}],21813)},1101,e=>{"use strict";var t=e.i(16827);e.s(["default",0,function(e,r,a){for(var i=-1,n=e.length;++i<n;){var s=e[i],l=r(s);if(null!=l&&(void 0===o?l==l&&!(0,t.default)(l):a(l,o)))var o=l,c=s}return c}])},9113,34904,e=>{"use strict";var t=e.i(1101);let r=function(e,t){return e<t};e.s(["default",0,r],34904);var a=e.i(10022);e.s(["default",0,function(e){return e&&e.length?(0,t.default)(e,a.default,r):void 0}],9113)},61786,e=>{"use strict";var t=e.i(86780),r=e.i(72724),a=e.i(46440),i=e.i(99238),n=class extends t.AbstractMermaidTokenBuilder{static{(0,t.__name)(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},s={parser:{TokenBuilder:(0,t.__name)(()=>new n,"TokenBuilder"),ValueConverter:(0,t.__name)(()=>new t.CommonValueConverter,"ValueConverter")}};function l(e=r.EmptyFileSystem){let n=(0,i.inject)((0,a.createDefaultSharedCoreModule)(e),t.MermaidGeneratedSharedModule),o=(0,i.inject)((0,a.createDefaultCoreModule)({shared:n}),t.PacketGrammarGeneratedModule,s);return n.ServiceRegistry.register(o),{shared:n,Packet:o}}(0,t.__name)(l,"createPacketServices"),e.s(["PacketModule",()=>s,"createPacketServices",()=>l])},50588,e=>{"use strict";var t=e.i(86780),r=e.i(72724),a=e.i(46440),i=e.i(99238),n=class extends t.AbstractMermaidTokenBuilder{static{(0,t.__name)(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},s={parser:{TokenBuilder:(0,t.__name)(()=>new n,"TokenBuilder"),ValueConverter:(0,t.__name)(()=>new t.CommonValueConverter,"ValueConverter")}};function l(e=r.EmptyFileSystem){let n=(0,i.inject)((0,a.createDefaultSharedCoreModule)(e),t.MermaidGeneratedSharedModule),o=(0,i.inject)((0,a.createDefaultCoreModule)({shared:n}),t.RadarGrammarGeneratedModule,s);return n.ServiceRegistry.register(o),{shared:n,Radar:o}}(0,t.__name)(l,"createRadarServices"),e.s(["RadarModule",()=>s,"createRadarServices",()=>l])},8838,e=>{"use strict";var t=e.i(86780),r=e.i(72724),a=e.i(46440),i=e.i(99238),n=class extends t.AbstractMermaidTokenBuilder{static{(0,t.__name)(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},s={parser:{TokenBuilder:(0,t.__name)(()=>new n,"TokenBuilder"),ValueConverter:(0,t.__name)(()=>new t.CommonValueConverter,"ValueConverter")}};function l(e=r.EmptyFileSystem){let n=(0,i.inject)((0,a.createDefaultSharedCoreModule)(e),t.MermaidGeneratedSharedModule),o=(0,i.inject)((0,a.createDefaultCoreModule)({shared:n}),t.InfoGrammarGeneratedModule,s);return n.ServiceRegistry.register(o),{shared:n,Info:o}}(0,t.__name)(l,"createInfoServices"),e.s(["InfoModule",()=>s,"createInfoServices",()=>l])},2099,e=>{"use strict";function t(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}(0,e.i(71206).__name)(t,"populateCommonDb"),e.s(["populateCommonDb",()=>t])},52024,e=>{"use strict";var t=e.i(83996),r=e.i(2099),a=e.i(95923),i=e.i(80926),n=e.i(71206),s=e.i(89590),l={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},o={axes:[],curves:[],options:l},c=structuredClone(o),u=i.defaultConfig_default.radar,d=(0,n.__name)(()=>(0,a.cleanAndMerge)({...u,...(0,i.getConfig)().radar}),"getConfig"),m=(0,n.__name)(()=>c.axes,"getAxes"),f=(0,n.__name)(()=>c.curves,"getCurves"),p=(0,n.__name)(()=>c.options,"getOptions"),h=(0,n.__name)(e=>{c.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},"setAxes"),v=(0,n.__name)(e=>{c.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:g(e.entries)}))},"setCurves"),g=(0,n.__name)(e=>{if(void 0==e[0].axis)return e.map(e=>e.value);let t=m();if(0===t.length)throw Error("Axes must be populated before curves for reference entries");return t.map(t=>{let r=e.find(e=>e.axis?.$refText===t.name);if(void 0===r)throw Error("Missing entry for axis "+t.label);return r.value})},"computeCurveEntries"),_={getAxes:m,getCurves:f,getOptions:p,setAxes:h,setCurves:v,setOptions:(0,n.__name)(e=>{let t=e.reduce((e,t)=>(e[t.name]=t,e),{});c.options={showLegend:t.showLegend?.value??l.showLegend,ticks:t.ticks?.value??l.ticks,max:t.max?.value??l.max,min:t.min?.value??l.min,graticule:t.graticule?.value??l.graticule}},"setOptions"),getConfig:d,clear:(0,n.__name)(()=>{(0,i.clear)(),c=structuredClone(o)},"clear"),setAccTitle:i.setAccTitle,getAccTitle:i.getAccTitle,setDiagramTitle:i.setDiagramTitle,getDiagramTitle:i.getDiagramTitle,getAccDescription:i.getAccDescription,setAccDescription:i.setAccDescription},x=(0,n.__name)(e=>{(0,r.populateCommonDb)(e,_);let{axes:t,curves:a,options:i}=e;_.setAxes(t),_.setCurves(a),_.setOptions(i)},"populate"),C={parse:(0,n.__name)(async e=>{let t=await (0,s.parse)("radar",e);n.log.debug(t),x(t)},"parse")},y=(0,n.__name)((e,r,a,i)=>{let n=i.db,s=n.getAxes(),l=n.getCurves(),o=n.getOptions(),c=n.getConfig(),u=n.getDiagramTitle(),d=M((0,t.selectSvgElement)(r),c),m=o.max??Math.max(...l.map(e=>Math.max(...e.entries))),f=o.min,p=Math.min(c.width,c.height)/2;T(d,s,p,o.ticks,o.graticule),S(d,s,p,c),k(d,s,l,f,m,o.graticule,c),b(d,l,o.showLegend,c),d.append("text").attr("class","radarTitle").text(u).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),M=(0,n.__name)((e,t)=>{let r=t.width+t.marginLeft+t.marginRight,a=t.height+t.marginTop+t.marginBottom,i={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return e.attr("viewbox",`0 0 ${r} ${a}`).attr("width",r).attr("height",a),e.append("g").attr("transform",`translate(${i.x}, ${i.y})`)},"drawFrame"),T=(0,n.__name)((e,t,r,a,i)=>{if("circle"===i)for(let t=0;t<a;t++){let i=r*(t+1)/a;e.append("circle").attr("r",i).attr("class","radarGraticule")}else if("polygon"===i){let i=t.length;for(let n=0;n<a;n++){let s=r*(n+1)/a,l=t.map((e,t)=>{let r=2*t*Math.PI/i-Math.PI/2,a=s*Math.cos(r),n=s*Math.sin(r);return`${a},${n}`}).join(" ");e.append("polygon").attr("points",l).attr("class","radarGraticule")}}},"drawGraticule"),S=(0,n.__name)((e,t,r,a)=>{let i=t.length;for(let n=0;n<i;n++){let s=t[n].label,l=2*n*Math.PI/i-Math.PI/2;e.append("line").attr("x1",0).attr("y1",0).attr("x2",r*a.axisScaleFactor*Math.cos(l)).attr("y2",r*a.axisScaleFactor*Math.sin(l)).attr("class","radarAxisLine"),e.append("text").text(s).attr("x",r*a.axisLabelFactor*Math.cos(l)).attr("y",r*a.axisLabelFactor*Math.sin(l)).attr("class","radarAxisLabel")}},"drawAxes");function k(e,t,r,a,i,n,s){let l=t.length,o=Math.min(s.width,s.height)/2;r.forEach((t,r)=>{if(t.entries.length!==l)return;let c=t.entries.map((e,t)=>{let r=2*Math.PI*t/l-Math.PI/2,n=A(e,a,i,o);return{x:n*Math.cos(r),y:n*Math.sin(r)}});"circle"===n?e.append("path").attr("d",w(c,s.curveTension)).attr("class",`radarCurve-${r}`):"polygon"===n&&e.append("polygon").attr("points",c.map(e=>`${e.x},${e.y}`).join(" ")).attr("class",`radarCurve-${r}`)})}function A(e,t,r,a){return a*(Math.min(Math.max(e,t),r)-t)/(r-t)}function w(e,t){let r=e.length,a=`M${e[0].x},${e[0].y}`;for(let i=0;i<r;i++){let n=e[(i-1+r)%r],s=e[i],l=e[(i+1)%r],o=e[(i+2)%r],c={x:s.x+(l.x-n.x)*t,y:s.y+(l.y-n.y)*t},u={x:l.x-(o.x-s.x)*t,y:l.y-(o.y-s.y)*t};a+=` C${c.x},${c.y} ${u.x},${u.y} ${l.x},${l.y}`}return`${a} Z`}function b(e,t,r,a){if(!r)return;let i=(a.width/2+a.marginRight)*3/4,n=-(3*(a.height/2+a.marginTop))/4;t.forEach((t,r)=>{let a=e.append("g").attr("transform",`translate(${i}, ${n+20*r})`);a.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${r}`),a.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(t.label)})}(0,n.__name)(k,"drawCurves"),(0,n.__name)(A,"relativeRadius"),(0,n.__name)(w,"closedRoundCurve"),(0,n.__name)(b,"drawLegend");var $=(0,n.__name)((e,t)=>{let r="";for(let a=0;a<e.THEME_COLOR_LIMIT;a++){let i=e[`cScale${a}`];r+=`
2
+ .radarCurve-${a} {
3
+ color: ${i};
4
+ fill: ${i};
5
+ fill-opacity: ${t.curveOpacity};
6
+ stroke: ${i};
7
+ stroke-width: ${t.curveStrokeWidth};
8
+ }
9
+ .radarLegendBox-${a} {
10
+ fill: ${i};
11
+ fill-opacity: ${t.curveOpacity};
12
+ stroke: ${i};
13
+ }
14
+ `}return r},"genIndexStyles"),G=(0,n.__name)(e=>{let t=(0,i.getThemeVariables)(),r=(0,i.getConfig)(),n=(0,a.cleanAndMerge)(t,r.themeVariables),s=(0,a.cleanAndMerge)(n.radar,e);return{themeVariables:n,radarOptions:s}},"buildRadarStyleOptions"),P={parser:C,db:_,renderer:{draw:y},styles:(0,n.__name)(({radar:e}={})=>{let{themeVariables:t,radarOptions:r}=G(e);return`
15
+ .radarTitle {
16
+ font-size: ${t.fontSize};
17
+ color: ${t.titleColor};
18
+ dominant-baseline: hanging;
19
+ text-anchor: middle;
20
+ }
21
+ .radarAxisLine {
22
+ stroke: ${r.axisColor};
23
+ stroke-width: ${r.axisStrokeWidth};
24
+ }
25
+ .radarAxisLabel {
26
+ dominant-baseline: middle;
27
+ text-anchor: middle;
28
+ font-size: ${r.axisLabelFontSize}px;
29
+ color: ${r.axisColor};
30
+ }
31
+ .radarGraticule {
32
+ fill: ${r.graticuleColor};
33
+ fill-opacity: ${r.graticuleOpacity};
34
+ stroke: ${r.graticuleColor};
35
+ stroke-width: ${r.graticuleStrokeWidth};
36
+ }
37
+ .radarLegendText {
38
+ text-anchor: start;
39
+ font-size: ${r.legendFontSize}px;
40
+ dominant-baseline: hanging;
41
+ }
42
+ ${$(t,r)}
43
+ `},"styles")};e.s(["diagram",()=>P])},48135,e=>{e.v(t=>Promise.all(["static/chunks/f678cdcec3cea0de.js"].map(t=>e.l(t))).then(()=>t(89725)))},66078,e=>{e.v(t=>Promise.all(["static/chunks/3e6042c77fa8e7ac.js"].map(t=>e.l(t))).then(()=>t(10936)))},66967,e=>{e.v(t=>Promise.all(["static/chunks/ff49535ba8193dec.js"].map(t=>e.l(t))).then(()=>t(981)))},49503,e=>{e.v(t=>Promise.all(["static/chunks/539636bf51e84308.js"].map(t=>e.l(t))).then(()=>t(35279)))},74196,e=>{e.v(t=>Promise.all(["static/chunks/5c05dda6ed4d92bf.js"].map(t=>e.l(t))).then(()=>t(81752)))},76577,e=>{e.v(t=>Promise.all(["static/chunks/a85d55e8b6841436.js"].map(t=>e.l(t))).then(()=>t(96112)))},40242,e=>{e.v(t=>Promise.all(["static/chunks/ce4052f386943efb.js"].map(t=>e.l(t))).then(()=>t(84012)))}]);