@bigduu/lotus 2026.5.4 → 2026.5.7

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 (114) hide show
  1. package/dist/assets/{App-DJeBpzcc.css → App-D9R-_Pem.css} +1 -1
  2. package/dist/assets/App-DaOPoP5b.js +223 -0
  3. package/dist/assets/FeatureGuide-BNBq_PLn.js +1 -0
  4. package/dist/assets/SubAgentsPanel-CpKXYYmB.js +1 -0
  5. package/dist/assets/_baseUniq-DVrw3Tro.js +1 -0
  6. package/dist/assets/architectureDiagram-Q4EWVU46-BZE_2gaA.js +36 -0
  7. package/dist/assets/{blockDiagram-DXYQGD6D-B9y1uS9R.js → blockDiagram-DXYQGD6D-CI8uSrzU.js} +4 -4
  8. package/dist/assets/{c4Diagram-AHTNJAMY-BRoJcx0b.js → c4Diagram-AHTNJAMY-DYfj69gY.js} +2 -2
  9. package/dist/assets/chunk-4BX2VUAB-Cw-2rap4.js +1 -0
  10. package/dist/assets/{chunk-4TB4RGXK-D95yqR9H.js → chunk-4TB4RGXK-jxTPHq0D.js} +3 -3
  11. package/dist/assets/chunk-55IACEB6-DmAIxchJ.js +1 -0
  12. package/dist/assets/chunk-EDXVE4YY-FvClTRCF.js +1 -0
  13. package/dist/assets/{chunk-FMBD7UC4-B0r7CE0W.js → chunk-FMBD7UC4-Dv-f6b4O.js} +1 -1
  14. package/dist/assets/{chunk-OYMX7WX6-2_Im5UU8.js → chunk-OYMX7WX6-CUAa_Yz6.js} +3 -3
  15. package/dist/assets/chunk-QZHKN3VN-D1FDs1aQ.js +1 -0
  16. package/dist/assets/chunk-YZCP3GAM-C2iPLYG9.js +1 -0
  17. package/dist/assets/classDiagram-6PBFFD2Q-DVvX4wPS.js +1 -0
  18. package/dist/assets/classDiagram-v2-HSJHXN6E-DVvX4wPS.js +1 -0
  19. package/dist/assets/clone-DRAA6Q7k.js +1 -0
  20. package/dist/assets/cose-bilkent-S5V4N54A-CidaofdU.js +1 -0
  21. package/dist/assets/dagre-KV5264BT-B5okAMLc.js +4 -0
  22. package/dist/assets/diagram-5BDNPKRD-DqlBY-17.js +10 -0
  23. package/dist/assets/diagram-G4DWMVQ6-BuAFDD-X.js +24 -0
  24. package/dist/assets/diagram-MMDJMWI5-CFv_32_w.js +43 -0
  25. package/dist/assets/diagram-TYMM5635-CEU-9NCq.js +24 -0
  26. package/dist/assets/en-US-DLwJLted.js +3 -0
  27. package/dist/assets/{erDiagram-SMLLAGMA-DFjajcpE.js → erDiagram-SMLLAGMA-BGcZ-Hfc.js} +2 -2
  28. package/dist/assets/{flowDiagram-DWJPFMVM-CmdYRxD2.js → flowDiagram-DWJPFMVM-CCSeCjR1.js} +2 -2
  29. package/dist/assets/{ganttDiagram-T4ZO3ILL-BdeV_JQv.js → ganttDiagram-T4ZO3ILL-BqAoxnNO.js} +4 -4
  30. package/dist/assets/gitGraphDiagram-UUTBAWPF-DJ0V7_Rv.js +106 -0
  31. package/dist/assets/{graph-BZhdALnM.js → graph-BxbYGKIB.js} +1 -1
  32. package/dist/assets/index-AIUPRSCn.css +1 -0
  33. package/dist/assets/index-B1KXzc0W.js +8 -0
  34. package/dist/assets/index-B6OABT-M.css +1 -0
  35. package/dist/assets/index-BEkwZ-K8.js +1 -0
  36. package/dist/assets/index-BJC7afG8.js +1 -0
  37. package/dist/assets/index-BylZylqP.js +1 -0
  38. package/dist/assets/index-CLYKYSO0.css +1 -0
  39. package/dist/assets/index-CSqXTBwc.js +1 -0
  40. package/dist/assets/index-Cj9EZ-Bm.js +1 -0
  41. package/dist/assets/index-CucuFwVZ.css +1 -0
  42. package/dist/assets/index-D1aobBlB.js +1 -0
  43. package/dist/assets/index-DLBYvmHv.js +1 -0
  44. package/dist/assets/index-DNsNCcgt.css +1 -0
  45. package/dist/assets/index-DPYLJuvQ.js +1 -0
  46. package/dist/assets/index-D_SsVUqJ.js +21 -0
  47. package/dist/assets/index-DaK9qR94.js +1 -0
  48. package/dist/assets/index-Dkb_XCk_.js +1 -0
  49. package/dist/assets/index-RkUQwJrg.js +1 -0
  50. package/dist/assets/{index.es-Cn1_mau_.js → index.es-BhiHSeCT.js} +1 -1
  51. package/dist/assets/infoDiagram-42DDH7IO-Cemw9omR.js +2 -0
  52. package/dist/assets/{ishikawaDiagram-UXIWVN3A-mjLLHcYj.js → ishikawaDiagram-UXIWVN3A-BYRE-suN.js} +5 -5
  53. package/dist/assets/{journeyDiagram-VCZTEJTY-DKAns2QR.js → journeyDiagram-VCZTEJTY-BRkAfzxG.js} +3 -3
  54. package/dist/assets/{kanban-definition-6JOO6SKY-_8RYarrG.js → kanban-definition-6JOO6SKY-DrTcKNPa.js} +7 -7
  55. package/dist/assets/{layout-BJQnEdOR.js → layout-B2E_GeCC.js} +1 -1
  56. package/dist/assets/main-CuvqMgTQ.js +6 -0
  57. package/dist/assets/min-5KBdYKFY.js +1 -0
  58. package/dist/assets/{mindmap-definition-QFDTVHPH-B8Fqmn2S.js → mindmap-definition-QFDTVHPH-sq4qw8uy.js} +10 -10
  59. package/dist/assets/onboardingStorage-BVcEpmTy.js +1 -0
  60. package/dist/assets/pieDiagram-DEJITSTG-C8vOtX53.js +30 -0
  61. package/dist/assets/{quadrantDiagram-34T5L4WZ-ea-ItGVk.js → quadrantDiagram-34T5L4WZ-LV5yQE3M.js} +3 -3
  62. package/dist/assets/{requirementDiagram-MS252O5E-DoJ6ZjPU.js → requirementDiagram-MS252O5E-Bq6y8VCF.js} +4 -4
  63. package/dist/assets/sankeyDiagram-XADWPNL6-DvABiNaK.js +10 -0
  64. package/dist/assets/{sequenceDiagram-FGHM5R23-CnFMNFdv.js → sequenceDiagram-FGHM5R23-Bv9Ckauz.js} +2 -2
  65. package/dist/assets/stateDiagram-FHFEXIEX-CwYUsnc5.js +1 -0
  66. package/dist/assets/stateDiagram-v2-QKLJ7IA2-aegiqwuH.js +1 -0
  67. package/dist/assets/{timeline-definition-GMOUNBTQ-Dgx0wfE4.js → timeline-definition-GMOUNBTQ-BgidC49j.js} +3 -3
  68. package/dist/assets/{vendor-antd-BpW-8RO2.js → vendor-antd-DODjfilb.js} +85 -85
  69. package/dist/assets/vendor-charts-BYce7JXy.js +65 -0
  70. package/dist/assets/{vendor-markdown-yOmFo5hK.js → vendor-markdown-DzaXAW9Q.js} +23 -23
  71. package/dist/assets/vendor-mermaid-De-Yacw-.js +309 -0
  72. package/dist/assets/{vendor-pdf-xt0MLWhy.js → vendor-pdf-DHgAFQ2M.js} +4 -4
  73. package/dist/assets/vennDiagram-DHZGUBPP-Bzkbjibi.js +34 -0
  74. package/dist/assets/{wardley-RL74JXVD-DIGH9Gor.js → wardley-RL74JXVD-CBRp4POe.js} +2 -2
  75. package/dist/assets/{wardleyDiagram-NUSXRM2D-CMAuUksM.js → wardleyDiagram-NUSXRM2D-DAhT4-uz.js} +3 -3
  76. package/dist/assets/{xychartDiagram-5P7HB3ND-B4_9m2II.js → xychartDiagram-5P7HB3ND-CXfA4uSx.js} +4 -4
  77. package/dist/assets/zh-CN-B74Ip0pW.js +3 -0
  78. package/dist/favicon.png +0 -0
  79. package/dist/index.html +5 -4
  80. package/package.json +2 -1
  81. package/dist/assets/App-CIBUzKFV.js +0 -254
  82. package/dist/assets/_baseUniq-C-LHgpwK.js +0 -1
  83. package/dist/assets/architectureDiagram-Q4EWVU46-knT7SmxI.js +0 -36
  84. package/dist/assets/chunk-4BX2VUAB-Dg65rhkh.js +0 -1
  85. package/dist/assets/chunk-55IACEB6-CUbVVgja.js +0 -1
  86. package/dist/assets/chunk-EDXVE4YY-B_pb0EHW.js +0 -1
  87. package/dist/assets/chunk-QZHKN3VN-DbGqS_ab.js +0 -1
  88. package/dist/assets/chunk-YZCP3GAM-DdAJ9t55.js +0 -1
  89. package/dist/assets/classDiagram-6PBFFD2Q-hQqJj1FL.js +0 -1
  90. package/dist/assets/classDiagram-v2-HSJHXN6E-hQqJj1FL.js +0 -1
  91. package/dist/assets/clone-BnNFRj9O.js +0 -1
  92. package/dist/assets/cose-bilkent-S5V4N54A-BDxVvsWm.js +0 -1
  93. package/dist/assets/dagre-KV5264BT-vzGZtZ_w.js +0 -4
  94. package/dist/assets/diagram-5BDNPKRD-CGYBSS7a.js +0 -10
  95. package/dist/assets/diagram-G4DWMVQ6-DBeNrz6n.js +0 -24
  96. package/dist/assets/diagram-MMDJMWI5-CCt9wdnx.js +0 -43
  97. package/dist/assets/diagram-TYMM5635-B-q2z4os.js +0 -24
  98. package/dist/assets/gitGraphDiagram-UUTBAWPF-Bv1bpmVh.js +0 -106
  99. package/dist/assets/index-8MhLoQym.js +0 -1
  100. package/dist/assets/index-BR-Jz13T.js +0 -1
  101. package/dist/assets/index-Byt6VrzO.js +0 -1
  102. package/dist/assets/index-CTVpEC_u.js +0 -1
  103. package/dist/assets/index-jIgpBMFj.js +0 -1
  104. package/dist/assets/infoDiagram-42DDH7IO-COrckp6q.js +0 -2
  105. package/dist/assets/main-_fs1sZGu.js +0 -10
  106. package/dist/assets/min-CEPPgGqS.js +0 -1
  107. package/dist/assets/pieDiagram-DEJITSTG-BCklzk2d.js +0 -30
  108. package/dist/assets/sankeyDiagram-XADWPNL6-CtYEK_8E.js +0 -10
  109. package/dist/assets/stateDiagram-FHFEXIEX-B_kOGWb-.js +0 -1
  110. package/dist/assets/stateDiagram-v2-QKLJ7IA2-DL6DUSmq.js +0 -1
  111. package/dist/assets/vendor-charts-fIPNnfk-.js +0 -65
  112. package/dist/assets/vendor-mermaid-DA4JIJaA.js +0 -309
  113. package/dist/assets/vennDiagram-DHZGUBPP-DcJGrLhu.js +0 -34
  114. package/dist/vite.svg +0 -1
@@ -0,0 +1 @@
1
+ import{a8 as V,ab as $,aa as lt}from"./vendor-mermaid-De-Yacw-.js";import{c as tt}from"./cytoscape.esm-BiciSPf8.js";import{g as gt}from"./vendor-i18n-BNURlJ23.js";import"./vendor-antd-DODjfilb.js";var k={exports:{}},Z={exports:{}},Q={exports:{}},ut=Q.exports,j;function ft(){return j||(j=1,function(G,b){(function(I,T){G.exports=T()})(ut,function(){return function(N){var I={};function T(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,T),e.l=!0,e.exports}return T.m=N,T.c=I,T.i=function(o){return o},T.d=function(o,e,t){T.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},T.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return T.d(e,"a",e),e},T.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},T.p="",T(T.s=26)}([function(N,I,T){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o},function(N,I,T){var o=T(2),e=T(8),t=T(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.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=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i},function(N,I,T){function o(e){this.vGraphObject=e}N.exports=o},function(N,I,T){var o=T(2),e=T(10),t=T(13),i=T(0),l=T(16),g=T(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;v<p.length;v++)h=p[v],a=h.withChildren(),a.forEach(function(D){r.add(D)});return r},n.prototype.getNoOfChildren=function(){var r=0,h;if(this.child==null)r=1;else for(var a=this.child.getNodes(),p=0;p<a.length;p++)h=a[p],r+=h.getNoOfChildren();return r==0&&(r=1),r},n.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},n.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)},n.prototype.scatter=function(){var r,h,a=-i.INITIAL_WORLD_BOUNDARY,p=i.INITIAL_WORLD_BOUNDARY;r=i.WORLD_CENTER_X+l.nextDouble()*(p-a)+a;var v=-i.INITIAL_WORLD_BOUNDARY,D=i.INITIAL_WORLD_BOUNDARY;h=i.WORLD_CENTER_Y+l.nextDouble()*(D-v)+v,this.rect.x=r,this.rect.y=h},n.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var r=this.getChild();if(r.updateBounds(!0),this.rect.x=r.getLeft(),this.rect.y=r.getTop(),this.setWidth(r.getRight()-r.getLeft()),this.setHeight(r.getBottom()-r.getTop()),i.NODE_DIMENSIONS_INCLUDE_LABELS){var h=r.getRight()-r.getLeft(),a=r.getBottom()-r.getTop();this.labelWidth>h&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n},function(N,I,T){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o},function(N,I,T){var o=T(2),e=T(10),t=T(0),i=T(6),l=T(3),g=T(1),n=T(13),d=T(12),r=T(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var E=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(E.source=v,E.target=D,E.isInterGraph=!1,this.getEdges().push(E),v.edges.push(E),D!=v&&D.edges.push(E),E)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,E=D.length,y=0;y<E;y++)u=D[y],u.isInterGraph?this.graphManager.remove(u):u.source.owner.remove(u);var O=this.nodes.indexOf(v);if(O==-1)throw"Node not in owner node list!";this.nodes.splice(O,1)}else if(p instanceof g){var u=p;if(u==null)throw"Edge is null!";if(!(u.source!=null&&u.target!=null))throw"Source and/or target is null!";if(!(u.source.owner!=null&&u.target.owner!=null&&u.source.owner==this&&u.target.owner==this))throw"Source and/or target owner is invalid!";var s=u.source.edges.indexOf(u),f=u.target.edges.indexOf(u);if(!(s>-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,E,y=this.getNodes(),O=y.length,s=0;s<O;s++){var f=y[s];D=f.getTop(),u=f.getLeft(),p>D&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?E=y[0].getParent().paddingLeft:E=this.margin,this.left=v-E,this.top=p-E,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,E=-e.MAX_VALUE,y,O,s,f,c,L=this.nodes,A=L.length,m=0;m<A;m++){var C=L[m];p&&C.child!=null&&C.updateBounds(),y=C.getLeft(),O=C.getRight(),s=C.getTop(),f=C.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),E<f&&(E=f)}var R=new n(v,u,D-v,E-u);v==e.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),L[0].getParent().paddingLeft!=null?c=L[0].getParent().paddingLeft:c=this.margin,this.left=R.x-c,this.right=R.x+R.width+c,this.top=R.y-c,this.bottom=R.y+R.height+c},h.calculateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,E=-e.MAX_VALUE,y,O,s,f,c=p.length,L=0;L<c;L++){var A=p[L];y=A.getLeft(),O=A.getRight(),s=A.getTop(),f=A.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),E<f&&(E=f)}var m=new n(v,u,D-v,E-u);return m},h.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){for(var p=0,v=this.nodes,D=v.length,u=0;u<D;u++){var E=v[u];p+=E.calcEstimatedSize()}return p==0?this.estimatedSize=t.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=p/Math.sqrt(this.nodes.length),this.estimatedSize},h.prototype.updateConnected=function(){var p=this;if(this.nodes.length==0){this.isConnected=!0;return}var v=new r,D=new Set,u=this.nodes[0],E,y,O=u.withChildren();for(O.forEach(function(m){v.push(m),D.add(m)});v.length!==0;){u=v.shift(),E=u.getEdges();for(var s=E.length,f=0;f<s;f++){var c=E[f];if(y=c.getOtherEndInGraph(u,this),y!=null&&!D.has(y)){var L=y.withChildren();L.forEach(function(m){v.push(m),D.add(m)})}}}if(this.isConnected=!1,D.size>=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h},function(N,I,T){var o,e=T(1);function t(i){o=T(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r<d;r++)n=g[r],l.remove(n);var h=[];h=h.concat(l.getNodes());var a;d=h.length;for(var r=0;r<d;r++)a=h[r],l.remove(a);l==this.rootGraph&&this.setRootGraph(null);var p=this.graphs.indexOf(l);this.graphs.splice(p,1),l.parent=null}else if(i instanceof e){if(n=i,n==null)throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(!(n.source!=null&&n.target!=null))throw"Source and/or target is null!";if(!(n.source.edges.indexOf(n)!=-1&&n.target.edges.indexOf(n)!=-1))throw"Source and/or target doesn't know this edge!";var p=n.source.edges.indexOf(n);if(n.source.edges.splice(p,1),p=n.target.edges.indexOf(n),n.target.edges.splice(p,1),!(n.source.owner!=null&&n.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(n.source.owner.getGraphManager().edges.indexOf(n)==-1)throw"Not in owner graph manager's edge list!";var p=n.source.owner.getGraphManager().edges.indexOf(n);n.source.owner.getGraphManager().edges.splice(p,1)}},t.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},t.prototype.getGraphs=function(){return this.graphs},t.prototype.getAllNodes=function(){if(this.allNodes==null){for(var i=[],l=this.getGraphs(),g=l.length,n=0;n<g;n++)i=i.concat(l[n].getNodes());this.allNodes=i}return this.allNodes},t.prototype.resetAllNodes=function(){this.allNodes=null},t.prototype.resetAllEdges=function(){this.allEdges=null},t.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},t.prototype.getAllEdges=function(){if(this.allEdges==null){var i=[],l=this.getGraphs();l.length;for(var g=0;g<l.length;g++)i=i.concat(l[g].getEdges());i=i.concat(this.edges),this.allEdges=i}return this.allEdges},t.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},t.prototype.setAllNodesToApplyGravitation=function(i){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=i},t.prototype.getRoot=function(){return this.rootGraph},t.prototype.setRootGraph=function(i){if(i.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=i,i.parent==null&&(i.parent=this.layout.newNode("Root node"))},t.prototype.getLayout=function(){return this.layout},t.prototype.isOneAncestorOfOther=function(i,l){if(!(i!=null&&l!=null))throw"assert failed";if(i==l)return!0;var g=i.getOwner(),n;do{if(n=g.getParent(),n==null)break;if(n==l)return!0;if(g=n.getOwner(),g==null)break}while(!0);g=l.getOwner();do{if(n=g.getParent(),n==null)break;if(n==i)return!0;if(g=n.getOwner(),g==null)break}while(!0);return!1},t.prototype.calcLowestCommonAncestors=function(){for(var i,l,g,n,d,r=this.getAllEdges(),h=r.length,a=0;a<h;a++){if(i=r[a],l=i.source,g=i.target,i.lca=null,i.sourceInLca=l,i.targetInLca=g,l==g){i.lca=l.getOwner();continue}for(n=l.getOwner();i.lca==null;){for(i.targetInLca=g,d=g.getOwner();i.lca==null;){if(d==n){i.lca=d;break}if(d==this.rootGraph)break;if(i.lca!=null)throw"assert failed";i.targetInLca=d.getParent(),d=i.targetInLca.getOwner()}if(n==this.rootGraph)break;i.lca==null&&(i.sourceInLca=n.getParent(),n=i.sourceInLca.getOwner())}if(i.lca==null)throw"assert failed"}},t.prototype.calcLowestCommonAncestor=function(i,l){if(i==l)return i.getOwner();var g=i.getOwner();do{if(g==null)break;var n=l.getOwner();do{if(n==null)break;if(n==g)return n;n=n.getParent().getOwner()}while(!0);g=g.getParent().getOwner()}while(!0);return g},t.prototype.calcInclusionTreeDepths=function(i,l){i==null&&l==null&&(i=this.rootGraph,l=1);for(var g,n=i.getNodes(),d=n.length,r=0;r<d;r++)g=n[r],g.inclusionTreeDepth=l,g.child!=null&&this.calcInclusionTreeDepths(g.child,l+1)},t.prototype.includesInvalidEdge=function(){for(var i,l=this.edges.length,g=0;g<l;g++)if(i=this.edges[g],this.isOneAncestorOfOther(i.source,i.target))return!0;return!1},N.exports=t},function(N,I,T){var o=T(0);function e(){}for(var t in o)e[t]=o[t];e.MAX_ITERATIONS=2500,e.DEFAULT_EDGE_LENGTH=50,e.DEFAULT_SPRING_STRENGTH=.45,e.DEFAULT_REPULSION_STRENGTH=4500,e.DEFAULT_GRAVITY_STRENGTH=.4,e.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,e.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,e.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,e.COOLING_ADAPTATION_FACTOR=.33,e.ADAPTATION_LOWER_NODE_LIMIT=1e3,e.ADAPTATION_UPPER_NODE_LIMIT=5e3,e.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,e.MAX_NODE_DISPLACEMENT=e.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,e.MIN_REPULSION_DIST=e.DEFAULT_EDGE_LENGTH/10,e.CONVERGENCE_CHECK_PERIOD=100,e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,e.MIN_EDGE_LENGTH=1,e.GRID_CALCULATION_CHECK_PERIOD=10,N.exports=e},function(N,I,T){var o=T(12);function e(){}e.calcSeparationAmount=function(t,i,l,g){if(!t.intersects(i))throw"assert failed";var n=new Array(2);this.decideDirectionsForOverlappingNodes(t,i,n),l[0]=Math.min(t.getRight(),i.getRight())-Math.max(t.x,i.x),l[1]=Math.min(t.getBottom(),i.getBottom())-Math.max(t.y,i.y),t.getX()<=i.getX()&&t.getRight()>=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]<h?h=l[0]:r=l[1],l[0]=-1*n[0]*(h/2+g),l[1]=-1*n[1]*(r/2+g)},e.decideDirectionsForOverlappingNodes=function(t,i,l){t.getCenterX()<i.getCenterX()?l[0]=-1:l[0]=1,t.getCenterY()<i.getCenterY()?l[1]=-1:l[1]=1},e.getIntersection2=function(t,i,l){var g=t.getCenterX(),n=t.getCenterY(),d=i.getCenterX(),r=i.getCenterY();if(t.intersects(i))return l[0]=g,l[1]=n,l[2]=d,l[3]=r,!0;var h=t.getX(),a=t.getY(),p=t.getRight(),v=t.getX(),D=t.getBottom(),u=t.getRight(),E=t.getWidthHalf(),y=t.getHeightHalf(),O=i.getX(),s=i.getY(),f=i.getRight(),c=i.getX(),L=i.getBottom(),A=i.getRight(),m=i.getWidthHalf(),C=i.getHeightHalf(),R=!1,M=!1;if(g===d){if(n>r)return l[0]=g,l[1]=a,l[2]=d,l[3]=L,!1;if(n<r)return l[0]=g,l[1]=D,l[2]=d,l[3]=s,!1}else if(n===r){if(g>d)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(g<d)return l[0]=p,l[1]=n,l[2]=O,l[3]=r,!1}else{var S=t.height/t.width,Y=i.height/i.width,w=(r-n)/(d-g),x=void 0,F=void 0,U=void 0,P=void 0,_=void 0,X=void 0;if(-S===w?g>d?(l[0]=v,l[1]=D,R=!0):(l[0]=p,l[1]=a,R=!0):S===w&&(g>d?(l[0]=h,l[1]=a,R=!0):(l[0]=u,l[1]=D,R=!0)),-Y===w?d>g?(l[2]=c,l[3]=L,M=!0):(l[2]=f,l[3]=s,M=!0):Y===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=L,M=!0)),R&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(Y,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-Y,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-Y,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(Y,w,4)),!R)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+E*w,l[0]=U,l[1]=P;break;case 3:P=D,U=g+y/w,l[0]=U,l[1]=P;break;case 4:U=v,P=n+-E*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-C/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=L,_=d+C/w,l[2]=_,l[3]=X;break;case 4:_=c,X=r+-m*w,l[2]=_,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,E=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,L=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,L=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*L-f*c)/A,E=(O*c-y*L)/A,new o(u,E))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l<t?n+=Math.PI:g<i&&(n+=this.TWO_PI)):g<i?n=this.ONE_AND_HALF_PI:n=this.HALF_PI,n},e.doIntersect=function(t,i,l,g){var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=(r-n)*(D-p)-(v-a)*(h-d);if(u===0)return!1;var E=((D-p)*(v-n)+(a-v)*(D-d))/u,y=((d-h)*(v-n)+(r-n)*(D-d))/u;return 0<E&&E<1&&0<y&&y<1},e.HALF_PI=.5*Math.PI,e.ONE_AND_HALF_PI=1.5*Math.PI,e.TWO_PI=2*Math.PI,e.THREE_PI=3*Math.PI,N.exports=e},function(N,I,T){function o(){}o.sign=function(e){return e>0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o},function(N,I,T){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o},function(N,I,T){var o=function(){function n(d,r){for(var h=0;h<r.length;h++){var a=r[h];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}}return function(d,r,h){return r&&n(d.prototype,r),h&&n(d,h),d}}();function e(n,d){if(!(n instanceof d))throw new TypeError("Cannot call a class as a function")}var t=function(d){return{value:d,next:null,prev:null}},i=function(d,r,h,a){return d!==null?d.next=r:a.head=r,h!==null?h.prev=r:a.tail=r,r.prev=d,r.next=h,a.length++,r},l=function(d,r){var h=d.prev,a=d.next;return h!==null?h.next=a:r.head=a,a!==null?a.prev=h:r.tail=h,d.prev=d.next=null,r.length--,d},g=function(){function n(d){var r=this;e(this,n),this.length=0,this.head=null,this.tail=null,d!=null&&d.forEach(function(h){return r.push(h)})}return o(n,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(r,h){return i(h.prev,t(r),h,this)}},{key:"insertAfter",value:function(r,h){return i(h,t(r),h.next,this)}},{key:"insertNodeBefore",value:function(r,h){return i(h.prev,r,h,this)}},{key:"insertNodeAfter",value:function(r,h){return i(h,r,h.next,this)}},{key:"push",value:function(r){return i(this.tail,t(r),null,this)}},{key:"unshift",value:function(r){return i(null,t(r),this.head,this)}},{key:"remove",value:function(r){return l(r,this)}},{key:"pop",value:function(){return l(this.tail,this).value}},{key:"popNode",value:function(){return l(this.tail,this)}},{key:"shift",value:function(){return l(this.head,this).value}},{key:"shiftNode",value:function(){return l(this.head,this)}},{key:"get_object_at",value:function(r){if(r<=this.length()){for(var h=1,a=this.head;h<r;)a=a.next,h++;return a.value}}},{key:"set_object_at",value:function(r,h){if(r<=this.length()){for(var a=1,p=this.head;a<r;)p=p.next,a++;p.value=h}}}]),n}();N.exports=g},function(N,I,T){function o(e,t,i){this.x=null,this.y=null,e==null&&t==null&&i==null?(this.x=0,this.y=0):typeof e=="number"&&typeof t=="number"&&i==null?(this.x=e,this.y=t):e.constructor.name=="Point"&&t==null&&i==null&&(i=e,this.x=i.x,this.y=i.y)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.getLocation=function(){return new o(this.x,this.y)},o.prototype.setLocation=function(e,t,i){e.constructor.name=="Point"&&t==null&&i==null?(i=e,this.setLocation(i.x,i.y)):typeof e=="number"&&typeof t=="number"&&i==null&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},o.prototype.move=function(e,t){this.x=e,this.y=t},o.prototype.translate=function(e,t){this.x+=e,this.y+=t},o.prototype.equals=function(e){if(e.constructor.name=="Point"){var t=e;return this.x==t.x&&this.y==t.y}return this==e},o.prototype.toString=function(){return new o().constructor.name+"[x="+this.x+",y="+this.y+"]"},N.exports=o},function(N,I,T){function o(e,t,i,l){this.x=0,this.y=0,this.width=0,this.height=0,e!=null&&t!=null&&i!=null&&l!=null&&(this.x=e,this.y=t,this.width=i,this.height=l)}o.prototype.getX=function(){return this.x},o.prototype.setX=function(e){this.x=e},o.prototype.getY=function(){return this.y},o.prototype.setY=function(e){this.y=e},o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},o.prototype.getRight=function(){return this.x+this.width},o.prototype.getBottom=function(){return this.y+this.height},o.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},o.prototype.getCenterX=function(){return this.x+this.width/2},o.prototype.getMinX=function(){return this.getX()},o.prototype.getMaxX=function(){return this.getX()+this.width},o.prototype.getCenterY=function(){return this.y+this.height/2},o.prototype.getMinY=function(){return this.getY()},o.prototype.getMaxY=function(){return this.getY()+this.height},o.prototype.getWidthHalf=function(){return this.width/2},o.prototype.getHeightHalf=function(){return this.height/2},N.exports=o},function(N,I,T){var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function e(){}e.lastID=0,e.createID=function(t){return e.isPrimitive(t)?t:(t.uniqueID!=null||(t.uniqueID=e.getString(),e.lastID++),t.uniqueID)},e.getString=function(t){return t==null&&(t=e.lastID),"Object#"+t},e.isPrimitive=function(t){var i=typeof t>"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e},function(N,I,T){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p<a.length;p++)v[p]=a[p];return v}else return Array.from(a)}var e=T(0),t=T(6),i=T(3),l=T(1),g=T(5),n=T(4),d=T(17),r=T(27);function h(a){r.call(this),this.layoutQuality=e.QUALITY,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=e.DEFAULT_INCREMENTAL,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new t(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,a!=null&&(this.isRemoteUse=a)}h.RANDOM_SEED=1,h.prototype=Object.create(r.prototype),h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},h.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},h.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},h.prototype.newGraphManager=function(){var a=new t(this);return this.graphManager=a,a},h.prototype.newGraph=function(a){return new g(null,this.graphManager,a)},h.prototype.newNode=function(a){return new i(this.graphManager,a)},h.prototype.newEdge=function(a){return new l(null,null,a)},h.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},h.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var a;return this.checkLayoutSuccess()?a=!1:a=this.layout(),e.ANIMATE==="during"?!1:(a&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,a)},h.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},h.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var a=this.graphManager.getAllEdges(),p=0;p<a.length;p++)a[p];for(var v=this.graphManager.getRoot().getNodes(),p=0;p<v.length;p++)v[p];this.update(this.graphManager.getRoot())}},h.prototype.update=function(a){if(a==null)this.update2();else if(a instanceof i){var p=a;if(p.getChild()!=null)for(var v=p.getChild().getNodes(),D=0;D<v.length;D++)update(v[D]);if(p.vGraphObject!=null){var u=p.vGraphObject;u.update(p)}}else if(a instanceof l){var E=a;if(E.vGraphObject!=null){var y=E.vGraphObject;y.update(E)}}else if(a instanceof g){var O=a;if(O.vGraphObject!=null){var s=O.vGraphObject;s.update(O)}}},h.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=e.QUALITY,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=e.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},h.prototype.transform=function(a){if(a==null)this.transform(new n(0,0));else{var p=new d,v=this.graphManager.getRoot().updateLeftTop();if(v!=null){p.setWorldOrgX(a.x),p.setWorldOrgY(a.y),p.setDeviceOrgX(v.x),p.setDeviceOrgY(v.y);for(var D=this.getAllNodes(),u,E=0;E<D.length;E++)u=D[E],u.transform(p)}}},h.prototype.positionNodesRandomly=function(a){if(a==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var p,v,D=a.getNodes(),u=0;u<D.length;u++)p=D[u],v=p.getChild(),v==null||v.getNodes().length==0?p.scatter():(this.positionNodesRandomly(v),p.updateBounds())},h.prototype.getFlatForest=function(){for(var a=[],p=!0,v=this.graphManager.getRoot().getNodes(),D=!0,u=0;u<v.length;u++)v[u].getChild()!=null&&(D=!1);if(!D)return a;var E=new Set,y=[],O=new Map,s=[];for(s=s.concat(v);s.length>0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),E.add(f);for(var c=f.getEdges(),u=0;u<c.length;u++){var L=c[u].getOtherEnd(f);if(O.get(f)!=L)if(!E.has(L))y.push(L),O.set(L,f);else{p=!1;break}}}if(!p)a=[];else{var A=[].concat(o(E));a.push(A);for(var u=0;u<A.length;u++){var m=A[u],C=s.indexOf(m);C>-1&&s.splice(C,1)}E=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u<a.bendpoints.length;u++){var E=this.newNode(null);E.setRect(new Point(0,0),new Dimension(1,1)),D.add(E);var y=this.newEdge(null);this.graphManager.add(y,v,E),p.add(E),v=E}var y=this.newEdge(null);return this.graphManager.add(y,v,a.target),this.edgeToDummyNodes.set(a,p),a.isInterGraph()?this.graphManager.remove(a):D.remove(a),p},h.prototype.createBendpointsFromDummyNodes=function(){var a=[];a=a.concat(this.graphManager.getAllEdges()),a=[].concat(o(this.edgeToDummyNodes.keys())).concat(a);for(var p=0;p<a.length;p++){var v=a[p];if(v.bendpoints.length>0){for(var D=this.edgeToDummyNodes.get(v),u=0;u<D.length;u++){var E=D[u],y=new n(E.getCenterX(),E.getCenterY()),O=v.bendpoints.get(u);O.x=y.x,O.y=y.y,E.getOwner().remove(E)}this.graphManager.add(v,v.source,v.target)}}},h.transform=function(a,p,v,D){if(v!=null&&D!=null){var u=p;if(a<=50){var E=p/v;u-=(p-E)/50*(50-a)}else{var y=p*D;u+=(y-p)/50*(a-50)}return u}else{var O,s;return a<=50?(O=9*p/500,s=p/10):(O=9*p/50,s=-8*p),O*a+s}},h.findCenterOfTree=function(a){var p=[];p=p.concat(a);var v=[],D=new Map,u=!1,E=null;(p.length==1||p.length==2)&&(u=!0,E=p[0]);for(var y=0;y<p.length;y++){var O=p[y],s=O.getNeighborsList().size;D.set(O,O.getNeighborsList().size),s==1&&v.push(O)}var f=[];for(f=f.concat(v);!u;){var c=[];c=c.concat(f),f=[];for(var y=0;y<p.length;y++){var O=p[y],L=p.indexOf(O);L>=0&&p.splice(L,1);var A=O.getNeighborsList();A.forEach(function(R){if(v.indexOf(R)<0){var M=D.get(R),S=M-1;S==1&&f.push(R),D.set(R,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,E=p[0])}return E},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h},function(N,I,T){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o},function(N,I,T){var o=T(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e},function(N,I,T){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);h<r.length;h++)a[h]=r[h];return a}else return Array.from(r)}var e=T(15),t=T(7),i=T(0),l=T(8),g=T(9);function n(){e.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}n.prototype=Object.create(e.prototype);for(var d in e)n[d]=e[d];n.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},n.prototype.calcIdealEdgeLengths=function(){for(var r,h,a,p,v,D,u=this.getGraphManager().getAllEdges(),E=0;E<u.length;E++)r=u[E],r.idealLength=this.idealEdgeLength,r.isInterGraph&&(a=r.getSource(),p=r.getTarget(),v=r.getSourceInLca().getEstimatedSize(),D=r.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(r.idealLength+=v+D-2*i.SIMPLE_NODE_SIZE),h=r.getLca().getInclusionTreeDepth(),r.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(a.getInclusionTreeDepth()+p.getInclusionTreeDepth()-2*h))},n.prototype.initSpringEmbedder=function(){var r=this.getAllNodes().length;this.incremental?(r>t.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a<r.length;a++)h=r[a],this.calcSpringForce(h,h.idealLength)},n.prototype.calcRepulsionForces=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),E;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),E=new Set,a=0;a<u.length;a++)v=u[a],this.calculateRepulsionForceOfANode(v,E,r,h),E.add(v);else for(a=0;a<u.length;a++)for(v=u[a],p=a+1;p<u.length;p++)D=u[p],v.getOwner()==D.getOwner()&&this.calcRepulsionForce(v,D)},n.prototype.calcGravitationalForces=function(){for(var r,h=this.getAllNodesToApplyGravitation(),a=0;a<h.length;a++)r=h[a],this.calcGravitationalForce(r)},n.prototype.moveNodes=function(){for(var r=this.getAllNodes(),h,a=0;a<r.length;a++)h=r[a],h.move()},n.prototype.calcSpringForce=function(r,h){var a=r.getSource(),p=r.getTarget(),v,D,u,E;if(this.uniformLeafNodeSizes&&a.getChild()==null&&p.getChild()==null)r.updateLengthSimple();else if(r.updateLength(),r.isOverlapingSourceAndTarget)return;v=r.getLength(),v!=0&&(D=this.springConstant*(v-h),u=D*(r.lengthX/v),E=D*(r.lengthY/v),a.springForceX+=u,a.springForceY+=E,p.springForceX-=u,p.springForceY-=E)},n.prototype.calcRepulsionForce=function(r,h){var a=r.getRect(),p=h.getRect(),v=new Array(2),D=new Array(4),u,E,y,O,s,f,c;if(a.intersects(p)){l.calcSeparationAmount(a,p,v,t.DEFAULT_EDGE_LENGTH/2),f=2*v[0],c=2*v[1];var L=r.noOfChildren*h.noOfChildren/(r.noOfChildren+h.noOfChildren);r.repulsionForceX-=L*f,r.repulsionForceY-=L*c,h.repulsionForceX+=L*f,h.repulsionForceY+=L*c}else this.uniformLeafNodeSizes&&r.getChild()==null&&h.getChild()==null?(u=p.getCenterX()-a.getCenterX(),E=p.getCenterY()-a.getCenterY()):(l.getIntersection(a,p,D),u=D[2]-D[0],E=D[3]-D[1]),Math.abs(u)<t.MIN_REPULSION_DIST&&(u=g.sign(u)*t.MIN_REPULSION_DIST),Math.abs(E)<t.MIN_REPULSION_DIST&&(E=g.sign(E)*t.MIN_REPULSION_DIST),y=u*u+E*E,O=Math.sqrt(y),s=this.repulsionConstant*r.noOfChildren*h.noOfChildren/y,f=s*u/O,c=s*E/O,r.repulsionForceX-=f,r.repulsionForceY-=c,h.repulsionForceX+=f,h.repulsionForceY+=c},n.prototype.calcGravitationalForce=function(r){var h,a,p,v,D,u,E,y;h=r.getOwner(),a=(h.getRight()+h.getLeft())/2,p=(h.getTop()+h.getBottom())/2,v=r.getCenterX()-a,D=r.getCenterY()-p,u=Math.abs(v)+r.getWidth()/2,E=Math.abs(D)+r.getHeight()/2,r.getOwner()==this.graphManager.getRoot()?(y=h.getEstimatedSize()*this.gravityRangeFactor,(u>y||E>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||E>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,r||h},n.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},n.prototype.calcNoOfChildrenForAllNodes=function(){for(var r,h=this.graphManager.getAllNodes(),a=0;a<h.length;a++)r=h[a],r.noOfChildren=r.getNoOfChildren()},n.prototype.calcGrid=function(r){var h=0,a=0;h=parseInt(Math.ceil((r.getRight()-r.getLeft())/this.repulsionRange)),a=parseInt(Math.ceil((r.getBottom()-r.getTop())/this.repulsionRange));for(var p=new Array(h),v=0;v<h;v++)p[v]=new Array(a);for(var v=0;v<h;v++)for(var D=0;D<a;D++)p[v][D]=new Array;return p},n.prototype.addNodeToGrid=function(r,h,a){var p=0,v=0,D=0,u=0;p=parseInt(Math.floor((r.getRect().x-h)/this.repulsionRange)),v=parseInt(Math.floor((r.getRect().width+r.getRect().x-h)/this.repulsionRange)),D=parseInt(Math.floor((r.getRect().y-a)/this.repulsionRange)),u=parseInt(Math.floor((r.getRect().height+r.getRect().y-a)/this.repulsionRange));for(var E=p;E<=v;E++)for(var y=D;y<=u;y++)this.grid[E][y].push(r),r.setGridCoordinates(p,v,D,u)},n.prototype.updateGrid=function(){var r,h,a=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),r=0;r<a.length;r++)h=a[r],this.addNodeToGrid(h,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},n.prototype.calculateRepulsionForceOfANode=function(r,h,a,p){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&a||p){var v=new Set;r.surrounding=new Array;for(var D,u=this.grid,E=r.startX-1;E<r.finishX+2;E++)for(var y=r.startY-1;y<r.finishY+2;y++)if(!(E<0||y<0||E>=u.length||y>=u[0].length)){for(var O=0;O<u[E][y].length;O++)if(D=u[E][y][O],!(r.getOwner()!=D.getOwner()||r==D)&&!h.has(D)&&!v.has(D)){var s=Math.abs(r.getCenterX()-D.getCenterX())-(r.getWidth()/2+D.getWidth()/2),f=Math.abs(r.getCenterY()-D.getCenterY())-(r.getHeight()/2+D.getHeight()/2);s<=this.repulsionRange&&f<=this.repulsionRange&&v.add(D)}}r.surrounding=[].concat(o(v))}for(E=0;E<r.surrounding.length;E++)this.calcRepulsionForce(r,r.surrounding[E])},n.prototype.calcRepulsionRange=function(){return 0},N.exports=n},function(N,I,T){var o=T(1),e=T(7);function t(l,g,n){o.call(this,l,g,n),this.idealLength=e.DEFAULT_EDGE_LENGTH}t.prototype=Object.create(o.prototype);for(var i in o)t[i]=o[i];N.exports=t},function(N,I,T){var o=T(3);function e(i,l,g,n){o.call(this,i,l,g,n),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}e.prototype=Object.create(o.prototype);for(var t in o)e[t]=o[t];e.prototype.setGridCoordinates=function(i,l,g,n){this.startX=i,this.finishX=l,this.startY=g,this.finishY=n},N.exports=e},function(N,I,T){function o(e,t){this.width=0,this.height=0,e!==null&&t!==null&&(this.height=t,this.width=e)}o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},N.exports=o},function(N,I,T){var o=T(14);function e(){this.map={},this.keys=[]}e.prototype.put=function(t,i){var l=o.createID(t);this.contains(l)||(this.map[l]=i,this.keys.push(t))},e.prototype.contains=function(t){return o.createID(t),this.map[t]!=null},e.prototype.get=function(t){var i=o.createID(t);return this.map[i]},e.prototype.keySet=function(){return this.keys},N.exports=e},function(N,I,T){var o=T(14);function e(){this.set={}}e.prototype.add=function(t){var i=o.createID(t);this.contains(i)||(this.set[i]=t)},e.prototype.remove=function(t){delete this.set[o.createID(t)]},e.prototype.clear=function(){this.set={}},e.prototype.contains=function(t){return this.set[o.createID(t)]==t},e.prototype.isEmpty=function(){return this.size()===0},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAllTo=function(t){for(var i=Object.keys(this.set),l=i.length,g=0;g<l;g++)t.push(this.set[i[g]])},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAll=function(t){for(var i=t.length,l=0;l<i;l++){var g=t[l];this.add(g)}},N.exports=e},function(N,I,T){var o=function(){function l(g,n){for(var d=0;d<n.length;d++){var r=n[d];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(g,r.key,r)}}return function(g,n,d){return n&&l(g.prototype,n),d&&l(g,d),g}}();function e(l,g){if(!(l instanceof g))throw new TypeError("Cannot call a class as a function")}var t=T(11),i=function(){function l(g,n){e(this,l),(n!==null||n!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var d=void 0;g instanceof t?d=g.size():d=g.length,this._quicksort(g,0,d-1)}return o(l,[{key:"_quicksort",value:function(n,d,r){if(d<r){var h=this._partition(n,d,r);this._quicksort(n,d,h),this._quicksort(n,h+1,r)}}},{key:"_partition",value:function(n,d,r){for(var h=this._get(n,d),a=d,p=r;;){for(;this.compareFunction(h,this._get(n,p));)p--;for(;this.compareFunction(this._get(n,a),h);)a++;if(a<p)this._swap(n,a,p),a++,p--;else return p}}},{key:"_get",value:function(n,d){return n instanceof t?n.get_object_at(d):n[d]}},{key:"_set",value:function(n,d,r){n instanceof t?n.set_object_at(d,r):n[d]=r}},{key:"_swap",value:function(n,d,r){var h=this._get(n,d);this._set(n,d,this._get(n,r)),this._set(n,r,h)}},{key:"_defaultCompareFunction",value:function(n,d){return d>n}}]),l}();N.exports=i},function(N,I,T){var o=function(){function i(l,g){for(var n=0;n<g.length;n++){var d=g[n];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(l,d.key,d)}}return function(l,g,n){return g&&i(l.prototype,g),n&&i(l,n),l}}();function e(i,l){if(!(i instanceof l))throw new TypeError("Cannot call a class as a function")}var t=function(){function i(l,g){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h<this.iMax;h++){this.grid[h]=new Array(this.jMax);for(var a=0;a<this.jMax;a++)this.grid[h][a]=0}this.tracebackGrid=new Array(this.iMax);for(var p=0;p<this.iMax;p++){this.tracebackGrid[p]=new Array(this.jMax);for(var v=0;v<this.jMax;v++)this.tracebackGrid[p][v]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return o(i,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var g=1;g<this.jMax;g++)this.grid[0][g]=this.grid[0][g-1]+this.gap_penalty,this.tracebackGrid[0][g]=[!1,!1,!0];for(var n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var d=1;d<this.iMax;d++)for(var r=1;r<this.jMax;r++){var h=void 0;this.sequence1[d-1]===this.sequence2[r-1]?h=this.grid[d-1][r-1]+this.match_score:h=this.grid[d-1][r-1]+this.mismatch_penalty;var a=this.grid[d-1][r]+this.gap_penalty,p=this.grid[d][r-1]+this.gap_penalty,v=[h,a,p],D=this.arrayAllMaxIndexes(v);this.grid[d][r]=v[D[0]],this.tracebackGrid[d][r]=[D.includes(0),D.includes(1),D.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var g=[];for(g.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});g[0];){var n=g[0],d=this.tracebackGrid[n.pos[0]][n.pos[1]];d[0]&&g.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),d[1]&&g.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),d[2]&&g.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),n.pos[0]===0&&n.pos[1]===0&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),g.shift()}return this.alignments}},{key:"getAllIndexes",value:function(g,n){for(var d=[],r=-1;(r=g.indexOf(n,r+1))!==-1;)d.push(r);return d}},{key:"arrayAllMaxIndexes",value:function(g){return this.getAllIndexes(g,Math.max.apply(null,g))}}]),i}();N.exports=t},function(N,I,T){var o=function(){};o.FDLayout=T(18),o.FDLayoutConstants=T(7),o.FDLayoutEdge=T(19),o.FDLayoutNode=T(20),o.DimensionD=T(21),o.HashMap=T(22),o.HashSet=T(23),o.IGeometry=T(8),o.IMath=T(9),o.Integer=T(10),o.Point=T(12),o.PointD=T(4),o.RandomSeed=T(16),o.RectangleD=T(13),o.Transform=T(17),o.UniqueIDGeneretor=T(14),o.Quicksort=T(24),o.LinkedList=T(11),o.LGraphObject=T(2),o.LGraph=T(5),o.LEdge=T(1),o.LGraphManager=T(6),o.LNode=T(3),o.Layout=T(15),o.LayoutConstants=T(0),o.NeedlemanWunsch=T(25),N.exports=o},function(N,I,T){function o(){this.listeners=[]}var e=o.prototype;e.addListener=function(t,i){this.listeners.push({event:t,callback:i})},e.removeListener=function(t,i){for(var l=this.listeners.length;l>=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;l<this.listeners.length;l++){var g=this.listeners[l];t===g.event&&g.callback(i)}},N.exports=o}])})}(Q)),Q.exports}var ct=Z.exports,z;function pt(){return z||(z=1,function(G,b){(function(I,T){G.exports=T(ft())})(ct,function(N){return function(I){var T={};function o(e){if(T[e])return T[e].exports;var t=T[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=T,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=7)}([function(I,T){I.exports=N},function(I,T,o){var e=o(0).FDLayoutConstants;function t(){}for(var i in e)t[i]=e[i];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=e.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,I.exports=t},function(I,T,o){var e=o(0).FDLayoutEdge;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t},function(I,T,o){var e=o(0).LGraph;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t},function(I,T,o){var e=o(0).LGraphManager;function t(l){e.call(this,l)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t},function(I,T,o){var e=o(0).FDLayoutNode,t=o(0).IMath;function i(g,n,d,r){e.call(this,g,n,d,r)}i.prototype=Object.create(e.prototype);for(var l in e)i[l]=e[l];i.prototype.move=function(){var g=this.graphManager.getLayout();this.displacementX=g.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=g.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.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},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h<d.length;h++)r=d[h],r.getChild()==null?(r.moveBy(g,n),r.displacementX+=g,r.displacementY+=n):r.propogateDisplacementToChildren(g,n)},i.prototype.setPred1=function(g){this.pred1=g},i.prototype.getPred1=function(){return pred1},i.prototype.getPred2=function(){return pred2},i.prototype.setNext=function(g){this.next=g},i.prototype.getNext=function(){return next},i.prototype.setProcessed=function(g){this.processed=g},i.prototype.isProcessed=function(){return processed},I.exports=i},function(I,T,o){var e=o(0).FDLayout,t=o(4),i=o(3),l=o(5),g=o(2),n=o(1),d=o(0).FDLayoutConstants,r=o(0).LayoutConstants,h=o(0).Point,a=o(0).PointD,p=o(0).Layout,v=o(0).Integer,D=o(0).IGeometry,u=o(0).LGraph,E=o(0).Transform;function y(){e.call(this),this.toBeTiled={}}y.prototype=Object.create(e.prototype);for(var O in e)y[O]=e[O];y.prototype.newGraphManager=function(){var s=new t(this);return this.graphManager=s,s},y.prototype.newGraph=function(s){return new i(null,this.graphManager,s)},y.prototype.newNode=function(s){return new l(this.graphManager,s)},y.prototype.newEdge=function(s){return new g(null,null,s)},y.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.isSubLayout||(n.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=n.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=d.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=d.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=d.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},y.prototype.layout=function(){var s=r.DEFAULT_CREATE_BENDS_AS_NEEDED;return s&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},y.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(n.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(m){return f.has(m)});this.graphManager.setAllNodesToApplyGravitation(c)}}else{var s=this.getFlatForest();if(s.length>0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(L){return f.has(L)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.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%d.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 s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,L=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,L),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c<s.length;c++){var L=s[c].rect,A=s[c].id;f[A]={id:A,x:L.getCenterX(),y:L.getCenterY(),w:L.width,h:L.height}}return f},y.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(d.ANIMATE==="during")this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},y.prototype.calculateNodesToApplyGravitationTo=function(){var s=[],f,c=this.graphManager.getGraphs(),L=c.length,A;for(A=0;A<L;A++)f=c[A],f.updateConnected(),f.isConnected||(s=s.concat(f.getNodes()));return s},y.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var f=new Set,c;for(c=0;c<s.length;c++){var L=s[c];if(!f.has(L)){var A=L.getSource(),m=L.getTarget();if(A==m)L.getBendpoints().push(new a),L.getBendpoints().push(new a),this.createDummyNodesForBendpoints(L),f.add(L);else{var C=[];if(C=C.concat(A.getEdgeListToNode(m)),C=C.concat(m.getEdgeListToNode(A)),!f.has(C[0])){if(C.length>1){var R;for(R=0;R<C.length;R++){var M=C[R];M.getBendpoints().push(new a),this.createDummyNodesForBendpoints(M)}}C.forEach(function(S){f.add(S)})}}}if(f.size==s.length)break}},y.prototype.positionNodesRadially=function(s){for(var f=new h(0,0),c=Math.ceil(Math.sqrt(s.length)),L=0,A=0,m=0,C=new a(0,0),R=0;R<s.length;R++){R%c==0&&(m=0,A=L,R!=0&&(A+=n.DEFAULT_COMPONENT_SEPERATION),L=0);var M=s[R],S=p.findCenterOfTree(M);f.x=m,f.y=A,C=y.radialLayout(M,S,f),C.y>L&&(L=Math.floor(C.y)),m=Math.floor(C.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-C.x/2,r.WORLD_CENTER_Y-C.y/2))},y.radialLayout=function(s,f,c){var L=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,L);var A=u.calculateBounds(s),m=new E;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var C=0;C<s.length;C++){var R=s[C];R.transform(m)}var M=new a(A.getMaxX(),A.getMaxY());return m.inverseTransformPoint(M)},y.branchRadialLayout=function(s,f,c,L,A,m){var C=(L-c+1)/2;C<0&&(C+=180);var R=(C+c)%360,M=R*D.TWO_PI/360,S=A*Math.cos(M),Y=A*Math.sin(M);s.setCenter(S,Y);var w=[];w=w.concat(s.getEdges());var x=w.length;f!=null&&x--;for(var F=0,U=w.length,P,_=s.getEdgesBetween(f);_.length>1;){var X=_[0];_.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),U--,x--}f!=null?P=(w.indexOf(_[0])+1)%U:P=0;for(var W=Math.abs(L-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var q=(c+F*W)%360,ht=(q+W)%360;y.branchRadialLayout(K,s,q,ht,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;c<s.length;c++){var L=s[c],A=L.getDiagonal();A>f&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],L=this.graphManager.getAllNodes(),A=0;A<L.length;A++){var m=L[A],C=m.getParent();this.getNodeDegreeWithChildren(m)===0&&(C.id==null||!this.getToBeTiled(C))&&c.push(m)}for(var A=0;A<c.length;A++){var m=c[A],R=m.getParent().id;typeof f[R]>"u"&&(f[R]=[]),f[R]=f[R].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var Y=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=Y.paddingLeft||0,w.paddingRight=Y.paddingRight||0,w.paddingBottom=Y.paddingBottom||0,w.paddingTop=Y.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=Y.getChild();F.add(w);for(var U=0;U<f[M].length;U++){var P=f[M][U];F.remove(P),x.add(P)}}})},y.prototype.clearCompounds=function(){var s={},f={};this.performDFSOnCompounds();for(var c=0;c<this.compoundOrder.length;c++)f[this.compoundOrder[c].id]=this.compoundOrder[c],s[this.compoundOrder[c].id]=[].concat(this.compoundOrder[c].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[c].getChild()),this.compoundOrder[c].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,f)},y.prototype.clearZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(c){var L=s.idToDummyNode[c];f[c]=s.tileNodes(s.memberGroups[c],L.paddingLeft+L.paddingRight),L.rect.width=f[c].width,L.rect.height=f[c].height})},y.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var f=this.compoundOrder[s],c=f.id,L=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,L,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var L=s.idToDummyNode[c],A=L.paddingLeft,m=L.paddingTop;s.adjustLocations(f[c],L.rect.x,L.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var L=c.getNodes(),A=0;A<L.length;A++){var m=L[A];if(this.getNodeDegree(m)>0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,L=0;L<f.length;L++){var A=f[L];A.getSource().id!==A.getTarget().id&&(c=c+1)}return c},y.prototype.getNodeDegreeWithChildren=function(s){var f=this.getNodeDegree(s);if(s.getChild()==null)return f;for(var c=s.getChild().getNodes(),L=0;L<c.length;L++){var A=c[L];f+=this.getNodeDegreeWithChildren(A)}return f},y.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},y.prototype.fillCompexOrderByDFS=function(s){for(var f=0;f<s.length;f++){var c=s[f];c.getChild()!=null&&this.fillCompexOrderByDFS(c.getChild().getNodes()),this.getToBeTiled(c)&&this.compoundOrder.push(c)}},y.prototype.adjustLocations=function(s,f,c,L,A){f+=L,c+=A;for(var m=f,C=0;C<s.rows.length;C++){var R=s.rows[C];f=m;for(var M=0,S=0;S<R.length;S++){var Y=R[S];Y.rect.x=f,Y.rect.y=c,f+=Y.rect.width+s.horizontalPadding,Y.rect.height>M&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(L){var A=f[L];c.tiledMemberPack[L]=c.tileNodes(s[L],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[L].width,A.rect.height=c.tiledMemberPack[L].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,L=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:L};s.sort(function(R,M){return R.rect.width*R.rect.height>M.rect.width*M.rect.height?-1:R.rect.width*R.rect.height<M.rect.width*M.rect.height?1:0});for(var m=0;m<s.length;m++){var C=s[m];A.rows.length==0?this.insertNodeToRow(A,C,0,f):this.canAddHorizontal(A,C.rect.width,C.rect.height)?this.insertNodeToRow(A,C,this.getShortestRowIndex(A),f):this.insertNodeToRow(A,C,A.rows.length,f),this.shiftToLastRow(A)}return A},y.prototype.insertNodeToRow=function(s,f,c,L){var A=L;if(c==s.rows.length){var m=[];s.rows.push(m),s.rowWidth.push(A),s.rowHeight.push(0)}var C=s.rowWidth[c]+f.rect.width;s.rows[c].length>0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width<C&&(s.width=C);var R=f.rect.height;c>0&&(R+=s.verticalPadding);var M=0;R>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=R,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,L=0;L<s.rows.length;L++)s.rowWidth[L]<c&&(f=L,c=s.rowWidth[L]);return f},y.prototype.getLongestRowIndex=function(s){for(var f=-1,c=Number.MIN_VALUE,L=0;L<s.rows.length;L++)s.rowWidth[L]>c&&(f=L,c=s.rowWidth[L]);return f},y.prototype.canAddHorizontal=function(s,f,c){var L=this.getShortestRowIndex(s);if(L<0)return!0;var A=s.rowWidth[L];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[L]<c&&L>0&&(m=c+s.verticalPadding-s.rowHeight[L]);var C;s.width-A>=f+s.horizontalPadding?C=(s.height+m)/(A+f+s.horizontalPadding):C=(s.height+m)/s.width,m=c+s.verticalPadding;var R;return s.width<f?R=(s.height+m)/f:R=(s.height+m)/s.width,R<1&&(R=1/R),C<1&&(C=1/C),C<R},y.prototype.shiftToLastRow=function(s){var f=this.getLongestRowIndex(s),c=s.rowWidth.length-1,L=s.rows[f],A=L[L.length-1],m=A.width+s.horizontalPadding;if(s.width-s.rowWidth[c]>m&&f!=c){L.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var C=Number.MIN_VALUE,R=0;R<L.length;R++)L[R].height>C&&(C=L[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]<A.height+s.verticalPadding&&(s.rowHeight[c]=A.height+s.verticalPadding);var S=s.rowHeight[f]+s.rowHeight[c];s.height+=S-M,this.shiftToLastRow(s)}},y.prototype.tilingPreLayout=function(){n.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},y.prototype.tilingPostLayout=function(){n.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},y.prototype.reduceTrees=function(){for(var s=[],f=!0,c;f;){var L=this.graphManager.getAllNodes(),A=[];f=!1;for(var m=0;m<L.length;m++)c=L[m],c.getEdges().length==1&&!c.getEdges()[0].isInterGraph&&c.getChild()==null&&(A.push([c,c.getEdges()[0],c.getOwner()]),f=!0);if(f==!0){for(var C=[],R=0;R<A.length;R++)A[R][0].getEdges().length==1&&(C.push(A[R]),A[R][0].getOwner().remove(A[R][0]));s.push(C),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=s},y.prototype.growTree=function(s){for(var f=s.length,c=s[f-1],L,A=0;A<c.length;A++)L=c[A],this.findPlaceforPrunedNode(L),L[2].add(L[0]),L[2].add(L[1],L[1].source,L[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},y.prototype.findPlaceforPrunedNode=function(s){var f,c,L=s[0];L==s[1].source?c=s[1].target:c=s[1].source;var A=c.startX,m=c.finishX,C=c.startY,R=c.finishY,M=0,S=0,Y=0,w=0,x=[M,Y,S,w];if(C>0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m<this.grid.length-1)for(var F=C;F<=R;F++)x[1]+=this.grid[m+1][F].length+this.grid[m][F].length-1;if(R<this.grid[0].length-1)for(var F=A;F<=m;F++)x[2]+=this.grid[F][R+1].length+this.grid[F][R].length-1;if(A>0)for(var F=C;F<=R;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var U=v.MAX_VALUE,P,_,X=0;X<x.length;X++)x[X]<U?(U=x[X],P=1,_=X):x[X]==U&&P++;if(P==3&&U==0)x[0]==0&&x[1]==0&&x[2]==0?f=1:x[0]==0&&x[1]==0&&x[3]==0?f=0:x[0]==0&&x[2]==0&&x[3]==0?f=3:x[1]==0&&x[2]==0&&x[3]==0&&(f=2);else if(P==2&&U==0){var H=Math.floor(Math.random()*2);x[0]==0&&x[1]==0?H==0?f=0:f=1:x[0]==0&&x[2]==0?H==0?f=0:f=2:x[0]==0&&x[3]==0?H==0?f=0:f=3:x[1]==0&&x[2]==0?H==0?f=1:f=2:x[1]==0&&x[3]==0?H==0?f=1:f=3:H==0?f=2:f=3}else if(P==4&&U==0){var H=Math.floor(Math.random()*4);f=H}else f=_;f==0?L.setCenter(c.getCenterX(),c.getCenterY()-c.getHeight()/2-d.DEFAULT_EDGE_LENGTH-L.getHeight()/2):f==1?L.setCenter(c.getCenterX()+c.getWidth()/2+d.DEFAULT_EDGE_LENGTH+L.getWidth()/2,c.getCenterY()):f==2?L.setCenter(c.getCenterX(),c.getCenterY()+c.getHeight()/2+d.DEFAULT_EDGE_LENGTH+L.getHeight()/2):L.setCenter(c.getCenterX()-c.getWidth()/2-d.DEFAULT_EDGE_LENGTH-L.getWidth()/2,c.getCenterY())},I.exports=y},function(I,T,o){var e={};e.layoutBase=o(0),e.CoSEConstants=o(1),e.CoSEEdge=o(2),e.CoSEGraph=o(3),e.CoSEGraphManager=o(4),e.CoSELayout=o(6),e.CoSENode=o(5),I.exports=e}])})}(Z)),Z.exports}var dt=k.exports,J;function vt(){return J||(J=1,function(G,b){(function(I,T){G.exports=T(pt())})(dt,function(N){return function(I){var T={};function o(e){if(T[e])return T[e].exports;var t=T[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=T,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=1)}([function(I,T){I.exports=N},function(I,T,o){var e=o(0).layoutBase.LayoutConstants,t=o(0).layoutBase.FDLayoutConstants,i=o(0).CoSEConstants,l=o(0).CoSELayout,g=o(0).CoSENode,n=o(0).layoutBase.PointD,d=o(0).layoutBase.DimensionD,r={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function h(D,u){var E={};for(var y in D)E[y]=D[y];for(var y in u)E[y]=u[y];return E}function a(D){this.options=h(r,D),p(this.options)}var p=function(u){u.nodeRepulsion!=null&&(i.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=u.nodeRepulsion),u.idealEdgeLength!=null&&(i.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=u.idealEdgeLength),u.edgeElasticity!=null&&(i.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=u.edgeElasticity),u.nestingFactor!=null&&(i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=u.nestingFactor),u.gravity!=null&&(i.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=u.gravity),u.numIter!=null&&(i.MAX_ITERATIONS=t.MAX_ITERATIONS=u.numIter),u.gravityRange!=null&&(i.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=u.gravityRange),u.gravityCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=u.gravityCompound),u.gravityRangeCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=u.gravityRangeCompound),u.initialEnergyOnIncremental!=null&&(i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=u.initialEnergyOnIncremental),u.quality=="draft"?e.QUALITY=0:u.quality=="proof"?e.QUALITY=2:e.QUALITY=1,i.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=e.NODE_DIMENSIONS_INCLUDE_LABELS=u.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=e.DEFAULT_INCREMENTAL=!u.randomize,i.ANIMATE=t.ANIMATE=e.ANIMATE=u.animate,i.TILE=u.tile,i.TILING_PADDING_VERTICAL=typeof u.tilingPaddingVertical=="function"?u.tilingPaddingVertical.call():u.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof u.tilingPaddingHorizontal=="function"?u.tilingPaddingHorizontal.call():u.tilingPaddingHorizontal};a.prototype.run=function(){var D,u,E=this.options;this.idToLNode={};var y=this.layout=new l,O=this;O.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var s=y.newGraphManager();this.gm=s;var f=this.options.eles.nodes(),c=this.options.eles.edges();this.root=s.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(f),y);for(var L=0;L<c.length;L++){var A=c[L],m=this.idToLNode[A.data("source")],C=this.idToLNode[A.data("target")];if(m!==C&&m.getEdgesBetween(C).length==0){var R=s.add(y.newEdge(),m,C);R.id=A.id()}}var M=function(w,x){typeof w=="number"&&(w=x);var F=w.data("id"),U=O.idToLNode[F];return{x:U.getRect().getCenterX(),y:U.getRect().getCenterY()}},S=function Y(){for(var w=function(){E.fit&&E.cy.fit(E.eles,E.padding),D||(D=!0,O.cy.one("layoutready",E.ready),O.cy.trigger({type:"layoutready",layout:O}))},x=O.options.refresh,F,U=0;U<x&&!F;U++)F=O.stopped||O.layout.tick();if(F){y.checkLayoutSuccess()&&!y.isSubLayout&&y.doPostLayout(),y.tilingPostLayout&&y.tilingPostLayout(),y.isLayoutFinished=!0,O.options.eles.nodes().positions(M),w(),O.cy.one("layoutstop",O.options.stop),O.cy.trigger({type:"layoutstop",layout:O}),u&&cancelAnimationFrame(u),D=!1;return}var P=O.layout.getPositionsData();E.eles.nodes().positions(function(_,X){if(typeof _=="number"&&(_=X),!_.isParent()){for(var H=_.id(),W=P[H],B=_;W==null&&(W=P[B.data("parent")]||P["DummyCompound_"+B.data("parent")],P[H]=W,B=B.parent()[0],B!=null););return W!=null?{x:W.x,y:W.y}:{x:_.position("x"),y:_.position("y")}}}),w(),u=requestAnimationFrame(Y)};return y.addListener("layoutstarted",function(){O.options.animate==="during"&&(u=requestAnimationFrame(S))}),y.runLayout(),this.options.animate!=="during"&&(O.options.eles.nodes().not(":parent").layoutPositions(O,O.options,M),D=!1),this},a.prototype.getTopMostNodes=function(D){for(var u={},E=0;E<D.length;E++)u[D[E].id()]=!0;var y=D.filter(function(O,s){typeof O=="number"&&(O=s);for(var f=O.parent()[0];f!=null;){if(u[f.id()])return!1;f=f.parent()[0]}return!0});return y},a.prototype.processChildrenList=function(D,u,E){for(var y=u.length,O=0;O<y;O++){var s=u[O],f=s.children(),c,L=s.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(s.outerWidth()!=null&&s.outerHeight()!=null?c=D.add(new g(E.graphManager,new n(s.position("x")-L.w/2,s.position("y")-L.h/2),new d(parseFloat(L.w),parseFloat(L.h)))):c=D.add(new g(this.graphManager)),c.id=s.data("id"),c.paddingLeft=parseInt(s.css("padding")),c.paddingTop=parseInt(s.css("padding")),c.paddingRight=parseInt(s.css("padding")),c.paddingBottom=parseInt(s.css("padding")),this.options.nodeDimensionsIncludeLabels&&s.isParent()){var A=s.boundingBox({includeLabels:!0,includeNodes:!1}).w,m=s.boundingBox({includeLabels:!0,includeNodes:!1}).h,C=s.css("text-halign");c.labelWidth=A,c.labelHeight=m,c.labelPos=C}if(this.idToLNode[s.data("id")]=c,isNaN(c.rect.x)&&(c.rect.x=0),isNaN(c.rect.y)&&(c.rect.y=0),f!=null&&f.length>0){var R;R=E.getGraphManager().add(E.newGraph(),c),this.processChildrenList(R,f,E)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v}])})}(k)),k.exports}var yt=vt();const Et=gt(yt);tt.use(Et);function et(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(T=>{["id","label","height","width","padding","x","y"].includes(T)||(I[T]=N[T])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}V(et,"addNodes");function rt(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(T=>{["id","start","end"].includes(T)||(I[T]=N[T])}),b.add({group:"edges",data:I})})}V(rt,"addEdges");function it(G){return new Promise(b=>{const N=lt("body").append("div").attr("id","cy").attr("style","display:none"),I=tt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),et(G.nodes,I),rt(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const T={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(T).run(),I.ready(o=>{$.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),T={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(T[o]=N[o])}),T})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,T={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(T[o]=N[o])}),T})}V(ot,"extractPositionedEdges");async function st(G,b){$.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),T=ot(N);return $.debug(`Layout completed: ${I.length} nodes, ${T.length} edges`),{nodes:I,edges:T}}catch(N){throw $.error("Error in cose-bilkent layout algorithm:",N),N}}V(st,"executeCoseBilkentLayout");function at(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}V(at,"validateLayoutData");var Lt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:T,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const E={...u};n[u.id]=E,g[u.id]=E,await N(r,u)}else{const E={...u};g[u.id]=E;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();E.width=O.width,E.height=O.height,E.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const E=g[u.id];return{...u,width:E.width,height:E.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const E=g[u.id];E!=null&&E.domId&&(E.domId.attr("transform",`translate(${u.x}, ${u.y})`),E.x=u.x,E.y=u.y,t.debug(`Positioned node ${E.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const E=G.edges.find(y=>y.id===u.id);E&&(E.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await T(a,u);const E=g[u.start??""],y=g[u.end??""];if(E&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,E,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:E.x||0,y:E.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,E,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Ot=Lt;export{Ot as render};
@@ -0,0 +1,4 @@
1
+ import{a8 as b,be as Y,bf as F,bg as _,bh as H,ab as i,a9 as V,bi as U,bj as Z,aZ as $,b3 as q,a_ as P,aY as z,bk as K,bl as Q,bm as W}from"./vendor-mermaid-De-Yacw-.js";import{i as x,G as B}from"./graph-BxbYGKIB.js";import{l as I}from"./layout-B2E_GeCC.js";import{c as L}from"./clone-DRAA6Q7k.js";import{m as A}from"./min-5KBdYKFY.js";import"./vendor-antd-DODjfilb.js";import"./vendor-i18n-BNURlJ23.js";import"./_baseUniq-DVrw3Tro.js";function y(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:ee(e),edges:ne(e)};return x(e.graph())||(t.value=L(e.graph())),t}function ee(e){return A(e.nodes(),function(t){var n=e.node(t),o=e.parent(t),c={v:t};return x(n)||(c.value=n),x(o)||(c.parent=o),c})}function ne(e){return A(e.edges(),function(t){var n=e.edge(t),o={v:t.v,w:t.w};return x(t.name)||(o.name=t.name),x(n)||(o.value=n),o})}var f=new Map,N=new Map,J=new Map,te=b(()=>{N.clear(),J.clear(),f.clear()},"clear"),O=b((e,t)=>{const n=N.get(t)||[];return i.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),se=b((e,t)=>{const n=N.get(t)||[];return i.info("Descendants of ",t," is ",n),i.info("Edge is ",e),e.v===t||e.w===t?!1:n?n.includes(e.v)||O(e.v,t)||O(e.w,t)||n.includes(e.w):(i.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),G=b((e,t,n,o)=>{i.warn("Copying children of ",e,"root",o,"data",t.node(e),o);const c=t.children(e)||[];e!==o&&c.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",c),c.forEach(a=>{if(t.children(a).length>0)G(a,t,n,o);else{const r=t.node(a);i.info("cp ",a," to ",o," with parent ",e),n.setNode(a,r),o!==t.parent(a)&&(i.warn("Setting parent",a,t.parent(a)),n.setParent(a,t.parent(a))),e!==o&&a!==e?(i.debug("Setting parent",a,e),n.setParent(a,e)):(i.info("In copy ",e,"root",o,"data",t.node(e),o),i.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==o,"node!==clusterId",a!==e));const u=t.edges(a);i.debug("Copying Edges",u),u.forEach(l=>{i.info("Edge",l);const v=t.edge(l.v,l.w,l.name);i.info("Edge data",v,o);try{se(l,o)?(i.info("Copying as ",l.v,l.w,v,l.name),n.setEdge(l.v,l.w,v,l.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",o," clusterId:",e)}catch(C){i.error(C)}})}i.debug("Removing node",a),t.removeNode(a)})},"copy"),R=b((e,t)=>{const n=t.children(e);let o=[...n];for(const c of n)J.set(c,e),o=[...o,...R(c,t)];return o},"extractDescendants"),ie=b((e,t,n)=>{const o=e.edges().filter(l=>l.v===t||l.w===t),c=e.edges().filter(l=>l.v===n||l.w===n),a=o.map(l=>({v:l.v===t?n:l.v,w:l.w===t?t:l.w})),r=c.map(l=>({v:l.v,w:l.w}));return a.filter(l=>r.some(v=>l.v===v.v&&l.w===v.w))},"findCommonEdges"),D=b((e,t,n)=>{const o=t.children(e);if(i.trace("Searching children of id ",e,o),o.length<1)return e;let c;for(const a of o){const r=D(a,t,n),u=ie(t,n,r);if(r)if(u.length>0)c=r;else return r}return c},"findNonClusterChild"),k=b(e=>!f.has(e)||!f.get(e).externalConnections?e:f.has(e)?f.get(e).id:e,"getAnchorId"),re=b((e,t)=>{if(!e||t>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",D(n,e,n)),N.set(n,R(n,e)),f.set(n,{id:D(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const o=e.children(n),c=e.edges();o.length>0?(i.debug("Cluster identified",n,N),c.forEach(a=>{const r=O(a.v,n),u=O(a.w,n);r^u&&(i.warn("Edge: ",a," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",N.get(n)),f.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,N)});for(let n of f.keys()){const o=f.get(n).id,c=e.parent(o);c!==n&&f.has(c)&&!f.get(c).externalConnections&&(f.get(n).id=c)}e.edges().forEach(function(n){const o=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let c=n.v,a=n.w;if(i.warn("Fix XXX",f,"ids:",n.v,n.w,"Translating: ",f.get(n.v)," --- ",f.get(n.w)),f.get(n.v)||f.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),c=k(n.v),a=k(n.w),e.removeEdge(n.v,n.w,n.name),c!==n.v){const r=e.parent(c);f.get(r).externalConnections=!0,o.fromCluster=n.v}if(a!==n.w){const r=e.parent(a);f.get(r).externalConnections=!0,o.toCluster=n.w}i.warn("Fix Replacing with XXX",c,a,n.name),e.setEdge(c,a,o,n.name)}}),i.warn("Adjusted Graph",y(e)),T(e,0),i.trace(f)},"adjustClustersAndEdges"),T=b((e,t)=>{var c,a;if(i.warn("extractor - ",t,y(e),e.children("D")),t>10){i.error("Bailing out");return}let n=e.nodes(),o=!1;for(const r of n){const u=e.children(r);o=o||u.length>0}if(!o){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,t);for(const r of n)if(i.debug("Extracting node",r,f,f.has(r)&&!f.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",t),!f.has(r))i.debug("Not a cluster",r,t);else if(!f.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){i.warn("Cluster without external connections, without a parent and with children",r,t);let l=e.graph().rankdir==="TB"?"LR":"TB";(a=(c=f.get(r))==null?void 0:c.clusterData)!=null&&a.dir&&(l=f.get(r).clusterData.dir,i.warn("Fixing dir",f.get(r).clusterData.dir,l));const v=new B({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.warn("Old graph before copy",y(e)),G(r,e,v,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:f.get(r).clusterData,label:f.get(r).label,graph:v}),i.warn("New graph after copy node: (",r,")",y(v)),i.debug("Old graph after copy",y(e))}else i.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!f.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),t),i.debug(f);n=e.nodes(),i.warn("New list of nodes",n);for(const r of n){const u=e.node(r);i.warn(" Now next level",r,u),u!=null&&u.clusterNode&&T(u.graph,t+1)}},"extractor"),M=b((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(o=>{const c=e.children(o),a=M(e,c);n=[...n,...a]}),n},"sorter"),oe=b(e=>M(e,e.children()),"sortNodesByHierarchy"),j=b(async(e,t,n,o,c,a)=>{i.warn("Graph in recursive render:XAX",y(t),c);const r=t.graph().rankdir;i.trace("Dir in recursive render - dir:",r);const u=e.insert("g").attr("class","root");t.nodes()?i.info("Recursive render XXX",t.nodes()):i.info("No nodes found for",t),t.edges().length>0&&i.info("Recursive edges",t.edge(t.edges()[0]));const l=u.insert("g").attr("class","clusters"),v=u.insert("g").attr("class","edgePaths"),C=u.insert("g").attr("class","edgeLabels"),g=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(d){const s=t.node(d);if(c!==void 0){const w=JSON.parse(JSON.stringify(c.clusterData));i.trace(`Setting data for parent cluster XXX
2
+ Node.id = `,d,`
3
+ data=`,w.height,`
4
+ Parent cluster`,c.height),t.setNode(c.id,w),t.parent(d)||(i.trace("Setting parent",d,c.id),t.setParent(d,c.id,w))}if(i.info("(Insert) Node XXX"+d+": "+JSON.stringify(t.node(d))),s!=null&&s.clusterNode){i.info("Cluster identified XBX",d,s.width,t.node(d));const{ranksep:w,nodesep:m}=t.graph();s.graph.setGraph({...s.graph.graph(),ranksep:w+25,nodesep:m});const E=await j(g,s.graph,n,o,t.node(d),a),S=E.elem;U(s,S),s.diff=E.diff||0,i.info("New compound node after recursive render XAX",d,"width",s.width,"height",s.height),Z(S,s)}else t.children(d).length>0?(i.trace("Cluster - the non recursive path XBX",d,s.id,s,s.width,"Graph:",t),i.trace(D(s.id,t)),f.set(s.id,{id:D(s.id,t),node:s})):(i.trace("Node - the non recursive path XAX",d,g,t.node(d),r),await $(g,t.node(d),{config:a,dir:r}))})),await b(async()=>{const d=t.edges().map(async function(s){const w=t.edge(s.v,s.w,s.name);i.info("Edge "+s.v+" -> "+s.w+": "+JSON.stringify(s)),i.info("Edge "+s.v+" -> "+s.w+": ",s," ",JSON.stringify(t.edge(s))),i.info("Fix",f,"ids:",s.v,s.w,"Translating: ",f.get(s.v),f.get(s.w)),await W(C,w)});await Promise.all(d)},"processEdges")(),i.info("Graph before layout:",JSON.stringify(y(t))),i.info("############################################# XXX"),i.info("### Layout ### XXX"),i.info("############################################# XXX"),I(t),i.info("Graph after layout:",JSON.stringify(y(t)));let p=0,{subGraphTitleTotalMargin:X}=q(a);return await Promise.all(oe(t).map(async function(d){var w;const s=t.node(d);if(i.info("Position XBX => "+d+": ("+s.x,","+s.y,") width: ",s.width," height: ",s.height),s!=null&&s.clusterNode)s.y+=X,i.info("A tainted cluster node XBX1",d,s.id,s.width,s.height,s.x,s.y,t.parent(d)),f.get(s.id).node=s,P(s);else if(t.children(d).length>0){i.info("A pure cluster node XBX1",d,s.id,s.x,s.y,s.width,s.height,t.parent(d)),s.height+=X,t.node(s.parentId);const m=(s==null?void 0:s.padding)/2||0,E=((w=s==null?void 0:s.labelBBox)==null?void 0:w.height)||0,S=E-m||0;i.debug("OffsetY",S,"labelHeight",E,"halfPadding",m),await z(l,s),f.get(s.id).node=s}else{const m=t.node(s.parentId);s.y+=X/2,i.info("A regular node XBX1 - using the padding",s.id,"parent",s.parentId,s.width,s.height,s.x,s.y,"offsetY",s.offsetY,"parent",m,m==null?void 0:m.offsetY,s),P(s)}})),t.edges().forEach(function(d){const s=t.edge(d);i.info("Edge "+d.v+" -> "+d.w+": "+JSON.stringify(s),s),s.points.forEach(S=>S.y+=X/2);const w=t.node(d.v);var m=t.node(d.w);const E=K(v,s,f,n,w,m,o);Q(s,E)}),t.nodes().forEach(function(d){const s=t.node(d);i.info(d,s.type,s.diff),s.isGroup&&(p=s.diff)}),i.warn("Returning from recursive render XAX",u,p),{elem:u,diff:p}},"recursiveRender"),me=b(async(e,t)=>{var a,r,u,l,v,C;const n=new B({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:((a=e.config)==null?void 0:a.nodeSpacing)||((u=(r=e.config)==null?void 0:r.flowchart)==null?void 0:u.nodeSpacing)||e.nodeSpacing,ranksep:((l=e.config)==null?void 0:l.rankSpacing)||((C=(v=e.config)==null?void 0:v.flowchart)==null?void 0:C.rankSpacing)||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),o=t.select("g");Y(o,e.markers,e.type,e.diagramId),F(),_(),H(),te(),e.nodes.forEach(g=>{n.setNode(g.id,{...g}),g.parentId&&n.setParent(g.id,g.parentId)}),i.debug("Edges:",e.edges),e.edges.forEach(g=>{if(g.start===g.end){const h=g.start,p=h+"---"+h+"---1",X=h+"---"+h+"---2",d=n.node(h);n.setNode(p,{domId:p,id:p,parentId:d.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(p,d.parentId),n.setNode(X,{domId:X,id:X,parentId:d.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(X,d.parentId);const s=structuredClone(g),w=structuredClone(g),m=structuredClone(g);s.label="",s.arrowTypeEnd="none",s.id=h+"-cyclic-special-1",w.arrowTypeStart="none",w.arrowTypeEnd="none",w.id=h+"-cyclic-special-mid",m.label="",d.isGroup&&(s.fromCluster=h,m.toCluster=h),m.id=h+"-cyclic-special-2",m.arrowTypeStart="none",n.setEdge(h,p,s,h+"-cyclic-special-0"),n.setEdge(p,X,w,h+"-cyclic-special-1"),n.setEdge(X,h,m,h+"-cyc<lic-special-2")}else n.setEdge(g.start,g.end,{...g},g.id)}),i.warn("Graph at first:",JSON.stringify(y(n))),re(n),i.warn("Graph after XAX:",JSON.stringify(y(n)));const c=V();await j(o,n,e.type,e.diagramId,void 0,c)},"render");export{me as render};
@@ -0,0 +1,10 @@
1
+ import{ao as x,a7 as C,a4 as f,ap as B,a5 as T,a6 as y,a8 as s,aC as u,ab as k,aF as V,ac as D,aA as N,aD as S,av as _}from"./vendor-mermaid-De-Yacw-.js";import{p as A}from"./chunk-4BX2VUAB-Cw-2rap4.js";import{I as $}from"./chunk-QZHKN3VN-D1FDs1aQ.js";import{p as I}from"./wardley-RL74JXVD-CBRp4POe.js";import"./vendor-antd-DODjfilb.js";import"./vendor-i18n-BNURlJ23.js";import"./min-5KBdYKFY.js";import"./_baseUniq-DVrw3Tro.js";var l=new $(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",children:[]}]})),X=s(()=>{l.reset(),_()},"clear"),z=s(()=>l.records.stack[0],"getRoot"),H=s(()=>l.records.cnt,"getCount"),L=S.treeView,R=s(()=>u(L,N().treeView),"getConfig"),W=s((e,t)=>{for(;e<=l.records.stack[l.records.stack.length-1].level;)l.records.stack.pop();const a={id:l.records.cnt++,level:e,name:t,children:[]};l.records.stack[l.records.stack.length-1].children.push(a),l.records.stack.push(a)},"addNode"),E={clear:X,addNode:W,getRoot:z,getCount:H,getConfig:R,getAccTitle:y,getAccDescription:T,getDiagramTitle:B,setAccDescription:f,setAccTitle:C,setDiagramTitle:x},w=E,F=s(e=>{A(e,w),e.nodes.map(t=>w.addNode(t.indent?parseInt(t.indent):0,t.name))},"populate"),M={parse:s(async e=>{const t=await I("treeView",e);k.debug(t),F(t)},"parse")},Y=s((e,t,a,i,o)=>{const c=i.append("text").text(a.name).attr("dominant-baseline","middle").attr("class","treeView-node-label"),{height:p,width:r}=c.node().getBBox(),d=p+o.paddingY*2,n=r+o.paddingX*2;c.attr("x",e+o.paddingX),c.attr("y",t+d/2),a.BBox={x:e,y:t,width:n,height:d}},"positionLabel"),b=s((e,t,a,i,o,c)=>e.append("line").attr("x1",t).attr("y1",a).attr("x2",i).attr("y2",o).attr("stroke-width",c).attr("class","treeView-node-line"),"positionLine"),j=s((e,t,a)=>{let i=0,o=0;const c=s((r,d,n,h)=>{const v=h*(n.rowIndent+n.paddingX);Y(v,i,d,r,n);const{height:g,width:m}=d.BBox;b(r,v-n.rowIndent,i+g/2,v,i+g/2,n.lineThickness),o=Math.max(o,v+m),i+=g},"drawNode"),p=s((r,d=0)=>{c(e,r,a,d),r.children.forEach(g=>{p(g,d+1)});const{x:n,y:h,height:v}=r.BBox;if(r.children.length){const{y:g,height:m}=r.children[r.children.length-1].BBox;b(e,n+a.paddingX,h+v,n+a.paddingX,g+m/2+a.lineThickness/2,a.lineThickness)}},"processNode");return p(t),{totalHeight:i,totalWidth:o}},"drawTree"),q=s((e,t,a,i)=>{k.debug(`Rendering treeView diagram
2
+ `+e);const o=i.db,c=o.getRoot(),p=o.getConfig(),r=V(t),d=r.append("g");d.attr("class","tree-view");const{totalHeight:n,totalWidth:h}=j(d,c,p);r.attr("viewBox",`-${p.lineThickness/2} 0 ${h} ${n}`),D(r,n,h,p.useMaxWidth)},"draw"),G={draw:q},J=G,K={labelFontSize:"16px",labelColor:"black",lineColor:"black"},O=s(({treeView:e})=>{const{labelFontSize:t,labelColor:a,lineColor:i}=u(K,e);return`
3
+ .treeView-node-label {
4
+ font-size: ${t};
5
+ fill: ${a};
6
+ }
7
+ .treeView-node-line {
8
+ stroke: ${i};
9
+ }
10
+ `},"styles"),P=O,ie={db:w,renderer:J,parser:M,styles:P};export{ie as diagram};
@@ -0,0 +1,24 @@
1
+ import{a8 as u,aJ as re,aA as O,aC as I,aF as oe,ac as ie,b8 as P,ab as G,q as B,b9 as ce,ba as pe,bb as L,aa as _,a7 as de,a6 as he,ao as ue,ap as me,a5 as fe,a4 as ge,aD as ye,bc as Se,av as xe}from"./vendor-mermaid-De-Yacw-.js";import{s as be}from"./chunk-EDXVE4YY-FvClTRCF.js";import{p as ve}from"./chunk-4BX2VUAB-Cw-2rap4.js";import{p as Ce}from"./wardley-RL74JXVD-CBRp4POe.js";import"./vendor-antd-DODjfilb.js";import"./vendor-i18n-BNURlJ23.js";import"./min-5KBdYKFY.js";import"./_baseUniq-DVrw3Tro.js";var F,U=(F=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=de,this.getAccTitle=he,this.setDiagramTitle=ue,this.getDiagramTitle=me,this.getAccDescription=fe,this.setAccDescription=ge}getNodes(){return this.nodes}getConfig(){const n=ye,o=O();return I({...n.treemap,...o.treemap??{}})}addNode(n,o){this.nodes.push(n),this.levels.set(n,o),o===0&&(this.outerNodes.push(n),this.root??(this.root=n))}getRoot(){return{name:"",children:this.outerNodes}}addClass(n,o){const l=this.classes.get(n)??{id:n,styles:[],textStyles:[]},r=o.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");r&&r.forEach(s=>{Se(s)&&(l!=null&&l.textStyles?l.textStyles.push(s):l.textStyles=[s]),l!=null&&l.styles?l.styles.push(s):l.styles=[s]}),this.classes.set(n,l)}getClasses(){return this.classes}getStylesForClass(n){var o;return((o=this.classes.get(n))==null?void 0:o.styles)??[]}clear(){xe(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},u(F,"TreeMapDB"),F);function K(p){if(!p.length)return[];const n=[],o=[];return p.forEach(l=>{const r={name:l.name,children:l.type==="Leaf"?void 0:[]};for(r.classSelector=l==null?void 0:l.classSelector,l!=null&&l.cssCompiledStyles&&(r.cssCompiledStyles=l.cssCompiledStyles),l.type==="Leaf"&&l.value!==void 0&&(r.value=l.value);o.length>0&&o[o.length-1].level>=l.level;)o.pop();if(o.length===0)n.push(r);else{const s=o[o.length-1].node;s.children?s.children.push(r):s.children=[r]}l.type!=="Leaf"&&o.push({node:r,level:l.level})}),n}u(K,"buildHierarchy");var we=u((p,n)=>{ve(p,n);const o=[];for(const s of p.TreemapRows??[])s.$type==="ClassDefStatement"&&n.addClass(s.className??"",s.styleText??"");for(const s of p.TreemapRows??[]){const d=s.item;if(!d)continue;const h=s.indent?parseInt(s.indent):0,k=Te(d),a=d.classSelector?n.getStylesForClass(d.classSelector):[],z=a.length>0?a:void 0,b={level:h,name:k,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:z};o.push(b)}const l=K(o),r=u((s,d)=>{for(const h of s)n.addNode(h,d),h.children&&h.children.length>0&&r(h.children,d+1)},"addNodesRecursively");r(l,0)},"populate"),Te=u(p=>p.name?String(p.name):"","getItemName"),Q={parser:{yy:void 0},parse:u(async p=>{var n;try{const l=await Ce("treemap",p);G.debug("Treemap AST:",l);const r=(n=Q.parser)==null?void 0:n.yy;if(!(r instanceof U))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");we(l,r)}catch(o){throw G.error("Error parsing treemap:",o),o}},"parse")},Le=10,$=10,M=25,$e=u((p,n,o,l)=>{const r=l.db,s=r.getConfig(),d=s.padding??Le,h=r.getDiagramTitle(),k=r.getRoot(),{themeVariables:a}=O();if(!k)return;const z=h?30:0,b=oe(n),X=s.nodeWidth?s.nodeWidth*$:960,Y=s.nodeHeight?s.nodeHeight*$:500,H=X,j=Y+z;b.attr("viewBox",`0 0 ${H} ${j}`),ie(b,j,H,s.useMaxWidth);let v;try{const e=s.valueFormat||",";if(e==="$0,0")v=u(t=>"$"+P(",")(t),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const t=/\.\d+/.exec(e),i=t?t[0]:"";v=u(m=>"$"+P(","+i)(m),"valueFormat")}else if(e.startsWith("$")){const t=e.substring(1);v=u(i=>"$"+P(t||"")(i),"valueFormat")}else v=P(e)}catch(e){G.error("Error creating format function:",e),v=P(",")}const A=B().range(["transparent",a.cScale0,a.cScale1,a.cScale2,a.cScale3,a.cScale4,a.cScale5,a.cScale6,a.cScale7,a.cScale8,a.cScale9,a.cScale10,a.cScale11]),Z=B().range(["transparent",a.cScalePeer0,a.cScalePeer1,a.cScalePeer2,a.cScalePeer3,a.cScalePeer4,a.cScalePeer5,a.cScalePeer6,a.cScalePeer7,a.cScalePeer8,a.cScalePeer9,a.cScalePeer10,a.cScalePeer11]),W=B().range([a.cScaleLabel0,a.cScaleLabel1,a.cScaleLabel2,a.cScaleLabel3,a.cScaleLabel4,a.cScaleLabel5,a.cScaleLabel6,a.cScaleLabel7,a.cScaleLabel8,a.cScaleLabel9,a.cScaleLabel10,a.cScaleLabel11]);h&&b.append("text").attr("x",H/2).attr("y",z/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const q=b.append("g").attr("transform",`translate(0, ${z})`).attr("class","treemapContainer"),ee=ce(k).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),J=pe().size([X,Y]).paddingTop(e=>e.children&&e.children.length>0?M+$:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?$:0).paddingRight(e=>e.children&&e.children.length>0?$:0).paddingBottom(e=>e.children&&e.children.length>0?$:0).round(!0)(ee),te=J.descendants().filter(e=>e.children&&e.children.length>0),N=q.selectAll(".treemapSection").data(te).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);N.append("rect").attr("width",e=>e.x1-e.x0).attr("height",M).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),N.append("clipPath").attr("id",(e,t)=>`clip-section-${n}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",M),N.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>A(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>Z(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const t=L({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),N.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",M/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("style",e=>{if(e.depth===0)return"display: none;";const t="dominant-baseline: middle; font-size: 12px; fill:"+W(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",i=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+i.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const t=_(this),i=e.data.name;t.text(i);const m=e.x1-e.x0,y=6;let S;s.showValues!==!1&&e.value?S=m-10-30-10-y:S=m-y-6;const x=Math.max(15,S),c=t.node();if(c.getComputedTextLength()>x){const f="...";let g=i;for(;g.length>0;){if(g=i.substring(0,g.length-1),g.length===0){t.text(f),c.getComputedTextLength()>x&&t.text("");break}if(t.text(g+f),c.getComputedTextLength()<=x)break}}}),s.showValues!==!1&&N.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",M/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?v(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const t="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+W(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",i=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+i.labelStyles.replace("color:","fill:")});const ae=J.leaves(),E=q.selectAll(".treemapLeafGroup").data(ae).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);E.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?A(e.parent.data.name):A(e.data.name)).attr("style",e=>L({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?A(e.parent.data.name):A(e.data.name)).attr("stroke-width",3),E.append("clipPath").attr("id",(e,t)=>`clip-${n}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),E.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const t="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+W(e.data.name)+";",i=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+i.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,t)=>`url(#clip-${n}-${t})`).text(e=>e.data.name).each(function(e){const t=_(this),i=e.x1-e.x0,m=e.y1-e.y0,y=t.node(),S=4,T=i-2*S,x=m-2*S;if(T<10||x<10){t.style("display","none");return}let c=parseInt(t.style("font-size"),10);const C=8,f=28,g=.6,w=6,V=2;for(;y.getComputedTextLength()>T&&c>C;)c--,t.style("font-size",`${c}px`);let D=Math.max(w,Math.min(f,Math.round(c*g))),R=c+V+D;for(;R>x&&c>C&&(c--,D=Math.max(w,Math.min(f,Math.round(c*g))),!(D<w&&c===C));)t.style("font-size",`${c}px`),R=c+V+D;t.style("font-size",`${c}px`),(y.getComputedTextLength()>T||c<C||x<c)&&t.style("display","none")}),s.showValues!==!1&&E.append("text").attr("class","treemapValue").attr("x",t=>(t.x1-t.x0)/2).attr("y",function(t){return(t.y1-t.y0)/2}).attr("style",t=>{const i="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+W(t.data.name)+";",m=L({cssCompiledStyles:t.data.cssCompiledStyles});return i+m.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,i)=>`url(#clip-${n}-${i})`).text(t=>t.value?v(t.value):"").each(function(t){const i=_(this),m=this.parentNode;if(!m){i.style("display","none");return}const y=_(m).select(".treemapLabel");if(y.empty()||y.style("display")==="none"){i.style("display","none");return}const S=parseFloat(y.style("font-size")),T=28,x=.6,c=6,C=2,f=Math.max(c,Math.min(T,Math.round(S*x)));i.style("font-size",`${f}px`);const w=(t.y1-t.y0)/2+S/2+C;i.attr("y",w);const V=t.x1-t.x0,se=t.y1-t.y0-4,ne=V-2*4;i.node().getComputedTextLength()>ne||w+f>se||f<c?i.style("display","none"):i.style("display",null)});const le=s.diagramPadding??8;be(b,le,"flowchart",(s==null?void 0:s.useMaxWidth)||!1)},"draw"),Fe=u(function(p,n){return n.db.getClasses()},"getClasses"),ze={draw:$e,getClasses:Fe},Ae={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},Ne=u(({treemap:p}={})=>{const n=re(),o=O(),l=I(n,o.themeVariables),r=I(Ae,p),s=r.titleColor??l.titleColor,d=r.labelColor??l.textColor,h=r.valueColor??l.textColor;return`
2
+ .treemapNode.section {
3
+ stroke: ${r.sectionStrokeColor};
4
+ stroke-width: ${r.sectionStrokeWidth};
5
+ fill: ${r.sectionFillColor};
6
+ }
7
+ .treemapNode.leaf {
8
+ stroke: ${r.leafStrokeColor};
9
+ stroke-width: ${r.leafStrokeWidth};
10
+ fill: ${r.leafFillColor};
11
+ }
12
+ .treemapLabel {
13
+ fill: ${d};
14
+ font-size: ${r.labelFontSize};
15
+ }
16
+ .treemapValue {
17
+ fill: ${h};
18
+ font-size: ${r.valueFontSize};
19
+ }
20
+ .treemapTitle {
21
+ fill: ${s};
22
+ font-size: ${r.titleFontSize};
23
+ }
24
+ `},"getStyles"),Ve=Ne,Ie={parser:Q,get db(){return new U},renderer:ze,styles:Ve};export{Ie as diagram};
@@ -0,0 +1,43 @@
1
+ import{a4 as k,a5 as R,ap as F,ao as I,a6 as D,a7 as E,a8 as l,aF as _,av as z,aC as y,aD as G,aA as C,ab as P,aJ as W,ac as B}from"./vendor-mermaid-De-Yacw-.js";import{p as V}from"./chunk-4BX2VUAB-Cw-2rap4.js";import{p as H}from"./wardley-RL74JXVD-CBRp4POe.js";import"./vendor-antd-DODjfilb.js";import"./vendor-i18n-BNURlJ23.js";import"./min-5KBdYKFY.js";import"./_baseUniq-DVrw3Tro.js";var x={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},w={axes:[],curves:[],options:x},m=structuredClone(w),j=G.radar,J=l(()=>y({...j,...C().radar}),"getConfig"),b=l(()=>m.axes,"getAxes"),N=l(()=>m.curves,"getCurves"),U=l(()=>m.options,"getOptions"),X=l(a=>{m.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Y=l(a=>{m.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=l(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=b();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>{var o;return((o=s.axis)==null?void 0:o.$refText)===e.name});if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),q=l(a=>{var e,r,s,o,i;const t=a.reduce((n,c)=>(n[c.name]=c,n),{});m.options={showLegend:((e=t.showLegend)==null?void 0:e.value)??x.showLegend,ticks:((r=t.ticks)==null?void 0:r.value)??x.ticks,max:((s=t.max)==null?void 0:s.value)??x.max,min:((o=t.min)==null?void 0:o.value)??x.min,graticule:((i=t.graticule)==null?void 0:i.value)??x.graticule}},"setOptions"),K=l(()=>{z(),m=structuredClone(w)},"clear"),$={getAxes:b,getCurves:N,getOptions:U,setAxes:X,setCurves:Y,setOptions:q,getConfig:J,clear:K,setAccTitle:E,getAccTitle:D,setDiagramTitle:I,getDiagramTitle:F,getAccDescription:R,setAccDescription:k},Q=l(a=>{V(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),tt={parse:l(async a=>{const t=await H("radar",a);P.debug(t),Q(t)},"parse")},et=l((a,t,e,r)=>{const s=r.db,o=s.getAxes(),i=s.getCurves(),n=s.getOptions(),c=s.getConfig(),d=s.getDiagramTitle(),u=_(t),p=at(u,c),g=n.max??Math.max(...i.map(f=>Math.max(...f.entries))),h=n.min,v=Math.min(c.width,c.height)/2;rt(p,o,v,n.ticks,n.graticule),st(p,o,v,c),M(p,o,i,h,g,n.graticule,c),T(p,i,n.showLegend,c),p.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),at=l((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return B(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),rt=l((a,t,e,r,s)=>{if(s==="circle")for(let o=0;o<r;o++){const i=e*(o+1)/r;a.append("circle").attr("r",i).attr("class","radarGraticule")}else if(s==="polygon"){const o=t.length;for(let i=0;i<r;i++){const n=e*(i+1)/r,c=t.map((d,u)=>{const p=2*u*Math.PI/o-Math.PI/2,g=n*Math.cos(p),h=n*Math.sin(p);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",c).attr("class","radarGraticule")}}},"drawGraticule"),st=l((a,t,e,r)=>{const s=t.length;for(let o=0;o<s;o++){const i=t[o].label,n=2*o*Math.PI/s-Math.PI/2;a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*Math.cos(n)).attr("y2",e*r.axisScaleFactor*Math.sin(n)).attr("class","radarAxisLine"),a.append("text").text(i).attr("x",e*r.axisLabelFactor*Math.cos(n)).attr("y",e*r.axisLabelFactor*Math.sin(n)).attr("class","radarAxisLabel")}},"drawAxes");function M(a,t,e,r,s,o,i){const n=t.length,c=Math.min(i.width,i.height)/2;e.forEach((d,u)=>{if(d.entries.length!==n)return;const p=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,f=A(g,r,s,c),S=f*Math.cos(v),O=f*Math.sin(v);return{x:S,y:O}});o==="circle"?a.append("path").attr("d",L(p,i.curveTension)).attr("class",`radarCurve-${u}`):o==="polygon"&&a.append("polygon").attr("points",p.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${u}`)})}l(M,"drawCurves");function A(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}l(A,"relativeRadius");function L(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s<e;s++){const o=a[(s-1+e)%e],i=a[s],n=a[(s+1)%e],c=a[(s+2)%e],d={x:i.x+(n.x-o.x)*t,y:i.y+(n.y-o.y)*t},u={x:n.x-(c.x-i.x)*t,y:n.y-(c.y-i.y)*t};r+=` C${d.x},${d.y} ${u.x},${u.y} ${n.x},${n.y}`}return`${r} Z`}l(L,"closedRoundCurve");function T(a,t,e,r){if(!e)return;const s=(r.width/2+r.marginRight)*3/4,o=-(r.height/2+r.marginTop)*3/4,i=20;t.forEach((n,c)=>{const d=a.append("g").attr("transform",`translate(${s}, ${o+c*i})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${c}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}l(T,"drawLegend");var nt={draw:et},ot=l((a,t)=>{let e="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){const s=a[`cScale${r}`];e+=`
2
+ .radarCurve-${r} {
3
+ color: ${s};
4
+ fill: ${s};
5
+ fill-opacity: ${t.curveOpacity};
6
+ stroke: ${s};
7
+ stroke-width: ${t.curveStrokeWidth};
8
+ }
9
+ .radarLegendBox-${r} {
10
+ fill: ${s};
11
+ fill-opacity: ${t.curveOpacity};
12
+ stroke: ${s};
13
+ }
14
+ `}return e},"genIndexStyles"),it=l(a=>{const t=W(),e=C(),r=y(t,e.themeVariables),s=y(r.radar,a);return{themeVariables:r,radarOptions:s}},"buildRadarStyleOptions"),lt=l(({radar:a}={})=>{const{themeVariables:t,radarOptions:e}=it(a);return`
15
+ .radarTitle {
16
+ font-size: ${t.fontSize};
17
+ color: ${t.titleColor};
18
+ dominant-baseline: hanging;
19
+ text-anchor: middle;
20
+ }
21
+ .radarAxisLine {
22
+ stroke: ${e.axisColor};
23
+ stroke-width: ${e.axisStrokeWidth};
24
+ }
25
+ .radarAxisLabel {
26
+ dominant-baseline: middle;
27
+ text-anchor: middle;
28
+ font-size: ${e.axisLabelFontSize}px;
29
+ color: ${e.axisColor};
30
+ }
31
+ .radarGraticule {
32
+ fill: ${e.graticuleColor};
33
+ fill-opacity: ${e.graticuleOpacity};
34
+ stroke: ${e.graticuleColor};
35
+ stroke-width: ${e.graticuleStrokeWidth};
36
+ }
37
+ .radarLegendText {
38
+ text-anchor: start;
39
+ font-size: ${e.legendFontSize}px;
40
+ dominant-baseline: hanging;
41
+ }
42
+ ${ot(t,e)}
43
+ `},"styles"),ht={parser:tt,db:$,renderer:nt,styles:lt};export{ht as diagram};
@@ -0,0 +1,24 @@
1
+ import{a8 as b,aC as m,aF as B,ac as C,ab as w,a7 as S,a6 as D,ao as T,ap as F,a5 as P,a4 as z,aD as A,aA as E,av as W}from"./vendor-mermaid-De-Yacw-.js";import{p as _}from"./chunk-4BX2VUAB-Cw-2rap4.js";import{p as N}from"./wardley-RL74JXVD-CBRp4POe.js";import"./vendor-antd-DODjfilb.js";import"./vendor-i18n-BNURlJ23.js";import"./min-5KBdYKFY.js";import"./_baseUniq-DVrw3Tro.js";var L=A.packet,u,v=(u=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=F,this.getAccDescription=P,this.setAccDescription=z}getConfig(){const t=m({...L,...E().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},b(u,"PacketDB"),u),M=1e4,Y=b((e,t)=>{_(e,t);let o=-1,r=[],n=1;const{bitsPerRow:l}=t.getConfig();for(let{start:a,end:i,bits:d,label:c}of e.blocks){if(a!==void 0&&i!==void 0&&i<a)throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);if(a??(a=o+1),a!==o+1)throw new Error(`Packet block ${a} - ${i??a} is not contiguous. It should start from ${o+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(i??(i=a+(d??1)-1),d??(d=i-a+1),o=i,w.debug(`Packet block ${a} - ${o} with label ${c}`);r.length<=l+1&&t.getPacket().length<M;){const[p,s]=I({start:a,end:i,bits:d,label:c},n,l);if(r.push(p),p.end+1===n*l&&(t.pushWord(r),r=[],n++),!s)break;({start:a,end:i,bits:d,label:c}=s)}}t.pushWord(r)},"populate"),I=b((e,t,o)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*o)return[e,void 0];const r=t*o-1,n=t*o;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),x={parser:{yy:void 0},parse:b(async e=>{var r;const t=await N("packet",e),o=(r=x.parser)==null?void 0:r.yy;if(!(o instanceof v))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");w.debug(t),Y(t,o)},"parse")},O=b((e,t,o,r)=>{const n=r.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),s=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(s?0:a),k=d*c+2,f=B(t);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[y,$]of p.entries())j(f,$,y,l);f.append("text").text(s).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),j=b((e,t,o,{rowHeight:r,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=e.append("g"),p=o*(r+l)+l;for(const s of t){const h=s.start%i*a+1,g=(s.end-s.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",r).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+r/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(s.label),!d)continue;const k=s.end===s.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(s.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(s.end)}},"drawWord"),G={draw:O},H={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},K=b(({packet:e}={})=>{const t=m(H,e);return`
2
+ .packetByte {
3
+ font-size: ${t.byteFontSize};
4
+ }
5
+ .packetByte.start {
6
+ fill: ${t.startByteColor};
7
+ }
8
+ .packetByte.end {
9
+ fill: ${t.endByteColor};
10
+ }
11
+ .packetLabel {
12
+ fill: ${t.labelColor};
13
+ font-size: ${t.labelFontSize};
14
+ }
15
+ .packetTitle {
16
+ fill: ${t.titleColor};
17
+ font-size: ${t.titleFontSize};
18
+ }
19
+ .packetBlock {
20
+ stroke: ${t.blockStrokeColor};
21
+ stroke-width: ${t.blockStrokeWidth};
22
+ fill: ${t.blockFillColor};
23
+ }
24
+ `},"styles"),Z={parser:x,get db(){return new v},renderer:G,styles:K};export{Z as diagram};
@@ -0,0 +1,3 @@
1
+ const e={translation:{app:{loading:"Loading...",retry:"Retry",backendNotReachable:"Backend not reachable at {{baseUrl}} (last error: {{message}})",passwordGate:{title:"Enter Access Password",description:"Password verification is required before entering the application.",passwordLabel:"Access Password",passwordPlaceholder:"Enter access password",submit:"Verify and Continue",validation:{required:"Please enter the access password",verifyFailed:"Password verification failed"}}},layout:{showSidebar:"Show sidebar"},commandPalette:{searchPlaceholder:"Search sessions, settings, and actions",navigationHint:"Use ↑↓ to navigate, Enter to open, and Esc to close.",empty:"No matching commands",groups:{quickActions:"Quick actions",settings:"System settings"},badges:{quickAction:"Action",pinned:"Pinned",running:"Running",child:"Child",childSession:"Child session",rootSession:"Session"},actions:{newSession:"Create New Session",openProviderSettings:"Open Provider Settings",openMcpSettings:"Open MCP Settings",openWorkflowSettings:"Open Workflow Settings",openSessionsSettings:"Open Session Monitor",openSchedulesSettings:"Open Schedules"},errors:{actionFailed:"Command failed"}},common:{cancel:"Cancel",ok:"OK",apply:"Apply",save:"Save",delete:"Delete",saveAnyway:"Save Anyway",yes:"Yes",no:"No",home:"Home",parentDirectory:"Parent Directory",currentPath:"Current Path:",workspace:"Workspace",server:"Server:",category:"Category:",parameters:"Parameters",approve:"Approve",reject:"Reject",download:"Download",directory:"Directory",file:"File"},setup:{welcome:{heading:"Welcome to Bodhi",description:"Bodhi is your AI-powered development assistant. Get started by configuring an AI provider, or jump right in.",providerHint:"To start chatting, you'll need to configure an AI provider (e.g. OpenAI, Anthropic) with an API key.",proxyHint:"Behind a corporate proxy? You can configure proxy settings later in System Settings > Network."},button:{getStarted:"Get Started",configureProvider:"Configure Provider"},complete:{title:"All Set!",restartMessage:"Reloading the application..."},error:{completeFailed:"Failed to complete setup. Please try again."}},onboarding:{welcome:{title:"Welcome to Bodhi!",description:"Bodhi is your AI-powered development assistant. Let's take a quick look around."},newSession:{title:"New Session",description:"Click here to start a new chat session with the AI assistant."},taskTemplates:{title:"Task Templates",description:"Pick from pre-built templates like Code Review, Bug Investigation, Refactor, and more to jump-start your work."},modelPicker:{title:"Model Selection",description:"Switch between AI models and providers anytime from here."},sidebar:{title:"Session Sidebar",description:"Search, filter, pin, and switch between your conversations."},settings:{title:"Settings",description:"Configure AI providers, proxy settings, model mappings, MCP servers, and more."}},chat:{sidebar:{newSession:"New Session",createFailedTitle:"Failed to create session",createFailedUnknown:"Unknown error",searchPlaceholder:"Search sessions",filters:{all:"All",pinned:"Pinned",running:"Running",child:"Child"},empty:{noSessions:"No sessions yet",noMatches:"No matching sessions",hint:'Click "New Session" to get started',filterHint:"Try adjusting your search or filters"},dateGroups:{today:"Today",yesterday:"Yesterday",thisWeek:"This Week",thisMonth:"This Month",pinned:"Pinned",scheduled:"Scheduled"},actions:{collapseChildren:"Collapse child sessions",expandChildren:"Expand child sessions"},delete:{title:"Delete Session",confirm:"Are you sure you want to delete this session?"},deleteByDate:{title:"Delete sessions from {{date}}",confirm:"Are you sure you want to delete {{count}} sessions from {{date}}?"},newSessionWithPrompt:"New session with {{prompt}}"},workspace:{modalTitle:"Set Workspace Path",invalidTitle:"Invalid Workspace Path",issuesDetected:"Potential issues detected with the workspace path:",confirmSaveInvalid:"Do you still want to save this path?",errorEnterPath:"Please enter a workspace path",errorSaveFailed:"Failed to save workspace path",placeholder:"e.g. /Users/alice/Workspace/MyProject",label:"Workspace",browseFolder:"Browse folder",descriptionTitle:"Workspace Path Description",descriptionP1:"Set a workspace path so file references and workspace tools can resolve files reliably.",descriptionP2:"Choose an existing project folder. You can still continue with an invalid path, but related features may not work correctly.",checkTitle:"Workspace Path Check",checkDescription:"Workspace path validation failed.",recentTitle:"Recent Workspaces",suggestedTitle:"Suggested Workspaces",noRecentWorkspaces:"No recent workspaces",noSuggestions:"No suggestions",defaultWorkspaceName:"Workspace",validWorkspace:"Valid workspace",fileCount:"{{count}} files"},folderBrowser:{title:"Select Workspace Folder",selectCurrent:"Select Current Folder",emptyFolder:"This folder is empty",tip:'Tip: Click a folder to enter, click "Select Current Folder" to confirm'},input:{placeholder:"Send a message...",placeholderWithReference:"Send a message (includes reference)",placeholderWithWorkflows:"Send a message... (type '/' for workflows)",toolCallsOnly:"Tool calls only (allowed tools: {{tools}})",autoPrefixMode:"Auto-prefix mode: {{prefix}} (type '/' to select tools)",toolSpecificMode:"Tool-specific mode (allowed tools: {{tools}})",processingFiles:"Processing files…",addAttachments:"Add attachments",referenceWorkspaceFiles:"Reference workspace files",imageCountSingular:"{{count}} image",imageCountPlural:"{{count}} images",moreImages:"+{{count}} more",clearAllImages:"Clear all images",reasoningTitle:"Reasoning effort: {{label}}",reasoning:{low:"Low",medium:"Medium",high:"High",xhigh:"Very high",max:"Max"},strictToolOnlyMode:"Strict tool-only mode",toolSpecificModeLabel:"Tool-specific mode",allowedTools:"Allowed tools:",autoPrefixLabel:"Auto prefix: {{prefix}}",mustStartWithPrefix:'Message must start with "{{prefix}}"'},actions:{regenerate:"Regenerate response",retryFailed:"Retry failed request",retryOptions:"Retry options",cancelRequest:"Cancel request",sendMessage:"Send message",copyMessage:"Copy message",referenceMessage:"Reference message",unpin:"Unpin",pin:"Pin",generateTitle:"Generate AI Title",runProjectDream:"Run Project Dream",runProjectDreamRunning:"Running Project Dream...",runProjectDreamSuccess:"Project Dream updated",runProjectDreamNoChange:"No Project Dream update was needed",runProjectDreamFailed:"Failed to run Project Dream"},prompt:{selectorTitle:"Select System Prompt",createButton:"Create New Session",helperText:"Select a base system prompt for the AI. You can add or edit prompts in the System Settings.",emptyDescription:"No system prompts found. Add one in System Settings.",newSessionSelectorTitle:"Select System Prompt for New Session",defaultDescription:"Default system prompt.",loadPresetsFailed:"Failed to load presets",loadCurrentInfoFailed:"Failed to load current info",systemCard:{title:"System Prompt",viewEnhanced:"View Enhanced",viewBase:"View Base",copy:"Copy",snapshotTitle:"Prompt Snapshot",sections:{base:"Base",enhancement:"Enhancement",workspace:"Workspace",instruction:"Instruction",env:"Environment",skills:"Skills",toolGuide:"Tool Guide",dream:"Dream Notebook",sessionMemory:"Session Memory",externalMemory:"Memory Layers",taskList:"Task List",effective:"Effective Prompt"}}},fileReference:{title:"@ File Reference",setWorkspace:"Set Workspace",noMatches:"No matching files found",emptyDirectory:"Directory is empty"},commandSelector:{loading:"Loading commands...",emptyWithSearch:'No commands found matching "{{search}}"',empty:"No commands available.",navigationHint:"Navigation: Up/Down or Ctrl+P/N | Select: Enter | Complete: Space/Tab | Cancel: Esc",types:{workflow:"Workflow",skill:"Skill",mcp:"MCP"}},model:{selectModel:"Select model",noModelSelected:"No model selected",selectModelHint:"Choose a model to start chatting.",providerNotConfigured:"Provider not configured",configureProviderHint:"Set up your provider in settings before selecting a model.",configureProvider:"Configure provider",openSettings:"Open Settings",noModelsAvailable:"No models available",selectModelBeforeSend:"Please select a model before sending.",selectModelBeforeRetry:"Please select a model before retrying."},streaming:{assistant:"Bodhi",requestCancelled:"Request cancelled",sendFailed:"Failed to send message",retryFailed:"Failed to retry request",modelConfigNotLoaded:"Model configuration not loaded",agentUnavailable:"Agent unavailable",noActiveChatTitle:"No Active Chat",noActiveChatSendContent:"Please create or select a chat before sending a message.",noActiveChatRetryContent:"Please create or select a chat before retrying.",noChatIdTitle:"Missing Chat ID",noChatIdSendContent:"Current chat is missing an ID. Please create a new chat and try again.",noChatIdRetryContent:"Current chat is missing an ID. Please create a new chat and retry."},selectionToolbar:{selectMessages:"Select messages",selectedCount:"{{selected}} selected ({{total}} total)",selectAll:"Select all",clear:"Clear",exportMarkdown:"Export Markdown",exportPdf:"Export PDF",done:"Done"},compression:{tag:"Context compressed",timelineDetail:"{{count}} messages archived",timelineAria:"{{detail}} at {{time}}",tooltip:"Latest compression at {{time}}: {{count}} messages archived",archivedShort:"{{count}} archived"},subAgents:{title:"Sub-agents",expand:"Expand",collapse:"Collapse",continue:"Continue here",open:"Open",retry:"Retry",hiddenHint:"{{count}} sub-agents hidden"},chatItem:{edit:"Edit",childTag:"Child"},systemPromptSelector:{defaultTag:"Default",hide:"Hide",preview:"Preview",copy:"Copy",lines:"{{count}} lines",words:"{{count}} words",chars:"{{count}} chars",noContent:"No content"},title:{updated:"Chat title updated",generateFailed:"Failed to generate chat title"},respond:{customAnswerPlaceholder:"Type your custom answer..."},emptyLauncher:{title:"Start with a task",subtitle:"Create a focused session in this pane and prefill the first message before you send it.",hint:"Nothing is sent automatically — you can edit the prompt first.",actions:{blank:{title:"Blank session",description:"Start from scratch with the default assistant and an empty composer.",sessionTitle:"New Session",prefill:""},codeReview:{title:"Code review",description:"Open a review-focused session with an editable review brief.",sessionTitle:"Code Review",prefill:"Review the relevant code changes in this workspace or repository. Start with the overall scope, then list risks, notable diffs, and the most important fixes."},tokenUsage:{title:"Token usage investigation",description:"Diagnose context growth, truncation risk, and token budget pressure.",sessionTitle:"Token Usage Investigation",prefill:"Help me investigate token usage, context growth, and truncation risk for this session or workflow. Summarize the likely drivers and recommend concrete next fixes."}},errors:{createFailed:"Failed to create session"}},multiPane:{splitHorizontal:"Split horizontally",splitVertical:"Split vertically",closePane:"Close pane",selectSessionHint:"Select a session to view messages",hoverToSplitHint:"Hover a pane to split and compare chats",selectMessagesToExport:"Select messages to export"},messageCard:{authRequired:"Authentication required",goToSettings:"Go to Settings",assistantThinking:"Assistant is thinking...",assistantCompactingContext:"Assistant is compacting context...",assistantCompactingContextDegraded:"Assistant is compacting context (degraded mode)...",assistantCompactingContextFailed:"Assistant failed to compact context. Continuing...",assistantUpdatingMemory:"Assistant is updating memory...",assistantRunningTool:"Assistant is running {{tool}}...",reasoning:"Reasoning",selected:"Selected",selectedTool:"Selected tool"},messageActions:{copy:"Copy",exportMarkdown:"Export as Markdown",exportPdf:"Export as PDF",restoreChat:"Restore chat only",restoreFilesAndChat:"Restore files and chat",deleteMessage:"Delete message",deleteFailed:"Failed to delete message",deleteNotFound:"Message no longer exists on backend. Reload and retry.",deleteConflict:"Session is running. Stop it and try deleting again.",deleteBatchFailed:"{{failed}} of {{total}} messages failed to delete.",savedFile:"Saved to {{filename}}",nothingToExport:"Nothing to export",exportFailed:"Export failed",cannotRestore:"Cannot restore this message",restorePartial:"Chat restored. {{count}} file(s) could not be restored.",restoreFilesSuccess:"Files and chat restored ({{count}} message(s) removed).",restoreSuccess:"Chat restored ({{count}} message(s) removed).",restoreFailed:"Failed to restore session",pdfUnavailable:"PDF export is unavailable in this environment",exportingPdf:"Exporting PDF..."},session:{defaultTitle:"New Session"}},settings:{page:{back:"Back",title:"System Settings",tabs:{config:"Config",prompts:"Prompts",mermaid:"Mermaid",skills:"Skills",workflows:"Workflows",mcp:"MCP",modelLimits:"Model Limits",metrics:"Metrics",schedules:"Schedules",sessions:"Sessions",app:"App",provider:"Provider",hooks:"Hooks",masking:"Masking",envVars:"Env Vars"},groups:{ai:"AI",toolsAndExtensions:"Tools & Extensions",securityAndPrivacy:"Security",monitoring:"Monitoring",system:"System"}},notifications:{deleteAllSuccess:"All sessions deleted (except pinned)",deleteEmptySuccess:"Empty sessions deleted (except pinned)",localStorageCleared:"Local storage has been cleared",resetSuccessReloading:"Application reset successful. Reloading...",resetFailed:"Failed to reset application",promptEnhancementSaved:"System prompt enhancement saved"},appTab:{switchOn:"ON",switchOff:"OFF",darkMode:"Dark Mode",vdiSafeMode:"Graphics compatibility mode",vdiSafeModeDesc:"Disables blur and glass effects that can break dropdowns and hover overlays in some virtual desktop, remote, or graphics-constrained environments.",vdiSafeModeEnabled:"Graphics compatibility mode enabled",vdiSafeModeDisabled:"Graphics compatibility mode disabled",darkModeDark:"Dark",darkModeLight:"Light",language:"Language",languageEnglish:"English",languageChinese:"Simplified Chinese",languageTraditionalChinese:"Traditional Chinese",languageFrench:"French",languageJapanese:"Japanese",languageHindi:"Hindi",deleteAllTitle:"Delete all sessions",deleteAllDescription:"Are you sure? This will delete all sessions except pinned.",deleteAllButton:"Delete All Sessions",deleteEmptyTitle:"Delete empty sessions",deleteEmptyDescription:"Are you sure? This will delete all sessions with no messages (except pinned).",deleteEmptyButton:"Delete Empty Sessions",clearLocalStorageTitle:"Clear Local Storage",clearLocalStorageDescription:"Are you sure? This will delete all local storage data and reset the application.",clearLocalStorageButton:"Clear Local Storage",confirmDeleteAll:"Yes, delete all",confirmDeleteEmpty:"Yes, delete empty",confirmClear:"Yes, clear it",cancel:"Cancel",dangerZone:"Danger Zone",dangerDescription:"These actions cannot be undone. All data will be permanently deleted.",resetApplicationTitle:"Reset Application",resetApplicationIntro:"Are you sure? This will:",resetStepDeleteAllSessions:"Delete ALL sessions (including pinned)",resetStepClearStorage:"Clear all local storage data",resetStepResetConfig:"Reset config.json to default",resetStepSetupFlow:"Trigger the initial setup flow on next launch",resetStepReplayGuide:"Replay feature guide",resetStepReload:"Reload the application",resetConfirm:"Yes, reset everything",resetButton:"Reset Application (All Data)",runningVersion:"Running version",runningVersionDesc:"This is the currently running Lotus frontend version."},configTab:{tabs:{general:"General",tools:"Tools"},loadConfigFailed:"Failed to load configuration",invalidConfig:"Invalid configuration",saveConfigSuccess:"Configuration saved successfully",saveConfigFailed:"Failed to save configuration",toolsLoadFailed:"Failed to load available tools",toolsReloadSuccess:"Tool list reloaded",toolsSaveSuccess:"Tool settings saved successfully",toolsSaveFailed:"Failed to save tool settings",backendSaved:"Backend URL saved",backendResetDefault:"Backend URL reset to default",providerMovedTitle:"Provider Configuration Moved",providerMovedDescription:"GitHub Copilot and other provider settings have been moved to the Provider Settings tab. Please configure your providers there.",backendApiBaseUrlTitle:"Backend API Base URL",backendApiPlaceholder:"http://127.0.0.1:9562/v1",backendApiHint:"Must include /v1 path",accessPasswordTitle:"Access Password",accessPassword:{helperNotEnabled:"No access password is set. Once enabled, remote access requires a password while local loopback access can bypass it.",helperLocalBypass:"You are on a local connection, so you can change the access password without entering the current password.",helperRemote:"You are on a remote connection. Enter the current password before changing the access password.",loadStatusFailed:"Failed to load access status",updated:"Access password updated",enabled:"Access password set",updateFailed:"Failed to update access password",statusEnabled:"Access password enabled",statusDisabled:"Access password not enabled",currentPasswordLabel:"Current Password",newPasswordLabel:"New Password",setPasswordLabel:"Set Password",confirmPasswordLabel:"Confirm Password",updateAction:"Update Access Password",enableAction:"Enable Access Password",validation:{currentPasswordRequired:"Please enter the current password",newPasswordRequired:"Please enter a new password",confirmPasswordRequired:"Please enter the new password again",minLength:"Password must be at least 4 characters",passwordMismatch:"The passwords do not match"}},resetToDefault:"Reset to Default",save:"Save",language:"Language",languageEnglish:"English",languageChinese:"Simplified Chinese",languageTraditionalChinese:"Traditional Chinese",languageFrench:"French",languageJapanese:"Japanese",languageHindi:"Hindi",toolsTitle:"Tool Availability",toolsDescription:"Toggle whether each tool can be sent to the AI model. Disabled tools are hidden from model tool schemas.",memoryTitle:"Memory & Auto Dream",memoryDescription:"Manage Bamboo's memory layers: session memory for current-work continuity, long-term memory for durable knowledge, and Auto Dream for background Dream Notebook updates and durable memory extraction.",autoDreamEnabled:"Enable Auto Dream",autoDreamEnabledHint:"Automatically maintains the Dream Notebook and extracts long-term memory candidates in the background.",backgroundModel:"Background Memory Model",backgroundModelPlaceholder:"Leave empty to use the provider fast model",backgroundModelHint:"Optional dedicated model for memory summarization and reflection. If blank, Bamboo falls back to the current provider's fast model.",toolsEmpty:"No tools are currently available.",reloadTools:"Reload Tools",loadBambooConfigFailed:"Failed to load Bamboo config",bambooConfigSaved:"Bamboo config saved",saveBambooConfigFailed:"Failed to save Bamboo config"},networkCard:{title:"Network Settings",guideTip:"If you're behind a corporate proxy, configure your HTTP/HTTPS proxy and credentials here.",httpProxy:"HTTP Proxy",httpsProxy:"HTTPS Proxy",proxyPlaceholder:"http://proxy.example.com:8080",proxyAuthTitle:"Proxy Authentication",proxyConfiguredForUser:"Configured for user: {{username}}",clearCredentials:"Clear Credentials",username:"Username",password:"Password",apply:"Apply",credentialsStorageNote:"Proxy credentials are stored encrypted in ~/.bamboo/config.json",reload:"Reload",save:"Save"},modelMappingCard:{loadProviderFailed:"Failed to load provider configuration",loadMappingsFailed:"Failed to load existing mappings",loadModelsFailed:"Failed to load models",loadModelsHint:"Failed to load models. Please check your provider configuration.",mappingSaved:"Model mapping saved",mappingSaveFailed:"Failed to save model mapping",enterModelName:"Please enter a model name",customMappingSaved:"Custom model mapping saved",customMappingSaveFailed:"Failed to save custom model mapping",collapseTitle:"Provider Model Mapping",description:"Configure which {{provider}} models to use for provider-specific model alias resolution.",loadModelsErrorTitle:"Failed to Load Models",retry:"Retry",loadingModels:"Loading models...",modelTypeOpus:"Opus",modelTypeOpusDescription:'matches models containing "opus"',modelTypeSonnet:"Sonnet",modelTypeSonnetDescription:'matches models containing "sonnet"',modelTypeHaiku:"Haiku",modelTypeHaikuDescription:'matches models containing "haiku"',selectModelPlaceholder:"Select {{label}} model",customModelOption:"Custom model...",mappedModelNotFound:`Mapped model "{{model}}" not found in current provider's available models`,refreshModels:"Refresh Models",currentProvider:"Current Provider",loadingProvider:"Loading...",availableModels:"Available Models",cached:"(cached)",storedIn:"Stored in",customModalTitle:"Enter Custom Model Name",customModalDescription:"Enter a custom model name for {{modelType}}",customModalPlaceholder:"e.g., gpt-4-turbo-preview",customModalNote:"Note: Make sure the model name is valid for the current provider.",save:"Save",cancel:"Cancel"},modelTab:{selectModelTitle:"Select Model",loadingModels:"Loading models...",selectModelPlaceholder:"Select a model",backendApiBaseUrlTitle:"Backend API Base URL",resetToDefault:"Reset to Default",save:"Save",backendApiHint:"Must be a full base URL including /v1 (e.g. {{example}})."},mermaidTab:{title:"Mermaid Diagram Settings",description:"Customize how Mermaid diagrams are rendered in your chats",themeCardTitle:"Theme",themeLabel:"Mermaid Theme",themeTooltip:"Choose a built-in Mermaid theme. Default and Neutral auto-switch between light and dark based on app theme.",themeOptions:{default:"Default (Auto Light/Dark)",neutral:"Neutral (Auto Light/Dark)",dark:"Dark",forest:"Forest (Green Tones)",base:"Base (Minimal)"},themeDescriptionsTitle:"Theme Descriptions:",themeDescriptions:{default:"Default: Classic Mermaid look, auto-adapts to light/dark",neutral:"Neutral: Gray tones, auto-adapts to light/dark",dark:"Dark: Always dark theme",forest:"Forest: Green color scheme, good for technical diagrams",base:"Base: Minimal styling, for custom theming"},globalCardTitle:"Global Settings",fontSizeLabel:"Font Size",fontSizeTooltip:"Base font size for all diagram text (in pixels)",defaultZoomLabel:"Default Zoom",defaultZoomTooltip:"Initial zoom level for diagrams (1.0 = 100%)",responsiveWidthLabel:"Responsive Width",responsiveWidthTooltip:"Enable to make diagrams adapt to container width. Disable for fixed-width diagrams.",switchAuto:"Auto",switchFixed:"Fixed",flowchartCardTitle:"Flowchart Settings",flowchartNodeSpacingLabel:"Node Spacing",flowchartNodeSpacingTooltip:"Horizontal spacing between nodes",flowchartRankSpacingLabel:"Rank Spacing",flowchartRankSpacingTooltip:"Vertical spacing between layers",flowchartCurveTypeLabel:"Curve Type",flowchartCurveTypeTooltip:"Type of curve for connections",flowchartCurveOptions:{basis:"Smooth (Basis)",linear:"Linear",cardinal:"Cardinal"},sequenceCardTitle:"Sequence Diagram Settings",sequenceActorMarginLabel:"Actor Margin",sequenceActorMarginTooltip:"Spacing between actors",sequenceMessageMarginLabel:"Message Margin",sequenceMessageMarginTooltip:"Spacing between messages",sequenceActorWidthLabel:"Actor Width",sequenceActorWidthTooltip:"Width of each actor box",sequenceActorHeightLabel:"Actor Height",sequenceActorHeightTooltip:"Height of each actor box",ganttCardTitle:"Gantt Chart Settings",ganttBarHeightLabel:"Bar Height",ganttBarHeightTooltip:"Height of each task bar",ganttTopPaddingLabel:"Top Padding",ganttTopPaddingTooltip:"Space at the top of the chart",resetToDefaults:"Reset to Defaults",previewTitle:"Preview",previewDescription:"Changes are applied immediately. Try creating or viewing a diagram to see your settings in action."},modelLimits:{title:"Token Budget Model Limits",descriptionPrefix:"Configure per-model token limits for context budgeting. These settings are persisted globally in Bamboo",descriptionSuffix:"and used by the backend resolver.",defaultsTitle:"Model Defaults",defaultsDescription:"Preloaded with GPT-5 / GPT-4 / Gemini / Kimi / GLM defaults. You can keep editing as needed.",migratedFromLocalStorage:"Migrated model limits from local storage to global config.",loadFailed:"Failed to load model limits settings",saveSuccess:"Model limits saved to global config",saveFailed:"Failed to save model limits settings",resetSuccess:"Model limits reset to product defaults",resetFailed:"Failed to reset model limits settings",defaults:{gpt54:"Top-tier capability with reasoning depth.",gpt53Codex:"Optimized for code refactoring workflows.",gpt52Pro:"Strong logical stability for complex tasks.",gpt5Mini:"Fast and cost-efficient general-purpose option.",gpt41:"Classic large-context model with 1M window.",gpt4o:"Low latency, suitable for everyday chat.",gemini25Pro:"Strong multimodal analysis capabilities.",kimiK25:"Preferred for long-form Chinese content.",kimiCoding:"Tuned for coding-focused scenarios.",glm5:"Good for one-shot large-document generation."},columns:{vendor:"Vendor/Series",model:"Model",contextWindow:"Context Window",maxOutput:"Max Output",notes:"Notes",actions:"Actions"},placeholders:{vendor:"OpenAI / Google / Moonshot",model:"e.g. gpt-5.4-thinking",optional:"Optional"},actions:{remove:"Remove",addRow:"Add Row",save:"Save",resetToDefaults:"Reset to Defaults",reload:"Reload"},validation:{atLeastOneRow:"Please keep at least one model limit row.",modelPatternEmpty:"Model pattern cannot be empty.",duplicateModelPattern:"Duplicate model pattern: {{pattern}}",contextWindowMin:"Context window for {{pattern}} must be at least 1000.",maxOutputMin:"Max output for {{pattern}} must be at least 1.",maxOutputExceedsContext:"Max output for {{pattern}} must be less than or equal to context window.",safetyMarginNegative:"Safety margin for {{pattern}} cannot be negative.",safetyMarginTooLarge:"Safety margin for {{pattern}} must be smaller than context window."}},common:{loading:"Loading...",successful:"Successful",failed:"Failed"},systemPromptManager:{title:"System Prompt Management",addButton:"Add Prompt",defaultPromptLocked:"Default system prompts are locked and cannot be edited.",updateSuccess:"Prompt updated successfully",addSuccess:"Prompt added successfully",saveError:"Failed to save prompt. Please try again.",deleteSuccess:"Prompt deleted successfully",deleteError:"Failed to delete prompt. Please try again.",deleteConfirm:"Are you sure to delete this prompt?",defaultTag:"Default (Locked)",editTitle:"Edit System Prompt",addTitle:"Add New System Prompt",nameLabel:"Prompt Name",nameRequired:"Please input the name of the prompt!",descriptionLabel:"Prompt Description",descriptionRequired:"Please input the description of the prompt!",contentLabel:"Prompt Content",contentRequired:"Please input the content of the prompt!"},envVars:{title:"Environment Variables",description:"Variables are injected into Bash tool processes. Secret variables are encrypted at rest.",fetchError:"Failed to load environment variables",created:"Variable created",updated:"Variable updated",saveError:"Failed to save variable",deleted:"Variable deleted",deleteError:"Failed to delete variable",addButton:"Add Variable",noVars:"No environment variables configured",addTitle:"Add Environment Variable",editTitle:"Edit Variable",save:"Save",cancel:"Cancel",name:"Name",nameRequired:"Variable name is required",nameInvalid:"Must start with a letter or underscore, followed by letters, digits, or underscores",value:"Value",valueRequired:"Value is required for new variables",valueEditHint:"Leave empty to keep the existing value",valuePlaceholder:"Enter value",valuePlaceholderEdit:"Enter new value or leave empty",secret:"Secret",secretHint:"Secret variables are encrypted on disk and masked in the UI",descriptionField:"Description",descriptionPlaceholder:"Optional description",type:"Type",plain:"Plain",descriptionCol:"Description",actions:"Actions",deleteConfirm:"Delete this variable?",yes:"Yes",no:"No",notSet:"(not set)",empty:"(empty)"},promptsTab:{title:"System Prompt Enhancement",mermaidEnhancement:"Mermaid Enhancement",taskListRules:"Shared Task Rules",copilotConclusionWithOptionsBeforeFinish:"Copilot conclusion_with_options Before Finish",copilotConclusionWithOptionsBeforeFinishDescription:"When enabled for Copilot sessions, Bamboo requires the assistant to finish by calling conclusion_with_options. If the model tries to end with plain text, Bamboo stops the completion and returns a completion policy violation.",switchOn:"ON",switchOff:"OFF",enhancementPlaceholder:"Add global enhancement text to append to every system prompt.",saveEnhancement:"Save Enhancement",description:"This text is appended first, followed by enabled system enhancements before each request is sent."},hooksTab:{title:"Image Hooks",enableImagePreflight:"Enable image preflight hook",modeLabel:"Mode",description:"Placeholder mode rewrites images into text summaries (this can break tools that expect real image data). OCR is currently Windows-only.",loadFailed:"Failed to load hooks settings",updateFailed:"Failed to update hooks",modeUpdateFailed:"Failed to update hook mode",enabled:"Image hooks enabled",disabled:"Image hooks disabled",modeUpdated:"Image hook mode set to: {{mode}}",mode:{placeholder:"Placeholder",error:"Error",ocr:"OCR (Windows)",vision:"Vision (LLM)"}},keywordMaskingTab:{title:"Keyword Masking",addKeyword:"Add Keyword",description:"Configure keywords to be masked before sending to Copilot API. Use exact match for literal strings or regex for pattern matching. All matches will be replaced with [MASKED].",empty:"No keyword masking rules configured",cancel:"Cancel",patternPlaceholder:"Enter pattern to match",examples:"Examples",exactMatch:"Exact Match",regexPattern:"Regex Pattern",enabled:"Enabled",disabled:"Disabled",sampleText:"Sample text",sampleTextPlaceholder:"Enter sample text",maskedPreview:"Masked preview",emptyPattern:"(empty)",loadFailed:"Failed to load keyword masking configuration",saveFailed:"Failed to save configuration",saveSuccess:"Keyword masking configuration saved",validationFailedPrefix:"Validation failed",patternRequired:"Pattern cannot be empty",invalidRegexPattern:"Invalid regex pattern",example:{literalToken:"Mask a literal token",githubTokens:"Mask GitHub tokens",awsKeys:"Mask AWS keys",emails:"Mask email addresses"}},schedulesTab:{loadFailed:"Failed to load schedules",loadSessionsFailed:"Failed to load schedule sessions",createFailed:"Failed to create schedule",updateFailed:"Failed to update schedule",deleteFailed:"Failed to delete schedule",runNowFailed:"Failed to run schedule",taskMessageRequired:"Task message is required when Auto Execute is enabled",created:"Schedule created",updated:"Schedule updated",deleted:"Deleted schedule",enqueuedRun:"Enqueued run",loading:"Loading...",yes:"Yes",no:"No",optional:"(optional)",defaultName:"My Schedule",createTitle:"Create Schedule",listTitle:"Schedules",scheduleSessionsTitle:"Schedule Sessions",scheduleRunsTitle:"Schedule Run History",noSessionsYet:"No sessions yet.",noRunsYet:"No runs yet.",loadRunsFailed:"Failed to load schedule runs",editTitle:"Edit Schedule",nonIntervalReadOnly:"Quick interval editing is only available for interval triggers.",columns:{name:"Name",status:"Status",activity:"Activity",autoExecute:"Auto Execute",model:"Model",enabled:"Enabled",intervalSeconds:"Interval (s)",nextRun:"Next Run",lastRun:"Last Run",actions:"Actions"},triggerTypes:{interval:"Interval",daily:"Daily",weekly:"Weekly",monthly:"Monthly",cron:"Cron"},misfirePolicyOptions:{runOnce:"Run once",skip:"Skip",catchUpAll:"Catch up all",catchUpWindow:"Catch up window"},overlapPolicyOptions:{queueOne:"Queue one",skip:"Skip overlapping runs",allow:"Allow overlap"},form:{name:"Name",triggerType:"Trigger Type",intervalSeconds:"Interval Seconds",dailyHour:"Hour",dailyMinute:"Minute",weeklyWeekdays:"Weekdays",monthlyDays:"Days of Month",monthlyDaysPlaceholder:"e.g. 1, 15, 28",cronExpr:"Cron Expression",cronExprPlaceholder:"e.g. 0 9 * * 1-5",timezone:"Timezone",timezonePlaceholder:"e.g. Asia/Shanghai",startAt:"Start At",endAt:"End At",datetimePlaceholder:"RFC3339, e.g. 2026-04-05T09:00:00Z",misfirePolicy:"Misfire Policy",overlapPolicy:"Overlap Policy",catchUpWindowMaxRuns:"Catch-up Max Runs",catchUpWindowMaxLatenessSeconds:"Catch-up Max Lateness (s)",enabled:"Enabled",taskMessage:"Task Message",taskMessagePlaceholder:"(Optional) A task to run",model:"Model",modelPlaceholder:"(Optional) e.g. gpt-4o-mini",modelRequiredIfAuto:"Required if auto execute",autoExecute:"Auto Execute",systemPrompt:"System Prompt",workspacePath:"Workspace Path",enhancePrompt:"Enhance Prompt"},validation:{nameRequired:"Name is required",triggerRequired:"Trigger configuration is required",intervalRequired:"Interval is required",weekdaysRequired:"At least one weekday is required",monthDaysRequired:"At least one day of month is required",invalidMonthDays:"Month days must be comma-separated values between 1 and 31",cronRequired:"Cron expression is required"},actions:{create:"Create",refresh:"Refresh",edit:"Edit",runNow:"Run Now",sessions:"Sessions",runs:"Runs",delete:"Delete",open:"Open",save:"Save"},runHistory:{columns:{status:"Status",scheduledFor:"Scheduled For",startedAt:"Started At",completedAt:"Completed At",session:"Session",duration:"Duration",outcome:"Outcome"}}},sessionsTab:{currentSessionTitle:"Current Session",id:"id",kind:"kind",clearMessages:"Clear Messages",clearMessagesTitle:"Clear Session Messages",clearMessagesContent:"This clears messages/attachments for the current session but keeps the session entry.",clear:"Clear",cancel:"Cancel",sessionCleared:"Session cleared",noActiveSession:"No active session.",bulkCleanupTitle:"Bulk Cleanup",keepPinned:"Keep pinned",deleteAll:"Delete All",deleteAllTitle:"Delete All Sessions",deleteAllKeepPinned:"Deletes all sessions except pinned.",deleteAllIncludePinned:"Deletes all sessions including pinned.",deleteEmpty:"Delete Empty",deleteEmptyTitle:"Delete Empty Sessions",deleteEmptyKeepPinned:"Deletes empty sessions except pinned.",deleteEmptyIncludePinned:"Deletes empty sessions including pinned.",deleteChildren:"Delete Children",deleteChildrenTitle:"Delete Child Sessions",deleteChildrenKeepPinned:"Deletes all child sessions except pinned.",deleteChildrenIncludePinned:"Deletes all child sessions including pinned.",delete:"Delete",cleanupComplete:"Cleanup complete",devResetTitle:"Development Reset",devResetDescription:"Greenfield reset for session storage (deletes sessions/ and resets sessions.json).",devResetAction:"Dev Reset Sessions",devResetConfirmTitle:"Reset Session Storage (Dev)",devResetConfirmContent:"This deletes ALL sessions (including pinned/child) and resets the sessions index. A new empty session will be created after refresh.",reset:"Reset",devResetDone:"Session storage reset"},workflowsTab:{title:"Workflows",description:"Workflows are stored in `~/.bamboo/workflows` as Markdown files. Use `/name` to insert a workflow in chat.",loadFailed:"Failed to load workflows",loadContentFailed:"Failed to load workflow content",invalidName:"Invalid workflow name",nameAlreadyExists:"A workflow with this name already exists",saved:"Workflow saved",saveFailed:"Failed to save workflow",deleted:"Workflow deleted",deleteFailed:"Failed to delete workflow",refresh:"Refresh",newWorkflow:"New Workflow",save:"Save",empty:"No workflows found",namePlaceholder:"Workflow name",contentPlaceholder:`# Workflow Title
2
+
3
+ Describe the workflow steps here.`},providerTab:{title:"LLM Provider Configuration",description:'Configure your preferred LLM provider. Configuration will be saved and applied when you click "Save and Apply Configuration".',currentProvider:"Current Provider",activeProvider:"Active LLM Provider",selectProviderRequired:"Please select a provider",saveAndApply:"Save and Apply Configuration",loadConfigFailed:"Failed to load provider config",checkStatusFailed:"Failed to check status",startCopilotAuthFailed:"Failed to start Copilot authentication",copilotAuthSuccess:"Copilot authentication successful!",providerReloaded:"Provider reloaded with new authentication.",completeAuthFailed:"Authentication completion failed. Please try again.",userCodeCopied:"User code copied to clipboard!",copyCodeFailedPrefix:"Failed to copy code. Please manually copy:",logoutSuccess:"Logged out from Copilot",logoutFailed:"Failed to logout from Copilot",unknownError:"Unknown error",invalidConfig:"Invalid configuration",invalidConfigPrefix:"Invalid configuration",fetchModelsCopilotFailed:"Failed to fetch models. Please authenticate Copilot and try again.",fetchModelsFailed:"Failed to fetch models. Please check your API key and base URL.",noModelsReturned:"No models returned. Authenticate Copilot first, then fetch models.",foundModels:"Found {{count}} available models",fetchModelsErrorPrefix:"Failed to fetch models",saveConfigSuccess:"Configuration saved successfully",saveConfigFailed:"Failed to save configuration",saveConfigErrorPrefix:"Failed to save configuration",applyConfigSuccess:"Configuration applied successfully. Changes will take effect for new conversations.",applyConfigFailed:"Failed to apply configuration",applyConfigErrorPrefix:"Failed to apply configuration",modelUpdated:"Model updated successfully",updateModelFailed:"Failed to update model",updateModelErrorPrefix:"Failed to update model",fetchingModels:"Fetching models...",refreshModelsFrom:"Refresh available models from {{source}}",fetchModelsFrom:"Fetch available models from {{source}}",saveModelChangeFailed:"Failed to save model change",fetchModelsFailedShort:"Failed to fetch models",retry:"Retry",openaiConfigTitle:"OpenAI Configuration",openaiConfigDescription:"Enter your OpenAI API key to use GPT models. You can optionally specify a custom base URL for proxy servers.",openaiApiKey:"OpenAI API Key",openaiApiKeyRequired:"Please enter your OpenAI API key",baseUrlOptional:"Base URL (Optional)",openaiBaseUrlHelp:"Leave empty to use the default OpenAI API endpoint. Include full path (e.g., /v1) if needed.",defaultModel:"Default Model",fastModel:"Fast Model (Optional)",fastModelHelp:"Cheaper/faster model for lightweight tasks like title generation, mermaid fix, and summarization. Uses default model when not set.",subAgentModel:"Sub Agent Model (Optional)",subAgentModelHelp:"Default model for new Sub Agents. Uses Fast Model when not set, then falls back to the default model.",visionModel:"Vision Model (Optional)",visionModelHelp:"Vision-capable model for image understanding. When hooks.image_fallback.mode is set to 'vision', this model describes images as text so text-only models can understand them. Uses default model when not set.",sameAsDefault:"Same as default model",selectModelRequired:"Please select a model",selectModel:"Select a model",responsesOnlyModelsOptional:"Responses-Only Models (Optional)",responsesOnlyHelp1:"Some models only support the OpenAI Responses API (not chat/completions). Add model ids here to force Bamboo to use upstream",responsesOnlyHelp2:"Supports exact match (e.g. gpt-5.3-codex) and prefix match with a trailing * (e.g. gpt-5*).",anthropicConfigTitle:"Anthropic Configuration",anthropicConfigDescription:"Enter your Anthropic API key to use Claude models.",anthropicApiKey:"Anthropic API Key",anthropicApiKeyRequired:"Please enter your Anthropic API key",anthropicBaseUrlHelp:"Leave empty to use the default Anthropic API endpoint. Include full path (e.g., /v1) if needed.",maxTokensOptional:"Max Tokens (Optional)",maxTokensHelp:"Maximum number of tokens to generate",geminiConfigTitle:"Google Gemini Configuration",geminiConfigDescription:"Enter your Google AI API key to use Gemini models.",geminiApiKey:"Gemini API Key",geminiApiKeyRequired:"Please enter your Gemini API key",geminiBaseUrlHelp:"Leave empty to use the default Google AI API endpoint. Include full path if needed.",copilotConfigTitle:"GitHub Copilot Configuration",copilotConfigDescription:"GitHub Copilot uses OAuth authentication. No API key is required. Make sure you have an active GitHub Copilot subscription.",authStatusTitle:"Authentication Status",authenticated:"Authenticated",notAuthenticated:"Not Authenticated",logoutCopilot:"Logout from Copilot",authenticateCopilot:"Authenticate Copilot",refreshStatus:"Refresh Status",headlessAuth:"Headless Authentication",headlessAuthHelp:"Print login URL in console instead of opening browser automatically",noModelsLoaded:'No models loaded yet. Click "Fetch available models from backend".',authFirstThenFetch:"Authenticate Copilot first, then fetch models.",copilotUsageTitle:"To use GitHub Copilot:",copilotUsageStep1:"Ensure you have an active GitHub Copilot subscription",copilotUsageStep2:'Click "Authenticate Copilot" to start the device code flow',copilotUsageStep3:"Follow the instructions in your terminal to complete authentication",copilotAuthModalTitle:"Copilot Authentication",cancel:"Cancel",completedAuthorization:"I've Completed Authorization",browserOpened:"Browser opened automatically",authStep1:"A GitHub page should have opened in your browser",authStep2:"Copy the code below and paste it on the GitHub page",authStep3:'Click "Continue" on GitHub to authorize',visitUrl:"1. Visit this URL:",enterCode:"2. Enter this code:",copied:"Copied!",copyCode:"Copy Code",afterContinueHint:`After clicking "Continue" on GitHub, click the "I've Completed Authorization" button below.`,providerNames:{openai:"OpenAI",anthropic:"Anthropic",gemini:"Gemini",copilot:"Copilot"},providerModelRef:"Provider Model Catalog",providerModelRefHelp:"Use catalog-based model selection from the backend. When enabled, the model picker shows available models from the provider catalog instead of manually configured models.",catalogModeInfo:"Models are sourced from the provider catalog.",fetchAllModels:"Fetch All Models",fetchingAllModels:"Fetching models...",fetchModelsSuccess:"Successfully fetched models for {{count}} providers",fetchModelsPartialSuccess:"Fetched models for {{success}} of {{total}} providers",providerNotConfigured:"Not Configured",capabilityVision:"Vision",capabilityTools:"Tools",capabilityReasoning:"Reasoning",refreshCatalog:"Refresh Catalog",noCatalogModels:"No models found. Click 'Fetch All Models' to load."},mcpTab:{status:{connecting:"Connecting",ready:"Ready",degraded:"Degraded",stopped:"Stopped",error:"Error"},statusGuideTitle:"Status guide:",statusHelp:{connecting:"Server is starting or reconnecting",ready:"Server is connected and serving tools normally",degraded:"Server is partially available; some tools may fail",stopped:"Server is not running",error:"Server failed to start or encountered runtime errors"},statusLastError:"Last error: {{error}}",serverDeleted:"MCP server deleted",deleteServerFailed:"Failed to delete MCP server",connectedTo:"Connected to {{name}}",connectServerFailed:"Failed to connect MCP server",disconnected:"Disconnected {{name}}",disconnectServerFailed:"Failed to disconnect MCP server",toolsRefreshedFor:"Tools refreshed for {{name}}",refreshToolsFailed:"Failed to refresh tools",statusRefreshed:"MCP status refreshed",refreshStatusFailed:"Failed to refresh MCP status",noServerForEditing:"No server selected for editing",savedServer:"Saved {{name}}",addedServer:"Added {{name}}",saveServerFailed:"Failed to save MCP server",copiedConfig:"Copied MCP config to clipboard",clipboardUnavailable:"Clipboard not available. Export is shown in the modal.",invalidJsonPrefix:"Invalid JSON",unknownError:"Unknown error",jsonMustBeObject:"JSON must be an object",missingMcpServers:`Missing 'mcpServers'. Paste a full Claude Desktop-style config chunk: { "mcpServers": { ... } }`,importSummary:"Imported {{count}} server(s) ({{added}} added, {{updated}} updated, {{removed}} removed). {{failed}} failed to start.",importStartFailures:"Some servers did not start. Config is saved; open the server list to see errors.",importFailed:"Failed to import MCP servers",overviewTitle:"MCP Overview",overviewDescription:"Configure external MCP servers and inspect registered tool aliases.",totalServers:"Total servers: {{count}}",totalTools:"Total tools: {{count}}",serversTitle:"MCP Servers",addServer:"Add Server",refreshAll:"Refresh All",export:"Export",import:"Import",importModalTitle:"Import MCP Servers",importHint:"Paste a Claude Desktop-style config chunk. Example:",importModeMerge:"Merge (Upsert)",importModeReplace:"Replace (Delete Others)",replaceWarning:"Replace mode will remove existing MCP servers not present in the imported mcpServers."},mcpServerTable:{columns:{name:"Name",transportType:"Transport Type",status:"Status",toolCount:"Tool Count",actions:"Actions"},transportOptions:{sse:"SSE",stdio:"Stdio"},deleteTitle:"Delete MCP server",deleteDescription:'Delete server "{{name}}"?',empty:"No MCP servers configured",actions:{edit:"Edit",delete:"Delete",disconnect:"Disconnect",connect:"Connect",refreshTools:"Refresh Tools"}},mcpToolList:{title:"MCP Tools",selectServerHint:"Select a server to inspect its MCP tools",empty:"No tools found for this server",noDescription:"No description available",aliasMapping:"Alias mapping",parametersSchema:"Parameters schema"},mcpServerForm:{jsonMustBeObject:"JSON must be an object",detectedBulkConfig:"Detected mcpServers (bulk config). Use the MCP tab Import button for bulk import, or paste a single server config here.",missingIdField:"Missing or invalid id field",missingTransportField:"Missing or invalid transport field",missingTransportInfo:"Missing transport info. Expected either transport (Bodhi format) or command/url (mainstream MCP format).",invalidJson:"Invalid JSON: {{message}}",unknownError:"Unknown error",editTitle:"Edit MCP Server",addTitle:"Add MCP Server",save:"Save",modeForm:"Form",modeJson:"JSON",jsonError:"JSON Error",serverId:"Server ID",serverIdRequired:"Server ID is required",serverIdPatternError:"Use only letters, numbers, underscore, and hyphen",displayName:"Display Name",enabled:"Enabled",enabledHelp:"Disabled servers stay in config but will not be started.",transportType:"Transport Type",transportTypeRequired:"Transport type is required",transportOptions:{stdio:"Stdio",sse:"SSE"},command:"Command",commandRequired:"Command is required",arguments:"Arguments",argumentsPlaceholder:"Add an argument and press Enter",envVars:"Environment Variables",addEnv:"Add Env",keyRequired:"Key required",sseUrl:"SSE URL",sseUrlRequired:"SSE URL is required",validUrlRequired:"Please enter a valid URL",headers:"Headers",addHeader:"Add Header",headerNameRequired:"Header name required"},metricsCards:{totalSessions:"Total Sessions",chatTokens:"Chat Tokens",totalToolCalls:"Total Tool Calls",avgSessionDuration:"Avg Session Duration"},forwardMetricsCards:{totalForwardRequests:"Total Forward Requests",successRate:"Success Rate",forwardTokens:"Forward Tokens",avgResponseTime:"Avg Response Time"},unifiedMetricsCards:{totalRequests:"Total Requests",totalTokens:"Total Tokens",successRate:"Success Rate",avgResponseTime:"Avg Response Time",chatSessions:"Chat Sessions",chatTokens:"Chat Tokens",toolCalls:"Tool Calls",avgSessionDuration:"Avg Session Duration",promptCachedToolOutputs:"Prompt-Cached Tool Outputs",totalMemories:"Total Memories",staleCandidates:"Stale Candidates",memoryProjects:"Memory Projects",lastReindex:"Last Reindex",forwardRequests:"Forward Requests",forwardTokens:"Forward Tokens",successful:"Successful",failed:"Failed"},metricsTable:{session:{columns:{session:"Session",model:"Model",status:"Status",started:"Started",duration:"Duration",tokens:"Tokens",toolCalls:"Tool Calls",messages:"Messages",action:"Action"},status:{running:"Running",awaitingResponse:"Awaiting Response",completed:"Completed",error:"Error",cancelled:"Cancelled"},view:"View"},forward:{columns:{id:"ID",endpoint:"Endpoint",model:"Model",type:"Type",status:"Status",tokens:"Tokens",duration:"Duration",started:"Started",error:"Error"},typeStream:"Stream",typeSync:"Sync",totalRequests:"{{total}} requests",empty:"No forward requests recorded for this range"}},metricsDashboard:{roundColumns:{round:"Round",status:"Status",duration:"Duration",tokens:"Tokens",toolCalls:"Tool Calls"},compactStats:{combinedTokens:"Combined Tokens",chatTokens:"Chat Tokens",forwardTokens:"Forward Tokens",avgTokensPerSession:"Avg Tokens / Session",estimatedTimeSaved:"Est. Time Saved",estimatedEfficiencyLift:"Est. Efficiency Lift",estimatedSpeedMultiplier:"Est. Speed Multiplier",estimatedSavedWorkdays:"Est. Saved Workdays",avgRoundsPerSession:"Avg Rounds / Session",toolCallsPerSession:"Tool Calls / Session",activeSessionRate:"Active Session Rate",avgTokensPerForward:"Avg Tokens / Forward",forwardErrorRate:"Forward Error Rate",streamingRatio:"Streaming Ratio",p95ForwardLatency:"P95 Forward Latency",modelCoverage:"Model Coverage",endpointCoverage:"Endpoint Coverage"},multiplierSuffix:"x",filtersTitle:"Filters",refresh:"Refresh",startDate:"Start date",endDate:"End date",model:"Model",daysOption:"{{value}} days",granularity:{daily:"Daily",weekly:"Weekly",monthly:"Monthly"},dashboardTitle:"Dashboard",tabs:{overview:"Overview",analysis:"Analysis",records:"Records",chat:"Chat",skillsAndMcp:"Skills & MCP",forward:"Forward",memory:"Memory"},derivedMetricsTitle:"Derived Metrics (Compact)",derivedMetricsSubtitle:"More dimensions without extra page length",efficiencyHint:"Efficiency estimates use conservative assumptions: {{manualTpm}} manual tokens/min + {{manualToolMinutes}} min/tool vs {{assistedTpm}} assisted tokens/min + {{assistedToolMinutes}} min/tool, then apply {{realization}}% realization and caps ({{maxLift}}% / {{maxMultiplier}}x).",toolUsageTitle:"Tool Usage Frequency",noToolUsage:"No tool calls recorded for this range.",calls:"Calls",activityHeatmapTitle:"Daily Activity Heatmap",noActivity:"No activity available for this range.",sessionsCount:"{{count}} sessions",tokensAmount:"{{value}} tokens",sessionsTabLabel:"Sessions ({{count}})",chatSessionsLabel:"Chat Sessions ({{count}})",sessionsHint:"Click a session for full round detail",forwardTabLabel:"Forward Requests ({{count}})",detailedMetricsTitle:"Detailed Metrics",sessionMetricsTitle:"Session Metrics",loadingSessionDetails:"Loading session details...",sessionDetail:{sessionId:"Session ID",model:"Model",status:"Status",duration:"Duration",messages:"Messages",totalTokens:"Total Tokens",toolCalls:"Tool Calls"},noDetail:"No detail available.",skillsAndMcp:{cards:{skillLoadCalls:"Skill Loads",uniqueSkills:"Unique Skills",mcpCalls:"MCP Calls",uniqueMcpServers:"MCP Servers",uniqueMcpTools:"MCP Tools",coreToolCalls:"Core Tool Calls"},mix:{coreTools:"Core Tools",skillLoads:"Skill Loads",mcpCalls:"MCP Calls"},meta:{uniqueTools:"{{count}} tools"},usageMixTitle:"Usage Mix",usageMixSubtitle:"Compare core tools, skill loads, and MCP calls in one view.",noUsageMix:"No usage data available for this range.",topSkillsTitle:"Top Skills",topSkillsSubtitle:"Counted from load_skill calls during matching sessions.",noSkills:"No skills were loaded in this range.",topMcpServersTitle:"Top MCP Servers",topMcpServersSubtitle:"Server-level MCP call distribution.",noMcpServers:"No MCP activity recorded for this range.",topMcpToolsTitle:"Top MCP Tools",topMcpToolsSubtitle:"Most frequently called MCP tool aliases.",noMcpTools:"No MCP tools were called in this range.",topCoreToolsTitle:"Top Core Tools",topCoreToolsSubtitle:"Canonicalized built-in and server tool usage ranking.",noCoreTools:"No core tools were called in this range."},forward:{performanceTitle:"Forward Performance",performance:{p95Latency:"P95 Latency",errorRate:"Error Rate",streamingRatio:"Streaming Ratio",endpointCoverage:"Endpoint Coverage"}},memory:{breakdownTitle:"Memory Breakdown",byType:"By Type",byStatus:"By Status",byScope:"By Scope",lastDream:"Last Dream",lastReindex:"Last Reindex"}},charts:{tokenUsageOverTime:"Token Usage Over Time",unifiedTokenUsageOverTime:"Token Usage Over Time (Chat + Forward)",memoryTrendTitle:"Memory Trend",noTokenUsage:"No token usage available",noMemoryTrend:"No memory trend available",tokenUsageDescription:"Prompt, completion, and total tokens by day/period.",unifiedTokenUsageDescription:"Combined chat and forward token usage over time.",memoryTrendDescription:"Created memories, updated memories, and total durable memory over time.",total:"Total",prompt:"Prompt",completion:"Completion",chat:"Chat",forward:"Forward",totalMemories:"Total Memories",createdMemories:"Created Memories",updatedMemories:"Updated Memories",modelDistribution:"Model Distribution",noModelMetrics:"No model metrics available",modelDistributionDescription:"Share of total tokens consumed by model.",endpointDistribution:"Endpoint Distribution",noForwardMetrics:"No forward metrics available for this range."}},components:{markdown:{codeCopiedSuccess:"Code copied to clipboard",copyFailed:"Copy failed"},jsonSchema:{field:"Field",type:"Type",required:"Required",yes:"Yes",no:"No",default:"Default",description:"Description",noProperties:"No properties in schema"},workflowResult:{userWorkflow:"User Workflow",waitingForResult:"Waiting for workflow result...",executionFailed:"Workflow execution failed",retryWorkflow:"Retry workflow",copyParameters:"Copy parameters",copyResult:"Copy result",expandResult:"Expand result",collapseResult:"Collapse result"},toolResult:{waiting:"Waiting",waitingForResult:"Waiting for result...",executionFailed:"Tool execution failed",copyResult:"Copy result",checkpoint:"Checkpoint",checkpointNone:"None",diffTruncated:"Diff is too long and has been truncated",structuredToolResultHint:"Tool result · {{tool}}",memory:{action:{inspect:"Inspect",rebuild:"Rebuild"},totalMemories:"{{count}} memories",staleCandidates:"stale candidates: {{count}}",coverage:"Coverage",viewsLabel:"Views:",indexesLabel:"Indexes:",stateFilesLabel:"State files:",lastReindexLabel:"Last reindex:",lastDreamLabel:"Last dream:",viewFiles:"View files",indexFiles:"Index files",stateFiles:"State files",topicPaths:"Topic paths",recentMemories:"Recent memories"}},toolCall:{liveOutput:"Live output",keyParameters:"Key parameters",fullParameters:"Full parameters",copyParameters:"Copy parameters"},toolSteps:{title:"Tool Run",running:"running…",viewFullOutput:"View full output",details:"Details",preview:"Preview",parameters:"Parameters",result:"Result",noResult:"No result yet",intent:"Intent",keyParameters:"Key parameters"},plan:{executionPlan:"Execution Plan",goal:"Goal",steps:"Steps",stepTitle:"Step {{number}}",reason:"Reason",estimated:"Estimated",tools:"Tools",prerequisites:"Prerequisites",potentialRisks:"Potential Risks ({{count}})",totalEstimatedTime:"Total estimated time",feedbackPlaceholder:"Tell the agent what to adjust...",sendFeedback:"Send feedback",refinePlan:"Refine plan",executePlan:"Execute plan"},question:{agentQuestion:"Agent Question",context:"Context",chooseOption:"Choose an option",recommended:"Recommended",customAnswerHint:"Need another option? Type your own answer.",customAnswerPlaceholder:"Type your custom answer...",submitAnswer:"Submit answer"},questionDialog:{selectOptionWarning:"Please select an option before submitting.",responseSubmitted:"Response submitted",responseSubmittedContinue:"Response submitted, AI will continue processing",submitFailed:"Failed to submit response",noModelConfigured:"No model configured",customAnswerTip:"Custom answer",otherTypeBelow:"Other (type below)",confirm:"Confirm"},skillManager:{title:"Skills",refresh:"Refresh",skillsRefreshed:"Skills refreshed",lastUpdated:"Last updated: {{value}}",justNow:"just now",secondsAgo:"{{count}}s ago",minutesAgo:"{{count}}m ago",searchPlaceholder:"Search skills",readOnlyHint:"Skill files remain read-only, but you can enable or disable them for prompt usage.",disabledHint:"Disabled skills stay visible here, but Bamboo filters them from system prompt skill context and blocks load_skill at runtime.",disabledTag:"Disabled",switchEnabled:"On",switchDisabled:"Off",skillStateSaved:"Skill state saved",saveFailed:"Failed to save skill state",noSkillsFound:"No skills found",noMatch:"No skills match the current search",loadFailed:"Failed to load skills",getFailed:"Failed to get skill"},skillSelector:{placeholder:"Select skills",disabledSkillsHint:"{{count}} previously selected skill is now globally disabled and has been removed."},imageGrid:{preview:"Preview",ocr:"OCR"},todoList:{title:"Task List",evaluating:"Evaluating",pin:"Pin",unpin:"Unpin",llmEvaluation:"LLM Evaluation",tools:"tools",dependsOn:"Depends on: {{deps}}",dependencies:"deps",status:{pending:"Pending",inProgress:"In Progress",completed:"Completed",blocked:"Blocked"}},tokenUsage:{title:"Token Usage",contextWindow:"Context window",summary:"Summary",system:"System",messages:"Messages",tokens:"tokens",usedPercent:"Used {{value}}%"},approval:{workflow:"Workflow",executionRequest:"Execution Request",aiWantsExecute:"AI wants to execute the following action"},toolSession:{title:"Tool Session",running:"Running",done:"Done",error:"Error",completedOnly:"{{completed}} completed",completedWithErrors:"{{completed}} completed (with errors)",completedProgress:"{{completed}} / {{total}} completed",noPersistedMessage:"No persisted output",deleteMessage:"Delete tool session"},mermaid:{loadingDiagram:"Loading diagram...",diagramError:"Mermaid Diagram Error",errorTitlePrefix:"Error",checkConsoleHint:"Check Mermaid syntax or open the console for details.",fixMermaid:"Fix Mermaid",renderingDiagram:"Rendering diagram...",exportSvg:"Export SVG",exportFailed:"Failed to export diagram"}},validation:{workspaceRequired:"Please enter a workspace path",invalidPath:"Invalid path"},error:{saveWorkspaceFailed:"Failed to save workspace path",readFolderFailed:"Unable to read folder",copyPromptFailed:"Failed to copy prompt content"},success:{promptCopied:'Copied "{{name}}" prompt'}}};export{e as enUsTranslation};