@intent-hq/web 2.357.0 → 2.357.1

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 (143) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{DyqsXXds.js → 66_rhosy.js} +1 -1
  3. package/web/app/immutable/chunks/{XTUjVC3s.js → 7y7832WT.js} +1 -1
  4. package/web/app/immutable/chunks/{CREdX7EY.js → 9P6ZvzvD.js} +1 -1
  5. package/web/app/immutable/chunks/{hZnA3cdC.js → AQD9ZwKP.js} +1 -1
  6. package/web/app/immutable/chunks/{BsoU3ZI2.js → B2LPQxIt.js} +1 -1
  7. package/web/app/immutable/chunks/{CSVv71j6.js → B3SPWmt-.js} +1 -1
  8. package/web/app/immutable/chunks/{BX3WN5kC.js → BCoXAz1U.js} +1 -1
  9. package/web/app/immutable/chunks/{CmBCvv92.js → BDjg6KKO.js} +1 -1
  10. package/web/app/immutable/chunks/{BXgckBJT.js → BG6kMtPP.js} +1 -1
  11. package/web/app/immutable/chunks/{1tg8Mdjb.js → BGJfXAWv.js} +1 -1
  12. package/web/app/immutable/chunks/{-p1BY2nb.js → BLxae2bF.js} +1 -1
  13. package/web/app/immutable/chunks/{CRlego-x.js → BMvS7SgR.js} +3 -3
  14. package/web/app/immutable/chunks/{DfG1FsDK.js → BMyQIDAo.js} +4 -4
  15. package/web/app/immutable/chunks/{DiLP5819.js → BQ23qfTF.js} +1 -1
  16. package/web/app/immutable/chunks/{hcSSFtOe.js → BTGEGvnD.js} +1 -1
  17. package/web/app/immutable/chunks/{Bzimqqxc.js → BVeQxmcO.js} +1 -1
  18. package/web/app/immutable/chunks/{CzVeHBPR.js → BVoA79wA.js} +1 -1
  19. package/web/app/immutable/chunks/{VNMm_PPx.js → BYHbCXEy.js} +1 -1
  20. package/web/app/immutable/chunks/{VdF5zrMU.js → BZCD0L1_.js} +1 -1
  21. package/web/app/immutable/chunks/{BAQ_0gFW.js → BZQo8LNo.js} +1 -1
  22. package/web/app/immutable/chunks/{CGnPIR9g.js → B_3_o4NM.js} +1 -1
  23. package/web/app/immutable/chunks/{Ct4AQosP.js → Ba0vVpgz.js} +1 -1
  24. package/web/app/immutable/chunks/{DwIt5YzD.js → Bd1ZbfsE.js} +1 -1
  25. package/web/app/immutable/chunks/{DZflJ7Rw.js → Bd3Jv-O1.js} +1 -1
  26. package/web/app/immutable/chunks/{Bfjz63Rs.js → Bjw3ENRr.js} +1 -1
  27. package/web/app/immutable/chunks/{BMZ0t1iW.js → BmkId4Xs.js} +1 -1
  28. package/web/app/immutable/chunks/{f4FaHo0d.js → BnnkDYnu.js} +1 -1
  29. package/web/app/immutable/chunks/{BNMSrBKr.js → BpTd99tA.js} +1 -1
  30. package/web/app/immutable/chunks/{D1eZCGCC.js → Bqt9Orfw.js} +1 -1
  31. package/web/app/immutable/chunks/{C-ITJ-M0.js → Bsx9tus4.js} +1 -1
  32. package/web/app/immutable/chunks/{Dse_C5ka.js → BxRqO5xf.js} +1 -1
  33. package/web/app/immutable/chunks/{DzVwqiSG.js → C-ExwGaf.js} +1 -1
  34. package/web/app/immutable/chunks/{BhqI687N.js → C3G5lO0X.js} +1 -1
  35. package/web/app/immutable/chunks/{B5E75mYn.js → C5zadSpA.js} +3 -3
  36. package/web/app/immutable/chunks/{CUcdKSIk.js → CBPCiMxB.js} +1 -1
  37. package/web/app/immutable/chunks/{BiYndv31.js → CCdcqA0c.js} +1 -1
  38. package/web/app/immutable/chunks/{DQT2HseM.js → CFf_TK-h.js} +1 -1
  39. package/web/app/immutable/chunks/{BufA67uC.js → CHK4FXDC.js} +1 -1
  40. package/web/app/immutable/chunks/{t0Sry9wB.js → CKmIcPAK.js} +1 -1
  41. package/web/app/immutable/chunks/{trDHZFy5.js → CKpm8C6c.js} +1 -1
  42. package/web/app/immutable/chunks/{CDop75lD.js → CLmt7ktX.js} +4 -4
  43. package/web/app/immutable/chunks/{BO4DijuW.js → CS9ie09_.js} +1 -1
  44. package/web/app/immutable/chunks/{DYZ9p4gw.js → CSE73PBJ.js} +1 -1
  45. package/web/app/immutable/chunks/{B2tWwOjs.js → CTGUTBCN.js} +1 -1
  46. package/web/app/immutable/chunks/{COrU_zos.js → CV16Bucz.js} +4 -4
  47. package/web/app/immutable/chunks/{C0p8wayb.js → CYAcOUio.js} +1 -1
  48. package/web/app/immutable/chunks/{CapRHp-3.js → C_wivZis.js} +1 -1
  49. package/web/app/immutable/chunks/{B4pmsBqR.js → Cb2A7MN0.js} +1 -1
  50. package/web/app/immutable/chunks/{BSDfJm3v.js → Cb3IR_gP.js} +2 -2
  51. package/web/app/immutable/chunks/{BWa7My9c.js → CdvOr8yA.js} +1 -1
  52. package/web/app/immutable/chunks/{DIq_NgVD.js → Cha39o9r.js} +1 -1
  53. package/web/app/immutable/chunks/{DcyLYuvX.js → ChoJBBfE.js} +1 -1
  54. package/web/app/immutable/chunks/{C75uVfAk.js → Ci9WXQ89.js} +1 -1
  55. package/web/app/immutable/chunks/{Bj1ZRGMd.js → CjYdM0YD.js} +1 -1
  56. package/web/app/immutable/chunks/{XvB_C6E3.js → CrxXInxf.js} +1 -1
  57. package/web/app/immutable/chunks/{BR8MYFvM.js → Cs6WGZex.js} +1 -1
  58. package/web/app/immutable/chunks/{Zo8Uabvb.js → Ct7QNzzh.js} +12 -12
  59. package/web/app/immutable/chunks/{DrK8t3w6.js → CwJEu8cK.js} +1 -1
  60. package/web/app/immutable/chunks/{BIJ9yl2O.js → Cx0yZw2_.js} +1 -1
  61. package/web/app/immutable/chunks/{DPdE8XN1.js → Cx9nP__t.js} +1 -1
  62. package/web/app/immutable/chunks/{Bpu4KV0h.js → Cy-rVXS3.js} +1 -1
  63. package/web/app/immutable/chunks/{_ncQX04u.js → CyBdhy5_.js} +1 -1
  64. package/web/app/immutable/chunks/{qiMxzrto.js → CzeIL_6z.js} +1 -1
  65. package/web/app/immutable/chunks/{DW6txncK.js → D-EgBFka.js} +1 -1
  66. package/web/app/immutable/chunks/{CPNM0qrd.js → D024cEiO.js} +2 -2
  67. package/web/app/immutable/chunks/{Cy7DFJe5.js → D0orvEYB.js} +1 -1
  68. package/web/app/immutable/chunks/{CSa-Sqaw.js → D2P0fD42.js} +4 -4
  69. package/web/app/immutable/chunks/{BFsFAs4c.js → D6j3Zn1d.js} +1 -1
  70. package/web/app/immutable/chunks/{BcfSFmD3.js → D8aSK4oD.js} +1 -1
  71. package/web/app/immutable/chunks/{DsqE_Bdq.js → DGaw_Pt8.js} +1 -1
  72. package/web/app/immutable/chunks/{y6whrxEh.js → DIC5rFND.js} +1 -1
  73. package/web/app/immutable/chunks/{Ohf7jFka.js → DIKVXlyt.js} +2 -2
  74. package/web/app/immutable/chunks/{DE3MDhxe.js → DJbKSkhu.js} +1 -1
  75. package/web/app/immutable/chunks/{CH24rXW_.js → DKOCXDff.js} +1 -1
  76. package/web/app/immutable/chunks/{C8A6q25O.js → DLG3MCT8.js} +1 -1
  77. package/web/app/immutable/chunks/{BQJBTOJl.js → DLIvmKAR.js} +1 -1
  78. package/web/app/immutable/chunks/{BALn2OfB.js → DLmwZnzr.js} +5 -5
  79. package/web/app/immutable/chunks/{6j0Bv6V-.js → DOs89s1W.js} +1 -1
  80. package/web/app/immutable/chunks/{D4S_b9kl.js → DPirTM_u.js} +1 -1
  81. package/web/app/immutable/chunks/{B-byhlrG.js → DQIS1MQd.js} +1 -1
  82. package/web/app/immutable/chunks/{BPivozdw.js → DQMWee-l.js} +3 -3
  83. package/web/app/immutable/chunks/{BoedJ8yq.js → DUGMxl18.js} +1 -1
  84. package/web/app/immutable/chunks/{BQkfaPle.js → DUQ8HfFA.js} +1 -1
  85. package/web/app/immutable/chunks/{1nnk-Wsk.js → DUq_tiZf.js} +1 -1
  86. package/web/app/immutable/chunks/{Bi3vpVI6.js → D_HBCPjs.js} +1 -1
  87. package/web/app/immutable/chunks/{BAWksQvp.js → DbPDpNcg.js} +1 -1
  88. package/web/app/immutable/chunks/{BpqOTexP.js → DbSMHaNK.js} +1 -1
  89. package/web/app/immutable/chunks/{B9A7zPdb.js → DcGNquRL.js} +1 -1
  90. package/web/app/immutable/chunks/{JZzD0yFI.js → Dcvn1tie.js} +2 -2
  91. package/web/app/immutable/chunks/{DcW_Q-_L.js → DdIYz1zo.js} +1 -1
  92. package/web/app/immutable/chunks/{BIVrIHM0.js → DeYzpxan.js} +1 -1
  93. package/web/app/immutable/chunks/{jqpS-Qmo.js → DffSA-Qz.js} +1 -1
  94. package/web/app/immutable/chunks/{DrpfvH93.js → Djfmc_ao.js} +1 -1
  95. package/web/app/immutable/chunks/{Djn-kDZ4.js → DnD4hxy7.js} +1 -1
  96. package/web/app/immutable/chunks/{BGhV0sdL.js → DnJtXsWm.js} +1 -1
  97. package/web/app/immutable/chunks/{CxN-SpwP.js → Dto5_TqF.js} +1 -1
  98. package/web/app/immutable/chunks/{DcjHFaNi.js → DvMvrFFa.js} +1 -1
  99. package/web/app/immutable/chunks/{C6jDNmrt.js → DvhhQYfO.js} +1 -1
  100. package/web/app/immutable/chunks/{9LFJ_Q3r.js → DvjZKcqd.js} +1 -1
  101. package/web/app/immutable/chunks/{DYGZ9sTv.js → EPCnwBto.js} +1 -1
  102. package/web/app/immutable/chunks/{C1zvEWGg.js → HJvhI2th.js} +2 -2
  103. package/web/app/immutable/chunks/{CDBU9mtE.js → IDaGSd8y.js} +1 -1
  104. package/web/app/immutable/chunks/{Osmv5gZI.js → IRSIweMK.js} +2 -2
  105. package/web/app/immutable/chunks/{BUj9gSzV.js → OBaERIRu.js} +1 -1
  106. package/web/app/immutable/chunks/{CccZ7iCE.js → OtZHxuvr.js} +1 -1
  107. package/web/app/immutable/chunks/{ChM2jeRS.js → P93gVaLu.js} +1 -1
  108. package/web/app/immutable/chunks/{Bk14cxcJ.js → PRunkvIA.js} +1 -1
  109. package/web/app/immutable/chunks/{D-oI-oRa.js → Q_7q1g1V.js} +1 -1
  110. package/web/app/immutable/chunks/{Cf_Jryir.js → WHFDPTSN.js} +1 -1
  111. package/web/app/immutable/chunks/{B4ODjo1_.js → WSJurcVg.js} +1 -1
  112. package/web/app/immutable/chunks/{0sUdCOJj.js → _QB9q3ka.js} +2 -2
  113. package/web/app/immutable/chunks/{Chtu4V3e.js → aB88tX8Q.js} +1 -1
  114. package/web/app/immutable/chunks/{DhigC4WI.js → hWXfsV3F.js} +2 -2
  115. package/web/app/immutable/chunks/{iXONcEpN.js → iarSknrC.js} +1 -1
  116. package/web/app/immutable/chunks/{DHS6-YDt.js → q66ttt22.js} +3 -3
  117. package/web/app/immutable/chunks/{UfZ1-ewn.js → r5eyOwTV.js} +1 -1
  118. package/web/app/immutable/chunks/{Ck6v_gHY.js → s3cC8o8y.js} +1 -1
  119. package/web/app/immutable/chunks/{B6Xz_h0x.js → sVbFdYPp.js} +1 -1
  120. package/web/app/immutable/chunks/{CQTLfLe-.js → scctxWgb.js} +1 -1
  121. package/web/app/immutable/chunks/{CYqk2Hhu.js → u4HT3usu.js} +3 -3
  122. package/web/app/immutable/chunks/{gz1pzjmr.js → v4Y0eqyL.js} +1 -1
  123. package/web/app/immutable/chunks/{CmoBfnbr.js → wegJMlUp.js} +1 -1
  124. package/web/app/immutable/chunks/{ecq9AzSs.js → wf2_U67h.js} +1 -1
  125. package/web/app/immutable/chunks/{ds28TSQT.js → xermZvR1.js} +1 -1
  126. package/web/app/immutable/entry/{app.DzIpDnb7.js → app.B9pbttZz.js} +2 -2
  127. package/web/app/immutable/entry/start.LGV8aa5W.js +1 -0
  128. package/web/app/immutable/nodes/{0.D9XYE-Ct.js → 0.BuaXl3Zn.js} +1 -1
  129. package/web/app/immutable/nodes/{1.miAECHse.js → 1.C0hTLxrG.js} +1 -1
  130. package/web/app/immutable/nodes/{10.D--eaewT.js → 10.BYoBAwS8.js} +1 -1
  131. package/web/app/immutable/nodes/{14.DUejalGq.js → 14.qZIH60wN.js} +1 -1
  132. package/web/app/immutable/nodes/{18.DJqNUReE.js → 18.Cz3sqM0n.js} +2 -2
  133. package/web/app/immutable/nodes/{2.CoGuMWzq.js → 2._25AU1Pu.js} +4 -4
  134. package/web/app/immutable/nodes/{3.BFJD36tC.js → 3.RDPPYmES.js} +1 -1
  135. package/web/app/immutable/nodes/{4.B2Xl_W0u.js → 4.Demyxi_h.js} +1 -1
  136. package/web/app/immutable/nodes/{5.BbLYjFzb.js → 5.ylO_Qjm7.js} +1 -1
  137. package/web/app/immutable/nodes/{6.8KJ44jJu.js → 6.CJQj_6nS.js} +1 -1
  138. package/web/app/immutable/nodes/{7.DM8B7EL6.js → 7.BP9EIVoN.js} +1 -1
  139. package/web/app/immutable/nodes/{8.CM-MwROR.js → 8.qL2AO5Vz.js} +4 -4
  140. package/web/app/immutable/nodes/{9.CaTY2WNw.js → 9.CH8_E86R.js} +4 -4
  141. package/web/app/version.json +1 -1
  142. package/web/index.html +9 -9
  143. package/web/app/immutable/entry/start._AX5mAyc.js +0 -1
@@ -1 +1 @@
1
- import{b as V,ay as k,aW as lt}from"./CSa-Sqaw.js";import{c as tt}from"./lAmQKSWr.js";import{g as gt}from"./BdWqymET.js";var Z={exports:{}},$={exports:{}},Q={exports:{}},ut=Q.exports,j;function ft(){return j||(j=1,(function(G,b){(function(I,L){G.exports=L()})(ut,function(){return(function(N){var I={};function L(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,L),e.l=!0,e.exports}return L.m=N,L.c=I,L.i=function(o){return o},L.d=function(o,e,t){L.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},L.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return L.d(e,"a",e),e},L.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},L.p="",L(L.s=26)})([(function(N,I,L){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,L){var o=L(2),e=L(8),t=L(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,L){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(13),i=L(0),l=L(16),g=L(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,L){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,L){var o=L(2),e=L(10),t=L(0),i=L(6),l=L(3),g=L(1),n=L(13),d=L(12),r=L(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 T=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:(T.source=v,T.target=D,T.isInterGraph=!1,this.getEdges().push(T),v.edges.push(T),D!=v&&D.edges.push(T),T)}},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,T=D.length,y=0;y<T;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,T,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?T=y[0].getParent().paddingLeft:T=this.margin,this.left=v-T,this.top=p-T,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,T=-e.MAX_VALUE,y,O,s,f,c,E=this.nodes,A=E.length,m=0;m<A;m++){var C=E[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),T<f&&(T=f)}var R=new n(v,u,D-v,T-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()),E[0].getParent().paddingLeft!=null?c=E[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,T=-e.MAX_VALUE,y,O,s,f,c=p.length,E=0;E<c;E++){var A=p[E];y=A.getLeft(),O=A.getRight(),s=A.getTop(),f=A.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),T<f&&(T=f)}var m=new n(v,u,D-v,T-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 T=v[u];p+=T.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],T,y,O=u.withChildren();for(O.forEach(function(m){v.push(m),D.add(m)});v.length!==0;){u=v.shift(),T=u.getEdges();for(var s=T.length,f=0;f<s;f++){var c=T[f];if(y=c.getOtherEndInGraph(u,this),y!=null&&!D.has(y)){var E=y.withChildren();E.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,L){var o,e=L(1);function t(i){o=L(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,L){var o=L(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,L){var o=L(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(),T=t.getWidthHalf(),y=t.getHeightHalf(),O=i.getX(),s=i.getY(),f=i.getRight(),c=i.getX(),E=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]=E,!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]=E,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]=E,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+T*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+-T*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=E,_=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,T=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,E=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,E=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*E-f*c)/A,T=(O*c-y*E)/A,new o(u,T))},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 T=((D-p)*(v-n)+(a-v)*(D-d))/u,y=((d-h)*(v-n)+(r-n)*(D-d))/u;return 0<T&&T<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,L){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,L){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,L){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?.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,L){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,L){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,L){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,L){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=L(0),t=L(6),i=L(3),l=L(1),g=L(5),n=L(4),d=L(17),r=L(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 T=a;if(T.vGraphObject!=null){var y=T.vGraphObject;y.update(T)}}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,T=0;T<D.length;T++)u=D[T],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 T=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),T.add(f);for(var c=f.getEdges(),u=0;u<c.length;u++){var E=c[u].getOtherEnd(f);if(O.get(f)!=E)if(!T.has(E))y.push(E),O.set(E,f);else{p=!1;break}}}if(!p)a=[];else{var A=[].concat(o(T));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)}T=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 T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),D.add(T);var y=this.newEdge(null);this.graphManager.add(y,v,T),p.add(T),v=T}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 T=D[u],y=new n(T.getCenterX(),T.getCenterY()),O=v.bendpoints.get(u);O.x=y.x,O.y=y.y,T.getOwner().remove(T)}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 T=p/v;u-=(p-T)/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,T=null;(p.length==1||p.length==2)&&(u=!0,T=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],E=p.indexOf(O);E>=0&&p.splice(E,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,T=p[0])}return T},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,L){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,L){var o=L(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,L){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=L(15),t=L(7),i=L(0),l=L(8),g=L(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(),T=0;T<u.length;T++)r=u[T],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(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,a=0;a<u.length;a++)v=u[a],this.calculateRepulsionForceOfANode(v,T,r,h),T.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,T;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),T=D*(r.lengthY/v),a.springForceX+=u,a.springForceY+=T,p.springForceX-=u,p.springForceY-=T)},n.prototype.calcRepulsionForce=function(r,h){var a=r.getRect(),p=h.getRect(),v=new Array(2),D=new Array(4),u,T,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 E=r.noOfChildren*h.noOfChildren/(r.noOfChildren+h.noOfChildren);r.repulsionForceX-=E*f,r.repulsionForceY-=E*c,h.repulsionForceX+=E*f,h.repulsionForceY+=E*c}else this.uniformLeafNodeSizes&&r.getChild()==null&&h.getChild()==null?(u=p.getCenterX()-a.getCenterX(),T=p.getCenterY()-a.getCenterY()):(l.getIntersection(a,p,D),u=D[2]-D[0],T=D[3]-D[1]),Math.abs(u)<t.MIN_REPULSION_DIST&&(u=g.sign(u)*t.MIN_REPULSION_DIST),Math.abs(T)<t.MIN_REPULSION_DIST&&(T=g.sign(T)*t.MIN_REPULSION_DIST),y=u*u+T*T,O=Math.sqrt(y),s=this.repulsionConstant*r.noOfChildren*h.noOfChildren/y,f=s*u/O,c=s*T/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,T,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,T=Math.abs(D)+r.getHeight()/2,r.getOwner()==this.graphManager.getRoot()?(y=h.getEstimatedSize()*this.gravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||T>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 T=p;T<=v;T++)for(var y=D;y<=u;y++)this.grid[T][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,T=r.startX-1;T<r.finishX+2;T++)for(var y=r.startY-1;y<r.finishY+2;y++)if(!(T<0||y<0||T>=u.length||y>=u[0].length)){for(var O=0;O<u[T][y].length;O++)if(D=u[T][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(T=0;T<r.surrounding.length;T++)this.calcRepulsionForce(r,r.surrounding[T])},n.prototype.calcRepulsionRange=function(){return 0},N.exports=n}),(function(N,I,L){var o=L(1),e=L(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,L){var o=L(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,L){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,L){var o=L(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,L){var o=L(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,L){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=L(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,L){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,L){var o=function(){};o.FDLayout=L(18),o.FDLayoutConstants=L(7),o.FDLayoutEdge=L(19),o.FDLayoutNode=L(20),o.DimensionD=L(21),o.HashMap=L(22),o.HashSet=L(23),o.IGeometry=L(8),o.IMath=L(9),o.Integer=L(10),o.Point=L(12),o.PointD=L(4),o.RandomSeed=L(16),o.RectangleD=L(13),o.Transform=L(17),o.UniqueIDGeneretor=L(14),o.Quicksort=L(24),o.LinkedList=L(11),o.LGraphObject=L(2),o.LGraph=L(5),o.LEdge=L(1),o.LGraphManager=L(6),o.LNode=L(3),o.Layout=L(15),o.LayoutConstants=L(0),o.NeedlemanWunsch=L(25),N.exports=o}),(function(N,I,L){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=$.exports,z;function pt(){return z||(z=1,(function(G,b){(function(I,L){G.exports=L(ft())})(ct,function(N){return(function(I){var L={};function o(e){if(L[e])return L[e].exports;var t=L[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=L,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,L){I.exports=N}),(function(I,L,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,L,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,L,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,L,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,L,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,L,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,T=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(E){return f.has(E)});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,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),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 E=s[c].rect,A=s[c].id;f[A]={id:A,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.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(),E=c.length,A;for(A=0;A<E;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 E=s[c];if(!f.has(E)){var A=E.getSource(),m=E.getTarget();if(A==m)E.getBendpoints().push(new a),E.getBendpoints().push(new a),this.createDummyNodesForBendpoints(E),f.add(E);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)),E=0,A=0,m=0,C=new a(0,0),R=0;R<s.length;R++){R%c==0&&(m=0,A=E,R!=0&&(A+=n.DEFAULT_COMPONENT_SEPERATION),E=0);var M=s[R],S=p.findCenterOfTree(M);f.x=m,f.y=A,C=y.radialLayout(M,S,f),C.y>E&&(E=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 E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,E);var A=u.calculateBounds(s),m=new T;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,E,A,m){var C=(E-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(E-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 E=s[c],A=E.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=[],E=this.graphManager.getAllNodes(),A=0;A<E.length;A++){var m=E[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 E=s.idToDummyNode[c];f[c]=s.tileNodes(s.memberGroups[c],E.paddingLeft+E.paddingRight),E.rect.width=f[c].width,E.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,E=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,E,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var E=s.idToDummyNode[c],A=E.paddingLeft,m=E.paddingTop;s.adjustLocations(f[c],E.rect.x,E.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 E=c.getNodes(),A=0;A<E.length;A++){var m=E[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,E=0;E<f.length;E++){var A=f[E];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(),E=0;E<c.length;E++){var A=c[E];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,E,A){f+=E,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(E){var A=f[E];c.tiledMemberPack[E]=c.tileNodes(s[E],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[E].width,A.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:E};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,E){var A=E;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,E=0;E<s.rows.length;E++)s.rowWidth[E]<c&&(f=E,c=s.rowWidth[E]);return f},y.prototype.getLongestRowIndex=function(s){for(var f=-1,c=Number.MIN_VALUE,E=0;E<s.rows.length;E++)s.rowWidth[E]>c&&(f=E,c=s.rowWidth[E]);return f},y.prototype.canAddHorizontal=function(s,f,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var A=s.rowWidth[E];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[E]<c&&E>0&&(m=c+s.verticalPadding-s.rowHeight[E]);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,E=s.rows[f],A=E[E.length-1],m=A.width+s.horizontalPadding;if(s.width-s.rowWidth[c]>m&&f!=c){E.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<E.length;R++)E[R].height>C&&(C=E[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 E=this.graphManager.getAllNodes(),A=[];f=!1;for(var m=0;m<E.length;m++)c=E[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],E,A=0;A<c.length;A++)E=c[A],this.findPlaceforPrunedNode(E),E[2].add(E[0]),E[2].add(E[1],E[1].source,E[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},y.prototype.findPlaceforPrunedNode=function(s){var f,c,E=s[0];E==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?E.setCenter(c.getCenterX(),c.getCenterY()-c.getHeight()/2-d.DEFAULT_EDGE_LENGTH-E.getHeight()/2):f==1?E.setCenter(c.getCenterX()+c.getWidth()/2+d.DEFAULT_EDGE_LENGTH+E.getWidth()/2,c.getCenterY()):f==2?E.setCenter(c.getCenterX(),c.getCenterY()+c.getHeight()/2+d.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(c.getCenterX()-c.getWidth()/2-d.DEFAULT_EDGE_LENGTH-E.getWidth()/2,c.getCenterY())},I.exports=y}),(function(I,L,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})])})})($)),$.exports}var dt=Z.exports,J;function vt(){return J||(J=1,(function(G,b){(function(I,L){G.exports=L(pt())})(dt,function(N){return(function(I){var L={};function o(e){if(L[e])return L[e].exports;var t=L[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=L,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,L){I.exports=N}),(function(I,L,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 T={};for(var y in D)T[y]=D[y];for(var y in u)T[y]=u[y];return T}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,T=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 E=0;E<c.length;E++){var A=c[E],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(){T.fit&&T.cy.fit(T.eles,T.padding),D||(D=!0,O.cy.one("layoutready",T.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();T.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={},T=0;T<D.length;T++)u[D[T].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,T){for(var y=u.length,O=0;O<y;O++){var s=u[O],f=s.children(),c,E=s.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(s.outerWidth()!=null&&s.outerHeight()!=null?c=D.add(new g(T.graphManager,new n(s.position("x")-E.w/2,s.position("y")-E.h/2),new d(parseFloat(E.w),parseFloat(E.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=T.getGraphManager().add(T.newGraph(),c),this.processChildrenList(R,f,T)}}},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})])})})(Z)),Z.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(L=>{["id","label","height","width","padding","x","y"].includes(L)||(I[L]=N[L])}),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(L=>{["id","start","end"].includes(L)||(I[L]=N[L])}),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 L={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(L).run(),I.ready(o=>{k.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),L={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(L[o]=N[o])}),L})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,L={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)||(L[o]=N[o])}),L})}V(ot,"extractPositionedEdges");async function st(G,b){k.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return k.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw k.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:L,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 T={...u};n[u.id]=T,g[u.id]=T,await N(r,u)}else{const T={...u};g[u.id]=T;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();T.width=O.width,T.height=O.height,T.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 T=g[u.id];return{...u,width:T.width,height:T.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const T=g[u.id];T?.domId&&(T.domId.attr("transform",`translate(${u.x}, ${u.y})`),T.x=u.x,T.y=u.y,t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const T=G.edges.find(y=>y.id===u.id);T&&(T.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 L(a,u);const T=g[u.start??""],y=g[u.end??""];if(T&&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,T,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:T.x||0,y:T.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Nt=Lt;export{Nt as render};
1
+ import{b as V,ay as k,aW as lt}from"./D2P0fD42.js";import{c as tt}from"./lAmQKSWr.js";import{g as gt}from"./BdWqymET.js";var Z={exports:{}},$={exports:{}},Q={exports:{}},ut=Q.exports,j;function ft(){return j||(j=1,(function(G,b){(function(I,L){G.exports=L()})(ut,function(){return(function(N){var I={};function L(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,L),e.l=!0,e.exports}return L.m=N,L.c=I,L.i=function(o){return o},L.d=function(o,e,t){L.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},L.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return L.d(e,"a",e),e},L.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},L.p="",L(L.s=26)})([(function(N,I,L){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,L){var o=L(2),e=L(8),t=L(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,L){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(13),i=L(0),l=L(16),g=L(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,L){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,L){var o=L(2),e=L(10),t=L(0),i=L(6),l=L(3),g=L(1),n=L(13),d=L(12),r=L(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 T=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:(T.source=v,T.target=D,T.isInterGraph=!1,this.getEdges().push(T),v.edges.push(T),D!=v&&D.edges.push(T),T)}},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,T=D.length,y=0;y<T;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,T,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?T=y[0].getParent().paddingLeft:T=this.margin,this.left=v-T,this.top=p-T,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,T=-e.MAX_VALUE,y,O,s,f,c,E=this.nodes,A=E.length,m=0;m<A;m++){var C=E[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),T<f&&(T=f)}var R=new n(v,u,D-v,T-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()),E[0].getParent().paddingLeft!=null?c=E[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,T=-e.MAX_VALUE,y,O,s,f,c=p.length,E=0;E<c;E++){var A=p[E];y=A.getLeft(),O=A.getRight(),s=A.getTop(),f=A.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),T<f&&(T=f)}var m=new n(v,u,D-v,T-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 T=v[u];p+=T.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],T,y,O=u.withChildren();for(O.forEach(function(m){v.push(m),D.add(m)});v.length!==0;){u=v.shift(),T=u.getEdges();for(var s=T.length,f=0;f<s;f++){var c=T[f];if(y=c.getOtherEndInGraph(u,this),y!=null&&!D.has(y)){var E=y.withChildren();E.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,L){var o,e=L(1);function t(i){o=L(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,L){var o=L(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,L){var o=L(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(),T=t.getWidthHalf(),y=t.getHeightHalf(),O=i.getX(),s=i.getY(),f=i.getRight(),c=i.getX(),E=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]=E,!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]=E,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]=E,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+T*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+-T*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=E,_=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,T=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,E=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,E=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*E-f*c)/A,T=(O*c-y*E)/A,new o(u,T))},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 T=((D-p)*(v-n)+(a-v)*(D-d))/u,y=((d-h)*(v-n)+(r-n)*(D-d))/u;return 0<T&&T<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,L){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,L){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,L){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?.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,L){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,L){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,L){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,L){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=L(0),t=L(6),i=L(3),l=L(1),g=L(5),n=L(4),d=L(17),r=L(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 T=a;if(T.vGraphObject!=null){var y=T.vGraphObject;y.update(T)}}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,T=0;T<D.length;T++)u=D[T],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 T=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),T.add(f);for(var c=f.getEdges(),u=0;u<c.length;u++){var E=c[u].getOtherEnd(f);if(O.get(f)!=E)if(!T.has(E))y.push(E),O.set(E,f);else{p=!1;break}}}if(!p)a=[];else{var A=[].concat(o(T));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)}T=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 T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),D.add(T);var y=this.newEdge(null);this.graphManager.add(y,v,T),p.add(T),v=T}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 T=D[u],y=new n(T.getCenterX(),T.getCenterY()),O=v.bendpoints.get(u);O.x=y.x,O.y=y.y,T.getOwner().remove(T)}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 T=p/v;u-=(p-T)/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,T=null;(p.length==1||p.length==2)&&(u=!0,T=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],E=p.indexOf(O);E>=0&&p.splice(E,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,T=p[0])}return T},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,L){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,L){var o=L(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,L){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=L(15),t=L(7),i=L(0),l=L(8),g=L(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(),T=0;T<u.length;T++)r=u[T],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(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,a=0;a<u.length;a++)v=u[a],this.calculateRepulsionForceOfANode(v,T,r,h),T.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,T;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),T=D*(r.lengthY/v),a.springForceX+=u,a.springForceY+=T,p.springForceX-=u,p.springForceY-=T)},n.prototype.calcRepulsionForce=function(r,h){var a=r.getRect(),p=h.getRect(),v=new Array(2),D=new Array(4),u,T,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 E=r.noOfChildren*h.noOfChildren/(r.noOfChildren+h.noOfChildren);r.repulsionForceX-=E*f,r.repulsionForceY-=E*c,h.repulsionForceX+=E*f,h.repulsionForceY+=E*c}else this.uniformLeafNodeSizes&&r.getChild()==null&&h.getChild()==null?(u=p.getCenterX()-a.getCenterX(),T=p.getCenterY()-a.getCenterY()):(l.getIntersection(a,p,D),u=D[2]-D[0],T=D[3]-D[1]),Math.abs(u)<t.MIN_REPULSION_DIST&&(u=g.sign(u)*t.MIN_REPULSION_DIST),Math.abs(T)<t.MIN_REPULSION_DIST&&(T=g.sign(T)*t.MIN_REPULSION_DIST),y=u*u+T*T,O=Math.sqrt(y),s=this.repulsionConstant*r.noOfChildren*h.noOfChildren/y,f=s*u/O,c=s*T/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,T,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,T=Math.abs(D)+r.getHeight()/2,r.getOwner()==this.graphManager.getRoot()?(y=h.getEstimatedSize()*this.gravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||T>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 T=p;T<=v;T++)for(var y=D;y<=u;y++)this.grid[T][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,T=r.startX-1;T<r.finishX+2;T++)for(var y=r.startY-1;y<r.finishY+2;y++)if(!(T<0||y<0||T>=u.length||y>=u[0].length)){for(var O=0;O<u[T][y].length;O++)if(D=u[T][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(T=0;T<r.surrounding.length;T++)this.calcRepulsionForce(r,r.surrounding[T])},n.prototype.calcRepulsionRange=function(){return 0},N.exports=n}),(function(N,I,L){var o=L(1),e=L(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,L){var o=L(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,L){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,L){var o=L(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,L){var o=L(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,L){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=L(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,L){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,L){var o=function(){};o.FDLayout=L(18),o.FDLayoutConstants=L(7),o.FDLayoutEdge=L(19),o.FDLayoutNode=L(20),o.DimensionD=L(21),o.HashMap=L(22),o.HashSet=L(23),o.IGeometry=L(8),o.IMath=L(9),o.Integer=L(10),o.Point=L(12),o.PointD=L(4),o.RandomSeed=L(16),o.RectangleD=L(13),o.Transform=L(17),o.UniqueIDGeneretor=L(14),o.Quicksort=L(24),o.LinkedList=L(11),o.LGraphObject=L(2),o.LGraph=L(5),o.LEdge=L(1),o.LGraphManager=L(6),o.LNode=L(3),o.Layout=L(15),o.LayoutConstants=L(0),o.NeedlemanWunsch=L(25),N.exports=o}),(function(N,I,L){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=$.exports,z;function pt(){return z||(z=1,(function(G,b){(function(I,L){G.exports=L(ft())})(ct,function(N){return(function(I){var L={};function o(e){if(L[e])return L[e].exports;var t=L[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=L,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,L){I.exports=N}),(function(I,L,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,L,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,L,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,L,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,L,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,L,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,T=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(E){return f.has(E)});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,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),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 E=s[c].rect,A=s[c].id;f[A]={id:A,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.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(),E=c.length,A;for(A=0;A<E;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 E=s[c];if(!f.has(E)){var A=E.getSource(),m=E.getTarget();if(A==m)E.getBendpoints().push(new a),E.getBendpoints().push(new a),this.createDummyNodesForBendpoints(E),f.add(E);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)),E=0,A=0,m=0,C=new a(0,0),R=0;R<s.length;R++){R%c==0&&(m=0,A=E,R!=0&&(A+=n.DEFAULT_COMPONENT_SEPERATION),E=0);var M=s[R],S=p.findCenterOfTree(M);f.x=m,f.y=A,C=y.radialLayout(M,S,f),C.y>E&&(E=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 E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,E);var A=u.calculateBounds(s),m=new T;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,E,A,m){var C=(E-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(E-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 E=s[c],A=E.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=[],E=this.graphManager.getAllNodes(),A=0;A<E.length;A++){var m=E[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 E=s.idToDummyNode[c];f[c]=s.tileNodes(s.memberGroups[c],E.paddingLeft+E.paddingRight),E.rect.width=f[c].width,E.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,E=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,E,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var E=s.idToDummyNode[c],A=E.paddingLeft,m=E.paddingTop;s.adjustLocations(f[c],E.rect.x,E.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 E=c.getNodes(),A=0;A<E.length;A++){var m=E[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,E=0;E<f.length;E++){var A=f[E];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(),E=0;E<c.length;E++){var A=c[E];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,E,A){f+=E,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(E){var A=f[E];c.tiledMemberPack[E]=c.tileNodes(s[E],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[E].width,A.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:E};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,E){var A=E;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,E=0;E<s.rows.length;E++)s.rowWidth[E]<c&&(f=E,c=s.rowWidth[E]);return f},y.prototype.getLongestRowIndex=function(s){for(var f=-1,c=Number.MIN_VALUE,E=0;E<s.rows.length;E++)s.rowWidth[E]>c&&(f=E,c=s.rowWidth[E]);return f},y.prototype.canAddHorizontal=function(s,f,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var A=s.rowWidth[E];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[E]<c&&E>0&&(m=c+s.verticalPadding-s.rowHeight[E]);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,E=s.rows[f],A=E[E.length-1],m=A.width+s.horizontalPadding;if(s.width-s.rowWidth[c]>m&&f!=c){E.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<E.length;R++)E[R].height>C&&(C=E[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 E=this.graphManager.getAllNodes(),A=[];f=!1;for(var m=0;m<E.length;m++)c=E[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],E,A=0;A<c.length;A++)E=c[A],this.findPlaceforPrunedNode(E),E[2].add(E[0]),E[2].add(E[1],E[1].source,E[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},y.prototype.findPlaceforPrunedNode=function(s){var f,c,E=s[0];E==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?E.setCenter(c.getCenterX(),c.getCenterY()-c.getHeight()/2-d.DEFAULT_EDGE_LENGTH-E.getHeight()/2):f==1?E.setCenter(c.getCenterX()+c.getWidth()/2+d.DEFAULT_EDGE_LENGTH+E.getWidth()/2,c.getCenterY()):f==2?E.setCenter(c.getCenterX(),c.getCenterY()+c.getHeight()/2+d.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(c.getCenterX()-c.getWidth()/2-d.DEFAULT_EDGE_LENGTH-E.getWidth()/2,c.getCenterY())},I.exports=y}),(function(I,L,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})])})})($)),$.exports}var dt=Z.exports,J;function vt(){return J||(J=1,(function(G,b){(function(I,L){G.exports=L(pt())})(dt,function(N){return(function(I){var L={};function o(e){if(L[e])return L[e].exports;var t=L[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=L,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,L){I.exports=N}),(function(I,L,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 T={};for(var y in D)T[y]=D[y];for(var y in u)T[y]=u[y];return T}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,T=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 E=0;E<c.length;E++){var A=c[E],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(){T.fit&&T.cy.fit(T.eles,T.padding),D||(D=!0,O.cy.one("layoutready",T.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();T.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={},T=0;T<D.length;T++)u[D[T].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,T){for(var y=u.length,O=0;O<y;O++){var s=u[O],f=s.children(),c,E=s.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(s.outerWidth()!=null&&s.outerHeight()!=null?c=D.add(new g(T.graphManager,new n(s.position("x")-E.w/2,s.position("y")-E.h/2),new d(parseFloat(E.w),parseFloat(E.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=T.getGraphManager().add(T.newGraph(),c),this.processChildrenList(R,f,T)}}},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})])})})(Z)),Z.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(L=>{["id","label","height","width","padding","x","y"].includes(L)||(I[L]=N[L])}),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(L=>{["id","start","end"].includes(L)||(I[L]=N[L])}),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 L={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(L).run(),I.ready(o=>{k.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),L={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(L[o]=N[o])}),L})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,L={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)||(L[o]=N[o])}),L})}V(ot,"extractPositionedEdges");async function st(G,b){k.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return k.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw k.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:L,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 T={...u};n[u.id]=T,g[u.id]=T,await N(r,u)}else{const T={...u};g[u.id]=T;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();T.width=O.width,T.height=O.height,T.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 T=g[u.id];return{...u,width:T.width,height:T.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const T=g[u.id];T?.domId&&(T.domId.attr("transform",`translate(${u.x}, ${u.y})`),T.x=u.x,T.y=u.y,t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const T=G.edges.find(y=>y.id===u.id);T&&(T.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 L(a,u);const T=g[u.start??""],y=g[u.end??""];if(T&&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,T,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:T.x||0,y:T.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Nt=Lt;export{Nt as render};
@@ -1,2 +1,2 @@
1
- import{IH as l,rv as u,Ik as v}from"./DZwGQbE8.js";import{a6 as b,bx as S}from"./BqrO7ljl.js";import{bv as m}from"./D4U_w4GT.js";import{bQ as M,bM as P}from"./Djn-kDZ4.js";import{bm as s}from"./BkULGdgB.js";import{t as E}from"./B7H9m8-p.js";const B=l.createSelector(t=>t.backgroundAgentSettings.defaultModel),D=l.createSelector(t=>t.backgroundAgentSettings.typeOverrides),O=l.createSelector(t=>t.backgroundAgentSettings.defaultReasoningEffort),H=l.createSelector(t=>t.backgroundAgentSettings.typeReasoningEffortOverrides),j=l.createSelector(t=>t.backgroundAgentSettings),A=l.createSelector(t=>{const a=new Map,o=(e,i)=>{const n=a.get(e)??new Set;n.add(i),a.set(e,n)},_=m.select(t),d=b.select(t),g=S.select(t)[d];g&&d&&o(d,s.settings_providers_inUseDefaultModel_label({model:g})),u(d)&&!g&&o(d,s.settings_providers_inUseDefaultProvider_label());const p=t.backgroundAgentSettings?.providerId;p&&u(p)&&o(p,s.settings_providers_inUseQuickActions_label());for(const e of M.select(t)){const i=P.select(t,e.id),n=e.source?{project:s.settings_providers_pinSourceProject_label(),user:s.settings_providers_pinSourceUser_label(),bundled:s.settings_providers_pinSourceBundled_label(),builtin:s.settings_providers_pinSourceBuiltin_label(),"electron-store":s.settings_providers_pinSourceLegacy_label()}[e.source]:void 0,c=r=>n&&i?s.settings_providers_inUseSourcePath_label({reason:r,source:n,path:i}):n?s.settings_providers_inUseSource_label({reason:r,source:n}):i?s.settings_providers_inUsePath_label({reason:r,path:i}):r;if(e.codingAgent&&o(e.codingAgent,c(s.settings_providers_inUseSpecialistAgent_label({name:e.name}))),e.modelOptions?.forEach((r,f)=>{r.provider&&u(r.provider)&&o(r.provider,c(s.settings_providers_inUseSpecialistModelOption_label({name:e.name,position:E(f+1)})))}),e.defaultModel)if(e.defaultModel.includes(":")){const r=v(e.defaultModel).providerId??_;o(r,c(s.settings_providers_inUseSpecialistModel_label({name:e.name,model:e.defaultModel})))}else e.codingAgent||o(_,c(s.settings_providers_inUseSpecialistModel_label({name:e.name,model:e.defaultModel})))}return Object.fromEntries([...a].map(([e,i])=>[e,[...i].join(`
1
+ import{IH as l,rv as u,Ik as v}from"./DZwGQbE8.js";import{a6 as b,bx as S}from"./BqrO7ljl.js";import{bv as m}from"./D4U_w4GT.js";import{bQ as M,bM as P}from"./DnD4hxy7.js";import{bm as s}from"./BkULGdgB.js";import{t as E}from"./B7H9m8-p.js";const B=l.createSelector(t=>t.backgroundAgentSettings.defaultModel),D=l.createSelector(t=>t.backgroundAgentSettings.typeOverrides),O=l.createSelector(t=>t.backgroundAgentSettings.defaultReasoningEffort),H=l.createSelector(t=>t.backgroundAgentSettings.typeReasoningEffortOverrides),j=l.createSelector(t=>t.backgroundAgentSettings),A=l.createSelector(t=>{const a=new Map,o=(e,i)=>{const n=a.get(e)??new Set;n.add(i),a.set(e,n)},_=m.select(t),d=b.select(t),g=S.select(t)[d];g&&d&&o(d,s.settings_providers_inUseDefaultModel_label({model:g})),u(d)&&!g&&o(d,s.settings_providers_inUseDefaultProvider_label());const p=t.backgroundAgentSettings?.providerId;p&&u(p)&&o(p,s.settings_providers_inUseQuickActions_label());for(const e of M.select(t)){const i=P.select(t,e.id),n=e.source?{project:s.settings_providers_pinSourceProject_label(),user:s.settings_providers_pinSourceUser_label(),bundled:s.settings_providers_pinSourceBundled_label(),builtin:s.settings_providers_pinSourceBuiltin_label(),"electron-store":s.settings_providers_pinSourceLegacy_label()}[e.source]:void 0,c=r=>n&&i?s.settings_providers_inUseSourcePath_label({reason:r,source:n,path:i}):n?s.settings_providers_inUseSource_label({reason:r,source:n}):i?s.settings_providers_inUsePath_label({reason:r,path:i}):r;if(e.codingAgent&&o(e.codingAgent,c(s.settings_providers_inUseSpecialistAgent_label({name:e.name}))),e.modelOptions?.forEach((r,f)=>{r.provider&&u(r.provider)&&o(r.provider,c(s.settings_providers_inUseSpecialistModelOption_label({name:e.name,position:E(f+1)})))}),e.defaultModel)if(e.defaultModel.includes(":")){const r=v(e.defaultModel).providerId??_;o(r,c(s.settings_providers_inUseSpecialistModel_label({name:e.name,model:e.defaultModel})))}else e.codingAgent||o(_,c(s.settings_providers_inUseSpecialistModel_label({name:e.name,model:e.defaultModel})))}return Object.fromEntries([...a].map(([e,i])=>[e,[...i].join(`
2
2
  `)]))});l.createSelector((t,a)=>A.select(t)[a]??null);const I=[{id:"dracula",label:"Dracula"},{id:"nord",label:"Nord"},{id:"rose-pine",label:"Rosé Pine"},{id:"tokyo-night",label:"Tokyo Night"},{id:"solarized",label:"Solarized"},{id:"github",label:"GitHub"},{id:"high-contrast",label:"High Contrast"}],w=I.map(({id:t})=>t);export{w as T,I as a,O as b,j as c,D as d,H as e,A as f,B as s};
@@ -1 +1 @@
1
- import{ac as En,w as Bn,aS as Wn,F as Xn}from"./CSa-Sqaw.js";function Mn(n,e){return n==null||e==null?NaN:n<e?-1:n>e?1:n>=e?0:NaN}function _e(n,e){return n==null||e==null?NaN:e<n?-1:e>n?1:e>=n?0:NaN}function Pn(n){let e,r,t;n.length!==2?(e=Mn,r=(a,f)=>Mn(n(a),f),t=(a,f)=>n(a)-f):(e=n===Mn||n===_e?n:Qe,r=n,t=n);function u(a,f,c=0,h=a.length){if(c<h){if(e(f,f)!==0)return h;do{const g=c+h>>>1;r(a[g],f)<0?c=g+1:h=g}while(c<h)}return c}function o(a,f,c=0,h=a.length){if(c<h){if(e(f,f)!==0)return h;do{const g=c+h>>>1;r(a[g],f)<=0?c=g+1:h=g}while(c<h)}return c}function i(a,f,c=0,h=a.length){const g=u(a,f,c,h-1);return g>c&&t(a[g-1],f)>-t(a[g],f)?g-1:g}return{left:u,center:i,right:o}}function Qe(){return 0}function Ve(n){return n===null?NaN:+n}const Ee=Pn(Mn),Be=Ee.right;Pn(Ve).center;class Gn extends Map{constructor(e,r=Je){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(const[t,u]of e)this.set(t,u)}get(e){return super.get(Jn(this,e))}has(e){return super.has(Jn(this,e))}set(e,r){return super.set(Xe(this,e),r)}delete(e){return super.delete(Ge(this,e))}}function Jn({_intern:n,_key:e},r){const t=e(r);return n.has(t)?n.get(t):r}function Xe({_intern:n,_key:e},r){const t=e(r);return n.has(t)?n.get(t):(n.set(t,r),r)}function Ge({_intern:n,_key:e},r){const t=e(r);return n.has(t)&&(r=n.get(t),n.delete(t)),r}function Je(n){return n!==null&&typeof n=="object"?n.valueOf():n}const Ke=Math.sqrt(50),nr=Math.sqrt(10),er=Math.sqrt(2);function dn(n,e,r){const t=(e-n)/Math.max(0,r),u=Math.floor(Math.log10(t)),o=t/Math.pow(10,u),i=o>=Ke?10:o>=nr?5:o>=er?2:1;let a,f,c;return u<0?(c=Math.pow(10,-u)/i,a=Math.round(n*c),f=Math.round(e*c),a/c<n&&++a,f/c>e&&--f,c=-c):(c=Math.pow(10,u)*i,a=Math.round(n/c),f=Math.round(e/c),a*c<n&&++a,f*c>e&&--f),f<a&&.5<=r&&r<2?dn(n,e,r*2):[a,f,c]}function rr(n,e,r){if(e=+e,n=+n,r=+r,!(r>0))return[];if(n===e)return[n];const t=e<n,[u,o,i]=t?dn(e,n,r):dn(n,e,r);if(!(o>=u))return[];const a=o-u+1,f=new Array(a);if(t)if(i<0)for(let c=0;c<a;++c)f[c]=(o-c)/-i;else for(let c=0;c<a;++c)f[c]=(o-c)*i;else if(i<0)for(let c=0;c<a;++c)f[c]=(u+c)/-i;else for(let c=0;c<a;++c)f[c]=(u+c)*i;return f}function Ln(n,e,r){return e=+e,n=+n,r=+r,dn(n,e,r)[2]}function In(n,e,r){e=+e,n=+n,r=+r;const t=e<n,u=t?Ln(e,n,r):Ln(n,e,r);return(t?-1:1)*(u<0?1/-u:u)}function lu(n,e){let r;if(e===void 0)for(const t of n)t!=null&&(r<t||r===void 0&&t>=t)&&(r=t);else{let t=-1;for(let u of n)(u=e(u,++t,n))!=null&&(r<u||r===void 0&&u>=u)&&(r=u)}return r}function gu(n,e){let r;if(e===void 0)for(const t of n)t!=null&&(r>t||r===void 0&&t>=t)&&(r=t);else{let t=-1;for(let u of n)(u=e(u,++t,n))!=null&&(r>u||r===void 0&&u>=u)&&(r=u)}return r}function tr(n,e,r){n=+n,e=+e,r=(u=arguments.length)<2?(e=n,n=0,1):u<3?1:+r;for(var t=-1,u=Math.max(0,Math.ceil((e-n)/r))|0,o=new Array(u);++t<u;)o[t]=n+t*r;return o}function ur(n,e,r,t,u){var o=n*n,i=o*n;return((1-3*n+3*o-i)*e+(4-6*o+3*i)*r+(1+3*n+3*o-3*i)*t+i*u)/6}function or(n){var e=n.length-1;return function(r){var t=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),u=n[t],o=n[t+1],i=t>0?n[t-1]:2*u-o,a=t<e-1?n[t+2]:2*o-u;return ur((r-t/e)*e,i,u,o,a)}}var xn=n=>()=>n;function pe(n,e){return function(r){return n+r*e}}function ir(n,e,r){return n=Math.pow(n,r),e=Math.pow(e,r)-n,r=1/r,function(t){return Math.pow(n+t*e,r)}}function we(n,e){var r=e-n;return r?pe(n,r>180||r<-180?r-360*Math.round(r/360):r):xn(isNaN(n)?e:n)}function ar(n){return(n=+n)==1?Z:function(e,r){return r-e?ir(e,r,n):xn(isNaN(e)?r:e)}}function Z(n,e){var r=e-n;return r?pe(n,r):xn(isNaN(n)?e:n)}var Kn=(function n(e){var r=ar(e);function t(u,o){var i=r((u=Wn(u)).r,(o=Wn(o)).r),a=r(u.g,o.g),f=r(u.b,o.b),c=Z(u.opacity,o.opacity);return function(h){return u.r=i(h),u.g=a(h),u.b=f(h),u.opacity=c(h),u+""}}return t.gamma=n,t})(1);function cr(n){return function(e){var r=e.length,t=new Array(r),u=new Array(r),o=new Array(r),i,a;for(i=0;i<r;++i)a=Wn(e[i]),t[i]=a.r||0,u[i]=a.g||0,o[i]=a.b||0;return t=n(t),u=n(u),o=n(o),a.opacity=1,function(f){return a.r=t(f),a.g=u(f),a.b=o(f),a+""}}}var hu=cr(or);function fr(n,e){e||(e=[]);var r=n?Math.min(e.length,n.length):0,t=e.slice(),u;return function(o){for(u=0;u<r;++u)t[u]=n[u]*(1-o)+e[u]*o;return t}}function sr(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function lr(n,e){var r=e?e.length:0,t=n?Math.min(r,n.length):0,u=new Array(t),o=new Array(r),i;for(i=0;i<t;++i)u[i]=Rn(n[i],e[i]);for(;i<r;++i)o[i]=e[i];return function(a){for(i=0;i<t;++i)o[i]=u[i](a);return o}}function gr(n,e){var r=new Date;return n=+n,e=+e,function(t){return r.setTime(n*(1-t)+e*t),r}}function Tn(n,e){return n=+n,e=+e,function(r){return n*(1-r)+e*r}}function hr(n,e){var r={},t={},u;(n===null||typeof n!="object")&&(n={}),(e===null||typeof e!="object")&&(e={});for(u in e)u in n?r[u]=Rn(n[u],e[u]):t[u]=e[u];return function(o){for(u in r)t[u]=r[u](o);return t}}var On=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Fn=new RegExp(On.source,"g");function mr(n){return function(){return n}}function yr(n){return function(e){return n(e)+""}}function Mr(n,e){var r=On.lastIndex=Fn.lastIndex=0,t,u,o,i=-1,a=[],f=[];for(n=n+"",e=e+"";(t=On.exec(n))&&(u=Fn.exec(e));)(o=u.index)>r&&(o=e.slice(r,o),a[i]?a[i]+=o:a[++i]=o),(t=t[0])===(u=u[0])?a[i]?a[i]+=u:a[++i]=u:(a[++i]=null,f.push({i,x:Tn(t,u)})),r=Fn.lastIndex;return r<e.length&&(o=e.slice(r),a[i]?a[i]+=o:a[++i]=o),a.length<2?f[0]?yr(f[0].x):mr(e):(e=f.length,function(c){for(var h=0,g;h<e;++h)a[(g=f[h]).i]=g.x(c);return a.join("")})}function Rn(n,e){var r=typeof e,t;return e==null||r==="boolean"?xn(e):(r==="number"?Tn:r==="string"?(t=Bn(e))?(e=t,Kn):Mr:e instanceof Bn?Kn:e instanceof Date?gr:sr(e)?fr:Array.isArray(e)?lr:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?hr:Tn)(n,e)}function dr(n,e){return n=+n,e=+e,function(r){return Math.round(n*(1-r)+e*r)}}var Tr=1e-12;function ne(n){return((n=Math.exp(n))+1/n)/2}function pr(n){return((n=Math.exp(n))-1/n)/2}function wr(n){return((n=Math.exp(2*n))-1)/(n+1)}(function n(e,r,t){function u(o,i){var a=o[0],f=o[1],c=o[2],h=i[0],g=i[1],l=i[2],w=h-a,v=g-f,U=w*w+v*v,S,Y;if(U<Tr)Y=Math.log(l/c)/e,S=function(D){return[a+D*w,f+D*v,c*Math.exp(e*D*Y)]};else{var O=Math.sqrt(U),N=(l*l-c*c+t*U)/(2*c*r*O),x=(l*l-c*c-t*U)/(2*l*r*O),L=Math.log(Math.sqrt(N*N+1)-N),y=Math.log(Math.sqrt(x*x+1)-x);Y=(y-L)/e,S=function(D){var P=D*Y,V=ne(L),J=c/(r*O)*(V*wr(e*P+L)-pr(L));return[a+J*w,f+J*v,c*V/ne(e*P+L)]}}return S.duration=Math.abs(Y)*1e3*e/Math.SQRT2,S}return u.rho=function(o){var i=Math.max(.001,+o),a=i*i,f=a*a;return n(i,a,f)},u})(Math.SQRT2,2,4);function vr(n){return function(e,r){var t=n((e=En(e)).h,(r=En(r)).h),u=Z(e.c,r.c),o=Z(e.l,r.l),i=Z(e.opacity,r.opacity);return function(a){return e.h=t(a),e.c=u(a),e.l=o(a),e.opacity=i(a),e+""}}}var mu=vr(we);function ve(n){return(function e(r){r=+r;function t(u,o){var i=n((u=Xn(u)).h,(o=Xn(o)).h),a=Z(u.s,o.s),f=Z(u.l,o.l),c=Z(u.opacity,o.opacity);return function(h){return u.h=i(h),u.s=a(h),u.l=f(Math.pow(h,r)),u.opacity=c(h),u+""}}return t.gamma=e,t})(1)}ve(we);var yu=ve(Z);function Cr(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function pn(n,e){if(!isFinite(n)||n===0)return null;var r=(n=e?n.toExponential(e-1):n.toExponential()).indexOf("e"),t=n.slice(0,r);return[t.length>1?t[0]+t.slice(2):t,+n.slice(r+1)]}function on(n){return n=pn(Math.abs(n)),n?n[1]:NaN}function Ur(n,e){return function(r,t){for(var u=r.length,o=[],i=0,a=n[0],f=0;u>0&&a>0&&(f+a+1>t&&(a=Math.max(1,t-f)),o.push(r.substring(u-=a,u+a)),!((f+=a+1)>t));)a=n[i=(i+1)%n.length];return o.reverse().join(e)}}function Dr(n){return function(e){return e.replace(/[0-9]/g,function(r){return n[+r]})}}var xr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function wn(n){if(!(e=xr.exec(n)))throw new Error("invalid format: "+n);var e;return new zn({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}wn.prototype=zn.prototype;function zn(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}zn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Sr(n){n:for(var e=n.length,r=1,t=-1,u;r<e;++r)switch(n[r]){case".":t=u=r;break;case"0":t===0&&(t=r),u=r;break;default:if(!+n[r])break n;t>0&&(t=0);break}return t>0?n.slice(0,t)+n.slice(u+1):n}var vn;function kr(n,e){var r=pn(n,e);if(!r)return vn=void 0,n.toPrecision(e);var t=r[0],u=r[1],o=u-(vn=Math.max(-8,Math.min(8,Math.floor(u/3)))*3)+1,i=t.length;return o===i?t:o>i?t+new Array(o-i+1).join("0"):o>0?t.slice(0,o)+"."+t.slice(o):"0."+new Array(1-o).join("0")+pn(n,Math.max(0,e+o-1))[0]}function ee(n,e){var r=pn(n,e);if(!r)return n+"";var t=r[0],u=r[1];return u<0?"0."+new Array(-u).join("0")+t:t.length>u+1?t.slice(0,u+1)+"."+t.slice(u+1):t+new Array(u-t.length+2).join("0")}var re={"%":(n,e)=>(n*100).toFixed(e),b:n=>Math.round(n).toString(2),c:n=>n+"",d:Cr,e:(n,e)=>n.toExponential(e),f:(n,e)=>n.toFixed(e),g:(n,e)=>n.toPrecision(e),o:n=>Math.round(n).toString(8),p:(n,e)=>ee(n*100,e),r:ee,s:kr,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function te(n){return n}var ue=Array.prototype.map,oe=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Fr(n){var e=n.grouping===void 0||n.thousands===void 0?te:Ur(ue.call(n.grouping,Number),n.thousands+""),r=n.currency===void 0?"":n.currency[0]+"",t=n.currency===void 0?"":n.currency[1]+"",u=n.decimal===void 0?".":n.decimal+"",o=n.numerals===void 0?te:Dr(ue.call(n.numerals,String)),i=n.percent===void 0?"%":n.percent+"",a=n.minus===void 0?"−":n.minus+"",f=n.nan===void 0?"NaN":n.nan+"";function c(g,l){g=wn(g);var w=g.fill,v=g.align,U=g.sign,S=g.symbol,Y=g.zero,O=g.width,N=g.comma,x=g.precision,L=g.trim,y=g.type;y==="n"?(N=!0,y="g"):re[y]||(x===void 0&&(x=12),L=!0,y="g"),(Y||w==="0"&&v==="=")&&(Y=!0,w="0",v="=");var D=(l&&l.prefix!==void 0?l.prefix:"")+(S==="$"?r:S==="#"&&/[boxX]/.test(y)?"0"+y.toLowerCase():""),P=(S==="$"?t:/[%p]/.test(y)?i:"")+(l&&l.suffix!==void 0?l.suffix:""),V=re[y],J=/[defgprs%]/.test(y);x=x===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function hn(d){var R=D,b=P,Q,mn,K;if(y==="c")b=V(d)+b,d="";else{d=+d;var nn=d<0||1/d<0;if(d=isNaN(d)?f:V(Math.abs(d),x),L&&(d=Sr(d)),nn&&+d==0&&U!=="+"&&(nn=!1),R=(nn?U==="("?U:a:U==="-"||U==="("?"":U)+R,b=(y==="s"&&!isNaN(d)&&vn!==void 0?oe[8+vn/3]:"")+b+(nn&&U==="("?")":""),J){for(Q=-1,mn=d.length;++Q<mn;)if(K=d.charCodeAt(Q),48>K||K>57){b=(K===46?u+d.slice(Q+1):d.slice(Q))+b,d=d.slice(0,Q);break}}}N&&!Y&&(d=e(d,1/0));var en=R.length+d.length+b.length,$=en<O?new Array(O-en+1).join(w):"";switch(N&&Y&&(d=e($+d,$.length?O-b.length:1/0),$=""),v){case"<":d=R+d+b+$;break;case"=":d=R+$+d+b;break;case"^":d=$.slice(0,en=$.length>>1)+R+d+b+$.slice(en);break;default:d=$+R+d+b;break}return o(d)}return hn.toString=function(){return g+""},hn}function h(g,l){var w=Math.max(-8,Math.min(8,Math.floor(on(l)/3)))*3,v=Math.pow(10,-w),U=c((g=wn(g),g.type="f",g),{suffix:oe[8+w/3]});return function(S){return U(v*S)}}return{format:c,formatPrefix:h}}var yn,Ce,Ue;Nr({thousands:",",grouping:[3],currency:["$",""]});function Nr(n){return yn=Fr(n),Ce=yn.format,Ue=yn.formatPrefix,yn}function Yr(n){return Math.max(0,-on(Math.abs(n)))}function br(n,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(on(e)/3)))*3-on(Math.abs(n)))}function Ar(n,e){return n=Math.abs(n),e=Math.abs(e)-n,Math.max(0,on(e)-on(n))+1}const Nn=new Date,Yn=new Date;function k(n,e,r,t){function u(o){return n(o=arguments.length===0?new Date:new Date(+o)),o}return u.floor=o=>(n(o=new Date(+o)),o),u.ceil=o=>(n(o=new Date(o-1)),e(o,1),n(o),o),u.round=o=>{const i=u(o),a=u.ceil(o);return o-i<a-o?i:a},u.offset=(o,i)=>(e(o=new Date(+o),i==null?1:Math.floor(i)),o),u.range=(o,i,a)=>{const f=[];if(o=u.ceil(o),a=a==null?1:Math.floor(a),!(o<i)||!(a>0))return f;let c;do f.push(c=new Date(+o)),e(o,a),n(o);while(c<o&&o<i);return f},u.filter=o=>k(i=>{if(i>=i)for(;n(i),!o(i);)i.setTime(i-1)},(i,a)=>{if(i>=i)if(a<0)for(;++a<=0;)for(;e(i,-1),!o(i););else for(;--a>=0;)for(;e(i,1),!o(i););}),r&&(u.count=(o,i)=>(Nn.setTime(+o),Yn.setTime(+i),n(Nn),n(Yn),Math.floor(r(Nn,Yn))),u.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?u.filter(t?i=>t(i)%o===0:i=>u.count(0,i)%o===0):u)),u}const Cn=k(()=>{},(n,e)=>{n.setTime(+n+e)},(n,e)=>e-n);Cn.every=n=>(n=Math.floor(n),!isFinite(n)||!(n>0)?null:n>1?k(e=>{e.setTime(Math.floor(e/n)*n)},(e,r)=>{e.setTime(+e+r*n)},(e,r)=>(r-e)/n):Cn);Cn.range;const z=1e3,I=z*60,j=I*60,q=j*24,jn=q*7,ie=q*30,bn=q*365,tn=k(n=>{n.setTime(n-n.getMilliseconds())},(n,e)=>{n.setTime(+n+e*z)},(n,e)=>(e-n)/z,n=>n.getUTCSeconds());tn.range;const Zn=k(n=>{n.setTime(n-n.getMilliseconds()-n.getSeconds()*z)},(n,e)=>{n.setTime(+n+e*I)},(n,e)=>(e-n)/I,n=>n.getMinutes());Zn.range;const Hr=k(n=>{n.setUTCSeconds(0,0)},(n,e)=>{n.setTime(+n+e*I)},(n,e)=>(e-n)/I,n=>n.getUTCMinutes());Hr.range;const qn=k(n=>{n.setTime(n-n.getMilliseconds()-n.getSeconds()*z-n.getMinutes()*I)},(n,e)=>{n.setTime(+n+e*j)},(n,e)=>(e-n)/j,n=>n.getHours());qn.range;const Wr=k(n=>{n.setUTCMinutes(0,0,0)},(n,e)=>{n.setTime(+n+e*j)},(n,e)=>(e-n)/j,n=>n.getUTCHours());Wr.range;const gn=k(n=>n.setHours(0,0,0,0),(n,e)=>n.setDate(n.getDate()+e),(n,e)=>(e-n-(e.getTimezoneOffset()-n.getTimezoneOffset())*I)/q,n=>n.getDate()-1);gn.range;const _n=k(n=>{n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCDate(n.getUTCDate()+e)},(n,e)=>(e-n)/q,n=>n.getUTCDate()-1);_n.range;const Lr=k(n=>{n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCDate(n.getUTCDate()+e)},(n,e)=>(e-n)/q,n=>Math.floor(n/q));Lr.range;function X(n){return k(e=>{e.setDate(e.getDate()-(e.getDay()+7-n)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*I)/jn)}const Sn=X(0),Un=X(1),Ir=X(2),Or=X(3),an=X(4),$r=X(5),Pr=X(6);Sn.range;Un.range;Ir.range;Or.range;an.range;$r.range;Pr.range;function G(n){return k(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-n)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/jn)}const De=G(0),Dn=G(1),Rr=G(2),zr=G(3),cn=G(4),jr=G(5),Zr=G(6);De.range;Dn.range;Rr.range;zr.range;cn.range;jr.range;Zr.range;const Qn=k(n=>{n.setDate(1),n.setHours(0,0,0,0)},(n,e)=>{n.setMonth(n.getMonth()+e)},(n,e)=>e.getMonth()-n.getMonth()+(e.getFullYear()-n.getFullYear())*12,n=>n.getMonth());Qn.range;const qr=k(n=>{n.setUTCDate(1),n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCMonth(n.getUTCMonth()+e)},(n,e)=>e.getUTCMonth()-n.getUTCMonth()+(e.getUTCFullYear()-n.getUTCFullYear())*12,n=>n.getUTCMonth());qr.range;const _=k(n=>{n.setMonth(0,1),n.setHours(0,0,0,0)},(n,e)=>{n.setFullYear(n.getFullYear()+e)},(n,e)=>e.getFullYear()-n.getFullYear(),n=>n.getFullYear());_.every=n=>!isFinite(n=Math.floor(n))||!(n>0)?null:k(e=>{e.setFullYear(Math.floor(e.getFullYear()/n)*n),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*n)});_.range;const B=k(n=>{n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCFullYear(n.getUTCFullYear()+e)},(n,e)=>e.getUTCFullYear()-n.getUTCFullYear(),n=>n.getUTCFullYear());B.every=n=>!isFinite(n=Math.floor(n))||!(n>0)?null:k(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/n)*n),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*n)});B.range;function _r(n,e,r,t,u,o){const i=[[tn,1,z],[tn,5,5*z],[tn,15,15*z],[tn,30,30*z],[o,1,I],[o,5,5*I],[o,15,15*I],[o,30,30*I],[u,1,j],[u,3,3*j],[u,6,6*j],[u,12,12*j],[t,1,q],[t,2,2*q],[r,1,jn],[e,1,ie],[e,3,3*ie],[n,1,bn]];function a(c,h,g){const l=h<c;l&&([c,h]=[h,c]);const w=g&&typeof g.range=="function"?g:f(c,h,g),v=w?w.range(c,+h+1):[];return l?v.reverse():v}function f(c,h,g){const l=Math.abs(h-c)/g,w=Pn(([,,S])=>S).right(i,l);if(w===i.length)return n.every(In(c/bn,h/bn,g));if(w===0)return Cn.every(Math.max(In(c,h,g),1));const[v,U]=i[l/i[w-1][2]<i[w][2]/l?w-1:w];return v.every(U)}return[a,f]}const[Qr,Vr]=_r(_,Qn,Sn,gn,qn,Zn);function An(n){if(0<=n.y&&n.y<100){var e=new Date(-1,n.m,n.d,n.H,n.M,n.S,n.L);return e.setFullYear(n.y),e}return new Date(n.y,n.m,n.d,n.H,n.M,n.S,n.L)}function Hn(n){if(0<=n.y&&n.y<100){var e=new Date(Date.UTC(-1,n.m,n.d,n.H,n.M,n.S,n.L));return e.setUTCFullYear(n.y),e}return new Date(Date.UTC(n.y,n.m,n.d,n.H,n.M,n.S,n.L))}function fn(n,e,r){return{y:n,m:e,d:r,H:0,M:0,S:0,L:0}}function Er(n){var e=n.dateTime,r=n.date,t=n.time,u=n.periods,o=n.days,i=n.shortDays,a=n.months,f=n.shortMonths,c=sn(u),h=ln(u),g=sn(o),l=ln(o),w=sn(i),v=ln(i),U=sn(a),S=ln(a),Y=sn(f),O=ln(f),N={a:K,A:nn,b:en,B:$,c:null,d:ge,e:ge,f:dt,g:kt,G:Nt,H:mt,I:yt,j:Mt,L:xe,m:Tt,M:pt,p:Oe,q:$e,Q:ye,s:Me,S:wt,u:vt,U:Ct,V:Ut,w:Dt,W:xt,x:null,X:null,y:St,Y:Ft,Z:Yt,"%":me},x={a:Pe,A:Re,b:ze,B:je,c:null,d:he,e:he,f:Wt,g:qt,G:Qt,H:bt,I:At,j:Ht,L:ke,m:Lt,M:It,p:Ze,q:qe,Q:ye,s:Me,S:Ot,u:$t,U:Pt,V:Rt,w:zt,W:jt,x:null,X:null,y:Zt,Y:_t,Z:Vt,"%":me},L={a:J,A:hn,b:d,B:R,c:b,d:se,e:se,f:st,g:fe,G:ce,H:le,I:le,j:it,L:ft,m:ot,M:at,p:V,q:ut,Q:gt,s:ht,S:ct,u:Kr,U:nt,V:et,w:Jr,W:rt,x:Q,X:mn,y:fe,Y:ce,Z:tt,"%":lt};N.x=y(r,N),N.X=y(t,N),N.c=y(e,N),x.x=y(r,x),x.X=y(t,x),x.c=y(e,x);function y(m,M){return function(T){var s=[],A=-1,C=0,H=m.length,W,E,Vn;for(T instanceof Date||(T=new Date(+T));++A<H;)m.charCodeAt(A)===37&&(s.push(m.slice(C,A)),(E=ae[W=m.charAt(++A)])!=null?W=m.charAt(++A):E=W==="e"?" ":"0",(Vn=M[W])&&(W=Vn(T,E)),s.push(W),C=A+1);return s.push(m.slice(C,A)),s.join("")}}function D(m,M){return function(T){var s=fn(1900,void 0,1),A=P(s,m,T+="",0),C,H;if(A!=T.length)return null;if("Q"in s)return new Date(s.Q);if("s"in s)return new Date(s.s*1e3+("L"in s?s.L:0));if(M&&!("Z"in s)&&(s.Z=0),"p"in s&&(s.H=s.H%12+s.p*12),s.m===void 0&&(s.m="q"in s?s.q:0),"V"in s){if(s.V<1||s.V>53)return null;"w"in s||(s.w=1),"Z"in s?(C=Hn(fn(s.y,0,1)),H=C.getUTCDay(),C=H>4||H===0?Dn.ceil(C):Dn(C),C=_n.offset(C,(s.V-1)*7),s.y=C.getUTCFullYear(),s.m=C.getUTCMonth(),s.d=C.getUTCDate()+(s.w+6)%7):(C=An(fn(s.y,0,1)),H=C.getDay(),C=H>4||H===0?Un.ceil(C):Un(C),C=gn.offset(C,(s.V-1)*7),s.y=C.getFullYear(),s.m=C.getMonth(),s.d=C.getDate()+(s.w+6)%7)}else("W"in s||"U"in s)&&("w"in s||(s.w="u"in s?s.u%7:"W"in s?1:0),H="Z"in s?Hn(fn(s.y,0,1)).getUTCDay():An(fn(s.y,0,1)).getDay(),s.m=0,s.d="W"in s?(s.w+6)%7+s.W*7-(H+5)%7:s.w+s.U*7-(H+6)%7);return"Z"in s?(s.H+=s.Z/100|0,s.M+=s.Z%100,Hn(s)):An(s)}}function P(m,M,T,s){for(var A=0,C=M.length,H=T.length,W,E;A<C;){if(s>=H)return-1;if(W=M.charCodeAt(A++),W===37){if(W=M.charAt(A++),E=L[W in ae?M.charAt(A++):W],!E||(s=E(m,T,s))<0)return-1}else if(W!=T.charCodeAt(s++))return-1}return s}function V(m,M,T){var s=c.exec(M.slice(T));return s?(m.p=h.get(s[0].toLowerCase()),T+s[0].length):-1}function J(m,M,T){var s=w.exec(M.slice(T));return s?(m.w=v.get(s[0].toLowerCase()),T+s[0].length):-1}function hn(m,M,T){var s=g.exec(M.slice(T));return s?(m.w=l.get(s[0].toLowerCase()),T+s[0].length):-1}function d(m,M,T){var s=Y.exec(M.slice(T));return s?(m.m=O.get(s[0].toLowerCase()),T+s[0].length):-1}function R(m,M,T){var s=U.exec(M.slice(T));return s?(m.m=S.get(s[0].toLowerCase()),T+s[0].length):-1}function b(m,M,T){return P(m,e,M,T)}function Q(m,M,T){return P(m,r,M,T)}function mn(m,M,T){return P(m,t,M,T)}function K(m){return i[m.getDay()]}function nn(m){return o[m.getDay()]}function en(m){return f[m.getMonth()]}function $(m){return a[m.getMonth()]}function Oe(m){return u[+(m.getHours()>=12)]}function $e(m){return 1+~~(m.getMonth()/3)}function Pe(m){return i[m.getUTCDay()]}function Re(m){return o[m.getUTCDay()]}function ze(m){return f[m.getUTCMonth()]}function je(m){return a[m.getUTCMonth()]}function Ze(m){return u[+(m.getUTCHours()>=12)]}function qe(m){return 1+~~(m.getUTCMonth()/3)}return{format:function(m){var M=y(m+="",N);return M.toString=function(){return m},M},parse:function(m){var M=D(m+="",!1);return M.toString=function(){return m},M},utcFormat:function(m){var M=y(m+="",x);return M.toString=function(){return m},M},utcParse:function(m){var M=D(m+="",!0);return M.toString=function(){return m},M}}}var ae={"-":"",_:" ",0:"0"},F=/^\s*\d+/,Br=/^%/,Xr=/[\\^$*+?|[\]().{}]/g;function p(n,e,r){var t=n<0?"-":"",u=(t?-n:n)+"",o=u.length;return t+(o<r?new Array(r-o+1).join(e)+u:u)}function Gr(n){return n.replace(Xr,"\\$&")}function sn(n){return new RegExp("^(?:"+n.map(Gr).join("|")+")","i")}function ln(n){return new Map(n.map((e,r)=>[e.toLowerCase(),r]))}function Jr(n,e,r){var t=F.exec(e.slice(r,r+1));return t?(n.w=+t[0],r+t[0].length):-1}function Kr(n,e,r){var t=F.exec(e.slice(r,r+1));return t?(n.u=+t[0],r+t[0].length):-1}function nt(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.U=+t[0],r+t[0].length):-1}function et(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.V=+t[0],r+t[0].length):-1}function rt(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.W=+t[0],r+t[0].length):-1}function ce(n,e,r){var t=F.exec(e.slice(r,r+4));return t?(n.y=+t[0],r+t[0].length):-1}function fe(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.y=+t[0]+(+t[0]>68?1900:2e3),r+t[0].length):-1}function tt(n,e,r){var t=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return t?(n.Z=t[1]?0:-(t[2]+(t[3]||"00")),r+t[0].length):-1}function ut(n,e,r){var t=F.exec(e.slice(r,r+1));return t?(n.q=t[0]*3-3,r+t[0].length):-1}function ot(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.m=t[0]-1,r+t[0].length):-1}function se(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.d=+t[0],r+t[0].length):-1}function it(n,e,r){var t=F.exec(e.slice(r,r+3));return t?(n.m=0,n.d=+t[0],r+t[0].length):-1}function le(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.H=+t[0],r+t[0].length):-1}function at(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.M=+t[0],r+t[0].length):-1}function ct(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.S=+t[0],r+t[0].length):-1}function ft(n,e,r){var t=F.exec(e.slice(r,r+3));return t?(n.L=+t[0],r+t[0].length):-1}function st(n,e,r){var t=F.exec(e.slice(r,r+6));return t?(n.L=Math.floor(t[0]/1e3),r+t[0].length):-1}function lt(n,e,r){var t=Br.exec(e.slice(r,r+1));return t?r+t[0].length:-1}function gt(n,e,r){var t=F.exec(e.slice(r));return t?(n.Q=+t[0],r+t[0].length):-1}function ht(n,e,r){var t=F.exec(e.slice(r));return t?(n.s=+t[0],r+t[0].length):-1}function ge(n,e){return p(n.getDate(),e,2)}function mt(n,e){return p(n.getHours(),e,2)}function yt(n,e){return p(n.getHours()%12||12,e,2)}function Mt(n,e){return p(1+gn.count(_(n),n),e,3)}function xe(n,e){return p(n.getMilliseconds(),e,3)}function dt(n,e){return xe(n,e)+"000"}function Tt(n,e){return p(n.getMonth()+1,e,2)}function pt(n,e){return p(n.getMinutes(),e,2)}function wt(n,e){return p(n.getSeconds(),e,2)}function vt(n){var e=n.getDay();return e===0?7:e}function Ct(n,e){return p(Sn.count(_(n)-1,n),e,2)}function Se(n){var e=n.getDay();return e>=4||e===0?an(n):an.ceil(n)}function Ut(n,e){return n=Se(n),p(an.count(_(n),n)+(_(n).getDay()===4),e,2)}function Dt(n){return n.getDay()}function xt(n,e){return p(Un.count(_(n)-1,n),e,2)}function St(n,e){return p(n.getFullYear()%100,e,2)}function kt(n,e){return n=Se(n),p(n.getFullYear()%100,e,2)}function Ft(n,e){return p(n.getFullYear()%1e4,e,4)}function Nt(n,e){var r=n.getDay();return n=r>=4||r===0?an(n):an.ceil(n),p(n.getFullYear()%1e4,e,4)}function Yt(n){var e=n.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+p(e/60|0,"0",2)+p(e%60,"0",2)}function he(n,e){return p(n.getUTCDate(),e,2)}function bt(n,e){return p(n.getUTCHours(),e,2)}function At(n,e){return p(n.getUTCHours()%12||12,e,2)}function Ht(n,e){return p(1+_n.count(B(n),n),e,3)}function ke(n,e){return p(n.getUTCMilliseconds(),e,3)}function Wt(n,e){return ke(n,e)+"000"}function Lt(n,e){return p(n.getUTCMonth()+1,e,2)}function It(n,e){return p(n.getUTCMinutes(),e,2)}function Ot(n,e){return p(n.getUTCSeconds(),e,2)}function $t(n){var e=n.getUTCDay();return e===0?7:e}function Pt(n,e){return p(De.count(B(n)-1,n),e,2)}function Fe(n){var e=n.getUTCDay();return e>=4||e===0?cn(n):cn.ceil(n)}function Rt(n,e){return n=Fe(n),p(cn.count(B(n),n)+(B(n).getUTCDay()===4),e,2)}function zt(n){return n.getUTCDay()}function jt(n,e){return p(Dn.count(B(n)-1,n),e,2)}function Zt(n,e){return p(n.getUTCFullYear()%100,e,2)}function qt(n,e){return n=Fe(n),p(n.getUTCFullYear()%100,e,2)}function _t(n,e){return p(n.getUTCFullYear()%1e4,e,4)}function Qt(n,e){var r=n.getUTCDay();return n=r>=4||r===0?cn(n):cn.ceil(n),p(n.getUTCFullYear()%1e4,e,4)}function Vt(){return"+0000"}function me(){return"%"}function ye(n){return+n}function Me(n){return Math.floor(+n/1e3)}var rn,Ne,Ye,be;Et({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Et(n){return rn=Er(n),Ne=rn.format,rn.parse,Ye=rn.utcFormat,be=rn.utcParse,rn}var Ae="%Y-%m-%dT%H:%M:%S.%LZ";function Bt(n){return n.toISOString()}Date.prototype.toISOString||Ye(Ae);function Xt(n){var e=new Date(n);return isNaN(e)?null:e}+new Date("2000-01-01T00:00:00.000Z")||be(Ae);function kn(n,e){switch(arguments.length){case 0:break;case 1:this.range(n);break;default:this.range(e).domain(n);break}return this}const de=Symbol("implicit");function He(){var n=new Gn,e=[],r=[],t=de;function u(o){let i=n.get(o);if(i===void 0){if(t!==de)return t;n.set(o,i=e.push(o)-1)}return r[i%r.length]}return u.domain=function(o){if(!arguments.length)return e.slice();e=[],n=new Gn;for(const i of o)n.has(i)||n.set(i,e.push(i)-1);return u},u.range=function(o){return arguments.length?(r=Array.from(o),u):r.slice()},u.unknown=function(o){return arguments.length?(t=o,u):t},u.copy=function(){return He(e,r).unknown(t)},kn.apply(u,arguments),u}function Gt(){var n=He().unknown(void 0),e=n.domain,r=n.range,t=0,u=1,o,i,a=!1,f=0,c=0,h=.5;delete n.unknown;function g(){var l=e().length,w=u<t,v=w?u:t,U=w?t:u;o=(U-v)/Math.max(1,l-f+c*2),a&&(o=Math.floor(o)),v+=(U-v-o*(l-f))*h,i=o*(1-f),a&&(v=Math.round(v),i=Math.round(i));var S=tr(l).map(function(Y){return v+o*Y});return r(w?S.reverse():S)}return n.domain=function(l){return arguments.length?(e(l),g()):e()},n.range=function(l){return arguments.length?([t,u]=l,t=+t,u=+u,g()):[t,u]},n.rangeRound=function(l){return[t,u]=l,t=+t,u=+u,a=!0,g()},n.bandwidth=function(){return i},n.step=function(){return o},n.round=function(l){return arguments.length?(a=!!l,g()):a},n.padding=function(l){return arguments.length?(f=Math.min(1,c=+l),g()):f},n.paddingInner=function(l){return arguments.length?(f=Math.min(1,l),g()):f},n.paddingOuter=function(l){return arguments.length?(c=+l,g()):c},n.align=function(l){return arguments.length?(h=Math.max(0,Math.min(1,l)),g()):h},n.copy=function(){return Gt(e(),[t,u]).round(a).paddingInner(f).paddingOuter(c).align(h)},kn.apply(g(),arguments)}function Jt(n){return function(){return n}}function Kt(n){return+n}var Te=[0,1];function un(n){return n}function $n(n,e){return(e-=n=+n)?function(r){return(r-n)/e}:Jt(isNaN(e)?NaN:.5)}function nu(n,e){var r;return n>e&&(r=n,n=e,e=r),function(t){return Math.max(n,Math.min(e,t))}}function eu(n,e,r){var t=n[0],u=n[1],o=e[0],i=e[1];return u<t?(t=$n(u,t),o=r(i,o)):(t=$n(t,u),o=r(o,i)),function(a){return o(t(a))}}function ru(n,e,r){var t=Math.min(n.length,e.length)-1,u=new Array(t),o=new Array(t),i=-1;for(n[t]<n[0]&&(n=n.slice().reverse(),e=e.slice().reverse());++i<t;)u[i]=$n(n[i],n[i+1]),o[i]=r(e[i],e[i+1]);return function(a){var f=Be(n,a,1,t)-1;return o[f](u[f](a))}}function We(n,e){return e.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function tu(){var n=Te,e=Te,r=Rn,t,u,o,i=un,a,f,c;function h(){var l=Math.min(n.length,e.length);return i!==un&&(i=nu(n[0],n[l-1])),a=l>2?ru:eu,f=c=null,g}function g(l){return l==null||isNaN(l=+l)?o:(f||(f=a(n.map(t),e,r)))(t(i(l)))}return g.invert=function(l){return i(u((c||(c=a(e,n.map(t),Tn)))(l)))},g.domain=function(l){return arguments.length?(n=Array.from(l,Kt),h()):n.slice()},g.range=function(l){return arguments.length?(e=Array.from(l),h()):e.slice()},g.rangeRound=function(l){return e=Array.from(l),r=dr,h()},g.clamp=function(l){return arguments.length?(i=l?!0:un,h()):i!==un},g.interpolate=function(l){return arguments.length?(r=l,h()):r},g.unknown=function(l){return arguments.length?(o=l,g):o},function(l,w){return t=l,u=w,h()}}function Le(){return tu()(un,un)}function uu(n,e,r,t){var u=In(n,e,r),o;switch(t=wn(t??",f"),t.type){case"s":{var i=Math.max(Math.abs(n),Math.abs(e));return t.precision==null&&!isNaN(o=br(u,i))&&(t.precision=o),Ue(t,i)}case"":case"e":case"g":case"p":case"r":{t.precision==null&&!isNaN(o=Ar(u,Math.max(Math.abs(n),Math.abs(e))))&&(t.precision=o-(t.type==="e"));break}case"f":case"%":{t.precision==null&&!isNaN(o=Yr(u))&&(t.precision=o-(t.type==="%")*2);break}}return Ce(t)}function ou(n){var e=n.domain;return n.ticks=function(r){var t=e();return rr(t[0],t[t.length-1],r??10)},n.tickFormat=function(r,t){var u=e();return uu(u[0],u[u.length-1],r??10,t)},n.nice=function(r){r==null&&(r=10);var t=e(),u=0,o=t.length-1,i=t[u],a=t[o],f,c,h=10;for(a<i&&(c=i,i=a,a=c,c=u,u=o,o=c);h-- >0;){if(c=Ln(i,a,r),c===f)return t[u]=i,t[o]=a,e(t);if(c>0)i=Math.floor(i/c)*c,a=Math.ceil(a/c)*c;else if(c<0)i=Math.ceil(i*c)/c,a=Math.floor(a*c)/c;else break;f=c}return n},n}function iu(){var n=Le();return n.copy=function(){return We(n,iu())},kn.apply(n,arguments),ou(n)}function au(n,e){n=n.slice();var r=0,t=n.length-1,u=n[r],o=n[t],i;return o<u&&(i=r,r=t,t=i,i=u,u=o,o=i),n[r]=e.floor(u),n[t]=e.ceil(o),n}function cu(n){return new Date(n)}function fu(n){return n instanceof Date?+n:Math.round(n)}function Ie(n,e,r,t,u,o,i,a,f,c){var h=Le(),g=h.invert,l=h.domain,w=c(".%L"),v=c(":%S"),U=c("%I:%M"),S=c("%I %p"),Y=c("%a %d"),O=c("%b %d"),N=c("%B"),x=c("%Y");function L(y){return(f(y)<y?w:a(y)<y?v:i(y)<y?U:o(y)<y?S:t(y)<y?u(y)<y?Y:O:r(y)<y?N:x)(y)}return h.invert=function(y){return new Date(Math.round(g(y)))},h.domain=function(y){return arguments.length?l(Array.from(y,fu)):l().map(cu)},h.ticks=function(y){var D=l();return n(D[0],D[D.length-1],y??10)},h.tickFormat=function(y,D){return D==null?L:c(D)},h.nice=function(y){var D=l();return(!y||typeof y.range!="function")&&(y=e(D[0],D[D.length-1],y??10)),y?l(au(D,y)):h},h.copy=function(){return We(h,Ie(n,e,r,t,u,o,i,a,f,c))},h}function Mu(){return kn.apply(Ie(Qr,Vr,_,Qn,Sn,gn,qn,Zn,tn,Ne).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}export{Cn as a,Gt as b,yu as c,gu as d,gn as e,Ce as f,Ne as g,mu as h,$r as i,qn as j,Zn as k,iu as l,lu as m,Un as n,He as o,Qn as p,Pr as q,hu as r,tn as s,Mu as t,Sn as u,an as v,Ir as w,Or as x};
1
+ import{ac as En,w as Bn,aS as Wn,F as Xn}from"./D2P0fD42.js";function Mn(n,e){return n==null||e==null?NaN:n<e?-1:n>e?1:n>=e?0:NaN}function _e(n,e){return n==null||e==null?NaN:e<n?-1:e>n?1:e>=n?0:NaN}function Pn(n){let e,r,t;n.length!==2?(e=Mn,r=(a,f)=>Mn(n(a),f),t=(a,f)=>n(a)-f):(e=n===Mn||n===_e?n:Qe,r=n,t=n);function u(a,f,c=0,h=a.length){if(c<h){if(e(f,f)!==0)return h;do{const g=c+h>>>1;r(a[g],f)<0?c=g+1:h=g}while(c<h)}return c}function o(a,f,c=0,h=a.length){if(c<h){if(e(f,f)!==0)return h;do{const g=c+h>>>1;r(a[g],f)<=0?c=g+1:h=g}while(c<h)}return c}function i(a,f,c=0,h=a.length){const g=u(a,f,c,h-1);return g>c&&t(a[g-1],f)>-t(a[g],f)?g-1:g}return{left:u,center:i,right:o}}function Qe(){return 0}function Ve(n){return n===null?NaN:+n}const Ee=Pn(Mn),Be=Ee.right;Pn(Ve).center;class Gn extends Map{constructor(e,r=Je){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(const[t,u]of e)this.set(t,u)}get(e){return super.get(Jn(this,e))}has(e){return super.has(Jn(this,e))}set(e,r){return super.set(Xe(this,e),r)}delete(e){return super.delete(Ge(this,e))}}function Jn({_intern:n,_key:e},r){const t=e(r);return n.has(t)?n.get(t):r}function Xe({_intern:n,_key:e},r){const t=e(r);return n.has(t)?n.get(t):(n.set(t,r),r)}function Ge({_intern:n,_key:e},r){const t=e(r);return n.has(t)&&(r=n.get(t),n.delete(t)),r}function Je(n){return n!==null&&typeof n=="object"?n.valueOf():n}const Ke=Math.sqrt(50),nr=Math.sqrt(10),er=Math.sqrt(2);function dn(n,e,r){const t=(e-n)/Math.max(0,r),u=Math.floor(Math.log10(t)),o=t/Math.pow(10,u),i=o>=Ke?10:o>=nr?5:o>=er?2:1;let a,f,c;return u<0?(c=Math.pow(10,-u)/i,a=Math.round(n*c),f=Math.round(e*c),a/c<n&&++a,f/c>e&&--f,c=-c):(c=Math.pow(10,u)*i,a=Math.round(n/c),f=Math.round(e/c),a*c<n&&++a,f*c>e&&--f),f<a&&.5<=r&&r<2?dn(n,e,r*2):[a,f,c]}function rr(n,e,r){if(e=+e,n=+n,r=+r,!(r>0))return[];if(n===e)return[n];const t=e<n,[u,o,i]=t?dn(e,n,r):dn(n,e,r);if(!(o>=u))return[];const a=o-u+1,f=new Array(a);if(t)if(i<0)for(let c=0;c<a;++c)f[c]=(o-c)/-i;else for(let c=0;c<a;++c)f[c]=(o-c)*i;else if(i<0)for(let c=0;c<a;++c)f[c]=(u+c)/-i;else for(let c=0;c<a;++c)f[c]=(u+c)*i;return f}function Ln(n,e,r){return e=+e,n=+n,r=+r,dn(n,e,r)[2]}function In(n,e,r){e=+e,n=+n,r=+r;const t=e<n,u=t?Ln(e,n,r):Ln(n,e,r);return(t?-1:1)*(u<0?1/-u:u)}function lu(n,e){let r;if(e===void 0)for(const t of n)t!=null&&(r<t||r===void 0&&t>=t)&&(r=t);else{let t=-1;for(let u of n)(u=e(u,++t,n))!=null&&(r<u||r===void 0&&u>=u)&&(r=u)}return r}function gu(n,e){let r;if(e===void 0)for(const t of n)t!=null&&(r>t||r===void 0&&t>=t)&&(r=t);else{let t=-1;for(let u of n)(u=e(u,++t,n))!=null&&(r>u||r===void 0&&u>=u)&&(r=u)}return r}function tr(n,e,r){n=+n,e=+e,r=(u=arguments.length)<2?(e=n,n=0,1):u<3?1:+r;for(var t=-1,u=Math.max(0,Math.ceil((e-n)/r))|0,o=new Array(u);++t<u;)o[t]=n+t*r;return o}function ur(n,e,r,t,u){var o=n*n,i=o*n;return((1-3*n+3*o-i)*e+(4-6*o+3*i)*r+(1+3*n+3*o-3*i)*t+i*u)/6}function or(n){var e=n.length-1;return function(r){var t=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),u=n[t],o=n[t+1],i=t>0?n[t-1]:2*u-o,a=t<e-1?n[t+2]:2*o-u;return ur((r-t/e)*e,i,u,o,a)}}var xn=n=>()=>n;function pe(n,e){return function(r){return n+r*e}}function ir(n,e,r){return n=Math.pow(n,r),e=Math.pow(e,r)-n,r=1/r,function(t){return Math.pow(n+t*e,r)}}function we(n,e){var r=e-n;return r?pe(n,r>180||r<-180?r-360*Math.round(r/360):r):xn(isNaN(n)?e:n)}function ar(n){return(n=+n)==1?Z:function(e,r){return r-e?ir(e,r,n):xn(isNaN(e)?r:e)}}function Z(n,e){var r=e-n;return r?pe(n,r):xn(isNaN(n)?e:n)}var Kn=(function n(e){var r=ar(e);function t(u,o){var i=r((u=Wn(u)).r,(o=Wn(o)).r),a=r(u.g,o.g),f=r(u.b,o.b),c=Z(u.opacity,o.opacity);return function(h){return u.r=i(h),u.g=a(h),u.b=f(h),u.opacity=c(h),u+""}}return t.gamma=n,t})(1);function cr(n){return function(e){var r=e.length,t=new Array(r),u=new Array(r),o=new Array(r),i,a;for(i=0;i<r;++i)a=Wn(e[i]),t[i]=a.r||0,u[i]=a.g||0,o[i]=a.b||0;return t=n(t),u=n(u),o=n(o),a.opacity=1,function(f){return a.r=t(f),a.g=u(f),a.b=o(f),a+""}}}var hu=cr(or);function fr(n,e){e||(e=[]);var r=n?Math.min(e.length,n.length):0,t=e.slice(),u;return function(o){for(u=0;u<r;++u)t[u]=n[u]*(1-o)+e[u]*o;return t}}function sr(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function lr(n,e){var r=e?e.length:0,t=n?Math.min(r,n.length):0,u=new Array(t),o=new Array(r),i;for(i=0;i<t;++i)u[i]=Rn(n[i],e[i]);for(;i<r;++i)o[i]=e[i];return function(a){for(i=0;i<t;++i)o[i]=u[i](a);return o}}function gr(n,e){var r=new Date;return n=+n,e=+e,function(t){return r.setTime(n*(1-t)+e*t),r}}function Tn(n,e){return n=+n,e=+e,function(r){return n*(1-r)+e*r}}function hr(n,e){var r={},t={},u;(n===null||typeof n!="object")&&(n={}),(e===null||typeof e!="object")&&(e={});for(u in e)u in n?r[u]=Rn(n[u],e[u]):t[u]=e[u];return function(o){for(u in r)t[u]=r[u](o);return t}}var On=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Fn=new RegExp(On.source,"g");function mr(n){return function(){return n}}function yr(n){return function(e){return n(e)+""}}function Mr(n,e){var r=On.lastIndex=Fn.lastIndex=0,t,u,o,i=-1,a=[],f=[];for(n=n+"",e=e+"";(t=On.exec(n))&&(u=Fn.exec(e));)(o=u.index)>r&&(o=e.slice(r,o),a[i]?a[i]+=o:a[++i]=o),(t=t[0])===(u=u[0])?a[i]?a[i]+=u:a[++i]=u:(a[++i]=null,f.push({i,x:Tn(t,u)})),r=Fn.lastIndex;return r<e.length&&(o=e.slice(r),a[i]?a[i]+=o:a[++i]=o),a.length<2?f[0]?yr(f[0].x):mr(e):(e=f.length,function(c){for(var h=0,g;h<e;++h)a[(g=f[h]).i]=g.x(c);return a.join("")})}function Rn(n,e){var r=typeof e,t;return e==null||r==="boolean"?xn(e):(r==="number"?Tn:r==="string"?(t=Bn(e))?(e=t,Kn):Mr:e instanceof Bn?Kn:e instanceof Date?gr:sr(e)?fr:Array.isArray(e)?lr:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?hr:Tn)(n,e)}function dr(n,e){return n=+n,e=+e,function(r){return Math.round(n*(1-r)+e*r)}}var Tr=1e-12;function ne(n){return((n=Math.exp(n))+1/n)/2}function pr(n){return((n=Math.exp(n))-1/n)/2}function wr(n){return((n=Math.exp(2*n))-1)/(n+1)}(function n(e,r,t){function u(o,i){var a=o[0],f=o[1],c=o[2],h=i[0],g=i[1],l=i[2],w=h-a,v=g-f,U=w*w+v*v,S,Y;if(U<Tr)Y=Math.log(l/c)/e,S=function(D){return[a+D*w,f+D*v,c*Math.exp(e*D*Y)]};else{var O=Math.sqrt(U),N=(l*l-c*c+t*U)/(2*c*r*O),x=(l*l-c*c-t*U)/(2*l*r*O),L=Math.log(Math.sqrt(N*N+1)-N),y=Math.log(Math.sqrt(x*x+1)-x);Y=(y-L)/e,S=function(D){var P=D*Y,V=ne(L),J=c/(r*O)*(V*wr(e*P+L)-pr(L));return[a+J*w,f+J*v,c*V/ne(e*P+L)]}}return S.duration=Math.abs(Y)*1e3*e/Math.SQRT2,S}return u.rho=function(o){var i=Math.max(.001,+o),a=i*i,f=a*a;return n(i,a,f)},u})(Math.SQRT2,2,4);function vr(n){return function(e,r){var t=n((e=En(e)).h,(r=En(r)).h),u=Z(e.c,r.c),o=Z(e.l,r.l),i=Z(e.opacity,r.opacity);return function(a){return e.h=t(a),e.c=u(a),e.l=o(a),e.opacity=i(a),e+""}}}var mu=vr(we);function ve(n){return(function e(r){r=+r;function t(u,o){var i=n((u=Xn(u)).h,(o=Xn(o)).h),a=Z(u.s,o.s),f=Z(u.l,o.l),c=Z(u.opacity,o.opacity);return function(h){return u.h=i(h),u.s=a(h),u.l=f(Math.pow(h,r)),u.opacity=c(h),u+""}}return t.gamma=e,t})(1)}ve(we);var yu=ve(Z);function Cr(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function pn(n,e){if(!isFinite(n)||n===0)return null;var r=(n=e?n.toExponential(e-1):n.toExponential()).indexOf("e"),t=n.slice(0,r);return[t.length>1?t[0]+t.slice(2):t,+n.slice(r+1)]}function on(n){return n=pn(Math.abs(n)),n?n[1]:NaN}function Ur(n,e){return function(r,t){for(var u=r.length,o=[],i=0,a=n[0],f=0;u>0&&a>0&&(f+a+1>t&&(a=Math.max(1,t-f)),o.push(r.substring(u-=a,u+a)),!((f+=a+1)>t));)a=n[i=(i+1)%n.length];return o.reverse().join(e)}}function Dr(n){return function(e){return e.replace(/[0-9]/g,function(r){return n[+r]})}}var xr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function wn(n){if(!(e=xr.exec(n)))throw new Error("invalid format: "+n);var e;return new zn({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}wn.prototype=zn.prototype;function zn(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}zn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Sr(n){n:for(var e=n.length,r=1,t=-1,u;r<e;++r)switch(n[r]){case".":t=u=r;break;case"0":t===0&&(t=r),u=r;break;default:if(!+n[r])break n;t>0&&(t=0);break}return t>0?n.slice(0,t)+n.slice(u+1):n}var vn;function kr(n,e){var r=pn(n,e);if(!r)return vn=void 0,n.toPrecision(e);var t=r[0],u=r[1],o=u-(vn=Math.max(-8,Math.min(8,Math.floor(u/3)))*3)+1,i=t.length;return o===i?t:o>i?t+new Array(o-i+1).join("0"):o>0?t.slice(0,o)+"."+t.slice(o):"0."+new Array(1-o).join("0")+pn(n,Math.max(0,e+o-1))[0]}function ee(n,e){var r=pn(n,e);if(!r)return n+"";var t=r[0],u=r[1];return u<0?"0."+new Array(-u).join("0")+t:t.length>u+1?t.slice(0,u+1)+"."+t.slice(u+1):t+new Array(u-t.length+2).join("0")}var re={"%":(n,e)=>(n*100).toFixed(e),b:n=>Math.round(n).toString(2),c:n=>n+"",d:Cr,e:(n,e)=>n.toExponential(e),f:(n,e)=>n.toFixed(e),g:(n,e)=>n.toPrecision(e),o:n=>Math.round(n).toString(8),p:(n,e)=>ee(n*100,e),r:ee,s:kr,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function te(n){return n}var ue=Array.prototype.map,oe=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Fr(n){var e=n.grouping===void 0||n.thousands===void 0?te:Ur(ue.call(n.grouping,Number),n.thousands+""),r=n.currency===void 0?"":n.currency[0]+"",t=n.currency===void 0?"":n.currency[1]+"",u=n.decimal===void 0?".":n.decimal+"",o=n.numerals===void 0?te:Dr(ue.call(n.numerals,String)),i=n.percent===void 0?"%":n.percent+"",a=n.minus===void 0?"−":n.minus+"",f=n.nan===void 0?"NaN":n.nan+"";function c(g,l){g=wn(g);var w=g.fill,v=g.align,U=g.sign,S=g.symbol,Y=g.zero,O=g.width,N=g.comma,x=g.precision,L=g.trim,y=g.type;y==="n"?(N=!0,y="g"):re[y]||(x===void 0&&(x=12),L=!0,y="g"),(Y||w==="0"&&v==="=")&&(Y=!0,w="0",v="=");var D=(l&&l.prefix!==void 0?l.prefix:"")+(S==="$"?r:S==="#"&&/[boxX]/.test(y)?"0"+y.toLowerCase():""),P=(S==="$"?t:/[%p]/.test(y)?i:"")+(l&&l.suffix!==void 0?l.suffix:""),V=re[y],J=/[defgprs%]/.test(y);x=x===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function hn(d){var R=D,b=P,Q,mn,K;if(y==="c")b=V(d)+b,d="";else{d=+d;var nn=d<0||1/d<0;if(d=isNaN(d)?f:V(Math.abs(d),x),L&&(d=Sr(d)),nn&&+d==0&&U!=="+"&&(nn=!1),R=(nn?U==="("?U:a:U==="-"||U==="("?"":U)+R,b=(y==="s"&&!isNaN(d)&&vn!==void 0?oe[8+vn/3]:"")+b+(nn&&U==="("?")":""),J){for(Q=-1,mn=d.length;++Q<mn;)if(K=d.charCodeAt(Q),48>K||K>57){b=(K===46?u+d.slice(Q+1):d.slice(Q))+b,d=d.slice(0,Q);break}}}N&&!Y&&(d=e(d,1/0));var en=R.length+d.length+b.length,$=en<O?new Array(O-en+1).join(w):"";switch(N&&Y&&(d=e($+d,$.length?O-b.length:1/0),$=""),v){case"<":d=R+d+b+$;break;case"=":d=R+$+d+b;break;case"^":d=$.slice(0,en=$.length>>1)+R+d+b+$.slice(en);break;default:d=$+R+d+b;break}return o(d)}return hn.toString=function(){return g+""},hn}function h(g,l){var w=Math.max(-8,Math.min(8,Math.floor(on(l)/3)))*3,v=Math.pow(10,-w),U=c((g=wn(g),g.type="f",g),{suffix:oe[8+w/3]});return function(S){return U(v*S)}}return{format:c,formatPrefix:h}}var yn,Ce,Ue;Nr({thousands:",",grouping:[3],currency:["$",""]});function Nr(n){return yn=Fr(n),Ce=yn.format,Ue=yn.formatPrefix,yn}function Yr(n){return Math.max(0,-on(Math.abs(n)))}function br(n,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(on(e)/3)))*3-on(Math.abs(n)))}function Ar(n,e){return n=Math.abs(n),e=Math.abs(e)-n,Math.max(0,on(e)-on(n))+1}const Nn=new Date,Yn=new Date;function k(n,e,r,t){function u(o){return n(o=arguments.length===0?new Date:new Date(+o)),o}return u.floor=o=>(n(o=new Date(+o)),o),u.ceil=o=>(n(o=new Date(o-1)),e(o,1),n(o),o),u.round=o=>{const i=u(o),a=u.ceil(o);return o-i<a-o?i:a},u.offset=(o,i)=>(e(o=new Date(+o),i==null?1:Math.floor(i)),o),u.range=(o,i,a)=>{const f=[];if(o=u.ceil(o),a=a==null?1:Math.floor(a),!(o<i)||!(a>0))return f;let c;do f.push(c=new Date(+o)),e(o,a),n(o);while(c<o&&o<i);return f},u.filter=o=>k(i=>{if(i>=i)for(;n(i),!o(i);)i.setTime(i-1)},(i,a)=>{if(i>=i)if(a<0)for(;++a<=0;)for(;e(i,-1),!o(i););else for(;--a>=0;)for(;e(i,1),!o(i););}),r&&(u.count=(o,i)=>(Nn.setTime(+o),Yn.setTime(+i),n(Nn),n(Yn),Math.floor(r(Nn,Yn))),u.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?u.filter(t?i=>t(i)%o===0:i=>u.count(0,i)%o===0):u)),u}const Cn=k(()=>{},(n,e)=>{n.setTime(+n+e)},(n,e)=>e-n);Cn.every=n=>(n=Math.floor(n),!isFinite(n)||!(n>0)?null:n>1?k(e=>{e.setTime(Math.floor(e/n)*n)},(e,r)=>{e.setTime(+e+r*n)},(e,r)=>(r-e)/n):Cn);Cn.range;const z=1e3,I=z*60,j=I*60,q=j*24,jn=q*7,ie=q*30,bn=q*365,tn=k(n=>{n.setTime(n-n.getMilliseconds())},(n,e)=>{n.setTime(+n+e*z)},(n,e)=>(e-n)/z,n=>n.getUTCSeconds());tn.range;const Zn=k(n=>{n.setTime(n-n.getMilliseconds()-n.getSeconds()*z)},(n,e)=>{n.setTime(+n+e*I)},(n,e)=>(e-n)/I,n=>n.getMinutes());Zn.range;const Hr=k(n=>{n.setUTCSeconds(0,0)},(n,e)=>{n.setTime(+n+e*I)},(n,e)=>(e-n)/I,n=>n.getUTCMinutes());Hr.range;const qn=k(n=>{n.setTime(n-n.getMilliseconds()-n.getSeconds()*z-n.getMinutes()*I)},(n,e)=>{n.setTime(+n+e*j)},(n,e)=>(e-n)/j,n=>n.getHours());qn.range;const Wr=k(n=>{n.setUTCMinutes(0,0,0)},(n,e)=>{n.setTime(+n+e*j)},(n,e)=>(e-n)/j,n=>n.getUTCHours());Wr.range;const gn=k(n=>n.setHours(0,0,0,0),(n,e)=>n.setDate(n.getDate()+e),(n,e)=>(e-n-(e.getTimezoneOffset()-n.getTimezoneOffset())*I)/q,n=>n.getDate()-1);gn.range;const _n=k(n=>{n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCDate(n.getUTCDate()+e)},(n,e)=>(e-n)/q,n=>n.getUTCDate()-1);_n.range;const Lr=k(n=>{n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCDate(n.getUTCDate()+e)},(n,e)=>(e-n)/q,n=>Math.floor(n/q));Lr.range;function X(n){return k(e=>{e.setDate(e.getDate()-(e.getDay()+7-n)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*I)/jn)}const Sn=X(0),Un=X(1),Ir=X(2),Or=X(3),an=X(4),$r=X(5),Pr=X(6);Sn.range;Un.range;Ir.range;Or.range;an.range;$r.range;Pr.range;function G(n){return k(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-n)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/jn)}const De=G(0),Dn=G(1),Rr=G(2),zr=G(3),cn=G(4),jr=G(5),Zr=G(6);De.range;Dn.range;Rr.range;zr.range;cn.range;jr.range;Zr.range;const Qn=k(n=>{n.setDate(1),n.setHours(0,0,0,0)},(n,e)=>{n.setMonth(n.getMonth()+e)},(n,e)=>e.getMonth()-n.getMonth()+(e.getFullYear()-n.getFullYear())*12,n=>n.getMonth());Qn.range;const qr=k(n=>{n.setUTCDate(1),n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCMonth(n.getUTCMonth()+e)},(n,e)=>e.getUTCMonth()-n.getUTCMonth()+(e.getUTCFullYear()-n.getUTCFullYear())*12,n=>n.getUTCMonth());qr.range;const _=k(n=>{n.setMonth(0,1),n.setHours(0,0,0,0)},(n,e)=>{n.setFullYear(n.getFullYear()+e)},(n,e)=>e.getFullYear()-n.getFullYear(),n=>n.getFullYear());_.every=n=>!isFinite(n=Math.floor(n))||!(n>0)?null:k(e=>{e.setFullYear(Math.floor(e.getFullYear()/n)*n),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*n)});_.range;const B=k(n=>{n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCFullYear(n.getUTCFullYear()+e)},(n,e)=>e.getUTCFullYear()-n.getUTCFullYear(),n=>n.getUTCFullYear());B.every=n=>!isFinite(n=Math.floor(n))||!(n>0)?null:k(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/n)*n),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*n)});B.range;function _r(n,e,r,t,u,o){const i=[[tn,1,z],[tn,5,5*z],[tn,15,15*z],[tn,30,30*z],[o,1,I],[o,5,5*I],[o,15,15*I],[o,30,30*I],[u,1,j],[u,3,3*j],[u,6,6*j],[u,12,12*j],[t,1,q],[t,2,2*q],[r,1,jn],[e,1,ie],[e,3,3*ie],[n,1,bn]];function a(c,h,g){const l=h<c;l&&([c,h]=[h,c]);const w=g&&typeof g.range=="function"?g:f(c,h,g),v=w?w.range(c,+h+1):[];return l?v.reverse():v}function f(c,h,g){const l=Math.abs(h-c)/g,w=Pn(([,,S])=>S).right(i,l);if(w===i.length)return n.every(In(c/bn,h/bn,g));if(w===0)return Cn.every(Math.max(In(c,h,g),1));const[v,U]=i[l/i[w-1][2]<i[w][2]/l?w-1:w];return v.every(U)}return[a,f]}const[Qr,Vr]=_r(_,Qn,Sn,gn,qn,Zn);function An(n){if(0<=n.y&&n.y<100){var e=new Date(-1,n.m,n.d,n.H,n.M,n.S,n.L);return e.setFullYear(n.y),e}return new Date(n.y,n.m,n.d,n.H,n.M,n.S,n.L)}function Hn(n){if(0<=n.y&&n.y<100){var e=new Date(Date.UTC(-1,n.m,n.d,n.H,n.M,n.S,n.L));return e.setUTCFullYear(n.y),e}return new Date(Date.UTC(n.y,n.m,n.d,n.H,n.M,n.S,n.L))}function fn(n,e,r){return{y:n,m:e,d:r,H:0,M:0,S:0,L:0}}function Er(n){var e=n.dateTime,r=n.date,t=n.time,u=n.periods,o=n.days,i=n.shortDays,a=n.months,f=n.shortMonths,c=sn(u),h=ln(u),g=sn(o),l=ln(o),w=sn(i),v=ln(i),U=sn(a),S=ln(a),Y=sn(f),O=ln(f),N={a:K,A:nn,b:en,B:$,c:null,d:ge,e:ge,f:dt,g:kt,G:Nt,H:mt,I:yt,j:Mt,L:xe,m:Tt,M:pt,p:Oe,q:$e,Q:ye,s:Me,S:wt,u:vt,U:Ct,V:Ut,w:Dt,W:xt,x:null,X:null,y:St,Y:Ft,Z:Yt,"%":me},x={a:Pe,A:Re,b:ze,B:je,c:null,d:he,e:he,f:Wt,g:qt,G:Qt,H:bt,I:At,j:Ht,L:ke,m:Lt,M:It,p:Ze,q:qe,Q:ye,s:Me,S:Ot,u:$t,U:Pt,V:Rt,w:zt,W:jt,x:null,X:null,y:Zt,Y:_t,Z:Vt,"%":me},L={a:J,A:hn,b:d,B:R,c:b,d:se,e:se,f:st,g:fe,G:ce,H:le,I:le,j:it,L:ft,m:ot,M:at,p:V,q:ut,Q:gt,s:ht,S:ct,u:Kr,U:nt,V:et,w:Jr,W:rt,x:Q,X:mn,y:fe,Y:ce,Z:tt,"%":lt};N.x=y(r,N),N.X=y(t,N),N.c=y(e,N),x.x=y(r,x),x.X=y(t,x),x.c=y(e,x);function y(m,M){return function(T){var s=[],A=-1,C=0,H=m.length,W,E,Vn;for(T instanceof Date||(T=new Date(+T));++A<H;)m.charCodeAt(A)===37&&(s.push(m.slice(C,A)),(E=ae[W=m.charAt(++A)])!=null?W=m.charAt(++A):E=W==="e"?" ":"0",(Vn=M[W])&&(W=Vn(T,E)),s.push(W),C=A+1);return s.push(m.slice(C,A)),s.join("")}}function D(m,M){return function(T){var s=fn(1900,void 0,1),A=P(s,m,T+="",0),C,H;if(A!=T.length)return null;if("Q"in s)return new Date(s.Q);if("s"in s)return new Date(s.s*1e3+("L"in s?s.L:0));if(M&&!("Z"in s)&&(s.Z=0),"p"in s&&(s.H=s.H%12+s.p*12),s.m===void 0&&(s.m="q"in s?s.q:0),"V"in s){if(s.V<1||s.V>53)return null;"w"in s||(s.w=1),"Z"in s?(C=Hn(fn(s.y,0,1)),H=C.getUTCDay(),C=H>4||H===0?Dn.ceil(C):Dn(C),C=_n.offset(C,(s.V-1)*7),s.y=C.getUTCFullYear(),s.m=C.getUTCMonth(),s.d=C.getUTCDate()+(s.w+6)%7):(C=An(fn(s.y,0,1)),H=C.getDay(),C=H>4||H===0?Un.ceil(C):Un(C),C=gn.offset(C,(s.V-1)*7),s.y=C.getFullYear(),s.m=C.getMonth(),s.d=C.getDate()+(s.w+6)%7)}else("W"in s||"U"in s)&&("w"in s||(s.w="u"in s?s.u%7:"W"in s?1:0),H="Z"in s?Hn(fn(s.y,0,1)).getUTCDay():An(fn(s.y,0,1)).getDay(),s.m=0,s.d="W"in s?(s.w+6)%7+s.W*7-(H+5)%7:s.w+s.U*7-(H+6)%7);return"Z"in s?(s.H+=s.Z/100|0,s.M+=s.Z%100,Hn(s)):An(s)}}function P(m,M,T,s){for(var A=0,C=M.length,H=T.length,W,E;A<C;){if(s>=H)return-1;if(W=M.charCodeAt(A++),W===37){if(W=M.charAt(A++),E=L[W in ae?M.charAt(A++):W],!E||(s=E(m,T,s))<0)return-1}else if(W!=T.charCodeAt(s++))return-1}return s}function V(m,M,T){var s=c.exec(M.slice(T));return s?(m.p=h.get(s[0].toLowerCase()),T+s[0].length):-1}function J(m,M,T){var s=w.exec(M.slice(T));return s?(m.w=v.get(s[0].toLowerCase()),T+s[0].length):-1}function hn(m,M,T){var s=g.exec(M.slice(T));return s?(m.w=l.get(s[0].toLowerCase()),T+s[0].length):-1}function d(m,M,T){var s=Y.exec(M.slice(T));return s?(m.m=O.get(s[0].toLowerCase()),T+s[0].length):-1}function R(m,M,T){var s=U.exec(M.slice(T));return s?(m.m=S.get(s[0].toLowerCase()),T+s[0].length):-1}function b(m,M,T){return P(m,e,M,T)}function Q(m,M,T){return P(m,r,M,T)}function mn(m,M,T){return P(m,t,M,T)}function K(m){return i[m.getDay()]}function nn(m){return o[m.getDay()]}function en(m){return f[m.getMonth()]}function $(m){return a[m.getMonth()]}function Oe(m){return u[+(m.getHours()>=12)]}function $e(m){return 1+~~(m.getMonth()/3)}function Pe(m){return i[m.getUTCDay()]}function Re(m){return o[m.getUTCDay()]}function ze(m){return f[m.getUTCMonth()]}function je(m){return a[m.getUTCMonth()]}function Ze(m){return u[+(m.getUTCHours()>=12)]}function qe(m){return 1+~~(m.getUTCMonth()/3)}return{format:function(m){var M=y(m+="",N);return M.toString=function(){return m},M},parse:function(m){var M=D(m+="",!1);return M.toString=function(){return m},M},utcFormat:function(m){var M=y(m+="",x);return M.toString=function(){return m},M},utcParse:function(m){var M=D(m+="",!0);return M.toString=function(){return m},M}}}var ae={"-":"",_:" ",0:"0"},F=/^\s*\d+/,Br=/^%/,Xr=/[\\^$*+?|[\]().{}]/g;function p(n,e,r){var t=n<0?"-":"",u=(t?-n:n)+"",o=u.length;return t+(o<r?new Array(r-o+1).join(e)+u:u)}function Gr(n){return n.replace(Xr,"\\$&")}function sn(n){return new RegExp("^(?:"+n.map(Gr).join("|")+")","i")}function ln(n){return new Map(n.map((e,r)=>[e.toLowerCase(),r]))}function Jr(n,e,r){var t=F.exec(e.slice(r,r+1));return t?(n.w=+t[0],r+t[0].length):-1}function Kr(n,e,r){var t=F.exec(e.slice(r,r+1));return t?(n.u=+t[0],r+t[0].length):-1}function nt(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.U=+t[0],r+t[0].length):-1}function et(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.V=+t[0],r+t[0].length):-1}function rt(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.W=+t[0],r+t[0].length):-1}function ce(n,e,r){var t=F.exec(e.slice(r,r+4));return t?(n.y=+t[0],r+t[0].length):-1}function fe(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.y=+t[0]+(+t[0]>68?1900:2e3),r+t[0].length):-1}function tt(n,e,r){var t=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return t?(n.Z=t[1]?0:-(t[2]+(t[3]||"00")),r+t[0].length):-1}function ut(n,e,r){var t=F.exec(e.slice(r,r+1));return t?(n.q=t[0]*3-3,r+t[0].length):-1}function ot(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.m=t[0]-1,r+t[0].length):-1}function se(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.d=+t[0],r+t[0].length):-1}function it(n,e,r){var t=F.exec(e.slice(r,r+3));return t?(n.m=0,n.d=+t[0],r+t[0].length):-1}function le(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.H=+t[0],r+t[0].length):-1}function at(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.M=+t[0],r+t[0].length):-1}function ct(n,e,r){var t=F.exec(e.slice(r,r+2));return t?(n.S=+t[0],r+t[0].length):-1}function ft(n,e,r){var t=F.exec(e.slice(r,r+3));return t?(n.L=+t[0],r+t[0].length):-1}function st(n,e,r){var t=F.exec(e.slice(r,r+6));return t?(n.L=Math.floor(t[0]/1e3),r+t[0].length):-1}function lt(n,e,r){var t=Br.exec(e.slice(r,r+1));return t?r+t[0].length:-1}function gt(n,e,r){var t=F.exec(e.slice(r));return t?(n.Q=+t[0],r+t[0].length):-1}function ht(n,e,r){var t=F.exec(e.slice(r));return t?(n.s=+t[0],r+t[0].length):-1}function ge(n,e){return p(n.getDate(),e,2)}function mt(n,e){return p(n.getHours(),e,2)}function yt(n,e){return p(n.getHours()%12||12,e,2)}function Mt(n,e){return p(1+gn.count(_(n),n),e,3)}function xe(n,e){return p(n.getMilliseconds(),e,3)}function dt(n,e){return xe(n,e)+"000"}function Tt(n,e){return p(n.getMonth()+1,e,2)}function pt(n,e){return p(n.getMinutes(),e,2)}function wt(n,e){return p(n.getSeconds(),e,2)}function vt(n){var e=n.getDay();return e===0?7:e}function Ct(n,e){return p(Sn.count(_(n)-1,n),e,2)}function Se(n){var e=n.getDay();return e>=4||e===0?an(n):an.ceil(n)}function Ut(n,e){return n=Se(n),p(an.count(_(n),n)+(_(n).getDay()===4),e,2)}function Dt(n){return n.getDay()}function xt(n,e){return p(Un.count(_(n)-1,n),e,2)}function St(n,e){return p(n.getFullYear()%100,e,2)}function kt(n,e){return n=Se(n),p(n.getFullYear()%100,e,2)}function Ft(n,e){return p(n.getFullYear()%1e4,e,4)}function Nt(n,e){var r=n.getDay();return n=r>=4||r===0?an(n):an.ceil(n),p(n.getFullYear()%1e4,e,4)}function Yt(n){var e=n.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+p(e/60|0,"0",2)+p(e%60,"0",2)}function he(n,e){return p(n.getUTCDate(),e,2)}function bt(n,e){return p(n.getUTCHours(),e,2)}function At(n,e){return p(n.getUTCHours()%12||12,e,2)}function Ht(n,e){return p(1+_n.count(B(n),n),e,3)}function ke(n,e){return p(n.getUTCMilliseconds(),e,3)}function Wt(n,e){return ke(n,e)+"000"}function Lt(n,e){return p(n.getUTCMonth()+1,e,2)}function It(n,e){return p(n.getUTCMinutes(),e,2)}function Ot(n,e){return p(n.getUTCSeconds(),e,2)}function $t(n){var e=n.getUTCDay();return e===0?7:e}function Pt(n,e){return p(De.count(B(n)-1,n),e,2)}function Fe(n){var e=n.getUTCDay();return e>=4||e===0?cn(n):cn.ceil(n)}function Rt(n,e){return n=Fe(n),p(cn.count(B(n),n)+(B(n).getUTCDay()===4),e,2)}function zt(n){return n.getUTCDay()}function jt(n,e){return p(Dn.count(B(n)-1,n),e,2)}function Zt(n,e){return p(n.getUTCFullYear()%100,e,2)}function qt(n,e){return n=Fe(n),p(n.getUTCFullYear()%100,e,2)}function _t(n,e){return p(n.getUTCFullYear()%1e4,e,4)}function Qt(n,e){var r=n.getUTCDay();return n=r>=4||r===0?cn(n):cn.ceil(n),p(n.getUTCFullYear()%1e4,e,4)}function Vt(){return"+0000"}function me(){return"%"}function ye(n){return+n}function Me(n){return Math.floor(+n/1e3)}var rn,Ne,Ye,be;Et({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Et(n){return rn=Er(n),Ne=rn.format,rn.parse,Ye=rn.utcFormat,be=rn.utcParse,rn}var Ae="%Y-%m-%dT%H:%M:%S.%LZ";function Bt(n){return n.toISOString()}Date.prototype.toISOString||Ye(Ae);function Xt(n){var e=new Date(n);return isNaN(e)?null:e}+new Date("2000-01-01T00:00:00.000Z")||be(Ae);function kn(n,e){switch(arguments.length){case 0:break;case 1:this.range(n);break;default:this.range(e).domain(n);break}return this}const de=Symbol("implicit");function He(){var n=new Gn,e=[],r=[],t=de;function u(o){let i=n.get(o);if(i===void 0){if(t!==de)return t;n.set(o,i=e.push(o)-1)}return r[i%r.length]}return u.domain=function(o){if(!arguments.length)return e.slice();e=[],n=new Gn;for(const i of o)n.has(i)||n.set(i,e.push(i)-1);return u},u.range=function(o){return arguments.length?(r=Array.from(o),u):r.slice()},u.unknown=function(o){return arguments.length?(t=o,u):t},u.copy=function(){return He(e,r).unknown(t)},kn.apply(u,arguments),u}function Gt(){var n=He().unknown(void 0),e=n.domain,r=n.range,t=0,u=1,o,i,a=!1,f=0,c=0,h=.5;delete n.unknown;function g(){var l=e().length,w=u<t,v=w?u:t,U=w?t:u;o=(U-v)/Math.max(1,l-f+c*2),a&&(o=Math.floor(o)),v+=(U-v-o*(l-f))*h,i=o*(1-f),a&&(v=Math.round(v),i=Math.round(i));var S=tr(l).map(function(Y){return v+o*Y});return r(w?S.reverse():S)}return n.domain=function(l){return arguments.length?(e(l),g()):e()},n.range=function(l){return arguments.length?([t,u]=l,t=+t,u=+u,g()):[t,u]},n.rangeRound=function(l){return[t,u]=l,t=+t,u=+u,a=!0,g()},n.bandwidth=function(){return i},n.step=function(){return o},n.round=function(l){return arguments.length?(a=!!l,g()):a},n.padding=function(l){return arguments.length?(f=Math.min(1,c=+l),g()):f},n.paddingInner=function(l){return arguments.length?(f=Math.min(1,l),g()):f},n.paddingOuter=function(l){return arguments.length?(c=+l,g()):c},n.align=function(l){return arguments.length?(h=Math.max(0,Math.min(1,l)),g()):h},n.copy=function(){return Gt(e(),[t,u]).round(a).paddingInner(f).paddingOuter(c).align(h)},kn.apply(g(),arguments)}function Jt(n){return function(){return n}}function Kt(n){return+n}var Te=[0,1];function un(n){return n}function $n(n,e){return(e-=n=+n)?function(r){return(r-n)/e}:Jt(isNaN(e)?NaN:.5)}function nu(n,e){var r;return n>e&&(r=n,n=e,e=r),function(t){return Math.max(n,Math.min(e,t))}}function eu(n,e,r){var t=n[0],u=n[1],o=e[0],i=e[1];return u<t?(t=$n(u,t),o=r(i,o)):(t=$n(t,u),o=r(o,i)),function(a){return o(t(a))}}function ru(n,e,r){var t=Math.min(n.length,e.length)-1,u=new Array(t),o=new Array(t),i=-1;for(n[t]<n[0]&&(n=n.slice().reverse(),e=e.slice().reverse());++i<t;)u[i]=$n(n[i],n[i+1]),o[i]=r(e[i],e[i+1]);return function(a){var f=Be(n,a,1,t)-1;return o[f](u[f](a))}}function We(n,e){return e.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function tu(){var n=Te,e=Te,r=Rn,t,u,o,i=un,a,f,c;function h(){var l=Math.min(n.length,e.length);return i!==un&&(i=nu(n[0],n[l-1])),a=l>2?ru:eu,f=c=null,g}function g(l){return l==null||isNaN(l=+l)?o:(f||(f=a(n.map(t),e,r)))(t(i(l)))}return g.invert=function(l){return i(u((c||(c=a(e,n.map(t),Tn)))(l)))},g.domain=function(l){return arguments.length?(n=Array.from(l,Kt),h()):n.slice()},g.range=function(l){return arguments.length?(e=Array.from(l),h()):e.slice()},g.rangeRound=function(l){return e=Array.from(l),r=dr,h()},g.clamp=function(l){return arguments.length?(i=l?!0:un,h()):i!==un},g.interpolate=function(l){return arguments.length?(r=l,h()):r},g.unknown=function(l){return arguments.length?(o=l,g):o},function(l,w){return t=l,u=w,h()}}function Le(){return tu()(un,un)}function uu(n,e,r,t){var u=In(n,e,r),o;switch(t=wn(t??",f"),t.type){case"s":{var i=Math.max(Math.abs(n),Math.abs(e));return t.precision==null&&!isNaN(o=br(u,i))&&(t.precision=o),Ue(t,i)}case"":case"e":case"g":case"p":case"r":{t.precision==null&&!isNaN(o=Ar(u,Math.max(Math.abs(n),Math.abs(e))))&&(t.precision=o-(t.type==="e"));break}case"f":case"%":{t.precision==null&&!isNaN(o=Yr(u))&&(t.precision=o-(t.type==="%")*2);break}}return Ce(t)}function ou(n){var e=n.domain;return n.ticks=function(r){var t=e();return rr(t[0],t[t.length-1],r??10)},n.tickFormat=function(r,t){var u=e();return uu(u[0],u[u.length-1],r??10,t)},n.nice=function(r){r==null&&(r=10);var t=e(),u=0,o=t.length-1,i=t[u],a=t[o],f,c,h=10;for(a<i&&(c=i,i=a,a=c,c=u,u=o,o=c);h-- >0;){if(c=Ln(i,a,r),c===f)return t[u]=i,t[o]=a,e(t);if(c>0)i=Math.floor(i/c)*c,a=Math.ceil(a/c)*c;else if(c<0)i=Math.ceil(i*c)/c,a=Math.floor(a*c)/c;else break;f=c}return n},n}function iu(){var n=Le();return n.copy=function(){return We(n,iu())},kn.apply(n,arguments),ou(n)}function au(n,e){n=n.slice();var r=0,t=n.length-1,u=n[r],o=n[t],i;return o<u&&(i=r,r=t,t=i,i=u,u=o,o=i),n[r]=e.floor(u),n[t]=e.ceil(o),n}function cu(n){return new Date(n)}function fu(n){return n instanceof Date?+n:Math.round(n)}function Ie(n,e,r,t,u,o,i,a,f,c){var h=Le(),g=h.invert,l=h.domain,w=c(".%L"),v=c(":%S"),U=c("%I:%M"),S=c("%I %p"),Y=c("%a %d"),O=c("%b %d"),N=c("%B"),x=c("%Y");function L(y){return(f(y)<y?w:a(y)<y?v:i(y)<y?U:o(y)<y?S:t(y)<y?u(y)<y?Y:O:r(y)<y?N:x)(y)}return h.invert=function(y){return new Date(Math.round(g(y)))},h.domain=function(y){return arguments.length?l(Array.from(y,fu)):l().map(cu)},h.ticks=function(y){var D=l();return n(D[0],D[D.length-1],y??10)},h.tickFormat=function(y,D){return D==null?L:c(D)},h.nice=function(y){var D=l();return(!y||typeof y.range!="function")&&(y=e(D[0],D[D.length-1],y??10)),y?l(au(D,y)):h},h.copy=function(){return We(h,Ie(n,e,r,t,u,o,i,a,f,c))},h}function Mu(){return kn.apply(Ie(Qr,Vr,_,Qn,Sn,gn,qn,Zn,tn,Ne).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}export{Cn as a,Gt as b,yu as c,gu as d,gn as e,Ce as f,Ne as g,mu as h,$r as i,qn as j,Zn as k,iu as l,lu as m,Un as n,He as o,Qn as p,Pr as q,hu as r,tn as s,Mu as t,Sn as u,an as v,Ir as w,Or as x};