@leanspec/ui 0.2.21 → 0.2.23
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.
- package/dist/assets/_baseUniq-C4bkXOdh-BJ3-SRjw.js +1 -0
- package/dist/assets/{_baseUniq--5gbTAb8.js → _baseUniq-DuAmhUI0.js} +1 -1
- package/dist/assets/arc-DFohBtPV-Cpx6wOGp.js +1 -0
- package/dist/assets/{arc-4N6yDHjl.js → arc-DlFrPohT.js} +1 -1
- package/dist/assets/{architectureDiagram-VXUJARFQ-DDCzyF2V.js → architectureDiagram-VXUJARFQ-DieXp-qW.js} +1 -1
- package/dist/assets/architectureDiagram-VXUJARFQ-_R9_zrc5-D59ZHzYq.js +36 -0
- package/dist/assets/blockDiagram-VD42YOAC-CiyHYW6w-D8Afi1Q2.js +122 -0
- package/dist/assets/{blockDiagram-VD42YOAC-CqzgSlfV.js → blockDiagram-VD42YOAC-Cr1Ymz-c.js} +1 -1
- package/dist/assets/c4Diagram-YG6GDRKO-D9NuNc3r-Cre6pw7Q.js +10 -0
- package/dist/assets/{c4Diagram-YG6GDRKO-DcDDI9XD.js → c4Diagram-YG6GDRKO-w76CB7zN.js} +1 -1
- package/dist/assets/channel-C9MJ1fN1.js +1 -0
- package/dist/assets/channel-mhjF1lKa-DRGKdmbU.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-CVAs-OQz.js → chunk-4BX2VUAB-C4VXUg_9.js} +1 -1
- package/dist/assets/chunk-4BX2VUAB-D4Zhvat9-CJ2cQFgO.js +1 -0
- package/dist/assets/{chunk-55IACEB6-Dd3NjClm-icx5kZVe.js → chunk-55IACEB6-C_MzxCLx-DeYSk-O4.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-Ccr-HMFu.js → chunk-55IACEB6-DUEMD_vX.js} +1 -1
- package/dist/assets/{chunk-B4BG7PRW-xLNbTmXA.js → chunk-B4BG7PRW-DlwRLtQb.js} +1 -1
- package/dist/assets/{chunk-B4BG7PRW-DLUrgkJI-Cic_-nsr.js → chunk-B4BG7PRW-Q8H7OQ1o-CGrle4fB.js} +6 -6
- package/dist/assets/{chunk-DI55MBZ5-BsHIkgDC.js → chunk-DI55MBZ5-DqvoeGRX.js} +1 -1
- package/dist/assets/chunk-DI55MBZ5-qwPYmgAw-BDnXruql.js +220 -0
- package/dist/assets/{chunk-FMBD7UC4-6dsbMKM7-DZVEYpsF.js → chunk-FMBD7UC4-DhXvRHU3-Ck_6Dma3.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-CN5kw4_J.js → chunk-FMBD7UC4-eFjHw5gB.js} +1 -1
- package/dist/assets/chunk-QN33PNHL-CLwAcvO2-CC8RVa2u.js +1 -0
- package/dist/assets/{chunk-QN33PNHL-CHu6LVbN.js → chunk-QN33PNHL-CXXtNr0q.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-CVAEdzef-CICjYRZu.js → chunk-QZHKN3VN-3tLb49S_-7wBVjYM3.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-DOlyc5a_.js → chunk-QZHKN3VN-HkJTS77T.js} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-qgYeZfVw.js → chunk-TZMSLE5B-CC9IwurK.js} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-Cc8_PJIq-DBNHj8Jc.js → chunk-TZMSLE5B-DfaYobmr-uCvXwJUe.js} +1 -1
- package/dist/assets/classDiagram-2ON5EDUG-Dl5mwgLk.js +1 -0
- package/dist/assets/classDiagram-2ON5EDUG-xB0RyXwt-B4jZvvsf.js +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-Dl5mwgLk.js +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-xB0RyXwt-B4jZvvsf.js +1 -0
- package/dist/assets/clone-B-ElcgAC.js +1 -0
- package/dist/assets/clone-DqT6If4_-aVfgI0F6.js +1 -0
- package/dist/assets/code-block-37QAKDTI-CWOOD74I-DcBaZRtr.js +2 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-aMn5Snue.js → cose-bilkent-S5V4N54A-BYenyErH.js} +1 -1
- package/dist/assets/{cose-bilkent-S5V4N54A-0O3dLIoy-Au1JV0Hr.js → cose-bilkent-S5V4N54A-DBS7wwrE-CwpmLGLG.js} +1 -1
- package/dist/assets/{cytoscape.esm-CjI2IsL8-U70Mzu-N.js → cytoscape.esm-Cvf3sx9F-DgU3JdRZ.js} +1 -1
- package/dist/assets/{dagre-6UL2VRFP-C0nN6YID.js → dagre-6UL2VRFP-DC4sfLGs.js} +1 -1
- package/dist/assets/dagre-6UL2VRFP-Lv6cE2gX-BtLPrZf0.js +4 -0
- package/dist/assets/diagram-PSM6KHXK-8QKT-Vki-CYrLTehq.js +24 -0
- package/dist/assets/{diagram-PSM6KHXK-DhvTMswv.js → diagram-PSM6KHXK-DSaG1dLc.js} +1 -1
- package/dist/assets/diagram-QEK2KX5R-Bqh-tlSV-BSsdJ6p7.js +43 -0
- package/dist/assets/{diagram-QEK2KX5R-w4lZ6XEJ.js → diagram-QEK2KX5R-z8D6ilji.js} +1 -1
- package/dist/assets/diagram-S2PKOQOG-Csj0p-s--BSyJI4Aq.js +24 -0
- package/dist/assets/{diagram-S2PKOQOG-DOXHCu2g.js → diagram-S2PKOQOG-gFoeY1VL.js} +1 -1
- package/dist/assets/{erDiagram-Q2GNP2WA-B0P-TPNi.js → erDiagram-Q2GNP2WA-oZvzX2B_.js} +1 -1
- package/dist/assets/{erDiagram-Q2GNP2WA-CXv6THpi-Cd4jg1J5.js → erDiagram-Q2GNP2WA-sDpapMNP-BlW75l-5.js} +5 -5
- package/dist/assets/flowDiagram-NV44I4VS-CitCGiJE-2Yn6xqge.js +162 -0
- package/dist/assets/{flowDiagram-NV44I4VS-KDzE7AT1.js → flowDiagram-NV44I4VS-DNfZjFHv.js} +1 -1
- package/dist/assets/{ganttDiagram-JELNMOA3-Ce3vKfsr.js → ganttDiagram-JELNMOA3-CI7qwp_G.js} +1 -1
- package/dist/assets/{ganttDiagram-JELNMOA3-CqVYbgbk-Dm-Q7o3L.js → ganttDiagram-JELNMOA3-DAaUYzNs-CqERSUiR.js} +3 -3
- package/dist/assets/{gitGraphDiagram-NY62KEGX-DDQ3wMsb.js → gitGraphDiagram-NY62KEGX-CTRy4vBb.js} +1 -1
- package/dist/assets/gitGraphDiagram-NY62KEGX-lj732X3H-CLhZmLfE.js +65 -0
- package/dist/assets/{graph-rt_wscbL-BYOC6Zos.js → graph-Bg_3T7Ud-8p9G4Jrq.js} +1 -1
- package/dist/assets/{graph-CIQI-Qnx.js → graph-C_DQAJXv.js} +1 -1
- package/dist/assets/index-BA4_7VkX.css +1 -0
- package/dist/assets/index-BzhKcNOt.js +2548 -0
- package/dist/assets/infoDiagram-WHAUD3N6-BbjOpAi3-DFq7Zumb.js +2 -0
- package/dist/assets/{infoDiagram-WHAUD3N6-CKi2MdjK.js → infoDiagram-WHAUD3N6-BjgZuatx.js} +1 -1
- package/dist/assets/{journeyDiagram-XKPGCS4Q-BzZgPZwu-FS4BVd7N.js → journeyDiagram-XKPGCS4Q-Cx34P8cj-Cuc55qMS.js} +4 -4
- package/dist/assets/{journeyDiagram-XKPGCS4Q-C8gYN3B8.js → journeyDiagram-XKPGCS4Q-JTQBV6RS.js} +1 -1
- package/dist/assets/kanban-definition-3W4ZIXB7-BP3ykzKL-BccB0ADl.js +89 -0
- package/dist/assets/{kanban-definition-3W4ZIXB7-CJBvuSy_.js → kanban-definition-3W4ZIXB7-CB7Cc0I4.js} +1 -1
- package/dist/assets/{layout-BoDR3kQT.js → layout-BDWTKgn6.js} +1 -1
- package/dist/assets/{layout-CX9neEHw-DZXKxUst.js → layout-Bft_7Aja-CYwoLCqB.js} +1 -1
- package/dist/assets/{linear-CkUVga7d-DcwQdvDv.js → linear-BDIyMYXP-Va3gUrsu.js} +1 -1
- package/dist/assets/{min-USsdh-HW.js → min-CzDI_uFs.js} +1 -1
- package/dist/assets/min-g4o2CnuX-D41MdeNm.js +1 -0
- package/dist/assets/{mindmap-definition-VGOIOE7T-CahlRCoo.js → mindmap-definition-VGOIOE7T-BFemN0Et.js} +1 -1
- package/dist/assets/mindmap-definition-VGOIOE7T-CteUNe1z-BgC77XEX.js +68 -0
- package/dist/assets/{pieDiagram-ADFJNKIX-B3ej6Rof.js → pieDiagram-ADFJNKIX-2fKAK3CV.js} +1 -1
- package/dist/assets/pieDiagram-ADFJNKIX-COS6mtim-2rnhimKu.js +30 -0
- package/dist/assets/{quadrantDiagram-AYHSOK5B-Di2kSbDD.js → quadrantDiagram-AYHSOK5B-Del1ofYi.js} +1 -1
- package/dist/assets/quadrantDiagram-AYHSOK5B-DmRa7VCS-D5jPyfOD.js +7 -0
- package/dist/assets/{requirementDiagram-UZGBJVZJ-MnXD59Yw-DoLLmzEr.js → requirementDiagram-UZGBJVZJ-CcQIz-20-DYIFGLWB.js} +7 -7
- package/dist/assets/{requirementDiagram-UZGBJVZJ-BIKMHzOU.js → requirementDiagram-UZGBJVZJ-aYICY3Ph.js} +1 -1
- package/dist/assets/{sankeyDiagram-TZEHDZUN-B45aWneB.js → sankeyDiagram-TZEHDZUN-CSxXWX7b.js} +1 -1
- package/dist/assets/{sankeyDiagram-TZEHDZUN-Dfyu7oJ6-upd_w6uL.js → sankeyDiagram-TZEHDZUN-CpcshR0Z-Ds6_Y4XZ.js} +8 -8
- package/dist/assets/sequenceDiagram-WL72ISMW-B1iDbV8x-Ba6xj9am.js +145 -0
- package/dist/assets/{sequenceDiagram-WL72ISMW-0WGvejjk.js → sequenceDiagram-WL72ISMW-_zLrGWf3.js} +1 -1
- package/dist/assets/{stateDiagram-FKZM4ZOC-DYV-na53-BrTgUi_v.js → stateDiagram-FKZM4ZOC-DIutB6RS-BM8RqJKW.js} +1 -1
- package/dist/assets/{stateDiagram-FKZM4ZOC-CyN90BQP.js → stateDiagram-FKZM4ZOC-DOd4P3H-.js} +1 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-BKEaZomO-8zJq3ge5.js +1 -0
- package/dist/assets/stateDiagram-v2-4FDKWEC3-nRAFnllC.js +1 -0
- package/dist/assets/{timeline-definition-IT6M3QCI-B_SrPNXx.js → timeline-definition-IT6M3QCI-BKxuM11p.js} +1 -1
- package/dist/assets/timeline-definition-IT6M3QCI-D1yY4TSO-DoVTwDMg.js +61 -0
- package/dist/assets/{treemap-KMMF4GRG-Bj5u1csA.js → treemap-KMMF4GRG-ByJ02xk5.js} +1 -1
- package/dist/assets/{treemap-KMMF4GRG-l6HrdCLC-BpLaQV_H.js → treemap-KMMF4GRG-KtkxYt13-CZA1d7fY.js} +59 -59
- package/dist/assets/{xychartDiagram-PRI3JC2R-Ca3wGEm0.js → xychartDiagram-PRI3JC2R-CGA3Bi-e.js} +1 -1
- package/dist/assets/{xychartDiagram-PRI3JC2R-CkfCv2o_-BblxmbGy.js → xychartDiagram-PRI3JC2R-a_g9ptTp-BX4uGx-D.js} +3 -3
- package/dist/index.html +2 -2
- package/package.json +8 -15
- package/dist/assets/_baseUniq-KSDS6tgF-vSUSx1j2.js +0 -1
- package/dist/assets/arc-C-X5Xt_b-DxNTmc8E.js +0 -1
- package/dist/assets/architectureDiagram-VXUJARFQ-Bal8NTn4-C3CDAmmj.js +0 -36
- package/dist/assets/blockDiagram-VD42YOAC-B2gTo5wW-Chk-bWEZ.js +0 -122
- package/dist/assets/c4Diagram-YG6GDRKO-dIf_vNCY-B78U9OXb.js +0 -10
- package/dist/assets/channel-CXjddKEr.js +0 -1
- package/dist/assets/channel-klR7o7JB-D3KnrQ1u.js +0 -1
- package/dist/assets/chunk-4BX2VUAB-BQgzc1Sm-3MUJBN6J.js +0 -1
- package/dist/assets/chunk-DI55MBZ5-BwHLqSW9-Dg6tgfWJ.js +0 -220
- package/dist/assets/chunk-QN33PNHL-DHNejhbC-DbJMzG-e.js +0 -1
- package/dist/assets/classDiagram-2ON5EDUG-Cf3QVtDa.js +0 -1
- package/dist/assets/classDiagram-2ON5EDUG-D7bjndmT-0h2otGW6.js +0 -1
- package/dist/assets/classDiagram-v2-WZHVMYZB-Cf3QVtDa.js +0 -1
- package/dist/assets/classDiagram-v2-WZHVMYZB-D7bjndmT-0h2otGW6.js +0 -1
- package/dist/assets/clone-7srXemyd-DGxkCAtg.js +0 -1
- package/dist/assets/clone-DZrMJ9hz.js +0 -1
- package/dist/assets/code-block-37QAKDTI-MRm4xHKr-DLRpbM4W.js +0 -2
- package/dist/assets/dagre-6UL2VRFP-BqaZre9N-vdYA4a1q.js +0 -4
- package/dist/assets/diagram-PSM6KHXK-s2xYLlND-B6BOy07D.js +0 -24
- package/dist/assets/diagram-QEK2KX5R-D700jvoY-tTlqymfs.js +0 -43
- package/dist/assets/diagram-S2PKOQOG-BkgBSa1Q-59esupTS.js +0 -24
- package/dist/assets/flowDiagram-NV44I4VS-Dsrv00Gy-Cz-kjEu8.js +0 -162
- package/dist/assets/gitGraphDiagram-NY62KEGX-DOanbk62-D2EAn-OM.js +0 -65
- package/dist/assets/index-BXRJOAs4.js +0 -2540
- package/dist/assets/index-C5i0a-mH.css +0 -1
- package/dist/assets/infoDiagram-WHAUD3N6-Fq8ToFQ6-BmtVQ1WU.js +0 -2
- package/dist/assets/kanban-definition-3W4ZIXB7-CrmrjRAg-BJFHq-Xg.js +0 -89
- package/dist/assets/min-Ar5ebLd--DYc60i1a.js +0 -1
- package/dist/assets/mindmap-definition-VGOIOE7T-DeGZNL21-hbAsMota.js +0 -68
- package/dist/assets/pieDiagram-ADFJNKIX-C_V2NX6O-BNls6JWQ.js +0 -30
- package/dist/assets/quadrantDiagram-AYHSOK5B-B8fSnYQi-BEGj5HDN.js +0 -7
- package/dist/assets/sequenceDiagram-WL72ISMW-D2pgAoWi-CIx9uPOq.js +0 -145
- package/dist/assets/stateDiagram-v2-4FDKWEC3-Kp4sxr9o--i7eh5f-.js +0 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-yJXh1tES.js +0 -1
- package/dist/assets/timeline-definition-IT6M3QCI-621ePKJ0-i5oeWE__.js +0 -61
- /package/dist/assets/{ordinal-DfAQgscy-Pc8f3NoK.js → ordinal-B6-f3MAq-Pc8f3NoK.js} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{H as e,a as s,aP as i,ab as n,aQ as d}from"./index-BzhKcNOt.js";import{F as p}from"./treemap-KMMF4GRG-KtkxYt13-CZA1d7fY.js";import"./min-g4o2CnuX-D41MdeNm.js";import"./_baseUniq-C4bkXOdh-BJ3-SRjw.js";var m={parse:e(async a=>{const r=await p("info",a);s.debug(r)},"parse")},g={version:d.version+""},v=e(()=>g.version,"getVersion"),c={getVersion:v},f=e((a,r,o)=>{s.debug(`rendering info diagram
|
|
2
|
+
`+a);const t=i(r);n(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${o}`)},"draw"),x={draw:f},y={parser:m,db:c,renderer:x};export{y as diagram};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{bE as e,bL as s,ce as n,bM as i,cf as p}from"./index-
|
|
1
|
+
import{bE as e,bL as s,ce as n,bM as i,cf as p}from"./index-BzhKcNOt.js";import{p as g}from"./treemap-KMMF4GRG-ByJ02xk5.js";import"./min-CzDI_uFs.js";import"./_baseUniq-DuAmhUI0.js";var v={parse:e(async r=>{const a=await g("info",r);s.debug(a)},"parse")},d={version:p.version+""},c=e(()=>d.version,"getVersion"),m={getVersion:c},f=e((r,a,o)=>{s.debug(`rendering info diagram
|
|
2
2
|
`+r);const t=n(a);i(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${o}`)},"draw"),l={draw:f},y={parser:v,db:m,renderer:l};export{y as diagram};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{d as ft,y as rt,g as gt,x as mt}from"./chunk-TZMSLE5B-
|
|
1
|
+
import{d as ft,y as rt,g as gt,x as mt}from"./chunk-TZMSLE5B-DfaYobmr-uCvXwJUe.js";import{l as xt}from"./chunk-FMBD7UC4-DhXvRHU3-Ck_6Dma3.js";import{H as s,a8 as kt,a7 as bt,a9 as _t,aa as wt,ap as $t,ao as vt,b as B,a5 as X,ab as St,au as Ct}from"./index-BzhKcNOt.js";import{h as tt}from"./arc-DFohBtPV-Cpx6wOGp.js";var J=(function(){var t=s(function(y,i,a,u){for(a=a||{},u=y.length;u--;a[y[u]]=i);return a},"o"),e=[6,8,10,11,12,14,16,17,18],r=[1,9],l=[1,10],n=[1,11],c=[1,12],d=[1,13],h=[1,14],f={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(y,i,a,u,p,o,x){var k=o.length-1;switch(p){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:u.setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),u.setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),u.setAccDescription(this.$);break;case 12:u.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 13:u.addTask(o[k-1],o[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:l,14:n,16:c,17:d,18:h},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:r,12:l,14:n,16:c,17:d,18:h},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(y,i){if(i.recoverable)this.trace(y);else{var a=new Error(y);throw a.hash=i,a}},"parseError"),parse:s(function(y){var i=this,a=[0],u=[],p=[null],o=[],x=this.table,k="",E=0,j=0,ut=2,Z=1,pt=o.slice.call(arguments,1),b=Object.create(this.lexer),I={yy:{}};for(var Y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Y)&&(I.yy[Y]=this.yy[Y]);b.setInput(y,I.yy),I.yy.lexer=b,I.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var z=b.yylloc;o.push(z);var yt=b.options&&b.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function dt(w){a.length=a.length-2*w,p.length=p.length-w,o.length=o.length-w}s(dt,"popStack");function H(){var w;return w=u.pop()||b.lex()||Z,typeof w!="number"&&(w instanceof Array&&(u=w,w=u.pop()),w=i.symbols_[w]||w),w}s(H,"lex");for(var _,P,$,W,A={},D,C,K,O;;){if(P=a[a.length-1],this.defaultActions[P]?$=this.defaultActions[P]:((_===null||typeof _>"u")&&(_=H()),$=x[P]&&x[P][_]),typeof $>"u"||!$.length||!$[0]){var G="";O=[];for(D in x[P])this.terminals_[D]&&D>ut&&O.push("'"+this.terminals_[D]+"'");b.showPosition?G="Parse error on line "+(E+1)+`:
|
|
2
2
|
`+b.showPosition()+`
|
|
3
|
-
Expecting `+O.join(", ")+", got '"+(this.terminals_[_]||_)+"'":
|
|
3
|
+
Expecting `+O.join(", ")+", got '"+(this.terminals_[_]||_)+"'":G="Parse error on line "+(E+1)+": Unexpected "+(_==Z?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(G,{text:b.match,token:this.terminals_[_]||_,line:b.yylineno,loc:z,expected:O})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+_);switch($[0]){case 1:a.push(_),p.push(b.yytext),o.push(b.yylloc),a.push($[1]),_=null,j=b.yyleng,k=b.yytext,E=b.yylineno,z=b.yylloc;break;case 2:if(C=this.productions_[$[1]][1],A.$=p[p.length-C],A._$={first_line:o[o.length-(C||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(C||1)].first_column,last_column:o[o.length-1].last_column},yt&&(A._$.range=[o[o.length-(C||1)].range[0],o[o.length-1].range[1]]),W=this.performAction.apply(A,[k,j,E,I.yy,$[1],p,o].concat(pt)),typeof W<"u")return W;C&&(a=a.slice(0,-1*C*2),p=p.slice(0,-1*C),o=o.slice(0,-1*C)),a.push(this.productions_[$[1]][0]),p.push(A.$),o.push(A._$),K=x[a[a.length-2]][a[a.length-1]],a.push(K);break;case 3:return!0}}return!0},"parse")},m=(function(){var y={EOF:1,parseError:s(function(i,a){if(this.yy.parser)this.yy.parser.parseError(i,a);else throw new Error(i)},"parseError"),setInput:s(function(i,a){return this.yy=a||this.yy||{},this._input=i,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:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var a=i.length,u=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var p=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),u.length-1&&(this.yylineno-=u.length-1);var o=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:u?(u.length===p.length?this.yylloc.first_column:0)+p[p.length-u.length].length-u[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[o[0],o[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(i){this.unput(this.match.slice(i))},"less"),pastInput:s(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
5
5
|
`+a+"^"},"showPosition"),test_match:s(function(i,a){var u,p,o;if(this.options.backtrack_lexer&&(o={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&&(o.yylloc.range=this.yylloc.range.slice(0))),p=i[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,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(i[0].length),this.matched+=i[0],u=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),u)return u;if(this._backtrack){for(var x in o)this[x]=o[x];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,a,u,p;this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),x=0;x<o.length;x++)if(u=this._input.match(this.rules[o[x]]),u&&(!a||u[0].length>a[0].length)){if(a=u,p=x,this.options.backtrack_lexer){if(i=this.test_match(u,o[x]),i!==!1)return i;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(i=this.test_match(a,o[p]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var i=this.next();return i||this.lex()},"lex"),begin:s(function(i){this.conditionStack.push(i)},"begin"),popState:s(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:s(function(i){this.begin(i)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(i,a,u,p){switch(u){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return y})();f.lexer=m;function g(){this.yy={}}return s(g,"Parser"),g.prototype=f,f.Parser=g,new g})();
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var i=this.next();return i||this.lex()},"lex"),begin:s(function(i){this.conditionStack.push(i)},"begin"),popState:s(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:s(function(i){this.begin(i)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(i,a,u,p){switch(u){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return y})();f.lexer=m;function g(){this.yy={}}return s(g,"Parser"),g.prototype=f,f.Parser=g,new g})();J.parser=J;var Tt=J,V="",Q=[],L=[],R=[],Mt=s(function(){Q.length=0,L.length=0,V="",R.length=0,Ct()},"clear"),Et=s(function(t){V=t,Q.push(t)},"addSection"),It=s(function(){return Q},"getSections"),Pt=s(function(){let t=et();const e=100;let r=0;for(;!t&&r<e;)t=et(),r++;return L.push(...R),L},"getTasks"),jt=s(function(){const t=[];return L.forEach(e=>{e.people&&t.push(...e.people)}),[...new Set(t)].sort()},"updateActors"),At=s(function(t,e){const r=e.substr(1).split(":");let l=0,n=[];r.length===1?(l=Number(r[0]),n=[]):(l=Number(r[0]),n=r[1].split(","));const c=n.map(h=>h.trim()),d={section:V,type:V,people:c,task:t,score:l};R.push(d)},"addTask"),Vt=s(function(t){const e={section:V,type:V,description:t,task:t,classes:[]};L.push(e)},"addTaskOrg"),et=s(function(){const t=s(function(r){return R[r].processed},"compileTask");let e=!0;for(const[r,l]of R.entries())t(r),e=e&&l.processed;return e},"compileTasks"),Bt=s(function(){return jt()},"getActors"),it={getConfig:s(()=>B().journey,"getConfig"),clear:Mt,setDiagramTitle:vt,getDiagramTitle:$t,setAccTitle:wt,getAccTitle:_t,setAccDescription:bt,getAccDescription:kt,addSection:Et,getSections:It,getTasks:Pt,addTask:At,addTaskOrg:Vt,getActors:Bt},Lt=s(t=>`.label {
|
|
7
7
|
font-family: ${t.fontFamily};
|
|
8
8
|
color: ${t.textColor};
|
|
9
9
|
}
|
|
@@ -136,4 +136,4 @@ Expecting `+O.join(", ")+", got '"+(this.terminals_[_]||_)+"'":X="Parse error on
|
|
|
136
136
|
${t.actor5?`fill: ${t.actor5}`:""};
|
|
137
137
|
}
|
|
138
138
|
${xt()}
|
|
139
|
-
`,"getStyles"),Rt=Lt,U=s(function(t,e){return mt(t,e)},"drawRect"),Ft=s(function(t,e){const r=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),l=t.append("g");l.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),l.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function n(h){const f=tt().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);h.append("path").attr("class","mouth").attr("d",f).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}s(n,"smile");function c(h){const f=tt().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);h.append("path").attr("class","mouth").attr("d",f).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}s(c,"sad");function d(h){h.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s(d,"ambivalent"),e.score>3?n(l):e.score<3?c(l):d(l),r},"drawFace"),ot=s(function(t,e){const r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},"drawCircle"),lt=s(function(t,e){return gt(t,e)},"drawText"),Dt=s(function(t,e){function r(n,c,d,h,f){return n+","+c+" "+(n+d)+","+c+" "+(n+d)+","+(c+h-f)+" "+(n+d-f*1.2)+","+(c+h)+" "+n+","+(c+h)}s(r,"genPoints");const l=t.append("polygon");l.attr("points",r(e.x,e.y,50,20,7)),l.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,lt(t,e)},"drawLabel"),Ot=s(function(t,e,r){const l=t.append("g"),n=rt();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=r.width*e.taskCount+r.diagramMarginX*(e.taskCount-1),n.height=r.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,U(l,n),ct(r)(e.text,l,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),nt=-1,Nt=s(function(t,e,r){const l=e.x+r.width/2,n=t.append("g");nt++,n.append("line").attr("id","task"+nt).attr("x1",l).attr("y1",e.y).attr("x2",l).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Ft(n,{cx:l,cy:300+(5-e.score)*30,score:e.score});const c=rt();c.x=e.x,c.y=e.y,c.fill=e.fill,c.width=r.width,c.height=r.height,c.class="task task-type-"+e.num,c.rx=3,c.ry=3,U(n,c);let d=e.x+14;e.people.forEach(h=>{const f=e.actors[h].color,m={cx:d,cy:e.y,r:7,fill:f,stroke:"#000",title:h,pos:e.actors[h].position};ot(n,m),d+=10}),ct(r)(e.task,n,c.x,c.y,c.width,c.height,{class:"task"},r,e.colour)},"drawTask"),
|
|
139
|
+
`,"getStyles"),Rt=Lt,U=s(function(t,e){return mt(t,e)},"drawRect"),Ft=s(function(t,e){const r=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),l=t.append("g");l.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),l.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function n(h){const f=tt().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);h.append("path").attr("class","mouth").attr("d",f).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}s(n,"smile");function c(h){const f=tt().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);h.append("path").attr("class","mouth").attr("d",f).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}s(c,"sad");function d(h){h.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s(d,"ambivalent"),e.score>3?n(l):e.score<3?c(l):d(l),r},"drawFace"),ot=s(function(t,e){const r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},"drawCircle"),lt=s(function(t,e){return gt(t,e)},"drawText"),Dt=s(function(t,e){function r(n,c,d,h,f){return n+","+c+" "+(n+d)+","+c+" "+(n+d)+","+(c+h-f)+" "+(n+d-f*1.2)+","+(c+h)+" "+n+","+(c+h)}s(r,"genPoints");const l=t.append("polygon");l.attr("points",r(e.x,e.y,50,20,7)),l.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,lt(t,e)},"drawLabel"),Ot=s(function(t,e,r){const l=t.append("g"),n=rt();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=r.width*e.taskCount+r.diagramMarginX*(e.taskCount-1),n.height=r.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,U(l,n),ct(r)(e.text,l,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),nt=-1,Nt=s(function(t,e,r){const l=e.x+r.width/2,n=t.append("g");nt++,n.append("line").attr("id","task"+nt).attr("x1",l).attr("y1",e.y).attr("x2",l).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Ft(n,{cx:l,cy:300+(5-e.score)*30,score:e.score});const c=rt();c.x=e.x,c.y=e.y,c.fill=e.fill,c.width=r.width,c.height=r.height,c.class="task task-type-"+e.num,c.rx=3,c.ry=3,U(n,c);let d=e.x+14;e.people.forEach(h=>{const f=e.actors[h].color,m={cx:d,cy:e.y,r:7,fill:f,stroke:"#000",title:h,pos:e.actors[h].position};ot(n,m),d+=10}),ct(r)(e.task,n,c.x,c.y,c.width,c.height,{class:"task"},r,e.colour)},"drawTask"),Yt=s(function(t,e){ft(t,e)},"drawBackgroundRect"),ct=(function(){function t(n,c,d,h,f,m,g,y){const i=c.append("text").attr("x",d+f/2).attr("y",h+m/2+5).style("font-color",y).style("text-anchor","middle").text(n);l(i,g)}s(t,"byText");function e(n,c,d,h,f,m,g,y,i){const{taskFontSize:a,taskFontFamily:u}=y,p=n.split(/<br\s*\/?>/gi);for(let o=0;o<p.length;o++){const x=o*a-a*(p.length-1)/2,k=c.append("text").attr("x",d+f/2).attr("y",h).attr("fill",i).style("text-anchor","middle").style("font-size",a).style("font-family",u);k.append("tspan").attr("x",d+f/2).attr("dy",x).text(p[o]),k.attr("y",h+m/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),l(k,g)}}s(e,"byTspan");function r(n,c,d,h,f,m,g,y){const i=c.append("switch"),a=i.append("foreignObject").attr("x",d).attr("y",h).attr("width",f).attr("height",m).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");a.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,i,d,h,f,m,g,y),l(a,g)}s(r,"byFo");function l(n,c){for(const d in c)d in c&&n.attr(d,c[d])}return s(l,"_setTextAttrs"),function(n){return n.textPlacement==="fo"?r:n.textPlacement==="old"?t:e}})(),zt=s(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),F={drawRect:U,drawCircle:ot,drawSection:Ot,drawText:lt,drawLabel:Dt,drawTask:Nt,drawBackgroundRect:Yt,initGraphics:zt},Wt=s(function(t){Object.keys(t).forEach(function(e){S[e]=t[e]})},"setConf"),T={},N=0;function ht(t){const e=B().journey,r=e.maxLabelWidth;N=0;let l=60;Object.keys(T).forEach(n=>{const c=T[n].color,d={cx:20,cy:l,r:7,fill:c,stroke:"#000",pos:T[n].position};F.drawCircle(t,d);let h=t.append("text").attr("visibility","hidden").text(n);const f=h.node().getBoundingClientRect().width;h.remove();let m=[];if(f<=r)m=[n];else{const g=n.split(" ");let y="";h=t.append("text").attr("visibility","hidden"),g.forEach(i=>{const a=y?`${y} ${i}`:i;if(h.text(a),h.node().getBoundingClientRect().width>r){if(y&&m.push(y),y=i,h.text(i),h.node().getBoundingClientRect().width>r){let u="";for(const p of i)u+=p,h.text(u+"-"),h.node().getBoundingClientRect().width>r&&(m.push(u.slice(0,-1)+"-"),u=p);y=u}}else y=a}),y&&m.push(y),h.remove()}m.forEach((g,y)=>{const i={x:40,y:l+7+y*20,fill:"#666",text:g,textMargin:e.boxTextMargin??5},a=F.drawText(t,i).node().getBoundingClientRect().width;a>N&&a>e.leftMargin-a&&(N=a)}),l+=Math.max(20,m.length*20)})}s(ht,"drawActorLegend");var S=B().journey,M=0,Gt=s(function(t,e,r,l){const n=B(),c=n.journey.titleColor,d=n.journey.titleFontSize,h=n.journey.titleFontFamily,f=n.securityLevel;let m;f==="sandbox"&&(m=X("#i"+e));const g=f==="sandbox"?X(m.nodes()[0].contentDocument.body):X("body");v.init();const y=g.select("#"+e);F.initGraphics(y);const i=l.db.getTasks(),a=l.db.getDiagramTitle(),u=l.db.getActors();for(const j in T)delete T[j];let p=0;u.forEach(j=>{T[j]={color:S.actorColours[p%S.actorColours.length],position:p},p++}),ht(y),M=S.leftMargin+N,v.insert(0,0,M,Object.keys(T).length*50),Xt(y,i,0);const o=v.getBounds();a&&y.append("text").text(a).attr("x",M).attr("font-size",d).attr("font-weight","bold").attr("y",25).attr("fill",c).attr("font-family",h);const x=o.stopy-o.starty+2*S.diagramMarginY,k=M+o.stopx+2*S.diagramMarginX;St(y,x,k,S.useMaxWidth),y.append("line").attr("x1",M).attr("y1",S.height*4).attr("x2",k-M-4).attr("y2",S.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const E=a?70:0;y.attr("viewBox",`${o.startx} -25 ${k} ${x+E}`),y.attr("preserveAspectRatio","xMinYMin meet"),y.attr("height",x+E+25)},"draw"),v={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:s(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:s(function(t,e,r,l){t[e]===void 0?t[e]=r:t[e]=l(r,t[e])},"updateVal"),updateBounds:s(function(t,e,r,l){const n=B().journey,c=this;let d=0;function h(f){return s(function(m){d++;const g=c.sequenceItems.length-d+1;c.updateVal(m,"starty",e-g*n.boxMargin,Math.min),c.updateVal(m,"stopy",l+g*n.boxMargin,Math.max),c.updateVal(v.data,"startx",t-g*n.boxMargin,Math.min),c.updateVal(v.data,"stopx",r+g*n.boxMargin,Math.max),f!=="activation"&&(c.updateVal(m,"startx",t-g*n.boxMargin,Math.min),c.updateVal(m,"stopx",r+g*n.boxMargin,Math.max),c.updateVal(v.data,"starty",e-g*n.boxMargin,Math.min),c.updateVal(v.data,"stopy",l+g*n.boxMargin,Math.max))},"updateItemBounds")}s(h,"updateFn"),this.sequenceItems.forEach(h())},"updateBounds"),insert:s(function(t,e,r,l){const n=Math.min(t,r),c=Math.max(t,r),d=Math.min(e,l),h=Math.max(e,l);this.updateVal(v.data,"startx",n,Math.min),this.updateVal(v.data,"starty",d,Math.min),this.updateVal(v.data,"stopx",c,Math.max),this.updateVal(v.data,"stopy",h,Math.max),this.updateBounds(n,d,c,h)},"insert"),bumpVerticalPos:s(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:s(function(){return this.verticalPos},"getVerticalPos"),getBounds:s(function(){return this.data},"getBounds")},q=S.sectionFills,st=S.sectionColours,Xt=s(function(t,e,r){const l=B().journey;let n="";const c=l.height*2+l.diagramMarginY,d=r+c;let h=0,f="#CCC",m="black",g=0;for(const[y,i]of e.entries()){if(n!==i.section){f=q[h%q.length],g=h%q.length,m=st[h%st.length];let u=0;const p=i.section;for(let x=y;x<e.length&&e[x].section==p;x++)u=u+1;const o={x:y*l.taskMargin+y*l.width+M,y:50,text:i.section,fill:f,num:g,colour:m,taskCount:u};F.drawSection(t,o,l),n=i.section,h++}const a=i.people.reduce((u,p)=>(T[p]&&(u[p]=T[p]),u),{});i.x=y*l.taskMargin+y*l.width+M,i.y=d,i.width=l.diagramMarginX,i.height=l.diagramMarginY,i.colour=m,i.fill=f,i.num=g,i.actors=a,F.drawTask(t,i,l),v.insert(i.x,i.y,i.x+i.width+l.taskMargin,450)}},"drawTasks"),at={setConf:Wt,draw:Gt},Zt={parser:Tt,db:it,renderer:at,styles:Rt,init:s(t=>{at.setConf(t.journey),it.clear()},"init")};export{Zt as diagram};
|
package/dist/assets/{journeyDiagram-XKPGCS4Q-C8gYN3B8.js → journeyDiagram-XKPGCS4Q-JTQBV6RS.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as gt,g as lt,f as mt,d as xt}from"./chunk-TZMSLE5B-
|
|
1
|
+
import{a as gt,g as lt,f as mt,d as xt}from"./chunk-TZMSLE5B-CC9IwurK.js";import{g as kt}from"./chunk-FMBD7UC4-eFjHw5gB.js";import{bE as n,bG as _t,bF as bt,bH as vt,bI as wt,b_ as Tt,bZ as St,bJ as R,bK as G,bM as $t,c3 as Mt}from"./index-BzhKcNOt.js";import{d as et}from"./arc-DlFrPohT.js";var U=(function(){var t=n(function(h,i,a,l){for(a=a||{},l=h.length;l--;a[h[l]]=i);return a},"o"),e=[6,8,10,11,12,14,16,17,18],s=[1,9],c=[1,10],r=[1,11],f=[1,12],u=[1,13],y=[1,14],g={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:n(function(i,a,l,d,p,o,v){var k=o.length-1;switch(p){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:d.setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),d.setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),d.setAccDescription(this.$);break;case 12:d.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 13:d.addTask(o[k-1],o[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:s,12:c,14:r,16:f,17:u,18:y},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:s,12:c,14:r,16:f,17:u,18:y},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:n(function(i,a){if(a.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=a,l}},"parseError"),parse:n(function(i){var a=this,l=[0],d=[],p=[null],o=[],v=this.table,k="",C=0,K=0,dt=2,Q=1,yt=o.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(i,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;o.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,p.length=p.length-w,o.length=o.length-w}n(pt,"popStack");function D(){var w;return w=d.pop()||_.lex()||Q,typeof w!="number"&&(w instanceof Array&&(d=w,w=d.pop()),w=a.symbols_[w]||w),w}n(D,"lex");for(var b,A,T,q,F={},N,M,tt,z;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((b===null||typeof b>"u")&&(b=D()),T=v[A]&&v[A][b]),typeof T>"u"||!T.length||!T[0]){var H="";z=[];for(N in v[A])this.terminals_[N]&&N>dt&&z.push("'"+this.terminals_[N]+"'");_.showPosition?H="Parse error on line "+(C+1)+`:
|
|
2
2
|
`+_.showPosition()+`
|
|
3
3
|
Expecting `+z.join(", ")+", got '"+(this.terminals_[b]||b)+"'":H="Parse error on line "+(C+1)+": Unexpected "+(b==Q?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(H,{text:_.match,token:this.terminals_[b]||b,line:_.yylineno,loc:Y,expected:z})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+b);switch(T[0]){case 1:l.push(b),p.push(_.yytext),o.push(_.yylloc),l.push(T[1]),b=null,K=_.yyleng,k=_.yytext,C=_.yylineno,Y=_.yylloc;break;case 2:if(M=this.productions_[T[1]][1],F.$=p[p.length-M],F._$={first_line:o[o.length-(M||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(M||1)].first_column,last_column:o[o.length-1].last_column},ft&&(F._$.range=[o[o.length-(M||1)].range[0],o[o.length-1].range[1]]),q=this.performAction.apply(F,[k,K,C,I.yy,T[1],p,o].concat(yt)),typeof q<"u")return q;M&&(l=l.slice(0,-1*M*2),p=p.slice(0,-1*M),o=o.slice(0,-1*M)),l.push(this.productions_[T[1]][0]),p.push(F.$),o.push(F._$),tt=v[l[l.length-2]][l[l.length-1]],l.push(tt);break;case 3:return!0}}return!0},"parse")},m=(function(){var h={EOF:1,parseError:n(function(a,l){if(this.yy.parser)this.yy.parser.parseError(a,l);else throw new Error(a)},"parseError"),setInput:n(function(i,a){return this.yy=a||this.yy||{},this._input=i,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:n(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:n(function(i){var a=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var d=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),l.length-1&&(this.yylineno-=l.length-1);var p=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:l?(l.length===d.length?this.yylloc.first_column:0)+d[d.length-l.length].length-l[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n(function(i){this.unput(this.match.slice(i))},"less"),pastInput:n(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import{H as o,a as ee,b as H,aP as de,d as ye,x as fe,u as me,bh as be,aD as V,ae as U,aq as _e,ar as Ee,bi as Se,bj as ae,bk as ce}from"./index-BzhKcNOt.js";import{l as ke}from"./chunk-FMBD7UC4-DhXvRHU3-Ck_6Dma3.js";var J=(function(){var t=o(function(d,e,i,r){for(i=i||{},r=d.length;r--;i[d[r]]=e);return i},"o"),u=[1,4],p=[1,13],n=[1,12],g=[1,15],f=[1,16],_=[1,20],c=[1,19],x=[6,7,8],O=[1,26],h=[1,24],T=[1,25],k=[6,7,11],$=[1,31],I=[6,7,11,24],b=[1,6,13,16,17,20,23],A=[1,35],w=[1,36],C=[1,6,7,11,13,16,17,20,23],P=[1,38],M={trace:o(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:o(function(d,e,i,r,l,s,E){var a=s.length-1;switch(l){case 6:case 7:return r;case 8:r.getLogger().trace("Stop NL ");break;case 9:r.getLogger().trace("Stop EOF ");break;case 11:r.getLogger().trace("Stop NL2 ");break;case 12:r.getLogger().trace("Stop EOF2 ");break;case 15:r.getLogger().info("Node: ",s[a-1].id),r.addNode(s[a-2].length,s[a-1].id,s[a-1].descr,s[a-1].type,s[a]);break;case 16:r.getLogger().info("Node: ",s[a].id),r.addNode(s[a-1].length,s[a].id,s[a].descr,s[a].type);break;case 17:r.getLogger().trace("Icon: ",s[a]),r.decorateNode({icon:s[a]});break;case 18:case 23:r.decorateNode({class:s[a]});break;case 19:r.getLogger().trace("SPACELIST");break;case 20:r.getLogger().trace("Node: ",s[a-1].id),r.addNode(0,s[a-1].id,s[a-1].descr,s[a-1].type,s[a]);break;case 21:r.getLogger().trace("Node: ",s[a].id),r.addNode(0,s[a].id,s[a].descr,s[a].type);break;case 22:r.decorateNode({icon:s[a]});break;case 27:r.getLogger().trace("node found ..",s[a-2]),this.$={id:s[a-1],descr:s[a-1],type:r.getType(s[a-2],s[a])};break;case 28:this.$={id:s[a],descr:s[a],type:0};break;case 29:r.getLogger().trace("node found ..",s[a-3]),this.$={id:s[a-3],descr:s[a-1],type:r.getType(s[a-2],s[a])};break;case 30:this.$=s[a-1]+s[a];break;case 31:this.$=s[a];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:u},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:u},{6:p,7:[1,10],9:9,12:11,13:n,14:14,16:g,17:f,18:17,19:18,20:_,23:c},t(x,[2,3]),{1:[2,2]},t(x,[2,4]),t(x,[2,5]),{1:[2,6],6:p,12:21,13:n,14:14,16:g,17:f,18:17,19:18,20:_,23:c},{6:p,9:22,12:11,13:n,14:14,16:g,17:f,18:17,19:18,20:_,23:c},{6:O,7:h,10:23,11:T},t(k,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:_,23:c}),t(k,[2,19]),t(k,[2,21],{15:30,24:$}),t(k,[2,22]),t(k,[2,23]),t(I,[2,25]),t(I,[2,26]),t(I,[2,28],{20:[1,32]}),{21:[1,33]},{6:O,7:h,10:34,11:T},{1:[2,7],6:p,12:21,13:n,14:14,16:g,17:f,18:17,19:18,20:_,23:c},t(b,[2,14],{7:A,11:w}),t(C,[2,8]),t(C,[2,9]),t(C,[2,10]),t(k,[2,16],{15:37,24:$}),t(k,[2,17]),t(k,[2,18]),t(k,[2,20],{24:P}),t(I,[2,31]),{21:[1,39]},{22:[1,40]},t(b,[2,13],{7:A,11:w}),t(C,[2,11]),t(C,[2,12]),t(k,[2,15],{24:P}),t(I,[2,30]),{22:[1,41]},t(I,[2,27]),t(I,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(d,e){if(e.recoverable)this.trace(d);else{var i=new Error(d);throw i.hash=e,i}},"parseError"),parse:o(function(d){var e=this,i=[0],r=[],l=[null],s=[],E=this.table,a="",W=0,ie=0,he=2,ne=1,ue=s.slice.call(arguments,1),m=Object.create(this.lexer),R={yy:{}};for(var q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,q)&&(R.yy[q]=this.yy[q]);m.setInput(d,R.yy),R.yy.lexer=m,R.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var z=m.yylloc;s.push(z);var ge=m.options&&m.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(N){i.length=i.length-2*N,l.length=l.length-N,s.length=s.length-N}o(pe,"popStack");function re(){var N;return N=r.pop()||m.lex()||ne,typeof N!="number"&&(N instanceof Array&&(r=N,N=r.pop()),N=e.symbols_[N]||N),N}o(re,"lex");for(var S,B,D,X,F={},j,v,oe,K;;){if(B=i[i.length-1],this.defaultActions[B]?D=this.defaultActions[B]:((S===null||typeof S>"u")&&(S=re()),D=E[B]&&E[B][S]),typeof D>"u"||!D.length||!D[0]){var Z="";K=[];for(j in E[B])this.terminals_[j]&&j>he&&K.push("'"+this.terminals_[j]+"'");m.showPosition?Z="Parse error on line "+(W+1)+`:
|
|
2
|
+
`+m.showPosition()+`
|
|
3
|
+
Expecting `+K.join(", ")+", got '"+(this.terminals_[S]||S)+"'":Z="Parse error on line "+(W+1)+": Unexpected "+(S==ne?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(Z,{text:m.match,token:this.terminals_[S]||S,line:m.yylineno,loc:z,expected:K})}if(D[0]instanceof Array&&D.length>1)throw new Error("Parse Error: multiple actions possible at state: "+B+", token: "+S);switch(D[0]){case 1:i.push(S),l.push(m.yytext),s.push(m.yylloc),i.push(D[1]),S=null,ie=m.yyleng,a=m.yytext,W=m.yylineno,z=m.yylloc;break;case 2:if(v=this.productions_[D[1]][1],F.$=l[l.length-v],F._$={first_line:s[s.length-(v||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(v||1)].first_column,last_column:s[s.length-1].last_column},ge&&(F._$.range=[s[s.length-(v||1)].range[0],s[s.length-1].range[1]]),X=this.performAction.apply(F,[a,ie,W,R.yy,D[1],l,s].concat(ue)),typeof X<"u")return X;v&&(i=i.slice(0,-1*v*2),l=l.slice(0,-1*v),s=s.slice(0,-1*v)),i.push(this.productions_[D[1]][0]),l.push(F.$),s.push(F._$),oe=E[i[i.length-2]][i[i.length-1]],i.push(oe);break;case 3:return!0}}return!0},"parse")},Y=(function(){var d={EOF:1,parseError:o(function(e,i){if(this.yy.parser)this.yy.parser.parseError(e,i);else throw new Error(e)},"parseError"),setInput:o(function(e,i){return this.yy=i||this.yy||{},this._input=e,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:o(function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var i=e.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:o(function(e){var i=e.length,r=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var l=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===l.length?this.yylloc.first_column:0)+l[l.length-r.length].length-r[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(e){this.unput(this.match.slice(e))},"less"),pastInput:o(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var e=this.pastInput(),i=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
|
|
5
|
+
`+i+"^"},"showPosition"),test_match:o(function(e,i){var r,l,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))),l=e[0].match(/(?:\r\n?|\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var E in s)this[E]=s[E];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,i,r,l;this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),E=0;E<s.length;E++)if(r=this._input.match(this.rules[s[E]]),r&&(!i||r[0].length>i[0].length)){if(i=r,l=E,this.options.backtrack_lexer){if(e=this.test_match(r,s[E]),e!==!1)return e;if(this._backtrack){i=!1;continue}else return!1}else if(!this.options.flex)break}return i?(e=this.test_match(i,s[l]),e!==!1?e:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var e=this.next();return e||this.lex()},"lex"),begin:o(function(e){this.conditionStack.push(e)},"begin"),popState:o(function(){var e=this.conditionStack.length-1;return e>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(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:o(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:o(function(e){this.begin(e)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(e,i,r,l){switch(r){case 0:return this.pushState("shapeData"),i.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const s=/\n\s*/g;return i.yytext=i.yytext.replace(s,"<br/>"),24;case 4:return 24;case 5:this.popState();break;case 6:return e.getLogger().trace("Found comment",i.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return e.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:e.getLogger().trace("end icon"),this.popState();break;case 16:return e.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return e.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:return this.begin("NODE"),20;case 21:return this.begin("NODE"),20;case 22:return this.begin("NODE"),20;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 29:this.popState();break;case 30:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return e.getLogger().trace("description:",i.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),e.getLogger().trace("node end ...",i.yytext),"NODE_DEND";case 36:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 37:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 38:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 39:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 40:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 41:return e.getLogger().trace("Long description:",i.yytext),21;case 42:return e.getLogger().trace("Long description:",i.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}}};return d})();M.lexer=Y;function G(){this.yy={}}return o(G,"Parser"),G.prototype=M,M.Parser=G,new G})();J.parser=J;var Ne=J,L=[],te=[],Q=0,se={},De=o(()=>{L=[],te=[],Q=0,se={}},"clear"),Le=o(t=>{if(L.length===0)return null;const u=L[0].level;let p=null;for(let n=L.length-1;n>=0;n--)if(L[n].level===u&&!p&&(p=L[n]),L[n].level<u)throw new Error('Items without section detected, found section ("'+L[n].label+'")');return t===p?.level?null:p},"getSection"),le=o(function(){return te},"getSections"),xe=o(function(){const t=[],u=[],p=le(),n=H();for(const g of p){const f={id:g.id,label:U(g.label??"",n),isGroup:!0,ticket:g.ticket,shape:"kanbanSection",level:g.level,look:n.look};u.push(f);const _=L.filter(c=>c.parentId===g.id);for(const c of _){const x={id:c.id,parentId:g.id,label:U(c.label??"",n),isGroup:!1,ticket:c?.ticket,priority:c?.priority,assigned:c?.assigned,icon:c?.icon,shape:"kanbanItem",level:c.level,rx:5,ry:5,cssStyles:["text-align: left"]};u.push(x)}}return{nodes:u,edges:t,other:{},config:H()}},"getData"),Ie=o((t,u,p,n,g)=>{const f=H();let _=f.mindmap?.padding??V.mindmap.padding;switch(n){case y.ROUNDED_RECT:case y.RECT:case y.HEXAGON:_*=2}const c={id:U(u,f)||"kbn"+Q++,level:t,label:U(p,f),width:f.mindmap?.maxNodeWidth??V.mindmap.maxNodeWidth,padding:_,isGroup:!1};if(g!==void 0){let O;g.includes(`
|
|
7
|
+
`)?O=g+`
|
|
8
|
+
`:O=`{
|
|
9
|
+
`+g+`
|
|
10
|
+
}`;const h=_e(O,{schema:Ee});if(h.shape&&(h.shape!==h.shape.toLowerCase()||h.shape.includes("_")))throw new Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);h?.shape&&h.shape==="kanbanItem"&&(c.shape=h?.shape),h?.label&&(c.label=h?.label),h?.icon&&(c.icon=h?.icon.toString()),h?.assigned&&(c.assigned=h?.assigned.toString()),h?.ticket&&(c.ticket=h?.ticket.toString()),h?.priority&&(c.priority=h?.priority)}const x=Le(t);x?c.parentId=x.id||"kbn"+Q++:te.push(c),L.push(c)},"addNode"),y={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Oe=o((t,u)=>{switch(ee.debug("In get type",t,u),t){case"[":return y.RECT;case"(":return u===")"?y.ROUNDED_RECT:y.CLOUD;case"((":return y.CIRCLE;case")":return y.CLOUD;case"))":return y.BANG;case"{{":return y.HEXAGON;default:return y.DEFAULT}},"getType"),ve=o((t,u)=>{se[t]=u},"setElementForId"),Ae=o(t=>{if(!t)return;const u=H(),p=L[L.length-1];t.icon&&(p.icon=U(t.icon,u)),t.class&&(p.cssClasses=U(t.class,u))},"decorateNode"),we=o(t=>{switch(t){case y.DEFAULT:return"no-border";case y.RECT:return"rect";case y.ROUNDED_RECT:return"rounded-rect";case y.CIRCLE:return"circle";case y.CLOUD:return"cloud";case y.BANG:return"bang";case y.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),Ce=o(()=>ee,"getLogger"),Te=o(t=>se[t],"getElementById"),$e={clear:De,addNode:Ie,getSections:le,getData:xe,nodeType:y,getType:Oe,setElementForId:ve,decorateNode:Ae,type2Str:we,getLogger:Ce,getElementById:Te},Re=$e,Be=o(async(t,u,p,n)=>{ee.debug(`Rendering kanban diagram
|
|
11
|
+
`+t);const g=n.db.getData(),f=H();f.htmlLabels=!1;const _=de(u),c=_.append("g");c.attr("class","sections");const x=_.append("g");x.attr("class","items");const O=g.nodes.filter(b=>b.isGroup);let h=0;const T=10,k=[];let $=25;for(const b of O){const A=f?.kanban?.sectionWidth||200;h=h+1,b.x=A*h+(h-1)*T/2,b.width=A,b.y=0,b.height=A*3,b.rx=5,b.ry=5,b.cssClasses=b.cssClasses+" section-"+h;const w=await ye(c,b);$=Math.max($,w?.labelBBox?.height),k.push(w)}let I=0;for(const b of O){const A=k[I];I=I+1;const w=f?.kanban?.sectionWidth||200,C=-w*3/2+$;let P=C;const M=g.nodes.filter(d=>d.parentId===b.id);for(const d of M){if(d.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");d.x=b.x,d.width=w-1.5*T;const e=(await fe(x,d,{config:f})).node().getBBox();d.y=P+e.height/2,await me(d),P=d.y+e.height/2+T/2}const Y=A.cluster.select("rect"),G=Math.max(P-C+3*T,50)+($-25);Y.attr("height",G)}be(void 0,_,f.mindmap?.padding??V.kanban.padding,f.mindmap?.useMaxWidth??V.kanban.useMaxWidth)},"draw"),Pe={draw:Be},Ge=o(t=>{let u="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++)t["lineColor"+n]=t["lineColor"+n]||t["cScaleInv"+n],Se(t["lineColor"+n])?t["lineColor"+n]=ae(t["lineColor"+n],20):t["lineColor"+n]=ce(t["lineColor"+n],20);const p=o((n,g)=>t.darkMode?ce(n,g):ae(n,g),"adjuster");for(let n=0;n<t.THEME_COLOR_LIMIT;n++){const g=""+(17-3*n);u+=`
|
|
12
|
+
.section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {
|
|
13
|
+
fill: ${p(t["cScale"+n],10)};
|
|
14
|
+
stroke: ${p(t["cScale"+n],10)};
|
|
15
|
+
|
|
16
|
+
}
|
|
17
|
+
.section-${n-1} text {
|
|
18
|
+
fill: ${t["cScaleLabel"+n]};
|
|
19
|
+
}
|
|
20
|
+
.node-icon-${n-1} {
|
|
21
|
+
font-size: 40px;
|
|
22
|
+
color: ${t["cScaleLabel"+n]};
|
|
23
|
+
}
|
|
24
|
+
.section-edge-${n-1}{
|
|
25
|
+
stroke: ${t["cScale"+n]};
|
|
26
|
+
}
|
|
27
|
+
.edge-depth-${n-1}{
|
|
28
|
+
stroke-width: ${g};
|
|
29
|
+
}
|
|
30
|
+
.section-${n-1} line {
|
|
31
|
+
stroke: ${t["cScaleInv"+n]} ;
|
|
32
|
+
stroke-width: 3;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.disabled, .disabled circle, .disabled text {
|
|
36
|
+
fill: lightgray;
|
|
37
|
+
}
|
|
38
|
+
.disabled text {
|
|
39
|
+
fill: #efefef;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.node rect,
|
|
43
|
+
.node circle,
|
|
44
|
+
.node ellipse,
|
|
45
|
+
.node polygon,
|
|
46
|
+
.node path {
|
|
47
|
+
fill: ${t.background};
|
|
48
|
+
stroke: ${t.nodeBorder};
|
|
49
|
+
stroke-width: 1px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.kanban-ticket-link {
|
|
53
|
+
fill: ${t.background};
|
|
54
|
+
stroke: ${t.nodeBorder};
|
|
55
|
+
text-decoration: underline;
|
|
56
|
+
}
|
|
57
|
+
`}return u},"genSections"),Fe=o(t=>`
|
|
58
|
+
.edge {
|
|
59
|
+
stroke-width: 3;
|
|
60
|
+
}
|
|
61
|
+
${Ge(t)}
|
|
62
|
+
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
|
63
|
+
fill: ${t.git0};
|
|
64
|
+
}
|
|
65
|
+
.section-root text {
|
|
66
|
+
fill: ${t.gitBranchLabel0};
|
|
67
|
+
}
|
|
68
|
+
.icon-container {
|
|
69
|
+
height:100%;
|
|
70
|
+
display: flex;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
align-items: center;
|
|
73
|
+
}
|
|
74
|
+
.edge {
|
|
75
|
+
fill: none;
|
|
76
|
+
}
|
|
77
|
+
.cluster-label, .label {
|
|
78
|
+
color: ${t.textColor};
|
|
79
|
+
fill: ${t.textColor};
|
|
80
|
+
}
|
|
81
|
+
.kanban-label {
|
|
82
|
+
dy: 1em;
|
|
83
|
+
alignment-baseline: middle;
|
|
84
|
+
text-anchor: middle;
|
|
85
|
+
dominant-baseline: middle;
|
|
86
|
+
text-align: center;
|
|
87
|
+
}
|
|
88
|
+
${ke()}
|
|
89
|
+
`,"getStyles"),Ue=Fe,We={db:Re,renderer:Pe,parser:Ne,styles:Ue};export{We as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bE as o,bL as te,bJ as H,ce as fe,cO as ye,cP as be,cQ as me,cJ as Ee,cc as X,bP as F,b$ as _e,c0 as ke,cK as Se,cL as ce,cM as le}from"./index-
|
|
1
|
+
import{bE as o,bL as te,bJ as H,ce as fe,cO as ye,cP as be,cQ as me,cJ as Ee,cc as X,bP as F,b$ as _e,c0 as ke,cK as Se,cL as ce,cM as le}from"./index-BzhKcNOt.js";import{g as Ne}from"./chunk-FMBD7UC4-eFjHw5gB.js";var $=(function(){var e=o(function(O,i,n,r){for(n=n||{},r=O.length;r--;n[O[r]]=i);return n},"o"),u=[1,4],p=[1,13],s=[1,12],d=[1,15],_=[1,16],b=[1,20],l=[1,19],D=[6,7,8],I=[1,26],g=[1,24],w=[1,25],E=[6,7,11],G=[1,31],N=[6,7,11,24],V=[1,6,13,16,17,20,23],m=[1,35],A=[1,36],L=[1,6,7,11,13,16,17,20,23],M=[1,38],T={trace:o(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:o(function(i,n,r,a,h,t,U){var c=t.length-1;switch(h){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",t[c-1].id),a.addNode(t[c-2].length,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 16:a.getLogger().info("Node: ",t[c].id),a.addNode(t[c-1].length,t[c].id,t[c].descr,t[c].type);break;case 17:a.getLogger().trace("Icon: ",t[c]),a.decorateNode({icon:t[c]});break;case 18:case 23:a.decorateNode({class:t[c]});break;case 19:a.getLogger().trace("SPACELIST");break;case 20:a.getLogger().trace("Node: ",t[c-1].id),a.addNode(0,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 21:a.getLogger().trace("Node: ",t[c].id),a.addNode(0,t[c].id,t[c].descr,t[c].type);break;case 22:a.decorateNode({icon:t[c]});break;case 27:a.getLogger().trace("node found ..",t[c-2]),this.$={id:t[c-1],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 28:this.$={id:t[c],descr:t[c],type:0};break;case 29:a.getLogger().trace("node found ..",t[c-3]),this.$={id:t[c-3],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 30:this.$=t[c-1]+t[c];break;case 31:this.$=t[c];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:u},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:u},{6:p,7:[1,10],9:9,12:11,13:s,14:14,16:d,17:_,18:17,19:18,20:b,23:l},e(D,[2,3]),{1:[2,2]},e(D,[2,4]),e(D,[2,5]),{1:[2,6],6:p,12:21,13:s,14:14,16:d,17:_,18:17,19:18,20:b,23:l},{6:p,9:22,12:11,13:s,14:14,16:d,17:_,18:17,19:18,20:b,23:l},{6:I,7:g,10:23,11:w},e(E,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:b,23:l}),e(E,[2,19]),e(E,[2,21],{15:30,24:G}),e(E,[2,22]),e(E,[2,23]),e(N,[2,25]),e(N,[2,26]),e(N,[2,28],{20:[1,32]}),{21:[1,33]},{6:I,7:g,10:34,11:w},{1:[2,7],6:p,12:21,13:s,14:14,16:d,17:_,18:17,19:18,20:b,23:l},e(V,[2,14],{7:m,11:A}),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(E,[2,16],{15:37,24:G}),e(E,[2,17]),e(E,[2,18]),e(E,[2,20],{24:M}),e(N,[2,31]),{21:[1,39]},{22:[1,40]},e(V,[2,13],{7:m,11:A}),e(L,[2,11]),e(L,[2,12]),e(E,[2,15],{24:M}),e(N,[2,30]),{22:[1,41]},e(N,[2,27]),e(N,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(i,n){if(n.recoverable)this.trace(i);else{var r=new Error(i);throw r.hash=n,r}},"parseError"),parse:o(function(i){var n=this,r=[0],a=[],h=[null],t=[],U=this.table,c="",W=0,se=0,ue=2,re=1,ge=t.slice.call(arguments,1),y=Object.create(this.lexer),R={yy:{}};for(var Y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Y)&&(R.yy[Y]=this.yy[Y]);y.setInput(i,R.yy),R.yy.lexer=y,R.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var Q=y.yylloc;t.push(Q);var de=y.options&&y.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){r.length=r.length-2*S,h.length=h.length-S,t.length=t.length-S}o(pe,"popStack");function ae(){var S;return S=a.pop()||y.lex()||re,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=n.symbols_[S]||S),S}o(ae,"lex");for(var k,P,x,q,j={},z,C,oe,K;;){if(P=r[r.length-1],this.defaultActions[P]?x=this.defaultActions[P]:((k===null||typeof k>"u")&&(k=ae()),x=U[P]&&U[P][k]),typeof x>"u"||!x.length||!x[0]){var Z="";K=[];for(z in U[P])this.terminals_[z]&&z>ue&&K.push("'"+this.terminals_[z]+"'");y.showPosition?Z="Parse error on line "+(W+1)+`:
|
|
2
2
|
`+y.showPosition()+`
|
|
3
3
|
Expecting `+K.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Z="Parse error on line "+(W+1)+": Unexpected "+(k==re?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(Z,{text:y.match,token:this.terminals_[k]||k,line:y.yylineno,loc:Q,expected:K})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+k);switch(x[0]){case 1:r.push(k),h.push(y.yytext),t.push(y.yylloc),r.push(x[1]),k=null,se=y.yyleng,c=y.yytext,W=y.yylineno,Q=y.yylloc;break;case 2:if(C=this.productions_[x[1]][1],j.$=h[h.length-C],j._$={first_line:t[t.length-(C||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(C||1)].first_column,last_column:t[t.length-1].last_column},de&&(j._$.range=[t[t.length-(C||1)].range[0],t[t.length-1].range[1]]),q=this.performAction.apply(j,[c,se,W,R.yy,x[1],h,t].concat(ge)),typeof q<"u")return q;C&&(r=r.slice(0,-1*C*2),h=h.slice(0,-1*C),t=t.slice(0,-1*C)),r.push(this.productions_[x[1]][0]),h.push(j.$),t.push(j._$),oe=U[r[r.length-2]][r[r.length-1]],r.push(oe);break;case 3:return!0}}return!0},"parse")},J=(function(){var O={EOF:1,parseError:o(function(n,r){if(this.yy.parser)this.yy.parser.parseError(n,r);else throw new Error(n)},"parseError"),setInput:o(function(i,n){return this.yy=n||this.yy||{},this._input=i,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:o(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:o(function(i){var n=i.length,r=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var a=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),r.length-1&&(this.yylineno-=r.length-1);var h=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:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[h[0],h[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(i){this.unput(this.match.slice(i))},"less"),pastInput:o(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as Ge,G as g,i as m,v as E}from"./graph-CIQI-Qnx.js";import{i as X,d as C,k as Ye,o as $e,p as ve,q as pe,t as De,u as we,v as qe,w as be,c as G,x as We,b as Xe,y as ze,n as f,m as I,r as B}from"./_baseUniq--5gbTAb8.js";import{f as O,b as me,a as Ue,c as He,m as w,d as P}from"./min-USsdh-HW.js";import{dO as M,ee as Je,ef as Ke,dV as ge,eg as S,dF as ye,e7 as Ze,d8 as Qe,ec as en,eh as nn,da as xe,eb as rn,dU as Ee,d9 as ke,dM as tn,dX as an,ei as z}from"./index-BXRJOAs4.js";var on=/\s/;function un(e){for(var n=e.length;n--&&on.test(e.charAt(n)););return n}var dn=/^\s+/;function sn(e){return e&&e.slice(0,un(e)+1).replace(dn,"")}var re=NaN,fn=/^[-+]0x[0-9a-f]+$/i,cn=/^0b[01]+$/i,ln=/^0o[0-7]+$/i,hn=parseInt;function vn(e){if(typeof e=="number")return e;if(X(e))return re;if(M(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=M(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=sn(e);var r=cn.test(e);return r||ln.test(e)?hn(e.slice(2),r?2:8):fn.test(e)?re:+e}var te=1/0,pn=17976931348623157e292;function T(e){if(!e)return e===0?e:0;if(e=vn(e),e===te||e===-te){var n=e<0?-1:1;return n*pn}return e===e?e:0}function wn(e){var n=T(e),r=n%1;return n===n?r?n-r:n:0}function bn(e){return Je(Ke(e,void 0,O),e+"")}var mn=1,gn=4;function yn(e){return Ge(e,mn|gn)}var Oe=Object.prototype,xn=Oe.hasOwnProperty,En=ge(function(e,n){e=Object(e);var r=-1,t=n.length,i=t>2?n[2]:void 0;for(i&&S(n[0],n[1],i)&&(t=1);++r<t;)for(var o=n[r],a=ye(o),u=-1,d=a.length;++u<d;){var s=a[u],c=e[s];(c===void 0||Ze(c,Oe[s])&&!xn.call(e,s))&&(e[s]=o[s])}return e});function F(e){var n=e==null?0:e.length;return n?e[n-1]:void 0}function kn(e){return function(n,r,t){var i=Object(n);if(!Qe(n)){var o=C(r);n=Ye(n),r=function(u){return o(i[u],u,i)}}var a=e(n,r,t);return a>-1?i[o?n[a]:a]:void 0}}var On=Math.max;function Nn(e,n,r){var t=e==null?0:e.length;if(!t)return-1;var i=r==null?0:wn(r);return i<0&&(i=On(t+i,0)),$e(e,C(n),i)}var H=kn(Nn);function Ln(e,n){return e==null?e:en(e,ve(n),ye)}function Pn(e,n){return e&&pe(e,ve(n))}function _n(e,n){return e>n}var Cn=Object.prototype,In=Cn.hasOwnProperty;function Rn(e,n){return e!=null&&In.call(e,n)}function Ne(e,n){return e!=null&&De(e,n,Rn)}function j(e,n){var r={};return n=C(n),pe(e,function(t,i,o){nn(r,i,n(t,i,o))}),r}function y(e){return e&&e.length?me(e,xe,_n):void 0}function J(e,n){return e&&e.length?me(e,C(n),Ue):void 0}function Tn(e,n,r,t){if(!M(e))return e;n=we(n,e);for(var i=-1,o=n.length,a=o-1,u=e;u!=null&&++i<o;){var d=qe(n[i]),s=r;if(d==="__proto__"||d==="constructor"||d==="prototype")return e;if(i!=a){var c=u[d];s=void 0,s===void 0&&(s=M(c)?c:rn(n[i+1])?[]:{})}Ee(u,d,s),u=u[d]}return e}function Mn(e,n,r){for(var t=-1,i=n.length,o={};++t<i;){var a=n[t],u=be(e,a);r(u,a)&&Tn(o,we(a,e),u)}return o}function Sn(e,n){var r=e.length;for(e.sort(n);r--;)e[r]=e[r].value;return e}function Fn(e,n){if(e!==n){var r=e!==void 0,t=e===null,i=e===e,o=X(e),a=n!==void 0,u=n===null,d=n===n,s=X(n);if(!u&&!s&&!o&&e>n||o&&a&&d&&!u&&!s||t&&a&&d||!r&&d||!i)return 1;if(!t&&!o&&!s&&e<n||s&&r&&i&&!t&&!o||u&&r&&i||!a&&i||!d)return-1}return 0}function An(e,n,r){for(var t=-1,i=e.criteria,o=n.criteria,a=i.length,u=r.length;++t<a;){var d=Fn(i[t],o[t]);if(d){if(t>=u)return d;var s=r[t];return d*(s=="desc"?-1:1)}}return e.index-n.index}function Bn(e,n,r){n.length?n=G(n,function(o){return ke(o)?function(a){return be(a,o.length===1?o[0]:o)}:o}):n=[xe];var t=-1;n=G(n,tn(C));var i=He(e,function(o,a,u){var d=G(n,function(s){return s(o)});return{criteria:d,index:++t,value:o}});return Sn(i,function(o,a){return An(o,a,r)})}function jn(e,n){return Mn(e,n,function(r,t){return We(e,t)})}var A=bn(function(e,n){return e==null?{}:jn(e,n)}),Vn=Math.ceil,Gn=Math.max;function Yn(e,n,r,t){for(var i=-1,o=Gn(Vn((n-e)/(r||1)),0),a=Array(o);o--;)a[++i]=e,e+=r;return a}function $n(e){return function(n,r,t){return t&&typeof t!="number"&&S(n,r,t)&&(r=t=void 0),n=T(n),r===void 0?(r=n,n=0):r=T(r),t=t===void 0?n<r?1:-1:T(t),Yn(n,r,t)}}var k=$n(),R=ge(function(e,n){if(e==null)return[];var r=n.length;return r>1&&S(e,n[0],n[1])?n=[]:r>2&&S(n[0],n[1],n[2])&&(n=[n[0]]),Bn(e,Xe(n),[])}),Dn=0;function K(e){var n=++Dn;return ze(e)+n}function qn(e,n,r){for(var t=-1,i=e.length,o=n.length,a={};++t<i;){var u=t<o?n[t]:void 0;r(a,e[t],u)}return a}function Wn(e,n){return qn(e||[],n||[],Ee)}class Xn{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,r=n._prev;if(r!==n)return ie(r),r}enqueue(n){var r=this._sentinel;n._prev&&n._next&&ie(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r}toString(){for(var n=[],r=this._sentinel,t=r._prev;t!==r;)n.push(JSON.stringify(t,zn)),t=t._prev;return"["+n.join(", ")+"]"}}function ie(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function zn(e,n){if(e!=="_next"&&e!=="_prev")return n}var Un=an(1);function Hn(e,n){if(e.nodeCount()<=1)return[];var r=Kn(e,n||Un),t=Jn(r.graph,r.buckets,r.zeroIdx);return O(w(t,function(i){return e.outEdges(i.v,i.w)}))}function Jn(e,n,r){for(var t=[],i=n[n.length-1],o=n[0],a;e.nodeCount();){for(;a=o.dequeue();)Y(e,n,r,a);for(;a=i.dequeue();)Y(e,n,r,a);if(e.nodeCount()){for(var u=n.length-2;u>0;--u)if(a=n[u].dequeue(),a){t=t.concat(Y(e,n,r,a,!0));break}}}return t}function Y(e,n,r,t,i){var o=i?[]:void 0;return f(e.inEdges(t.v),function(a){var u=e.edge(a),d=e.node(a.v);i&&o.push({v:a.v,w:a.w}),d.out-=u,U(n,r,d)}),f(e.outEdges(t.v),function(a){var u=e.edge(a),d=a.w,s=e.node(d);s.in-=u,U(n,r,s)}),e.removeNode(t.v),o}function Kn(e,n){var r=new g,t=0,i=0;f(e.nodes(),function(u){r.setNode(u,{v:u,in:0,out:0})}),f(e.edges(),function(u){var d=r.edge(u.v,u.w)||0,s=n(u),c=d+s;r.setEdge(u.v,u.w,c),i=Math.max(i,r.node(u.v).out+=s),t=Math.max(t,r.node(u.w).in+=s)});var o=k(i+t+3).map(function(){return new Xn}),a=t+1;return f(r.nodes(),function(u){U(o,a,r.node(u))}),{graph:r,buckets:o,zeroIdx:a}}function U(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 Zn(e){var n=e.graph().acyclicer==="greedy"?Hn(e,r(e)):Qn(e);f(n,function(t){var i=e.edge(t);e.removeEdge(t),i.forwardName=t.name,i.reversed=!0,e.setEdge(t.w,t.v,i,K("rev"))});function r(t){return function(i){return t.edge(i).weight}}}function Qn(e){var n=[],r={},t={};function i(o){Object.prototype.hasOwnProperty.call(t,o)||(t[o]=!0,r[o]=!0,f(e.outEdges(o),function(a){Object.prototype.hasOwnProperty.call(r,a.w)?n.push(a):i(a.w)}),delete r[o])}return f(e.nodes(),i),n}function er(e){f(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)}})}function N(e,n,r,t){var i;do i=K(t);while(e.hasNode(i));return r.dummy=n,e.setNode(i,r),i}function nr(e){var n=new g().setGraph(e.graph());return f(e.nodes(),function(r){n.setNode(r,e.node(r))}),f(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+i.weight,minlen:Math.max(t.minlen,i.minlen)})}),n}function Le(e){var n=new g({multigraph:e.isMultigraph()}).setGraph(e.graph());return f(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),f(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function ae(e,n){var r=e.x,t=e.y,i=n.x-r,o=n.y-t,a=e.width/2,u=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var d,s;return Math.abs(o)*a>Math.abs(i)*u?(o<0&&(u=-u),d=u*i/o,s=u):(i<0&&(a=-a),d=a,s=a*o/i),{x:r+d,y:t+s}}function V(e){var n=w(k(Pe(e)+1),function(){return[]});return f(e.nodes(),function(r){var t=e.node(r),i=t.rank;m(i)||(n[i][t.order]=r)}),n}function rr(e){var n=P(w(e.nodes(),function(r){return e.node(r).rank}));f(e.nodes(),function(r){var t=e.node(r);Ne(t,"rank")&&(t.rank-=n)})}function tr(e){var n=P(w(e.nodes(),function(o){return e.node(o).rank})),r=[];f(e.nodes(),function(o){var a=e.node(o).rank-n;r[a]||(r[a]=[]),r[a].push(o)});var t=0,i=e.graph().nodeRankFactor;f(r,function(o,a){m(o)&&a%i!==0?--t:t&&f(o,function(u){e.node(u).rank+=t})})}function oe(e,n,r,t){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=t),N(e,"border",i,n)}function Pe(e){return y(w(e.nodes(),function(n){var r=e.node(n).rank;if(!m(r))return r}))}function ir(e,n){var r={lhs:[],rhs:[]};return f(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function ar(e,n){return n()}function or(e){function n(r){var t=e.children(r),i=e.node(r);if(t.length&&f(t,n),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var o=i.minRank,a=i.maxRank+1;o<a;++o)ue(e,"borderLeft","_bl",r,i,o),ue(e,"borderRight","_br",r,i,o)}}f(e.children(),n)}function ue(e,n,r,t,i,o){var a={width:0,height:0,rank:o,borderType:n},u=i[n][o-1],d=N(e,"border",a,r);i[n][o]=d,e.setParent(d,t),u&&e.setEdge(u,d,{weight:1})}function ur(e){var n=e.graph().rankdir.toLowerCase();(n==="lr"||n==="rl")&&_e(e)}function dr(e){var n=e.graph().rankdir.toLowerCase();(n==="bt"||n==="rl")&&sr(e),(n==="lr"||n==="rl")&&(fr(e),_e(e))}function _e(e){f(e.nodes(),function(n){de(e.node(n))}),f(e.edges(),function(n){de(e.edge(n))})}function de(e){var n=e.width;e.width=e.height,e.height=n}function sr(e){f(e.nodes(),function(n){$(e.node(n))}),f(e.edges(),function(n){var r=e.edge(n);f(r.points,$),Object.prototype.hasOwnProperty.call(r,"y")&&$(r)})}function $(e){e.y=-e.y}function fr(e){f(e.nodes(),function(n){D(e.node(n))}),f(e.edges(),function(n){var r=e.edge(n);f(r.points,D),Object.prototype.hasOwnProperty.call(r,"x")&&D(r)})}function D(e){var n=e.x;e.x=e.y,e.y=n}function cr(e){e.graph().dummyChains=[],f(e.edges(),function(n){lr(e,n)})}function lr(e,n){var r=n.v,t=e.node(r).rank,i=n.w,o=e.node(i).rank,a=n.name,u=e.edge(n),d=u.labelRank;if(o!==t+1){e.removeEdge(n);var s=void 0,c,l;for(l=0,++t;t<o;++l,++t)u.points=[],s={width:0,height:0,edgeLabel:u,edgeObj:n,rank:t},c=N(e,"edge",s,"_d"),t===d&&(s.width=u.width,s.height=u.height,s.dummy="edge-label",s.labelpos=u.labelpos),e.setEdge(r,c,{weight:u.weight},a),l===0&&e.graph().dummyChains.push(c),r=c;e.setEdge(r,i,{weight:u.weight},a)}}function hr(e){f(e.graph().dummyChains,function(n){var r=e.node(n),t=r.edgeLabel,i;for(e.setEdge(r.edgeObj,t);r.dummy;)i=e.successors(n)[0],e.removeNode(n),t.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height),n=i,r=e.node(n)})}function Z(e){var n={};function r(t){var i=e.node(t);if(Object.prototype.hasOwnProperty.call(n,t))return i.rank;n[t]=!0;var o=P(w(e.outEdges(t),function(a){return r(a.w)-e.edge(a).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),i.rank=o}f(e.sources(),r)}function _(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function Ce(e){var n=new g({directed:!1}),r=e.nodes()[0],t=e.nodeCount();n.setNode(r,{});for(var i,o;vr(n,e)<t;)i=pr(n,e),o=n.hasNode(i.v)?_(e,i):-_(e,i),wr(n,e,o);return n}function vr(e,n){function r(t){f(n.nodeEdges(t),function(i){var o=i.v,a=t===o?i.w:o;!e.hasNode(a)&&!_(n,i)&&(e.setNode(a,{}),e.setEdge(t,a,{}),r(a))})}return f(e.nodes(),r),e.nodeCount()}function pr(e,n){return J(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return _(n,r)})}function wr(e,n,r){f(e.nodes(),function(t){n.node(t).rank+=r})}function br(){}br.prototype=new Error;function Ie(e,n,r){ke(n)||(n=[n]);var t=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],o={};return f(n,function(a){if(!e.hasNode(a))throw new Error("Graph does not have node: "+a);Re(e,a,r==="post",o,t,i)}),i}function Re(e,n,r,t,i,o){Object.prototype.hasOwnProperty.call(t,n)||(t[n]=!0,r||o.push(n),f(i(n),function(a){Re(e,a,r,t,i,o)}),r&&o.push(n))}function mr(e,n){return Ie(e,n,"post")}function gr(e,n){return Ie(e,n,"pre")}x.initLowLimValues=ee;x.initCutValues=Q;x.calcCutValue=Te;x.leaveEdge=Se;x.enterEdge=Fe;x.exchangeEdges=Ae;function x(e){e=nr(e),Z(e);var n=Ce(e);ee(n),Q(n,e);for(var r,t;r=Se(n);)t=Fe(n,e,r),Ae(n,e,r,t)}function Q(e,n){var r=mr(e,e.nodes());r=r.slice(0,r.length-1),f(r,function(t){yr(e,n,t)})}function yr(e,n,r){var t=e.node(r),i=t.parent;e.edge(r,i).cutvalue=Te(e,n,r)}function Te(e,n,r){var t=e.node(r),i=t.parent,o=!0,a=n.edge(r,i),u=0;return a||(o=!1,a=n.edge(i,r)),u=a.weight,f(n.nodeEdges(r),function(d){var s=d.v===r,c=s?d.w:d.v;if(c!==i){var l=s===o,h=n.edge(d).weight;if(u+=l?h:-h,Er(e,r,c)){var v=e.edge(r,c).cutvalue;u+=l?-v:v}}}),u}function ee(e,n){arguments.length<2&&(n=e.nodes()[0]),Me(e,{},1,n)}function Me(e,n,r,t,i){var o=r,a=e.node(t);return n[t]=!0,f(e.neighbors(t),function(u){Object.prototype.hasOwnProperty.call(n,u)||(r=Me(e,n,r,u,t))}),a.low=o,a.lim=r++,i?a.parent=i:delete a.parent,r}function Se(e){return H(e.edges(),function(n){return e.edge(n).cutvalue<0})}function Fe(e,n,r){var t=r.v,i=r.w;n.hasEdge(t,i)||(t=r.w,i=r.v);var o=e.node(t),a=e.node(i),u=o,d=!1;o.lim>a.lim&&(u=a,d=!0);var s=I(n.edges(),function(c){return d===se(e,e.node(c.v),u)&&d!==se(e,e.node(c.w),u)});return J(s,function(c){return _(n,c)})}function Ae(e,n,r,t){var i=r.v,o=r.w;e.removeEdge(i,o),e.setEdge(t.v,t.w,{}),ee(e),Q(e,n),xr(e,n)}function xr(e,n){var r=H(e.nodes(),function(i){return!n.node(i).parent}),t=gr(e,r);t=t.slice(1),f(t,function(i){var o=e.node(i).parent,a=n.edge(i,o),u=!1;a||(a=n.edge(o,i),u=!0),n.node(i).rank=n.node(o).rank+(u?a.minlen:-a.minlen)})}function Er(e,n,r){return e.hasEdge(n,r)}function se(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function kr(e){switch(e.graph().ranker){case"network-simplex":fe(e);break;case"tight-tree":Nr(e);break;case"longest-path":Or(e);break;default:fe(e)}}var Or=Z;function Nr(e){Z(e),Ce(e)}function fe(e){x(e)}function Lr(e){var n=N(e,"root",{},"_root"),r=Pr(e),t=y(E(r))-1,i=2*t+1;e.graph().nestingRoot=n,f(e.edges(),function(a){e.edge(a).minlen*=i});var o=_r(e)+1;f(e.children(),function(a){Be(e,n,i,o,t,r,a)}),e.graph().nodeRankFactor=i}function Be(e,n,r,t,i,o,a){var u=e.children(a);if(!u.length){a!==n&&e.setEdge(n,a,{weight:0,minlen:r});return}var d=oe(e,"_bt"),s=oe(e,"_bb"),c=e.node(a);e.setParent(d,a),c.borderTop=d,e.setParent(s,a),c.borderBottom=s,f(u,function(l){Be(e,n,r,t,i,o,l);var h=e.node(l),v=h.borderTop?h.borderTop:l,p=h.borderBottom?h.borderBottom:l,b=h.borderTop?t:2*t,L=v!==p?1:i-o[a]+1;e.setEdge(d,v,{weight:b,minlen:L,nestingEdge:!0}),e.setEdge(p,s,{weight:b,minlen:L,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,d,{weight:0,minlen:i+o[a]})}function Pr(e){var n={};function r(t,i){var o=e.children(t);o&&o.length&&f(o,function(a){r(a,i+1)}),n[t]=i}return f(e.children(),function(t){r(t,1)}),n}function _r(e){return B(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function Cr(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,f(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function Ir(e,n,r){var t={},i;f(r,function(o){for(var a=e.parent(o),u,d;a;){if(u=e.parent(a),u?(d=t[u],t[u]=a):(d=i,i=a),d&&d!==a){n.setEdge(d,a);return}a=u}})}function Rr(e,n,r){var t=Tr(e),i=new g({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(o){return e.node(o)});return f(e.nodes(),function(o){var a=e.node(o),u=e.parent(o);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(i.setNode(o),i.setParent(o,u||t),f(e[r](o),function(d){var s=d.v===o?d.w:d.v,c=i.edge(s,o),l=m(c)?0:c.weight;i.setEdge(s,o,{weight:e.edge(d).weight+l})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(o,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))}),i}function Tr(e){for(var n;e.hasNode(n=K("_root")););return n}function Mr(e,n){for(var r=0,t=1;t<n.length;++t)r+=Sr(e,n[t-1],n[t]);return r}function Sr(e,n,r){for(var t=Wn(r,w(r,function(s,c){return c})),i=O(w(n,function(s){return R(w(e.outEdges(s),function(c){return{pos:t[c.w],weight:e.edge(c).weight}}),"pos")})),o=1;o<r.length;)o<<=1;var a=2*o-1;o-=1;var u=w(new Array(a),function(){return 0}),d=0;return f(i.forEach(function(s){var c=s.pos+o;u[c]+=s.weight;for(var l=0;c>0;)c%2&&(l+=u[c+1]),c=c-1>>1,u[c]+=s.weight;d+=s.weight*l})),d}function Fr(e){var n={},r=I(e.nodes(),function(u){return!e.children(u).length}),t=y(w(r,function(u){return e.node(u).rank})),i=w(k(t+1),function(){return[]});function o(u){if(!Ne(n,u)){n[u]=!0;var d=e.node(u);i[d.rank].push(u),f(e.successors(u),o)}}var a=R(r,function(u){return e.node(u).rank});return f(a,o),i}function Ar(e,n){return w(n,function(r){var t=e.inEdges(r);if(t.length){var i=B(t,function(o,a){var u=e.edge(a),d=e.node(a.v);return{sum:o.sum+u.weight*d.order,weight:o.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function Br(e,n){var r={};f(e,function(i,o){var a=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};m(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),f(n.edges(),function(i){var o=r[i.v],a=r[i.w];!m(o)&&!m(a)&&(a.indegree++,o.out.push(r[i.w]))});var t=I(r,function(i){return!i.indegree});return jr(t)}function jr(e){var n=[];function r(o){return function(a){a.merged||(m(a.barycenter)||m(o.barycenter)||a.barycenter>=o.barycenter)&&Vr(o,a)}}function t(o){return function(a){a.in.push(o),--a.indegree===0&&e.push(a)}}for(;e.length;){var i=e.pop();n.push(i),f(i.in.reverse(),r(i)),f(i.out,t(i))}return w(I(n,function(o){return!o.merged}),function(o){return A(o,["vs","i","barycenter","weight"])})}function Vr(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}function Gr(e,n){var r=ir(e,function(c){return Object.prototype.hasOwnProperty.call(c,"barycenter")}),t=r.lhs,i=R(r.rhs,function(c){return-c.i}),o=[],a=0,u=0,d=0;t.sort(Yr(!!n)),d=ce(o,i,d),f(t,function(c){d+=c.vs.length,o.push(c.vs),a+=c.barycenter*c.weight,u+=c.weight,d=ce(o,i,d)});var s={vs:O(o)};return u&&(s.barycenter=a/u,s.weight=u),s}function ce(e,n,r){for(var t;n.length&&(t=F(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function Yr(e){return function(n,r){return n.barycenter<r.barycenter?-1:n.barycenter>r.barycenter?1:e?r.i-n.i:n.i-r.i}}function je(e,n,r,t){var i=e.children(n),o=e.node(n),a=o?o.borderLeft:void 0,u=o?o.borderRight:void 0,d={};a&&(i=I(i,function(p){return p!==a&&p!==u}));var s=Ar(e,i);f(s,function(p){if(e.children(p.v).length){var b=je(e,p.v,r,t);d[p.v]=b,Object.prototype.hasOwnProperty.call(b,"barycenter")&&Dr(p,b)}});var c=Br(s,r);$r(c,d);var l=Gr(c,t);if(a&&(l.vs=O([a,l.vs,u]),e.predecessors(a).length)){var h=e.node(e.predecessors(a)[0]),v=e.node(e.predecessors(u)[0]);Object.prototype.hasOwnProperty.call(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+h.order+v.order)/(l.weight+2),l.weight+=2}return l}function $r(e,n){f(e,function(r){r.vs=O(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function Dr(e,n){m(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function qr(e){var n=Pe(e),r=le(e,k(1,n+1),"inEdges"),t=le(e,k(n-1,-1,-1),"outEdges"),i=Fr(e);he(e,i);for(var o=Number.POSITIVE_INFINITY,a,u=0,d=0;d<4;++u,++d){Wr(u%2?r:t,u%4>=2),i=V(e);var s=Mr(e,i);s<o&&(d=0,a=yn(i),o=s)}he(e,a)}function le(e,n,r){return w(n,function(t){return Rr(e,t,r)})}function Wr(e,n){var r=new g;f(e,function(t){var i=t.graph().root,o=je(t,i,r,n);f(o.vs,function(a,u){t.node(a).order=u}),Ir(t,r,o.vs)})}function he(e,n){f(n,function(r){f(r,function(t,i){e.node(t).order=i})})}function Xr(e){var n=Ur(e);f(e.graph().dummyChains,function(r){for(var t=e.node(r),i=t.edgeObj,o=zr(e,n,i.v,i.w),a=o.path,u=o.lca,d=0,s=a[d],c=!0;r!==i.w;){if(t=e.node(r),c){for(;(s=a[d])!==u&&e.node(s).maxRank<t.rank;)d++;s===u&&(c=!1)}if(!c){for(;d<a.length-1&&e.node(s=a[d+1]).minRank<=t.rank;)d++;s=a[d]}e.setParent(r,s),r=e.successors(r)[0]}})}function zr(e,n,r,t){var i=[],o=[],a=Math.min(n[r].low,n[t].low),u=Math.max(n[r].lim,n[t].lim),d,s;d=r;do d=e.parent(d),i.push(d);while(d&&(n[d].low>a||u>n[d].lim));for(s=d,d=t;(d=e.parent(d))!==s;)o.push(d);return{path:i.concat(o.reverse()),lca:s}}function Ur(e){var n={},r=0;function t(i){var o=r;f(e.children(i),t),n[i]={low:o,lim:r++}}return f(e.children(),t),n}function Hr(e,n){var r={};function t(i,o){var a=0,u=0,d=i.length,s=F(o);return f(o,function(c,l){var h=Kr(e,c),v=h?e.node(h).order:d;(h||c===s)&&(f(o.slice(u,l+1),function(p){f(e.predecessors(p),function(b){var L=e.node(b),ne=L.order;(ne<a||v<ne)&&!(L.dummy&&e.node(p).dummy)&&Ve(r,b,p)})}),u=l+1,a=v)}),o}return B(n,t),r}function Jr(e,n){var r={};function t(o,a,u,d,s){var c;f(k(a,u),function(l){c=o[l],e.node(c).dummy&&f(e.predecessors(c),function(h){var v=e.node(h);v.dummy&&(v.order<d||v.order>s)&&Ve(r,h,c)})})}function i(o,a){var u=-1,d,s=0;return f(a,function(c,l){if(e.node(c).dummy==="border"){var h=e.predecessors(c);h.length&&(d=e.node(h[0]).order,t(a,s,l,u,d),s=l,u=d)}t(a,s,a.length,d,o.length)}),a}return B(n,i),r}function Kr(e,n){if(e.node(n).dummy)return H(e.predecessors(n),function(r){return e.node(r).dummy})}function Ve(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 i=e[n];Object.defineProperty(i,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Zr(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function Qr(e,n,r,t){var i={},o={},a={};return f(n,function(u){f(u,function(d,s){i[d]=d,o[d]=d,a[d]=s})}),f(n,function(u){var d=-1;f(u,function(s){var c=t(s);if(c.length){c=R(c,function(b){return a[b]});for(var l=(c.length-1)/2,h=Math.floor(l),v=Math.ceil(l);h<=v;++h){var p=c[h];o[s]===s&&d<a[p]&&!Zr(r,s,p)&&(o[p]=s,o[s]=i[s]=i[p],d=a[p])}}})}),{root:i,align:o}}function et(e,n,r,t,i){var o={},a=nt(e,n,r,i),u=i?"borderLeft":"borderRight";function d(l,h){for(var v=a.nodes(),p=v.pop(),b={};p;)b[p]?l(p):(b[p]=!0,v.push(p),v=v.concat(h(p))),p=v.pop()}function s(l){o[l]=a.inEdges(l).reduce(function(h,v){return Math.max(h,o[v.v]+a.edge(v))},0)}function c(l){var h=a.outEdges(l).reduce(function(p,b){return Math.min(p,o[b.w]-a.edge(b))},Number.POSITIVE_INFINITY),v=e.node(l);h!==Number.POSITIVE_INFINITY&&v.borderType!==u&&(o[l]=Math.max(o[l],h))}return d(s,a.predecessors.bind(a)),d(c,a.successors.bind(a)),f(t,function(l){o[l]=o[r[l]]}),o}function nt(e,n,r,t){var i=new g,o=e.graph(),a=ot(o.nodesep,o.edgesep,t);return f(n,function(u){var d;f(u,function(s){var c=r[s];if(i.setNode(c),d){var l=r[d],h=i.edge(l,c);i.setEdge(l,c,Math.max(a(e,s,d),h||0))}d=s})}),i}function rt(e,n){return J(E(n),function(r){var t=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return Ln(r,function(o,a){var u=ut(e,a)/2;t=Math.max(o+u,t),i=Math.min(o-u,i)}),t-i})}function tt(e,n){var r=E(n),t=P(r),i=y(r);f(["u","d"],function(o){f(["l","r"],function(a){var u=o+a,d=e[u],s;if(d!==n){var c=E(d);s=a==="l"?t-P(c):i-y(c),s&&(e[u]=j(d,function(l){return l+s}))}})})}function it(e,n){return j(e.ul,function(r,t){if(n)return e[n.toLowerCase()][t];var i=R(w(e,t));return(i[1]+i[2])/2})}function at(e){var n=V(e),r=z(Hr(e,n),Jr(e,n)),t={},i;f(["u","d"],function(a){i=a==="u"?n:E(n).reverse(),f(["l","r"],function(u){u==="r"&&(i=w(i,function(l){return E(l).reverse()}));var d=(a==="u"?e.predecessors:e.successors).bind(e),s=Qr(e,i,r,d),c=et(e,i,s.root,s.align,u==="r");u==="r"&&(c=j(c,function(l){return-l})),t[a+u]=c})});var o=rt(e,t);return tt(t,o),it(t,e.graph().align)}function ot(e,n,r){return function(t,i,o){var a=t.node(i),u=t.node(o),d=0,s;if(d+=a.width/2,Object.prototype.hasOwnProperty.call(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":s=-a.width/2;break;case"r":s=a.width/2;break}if(s&&(d+=r?s:-s),s=0,d+=(a.dummy?n:e)/2,d+=(u.dummy?n:e)/2,d+=u.width/2,Object.prototype.hasOwnProperty.call(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=u.width/2;break;case"r":s=-u.width/2;break}return s&&(d+=r?s:-s),s=0,d}}function ut(e,n){return e.node(n).width}function dt(e){e=Le(e),st(e),Pn(at(e),function(n,r){e.node(r).x=n})}function st(e){var n=V(e),r=e.graph().ranksep,t=0;f(n,function(i){var o=y(w(i,function(a){return e.node(a).height}));f(i,function(a){e.node(a).y=t+o/2}),t+=o+r})}function Bt(e,n){var r=ar;r("layout",()=>{var t=r(" buildLayoutGraph",()=>yt(e));r(" runLayout",()=>ft(t,r)),r(" updateInputGraph",()=>ct(e,t))})}function ft(e,n){n(" makeSpaceForEdgeLabels",()=>xt(e)),n(" removeSelfEdges",()=>It(e)),n(" acyclic",()=>Zn(e)),n(" nestingGraph.run",()=>Lr(e)),n(" rank",()=>kr(Le(e))),n(" injectEdgeLabelProxies",()=>Et(e)),n(" removeEmptyRanks",()=>tr(e)),n(" nestingGraph.cleanup",()=>Cr(e)),n(" normalizeRanks",()=>rr(e)),n(" assignRankMinMax",()=>kt(e)),n(" removeEdgeLabelProxies",()=>Ot(e)),n(" normalize.run",()=>cr(e)),n(" parentDummyChains",()=>Xr(e)),n(" addBorderSegments",()=>or(e)),n(" order",()=>qr(e)),n(" insertSelfEdges",()=>Rt(e)),n(" adjustCoordinateSystem",()=>ur(e)),n(" position",()=>dt(e)),n(" positionSelfEdges",()=>Tt(e)),n(" removeBorderNodes",()=>Ct(e)),n(" normalize.undo",()=>hr(e)),n(" fixupEdgeLabelCoords",()=>Pt(e)),n(" undoCoordinateSystem",()=>dr(e)),n(" translateGraph",()=>Nt(e)),n(" assignNodeIntersects",()=>Lt(e)),n(" reversePoints",()=>_t(e)),n(" acyclic.undo",()=>er(e))}function ct(e,n){f(e.nodes(),function(r){var t=e.node(r),i=n.node(r);t&&(t.x=i.x,t.y=i.y,n.children(r).length&&(t.width=i.width,t.height=i.height))}),f(e.edges(),function(r){var t=e.edge(r),i=n.edge(r);t.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(t.x=i.x,t.y=i.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var lt=["nodesep","edgesep","ranksep","marginx","marginy"],ht={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},vt=["acyclicer","ranker","rankdir","align"],pt=["width","height"],wt={width:0,height:0},bt=["minlen","weight","width","height","labeloffset"],mt={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},gt=["labelpos"];function yt(e){var n=new g({multigraph:!0,compound:!0}),r=W(e.graph());return n.setGraph(z({},ht,q(r,lt),A(r,vt))),f(e.nodes(),function(t){var i=W(e.node(t));n.setNode(t,En(q(i,pt),wt)),n.setParent(t,e.parent(t))}),f(e.edges(),function(t){var i=W(e.edge(t));n.setEdge(t,z({},mt,q(i,bt),A(i,gt)))}),n}function xt(e){var n=e.graph();n.ranksep/=2,f(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function Et(e){f(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),i=e.node(n.w),o={rank:(i.rank-t.rank)/2+t.rank,e:n};N(e,"edge-proxy",o,"_ep")}})}function kt(e){var n=0;f(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=y(n,t.maxRank))}),e.graph().maxRank=n}function Ot(e){f(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function Nt(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,i=0,o=e.graph(),a=o.marginx||0,u=o.marginy||0;function d(s){var c=s.x,l=s.y,h=s.width,v=s.height;n=Math.min(n,c-h/2),r=Math.max(r,c+h/2),t=Math.min(t,l-v/2),i=Math.max(i,l+v/2)}f(e.nodes(),function(s){d(e.node(s))}),f(e.edges(),function(s){var c=e.edge(s);Object.prototype.hasOwnProperty.call(c,"x")&&d(c)}),n-=a,t-=u,f(e.nodes(),function(s){var c=e.node(s);c.x-=n,c.y-=t}),f(e.edges(),function(s){var c=e.edge(s);f(c.points,function(l){l.x-=n,l.y-=t}),Object.prototype.hasOwnProperty.call(c,"x")&&(c.x-=n),Object.prototype.hasOwnProperty.call(c,"y")&&(c.y-=t)}),o.width=r-n+a,o.height=i-t+u}function Lt(e){f(e.edges(),function(n){var r=e.edge(n),t=e.node(n.v),i=e.node(n.w),o,a;r.points?(o=r.points[0],a=r.points[r.points.length-1]):(r.points=[],o=i,a=t),r.points.unshift(ae(t,o)),r.points.push(ae(i,a))})}function Pt(e){f(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(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;break}})}function _t(e){f(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function Ct(e){f(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),i=e.node(r.borderBottom),o=e.node(F(r.borderLeft)),a=e.node(F(r.borderRight));r.width=Math.abs(a.x-o.x),r.height=Math.abs(i.y-t.y),r.x=o.x+r.width/2,r.y=t.y+r.height/2}}),f(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function It(e){f(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)}})}function Rt(e){var n=V(e);f(n,function(r){var t=0;f(r,function(i,o){var a=e.node(i);a.order=o+t,f(a.selfEdges,function(u){N(e,"selfedge",{width:u.label.width,height:u.label.height,rank:a.rank,order:o+ ++t,e:u.e,label:u.label},"_se")}),delete a.selfEdges})})}function Tt(e){f(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var t=e.node(r.e.v),i=t.x+t.width/2,o=t.y,a=r.x-i,u=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:i+2*a/3,y:o-u},{x:i+5*a/6,y:o-u},{x:i+a,y:o},{x:i+5*a/6,y:o+u},{x:i+2*a/3,y:o+u}],r.label.x=r.x,r.label.y=r.y}})}function q(e,n){return j(A(e,n),Number)}function W(e){var n={};return f(e,function(r,t){n[t.toLowerCase()]=r}),n}export{Bt as l};
|
|
1
|
+
import{b as Ge,G as g,i as m,v as E}from"./graph-C_DQAJXv.js";import{i as X,d as C,k as Ye,o as $e,p as ve,q as pe,t as De,u as we,v as qe,w as be,c as G,x as We,b as Xe,y as ze,n as f,m as I,r as B}from"./_baseUniq-DuAmhUI0.js";import{f as O,b as me,a as Ue,c as He,m as w,d as P}from"./min-CzDI_uFs.js";import{dO as M,ee as Je,ef as Ke,dV as ge,eg as S,dF as ye,e7 as Ze,d8 as Qe,ec as en,eh as nn,da as xe,eb as rn,dU as Ee,d9 as ke,dM as tn,dX as an,ei as z}from"./index-BzhKcNOt.js";var on=/\s/;function un(e){for(var n=e.length;n--&&on.test(e.charAt(n)););return n}var dn=/^\s+/;function sn(e){return e&&e.slice(0,un(e)+1).replace(dn,"")}var re=NaN,fn=/^[-+]0x[0-9a-f]+$/i,cn=/^0b[01]+$/i,ln=/^0o[0-7]+$/i,hn=parseInt;function vn(e){if(typeof e=="number")return e;if(X(e))return re;if(M(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=M(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=sn(e);var r=cn.test(e);return r||ln.test(e)?hn(e.slice(2),r?2:8):fn.test(e)?re:+e}var te=1/0,pn=17976931348623157e292;function T(e){if(!e)return e===0?e:0;if(e=vn(e),e===te||e===-te){var n=e<0?-1:1;return n*pn}return e===e?e:0}function wn(e){var n=T(e),r=n%1;return n===n?r?n-r:n:0}function bn(e){return Je(Ke(e,void 0,O),e+"")}var mn=1,gn=4;function yn(e){return Ge(e,mn|gn)}var Oe=Object.prototype,xn=Oe.hasOwnProperty,En=ge(function(e,n){e=Object(e);var r=-1,t=n.length,i=t>2?n[2]:void 0;for(i&&S(n[0],n[1],i)&&(t=1);++r<t;)for(var o=n[r],a=ye(o),u=-1,d=a.length;++u<d;){var s=a[u],c=e[s];(c===void 0||Ze(c,Oe[s])&&!xn.call(e,s))&&(e[s]=o[s])}return e});function F(e){var n=e==null?0:e.length;return n?e[n-1]:void 0}function kn(e){return function(n,r,t){var i=Object(n);if(!Qe(n)){var o=C(r);n=Ye(n),r=function(u){return o(i[u],u,i)}}var a=e(n,r,t);return a>-1?i[o?n[a]:a]:void 0}}var On=Math.max;function Nn(e,n,r){var t=e==null?0:e.length;if(!t)return-1;var i=r==null?0:wn(r);return i<0&&(i=On(t+i,0)),$e(e,C(n),i)}var H=kn(Nn);function Ln(e,n){return e==null?e:en(e,ve(n),ye)}function Pn(e,n){return e&&pe(e,ve(n))}function _n(e,n){return e>n}var Cn=Object.prototype,In=Cn.hasOwnProperty;function Rn(e,n){return e!=null&&In.call(e,n)}function Ne(e,n){return e!=null&&De(e,n,Rn)}function j(e,n){var r={};return n=C(n),pe(e,function(t,i,o){nn(r,i,n(t,i,o))}),r}function y(e){return e&&e.length?me(e,xe,_n):void 0}function J(e,n){return e&&e.length?me(e,C(n),Ue):void 0}function Tn(e,n,r,t){if(!M(e))return e;n=we(n,e);for(var i=-1,o=n.length,a=o-1,u=e;u!=null&&++i<o;){var d=qe(n[i]),s=r;if(d==="__proto__"||d==="constructor"||d==="prototype")return e;if(i!=a){var c=u[d];s=void 0,s===void 0&&(s=M(c)?c:rn(n[i+1])?[]:{})}Ee(u,d,s),u=u[d]}return e}function Mn(e,n,r){for(var t=-1,i=n.length,o={};++t<i;){var a=n[t],u=be(e,a);r(u,a)&&Tn(o,we(a,e),u)}return o}function Sn(e,n){var r=e.length;for(e.sort(n);r--;)e[r]=e[r].value;return e}function Fn(e,n){if(e!==n){var r=e!==void 0,t=e===null,i=e===e,o=X(e),a=n!==void 0,u=n===null,d=n===n,s=X(n);if(!u&&!s&&!o&&e>n||o&&a&&d&&!u&&!s||t&&a&&d||!r&&d||!i)return 1;if(!t&&!o&&!s&&e<n||s&&r&&i&&!t&&!o||u&&r&&i||!a&&i||!d)return-1}return 0}function An(e,n,r){for(var t=-1,i=e.criteria,o=n.criteria,a=i.length,u=r.length;++t<a;){var d=Fn(i[t],o[t]);if(d){if(t>=u)return d;var s=r[t];return d*(s=="desc"?-1:1)}}return e.index-n.index}function Bn(e,n,r){n.length?n=G(n,function(o){return ke(o)?function(a){return be(a,o.length===1?o[0]:o)}:o}):n=[xe];var t=-1;n=G(n,tn(C));var i=He(e,function(o,a,u){var d=G(n,function(s){return s(o)});return{criteria:d,index:++t,value:o}});return Sn(i,function(o,a){return An(o,a,r)})}function jn(e,n){return Mn(e,n,function(r,t){return We(e,t)})}var A=bn(function(e,n){return e==null?{}:jn(e,n)}),Vn=Math.ceil,Gn=Math.max;function Yn(e,n,r,t){for(var i=-1,o=Gn(Vn((n-e)/(r||1)),0),a=Array(o);o--;)a[++i]=e,e+=r;return a}function $n(e){return function(n,r,t){return t&&typeof t!="number"&&S(n,r,t)&&(r=t=void 0),n=T(n),r===void 0?(r=n,n=0):r=T(r),t=t===void 0?n<r?1:-1:T(t),Yn(n,r,t)}}var k=$n(),R=ge(function(e,n){if(e==null)return[];var r=n.length;return r>1&&S(e,n[0],n[1])?n=[]:r>2&&S(n[0],n[1],n[2])&&(n=[n[0]]),Bn(e,Xe(n),[])}),Dn=0;function K(e){var n=++Dn;return ze(e)+n}function qn(e,n,r){for(var t=-1,i=e.length,o=n.length,a={};++t<i;){var u=t<o?n[t]:void 0;r(a,e[t],u)}return a}function Wn(e,n){return qn(e||[],n||[],Ee)}class Xn{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,r=n._prev;if(r!==n)return ie(r),r}enqueue(n){var r=this._sentinel;n._prev&&n._next&&ie(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r}toString(){for(var n=[],r=this._sentinel,t=r._prev;t!==r;)n.push(JSON.stringify(t,zn)),t=t._prev;return"["+n.join(", ")+"]"}}function ie(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function zn(e,n){if(e!=="_next"&&e!=="_prev")return n}var Un=an(1);function Hn(e,n){if(e.nodeCount()<=1)return[];var r=Kn(e,n||Un),t=Jn(r.graph,r.buckets,r.zeroIdx);return O(w(t,function(i){return e.outEdges(i.v,i.w)}))}function Jn(e,n,r){for(var t=[],i=n[n.length-1],o=n[0],a;e.nodeCount();){for(;a=o.dequeue();)Y(e,n,r,a);for(;a=i.dequeue();)Y(e,n,r,a);if(e.nodeCount()){for(var u=n.length-2;u>0;--u)if(a=n[u].dequeue(),a){t=t.concat(Y(e,n,r,a,!0));break}}}return t}function Y(e,n,r,t,i){var o=i?[]:void 0;return f(e.inEdges(t.v),function(a){var u=e.edge(a),d=e.node(a.v);i&&o.push({v:a.v,w:a.w}),d.out-=u,U(n,r,d)}),f(e.outEdges(t.v),function(a){var u=e.edge(a),d=a.w,s=e.node(d);s.in-=u,U(n,r,s)}),e.removeNode(t.v),o}function Kn(e,n){var r=new g,t=0,i=0;f(e.nodes(),function(u){r.setNode(u,{v:u,in:0,out:0})}),f(e.edges(),function(u){var d=r.edge(u.v,u.w)||0,s=n(u),c=d+s;r.setEdge(u.v,u.w,c),i=Math.max(i,r.node(u.v).out+=s),t=Math.max(t,r.node(u.w).in+=s)});var o=k(i+t+3).map(function(){return new Xn}),a=t+1;return f(r.nodes(),function(u){U(o,a,r.node(u))}),{graph:r,buckets:o,zeroIdx:a}}function U(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 Zn(e){var n=e.graph().acyclicer==="greedy"?Hn(e,r(e)):Qn(e);f(n,function(t){var i=e.edge(t);e.removeEdge(t),i.forwardName=t.name,i.reversed=!0,e.setEdge(t.w,t.v,i,K("rev"))});function r(t){return function(i){return t.edge(i).weight}}}function Qn(e){var n=[],r={},t={};function i(o){Object.prototype.hasOwnProperty.call(t,o)||(t[o]=!0,r[o]=!0,f(e.outEdges(o),function(a){Object.prototype.hasOwnProperty.call(r,a.w)?n.push(a):i(a.w)}),delete r[o])}return f(e.nodes(),i),n}function er(e){f(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)}})}function N(e,n,r,t){var i;do i=K(t);while(e.hasNode(i));return r.dummy=n,e.setNode(i,r),i}function nr(e){var n=new g().setGraph(e.graph());return f(e.nodes(),function(r){n.setNode(r,e.node(r))}),f(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+i.weight,minlen:Math.max(t.minlen,i.minlen)})}),n}function Le(e){var n=new g({multigraph:e.isMultigraph()}).setGraph(e.graph());return f(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),f(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function ae(e,n){var r=e.x,t=e.y,i=n.x-r,o=n.y-t,a=e.width/2,u=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var d,s;return Math.abs(o)*a>Math.abs(i)*u?(o<0&&(u=-u),d=u*i/o,s=u):(i<0&&(a=-a),d=a,s=a*o/i),{x:r+d,y:t+s}}function V(e){var n=w(k(Pe(e)+1),function(){return[]});return f(e.nodes(),function(r){var t=e.node(r),i=t.rank;m(i)||(n[i][t.order]=r)}),n}function rr(e){var n=P(w(e.nodes(),function(r){return e.node(r).rank}));f(e.nodes(),function(r){var t=e.node(r);Ne(t,"rank")&&(t.rank-=n)})}function tr(e){var n=P(w(e.nodes(),function(o){return e.node(o).rank})),r=[];f(e.nodes(),function(o){var a=e.node(o).rank-n;r[a]||(r[a]=[]),r[a].push(o)});var t=0,i=e.graph().nodeRankFactor;f(r,function(o,a){m(o)&&a%i!==0?--t:t&&f(o,function(u){e.node(u).rank+=t})})}function oe(e,n,r,t){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=t),N(e,"border",i,n)}function Pe(e){return y(w(e.nodes(),function(n){var r=e.node(n).rank;if(!m(r))return r}))}function ir(e,n){var r={lhs:[],rhs:[]};return f(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function ar(e,n){return n()}function or(e){function n(r){var t=e.children(r),i=e.node(r);if(t.length&&f(t,n),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var o=i.minRank,a=i.maxRank+1;o<a;++o)ue(e,"borderLeft","_bl",r,i,o),ue(e,"borderRight","_br",r,i,o)}}f(e.children(),n)}function ue(e,n,r,t,i,o){var a={width:0,height:0,rank:o,borderType:n},u=i[n][o-1],d=N(e,"border",a,r);i[n][o]=d,e.setParent(d,t),u&&e.setEdge(u,d,{weight:1})}function ur(e){var n=e.graph().rankdir.toLowerCase();(n==="lr"||n==="rl")&&_e(e)}function dr(e){var n=e.graph().rankdir.toLowerCase();(n==="bt"||n==="rl")&&sr(e),(n==="lr"||n==="rl")&&(fr(e),_e(e))}function _e(e){f(e.nodes(),function(n){de(e.node(n))}),f(e.edges(),function(n){de(e.edge(n))})}function de(e){var n=e.width;e.width=e.height,e.height=n}function sr(e){f(e.nodes(),function(n){$(e.node(n))}),f(e.edges(),function(n){var r=e.edge(n);f(r.points,$),Object.prototype.hasOwnProperty.call(r,"y")&&$(r)})}function $(e){e.y=-e.y}function fr(e){f(e.nodes(),function(n){D(e.node(n))}),f(e.edges(),function(n){var r=e.edge(n);f(r.points,D),Object.prototype.hasOwnProperty.call(r,"x")&&D(r)})}function D(e){var n=e.x;e.x=e.y,e.y=n}function cr(e){e.graph().dummyChains=[],f(e.edges(),function(n){lr(e,n)})}function lr(e,n){var r=n.v,t=e.node(r).rank,i=n.w,o=e.node(i).rank,a=n.name,u=e.edge(n),d=u.labelRank;if(o!==t+1){e.removeEdge(n);var s=void 0,c,l;for(l=0,++t;t<o;++l,++t)u.points=[],s={width:0,height:0,edgeLabel:u,edgeObj:n,rank:t},c=N(e,"edge",s,"_d"),t===d&&(s.width=u.width,s.height=u.height,s.dummy="edge-label",s.labelpos=u.labelpos),e.setEdge(r,c,{weight:u.weight},a),l===0&&e.graph().dummyChains.push(c),r=c;e.setEdge(r,i,{weight:u.weight},a)}}function hr(e){f(e.graph().dummyChains,function(n){var r=e.node(n),t=r.edgeLabel,i;for(e.setEdge(r.edgeObj,t);r.dummy;)i=e.successors(n)[0],e.removeNode(n),t.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(t.x=r.x,t.y=r.y,t.width=r.width,t.height=r.height),n=i,r=e.node(n)})}function Z(e){var n={};function r(t){var i=e.node(t);if(Object.prototype.hasOwnProperty.call(n,t))return i.rank;n[t]=!0;var o=P(w(e.outEdges(t),function(a){return r(a.w)-e.edge(a).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),i.rank=o}f(e.sources(),r)}function _(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function Ce(e){var n=new g({directed:!1}),r=e.nodes()[0],t=e.nodeCount();n.setNode(r,{});for(var i,o;vr(n,e)<t;)i=pr(n,e),o=n.hasNode(i.v)?_(e,i):-_(e,i),wr(n,e,o);return n}function vr(e,n){function r(t){f(n.nodeEdges(t),function(i){var o=i.v,a=t===o?i.w:o;!e.hasNode(a)&&!_(n,i)&&(e.setNode(a,{}),e.setEdge(t,a,{}),r(a))})}return f(e.nodes(),r),e.nodeCount()}function pr(e,n){return J(n.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return _(n,r)})}function wr(e,n,r){f(e.nodes(),function(t){n.node(t).rank+=r})}function br(){}br.prototype=new Error;function Ie(e,n,r){ke(n)||(n=[n]);var t=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],o={};return f(n,function(a){if(!e.hasNode(a))throw new Error("Graph does not have node: "+a);Re(e,a,r==="post",o,t,i)}),i}function Re(e,n,r,t,i,o){Object.prototype.hasOwnProperty.call(t,n)||(t[n]=!0,r||o.push(n),f(i(n),function(a){Re(e,a,r,t,i,o)}),r&&o.push(n))}function mr(e,n){return Ie(e,n,"post")}function gr(e,n){return Ie(e,n,"pre")}x.initLowLimValues=ee;x.initCutValues=Q;x.calcCutValue=Te;x.leaveEdge=Se;x.enterEdge=Fe;x.exchangeEdges=Ae;function x(e){e=nr(e),Z(e);var n=Ce(e);ee(n),Q(n,e);for(var r,t;r=Se(n);)t=Fe(n,e,r),Ae(n,e,r,t)}function Q(e,n){var r=mr(e,e.nodes());r=r.slice(0,r.length-1),f(r,function(t){yr(e,n,t)})}function yr(e,n,r){var t=e.node(r),i=t.parent;e.edge(r,i).cutvalue=Te(e,n,r)}function Te(e,n,r){var t=e.node(r),i=t.parent,o=!0,a=n.edge(r,i),u=0;return a||(o=!1,a=n.edge(i,r)),u=a.weight,f(n.nodeEdges(r),function(d){var s=d.v===r,c=s?d.w:d.v;if(c!==i){var l=s===o,h=n.edge(d).weight;if(u+=l?h:-h,Er(e,r,c)){var v=e.edge(r,c).cutvalue;u+=l?-v:v}}}),u}function ee(e,n){arguments.length<2&&(n=e.nodes()[0]),Me(e,{},1,n)}function Me(e,n,r,t,i){var o=r,a=e.node(t);return n[t]=!0,f(e.neighbors(t),function(u){Object.prototype.hasOwnProperty.call(n,u)||(r=Me(e,n,r,u,t))}),a.low=o,a.lim=r++,i?a.parent=i:delete a.parent,r}function Se(e){return H(e.edges(),function(n){return e.edge(n).cutvalue<0})}function Fe(e,n,r){var t=r.v,i=r.w;n.hasEdge(t,i)||(t=r.w,i=r.v);var o=e.node(t),a=e.node(i),u=o,d=!1;o.lim>a.lim&&(u=a,d=!0);var s=I(n.edges(),function(c){return d===se(e,e.node(c.v),u)&&d!==se(e,e.node(c.w),u)});return J(s,function(c){return _(n,c)})}function Ae(e,n,r,t){var i=r.v,o=r.w;e.removeEdge(i,o),e.setEdge(t.v,t.w,{}),ee(e),Q(e,n),xr(e,n)}function xr(e,n){var r=H(e.nodes(),function(i){return!n.node(i).parent}),t=gr(e,r);t=t.slice(1),f(t,function(i){var o=e.node(i).parent,a=n.edge(i,o),u=!1;a||(a=n.edge(o,i),u=!0),n.node(i).rank=n.node(o).rank+(u?a.minlen:-a.minlen)})}function Er(e,n,r){return e.hasEdge(n,r)}function se(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function kr(e){switch(e.graph().ranker){case"network-simplex":fe(e);break;case"tight-tree":Nr(e);break;case"longest-path":Or(e);break;default:fe(e)}}var Or=Z;function Nr(e){Z(e),Ce(e)}function fe(e){x(e)}function Lr(e){var n=N(e,"root",{},"_root"),r=Pr(e),t=y(E(r))-1,i=2*t+1;e.graph().nestingRoot=n,f(e.edges(),function(a){e.edge(a).minlen*=i});var o=_r(e)+1;f(e.children(),function(a){Be(e,n,i,o,t,r,a)}),e.graph().nodeRankFactor=i}function Be(e,n,r,t,i,o,a){var u=e.children(a);if(!u.length){a!==n&&e.setEdge(n,a,{weight:0,minlen:r});return}var d=oe(e,"_bt"),s=oe(e,"_bb"),c=e.node(a);e.setParent(d,a),c.borderTop=d,e.setParent(s,a),c.borderBottom=s,f(u,function(l){Be(e,n,r,t,i,o,l);var h=e.node(l),v=h.borderTop?h.borderTop:l,p=h.borderBottom?h.borderBottom:l,b=h.borderTop?t:2*t,L=v!==p?1:i-o[a]+1;e.setEdge(d,v,{weight:b,minlen:L,nestingEdge:!0}),e.setEdge(p,s,{weight:b,minlen:L,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,d,{weight:0,minlen:i+o[a]})}function Pr(e){var n={};function r(t,i){var o=e.children(t);o&&o.length&&f(o,function(a){r(a,i+1)}),n[t]=i}return f(e.children(),function(t){r(t,1)}),n}function _r(e){return B(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function Cr(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,f(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function Ir(e,n,r){var t={},i;f(r,function(o){for(var a=e.parent(o),u,d;a;){if(u=e.parent(a),u?(d=t[u],t[u]=a):(d=i,i=a),d&&d!==a){n.setEdge(d,a);return}a=u}})}function Rr(e,n,r){var t=Tr(e),i=new g({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(o){return e.node(o)});return f(e.nodes(),function(o){var a=e.node(o),u=e.parent(o);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(i.setNode(o),i.setParent(o,u||t),f(e[r](o),function(d){var s=d.v===o?d.w:d.v,c=i.edge(s,o),l=m(c)?0:c.weight;i.setEdge(s,o,{weight:e.edge(d).weight+l})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(o,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))}),i}function Tr(e){for(var n;e.hasNode(n=K("_root")););return n}function Mr(e,n){for(var r=0,t=1;t<n.length;++t)r+=Sr(e,n[t-1],n[t]);return r}function Sr(e,n,r){for(var t=Wn(r,w(r,function(s,c){return c})),i=O(w(n,function(s){return R(w(e.outEdges(s),function(c){return{pos:t[c.w],weight:e.edge(c).weight}}),"pos")})),o=1;o<r.length;)o<<=1;var a=2*o-1;o-=1;var u=w(new Array(a),function(){return 0}),d=0;return f(i.forEach(function(s){var c=s.pos+o;u[c]+=s.weight;for(var l=0;c>0;)c%2&&(l+=u[c+1]),c=c-1>>1,u[c]+=s.weight;d+=s.weight*l})),d}function Fr(e){var n={},r=I(e.nodes(),function(u){return!e.children(u).length}),t=y(w(r,function(u){return e.node(u).rank})),i=w(k(t+1),function(){return[]});function o(u){if(!Ne(n,u)){n[u]=!0;var d=e.node(u);i[d.rank].push(u),f(e.successors(u),o)}}var a=R(r,function(u){return e.node(u).rank});return f(a,o),i}function Ar(e,n){return w(n,function(r){var t=e.inEdges(r);if(t.length){var i=B(t,function(o,a){var u=e.edge(a),d=e.node(a.v);return{sum:o.sum+u.weight*d.order,weight:o.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function Br(e,n){var r={};f(e,function(i,o){var a=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};m(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),f(n.edges(),function(i){var o=r[i.v],a=r[i.w];!m(o)&&!m(a)&&(a.indegree++,o.out.push(r[i.w]))});var t=I(r,function(i){return!i.indegree});return jr(t)}function jr(e){var n=[];function r(o){return function(a){a.merged||(m(a.barycenter)||m(o.barycenter)||a.barycenter>=o.barycenter)&&Vr(o,a)}}function t(o){return function(a){a.in.push(o),--a.indegree===0&&e.push(a)}}for(;e.length;){var i=e.pop();n.push(i),f(i.in.reverse(),r(i)),f(i.out,t(i))}return w(I(n,function(o){return!o.merged}),function(o){return A(o,["vs","i","barycenter","weight"])})}function Vr(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}function Gr(e,n){var r=ir(e,function(c){return Object.prototype.hasOwnProperty.call(c,"barycenter")}),t=r.lhs,i=R(r.rhs,function(c){return-c.i}),o=[],a=0,u=0,d=0;t.sort(Yr(!!n)),d=ce(o,i,d),f(t,function(c){d+=c.vs.length,o.push(c.vs),a+=c.barycenter*c.weight,u+=c.weight,d=ce(o,i,d)});var s={vs:O(o)};return u&&(s.barycenter=a/u,s.weight=u),s}function ce(e,n,r){for(var t;n.length&&(t=F(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function Yr(e){return function(n,r){return n.barycenter<r.barycenter?-1:n.barycenter>r.barycenter?1:e?r.i-n.i:n.i-r.i}}function je(e,n,r,t){var i=e.children(n),o=e.node(n),a=o?o.borderLeft:void 0,u=o?o.borderRight:void 0,d={};a&&(i=I(i,function(p){return p!==a&&p!==u}));var s=Ar(e,i);f(s,function(p){if(e.children(p.v).length){var b=je(e,p.v,r,t);d[p.v]=b,Object.prototype.hasOwnProperty.call(b,"barycenter")&&Dr(p,b)}});var c=Br(s,r);$r(c,d);var l=Gr(c,t);if(a&&(l.vs=O([a,l.vs,u]),e.predecessors(a).length)){var h=e.node(e.predecessors(a)[0]),v=e.node(e.predecessors(u)[0]);Object.prototype.hasOwnProperty.call(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+h.order+v.order)/(l.weight+2),l.weight+=2}return l}function $r(e,n){f(e,function(r){r.vs=O(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function Dr(e,n){m(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function qr(e){var n=Pe(e),r=le(e,k(1,n+1),"inEdges"),t=le(e,k(n-1,-1,-1),"outEdges"),i=Fr(e);he(e,i);for(var o=Number.POSITIVE_INFINITY,a,u=0,d=0;d<4;++u,++d){Wr(u%2?r:t,u%4>=2),i=V(e);var s=Mr(e,i);s<o&&(d=0,a=yn(i),o=s)}he(e,a)}function le(e,n,r){return w(n,function(t){return Rr(e,t,r)})}function Wr(e,n){var r=new g;f(e,function(t){var i=t.graph().root,o=je(t,i,r,n);f(o.vs,function(a,u){t.node(a).order=u}),Ir(t,r,o.vs)})}function he(e,n){f(n,function(r){f(r,function(t,i){e.node(t).order=i})})}function Xr(e){var n=Ur(e);f(e.graph().dummyChains,function(r){for(var t=e.node(r),i=t.edgeObj,o=zr(e,n,i.v,i.w),a=o.path,u=o.lca,d=0,s=a[d],c=!0;r!==i.w;){if(t=e.node(r),c){for(;(s=a[d])!==u&&e.node(s).maxRank<t.rank;)d++;s===u&&(c=!1)}if(!c){for(;d<a.length-1&&e.node(s=a[d+1]).minRank<=t.rank;)d++;s=a[d]}e.setParent(r,s),r=e.successors(r)[0]}})}function zr(e,n,r,t){var i=[],o=[],a=Math.min(n[r].low,n[t].low),u=Math.max(n[r].lim,n[t].lim),d,s;d=r;do d=e.parent(d),i.push(d);while(d&&(n[d].low>a||u>n[d].lim));for(s=d,d=t;(d=e.parent(d))!==s;)o.push(d);return{path:i.concat(o.reverse()),lca:s}}function Ur(e){var n={},r=0;function t(i){var o=r;f(e.children(i),t),n[i]={low:o,lim:r++}}return f(e.children(),t),n}function Hr(e,n){var r={};function t(i,o){var a=0,u=0,d=i.length,s=F(o);return f(o,function(c,l){var h=Kr(e,c),v=h?e.node(h).order:d;(h||c===s)&&(f(o.slice(u,l+1),function(p){f(e.predecessors(p),function(b){var L=e.node(b),ne=L.order;(ne<a||v<ne)&&!(L.dummy&&e.node(p).dummy)&&Ve(r,b,p)})}),u=l+1,a=v)}),o}return B(n,t),r}function Jr(e,n){var r={};function t(o,a,u,d,s){var c;f(k(a,u),function(l){c=o[l],e.node(c).dummy&&f(e.predecessors(c),function(h){var v=e.node(h);v.dummy&&(v.order<d||v.order>s)&&Ve(r,h,c)})})}function i(o,a){var u=-1,d,s=0;return f(a,function(c,l){if(e.node(c).dummy==="border"){var h=e.predecessors(c);h.length&&(d=e.node(h[0]).order,t(a,s,l,u,d),s=l,u=d)}t(a,s,a.length,d,o.length)}),a}return B(n,i),r}function Kr(e,n){if(e.node(n).dummy)return H(e.predecessors(n),function(r){return e.node(r).dummy})}function Ve(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 i=e[n];Object.defineProperty(i,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Zr(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function Qr(e,n,r,t){var i={},o={},a={};return f(n,function(u){f(u,function(d,s){i[d]=d,o[d]=d,a[d]=s})}),f(n,function(u){var d=-1;f(u,function(s){var c=t(s);if(c.length){c=R(c,function(b){return a[b]});for(var l=(c.length-1)/2,h=Math.floor(l),v=Math.ceil(l);h<=v;++h){var p=c[h];o[s]===s&&d<a[p]&&!Zr(r,s,p)&&(o[p]=s,o[s]=i[s]=i[p],d=a[p])}}})}),{root:i,align:o}}function et(e,n,r,t,i){var o={},a=nt(e,n,r,i),u=i?"borderLeft":"borderRight";function d(l,h){for(var v=a.nodes(),p=v.pop(),b={};p;)b[p]?l(p):(b[p]=!0,v.push(p),v=v.concat(h(p))),p=v.pop()}function s(l){o[l]=a.inEdges(l).reduce(function(h,v){return Math.max(h,o[v.v]+a.edge(v))},0)}function c(l){var h=a.outEdges(l).reduce(function(p,b){return Math.min(p,o[b.w]-a.edge(b))},Number.POSITIVE_INFINITY),v=e.node(l);h!==Number.POSITIVE_INFINITY&&v.borderType!==u&&(o[l]=Math.max(o[l],h))}return d(s,a.predecessors.bind(a)),d(c,a.successors.bind(a)),f(t,function(l){o[l]=o[r[l]]}),o}function nt(e,n,r,t){var i=new g,o=e.graph(),a=ot(o.nodesep,o.edgesep,t);return f(n,function(u){var d;f(u,function(s){var c=r[s];if(i.setNode(c),d){var l=r[d],h=i.edge(l,c);i.setEdge(l,c,Math.max(a(e,s,d),h||0))}d=s})}),i}function rt(e,n){return J(E(n),function(r){var t=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return Ln(r,function(o,a){var u=ut(e,a)/2;t=Math.max(o+u,t),i=Math.min(o-u,i)}),t-i})}function tt(e,n){var r=E(n),t=P(r),i=y(r);f(["u","d"],function(o){f(["l","r"],function(a){var u=o+a,d=e[u],s;if(d!==n){var c=E(d);s=a==="l"?t-P(c):i-y(c),s&&(e[u]=j(d,function(l){return l+s}))}})})}function it(e,n){return j(e.ul,function(r,t){if(n)return e[n.toLowerCase()][t];var i=R(w(e,t));return(i[1]+i[2])/2})}function at(e){var n=V(e),r=z(Hr(e,n),Jr(e,n)),t={},i;f(["u","d"],function(a){i=a==="u"?n:E(n).reverse(),f(["l","r"],function(u){u==="r"&&(i=w(i,function(l){return E(l).reverse()}));var d=(a==="u"?e.predecessors:e.successors).bind(e),s=Qr(e,i,r,d),c=et(e,i,s.root,s.align,u==="r");u==="r"&&(c=j(c,function(l){return-l})),t[a+u]=c})});var o=rt(e,t);return tt(t,o),it(t,e.graph().align)}function ot(e,n,r){return function(t,i,o){var a=t.node(i),u=t.node(o),d=0,s;if(d+=a.width/2,Object.prototype.hasOwnProperty.call(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":s=-a.width/2;break;case"r":s=a.width/2;break}if(s&&(d+=r?s:-s),s=0,d+=(a.dummy?n:e)/2,d+=(u.dummy?n:e)/2,d+=u.width/2,Object.prototype.hasOwnProperty.call(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=u.width/2;break;case"r":s=-u.width/2;break}return s&&(d+=r?s:-s),s=0,d}}function ut(e,n){return e.node(n).width}function dt(e){e=Le(e),st(e),Pn(at(e),function(n,r){e.node(r).x=n})}function st(e){var n=V(e),r=e.graph().ranksep,t=0;f(n,function(i){var o=y(w(i,function(a){return e.node(a).height}));f(i,function(a){e.node(a).y=t+o/2}),t+=o+r})}function Bt(e,n){var r=ar;r("layout",()=>{var t=r(" buildLayoutGraph",()=>yt(e));r(" runLayout",()=>ft(t,r)),r(" updateInputGraph",()=>ct(e,t))})}function ft(e,n){n(" makeSpaceForEdgeLabels",()=>xt(e)),n(" removeSelfEdges",()=>It(e)),n(" acyclic",()=>Zn(e)),n(" nestingGraph.run",()=>Lr(e)),n(" rank",()=>kr(Le(e))),n(" injectEdgeLabelProxies",()=>Et(e)),n(" removeEmptyRanks",()=>tr(e)),n(" nestingGraph.cleanup",()=>Cr(e)),n(" normalizeRanks",()=>rr(e)),n(" assignRankMinMax",()=>kt(e)),n(" removeEdgeLabelProxies",()=>Ot(e)),n(" normalize.run",()=>cr(e)),n(" parentDummyChains",()=>Xr(e)),n(" addBorderSegments",()=>or(e)),n(" order",()=>qr(e)),n(" insertSelfEdges",()=>Rt(e)),n(" adjustCoordinateSystem",()=>ur(e)),n(" position",()=>dt(e)),n(" positionSelfEdges",()=>Tt(e)),n(" removeBorderNodes",()=>Ct(e)),n(" normalize.undo",()=>hr(e)),n(" fixupEdgeLabelCoords",()=>Pt(e)),n(" undoCoordinateSystem",()=>dr(e)),n(" translateGraph",()=>Nt(e)),n(" assignNodeIntersects",()=>Lt(e)),n(" reversePoints",()=>_t(e)),n(" acyclic.undo",()=>er(e))}function ct(e,n){f(e.nodes(),function(r){var t=e.node(r),i=n.node(r);t&&(t.x=i.x,t.y=i.y,n.children(r).length&&(t.width=i.width,t.height=i.height))}),f(e.edges(),function(r){var t=e.edge(r),i=n.edge(r);t.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(t.x=i.x,t.y=i.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var lt=["nodesep","edgesep","ranksep","marginx","marginy"],ht={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},vt=["acyclicer","ranker","rankdir","align"],pt=["width","height"],wt={width:0,height:0},bt=["minlen","weight","width","height","labeloffset"],mt={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},gt=["labelpos"];function yt(e){var n=new g({multigraph:!0,compound:!0}),r=W(e.graph());return n.setGraph(z({},ht,q(r,lt),A(r,vt))),f(e.nodes(),function(t){var i=W(e.node(t));n.setNode(t,En(q(i,pt),wt)),n.setParent(t,e.parent(t))}),f(e.edges(),function(t){var i=W(e.edge(t));n.setEdge(t,z({},mt,q(i,bt),A(i,gt)))}),n}function xt(e){var n=e.graph();n.ranksep/=2,f(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function Et(e){f(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),i=e.node(n.w),o={rank:(i.rank-t.rank)/2+t.rank,e:n};N(e,"edge-proxy",o,"_ep")}})}function kt(e){var n=0;f(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=y(n,t.maxRank))}),e.graph().maxRank=n}function Ot(e){f(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function Nt(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,i=0,o=e.graph(),a=o.marginx||0,u=o.marginy||0;function d(s){var c=s.x,l=s.y,h=s.width,v=s.height;n=Math.min(n,c-h/2),r=Math.max(r,c+h/2),t=Math.min(t,l-v/2),i=Math.max(i,l+v/2)}f(e.nodes(),function(s){d(e.node(s))}),f(e.edges(),function(s){var c=e.edge(s);Object.prototype.hasOwnProperty.call(c,"x")&&d(c)}),n-=a,t-=u,f(e.nodes(),function(s){var c=e.node(s);c.x-=n,c.y-=t}),f(e.edges(),function(s){var c=e.edge(s);f(c.points,function(l){l.x-=n,l.y-=t}),Object.prototype.hasOwnProperty.call(c,"x")&&(c.x-=n),Object.prototype.hasOwnProperty.call(c,"y")&&(c.y-=t)}),o.width=r-n+a,o.height=i-t+u}function Lt(e){f(e.edges(),function(n){var r=e.edge(n),t=e.node(n.v),i=e.node(n.w),o,a;r.points?(o=r.points[0],a=r.points[r.points.length-1]):(r.points=[],o=i,a=t),r.points.unshift(ae(t,o)),r.points.push(ae(i,a))})}function Pt(e){f(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(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;break}})}function _t(e){f(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function Ct(e){f(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),i=e.node(r.borderBottom),o=e.node(F(r.borderLeft)),a=e.node(F(r.borderRight));r.width=Math.abs(a.x-o.x),r.height=Math.abs(i.y-t.y),r.x=o.x+r.width/2,r.y=t.y+r.height/2}}),f(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function It(e){f(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)}})}function Rt(e){var n=V(e);f(n,function(r){var t=0;f(r,function(i,o){var a=e.node(i);a.order=o+t,f(a.selfEdges,function(u){N(e,"selfedge",{width:u.label.width,height:u.label.height,rank:a.rank,order:o+ ++t,e:u.e,label:u.label},"_se")}),delete a.selfEdges})})}function Tt(e){f(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var t=e.node(r.e.v),i=t.x+t.width/2,o=t.y,a=r.x-i,u=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:i+2*a/3,y:o-u},{x:i+5*a/6,y:o-u},{x:i+a,y:o},{x:i+5*a/6,y:o+u},{x:i+2*a/3,y:o+u}],r.label.x=r.x,r.label.y=r.y}})}function q(e,n){return j(A(e,n),Number)}function W(e){var n={};return f(e,function(r,t){n[t.toLowerCase()]=r}),n}export{Bt as l};
|