db-studio 1.2.20 → 1.2.22

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 (100) hide show
  1. package/dist/core-dist/assets/{_baseUniq-CeqT3N-D.js → _baseUniq-BnS4oWxG.js} +1 -1
  2. package/dist/core-dist/assets/_pathlessLayout-J4rDhSFV.js +2 -0
  3. package/dist/core-dist/assets/_queryId-BGnLBhn8.js +1 -0
  4. package/dist/core-dist/assets/_table-C_4RREBi.js +1 -0
  5. package/dist/core-dist/assets/{arc-Dnc_3KxD.js → arc-BzayzQuy.js} +1 -1
  6. package/dist/core-dist/assets/architectureDiagram-VXUJARFQ-CDKgWmU1.js +36 -0
  7. package/dist/core-dist/assets/{blockDiagram-VD42YOAC-jp3IzhcG.js → blockDiagram-VD42YOAC-DajA7Gs0.js} +1 -1
  8. package/dist/core-dist/assets/{c4Diagram-YG6GDRKO-CahI2eve.js → c4Diagram-YG6GDRKO-DFgrz0k6.js} +1 -1
  9. package/dist/core-dist/assets/{cdoe-editor-BswlKXRb.js → cdoe-editor-Bv60qmc3.js} +2 -2
  10. package/dist/core-dist/assets/channel-D7_kpMKZ.js +1 -0
  11. package/dist/core-dist/assets/{chunk-4BX2VUAB-DNTUv4GR.js → chunk-4BX2VUAB-B3yeq0dh.js} +1 -1
  12. package/dist/core-dist/assets/{chunk-55IACEB6-Xrs620gj.js → chunk-55IACEB6-DFZ6X9qg.js} +1 -1
  13. package/dist/core-dist/assets/{chunk-B4BG7PRW-COpTaouf.js → chunk-B4BG7PRW-BmPKklye.js} +1 -1
  14. package/dist/core-dist/assets/{chunk-DI55MBZ5-3wt5pOdw.js → chunk-DI55MBZ5-BA4d2Wbt.js} +1 -1
  15. package/dist/core-dist/assets/{chunk-FMBD7UC4-BQmP0qBN.js → chunk-FMBD7UC4-XJsNmwVW.js} +1 -1
  16. package/dist/core-dist/assets/{chunk-QN33PNHL-f1y0j0u4.js → chunk-QN33PNHL-CujeLF1b.js} +1 -1
  17. package/dist/core-dist/assets/{chunk-QZHKN3VN-C6jBpr-H.js → chunk-QZHKN3VN-BGMtvFJQ.js} +1 -1
  18. package/dist/core-dist/assets/{chunk-TZMSLE5B-31ka2vOU.js → chunk-TZMSLE5B-JJzEtNYD.js} +1 -1
  19. package/dist/core-dist/assets/classDiagram-2ON5EDUG-CeZr_QVj.js +1 -0
  20. package/dist/core-dist/assets/classDiagram-v2-WZHVMYZB-CeZr_QVj.js +1 -0
  21. package/dist/core-dist/assets/clone-Bq17CDff.js +1 -0
  22. package/dist/core-dist/assets/{code-block-IT6T5CEO-B2LU0jbX.js → code-block-IT6T5CEO-mzJGOnKv.js} +1 -1
  23. package/dist/core-dist/assets/cose-bilkent-S5V4N54A-CG3x36O6.js +1 -0
  24. package/dist/core-dist/assets/dagre-6UL2VRFP-CUAYXvH9.js +4 -0
  25. package/dist/core-dist/assets/diagram-PSM6KHXK-CjdajvGI.js +24 -0
  26. package/dist/core-dist/assets/diagram-QEK2KX5R-BwP9Rm7l.js +43 -0
  27. package/dist/core-dist/assets/diagram-S2PKOQOG-RojbbeSs.js +24 -0
  28. package/dist/core-dist/assets/{erDiagram-Q2GNP2WA-s3KzkqPg.js → erDiagram-Q2GNP2WA-D9N7nS0_.js} +1 -1
  29. package/dist/core-dist/assets/{flowDiagram-NV44I4VS-DFMBdQkp.js → flowDiagram-NV44I4VS-BD4JG33X.js} +1 -1
  30. package/dist/core-dist/assets/ganttDiagram-JELNMOA3-D4z9L9nY.js +267 -0
  31. package/dist/core-dist/assets/gitGraphDiagram-NY62KEGX-B2yHGcIC.js +65 -0
  32. package/dist/core-dist/assets/{graph-CoUoQfuh.js → graph-CNujjUl6.js} +1 -1
  33. package/dist/core-dist/assets/icons-cLYU3CQS.js +1 -0
  34. package/dist/core-dist/assets/index-B4CH9odE.js +1 -0
  35. package/dist/core-dist/assets/index-CiWmRiWr.js +1 -0
  36. package/dist/core-dist/assets/index-DEXHOoGJ.css +1 -0
  37. package/dist/core-dist/assets/index-DWavbP67.js +1 -0
  38. package/dist/core-dist/assets/index-Dq7-70tK.js +58 -0
  39. package/dist/core-dist/assets/index-pzKFI-Vs.js +1 -0
  40. package/dist/core-dist/assets/{indexes-COZEEebq.js → indexes-Bk_QNhz3.js} +1 -1
  41. package/dist/core-dist/assets/infoDiagram-WHAUD3N6-BvkFeyEE.js +2 -0
  42. package/dist/core-dist/assets/{journeyDiagram-XKPGCS4Q-CiAw1nw_.js → journeyDiagram-XKPGCS4Q-CkG5moWM.js} +1 -1
  43. package/dist/core-dist/assets/{kanban-definition-3W4ZIXB7-Yuc0Z8QR.js → kanban-definition-3W4ZIXB7-CfaZK5R9.js} +1 -1
  44. package/dist/core-dist/assets/{layout-Cw4LVk42.js → layout-CrsquEuM.js} +1 -1
  45. package/dist/core-dist/assets/{linear-CU5DgYOG.js → linear-bD-svMHh.js} +1 -1
  46. package/dist/core-dist/assets/logs-BCDaqHa5.js +1 -0
  47. package/dist/core-dist/assets/{mermaid-VLURNSYL-_Y2XU6_c.js → mermaid-VLURNSYL-BZBKtjwf.js} +5 -5
  48. package/dist/core-dist/assets/{mermaid.core-ds122QIK.js → mermaid.core-DmainLbW.js} +5 -5
  49. package/dist/core-dist/assets/{min-DFudLmkE.js → min-Cs3I0vDk.js} +1 -1
  50. package/dist/core-dist/assets/{mindmap-definition-VGOIOE7T-D7KNYm2E.js → mindmap-definition-VGOIOE7T-COrHba51.js} +1 -1
  51. package/dist/core-dist/assets/{pieDiagram-ADFJNKIX-D6Z1CJPE.js → pieDiagram-ADFJNKIX-C_wSihFn.js} +1 -1
  52. package/dist/core-dist/assets/{quadrantDiagram-AYHSOK5B-CxzHU3WJ.js → quadrantDiagram-AYHSOK5B-6QBSTaSf.js} +1 -1
  53. package/dist/core-dist/assets/{queries.store-Bxxvcbg7.js → queries.store-BqdJNevl.js} +1 -1
  54. package/dist/core-dist/assets/{radix-ui-Cy3m1w7k.js → radix-ui-d5EbBw33.js} +2 -2
  55. package/dist/core-dist/assets/{react-dom-DJoE1oD9.js → react-dom-BWKcCUTe.js} +1 -1
  56. package/dist/core-dist/assets/{requirementDiagram-UZGBJVZJ-CJGHr0pf.js → requirementDiagram-UZGBJVZJ-BmH--ndW.js} +1 -1
  57. package/dist/core-dist/assets/runner-tab-FdI7lq06.js +3 -0
  58. package/dist/core-dist/assets/sankeyDiagram-TZEHDZUN-BgePY74D.js +10 -0
  59. package/dist/core-dist/assets/{schema-ChEV6sF4.js → schema-D_xYQwIF.js} +1 -1
  60. package/dist/core-dist/assets/{scroll-area-BrIAuvEe.js → scroll-area-NHyDhTA5.js} +1 -1
  61. package/dist/core-dist/assets/{sequenceDiagram-WL72ISMW-w51z8BRE.js → sequenceDiagram-WL72ISMW-DyKFIest.js} +1 -1
  62. package/dist/core-dist/assets/stateDiagram-FKZM4ZOC-CoTNg4O5.js +1 -0
  63. package/dist/core-dist/assets/stateDiagram-v2-4FDKWEC3-VLFCTZ_U.js +1 -0
  64. package/dist/core-dist/assets/{tanstack-qLXitSFb.js → tanstack-D5ysZnPZ.js} +5 -5
  65. package/dist/core-dist/assets/{timeline-definition-IT6M3QCI-C5ksKXI5.js → timeline-definition-IT6M3QCI-BvUQ9Pv-.js} +1 -1
  66. package/dist/core-dist/assets/{treemap-KMMF4GRG-DPEcHwuf.js → treemap-KMMF4GRG-DLmWUMp8.js} +1 -1
  67. package/dist/core-dist/assets/{visualizer-CEMTmyw2.js → visualizer-BBc6FRkR.js} +1 -1
  68. package/dist/core-dist/assets/{xychartDiagram-PRI3JC2R-CNj0xyV4.js → xychartDiagram-PRI3JC2R-3ZAFpM_j.js} +1 -1
  69. package/dist/core-dist/index.html +6 -6
  70. package/dist/index.js +136 -122
  71. package/dist/index.js.map +1 -1
  72. package/package.json +10 -5
  73. package/dist/core-dist/assets/_pathlessLayout-DjLhpgxd.js +0 -2
  74. package/dist/core-dist/assets/_queryId-D0l8wnr_.js +0 -1
  75. package/dist/core-dist/assets/_table-D_on85wJ.js +0 -1
  76. package/dist/core-dist/assets/architectureDiagram-VXUJARFQ-D-naFXsN.js +0 -36
  77. package/dist/core-dist/assets/channel-C4imq4Zh.js +0 -1
  78. package/dist/core-dist/assets/classDiagram-2ON5EDUG-Q5JJrM4i.js +0 -1
  79. package/dist/core-dist/assets/classDiagram-v2-WZHVMYZB-Q5JJrM4i.js +0 -1
  80. package/dist/core-dist/assets/clone-DVHLGOmt.js +0 -1
  81. package/dist/core-dist/assets/cose-bilkent-S5V4N54A-DsJKuZ9Q.js +0 -1
  82. package/dist/core-dist/assets/dagre-6UL2VRFP-BnjHWLsZ.js +0 -4
  83. package/dist/core-dist/assets/diagram-PSM6KHXK-CnF6MjR2.js +0 -24
  84. package/dist/core-dist/assets/diagram-QEK2KX5R-DxVrT1PJ.js +0 -43
  85. package/dist/core-dist/assets/diagram-S2PKOQOG-BZ5b9Hv-.js +0 -24
  86. package/dist/core-dist/assets/ganttDiagram-JELNMOA3-OzgA9GJ4.js +0 -267
  87. package/dist/core-dist/assets/gitGraphDiagram-NY62KEGX-LfOuHeDw.js +0 -65
  88. package/dist/core-dist/assets/icons-DJrV7d9i.js +0 -1
  89. package/dist/core-dist/assets/index-C4atBwjx.js +0 -1
  90. package/dist/core-dist/assets/index-CS7mbTnV.js +0 -1
  91. package/dist/core-dist/assets/index-Ch8XtMo1.css +0 -1
  92. package/dist/core-dist/assets/index-DOupmzl0.js +0 -1
  93. package/dist/core-dist/assets/index-ERxh7PXo.js +0 -53
  94. package/dist/core-dist/assets/infoDiagram-WHAUD3N6-D4mcM6pw.js +0 -2
  95. package/dist/core-dist/assets/logs-BL7j4vCh.js +0 -1
  96. package/dist/core-dist/assets/runner-tab-C3nQeksP.js +0 -3
  97. package/dist/core-dist/assets/sankeyDiagram-TZEHDZUN-CUlo_r1v.js +0 -10
  98. package/dist/core-dist/assets/spinner-BESLBiEc.js +0 -1
  99. package/dist/core-dist/assets/stateDiagram-FKZM4ZOC-WlBCMI5F.js +0 -1
  100. package/dist/core-dist/assets/stateDiagram-v2-4FDKWEC3-CBo6ZLu7.js +0 -1
@@ -0,0 +1,36 @@
1
+ import{_ as dt,K as Be,ac as Ze,l as Re,b as ke,a as qe,q as Qe,t as Je,g as Ke,s as je,z as _e,F as tr,G as er,H as rr,c as ye,am as Ee,aG as ve,i as ir,d as ar,y as nr,aH as or,aI as sr}from"./mermaid.core-DmainLbW.js";import{p as hr}from"./chunk-4BX2VUAB-B3yeq0dh.js";import{p as lr}from"./treemap-KMMF4GRG-DLmWUMp8.js";import{c as Se}from"./cytoscape.esm-5J0xJHOV.js";import{g as fr}from"./icons-cLYU3CQS.js";import"./monaco-editor-BMj4E99D.js";import"./mermaid-VLURNSYL-BZBKtjwf.js";import"./radix-ui-d5EbBw33.js";import"./react-dom-BWKcCUTe.js";import"./tanstack-D5ysZnPZ.js";import"./index-Dq7-70tK.js";import"./scroll-area-NHyDhTA5.js";import"./index-pzKFI-Vs.js";import"./_pathlessLayout-J4rDhSFV.js";import"./queries.store-BqdJNevl.js";import"./min-Cs3I0vDk.js";import"./_baseUniq-BnS4oWxG.js";var se={exports:{}},he={exports:{}},le={exports:{}},cr=le.exports,Me;function gr(){return Me||(Me=1,(function(C,X){(function(G,N){C.exports=N()})(cr,function(){return(function(M){var G={};function N(d){if(G[d])return G[d].exports;var h=G[d]={i:d,l:!1,exports:{}};return M[d].call(h.exports,h,h.exports,N),h.l=!0,h.exports}return N.m=M,N.c=G,N.i=function(d){return d},N.d=function(d,h,a){N.o(d,h)||Object.defineProperty(d,h,{configurable:!1,enumerable:!0,get:a})},N.n=function(d){var h=d&&d.__esModule?function(){return d.default}:function(){return d};return N.d(h,"a",h),h},N.o=function(d,h){return Object.prototype.hasOwnProperty.call(d,h)},N.p="",N(N.s=28)})([(function(M,G,N){function d(){}d.QUALITY=1,d.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,d.DEFAULT_INCREMENTAL=!1,d.DEFAULT_ANIMATION_ON_LAYOUT=!0,d.DEFAULT_ANIMATION_DURING_LAYOUT=!1,d.DEFAULT_ANIMATION_PERIOD=50,d.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,d.DEFAULT_GRAPH_MARGIN=15,d.NODE_DIMENSIONS_INCLUDE_LABELS=!1,d.SIMPLE_NODE_SIZE=40,d.SIMPLE_NODE_HALF_SIZE=d.SIMPLE_NODE_SIZE/2,d.EMPTY_COMPOUND_NODE_SIZE=40,d.MIN_EDGE_LENGTH=1,d.WORLD_BOUNDARY=1e6,d.INITIAL_WORLD_BOUNDARY=d.WORLD_BOUNDARY/1e3,d.WORLD_CENTER_X=1200,d.WORLD_CENTER_Y=900,M.exports=d}),(function(M,G,N){var d=N(2),h=N(8),a=N(9);function e(l,i,u){d.call(this,u),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=u,this.bendpoints=[],this.source=l,this.target=i}e.prototype=Object.create(d.prototype);for(var r in d)e[r]=d[r];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.prototype.getOtherEnd=function(l){if(this.source===l)return this.target;if(this.target===l)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(l,i){for(var u=this.getOtherEnd(l),t=i.getGraphManager().getRoot();;){if(u.getOwner()==i)return u;if(u.getOwner()==t)break;u=u.getOwner().getParent()}return null},e.prototype.updateLength=function(){var l=new Array(4);this.isOverlapingSourceAndTarget=h.getIntersection(this.target.getRect(),this.source.getRect(),l),this.isOverlapingSourceAndTarget||(this.lengthX=l[0]-l[2],this.lengthY=l[1]-l[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},M.exports=e}),(function(M,G,N){function d(h){this.vGraphObject=h}M.exports=d}),(function(M,G,N){var d=N(2),h=N(10),a=N(13),e=N(0),r=N(16),l=N(5);function i(t,o,s,c){s==null&&c==null&&(c=o),d.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,s!=null&&o!=null?this.rect=new a(o.x,o.y,s.width,s.height):this.rect=new a}i.prototype=Object.create(d.prototype);for(var u in d)i[u]=d[u];i.prototype.getEdges=function(){return this.edges},i.prototype.getChild=function(){return this.child},i.prototype.getOwner=function(){return this.owner},i.prototype.getWidth=function(){return this.rect.width},i.prototype.setWidth=function(t){this.rect.width=t},i.prototype.getHeight=function(){return this.rect.height},i.prototype.setHeight=function(t){this.rect.height=t},i.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},i.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},i.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},i.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},i.prototype.getRect=function(){return this.rect},i.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},i.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},i.prototype.setRect=function(t,o){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=o.width,this.rect.height=o.height},i.prototype.setCenter=function(t,o){this.rect.x=t-this.rect.width/2,this.rect.y=o-this.rect.height/2},i.prototype.setLocation=function(t,o){this.rect.x=t,this.rect.y=o},i.prototype.moveBy=function(t,o){this.rect.x+=t,this.rect.y+=o},i.prototype.getEdgeListToNode=function(t){var o=[],s=this;return s.edges.forEach(function(c){if(c.target==t){if(c.source!=s)throw"Incorrect edge source!";o.push(c)}}),o},i.prototype.getEdgesBetween=function(t){var o=[],s=this;return s.edges.forEach(function(c){if(!(c.source==s||c.target==s))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&o.push(c)}),o},i.prototype.getNeighborsList=function(){var t=new Set,o=this;return o.edges.forEach(function(s){if(s.source==o)t.add(s.target);else{if(s.target!=o)throw"Incorrect incidency!";t.add(s.source)}}),t},i.prototype.withChildren=function(){var t=new Set,o,s;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),f=0;f<c.length;f++)o=c[f],s=o.withChildren(),s.forEach(function(T){t.add(T)});return t},i.prototype.getNoOfChildren=function(){var t=0,o;if(this.child==null)t=1;else for(var s=this.child.getNodes(),c=0;c<s.length;c++)o=s[c],t+=o.getNoOfChildren();return t==0&&(t=1),t},i.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},i.prototype.calcEstimatedSize=function(){return this.child==null?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)},i.prototype.scatter=function(){var t,o,s=-e.INITIAL_WORLD_BOUNDARY,c=e.INITIAL_WORLD_BOUNDARY;t=e.WORLD_CENTER_X+r.nextDouble()*(c-s)+s;var f=-e.INITIAL_WORLD_BOUNDARY,T=e.INITIAL_WORLD_BOUNDARY;o=e.WORLD_CENTER_Y+r.nextDouble()*(T-f)+f,this.rect.x=t,this.rect.y=o},i.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){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()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var o=t.getRight()-t.getLeft(),s=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(o+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>o?(this.rect.x-=(this.labelWidth-o)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(o+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(s+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>s?(this.rect.y-=(this.labelHeight-s)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(s+this.labelHeight))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(t){var o=this.rect.x;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var s=this.rect.y;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var c=new l(o,s),f=t.inverseTransformPoint(c);this.setLocation(f.x,f.y)},i.prototype.getLeft=function(){return this.rect.x},i.prototype.getRight=function(){return this.rect.x+this.rect.width},i.prototype.getTop=function(){return this.rect.y},i.prototype.getBottom=function(){return this.rect.y+this.rect.height},i.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},M.exports=i}),(function(M,G,N){var d=N(0);function h(){}for(var a in d)h[a]=d[a];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,M.exports=h}),(function(M,G,N){function d(h,a){h==null&&a==null?(this.x=0,this.y=0):(this.x=h,this.y=a)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.setX=function(h){this.x=h},d.prototype.setY=function(h){this.y=h},d.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},d.prototype.getCopy=function(){return new d(this.x,this.y)},d.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},M.exports=d}),(function(M,G,N){var d=N(2),h=N(10),a=N(0),e=N(7),r=N(3),l=N(1),i=N(13),u=N(12),t=N(11);function o(c,f,T){d.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,f!=null&&f instanceof e?this.graphManager=f:f!=null&&f instanceof Layout&&(this.graphManager=f.graphManager)}o.prototype=Object.create(d.prototype);for(var s in d)o[s]=d[s];o.prototype.getNodes=function(){return this.nodes},o.prototype.getEdges=function(){return this.edges},o.prototype.getGraphManager=function(){return this.graphManager},o.prototype.getParent=function(){return this.parent},o.prototype.getLeft=function(){return this.left},o.prototype.getRight=function(){return this.right},o.prototype.getTop=function(){return this.top},o.prototype.getBottom=function(){return this.bottom},o.prototype.isConnected=function(){return this.isConnected},o.prototype.add=function(c,f,T){if(f==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var v=c;if(!(this.getNodes().indexOf(f)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(f.owner==T.owner&&f.owner==this))throw"Both owners must be this graph!";return f.owner!=T.owner?null:(v.source=f,v.target=T,v.isInterGraph=!1,this.getEdges().push(v),f.edges.push(v),T!=f&&T.edges.push(v),v)}},o.prototype.remove=function(c){var f=c;if(c instanceof r){if(f==null)throw"Node is null!";if(!(f.owner!=null&&f.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=f.edges.slice(),g,v=T.length,L=0;L<v;L++)g=T[L],g.isInterGraph?this.graphManager.remove(g):g.source.owner.remove(g);var F=this.nodes.indexOf(f);if(F==-1)throw"Node not in owner node list!";this.nodes.splice(F,1)}else if(c instanceof l){var g=c;if(g==null)throw"Edge is null!";if(!(g.source!=null&&g.target!=null))throw"Source and/or target is null!";if(!(g.source.owner!=null&&g.target.owner!=null&&g.source.owner==this&&g.target.owner==this))throw"Source and/or target owner is invalid!";var A=g.source.edges.indexOf(g),b=g.target.edges.indexOf(g);if(!(A>-1&&b>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(A,1),g.target!=g.source&&g.target.edges.splice(b,1);var F=g.source.owner.getEdges().indexOf(g);if(F==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(F,1)}},o.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,f=h.MAX_VALUE,T,g,v,L=this.getNodes(),F=L.length,A=0;A<F;A++){var b=L[A];T=b.getTop(),g=b.getLeft(),c>T&&(c=T),f>g&&(f=g)}return c==h.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?v=L[0].getParent().paddingLeft:v=this.margin,this.left=f-v,this.top=c-v,new u(this.left,this.top))},o.prototype.updateBounds=function(c){for(var f=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,v=-h.MAX_VALUE,L,F,A,b,k,U=this.nodes,K=U.length,D=0;D<K;D++){var it=U[D];c&&it.child!=null&&it.updateBounds(),L=it.getLeft(),F=it.getRight(),A=it.getTop(),b=it.getBottom(),f>L&&(f=L),T<F&&(T=F),g>A&&(g=A),v<b&&(v=b)}var n=new i(f,g,T-f,v-g);f==h.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),U[0].getParent().paddingLeft!=null?k=U[0].getParent().paddingLeft:k=this.margin,this.left=n.x-k,this.right=n.x+n.width+k,this.top=n.y-k,this.bottom=n.y+n.height+k},o.calculateBounds=function(c){for(var f=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,v=-h.MAX_VALUE,L,F,A,b,k=c.length,U=0;U<k;U++){var K=c[U];L=K.getLeft(),F=K.getRight(),A=K.getTop(),b=K.getBottom(),f>L&&(f=L),T<F&&(T=F),g>A&&(g=A),v<b&&(v=b)}var D=new i(f,g,T-f,v-g);return D},o.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},o.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},o.prototype.calcEstimatedSize=function(){for(var c=0,f=this.nodes,T=f.length,g=0;g<T;g++){var v=f[g];c+=v.calcEstimatedSize()}return c==0?this.estimatedSize=a.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=c/Math.sqrt(this.nodes.length),this.estimatedSize},o.prototype.updateConnected=function(){var c=this;if(this.nodes.length==0){this.isConnected=!0;return}var f=new t,T=new Set,g=this.nodes[0],v,L,F=g.withChildren();for(F.forEach(function(D){f.push(D),T.add(D)});f.length!==0;){g=f.shift(),v=g.getEdges();for(var A=v.length,b=0;b<A;b++){var k=v[b];if(L=k.getOtherEndInGraph(g,this),L!=null&&!T.has(L)){var U=L.withChildren();U.forEach(function(D){f.push(D),T.add(D)})}}}if(this.isConnected=!1,T.size>=this.nodes.length){var K=0;T.forEach(function(D){D.owner==c&&K++}),K==this.nodes.length&&(this.isConnected=!0)}},M.exports=o}),(function(M,G,N){var d,h=N(1);function a(e){d=N(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),r=this.layout.newNode(null),l=this.add(e,r);return this.setRootGraph(l),this.rootGraph},a.prototype.add=function(e,r,l,i,u){if(l==null&&i==null&&u==null){if(e==null)throw"Graph is null!";if(r==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(r.child!=null)throw"Already has a child!";return e.parent=r,r.child=e,e}else{u=l,i=r,l=e;var t=i.getOwner(),o=u.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(o!=null&&o.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==o)return l.isInterGraph=!1,t.add(l,i,u);if(l.isInterGraph=!0,l.source=i,l.target=u,this.edges.indexOf(l)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(l),!(l.source!=null&&l.target!=null))throw"Edge source and/or target is null!";if(!(l.source.edges.indexOf(l)==-1&&l.target.edges.indexOf(l)==-1))throw"Edge already in source and/or target incidency list!";return l.source.edges.push(l),l.target.edges.push(l),l}},a.prototype.remove=function(e){if(e instanceof d){var r=e;if(r.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(r==this.rootGraph||r.parent!=null&&r.parent.graphManager==this))throw"Invalid parent node!";var l=[];l=l.concat(r.getEdges());for(var i,u=l.length,t=0;t<u;t++)i=l[t],r.remove(i);var o=[];o=o.concat(r.getNodes());var s;u=o.length;for(var t=0;t<u;t++)s=o[t],r.remove(s);r==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(r);this.graphs.splice(c,1),r.parent=null}else if(e instanceof h){if(i=e,i==null)throw"Edge is null!";if(!i.isInterGraph)throw"Not an inter-graph edge!";if(!(i.source!=null&&i.target!=null))throw"Source and/or target is null!";if(!(i.source.edges.indexOf(i)!=-1&&i.target.edges.indexOf(i)!=-1))throw"Source and/or target doesn't know this edge!";var c=i.source.edges.indexOf(i);if(i.source.edges.splice(c,1),c=i.target.edges.indexOf(i),i.target.edges.splice(c,1),!(i.source.owner!=null&&i.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(i.source.owner.getGraphManager().edges.indexOf(i)==-1)throw"Not in owner graph manager's edge list!";var c=i.source.owner.getGraphManager().edges.indexOf(i);i.source.owner.getGraphManager().edges.splice(c,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],r=this.getGraphs(),l=r.length,i=0;i<l;i++)e=e.concat(r[i].getNodes());this.allNodes=e}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],r=this.getGraphs();r.length;for(var l=0;l<r.length;l++)e=e.concat(r[l].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=e,e.parent==null&&(e.parent=this.layout.newNode("Root node"))},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(e,r){if(!(e!=null&&r!=null))throw"assert failed";if(e==r)return!0;var l=e.getOwner(),i;do{if(i=l.getParent(),i==null)break;if(i==r)return!0;if(l=i.getOwner(),l==null)break}while(!0);l=r.getOwner();do{if(i=l.getParent(),i==null)break;if(i==e)return!0;if(l=i.getOwner(),l==null)break}while(!0);return!1},a.prototype.calcLowestCommonAncestors=function(){for(var e,r,l,i,u,t=this.getAllEdges(),o=t.length,s=0;s<o;s++){if(e=t[s],r=e.source,l=e.target,e.lca=null,e.sourceInLca=r,e.targetInLca=l,r==l){e.lca=r.getOwner();continue}for(i=r.getOwner();e.lca==null;){for(e.targetInLca=l,u=l.getOwner();e.lca==null;){if(u==i){e.lca=u;break}if(u==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=u.getParent(),u=e.targetInLca.getOwner()}if(i==this.rootGraph)break;e.lca==null&&(e.sourceInLca=i.getParent(),i=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}},a.prototype.calcLowestCommonAncestor=function(e,r){if(e==r)return e.getOwner();var l=e.getOwner();do{if(l==null)break;var i=r.getOwner();do{if(i==null)break;if(i==l)return i;i=i.getParent().getOwner()}while(!0);l=l.getParent().getOwner()}while(!0);return l},a.prototype.calcInclusionTreeDepths=function(e,r){e==null&&r==null&&(e=this.rootGraph,r=1);for(var l,i=e.getNodes(),u=i.length,t=0;t<u;t++)l=i[t],l.inclusionTreeDepth=r,l.child!=null&&this.calcInclusionTreeDepths(l.child,r+1)},a.prototype.includesInvalidEdge=function(){for(var e,r=[],l=this.edges.length,i=0;i<l;i++)e=this.edges[i],this.isOneAncestorOfOther(e.source,e.target)&&r.push(e);for(var i=0;i<r.length;i++)this.remove(r[i]);return!1},M.exports=a}),(function(M,G,N){var d=N(12);function h(){}h.calcSeparationAmount=function(a,e,r,l){if(!a.intersects(e))throw"assert failed";var i=new Array(2);this.decideDirectionsForOverlappingNodes(a,e,i),r[0]=Math.min(a.getRight(),e.getRight())-Math.max(a.x,e.x),r[1]=Math.min(a.getBottom(),e.getBottom())-Math.max(a.y,e.y),a.getX()<=e.getX()&&a.getRight()>=e.getRight()?r[0]+=Math.min(e.getX()-a.getX(),a.getRight()-e.getRight()):e.getX()<=a.getX()&&e.getRight()>=a.getRight()&&(r[0]+=Math.min(a.getX()-e.getX(),e.getRight()-a.getRight())),a.getY()<=e.getY()&&a.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-a.getY(),a.getBottom()-e.getBottom()):e.getY()<=a.getY()&&e.getBottom()>=a.getBottom()&&(r[1]+=Math.min(a.getY()-e.getY(),e.getBottom()-a.getBottom()));var u=Math.abs((e.getCenterY()-a.getCenterY())/(e.getCenterX()-a.getCenterX()));e.getCenterY()===a.getCenterY()&&e.getCenterX()===a.getCenterX()&&(u=1);var t=u*r[0],o=r[1]/u;r[0]<o?o=r[0]:t=r[1],r[0]=-1*i[0]*(o/2+l),r[1]=-1*i[1]*(t/2+l)},h.decideDirectionsForOverlappingNodes=function(a,e,r){a.getCenterX()<e.getCenterX()?r[0]=-1:r[0]=1,a.getCenterY()<e.getCenterY()?r[1]=-1:r[1]=1},h.getIntersection2=function(a,e,r){var l=a.getCenterX(),i=a.getCenterY(),u=e.getCenterX(),t=e.getCenterY();if(a.intersects(e))return r[0]=l,r[1]=i,r[2]=u,r[3]=t,!0;var o=a.getX(),s=a.getY(),c=a.getRight(),f=a.getX(),T=a.getBottom(),g=a.getRight(),v=a.getWidthHalf(),L=a.getHeightHalf(),F=e.getX(),A=e.getY(),b=e.getRight(),k=e.getX(),U=e.getBottom(),K=e.getRight(),D=e.getWidthHalf(),it=e.getHeightHalf(),n=!1,m=!1;if(l===u){if(i>t)return r[0]=l,r[1]=s,r[2]=u,r[3]=U,!1;if(i<t)return r[0]=l,r[1]=T,r[2]=u,r[3]=A,!1}else if(i===t){if(l>u)return r[0]=o,r[1]=i,r[2]=b,r[3]=t,!1;if(l<u)return r[0]=c,r[1]=i,r[2]=F,r[3]=t,!1}else{var p=a.height/a.width,E=e.height/e.width,y=(t-i)/(u-l),I=void 0,w=void 0,R=void 0,W=void 0,x=void 0,q=void 0;if(-p===y?l>u?(r[0]=f,r[1]=T,n=!0):(r[0]=c,r[1]=s,n=!0):p===y&&(l>u?(r[0]=o,r[1]=s,n=!0):(r[0]=g,r[1]=T,n=!0)),-E===y?u>l?(r[2]=k,r[3]=U,m=!0):(r[2]=b,r[3]=A,m=!0):E===y&&(u>l?(r[2]=F,r[3]=A,m=!0):(r[2]=K,r[3]=U,m=!0)),n&&m)return!1;if(l>u?i>t?(I=this.getCardinalDirection(p,y,4),w=this.getCardinalDirection(E,y,2)):(I=this.getCardinalDirection(-p,y,3),w=this.getCardinalDirection(-E,y,1)):i>t?(I=this.getCardinalDirection(-p,y,1),w=this.getCardinalDirection(-E,y,3)):(I=this.getCardinalDirection(p,y,2),w=this.getCardinalDirection(E,y,4)),!n)switch(I){case 1:W=s,R=l+-L/y,r[0]=R,r[1]=W;break;case 2:R=g,W=i+v*y,r[0]=R,r[1]=W;break;case 3:W=T,R=l+L/y,r[0]=R,r[1]=W;break;case 4:R=f,W=i+-v*y,r[0]=R,r[1]=W;break}if(!m)switch(w){case 1:q=A,x=u+-it/y,r[2]=x,r[3]=q;break;case 2:x=K,q=t+D*y,r[2]=x,r[3]=q;break;case 3:q=U,x=u+it/y,r[2]=x,r[3]=q;break;case 4:x=k,q=t+-D*y,r[2]=x,r[3]=q;break}}return!1},h.getCardinalDirection=function(a,e,r){return a>e?r:1+r%4},h.getIntersection=function(a,e,r,l){if(l==null)return this.getIntersection2(a,e,r);var i=a.x,u=a.y,t=e.x,o=e.y,s=r.x,c=r.y,f=l.x,T=l.y,g=void 0,v=void 0,L=void 0,F=void 0,A=void 0,b=void 0,k=void 0,U=void 0,K=void 0;return L=o-u,A=i-t,k=t*u-i*o,F=T-c,b=s-f,U=f*c-s*T,K=L*b-F*A,K===0?null:(g=(A*U-b*k)/K,v=(F*k-L*U)/K,new d(g,v))},h.angleOfVector=function(a,e,r,l){var i=void 0;return a!==r?(i=Math.atan((l-e)/(r-a)),r<a?i+=Math.PI:l<e&&(i+=this.TWO_PI)):l<e?i=this.ONE_AND_HALF_PI:i=this.HALF_PI,i},h.doIntersect=function(a,e,r,l){var i=a.x,u=a.y,t=e.x,o=e.y,s=r.x,c=r.y,f=l.x,T=l.y,g=(t-i)*(T-c)-(f-s)*(o-u);if(g===0)return!1;var v=((T-c)*(f-i)+(s-f)*(T-u))/g,L=((u-o)*(f-i)+(t-i)*(T-u))/g;return 0<v&&v<1&&0<L&&L<1},h.findCircleLineIntersections=function(a,e,r,l,i,u,t){var o=(r-a)*(r-a)+(l-e)*(l-e),s=2*((a-i)*(r-a)+(e-u)*(l-e)),c=(a-i)*(a-i)+(e-u)*(e-u)-t*t,f=s*s-4*o*c;if(f>=0){var T=(-s+Math.sqrt(s*s-4*o*c))/(2*o),g=(-s-Math.sqrt(s*s-4*o*c))/(2*o),v=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:v}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,M.exports=h}),(function(M,G,N){function d(){}d.sign=function(h){return h>0?1:h<0?-1:0},d.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},d.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},M.exports=d}),(function(M,G,N){function d(){}d.MAX_VALUE=2147483647,d.MIN_VALUE=-2147483648,M.exports=d}),(function(M,G,N){var d=(function(){function i(u,t){for(var o=0;o<t.length;o++){var s=t[o];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(u,s.key,s)}}return function(u,t,o){return t&&i(u.prototype,t),o&&i(u,o),u}})();function h(i,u){if(!(i instanceof u))throw new TypeError("Cannot call a class as a function")}var a=function(u){return{value:u,next:null,prev:null}},e=function(u,t,o,s){return u!==null?u.next=t:s.head=t,o!==null?o.prev=t:s.tail=t,t.prev=u,t.next=o,s.length++,t},r=function(u,t){var o=u.prev,s=u.next;return o!==null?o.next=s:t.head=s,s!==null?s.prev=o:t.tail=o,u.prev=u.next=null,t.length--,u},l=(function(){function i(u){var t=this;h(this,i),this.length=0,this.head=null,this.tail=null,u?.forEach(function(o){return t.push(o)})}return d(i,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,o){return e(o.prev,a(t),o,this)}},{key:"insertAfter",value:function(t,o){return e(o,a(t),o.next,this)}},{key:"insertNodeBefore",value:function(t,o){return e(o.prev,t,o,this)}},{key:"insertNodeAfter",value:function(t,o){return e(o,t,o.next,this)}},{key:"push",value:function(t){return e(this.tail,a(t),null,this)}},{key:"unshift",value:function(t){return e(null,a(t),this.head,this)}},{key:"remove",value:function(t){return r(t,this)}},{key:"pop",value:function(){return r(this.tail,this).value}},{key:"popNode",value:function(){return r(this.tail,this)}},{key:"shift",value:function(){return r(this.head,this).value}},{key:"shiftNode",value:function(){return r(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var o=1,s=this.head;o<t;)s=s.next,o++;return s.value}}},{key:"set_object_at",value:function(t,o){if(t<=this.length()){for(var s=1,c=this.head;s<t;)c=c.next,s++;c.value=o}}}]),i})();M.exports=l}),(function(M,G,N){function d(h,a,e){this.x=null,this.y=null,h==null&&a==null&&e==null?(this.x=0,this.y=0):typeof h=="number"&&typeof a=="number"&&e==null?(this.x=h,this.y=a):h.constructor.name=="Point"&&a==null&&e==null&&(e=h,this.x=e.x,this.y=e.y)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.getLocation=function(){return new d(this.x,this.y)},d.prototype.setLocation=function(h,a,e){h.constructor.name=="Point"&&a==null&&e==null?(e=h,this.setLocation(e.x,e.y)):typeof h=="number"&&typeof a=="number"&&e==null&&(parseInt(h)==h&&parseInt(a)==a?this.move(h,a):(this.x=Math.floor(h+.5),this.y=Math.floor(a+.5)))},d.prototype.move=function(h,a){this.x=h,this.y=a},d.prototype.translate=function(h,a){this.x+=h,this.y+=a},d.prototype.equals=function(h){if(h.constructor.name=="Point"){var a=h;return this.x==a.x&&this.y==a.y}return this==h},d.prototype.toString=function(){return new d().constructor.name+"[x="+this.x+",y="+this.y+"]"},M.exports=d}),(function(M,G,N){function d(h,a,e,r){this.x=0,this.y=0,this.width=0,this.height=0,h!=null&&a!=null&&e!=null&&r!=null&&(this.x=h,this.y=a,this.width=e,this.height=r)}d.prototype.getX=function(){return this.x},d.prototype.setX=function(h){this.x=h},d.prototype.getY=function(){return this.y},d.prototype.setY=function(h){this.y=h},d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(h){this.width=h},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(h){this.height=h},d.prototype.getRight=function(){return this.x+this.width},d.prototype.getBottom=function(){return this.y+this.height},d.prototype.intersects=function(h){return!(this.getRight()<h.x||this.getBottom()<h.y||h.getRight()<this.x||h.getBottom()<this.y)},d.prototype.getCenterX=function(){return this.x+this.width/2},d.prototype.getMinX=function(){return this.getX()},d.prototype.getMaxX=function(){return this.getX()+this.width},d.prototype.getCenterY=function(){return this.y+this.height/2},d.prototype.getMinY=function(){return this.getY()},d.prototype.getMaxY=function(){return this.getY()+this.height},d.prototype.getWidthHalf=function(){return this.width/2},d.prototype.getHeightHalf=function(){return this.height/2},M.exports=d}),(function(M,G,N){var d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};function h(){}h.lastID=0,h.createID=function(a){return h.isPrimitive(a)?a:(a.uniqueID!=null||(a.uniqueID=h.getString(),h.lastID++),a.uniqueID)},h.getString=function(a){return a==null&&(a=h.lastID),"Object#"+a},h.isPrimitive=function(a){var e=typeof a>"u"?"undefined":d(a);return a==null||e!="object"&&e!="function"},M.exports=h}),(function(M,G,N){function d(s){if(Array.isArray(s)){for(var c=0,f=Array(s.length);c<s.length;c++)f[c]=s[c];return f}else return Array.from(s)}var h=N(0),a=N(7),e=N(3),r=N(1),l=N(6),i=N(5),u=N(17),t=N(29);function o(s){t.call(this),this.layoutQuality=h.QUALITY,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=h.DEFAULT_INCREMENTAL,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,s!=null&&(this.isRemoteUse=s)}o.RANDOM_SEED=1,o.prototype=Object.create(t.prototype),o.prototype.getGraphManager=function(){return this.graphManager},o.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},o.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},o.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},o.prototype.newGraphManager=function(){var s=new a(this);return this.graphManager=s,s},o.prototype.newGraph=function(s){return new l(null,this.graphManager,s)},o.prototype.newNode=function(s){return new e(this.graphManager,s)},o.prototype.newEdge=function(s){return new r(null,null,s)},o.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},o.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var s;return this.checkLayoutSuccess()?s=!1:s=this.layout(),h.ANIMATE==="during"?!1:(s&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,s)},o.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},o.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var s=this.graphManager.getAllEdges(),c=0;c<s.length;c++)s[c];for(var f=this.graphManager.getRoot().getNodes(),c=0;c<f.length;c++)f[c];this.update(this.graphManager.getRoot())}},o.prototype.update=function(s){if(s==null)this.update2();else if(s instanceof e){var c=s;if(c.getChild()!=null)for(var f=c.getChild().getNodes(),T=0;T<f.length;T++)update(f[T]);if(c.vGraphObject!=null){var g=c.vGraphObject;g.update(c)}}else if(s instanceof r){var v=s;if(v.vGraphObject!=null){var L=v.vGraphObject;L.update(v)}}else if(s instanceof l){var F=s;if(F.vGraphObject!=null){var A=F.vGraphObject;A.update(F)}}},o.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=h.QUALITY,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=h.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},o.prototype.transform=function(s){if(s==null)this.transform(new i(0,0));else{var c=new u,f=this.graphManager.getRoot().updateLeftTop();if(f!=null){c.setWorldOrgX(s.x),c.setWorldOrgY(s.y),c.setDeviceOrgX(f.x),c.setDeviceOrgY(f.y);for(var T=this.getAllNodes(),g,v=0;v<T.length;v++)g=T[v],g.transform(c)}}},o.prototype.positionNodesRandomly=function(s){if(s==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var c,f,T=s.getNodes(),g=0;g<T.length;g++)c=T[g],f=c.getChild(),f==null||f.getNodes().length==0?c.scatter():(this.positionNodesRandomly(f),c.updateBounds())},o.prototype.getFlatForest=function(){for(var s=[],c=!0,f=this.graphManager.getRoot().getNodes(),T=!0,g=0;g<f.length;g++)f[g].getChild()!=null&&(T=!1);if(!T)return s;var v=new Set,L=[],F=new Map,A=[];for(A=A.concat(f);A.length>0&&c;){for(L.push(A[0]);L.length>0&&c;){var b=L[0];L.splice(0,1),v.add(b);for(var k=b.getEdges(),g=0;g<k.length;g++){var U=k[g].getOtherEnd(b);if(F.get(b)!=U)if(!v.has(U))L.push(U),F.set(U,b);else{c=!1;break}}}if(!c)s=[];else{var K=[].concat(d(v));s.push(K);for(var g=0;g<K.length;g++){var D=K[g],it=A.indexOf(D);it>-1&&A.splice(it,1)}v=new Set,F=new Map}}return s},o.prototype.createDummyNodesForBendpoints=function(s){for(var c=[],f=s.source,T=this.graphManager.calcLowestCommonAncestor(s.source,s.target),g=0;g<s.bendpoints.length;g++){var v=this.newNode(null);v.setRect(new Point(0,0),new Dimension(1,1)),T.add(v);var L=this.newEdge(null);this.graphManager.add(L,f,v),c.add(v),f=v}var L=this.newEdge(null);return this.graphManager.add(L,f,s.target),this.edgeToDummyNodes.set(s,c),s.isInterGraph()?this.graphManager.remove(s):T.remove(s),c},o.prototype.createBendpointsFromDummyNodes=function(){var s=[];s=s.concat(this.graphManager.getAllEdges()),s=[].concat(d(this.edgeToDummyNodes.keys())).concat(s);for(var c=0;c<s.length;c++){var f=s[c];if(f.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(f),g=0;g<T.length;g++){var v=T[g],L=new i(v.getCenterX(),v.getCenterY()),F=f.bendpoints.get(g);F.x=L.x,F.y=L.y,v.getOwner().remove(v)}this.graphManager.add(f,f.source,f.target)}}},o.transform=function(s,c,f,T){if(f!=null&&T!=null){var g=c;if(s<=50){var v=c/f;g-=(c-v)/50*(50-s)}else{var L=c*T;g+=(L-c)/50*(s-50)}return g}else{var F,A;return s<=50?(F=9*c/500,A=c/10):(F=9*c/50,A=-8*c),F*s+A}},o.findCenterOfTree=function(s){var c=[];c=c.concat(s);var f=[],T=new Map,g=!1,v=null;(c.length==1||c.length==2)&&(g=!0,v=c[0]);for(var L=0;L<c.length;L++){var F=c[L],A=F.getNeighborsList().size;T.set(F,F.getNeighborsList().size),A==1&&f.push(F)}var b=[];for(b=b.concat(f);!g;){var k=[];k=k.concat(b),b=[];for(var L=0;L<c.length;L++){var F=c[L],U=c.indexOf(F);U>=0&&c.splice(U,1);var K=F.getNeighborsList();K.forEach(function(n){if(f.indexOf(n)<0){var m=T.get(n),p=m-1;p==1&&b.push(n),T.set(n,p)}})}f=f.concat(b),(c.length==1||c.length==2)&&(g=!0,v=c[0])}return v},o.prototype.setGraphManager=function(s){this.graphManager=s},M.exports=o}),(function(M,G,N){function d(){}d.seed=1,d.x=0,d.nextDouble=function(){return d.x=Math.sin(d.seed++)*1e4,d.x-Math.floor(d.x)},M.exports=d}),(function(M,G,N){var d=N(5);function h(a,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}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(a){this.lworldExtX=a},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(a){this.lworldExtY=a},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},h.prototype.transformX=function(a){var e=0,r=this.lworldExtX;return r!=0&&(e=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/r),e},h.prototype.transformY=function(a){var e=0,r=this.lworldExtY;return r!=0&&(e=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/r),e},h.prototype.inverseTransformX=function(a){var e=0,r=this.ldeviceExtX;return r!=0&&(e=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/r),e},h.prototype.inverseTransformY=function(a){var e=0,r=this.ldeviceExtY;return r!=0&&(e=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/r),e},h.prototype.inverseTransformPoint=function(a){var e=new d(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return e},M.exports=h}),(function(M,G,N){function d(t){if(Array.isArray(t)){for(var o=0,s=Array(t.length);o<t.length;o++)s[o]=t[o];return s}else return Array.from(t)}var h=N(15),a=N(4),e=N(0),r=N(8),l=N(9);function i(){h.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS}i.prototype=Object.create(h.prototype);for(var u in h)i[u]=h[u];i.prototype.initParameters=function(){h.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},i.prototype.calcIdealEdgeLengths=function(){for(var t,o,s,c,f,T,g,v=this.getGraphManager().getAllEdges(),L=0;L<v.length;L++)t=v[L],o=t.idealLength,t.isInterGraph&&(c=t.getSource(),f=t.getTarget(),T=t.getSourceInLca().getEstimatedSize(),g=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=T+g-2*e.SIMPLE_NODE_SIZE),s=t.getLca().getInclusionTreeDepth(),t.idealLength+=o*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+f.getInclusionTreeDepth()-2*s))},i.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),o,s=0;s<t.length;s++)o=t[s],this.calcSpringForce(o,o.idealLength)},i.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s,c,f,T,g=this.getAllNodes(),v;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),v=new Set,s=0;s<g.length;s++)f=g[s],this.calculateRepulsionForceOfANode(f,v,t,o),v.add(f);else for(s=0;s<g.length;s++)for(f=g[s],c=s+1;c<g.length;c++)T=g[c],f.getOwner()==T.getOwner()&&this.calcRepulsionForce(f,T)},i.prototype.calcGravitationalForces=function(){for(var t,o=this.getAllNodesToApplyGravitation(),s=0;s<o.length;s++)t=o[s],this.calcGravitationalForce(t)},i.prototype.moveNodes=function(){for(var t=this.getAllNodes(),o,s=0;s<t.length;s++)o=t[s],o.move()},i.prototype.calcSpringForce=function(t,o){var s=t.getSource(),c=t.getTarget(),f,T,g,v;if(this.uniformLeafNodeSizes&&s.getChild()==null&&c.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;f=t.getLength(),f!=0&&(T=t.edgeElasticity*(f-o),g=T*(t.lengthX/f),v=T*(t.lengthY/f),s.springForceX+=g,s.springForceY+=v,c.springForceX-=g,c.springForceY-=v)},i.prototype.calcRepulsionForce=function(t,o){var s=t.getRect(),c=o.getRect(),f=new Array(2),T=new Array(4),g,v,L,F,A,b,k;if(s.intersects(c)){r.calcSeparationAmount(s,c,f,a.DEFAULT_EDGE_LENGTH/2),b=2*f[0],k=2*f[1];var U=t.noOfChildren*o.noOfChildren/(t.noOfChildren+o.noOfChildren);t.repulsionForceX-=U*b,t.repulsionForceY-=U*k,o.repulsionForceX+=U*b,o.repulsionForceY+=U*k}else this.uniformLeafNodeSizes&&t.getChild()==null&&o.getChild()==null?(g=c.getCenterX()-s.getCenterX(),v=c.getCenterY()-s.getCenterY()):(r.getIntersection(s,c,T),g=T[2]-T[0],v=T[3]-T[1]),Math.abs(g)<a.MIN_REPULSION_DIST&&(g=l.sign(g)*a.MIN_REPULSION_DIST),Math.abs(v)<a.MIN_REPULSION_DIST&&(v=l.sign(v)*a.MIN_REPULSION_DIST),L=g*g+v*v,F=Math.sqrt(L),A=(t.nodeRepulsion/2+o.nodeRepulsion/2)*t.noOfChildren*o.noOfChildren/L,b=A*g/F,k=A*v/F,t.repulsionForceX-=b,t.repulsionForceY-=k,o.repulsionForceX+=b,o.repulsionForceY+=k},i.prototype.calcGravitationalForce=function(t){var o,s,c,f,T,g,v,L;o=t.getOwner(),s=(o.getRight()+o.getLeft())/2,c=(o.getTop()+o.getBottom())/2,f=t.getCenterX()-s,T=t.getCenterY()-c,g=Math.abs(f)+t.getWidth()/2,v=Math.abs(T)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(L=o.getEstimatedSize()*this.gravityRangeFactor,(g>L||v>L)&&(t.gravitationForceX=-this.gravityConstant*f,t.gravitationForceY=-this.gravityConstant*T)):(L=o.getEstimatedSize()*this.compoundGravityRangeFactor,(g>L||v>L)&&(t.gravitationForceX=-this.gravityConstant*f*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},i.prototype.isConverged=function(){var t,o=!1;return this.totalIterations>this.maxIterations/3&&(o=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||o},i.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},i.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,o=this.graphManager.getAllNodes(),s=0;s<o.length;s++)t=o[s],t.noOfChildren=t.getNoOfChildren()},i.prototype.calcGrid=function(t){var o=0,s=0;o=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),s=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var c=new Array(o),f=0;f<o;f++)c[f]=new Array(s);for(var f=0;f<o;f++)for(var T=0;T<s;T++)c[f][T]=new Array;return c},i.prototype.addNodeToGrid=function(t,o,s){var c=0,f=0,T=0,g=0;c=parseInt(Math.floor((t.getRect().x-o)/this.repulsionRange)),f=parseInt(Math.floor((t.getRect().width+t.getRect().x-o)/this.repulsionRange)),T=parseInt(Math.floor((t.getRect().y-s)/this.repulsionRange)),g=parseInt(Math.floor((t.getRect().height+t.getRect().y-s)/this.repulsionRange));for(var v=c;v<=f;v++)for(var L=T;L<=g;L++)this.grid[v][L].push(t),t.setGridCoordinates(c,f,T,g)},i.prototype.updateGrid=function(){var t,o,s=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<s.length;t++)o=s[t],this.addNodeToGrid(o,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},i.prototype.calculateRepulsionForceOfANode=function(t,o,s,c){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&s||c){var f=new Set;t.surrounding=new Array;for(var T,g=this.grid,v=t.startX-1;v<t.finishX+2;v++)for(var L=t.startY-1;L<t.finishY+2;L++)if(!(v<0||L<0||v>=g.length||L>=g[0].length)){for(var F=0;F<g[v][L].length;F++)if(T=g[v][L][F],!(t.getOwner()!=T.getOwner()||t==T)&&!o.has(T)&&!f.has(T)){var A=Math.abs(t.getCenterX()-T.getCenterX())-(t.getWidth()/2+T.getWidth()/2),b=Math.abs(t.getCenterY()-T.getCenterY())-(t.getHeight()/2+T.getHeight()/2);A<=this.repulsionRange&&b<=this.repulsionRange&&f.add(T)}}t.surrounding=[].concat(d(f))}for(v=0;v<t.surrounding.length;v++)this.calcRepulsionForce(t,t.surrounding[v])},i.prototype.calcRepulsionRange=function(){return 0},M.exports=i}),(function(M,G,N){var d=N(1),h=N(4);function a(r,l,i){d.call(this,r,l,i),this.idealLength=h.DEFAULT_EDGE_LENGTH,this.edgeElasticity=h.DEFAULT_SPRING_STRENGTH}a.prototype=Object.create(d.prototype);for(var e in d)a[e]=d[e];M.exports=a}),(function(M,G,N){var d=N(3),h=N(4);function a(r,l,i,u){d.call(this,r,l,i,u),this.nodeRepulsion=h.DEFAULT_REPULSION_STRENGTH,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=[]}a.prototype=Object.create(d.prototype);for(var e in d)a[e]=d[e];a.prototype.setGridCoordinates=function(r,l,i,u){this.startX=r,this.finishX=l,this.startY=i,this.finishY=u},M.exports=a}),(function(M,G,N){function d(h,a){this.width=0,this.height=0,h!==null&&a!==null&&(this.height=a,this.width=h)}d.prototype.getWidth=function(){return this.width},d.prototype.setWidth=function(h){this.width=h},d.prototype.getHeight=function(){return this.height},d.prototype.setHeight=function(h){this.height=h},M.exports=d}),(function(M,G,N){var d=N(14);function h(){this.map={},this.keys=[]}h.prototype.put=function(a,e){var r=d.createID(a);this.contains(r)||(this.map[r]=e,this.keys.push(a))},h.prototype.contains=function(a){return d.createID(a),this.map[a]!=null},h.prototype.get=function(a){var e=d.createID(a);return this.map[e]},h.prototype.keySet=function(){return this.keys},M.exports=h}),(function(M,G,N){var d=N(14);function h(){this.set={}}h.prototype.add=function(a){var e=d.createID(a);this.contains(e)||(this.set[e]=a)},h.prototype.remove=function(a){delete this.set[d.createID(a)]},h.prototype.clear=function(){this.set={}},h.prototype.contains=function(a){return this.set[d.createID(a)]==a},h.prototype.isEmpty=function(){return this.size()===0},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAllTo=function(a){for(var e=Object.keys(this.set),r=e.length,l=0;l<r;l++)a.push(this.set[e[l]])},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAll=function(a){for(var e=a.length,r=0;r<e;r++){var l=a[r];this.add(l)}},M.exports=h}),(function(M,G,N){function d(){}d.multMat=function(h,a){for(var e=[],r=0;r<h.length;r++){e[r]=[];for(var l=0;l<a[0].length;l++){e[r][l]=0;for(var i=0;i<h[0].length;i++)e[r][l]+=h[r][i]*a[i][l]}}return e},d.transpose=function(h){for(var a=[],e=0;e<h[0].length;e++){a[e]=[];for(var r=0;r<h.length;r++)a[e][r]=h[r][e]}return a},d.multCons=function(h,a){for(var e=[],r=0;r<h.length;r++)e[r]=h[r]*a;return e},d.minusOp=function(h,a){for(var e=[],r=0;r<h.length;r++)e[r]=h[r]-a[r];return e},d.dotProduct=function(h,a){for(var e=0,r=0;r<h.length;r++)e+=h[r]*a[r];return e},d.mag=function(h){return Math.sqrt(this.dotProduct(h,h))},d.normalize=function(h){for(var a=[],e=this.mag(h),r=0;r<h.length;r++)a[r]=h[r]/e;return a},d.multGamma=function(h){for(var a=[],e=0,r=0;r<h.length;r++)e+=h[r];e*=-1/h.length;for(var l=0;l<h.length;l++)a[l]=e+h[l];return a},d.multL=function(h,a,e){for(var r=[],l=[],i=[],u=0;u<a[0].length;u++){for(var t=0,o=0;o<a.length;o++)t+=-.5*a[o][u]*h[o];l[u]=t}for(var s=0;s<e.length;s++){for(var c=0,f=0;f<e.length;f++)c+=e[s][f]*l[f];i[s]=c}for(var T=0;T<a.length;T++){for(var g=0,v=0;v<a[0].length;v++)g+=a[T][v]*i[v];r[T]=g}return r},M.exports=d}),(function(M,G,N){var d=(function(){function r(l,i){for(var u=0;u<i.length;u++){var t=i[u];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(l,t.key,t)}}return function(l,i,u){return i&&r(l.prototype,i),u&&r(l,u),l}})();function h(r,l){if(!(r instanceof l))throw new TypeError("Cannot call a class as a function")}var a=N(11),e=(function(){function r(l,i){h(this,r),(i!==null||i!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var u=void 0;l instanceof a?u=l.size():u=l.length,this._quicksort(l,0,u-1)}return d(r,[{key:"_quicksort",value:function(i,u,t){if(u<t){var o=this._partition(i,u,t);this._quicksort(i,u,o),this._quicksort(i,o+1,t)}}},{key:"_partition",value:function(i,u,t){for(var o=this._get(i,u),s=u,c=t;;){for(;this.compareFunction(o,this._get(i,c));)c--;for(;this.compareFunction(this._get(i,s),o);)s++;if(s<c)this._swap(i,s,c),s++,c--;else return c}}},{key:"_get",value:function(i,u){return i instanceof a?i.get_object_at(u):i[u]}},{key:"_set",value:function(i,u,t){i instanceof a?i.set_object_at(u,t):i[u]=t}},{key:"_swap",value:function(i,u,t){var o=this._get(i,u);this._set(i,u,this._get(i,t)),this._set(i,t,o)}},{key:"_defaultCompareFunction",value:function(i,u){return u>i}}]),r})();M.exports=e}),(function(M,G,N){function d(){}d.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var a=Math.min(this.m,this.n);this.s=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var Ct=function $t(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push($t(bt.slice(1)));return zt};return Ct(Tt)})([this.m,a]),this.V=(function(Tt){var Ct=function $t(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push($t(bt.slice(1)));return zt};return Ct(Tt)})([this.n,this.n]);for(var e=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.n),r=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.m),l=!0,i=Math.min(this.m-1,this.n),u=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(i,u);t++){if(t<i){this.s[t]=0;for(var o=t;o<this.m;o++)this.s[t]=d.hypot(this.s[t],h[o][t]);if(this.s[t]!==0){h[t][t]<0&&(this.s[t]=-this.s[t]);for(var s=t;s<this.m;s++)h[s][t]/=this.s[t];h[t][t]+=1}this.s[t]=-this.s[t]}for(var c=t+1;c<this.n;c++){if((function(Tt,Ct){return Tt&&Ct})(t<i,this.s[t]!==0)){for(var f=0,T=t;T<this.m;T++)f+=h[T][t]*h[T][c];f=-f/h[t][t];for(var g=t;g<this.m;g++)h[g][c]+=f*h[g][t]}e[c]=h[t][c]}if((function(Tt,Ct){return Ct})(l,t<i))for(var v=t;v<this.m;v++)this.U[v][t]=h[v][t];if(t<u){e[t]=0;for(var L=t+1;L<this.n;L++)e[t]=d.hypot(e[t],e[L]);if(e[t]!==0){e[t+1]<0&&(e[t]=-e[t]);for(var F=t+1;F<this.n;F++)e[F]/=e[t];e[t+1]+=1}if(e[t]=-e[t],(function(Tt,Ct){return Tt&&Ct})(t+1<this.m,e[t]!==0)){for(var A=t+1;A<this.m;A++)r[A]=0;for(var b=t+1;b<this.n;b++)for(var k=t+1;k<this.m;k++)r[k]+=e[b]*h[k][b];for(var U=t+1;U<this.n;U++)for(var K=-e[U]/e[t+1],D=t+1;D<this.m;D++)h[D][U]+=K*r[D]}for(var it=t+1;it<this.n;it++)this.V[it][t]=e[it]}}var n=Math.min(this.n,this.m+1);i<this.n&&(this.s[i]=h[i][i]),this.m<n&&(this.s[n-1]=0),u+1<n&&(e[u]=h[u][n-1]),e[n-1]=0;{for(var m=i;m<a;m++){for(var p=0;p<this.m;p++)this.U[p][m]=0;this.U[m][m]=1}for(var E=i-1;E>=0;E--)if(this.s[E]!==0){for(var y=E+1;y<a;y++){for(var I=0,w=E;w<this.m;w++)I+=this.U[w][E]*this.U[w][y];I=-I/this.U[E][E];for(var R=E;R<this.m;R++)this.U[R][y]+=I*this.U[R][E]}for(var W=E;W<this.m;W++)this.U[W][E]=-this.U[W][E];this.U[E][E]=1+this.U[E][E];for(var x=0;x<E-1;x++)this.U[x][E]=0}else{for(var q=0;q<this.m;q++)this.U[q][E]=0;this.U[E][E]=1}}for(var V=this.n-1;V>=0;V--){if((function(Tt,Ct){return Tt&&Ct})(V<u,e[V]!==0))for(var Y=V+1;Y<a;Y++){for(var et=0,z=V+1;z<this.n;z++)et+=this.V[z][V]*this.V[z][Y];et=-et/this.V[V+1][V];for(var O=V+1;O<this.n;O++)this.V[O][Y]+=et*this.V[O][V]}for(var H=0;H<this.n;H++)this.V[H][V]=0;this.V[V][V]=1}for(var $=n-1,_=Math.pow(2,-52),ht=Math.pow(2,-966);n>0;){var Q=void 0,It=void 0;for(Q=n-2;Q>=-1&&Q!==-1;Q--)if(Math.abs(e[Q])<=ht+_*(Math.abs(this.s[Q])+Math.abs(this.s[Q+1]))){e[Q]=0;break}if(Q===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=Q&&Nt!==Q;Nt--){var vt=(Nt!==n?Math.abs(e[Nt]):0)+(Nt!==Q+1?Math.abs(e[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+_*vt){this.s[Nt]=0;break}}Nt===Q?It=3:Nt===n-1?It=1:(It=2,Q=Nt)}switch(Q++,It){case 1:{var rt=e[n-2];e[n-2]=0;for(var gt=n-2;gt>=Q;gt--){var mt=d.hypot(this.s[gt],rt),At=this.s[gt]/mt,Ot=rt/mt;this.s[gt]=mt,gt!==Q&&(rt=-Ot*e[gt-1],e[gt-1]=At*e[gt-1]);for(var Et=0;Et<this.n;Et++)mt=At*this.V[Et][gt]+Ot*this.V[Et][n-1],this.V[Et][n-1]=-Ot*this.V[Et][gt]+At*this.V[Et][n-1],this.V[Et][gt]=mt}}break;case 2:{var Dt=e[Q-1];e[Q-1]=0;for(var Rt=Q;Rt<n;Rt++){var Ht=d.hypot(this.s[Rt],Dt),Ut=this.s[Rt]/Ht,Pt=Dt/Ht;this.s[Rt]=Ht,Dt=-Pt*e[Rt],e[Rt]=Ut*e[Rt];for(var Ft=0;Ft<this.m;Ft++)Ht=Ut*this.U[Ft][Rt]+Pt*this.U[Ft][Q-1],this.U[Ft][Q-1]=-Pt*this.U[Ft][Rt]+Ut*this.U[Ft][Q-1],this.U[Ft][Rt]=Ht}}break;case 3:{var Yt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[n-1]),Math.abs(this.s[n-2])),Math.abs(e[n-2])),Math.abs(this.s[Q])),Math.abs(e[Q])),Vt=this.s[n-1]/Yt,S=this.s[n-2]/Yt,P=e[n-2]/Yt,B=this.s[Q]/Yt,J=e[Q]/Yt,Z=((S+Vt)*(S-Vt)+P*P)/2,at=Vt*P*(Vt*P),ct=0;(function(Tt,Ct){return Tt||Ct})(Z!==0,at!==0)&&(ct=Math.sqrt(Z*Z+at),Z<0&&(ct=-ct),ct=at/(Z+ct));for(var nt=(B+Vt)*(B-Vt)+ct,tt=B*J,j=Q;j<n-1;j++){var ut=d.hypot(nt,tt),Mt=nt/ut,pt=tt/ut;j!==Q&&(e[j-1]=ut),nt=Mt*this.s[j]+pt*e[j],e[j]=Mt*e[j]-pt*this.s[j],tt=pt*this.s[j+1],this.s[j+1]=Mt*this.s[j+1];for(var xt=0;xt<this.n;xt++)ut=Mt*this.V[xt][j]+pt*this.V[xt][j+1],this.V[xt][j+1]=-pt*this.V[xt][j]+Mt*this.V[xt][j+1],this.V[xt][j]=ut;if(ut=d.hypot(nt,tt),Mt=nt/ut,pt=tt/ut,this.s[j]=ut,nt=Mt*e[j]+pt*this.s[j+1],this.s[j+1]=-pt*e[j]+Mt*this.s[j+1],tt=pt*e[j+1],e[j+1]=Mt*e[j+1],j<this.m-1)for(var lt=0;lt<this.m;lt++)ut=Mt*this.U[lt][j]+pt*this.U[lt][j+1],this.U[lt][j+1]=-pt*this.U[lt][j]+Mt*this.U[lt][j+1],this.U[lt][j]=ut}e[n-2]=nt}break;case 4:{if(this.s[Q]<=0){this.s[Q]=this.s[Q]<0?-this.s[Q]:0;for(var ot=0;ot<=$;ot++)this.V[ot][Q]=-this.V[ot][Q]}for(;Q<$&&!(this.s[Q]>=this.s[Q+1]);){var Lt=this.s[Q];if(this.s[Q]=this.s[Q+1],this.s[Q+1]=Lt,Q<this.n-1)for(var ft=0;ft<this.n;ft++)Lt=this.V[ft][Q+1],this.V[ft][Q+1]=this.V[ft][Q],this.V[ft][Q]=Lt;if(Q<this.m-1)for(var st=0;st<this.m;st++)Lt=this.U[st][Q+1],this.U[st][Q+1]=this.U[st][Q],this.U[st][Q]=Lt;Q++}n--}break}}var Xt={U:this.U,V:this.V,S:this.s};return Xt},d.hypot=function(h,a){var e=void 0;return Math.abs(h)>Math.abs(a)?(e=a/h,e=Math.abs(h)*Math.sqrt(1+e*e)):a!=0?(e=h/a,e=Math.abs(a)*Math.sqrt(1+e*e)):e=0,e},M.exports=d}),(function(M,G,N){var d=(function(){function e(r,l){for(var i=0;i<l.length;i++){var u=l[i];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(r,u.key,u)}}return function(r,l,i){return l&&e(r.prototype,l),i&&e(r,i),r}})();function h(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}var a=(function(){function e(r,l){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,e),this.sequence1=r,this.sequence2=l,this.match_score=i,this.mismatch_penalty=u,this.gap_penalty=t,this.iMax=r.length+1,this.jMax=l.length+1,this.grid=new Array(this.iMax);for(var o=0;o<this.iMax;o++){this.grid[o]=new Array(this.jMax);for(var s=0;s<this.jMax;s++)this.grid[o][s]=0}this.tracebackGrid=new Array(this.iMax);for(var c=0;c<this.iMax;c++){this.tracebackGrid[c]=new Array(this.jMax);for(var f=0;f<this.jMax;f++)this.tracebackGrid[c][f]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return d(e,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var l=1;l<this.jMax;l++)this.grid[0][l]=this.grid[0][l-1]+this.gap_penalty,this.tracebackGrid[0][l]=[!1,!1,!0];for(var i=1;i<this.iMax;i++)this.grid[i][0]=this.grid[i-1][0]+this.gap_penalty,this.tracebackGrid[i][0]=[!1,!0,!1];for(var u=1;u<this.iMax;u++)for(var t=1;t<this.jMax;t++){var o=void 0;this.sequence1[u-1]===this.sequence2[t-1]?o=this.grid[u-1][t-1]+this.match_score:o=this.grid[u-1][t-1]+this.mismatch_penalty;var s=this.grid[u-1][t]+this.gap_penalty,c=this.grid[u][t-1]+this.gap_penalty,f=[o,s,c],T=this.arrayAllMaxIndexes(f);this.grid[u][t]=f[T[0]],this.tracebackGrid[u][t]=[T.includes(0),T.includes(1),T.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var l=[];for(l.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});l[0];){var i=l[0],u=this.tracebackGrid[i.pos[0]][i.pos[1]];u[0]&&l.push({pos:[i.pos[0]-1,i.pos[1]-1],seq1:this.sequence1[i.pos[0]-1]+i.seq1,seq2:this.sequence2[i.pos[1]-1]+i.seq2}),u[1]&&l.push({pos:[i.pos[0]-1,i.pos[1]],seq1:this.sequence1[i.pos[0]-1]+i.seq1,seq2:"-"+i.seq2}),u[2]&&l.push({pos:[i.pos[0],i.pos[1]-1],seq1:"-"+i.seq1,seq2:this.sequence2[i.pos[1]-1]+i.seq2}),i.pos[0]===0&&i.pos[1]===0&&this.alignments.push({sequence1:i.seq1,sequence2:i.seq2}),l.shift()}return this.alignments}},{key:"getAllIndexes",value:function(l,i){for(var u=[],t=-1;(t=l.indexOf(i,t+1))!==-1;)u.push(t);return u}},{key:"arrayAllMaxIndexes",value:function(l){return this.getAllIndexes(l,Math.max.apply(null,l))}}]),e})();M.exports=a}),(function(M,G,N){var d=function(){};d.FDLayout=N(18),d.FDLayoutConstants=N(4),d.FDLayoutEdge=N(19),d.FDLayoutNode=N(20),d.DimensionD=N(21),d.HashMap=N(22),d.HashSet=N(23),d.IGeometry=N(8),d.IMath=N(9),d.Integer=N(10),d.Point=N(12),d.PointD=N(5),d.RandomSeed=N(16),d.RectangleD=N(13),d.Transform=N(17),d.UniqueIDGeneretor=N(14),d.Quicksort=N(25),d.LinkedList=N(11),d.LGraphObject=N(2),d.LGraph=N(6),d.LEdge=N(1),d.LGraphManager=N(7),d.LNode=N(3),d.Layout=N(15),d.LayoutConstants=N(0),d.NeedlemanWunsch=N(27),d.Matrix=N(24),d.SVD=N(26),M.exports=d}),(function(M,G,N){function d(){this.listeners=[]}var h=d.prototype;h.addListener=function(a,e){this.listeners.push({event:a,callback:e})},h.removeListener=function(a,e){for(var r=this.listeners.length;r>=0;r--){var l=this.listeners[r];l.event===a&&l.callback===e&&this.listeners.splice(r,1)}},h.emit=function(a,e){for(var r=0;r<this.listeners.length;r++){var l=this.listeners[r];a===l.event&&l.callback(e)}},M.exports=d})])})})(le)),le.exports}var ur=he.exports,we;function dr(){return we||(we=1,(function(C,X){(function(G,N){C.exports=N(gr())})(ur,function(M){return(()=>{var G={45:((a,e,r)=>{var l={};l.layoutBase=r(551),l.CoSEConstants=r(806),l.CoSEEdge=r(767),l.CoSEGraph=r(880),l.CoSEGraphManager=r(578),l.CoSELayout=r(765),l.CoSENode=r(991),l.ConstraintHandler=r(902),a.exports=l}),806:((a,e,r)=>{var l=r(551).FDLayoutConstants;function i(){}for(var u in l)i[u]=l[u];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,a.exports=i}),767:((a,e,r)=>{var l=r(551).FDLayoutEdge;function i(t,o,s){l.call(this,t,o,s)}i.prototype=Object.create(l.prototype);for(var u in l)i[u]=l[u];a.exports=i}),880:((a,e,r)=>{var l=r(551).LGraph;function i(t,o,s){l.call(this,t,o,s)}i.prototype=Object.create(l.prototype);for(var u in l)i[u]=l[u];a.exports=i}),578:((a,e,r)=>{var l=r(551).LGraphManager;function i(t){l.call(this,t)}i.prototype=Object.create(l.prototype);for(var u in l)i[u]=l[u];a.exports=i}),765:((a,e,r)=>{var l=r(551).FDLayout,i=r(578),u=r(880),t=r(991),o=r(767),s=r(806),c=r(902),f=r(551).FDLayoutConstants,T=r(551).LayoutConstants,g=r(551).Point,v=r(551).PointD,L=r(551).DimensionD,F=r(551).Layout,A=r(551).Integer,b=r(551).IGeometry,k=r(551).LGraph,U=r(551).Transform,K=r(551).LinkedList;function D(){l.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(l.prototype);for(var it in l)D[it]=l[it];D.prototype.newGraphManager=function(){var n=new i(this);return this.graphManager=n,n},D.prototype.newGraph=function(n){return new u(null,this.graphManager,n)},D.prototype.newNode=function(n){return new t(this.graphManager,n)},D.prototype.newEdge=function(n){return new o(null,null,n)},D.prototype.initParameters=function(){l.prototype.initParameters.call(this,arguments),this.isSubLayout||(s.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=s.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=f.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=f.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=f.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){l.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/f.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.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(s.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return m.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),s.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%f.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(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 n=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),s.PURE_INCREMENTAL?this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=f.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()),s.PURE_INCREMENTAL?this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),m={},p=0;p<n.length;p++){var E=n[p].rect,y=n[p].id;m[y]={id:y,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.height}}return m},D.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var n=!1;if(f.ANIMATE==="during")this.emit("layoutstarted");else{for(;!n;)n=this.tick();this.graphManager.updateBounds()}},D.prototype.moveNodes=function(){for(var n=this.getAllNodes(),m,p=0;p<n.length;p++)m=n[p],m.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var p=0;p<n.length;p++)m=n[p],m.move()},D.prototype.initConstraintVariables=function(){var n=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var m=this.graphManager.getAllNodes(),p=0;p<m.length;p++){var E=m[p];this.idToNodeMap.set(E.id,E)}var y=function O(H){for(var $=H.getChild().getNodes(),_,ht=0,Q=0;Q<$.length;Q++)_=$[Q],_.getChild()==null?n.fixedNodeSet.has(_.id)&&(ht+=100):ht+=O(_);return ht};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function($){n.fixedNodeSet.add($.nodeId)});for(var m=this.graphManager.getAllNodes(),E,p=0;p<m.length;p++)if(E=m[p],E.getChild()!=null){var I=y(E);I>0&&(E.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var w=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p<W.length;p++)this.dummyToNodeForVerticalAlignment.set("dummy"+p,[]),W[p].forEach(function(H){w.set(H,"dummy"+p),n.dummyToNodeForVerticalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnHorizontal.add("dummy"+p)});if(this.constraints.alignmentConstraint.horizontal)for(var x=this.constraints.alignmentConstraint.horizontal,p=0;p<x.length;p++)this.dummyToNodeForHorizontalAlignment.set("dummy"+p,[]),x[p].forEach(function(H){R.set(H,"dummy"+p),n.dummyToNodeForHorizontalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnVertical.add("dummy"+p)})}if(s.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(O){var H,$,_;for(_=O.length-1;_>=2*O.length/3;_--)H=Math.floor(Math.random()*(_+1)),$=O[_],O[_]=O[H],O[H]=$;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=w.has(O.left)?w.get(O.left):O.left,$=w.has(O.right)?w.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes($)||(n.nodesInRelativeHorizontal.push($),n.nodeToRelativeConstraintMapHorizontal.set($,[]),n.dummyToNodeForVerticalAlignment.has($)?n.nodeToTempPositionMapHorizontal.set($,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get($)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set($,n.idToNodeMap.get($).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:$,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get($).push({left:H,gap:O.gap})}else{var _=R.has(O.top)?R.get(O.top):O.top,ht=R.has(O.bottom)?R.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(_)||(n.nodesInRelativeVertical.push(_),n.nodeToRelativeConstraintMapVertical.set(_,[]),n.dummyToNodeForHorizontalAlignment.has(_)?n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(_)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(_).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(_).push({bottom:ht,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(ht).push({top:_,gap:O.gap})}});else{var q=new Map,V=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=w.has(O.left)?w.get(O.left):O.left,$=w.has(O.right)?w.get(O.right):O.right;q.has(H)?q.get(H).push($):q.set(H,[$]),q.has($)?q.get($).push(H):q.set($,[H])}else{var _=R.has(O.top)?R.get(O.top):O.top,ht=R.has(O.bottom)?R.get(O.bottom):O.bottom;V.has(_)?V.get(_).push(ht):V.set(_,[ht]),V.has(ht)?V.get(ht).push(_):V.set(ht,[_])}});var Y=function(H,$){var _=[],ht=[],Q=new K,It=new Set,Nt=0;return H.forEach(function(vt,rt){if(!It.has(rt)){_[Nt]=[],ht[Nt]=!1;var gt=rt;for(Q.push(gt),It.add(gt),_[Nt].push(gt);Q.length!=0;){gt=Q.shift(),$.has(gt)&&(ht[Nt]=!0);var mt=H.get(gt);mt.forEach(function(At){It.has(At)||(Q.push(At),It.add(At),_[Nt].push(At))})}Nt++}}),{components:_,isFixed:ht}},et=Y(q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=et.components,this.fixedComponentsOnHorizontal=et.isFixed;var z=Y(V,n.fixedNodesOnVertical);this.componentsOnVertical=z.components,this.fixedComponentsOnVertical=z.isFixed}}},D.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(z){var O=n.idToNodeMap.get(z.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,p=0;p<m.length;p++){for(var E=0,y=0;y<m[p].length;y++){if(this.fixedNodeSet.has(m[p][y])){E=0;break}E+=this.idToNodeMap.get(m[p][y]).displacementX}for(var I=E/m[p].length,y=0;y<m[p].length;y++)this.idToNodeMap.get(m[p][y]).displacementX=I}if(this.constraints.alignmentConstraint.horizontal)for(var w=this.constraints.alignmentConstraint.horizontal,p=0;p<w.length;p++){for(var R=0,y=0;y<w[p].length;y++){if(this.fixedNodeSet.has(w[p][y])){R=0;break}R+=this.idToNodeMap.get(w[p][y]).displacementY}for(var W=R/w[p].length,y=0;y<w[p].length;y++)this.idToNodeMap.get(w[p][y]).displacementY=W}}if(this.constraints.relativePlacementConstraint)if(s.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(z){if(!n.fixedNodesOnHorizontal.has(z)){var O=0;n.dummyToNodeForVerticalAlignment.has(z)?O=n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(z)[0]).displacementX:O=n.idToNodeMap.get(z).displacementX,n.nodeToRelativeConstraintMapHorizontal.get(z).forEach(function(H){if(H.right){var $=n.nodeToTempPositionMapHorizontal.get(H.right)-n.nodeToTempPositionMapHorizontal.get(z)-O;$<H.gap&&(O-=H.gap-$)}else{var $=n.nodeToTempPositionMapHorizontal.get(z)-n.nodeToTempPositionMapHorizontal.get(H.left)+O;$<H.gap&&(O+=H.gap-$)}}),n.nodeToTempPositionMapHorizontal.set(z,n.nodeToTempPositionMapHorizontal.get(z)+O),n.dummyToNodeForVerticalAlignment.has(z)?n.dummyToNodeForVerticalAlignment.get(z).forEach(function(H){n.idToNodeMap.get(H).displacementX=O}):n.idToNodeMap.get(z).displacementX=O}}),this.nodesInRelativeVertical.forEach(function(z){if(!n.fixedNodesOnHorizontal.has(z)){var O=0;n.dummyToNodeForHorizontalAlignment.has(z)?O=n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(z)[0]).displacementY:O=n.idToNodeMap.get(z).displacementY,n.nodeToRelativeConstraintMapVertical.get(z).forEach(function(H){if(H.bottom){var $=n.nodeToTempPositionMapVertical.get(H.bottom)-n.nodeToTempPositionMapVertical.get(z)-O;$<H.gap&&(O-=H.gap-$)}else{var $=n.nodeToTempPositionMapVertical.get(z)-n.nodeToTempPositionMapVertical.get(H.top)+O;$<H.gap&&(O+=H.gap-$)}}),n.nodeToTempPositionMapVertical.set(z,n.nodeToTempPositionMapVertical.get(z)+O),n.dummyToNodeForHorizontalAlignment.has(z)?n.dummyToNodeForHorizontalAlignment.get(z).forEach(function(H){n.idToNodeMap.get(H).displacementY=O}):n.idToNodeMap.get(z).displacementY=O}});else{for(var p=0;p<this.componentsOnHorizontal.length;p++){var x=this.componentsOnHorizontal[p];if(this.fixedComponentsOnHorizontal[p])for(var y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=0}):this.idToNodeMap.get(x[y]).displacementX=0;else{for(var q=0,V=0,y=0;y<x.length;y++)if(this.dummyToNodeForVerticalAlignment.has(x[y])){var Y=this.dummyToNodeForVerticalAlignment.get(x[y]);q+=Y.length*this.idToNodeMap.get(Y[0]).displacementX,V+=Y.length}else q+=this.idToNodeMap.get(x[y]).displacementX,V++;for(var et=q/V,y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=et}):this.idToNodeMap.get(x[y]).displacementX=et}}for(var p=0;p<this.componentsOnVertical.length;p++){var x=this.componentsOnVertical[p];if(this.fixedComponentsOnVertical[p])for(var y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function($){n.idToNodeMap.get($).displacementY=0}):this.idToNodeMap.get(x[y]).displacementY=0;else{for(var q=0,V=0,y=0;y<x.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(x[y])){var Y=this.dummyToNodeForHorizontalAlignment.get(x[y]);q+=Y.length*this.idToNodeMap.get(Y[0]).displacementY,V+=Y.length}else q+=this.idToNodeMap.get(x[y]).displacementY,V++;for(var et=q/V,y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function(Q){n.idToNodeMap.get(Q).displacementY=et}):this.idToNodeMap.get(x[y]).displacementY=et}}}},D.prototype.calculateNodesToApplyGravitationTo=function(){var n=[],m,p=this.graphManager.getGraphs(),E=p.length,y;for(y=0;y<E;y++)m=p[y],m.updateConnected(),m.isConnected||(n=n.concat(m.getNodes()));return n},D.prototype.createBendpoints=function(){var n=[];n=n.concat(this.graphManager.getAllEdges());var m=new Set,p;for(p=0;p<n.length;p++){var E=n[p];if(!m.has(E)){var y=E.getSource(),I=E.getTarget();if(y==I)E.getBendpoints().push(new v),E.getBendpoints().push(new v),this.createDummyNodesForBendpoints(E),m.add(E);else{var w=[];if(w=w.concat(y.getEdgeListToNode(I)),w=w.concat(I.getEdgeListToNode(y)),!m.has(w[0])){if(w.length>1){var R;for(R=0;R<w.length;R++){var W=w[R];W.getBendpoints().push(new v),this.createDummyNodesForBendpoints(W)}}w.forEach(function(x){m.add(x)})}}}if(m.size==n.length)break}},D.prototype.positionNodesRadially=function(n){for(var m=new g(0,0),p=Math.ceil(Math.sqrt(n.length)),E=0,y=0,I=0,w=new v(0,0),R=0;R<n.length;R++){R%p==0&&(I=0,y=E,R!=0&&(y+=s.DEFAULT_COMPONENT_SEPERATION),E=0);var W=n[R],x=F.findCenterOfTree(W);m.x=I,m.y=y,w=D.radialLayout(W,x,m),w.y>E&&(E=Math.floor(w.y)),I=Math.floor(w.x+s.DEFAULT_COMPONENT_SEPERATION)}this.transform(new v(T.WORLD_CENTER_X-w.x/2,T.WORLD_CENTER_Y-w.y/2))},D.radialLayout=function(n,m,p){var E=Math.max(this.maxDiagonalInTree(n),s.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(m,null,0,359,0,E);var y=k.calculateBounds(n),I=new U;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var w=0;w<n.length;w++){var R=n[w];R.transform(I)}var W=new v(y.getMaxX(),y.getMaxY());return I.inverseTransformPoint(W)},D.branchRadialLayout=function(n,m,p,E,y,I){var w=(E-p+1)/2;w<0&&(w+=180);var R=(w+p)%360,W=R*b.TWO_PI/360,x=y*Math.cos(W),q=y*Math.sin(W);n.setCenter(x,q);var V=[];V=V.concat(n.getEdges());var Y=V.length;m!=null&&Y--;for(var et=0,z=V.length,O,H=n.getEdgesBetween(m);H.length>1;){var $=H[0];H.splice(0,1);var _=V.indexOf($);_>=0&&V.splice(_,1),z--,Y--}m!=null?O=(V.indexOf(H[0])+1)%z:O=0;for(var ht=Math.abs(E-p)/Y,Q=O;et!=Y;Q=++Q%z){var It=V[Q].getOtherEnd(n);if(It!=m){var Nt=(p+et*ht)%360,vt=(Nt+ht)%360;D.branchRadialLayout(It,n,Nt,vt,y+I,I),et++}}},D.maxDiagonalInTree=function(n){for(var m=A.MIN_VALUE,p=0;p<n.length;p++){var E=n[p],y=E.getDiagonal();y>m&&(m=y)}return m},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var n=this,m={};this.memberGroups={},this.idToDummyNode={};for(var p=[],E=this.graphManager.getAllNodes(),y=0;y<E.length;y++){var I=E[y],w=I.getParent();this.getNodeDegreeWithChildren(I)===0&&(w.id==null||!this.getToBeTiled(w))&&p.push(I)}for(var y=0;y<p.length;y++){var I=p[y],R=I.getParent().id;typeof m[R]>"u"&&(m[R]=[]),m[R]=m[R].concat(I)}Object.keys(m).forEach(function(W){if(m[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=m[W];var q=m[W][0].getParent(),V=new t(n.graphManager);V.id=x,V.paddingLeft=q.paddingLeft||0,V.paddingRight=q.paddingRight||0,V.paddingBottom=q.paddingBottom||0,V.paddingTop=q.paddingTop||0,n.idToDummyNode[x]=V;var Y=n.getGraphManager().add(n.newGraph(),V),et=q.getChild();et.add(V);for(var z=0;z<m[W].length;z++){var O=m[W][z];et.remove(O),Y.add(O)}}})},D.prototype.clearCompounds=function(){var n={},m={};this.performDFSOnCompounds();for(var p=0;p<this.compoundOrder.length;p++)m[this.compoundOrder[p].id]=this.compoundOrder[p],n[this.compoundOrder[p].id]=[].concat(this.compoundOrder[p].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[p].getChild()),this.compoundOrder[p].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(n,m)},D.prototype.clearZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(p){var E=n.idToDummyNode[p];if(m[p]=n.tileNodes(n.memberGroups[p],E.paddingLeft+E.paddingRight),E.rect.width=m[p].width,E.rect.height=m[p].height,E.setCenter(m[p].centerX,m[p].centerY),E.labelMarginLeft=0,E.labelMarginTop=0,s.NODE_DIMENSIONS_INCLUDE_LABELS){var y=E.rect.width,I=E.rect.height;E.labelWidth&&(E.labelPosHorizontal=="left"?(E.rect.x-=E.labelWidth,E.setWidth(y+E.labelWidth),E.labelMarginLeft=E.labelWidth):E.labelPosHorizontal=="center"&&E.labelWidth>y?(E.rect.x-=(E.labelWidth-y)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-y)/2):E.labelPosHorizontal=="right"&&E.setWidth(y+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(I+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>I?(E.rect.y-=(E.labelHeight-I)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-I)/2):E.labelPosVertical=="bottom"&&E.setHeight(I+E.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var m=this.compoundOrder[n],p=m.id,E=m.paddingLeft,y=m.paddingTop,I=m.labelMarginLeft,w=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],m.rect.x,m.rect.y,E,y,I,w)}},D.prototype.repopulateZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(p){var E=n.idToDummyNode[p],y=E.paddingLeft,I=E.paddingTop,w=E.labelMarginLeft,R=E.labelMarginTop;n.adjustLocations(m[p],E.rect.x,E.rect.y,y,I,w,R)})},D.prototype.getToBeTiled=function(n){var m=n.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var p=n.getChild();if(p==null)return this.toBeTiled[m]=!1,!1;for(var E=p.getNodes(),y=0;y<E.length;y++){var I=E[y];if(this.getNodeDegree(I)>0)return this.toBeTiled[m]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},D.prototype.getNodeDegree=function(n){n.id;for(var m=n.getEdges(),p=0,E=0;E<m.length;E++){var y=m[E];y.getSource().id!==y.getTarget().id&&(p=p+1)}return p},D.prototype.getNodeDegreeWithChildren=function(n){var m=this.getNodeDegree(n);if(n.getChild()==null)return m;for(var p=n.getChild().getNodes(),E=0;E<p.length;E++){var y=p[E];m+=this.getNodeDegreeWithChildren(y)}return m},D.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},D.prototype.fillCompexOrderByDFS=function(n){for(var m=0;m<n.length;m++){var p=n[m];p.getChild()!=null&&this.fillCompexOrderByDFS(p.getChild().getNodes()),this.getToBeTiled(p)&&this.compoundOrder.push(p)}},D.prototype.adjustLocations=function(n,m,p,E,y,I,w){m+=E+I,p+=y+w;for(var R=m,W=0;W<n.rows.length;W++){var x=n.rows[W];m=R;for(var q=0,V=0;V<x.length;V++){var Y=x[V];Y.rect.x=m,Y.rect.y=p,m+=Y.rect.width+n.horizontalPadding,Y.rect.height>q&&(q=Y.rect.height)}p+=q+n.verticalPadding}},D.prototype.tileCompoundMembers=function(n,m){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(E){var y=m[E];if(p.tiledMemberPack[E]=p.tileNodes(n[E],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[E].width,y.rect.height=p.tiledMemberPack[E].height,y.setCenter(p.tiledMemberPack[E].centerX,p.tiledMemberPack[E].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,s.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,w=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(w+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>w?(y.rect.y-=(y.labelHeight-w)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-w)/2):y.labelPosVertical=="bottom"&&y.setHeight(w+y.labelHeight))}})},D.prototype.tileNodes=function(n,m){var p=this.tileNodesByFavoringDim(n,m,!0),E=this.tileNodesByFavoringDim(n,m,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(E),w;return I<y?w=E:w=p,w},D.prototype.getOrgRatio=function(n){var m=n.width,p=n.height,E=m/p;return E<1&&(E=1/E),E},D.prototype.calcIdealRowWidth=function(n,m){var p=s.TILING_PADDING_VERTICAL,E=s.TILING_PADDING_HORIZONTAL,y=n.length,I=0,w=0,R=0;n.forEach(function(z){I+=z.getWidth(),w+=z.getHeight(),z.getWidth()>R&&(R=z.getWidth())});var W=I/y,x=w/y,q=Math.pow(p-E,2)+4*(W+E)*(x+p)*y,V=(E-p+Math.sqrt(q))/(2*(W+E)),Y;m?(Y=Math.ceil(V),Y==V&&Y++):Y=Math.floor(V);var et=Y*(W+E)-E;return R>et&&(et=R),et+=E*2,et},D.prototype.tileNodesByFavoringDim=function(n,m,p){var E=s.TILING_PADDING_VERTICAL,y=s.TILING_PADDING_HORIZONTAL,I=s.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:y,centerX:0,centerY:0};I&&(w.idealRowWidth=this.calcIdealRowWidth(n,p));var R=function(O){return O.rect.width*O.rect.height},W=function(O,H){return R(H)-R(O)};n.sort(function(z,O){var H=W;return w.idealRowWidth?(H=I,H(z.id,O.id)):H(z,O)});for(var x=0,q=0,V=0;V<n.length;V++){var Y=n[V];x+=Y.getCenterX(),q+=Y.getCenterY()}w.centerX=x/n.length,w.centerY=q/n.length;for(var V=0;V<n.length;V++){var Y=n[V];if(w.rows.length==0)this.insertNodeToRow(w,Y,0,m);else if(this.canAddHorizontal(w,Y.rect.width,Y.rect.height)){var et=w.rows.length-1;w.idealRowWidth||(et=this.getShortestRowIndex(w)),this.insertNodeToRow(w,Y,et,m)}else this.insertNodeToRow(w,Y,w.rows.length,m);this.shiftToLastRow(w)}return w},D.prototype.insertNodeToRow=function(n,m,p,E){var y=E;if(p==n.rows.length){var I=[];n.rows.push(I),n.rowWidth.push(y),n.rowHeight.push(0)}var w=n.rowWidth[p]+m.rect.width;n.rows[p].length>0&&(w+=n.horizontalPadding),n.rowWidth[p]=w,n.width<w&&(n.width=w);var R=m.rect.height;p>0&&(R+=n.verticalPadding);var W=0;R>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=R,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(m)},D.prototype.getShortestRowIndex=function(n){for(var m=-1,p=Number.MAX_VALUE,E=0;E<n.rows.length;E++)n.rowWidth[E]<p&&(m=E,p=n.rowWidth[E]);return m},D.prototype.getLongestRowIndex=function(n){for(var m=-1,p=Number.MIN_VALUE,E=0;E<n.rows.length;E++)n.rowWidth[E]>p&&(m=E,p=n.rowWidth[E]);return m},D.prototype.canAddHorizontal=function(n,m,p){if(n.idealRowWidth){var E=n.rows.length-1,y=n.rowWidth[E];return y+m+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var w=n.rowWidth[I];if(w+n.horizontalPadding+m<=n.width)return!0;var R=0;n.rowHeight[I]<p&&I>0&&(R=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-w>=m+n.horizontalPadding?W=(n.height+R)/(w+m+n.horizontalPadding):W=(n.height+R)/n.width,R=p+n.verticalPadding;var x;return n.width<m?x=(n.height+R)/m:x=(n.height+R)/n.width,x<1&&(x=1/x),W<1&&(W=1/W),W<x},D.prototype.shiftToLastRow=function(n){var m=this.getLongestRowIndex(n),p=n.rowWidth.length-1,E=n.rows[m],y=E[E.length-1],I=y.width+n.horizontalPadding;if(n.width-n.rowWidth[p]>I&&m!=p){E.splice(-1,1),n.rows[p].push(y),n.rowWidth[m]=n.rowWidth[m]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var w=Number.MIN_VALUE,R=0;R<E.length;R++)E[R].height>w&&(w=E[R].height);m>0&&(w+=n.verticalPadding);var W=n.rowHeight[m]+n.rowHeight[p];n.rowHeight[m]=w,n.rowHeight[p]<y.height+n.verticalPadding&&(n.rowHeight[p]=y.height+n.verticalPadding);var x=n.rowHeight[m]+n.rowHeight[p];n.height+=x-W,this.shiftToLastRow(n)}},D.prototype.tilingPreLayout=function(){s.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},D.prototype.tilingPostLayout=function(){s.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},D.prototype.reduceTrees=function(){for(var n=[],m=!0,p;m;){var E=this.graphManager.getAllNodes(),y=[];m=!1;for(var I=0;I<E.length;I++)if(p=E[I],p.getEdges().length==1&&!p.getEdges()[0].isInterGraph&&p.getChild()==null){if(s.PURE_INCREMENTAL){var w=p.getEdges()[0].getOtherEnd(p),R=new L(p.getCenterX()-w.getCenterX(),p.getCenterY()-w.getCenterY());y.push([p,p.getEdges()[0],p.getOwner(),R])}else y.push([p,p.getEdges()[0],p.getOwner()]);m=!0}if(m==!0){for(var W=[],x=0;x<y.length;x++)y[x][0].getEdges().length==1&&(W.push(y[x]),y[x][0].getOwner().remove(y[x][0]));n.push(W),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=n},D.prototype.growTree=function(n){for(var m=n.length,p=n[m-1],E,y=0;y<p.length;y++)E=p[y],this.findPlaceforPrunedNode(E),E[2].add(E[0]),E[2].add(E[1],E[1].source,E[1].target);n.splice(n.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},D.prototype.findPlaceforPrunedNode=function(n){var m,p,E=n[0];if(E==n[1].source?p=n[1].target:p=n[1].source,s.PURE_INCREMENTAL)E.setCenter(p.getCenterX()+n[3].getWidth(),p.getCenterY()+n[3].getHeight());else{var y=p.startX,I=p.finishX,w=p.startY,R=p.finishY,W=0,x=0,q=0,V=0,Y=[W,q,x,V];if(w>0)for(var et=y;et<=I;et++)Y[0]+=this.grid[et][w-1].length+this.grid[et][w].length-1;if(I<this.grid.length-1)for(var et=w;et<=R;et++)Y[1]+=this.grid[I+1][et].length+this.grid[I][et].length-1;if(R<this.grid[0].length-1)for(var et=y;et<=I;et++)Y[2]+=this.grid[et][R+1].length+this.grid[et][R].length-1;if(y>0)for(var et=w;et<=R;et++)Y[3]+=this.grid[y-1][et].length+this.grid[y][et].length-1;for(var z=A.MAX_VALUE,O,H,$=0;$<Y.length;$++)Y[$]<z?(z=Y[$],O=1,H=$):Y[$]==z&&O++;if(O==3&&z==0)Y[0]==0&&Y[1]==0&&Y[2]==0?m=1:Y[0]==0&&Y[1]==0&&Y[3]==0?m=0:Y[0]==0&&Y[2]==0&&Y[3]==0?m=3:Y[1]==0&&Y[2]==0&&Y[3]==0&&(m=2);else if(O==2&&z==0){var _=Math.floor(Math.random()*2);Y[0]==0&&Y[1]==0?_==0?m=0:m=1:Y[0]==0&&Y[2]==0?_==0?m=0:m=2:Y[0]==0&&Y[3]==0?_==0?m=0:m=3:Y[1]==0&&Y[2]==0?_==0?m=1:m=2:Y[1]==0&&Y[3]==0?_==0?m=1:m=3:_==0?m=2:m=3}else if(O==4&&z==0){var _=Math.floor(Math.random()*4);m=_}else m=H;m==0?E.setCenter(p.getCenterX(),p.getCenterY()-p.getHeight()/2-f.DEFAULT_EDGE_LENGTH-E.getHeight()/2):m==1?E.setCenter(p.getCenterX()+p.getWidth()/2+f.DEFAULT_EDGE_LENGTH+E.getWidth()/2,p.getCenterY()):m==2?E.setCenter(p.getCenterX(),p.getCenterY()+p.getHeight()/2+f.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(p.getCenterX()-p.getWidth()/2-f.DEFAULT_EDGE_LENGTH-E.getWidth()/2,p.getCenterY())}},a.exports=D}),991:((a,e,r)=>{var l=r(551).FDLayoutNode,i=r(551).IMath;function u(o,s,c,f){l.call(this,o,s,c,f)}u.prototype=Object.create(l.prototype);for(var t in l)u[t]=l[t];u.prototype.calculateDisplacement=function(){var o=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=o.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=o.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=o.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=o.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>o.coolingFactor*o.maxNodeDisplacement&&(this.displacementX=o.coolingFactor*o.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>o.coolingFactor*o.maxNodeDisplacement&&(this.displacementY=o.coolingFactor*o.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},u.prototype.propogateDisplacementToChildren=function(o,s){for(var c=this.getChild().getNodes(),f,T=0;T<c.length;T++)f=c[T],f.getChild()==null?(f.displacementX+=o,f.displacementY+=s):f.propogateDisplacementToChildren(o,s)},u.prototype.move=function(){var o=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),o.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},u.prototype.setPred1=function(o){this.pred1=o},u.prototype.getPred1=function(){return pred1},u.prototype.getPred2=function(){return pred2},u.prototype.setNext=function(o){this.next=o},u.prototype.getNext=function(){return next},u.prototype.setProcessed=function(o){this.processed=o},u.prototype.isProcessed=function(){return processed},a.exports=u}),902:((a,e,r)=>{function l(c){if(Array.isArray(c)){for(var f=0,T=Array(c.length);f<c.length;f++)T[f]=c[f];return T}else return Array.from(c)}var i=r(806),u=r(551).LinkedList,t=r(551).Matrix,o=r(551).SVD;function s(){}s.handleConstraints=function(c){var f={};f.fixedNodeConstraint=c.constraints.fixedNodeConstraint,f.alignmentConstraint=c.constraints.alignmentConstraint,f.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var T=new Map,g=new Map,v=[],L=[],F=c.getAllNodes(),A=0,b=0;b<F.length;b++){var k=F[b];k.getChild()==null&&(g.set(k.id,A++),v.push(k.getCenterX()),L.push(k.getCenterY()),T.set(k.id,k))}f.relativePlacementConstraint&&f.relativePlacementConstraint.forEach(function(S){!S.gap&&S.gap!=0&&(S.left?S.gap=i.DEFAULT_EDGE_LENGTH+T.get(S.left).getWidth()/2+T.get(S.right).getWidth()/2:S.gap=i.DEFAULT_EDGE_LENGTH+T.get(S.top).getHeight()/2+T.get(S.bottom).getHeight()/2)});var U=function(P,B){return{x:P.x-B.x,y:P.y-B.y}},K=function(P){var B=0,J=0;return P.forEach(function(Z){B+=v[g.get(Z)],J+=L[g.get(Z)]}),{x:B/P.size,y:J/P.size}},D=function(P,B,J,Z,at){function ct(lt,ot){var Lt=new Set(lt),ft=!0,st=!1,Xt=void 0;try{for(var Tt=ot[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var $t=Ct.value;Lt.add($t)}}catch(bt){st=!0,Xt=bt}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}return Lt}var nt=new Map;P.forEach(function(lt,ot){nt.set(ot,0)}),P.forEach(function(lt,ot){lt.forEach(function(Lt){nt.set(Lt.id,nt.get(Lt.id)+1)})});var tt=new Map,j=new Map,ut=new u;nt.forEach(function(lt,ot){lt==0?(ut.push(ot),J||(B=="horizontal"?tt.set(ot,g.has(ot)?v[g.get(ot)]:Z.get(ot)):tt.set(ot,g.has(ot)?L[g.get(ot)]:Z.get(ot)))):tt.set(ot,Number.NEGATIVE_INFINITY),J&&j.set(ot,new Set([ot]))}),J&&at.forEach(function(lt){var ot=[];if(lt.forEach(function(st){J.has(st)&&ot.push(st)}),ot.length>0){var Lt=0;ot.forEach(function(st){B=="horizontal"?(tt.set(st,g.has(st)?v[g.get(st)]:Z.get(st)),Lt+=tt.get(st)):(tt.set(st,g.has(st)?L[g.get(st)]:Z.get(st)),Lt+=tt.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){J.has(st)||tt.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){B=="horizontal"?ft+=g.has(st)?v[g.get(st)]:Z.get(st):ft+=g.has(st)?L[g.get(st)]:Z.get(st)}),ft=ft/lt.length,lt.forEach(function(st){tt.set(st,ft)})}});for(var Mt=function(){var ot=ut.shift(),Lt=P.get(ot);Lt.forEach(function(ft){if(tt.get(ft.id)<tt.get(ot)+ft.gap)if(J&&J.has(ft.id)){var st=void 0;if(B=="horizontal"?st=g.has(ft.id)?v[g.get(ft.id)]:Z.get(ft.id):st=g.has(ft.id)?L[g.get(ft.id)]:Z.get(ft.id),tt.set(ft.id,st),st<tt.get(ot)+ft.gap){var Xt=tt.get(ot)+ft.gap-st;j.get(ot).forEach(function(Tt){tt.set(Tt,tt.get(Tt)-Xt)})}}else tt.set(ft.id,tt.get(ot)+ft.gap);nt.set(ft.id,nt.get(ft.id)-1),nt.get(ft.id)==0&&ut.push(ft.id),J&&j.set(ft.id,ct(j.get(ot),j.get(ft.id)))})};ut.length!=0;)Mt();if(J){var pt=new Set;P.forEach(function(lt,ot){lt.length==0&&pt.add(ot)});var xt=[];j.forEach(function(lt,ot){if(pt.has(ot)){var Lt=!1,ft=!0,st=!1,Xt=void 0;try{for(var Tt=lt[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var $t=Ct.value;J.has($t)&&(Lt=!0)}}catch(St){st=!0,Xt=St}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}if(!Lt){var bt=!1,zt=void 0;xt.forEach(function(St,Zt){St.has([].concat(l(lt))[0])&&(bt=!0,zt=Zt)}),bt?lt.forEach(function(St){xt[zt].add(St)}):xt.push(new Set(lt))}}}),xt.forEach(function(lt,ot){var Lt=Number.POSITIVE_INFINITY,ft=Number.POSITIVE_INFINITY,st=Number.NEGATIVE_INFINITY,Xt=Number.NEGATIVE_INFINITY,Tt=!0,Ct=!1,$t=void 0;try{for(var bt=lt[Symbol.iterator](),zt;!(Tt=(zt=bt.next()).done);Tt=!0){var St=zt.value,Zt=void 0;B=="horizontal"?Zt=g.has(St)?v[g.get(St)]:Z.get(St):Zt=g.has(St)?L[g.get(St)]:Z.get(St);var Kt=tt.get(St);Zt<Lt&&(Lt=Zt),Zt>st&&(st=Zt),Kt<ft&&(ft=Kt),Kt>Xt&&(Xt=Kt)}}catch(ee){Ct=!0,$t=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw $t}}var fe=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),ne;!(Qt=(ne=Jt.next()).done);Qt=!0){var te=ne.value;tt.set(te,tt.get(te)+fe)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return tt},it=function(P){var B=0,J=0,Z=0,at=0;if(P.forEach(function(j){j.left?v[g.get(j.left)]-v[g.get(j.right)]>=0?B++:J++:L[g.get(j.top)]-L[g.get(j.bottom)]>=0?Z++:at++}),B>J&&Z>at)for(var ct=0;ct<g.size;ct++)v[ct]=-1*v[ct],L[ct]=-1*L[ct];else if(B>J)for(var nt=0;nt<g.size;nt++)v[nt]=-1*v[nt];else if(Z>at)for(var tt=0;tt<g.size;tt++)L[tt]=-1*L[tt]},n=function(P){var B=[],J=new u,Z=new Set,at=0;return P.forEach(function(ct,nt){if(!Z.has(nt)){B[at]=[];var tt=nt;for(J.push(tt),Z.add(tt),B[at].push(tt);J.length!=0;){tt=J.shift();var j=P.get(tt);j.forEach(function(ut){Z.has(ut.id)||(J.push(ut.id),Z.add(ut.id),B[at].push(ut.id))})}at++}}),B},m=function(P){var B=new Map;return P.forEach(function(J,Z){B.set(Z,[])}),P.forEach(function(J,Z){J.forEach(function(at){B.get(Z).push(at),B.get(at.id).push({id:Z,gap:at.gap,direction:at.direction})})}),B},p=function(P){var B=new Map;return P.forEach(function(J,Z){B.set(Z,[])}),P.forEach(function(J,Z){J.forEach(function(at){B.get(at.id).push({id:Z,gap:at.gap,direction:at.direction})})}),B},E=[],y=[],I=!1,w=!1,R=new Set,W=new Map,x=new Map,q=[];if(f.fixedNodeConstraint&&f.fixedNodeConstraint.forEach(function(S){R.add(S.nodeId)}),f.relativePlacementConstraint&&(f.relativePlacementConstraint.forEach(function(S){S.left?(W.has(S.left)?W.get(S.left).push({id:S.right,gap:S.gap,direction:"horizontal"}):W.set(S.left,[{id:S.right,gap:S.gap,direction:"horizontal"}]),W.has(S.right)||W.set(S.right,[])):(W.has(S.top)?W.get(S.top).push({id:S.bottom,gap:S.gap,direction:"vertical"}):W.set(S.top,[{id:S.bottom,gap:S.gap,direction:"vertical"}]),W.has(S.bottom)||W.set(S.bottom,[]))}),x=m(W),q=n(x)),i.TRANSFORM_ON_CONSTRAINT_HANDLING){if(f.fixedNodeConstraint&&f.fixedNodeConstraint.length>1)f.fixedNodeConstraint.forEach(function(S,P){E[P]=[S.position.x,S.position.y],y[P]=[v[g.get(S.nodeId)],L[g.get(S.nodeId)]]}),I=!0;else if(f.alignmentConstraint)(function(){var S=0;if(f.alignmentConstraint.vertical){for(var P=f.alignmentConstraint.vertical,B=function(tt){var j=new Set;P[tt].forEach(function(pt){j.add(pt)});var ut=new Set([].concat(l(j)).filter(function(pt){return R.has(pt)})),Mt=void 0;ut.size>0?Mt=v[g.get(ut.values().next().value)]:Mt=K(j).x,P[tt].forEach(function(pt){E[S]=[Mt,L[g.get(pt)]],y[S]=[v[g.get(pt)],L[g.get(pt)]],S++})},J=0;J<P.length;J++)B(J);I=!0}if(f.alignmentConstraint.horizontal){for(var Z=f.alignmentConstraint.horizontal,at=function(tt){var j=new Set;Z[tt].forEach(function(pt){j.add(pt)});var ut=new Set([].concat(l(j)).filter(function(pt){return R.has(pt)})),Mt=void 0;ut.size>0?Mt=v[g.get(ut.values().next().value)]:Mt=K(j).y,Z[tt].forEach(function(pt){E[S]=[v[g.get(pt)],Mt],y[S]=[v[g.get(pt)],L[g.get(pt)]],S++})},ct=0;ct<Z.length;ct++)at(ct);I=!0}f.relativePlacementConstraint&&(w=!0)})();else if(f.relativePlacementConstraint){for(var V=0,Y=0,et=0;et<q.length;et++)q[et].length>V&&(V=q[et].length,Y=et);if(V<x.size/2)it(f.relativePlacementConstraint),I=!1,w=!1;else{var z=new Map,O=new Map,H=[];q[Y].forEach(function(S){W.get(S).forEach(function(P){P.direction=="horizontal"?(z.has(S)?z.get(S).push(P):z.set(S,[P]),z.has(P.id)||z.set(P.id,[]),H.push({left:S,right:P.id})):(O.has(S)?O.get(S).push(P):O.set(S,[P]),O.has(P.id)||O.set(P.id,[]),H.push({top:S,bottom:P.id}))})}),it(H),w=!1;var $=D(z,"horizontal"),_=D(O,"vertical");q[Y].forEach(function(S,P){y[P]=[v[g.get(S)],L[g.get(S)]],E[P]=[],$.has(S)?E[P][0]=$.get(S):E[P][0]=v[g.get(S)],_.has(S)?E[P][1]=_.get(S):E[P][1]=L[g.get(S)]}),I=!0}}if(I){for(var ht=void 0,Q=t.transpose(E),It=t.transpose(y),Nt=0;Nt<Q.length;Nt++)Q[Nt]=t.multGamma(Q[Nt]),It[Nt]=t.multGamma(It[Nt]);var vt=t.multMat(Q,t.transpose(It)),rt=o.svd(vt);ht=t.multMat(rt.V,t.transpose(rt.U));for(var gt=0;gt<g.size;gt++){var mt=[v[gt],L[gt]],At=[ht[0][0],ht[1][0]],Ot=[ht[0][1],ht[1][1]];v[gt]=t.dotProduct(mt,At),L[gt]=t.dotProduct(mt,Ot)}w&&it(f.relativePlacementConstraint)}}if(i.ENFORCE_CONSTRAINTS){if(f.fixedNodeConstraint&&f.fixedNodeConstraint.length>0){var Et={x:0,y:0};f.fixedNodeConstraint.forEach(function(S,P){var B={x:v[g.get(S.nodeId)],y:L[g.get(S.nodeId)]},J=S.position,Z=U(J,B);Et.x+=Z.x,Et.y+=Z.y}),Et.x/=f.fixedNodeConstraint.length,Et.y/=f.fixedNodeConstraint.length,v.forEach(function(S,P){v[P]+=Et.x}),L.forEach(function(S,P){L[P]+=Et.y}),f.fixedNodeConstraint.forEach(function(S){v[g.get(S.nodeId)]=S.position.x,L[g.get(S.nodeId)]=S.position.y})}if(f.alignmentConstraint){if(f.alignmentConstraint.vertical)for(var Dt=f.alignmentConstraint.vertical,Rt=function(P){var B=new Set;Dt[P].forEach(function(at){B.add(at)});var J=new Set([].concat(l(B)).filter(function(at){return R.has(at)})),Z=void 0;J.size>0?Z=v[g.get(J.values().next().value)]:Z=K(B).x,B.forEach(function(at){R.has(at)||(v[g.get(at)]=Z)})},Ht=0;Ht<Dt.length;Ht++)Rt(Ht);if(f.alignmentConstraint.horizontal)for(var Ut=f.alignmentConstraint.horizontal,Pt=function(P){var B=new Set;Ut[P].forEach(function(at){B.add(at)});var J=new Set([].concat(l(B)).filter(function(at){return R.has(at)})),Z=void 0;J.size>0?Z=L[g.get(J.values().next().value)]:Z=K(B).y,B.forEach(function(at){R.has(at)||(L[g.get(at)]=Z)})},Ft=0;Ft<Ut.length;Ft++)Pt(Ft)}f.relativePlacementConstraint&&(function(){var S=new Map,P=new Map,B=new Map,J=new Map,Z=new Map,at=new Map,ct=new Set,nt=new Set;if(R.forEach(function(Gt){ct.add(Gt),nt.add(Gt)}),f.alignmentConstraint){if(f.alignmentConstraint.vertical)for(var tt=f.alignmentConstraint.vertical,j=function(yt){B.set("dummy"+yt,[]),tt[yt].forEach(function(wt){S.set(wt,"dummy"+yt),B.get("dummy"+yt).push(wt),R.has(wt)&&ct.add("dummy"+yt)}),Z.set("dummy"+yt,v[g.get(tt[yt][0])])},ut=0;ut<tt.length;ut++)j(ut);if(f.alignmentConstraint.horizontal)for(var Mt=f.alignmentConstraint.horizontal,pt=function(yt){J.set("dummy"+yt,[]),Mt[yt].forEach(function(wt){P.set(wt,"dummy"+yt),J.get("dummy"+yt).push(wt),R.has(wt)&&nt.add("dummy"+yt)}),at.set("dummy"+yt,L[g.get(Mt[yt][0])])},xt=0;xt<Mt.length;xt++)pt(xt)}var lt=new Map,ot=new Map,Lt=function(yt){W.get(yt).forEach(function(wt){var kt=void 0,Bt=void 0;wt.direction=="horizontal"?(kt=S.get(yt)?S.get(yt):yt,S.get(wt.id)?Bt={id:S.get(wt.id),gap:wt.gap,direction:wt.direction}:Bt=wt,lt.has(kt)?lt.get(kt).push(Bt):lt.set(kt,[Bt]),lt.has(Bt.id)||lt.set(Bt.id,[])):(kt=P.get(yt)?P.get(yt):yt,P.get(wt.id)?Bt={id:P.get(wt.id),gap:wt.gap,direction:wt.direction}:Bt=wt,ot.has(kt)?ot.get(kt).push(Bt):ot.set(kt,[Bt]),ot.has(Bt.id)||ot.set(Bt.id,[]))})},ft=!0,st=!1,Xt=void 0;try{for(var Tt=W.keys()[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var $t=Ct.value;Lt($t)}}catch(Gt){st=!0,Xt=Gt}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}var bt=m(lt),zt=m(ot),St=n(bt),Zt=n(zt),Kt=p(lt),fe=p(ot),Qt=[],jt=[];St.forEach(function(Gt,yt){Qt[yt]=[],Gt.forEach(function(wt){Kt.get(wt).length==0&&Qt[yt].push(wt)})}),Zt.forEach(function(Gt,yt){jt[yt]=[],Gt.forEach(function(wt){fe.get(wt).length==0&&jt[yt].push(wt)})});var _t=D(lt,"horizontal",ct,Z,Qt),Jt=D(ot,"vertical",nt,at,jt),ne=function(yt){B.get(yt)?B.get(yt).forEach(function(wt){v[g.get(wt)]=_t.get(yt)}):v[g.get(yt)]=_t.get(yt)},te=!0,ee=!1,Te=void 0;try{for(var ce=_t.keys()[Symbol.iterator](),Ne;!(te=(Ne=ce.next()).done);te=!0){var ge=Ne.value;ne(ge)}}catch(Gt){ee=!0,Te=Gt}finally{try{!te&&ce.return&&ce.return()}finally{if(ee)throw Te}}var $e=function(yt){J.get(yt)?J.get(yt).forEach(function(wt){L[g.get(wt)]=Jt.get(yt)}):L[g.get(yt)]=Jt.get(yt)},ue=!0,Le=!1,Ce=void 0;try{for(var de=Jt.keys()[Symbol.iterator](),Ae;!(ue=(Ae=de.next()).done);ue=!0){var ge=Ae.value;$e(ge)}}catch(Gt){Le=!0,Ce=Gt}finally{try{!ue&&de.return&&de.return()}finally{if(Le)throw Ce}}})()}for(var Yt=0;Yt<F.length;Yt++){var Vt=F[Yt];Vt.getChild()==null&&Vt.setCenter(v[g.get(Vt.id)],L[g.get(Vt.id)])}},a.exports=s}),551:(a=>{a.exports=M})},N={};function d(a){var e=N[a];if(e!==void 0)return e.exports;var r=N[a]={exports:{}};return G[a](r,r.exports,d),r.exports}var h=d(45);return h})()})})(he)),he.exports}var vr=se.exports,Oe;function pr(){return Oe||(Oe=1,(function(C,X){(function(G,N){C.exports=N(dr())})(vr,function(M){return(()=>{var G={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var r=arguments.length,l=Array(r>1?r-1:0),i=1;i<r;i++)l[i-1]=arguments[i];return l.forEach(function(u){Object.keys(u).forEach(function(t){return e[t]=u[t]})}),e}}),548:((a,e,r)=>{var l=(function(){function t(o,s){var c=[],f=!0,T=!1,g=void 0;try{for(var v=o[Symbol.iterator](),L;!(f=(L=v.next()).done)&&(c.push(L.value),!(s&&c.length===s));f=!0);}catch(F){T=!0,g=F}finally{try{!f&&v.return&&v.return()}finally{if(T)throw g}}return c}return function(o,s){if(Array.isArray(o))return o;if(Symbol.iterator in Object(o))return t(o,s);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),i=r(140).layoutBase.LinkedList,u={};u.getTopMostNodes=function(t){for(var o={},s=0;s<t.length;s++)o[t[s].id()]=!0;var c=t.filter(function(f,T){typeof f=="number"&&(f=T);for(var g=f.parent()[0];g!=null;){if(o[g.id()])return!1;g=g.parent()[0]}return!0});return c},u.connectComponents=function(t,o,s,c){var f=new i,T=new Set,g=[],v=void 0,L=void 0,F=void 0,A=!1,b=1,k=[],U=[],K=function(){var it=t.collection();U.push(it);var n=s[0],m=t.collection();m.merge(n).merge(n.descendants().intersection(o)),g.push(n),m.forEach(function(y){f.push(y),T.add(y),it.merge(y)});for(var p=function(){n=f.shift();var I=t.collection();n.neighborhood().nodes().forEach(function(x){o.intersection(n.edgesWith(x)).length>0&&I.merge(x)});for(var w=0;w<I.length;w++){var R=I[w];if(v=s.intersection(R.union(R.ancestors())),v!=null&&!T.has(v[0])){var W=v.union(v.descendants());W.forEach(function(x){f.push(x),T.add(x),it.merge(x),s.has(x)&&g.push(x)})}}};f.length!=0;)p();if(it.forEach(function(y){o.intersection(y.connectedEdges()).forEach(function(I){it.has(I.source())&&it.has(I.target())&&it.merge(I)})}),g.length==s.length&&(A=!0),!A||A&&b>1){L=g[0],F=L.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length<F&&(F=y.connectedEdges().length,L=y)}),k.push(L.id());var E=t.collection();E.merge(g[0]),g.forEach(function(y){E.merge(y)}),g=[],s=s.difference(E),b++}};do K();while(!A);return c&&k.length>0&&c.set("dummy"+(c.size+1),k),U},u.relocateComponent=function(t,o,s){if(!s.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,f=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(s.quality=="draft"){var v=!0,L=!1,F=void 0;try{for(var A=o.nodeIndexes[Symbol.iterator](),b;!(v=(b=A.next()).done);v=!0){var k=b.value,U=l(k,2),K=U[0],D=U[1],it=s.cy.getElementById(K);if(it){var n=it.boundingBox(),m=o.xCoords[D]-n.w/2,p=o.xCoords[D]+n.w/2,E=o.yCoords[D]-n.h/2,y=o.yCoords[D]+n.h/2;m<c&&(c=m),p>f&&(f=p),E<T&&(T=E),y>g&&(g=y)}}}catch(x){L=!0,F=x}finally{try{!v&&A.return&&A.return()}finally{if(L)throw F}}var I=t.x-(f+c)/2,w=t.y-(g+T)/2;o.xCoords=o.xCoords.map(function(x){return x+I}),o.yCoords=o.yCoords.map(function(x){return x+w})}else{Object.keys(o).forEach(function(x){var q=o[x],V=q.getRect().x,Y=q.getRect().x+q.getRect().width,et=q.getRect().y,z=q.getRect().y+q.getRect().height;V<c&&(c=V),Y>f&&(f=Y),et<T&&(T=et),z>g&&(g=z)});var R=t.x-(f+c)/2,W=t.y-(g+T)/2;Object.keys(o).forEach(function(x){var q=o[x];q.setCenter(q.getCenterX()+R,q.getCenterY()+W)})}}},u.calcBoundingBox=function(t,o,s,c){for(var f=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER,L=void 0,F=void 0,A=void 0,b=void 0,k=t.descendants().not(":parent"),U=k.length,K=0;K<U;K++){var D=k[K];L=o[c.get(D.id())]-D.width()/2,F=o[c.get(D.id())]+D.width()/2,A=s[c.get(D.id())]-D.height()/2,b=s[c.get(D.id())]+D.height()/2,f>L&&(f=L),T<F&&(T=F),g>A&&(g=A),v<b&&(v=b)}var it={};return it.topLeftX=f,it.topLeftY=g,it.width=T-f,it.height=v-g,it},u.calcParentsWithoutChildren=function(t,o){var s=t.collection();return o.nodes(":parent").forEach(function(c){var f=!1;c.children().forEach(function(T){T.css("display")!="none"&&(f=!0)}),f||s.merge(c)}),s},a.exports=u}),816:((a,e,r)=>{var l=r(548),i=r(140).CoSELayout,u=r(140).CoSENode,t=r(140).layoutBase.PointD,o=r(140).layoutBase.DimensionD,s=r(140).layoutBase.LayoutConstants,c=r(140).layoutBase.FDLayoutConstants,f=r(140).CoSEConstants,T=function(v,L){var F=v.cy,A=v.eles,b=A.nodes(),k=A.edges(),U=void 0,K=void 0,D=void 0,it={};v.randomize&&(U=L.nodeIndexes,K=L.xCoords,D=L.yCoords);var n=function(x){return typeof x=="function"},m=function(x,q){return n(x)?x(q):x},p=l.calcParentsWithoutChildren(F,A),E=function W(x,q,V,Y){for(var et=q.length,z=0;z<et;z++){var O=q[z],H=null;O.intersection(p).length==0&&(H=O.children());var $=void 0,_=O.layoutDimensions({nodeDimensionsIncludeLabels:Y.nodeDimensionsIncludeLabels});if(O.outerWidth()!=null&&O.outerHeight()!=null)if(Y.randomize)if(!O.isParent())$=x.add(new u(V.graphManager,new t(K[U.get(O.id())]-_.w/2,D[U.get(O.id())]-_.h/2),new o(parseFloat(_.w),parseFloat(_.h))));else{var ht=l.calcBoundingBox(O,K,D,U);O.intersection(p).length==0?$=x.add(new u(V.graphManager,new t(ht.topLeftX,ht.topLeftY),new o(ht.width,ht.height))):$=x.add(new u(V.graphManager,new t(ht.topLeftX,ht.topLeftY),new o(parseFloat(_.w),parseFloat(_.h))))}else $=x.add(new u(V.graphManager,new t(O.position("x")-_.w/2,O.position("y")-_.h/2),new o(parseFloat(_.w),parseFloat(_.h))));else $=x.add(new u(this.graphManager));if($.id=O.data("id"),$.nodeRepulsion=m(Y.nodeRepulsion,O),$.paddingLeft=parseInt(O.css("padding")),$.paddingTop=parseInt(O.css("padding")),$.paddingRight=parseInt(O.css("padding")),$.paddingBottom=parseInt(O.css("padding")),Y.nodeDimensionsIncludeLabels&&($.labelWidth=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,$.labelHeight=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,$.labelPosVertical=O.css("text-valign"),$.labelPosHorizontal=O.css("text-halign")),it[O.data("id")]=$,isNaN($.rect.x)&&($.rect.x=0),isNaN($.rect.y)&&($.rect.y=0),H!=null&&H.length>0){var Q=void 0;Q=V.getGraphManager().add(V.newGraph(),$),W(Q,H,V,Y)}}},y=function(x,q,V){for(var Y=0,et=0,z=0;z<V.length;z++){var O=V[z],H=it[O.data("source")],$=it[O.data("target")];if(H&&$&&H!==$&&H.getEdgesBetween($).length==0){var _=q.add(x.newEdge(),H,$);_.id=O.id(),_.idealLength=m(v.idealEdgeLength,O),_.edgeElasticity=m(v.edgeElasticity,O),Y+=_.idealLength,et++}}v.idealEdgeLength!=null&&(et>0?f.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=Y/et:n(v.idealEdgeLength)?f.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:f.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=v.idealEdgeLength,f.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,f.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,q){q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=q.fixedNodeConstraint),q.alignmentConstraint&&(x.constraints.alignmentConstraint=q.alignmentConstraint),q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=q.relativePlacementConstraint)};v.nestingFactor!=null&&(f.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=v.nestingFactor),v.gravity!=null&&(f.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=v.gravity),v.numIter!=null&&(f.MAX_ITERATIONS=c.MAX_ITERATIONS=v.numIter),v.gravityRange!=null&&(f.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=v.gravityRange),v.gravityCompound!=null&&(f.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=v.gravityCompound),v.gravityRangeCompound!=null&&(f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=v.gravityRangeCompound),v.initialEnergyOnIncremental!=null&&(f.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=v.initialEnergyOnIncremental),v.tilingCompareBy!=null&&(f.TILING_COMPARE_BY=v.tilingCompareBy),v.quality=="proof"?s.QUALITY=2:s.QUALITY=0,f.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=s.NODE_DIMENSIONS_INCLUDE_LABELS=v.nodeDimensionsIncludeLabels,f.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=s.DEFAULT_INCREMENTAL=!v.randomize,f.ANIMATE=c.ANIMATE=s.ANIMATE=v.animate,f.TILE=v.tile,f.TILING_PADDING_VERTICAL=typeof v.tilingPaddingVertical=="function"?v.tilingPaddingVertical.call():v.tilingPaddingVertical,f.TILING_PADDING_HORIZONTAL=typeof v.tilingPaddingHorizontal=="function"?v.tilingPaddingHorizontal.call():v.tilingPaddingHorizontal,f.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=s.DEFAULT_INCREMENTAL=!0,f.PURE_INCREMENTAL=!v.randomize,s.DEFAULT_UNIFORM_LEAF_NODE_SIZES=v.uniformNodeDimensions,v.step=="transformed"&&(f.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,f.ENFORCE_CONSTRAINTS=!1,f.APPLY_LAYOUT=!1),v.step=="enforced"&&(f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,f.ENFORCE_CONSTRAINTS=!0,f.APPLY_LAYOUT=!1),v.step=="cose"&&(f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,f.ENFORCE_CONSTRAINTS=!1,f.APPLY_LAYOUT=!0),v.step=="all"&&(v.randomize?f.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,f.ENFORCE_CONSTRAINTS=!0,f.APPLY_LAYOUT=!0),v.fixedNodeConstraint||v.alignmentConstraint||v.relativePlacementConstraint?f.TREE_REDUCTION_ON_INCREMENTAL=!1:f.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new i,R=w.newGraphManager();return E(R.addRoot(),l.getTopMostNodes(b),w,v),y(w,R,k),I(w,v),w.runLayout(),it};a.exports={coseLayout:T}}),212:((a,e,r)=>{var l=(function(){function v(L,F){for(var A=0;A<F.length;A++){var b=F[A];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(L,b.key,b)}}return function(L,F,A){return F&&v(L.prototype,F),A&&v(L,A),L}})();function i(v,L){if(!(v instanceof L))throw new TypeError("Cannot call a class as a function")}var u=r(658),t=r(548),o=r(657),s=o.spectralLayout,c=r(816),f=c.coseLayout,T=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(L){return 4500},idealEdgeLength:function(L){return 50},edgeElasticity:function(L){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),g=(function(){function v(L){i(this,v),this.options=u({},T,L)}return l(v,[{key:"run",value:function(){var F=this,A=this.options,b=A.cy,k=A.eles,U=[],K=[],D=void 0,it=[];A.fixedNodeConstraint&&(!Array.isArray(A.fixedNodeConstraint)||A.fixedNodeConstraint.length==0)&&(A.fixedNodeConstraint=void 0),A.alignmentConstraint&&(A.alignmentConstraint.vertical&&(!Array.isArray(A.alignmentConstraint.vertical)||A.alignmentConstraint.vertical.length==0)&&(A.alignmentConstraint.vertical=void 0),A.alignmentConstraint.horizontal&&(!Array.isArray(A.alignmentConstraint.horizontal)||A.alignmentConstraint.horizontal.length==0)&&(A.alignmentConstraint.horizontal=void 0)),A.relativePlacementConstraint&&(!Array.isArray(A.relativePlacementConstraint)||A.relativePlacementConstraint.length==0)&&(A.relativePlacementConstraint=void 0);var n=A.fixedNodeConstraint||A.alignmentConstraint||A.relativePlacementConstraint;n&&(A.tile=!1,A.packComponents=!1);var m=void 0,p=!1;if(b.layoutUtilities&&A.packComponents&&(m=b.layoutUtilities("get"),m||(m=b.layoutUtilities()),p=!0),k.nodes().length>0)if(p){var I=t.getTopMostNodes(A.eles.nodes());if(D=t.connectComponents(b,A.eles,I),D.forEach(function(vt){var rt=vt.boundingBox();it.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2})}),A.randomize&&D.forEach(function(vt){A.eles=vt,U.push(s(A))}),A.quality=="default"||A.quality=="proof"){var w=b.collection();if(A.tile){var R=new Map,W=[],x=[],q=0,V={nodeIndexes:R,xCoords:W,yCoords:x},Y=[];if(D.forEach(function(vt,rt){vt.edges().length==0&&(vt.nodes().forEach(function(gt,mt){w.merge(vt.nodes()[mt]),gt.isParent()||(V.nodeIndexes.set(vt.nodes()[mt].id(),q++),V.xCoords.push(vt.nodes()[0].position().x),V.yCoords.push(vt.nodes()[0].position().y))}),Y.push(rt))}),w.length>1){var et=w.boundingBox();it.push({x:et.x1+et.w/2,y:et.y1+et.h/2}),D.push(w),U.push(V);for(var z=Y.length-1;z>=0;z--)D.splice(Y[z],1),U.splice(Y[z],1),it.splice(Y[z],1)}}D.forEach(function(vt,rt){A.eles=vt,K.push(f(A,U[rt])),t.relocateComponent(it[rt],K[rt],A)})}else D.forEach(function(vt,rt){t.relocateComponent(it[rt],U[rt],A)});var O=new Set;if(D.length>1){var H=[],$=k.filter(function(vt){return vt.css("display")=="none"});D.forEach(function(vt,rt){var gt=void 0;if(A.quality=="draft"&&(gt=U[rt].nodeIndexes),vt.nodes().not($).length>0){var mt={};mt.edges=[],mt.nodes=[];var At=void 0;vt.nodes().not($).forEach(function(Ot){if(A.quality=="draft")if(!Ot.isParent())At=gt.get(Ot.id()),mt.nodes.push({x:U[rt].xCoords[At]-Ot.boundingbox().w/2,y:U[rt].yCoords[At]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var Et=t.calcBoundingBox(Ot,U[rt].xCoords,U[rt].yCoords,gt);mt.nodes.push({x:Et.topLeftX,y:Et.topLeftY,width:Et.width,height:Et.height})}else K[rt][Ot.id()]&&mt.nodes.push({x:K[rt][Ot.id()].getLeft(),y:K[rt][Ot.id()].getTop(),width:K[rt][Ot.id()].getWidth(),height:K[rt][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var Et=Ot.source(),Dt=Ot.target();if(Et.css("display")!="none"&&Dt.css("display")!="none")if(A.quality=="draft"){var Rt=gt.get(Et.id()),Ht=gt.get(Dt.id()),Ut=[],Pt=[];if(Et.isParent()){var Ft=t.calcBoundingBox(Et,U[rt].xCoords,U[rt].yCoords,gt);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(U[rt].xCoords[Rt]),Ut.push(U[rt].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,U[rt].xCoords,U[rt].yCoords,gt);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(U[rt].xCoords[Ht]),Pt.push(U[rt].yCoords[Ht]);mt.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else K[rt][Et.id()]&&K[rt][Dt.id()]&&mt.edges.push({startX:K[rt][Et.id()].getCenterX(),startY:K[rt][Et.id()].getCenterY(),endX:K[rt][Dt.id()].getCenterX(),endY:K[rt][Dt.id()].getCenterY()})}),mt.nodes.length>0&&(H.push(mt),O.add(rt))}});var _=m.packComponents(H,A.randomize).shifts;if(A.quality=="draft")U.forEach(function(vt,rt){var gt=vt.xCoords.map(function(At){return At+_[rt].dx}),mt=vt.yCoords.map(function(At){return At+_[rt].dy});vt.xCoords=gt,vt.yCoords=mt});else{var ht=0;O.forEach(function(vt){Object.keys(K[vt]).forEach(function(rt){var gt=K[vt][rt];gt.setCenter(gt.getCenterX()+_[ht].dx,gt.getCenterY()+_[ht].dy)}),ht++})}}}else{var E=A.eles.boundingBox();if(it.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),A.randomize){var y=s(A);U.push(y)}A.quality=="default"||A.quality=="proof"?(K.push(f(A,U[0])),t.relocateComponent(it[0],K[0],A)):t.relocateComponent(it[0],U[0],A)}var Q=function(rt,gt){if(A.quality=="default"||A.quality=="proof"){typeof rt=="number"&&(rt=gt);var mt=void 0,At=void 0,Ot=rt.data("id");return K.forEach(function(Dt){Ot in Dt&&(mt={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},At=Dt[Ot])}),A.nodeDimensionsIncludeLabels&&(At.labelWidth&&(At.labelPosHorizontal=="left"?mt.x+=At.labelWidth/2:At.labelPosHorizontal=="right"&&(mt.x-=At.labelWidth/2)),At.labelHeight&&(At.labelPosVertical=="top"?mt.y+=At.labelHeight/2:At.labelPosVertical=="bottom"&&(mt.y-=At.labelHeight/2))),mt==null&&(mt={x:rt.position("x"),y:rt.position("y")}),{x:mt.x,y:mt.y}}else{var Et=void 0;return U.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(rt.id());Rt!=null&&(Et={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),Et==null&&(Et={x:rt.position("x"),y:rt.position("y")}),{x:Et.x,y:Et.y}}};if(A.quality=="default"||A.quality=="proof"||A.randomize){var It=t.calcParentsWithoutChildren(b,k),Nt=k.filter(function(vt){return vt.css("display")=="none"});A.eles=k.not(Nt),k.nodes().not(":parent").not(Nt).layoutPositions(F,A,Q),It.length>0&&It.forEach(function(vt){vt.position(Q(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),v})();a.exports=g}),657:((a,e,r)=>{var l=r(548),i=r(140).layoutBase.Matrix,u=r(140).layoutBase.SVD,t=function(s){var c=s.cy,f=s.eles,T=f.nodes(),g=f.nodes(":parent"),v=new Map,L=new Map,F=new Map,A=[],b=[],k=[],U=[],K=[],D=[],it=[],n=[],m=void 0,p=1e8,E=1e-9,y=s.piTol,I=s.samplingType,w=s.nodeSeparation,R=void 0,W=function(){for(var P=0,B=0,J=!1;B<R;){P=Math.floor(Math.random()*m),J=!1;for(var Z=0;Z<B;Z++)if(U[Z]==P){J=!0;break}if(!J)U[B]=P,B++;else continue}},x=function(P,B,J){for(var Z=[],at=0,ct=0,nt=0,tt=void 0,j=[],ut=0,Mt=1,pt=0;pt<m;pt++)j[pt]=p;for(Z[ct]=P,j[P]=0;ct>=at;){nt=Z[at++];for(var xt=A[nt],lt=0;lt<xt.length;lt++)tt=L.get(xt[lt]),j[tt]==p&&(j[tt]=j[nt]+1,Z[++ct]=tt);D[nt][B]=j[nt]*w}if(J){for(var ot=0;ot<m;ot++)D[ot][B]<K[ot]&&(K[ot]=D[ot][B]);for(var Lt=0;Lt<m;Lt++)K[Lt]>ut&&(ut=K[Lt],Mt=Lt)}return Mt},q=function(P){var B=void 0;if(P){B=Math.floor(Math.random()*m);for(var Z=0;Z<m;Z++)K[Z]=p;for(var at=0;at<R;at++)U[at]=B,B=x(B,at,P)}else{W();for(var J=0;J<R;J++)x(U[J],J,P)}for(var ct=0;ct<m;ct++)for(var nt=0;nt<R;nt++)D[ct][nt]*=D[ct][nt];for(var tt=0;tt<R;tt++)it[tt]=[];for(var j=0;j<R;j++)for(var ut=0;ut<R;ut++)it[j][ut]=D[U[ut]][j]},V=function(){for(var P=u.svd(it),B=P.S,J=P.U,Z=P.V,at=B[0]*B[0]*B[0],ct=[],nt=0;nt<R;nt++){ct[nt]=[];for(var tt=0;tt<R;tt++)ct[nt][tt]=0,nt==tt&&(ct[nt][tt]=B[nt]/(B[nt]*B[nt]+at/(B[nt]*B[nt])))}n=i.multMat(i.multMat(Z,ct),i.transpose(J))},Y=function(){for(var P=void 0,B=void 0,J=[],Z=[],at=[],ct=[],nt=0;nt<m;nt++)J[nt]=Math.random(),Z[nt]=Math.random();J=i.normalize(J),Z=i.normalize(Z);for(var tt=E,j=E,ut=void 0;;){for(var Mt=0;Mt<m;Mt++)at[Mt]=J[Mt];if(J=i.multGamma(i.multL(i.multGamma(at),D,n)),P=i.dotProduct(at,J),J=i.normalize(J),tt=i.dotProduct(at,J),ut=Math.abs(tt/j),ut<=1+y&&ut>=1)break;j=tt}for(var pt=0;pt<m;pt++)at[pt]=J[pt];for(j=E;;){for(var xt=0;xt<m;xt++)ct[xt]=Z[xt];if(ct=i.minusOp(ct,i.multCons(at,i.dotProduct(at,ct))),Z=i.multGamma(i.multL(i.multGamma(ct),D,n)),B=i.dotProduct(ct,Z),Z=i.normalize(Z),tt=i.dotProduct(ct,Z),ut=Math.abs(tt/j),ut<=1+y&&ut>=1)break;j=tt}for(var lt=0;lt<m;lt++)ct[lt]=Z[lt];b=i.multCons(at,Math.sqrt(Math.abs(P))),k=i.multCons(ct,Math.sqrt(Math.abs(B)))};l.connectComponents(c,f,l.getTopMostNodes(T),v),g.forEach(function(S){l.connectComponents(c,f,l.getTopMostNodes(S.descendants().intersection(f)),v)});for(var et=0,z=0;z<T.length;z++)T[z].isParent()||L.set(T[z].id(),et++);var O=!0,H=!1,$=void 0;try{for(var _=v.keys()[Symbol.iterator](),ht;!(O=(ht=_.next()).done);O=!0){var Q=ht.value;L.set(Q,et++)}}catch(S){H=!0,$=S}finally{try{!O&&_.return&&_.return()}finally{if(H)throw $}}for(var It=0;It<L.size;It++)A[It]=[];g.forEach(function(S){for(var P=S.children().intersection(f);P.nodes(":childless").length==0;)P=P.nodes()[0].children().intersection(f);var B=0,J=P.nodes(":childless")[0].connectedEdges().length;P.nodes(":childless").forEach(function(Z,at){Z.connectedEdges().length<J&&(J=Z.connectedEdges().length,B=at)}),F.set(S.id(),P.nodes(":childless")[B].id())}),T.forEach(function(S){var P=void 0;S.isParent()?P=L.get(F.get(S.id())):P=L.get(S.id()),S.neighborhood().nodes().forEach(function(B){f.intersection(S.edgesWith(B)).length>0&&(B.isParent()?A[P].push(F.get(B.id())):A[P].push(B.id()))})});var Nt=function(P){var B=L.get(P),J=void 0;v.get(P).forEach(function(Z){c.getElementById(Z).isParent()?J=F.get(Z):J=Z,A[B].push(J),A[L.get(J)].push(P)})},vt=!0,rt=!1,gt=void 0;try{for(var mt=v.keys()[Symbol.iterator](),At;!(vt=(At=mt.next()).done);vt=!0){var Ot=At.value;Nt(Ot)}}catch(S){rt=!0,gt=S}finally{try{!vt&&mt.return&&mt.return()}finally{if(rt)throw gt}}m=L.size;var Et=void 0;if(m>2){R=m<s.sampleSize?m:s.sampleSize;for(var Dt=0;Dt<m;Dt++)D[Dt]=[];for(var Rt=0;Rt<R;Rt++)n[Rt]=[];return s.quality=="draft"||s.step=="all"?(q(I),V(),Y(),Et={nodeIndexes:L,xCoords:b,yCoords:k}):(L.forEach(function(S,P){b.push(c.getElementById(P).position("x")),k.push(c.getElementById(P).position("y"))}),Et={nodeIndexes:L,xCoords:b,yCoords:k}),Et}else{var Ht=L.keys(),Ut=c.getElementById(Ht.next().value),Pt=Ut.position(),Ft=Ut.outerWidth();if(b.push(Pt.x),k.push(Pt.y),m==2){var Yt=c.getElementById(Ht.next().value),Vt=Yt.outerWidth();b.push(Pt.x+Ft/2+Vt/2+s.idealEdgeLength),k.push(Pt.y)}return Et={nodeIndexes:L,xCoords:b,yCoords:k},Et}};a.exports={spectralLayout:t}}),579:((a,e,r)=>{var l=r(212),i=function(t){t&&t("layout","fcose",l)};typeof cytoscape<"u"&&i(cytoscape),a.exports=i}),140:(a=>{a.exports=M})},N={};function d(a){var e=N[a];if(e!==void 0)return e.exports;var r=N[a]={exports:{}};return G[a](r,r.exports,d),r.exports}var h=d(579);return h})()})})(se)),se.exports}var yr=pr();const Er=fr(yr);var De={L:"left",R:"right",T:"top",B:"bottom"},xe={L:dt(C=>`${C},${C/2} 0,${C} 0,0`,"L"),R:dt(C=>`0,${C/2} ${C},0 ${C},${C}`,"R"),T:dt(C=>`0,0 ${C},0 ${C/2},${C}`,"T"),B:dt(C=>`${C/2},0 ${C},${C} 0,${C}`,"B")},oe={L:dt((C,X)=>C-X+2,"L"),R:dt((C,X)=>C-2,"R"),T:dt((C,X)=>C-X+2,"T"),B:dt((C,X)=>C-2,"B")},mr=dt(function(C){return Wt(C)?C==="L"?"R":"L":C==="T"?"B":"T"},"getOppositeArchitectureDirection"),Ie=dt(function(C){const X=C;return X==="L"||X==="R"||X==="T"||X==="B"},"isArchitectureDirection"),Wt=dt(function(C){const X=C;return X==="L"||X==="R"},"isArchitectureDirectionX"),qt=dt(function(C){const X=C;return X==="T"||X==="B"},"isArchitectureDirectionY"),me=dt(function(C,X){const M=Wt(C)&&qt(X),G=qt(C)&&Wt(X);return M||G},"isArchitectureDirectionXY"),Tr=dt(function(C){const X=C[0],M=C[1],G=Wt(X)&&qt(M),N=qt(X)&&Wt(M);return G||N},"isArchitecturePairXY"),Nr=dt(function(C){return C!=="LL"&&C!=="RR"&&C!=="TT"&&C!=="BB"},"isValidArchitectureDirectionPair"),pe=dt(function(C,X){const M=`${C}${X}`;return Nr(M)?M:void 0},"getArchitectureDirectionPair"),Lr=dt(function([C,X],M){const G=M[0],N=M[1];return Wt(G)?qt(N)?[C+(G==="L"?-1:1),X+(N==="T"?1:-1)]:[C+(G==="L"?-1:1),X]:Wt(N)?[C+(N==="L"?1:-1),X+(G==="T"?1:-1)]:[C,X+(G==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Cr=dt(function(C){return C==="LT"||C==="TL"?[1,1]:C==="BL"||C==="LB"?[1,-1]:C==="BR"||C==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ar=dt(function(C,X){return me(C,X)?"bend":Wt(C)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Mr=dt(function(C){return C.type==="service"},"isArchitectureService"),wr=dt(function(C){return C.type==="junction"},"isArchitectureJunction"),Fe=dt(C=>C.data(),"edgeData"),ie=dt(C=>C.data(),"nodeData"),Or=rr.architecture,be=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.setAccTitle=ke,this.getAccTitle=qe,this.setDiagramTitle=Qe,this.getDiagramTitle=Je,this.getAccDescription=Ke,this.setAccDescription=je,this.clear()}static{dt(this,"ArchitectureDB")}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},_e()}addService({id:C,icon:X,in:M,title:G,iconText:N}){if(this.registeredIds[C]!==void 0)throw new Error(`The service id [${C}] is already in use by another ${this.registeredIds[C]}`);if(M!==void 0){if(C===M)throw new Error(`The service [${C}] cannot be placed within itself`);if(this.registeredIds[M]===void 0)throw new Error(`The service [${C}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[M]==="node")throw new Error(`The service [${C}]'s parent is not a group`)}this.registeredIds[C]="node",this.nodes[C]={id:C,type:"service",icon:X,iconText:N,title:G,edges:[],in:M}}getServices(){return Object.values(this.nodes).filter(Mr)}addJunction({id:C,in:X}){this.registeredIds[C]="node",this.nodes[C]={id:C,type:"junction",edges:[],in:X}}getJunctions(){return Object.values(this.nodes).filter(wr)}getNodes(){return Object.values(this.nodes)}getNode(C){return this.nodes[C]??null}addGroup({id:C,icon:X,in:M,title:G}){if(this.registeredIds?.[C]!==void 0)throw new Error(`The group id [${C}] is already in use by another ${this.registeredIds[C]}`);if(M!==void 0){if(C===M)throw new Error(`The group [${C}] cannot be placed within itself`);if(this.registeredIds?.[M]===void 0)throw new Error(`The group [${C}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[M]==="node")throw new Error(`The group [${C}]'s parent is not a group`)}this.registeredIds[C]="group",this.groups[C]={id:C,icon:X,title:G,in:M}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:C,rhsId:X,lhsDir:M,rhsDir:G,lhsInto:N,rhsInto:d,lhsGroup:h,rhsGroup:a,title:e}){if(!Ie(M))throw new Error(`Invalid direction given for left hand side of edge ${C}--${X}. Expected (L,R,T,B) got ${String(M)}`);if(!Ie(G))throw new Error(`Invalid direction given for right hand side of edge ${C}--${X}. Expected (L,R,T,B) got ${String(G)}`);if(this.nodes[C]===void 0&&this.groups[C]===void 0)throw new Error(`The left-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[X]===void 0&&this.groups[X]===void 0)throw new Error(`The right-hand id [${X}] does not yet exist. Please create the service/group before declaring an edge to it.`);const r=this.nodes[C].in,l=this.nodes[X].in;if(h&&r&&l&&r==l)throw new Error(`The left-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(a&&r&&l&&r==l)throw new Error(`The right-hand id [${X}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const i={lhsId:C,lhsDir:M,lhsInto:N,lhsGroup:h,rhsId:X,rhsDir:G,rhsInto:d,rhsGroup:a,title:e};this.edges.push(i),this.nodes[C]&&this.nodes[X]&&(this.nodes[C].edges.push(this.edges[this.edges.length-1]),this.nodes[X].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const C={},X=Object.entries(this.nodes).reduce((a,[e,r])=>(a[e]=r.edges.reduce((l,i)=>{const u=this.getNode(i.lhsId)?.in,t=this.getNode(i.rhsId)?.in;if(u&&t&&u!==t){const o=Ar(i.lhsDir,i.rhsDir);o!=="bend"&&(C[u]??={},C[u][t]=o,C[t]??={},C[t][u]=o)}if(i.lhsId===e){const o=pe(i.lhsDir,i.rhsDir);o&&(l[o]=i.rhsId)}else{const o=pe(i.rhsDir,i.lhsDir);o&&(l[o]=i.lhsId)}return l},{}),a),{}),M=Object.keys(X)[0],G={[M]:1},N=Object.keys(X).reduce((a,e)=>e===M?a:{...a,[e]:1},{}),d=dt(a=>{const e={[a]:[0,0]},r=[a];for(;r.length>0;){const l=r.shift();if(l){G[l]=1,delete N[l];const i=X[l],[u,t]=e[l];Object.entries(i).forEach(([o,s])=>{G[s]||(e[s]=Lr([u,t],o),r.push(s))})}}return e},"BFS"),h=[d(M)];for(;Object.keys(N).length>0;)h.push(d(Object.keys(N)[0]));this.dataStructures={adjList:X,spatialMaps:h,groupAlignments:C}}return this.dataStructures}setElementForId(C,X){this.elements[C]=X}getElementById(C){return this.elements[C]}getConfig(){return tr({...Or,...er().architecture})}getConfigField(C){return this.getConfig()[C]}},Dr=dt((C,X)=>{hr(C,X),C.groups.map(M=>X.addGroup(M)),C.services.map(M=>X.addService({...M,type:"service"})),C.junctions.map(M=>X.addJunction({...M,type:"junction"})),C.edges.map(M=>X.addEdge(M))},"populateDb"),Pe={parser:{yy:void 0},parse:dt(async C=>{const X=await lr("architecture",C);Re.debug(X);const M=Pe.parser?.yy;if(!(M instanceof be))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Dr(X,M)},"parse")},xr=dt(C=>`
2
+ .edge {
3
+ stroke-width: ${C.archEdgeWidth};
4
+ stroke: ${C.archEdgeColor};
5
+ fill: none;
6
+ }
7
+
8
+ .arrow {
9
+ fill: ${C.archEdgeArrowColor};
10
+ }
11
+
12
+ .node-bkg {
13
+ fill: none;
14
+ stroke: ${C.archGroupBorderColor};
15
+ stroke-width: ${C.archGroupBorderWidth};
16
+ stroke-dasharray: 8;
17
+ }
18
+ .node-icon-text {
19
+ display: flex;
20
+ align-items: center;
21
+ }
22
+
23
+ .node-icon-text > div {
24
+ color: #fff;
25
+ margin: 1px;
26
+ height: fit-content;
27
+ text-align: center;
28
+ overflow: hidden;
29
+ display: -webkit-box;
30
+ -webkit-box-orient: vertical;
31
+ }
32
+ `,"getStyles"),Ir=xr,re=dt(C=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${C}</g>`,"wrapIcon"),ae={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:re('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:re('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:re('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:re('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},cloud:{body:re('<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},unknown:sr,blank:{body:re("")}}},Rr=dt(async function(C,X,M){const G=M.getConfigField("padding"),N=M.getConfigField("iconSize"),d=N/2,h=N/6,a=h/2;await Promise.all(X.edges().map(async e=>{const{source:r,sourceDir:l,sourceArrow:i,sourceGroup:u,target:t,targetDir:o,targetArrow:s,targetGroup:c,label:f}=Fe(e);let{x:T,y:g}=e[0].sourceEndpoint();const{x:v,y:L}=e[0].midpoint();let{x:F,y:A}=e[0].targetEndpoint();const b=G+4;if(u&&(Wt(l)?T+=l==="L"?-b:b:g+=l==="T"?-b:b+18),c&&(Wt(o)?F+=o==="L"?-b:b:A+=o==="T"?-b:b+18),!u&&M.getNode(r)?.type==="junction"&&(Wt(l)?T+=l==="L"?d:-d:g+=l==="T"?d:-d),!c&&M.getNode(t)?.type==="junction"&&(Wt(o)?F+=o==="L"?d:-d:A+=o==="T"?d:-d),e[0]._private.rscratch){const k=C.insert("g");if(k.insert("path").attr("d",`M ${T},${g} L ${v},${L} L${F},${A} `).attr("class","edge").attr("id",nr(r,t,{prefix:"L"})),i){const U=Wt(l)?oe[l](T,h):T-a,K=qt(l)?oe[l](g,h):g-a;k.insert("polygon").attr("points",xe[l](h)).attr("transform",`translate(${U},${K})`).attr("class","arrow")}if(s){const U=Wt(o)?oe[o](F,h):F-a,K=qt(o)?oe[o](A,h):A-a;k.insert("polygon").attr("points",xe[o](h)).attr("transform",`translate(${U},${K})`).attr("class","arrow")}if(f){const U=me(l,o)?"XY":Wt(l)?"X":"Y";let K=0;U==="X"?K=Math.abs(T-F):U==="Y"?K=Math.abs(g-A)/1.5:K=Math.abs(T-F)/2;const D=k.append("g");if(await Ee(D,f,{useHtmlLabels:!1,width:K,classes:"architecture-service-label"},ye()),D.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),U==="X")D.attr("transform","translate("+v+", "+L+")");else if(U==="Y")D.attr("transform","translate("+v+", "+L+") rotate(-90)");else if(U==="XY"){const it=pe(l,o);if(it&&Tr(it)){const n=D.node().getBoundingClientRect(),[m,p]=Cr(it);D.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*m*p*45})`);const E=D.node().getBoundingClientRect();D.attr("transform",`
33
+ translate(${v}, ${L-n.height/2})
34
+ translate(${m*E.width/2}, ${p*E.height/2})
35
+ rotate(${-1*m*p*45}, 0, ${n.height/2})
36
+ `)}}}}}))},"drawEdges"),Sr=dt(async function(C,X,M){const N=M.getConfigField("padding")*.75,d=M.getConfigField("fontSize"),a=M.getConfigField("iconSize")/2;await Promise.all(X.nodes().map(async e=>{const r=ie(e);if(r.type==="group"){const{h:l,w:i,x1:u,y1:t}=e.boundingBox(),o=C.append("rect");o.attr("id",`group-${r.id}`).attr("x",u+a).attr("y",t+a).attr("width",i).attr("height",l).attr("class","node-bkg");const s=C.append("g");let c=u,f=t;if(r.icon){const T=s.append("g");T.html(`<g>${await ve(r.icon,{height:N,width:N,fallbackPrefix:ae.prefix})}</g>`),T.attr("transform","translate("+(c+a+1)+", "+(f+a+1)+")"),c+=N,f+=d/2-1-2}if(r.label){const T=s.append("g");await Ee(T,r.label,{useHtmlLabels:!1,width:i,classes:"architecture-service-label"},ye()),T.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),T.attr("transform","translate("+(c+a+4)+", "+(f+a+2)+")")}M.setElementForId(r.id,o)}}))},"drawGroups"),Fr=dt(async function(C,X,M){const G=ye();for(const N of M){const d=X.append("g"),h=C.getConfigField("iconSize");if(N.title){const l=d.append("g");await Ee(l,N.title,{useHtmlLabels:!1,width:h*1.5,classes:"architecture-service-label"},G),l.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),l.attr("transform","translate("+h/2+", "+h+")")}const a=d.append("g");if(N.icon)a.html(`<g>${await ve(N.icon,{height:h,width:h,fallbackPrefix:ae.prefix})}</g>`);else if(N.iconText){a.html(`<g>${await ve("blank",{height:h,width:h,fallbackPrefix:ae.prefix})}</g>`);const u=a.append("g").append("foreignObject").attr("width",h).attr("height",h).append("div").attr("class","node-icon-text").attr("style",`height: ${h}px;`).append("div").html(ir(N.iconText,G)),t=parseInt(window.getComputedStyle(u.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;u.attr("style",`-webkit-line-clamp: ${Math.floor((h-2)/t)};`)}else a.append("path").attr("class","node-bkg").attr("id","node-"+N.id).attr("d",`M0 ${h} v${-h} q0,-5 5,-5 h${h} q5,0 5,5 v${h} H0 Z`);d.attr("id",`service-${N.id}`).attr("class","architecture-service");const{width:e,height:r}=d.node().getBBox();N.width=e,N.height=r,C.setElementForId(N.id,d)}return 0},"drawServices"),br=dt(function(C,X,M){M.forEach(G=>{const N=X.append("g"),d=C.getConfigField("iconSize");N.append("g").append("rect").attr("id","node-"+G.id).attr("fill-opacity","0").attr("width",d).attr("height",d),N.attr("class","architecture-junction");const{width:a,height:e}=N._groups[0][0].getBBox();N.width=a,N.height=e,C.setElementForId(G.id,N)})},"drawJunctions");or([{name:ae.prefix,icons:ae}]);Se.use(Er);function Ge(C,X,M){C.forEach(G=>{X.add({group:"nodes",data:{type:"service",id:G.id,icon:G.icon,label:G.title,parent:G.in,width:M.getConfigField("iconSize"),height:M.getConfigField("iconSize")},classes:"node-service"})})}dt(Ge,"addServices");function Ue(C,X,M){C.forEach(G=>{X.add({group:"nodes",data:{type:"junction",id:G.id,parent:G.in,width:M.getConfigField("iconSize"),height:M.getConfigField("iconSize")},classes:"node-junction"})})}dt(Ue,"addJunctions");function Ye(C,X){X.nodes().map(M=>{const G=ie(M);if(G.type==="group")return;G.x=M.position().x,G.y=M.position().y,C.getElementById(G.id).attr("transform","translate("+(G.x||0)+","+(G.y||0)+")")})}dt(Ye,"positionNodes");function Xe(C,X){C.forEach(M=>{X.add({group:"nodes",data:{type:"group",id:M.id,icon:M.icon,label:M.title,parent:M.in},classes:"node-group"})})}dt(Xe,"addGroups");function He(C,X){C.forEach(M=>{const{lhsId:G,rhsId:N,lhsInto:d,lhsGroup:h,rhsInto:a,lhsDir:e,rhsDir:r,rhsGroup:l,title:i}=M,u=me(M.lhsDir,M.rhsDir)?"segments":"straight",t={id:`${G}-${N}`,label:i,source:G,sourceDir:e,sourceArrow:d,sourceGroup:h,sourceEndpoint:e==="L"?"0 50%":e==="R"?"100% 50%":e==="T"?"50% 0":"50% 100%",target:N,targetDir:r,targetArrow:a,targetGroup:l,targetEndpoint:r==="L"?"0 50%":r==="R"?"100% 50%":r==="T"?"50% 0":"50% 100%"};X.add({group:"edges",data:t,classes:u})})}dt(He,"addEdges");function We(C,X,M){const G=dt((a,e)=>Object.entries(a).reduce((r,[l,i])=>{let u=0;const t=Object.entries(i);if(t.length===1)return r[l]=t[0][1],r;for(let o=0;o<t.length-1;o++)for(let s=o+1;s<t.length;s++){const[c,f]=t[o],[T,g]=t[s];if(M[c]?.[T]===e)r[l]??=[],r[l]=[...r[l],...f,...g];else if(c==="default"||T==="default")r[l]??=[],r[l]=[...r[l],...f,...g];else{const L=`${l}-${u++}`;r[L]=f;const F=`${l}-${u++}`;r[F]=g}}return r},{}),"flattenAlignments"),N=X.map(a=>{const e={},r={};return Object.entries(a).forEach(([l,[i,u]])=>{const t=C.getNode(l)?.in??"default";e[u]??={},e[u][t]??=[],e[u][t].push(l),r[i]??={},r[i][t]??=[],r[i][t].push(l)}),{horiz:Object.values(G(e,"horizontal")).filter(l=>l.length>1),vert:Object.values(G(r,"vertical")).filter(l=>l.length>1)}}),[d,h]=N.reduce(([a,e],{horiz:r,vert:l})=>[[...a,...r],[...e,...l]],[[],[]]);return{horizontal:d,vertical:h}}dt(We,"getAlignments");function Ve(C,X){const M=[],G=dt(d=>`${d[0]},${d[1]}`,"posToStr"),N=dt(d=>d.split(",").map(h=>parseInt(h)),"strToPos");return C.forEach(d=>{const h=Object.fromEntries(Object.entries(d).map(([l,i])=>[G(i),l])),a=[G([0,0])],e={},r={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;a.length>0;){const l=a.shift();if(l){e[l]=1;const i=h[l];if(i){const u=N(l);Object.entries(r).forEach(([t,o])=>{const s=G([u[0]+o[0],u[1]+o[1]]),c=h[s];c&&!e[s]&&(a.push(s),M.push({[De[t]]:c,[De[mr(t)]]:i,gap:1.5*X.getConfigField("iconSize")}))})}}}}),M}dt(Ve,"getRelativeConstraints");function ze(C,X,M,G,N,{spatialMaps:d,groupAlignments:h}){return new Promise(a=>{const e=ar("body").append("div").attr("id","cy").attr("style","display:none"),r=Se({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${N.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${N.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});e.remove(),Xe(M,r),Ge(C,r,N),Ue(X,r,N),He(G,r);const l=We(N,d,h),i=Ve(d,N),u=r.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(t){const[o,s]=t.connectedNodes(),{parent:c}=ie(o),{parent:f}=ie(s);return c===f?1.5*N.getConfigField("iconSize"):.5*N.getConfigField("iconSize")},edgeElasticity(t){const[o,s]=t.connectedNodes(),{parent:c}=ie(o),{parent:f}=ie(s);return c===f?.45:.001},alignmentConstraint:l,relativePlacementConstraint:i});u.one("layoutstop",()=>{function t(o,s,c,f){let T,g;const{x:v,y:L}=o,{x:F,y:A}=s;g=(f-L+(v-c)*(L-A)/(v-F))/Math.sqrt(1+Math.pow((L-A)/(v-F),2)),T=Math.sqrt(Math.pow(f-L,2)+Math.pow(c-v,2)-Math.pow(g,2));const b=Math.sqrt(Math.pow(F-v,2)+Math.pow(A-L,2));T=T/b;let k=(F-v)*(f-L)-(A-L)*(c-v);switch(!0){case k>=0:k=1;break;case k<0:k=-1;break}let U=(F-v)*(c-v)+(A-L)*(f-L);switch(!0){case U>=0:U=1;break;case U<0:U=-1;break}return g=Math.abs(g)*k,T=T*U,{distances:g,weights:T}}dt(t,"getSegmentWeights"),r.startBatch();for(const o of Object.values(r.edges()))if(o.data?.()){const{x:s,y:c}=o.source().position(),{x:f,y:T}=o.target().position();if(s!==f&&c!==T){const g=o.sourceEndpoint(),v=o.targetEndpoint(),{sourceDir:L}=Fe(o),[F,A]=qt(L)?[g.x,v.y]:[v.x,g.y],{weights:b,distances:k}=t(g,v,F,A);o.style("segment-distances",k),o.style("segment-weights",b)}}r.endBatch(),u.run()}),u.run(),r.ready(t=>{Re.info("Ready",t),a(r)})})}dt(ze,"layoutArchitecture");var Pr=dt(async(C,X,M,G)=>{const N=G.db,d=N.getServices(),h=N.getJunctions(),a=N.getGroups(),e=N.getEdges(),r=N.getDataStructures(),l=Be(X),i=l.append("g");i.attr("class","architecture-edges");const u=l.append("g");u.attr("class","architecture-services");const t=l.append("g");t.attr("class","architecture-groups"),await Fr(N,u,d),br(N,u,h);const o=await ze(d,h,a,e,N,r);await Rr(i,o,N),await Sr(t,o,N),Ye(N,o),Ze(void 0,l,N.getConfigField("padding"),N.getConfigField("useMaxWidth"))},"draw"),Gr={draw:Pr},ti={parser:Pe,get db(){return new be},renderer:Gr,styles:Ir};export{ti as diagram};
@@ -1,4 +1,4 @@
1
- import{g as oe}from"./chunk-FMBD7UC4-BQmP0qBN.js";import{_ as d,G as rt,d as O,e as he,l as L,z as de,B as ge,c as R,ak as ue,a9 as pe,aa as fe,a6 as xe,al as j,am as Wt,an as ye,u as $,k as be,ao as we,ap as xt,i as yt,aq as me}from"./mermaid.core-ds122QIK.js";import{c as Le}from"./clone-DVHLGOmt.js";import{G as Se}from"./graph-CoUoQfuh.js";import{c as ke}from"./channel-C4imq4Zh.js";import"./monaco-editor-BMj4E99D.js";import"./icons-DJrV7d9i.js";import"./mermaid-VLURNSYL-_Y2XU6_c.js";import"./radix-ui-Cy3m1w7k.js";import"./react-dom-DJoE1oD9.js";import"./tanstack-qLXitSFb.js";import"./index-ERxh7PXo.js";import"./scroll-area-BrIAuvEe.js";import"./spinner-BESLBiEc.js";import"./_pathlessLayout-DjLhpgxd.js";import"./queries.store-Bxxvcbg7.js";import"./_baseUniq-CeqT3N-D.js";var bt=(function(){var e=d(function(D,y,g,f){for(g=g||{},f=D.length;f--;g[D[f]]=y);return g},"o"),t=[1,15],a=[1,7],i=[1,13],l=[1,14],s=[1,19],r=[1,16],n=[1,17],c=[1,18],u=[8,30],o=[8,10,21,28,29,30,31,39,43,46],x=[1,23],w=[1,24],b=[8,10,15,16,21,28,29,30,31,39,43,46],S=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],k={trace:d(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:d(function(y,g,f,m,E,h,W){var p=h.length-1;switch(E){case 4:m.getLogger().debug("Rule: separator (NL) ");break;case 5:m.getLogger().debug("Rule: separator (Space) ");break;case 6:m.getLogger().debug("Rule: separator (EOF) ");break;case 7:m.getLogger().debug("Rule: hierarchy: ",h[p-1]),m.setHierarchy(h[p-1]);break;case 8:m.getLogger().debug("Stop NL ");break;case 9:m.getLogger().debug("Stop EOF ");break;case 10:m.getLogger().debug("Stop NL2 ");break;case 11:m.getLogger().debug("Stop EOF2 ");break;case 12:m.getLogger().debug("Rule: statement: ",h[p]),typeof h[p].length=="number"?this.$=h[p]:this.$=[h[p]];break;case 13:m.getLogger().debug("Rule: statement #2: ",h[p-1]),this.$=[h[p-1]].concat(h[p]);break;case 14:m.getLogger().debug("Rule: link: ",h[p],y),this.$={edgeTypeStr:h[p],label:""};break;case 15:m.getLogger().debug("Rule: LABEL link: ",h[p-3],h[p-1],h[p]),this.$={edgeTypeStr:h[p],label:h[p-1]};break;case 18:const I=parseInt(h[p]),Z=m.generateId();this.$={id:Z,type:"space",label:"",width:I,children:[]};break;case 23:m.getLogger().debug("Rule: (nodeStatement link node) ",h[p-2],h[p-1],h[p]," typestr: ",h[p-1].edgeTypeStr);const V=m.edgeStrToEdgeData(h[p-1].edgeTypeStr);this.$=[{id:h[p-2].id,label:h[p-2].label,type:h[p-2].type,directions:h[p-2].directions},{id:h[p-2].id+"-"+h[p].id,start:h[p-2].id,end:h[p].id,label:h[p-1].label,type:"edge",directions:h[p].directions,arrowTypeEnd:V,arrowTypeStart:"arrow_open"},{id:h[p].id,label:h[p].label,type:m.typeStr2Type(h[p].typeStr),directions:h[p].directions}];break;case 24:m.getLogger().debug("Rule: nodeStatement (abc88 node size) ",h[p-1],h[p]),this.$={id:h[p-1].id,label:h[p-1].label,type:m.typeStr2Type(h[p-1].typeStr),directions:h[p-1].directions,widthInColumns:parseInt(h[p],10)};break;case 25:m.getLogger().debug("Rule: nodeStatement (node) ",h[p]),this.$={id:h[p].id,label:h[p].label,type:m.typeStr2Type(h[p].typeStr),directions:h[p].directions,widthInColumns:1};break;case 26:m.getLogger().debug("APA123",this?this:"na"),m.getLogger().debug("COLUMNS: ",h[p]),this.$={type:"column-setting",columns:h[p]==="auto"?-1:parseInt(h[p])};break;case 27:m.getLogger().debug("Rule: id-block statement : ",h[p-2],h[p-1]),m.generateId(),this.$={...h[p-2],type:"composite",children:h[p-1]};break;case 28:m.getLogger().debug("Rule: blockStatement : ",h[p-2],h[p-1],h[p]);const at=m.generateId();this.$={id:at,type:"composite",label:"",children:h[p-1]};break;case 29:m.getLogger().debug("Rule: node (NODE_ID separator): ",h[p]),this.$={id:h[p]};break;case 30:m.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",h[p-1],h[p]),this.$={id:h[p-1],label:h[p].label,typeStr:h[p].typeStr,directions:h[p].directions};break;case 31:m.getLogger().debug("Rule: dirList: ",h[p]),this.$=[h[p]];break;case 32:m.getLogger().debug("Rule: dirList: ",h[p-1],h[p]),this.$=[h[p-1]].concat(h[p]);break;case 33:m.getLogger().debug("Rule: nodeShapeNLabel: ",h[p-2],h[p-1],h[p]),this.$={typeStr:h[p-2]+h[p],label:h[p-1]};break;case 34:m.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",h[p-3],h[p-2]," #3:",h[p-1],h[p]),this.$={typeStr:h[p-3]+h[p],label:h[p-2],directions:h[p-1]};break;case 35:case 36:this.$={type:"classDef",id:h[p-1].trim(),css:h[p].trim()};break;case 37:this.$={type:"applyClass",id:h[p-1].trim(),styleClass:h[p].trim()};break;case 38:this.$={type:"applyStyles",id:h[p-1].trim(),stylesStr:h[p].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:i,29:l,31:s,39:r,43:n,46:c}),e(o,[2,16],{14:22,15:x,16:w}),e(o,[2,17]),e(o,[2,18]),e(o,[2,19]),e(o,[2,20]),e(o,[2,21]),e(o,[2,22]),e(b,[2,25],{27:[1,25]}),e(o,[2,26]),{19:26,26:12,31:s},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(S,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},e(b,[2,24]),{10:t,11:37,13:4,14:22,15:x,16:w,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(S,[2,30]),{18:[1,43]},{18:[1,44]},e(b,[2,23]),{18:[1,45]},{30:[1,46]},e(o,[2,28]),e(o,[2,35]),e(o,[2,36]),e(o,[2,37]),e(o,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(o,[2,27]),e(S,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(S,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:d(function(y,g){if(g.recoverable)this.trace(y);else{var f=new Error(y);throw f.hash=g,f}},"parseError"),parse:d(function(y){var g=this,f=[0],m=[],E=[null],h=[],W=this.table,p="",I=0,Z=0,V=2,at=1,ne=h.slice.call(arguments,1),z=Object.create(this.lexer),q={yy:{}};for(var gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,gt)&&(q.yy[gt]=this.yy[gt]);z.setInput(y,q.yy),q.yy.lexer=z,q.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var ut=z.yylloc;h.push(ut);var le=z.options&&z.options.ranges;typeof q.yy.parseError=="function"?this.parseError=q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ce(P){f.length=f.length-2*P,E.length=E.length-P,h.length=h.length-P}d(ce,"popStack");function Nt(){var P;return P=m.pop()||z.lex()||at,typeof P!="number"&&(P instanceof Array&&(m=P,P=m.pop()),P=g.symbols_[P]||P),P}d(Nt,"lex");for(var F,J,H,pt,Q={},st,G,Tt,it;;){if(J=f[f.length-1],this.defaultActions[J]?H=this.defaultActions[J]:((F===null||typeof F>"u")&&(F=Nt()),H=W[J]&&W[J][F]),typeof H>"u"||!H.length||!H[0]){var ft="";it=[];for(st in W[J])this.terminals_[st]&&st>V&&it.push("'"+this.terminals_[st]+"'");z.showPosition?ft="Parse error on line "+(I+1)+`:
1
+ import{g as oe}from"./chunk-FMBD7UC4-XJsNmwVW.js";import{_ as d,G as rt,d as O,e as he,l as L,z as de,B as ge,c as R,ak as ue,a9 as pe,aa as fe,a6 as xe,al as j,am as Wt,an as ye,u as $,k as be,ao as we,ap as xt,i as yt,aq as me}from"./mermaid.core-DmainLbW.js";import{c as Le}from"./clone-Bq17CDff.js";import{G as Se}from"./graph-CNujjUl6.js";import{c as ke}from"./channel-D7_kpMKZ.js";import"./monaco-editor-BMj4E99D.js";import"./icons-cLYU3CQS.js";import"./mermaid-VLURNSYL-BZBKtjwf.js";import"./radix-ui-d5EbBw33.js";import"./react-dom-BWKcCUTe.js";import"./tanstack-D5ysZnPZ.js";import"./index-Dq7-70tK.js";import"./scroll-area-NHyDhTA5.js";import"./index-pzKFI-Vs.js";import"./_pathlessLayout-J4rDhSFV.js";import"./queries.store-BqdJNevl.js";import"./_baseUniq-BnS4oWxG.js";var bt=(function(){var e=d(function(D,y,g,f){for(g=g||{},f=D.length;f--;g[D[f]]=y);return g},"o"),t=[1,15],a=[1,7],i=[1,13],l=[1,14],s=[1,19],r=[1,16],n=[1,17],c=[1,18],u=[8,30],o=[8,10,21,28,29,30,31,39,43,46],x=[1,23],w=[1,24],b=[8,10,15,16,21,28,29,30,31,39,43,46],S=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],k={trace:d(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:d(function(y,g,f,m,E,h,W){var p=h.length-1;switch(E){case 4:m.getLogger().debug("Rule: separator (NL) ");break;case 5:m.getLogger().debug("Rule: separator (Space) ");break;case 6:m.getLogger().debug("Rule: separator (EOF) ");break;case 7:m.getLogger().debug("Rule: hierarchy: ",h[p-1]),m.setHierarchy(h[p-1]);break;case 8:m.getLogger().debug("Stop NL ");break;case 9:m.getLogger().debug("Stop EOF ");break;case 10:m.getLogger().debug("Stop NL2 ");break;case 11:m.getLogger().debug("Stop EOF2 ");break;case 12:m.getLogger().debug("Rule: statement: ",h[p]),typeof h[p].length=="number"?this.$=h[p]:this.$=[h[p]];break;case 13:m.getLogger().debug("Rule: statement #2: ",h[p-1]),this.$=[h[p-1]].concat(h[p]);break;case 14:m.getLogger().debug("Rule: link: ",h[p],y),this.$={edgeTypeStr:h[p],label:""};break;case 15:m.getLogger().debug("Rule: LABEL link: ",h[p-3],h[p-1],h[p]),this.$={edgeTypeStr:h[p],label:h[p-1]};break;case 18:const I=parseInt(h[p]),Z=m.generateId();this.$={id:Z,type:"space",label:"",width:I,children:[]};break;case 23:m.getLogger().debug("Rule: (nodeStatement link node) ",h[p-2],h[p-1],h[p]," typestr: ",h[p-1].edgeTypeStr);const V=m.edgeStrToEdgeData(h[p-1].edgeTypeStr);this.$=[{id:h[p-2].id,label:h[p-2].label,type:h[p-2].type,directions:h[p-2].directions},{id:h[p-2].id+"-"+h[p].id,start:h[p-2].id,end:h[p].id,label:h[p-1].label,type:"edge",directions:h[p].directions,arrowTypeEnd:V,arrowTypeStart:"arrow_open"},{id:h[p].id,label:h[p].label,type:m.typeStr2Type(h[p].typeStr),directions:h[p].directions}];break;case 24:m.getLogger().debug("Rule: nodeStatement (abc88 node size) ",h[p-1],h[p]),this.$={id:h[p-1].id,label:h[p-1].label,type:m.typeStr2Type(h[p-1].typeStr),directions:h[p-1].directions,widthInColumns:parseInt(h[p],10)};break;case 25:m.getLogger().debug("Rule: nodeStatement (node) ",h[p]),this.$={id:h[p].id,label:h[p].label,type:m.typeStr2Type(h[p].typeStr),directions:h[p].directions,widthInColumns:1};break;case 26:m.getLogger().debug("APA123",this?this:"na"),m.getLogger().debug("COLUMNS: ",h[p]),this.$={type:"column-setting",columns:h[p]==="auto"?-1:parseInt(h[p])};break;case 27:m.getLogger().debug("Rule: id-block statement : ",h[p-2],h[p-1]),m.generateId(),this.$={...h[p-2],type:"composite",children:h[p-1]};break;case 28:m.getLogger().debug("Rule: blockStatement : ",h[p-2],h[p-1],h[p]);const at=m.generateId();this.$={id:at,type:"composite",label:"",children:h[p-1]};break;case 29:m.getLogger().debug("Rule: node (NODE_ID separator): ",h[p]),this.$={id:h[p]};break;case 30:m.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",h[p-1],h[p]),this.$={id:h[p-1],label:h[p].label,typeStr:h[p].typeStr,directions:h[p].directions};break;case 31:m.getLogger().debug("Rule: dirList: ",h[p]),this.$=[h[p]];break;case 32:m.getLogger().debug("Rule: dirList: ",h[p-1],h[p]),this.$=[h[p-1]].concat(h[p]);break;case 33:m.getLogger().debug("Rule: nodeShapeNLabel: ",h[p-2],h[p-1],h[p]),this.$={typeStr:h[p-2]+h[p],label:h[p-1]};break;case 34:m.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",h[p-3],h[p-2]," #3:",h[p-1],h[p]),this.$={typeStr:h[p-3]+h[p],label:h[p-2],directions:h[p-1]};break;case 35:case 36:this.$={type:"classDef",id:h[p-1].trim(),css:h[p].trim()};break;case 37:this.$={type:"applyClass",id:h[p-1].trim(),styleClass:h[p].trim()};break;case 38:this.$={type:"applyStyles",id:h[p-1].trim(),stylesStr:h[p].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:i,29:l,31:s,39:r,43:n,46:c}),e(o,[2,16],{14:22,15:x,16:w}),e(o,[2,17]),e(o,[2,18]),e(o,[2,19]),e(o,[2,20]),e(o,[2,21]),e(o,[2,22]),e(b,[2,25],{27:[1,25]}),e(o,[2,26]),{19:26,26:12,31:s},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(S,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},e(b,[2,24]),{10:t,11:37,13:4,14:22,15:x,16:w,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(S,[2,30]),{18:[1,43]},{18:[1,44]},e(b,[2,23]),{18:[1,45]},{30:[1,46]},e(o,[2,28]),e(o,[2,35]),e(o,[2,36]),e(o,[2,37]),e(o,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(o,[2,27]),e(S,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(S,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:d(function(y,g){if(g.recoverable)this.trace(y);else{var f=new Error(y);throw f.hash=g,f}},"parseError"),parse:d(function(y){var g=this,f=[0],m=[],E=[null],h=[],W=this.table,p="",I=0,Z=0,V=2,at=1,ne=h.slice.call(arguments,1),z=Object.create(this.lexer),q={yy:{}};for(var gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,gt)&&(q.yy[gt]=this.yy[gt]);z.setInput(y,q.yy),q.yy.lexer=z,q.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var ut=z.yylloc;h.push(ut);var le=z.options&&z.options.ranges;typeof q.yy.parseError=="function"?this.parseError=q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ce(P){f.length=f.length-2*P,E.length=E.length-P,h.length=h.length-P}d(ce,"popStack");function Nt(){var P;return P=m.pop()||z.lex()||at,typeof P!="number"&&(P instanceof Array&&(m=P,P=m.pop()),P=g.symbols_[P]||P),P}d(Nt,"lex");for(var F,J,H,pt,Q={},st,G,Tt,it;;){if(J=f[f.length-1],this.defaultActions[J]?H=this.defaultActions[J]:((F===null||typeof F>"u")&&(F=Nt()),H=W[J]&&W[J][F]),typeof H>"u"||!H.length||!H[0]){var ft="";it=[];for(st in W[J])this.terminals_[st]&&st>V&&it.push("'"+this.terminals_[st]+"'");z.showPosition?ft="Parse error on line "+(I+1)+`:
2
2
  `+z.showPosition()+`
3
3
  Expecting `+it.join(", ")+", got '"+(this.terminals_[F]||F)+"'":ft="Parse error on line "+(I+1)+": Unexpected "+(F==at?"end of input":"'"+(this.terminals_[F]||F)+"'"),this.parseError(ft,{text:z.match,token:this.terminals_[F]||F,line:z.yylineno,loc:ut,expected:it})}if(H[0]instanceof Array&&H.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+F);switch(H[0]){case 1:f.push(F),E.push(z.yytext),h.push(z.yylloc),f.push(H[1]),F=null,Z=z.yyleng,p=z.yytext,I=z.yylineno,ut=z.yylloc;break;case 2:if(G=this.productions_[H[1]][1],Q.$=E[E.length-G],Q._$={first_line:h[h.length-(G||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(G||1)].first_column,last_column:h[h.length-1].last_column},le&&(Q._$.range=[h[h.length-(G||1)].range[0],h[h.length-1].range[1]]),pt=this.performAction.apply(Q,[p,Z,I,q.yy,H[1],E,h].concat(ne)),typeof pt<"u")return pt;G&&(f=f.slice(0,-1*G*2),E=E.slice(0,-1*G),h=h.slice(0,-1*G)),f.push(this.productions_[H[1]][0]),E.push(Q.$),h.push(Q._$),Tt=W[f[f.length-2]][f[f.length-1]],f.push(Tt);break;case 3:return!0}}return!0},"parse")},B=(function(){var D={EOF:1,parseError:d(function(g,f){if(this.yy.parser)this.yy.parser.parseError(g,f);else throw new Error(g)},"parseError"),setInput:d(function(y,g){return this.yy=g||this.yy||{},this._input=y,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:d(function(){var y=this._input[0];this.yytext+=y,this.yyleng++,this.offset++,this.match+=y,this.matched+=y;var g=y.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),y},"input"),unput:d(function(y){var g=y.length,f=y.split(/(?:\r\n?|\n)/g);this._input=y+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var m=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),f.length-1&&(this.yylineno-=f.length-1);var E=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:f?(f.length===m.length?this.yylloc.first_column:0)+m[m.length-f.length].length-f[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(y){this.unput(this.match.slice(y))},"less"),pastInput:d(function(){var y=this.matched.substr(0,this.matched.length-this.match.length);return(y.length>20?"...":"")+y.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var y=this.match;return y.length<20&&(y+=this._input.substr(0,20-y.length)),(y.substr(0,20)+(y.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var y=this.pastInput(),g=new Array(y.length+1).join("-");return y+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{g as Oe,d as Re}from"./chunk-TZMSLE5B-31ka2vOU.js";import{_ as g,s as Se,g as De,a as Pe,b as Be,c as Dt,d as Nt,l as he,e as Ie,f as Me,h as Tt,i as fe,j as Le,w as Ne,k as Jt,m as ue}from"./mermaid.core-ds122QIK.js";import"./monaco-editor-BMj4E99D.js";import"./icons-DJrV7d9i.js";import"./mermaid-VLURNSYL-_Y2XU6_c.js";import"./radix-ui-Cy3m1w7k.js";import"./react-dom-DJoE1oD9.js";import"./tanstack-qLXitSFb.js";import"./index-ERxh7PXo.js";import"./scroll-area-BrIAuvEe.js";import"./spinner-BESLBiEc.js";import"./_pathlessLayout-DjLhpgxd.js";import"./queries.store-Bxxvcbg7.js";var jt=(function(){var e=g(function(_t,x,m,v){for(m=m||{},v=_t.length;v--;m[_t[v]]=x);return m},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],a=[1,28],r=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],y=[1,68],f=[1,69],E=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],rt=[1,47],st=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],pt=[1,56],ft=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Xt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ot=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],k=[1,82],A=[1,83],C=[1,84],w=[1,85],T=[12,14,42],re=[12,14,33,42],Bt=[12,14,33,42,76,77,79,80],vt=[12,33],Wt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Qt={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:g(function(x,m,v,b,R,h,Rt){var p=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[p-3]);break;case 19:b.setTitle(h[p].substring(6)),this.$=h[p].substring(6);break;case 20:b.setAccDescription(h[p].substring(15)),this.$=h[p].substring(15);break;case 21:this.$=h[p].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[p].trim(),b.setAccDescription(this.$);break;case 28:h[p].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 29:h[p].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 30:b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 31:h[p].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[p]),this.$=h[p];break;case 32:b.addDeploymentNode("node",...h[p]),this.$=h[p];break;case 33:b.addDeploymentNode("nodeL",...h[p]),this.$=h[p];break;case 34:b.addDeploymentNode("nodeR",...h[p]),this.$=h[p];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[p]),this.$=h[p];break;case 40:b.addPersonOrSystem("external_person",...h[p]),this.$=h[p];break;case 41:b.addPersonOrSystem("system",...h[p]),this.$=h[p];break;case 42:b.addPersonOrSystem("system_db",...h[p]),this.$=h[p];break;case 43:b.addPersonOrSystem("system_queue",...h[p]),this.$=h[p];break;case 44:b.addPersonOrSystem("external_system",...h[p]),this.$=h[p];break;case 45:b.addPersonOrSystem("external_system_db",...h[p]),this.$=h[p];break;case 46:b.addPersonOrSystem("external_system_queue",...h[p]),this.$=h[p];break;case 47:b.addContainer("container",...h[p]),this.$=h[p];break;case 48:b.addContainer("container_db",...h[p]),this.$=h[p];break;case 49:b.addContainer("container_queue",...h[p]),this.$=h[p];break;case 50:b.addContainer("external_container",...h[p]),this.$=h[p];break;case 51:b.addContainer("external_container_db",...h[p]),this.$=h[p];break;case 52:b.addContainer("external_container_queue",...h[p]),this.$=h[p];break;case 53:b.addComponent("component",...h[p]),this.$=h[p];break;case 54:b.addComponent("component_db",...h[p]),this.$=h[p];break;case 55:b.addComponent("component_queue",...h[p]),this.$=h[p];break;case 56:b.addComponent("external_component",...h[p]),this.$=h[p];break;case 57:b.addComponent("external_component_db",...h[p]),this.$=h[p];break;case 58:b.addComponent("external_component_queue",...h[p]),this.$=h[p];break;case 60:b.addRel("rel",...h[p]),this.$=h[p];break;case 61:b.addRel("birel",...h[p]),this.$=h[p];break;case 62:b.addRel("rel_u",...h[p]),this.$=h[p];break;case 63:b.addRel("rel_d",...h[p]),this.$=h[p];break;case 64:b.addRel("rel_l",...h[p]),this.$=h[p];break;case 65:b.addRel("rel_r",...h[p]),this.$=h[p];break;case 66:b.addRel("rel_b",...h[p]),this.$=h[p];break;case 67:h[p].splice(0,1),b.addRel("rel",...h[p]),this.$=h[p];break;case 68:b.updateElStyle("update_el_style",...h[p]),this.$=h[p];break;case 69:b.updateRelStyle("update_rel_style",...h[p]),this.$=h[p];break;case 70:b.updateLayoutConfig("update_layout_config",...h[p]),this.$=h[p];break;case 71:this.$=[h[p]];break;case 72:h[p].unshift(h[p-1]),this.$=h[p];break;case 73:case 75:this.$=h[p].trim();break;case 74:let Et={};Et[h[p-1].trim()]=h[p].trim(),this.$=Et;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:y,41:f,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:pt,71:ft,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:y,41:f,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:pt,71:ft,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:y,41:f,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:pt,71:ft,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:y,41:f,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:pt,71:ft,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:y,41:f,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:pt,71:ft,72:yt,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:r,36:n,37:i,38:u,39:d,40:y,41:f,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:pt,71:ft,72:yt,73:gt,74:bt}),e(Ct,[2,14]),e(Xt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(Ot,[2,19]),e(Ot,[2,20]),{25:[1,78]},{27:[1,79]},e(Ot,[2,23]),{35:80,75:81,76:k,77:A,79:C,80:w},{35:86,75:81,76:k,77:A,79:C,80:w},{35:87,75:81,76:k,77:A,79:C,80:w},{35:88,75:81,76:k,77:A,79:C,80:w},{35:89,75:81,76:k,77:A,79:C,80:w},{35:90,75:81,76:k,77:A,79:C,80:w},{35:91,75:81,76:k,77:A,79:C,80:w},{35:92,75:81,76:k,77:A,79:C,80:w},{35:93,75:81,76:k,77:A,79:C,80:w},{35:94,75:81,76:k,77:A,79:C,80:w},{35:95,75:81,76:k,77:A,79:C,80:w},{35:96,75:81,76:k,77:A,79:C,80:w},{35:97,75:81,76:k,77:A,79:C,80:w},{35:98,75:81,76:k,77:A,79:C,80:w},{35:99,75:81,76:k,77:A,79:C,80:w},{35:100,75:81,76:k,77:A,79:C,80:w},{35:101,75:81,76:k,77:A,79:C,80:w},{35:102,75:81,76:k,77:A,79:C,80:w},{35:103,75:81,76:k,77:A,79:C,80:w},{35:104,75:81,76:k,77:A,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:k,77:A,79:C,80:w},{35:106,75:81,76:k,77:A,79:C,80:w},{35:107,75:81,76:k,77:A,79:C,80:w},{35:108,75:81,76:k,77:A,79:C,80:w},{35:109,75:81,76:k,77:A,79:C,80:w},{35:110,75:81,76:k,77:A,79:C,80:w},{35:111,75:81,76:k,77:A,79:C,80:w},{35:112,75:81,76:k,77:A,79:C,80:w},{35:113,75:81,76:k,77:A,79:C,80:w},{35:114,75:81,76:k,77:A,79:C,80:w},{35:115,75:81,76:k,77:A,79:C,80:w},{20:116,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:y,41:f,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:pt,71:ft,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:k,77:A,79:C,80:w},{35:120,75:81,76:k,77:A,79:C,80:w},{35:121,75:81,76:k,77:A,79:C,80:w},{35:122,75:81,76:k,77:A,79:C,80:w},{35:123,75:81,76:k,77:A,79:C,80:w},{35:124,75:81,76:k,77:A,79:C,80:w},{35:125,75:81,76:k,77:A,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Xt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:a}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:a,34:r,36:n,37:i,38:u,39:d,40:y,41:f,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:pt,71:ft,72:yt,73:gt,74:bt}),e(Ot,[2,21]),e(Ot,[2,22]),e(T,[2,39]),e(re,[2,71],{75:81,35:132,76:k,77:A,79:C,80:w}),e(Bt,[2,73]),{78:[1,133]},e(Bt,[2,75]),e(Bt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Xt,[2,18]),e(Ct,[2,38]),e(re,[2,72]),e(Bt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Wt,[2,25]),e(Wt,[2,26],{12:[1,138]}),e(Wt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:g(function(x,m){if(m.recoverable)this.trace(x);else{var v=new Error(x);throw v.hash=m,v}},"parseError"),parse:g(function(x){var m=this,v=[0],b=[],R=[null],h=[],Rt=this.table,p="",Et=0,se=0,Ae=2,le=1,Ce=h.slice.call(arguments,1),D=Object.create(this.lexer),kt={yy:{}};for(var Ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ht)&&(kt.yy[Ht]=this.yy[Ht]);D.setInput(x,kt.yy),kt.yy.lexer=D,kt.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var qt=D.yylloc;h.push(qt);var we=D.options&&D.options.ranges;typeof kt.yy.parseError=="function"?this.parseError=kt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(L){v.length=v.length-2*L,R.length=R.length-L,h.length=h.length-L}g(Te,"popStack");function oe(){var L;return L=b.pop()||D.lex()||le,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=m.symbols_[L]||L),L}g(oe,"lex");for(var I,At,N,Gt,wt={},Mt,W,ce,Lt;;){if(At=v[v.length-1],this.defaultActions[At]?N=this.defaultActions[At]:((I===null||typeof I>"u")&&(I=oe()),N=Rt[At]&&Rt[At][I]),typeof N>"u"||!N.length||!N[0]){var Kt="";Lt=[];for(Mt in Rt[At])this.terminals_[Mt]&&Mt>Ae&&Lt.push("'"+this.terminals_[Mt]+"'");D.showPosition?Kt="Parse error on line "+(Et+1)+`:
1
+ import{g as Oe,d as Re}from"./chunk-TZMSLE5B-JJzEtNYD.js";import{_ as g,s as Se,g as De,a as Pe,b as Be,c as Dt,d as Nt,l as he,e as Ie,f as Me,h as Tt,i as fe,j as Le,w as Ne,k as Jt,m as ue}from"./mermaid.core-DmainLbW.js";import"./monaco-editor-BMj4E99D.js";import"./icons-cLYU3CQS.js";import"./mermaid-VLURNSYL-BZBKtjwf.js";import"./radix-ui-d5EbBw33.js";import"./react-dom-BWKcCUTe.js";import"./tanstack-D5ysZnPZ.js";import"./index-Dq7-70tK.js";import"./scroll-area-NHyDhTA5.js";import"./index-pzKFI-Vs.js";import"./_pathlessLayout-J4rDhSFV.js";import"./queries.store-BqdJNevl.js";var jt=(function(){var e=g(function(_t,x,m,v){for(m=m||{},v=_t.length;v--;m[_t[v]]=x);return m},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],a=[1,28],r=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],y=[1,68],f=[1,69],E=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],rt=[1,47],st=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],pt=[1,56],ft=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Xt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ot=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],k=[1,82],A=[1,83],C=[1,84],w=[1,85],T=[12,14,42],re=[12,14,33,42],Bt=[12,14,33,42,76,77,79,80],vt=[12,33],Wt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Qt={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:g(function(x,m,v,b,R,h,Rt){var p=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[p-3]);break;case 19:b.setTitle(h[p].substring(6)),this.$=h[p].substring(6);break;case 20:b.setAccDescription(h[p].substring(15)),this.$=h[p].substring(15);break;case 21:this.$=h[p].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[p].trim(),b.setAccDescription(this.$);break;case 28:h[p].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 29:h[p].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 30:b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 31:h[p].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[p]),this.$=h[p];break;case 32:b.addDeploymentNode("node",...h[p]),this.$=h[p];break;case 33:b.addDeploymentNode("nodeL",...h[p]),this.$=h[p];break;case 34:b.addDeploymentNode("nodeR",...h[p]),this.$=h[p];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[p]),this.$=h[p];break;case 40:b.addPersonOrSystem("external_person",...h[p]),this.$=h[p];break;case 41:b.addPersonOrSystem("system",...h[p]),this.$=h[p];break;case 42:b.addPersonOrSystem("system_db",...h[p]),this.$=h[p];break;case 43:b.addPersonOrSystem("system_queue",...h[p]),this.$=h[p];break;case 44:b.addPersonOrSystem("external_system",...h[p]),this.$=h[p];break;case 45:b.addPersonOrSystem("external_system_db",...h[p]),this.$=h[p];break;case 46:b.addPersonOrSystem("external_system_queue",...h[p]),this.$=h[p];break;case 47:b.addContainer("container",...h[p]),this.$=h[p];break;case 48:b.addContainer("container_db",...h[p]),this.$=h[p];break;case 49:b.addContainer("container_queue",...h[p]),this.$=h[p];break;case 50:b.addContainer("external_container",...h[p]),this.$=h[p];break;case 51:b.addContainer("external_container_db",...h[p]),this.$=h[p];break;case 52:b.addContainer("external_container_queue",...h[p]),this.$=h[p];break;case 53:b.addComponent("component",...h[p]),this.$=h[p];break;case 54:b.addComponent("component_db",...h[p]),this.$=h[p];break;case 55:b.addComponent("component_queue",...h[p]),this.$=h[p];break;case 56:b.addComponent("external_component",...h[p]),this.$=h[p];break;case 57:b.addComponent("external_component_db",...h[p]),this.$=h[p];break;case 58:b.addComponent("external_component_queue",...h[p]),this.$=h[p];break;case 60:b.addRel("rel",...h[p]),this.$=h[p];break;case 61:b.addRel("birel",...h[p]),this.$=h[p];break;case 62:b.addRel("rel_u",...h[p]),this.$=h[p];break;case 63:b.addRel("rel_d",...h[p]),this.$=h[p];break;case 64:b.addRel("rel_l",...h[p]),this.$=h[p];break;case 65:b.addRel("rel_r",...h[p]),this.$=h[p];break;case 66:b.addRel("rel_b",...h[p]),this.$=h[p];break;case 67:h[p].splice(0,1),b.addRel("rel",...h[p]),this.$=h[p];break;case 68:b.updateElStyle("update_el_style",...h[p]),this.$=h[p];break;case 69:b.updateRelStyle("update_rel_style",...h[p]),this.$=h[p];break;case 70:b.updateLayoutConfig("update_layout_config",...h[p]),this.$=h[p];break;case 71:this.$=[h[p]];break;case 72:h[p].unshift(h[p-1]),this.$=h[p];break;case 73:case 75:this.$=h[p].trim();break;case 74:let Et={};Et[h[p-1].trim()]=h[p].trim(),this.$=Et;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:y,41:f,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:pt,71:ft,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:y,41:f,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:pt,71:ft,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:y,41:f,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:pt,71:ft,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:y,41:f,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:pt,71:ft,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:y,41:f,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:pt,71:ft,72:yt,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:r,36:n,37:i,38:u,39:d,40:y,41:f,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:pt,71:ft,72:yt,73:gt,74:bt}),e(Ct,[2,14]),e(Xt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(Ot,[2,19]),e(Ot,[2,20]),{25:[1,78]},{27:[1,79]},e(Ot,[2,23]),{35:80,75:81,76:k,77:A,79:C,80:w},{35:86,75:81,76:k,77:A,79:C,80:w},{35:87,75:81,76:k,77:A,79:C,80:w},{35:88,75:81,76:k,77:A,79:C,80:w},{35:89,75:81,76:k,77:A,79:C,80:w},{35:90,75:81,76:k,77:A,79:C,80:w},{35:91,75:81,76:k,77:A,79:C,80:w},{35:92,75:81,76:k,77:A,79:C,80:w},{35:93,75:81,76:k,77:A,79:C,80:w},{35:94,75:81,76:k,77:A,79:C,80:w},{35:95,75:81,76:k,77:A,79:C,80:w},{35:96,75:81,76:k,77:A,79:C,80:w},{35:97,75:81,76:k,77:A,79:C,80:w},{35:98,75:81,76:k,77:A,79:C,80:w},{35:99,75:81,76:k,77:A,79:C,80:w},{35:100,75:81,76:k,77:A,79:C,80:w},{35:101,75:81,76:k,77:A,79:C,80:w},{35:102,75:81,76:k,77:A,79:C,80:w},{35:103,75:81,76:k,77:A,79:C,80:w},{35:104,75:81,76:k,77:A,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:k,77:A,79:C,80:w},{35:106,75:81,76:k,77:A,79:C,80:w},{35:107,75:81,76:k,77:A,79:C,80:w},{35:108,75:81,76:k,77:A,79:C,80:w},{35:109,75:81,76:k,77:A,79:C,80:w},{35:110,75:81,76:k,77:A,79:C,80:w},{35:111,75:81,76:k,77:A,79:C,80:w},{35:112,75:81,76:k,77:A,79:C,80:w},{35:113,75:81,76:k,77:A,79:C,80:w},{35:114,75:81,76:k,77:A,79:C,80:w},{35:115,75:81,76:k,77:A,79:C,80:w},{20:116,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:y,41:f,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:pt,71:ft,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:k,77:A,79:C,80:w},{35:120,75:81,76:k,77:A,79:C,80:w},{35:121,75:81,76:k,77:A,79:C,80:w},{35:122,75:81,76:k,77:A,79:C,80:w},{35:123,75:81,76:k,77:A,79:C,80:w},{35:124,75:81,76:k,77:A,79:C,80:w},{35:125,75:81,76:k,77:A,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Xt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:a}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:a,34:r,36:n,37:i,38:u,39:d,40:y,41:f,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:pt,71:ft,72:yt,73:gt,74:bt}),e(Ot,[2,21]),e(Ot,[2,22]),e(T,[2,39]),e(re,[2,71],{75:81,35:132,76:k,77:A,79:C,80:w}),e(Bt,[2,73]),{78:[1,133]},e(Bt,[2,75]),e(Bt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Xt,[2,18]),e(Ct,[2,38]),e(re,[2,72]),e(Bt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Wt,[2,25]),e(Wt,[2,26],{12:[1,138]}),e(Wt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:g(function(x,m){if(m.recoverable)this.trace(x);else{var v=new Error(x);throw v.hash=m,v}},"parseError"),parse:g(function(x){var m=this,v=[0],b=[],R=[null],h=[],Rt=this.table,p="",Et=0,se=0,Ae=2,le=1,Ce=h.slice.call(arguments,1),D=Object.create(this.lexer),kt={yy:{}};for(var Ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ht)&&(kt.yy[Ht]=this.yy[Ht]);D.setInput(x,kt.yy),kt.yy.lexer=D,kt.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var qt=D.yylloc;h.push(qt);var we=D.options&&D.options.ranges;typeof kt.yy.parseError=="function"?this.parseError=kt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(L){v.length=v.length-2*L,R.length=R.length-L,h.length=h.length-L}g(Te,"popStack");function oe(){var L;return L=b.pop()||D.lex()||le,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=m.symbols_[L]||L),L}g(oe,"lex");for(var I,At,N,Gt,wt={},Mt,W,ce,Lt;;){if(At=v[v.length-1],this.defaultActions[At]?N=this.defaultActions[At]:((I===null||typeof I>"u")&&(I=oe()),N=Rt[At]&&Rt[At][I]),typeof N>"u"||!N.length||!N[0]){var Kt="";Lt=[];for(Mt in Rt[At])this.terminals_[Mt]&&Mt>Ae&&Lt.push("'"+this.terminals_[Mt]+"'");D.showPosition?Kt="Parse error on line "+(Et+1)+`:
2
2
  `+D.showPosition()+`
3
3
  Expecting `+Lt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Kt="Parse error on line "+(Et+1)+": Unexpected "+(I==le?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Kt,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:qt,expected:Lt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+At+", token: "+I);switch(N[0]){case 1:v.push(I),R.push(D.yytext),h.push(D.yylloc),v.push(N[1]),I=null,se=D.yyleng,p=D.yytext,Et=D.yylineno,qt=D.yylloc;break;case 2:if(W=this.productions_[N[1]][1],wt.$=R[R.length-W],wt._$={first_line:h[h.length-(W||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(W||1)].first_column,last_column:h[h.length-1].last_column},we&&(wt._$.range=[h[h.length-(W||1)].range[0],h[h.length-1].range[1]]),Gt=this.performAction.apply(wt,[p,se,Et,kt.yy,N[1],R,h].concat(Ce)),typeof Gt<"u")return Gt;W&&(v=v.slice(0,-1*W*2),R=R.slice(0,-1*W),h=h.slice(0,-1*W)),v.push(this.productions_[N[1]][0]),R.push(wt.$),h.push(wt._$),ce=Rt[v[v.length-2]][v[v.length-1]],v.push(ce);break;case 3:return!0}}return!0},"parse")},ke=(function(){var _t={EOF:1,parseError:g(function(m,v){if(this.yy.parser)this.yy.parser.parseError(m,v);else throw new Error(m)},"parseError"),setInput:g(function(x,m){return this.yy=m||this.yy||{},this._input=x,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:g(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var m=x.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:g(function(x){var m=x.length,v=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var b=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),v.length-1&&(this.yylineno-=v.length-1);var R=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:v?(v.length===b.length?this.yylloc.first_column:0)+b[b.length-v.length].length-v[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(x){this.unput(this.match.slice(x))},"less"),pastInput:g(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var x=this.pastInput(),m=new Array(x.length+1).join("-");return x+this.upcomingInput()+`