@juki-team/base-ui 1.5.0 → 1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/README.md +17 -7
  2. package/dist/esm/{BarChart-DGvfKEbJ.js → BarChart-ilBguU5i.js} +1 -1
  3. package/dist/esm/{CartesianChart-BLpd_e8l.js → CartesianChart-B4Big96I.js} +1 -1
  4. package/dist/esm/{ChangePasswordModal-8aYa6mTN.js → ChangePasswordModal-B1Ahfv-S.js} +1 -1
  5. package/dist/esm/{CodeEditor-BKMFVmPO.js → CodeEditor-Co_-jMMN.js} +1 -1
  6. package/dist/esm/{CodeViewer-DqO18gks.js → CodeViewer-j4tlytYb.js} +1 -1
  7. package/dist/esm/{Collapse-DMLYcciz.js → Collapse-B_Oe1-5C.js} +1 -1
  8. package/dist/esm/{DataGrid-C-Gco96b.js → DataGrid-B0Av-VN8.js} +1 -1
  9. package/dist/esm/{DataViewer-DIROui4g.js → DataViewer-jViuraZ_.js} +1 -1
  10. package/dist/esm/{DrawerView-Be_ckf6D.js → DrawerView-BoMapmAb.js} +1 -1
  11. package/dist/esm/{ExcalidrawButton-DWRJMohJ.js → ExcalidrawButton-DRR-2JvH.js} +1 -1
  12. package/dist/esm/{GraphvizViewer-DUIJSiDq.js → GraphvizViewer-DEJDUNWF.js} +1 -1
  13. package/dist/esm/{ImageLoaderCropper-O3UDeKd5.js → ImageLoaderCropper-CeYhv904.js} +1 -1
  14. package/dist/esm/{InputCellPhoneNumber-ByG_R6dr.js → InputCellPhoneNumber-C7hpcqFZ.js} +1 -1
  15. package/dist/esm/{InputColor-C_JNgwYl.js → InputColor-BhVac99k.js} +1 -1
  16. package/dist/esm/{LineChart-BkCo4cnj.js → LineChart-_gtzHQbx.js} +1 -1
  17. package/dist/esm/{MdMath-C38RmN3O.js → MdMath-BtS290JE.js} +1 -1
  18. package/dist/esm/{MdMathEditor-C7surRiM.js → MdMathEditor-B41-_-_8.js} +2 -2
  19. package/dist/esm/{Popover-BaP7hJ0J.js → Popover-BGWBnVdT.js} +1 -1
  20. package/dist/esm/{SlideDeck-CpWGHFVE.js → SlideDeck-NtKwXHq5.js} +1 -1
  21. package/dist/esm/{TableOfContents-888D-B0V.js → TableOfContents-DBBkdhlJ.js} +1 -1
  22. package/dist/esm/{Tooltip-CNWDFJKv.js → Tooltip-DaBTZZ8j.js} +1 -1
  23. package/dist/esm/{UserCodeEditor-C0MyUL5-.js → UserCodeEditor-DdyfLlQs.js} +2 -2
  24. package/dist/esm/{VirtualizedRowsFixed-CYPaWB5L.js → VirtualizedRowsFixed-BAjhFO3R.js} +1 -1
  25. package/dist/esm/{WorksheetAsSlides-BNOZBoQY.js → WorksheetAsSlides-B5FB6vVz.js} +1 -1
  26. package/dist/esm/{WorksheetBodies-CHTN-wn9.js → WorksheetBodies-2hrTre13.js} +1 -1
  27. package/dist/esm/{WorksheetContents-IN63vuWT.js → WorksheetContents-CdM17xrm.js} +1 -1
  28. package/dist/esm/{WorksheetEditor-Hs_sWk7j.js → WorksheetEditor-HdlEcmnN.js} +1 -1
  29. package/dist/esm/{WorksheetNode-DGuKOPTt.js → WorksheetNode-C-TrJMCB.js} +1 -1
  30. package/dist/esm/{WorksheetViewer-Bt_jqHdh.js → WorksheetViewer-D0Co4NMK.js} +1 -1
  31. package/dist/esm/{architecture-YZFGNWBL-BExtdnEH.js → architecture-YZFGNWBL-Pv0ede3r.js} +1 -1
  32. package/dist/esm/{architectureDiagram-Q4EWVU46-CUhUPzlC.js → architectureDiagram-Q4EWVU46-Qs_XxOCt.js} +1 -1
  33. package/dist/esm/{blockDiagram-DXYQGD6D-DwW8YrKx.js → blockDiagram-DXYQGD6D-CG7oWqi7.js} +1 -1
  34. package/dist/esm/{c4Diagram-AHTNJAMY-DUUpakLg.js → c4Diagram-AHTNJAMY-DyGWi7Su.js} +1 -1
  35. package/dist/esm/channel-DjjqTXV9.js +1 -0
  36. package/dist/esm/{chunk-4BX2VUAB-BwFNstmG.js → chunk-4BX2VUAB-7TA7AVyu.js} +1 -1
  37. package/dist/esm/{chunk-4TB4RGXK-DV5sTBnv.js → chunk-4TB4RGXK-ChheKyYi.js} +1 -1
  38. package/dist/esm/{chunk-55IACEB6-BPJEY6mM.js → chunk-55IACEB6-BpHVIT0b.js} +1 -1
  39. package/dist/esm/{chunk-EDXVE4YY-9L7nz82K.js → chunk-EDXVE4YY-DQ25JIov.js} +1 -1
  40. package/dist/esm/{chunk-FMBD7UC4-BZMcHvFk.js → chunk-FMBD7UC4-DVZBlcm4.js} +1 -1
  41. package/dist/esm/{chunk-OYMX7WX6-COWCWylB.js → chunk-OYMX7WX6-BgiA8Wjh.js} +1 -1
  42. package/dist/esm/{chunk-QZHKN3VN-D2pIW1ss.js → chunk-QZHKN3VN-Cq1a-aN-.js} +1 -1
  43. package/dist/esm/{chunk-YZCP3GAM-D9GadUwL.js → chunk-YZCP3GAM-BDqtM1Ka.js} +1 -1
  44. package/dist/esm/{classDiagram-6PBFFD2Q-Cr8ipQ5w.js → classDiagram-6PBFFD2Q-D-xRfeAV.js} +1 -1
  45. package/dist/esm/{classDiagram-v2-HSJHXN6E-Cr8ipQ5w.js → classDiagram-v2-HSJHXN6E-D-xRfeAV.js} +1 -1
  46. package/dist/esm/clone-DCVnqO4M.js +1 -0
  47. package/dist/esm/{cose-bilkent-S5V4N54A-Dg1f2q8q.js → cose-bilkent-S5V4N54A-uYVAtvEb.js} +1 -1
  48. package/dist/esm/{dagre-KV5264BT-Drwedjf_.js → dagre-KV5264BT-CmDBeo-P.js} +1 -1
  49. package/dist/esm/{diagram-5BDNPKRD-BUvinU3I.js → diagram-5BDNPKRD-DVvj2_2u.js} +1 -1
  50. package/dist/esm/{diagram-G4DWMVQ6-D60Wox58.js → diagram-G4DWMVQ6-DYpFO01Z.js} +1 -1
  51. package/dist/esm/{diagram-MMDJMWI5-C60GB5LZ.js → diagram-MMDJMWI5-CDbT7cky.js} +1 -1
  52. package/dist/esm/{diagram-TYMM5635-CMF-zVic.js → diagram-TYMM5635-QWJ6iFCJ.js} +1 -1
  53. package/dist/esm/{erDiagram-SMLLAGMA-BmCfxmBR.js → erDiagram-SMLLAGMA-BaIhydf3.js} +1 -1
  54. package/dist/esm/{flowDiagram-DWJPFMVM-CVOjnh-h.js → flowDiagram-DWJPFMVM--s6o35x5.js} +1 -1
  55. package/dist/esm/{ganttDiagram-T4ZO3ILL-Cay-LcBr.js → ganttDiagram-T4ZO3ILL-CE7k2fwu.js} +1 -1
  56. package/dist/esm/{gitGraph-7Q5UKJZL-BIhofRTU.js → gitGraph-7Q5UKJZL-Dw9SBp3L.js} +1 -1
  57. package/dist/esm/{gitGraphDiagram-UUTBAWPF-BN1EkaA3.js → gitGraphDiagram-UUTBAWPF-VFFCKAr8.js} +1 -1
  58. package/dist/esm/{graph-XFLEVMvo.js → graph-C49NoLzy.js} +1 -1
  59. package/dist/esm/helpers.js +1 -1
  60. package/dist/esm/index-CP5vpK1A.js +1 -0
  61. package/dist/esm/{index-D4D24Np7.js → index-DmCvSgoi.js} +1 -1
  62. package/dist/esm/{info-OMHHGYJF-DMKJgJ3s.js → info-OMHHGYJF-uLTg2g1k.js} +1 -1
  63. package/dist/esm/{infoDiagram-42DDH7IO-kAZbkK9S.js → infoDiagram-42DDH7IO-DfB27x0W.js} +1 -1
  64. package/dist/esm/{ishikawaDiagram-UXIWVN3A-MtQmxrIE.js → ishikawaDiagram-UXIWVN3A-hkiElo3Y.js} +1 -1
  65. package/dist/esm/{journeyDiagram-VCZTEJTY-BuKFXeHL.js → journeyDiagram-VCZTEJTY-svJ9aZB7.js} +1 -1
  66. package/dist/esm/{kanban-definition-6JOO6SKY-pGcXhhi7.js → kanban-definition-6JOO6SKY-aCGgjGQa.js} +1 -1
  67. package/dist/esm/{layout-D9uGd7GO.js → layout-Dn6BZDTj.js} +1 -1
  68. package/dist/esm/main.js +1 -1
  69. package/dist/esm/{mermaid-parser.core-Crc-QLCi.js → mermaid-parser.core-KtTYbDqg.js} +1 -1
  70. package/dist/esm/{mermaid.core-C2hrg85i.js → mermaid.core-Crnpnced.js} +1 -1
  71. package/dist/esm/{mindmap-definition-QFDTVHPH-CtfxHH9N.js → mindmap-definition-QFDTVHPH-D0c-OxXp.js} +1 -1
  72. package/dist/esm/{packet-4T2RLAQJ-BD2Ad6jE.js → packet-4T2RLAQJ-FrKYDPbn.js} +1 -1
  73. package/dist/esm/{pie-ZZUOXDRM-Bf017PqT.js → pie-ZZUOXDRM-obOGHjHy.js} +1 -1
  74. package/dist/esm/{pieDiagram-DEJITSTG-ChBbMYd8.js → pieDiagram-DEJITSTG-Ago1dmgK.js} +1 -1
  75. package/dist/esm/{quadrantDiagram-34T5L4WZ-BNmMB-pp.js → quadrantDiagram-34T5L4WZ-f7CWEYhG.js} +1 -1
  76. package/dist/esm/{radar-PYXPWWZC-DvvZel7z.js → radar-PYXPWWZC-BEcFMluC.js} +1 -1
  77. package/dist/esm/{requirementDiagram-MS252O5E-B1RjmS2l.js → requirementDiagram-MS252O5E-B_KOoVtP.js} +1 -1
  78. package/dist/esm/{sankeyDiagram-XADWPNL6-DSuRDDHI.js → sankeyDiagram-XADWPNL6-BpENeDG-.js} +1 -1
  79. package/dist/esm/{sequenceDiagram-FGHM5R23-ByfYuCTD.js → sequenceDiagram-FGHM5R23-DjCr8k36.js} +1 -1
  80. package/dist/esm/{stateDiagram-FHFEXIEX-CMjgjvak.js → stateDiagram-FHFEXIEX-B0Hp6EQN.js} +1 -1
  81. package/dist/esm/{stateDiagram-v2-QKLJ7IA2-htYMk5r5.js → stateDiagram-v2-QKLJ7IA2-DDbvXv_Y.js} +1 -1
  82. package/dist/esm/{timeline-definition-GMOUNBTQ-COFLk0ve.js → timeline-definition-GMOUNBTQ-nYM0ar6p.js} +1 -1
  83. package/dist/esm/{treeView-SZITEDCU-Ck6yPSxL.js → treeView-SZITEDCU-BNkk4mhj.js} +1 -1
  84. package/dist/esm/{treemap-W4RFUUIX-ErJXCLFJ.js → treemap-W4RFUUIX-DWvE4iLu.js} +1 -1
  85. package/dist/esm/{types-rkDjePoL.js → types-JRcv-6PR.js} +1 -1
  86. package/dist/esm/{vennDiagram-DHZGUBPP-xxvi147V.js → vennDiagram-DHZGUBPP-CQ4yw6a2.js} +1 -1
  87. package/dist/esm/{wardley-RL74JXVD-B3jC7s0b.js → wardley-RL74JXVD-BYbSDrTb.js} +1 -1
  88. package/dist/esm/{wardleyDiagram-NUSXRM2D-CIYzWE9T.js → wardleyDiagram-NUSXRM2D-ChuA4cDu.js} +1 -1
  89. package/dist/esm/{websocket-CxbYBjHT.js → websocket-C4PinjUD.js} +1 -1
  90. package/dist/esm/{xychartDiagram-5P7HB3ND-CHfEshBW.js → xychartDiagram-5P7HB3ND-C_GW0EwI.js} +1 -1
  91. package/dist/module-types/src/components/molecules/TabsInline/TabsInlineButton.d.ts +1 -1
  92. package/dist/module-types/src/components/molecules/TabsInline/TabsInlineButtonLoader.d.ts +1 -1
  93. package/dist/module-types/src/components/molecules/TabsInline/utils.d.ts +3 -0
  94. package/package.json +2 -2
  95. package/src/styles/components/atoms/_tabs-inline.scss +7 -0
  96. package/dist/esm/channel-a8NrvAcc.js +0 -1
  97. package/dist/esm/clone-1ULLnhdV.js +0 -1
  98. package/dist/esm/index-EPJhFLhN.js +0 -1
@@ -1 +1 @@
1
- import{_ as t,l as e,c as n,K as i,a0 as s,a1 as r,a2 as o,Y as a,H as c,i as l,v as h,J as u,V as g,W as d,X as p}from"./mermaid.core-C2hrg85i.js";import{g as y}from"./chunk-FMBD7UC4-BZMcHvFk.js";import"./index-EPJhFLhN.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-B_OozOv-.js";import"./settings-BIQ7IqJl.js";import"./constants.js";import"./LoaderLayer-D9O7WqFD.js";import"./websocket-CxbYBjHT.js";import"./index-CODLgwqm.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"ably/react";import"@ably/spaces/dist/mjs/react";import"./purify.es-DBOWJxv3.js";import"./string-LeDn2fkG.js";import"./memoize-CPUrcYQl.js";var m=function(){var e=t(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),n=[1,4],i=[1,13],s=[1,12],r=[1,15],o=[1,16],a=[1,20],c=[1,19],l=[6,7,8],h=[1,26],u=[1,24],g=[1,25],d=[6,7,11],p=[1,31],y=[6,7,11,24],m=[1,6,13,16,17,20,23],f=[1,35],b=[1,36],_=[1,6,7,11,13,16,17,20,23],k=[1,38],E={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:t(function(t,e,n,i,s,r,o){var a=r.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",r[a-1].id),i.addNode(r[a-2].length,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 16:i.getLogger().info("Node: ",r[a].id),i.addNode(r[a-1].length,r[a].id,r[a].descr,r[a].type);break;case 17:i.getLogger().trace("Icon: ",r[a]),i.decorateNode({icon:r[a]});break;case 18:case 23:i.decorateNode({class:r[a]});break;case 19:i.getLogger().trace("SPACELIST");break;case 20:i.getLogger().trace("Node: ",r[a-1].id),i.addNode(0,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 21:i.getLogger().trace("Node: ",r[a].id),i.addNode(0,r[a].id,r[a].descr,r[a].type);break;case 22:i.decorateNode({icon:r[a]});break;case 27:i.getLogger().trace("node found ..",r[a-2]),this.$={id:r[a-1],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 28:this.$={id:r[a],descr:r[a],type:0};break;case 29:i.getLogger().trace("node found ..",r[a-3]),this.$={id:r[a-3],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 30:this.$=r[a-1]+r[a];break;case 31:this.$=r[a]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:i,7:[1,10],9:9,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},{6:i,9:22,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},{6:h,7:u,10:23,11:g},e(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:a,23:c}),e(d,[2,19]),e(d,[2,21],{15:30,24:p}),e(d,[2,22]),e(d,[2,23]),e(y,[2,25]),e(y,[2,26]),e(y,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:g},{1:[2,7],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},e(m,[2,14],{7:f,11:b}),e(_,[2,8]),e(_,[2,9]),e(_,[2,10]),e(d,[2,16],{15:37,24:p}),e(d,[2,17]),e(d,[2,18]),e(d,[2,20],{24:k}),e(y,[2,31]),{21:[1,39]},{22:[1,40]},e(m,[2,13],{7:f,11:b}),e(_,[2,11]),e(_,[2,12]),e(d,[2,15],{24:k}),e(y,[2,30]),{22:[1,41]},e(y,[2,27]),e(y,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:t(function(e){var n=this,i=[0],s=[],r=[null],o=[],a=this.table,c="",l=0,h=0,u=o.slice.call(arguments,1),g=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);g.setInput(e,d.yy),d.yy.lexer=g,d.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;o.push(y);var m=g.options&&g.options.ranges;function f(){var t;return"number"!=typeof(t=s.pop()||g.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t(function(t){i.length=i.length-2*t,r.length=r.length-t,o.length=o.length-t},"popStack"),t(f,"lex");for(var b,_,k,E,S,N,x,L,D={};;){if(_=i[i.length-1],this.defaultActions[_]?k=this.defaultActions[_]:(null==b&&(b=f()),k=a[_]&&a[_][b]),void 0===k||!k.length||!k[0]){var I="";for(S in L=[],a[_])this.terminals_[S]&&S>2&&L.push("'"+this.terminals_[S]+"'");I=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+L.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(I,{text:g.match,token:this.terminals_[b]||b,line:g.yylineno,loc:y,expected:L})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(k[0]){case 1:i.push(b),r.push(g.yytext),o.push(g.yylloc),i.push(k[1]),b=null,h=g.yyleng,c=g.yytext,l=g.yylineno,y=g.yylloc;break;case 2:if(N=this.productions_[k[1]][1],D.$=r[r.length-N],D._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},m&&(D._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),void 0!==(E=this.performAction.apply(D,[c,h,l,d.yy,k[1],r,o].concat(u))))return E;N&&(i=i.slice(0,-1*N*2),r=r.slice(0,-1*N),o=o.slice(0,-1*N)),i.push(this.productions_[k[1]][0]),r.push(D.$),o.push(D._$),x=a[i[i.length-2]][i[i.length-1]],i.push(x);break;case 3:return!0}}return!0},"parse")},S=function(){return{EOF:1,parseError:t(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:t(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:t(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:t(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:t(function(t){this.unput(this.match.slice(t))},"less"),pastInput:t(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:t(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var t=this.next();return t||this.lex()},"lex"),begin:t(function(t){this.conditionStack.push(t)},"begin"),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:t(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:t(function(t){this.begin(t)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(t,e,n,i){switch(n){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const n=/\n\s*/g;return e.yytext=e.yytext.replace(n,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}}();function N(){this.yy={}}return E.lexer=S,t(N,"Parser"),N.prototype=E,E.Parser=N,new N}();m.parser=m;var f=m,b=[],_=[],k=0,E={},S=t(()=>{b=[],_=[],k=0,E={}},"clear"),N=t(t=>{if(0===b.length)return null;const e=b[0].level;let n=null;for(let t=b.length-1;t>=0;t--)if(b[t].level!==e||n||(n=b[t]),b[t].level<e)throw new Error('Items without section detected, found section ("'+b[t].label+'")');return t===n?.level?null:n},"getSection"),x=t(function(){return _},"getSections"),L=t(function(){const t=[],e=x(),i=n();for(const n of e){const e={id:n.id,label:l(n.label??"",i),labelType:"markdown",isGroup:!0,ticket:n.ticket,shape:"kanbanSection",level:n.level,look:i.look};t.push(e);const s=b.filter(t=>t.parentId===n.id);for(const e of s){const s={id:e.id,parentId:n.id,label:l(e.label??"",i),labelType:"markdown",isGroup:!1,ticket:e?.ticket,priority:e?.priority,assigned:e?.assigned,icon:e?.icon,shape:"kanbanItem",level:e.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(s)}}return{nodes:t,edges:[],other:{},config:n()}},"getData"),D=t((t,e,i,s,r)=>{const o=n();let a=o.mindmap?.padding??c.mindmap.padding;switch(s){case I.ROUNDED_RECT:case I.RECT:case I.HEXAGON:a*=2}const g={id:l(e,o)||"kbn"+k++,level:t,label:l(i,o),width:o.mindmap?.maxNodeWidth??c.mindmap.maxNodeWidth,padding:a,isGroup:!1};if(void 0!==r){let t;t=r.includes("\n")?r+"\n":"{\n"+r+"\n}";const e=h(t,{schema:u});if(e.shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(g.shape=e?.shape),e?.label&&(g.label=e?.label),e?.icon&&(g.icon=e?.icon.toString()),e?.assigned&&(g.assigned=e?.assigned.toString()),e?.ticket&&(g.ticket=e?.ticket.toString()),e?.priority&&(g.priority=e?.priority)}const d=N(t);d?g.parentId=d.id||"kbn"+k++:_.push(g),b.push(g)},"addNode"),I={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},O={clear:S,addNode:D,getSections:x,getData:L,nodeType:I,getType:t((t,n)=>{switch(e.debug("In get type",t,n),t){case"[":return I.RECT;case"(":return")"===n?I.ROUNDED_RECT:I.CLOUD;case"((":return I.CIRCLE;case")":return I.CLOUD;case"))":return I.BANG;case"{{":return I.HEXAGON;default:return I.DEFAULT}},"getType"),setElementForId:t((t,e)=>{E[t]=e},"setElementForId"),decorateNode:t(t=>{if(!t)return;const e=n(),i=b[b.length-1];t.icon&&(i.icon=l(t.icon,e)),t.class&&(i.cssClasses=l(t.class,e))},"decorateNode"),type2Str:t(t=>{switch(t){case I.DEFAULT:return"no-border";case I.RECT:return"rect";case I.ROUNDED_RECT:return"rounded-rect";case I.CIRCLE:return"circle";case I.CLOUD:return"cloud";case I.BANG:return"bang";case I.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:t(()=>e,"getLogger"),getElementById:t(t=>E[t],"getElementById")},v={draw:t(async(t,l,h,u)=>{e.debug("Rendering kanban diagram\n"+t);const g=u.db.getData(),d=n();d.htmlLabels=!1;const p=i(l);for(const t of g.nodes)t.domId=`${l}-${t.id}`;const y=p.append("g");y.attr("class","sections");const m=p.append("g");m.attr("class","items");const f=g.nodes.filter(t=>t.isGroup);let b=0;const _=[];let k=25;for(const t of f){const e=d?.kanban?.sectionWidth||200;b+=1,t.x=e*b+10*(b-1)/2,t.width=e,t.y=0,t.height=3*e,t.rx=5,t.ry=5,t.cssClasses=t.cssClasses+" section-"+b;const n=await s(y,t);k=Math.max(k,n?.labelBBox?.height),_.push(n)}let E=0;for(const t of f){const e=_[E];E+=1;const n=d?.kanban?.sectionWidth||200,i=3*-n/2+k;let s=i;const a=g.nodes.filter(e=>e.parentId===t.id);for(const e of a){if(e.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");e.x=t.x,e.width=n-15;const i=(await r(m,e,{config:d})).node().getBBox();e.y=s+i.height/2,await o(e),s=e.y+i.height/2+5}const c=e.cluster.select("rect"),l=Math.max(s-i+30,50)+(k-25);c.attr("height",l)}a(void 0,p,d.mindmap?.padding??c.kanban.padding,d.mindmap?.useMaxWidth??c.kanban.useMaxWidth)},"draw")},C=t(e=>{let n="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],g(e["lineColor"+t])?e["lineColor"+t]=d(e["lineColor"+t],20):e["lineColor"+t]=p(e["lineColor"+t],20);const i=t((t,n)=>e.darkMode?p(t,n):d(t,n),"adjuster");for(let t=0;t<e.THEME_COLOR_LIMIT;t++){const s=""+(17-3*t);n+=`\n .section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} polygon, .section-${t-1} path {\n fill: ${i(e["cScale"+t],10)};\n stroke: ${i(e["cScale"+t],10)};\n\n }\n .section-${t-1} text {\n fill: ${e["cScaleLabel"+t]};\n }\n .node-icon-${t-1} {\n font-size: 40px;\n color: ${e["cScaleLabel"+t]};\n }\n .section-edge-${t-1}{\n stroke: ${e["cScale"+t]};\n }\n .edge-depth-${t-1}{\n stroke-width: ${s};\n }\n .section-${t-1} line {\n stroke: ${e["cScaleInv"+t]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n\n .kanban-ticket-link {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n text-decoration: underline;\n }\n `}return n},"genSections"),w={db:O,renderer:v,parser:f,styles:t(t=>`\n .edge {\n stroke-width: 3;\n }\n ${C(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .cluster-label, .label {\n color: ${t.textColor};\n fill: ${t.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n ${y()}\n`,"getStyles")};export{w as diagram};
1
+ import{_ as t,l as e,c as n,K as i,a0 as s,a1 as r,a2 as o,Y as a,H as c,i as l,v as h,J as u,V as g,W as d,X as p}from"./mermaid.core-Crnpnced.js";import{g as y}from"./chunk-FMBD7UC4-DVZBlcm4.js";import"./index-CP5vpK1A.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-B_OozOv-.js";import"./settings-BIQ7IqJl.js";import"./constants.js";import"./LoaderLayer-D9O7WqFD.js";import"./websocket-C4PinjUD.js";import"./index-CODLgwqm.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"ably/react";import"@ably/spaces/dist/mjs/react";import"./purify.es-DBOWJxv3.js";import"./string-LeDn2fkG.js";import"./memoize-CPUrcYQl.js";var m=function(){var e=t(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),n=[1,4],i=[1,13],s=[1,12],r=[1,15],o=[1,16],a=[1,20],c=[1,19],l=[6,7,8],h=[1,26],u=[1,24],g=[1,25],d=[6,7,11],p=[1,31],y=[6,7,11,24],m=[1,6,13,16,17,20,23],f=[1,35],b=[1,36],_=[1,6,7,11,13,16,17,20,23],k=[1,38],E={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:t(function(t,e,n,i,s,r,o){var a=r.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",r[a-1].id),i.addNode(r[a-2].length,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 16:i.getLogger().info("Node: ",r[a].id),i.addNode(r[a-1].length,r[a].id,r[a].descr,r[a].type);break;case 17:i.getLogger().trace("Icon: ",r[a]),i.decorateNode({icon:r[a]});break;case 18:case 23:i.decorateNode({class:r[a]});break;case 19:i.getLogger().trace("SPACELIST");break;case 20:i.getLogger().trace("Node: ",r[a-1].id),i.addNode(0,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 21:i.getLogger().trace("Node: ",r[a].id),i.addNode(0,r[a].id,r[a].descr,r[a].type);break;case 22:i.decorateNode({icon:r[a]});break;case 27:i.getLogger().trace("node found ..",r[a-2]),this.$={id:r[a-1],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 28:this.$={id:r[a],descr:r[a],type:0};break;case 29:i.getLogger().trace("node found ..",r[a-3]),this.$={id:r[a-3],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 30:this.$=r[a-1]+r[a];break;case 31:this.$=r[a]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:i,7:[1,10],9:9,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},{6:i,9:22,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},{6:h,7:u,10:23,11:g},e(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:a,23:c}),e(d,[2,19]),e(d,[2,21],{15:30,24:p}),e(d,[2,22]),e(d,[2,23]),e(y,[2,25]),e(y,[2,26]),e(y,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:g},{1:[2,7],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},e(m,[2,14],{7:f,11:b}),e(_,[2,8]),e(_,[2,9]),e(_,[2,10]),e(d,[2,16],{15:37,24:p}),e(d,[2,17]),e(d,[2,18]),e(d,[2,20],{24:k}),e(y,[2,31]),{21:[1,39]},{22:[1,40]},e(m,[2,13],{7:f,11:b}),e(_,[2,11]),e(_,[2,12]),e(d,[2,15],{24:k}),e(y,[2,30]),{22:[1,41]},e(y,[2,27]),e(y,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:t(function(e){var n=this,i=[0],s=[],r=[null],o=[],a=this.table,c="",l=0,h=0,u=o.slice.call(arguments,1),g=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);g.setInput(e,d.yy),d.yy.lexer=g,d.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;o.push(y);var m=g.options&&g.options.ranges;function f(){var t;return"number"!=typeof(t=s.pop()||g.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t(function(t){i.length=i.length-2*t,r.length=r.length-t,o.length=o.length-t},"popStack"),t(f,"lex");for(var b,_,k,E,S,N,x,L,D={};;){if(_=i[i.length-1],this.defaultActions[_]?k=this.defaultActions[_]:(null==b&&(b=f()),k=a[_]&&a[_][b]),void 0===k||!k.length||!k[0]){var I="";for(S in L=[],a[_])this.terminals_[S]&&S>2&&L.push("'"+this.terminals_[S]+"'");I=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+L.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(I,{text:g.match,token:this.terminals_[b]||b,line:g.yylineno,loc:y,expected:L})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(k[0]){case 1:i.push(b),r.push(g.yytext),o.push(g.yylloc),i.push(k[1]),b=null,h=g.yyleng,c=g.yytext,l=g.yylineno,y=g.yylloc;break;case 2:if(N=this.productions_[k[1]][1],D.$=r[r.length-N],D._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},m&&(D._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),void 0!==(E=this.performAction.apply(D,[c,h,l,d.yy,k[1],r,o].concat(u))))return E;N&&(i=i.slice(0,-1*N*2),r=r.slice(0,-1*N),o=o.slice(0,-1*N)),i.push(this.productions_[k[1]][0]),r.push(D.$),o.push(D._$),x=a[i[i.length-2]][i[i.length-1]],i.push(x);break;case 3:return!0}}return!0},"parse")},S=function(){return{EOF:1,parseError:t(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:t(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:t(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:t(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:t(function(t){this.unput(this.match.slice(t))},"less"),pastInput:t(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:t(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var t=this.next();return t||this.lex()},"lex"),begin:t(function(t){this.conditionStack.push(t)},"begin"),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:t(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:t(function(t){this.begin(t)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(t,e,n,i){switch(n){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const n=/\n\s*/g;return e.yytext=e.yytext.replace(n,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}}();function N(){this.yy={}}return E.lexer=S,t(N,"Parser"),N.prototype=E,E.Parser=N,new N}();m.parser=m;var f=m,b=[],_=[],k=0,E={},S=t(()=>{b=[],_=[],k=0,E={}},"clear"),N=t(t=>{if(0===b.length)return null;const e=b[0].level;let n=null;for(let t=b.length-1;t>=0;t--)if(b[t].level!==e||n||(n=b[t]),b[t].level<e)throw new Error('Items without section detected, found section ("'+b[t].label+'")');return t===n?.level?null:n},"getSection"),x=t(function(){return _},"getSections"),L=t(function(){const t=[],e=x(),i=n();for(const n of e){const e={id:n.id,label:l(n.label??"",i),labelType:"markdown",isGroup:!0,ticket:n.ticket,shape:"kanbanSection",level:n.level,look:i.look};t.push(e);const s=b.filter(t=>t.parentId===n.id);for(const e of s){const s={id:e.id,parentId:n.id,label:l(e.label??"",i),labelType:"markdown",isGroup:!1,ticket:e?.ticket,priority:e?.priority,assigned:e?.assigned,icon:e?.icon,shape:"kanbanItem",level:e.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(s)}}return{nodes:t,edges:[],other:{},config:n()}},"getData"),D=t((t,e,i,s,r)=>{const o=n();let a=o.mindmap?.padding??c.mindmap.padding;switch(s){case I.ROUNDED_RECT:case I.RECT:case I.HEXAGON:a*=2}const g={id:l(e,o)||"kbn"+k++,level:t,label:l(i,o),width:o.mindmap?.maxNodeWidth??c.mindmap.maxNodeWidth,padding:a,isGroup:!1};if(void 0!==r){let t;t=r.includes("\n")?r+"\n":"{\n"+r+"\n}";const e=h(t,{schema:u});if(e.shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(g.shape=e?.shape),e?.label&&(g.label=e?.label),e?.icon&&(g.icon=e?.icon.toString()),e?.assigned&&(g.assigned=e?.assigned.toString()),e?.ticket&&(g.ticket=e?.ticket.toString()),e?.priority&&(g.priority=e?.priority)}const d=N(t);d?g.parentId=d.id||"kbn"+k++:_.push(g),b.push(g)},"addNode"),I={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},O={clear:S,addNode:D,getSections:x,getData:L,nodeType:I,getType:t((t,n)=>{switch(e.debug("In get type",t,n),t){case"[":return I.RECT;case"(":return")"===n?I.ROUNDED_RECT:I.CLOUD;case"((":return I.CIRCLE;case")":return I.CLOUD;case"))":return I.BANG;case"{{":return I.HEXAGON;default:return I.DEFAULT}},"getType"),setElementForId:t((t,e)=>{E[t]=e},"setElementForId"),decorateNode:t(t=>{if(!t)return;const e=n(),i=b[b.length-1];t.icon&&(i.icon=l(t.icon,e)),t.class&&(i.cssClasses=l(t.class,e))},"decorateNode"),type2Str:t(t=>{switch(t){case I.DEFAULT:return"no-border";case I.RECT:return"rect";case I.ROUNDED_RECT:return"rounded-rect";case I.CIRCLE:return"circle";case I.CLOUD:return"cloud";case I.BANG:return"bang";case I.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:t(()=>e,"getLogger"),getElementById:t(t=>E[t],"getElementById")},v={draw:t(async(t,l,h,u)=>{e.debug("Rendering kanban diagram\n"+t);const g=u.db.getData(),d=n();d.htmlLabels=!1;const p=i(l);for(const t of g.nodes)t.domId=`${l}-${t.id}`;const y=p.append("g");y.attr("class","sections");const m=p.append("g");m.attr("class","items");const f=g.nodes.filter(t=>t.isGroup);let b=0;const _=[];let k=25;for(const t of f){const e=d?.kanban?.sectionWidth||200;b+=1,t.x=e*b+10*(b-1)/2,t.width=e,t.y=0,t.height=3*e,t.rx=5,t.ry=5,t.cssClasses=t.cssClasses+" section-"+b;const n=await s(y,t);k=Math.max(k,n?.labelBBox?.height),_.push(n)}let E=0;for(const t of f){const e=_[E];E+=1;const n=d?.kanban?.sectionWidth||200,i=3*-n/2+k;let s=i;const a=g.nodes.filter(e=>e.parentId===t.id);for(const e of a){if(e.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");e.x=t.x,e.width=n-15;const i=(await r(m,e,{config:d})).node().getBBox();e.y=s+i.height/2,await o(e),s=e.y+i.height/2+5}const c=e.cluster.select("rect"),l=Math.max(s-i+30,50)+(k-25);c.attr("height",l)}a(void 0,p,d.mindmap?.padding??c.kanban.padding,d.mindmap?.useMaxWidth??c.kanban.useMaxWidth)},"draw")},C=t(e=>{let n="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],g(e["lineColor"+t])?e["lineColor"+t]=d(e["lineColor"+t],20):e["lineColor"+t]=p(e["lineColor"+t],20);const i=t((t,n)=>e.darkMode?p(t,n):d(t,n),"adjuster");for(let t=0;t<e.THEME_COLOR_LIMIT;t++){const s=""+(17-3*t);n+=`\n .section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} polygon, .section-${t-1} path {\n fill: ${i(e["cScale"+t],10)};\n stroke: ${i(e["cScale"+t],10)};\n\n }\n .section-${t-1} text {\n fill: ${e["cScaleLabel"+t]};\n }\n .node-icon-${t-1} {\n font-size: 40px;\n color: ${e["cScaleLabel"+t]};\n }\n .section-edge-${t-1}{\n stroke: ${e["cScale"+t]};\n }\n .edge-depth-${t-1}{\n stroke-width: ${s};\n }\n .section-${t-1} line {\n stroke: ${e["cScaleInv"+t]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n\n .kanban-ticket-link {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n text-decoration: underline;\n }\n `}return n},"genSections"),w={db:O,renderer:v,parser:f,styles:t(t=>`\n .edge {\n stroke-width: 3;\n }\n ${C(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .cluster-label, .label {\n color: ${t.textColor};\n fill: ${t.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n ${y()}\n`,"getStyles")};export{w as diagram};
@@ -1 +1 @@
1
- import{b as e,G as n,v as r}from"./graph-XFLEVMvo.js";import{a as t,k as o,n as i,o as a,p as u,q as d,t as c,r as s,c as f,u as h,v as g,m as v}from"./_baseIteratee-DJNkOVK7.js";import{f as l,b as p,a as w,m}from"./min-Dc9VrJ6M.js";import{b,m as y}from"./map-BvlAjF4J.js";import{i as x}from"./isUndefined-DgmxjSXK.js";import{J as k,K as E,x as O,L as N,k as _,E as I,a as j,D as P,N as R,e as M,d as T,I as L,w as C,c as S,o as G,z as V,O as F}from"./memoize-CPUrcYQl.js";import{t as q}from"./toNumber-Bh_HTlSx.js";import{c as B,b as Y,f as z,r as D}from"./_baseUniq-BJKKUJ6e.js";import{i as A}from"./isSymbol-CATEdeai.js";var J=1/0;function U(e){return e?(e=q(e))===J||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function K(n){return e(n,5)}var X=Object.prototype,H=X.hasOwnProperty,Q=O(function(e,n){e=Object(e);var r=-1,t=n.length,o=t>2?n[2]:void 0;for(o&&N(n[0],n[1],o)&&(t=1);++r<t;)for(var i=n[r],a=_(i),u=-1,d=a.length;++u<d;){var c=a[u],s=e[c];(void 0===s||I(s,X[c])&&!H.call(e,c))&&(e[c]=i[c])}return e});function W(e){var n=null==e?0:e.length;return n?e[n-1]:void 0}var Z=Math.max;var $,ee=($=function(e,n,r){var o=null==e?0:e.length;if(!o)return-1;var i,a,u=null==r?0:(i=U(r),a=i%1,i==i?a?i-a:i:0);return u<0&&(u=Z(o+u,0)),B(e,t(n),u)},function(e,n,r){var i=Object(e);if(!j(e)){var a=t(n);e=o(e),n=function(e){return a(i[e],e,i)}}var u=$(e,n,r);return u>-1?i[a?e[u]:u]:void 0});function ne(e,n){return e>n}var re=Object.prototype.hasOwnProperty;function te(e,n){return null!=e&&re.call(e,n)}function oe(e,n){return null!=e&&u(e,n,te)}function ie(e,n){var r={};return n=t(n),a(e,function(e,t,o){R(r,t,n(e,t,o))}),r}function ae(e){return e&&e.length?p(e,M,ne):void 0}function ue(e,n){return e&&e.length?p(e,t(n),w):void 0}function de(e,n,r,t){if(!T(e))return e;for(var o=-1,i=(n=d(n,e)).length,a=i-1,u=e;null!=u&&++o<i;){var s=c(n[o]),f=r;if("__proto__"===s||"constructor"===s||"prototype"===s)return e;if(o!=a){var h=u[s];void 0===(f=void 0)&&(f=T(h)?h:L(n[o+1])?[]:{})}C(u,s,f),u=u[s]}return e}function ce(e,n){if(e!==n){var r=void 0!==e,t=null===e,o=e==e,i=A(e),a=void 0!==n,u=null===n,d=n==n,c=A(n);if(!u&&!c&&!i&&e>n||i&&a&&d&&!u&&!c||t&&a&&d||!r&&d||!o)return 1;if(!t&&!i&&!c&&e<n||c&&r&&o&&!t&&!i||u&&r&&o||!a&&o||!d)return-1}return 0}function se(e,n,r){n=n.length?f(n,function(e){return S(e)?function(n){return s(n,1===e.length?e[0]:e)}:e}):[M];var o=-1;return n=f(n,G(t)),function(e,n){var r=e.length;for(e.sort(n);r--;)e[r]=e[r].value;return e}(b(e,function(e,r,t){return{criteria:f(n,function(n){return n(e)}),index:++o,value:e}}),function(e,n){return function(e,n,r){for(var t=-1,o=e.criteria,i=n.criteria,a=o.length,u=r.length;++t<a;){var d=ce(o[t],i[t]);if(d)return t>=u?d:d*("desc"==r[t]?-1:1)}return e.index-n.index}(e,n,r)})}function fe(e,n){return function(e,n,r){for(var t=-1,o=n.length,i={};++t<o;){var a=n[t],u=s(e,a);r(u,a)&&de(i,d(a,e),u)}return i}(e,n,function(n,r){return h(e,r)})}var he,ge=k(E(he=function(e,n){return null==e?{}:fe(e,n)},void 0,l),he+""),ve=Math.ceil,le=Math.max;var pe=function(e,n,r){return r&&"number"!=typeof r&&N(e,n,r)&&(n=r=void 0),e=U(e),void 0===n?(n=e,e=0):n=U(n),function(e,n,r){for(var t=-1,o=le(ve((n-e)/(r||1)),0),i=Array(o);o--;)i[++t]=e,e+=r;return i}(e,n,r=void 0===r?e<n?1:-1:U(r))},we=O(function(e,n){if(null==e)return[];var r=n.length;return r>1&&N(e,n[0],n[1])?n=[]:r>2&&N(n[0],n[1],n[2])&&(n=[n[0]]),se(e,Y(n),[])}),me=0;function be(e){var n=++me;return g(e)+n}class ye{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,n=e._prev;if(n!==e)return xe(n),n}enqueue(e){var n=this._sentinel;e._prev&&e._next&&xe(e),e._next=n._next,n._next._prev=e,n._next=e,e._prev=n}toString(){for(var e=[],n=this._sentinel,r=n._prev;r!==n;)e.push(JSON.stringify(r,ke)),r=r._prev;return"["+e.join(", ")+"]"}}function xe(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function ke(e,n){if("_next"!==e&&"_prev"!==e)return n}var Ee=V(1);function Oe(e,r){if(e.nodeCount()<=1)return[];var t=function(e,r){var t=new n,o=0,i=0;v(e.nodes(),function(e){t.setNode(e,{v:e,in:0,out:0})}),v(e.edges(),function(e){var n=t.edge(e.v,e.w)||0,a=r(e),u=n+a;t.setEdge(e.v,e.w,u),i=Math.max(i,t.node(e.v).out+=a),o=Math.max(o,t.node(e.w).in+=a)});var a=pe(i+o+3).map(function(){return new ye}),u=o+1;return v(t.nodes(),function(e){_e(a,u,t.node(e))}),{graph:t,buckets:a,zeroIdx:u}}(e,r||Ee),o=function(e,n,r){var t,o=[],i=n[n.length-1],a=n[0];for(;e.nodeCount();){for(;t=a.dequeue();)Ne(e,n,r,t);for(;t=i.dequeue();)Ne(e,n,r,t);if(e.nodeCount())for(var u=n.length-2;u>0;--u)if(t=n[u].dequeue()){o=o.concat(Ne(e,n,r,t,!0));break}}return o}(t.graph,t.buckets,t.zeroIdx);return l(y(o,function(n){return e.outEdges(n.v,n.w)}))}function Ne(e,n,r,t,o){var i=o?[]:void 0;return v(e.inEdges(t.v),function(t){var a=e.edge(t),u=e.node(t.v);o&&i.push({v:t.v,w:t.w}),u.out-=a,_e(n,r,u)}),v(e.outEdges(t.v),function(t){var o=e.edge(t),i=t.w,a=e.node(i);a.in-=o,_e(n,r,a)}),e.removeNode(t.v),i}function _e(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function Ie(e){var n="greedy"===e.graph().acyclicer?Oe(e,function(e){return function(n){return e.edge(n).weight}}(e)):function(e){var n=[],r={},t={};function o(i){Object.prototype.hasOwnProperty.call(t,i)||(t[i]=!0,r[i]=!0,v(e.outEdges(i),function(e){Object.prototype.hasOwnProperty.call(r,e.w)?n.push(e):o(e.w)}),delete r[i])}return v(e.nodes(),o),n}(e);v(n,function(n){var r=e.edge(n);e.removeEdge(n),r.forwardName=n.name,r.reversed=!0,e.setEdge(n.w,n.v,r,be("rev"))})}function je(e,n,r,t){var o;do{o=be(t)}while(e.hasNode(o));return r.dummy=n,e.setNode(o,r),o}function Pe(e){var r=new n({multigraph:e.isMultigraph()}).setGraph(e.graph());return v(e.nodes(),function(n){e.children(n).length||r.setNode(n,e.node(n))}),v(e.edges(),function(n){r.setEdge(n,e.edge(n))}),r}function Re(e,n){var r,t,o=e.x,i=e.y,a=n.x-o,u=n.y-i,d=e.width/2,c=e.height/2;if(!a&&!u)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(u)*d>Math.abs(a)*c?(u<0&&(c=-c),r=c*a/u,t=c):(a<0&&(d=-d),r=d,t=d*u/a),{x:o+r,y:i+t}}function Me(e){var n=y(pe(Le(e)+1),function(){return[]});return v(e.nodes(),function(r){var t=e.node(r),o=t.rank;x(o)||(n[o][t.order]=r)}),n}function Te(e,n,r,t){var o={width:0,height:0};return arguments.length>=4&&(o.rank=r,o.order=t),je(e,"border",o,n)}function Le(e){return ae(y(e.nodes(),function(n){var r=e.node(n).rank;if(!x(r))return r}))}function Ce(e,n){return n()}function Se(e,n,r,t,o,i){var a={width:0,height:0,rank:i,borderType:n},u=o[n][i-1],d=je(e,"border",a,r);o[n][i]=d,e.setParent(d,t),u&&e.setEdge(u,d,{weight:1})}function Ge(e){var n=e.graph().rankdir.toLowerCase();"bt"!==n&&"rl"!==n||function(e){v(e.nodes(),function(n){qe(e.node(n))}),v(e.edges(),function(n){var r=e.edge(n);v(r.points,qe),Object.prototype.hasOwnProperty.call(r,"y")&&qe(r)})}(e),"lr"!==n&&"rl"!==n||(!function(e){v(e.nodes(),function(n){Be(e.node(n))}),v(e.edges(),function(n){var r=e.edge(n);v(r.points,Be),Object.prototype.hasOwnProperty.call(r,"x")&&Be(r)})}(e),Ve(e))}function Ve(e){v(e.nodes(),function(n){Fe(e.node(n))}),v(e.edges(),function(n){Fe(e.edge(n))})}function Fe(e){var n=e.width;e.width=e.height,e.height=n}function qe(e){e.y=-e.y}function Be(e){var n=e.x;e.x=e.y,e.y=n}function Ye(e){e.graph().dummyChains=[],v(e.edges(),function(n){!function(e,n){var r=n.v,t=e.node(r).rank,o=n.w,i=e.node(o).rank,a=n.name,u=e.edge(n),d=u.labelRank;if(i===t+1)return;e.removeEdge(n);var c,s,f=void 0;for(s=0,++t;t<i;++s,++t)u.points=[],c=je(e,"edge",f={width:0,height:0,edgeLabel:u,edgeObj:n,rank:t},"_d"),t===d&&(f.width=u.width,f.height=u.height,f.dummy="edge-label",f.labelpos=u.labelpos),e.setEdge(r,c,{weight:u.weight},a),0===s&&e.graph().dummyChains.push(c),r=c;e.setEdge(r,o,{weight:u.weight},a)}(e,n)})}function ze(e){var n={};v(e.sources(),function r(t){var o=e.node(t);if(Object.prototype.hasOwnProperty.call(n,t))return o.rank;n[t]=!0;var i=m(y(e.outEdges(t),function(n){return r(n.w)-e.edge(n).minlen}));return i!==Number.POSITIVE_INFINITY&&null!=i||(i=0),o.rank=i})}function De(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function Ae(e){var r,t,o=new n({directed:!1}),i=e.nodes()[0],a=e.nodeCount();for(o.setNode(i,{});Je(o,e)<a;)r=Ue(o,e),t=o.hasNode(r.v)?De(e,r):-De(e,r),Ke(o,e,t);return o}function Je(e,n){return v(e.nodes(),function r(t){v(n.nodeEdges(t),function(o){var i=o.v,a=t===i?o.w:i;e.hasNode(a)||De(n,o)||(e.setNode(a,{}),e.setEdge(t,a,{}),r(a))})}),e.nodeCount()}function Ue(e,n){return ue(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return De(n,r)})}function Ke(e,n,r){v(e.nodes(),function(e){n.node(e).rank+=r})}function Xe(e,n,r){S(n)||(n=[n]);var t=(e.isDirected()?e.successors:e.neighbors).bind(e),o=[],i={};return v(n,function(n){if(!e.hasNode(n))throw new Error("Graph does not have node: "+n);He(e,n,"post"===r,i,t,o)}),o}function He(e,n,r,t,o,i){Object.prototype.hasOwnProperty.call(t,n)||(t[n]=!0,r||i.push(n),v(o(n),function(n){He(e,n,r,t,o,i)}),r&&i.push(n))}function Qe(e){e=function(e){var r=(new n).setGraph(e.graph());return v(e.nodes(),function(n){r.setNode(n,e.node(n))}),v(e.edges(),function(n){var t=r.edge(n.v,n.w)||{weight:0,minlen:1},o=e.edge(n);r.setEdge(n.v,n.w,{weight:t.weight+o.weight,minlen:Math.max(t.minlen,o.minlen)})}),r}(e),ze(e);var r,t=Ae(e);for($e(t),We(t,e);r=nn(t);)tn(t,e,r,rn(t,e,r))}function We(e,n){var r=function(e,n){return Xe(e,n,"post")}(e,e.nodes());r=r.slice(0,r.length-1),v(r,function(r){!function(e,n,r){var t=e.node(r),o=t.parent;e.edge(r,o).cutvalue=Ze(e,n,r)}(e,n,r)})}function Ze(e,n,r){var t=e.node(r).parent,o=!0,i=n.edge(r,t),a=0;return i||(o=!1,i=n.edge(t,r)),a=i.weight,v(n.nodeEdges(r),function(i){var u,d,c=i.v===r,s=c?i.w:i.v;if(s!==t){var f=c===o,h=n.edge(i).weight;if(a+=f?h:-h,u=r,d=s,e.hasEdge(u,d)){var g=e.edge(r,s).cutvalue;a+=f?-g:g}}}),a}function $e(e,n){arguments.length<2&&(n=e.nodes()[0]),en(e,{},1,n)}function en(e,n,r,t,o){var i=r,a=e.node(t);return n[t]=!0,v(e.neighbors(t),function(o){Object.prototype.hasOwnProperty.call(n,o)||(r=en(e,n,r,o,t))}),a.low=i,a.lim=r++,o?a.parent=o:delete a.parent,r}function nn(e){return ee(e.edges(),function(n){return e.edge(n).cutvalue<0})}function rn(e,n,r){var t=r.v,o=r.w;n.hasEdge(t,o)||(t=r.w,o=r.v);var i=e.node(t),a=e.node(o),u=i,d=!1;i.lim>a.lim&&(u=a,d=!0);var c=z(n.edges(),function(n){return d===on(e,e.node(n.v),u)&&d!==on(e,e.node(n.w),u)});return ue(c,function(e){return De(n,e)})}function tn(e,n,r,t){var o=r.v,i=r.w;e.removeEdge(o,i),e.setEdge(t.v,t.w,{}),$e(e),We(e,n),function(e,n){var r=ee(e.nodes(),function(e){return!n.node(e).parent}),t=function(e,n){return Xe(e,n,"pre")}(e,r);t=t.slice(1),v(t,function(r){var t=e.node(r).parent,o=n.edge(r,t),i=!1;o||(o=n.edge(t,r),i=!0),n.node(r).rank=n.node(t).rank+(i?o.minlen:-o.minlen)})}(e,n)}function on(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function an(e){switch(e.graph().ranker){case"network-simplex":default:dn(e);break;case"tight-tree":!function(e){ze(e),Ae(e)}(e);break;case"longest-path":un(e)}}new Error,Qe.initLowLimValues=$e,Qe.initCutValues=We,Qe.calcCutValue=Ze,Qe.leaveEdge=nn,Qe.enterEdge=rn,Qe.exchangeEdges=tn;var un=ze;function dn(e){Qe(e)}function cn(e){var n=je(e,"root",{},"_root"),t=function(e){var n={};function r(t,o){var i=e.children(t);i&&i.length&&v(i,function(e){r(e,o+1)}),n[t]=o}return v(e.children(),function(e){r(e,1)}),n}(e),o=ae(r(t))-1,i=2*o+1;e.graph().nestingRoot=n,v(e.edges(),function(n){e.edge(n).minlen*=i});var a=function(e){return D(e.edges(),function(n,r){return n+e.edge(r).weight},0)}(e)+1;v(e.children(),function(r){sn(e,n,i,a,o,t,r)}),e.graph().nodeRankFactor=i}function sn(e,n,r,t,o,i,a){var u=e.children(a);if(u.length){var d=Te(e,"_bt"),c=Te(e,"_bb"),s=e.node(a);e.setParent(d,a),s.borderTop=d,e.setParent(c,a),s.borderBottom=c,v(u,function(u){sn(e,n,r,t,o,i,u);var s=e.node(u),f=s.borderTop?s.borderTop:u,h=s.borderBottom?s.borderBottom:u,g=s.borderTop?t:2*t,v=f!==h?1:o-i[a]+1;e.setEdge(d,f,{weight:g,minlen:v,nestingEdge:!0}),e.setEdge(h,c,{weight:g,minlen:v,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,d,{weight:0,minlen:o+i[a]})}else a!==n&&e.setEdge(n,a,{weight:0,minlen:r})}function fn(e,r,t){var o=function(e){var n;for(;e.hasNode(n=be("_root")););return n}(e),i=new n({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(n){return e.node(n)});return v(e.nodes(),function(n){var a=e.node(n),u=e.parent(n);(a.rank===r||a.minRank<=r&&r<=a.maxRank)&&(i.setNode(n),i.setParent(n,u||o),v(e[t](n),function(r){var t=r.v===n?r.w:r.v,o=i.edge(t,n),a=x(o)?0:o.weight;i.setEdge(t,n,{weight:e.edge(r).weight+a})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(n,{borderLeft:a.borderLeft[r],borderRight:a.borderRight[r]}))}),i}function hn(e,n){for(var r=0,t=1;t<n.length;++t)r+=gn(e,n[t-1],n[t]);return r}function gn(e,n,r){for(var t=function(e,n){return function(e,n,r){for(var t=-1,o=e.length,i=n.length,a={};++t<o;){var u=t<i?n[t]:void 0;r(a,e[t],u)}return a}(e||[],n||[],C)}(r,y(r,function(e,n){return n})),o=l(y(n,function(n){return we(y(e.outEdges(n),function(n){return{pos:t[n.w],weight:e.edge(n).weight}}),"pos")})),i=1;i<r.length;)i<<=1;var a=2*i-1;i-=1;var u=y(new Array(a),function(){return 0}),d=0;return v(o.forEach(function(e){var n=e.pos+i;u[n]+=e.weight;for(var r=0;n>0;)n%2&&(r+=u[n+1]),u[n=n-1>>1]+=e.weight;d+=e.weight*r})),d}function vn(e,n){var r={};return v(e,function(e,n){var t=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:n};x(e.barycenter)||(t.barycenter=e.barycenter,t.weight=e.weight)}),v(n.edges(),function(e){var n=r[e.v],t=r[e.w];x(n)||x(t)||(t.indegree++,n.out.push(r[e.w]))}),function(e){var n=[];function r(e){return function(n){n.merged||(x(n.barycenter)||x(e.barycenter)||n.barycenter>=e.barycenter)&&function(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight);n.weight&&(r+=n.barycenter*n.weight,t+=n.weight);e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}(e,n)}}function t(n){return function(r){r.in.push(n),0===--r.indegree&&e.push(r)}}for(;e.length;){var o=e.pop();n.push(o),v(o.in.reverse(),r(o)),v(o.out,t(o))}return y(z(n,function(e){return!e.merged}),function(e){return ge(e,["vs","i","barycenter","weight"])})}(z(r,function(e){return!e.indegree}))}function ln(e,n){var r,t=function(e,n){var r={lhs:[],rhs:[]};return v(e,function(e){n(e)?r.lhs.push(e):r.rhs.push(e)}),r}(e,function(e){return Object.prototype.hasOwnProperty.call(e,"barycenter")}),o=t.lhs,i=we(t.rhs,function(e){return-e.i}),a=[],u=0,d=0,c=0;o.sort((r=!!n,function(e,n){return e.barycenter<n.barycenter?-1:e.barycenter>n.barycenter?1:r?n.i-e.i:e.i-n.i})),c=pn(a,i,c),v(o,function(e){c+=e.vs.length,a.push(e.vs),u+=e.barycenter*e.weight,d+=e.weight,c=pn(a,i,c)});var s={vs:l(a)};return d&&(s.barycenter=u/d,s.weight=d),s}function pn(e,n,r){for(var t;n.length&&(t=W(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function wn(e,n,r,t){var o=e.children(n),i=e.node(n),a=i?i.borderLeft:void 0,u=i?i.borderRight:void 0,d={};a&&(o=z(o,function(e){return e!==a&&e!==u}));var c=function(e,n){return y(n,function(n){var r=e.inEdges(n);if(r.length){var t=D(r,function(n,r){var t=e.edge(r),o=e.node(r.v);return{sum:n.sum+t.weight*o.order,weight:n.weight+t.weight}},{sum:0,weight:0});return{v:n,barycenter:t.sum/t.weight,weight:t.weight}}return{v:n}})}(e,o);v(c,function(n){if(e.children(n.v).length){var o=wn(e,n.v,r,t);d[n.v]=o,Object.prototype.hasOwnProperty.call(o,"barycenter")&&(a=o,x((i=n).barycenter)?(i.barycenter=a.barycenter,i.weight=a.weight):(i.barycenter=(i.barycenter*i.weight+a.barycenter*a.weight)/(i.weight+a.weight),i.weight+=a.weight))}var i,a});var s=vn(c,r);!function(e,n){v(e,function(e){e.vs=l(e.vs.map(function(e){return n[e]?n[e].vs:e}))})}(s,d);var f=ln(s,t);if(a&&(f.vs=l([a,f.vs,u]),e.predecessors(a).length)){var h=e.node(e.predecessors(a)[0]),g=e.node(e.predecessors(u)[0]);Object.prototype.hasOwnProperty.call(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+h.order+g.order)/(f.weight+2),f.weight+=2}return f}function mn(e){var n=Le(e),r=bn(e,pe(1,n+1),"inEdges"),t=bn(e,pe(n-1,-1,-1),"outEdges"),o=function(e){var n={},r=z(e.nodes(),function(n){return!e.children(n).length}),t=ae(y(r,function(n){return e.node(n).rank})),o=y(pe(t+1),function(){return[]}),i=we(r,function(n){return e.node(n).rank});return v(i,function r(t){if(!oe(n,t)){n[t]=!0;var i=e.node(t);o[i.rank].push(t),v(e.successors(t),r)}}),o}(e);xn(e,o);for(var i,a=Number.POSITIVE_INFINITY,u=0,d=0;d<4;++u,++d){yn(u%2?r:t,u%4>=2);var c=hn(e,o=Me(e));c<a&&(d=0,i=K(o),a=c)}xn(e,i)}function bn(e,n,r){return y(n,function(n){return fn(e,n,r)})}function yn(e,r){var t=new n;v(e,function(e){var n=e.graph().root,o=wn(e,n,t,r);v(o.vs,function(n,r){e.node(n).order=r}),function(e,n,r){var t,o={};v(r,function(r){for(var i,a,u=e.parent(r);u;){if((i=e.parent(u))?(a=o[i],o[i]=u):(a=t,t=u),a&&a!==u)return void n.setEdge(a,u);u=i}})}(e,t,o.vs)})}function xn(e,n){v(n,function(n){v(n,function(n,r){e.node(n).order=r})})}function kn(e){var n=function(e){var n={},r=0;function t(o){var i=r;v(e.children(o),t),n[o]={low:i,lim:r++}}return v(e.children(),t),n}(e);v(e.graph().dummyChains,function(r){for(var t=e.node(r),o=t.edgeObj,i=function(e,n,r,t){var o,i,a=[],u=[],d=Math.min(n[r].low,n[t].low),c=Math.max(n[r].lim,n[t].lim);o=r;do{o=e.parent(o),a.push(o)}while(o&&(n[o].low>d||c>n[o].lim));i=o,o=t;for(;(o=e.parent(o))!==i;)u.push(o);return{path:a.concat(u.reverse()),lca:i}}(e,n,o.v,o.w),a=i.path,u=i.lca,d=0,c=a[d],s=!0;r!==o.w;){if(t=e.node(r),s){for(;(c=a[d])!==u&&e.node(c).maxRank<t.rank;)d++;c===u&&(s=!1)}if(!s){for(;d<a.length-1&&e.node(c=a[d+1]).minRank<=t.rank;)d++;c=a[d]}e.setParent(r,c),r=e.successors(r)[0]}})}function En(e,n){var r={};return D(n,function(n,t){var o=0,i=0,a=n.length,u=W(t);return v(t,function(n,d){var c=function(e,n){if(e.node(n).dummy)return ee(e.predecessors(n),function(n){return e.node(n).dummy})}(e,n),s=c?e.node(c).order:a;(c||n===u)&&(v(t.slice(i,d+1),function(n){v(e.predecessors(n),function(t){var i=e.node(t),a=i.order;!(a<o||s<a)||i.dummy&&e.node(n).dummy||On(r,t,n)})}),i=d+1,o=s)}),t}),r}function On(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var o=e[n];Object.defineProperty(o,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Nn(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function _n(e,r,t,o,i){var a={},u=function(e,r,t,o){var i=new n,a=e.graph(),u=function(e,n,r){return function(t,o,i){var a,u=t.node(o),d=t.node(i),c=0;if(c+=u.width/2,Object.prototype.hasOwnProperty.call(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":a=-u.width/2;break;case"r":a=u.width/2}if(a&&(c+=r?a:-a),a=0,c+=(u.dummy?n:e)/2,c+=(d.dummy?n:e)/2,c+=d.width/2,Object.prototype.hasOwnProperty.call(d,"labelpos"))switch(d.labelpos.toLowerCase()){case"l":a=d.width/2;break;case"r":a=-d.width/2}return a&&(c+=r?a:-a),a=0,c}}(a.nodesep,a.edgesep,o);return v(r,function(n){var r;v(n,function(n){var o=t[n];if(i.setNode(o),r){var a=t[r],d=i.edge(a,o);i.setEdge(a,o,Math.max(u(e,n,r),d||0))}r=n})}),i}(e,r,t,i),d=i?"borderLeft":"borderRight";function c(e,n){for(var r=u.nodes(),t=r.pop(),o={};t;)o[t]?e(t):(o[t]=!0,r.push(t),r=r.concat(n(t))),t=r.pop()}return c(function(e){a[e]=u.inEdges(e).reduce(function(e,n){return Math.max(e,a[n.v]+u.edge(n))},0)},u.predecessors.bind(u)),c(function(n){var r=u.outEdges(n).reduce(function(e,n){return Math.min(e,a[n.w]-u.edge(n))},Number.POSITIVE_INFINITY),t=e.node(n);r!==Number.POSITIVE_INFINITY&&t.borderType!==d&&(a[n]=Math.max(a[n],r))},u.successors.bind(u)),v(o,function(e){a[e]=a[t[e]]}),a}function In(e,n){return ue(r(n),function(n){var r,t,o=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return t=function(n,r){var t=function(e,n){return e.node(n).width}(e,r)/2;o=Math.max(n+t,o),a=Math.min(n-t,a)},null==(r=n)||P(r,i(t),_),o-a})}function jn(e){var n,t=Me(e),o=F(En(e,t),function(e,n){var r={};function t(n,t,o,i,a){var u;v(pe(t,o),function(t){u=n[t],e.node(u).dummy&&v(e.predecessors(u),function(n){var t=e.node(n);t.dummy&&(t.order<i||t.order>a)&&On(r,n,u)})})}return D(n,function(n,r){var o,i=-1,a=0;return v(r,function(u,d){if("border"===e.node(u).dummy){var c=e.predecessors(u);c.length&&(o=e.node(c[0]).order,t(r,a,d,i,o),a=d,i=o)}t(r,a,r.length,o,n.length)}),r}),r}(e,t)),i={};v(["u","d"],function(a){n="u"===a?t:r(t).reverse(),v(["l","r"],function(t){"r"===t&&(n=y(n,function(e){return r(e).reverse()}));var u=("u"===a?e.predecessors:e.successors).bind(e),d=function(e,n,r,t){var o={},i={},a={};return v(n,function(e){v(e,function(e,n){o[e]=e,i[e]=e,a[e]=n})}),v(n,function(e){var n=-1;v(e,function(e){var u=t(e);if(u.length){u=we(u,function(e){return a[e]});for(var d=(u.length-1)/2,c=Math.floor(d),s=Math.ceil(d);c<=s;++c){var f=u[c];i[e]===e&&n<a[f]&&!Nn(r,e,f)&&(i[f]=e,i[e]=o[e]=o[f],n=a[f])}}})}),{root:o,align:i}}(0,n,o,u),c=_n(e,n,d.root,d.align,"r"===t);"r"===t&&(c=ie(c,function(e){return-e})),i[a+t]=c})});var a=In(e,i);return function(e,n){var t=r(n),o=m(t),i=ae(t);v(["u","d"],function(t){v(["l","r"],function(a){var u,d=t+a,c=e[d];if(c!==n){var s=r(c);(u="l"===a?o-m(s):i-ae(s))&&(e[d]=ie(c,function(e){return e+u}))}})})}(i,a),function(e,n){return ie(e.ul,function(r,t){if(n)return e[n.toLowerCase()][t];var o=we(y(e,t));return(o[1]+o[2])/2})}(i,e.graph().align)}function Pn(e){var n,r;(function(e){var n=Me(e),r=e.graph().ranksep,t=0;v(n,function(n){var o=ae(y(n,function(n){return e.node(n).height}));v(n,function(n){e.node(n).y=t+o/2}),t+=o+r})})(e=Pe(e)),n=jn(e),r=function(n,r){e.node(r).x=n},n&&a(n,i(r))}function Rn(e,r){var t=Ce;t("layout",()=>{var r=t(" buildLayoutGraph",()=>function(e){var r=new n({multigraph:!0,compound:!0}),t=Bn(e.graph());return r.setGraph(F({},Tn,qn(t,Mn),ge(t,Ln))),v(e.nodes(),function(n){var t=Bn(e.node(n));r.setNode(n,Q(qn(t,Cn),Sn)),r.setParent(n,e.parent(n))}),v(e.edges(),function(n){var t=Bn(e.edge(n));r.setEdge(n,F({},Vn,qn(t,Gn),ge(t,Fn)))}),r}(e));t(" runLayout",()=>function(e,n){n(" makeSpaceForEdgeLabels",()=>function(e){var n=e.graph();n.ranksep/=2,v(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,"c"!==t.labelpos.toLowerCase()&&("TB"===n.rankdir||"BT"===n.rankdir?t.width+=t.labeloffset:t.height+=t.labeloffset)})}(e)),n(" removeSelfEdges",()=>function(e){v(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}(e)),n(" acyclic",()=>Ie(e)),n(" nestingGraph.run",()=>cn(e)),n(" rank",()=>an(Pe(e))),n(" injectEdgeLabelProxies",()=>function(e){v(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),o={rank:(e.node(n.w).rank-t.rank)/2+t.rank,e:n};je(e,"edge-proxy",o,"_ep")}})}(e)),n(" removeEmptyRanks",()=>function(e){var n=m(y(e.nodes(),function(n){return e.node(n).rank})),r=[];v(e.nodes(),function(t){var o=e.node(t).rank-n;r[o]||(r[o]=[]),r[o].push(t)});var t=0,o=e.graph().nodeRankFactor;v(r,function(n,r){x(n)&&r%o!==0?--t:t&&v(n,function(n){e.node(n).rank+=t})})}(e)),n(" nestingGraph.cleanup",()=>function(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,v(e.edges(),function(n){e.edge(n).nestingEdge&&e.removeEdge(n)})}(e)),n(" normalizeRanks",()=>function(e){var n=m(y(e.nodes(),function(n){return e.node(n).rank}));v(e.nodes(),function(r){var t=e.node(r);oe(t,"rank")&&(t.rank-=n)})}(e)),n(" assignRankMinMax",()=>function(e){var n=0;v(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=ae(n,t.maxRank))}),e.graph().maxRank=n}(e)),n(" removeEdgeLabelProxies",()=>function(e){v(e.nodes(),function(n){var r=e.node(n);"edge-proxy"===r.dummy&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}(e)),n(" normalize.run",()=>Ye(e)),n(" parentDummyChains",()=>kn(e)),n(" addBorderSegments",()=>function(e){v(e.children(),function n(r){var t=e.children(r),o=e.node(r);if(t.length&&v(t,n),Object.prototype.hasOwnProperty.call(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var i=o.minRank,a=o.maxRank+1;i<a;++i)Se(e,"borderLeft","_bl",r,o,i),Se(e,"borderRight","_br",r,o,i)}})}(e)),n(" order",()=>mn(e)),n(" insertSelfEdges",()=>function(e){var n=Me(e);v(n,function(n){var r=0;v(n,function(n,t){var o=e.node(n);o.order=t+r,v(o.selfEdges,function(n){je(e,"selfedge",{width:n.label.width,height:n.label.height,rank:o.rank,order:t+ ++r,e:n.e,label:n.label},"_se")}),delete o.selfEdges})})}(e)),n(" adjustCoordinateSystem",()=>function(e){var n=e.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||Ve(e)}(e)),n(" position",()=>Pn(e)),n(" positionSelfEdges",()=>function(e){v(e.nodes(),function(n){var r=e.node(n);if("selfedge"===r.dummy){var t=e.node(r.e.v),o=t.x+t.width/2,i=t.y,a=r.x-o,u=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:o+2*a/3,y:i-u},{x:o+5*a/6,y:i-u},{x:o+a,y:i},{x:o+5*a/6,y:i+u},{x:o+2*a/3,y:i+u}],r.label.x=r.x,r.label.y=r.y}})}(e)),n(" removeBorderNodes",()=>function(e){v(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),o=e.node(r.borderBottom),i=e.node(W(r.borderLeft)),a=e.node(W(r.borderRight));r.width=Math.abs(a.x-i.x),r.height=Math.abs(o.y-t.y),r.x=i.x+r.width/2,r.y=t.y+r.height/2}}),v(e.nodes(),function(n){"border"===e.node(n).dummy&&e.removeNode(n)})}(e)),n(" normalize.undo",()=>function(e){v(e.graph().dummyChains,function(n){var r,t=e.node(n),o=t.edgeLabel;for(e.setEdge(t.edgeObj,o);t.dummy;)r=e.successors(n)[0],e.removeNode(n),o.points.push({x:t.x,y:t.y}),"edge-label"===t.dummy&&(o.x=t.x,o.y=t.y,o.width=t.width,o.height=t.height),n=r,t=e.node(n)})}(e)),n(" fixupEdgeLabelCoords",()=>function(e){v(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch("l"!==r.labelpos&&"r"!==r.labelpos||(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}(e)),n(" undoCoordinateSystem",()=>Ge(e)),n(" translateGraph",()=>function(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,o=0,i=e.graph(),a=i.marginx||0,u=i.marginy||0;function d(e){var i=e.x,a=e.y,u=e.width,d=e.height;n=Math.min(n,i-u/2),r=Math.max(r,i+u/2),t=Math.min(t,a-d/2),o=Math.max(o,a+d/2)}v(e.nodes(),function(n){d(e.node(n))}),v(e.edges(),function(n){var r=e.edge(n);Object.prototype.hasOwnProperty.call(r,"x")&&d(r)}),n-=a,t-=u,v(e.nodes(),function(r){var o=e.node(r);o.x-=n,o.y-=t}),v(e.edges(),function(r){var o=e.edge(r);v(o.points,function(e){e.x-=n,e.y-=t}),Object.prototype.hasOwnProperty.call(o,"x")&&(o.x-=n),Object.prototype.hasOwnProperty.call(o,"y")&&(o.y-=t)}),i.width=r-n+a,i.height=o-t+u}(e)),n(" assignNodeIntersects",()=>function(e){v(e.edges(),function(n){var r,t,o=e.edge(n),i=e.node(n.v),a=e.node(n.w);o.points?(r=o.points[0],t=o.points[o.points.length-1]):(o.points=[],r=a,t=i),o.points.unshift(Re(i,r)),o.points.push(Re(a,t))})}(e)),n(" reversePoints",()=>function(e){v(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}(e)),n(" acyclic.undo",()=>function(e){v(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}(e))}(r,t)),t(" updateInputGraph",()=>function(e,n){v(e.nodes(),function(r){var t=e.node(r),o=n.node(r);t&&(t.x=o.x,t.y=o.y,n.children(r).length&&(t.width=o.width,t.height=o.height))}),v(e.edges(),function(r){var t=e.edge(r),o=n.edge(r);t.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(t.x=o.x,t.y=o.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}(e,r))})}var Mn=["nodesep","edgesep","ranksep","marginx","marginy"],Tn={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Ln=["acyclicer","ranker","rankdir","align"],Cn=["width","height"],Sn={width:0,height:0},Gn=["minlen","weight","width","height","labeloffset"],Vn={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Fn=["labelpos"];function qn(e,n){return ie(ge(e,n),Number)}function Bn(e){var n={};return v(e,function(e,r){n[r.toLowerCase()]=e}),n}export{Rn as l};
1
+ import{b as e,G as n,v as r}from"./graph-C49NoLzy.js";import{a as t,k as o,n as i,o as a,p as u,q as d,t as c,r as s,c as f,u as h,v as g,m as v}from"./_baseIteratee-DJNkOVK7.js";import{f as l,b as p,a as w,m}from"./min-Dc9VrJ6M.js";import{b,m as y}from"./map-BvlAjF4J.js";import{i as x}from"./isUndefined-DgmxjSXK.js";import{J as k,K as E,x as O,L as N,k as _,E as I,a as j,D as P,N as R,e as M,d as T,I as L,w as C,c as S,o as G,z as V,O as F}from"./memoize-CPUrcYQl.js";import{t as q}from"./toNumber-Bh_HTlSx.js";import{c as B,b as Y,f as z,r as D}from"./_baseUniq-BJKKUJ6e.js";import{i as A}from"./isSymbol-CATEdeai.js";var J=1/0;function U(e){return e?(e=q(e))===J||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function K(n){return e(n,5)}var X=Object.prototype,H=X.hasOwnProperty,Q=O(function(e,n){e=Object(e);var r=-1,t=n.length,o=t>2?n[2]:void 0;for(o&&N(n[0],n[1],o)&&(t=1);++r<t;)for(var i=n[r],a=_(i),u=-1,d=a.length;++u<d;){var c=a[u],s=e[c];(void 0===s||I(s,X[c])&&!H.call(e,c))&&(e[c]=i[c])}return e});function W(e){var n=null==e?0:e.length;return n?e[n-1]:void 0}var Z=Math.max;var $,ee=($=function(e,n,r){var o=null==e?0:e.length;if(!o)return-1;var i,a,u=null==r?0:(i=U(r),a=i%1,i==i?a?i-a:i:0);return u<0&&(u=Z(o+u,0)),B(e,t(n),u)},function(e,n,r){var i=Object(e);if(!j(e)){var a=t(n);e=o(e),n=function(e){return a(i[e],e,i)}}var u=$(e,n,r);return u>-1?i[a?e[u]:u]:void 0});function ne(e,n){return e>n}var re=Object.prototype.hasOwnProperty;function te(e,n){return null!=e&&re.call(e,n)}function oe(e,n){return null!=e&&u(e,n,te)}function ie(e,n){var r={};return n=t(n),a(e,function(e,t,o){R(r,t,n(e,t,o))}),r}function ae(e){return e&&e.length?p(e,M,ne):void 0}function ue(e,n){return e&&e.length?p(e,t(n),w):void 0}function de(e,n,r,t){if(!T(e))return e;for(var o=-1,i=(n=d(n,e)).length,a=i-1,u=e;null!=u&&++o<i;){var s=c(n[o]),f=r;if("__proto__"===s||"constructor"===s||"prototype"===s)return e;if(o!=a){var h=u[s];void 0===(f=void 0)&&(f=T(h)?h:L(n[o+1])?[]:{})}C(u,s,f),u=u[s]}return e}function ce(e,n){if(e!==n){var r=void 0!==e,t=null===e,o=e==e,i=A(e),a=void 0!==n,u=null===n,d=n==n,c=A(n);if(!u&&!c&&!i&&e>n||i&&a&&d&&!u&&!c||t&&a&&d||!r&&d||!o)return 1;if(!t&&!i&&!c&&e<n||c&&r&&o&&!t&&!i||u&&r&&o||!a&&o||!d)return-1}return 0}function se(e,n,r){n=n.length?f(n,function(e){return S(e)?function(n){return s(n,1===e.length?e[0]:e)}:e}):[M];var o=-1;return n=f(n,G(t)),function(e,n){var r=e.length;for(e.sort(n);r--;)e[r]=e[r].value;return e}(b(e,function(e,r,t){return{criteria:f(n,function(n){return n(e)}),index:++o,value:e}}),function(e,n){return function(e,n,r){for(var t=-1,o=e.criteria,i=n.criteria,a=o.length,u=r.length;++t<a;){var d=ce(o[t],i[t]);if(d)return t>=u?d:d*("desc"==r[t]?-1:1)}return e.index-n.index}(e,n,r)})}function fe(e,n){return function(e,n,r){for(var t=-1,o=n.length,i={};++t<o;){var a=n[t],u=s(e,a);r(u,a)&&de(i,d(a,e),u)}return i}(e,n,function(n,r){return h(e,r)})}var he,ge=k(E(he=function(e,n){return null==e?{}:fe(e,n)},void 0,l),he+""),ve=Math.ceil,le=Math.max;var pe=function(e,n,r){return r&&"number"!=typeof r&&N(e,n,r)&&(n=r=void 0),e=U(e),void 0===n?(n=e,e=0):n=U(n),function(e,n,r){for(var t=-1,o=le(ve((n-e)/(r||1)),0),i=Array(o);o--;)i[++t]=e,e+=r;return i}(e,n,r=void 0===r?e<n?1:-1:U(r))},we=O(function(e,n){if(null==e)return[];var r=n.length;return r>1&&N(e,n[0],n[1])?n=[]:r>2&&N(n[0],n[1],n[2])&&(n=[n[0]]),se(e,Y(n),[])}),me=0;function be(e){var n=++me;return g(e)+n}class ye{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,n=e._prev;if(n!==e)return xe(n),n}enqueue(e){var n=this._sentinel;e._prev&&e._next&&xe(e),e._next=n._next,n._next._prev=e,n._next=e,e._prev=n}toString(){for(var e=[],n=this._sentinel,r=n._prev;r!==n;)e.push(JSON.stringify(r,ke)),r=r._prev;return"["+e.join(", ")+"]"}}function xe(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function ke(e,n){if("_next"!==e&&"_prev"!==e)return n}var Ee=V(1);function Oe(e,r){if(e.nodeCount()<=1)return[];var t=function(e,r){var t=new n,o=0,i=0;v(e.nodes(),function(e){t.setNode(e,{v:e,in:0,out:0})}),v(e.edges(),function(e){var n=t.edge(e.v,e.w)||0,a=r(e),u=n+a;t.setEdge(e.v,e.w,u),i=Math.max(i,t.node(e.v).out+=a),o=Math.max(o,t.node(e.w).in+=a)});var a=pe(i+o+3).map(function(){return new ye}),u=o+1;return v(t.nodes(),function(e){_e(a,u,t.node(e))}),{graph:t,buckets:a,zeroIdx:u}}(e,r||Ee),o=function(e,n,r){var t,o=[],i=n[n.length-1],a=n[0];for(;e.nodeCount();){for(;t=a.dequeue();)Ne(e,n,r,t);for(;t=i.dequeue();)Ne(e,n,r,t);if(e.nodeCount())for(var u=n.length-2;u>0;--u)if(t=n[u].dequeue()){o=o.concat(Ne(e,n,r,t,!0));break}}return o}(t.graph,t.buckets,t.zeroIdx);return l(y(o,function(n){return e.outEdges(n.v,n.w)}))}function Ne(e,n,r,t,o){var i=o?[]:void 0;return v(e.inEdges(t.v),function(t){var a=e.edge(t),u=e.node(t.v);o&&i.push({v:t.v,w:t.w}),u.out-=a,_e(n,r,u)}),v(e.outEdges(t.v),function(t){var o=e.edge(t),i=t.w,a=e.node(i);a.in-=o,_e(n,r,a)}),e.removeNode(t.v),i}function _e(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function Ie(e){var n="greedy"===e.graph().acyclicer?Oe(e,function(e){return function(n){return e.edge(n).weight}}(e)):function(e){var n=[],r={},t={};function o(i){Object.prototype.hasOwnProperty.call(t,i)||(t[i]=!0,r[i]=!0,v(e.outEdges(i),function(e){Object.prototype.hasOwnProperty.call(r,e.w)?n.push(e):o(e.w)}),delete r[i])}return v(e.nodes(),o),n}(e);v(n,function(n){var r=e.edge(n);e.removeEdge(n),r.forwardName=n.name,r.reversed=!0,e.setEdge(n.w,n.v,r,be("rev"))})}function je(e,n,r,t){var o;do{o=be(t)}while(e.hasNode(o));return r.dummy=n,e.setNode(o,r),o}function Pe(e){var r=new n({multigraph:e.isMultigraph()}).setGraph(e.graph());return v(e.nodes(),function(n){e.children(n).length||r.setNode(n,e.node(n))}),v(e.edges(),function(n){r.setEdge(n,e.edge(n))}),r}function Re(e,n){var r,t,o=e.x,i=e.y,a=n.x-o,u=n.y-i,d=e.width/2,c=e.height/2;if(!a&&!u)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(u)*d>Math.abs(a)*c?(u<0&&(c=-c),r=c*a/u,t=c):(a<0&&(d=-d),r=d,t=d*u/a),{x:o+r,y:i+t}}function Me(e){var n=y(pe(Le(e)+1),function(){return[]});return v(e.nodes(),function(r){var t=e.node(r),o=t.rank;x(o)||(n[o][t.order]=r)}),n}function Te(e,n,r,t){var o={width:0,height:0};return arguments.length>=4&&(o.rank=r,o.order=t),je(e,"border",o,n)}function Le(e){return ae(y(e.nodes(),function(n){var r=e.node(n).rank;if(!x(r))return r}))}function Ce(e,n){return n()}function Se(e,n,r,t,o,i){var a={width:0,height:0,rank:i,borderType:n},u=o[n][i-1],d=je(e,"border",a,r);o[n][i]=d,e.setParent(d,t),u&&e.setEdge(u,d,{weight:1})}function Ge(e){var n=e.graph().rankdir.toLowerCase();"bt"!==n&&"rl"!==n||function(e){v(e.nodes(),function(n){qe(e.node(n))}),v(e.edges(),function(n){var r=e.edge(n);v(r.points,qe),Object.prototype.hasOwnProperty.call(r,"y")&&qe(r)})}(e),"lr"!==n&&"rl"!==n||(!function(e){v(e.nodes(),function(n){Be(e.node(n))}),v(e.edges(),function(n){var r=e.edge(n);v(r.points,Be),Object.prototype.hasOwnProperty.call(r,"x")&&Be(r)})}(e),Ve(e))}function Ve(e){v(e.nodes(),function(n){Fe(e.node(n))}),v(e.edges(),function(n){Fe(e.edge(n))})}function Fe(e){var n=e.width;e.width=e.height,e.height=n}function qe(e){e.y=-e.y}function Be(e){var n=e.x;e.x=e.y,e.y=n}function Ye(e){e.graph().dummyChains=[],v(e.edges(),function(n){!function(e,n){var r=n.v,t=e.node(r).rank,o=n.w,i=e.node(o).rank,a=n.name,u=e.edge(n),d=u.labelRank;if(i===t+1)return;e.removeEdge(n);var c,s,f=void 0;for(s=0,++t;t<i;++s,++t)u.points=[],c=je(e,"edge",f={width:0,height:0,edgeLabel:u,edgeObj:n,rank:t},"_d"),t===d&&(f.width=u.width,f.height=u.height,f.dummy="edge-label",f.labelpos=u.labelpos),e.setEdge(r,c,{weight:u.weight},a),0===s&&e.graph().dummyChains.push(c),r=c;e.setEdge(r,o,{weight:u.weight},a)}(e,n)})}function ze(e){var n={};v(e.sources(),function r(t){var o=e.node(t);if(Object.prototype.hasOwnProperty.call(n,t))return o.rank;n[t]=!0;var i=m(y(e.outEdges(t),function(n){return r(n.w)-e.edge(n).minlen}));return i!==Number.POSITIVE_INFINITY&&null!=i||(i=0),o.rank=i})}function De(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function Ae(e){var r,t,o=new n({directed:!1}),i=e.nodes()[0],a=e.nodeCount();for(o.setNode(i,{});Je(o,e)<a;)r=Ue(o,e),t=o.hasNode(r.v)?De(e,r):-De(e,r),Ke(o,e,t);return o}function Je(e,n){return v(e.nodes(),function r(t){v(n.nodeEdges(t),function(o){var i=o.v,a=t===i?o.w:i;e.hasNode(a)||De(n,o)||(e.setNode(a,{}),e.setEdge(t,a,{}),r(a))})}),e.nodeCount()}function Ue(e,n){return ue(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return De(n,r)})}function Ke(e,n,r){v(e.nodes(),function(e){n.node(e).rank+=r})}function Xe(e,n,r){S(n)||(n=[n]);var t=(e.isDirected()?e.successors:e.neighbors).bind(e),o=[],i={};return v(n,function(n){if(!e.hasNode(n))throw new Error("Graph does not have node: "+n);He(e,n,"post"===r,i,t,o)}),o}function He(e,n,r,t,o,i){Object.prototype.hasOwnProperty.call(t,n)||(t[n]=!0,r||i.push(n),v(o(n),function(n){He(e,n,r,t,o,i)}),r&&i.push(n))}function Qe(e){e=function(e){var r=(new n).setGraph(e.graph());return v(e.nodes(),function(n){r.setNode(n,e.node(n))}),v(e.edges(),function(n){var t=r.edge(n.v,n.w)||{weight:0,minlen:1},o=e.edge(n);r.setEdge(n.v,n.w,{weight:t.weight+o.weight,minlen:Math.max(t.minlen,o.minlen)})}),r}(e),ze(e);var r,t=Ae(e);for($e(t),We(t,e);r=nn(t);)tn(t,e,r,rn(t,e,r))}function We(e,n){var r=function(e,n){return Xe(e,n,"post")}(e,e.nodes());r=r.slice(0,r.length-1),v(r,function(r){!function(e,n,r){var t=e.node(r),o=t.parent;e.edge(r,o).cutvalue=Ze(e,n,r)}(e,n,r)})}function Ze(e,n,r){var t=e.node(r).parent,o=!0,i=n.edge(r,t),a=0;return i||(o=!1,i=n.edge(t,r)),a=i.weight,v(n.nodeEdges(r),function(i){var u,d,c=i.v===r,s=c?i.w:i.v;if(s!==t){var f=c===o,h=n.edge(i).weight;if(a+=f?h:-h,u=r,d=s,e.hasEdge(u,d)){var g=e.edge(r,s).cutvalue;a+=f?-g:g}}}),a}function $e(e,n){arguments.length<2&&(n=e.nodes()[0]),en(e,{},1,n)}function en(e,n,r,t,o){var i=r,a=e.node(t);return n[t]=!0,v(e.neighbors(t),function(o){Object.prototype.hasOwnProperty.call(n,o)||(r=en(e,n,r,o,t))}),a.low=i,a.lim=r++,o?a.parent=o:delete a.parent,r}function nn(e){return ee(e.edges(),function(n){return e.edge(n).cutvalue<0})}function rn(e,n,r){var t=r.v,o=r.w;n.hasEdge(t,o)||(t=r.w,o=r.v);var i=e.node(t),a=e.node(o),u=i,d=!1;i.lim>a.lim&&(u=a,d=!0);var c=z(n.edges(),function(n){return d===on(e,e.node(n.v),u)&&d!==on(e,e.node(n.w),u)});return ue(c,function(e){return De(n,e)})}function tn(e,n,r,t){var o=r.v,i=r.w;e.removeEdge(o,i),e.setEdge(t.v,t.w,{}),$e(e),We(e,n),function(e,n){var r=ee(e.nodes(),function(e){return!n.node(e).parent}),t=function(e,n){return Xe(e,n,"pre")}(e,r);t=t.slice(1),v(t,function(r){var t=e.node(r).parent,o=n.edge(r,t),i=!1;o||(o=n.edge(t,r),i=!0),n.node(r).rank=n.node(t).rank+(i?o.minlen:-o.minlen)})}(e,n)}function on(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function an(e){switch(e.graph().ranker){case"network-simplex":default:dn(e);break;case"tight-tree":!function(e){ze(e),Ae(e)}(e);break;case"longest-path":un(e)}}new Error,Qe.initLowLimValues=$e,Qe.initCutValues=We,Qe.calcCutValue=Ze,Qe.leaveEdge=nn,Qe.enterEdge=rn,Qe.exchangeEdges=tn;var un=ze;function dn(e){Qe(e)}function cn(e){var n=je(e,"root",{},"_root"),t=function(e){var n={};function r(t,o){var i=e.children(t);i&&i.length&&v(i,function(e){r(e,o+1)}),n[t]=o}return v(e.children(),function(e){r(e,1)}),n}(e),o=ae(r(t))-1,i=2*o+1;e.graph().nestingRoot=n,v(e.edges(),function(n){e.edge(n).minlen*=i});var a=function(e){return D(e.edges(),function(n,r){return n+e.edge(r).weight},0)}(e)+1;v(e.children(),function(r){sn(e,n,i,a,o,t,r)}),e.graph().nodeRankFactor=i}function sn(e,n,r,t,o,i,a){var u=e.children(a);if(u.length){var d=Te(e,"_bt"),c=Te(e,"_bb"),s=e.node(a);e.setParent(d,a),s.borderTop=d,e.setParent(c,a),s.borderBottom=c,v(u,function(u){sn(e,n,r,t,o,i,u);var s=e.node(u),f=s.borderTop?s.borderTop:u,h=s.borderBottom?s.borderBottom:u,g=s.borderTop?t:2*t,v=f!==h?1:o-i[a]+1;e.setEdge(d,f,{weight:g,minlen:v,nestingEdge:!0}),e.setEdge(h,c,{weight:g,minlen:v,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,d,{weight:0,minlen:o+i[a]})}else a!==n&&e.setEdge(n,a,{weight:0,minlen:r})}function fn(e,r,t){var o=function(e){var n;for(;e.hasNode(n=be("_root")););return n}(e),i=new n({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(n){return e.node(n)});return v(e.nodes(),function(n){var a=e.node(n),u=e.parent(n);(a.rank===r||a.minRank<=r&&r<=a.maxRank)&&(i.setNode(n),i.setParent(n,u||o),v(e[t](n),function(r){var t=r.v===n?r.w:r.v,o=i.edge(t,n),a=x(o)?0:o.weight;i.setEdge(t,n,{weight:e.edge(r).weight+a})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(n,{borderLeft:a.borderLeft[r],borderRight:a.borderRight[r]}))}),i}function hn(e,n){for(var r=0,t=1;t<n.length;++t)r+=gn(e,n[t-1],n[t]);return r}function gn(e,n,r){for(var t=function(e,n){return function(e,n,r){for(var t=-1,o=e.length,i=n.length,a={};++t<o;){var u=t<i?n[t]:void 0;r(a,e[t],u)}return a}(e||[],n||[],C)}(r,y(r,function(e,n){return n})),o=l(y(n,function(n){return we(y(e.outEdges(n),function(n){return{pos:t[n.w],weight:e.edge(n).weight}}),"pos")})),i=1;i<r.length;)i<<=1;var a=2*i-1;i-=1;var u=y(new Array(a),function(){return 0}),d=0;return v(o.forEach(function(e){var n=e.pos+i;u[n]+=e.weight;for(var r=0;n>0;)n%2&&(r+=u[n+1]),u[n=n-1>>1]+=e.weight;d+=e.weight*r})),d}function vn(e,n){var r={};return v(e,function(e,n){var t=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:n};x(e.barycenter)||(t.barycenter=e.barycenter,t.weight=e.weight)}),v(n.edges(),function(e){var n=r[e.v],t=r[e.w];x(n)||x(t)||(t.indegree++,n.out.push(r[e.w]))}),function(e){var n=[];function r(e){return function(n){n.merged||(x(n.barycenter)||x(e.barycenter)||n.barycenter>=e.barycenter)&&function(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight);n.weight&&(r+=n.barycenter*n.weight,t+=n.weight);e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}(e,n)}}function t(n){return function(r){r.in.push(n),0===--r.indegree&&e.push(r)}}for(;e.length;){var o=e.pop();n.push(o),v(o.in.reverse(),r(o)),v(o.out,t(o))}return y(z(n,function(e){return!e.merged}),function(e){return ge(e,["vs","i","barycenter","weight"])})}(z(r,function(e){return!e.indegree}))}function ln(e,n){var r,t=function(e,n){var r={lhs:[],rhs:[]};return v(e,function(e){n(e)?r.lhs.push(e):r.rhs.push(e)}),r}(e,function(e){return Object.prototype.hasOwnProperty.call(e,"barycenter")}),o=t.lhs,i=we(t.rhs,function(e){return-e.i}),a=[],u=0,d=0,c=0;o.sort((r=!!n,function(e,n){return e.barycenter<n.barycenter?-1:e.barycenter>n.barycenter?1:r?n.i-e.i:e.i-n.i})),c=pn(a,i,c),v(o,function(e){c+=e.vs.length,a.push(e.vs),u+=e.barycenter*e.weight,d+=e.weight,c=pn(a,i,c)});var s={vs:l(a)};return d&&(s.barycenter=u/d,s.weight=d),s}function pn(e,n,r){for(var t;n.length&&(t=W(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function wn(e,n,r,t){var o=e.children(n),i=e.node(n),a=i?i.borderLeft:void 0,u=i?i.borderRight:void 0,d={};a&&(o=z(o,function(e){return e!==a&&e!==u}));var c=function(e,n){return y(n,function(n){var r=e.inEdges(n);if(r.length){var t=D(r,function(n,r){var t=e.edge(r),o=e.node(r.v);return{sum:n.sum+t.weight*o.order,weight:n.weight+t.weight}},{sum:0,weight:0});return{v:n,barycenter:t.sum/t.weight,weight:t.weight}}return{v:n}})}(e,o);v(c,function(n){if(e.children(n.v).length){var o=wn(e,n.v,r,t);d[n.v]=o,Object.prototype.hasOwnProperty.call(o,"barycenter")&&(a=o,x((i=n).barycenter)?(i.barycenter=a.barycenter,i.weight=a.weight):(i.barycenter=(i.barycenter*i.weight+a.barycenter*a.weight)/(i.weight+a.weight),i.weight+=a.weight))}var i,a});var s=vn(c,r);!function(e,n){v(e,function(e){e.vs=l(e.vs.map(function(e){return n[e]?n[e].vs:e}))})}(s,d);var f=ln(s,t);if(a&&(f.vs=l([a,f.vs,u]),e.predecessors(a).length)){var h=e.node(e.predecessors(a)[0]),g=e.node(e.predecessors(u)[0]);Object.prototype.hasOwnProperty.call(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+h.order+g.order)/(f.weight+2),f.weight+=2}return f}function mn(e){var n=Le(e),r=bn(e,pe(1,n+1),"inEdges"),t=bn(e,pe(n-1,-1,-1),"outEdges"),o=function(e){var n={},r=z(e.nodes(),function(n){return!e.children(n).length}),t=ae(y(r,function(n){return e.node(n).rank})),o=y(pe(t+1),function(){return[]}),i=we(r,function(n){return e.node(n).rank});return v(i,function r(t){if(!oe(n,t)){n[t]=!0;var i=e.node(t);o[i.rank].push(t),v(e.successors(t),r)}}),o}(e);xn(e,o);for(var i,a=Number.POSITIVE_INFINITY,u=0,d=0;d<4;++u,++d){yn(u%2?r:t,u%4>=2);var c=hn(e,o=Me(e));c<a&&(d=0,i=K(o),a=c)}xn(e,i)}function bn(e,n,r){return y(n,function(n){return fn(e,n,r)})}function yn(e,r){var t=new n;v(e,function(e){var n=e.graph().root,o=wn(e,n,t,r);v(o.vs,function(n,r){e.node(n).order=r}),function(e,n,r){var t,o={};v(r,function(r){for(var i,a,u=e.parent(r);u;){if((i=e.parent(u))?(a=o[i],o[i]=u):(a=t,t=u),a&&a!==u)return void n.setEdge(a,u);u=i}})}(e,t,o.vs)})}function xn(e,n){v(n,function(n){v(n,function(n,r){e.node(n).order=r})})}function kn(e){var n=function(e){var n={},r=0;function t(o){var i=r;v(e.children(o),t),n[o]={low:i,lim:r++}}return v(e.children(),t),n}(e);v(e.graph().dummyChains,function(r){for(var t=e.node(r),o=t.edgeObj,i=function(e,n,r,t){var o,i,a=[],u=[],d=Math.min(n[r].low,n[t].low),c=Math.max(n[r].lim,n[t].lim);o=r;do{o=e.parent(o),a.push(o)}while(o&&(n[o].low>d||c>n[o].lim));i=o,o=t;for(;(o=e.parent(o))!==i;)u.push(o);return{path:a.concat(u.reverse()),lca:i}}(e,n,o.v,o.w),a=i.path,u=i.lca,d=0,c=a[d],s=!0;r!==o.w;){if(t=e.node(r),s){for(;(c=a[d])!==u&&e.node(c).maxRank<t.rank;)d++;c===u&&(s=!1)}if(!s){for(;d<a.length-1&&e.node(c=a[d+1]).minRank<=t.rank;)d++;c=a[d]}e.setParent(r,c),r=e.successors(r)[0]}})}function En(e,n){var r={};return D(n,function(n,t){var o=0,i=0,a=n.length,u=W(t);return v(t,function(n,d){var c=function(e,n){if(e.node(n).dummy)return ee(e.predecessors(n),function(n){return e.node(n).dummy})}(e,n),s=c?e.node(c).order:a;(c||n===u)&&(v(t.slice(i,d+1),function(n){v(e.predecessors(n),function(t){var i=e.node(t),a=i.order;!(a<o||s<a)||i.dummy&&e.node(n).dummy||On(r,t,n)})}),i=d+1,o=s)}),t}),r}function On(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var o=e[n];Object.defineProperty(o,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Nn(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function _n(e,r,t,o,i){var a={},u=function(e,r,t,o){var i=new n,a=e.graph(),u=function(e,n,r){return function(t,o,i){var a,u=t.node(o),d=t.node(i),c=0;if(c+=u.width/2,Object.prototype.hasOwnProperty.call(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":a=-u.width/2;break;case"r":a=u.width/2}if(a&&(c+=r?a:-a),a=0,c+=(u.dummy?n:e)/2,c+=(d.dummy?n:e)/2,c+=d.width/2,Object.prototype.hasOwnProperty.call(d,"labelpos"))switch(d.labelpos.toLowerCase()){case"l":a=d.width/2;break;case"r":a=-d.width/2}return a&&(c+=r?a:-a),a=0,c}}(a.nodesep,a.edgesep,o);return v(r,function(n){var r;v(n,function(n){var o=t[n];if(i.setNode(o),r){var a=t[r],d=i.edge(a,o);i.setEdge(a,o,Math.max(u(e,n,r),d||0))}r=n})}),i}(e,r,t,i),d=i?"borderLeft":"borderRight";function c(e,n){for(var r=u.nodes(),t=r.pop(),o={};t;)o[t]?e(t):(o[t]=!0,r.push(t),r=r.concat(n(t))),t=r.pop()}return c(function(e){a[e]=u.inEdges(e).reduce(function(e,n){return Math.max(e,a[n.v]+u.edge(n))},0)},u.predecessors.bind(u)),c(function(n){var r=u.outEdges(n).reduce(function(e,n){return Math.min(e,a[n.w]-u.edge(n))},Number.POSITIVE_INFINITY),t=e.node(n);r!==Number.POSITIVE_INFINITY&&t.borderType!==d&&(a[n]=Math.max(a[n],r))},u.successors.bind(u)),v(o,function(e){a[e]=a[t[e]]}),a}function In(e,n){return ue(r(n),function(n){var r,t,o=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return t=function(n,r){var t=function(e,n){return e.node(n).width}(e,r)/2;o=Math.max(n+t,o),a=Math.min(n-t,a)},null==(r=n)||P(r,i(t),_),o-a})}function jn(e){var n,t=Me(e),o=F(En(e,t),function(e,n){var r={};function t(n,t,o,i,a){var u;v(pe(t,o),function(t){u=n[t],e.node(u).dummy&&v(e.predecessors(u),function(n){var t=e.node(n);t.dummy&&(t.order<i||t.order>a)&&On(r,n,u)})})}return D(n,function(n,r){var o,i=-1,a=0;return v(r,function(u,d){if("border"===e.node(u).dummy){var c=e.predecessors(u);c.length&&(o=e.node(c[0]).order,t(r,a,d,i,o),a=d,i=o)}t(r,a,r.length,o,n.length)}),r}),r}(e,t)),i={};v(["u","d"],function(a){n="u"===a?t:r(t).reverse(),v(["l","r"],function(t){"r"===t&&(n=y(n,function(e){return r(e).reverse()}));var u=("u"===a?e.predecessors:e.successors).bind(e),d=function(e,n,r,t){var o={},i={},a={};return v(n,function(e){v(e,function(e,n){o[e]=e,i[e]=e,a[e]=n})}),v(n,function(e){var n=-1;v(e,function(e){var u=t(e);if(u.length){u=we(u,function(e){return a[e]});for(var d=(u.length-1)/2,c=Math.floor(d),s=Math.ceil(d);c<=s;++c){var f=u[c];i[e]===e&&n<a[f]&&!Nn(r,e,f)&&(i[f]=e,i[e]=o[e]=o[f],n=a[f])}}})}),{root:o,align:i}}(0,n,o,u),c=_n(e,n,d.root,d.align,"r"===t);"r"===t&&(c=ie(c,function(e){return-e})),i[a+t]=c})});var a=In(e,i);return function(e,n){var t=r(n),o=m(t),i=ae(t);v(["u","d"],function(t){v(["l","r"],function(a){var u,d=t+a,c=e[d];if(c!==n){var s=r(c);(u="l"===a?o-m(s):i-ae(s))&&(e[d]=ie(c,function(e){return e+u}))}})})}(i,a),function(e,n){return ie(e.ul,function(r,t){if(n)return e[n.toLowerCase()][t];var o=we(y(e,t));return(o[1]+o[2])/2})}(i,e.graph().align)}function Pn(e){var n,r;(function(e){var n=Me(e),r=e.graph().ranksep,t=0;v(n,function(n){var o=ae(y(n,function(n){return e.node(n).height}));v(n,function(n){e.node(n).y=t+o/2}),t+=o+r})})(e=Pe(e)),n=jn(e),r=function(n,r){e.node(r).x=n},n&&a(n,i(r))}function Rn(e,r){var t=Ce;t("layout",()=>{var r=t(" buildLayoutGraph",()=>function(e){var r=new n({multigraph:!0,compound:!0}),t=Bn(e.graph());return r.setGraph(F({},Tn,qn(t,Mn),ge(t,Ln))),v(e.nodes(),function(n){var t=Bn(e.node(n));r.setNode(n,Q(qn(t,Cn),Sn)),r.setParent(n,e.parent(n))}),v(e.edges(),function(n){var t=Bn(e.edge(n));r.setEdge(n,F({},Vn,qn(t,Gn),ge(t,Fn)))}),r}(e));t(" runLayout",()=>function(e,n){n(" makeSpaceForEdgeLabels",()=>function(e){var n=e.graph();n.ranksep/=2,v(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,"c"!==t.labelpos.toLowerCase()&&("TB"===n.rankdir||"BT"===n.rankdir?t.width+=t.labeloffset:t.height+=t.labeloffset)})}(e)),n(" removeSelfEdges",()=>function(e){v(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}(e)),n(" acyclic",()=>Ie(e)),n(" nestingGraph.run",()=>cn(e)),n(" rank",()=>an(Pe(e))),n(" injectEdgeLabelProxies",()=>function(e){v(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),o={rank:(e.node(n.w).rank-t.rank)/2+t.rank,e:n};je(e,"edge-proxy",o,"_ep")}})}(e)),n(" removeEmptyRanks",()=>function(e){var n=m(y(e.nodes(),function(n){return e.node(n).rank})),r=[];v(e.nodes(),function(t){var o=e.node(t).rank-n;r[o]||(r[o]=[]),r[o].push(t)});var t=0,o=e.graph().nodeRankFactor;v(r,function(n,r){x(n)&&r%o!==0?--t:t&&v(n,function(n){e.node(n).rank+=t})})}(e)),n(" nestingGraph.cleanup",()=>function(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,v(e.edges(),function(n){e.edge(n).nestingEdge&&e.removeEdge(n)})}(e)),n(" normalizeRanks",()=>function(e){var n=m(y(e.nodes(),function(n){return e.node(n).rank}));v(e.nodes(),function(r){var t=e.node(r);oe(t,"rank")&&(t.rank-=n)})}(e)),n(" assignRankMinMax",()=>function(e){var n=0;v(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=ae(n,t.maxRank))}),e.graph().maxRank=n}(e)),n(" removeEdgeLabelProxies",()=>function(e){v(e.nodes(),function(n){var r=e.node(n);"edge-proxy"===r.dummy&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}(e)),n(" normalize.run",()=>Ye(e)),n(" parentDummyChains",()=>kn(e)),n(" addBorderSegments",()=>function(e){v(e.children(),function n(r){var t=e.children(r),o=e.node(r);if(t.length&&v(t,n),Object.prototype.hasOwnProperty.call(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var i=o.minRank,a=o.maxRank+1;i<a;++i)Se(e,"borderLeft","_bl",r,o,i),Se(e,"borderRight","_br",r,o,i)}})}(e)),n(" order",()=>mn(e)),n(" insertSelfEdges",()=>function(e){var n=Me(e);v(n,function(n){var r=0;v(n,function(n,t){var o=e.node(n);o.order=t+r,v(o.selfEdges,function(n){je(e,"selfedge",{width:n.label.width,height:n.label.height,rank:o.rank,order:t+ ++r,e:n.e,label:n.label},"_se")}),delete o.selfEdges})})}(e)),n(" adjustCoordinateSystem",()=>function(e){var n=e.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||Ve(e)}(e)),n(" position",()=>Pn(e)),n(" positionSelfEdges",()=>function(e){v(e.nodes(),function(n){var r=e.node(n);if("selfedge"===r.dummy){var t=e.node(r.e.v),o=t.x+t.width/2,i=t.y,a=r.x-o,u=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:o+2*a/3,y:i-u},{x:o+5*a/6,y:i-u},{x:o+a,y:i},{x:o+5*a/6,y:i+u},{x:o+2*a/3,y:i+u}],r.label.x=r.x,r.label.y=r.y}})}(e)),n(" removeBorderNodes",()=>function(e){v(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),o=e.node(r.borderBottom),i=e.node(W(r.borderLeft)),a=e.node(W(r.borderRight));r.width=Math.abs(a.x-i.x),r.height=Math.abs(o.y-t.y),r.x=i.x+r.width/2,r.y=t.y+r.height/2}}),v(e.nodes(),function(n){"border"===e.node(n).dummy&&e.removeNode(n)})}(e)),n(" normalize.undo",()=>function(e){v(e.graph().dummyChains,function(n){var r,t=e.node(n),o=t.edgeLabel;for(e.setEdge(t.edgeObj,o);t.dummy;)r=e.successors(n)[0],e.removeNode(n),o.points.push({x:t.x,y:t.y}),"edge-label"===t.dummy&&(o.x=t.x,o.y=t.y,o.width=t.width,o.height=t.height),n=r,t=e.node(n)})}(e)),n(" fixupEdgeLabelCoords",()=>function(e){v(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch("l"!==r.labelpos&&"r"!==r.labelpos||(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}(e)),n(" undoCoordinateSystem",()=>Ge(e)),n(" translateGraph",()=>function(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,o=0,i=e.graph(),a=i.marginx||0,u=i.marginy||0;function d(e){var i=e.x,a=e.y,u=e.width,d=e.height;n=Math.min(n,i-u/2),r=Math.max(r,i+u/2),t=Math.min(t,a-d/2),o=Math.max(o,a+d/2)}v(e.nodes(),function(n){d(e.node(n))}),v(e.edges(),function(n){var r=e.edge(n);Object.prototype.hasOwnProperty.call(r,"x")&&d(r)}),n-=a,t-=u,v(e.nodes(),function(r){var o=e.node(r);o.x-=n,o.y-=t}),v(e.edges(),function(r){var o=e.edge(r);v(o.points,function(e){e.x-=n,e.y-=t}),Object.prototype.hasOwnProperty.call(o,"x")&&(o.x-=n),Object.prototype.hasOwnProperty.call(o,"y")&&(o.y-=t)}),i.width=r-n+a,i.height=o-t+u}(e)),n(" assignNodeIntersects",()=>function(e){v(e.edges(),function(n){var r,t,o=e.edge(n),i=e.node(n.v),a=e.node(n.w);o.points?(r=o.points[0],t=o.points[o.points.length-1]):(o.points=[],r=a,t=i),o.points.unshift(Re(i,r)),o.points.push(Re(a,t))})}(e)),n(" reversePoints",()=>function(e){v(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}(e)),n(" acyclic.undo",()=>function(e){v(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}(e))}(r,t)),t(" updateInputGraph",()=>function(e,n){v(e.nodes(),function(r){var t=e.node(r),o=n.node(r);t&&(t.x=o.x,t.y=o.y,n.children(r).length&&(t.width=o.width,t.height=o.height))}),v(e.edges(),function(r){var t=e.edge(r),o=n.edge(r);t.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(t.x=o.x,t.y=o.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}(e,r))})}var Mn=["nodesep","edgesep","ranksep","marginx","marginy"],Tn={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Ln=["acyclicer","ranker","rankdir","align"],Cn=["width","height"],Sn={width:0,height:0},Gn=["minlen","weight","width","height","labeloffset"],Vn={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Fn=["labelpos"];function qn(e,n){return ie(ge(e,n),Number)}function Bn(e){var n={};return v(e,function(e,r){n[r.toLowerCase()]=e}),n}export{Rn as l};
package/dist/esm/main.js CHANGED
@@ -1 +1 @@
1
- export{aq as AiChatPanel,ar as ApplicationLoaderLayout,as as BarChart,at as Breadcrumbs,B as Button,s as ButtonAction,g as ButtonLoader,au as CardNotification,av as ChangePasswordModal,aw as CheckUnsavedChanges,N as CheckboxList,ax as CircularProgress,z as Client,ah as CodeEditor,ab as CodeViewer,C as Collapse,ay as ContestNameLinkField,ai as CopyToClipboard,az as DataGrid,aA as DataViewer,aB as DateLiteral,aC as DatePicker,aD as DayPicker,D as DetectRequestAnimationFrame,aE as Div,aF as DocumentCustomMembersContent,aG as DocumentMembersButton,aH as DocumentMembersContent,aI as Drawer,R as DrawerView,aJ as EditProfileModal,aK as EntityCreateLayout,aL as EntityLogsModal,aM as EntityUpdateLayout,aN as ErrorBoundary,a6 as FetcherLayer,aO as Field,aP as FieldDate,aQ as FieldText,aa as FirstLoginWrapper,a2 as FloatToolbar,aR as FrozenInformation,a3 as GraphvizEditor,aS as GraphvizEditorModal,a4 as GraphvizViewer,aT as HelpSection,aU as HomeLink,aV as HorizontalMenu,aW as ImageLoaderCropper,aX as ImageProfileModal,aY as ImageUploaderButton,ae as ImageUploaderModal,aZ as InformationPopover,w as Input,a_ as InputCellPhoneNumber,a0 as InputCheckbox,a$ as InputColor,K as InputDate,I as InputPassword,a5 as InputRadio,b0 as InputSelect,$ as InputTextArea,r as InputToggle,b1 as JukiI18nInitializer,b2 as JukiLoadingLayout,b3 as JukiProviders,L as LOGO_WORKSHEET_TYPE,b4 as LineChart,b5 as LinkLastPath,b6 as LoginModal,b7 as LoginUser,b8 as MainMenu,n as MdMath,t as MdMathEditor,_ as MdMathViewer,M as Modal,b9 as MonthPicker,Y as MultiSelect,ba as MultiSelectSearchable,bb as NewVersionAvailable,aj as NewlineInfo,a7 as PageNotFound,bc as PagedDataViewer,V as Pagination,bd as PawsLoadingLayout,O as Popover,P as Portal,be as PresentationToolButtons,bf as ProblemAdminActionsField,bg as ProblemCrawlerField,bh as ProblemInfo,bi as ProblemKeyField,bj as ProblemModeField,bk as ProblemNameLinkField,bl as ProblemNameModalField,bm as ProblemOwnerField,a8 as ProblemSelector,bn as ProblemStatus,bo as ProblemTypeField,ak as ProblemVerdictTag,a9 as ProblemView,bp as ProfileSubmissions,bq as ProgressMultiBar,br as ProgressSlide,bs as QuietInformation,bt as ResetPasswordModal,X as Select,bu as SignUpModal,bv as SlideDeck,bw as SortableItems,bx as SplitModal,al as SplitPane,by as SubmissionContestField,bz as SubmissionContestProblemField,bA as SubmissionDateField,bB as SubmissionLanguageField,bC as SubmissionModal,bD as SubmissionNicknameField,bE as SubmissionProblemField,bF as SubmissionRejudgeButton,bG as SubmissionRetrieveButton,bH as SubmissionTimeField,bI as SubmitView,T,bJ as Tabs,am as TabsInline,an as TabsInlineBody,bK as TabsInlineButton,bL as TabsInlineButtonLoader,bM as TagsField,ad as TextArea,J as TextHeadCell,bN as ThemeColorPalette,bO as TimePicker,bP as Timer,bQ as TimerDisplay,bR as TimerLabeled,bS as Tooltip,af as TwoActionModal,bT as TwoContentCardsLayout,bU as TwoContentLayout,bV as TwoContentSection,bW as UpsolvingInformation,ac as UserChip,a1 as UserCodeEditor,bX as UserLoaderLayout,bY as UserMyActiveSessions,bZ as UserNicknameLink,b_ as UserPreviewModal,b$ as UserProfile,c0 as UserProfileDataContent,c1 as UserProfileSettings,c2 as UserStoreProvider,c3 as UserViewLayout,c4 as UsersSelector,c5 as VerticalMenu,c6 as VirtualizedRowsFixed,c7 as WelcomeModal,c8 as WorksheetAsSlides,W as WorksheetContents,c9 as WorksheetEditor,ca as WorksheetViewer,cb as YearPicker,cc as fetcher,cd as getContestContestantsHeader,ce as getContestDateHeader,cf as getContestNameHeader,cg as getContestStatusHeader,ch as getContestTagsHeader,ci as getProblemAdminActionsHeader,cj as getProblemKeyHeader,ck as getProblemModeHeader,cl as getProblemNameHeader,cm as getProblemOwnerHeader,cn as getProblemTagsHeader,co as getProblemTypeHeader,cp as getSubmissionContestHeader,cq as getSubmissionContestProblemHeader,cr as getSubmissionDateHeader,cs as getSubmissionLanguageHeader,ct as getSubmissionMemoryHeader,cu as getSubmissionNicknameHeader,cv as getSubmissionProblemHeader,cw as getSubmissionRejudgeHeader,cx as getSubmissionTimeHeader,cy as getSubmissionVerdictHeader,cz as getUrlKey,cA as useAblyStore,A as useAnimationFrameStore,cB as useCheckAndStartServices,cC as useClickOutside,cD as useClientTrackLocation,cE as useDataViewerRequester,v as useDebounceEffect,cF as useEntityDiff,m as useFetcher,cG as useFocusTrap,u as useHandleState,cH as useHash,l as useI18nStore,G as useInjectColorTextHighlight,F as useInjectFontSize,E as useInjectTheme,cI as useInterval,cJ as useJudge,S as useJukiNotification,d as useJukiUser,cK as useJukiUserSettings,b as useKeyDown,cL as useLastPathStore,cM as useLazyLoadingStore,cN as useMatchMutate,cO as useMemoizedArray,cP as useOverflowDetector,cQ as usePageFocus,f as usePageStore,cR as usePreload,cS as usePreloadComponents,Q as usePrevious,H as useResizeDetector,p as useRouterStore,U as useSessionStorage,cT as useSoundStore,a as useStableRef,ag as useSubscribe,q as useSyncedState,cU as useTrackCursor,cV as useTrackLastPath,x as useUIStore,e as useUserStore,cW as useWebsocketStore,cX as useWindowSize}from"./index-EPJhFLhN.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-B_OozOv-.js";import"./settings-BIQ7IqJl.js";import"./constants.js";import"./LoaderLayer-D9O7WqFD.js";import"./websocket-CxbYBjHT.js";import"./index-CODLgwqm.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"ably/react";import"@ably/spaces/dist/mjs/react";
1
+ export{aq as AiChatPanel,ar as ApplicationLoaderLayout,as as BarChart,at as Breadcrumbs,B as Button,s as ButtonAction,g as ButtonLoader,au as CardNotification,av as ChangePasswordModal,aw as CheckUnsavedChanges,N as CheckboxList,ax as CircularProgress,z as Client,ah as CodeEditor,ab as CodeViewer,C as Collapse,ay as ContestNameLinkField,ai as CopyToClipboard,az as DataGrid,aA as DataViewer,aB as DateLiteral,aC as DatePicker,aD as DayPicker,D as DetectRequestAnimationFrame,aE as Div,aF as DocumentCustomMembersContent,aG as DocumentMembersButton,aH as DocumentMembersContent,aI as Drawer,R as DrawerView,aJ as EditProfileModal,aK as EntityCreateLayout,aL as EntityLogsModal,aM as EntityUpdateLayout,aN as ErrorBoundary,a6 as FetcherLayer,aO as Field,aP as FieldDate,aQ as FieldText,aa as FirstLoginWrapper,a2 as FloatToolbar,aR as FrozenInformation,a3 as GraphvizEditor,aS as GraphvizEditorModal,a4 as GraphvizViewer,aT as HelpSection,aU as HomeLink,aV as HorizontalMenu,aW as ImageLoaderCropper,aX as ImageProfileModal,aY as ImageUploaderButton,ae as ImageUploaderModal,aZ as InformationPopover,w as Input,a_ as InputCellPhoneNumber,a0 as InputCheckbox,a$ as InputColor,K as InputDate,I as InputPassword,a5 as InputRadio,b0 as InputSelect,$ as InputTextArea,r as InputToggle,b1 as JukiI18nInitializer,b2 as JukiLoadingLayout,b3 as JukiProviders,L as LOGO_WORKSHEET_TYPE,b4 as LineChart,b5 as LinkLastPath,b6 as LoginModal,b7 as LoginUser,b8 as MainMenu,n as MdMath,t as MdMathEditor,_ as MdMathViewer,M as Modal,b9 as MonthPicker,Y as MultiSelect,ba as MultiSelectSearchable,bb as NewVersionAvailable,aj as NewlineInfo,a7 as PageNotFound,bc as PagedDataViewer,V as Pagination,bd as PawsLoadingLayout,O as Popover,P as Portal,be as PresentationToolButtons,bf as ProblemAdminActionsField,bg as ProblemCrawlerField,bh as ProblemInfo,bi as ProblemKeyField,bj as ProblemModeField,bk as ProblemNameLinkField,bl as ProblemNameModalField,bm as ProblemOwnerField,a8 as ProblemSelector,bn as ProblemStatus,bo as ProblemTypeField,ak as ProblemVerdictTag,a9 as ProblemView,bp as ProfileSubmissions,bq as ProgressMultiBar,br as ProgressSlide,bs as QuietInformation,bt as ResetPasswordModal,X as Select,bu as SignUpModal,bv as SlideDeck,bw as SortableItems,bx as SplitModal,al as SplitPane,by as SubmissionContestField,bz as SubmissionContestProblemField,bA as SubmissionDateField,bB as SubmissionLanguageField,bC as SubmissionModal,bD as SubmissionNicknameField,bE as SubmissionProblemField,bF as SubmissionRejudgeButton,bG as SubmissionRetrieveButton,bH as SubmissionTimeField,bI as SubmitView,T,bJ as Tabs,am as TabsInline,an as TabsInlineBody,bK as TabsInlineButton,bL as TabsInlineButtonLoader,bM as TagsField,ad as TextArea,J as TextHeadCell,bN as ThemeColorPalette,bO as TimePicker,bP as Timer,bQ as TimerDisplay,bR as TimerLabeled,bS as Tooltip,af as TwoActionModal,bT as TwoContentCardsLayout,bU as TwoContentLayout,bV as TwoContentSection,bW as UpsolvingInformation,ac as UserChip,a1 as UserCodeEditor,bX as UserLoaderLayout,bY as UserMyActiveSessions,bZ as UserNicknameLink,b_ as UserPreviewModal,b$ as UserProfile,c0 as UserProfileDataContent,c1 as UserProfileSettings,c2 as UserStoreProvider,c3 as UserViewLayout,c4 as UsersSelector,c5 as VerticalMenu,c6 as VirtualizedRowsFixed,c7 as WelcomeModal,c8 as WorksheetAsSlides,W as WorksheetContents,c9 as WorksheetEditor,ca as WorksheetViewer,cb as YearPicker,cc as fetcher,cd as getContestContestantsHeader,ce as getContestDateHeader,cf as getContestNameHeader,cg as getContestStatusHeader,ch as getContestTagsHeader,ci as getProblemAdminActionsHeader,cj as getProblemKeyHeader,ck as getProblemModeHeader,cl as getProblemNameHeader,cm as getProblemOwnerHeader,cn as getProblemTagsHeader,co as getProblemTypeHeader,cp as getSubmissionContestHeader,cq as getSubmissionContestProblemHeader,cr as getSubmissionDateHeader,cs as getSubmissionLanguageHeader,ct as getSubmissionMemoryHeader,cu as getSubmissionNicknameHeader,cv as getSubmissionProblemHeader,cw as getSubmissionRejudgeHeader,cx as getSubmissionTimeHeader,cy as getSubmissionVerdictHeader,cz as getUrlKey,cA as useAblyStore,A as useAnimationFrameStore,cB as useCheckAndStartServices,cC as useClickOutside,cD as useClientTrackLocation,cE as useDataViewerRequester,v as useDebounceEffect,cF as useEntityDiff,m as useFetcher,cG as useFocusTrap,u as useHandleState,cH as useHash,l as useI18nStore,G as useInjectColorTextHighlight,F as useInjectFontSize,E as useInjectTheme,cI as useInterval,cJ as useJudge,S as useJukiNotification,d as useJukiUser,cK as useJukiUserSettings,b as useKeyDown,cL as useLastPathStore,cM as useLazyLoadingStore,cN as useMatchMutate,cO as useMemoizedArray,cP as useOverflowDetector,cQ as usePageFocus,f as usePageStore,cR as usePreload,cS as usePreloadComponents,Q as usePrevious,H as useResizeDetector,p as useRouterStore,U as useSessionStorage,cT as useSoundStore,a as useStableRef,ag as useSubscribe,q as useSyncedState,cU as useTrackCursor,cV as useTrackLastPath,x as useUIStore,e as useUserStore,cW as useWebsocketStore,cX as useWindowSize}from"./index-CP5vpK1A.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-B_OozOv-.js";import"./settings-BIQ7IqJl.js";import"./constants.js";import"./LoaderLayer-D9O7WqFD.js";import"./websocket-C4PinjUD.js";import"./index-CODLgwqm.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"ably/react";import"@ably/spaces/dist/mjs/react";