@economic/agents-playground 0.0.1-beta.6 → 1.0.0
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/README.md +9 -9
- package/bin/cli.mjs +8 -3
- package/dist/assets/{_basePickBy-BZNHaCnJ.js → _basePickBy-yrdMoyRa.js} +1 -1
- package/dist/assets/{_baseUniq-CEuT_w6h.js → _baseUniq-BdCUZ9M5.js} +1 -1
- package/dist/assets/architecture-PBZL5I3N-Cad1LrWT.js +1 -0
- package/dist/assets/architectureDiagram-2XIMDMQ5-CXe1GsCp.js +36 -0
- package/dist/assets/{blockDiagram-WCTKOSBZ-BVPSFu72.js → blockDiagram-WCTKOSBZ-WvVIvKo3.js} +1 -1
- package/dist/assets/{chunk-7E7YKBS2-ClGSdO9P.js → chunk-7E7YKBS2-BGpfhwxh.js} +1 -1
- package/dist/assets/{chunk-C72U2L5F-C9vw6Vph.js → chunk-C72U2L5F-BO7XGzNn.js} +1 -1
- package/dist/assets/{chunk-EGIJ26TM-C_G2Pjv-.js → chunk-EGIJ26TM-BJdFILT0.js} +1 -1
- package/dist/assets/{chunk-L3YUKLVL-3RCwiwN1.js → chunk-L3YUKLVL-BmMfhz2B.js} +1 -1
- package/dist/assets/{chunk-NQ4KR5QH-CYGSW7DX.js → chunk-NQ4KR5QH-f5X7YUdy.js} +1 -1
- package/dist/assets/{chunk-OZEHJAEY-D4zEs9SV.js → chunk-OZEHJAEY-BdHqIz8_.js} +1 -1
- package/dist/assets/{chunk-R5LLSJPH-B5kh1kkd.js → chunk-R5LLSJPH-9LnZ-s_V.js} +1 -1
- package/dist/assets/{chunk-WL4C6EOR-DE1IVTFw.js → chunk-WL4C6EOR-SO8Rq4UE.js} +1 -1
- package/dist/assets/{chunk-XIRO2GV7-DF8ctPHD.js → chunk-XIRO2GV7-BVE8qECr.js} +1 -1
- package/dist/assets/{chunk-XZSTWKYB-MNkGMgzF.js → chunk-XZSTWKYB-DCEIWIqq.js} +1 -1
- package/dist/assets/classDiagram-VBA2DB6C-BEQm-49f.js +1 -0
- package/dist/assets/classDiagram-v2-RAHNMMFH-fw-8tC0c.js +1 -0
- package/dist/assets/clone-CGkAhfYR.js +1 -0
- package/dist/assets/{dagre-Bwu_YNAf.js → dagre-4O7tL0je.js} +1 -1
- package/dist/assets/dagre-KLK3FWXG-Cn3uXM0V.js +4 -0
- package/dist/assets/diagram-E7M64L7V-CCy1m6PJ.js +24 -0
- package/dist/assets/diagram-IFDJBPK2-SbqNcW81.js +43 -0
- package/dist/assets/diagram-P4PSJMXO-DDVenWMc.js +24 -0
- package/dist/assets/{erDiagram-INFDFZHY--_9ENSqk.js → erDiagram-INFDFZHY-C3LYWEpo.js} +1 -1
- package/dist/assets/{flowDiagram-PKNHOUZH-BDKsv5d1.js → flowDiagram-PKNHOUZH-DCj5WLbj.js} +1 -1
- package/dist/assets/ganttDiagram-A5KZAMGK-BEoHssiP.js +292 -0
- package/dist/assets/gitGraph-HDMCJU4V-Cn-UK-sq.js +1 -0
- package/dist/assets/gitGraphDiagram-K3NZZRJ6-CV51mwUg.js +65 -0
- package/dist/assets/{graphlib-C0KzFwj0.js → graphlib-Bm7lcrUK.js} +1 -1
- package/dist/assets/{highlighted-body-OFNGDK62-DErzHI0L.js → highlighted-body-OFNGDK62-Dp3ztwIT.js} +1 -1
- package/dist/assets/{index-Dh2p7GUF.js → index-DXEtzDAV.js} +10 -10
- package/dist/assets/info-3K5VOQVL-CE6MZbxN.js +1 -0
- package/dist/assets/infoDiagram-LFFYTUFH-Djc7zwh9.js +2 -0
- package/dist/assets/{ishikawaDiagram-PHBUUO56-_TPEs2m0.js → ishikawaDiagram-PHBUUO56-BJ58d9Jk.js} +1 -1
- package/dist/assets/{journeyDiagram-4ABVD52K-C-U1F_87.js → journeyDiagram-4ABVD52K-BbJAX67K.js} +1 -1
- package/dist/assets/{kanban-definition-K7BYSVSG-Cw87Rab7.js → kanban-definition-K7BYSVSG-_PQKDb6G.js} +1 -1
- package/dist/assets/mermaid-GHXKKRXX-BjkWKRgx.js +1 -0
- package/dist/assets/mermaid-parser.core-CCnSeR0B.js +4 -0
- package/dist/assets/{mindmap-definition-YRQLILUH-B68Q6TU2.js → mindmap-definition-YRQLILUH-DlEtVP2j.js} +1 -1
- package/dist/assets/{ordinal-t_ha_BUo.js → ordinal-BffLatsF.js} +1 -1
- package/dist/assets/packet-RMMSAZCW-CQjOaPM8.js +1 -0
- package/dist/assets/pie-UPGHQEXC-CxFpgwTC.js +1 -0
- package/dist/assets/{pieDiagram-SKSYHLDU-DOeqI-Xk.js → pieDiagram-SKSYHLDU-C7-s9HqH.js} +1 -1
- package/dist/assets/{quadrantDiagram-337W2JSQ-C3xMuDjL.js → quadrantDiagram-337W2JSQ-BYRgqy3l.js} +1 -1
- package/dist/assets/radar-KQ55EAFF-CXSI5zhq.js +1 -0
- package/dist/assets/{requirementDiagram-Z7DCOOCP-J8L4B0bp.js → requirementDiagram-Z7DCOOCP-z1GE-T5H.js} +1 -1
- package/dist/assets/{sankeyDiagram-WA2Y5GQK-Bemb6KrC.js → sankeyDiagram-WA2Y5GQK-ljtUGdwd.js} +1 -1
- package/dist/assets/{sequenceDiagram-2WXFIKYE-CL-UgQPN.js → sequenceDiagram-2WXFIKYE-Dmj3tYFt.js} +1 -1
- package/dist/assets/stateDiagram-RAJIS63D-U-EujGed.js +1 -0
- package/dist/assets/stateDiagram-v2-FVOUBMTO-2uVNjycs.js +1 -0
- package/dist/assets/treemap-KZPCXAKY-DKNko2Ay.js +1 -0
- package/dist/assets/{vennDiagram-LZ73GAT5-D9K7I756.js → vennDiagram-LZ73GAT5-B1RIPDjh.js} +1 -1
- package/dist/assets/{xychartDiagram-JWTSCODW-DD5SCVwn.js → xychartDiagram-JWTSCODW-D9kjPJFQ.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +3 -3
- package/dist/assets/architecture-PBZL5I3N-FUwzdylc.js +0 -1
- package/dist/assets/architectureDiagram-2XIMDMQ5-DDn8BtZj.js +0 -36
- package/dist/assets/classDiagram-VBA2DB6C-D7qqO9na.js +0 -1
- package/dist/assets/classDiagram-v2-RAHNMMFH-k5MipEDV.js +0 -1
- package/dist/assets/clone-D8XnF9wK.js +0 -1
- package/dist/assets/dagre-KLK3FWXG-Cb7G7hCx.js +0 -4
- package/dist/assets/diagram-E7M64L7V-Cm-DvWIK.js +0 -24
- package/dist/assets/diagram-IFDJBPK2-CtHh-A5R.js +0 -43
- package/dist/assets/diagram-P4PSJMXO-D2EIGF-1.js +0 -24
- package/dist/assets/ganttDiagram-A5KZAMGK-CS4Q9uqC.js +0 -292
- package/dist/assets/gitGraph-HDMCJU4V-W7hXAzyz.js +0 -1
- package/dist/assets/gitGraphDiagram-K3NZZRJ6-CkL70slu.js +0 -65
- package/dist/assets/info-3K5VOQVL-Td3WeFrt.js +0 -1
- package/dist/assets/infoDiagram-LFFYTUFH-DRYt9NL6.js +0 -2
- package/dist/assets/mermaid-GHXKKRXX-vQhYRIRq.js +0 -1
- package/dist/assets/mermaid-parser.core-jqGiw51o.js +0 -4
- package/dist/assets/packet-RMMSAZCW-B_JuUQQV.js +0 -1
- package/dist/assets/pie-UPGHQEXC-zZj-EEcS.js +0 -1
- package/dist/assets/radar-KQ55EAFF-DyUfi1WF.js +0 -1
- package/dist/assets/stateDiagram-RAJIS63D-CsnUtyN1.js +0 -1
- package/dist/assets/stateDiagram-v2-FVOUBMTO-D-fQGq-k.js +0 -1
- package/dist/assets/treemap-KZPCXAKY-B231VXy0.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,f as t,g as n,h as r,i,m as a,p as o,s,t as c}from"./chunk-XZSTWKYB-
|
|
1
|
+
import{a as e,f as t,g as n,h as r,i,m as a,p as o,s,t as c}from"./chunk-XZSTWKYB-DCEIWIqq.js";var l=class extends c{static{t(this,`GitGraphTokenBuilder`)}constructor(){super([`gitGraph`])}},u={parser:{TokenBuilder:t(()=>new l,`TokenBuilder`),ValueConverter:t(()=>new i,`ValueConverter`)}};function d(t=o){let i=a(n(t),s),c=a(r({shared:i}),e,u);return i.ServiceRegistry.register(c),{shared:i,GitGraph:c}}t(d,`createGitGraphServices`);export{d as n,u as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e,f as t,g as n,h as r,i,m as a,p as o,s,t as c}from"./chunk-XZSTWKYB-
|
|
1
|
+
import{c as e,f as t,g as n,h as r,i,m as a,p as o,s,t as c}from"./chunk-XZSTWKYB-DCEIWIqq.js";var l=class extends c{static{t(this,`PacketTokenBuilder`)}constructor(){super([`packet`])}},u={parser:{TokenBuilder:t(()=>new l,`TokenBuilder`),ValueConverter:t(()=>new i,`ValueConverter`)}};function d(t=o){let i=a(n(t),s),c=a(r({shared:i}),e,u);return i.ServiceRegistry.register(c),{shared:i,Packet:c}}t(d,`createPacketServices`);export{d as n,u as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as e,g as t,h as n,i as r,m as i,o as a,p as o,s,t as c}from"./chunk-XZSTWKYB-
|
|
1
|
+
import{f as e,g as t,h as n,i as r,m as i,o as a,p as o,s,t as c}from"./chunk-XZSTWKYB-DCEIWIqq.js";var l=class extends c{static{e(this,`InfoTokenBuilder`)}constructor(){super([`info`,`showInfo`])}},u={parser:{TokenBuilder:e(()=>new l,`TokenBuilder`),ValueConverter:e(()=>new r,`ValueConverter`)}};function d(e=o){let r=i(t(e),s),c=i(n({shared:r}),a,u);return r.ServiceRegistry.register(c),{shared:r,Info:c}}e(d,`createInfoServices`);export{d as n,u as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as e,g as t,h as n,i as r,m as i,p as a,s as o,t as s,u as c}from"./chunk-XZSTWKYB-
|
|
1
|
+
import{f as e,g as t,h as n,i as r,m as i,p as a,s as o,t as s,u as c}from"./chunk-XZSTWKYB-DCEIWIqq.js";var l=class extends s{static{e(this,`RadarTokenBuilder`)}constructor(){super([`radar-beta`])}},u={parser:{TokenBuilder:e(()=>new l,`TokenBuilder`),ValueConverter:e(()=>new r,`ValueConverter`)}};function d(e=a){let r=i(t(e),o),s=i(n({shared:r}),c,u);return r.ServiceRegistry.register(s),{shared:r,Radar:s}}e(d,`createRadarServices`);export{d as n,u as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as e,h as t}from"./src-B0URjIBy.js";import{B as n,C as r,V as i,W as a,_ as o,a as s,b as c,s as l,v as u}from"./chunk-7R4GIKGN-B0Nk6xl6.js";import{h as d,o as f}from"./chunk-GEFDOKGD-D5eIWnuf.js";import{u as p}from"./index-
|
|
1
|
+
import{g as e,h as t}from"./src-B0URjIBy.js";import{B as n,C as r,V as i,W as a,_ as o,a as s,b as c,s as l,v as u}from"./chunk-7R4GIKGN-B0Nk6xl6.js";import{h as d,o as f}from"./chunk-GEFDOKGD-D5eIWnuf.js";import{u as p}from"./index-DXEtzDAV.js";import{t as m}from"./chunk-55IACEB6-CLHg9Ulb.js";import{t as h}from"./chunk-KX2RTZJC-yDo9-99g.js";var g=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,16],l=[1,17],u=[1,18],d=[1,19],f=[1,33],p=[1,20],m=[1,21],h=[1,22],g=[1,23],_=[1,24],v=[1,26],y=[1,27],b=[1,28],x=[1,29],S=[1,30],C=[1,31],w=[1,32],T=[1,35],E=[1,36],D=[1,37],O=[1,38],k=[1,34],A=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],j=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],M=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],N={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NL`,6:`SD`,14:`DESCR`,15:`-->`,16:`HIDE_EMPTY`,17:`scale`,18:`WIDTH`,19:`COMPOSIT_STATE`,20:`STRUCT_START`,21:`STRUCT_STOP`,22:`STATE_DESCR`,23:`AS`,24:`ID`,25:`FORK`,26:`JOIN`,27:`CHOICE`,28:`CONCURRENT`,29:`note`,31:`NOTE_TEXT`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,38:`CLICK`,39:`STRING`,40:`HREF`,41:`classDef`,42:`CLASSDEF_ID`,43:`CLASSDEF_STYLEOPTS`,44:`DEFAULT`,45:`style`,46:`STYLE_IDS`,47:`STYLEDEF_STYLEOPTS`,48:`class`,49:`CLASSENTITY_IDS`,50:`STYLECLASS`,51:`direction_tb`,52:`direction_bt`,53:`direction_rl`,54:`direction_lr`,56:`;`,57:`EDGE_STATE`,58:`STYLE_SEPARATOR`,59:`left_of`,60:`right_of`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.setRootDoc(a[s]),a[s];case 4:this.$=[];break;case 5:a[s]!=`nl`&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 6:case 7:this.$=a[s];break;case 8:this.$=`nl`;break;case 12:this.$=a[s];break;case 13:let e=a[s-1];e.description=r.trimColon(a[s]),this.$=e;break;case 14:this.$={stmt:`relation`,state1:a[s-2],state2:a[s]};break;case 15:let t=r.trimColon(a[s]);this.$={stmt:`relation`,state1:a[s-3],state2:a[s-1],description:t};break;case 19:this.$={stmt:`state`,id:a[s-3],type:`default`,description:``,doc:a[s-1]};break;case 20:var c=a[s],l=a[s-2].trim();if(a[s].match(`:`)){var u=a[s].split(`:`);c=u[0],l=[l,u[1]]}this.$={stmt:`state`,id:c,type:`default`,description:l};break;case 21:this.$={stmt:`state`,id:a[s-3],type:`default`,description:a[s-5],doc:a[s-1]};break;case 22:this.$={stmt:`state`,id:a[s],type:`fork`};break;case 23:this.$={stmt:`state`,id:a[s],type:`join`};break;case 24:this.$={stmt:`state`,id:a[s],type:`choice`};break;case 25:this.$={stmt:`state`,id:r.getDividerId(),type:`divider`};break;case 26:this.$={stmt:`state`,id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 29:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 30:case 31:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:this.$={stmt:`click`,id:a[s-3],url:a[s-2],tooltip:a[s-1]};break;case 33:this.$={stmt:`click`,id:a[s-3],url:a[s-1],tooltip:``};break;case 34:case 35:this.$={stmt:`classDef`,id:a[s-1].trim(),classes:a[s].trim()};break;case 36:this.$={stmt:`style`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 37:this.$={stmt:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:r.setDirection(`TB`),this.$={stmt:`dir`,value:`TB`};break;case 39:r.setDirection(`BT`),this.$={stmt:`dir`,value:`BT`};break;case 40:r.setDirection(`RL`),this.$={stmt:`dir`,value:`RL`};break;case 41:r.setDirection(`LR`),this.$={stmt:`dir`,value:`LR`};break;case 44:case 45:this.$={stmt:`state`,id:a[s].trim(),type:`default`,description:``};break;case 46:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break;case 47:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break}},`anonymous`),table:[{3:1,4:n,5:r,6:i},{1:[3]},{3:5,4:n,5:r,6:i},{3:6,4:n,5:r,6:i},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,7]),e(A,[2,8]),e(A,[2,9]),e(A,[2,10]),e(A,[2,11]),e(A,[2,12],{14:[1,40],15:[1,41]}),e(A,[2,16]),{18:[1,42]},e(A,[2,18],{20:[1,43]}),{23:[1,44]},e(A,[2,22]),e(A,[2,23]),e(A,[2,24]),e(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(A,[2,28]),{34:[1,49]},{36:[1,50]},e(A,[2,31]),{13:51,24:f,57:k},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(j,[2,44],{58:[1,56]}),e(j,[2,45],{58:[1,57]}),e(A,[2,38]),e(A,[2,39]),e(A,[2,40]),e(A,[2,41]),e(A,[2,6]),e(A,[2,13]),{13:58,24:f,57:k},e(A,[2,17]),e(M,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(A,[2,29]),e(A,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},e(A,[2,14],{14:[1,71]}),{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,72],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(A,[2,34]),e(A,[2,35]),e(A,[2,36]),e(A,[2,37]),e(j,[2,46]),e(j,[2,47]),e(A,[2,15]),e(A,[2,19]),e(M,a,{7:78}),e(A,[2,26]),e(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,81],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},e(A,[2,32]),e(A,[2,33]),e(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
2
|
`+h.showPosition()+`
|
|
3
3
|
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};N.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||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:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(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:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(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:t(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:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e,f as t,g as n,h as r,m as i,n as a,p as o,s,t as c}from"./chunk-XZSTWKYB-
|
|
1
|
+
import{d as e,f as t,g as n,h as r,m as i,n as a,p as o,s,t as c}from"./chunk-XZSTWKYB-DCEIWIqq.js";var l=class extends c{static{t(this,`TreemapTokenBuilder`)}constructor(){super([`treemap`])}},u=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,d=class extends a{static{t(this,`TreemapValueConverter`)}runCustomConverter(e,t,n){if(e.name===`NUMBER2`)return parseFloat(t.replace(/,/g,``));if(e.name===`SEPARATOR`||e.name===`STRING2`)return t.substring(1,t.length-1);if(e.name===`INDENTATION`)return t.length;if(e.name===`ClassDef`){if(typeof t!=`string`)return t;let e=u.exec(t);if(e)return{$type:`ClassDefStatement`,className:e[1],styleText:e[2]||void 0}}}};function f(e){let t=e.validation.TreemapValidator,n=e.validation.ValidationRegistry;if(n){let e={Treemap:t.checkSingleRoot.bind(t)};n.register(e,t)}}t(f,`registerValidationChecks`);var p=class{static{t(this,`TreemapValidator`)}checkSingleRoot(e,t){let n;for(let r of e.TreemapRows)r.item&&(n===void 0&&r.indent===void 0?n=0:(r.indent===void 0||n!==void 0&&n>=parseInt(r.indent,10))&&t(`error`,`Multiple root nodes are not allowed in a treemap.`,{node:r,property:`item`}))}},m={parser:{TokenBuilder:t(()=>new l,`TokenBuilder`),ValueConverter:t(()=>new d,`ValueConverter`)},validation:{TreemapValidator:t(()=>new p,`TreemapValidator`)}};function h(t=o){let a=i(n(t),s),c=i(r({shared:a}),e,m);return a.ServiceRegistry.register(c),f(c),{shared:a,Treemap:c}}t(h,`createTreemapServices`);export{h as n,m as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as e,g as t,h as n,m as r,n as i,p as a,r as o,s,t as c}from"./chunk-XZSTWKYB-
|
|
1
|
+
import{f as e,g as t,h as n,m as r,n as i,p as a,r as o,s,t as c}from"./chunk-XZSTWKYB-DCEIWIqq.js";var l=class extends c{static{e(this,`ArchitectureTokenBuilder`)}constructor(){super([`architecture`])}},u=class extends i{static{e(this,`ArchitectureValueConverter`)}runCustomConverter(e,t,n){if(e.name===`ARCH_ICON`)return t.replace(/[()]/g,``).trim();if(e.name===`ARCH_TEXT_ICON`)return t.replace(/["()]/g,``);if(e.name===`ARCH_TITLE`){let e=t.replace(/^\[|]$/g,``).trim();return(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))&&(e=e.slice(1,-1),e=e.replace(/\\"/g,`"`).replace(/\\'/g,`'`)),e.trim()}}},d={parser:{TokenBuilder:e(()=>new l,`TokenBuilder`),ValueConverter:e(()=>new u,`ValueConverter`)}};function f(e=a){let i=r(t(e),s),c=r(n({shared:i}),o,d);return i.ServiceRegistry.register(c),{shared:i,Architecture:c}}e(f,`createArchitectureServices`);export{f as n,d as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as e,h as t,p as n}from"./src-B0URjIBy.js";import{B as r,C as i,L as a,V as o,W as s,Z as c,_ as l,a as u,b as d,j as f,s as p,v as m}from"./chunk-7R4GIKGN-B0Nk6xl6.js";import{h,s as g}from"./chunk-GEFDOKGD-D5eIWnuf.js";import{l as _,u as v}from"./index-Dh2p7GUF.js";import{t as y}from"./chunk-FMBD7UC4-Cca8p-Ag.js";import{t as b}from"./chunk-JSJVCQXG-BthkA1o-.js";import{t as x}from"./chunk-55IACEB6-CLHg9Ulb.js";import{t as S}from"./chunk-KX2RTZJC-yDo9-99g.js";var C=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,18],r=[1,19],i=[1,20],a=[1,41],o=[1,42],s=[1,26],c=[1,24],l=[1,25],u=[1,32],d=[1,33],f=[1,34],p=[1,45],m=[1,35],h=[1,36],g=[1,37],_=[1,38],v=[1,27],y=[1,28],b=[1,29],x=[1,30],S=[1,31],C=[1,44],w=[1,46],T=[1,43],E=[1,47],D=[1,9],O=[1,8,9],k=[1,58],A=[1,59],j=[1,60],M=[1,61],N=[1,62],P=[1,63],ee=[1,64],F=[1,8,9,41],te=[1,76],I=[1,8,9,12,13,22,39,41,44,68,69,70,71,72,73,74,79,81],L=[1,8,9,12,13,18,20,22,39,41,44,50,60,68,69,70,71,72,73,74,79,81,86,100,102,103],R=[13,60,86,100,102,103],z=[13,60,73,74,86,100,102,103],ne=[13,60,68,69,70,71,72,86,100,102,103],B=[1,101],V=[1,118],H=[1,114],U=[1,110],W=[1,116],G=[1,111],K=[1,112],q=[1,113],J=[1,115],Y=[1,117],re=[22,48,60,61,82,86,87,88,89,90],X=[1,8,9,39,41,44],Z=[1,8,9,22],ie=[1,147],ae=[1,8,9,61],Q=[1,8,9,22,48,60,61,82,86,87,88,89,90],oe={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,emptyBody:47,SPACE:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:`error`,7:`CLASS_DIAGRAM`,8:`NEWLINE`,9:`EOF`,12:`SQS`,13:`STR`,14:`SQE`,18:`DOT`,20:`GENERICTYPE`,22:`LABEL`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,39:`STRUCT_START`,41:`STRUCT_STOP`,42:`NAMESPACE`,44:`STYLE_SEPARATOR`,46:`CLASS`,48:`SPACE`,49:`ANNOTATION_START`,50:`ANNOTATION_END`,51:`MEMBER`,52:`SEPARATOR`,54:`NOTE_FOR`,56:`NOTE`,57:`CLASSDEF`,60:`ALPHA`,61:`COMMA`,62:`direction_tb`,63:`direction_bt`,64:`direction_rl`,65:`direction_lr`,68:`AGGREGATION`,69:`EXTENSION`,70:`COMPOSITION`,71:`DEPENDENCY`,72:`LOLLIPOP`,73:`LINE`,74:`DOTTED_LINE`,75:`CALLBACK`,76:`LINK`,77:`LINK_TARGET`,78:`CLICK`,79:`CALLBACK_NAME`,80:`CALLBACK_ARGS`,81:`HREF`,82:`STYLE`,83:`CSSCLASS`,86:`NUM`,87:`COLON`,88:`UNIT`,89:`BRKT`,90:`PCT`,93:`graphCodeTokens`,95:`TAGSTART`,96:`TAGEND`,97:`==`,98:`--`,99:`DEFAULT`,100:`MINUS`,101:`keywords`,102:`UNICODE_TEXT`,103:`BQUOTE_STR`},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[43,2],[43,3],[47,0],[47,2],[47,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 8:this.$=a[s-1];break;case 9:case 10:case 13:case 15:this.$=a[s];break;case 11:case 14:this.$=a[s-2]+`.`+a[s];break;case 12:case 16:this.$=a[s-1]+a[s];break;case 17:case 18:this.$=a[s-1]+`~`+a[s]+`~`;break;case 19:r.addRelation(a[s]);break;case 20:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 31:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 34:r.addClassesToNamespace(a[s-3],a[s-1][0],a[s-1][1]);break;case 35:r.addClassesToNamespace(a[s-4],a[s-1][0],a[s-1][1]);break;case 36:this.$=a[s],r.addNamespace(a[s]);break;case 37:this.$=[[a[s]],[]];break;case 38:this.$=[[a[s-1]],[]];break;case 39:a[s][0].unshift(a[s-2]),this.$=a[s];break;case 40:this.$=[[],[a[s]]];break;case 41:this.$=[[],[a[s-1]]];break;case 42:a[s][1].unshift(a[s-2]),this.$=a[s];break;case 44:r.setCssClass(a[s-2],a[s]);break;case 45:r.addMembers(a[s-3],a[s-1]);break;case 47:r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 48:this.$=a[s],r.addClass(a[s]);break;case 49:this.$=a[s-1],r.addClass(a[s-1]),r.setClassLabel(a[s-1],a[s]);break;case 53:r.addAnnotation(a[s],a[s-2]);break;case 54:case 67:this.$=[a[s]];break;case 55:a[s].push(a[s-1]),this.$=a[s];break;case 56:break;case 57:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 58:break;case 59:break;case 60:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:`none`,relationTitle2:`none`};break;case 61:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:`none`};break;case 62:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:`none`,relationTitle2:a[s-1]};break;case 63:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 64:this.$=r.addNote(a[s],a[s-1]);break;case 65:this.$=r.addNote(a[s]);break;case 66:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 68:this.$=a[s-2].concat([a[s]]);break;case 69:r.setDirection(`TB`);break;case 70:r.setDirection(`BT`);break;case 71:r.setDirection(`RL`);break;case 72:r.setDirection(`LR`);break;case 73:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 74:this.$={type1:`none`,type2:a[s],lineType:a[s-1]};break;case 75:this.$={type1:a[s-1],type2:`none`,lineType:a[s]};break;case 76:this.$={type1:`none`,type2:`none`,lineType:a[s]};break;case 77:this.$=r.relationType.AGGREGATION;break;case 78:this.$=r.relationType.EXTENSION;break;case 79:this.$=r.relationType.COMPOSITION;break;case 80:this.$=r.relationType.DEPENDENCY;break;case 81:this.$=r.relationType.LOLLIPOP;break;case 82:this.$=r.lineType.LINE;break;case 83:this.$=r.lineType.DOTTED_LINE;break;case 84:case 90:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 85:case 91:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 86:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 87:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 88:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 89:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 92:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 93:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 94:this.$=a[s-3],r.setLink(a[s-2],a[s]);break;case 95:this.$=a[s-4],r.setLink(a[s-3],a[s-1],a[s]);break;case 96:this.$=a[s-4],r.setLink(a[s-3],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 97:this.$=a[s-5],r.setLink(a[s-4],a[s-2],a[s]),r.setTooltip(a[s-4],a[s-1]);break;case 98:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 99:r.setCssClass(a[s-1],a[s]);break;case 100:this.$=[a[s]];break;case 101:a[s-2].push(a[s]),this.$=a[s-2];break;case 103:this.$=a[s-1]+a[s];break}},`anonymous`),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:n,35:r,37:i,38:22,42:a,43:23,46:o,49:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(D,[2,5],{8:[1,48]}),{8:[1,49]},e(O,[2,19],{22:[1,50]}),e(O,[2,21]),e(O,[2,22]),e(O,[2,23]),e(O,[2,24]),e(O,[2,25]),e(O,[2,26]),e(O,[2,27]),e(O,[2,28]),e(O,[2,29]),e(O,[2,30]),{34:[1,51]},{36:[1,52]},e(O,[2,33]),e(O,[2,56],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:k,69:A,70:j,71:M,72:N,73:P,74:ee}),{39:[1,65]},e(F,[2,43],{39:[1,67],44:[1,66]}),e(O,[2,58]),e(O,[2,59]),{16:68,60:p,86:C,100:w,102:T},{16:39,17:40,19:69,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:70,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:71,60:p,86:C,100:w,102:T,103:E},{60:[1,72]},{13:[1,73]},{16:39,17:40,19:74,60:p,86:C,100:w,102:T,103:E},{13:te,55:75},{58:77,60:[1,78]},e(O,[2,69]),e(O,[2,70]),e(O,[2,71]),e(O,[2,72]),e(I,[2,13],{16:39,17:40,19:80,18:[1,79],20:[1,81],60:p,86:C,100:w,102:T,103:E}),e(I,[2,15],{20:[1,82]}),{15:83,16:84,17:85,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:86,60:p,86:C,100:w,102:T,103:E},e(L,[2,126]),e(L,[2,127]),e(L,[2,128]),e(L,[2,129]),e([1,8,9,12,13,20,22,39,41,44,68,69,70,71,72,73,74,79,81],[2,130]),e(D,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:87,33:n,35:r,37:i,42:a,46:o,49:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E}),{5:88,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:n,35:r,37:i,38:22,42:a,43:23,46:o,49:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},e(O,[2,20]),e(O,[2,31]),e(O,[2,32]),{13:[1,90],16:39,17:40,19:89,60:p,86:C,100:w,102:T,103:E},{53:91,66:56,67:57,68:k,69:A,70:j,71:M,72:N,73:P,74:ee},e(O,[2,57]),{67:92,73:P,74:ee},e(R,[2,76],{66:93,68:k,69:A,70:j,71:M,72:N}),e(z,[2,77]),e(z,[2,78]),e(z,[2,79]),e(z,[2,80]),e(z,[2,81]),e(ne,[2,82]),e(ne,[2,83]),{8:[1,95],24:96,30:97,40:94,43:23,46:o,54:u,56:d},{16:98,60:p,86:C,100:w,102:T},{41:[1,100],45:99,51:B},{50:[1,102]},{13:[1,103]},{13:[1,104]},{79:[1,105],81:[1,106]},{22:V,48:H,59:107,60:U,82:W,84:108,85:109,86:G,87:K,88:q,89:J,90:Y},{60:[1,119]},{13:te,55:120},e(F,[2,65]),e(F,[2,131]),{22:V,48:H,59:121,60:U,61:[1,122],82:W,84:108,85:109,86:G,87:K,88:q,89:J,90:Y},e(re,[2,67]),{16:39,17:40,19:123,60:p,86:C,100:w,102:T,103:E},e(I,[2,16]),e(I,[2,17]),e(I,[2,18]),{39:[2,36]},{15:125,16:84,17:85,18:[1,124],39:[2,9],60:p,86:C,100:w,102:T,103:E},{39:[2,10]},e(X,[2,48],{11:126,12:[1,127]}),e(D,[2,7]),{9:[1,128]},e(Z,[2,60]),{16:39,17:40,19:129,60:p,86:C,100:w,102:T,103:E},{13:[1,131],16:39,17:40,19:130,60:p,86:C,100:w,102:T,103:E},e(R,[2,75],{66:132,68:k,69:A,70:j,71:M,72:N}),e(R,[2,74]),{41:[1,133]},{24:96,30:97,40:134,43:23,46:o,54:u,56:d},{8:[1,135],41:[2,37]},{8:[1,136],41:[2,40]},e(F,[2,44],{39:[1,137]}),{41:[1,138]},e(F,[2,46]),{41:[2,54],45:139,51:B},{16:39,17:40,19:140,60:p,86:C,100:w,102:T,103:E},e(O,[2,84],{13:[1,141]}),e(O,[2,86],{13:[1,143],77:[1,142]}),e(O,[2,90],{13:[1,144],80:[1,145]}),{13:[1,146]},e(O,[2,98],{61:ie}),e(ae,[2,100],{85:148,22:V,48:H,60:U,82:W,86:G,87:K,88:q,89:J,90:Y}),e(Q,[2,102]),e(Q,[2,104]),e(Q,[2,105]),e(Q,[2,106]),e(Q,[2,107]),e(Q,[2,108]),e(Q,[2,109]),e(Q,[2,110]),e(Q,[2,111]),e(Q,[2,112]),e(O,[2,99]),e(F,[2,64]),e(O,[2,66],{61:ie}),{60:[1,149]},e(I,[2,14]),{15:150,16:84,17:85,60:p,86:C,100:w,102:T,103:E},{39:[2,12]},e(X,[2,49]),{13:[1,151]},{1:[2,4]},e(Z,[2,62]),e(Z,[2,61]),{16:39,17:40,19:152,60:p,86:C,100:w,102:T,103:E},e(R,[2,73]),e(O,[2,34]),{41:[1,153]},{24:96,30:97,40:154,41:[2,38],43:23,46:o,54:u,56:d},{24:96,30:97,40:155,41:[2,41],43:23,46:o,54:u,56:d},{45:156,51:B},e(F,[2,45]),{41:[2,55]},e(O,[2,53]),e(O,[2,85]),e(O,[2,87]),e(O,[2,88],{77:[1,157]}),e(O,[2,91]),e(O,[2,92],{13:[1,158]}),e(O,[2,94],{13:[1,160],77:[1,159]}),{22:V,48:H,60:U,82:W,84:161,85:109,86:G,87:K,88:q,89:J,90:Y},e(Q,[2,103]),e(re,[2,68]),{39:[2,11]},{14:[1,162]},e(Z,[2,63]),e(O,[2,35]),{41:[2,39]},{41:[2,42]},{41:[1,163]},e(O,[2,89]),e(O,[2,93]),e(O,[2,95]),e(O,[2,96],{77:[1,164]}),e(ae,[2,101],{85:148,22:V,48:H,60:U,82:W,86:G,87:K,88:q,89:J,90:Y}),e(X,[2,8]),e(F,[2,47]),e(O,[2,97])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,36],85:[2,10],125:[2,12],128:[2,4],139:[2,55],150:[2,11],154:[2,39],155:[2,42]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
1
|
+
import{g as e,h as t,p as n}from"./src-B0URjIBy.js";import{B as r,C as i,L as a,V as o,W as s,Z as c,_ as l,a as u,b as d,j as f,s as p,v as m}from"./chunk-7R4GIKGN-B0Nk6xl6.js";import{h,s as g}from"./chunk-GEFDOKGD-D5eIWnuf.js";import{l as _,u as v}from"./index-DXEtzDAV.js";import{t as y}from"./chunk-FMBD7UC4-Cca8p-Ag.js";import{t as b}from"./chunk-JSJVCQXG-BthkA1o-.js";import{t as x}from"./chunk-55IACEB6-CLHg9Ulb.js";import{t as S}from"./chunk-KX2RTZJC-yDo9-99g.js";var C=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,18],r=[1,19],i=[1,20],a=[1,41],o=[1,42],s=[1,26],c=[1,24],l=[1,25],u=[1,32],d=[1,33],f=[1,34],p=[1,45],m=[1,35],h=[1,36],g=[1,37],_=[1,38],v=[1,27],y=[1,28],b=[1,29],x=[1,30],S=[1,31],C=[1,44],w=[1,46],T=[1,43],E=[1,47],D=[1,9],O=[1,8,9],k=[1,58],A=[1,59],j=[1,60],M=[1,61],N=[1,62],P=[1,63],ee=[1,64],F=[1,8,9,41],te=[1,76],I=[1,8,9,12,13,22,39,41,44,68,69,70,71,72,73,74,79,81],L=[1,8,9,12,13,18,20,22,39,41,44,50,60,68,69,70,71,72,73,74,79,81,86,100,102,103],R=[13,60,86,100,102,103],z=[13,60,73,74,86,100,102,103],ne=[13,60,68,69,70,71,72,86,100,102,103],B=[1,101],V=[1,118],H=[1,114],U=[1,110],W=[1,116],G=[1,111],K=[1,112],q=[1,113],J=[1,115],Y=[1,117],re=[22,48,60,61,82,86,87,88,89,90],X=[1,8,9,39,41,44],Z=[1,8,9,22],ie=[1,147],ae=[1,8,9,61],Q=[1,8,9,22,48,60,61,82,86,87,88,89,90],oe={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,emptyBody:47,SPACE:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:`error`,7:`CLASS_DIAGRAM`,8:`NEWLINE`,9:`EOF`,12:`SQS`,13:`STR`,14:`SQE`,18:`DOT`,20:`GENERICTYPE`,22:`LABEL`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,39:`STRUCT_START`,41:`STRUCT_STOP`,42:`NAMESPACE`,44:`STYLE_SEPARATOR`,46:`CLASS`,48:`SPACE`,49:`ANNOTATION_START`,50:`ANNOTATION_END`,51:`MEMBER`,52:`SEPARATOR`,54:`NOTE_FOR`,56:`NOTE`,57:`CLASSDEF`,60:`ALPHA`,61:`COMMA`,62:`direction_tb`,63:`direction_bt`,64:`direction_rl`,65:`direction_lr`,68:`AGGREGATION`,69:`EXTENSION`,70:`COMPOSITION`,71:`DEPENDENCY`,72:`LOLLIPOP`,73:`LINE`,74:`DOTTED_LINE`,75:`CALLBACK`,76:`LINK`,77:`LINK_TARGET`,78:`CLICK`,79:`CALLBACK_NAME`,80:`CALLBACK_ARGS`,81:`HREF`,82:`STYLE`,83:`CSSCLASS`,86:`NUM`,87:`COLON`,88:`UNIT`,89:`BRKT`,90:`PCT`,93:`graphCodeTokens`,95:`TAGSTART`,96:`TAGEND`,97:`==`,98:`--`,99:`DEFAULT`,100:`MINUS`,101:`keywords`,102:`UNICODE_TEXT`,103:`BQUOTE_STR`},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[43,2],[43,3],[47,0],[47,2],[47,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 8:this.$=a[s-1];break;case 9:case 10:case 13:case 15:this.$=a[s];break;case 11:case 14:this.$=a[s-2]+`.`+a[s];break;case 12:case 16:this.$=a[s-1]+a[s];break;case 17:case 18:this.$=a[s-1]+`~`+a[s]+`~`;break;case 19:r.addRelation(a[s]);break;case 20:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 31:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 34:r.addClassesToNamespace(a[s-3],a[s-1][0],a[s-1][1]);break;case 35:r.addClassesToNamespace(a[s-4],a[s-1][0],a[s-1][1]);break;case 36:this.$=a[s],r.addNamespace(a[s]);break;case 37:this.$=[[a[s]],[]];break;case 38:this.$=[[a[s-1]],[]];break;case 39:a[s][0].unshift(a[s-2]),this.$=a[s];break;case 40:this.$=[[],[a[s]]];break;case 41:this.$=[[],[a[s-1]]];break;case 42:a[s][1].unshift(a[s-2]),this.$=a[s];break;case 44:r.setCssClass(a[s-2],a[s]);break;case 45:r.addMembers(a[s-3],a[s-1]);break;case 47:r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 48:this.$=a[s],r.addClass(a[s]);break;case 49:this.$=a[s-1],r.addClass(a[s-1]),r.setClassLabel(a[s-1],a[s]);break;case 53:r.addAnnotation(a[s],a[s-2]);break;case 54:case 67:this.$=[a[s]];break;case 55:a[s].push(a[s-1]),this.$=a[s];break;case 56:break;case 57:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 58:break;case 59:break;case 60:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:`none`,relationTitle2:`none`};break;case 61:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:`none`};break;case 62:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:`none`,relationTitle2:a[s-1]};break;case 63:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 64:this.$=r.addNote(a[s],a[s-1]);break;case 65:this.$=r.addNote(a[s]);break;case 66:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 68:this.$=a[s-2].concat([a[s]]);break;case 69:r.setDirection(`TB`);break;case 70:r.setDirection(`BT`);break;case 71:r.setDirection(`RL`);break;case 72:r.setDirection(`LR`);break;case 73:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 74:this.$={type1:`none`,type2:a[s],lineType:a[s-1]};break;case 75:this.$={type1:a[s-1],type2:`none`,lineType:a[s]};break;case 76:this.$={type1:`none`,type2:`none`,lineType:a[s]};break;case 77:this.$=r.relationType.AGGREGATION;break;case 78:this.$=r.relationType.EXTENSION;break;case 79:this.$=r.relationType.COMPOSITION;break;case 80:this.$=r.relationType.DEPENDENCY;break;case 81:this.$=r.relationType.LOLLIPOP;break;case 82:this.$=r.lineType.LINE;break;case 83:this.$=r.lineType.DOTTED_LINE;break;case 84:case 90:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 85:case 91:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 86:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 87:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 88:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 89:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 92:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 93:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 94:this.$=a[s-3],r.setLink(a[s-2],a[s]);break;case 95:this.$=a[s-4],r.setLink(a[s-3],a[s-1],a[s]);break;case 96:this.$=a[s-4],r.setLink(a[s-3],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 97:this.$=a[s-5],r.setLink(a[s-4],a[s-2],a[s]),r.setTooltip(a[s-4],a[s-1]);break;case 98:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 99:r.setCssClass(a[s-1],a[s]);break;case 100:this.$=[a[s]];break;case 101:a[s-2].push(a[s]),this.$=a[s-2];break;case 103:this.$=a[s-1]+a[s];break}},`anonymous`),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:n,35:r,37:i,38:22,42:a,43:23,46:o,49:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(D,[2,5],{8:[1,48]}),{8:[1,49]},e(O,[2,19],{22:[1,50]}),e(O,[2,21]),e(O,[2,22]),e(O,[2,23]),e(O,[2,24]),e(O,[2,25]),e(O,[2,26]),e(O,[2,27]),e(O,[2,28]),e(O,[2,29]),e(O,[2,30]),{34:[1,51]},{36:[1,52]},e(O,[2,33]),e(O,[2,56],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:k,69:A,70:j,71:M,72:N,73:P,74:ee}),{39:[1,65]},e(F,[2,43],{39:[1,67],44:[1,66]}),e(O,[2,58]),e(O,[2,59]),{16:68,60:p,86:C,100:w,102:T},{16:39,17:40,19:69,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:70,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:71,60:p,86:C,100:w,102:T,103:E},{60:[1,72]},{13:[1,73]},{16:39,17:40,19:74,60:p,86:C,100:w,102:T,103:E},{13:te,55:75},{58:77,60:[1,78]},e(O,[2,69]),e(O,[2,70]),e(O,[2,71]),e(O,[2,72]),e(I,[2,13],{16:39,17:40,19:80,18:[1,79],20:[1,81],60:p,86:C,100:w,102:T,103:E}),e(I,[2,15],{20:[1,82]}),{15:83,16:84,17:85,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:86,60:p,86:C,100:w,102:T,103:E},e(L,[2,126]),e(L,[2,127]),e(L,[2,128]),e(L,[2,129]),e([1,8,9,12,13,20,22,39,41,44,68,69,70,71,72,73,74,79,81],[2,130]),e(D,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:87,33:n,35:r,37:i,42:a,46:o,49:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E}),{5:88,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:n,35:r,37:i,38:22,42:a,43:23,46:o,49:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},e(O,[2,20]),e(O,[2,31]),e(O,[2,32]),{13:[1,90],16:39,17:40,19:89,60:p,86:C,100:w,102:T,103:E},{53:91,66:56,67:57,68:k,69:A,70:j,71:M,72:N,73:P,74:ee},e(O,[2,57]),{67:92,73:P,74:ee},e(R,[2,76],{66:93,68:k,69:A,70:j,71:M,72:N}),e(z,[2,77]),e(z,[2,78]),e(z,[2,79]),e(z,[2,80]),e(z,[2,81]),e(ne,[2,82]),e(ne,[2,83]),{8:[1,95],24:96,30:97,40:94,43:23,46:o,54:u,56:d},{16:98,60:p,86:C,100:w,102:T},{41:[1,100],45:99,51:B},{50:[1,102]},{13:[1,103]},{13:[1,104]},{79:[1,105],81:[1,106]},{22:V,48:H,59:107,60:U,82:W,84:108,85:109,86:G,87:K,88:q,89:J,90:Y},{60:[1,119]},{13:te,55:120},e(F,[2,65]),e(F,[2,131]),{22:V,48:H,59:121,60:U,61:[1,122],82:W,84:108,85:109,86:G,87:K,88:q,89:J,90:Y},e(re,[2,67]),{16:39,17:40,19:123,60:p,86:C,100:w,102:T,103:E},e(I,[2,16]),e(I,[2,17]),e(I,[2,18]),{39:[2,36]},{15:125,16:84,17:85,18:[1,124],39:[2,9],60:p,86:C,100:w,102:T,103:E},{39:[2,10]},e(X,[2,48],{11:126,12:[1,127]}),e(D,[2,7]),{9:[1,128]},e(Z,[2,60]),{16:39,17:40,19:129,60:p,86:C,100:w,102:T,103:E},{13:[1,131],16:39,17:40,19:130,60:p,86:C,100:w,102:T,103:E},e(R,[2,75],{66:132,68:k,69:A,70:j,71:M,72:N}),e(R,[2,74]),{41:[1,133]},{24:96,30:97,40:134,43:23,46:o,54:u,56:d},{8:[1,135],41:[2,37]},{8:[1,136],41:[2,40]},e(F,[2,44],{39:[1,137]}),{41:[1,138]},e(F,[2,46]),{41:[2,54],45:139,51:B},{16:39,17:40,19:140,60:p,86:C,100:w,102:T,103:E},e(O,[2,84],{13:[1,141]}),e(O,[2,86],{13:[1,143],77:[1,142]}),e(O,[2,90],{13:[1,144],80:[1,145]}),{13:[1,146]},e(O,[2,98],{61:ie}),e(ae,[2,100],{85:148,22:V,48:H,60:U,82:W,86:G,87:K,88:q,89:J,90:Y}),e(Q,[2,102]),e(Q,[2,104]),e(Q,[2,105]),e(Q,[2,106]),e(Q,[2,107]),e(Q,[2,108]),e(Q,[2,109]),e(Q,[2,110]),e(Q,[2,111]),e(Q,[2,112]),e(O,[2,99]),e(F,[2,64]),e(O,[2,66],{61:ie}),{60:[1,149]},e(I,[2,14]),{15:150,16:84,17:85,60:p,86:C,100:w,102:T,103:E},{39:[2,12]},e(X,[2,49]),{13:[1,151]},{1:[2,4]},e(Z,[2,62]),e(Z,[2,61]),{16:39,17:40,19:152,60:p,86:C,100:w,102:T,103:E},e(R,[2,73]),e(O,[2,34]),{41:[1,153]},{24:96,30:97,40:154,41:[2,38],43:23,46:o,54:u,56:d},{24:96,30:97,40:155,41:[2,41],43:23,46:o,54:u,56:d},{45:156,51:B},e(F,[2,45]),{41:[2,55]},e(O,[2,53]),e(O,[2,85]),e(O,[2,87]),e(O,[2,88],{77:[1,157]}),e(O,[2,91]),e(O,[2,92],{13:[1,158]}),e(O,[2,94],{13:[1,160],77:[1,159]}),{22:V,48:H,60:U,82:W,84:161,85:109,86:G,87:K,88:q,89:J,90:Y},e(Q,[2,103]),e(re,[2,68]),{39:[2,11]},{14:[1,162]},e(Z,[2,63]),e(O,[2,35]),{41:[2,39]},{41:[2,42]},{41:[1,163]},e(O,[2,89]),e(O,[2,93]),e(O,[2,95]),e(O,[2,96],{77:[1,164]}),e(ae,[2,101],{85:148,22:V,48:H,60:U,82:W,86:G,87:K,88:q,89:J,90:Y}),e(X,[2,8]),e(F,[2,47]),e(O,[2,97])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,36],85:[2,10],125:[2,12],128:[2,4],139:[2,55],150:[2,11],154:[2,39],155:[2,42]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
2
|
`+h.showPosition()+`
|
|
3
3
|
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};oe.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||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:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(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:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(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:t(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:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as e,g as t,h as n,l as r,m as i,n as a,p as o,s,t as c}from"./chunk-XZSTWKYB-
|
|
1
|
+
import{f as e,g as t,h as n,l as r,m as i,n as a,p as o,s,t as c}from"./chunk-XZSTWKYB-DCEIWIqq.js";var l=class extends c{static{e(this,`PieTokenBuilder`)}constructor(){super([`pie`,`showData`])}},u=class extends a{static{e(this,`PieValueConverter`)}runCustomConverter(e,t,n){if(e.name===`PIE_SECTION_LABEL`)return t.replace(/"/g,``).trim()}},d={parser:{TokenBuilder:e(()=>new l,`TokenBuilder`),ValueConverter:e(()=>new u,`ValueConverter`)}};function f(e=o){let a=i(t(e),s),c=i(n({shared:a}),r,d);return a.ServiceRegistry.register(c),{shared:a,Pie:c}}e(f,`createPieServices`);export{f as n,d as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,i as t,n,o as r,r as i,t as a}from"./chunk-CFjPhJqf.js";import{H as o,N as s,S as c,U as l,V as u,_ as d,b as f,d as p,f as m,h,m as g,n as _,r as v,s as y,t as ee,v as b,w as x}from"./_createAssigner-BmxrMTIs.js";import{a as S}from"./index-Dh2p7GUF.js";import{D as C,M as te,O as w,S as ne,_ as re,a as T,b as ie,f as E,g as ae,i as D,j as O,k as oe,l as se,n as k,o as ce,r as A,s as j,t as M,u as le,v as ue,x as de}from"./_baseUniq-CEuT_w6h.js";import{a as N,d as fe,f as pe,l as me,n as he,o as P,p as ge,s as F,t as _e,u as ve}from"./_basePickBy-BZNHaCnJ.js";import{t as I}from"./clone-D8XnF9wK.js";function L(e){return typeof e==`object`&&!!e&&typeof e.$type==`string`}function ye(e){return typeof e==`object`&&!!e&&typeof e.$refText==`string`&&`ref`in e}function be(e){return typeof e==`object`&&!!e&&typeof e.$refText==`string`&&`items`in e}function xe(e){return typeof e==`object`&&!!e&&typeof e.name==`string`&&typeof e.type==`string`&&typeof e.path==`string`}function Se(e){return typeof e==`object`&&!!e&&typeof e.info==`object`&&typeof e.message==`string`}var Ce=class{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){let t=this.types[e.container.$type];if(!t)throw Error(`Type ${e.container.$type||`undefined`} not found.`);let n=t.properties[e.property]?.referenceType;if(!n)throw Error(`Property ${e.property||`undefined`} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){return this.types[e]||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return L(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let n=this.subtypes[e];n||=this.subtypes[e]={};let r=n[t];if(r!==void 0)return r;{let r=this.types[e],i=r?r.superTypes.some(e=>this.isSubtype(e,t)):!1;return n[t]=i,i}}getAllSubTypes(e){let t=this.allSubtypes[e];if(t)return t;{let t=this.getAllTypes(),n=[];for(let r of t)this.isSubtype(r,e)&&n.push(r);return this.allSubtypes[e]=n,n}}};function we(e){return typeof e==`object`&&!!e&&Array.isArray(e.content)}function Te(e){return typeof e==`object`&&!!e&&typeof e.tokenType==`object`}function Ee(e){return we(e)&&typeof e.fullText==`string`}var De=class e{constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){let e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let e=this.iterator(),t=0,n=e.next();for(;!n.done;)t++,n=e.next();return t}toArray(){let e=[],t=this.iterator(),n;do n=t.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,t){let n=this.map(n=>[e?e(n):n,t?t(n):n]);return new Map(n)}toString(){return this.join()}concat(t){return new e(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),e=>{let t;if(!e.firstDone){do if(t=this.nextFn(e.first),!t.done)return t;while(!t.done);e.firstDone=!0}do if(t=e.iterator.next(),!t.done)return t;while(!t.done);return je})}join(e=`,`){let t=this.iterator(),n=``,r,i=!1;do r=t.next(),r.done||(i&&(n+=e),n+=Oe(r.value)),i=!0;while(!r.done);return n}indexOf(e,t=0){let n=this.iterator(),r=0,i=n.next();for(;!i.done;){if(r>=t&&i.value===e)return r;i=n.next(),r++}return-1}every(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(!e(n.value))return!1;n=t.next()}return!0}some(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(e(n.value))return!0;n=t.next()}return!1}forEach(e){let t=this.iterator(),n=0,r=t.next();for(;!r.done;)e(r.value,n),r=t.next(),n++}map(t){return new e(this.startFn,e=>{let{done:n,value:r}=this.nextFn(e);return n?je:{done:!1,value:t(r)}})}filter(t){return new e(this.startFn,e=>{let n;do if(n=this.nextFn(e),!n.done&&t(n.value))return n;while(!n.done);return je})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,t){let n=this.iterator(),r=t,i=n.next();for(;!i.done;)r=r===void 0?i.value:e(r,i.value),i=n.next();return r}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,n){let r=e.next();if(r.done)return n;let i=this.recursiveReduce(e,t,n);return i===void 0?r.value:t(i,r.value)}find(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(e(n.value))return n.value;n=t.next()}}findIndex(e){let t=this.iterator(),n=0,r=t.next();for(;!r.done;){if(e(r.value))return n;r=t.next(),n++}return-1}includes(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(n.value===e)return!0;n=t.next()}return!1}flatMap(t){return new e(()=>({this:this.startFn()}),e=>{do{if(e.iterator){let t=e.iterator.next();if(t.done)e.iterator=void 0;else return t}let{done:n,value:r}=this.nextFn(e.this);if(!n){let n=t(r);if(ke(n))e.iterator=n[Symbol.iterator]();else return{done:!1,value:n}}}while(e.iterator);return je})}flat(t){if(t===void 0&&(t=1),t<=0)return this;let n=t>1?this.flat(t-1):this;return new e(()=>({this:n.startFn()}),e=>{do{if(e.iterator){let t=e.iterator.next();if(t.done)e.iterator=void 0;else return t}let{done:t,value:r}=n.nextFn(e.this);if(!t)if(ke(r))e.iterator=r[Symbol.iterator]();else return{done:!1,value:r}}while(e.iterator);return je})}head(){let e=this.iterator().next();if(!e.done)return e.value}tail(t=1){return new e(()=>{let e=this.startFn();for(let n=0;n<t;n++)if(this.nextFn(e).done)return e;return e},this.nextFn)}limit(t){return new e(()=>({size:0,state:this.startFn()}),e=>(e.size++,e.size>t?je:this.nextFn(e.state)))}distinct(t){return new e(()=>({set:new Set,internalState:this.startFn()}),e=>{let n;do if(n=this.nextFn(e.internalState),!n.done){let r=t?t(n.value):n.value;if(!e.set.has(r))return e.set.add(r),n}while(!n.done);return je})}exclude(e,t){let n=new Set;for(let r of e){let e=t?t(r):r;n.add(e)}return this.filter(e=>{let r=t?t(e):e;return!n.has(r)})}};function Oe(e){return typeof e==`string`?e:e===void 0?`undefined`:typeof e.toString==`function`?e.toString():Object.prototype.toString.call(e)}function ke(e){return!!e&&typeof e[Symbol.iterator]==`function`}var Ae=new De(()=>void 0,()=>je),je=Object.freeze({done:!0,value:void 0});function R(...e){if(e.length===1){let t=e[0];if(t instanceof De)return t;if(ke(t))return new De(()=>t[Symbol.iterator](),e=>e.next());if(typeof t.length==`number`)return new De(()=>({index:0}),e=>e.index<t.length?{done:!1,value:t[e.index++]}:je)}return e.length>1?new De(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){let e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex<t.array.length)return{done:!1,value:t.array[t.arrIndex++]};t.array=void 0,t.arrIndex=0}if(t.collIndex<e.length){let n=e[t.collIndex++];ke(n)?t.iterator=n[Symbol.iterator]():n&&typeof n.length==`number`&&(t.array=n)}}while(t.iterator||t.array||t.collIndex<e.length);return je}):Ae}var Me=class extends De{constructor(e,t,n){super(()=>({iterators:n?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),e=>{for(e.pruned&&=(e.iterators.pop(),!1);e.iterators.length>0;){let n=e.iterators[e.iterators.length-1].next();if(n.done)e.iterators.pop();else return e.iterators.push(t(n.value)[Symbol.iterator]()),n}return je})}iterator(){let e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}},Ne;(function(e){function t(e){return e.reduce((e,t)=>e+t,0)}e.sum=t;function n(e){return e.reduce((e,t)=>e*t,0)}e.product=n;function r(e){return e.reduce((e,t)=>Math.min(e,t))}e.min=r;function i(e){return e.reduce((e,t)=>Math.max(e,t))}e.max=i})(Ne||={});function Pe(e,t={}){for(let[n,r]of Object.entries(e))n.startsWith(`$`)||(Array.isArray(r)?r.forEach((r,i)=>{L(r)&&(r.$container=e,r.$containerProperty=n,r.$containerIndex=i,t.deep&&Pe(r,t))}):L(r)&&(r.$container=e,r.$containerProperty=n,t.deep&&Pe(r,t)))}function Fe(e,t){let n=e;for(;n;){if(t(n))return n;n=n.$container}}function Ie(e){let t=Le(e).$document;if(!t)throw Error(`AST node has no document.`);return t}function Le(e){for(;e.$container;)e=e.$container;return e}function Re(e){return ye(e)?e.ref?[e.ref]:[]:be(e)?e.items.map(e=>e.ref):[]}function ze(e,t){if(!e)throw Error(`Node must be an AstNode.`);let n=t?.range;return new De(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){let r=t.keys[t.keyIndex];if(!r.startsWith(`$`)){let i=e[r];if(L(i)){if(t.keyIndex++,He(i,n))return{done:!1,value:i}}else if(Array.isArray(i)){for(;t.arrayIndex<i.length;){let e=i[t.arrayIndex++];if(L(e)&&He(e,n))return{done:!1,value:e}}t.arrayIndex=0}}t.keyIndex++}return je})}function Be(e,t){if(!e)throw Error(`Root node must be an AstNode.`);return new Me(e,e=>ze(e,t))}function Ve(e,t){if(!e)throw Error(`Root node must be an AstNode.`);return t?.range&&!He(e,t.range)?new Me(e,()=>[]):new Me(e,e=>ze(e,t),{includeRoot:!0})}function He(e,t){if(!t)return!0;let n=e.$cstNode?.range;return n?kn(n,t):!1}function Ue(e){return new De(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){let n=t.keys[t.keyIndex];if(!n.startsWith(`$`)){let r=e[n];if(ye(r)||be(r))return t.keyIndex++,{done:!1,value:{reference:r,container:e,property:n}};if(Array.isArray(r)){for(;t.arrayIndex<r.length;){let i=t.arrayIndex++,a=r[i];if(ye(a)||be(r))return{done:!1,value:{reference:a,container:e,property:n,index:i}}}t.arrayIndex=0}}t.keyIndex++}return je})}function We(e,t){let n=e.getTypeMetaData(t.$type),r=t;for(let e of Object.values(n.properties))e.defaultValue!==void 0&&r[e.name]===void 0&&(r[e.name]=Ge(e.defaultValue))}function Ge(e){return Array.isArray(e)?[...e.map(Ge)]:e}var Ke={$type:`AbstractElement`,cardinality:`cardinality`};function qe(e){return z.isInstance(e,Ke.$type)}var Je={$type:`AbstractParserRule`};function Ye(e){return z.isInstance(e,Je.$type)}var Xe={$type:`AbstractRule`},Ze={$type:`AbstractType`},Qe={$type:`Action`,cardinality:`cardinality`,feature:`feature`,inferredType:`inferredType`,operator:`operator`,type:`type`};function $e(e){return z.isInstance(e,Qe.$type)}var et={$type:`Alternatives`,cardinality:`cardinality`,elements:`elements`};function tt(e){return z.isInstance(e,et.$type)}var nt={$type:`ArrayLiteral`,elements:`elements`},rt={$type:`ArrayType`,elementType:`elementType`},it={$type:`Assignment`,cardinality:`cardinality`,feature:`feature`,operator:`operator`,predicate:`predicate`,terminal:`terminal`};function at(e){return z.isInstance(e,it.$type)}var ot={$type:`BooleanLiteral`,true:`true`};function st(e){return z.isInstance(e,ot.$type)}var ct={$type:`CharacterRange`,cardinality:`cardinality`,left:`left`,lookahead:`lookahead`,parenthesized:`parenthesized`,right:`right`};function lt(e){return z.isInstance(e,ct.$type)}var ut={$type:`Condition`},dt={$type:`Conjunction`,left:`left`,right:`right`};function ft(e){return z.isInstance(e,dt.$type)}var pt={$type:`CrossReference`,cardinality:`cardinality`,deprecatedSyntax:`deprecatedSyntax`,isMulti:`isMulti`,terminal:`terminal`,type:`type`};function mt(e){return z.isInstance(e,pt.$type)}var ht={$type:`Disjunction`,left:`left`,right:`right`};function gt(e){return z.isInstance(e,ht.$type)}var _t={$type:`EndOfFile`,cardinality:`cardinality`};function vt(e){return z.isInstance(e,_t.$type)}var yt={$type:`Grammar`,imports:`imports`,interfaces:`interfaces`,isDeclared:`isDeclared`,name:`name`,rules:`rules`,types:`types`},bt={$type:`GrammarImport`,path:`path`},xt={$type:`Group`,cardinality:`cardinality`,elements:`elements`,guardCondition:`guardCondition`,predicate:`predicate`};function St(e){return z.isInstance(e,xt.$type)}var Ct={$type:`InferredType`,name:`name`};function wt(e){return z.isInstance(e,Ct.$type)}var Tt={$type:`InfixRule`,call:`call`,dataType:`dataType`,inferredType:`inferredType`,name:`name`,operators:`operators`,parameters:`parameters`,returnType:`returnType`};function Et(e){return z.isInstance(e,Tt.$type)}var Dt={$type:`InfixRuleOperatorList`,associativity:`associativity`,operators:`operators`},Ot={$type:`InfixRuleOperators`,precedences:`precedences`},kt={$type:`Interface`,attributes:`attributes`,name:`name`,superTypes:`superTypes`};function At(e){return z.isInstance(e,kt.$type)}var jt={$type:`Keyword`,cardinality:`cardinality`,predicate:`predicate`,value:`value`};function Mt(e){return z.isInstance(e,jt.$type)}var Nt={$type:`NamedArgument`,calledByName:`calledByName`,parameter:`parameter`,value:`value`},Pt={$type:`NegatedToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,terminal:`terminal`};function Ft(e){return z.isInstance(e,Pt.$type)}var It={$type:`Negation`,value:`value`};function Lt(e){return z.isInstance(e,It.$type)}var Rt={$type:`NumberLiteral`,value:`value`},zt={$type:`Parameter`,name:`name`},Bt={$type:`ParameterReference`,parameter:`parameter`};function Vt(e){return z.isInstance(e,Bt.$type)}var Ht={$type:`ParserRule`,dataType:`dataType`,definition:`definition`,entry:`entry`,fragment:`fragment`,inferredType:`inferredType`,name:`name`,parameters:`parameters`,returnType:`returnType`};function Ut(e){return z.isInstance(e,Ht.$type)}var Wt={$type:`ReferenceType`,isMulti:`isMulti`,referenceType:`referenceType`},Gt={$type:`RegexToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,regex:`regex`};function Kt(e){return z.isInstance(e,Gt.$type)}var qt={$type:`ReturnType`,name:`name`};function Jt(e){return z.isInstance(e,qt.$type)}var Yt={$type:`RuleCall`,arguments:`arguments`,cardinality:`cardinality`,predicate:`predicate`,rule:`rule`};function Xt(e){return z.isInstance(e,Yt.$type)}var Zt={$type:`SimpleType`,primitiveType:`primitiveType`,stringType:`stringType`,typeRef:`typeRef`};function Qt(e){return z.isInstance(e,Zt.$type)}var $t={$type:`StringLiteral`,value:`value`},en={$type:`TerminalAlternatives`,cardinality:`cardinality`,elements:`elements`,lookahead:`lookahead`,parenthesized:`parenthesized`};function tn(e){return z.isInstance(e,en.$type)}var nn={$type:`TerminalElement`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`},rn={$type:`TerminalGroup`,cardinality:`cardinality`,elements:`elements`,lookahead:`lookahead`,parenthesized:`parenthesized`};function an(e){return z.isInstance(e,rn.$type)}var on={$type:`TerminalRule`,definition:`definition`,fragment:`fragment`,hidden:`hidden`,name:`name`,type:`type`};function sn(e){return z.isInstance(e,on.$type)}var cn={$type:`TerminalRuleCall`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,rule:`rule`};function ln(e){return z.isInstance(e,cn.$type)}var un={$type:`Type`,name:`name`,type:`type`};function dn(e){return z.isInstance(e,un.$type)}var fn={$type:`TypeAttribute`,defaultValue:`defaultValue`,isOptional:`isOptional`,name:`name`,type:`type`},pn={$type:`TypeDefinition`},mn={$type:`UnionType`,types:`types`},hn={$type:`UnorderedGroup`,cardinality:`cardinality`,elements:`elements`};function gn(e){return z.isInstance(e,hn.$type)}var _n={$type:`UntilToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,terminal:`terminal`};function vn(e){return z.isInstance(e,_n.$type)}var yn={$type:`ValueLiteral`},bn={$type:`Wildcard`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`};function xn(e){return z.isInstance(e,bn.$type)}var Sn=class extends Ce{constructor(){super(...arguments),this.types={AbstractElement:{name:Ke.$type,properties:{cardinality:{name:Ke.cardinality}},superTypes:[]},AbstractParserRule:{name:Je.$type,properties:{},superTypes:[Xe.$type,Ze.$type]},AbstractRule:{name:Xe.$type,properties:{},superTypes:[]},AbstractType:{name:Ze.$type,properties:{},superTypes:[]},Action:{name:Qe.$type,properties:{cardinality:{name:Qe.cardinality},feature:{name:Qe.feature},inferredType:{name:Qe.inferredType},operator:{name:Qe.operator},type:{name:Qe.type,referenceType:Ze.$type}},superTypes:[Ke.$type]},Alternatives:{name:et.$type,properties:{cardinality:{name:et.cardinality},elements:{name:et.elements,defaultValue:[]}},superTypes:[Ke.$type]},ArrayLiteral:{name:nt.$type,properties:{elements:{name:nt.elements,defaultValue:[]}},superTypes:[yn.$type]},ArrayType:{name:rt.$type,properties:{elementType:{name:rt.elementType}},superTypes:[pn.$type]},Assignment:{name:it.$type,properties:{cardinality:{name:it.cardinality},feature:{name:it.feature},operator:{name:it.operator},predicate:{name:it.predicate},terminal:{name:it.terminal}},superTypes:[Ke.$type]},BooleanLiteral:{name:ot.$type,properties:{true:{name:ot.true,defaultValue:!1}},superTypes:[ut.$type,yn.$type]},CharacterRange:{name:ct.$type,properties:{cardinality:{name:ct.cardinality},left:{name:ct.left},lookahead:{name:ct.lookahead},parenthesized:{name:ct.parenthesized,defaultValue:!1},right:{name:ct.right}},superTypes:[nn.$type]},Condition:{name:ut.$type,properties:{},superTypes:[]},Conjunction:{name:dt.$type,properties:{left:{name:dt.left},right:{name:dt.right}},superTypes:[ut.$type]},CrossReference:{name:pt.$type,properties:{cardinality:{name:pt.cardinality},deprecatedSyntax:{name:pt.deprecatedSyntax,defaultValue:!1},isMulti:{name:pt.isMulti,defaultValue:!1},terminal:{name:pt.terminal},type:{name:pt.type,referenceType:Ze.$type}},superTypes:[Ke.$type]},Disjunction:{name:ht.$type,properties:{left:{name:ht.left},right:{name:ht.right}},superTypes:[ut.$type]},EndOfFile:{name:_t.$type,properties:{cardinality:{name:_t.cardinality}},superTypes:[Ke.$type]},Grammar:{name:yt.$type,properties:{imports:{name:yt.imports,defaultValue:[]},interfaces:{name:yt.interfaces,defaultValue:[]},isDeclared:{name:yt.isDeclared,defaultValue:!1},name:{name:yt.name},rules:{name:yt.rules,defaultValue:[]},types:{name:yt.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:bt.$type,properties:{path:{name:bt.path}},superTypes:[]},Group:{name:xt.$type,properties:{cardinality:{name:xt.cardinality},elements:{name:xt.elements,defaultValue:[]},guardCondition:{name:xt.guardCondition},predicate:{name:xt.predicate}},superTypes:[Ke.$type]},InferredType:{name:Ct.$type,properties:{name:{name:Ct.name}},superTypes:[Ze.$type]},InfixRule:{name:Tt.$type,properties:{call:{name:Tt.call},dataType:{name:Tt.dataType},inferredType:{name:Tt.inferredType},name:{name:Tt.name},operators:{name:Tt.operators},parameters:{name:Tt.parameters,defaultValue:[]},returnType:{name:Tt.returnType,referenceType:Ze.$type}},superTypes:[Je.$type]},InfixRuleOperatorList:{name:Dt.$type,properties:{associativity:{name:Dt.associativity},operators:{name:Dt.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Ot.$type,properties:{precedences:{name:Ot.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:kt.$type,properties:{attributes:{name:kt.attributes,defaultValue:[]},name:{name:kt.name},superTypes:{name:kt.superTypes,defaultValue:[],referenceType:Ze.$type}},superTypes:[Ze.$type]},Keyword:{name:jt.$type,properties:{cardinality:{name:jt.cardinality},predicate:{name:jt.predicate},value:{name:jt.value}},superTypes:[Ke.$type]},NamedArgument:{name:Nt.$type,properties:{calledByName:{name:Nt.calledByName,defaultValue:!1},parameter:{name:Nt.parameter,referenceType:zt.$type},value:{name:Nt.value}},superTypes:[]},NegatedToken:{name:Pt.$type,properties:{cardinality:{name:Pt.cardinality},lookahead:{name:Pt.lookahead},parenthesized:{name:Pt.parenthesized,defaultValue:!1},terminal:{name:Pt.terminal}},superTypes:[nn.$type]},Negation:{name:It.$type,properties:{value:{name:It.value}},superTypes:[ut.$type]},NumberLiteral:{name:Rt.$type,properties:{value:{name:Rt.value}},superTypes:[yn.$type]},Parameter:{name:zt.$type,properties:{name:{name:zt.name}},superTypes:[]},ParameterReference:{name:Bt.$type,properties:{parameter:{name:Bt.parameter,referenceType:zt.$type}},superTypes:[ut.$type]},ParserRule:{name:Ht.$type,properties:{dataType:{name:Ht.dataType},definition:{name:Ht.definition},entry:{name:Ht.entry,defaultValue:!1},fragment:{name:Ht.fragment,defaultValue:!1},inferredType:{name:Ht.inferredType},name:{name:Ht.name},parameters:{name:Ht.parameters,defaultValue:[]},returnType:{name:Ht.returnType,referenceType:Ze.$type}},superTypes:[Je.$type]},ReferenceType:{name:Wt.$type,properties:{isMulti:{name:Wt.isMulti,defaultValue:!1},referenceType:{name:Wt.referenceType}},superTypes:[pn.$type]},RegexToken:{name:Gt.$type,properties:{cardinality:{name:Gt.cardinality},lookahead:{name:Gt.lookahead},parenthesized:{name:Gt.parenthesized,defaultValue:!1},regex:{name:Gt.regex}},superTypes:[nn.$type]},ReturnType:{name:qt.$type,properties:{name:{name:qt.name}},superTypes:[]},RuleCall:{name:Yt.$type,properties:{arguments:{name:Yt.arguments,defaultValue:[]},cardinality:{name:Yt.cardinality},predicate:{name:Yt.predicate},rule:{name:Yt.rule,referenceType:Xe.$type}},superTypes:[Ke.$type]},SimpleType:{name:Zt.$type,properties:{primitiveType:{name:Zt.primitiveType},stringType:{name:Zt.stringType},typeRef:{name:Zt.typeRef,referenceType:Ze.$type}},superTypes:[pn.$type]},StringLiteral:{name:$t.$type,properties:{value:{name:$t.value}},superTypes:[yn.$type]},TerminalAlternatives:{name:en.$type,properties:{cardinality:{name:en.cardinality},elements:{name:en.elements,defaultValue:[]},lookahead:{name:en.lookahead},parenthesized:{name:en.parenthesized,defaultValue:!1}},superTypes:[nn.$type]},TerminalElement:{name:nn.$type,properties:{cardinality:{name:nn.cardinality},lookahead:{name:nn.lookahead},parenthesized:{name:nn.parenthesized,defaultValue:!1}},superTypes:[Ke.$type]},TerminalGroup:{name:rn.$type,properties:{cardinality:{name:rn.cardinality},elements:{name:rn.elements,defaultValue:[]},lookahead:{name:rn.lookahead},parenthesized:{name:rn.parenthesized,defaultValue:!1}},superTypes:[nn.$type]},TerminalRule:{name:on.$type,properties:{definition:{name:on.definition},fragment:{name:on.fragment,defaultValue:!1},hidden:{name:on.hidden,defaultValue:!1},name:{name:on.name},type:{name:on.type}},superTypes:[Xe.$type]},TerminalRuleCall:{name:cn.$type,properties:{cardinality:{name:cn.cardinality},lookahead:{name:cn.lookahead},parenthesized:{name:cn.parenthesized,defaultValue:!1},rule:{name:cn.rule,referenceType:on.$type}},superTypes:[nn.$type]},Type:{name:un.$type,properties:{name:{name:un.name},type:{name:un.type}},superTypes:[Ze.$type]},TypeAttribute:{name:fn.$type,properties:{defaultValue:{name:fn.defaultValue},isOptional:{name:fn.isOptional,defaultValue:!1},name:{name:fn.name},type:{name:fn.type}},superTypes:[]},TypeDefinition:{name:pn.$type,properties:{},superTypes:[]},UnionType:{name:mn.$type,properties:{types:{name:mn.types,defaultValue:[]}},superTypes:[pn.$type]},UnorderedGroup:{name:hn.$type,properties:{cardinality:{name:hn.cardinality},elements:{name:hn.elements,defaultValue:[]}},superTypes:[Ke.$type]},UntilToken:{name:_n.$type,properties:{cardinality:{name:_n.cardinality},lookahead:{name:_n.lookahead},parenthesized:{name:_n.parenthesized,defaultValue:!1},terminal:{name:_n.terminal}},superTypes:[nn.$type]},ValueLiteral:{name:yn.$type,properties:{},superTypes:[]},Wildcard:{name:bn.$type,properties:{cardinality:{name:bn.cardinality},lookahead:{name:bn.lookahead},parenthesized:{name:bn.parenthesized,defaultValue:!1}},superTypes:[nn.$type]}}}},z=new Sn;function Cn(e){return new Me(e,e=>we(e)?e.content:[],{includeRoot:!0})}function wn(e,t){for(;e.container;)if(e=e.container,e===t)return!0;return!1}function Tn(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function En(e){if(!e)return;let{offset:t,end:n,range:r}=e;return{range:r,offset:t,end:n,length:n-t}}var Dn;(function(e){e[e.Before=0]=`Before`,e[e.After=1]=`After`,e[e.OverlapFront=2]=`OverlapFront`,e[e.OverlapBack=3]=`OverlapBack`,e[e.Inside=4]=`Inside`,e[e.Outside=5]=`Outside`})(Dn||={});function On(e,t){if(e.end.line<t.start.line||e.end.line===t.start.line&&e.end.character<=t.start.character)return Dn.Before;if(e.start.line>t.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return Dn.After;let n=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,r=e.end.line<t.end.line||e.end.line===t.end.line&&e.end.character<=t.end.character;return n&&r?Dn.Inside:n?Dn.OverlapBack:r?Dn.OverlapFront:Dn.Outside}function kn(e,t){return On(e,t)>Dn.After}var An=/^[\w\p{L}]$/u;function jn(e,t){if(e){let n=Nn(e,!0);if(n&&Mn(n,t))return n;if(Ee(e)){let n=e.content.findIndex(e=>!e.hidden);for(let r=n-1;r>=0;r--){let n=e.content[r];if(Mn(n,t))return n}}}}function Mn(e,t){return Te(e)&&t.includes(e.tokenType.name)}function Nn(e,t=!0){for(;e.container;){let n=e.container,r=n.content.indexOf(e);for(;r>0;){r--;let e=n.content[r];if(t||!e.hidden)return e}e=n}}var Pn=class extends Error{constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}};function Fn(e,t=`Error: Got unexpected value.`){throw Error(t)}function B(e){return e.charCodeAt(0)}function In(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function Ln(e,t){if(e[t]===!0)throw`duplicate flag `+t;e[t],e[t]=!0}function Rn(e){if(e===void 0)throw Error(`Internal Error - Should never get here!`);return!0}function zn(){throw Error(`Internal Error - Should never get here!`)}function Bn(e){return e.type===`Character`}var Vn=[];for(let e=B(`0`);e<=B(`9`);e++)Vn.push(e);var Hn=[B(`_`)].concat(Vn);for(let e=B(`a`);e<=B(`z`);e++)Hn.push(e);for(let e=B(`A`);e<=B(`Z`);e++)Hn.push(e);var Un=[B(` `),B(`\f`),B(`
|
|
1
|
+
import{a as e,i as t,n,o as r,r as i,t as a}from"./chunk-CFjPhJqf.js";import{H as o,N as s,S as c,U as l,V as u,_ as d,b as f,d as p,f as m,h,m as g,n as _,r as v,s as y,t as ee,v as b,w as x}from"./_createAssigner-BmxrMTIs.js";import{a as S}from"./index-DXEtzDAV.js";import{D as C,M as te,O as w,S as ne,_ as re,a as T,b as ie,f as E,g as ae,i as D,j as O,k as oe,l as se,n as k,o as ce,r as A,s as j,t as M,u as le,v as ue,x as de}from"./_baseUniq-BdCUZ9M5.js";import{a as N,d as fe,f as pe,l as me,n as he,o as P,p as ge,s as F,t as _e,u as ve}from"./_basePickBy-yrdMoyRa.js";import{t as I}from"./clone-CGkAhfYR.js";function L(e){return typeof e==`object`&&!!e&&typeof e.$type==`string`}function ye(e){return typeof e==`object`&&!!e&&typeof e.$refText==`string`&&`ref`in e}function be(e){return typeof e==`object`&&!!e&&typeof e.$refText==`string`&&`items`in e}function xe(e){return typeof e==`object`&&!!e&&typeof e.name==`string`&&typeof e.type==`string`&&typeof e.path==`string`}function Se(e){return typeof e==`object`&&!!e&&typeof e.info==`object`&&typeof e.message==`string`}var Ce=class{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){let t=this.types[e.container.$type];if(!t)throw Error(`Type ${e.container.$type||`undefined`} not found.`);let n=t.properties[e.property]?.referenceType;if(!n)throw Error(`Property ${e.property||`undefined`} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){return this.types[e]||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return L(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let n=this.subtypes[e];n||=this.subtypes[e]={};let r=n[t];if(r!==void 0)return r;{let r=this.types[e],i=r?r.superTypes.some(e=>this.isSubtype(e,t)):!1;return n[t]=i,i}}getAllSubTypes(e){let t=this.allSubtypes[e];if(t)return t;{let t=this.getAllTypes(),n=[];for(let r of t)this.isSubtype(r,e)&&n.push(r);return this.allSubtypes[e]=n,n}}};function we(e){return typeof e==`object`&&!!e&&Array.isArray(e.content)}function Te(e){return typeof e==`object`&&!!e&&typeof e.tokenType==`object`}function Ee(e){return we(e)&&typeof e.fullText==`string`}var De=class e{constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){let e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let e=this.iterator(),t=0,n=e.next();for(;!n.done;)t++,n=e.next();return t}toArray(){let e=[],t=this.iterator(),n;do n=t.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,t){let n=this.map(n=>[e?e(n):n,t?t(n):n]);return new Map(n)}toString(){return this.join()}concat(t){return new e(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),e=>{let t;if(!e.firstDone){do if(t=this.nextFn(e.first),!t.done)return t;while(!t.done);e.firstDone=!0}do if(t=e.iterator.next(),!t.done)return t;while(!t.done);return je})}join(e=`,`){let t=this.iterator(),n=``,r,i=!1;do r=t.next(),r.done||(i&&(n+=e),n+=Oe(r.value)),i=!0;while(!r.done);return n}indexOf(e,t=0){let n=this.iterator(),r=0,i=n.next();for(;!i.done;){if(r>=t&&i.value===e)return r;i=n.next(),r++}return-1}every(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(!e(n.value))return!1;n=t.next()}return!0}some(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(e(n.value))return!0;n=t.next()}return!1}forEach(e){let t=this.iterator(),n=0,r=t.next();for(;!r.done;)e(r.value,n),r=t.next(),n++}map(t){return new e(this.startFn,e=>{let{done:n,value:r}=this.nextFn(e);return n?je:{done:!1,value:t(r)}})}filter(t){return new e(this.startFn,e=>{let n;do if(n=this.nextFn(e),!n.done&&t(n.value))return n;while(!n.done);return je})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,t){let n=this.iterator(),r=t,i=n.next();for(;!i.done;)r=r===void 0?i.value:e(r,i.value),i=n.next();return r}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,n){let r=e.next();if(r.done)return n;let i=this.recursiveReduce(e,t,n);return i===void 0?r.value:t(i,r.value)}find(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(e(n.value))return n.value;n=t.next()}}findIndex(e){let t=this.iterator(),n=0,r=t.next();for(;!r.done;){if(e(r.value))return n;r=t.next(),n++}return-1}includes(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(n.value===e)return!0;n=t.next()}return!1}flatMap(t){return new e(()=>({this:this.startFn()}),e=>{do{if(e.iterator){let t=e.iterator.next();if(t.done)e.iterator=void 0;else return t}let{done:n,value:r}=this.nextFn(e.this);if(!n){let n=t(r);if(ke(n))e.iterator=n[Symbol.iterator]();else return{done:!1,value:n}}}while(e.iterator);return je})}flat(t){if(t===void 0&&(t=1),t<=0)return this;let n=t>1?this.flat(t-1):this;return new e(()=>({this:n.startFn()}),e=>{do{if(e.iterator){let t=e.iterator.next();if(t.done)e.iterator=void 0;else return t}let{done:t,value:r}=n.nextFn(e.this);if(!t)if(ke(r))e.iterator=r[Symbol.iterator]();else return{done:!1,value:r}}while(e.iterator);return je})}head(){let e=this.iterator().next();if(!e.done)return e.value}tail(t=1){return new e(()=>{let e=this.startFn();for(let n=0;n<t;n++)if(this.nextFn(e).done)return e;return e},this.nextFn)}limit(t){return new e(()=>({size:0,state:this.startFn()}),e=>(e.size++,e.size>t?je:this.nextFn(e.state)))}distinct(t){return new e(()=>({set:new Set,internalState:this.startFn()}),e=>{let n;do if(n=this.nextFn(e.internalState),!n.done){let r=t?t(n.value):n.value;if(!e.set.has(r))return e.set.add(r),n}while(!n.done);return je})}exclude(e,t){let n=new Set;for(let r of e){let e=t?t(r):r;n.add(e)}return this.filter(e=>{let r=t?t(e):e;return!n.has(r)})}};function Oe(e){return typeof e==`string`?e:e===void 0?`undefined`:typeof e.toString==`function`?e.toString():Object.prototype.toString.call(e)}function ke(e){return!!e&&typeof e[Symbol.iterator]==`function`}var Ae=new De(()=>void 0,()=>je),je=Object.freeze({done:!0,value:void 0});function R(...e){if(e.length===1){let t=e[0];if(t instanceof De)return t;if(ke(t))return new De(()=>t[Symbol.iterator](),e=>e.next());if(typeof t.length==`number`)return new De(()=>({index:0}),e=>e.index<t.length?{done:!1,value:t[e.index++]}:je)}return e.length>1?new De(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){let e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex<t.array.length)return{done:!1,value:t.array[t.arrIndex++]};t.array=void 0,t.arrIndex=0}if(t.collIndex<e.length){let n=e[t.collIndex++];ke(n)?t.iterator=n[Symbol.iterator]():n&&typeof n.length==`number`&&(t.array=n)}}while(t.iterator||t.array||t.collIndex<e.length);return je}):Ae}var Me=class extends De{constructor(e,t,n){super(()=>({iterators:n?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),e=>{for(e.pruned&&=(e.iterators.pop(),!1);e.iterators.length>0;){let n=e.iterators[e.iterators.length-1].next();if(n.done)e.iterators.pop();else return e.iterators.push(t(n.value)[Symbol.iterator]()),n}return je})}iterator(){let e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}},Ne;(function(e){function t(e){return e.reduce((e,t)=>e+t,0)}e.sum=t;function n(e){return e.reduce((e,t)=>e*t,0)}e.product=n;function r(e){return e.reduce((e,t)=>Math.min(e,t))}e.min=r;function i(e){return e.reduce((e,t)=>Math.max(e,t))}e.max=i})(Ne||={});function Pe(e,t={}){for(let[n,r]of Object.entries(e))n.startsWith(`$`)||(Array.isArray(r)?r.forEach((r,i)=>{L(r)&&(r.$container=e,r.$containerProperty=n,r.$containerIndex=i,t.deep&&Pe(r,t))}):L(r)&&(r.$container=e,r.$containerProperty=n,t.deep&&Pe(r,t)))}function Fe(e,t){let n=e;for(;n;){if(t(n))return n;n=n.$container}}function Ie(e){let t=Le(e).$document;if(!t)throw Error(`AST node has no document.`);return t}function Le(e){for(;e.$container;)e=e.$container;return e}function Re(e){return ye(e)?e.ref?[e.ref]:[]:be(e)?e.items.map(e=>e.ref):[]}function ze(e,t){if(!e)throw Error(`Node must be an AstNode.`);let n=t?.range;return new De(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){let r=t.keys[t.keyIndex];if(!r.startsWith(`$`)){let i=e[r];if(L(i)){if(t.keyIndex++,He(i,n))return{done:!1,value:i}}else if(Array.isArray(i)){for(;t.arrayIndex<i.length;){let e=i[t.arrayIndex++];if(L(e)&&He(e,n))return{done:!1,value:e}}t.arrayIndex=0}}t.keyIndex++}return je})}function Be(e,t){if(!e)throw Error(`Root node must be an AstNode.`);return new Me(e,e=>ze(e,t))}function Ve(e,t){if(!e)throw Error(`Root node must be an AstNode.`);return t?.range&&!He(e,t.range)?new Me(e,()=>[]):new Me(e,e=>ze(e,t),{includeRoot:!0})}function He(e,t){if(!t)return!0;let n=e.$cstNode?.range;return n?kn(n,t):!1}function Ue(e){return new De(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){let n=t.keys[t.keyIndex];if(!n.startsWith(`$`)){let r=e[n];if(ye(r)||be(r))return t.keyIndex++,{done:!1,value:{reference:r,container:e,property:n}};if(Array.isArray(r)){for(;t.arrayIndex<r.length;){let i=t.arrayIndex++,a=r[i];if(ye(a)||be(r))return{done:!1,value:{reference:a,container:e,property:n,index:i}}}t.arrayIndex=0}}t.keyIndex++}return je})}function We(e,t){let n=e.getTypeMetaData(t.$type),r=t;for(let e of Object.values(n.properties))e.defaultValue!==void 0&&r[e.name]===void 0&&(r[e.name]=Ge(e.defaultValue))}function Ge(e){return Array.isArray(e)?[...e.map(Ge)]:e}var Ke={$type:`AbstractElement`,cardinality:`cardinality`};function qe(e){return z.isInstance(e,Ke.$type)}var Je={$type:`AbstractParserRule`};function Ye(e){return z.isInstance(e,Je.$type)}var Xe={$type:`AbstractRule`},Ze={$type:`AbstractType`},Qe={$type:`Action`,cardinality:`cardinality`,feature:`feature`,inferredType:`inferredType`,operator:`operator`,type:`type`};function $e(e){return z.isInstance(e,Qe.$type)}var et={$type:`Alternatives`,cardinality:`cardinality`,elements:`elements`};function tt(e){return z.isInstance(e,et.$type)}var nt={$type:`ArrayLiteral`,elements:`elements`},rt={$type:`ArrayType`,elementType:`elementType`},it={$type:`Assignment`,cardinality:`cardinality`,feature:`feature`,operator:`operator`,predicate:`predicate`,terminal:`terminal`};function at(e){return z.isInstance(e,it.$type)}var ot={$type:`BooleanLiteral`,true:`true`};function st(e){return z.isInstance(e,ot.$type)}var ct={$type:`CharacterRange`,cardinality:`cardinality`,left:`left`,lookahead:`lookahead`,parenthesized:`parenthesized`,right:`right`};function lt(e){return z.isInstance(e,ct.$type)}var ut={$type:`Condition`},dt={$type:`Conjunction`,left:`left`,right:`right`};function ft(e){return z.isInstance(e,dt.$type)}var pt={$type:`CrossReference`,cardinality:`cardinality`,deprecatedSyntax:`deprecatedSyntax`,isMulti:`isMulti`,terminal:`terminal`,type:`type`};function mt(e){return z.isInstance(e,pt.$type)}var ht={$type:`Disjunction`,left:`left`,right:`right`};function gt(e){return z.isInstance(e,ht.$type)}var _t={$type:`EndOfFile`,cardinality:`cardinality`};function vt(e){return z.isInstance(e,_t.$type)}var yt={$type:`Grammar`,imports:`imports`,interfaces:`interfaces`,isDeclared:`isDeclared`,name:`name`,rules:`rules`,types:`types`},bt={$type:`GrammarImport`,path:`path`},xt={$type:`Group`,cardinality:`cardinality`,elements:`elements`,guardCondition:`guardCondition`,predicate:`predicate`};function St(e){return z.isInstance(e,xt.$type)}var Ct={$type:`InferredType`,name:`name`};function wt(e){return z.isInstance(e,Ct.$type)}var Tt={$type:`InfixRule`,call:`call`,dataType:`dataType`,inferredType:`inferredType`,name:`name`,operators:`operators`,parameters:`parameters`,returnType:`returnType`};function Et(e){return z.isInstance(e,Tt.$type)}var Dt={$type:`InfixRuleOperatorList`,associativity:`associativity`,operators:`operators`},Ot={$type:`InfixRuleOperators`,precedences:`precedences`},kt={$type:`Interface`,attributes:`attributes`,name:`name`,superTypes:`superTypes`};function At(e){return z.isInstance(e,kt.$type)}var jt={$type:`Keyword`,cardinality:`cardinality`,predicate:`predicate`,value:`value`};function Mt(e){return z.isInstance(e,jt.$type)}var Nt={$type:`NamedArgument`,calledByName:`calledByName`,parameter:`parameter`,value:`value`},Pt={$type:`NegatedToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,terminal:`terminal`};function Ft(e){return z.isInstance(e,Pt.$type)}var It={$type:`Negation`,value:`value`};function Lt(e){return z.isInstance(e,It.$type)}var Rt={$type:`NumberLiteral`,value:`value`},zt={$type:`Parameter`,name:`name`},Bt={$type:`ParameterReference`,parameter:`parameter`};function Vt(e){return z.isInstance(e,Bt.$type)}var Ht={$type:`ParserRule`,dataType:`dataType`,definition:`definition`,entry:`entry`,fragment:`fragment`,inferredType:`inferredType`,name:`name`,parameters:`parameters`,returnType:`returnType`};function Ut(e){return z.isInstance(e,Ht.$type)}var Wt={$type:`ReferenceType`,isMulti:`isMulti`,referenceType:`referenceType`},Gt={$type:`RegexToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,regex:`regex`};function Kt(e){return z.isInstance(e,Gt.$type)}var qt={$type:`ReturnType`,name:`name`};function Jt(e){return z.isInstance(e,qt.$type)}var Yt={$type:`RuleCall`,arguments:`arguments`,cardinality:`cardinality`,predicate:`predicate`,rule:`rule`};function Xt(e){return z.isInstance(e,Yt.$type)}var Zt={$type:`SimpleType`,primitiveType:`primitiveType`,stringType:`stringType`,typeRef:`typeRef`};function Qt(e){return z.isInstance(e,Zt.$type)}var $t={$type:`StringLiteral`,value:`value`},en={$type:`TerminalAlternatives`,cardinality:`cardinality`,elements:`elements`,lookahead:`lookahead`,parenthesized:`parenthesized`};function tn(e){return z.isInstance(e,en.$type)}var nn={$type:`TerminalElement`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`},rn={$type:`TerminalGroup`,cardinality:`cardinality`,elements:`elements`,lookahead:`lookahead`,parenthesized:`parenthesized`};function an(e){return z.isInstance(e,rn.$type)}var on={$type:`TerminalRule`,definition:`definition`,fragment:`fragment`,hidden:`hidden`,name:`name`,type:`type`};function sn(e){return z.isInstance(e,on.$type)}var cn={$type:`TerminalRuleCall`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,rule:`rule`};function ln(e){return z.isInstance(e,cn.$type)}var un={$type:`Type`,name:`name`,type:`type`};function dn(e){return z.isInstance(e,un.$type)}var fn={$type:`TypeAttribute`,defaultValue:`defaultValue`,isOptional:`isOptional`,name:`name`,type:`type`},pn={$type:`TypeDefinition`},mn={$type:`UnionType`,types:`types`},hn={$type:`UnorderedGroup`,cardinality:`cardinality`,elements:`elements`};function gn(e){return z.isInstance(e,hn.$type)}var _n={$type:`UntilToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,terminal:`terminal`};function vn(e){return z.isInstance(e,_n.$type)}var yn={$type:`ValueLiteral`},bn={$type:`Wildcard`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`};function xn(e){return z.isInstance(e,bn.$type)}var Sn=class extends Ce{constructor(){super(...arguments),this.types={AbstractElement:{name:Ke.$type,properties:{cardinality:{name:Ke.cardinality}},superTypes:[]},AbstractParserRule:{name:Je.$type,properties:{},superTypes:[Xe.$type,Ze.$type]},AbstractRule:{name:Xe.$type,properties:{},superTypes:[]},AbstractType:{name:Ze.$type,properties:{},superTypes:[]},Action:{name:Qe.$type,properties:{cardinality:{name:Qe.cardinality},feature:{name:Qe.feature},inferredType:{name:Qe.inferredType},operator:{name:Qe.operator},type:{name:Qe.type,referenceType:Ze.$type}},superTypes:[Ke.$type]},Alternatives:{name:et.$type,properties:{cardinality:{name:et.cardinality},elements:{name:et.elements,defaultValue:[]}},superTypes:[Ke.$type]},ArrayLiteral:{name:nt.$type,properties:{elements:{name:nt.elements,defaultValue:[]}},superTypes:[yn.$type]},ArrayType:{name:rt.$type,properties:{elementType:{name:rt.elementType}},superTypes:[pn.$type]},Assignment:{name:it.$type,properties:{cardinality:{name:it.cardinality},feature:{name:it.feature},operator:{name:it.operator},predicate:{name:it.predicate},terminal:{name:it.terminal}},superTypes:[Ke.$type]},BooleanLiteral:{name:ot.$type,properties:{true:{name:ot.true,defaultValue:!1}},superTypes:[ut.$type,yn.$type]},CharacterRange:{name:ct.$type,properties:{cardinality:{name:ct.cardinality},left:{name:ct.left},lookahead:{name:ct.lookahead},parenthesized:{name:ct.parenthesized,defaultValue:!1},right:{name:ct.right}},superTypes:[nn.$type]},Condition:{name:ut.$type,properties:{},superTypes:[]},Conjunction:{name:dt.$type,properties:{left:{name:dt.left},right:{name:dt.right}},superTypes:[ut.$type]},CrossReference:{name:pt.$type,properties:{cardinality:{name:pt.cardinality},deprecatedSyntax:{name:pt.deprecatedSyntax,defaultValue:!1},isMulti:{name:pt.isMulti,defaultValue:!1},terminal:{name:pt.terminal},type:{name:pt.type,referenceType:Ze.$type}},superTypes:[Ke.$type]},Disjunction:{name:ht.$type,properties:{left:{name:ht.left},right:{name:ht.right}},superTypes:[ut.$type]},EndOfFile:{name:_t.$type,properties:{cardinality:{name:_t.cardinality}},superTypes:[Ke.$type]},Grammar:{name:yt.$type,properties:{imports:{name:yt.imports,defaultValue:[]},interfaces:{name:yt.interfaces,defaultValue:[]},isDeclared:{name:yt.isDeclared,defaultValue:!1},name:{name:yt.name},rules:{name:yt.rules,defaultValue:[]},types:{name:yt.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:bt.$type,properties:{path:{name:bt.path}},superTypes:[]},Group:{name:xt.$type,properties:{cardinality:{name:xt.cardinality},elements:{name:xt.elements,defaultValue:[]},guardCondition:{name:xt.guardCondition},predicate:{name:xt.predicate}},superTypes:[Ke.$type]},InferredType:{name:Ct.$type,properties:{name:{name:Ct.name}},superTypes:[Ze.$type]},InfixRule:{name:Tt.$type,properties:{call:{name:Tt.call},dataType:{name:Tt.dataType},inferredType:{name:Tt.inferredType},name:{name:Tt.name},operators:{name:Tt.operators},parameters:{name:Tt.parameters,defaultValue:[]},returnType:{name:Tt.returnType,referenceType:Ze.$type}},superTypes:[Je.$type]},InfixRuleOperatorList:{name:Dt.$type,properties:{associativity:{name:Dt.associativity},operators:{name:Dt.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Ot.$type,properties:{precedences:{name:Ot.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:kt.$type,properties:{attributes:{name:kt.attributes,defaultValue:[]},name:{name:kt.name},superTypes:{name:kt.superTypes,defaultValue:[],referenceType:Ze.$type}},superTypes:[Ze.$type]},Keyword:{name:jt.$type,properties:{cardinality:{name:jt.cardinality},predicate:{name:jt.predicate},value:{name:jt.value}},superTypes:[Ke.$type]},NamedArgument:{name:Nt.$type,properties:{calledByName:{name:Nt.calledByName,defaultValue:!1},parameter:{name:Nt.parameter,referenceType:zt.$type},value:{name:Nt.value}},superTypes:[]},NegatedToken:{name:Pt.$type,properties:{cardinality:{name:Pt.cardinality},lookahead:{name:Pt.lookahead},parenthesized:{name:Pt.parenthesized,defaultValue:!1},terminal:{name:Pt.terminal}},superTypes:[nn.$type]},Negation:{name:It.$type,properties:{value:{name:It.value}},superTypes:[ut.$type]},NumberLiteral:{name:Rt.$type,properties:{value:{name:Rt.value}},superTypes:[yn.$type]},Parameter:{name:zt.$type,properties:{name:{name:zt.name}},superTypes:[]},ParameterReference:{name:Bt.$type,properties:{parameter:{name:Bt.parameter,referenceType:zt.$type}},superTypes:[ut.$type]},ParserRule:{name:Ht.$type,properties:{dataType:{name:Ht.dataType},definition:{name:Ht.definition},entry:{name:Ht.entry,defaultValue:!1},fragment:{name:Ht.fragment,defaultValue:!1},inferredType:{name:Ht.inferredType},name:{name:Ht.name},parameters:{name:Ht.parameters,defaultValue:[]},returnType:{name:Ht.returnType,referenceType:Ze.$type}},superTypes:[Je.$type]},ReferenceType:{name:Wt.$type,properties:{isMulti:{name:Wt.isMulti,defaultValue:!1},referenceType:{name:Wt.referenceType}},superTypes:[pn.$type]},RegexToken:{name:Gt.$type,properties:{cardinality:{name:Gt.cardinality},lookahead:{name:Gt.lookahead},parenthesized:{name:Gt.parenthesized,defaultValue:!1},regex:{name:Gt.regex}},superTypes:[nn.$type]},ReturnType:{name:qt.$type,properties:{name:{name:qt.name}},superTypes:[]},RuleCall:{name:Yt.$type,properties:{arguments:{name:Yt.arguments,defaultValue:[]},cardinality:{name:Yt.cardinality},predicate:{name:Yt.predicate},rule:{name:Yt.rule,referenceType:Xe.$type}},superTypes:[Ke.$type]},SimpleType:{name:Zt.$type,properties:{primitiveType:{name:Zt.primitiveType},stringType:{name:Zt.stringType},typeRef:{name:Zt.typeRef,referenceType:Ze.$type}},superTypes:[pn.$type]},StringLiteral:{name:$t.$type,properties:{value:{name:$t.value}},superTypes:[yn.$type]},TerminalAlternatives:{name:en.$type,properties:{cardinality:{name:en.cardinality},elements:{name:en.elements,defaultValue:[]},lookahead:{name:en.lookahead},parenthesized:{name:en.parenthesized,defaultValue:!1}},superTypes:[nn.$type]},TerminalElement:{name:nn.$type,properties:{cardinality:{name:nn.cardinality},lookahead:{name:nn.lookahead},parenthesized:{name:nn.parenthesized,defaultValue:!1}},superTypes:[Ke.$type]},TerminalGroup:{name:rn.$type,properties:{cardinality:{name:rn.cardinality},elements:{name:rn.elements,defaultValue:[]},lookahead:{name:rn.lookahead},parenthesized:{name:rn.parenthesized,defaultValue:!1}},superTypes:[nn.$type]},TerminalRule:{name:on.$type,properties:{definition:{name:on.definition},fragment:{name:on.fragment,defaultValue:!1},hidden:{name:on.hidden,defaultValue:!1},name:{name:on.name},type:{name:on.type}},superTypes:[Xe.$type]},TerminalRuleCall:{name:cn.$type,properties:{cardinality:{name:cn.cardinality},lookahead:{name:cn.lookahead},parenthesized:{name:cn.parenthesized,defaultValue:!1},rule:{name:cn.rule,referenceType:on.$type}},superTypes:[nn.$type]},Type:{name:un.$type,properties:{name:{name:un.name},type:{name:un.type}},superTypes:[Ze.$type]},TypeAttribute:{name:fn.$type,properties:{defaultValue:{name:fn.defaultValue},isOptional:{name:fn.isOptional,defaultValue:!1},name:{name:fn.name},type:{name:fn.type}},superTypes:[]},TypeDefinition:{name:pn.$type,properties:{},superTypes:[]},UnionType:{name:mn.$type,properties:{types:{name:mn.types,defaultValue:[]}},superTypes:[pn.$type]},UnorderedGroup:{name:hn.$type,properties:{cardinality:{name:hn.cardinality},elements:{name:hn.elements,defaultValue:[]}},superTypes:[Ke.$type]},UntilToken:{name:_n.$type,properties:{cardinality:{name:_n.cardinality},lookahead:{name:_n.lookahead},parenthesized:{name:_n.parenthesized,defaultValue:!1},terminal:{name:_n.terminal}},superTypes:[nn.$type]},ValueLiteral:{name:yn.$type,properties:{},superTypes:[]},Wildcard:{name:bn.$type,properties:{cardinality:{name:bn.cardinality},lookahead:{name:bn.lookahead},parenthesized:{name:bn.parenthesized,defaultValue:!1}},superTypes:[nn.$type]}}}},z=new Sn;function Cn(e){return new Me(e,e=>we(e)?e.content:[],{includeRoot:!0})}function wn(e,t){for(;e.container;)if(e=e.container,e===t)return!0;return!1}function Tn(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function En(e){if(!e)return;let{offset:t,end:n,range:r}=e;return{range:r,offset:t,end:n,length:n-t}}var Dn;(function(e){e[e.Before=0]=`Before`,e[e.After=1]=`After`,e[e.OverlapFront=2]=`OverlapFront`,e[e.OverlapBack=3]=`OverlapBack`,e[e.Inside=4]=`Inside`,e[e.Outside=5]=`Outside`})(Dn||={});function On(e,t){if(e.end.line<t.start.line||e.end.line===t.start.line&&e.end.character<=t.start.character)return Dn.Before;if(e.start.line>t.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return Dn.After;let n=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,r=e.end.line<t.end.line||e.end.line===t.end.line&&e.end.character<=t.end.character;return n&&r?Dn.Inside:n?Dn.OverlapBack:r?Dn.OverlapFront:Dn.Outside}function kn(e,t){return On(e,t)>Dn.After}var An=/^[\w\p{L}]$/u;function jn(e,t){if(e){let n=Nn(e,!0);if(n&&Mn(n,t))return n;if(Ee(e)){let n=e.content.findIndex(e=>!e.hidden);for(let r=n-1;r>=0;r--){let n=e.content[r];if(Mn(n,t))return n}}}}function Mn(e,t){return Te(e)&&t.includes(e.tokenType.name)}function Nn(e,t=!0){for(;e.container;){let n=e.container,r=n.content.indexOf(e);for(;r>0;){r--;let e=n.content[r];if(t||!e.hidden)return e}e=n}}var Pn=class extends Error{constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}};function Fn(e,t=`Error: Got unexpected value.`){throw Error(t)}function B(e){return e.charCodeAt(0)}function In(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function Ln(e,t){if(e[t]===!0)throw`duplicate flag `+t;e[t],e[t]=!0}function Rn(e){if(e===void 0)throw Error(`Internal Error - Should never get here!`);return!0}function zn(){throw Error(`Internal Error - Should never get here!`)}function Bn(e){return e.type===`Character`}var Vn=[];for(let e=B(`0`);e<=B(`9`);e++)Vn.push(e);var Hn=[B(`_`)].concat(Vn);for(let e=B(`a`);e<=B(`z`);e++)Hn.push(e);for(let e=B(`A`);e<=B(`Z`);e++)Hn.push(e);var Un=[B(` `),B(`\f`),B(`
|
|
2
2
|
`),B(`\r`),B(` `),B(`\v`),B(` `),B(`\xA0`),B(` `),B(` `),B(` `),B(` `),B(` `),B(` `),B(` `),B(` `),B(` `),B(` `),B(` `),B(` `),B(`\u2028`),B(`\u2029`),B(` `),B(` `),B(` `),B(``)],Wn=/[0-9a-fA-F]/,Gn=/[0-9]/,Kn=/[1-9]/,qn=class{constructor(){this.idx=0,this.input=``,this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar(`/`);let t=this.disjunction();this.consumeChar(`/`);let n={type:`Flags`,loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case`g`:Ln(n,`global`);break;case`i`:Ln(n,`ignoreCase`);break;case`m`:Ln(n,`multiLine`);break;case`u`:Ln(n,`unicode`);break;case`y`:Ln(n,`sticky`);break}if(this.idx!==this.input.length)throw Error(`Redundant input: `+this.input.substring(this.idx));return{type:`Pattern`,flags:n,value:t,loc:this.loc(0)}}disjunction(){let e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()===`|`;)this.consumeChar(`|`),e.push(this.alternative());return{type:`Disjunction`,value:e,loc:this.loc(t)}}alternative(){let e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:`Alternative`,value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case`^`:return{type:`StartAnchor`,loc:this.loc(e)};case`$`:return{type:`EndAnchor`,loc:this.loc(e)};case`\\`:switch(this.popChar()){case`b`:return{type:`WordBoundary`,loc:this.loc(e)};case`B`:return{type:`NonWordBoundary`,loc:this.loc(e)}}throw Error(`Invalid Assertion Escape`);case`(`:this.consumeChar(`?`);let t;switch(this.popChar()){case`=`:t=`Lookahead`;break;case`!`:t=`NegativeLookahead`;break;case`<`:switch(this.popChar()){case`=`:t=`Lookbehind`;break;case`!`:t=`NegativeLookbehind`}break}Rn(t);let n=this.disjunction();return this.consumeChar(`)`),{type:t,value:n,loc:this.loc(e)}}return zn()}quantifier(e=!1){let t,n=this.idx;switch(this.popChar()){case`*`:t={atLeast:0,atMost:1/0};break;case`+`:t={atLeast:1,atMost:1/0};break;case`?`:t={atLeast:0,atMost:1};break;case`{`:let n=this.integerIncludingZero();switch(this.popChar()){case`}`:t={atLeast:n,atMost:n};break;case`,`:let e;this.isDigit()?(e=this.integerIncludingZero(),t={atLeast:n,atMost:e}):t={atLeast:n,atMost:1/0},this.consumeChar(`}`);break}if(e===!0&&t===void 0)return;Rn(t);break}if(!(e===!0&&t===void 0)&&Rn(t))return this.peekChar(0)===`?`?(this.consumeChar(`?`),t.greedy=!1):t.greedy=!0,t.type=`Quantifier`,t.loc=this.loc(n),t}atom(){let e,t=this.idx;switch(this.peekChar()){case`.`:e=this.dotAll();break;case`\\`:e=this.atomEscape();break;case`[`:e=this.characterClass();break;case`(`:e=this.group();break}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),Rn(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):zn()}dotAll(){return this.consumeChar(`.`),{type:`Set`,complement:!0,value:[B(`
|
|
3
3
|
`),B(`\r`),B(`\u2028`),B(`\u2029`)]}}atomEscape(){switch(this.consumeChar(`\\`),this.peekChar()){case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:return this.decimalEscapeAtom();case`d`:case`D`:case`s`:case`S`:case`w`:case`W`:return this.characterClassEscape();case`f`:case`n`:case`r`:case`t`:case`v`:return this.controlEscapeAtom();case`c`:return this.controlLetterEscapeAtom();case`0`:return this.nulCharacterAtom();case`x`:return this.hexEscapeSequenceAtom();case`u`:return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:`GroupBackReference`,value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case`d`:e=Vn;break;case`D`:e=Vn,t=!0;break;case`s`:e=Un;break;case`S`:e=Un,t=!0;break;case`w`:e=Hn;break;case`W`:e=Hn,t=!0;break}return Rn(e)?{type:`Set`,value:e,complement:t}:zn()}controlEscapeAtom(){let e;switch(this.popChar()){case`f`:e=B(`\f`);break;case`n`:e=B(`
|
|
4
4
|
`);break;case`r`:e=B(`\r`);break;case`t`:e=B(` `);break;case`v`:e=B(`\v`);break}return Rn(e)?{type:`Character`,value:e}:zn()}controlLetterEscapeAtom(){this.consumeChar(`c`);let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error(`Invalid `);return{type:`Character`,value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar(`0`),{type:`Character`,value:B(`\0`)}}hexEscapeSequenceAtom(){return this.consumeChar(`x`),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar(`u`),this.parseHexDigits(4)}identityEscapeAtom(){return{type:`Character`,value:B(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e}from"./src-B0URjIBy.js";import"./chunk-7R4GIKGN-B0Nk6xl6.js";import"./chunk-GEFDOKGD-D5eIWnuf.js";import"./chunk-MX3YWQON-FdgNOTEP.js";import"./chunk-YBOYWFTD-i-hva81G.js";import"./chunk-PQ6SQG4A-DB1drAIU.js";import"./chunk-PU5JKC2W-KA2MZku5.js";import"./chunk-KYZI473N-CXcIXlKo.js";import"./chunk-O4XLMI2P-n-oWchCV.js";import"./index-DXEtzDAV.js";import"./chunk-FMBD7UC4-Cca8p-Ag.js";import"./chunk-JSJVCQXG-BthkA1o-.js";import"./chunk-55IACEB6-CLHg9Ulb.js";import"./chunk-KX2RTZJC-yDo9-99g.js";import{i as t,n,r,t as i}from"./chunk-WL4C6EOR-SO8Rq4UE.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e}from"./src-B0URjIBy.js";import"./chunk-7R4GIKGN-B0Nk6xl6.js";import"./chunk-GEFDOKGD-D5eIWnuf.js";import"./chunk-MX3YWQON-FdgNOTEP.js";import"./chunk-YBOYWFTD-i-hva81G.js";import"./chunk-PQ6SQG4A-DB1drAIU.js";import"./chunk-PU5JKC2W-KA2MZku5.js";import"./chunk-KYZI473N-CXcIXlKo.js";import"./chunk-O4XLMI2P-n-oWchCV.js";import"./index-DXEtzDAV.js";import"./chunk-FMBD7UC4-Cca8p-Ag.js";import"./chunk-JSJVCQXG-BthkA1o-.js";import"./chunk-55IACEB6-CLHg9Ulb.js";import"./chunk-KX2RTZJC-yDo9-99g.js";import{i as t,n,r,t as i}from"./chunk-WL4C6EOR-SO8Rq4UE.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{y as e}from"./_baseUniq-BdCUZ9M5.js";var t=4;function n(n){return e(n,t)}export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e}from"./chunk-GEFDOKGD-D5eIWnuf.js";import{G as t,M as n,N as r,a as i,b as a,c as o,f as s,h as c,i as l,n as u,o as d,r as f,s as p,v as m}from"./_createAssigner-BmxrMTIs.js";import{c as ee,o as te}from"./index-Dh2p7GUF.js";import{C as ne,E as re,M as h,N as g,S as ie,a as _,c as ae,d as oe,f as v,i as y,m as se,n as b,p as ce,r as x,s as S,y as le}from"./_baseUniq-CEuT_w6h.js";import{a as ue,c as de,d as fe,f as C,i as pe,l as w,m as T,n as E,o as me,r as he,s as D,t as ge,u as O}from"./_basePickBy-BZNHaCnJ.js";import{t as k}from"./graphlib-C0KzFwj0.js";function _e(e){return l(d(e,void 0,C),e+``)}var ve=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function ye(e){return ve.test(e)}var be=1,xe=4;function Se(e){return le(e,be|xe)}var Ce=function(){return t.Date.now()};function we(e,t){return e==null?e:n(e,ae(t),o)}function Te(e,t){return e&&oe(e,ae(t))}function Ee(e,t){return e>t}function A(e,t){var n={};return t=v(t,3),oe(e,function(e,i,a){r(n,i,t(e,i,a))}),n}function j(e){return e&&e.length?he(e,p,Ee):void 0}function M(e,t){return e&&e.length?he(e,v(t,2),pe):void 0}function De(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function Oe(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e===e,a=g(e),o=t!==void 0,s=t===null,c=t===t,l=g(t);if(!s&&!l&&!a&&e>t||a&&o&&c&&!s&&!l||r&&o&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e<t||l&&n&&i&&!r&&!a||s&&n&&i||!o&&i||!c)return-1}return 0}function ke(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var c=Oe(i[r],a[r]);if(c)return r>=s?c:c*(n[r]==`desc`?-1:1)}return e.index-t.index}function Ae(e,t,n){t=t.length?h(t,function(e){return a(e)?function(t){return ne(t,e.length===1?e[0]:e)}:e}):[p];var r=-1;return t=h(t,c(v)),De(de(e,function(e,n,i){return{criteria:h(t,function(t){return t(e)}),index:++r,value:e}}),function(e,t){return ke(e,t,n)})}var je=ce(`length`),Me=`\\ud800-\\udfff`,Ne=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,Pe=`\\ufe0e\\ufe0f`,Fe=`[`+Me+`]`,N=`[`+Ne+`]`,P=`\\ud83c[\\udffb-\\udfff]`,Ie=`(?:`+N+`|`+P+`)`,Le=`[^`+Me+`]`,Re=`(?:\\ud83c[\\udde6-\\uddff]){2}`,ze=`[\\ud800-\\udbff][\\udc00-\\udfff]`,Be=`\\u200d`,Ve=Ie+`?`,He=`[`+Pe+`]?`,Ue=`(?:`+Be+`(?:`+[Le,Re,ze].join(`|`)+`)`+He+Ve+`)*`,We=He+Ve+Ue,Ge=`(?:`+[Le+N+`?`,N,Re,ze,Fe].join(`|`)+`)`,Ke=RegExp(P+`(?=`+P+`)|`+Ge+We,`g`);function qe(e){for(var t=Ke.lastIndex=0;Ke.test(e);)++t;return t}function Je(e){return ye(e)?qe(e):je(e)}function Ye(e,t){return ge(e,t,function(t,n){return se(e,n)})}var F=_e(function(e,t){return e==null?{}:Ye(e,t)}),Xe=Math.ceil,Ze=Math.max;function Qe(e,t,n,r){for(var i=-1,a=Ze(Xe((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}function $e(e){return function(t,n,r){return r&&typeof r!=`number`&&u(t,n,r)&&(n=r=void 0),t=T(t),n===void 0?(n=t,t=0):n=T(n),r=r===void 0?t<n?1:-1:T(r),Qe(t,n,r,e)}}var I=$e(),et=`[object Map]`,tt=`[object Set]`;function nt(e){if(e==null)return 0;if(m(e))return ue(e)?Je(e):e.length;var t=te(e);return t==et||t==tt?e.size:ee(e).length}var L=f(function(e,t){if(e==null)return[];var n=t.length;return n>1&&u(e,t[0],t[1])?t=[]:n>2&&u(t[0],t[1],t[2])&&(t=[t[0]]),Ae(e,ie(t,1),[])}),rt=0;function R(e){var t=++rt;return re(e)+t}function it(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r<i;){var s=r<a?t[r]:void 0;n(o,e[r],s)}return o}function at(e,t){return it(e||[],t||[],s)}var ot=class{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,t=e._prev;if(t!==e)return st(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&st(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,ct)),n=n._prev;return`[`+e.join(`, `)+`]`}};function st(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function ct(e,t){if(e!==`_next`&&e!==`_prev`)return t}var lt=i(1);function ut(e,t){if(e.nodeCount()<=1)return[];var n=ft(e,t||lt);return C(D(dt(n.graph,n.buckets,n.zeroIdx),function(t){return e.outEdges(t.v,t.w)}))}function dt(e,t,n){for(var r=[],i=t[t.length-1],a=t[0],o;e.nodeCount();){for(;o=a.dequeue();)z(e,t,n,o);for(;o=i.dequeue();)z(e,t,n,o);if(e.nodeCount()){for(var s=t.length-2;s>0;--s)if(o=t[s].dequeue(),o){r=r.concat(z(e,t,n,o,!0));break}}}return r}function z(e,t,n,r,i){var a=i?[]:void 0;return S(e.inEdges(r.v),function(r){var o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,B(t,n,s)}),S(e.outEdges(r.v),function(r){var i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,B(t,n,o)}),e.removeNode(r.v),a}function ft(e,t){var n=new k,r=0,i=0;S(e.nodes(),function(e){n.setNode(e,{v:e,in:0,out:0})}),S(e.edges(),function(e){var a=n.edge(e.v,e.w)||0,o=t(e),s=a+o;n.setEdge(e.v,e.w,s),i=Math.max(i,n.node(e.v).out+=o),r=Math.max(r,n.node(e.w).in+=o)});var a=I(i+r+3).map(function(){return new ot}),o=r+1;return S(n.nodes(),function(e){B(a,o,n.node(e))}),{graph:n,buckets:a,zeroIdx:o}}function B(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function pt(e){S(e.graph().acyclicer===`greedy`?ut(e,t(e)):mt(e),function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,R(`rev`))});function t(e){return function(t){return e.edge(t).weight}}}function mt(e){var t=[],n={},r={};function i(a){Object.prototype.hasOwnProperty.call(r,a)||(r[a]=!0,n[a]=!0,S(e.outEdges(a),function(e){Object.prototype.hasOwnProperty.call(n,e.w)?t.push(e):i(e.w)}),delete n[a])}return S(e.nodes(),i),t}function ht(e){S(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}function V(e,t,n,r){var i;do i=R(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function gt(e){var t=new k().setGraph(e.graph());return S(e.nodes(),function(n){t.setNode(n,e.node(n))}),S(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function _t(e){var t=new k({multigraph:e.isMultigraph()}).setGraph(e.graph());return S(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),S(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function vt(e,t){var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);var c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function H(e){var t=D(I(St(e)+1),function(){return[]});return S(e.nodes(),function(n){var r=e.node(n),i=r.rank;x(i)||(t[i][r.order]=n)}),t}function yt(e){var t=E(D(e.nodes(),function(t){return e.node(t).rank}));S(e.nodes(),function(n){var r=e.node(n);me(r,`rank`)&&(r.rank-=t)})}function bt(e){var t=E(D(e.nodes(),function(t){return e.node(t).rank})),n=[];S(e.nodes(),function(r){var i=e.node(r).rank-t;n[i]||(n[i]=[]),n[i].push(r)});var r=0,i=e.graph().nodeRankFactor;S(n,function(t,n){x(t)&&n%i!==0?--r:r&&S(t,function(t){e.node(t).rank+=r})})}function xt(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),V(e,`border`,i,t)}function St(e){return j(D(e.nodes(),function(t){var n=e.node(t).rank;if(!x(n))return n}))}function Ct(e,t){var n={lhs:[],rhs:[]};return S(e,function(e){t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function wt(e,t){var n=Ce();try{return t()}finally{console.log(e+` time: `+(Ce()-n)+`ms`)}}function Tt(e,t){return t()}function Et(e){function t(n){var r=e.children(n),i=e.node(n);if(r.length&&S(r,t),Object.prototype.hasOwnProperty.call(i,`minRank`)){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;a<o;++a)Dt(e,`borderLeft`,`_bl`,n,i,a),Dt(e,`borderRight`,`_br`,n,i,a)}}S(e.children(),t)}function Dt(e,t,n,r,i,a){var o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],c=V(e,`border`,o,n);i[t][a]=c,e.setParent(c,r),s&&e.setEdge(s,c,{weight:1})}function Ot(e){var t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&At(e)}function kt(e){var t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&jt(e),(t===`lr`||t===`rl`)&&(Mt(e),At(e))}function At(e){S(e.nodes(),function(t){U(e.node(t))}),S(e.edges(),function(t){U(e.edge(t))})}function U(e){var t=e.width;e.width=e.height,e.height=t}function jt(e){S(e.nodes(),function(t){W(e.node(t))}),S(e.edges(),function(t){var n=e.edge(t);S(n.points,W),Object.prototype.hasOwnProperty.call(n,`y`)&&W(n)})}function W(e){e.y=-e.y}function Mt(e){S(e.nodes(),function(t){G(e.node(t))}),S(e.edges(),function(t){var n=e.edge(t);S(n.points,G),Object.prototype.hasOwnProperty.call(n,`x`)&&G(n)})}function G(e){var t=e.x;e.x=e.y,e.y=t}function Nt(e){e.graph().dummyChains=[],S(e.edges(),function(t){Pt(e,t)})}function Pt(e,t){var n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),c=s.labelRank;if(a!==r+1){e.removeEdge(t);var l=void 0,u,d;for(d=0,++r;r<a;++d,++r)s.points=[],l={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},u=V(e,`edge`,l,`_d`),r===c&&(l.width=s.width,l.height=s.height,l.dummy=`edge-label`,l.labelpos=s.labelpos),e.setEdge(n,u,{weight:s.weight},o),d===0&&e.graph().dummyChains.push(u),n=u;e.setEdge(n,i,{weight:s.weight},o)}}function Ft(e){S(e.graph().dummyChains,function(t){var n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}function K(e){var t={};function n(r){var i=e.node(r);if(Object.prototype.hasOwnProperty.call(t,r))return i.rank;t[r]=!0;var a=E(D(e.outEdges(r),function(t){return n(t.w)-e.edge(t).minlen}));return(a===1/0||a==null)&&(a=0),i.rank=a}S(e.sources(),n)}function q(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}function It(e){var t=new k({directed:!1}),n=e.nodes()[0],r=e.nodeCount();t.setNode(n,{});for(var i,a;Lt(t,e)<r;)i=Rt(t,e),a=t.hasNode(i.v)?q(e,i):-q(e,i),zt(t,e,a);return t}function Lt(e,t){function n(r){S(t.nodeEdges(r),function(i){var a=i.v,o=r===a?i.w:a;!e.hasNode(o)&&!q(t,i)&&(e.setNode(o,{}),e.setEdge(r,o,{}),n(o))})}return S(e.nodes(),n),e.nodeCount()}function Rt(e,t){return M(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return q(t,n)})}function zt(e,t,n){S(e.nodes(),function(e){t.node(e).rank+=n})}i(1),i(1),Bt.CycleException=J;function Bt(e){var t={},n={},r=[];function i(a){if(Object.prototype.hasOwnProperty.call(n,a))throw new J;Object.prototype.hasOwnProperty.call(t,a)||(n[a]=!0,t[a]=!0,S(e.predecessors(a),i),delete n[a],r.push(a))}if(S(e.sinks(),i),nt(t)!==e.nodeCount())throw new J;return r}function J(){}J.prototype=Error();function Vt(e,t,n){a(t)||(t=[t]);var r=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],o={};return S(t,function(t){if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);Ht(e,t,n===`post`,o,r,i)}),i}function Ht(e,t,n,r,i,a){Object.prototype.hasOwnProperty.call(r,t)||(r[t]=!0,n||a.push(t),S(i(t),function(t){Ht(e,t,n,r,i,a)}),n&&a.push(t))}function Ut(e,t){return Vt(e,t,`post`)}function Wt(e,t){return Vt(e,t,`pre`)}Y.initLowLimValues=Z,Y.initCutValues=X,Y.calcCutValue=Kt,Y.leaveEdge=Jt,Y.enterEdge=Yt,Y.exchangeEdges=Xt;function Y(e){e=gt(e),K(e);var t=It(e);Z(t),X(t,e);for(var n,r;n=Jt(t);)r=Yt(t,e,n),Xt(t,e,n,r)}function X(e,t){var n=Ut(e,e.nodes());n=n.slice(0,n.length-1),S(n,function(n){Gt(e,t,n)})}function Gt(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=Kt(e,t,n)}function Kt(e,t,n){var r=e.node(n).parent,i=!0,a=t.edge(n,r),o=0;return a||=(i=!1,t.edge(r,n)),o=a.weight,S(t.nodeEdges(n),function(a){var s=a.v===n,c=s?a.w:a.v;if(c!==r){var l=s===i,u=t.edge(a).weight;if(o+=l?u:-u,Qt(e,n,c)){var d=e.edge(n,c).cutvalue;o+=l?-d:d}}}),o}function Z(e,t){arguments.length<2&&(t=e.nodes()[0]),qt(e,{},1,t)}function qt(e,t,n,r,i){var a=n,o=e.node(r);return t[r]=!0,S(e.neighbors(r),function(i){Object.prototype.hasOwnProperty.call(t,i)||(n=qt(e,t,n,i,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function Jt(e){return w(e.edges(),function(t){return e.edge(t).cutvalue<0})}function Yt(e,t,n){var r=n.v,i=n.w;t.hasEdge(r,i)||(r=n.w,i=n.v);var a=e.node(r),o=e.node(i),s=a,c=!1;return a.lim>o.lim&&(s=o,c=!0),M(_(t.edges(),function(t){return c===$t(e,e.node(t.v),s)&&c!==$t(e,e.node(t.w),s)}),function(e){return q(t,e)})}function Xt(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),Z(e),X(e,t),Zt(e,t)}function Zt(e,t){var n=Wt(e,w(e.nodes(),function(e){return!t.node(e).parent}));n=n.slice(1),S(n,function(n){var r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function Qt(e,t,n){return e.hasEdge(t,n)}function $t(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}function en(e){switch(e.graph().ranker){case`network-simplex`:rn(e);break;case`tight-tree`:nn(e);break;case`longest-path`:tn(e);break;default:rn(e)}}var tn=K;function nn(e){K(e),It(e)}function rn(e){Y(e)}function an(e){var t=V(e,`root`,{},`_root`),n=sn(e),r=j(y(n))-1,i=2*r+1;e.graph().nestingRoot=t,S(e.edges(),function(t){e.edge(t).minlen*=i});var a=cn(e)+1;S(e.children(),function(o){on(e,t,i,a,r,n,o)}),e.graph().nodeRankFactor=i}function on(e,t,n,r,i,a,o){var s=e.children(o);if(!s.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:n});return}var c=xt(e,`_bt`),l=xt(e,`_bb`),u=e.node(o);e.setParent(c,o),u.borderTop=c,e.setParent(l,o),u.borderBottom=l,S(s,function(s){on(e,t,n,r,i,a,s);var u=e.node(s),d=u.borderTop?u.borderTop:s,f=u.borderBottom?u.borderBottom:s,p=u.borderTop?r:2*r,m=d===f?i-a[o]+1:1;e.setEdge(c,d,{weight:p,minlen:m,nestingEdge:!0}),e.setEdge(f,l,{weight:p,minlen:m,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,c,{weight:0,minlen:i+a[o]})}function sn(e){var t={};function n(r,i){var a=e.children(r);a&&a.length&&S(a,function(e){n(e,i+1)}),t[r]=i}return S(e.children(),function(e){n(e,1)}),t}function cn(e){return b(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function ln(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,S(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}function un(e,t,n){var r={},i;S(n,function(n){for(var a=e.parent(n),o,s;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}function dn(e,t,n){var r=fn(e),i=new k({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(function(t){return e.node(t)});return S(e.nodes(),function(a){var o=e.node(a),s=e.parent(a);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(i.setNode(a),i.setParent(a,s||r),S(e[n](a),function(t){var n=t.v===a?t.w:t.v,r=i.edge(n,a),o=x(r)?0:r.weight;i.setEdge(n,a,{weight:e.edge(t).weight+o})}),Object.prototype.hasOwnProperty.call(o,`minRank`)&&i.setNode(a,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),i}function fn(e){for(var t;e.hasNode(t=R(`_root`)););return t}function pn(e,t){for(var n=0,r=1;r<t.length;++r)n+=mn(e,t[r-1],t[r]);return n}function mn(e,t,n){for(var r=at(n,D(n,function(e,t){return t})),i=C(D(t,function(t){return L(D(e.outEdges(t),function(t){return{pos:r[t.w],weight:e.edge(t).weight}}),`pos`)})),a=1;a<n.length;)a<<=1;var o=2*a-1;--a;var s=D(Array(o),function(){return 0}),c=0;return S(i.forEach(function(e){var t=e.pos+a;s[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=s[t+1]),t=t-1>>1,s[t]+=e.weight;c+=e.weight*n})),c}function hn(e){var t={},n=_(e.nodes(),function(t){return!e.children(t).length}),r=D(I(j(D(n,function(t){return e.node(t).rank}))+1),function(){return[]});function i(n){me(t,n)||(t[n]=!0,r[e.node(n).rank].push(n),S(e.successors(n),i))}return S(L(n,function(t){return e.node(t).rank}),i),r}function gn(e,t){return D(t,function(t){var n=e.inEdges(t);if(n.length){var r=b(n,function(t,n){var r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}else return{v:t}})}function _n(e,t){var n={};return S(e,function(e,t){var r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};x(e.barycenter)||(r.barycenter=e.barycenter,r.weight=e.weight)}),S(t.edges(),function(e){var t=n[e.v],r=n[e.w];!x(t)&&!x(r)&&(r.indegree++,t.out.push(n[e.w]))}),vn(_(n,function(e){return!e.indegree}))}function vn(e){var t=[];function n(e){return function(t){t.merged||(x(t.barycenter)||x(e.barycenter)||t.barycenter>=e.barycenter)&&yn(e,t)}}function r(t){return function(n){n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){var i=e.pop();t.push(i),S(i.in.reverse(),n(i)),S(i.out,r(i))}return D(_(t,function(e){return!e.merged}),function(e){return F(e,[`vs`,`i`,`barycenter`,`weight`])})}function yn(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}function bn(e,t){var n=Ct(e,function(e){return Object.prototype.hasOwnProperty.call(e,`barycenter`)}),r=n.lhs,i=L(n.rhs,function(e){return-e.i}),a=[],o=0,s=0,c=0;r.sort(Sn(!!t)),c=xn(a,i,c),S(r,function(e){c+=e.vs.length,a.push(e.vs),o+=e.barycenter*e.weight,s+=e.weight,c=xn(a,i,c)});var l={vs:C(a)};return s&&(l.barycenter=o/s,l.weight=s),l}function xn(e,t,n){for(var r;t.length&&(r=O(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}function Sn(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}function Cn(e,t,n,r){var i=e.children(t),a=e.node(t),o=a?a.borderLeft:void 0,s=a?a.borderRight:void 0,c={};o&&(i=_(i,function(e){return e!==o&&e!==s}));var l=gn(e,i);S(l,function(t){if(e.children(t.v).length){var i=Cn(e,t.v,n,r);c[t.v]=i,Object.prototype.hasOwnProperty.call(i,`barycenter`)&&Tn(t,i)}});var u=_n(l,n);wn(u,c);var d=bn(u,r);if(o&&(d.vs=C([o,d.vs,s]),e.predecessors(o).length)){var f=e.node(e.predecessors(o)[0]),p=e.node(e.predecessors(s)[0]);Object.prototype.hasOwnProperty.call(d,`barycenter`)||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+f.order+p.order)/(d.weight+2),d.weight+=2}return d}function wn(e,t){S(e,function(e){e.vs=C(e.vs.map(function(e){return t[e]?t[e].vs:e}))})}function Tn(e,t){x(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}function En(e){var t=St(e),n=Dn(e,I(1,t+1),`inEdges`),r=Dn(e,I(t-1,-1,-1),`outEdges`),i=hn(e);kn(e,i);for(var a=1/0,o,s=0,c=0;c<4;++s,++c){On(s%2?n:r,s%4>=2),i=H(e);var l=pn(e,i);l<a&&(c=0,o=Se(i),a=l)}kn(e,o)}function Dn(e,t,n){return D(t,function(t){return dn(e,t,n)})}function On(e,t){var n=new k;S(e,function(e){var r=e.graph().root,i=Cn(e,r,n,t);S(i.vs,function(t,n){e.node(t).order=n}),un(e,n,i.vs)})}function kn(e,t){S(t,function(t){S(t,function(t,n){e.node(t).order=n})})}function An(e){var t=Mn(e);S(e.graph().dummyChains,function(n){for(var r=e.node(n),i=r.edgeObj,a=jn(e,t,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;n!==i.w;){if(r=e.node(n),u){for(;(l=o[c])!==s&&e.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&e.node(l=o[c+1]).minRank<=r.rank;)c++;l=o[c]}e.setParent(n,l),n=e.successors(n)[0]}})}function jn(e,t,n,r){var i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c=n,l;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function Mn(e){var t={},n=0;function r(i){var a=n;S(e.children(i),r),t[i]={low:a,lim:n++}}return S(e.children(),r),t}function Nn(e,t){var n={};function r(t,r){var i=0,a=0,o=t.length,s=O(r);return S(r,function(t,c){var l=Fn(e,t),u=l?e.node(l).order:o;(l||t===s)&&(S(r.slice(a,c+1),function(t){S(e.predecessors(t),function(r){var a=e.node(r),o=a.order;(o<i||u<o)&&!(a.dummy&&e.node(t).dummy)&&In(n,r,t)})}),a=c+1,i=u)}),r}return b(t,r),n}function Pn(e,t){var n={};function r(t,r,i,a,o){var s;S(I(r,i),function(r){s=t[r],e.node(s).dummy&&S(e.predecessors(s),function(t){var r=e.node(t);r.dummy&&(r.order<a||r.order>o)&&In(n,t,s)})})}function i(t,n){var i=-1,a,o=0;return S(n,function(s,c){if(e.node(s).dummy===`border`){var l=e.predecessors(s);l.length&&(a=e.node(l[0]).order,r(n,o,c,i,a),o=c,i=a)}r(n,o,n.length,a,t.length)}),n}return b(t,i),n}function Fn(e,t){if(e.node(t).dummy)return w(e.predecessors(t),function(t){return e.node(t).dummy})}function In(e,t,n){if(t>n){var r=t;t=n,n=r}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[t];Object.defineProperty(i,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Ln(e,t,n){if(t>n){var r=t;t=n,n=r}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],n)}function Rn(e,t,n,r){var i={},a={},o={};return S(t,function(e){S(e,function(e,t){i[e]=e,a[e]=e,o[e]=t})}),S(t,function(e){var t=-1;S(e,function(e){var s=r(e);if(s.length){s=L(s,function(e){return o[e]});for(var c=(s.length-1)/2,l=Math.floor(c),u=Math.ceil(c);l<=u;++l){var d=s[l];a[e]===e&&t<o[d]&&!Ln(n,e,d)&&(a[d]=e,a[e]=i[e]=i[d],t=o[d])}}})}),{root:i,align:a}}function zn(e,t,n,r,i){var a={},o=Bn(e,t,n,i),s=i?`borderLeft`:`borderRight`;function c(e,t){for(var n=o.nodes(),r=n.pop(),i={};r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}function l(e){a[e]=o.inEdges(e).reduce(function(e,t){return Math.max(e,a[t.v]+o.edge(t))},0)}function u(t){var n=o.outEdges(t).reduce(function(e,t){return Math.min(e,a[t.w]-o.edge(t))},1/0),r=e.node(t);n!==1/0&&r.borderType!==s&&(a[t]=Math.max(a[t],n))}return c(l,o.predecessors.bind(o)),c(u,o.successors.bind(o)),S(r,function(e){a[e]=a[n[e]]}),a}function Bn(e,t,n,r){var i=new k,a=e.graph(),o=Gn(a.nodesep,a.edgesep,r);return S(t,function(t){var r;S(t,function(t){var a=n[t];if(i.setNode(a),r){var s=n[r],c=i.edge(s,a);i.setEdge(s,a,Math.max(o(e,t,r),c||0))}r=t})}),i}function Vn(e,t){return M(y(t),function(t){var n=-1/0,r=1/0;return we(t,function(t,i){var a=Kn(e,i)/2;n=Math.max(t+a,n),r=Math.min(t-a,r)}),n-r})}function Hn(e,t){var n=y(t),r=E(n),i=j(n);S([`u`,`d`],function(n){S([`l`,`r`],function(a){var o=n+a,s=e[o],c;if(s!==t){var l=y(s);c=a===`l`?r-E(l):i-j(l),c&&(e[o]=A(s,function(e){return e+c}))}})})}function Un(e,t){return A(e.ul,function(n,r){if(t)return e[t.toLowerCase()][r];var i=L(D(e,r));return(i[1]+i[2])/2})}function Wn(t){var n=H(t),r=e(Nn(t,n),Pn(t,n)),i={},a;return S([`u`,`d`],function(e){a=e===`u`?n:y(n).reverse(),S([`l`,`r`],function(n){n===`r`&&(a=D(a,function(e){return y(e).reverse()}));var o=(e===`u`?t.predecessors:t.successors).bind(t),s=Rn(t,a,r,o),c=zn(t,a,s.root,s.align,n===`r`);n===`r`&&(c=A(c,function(e){return-e})),i[e+n]=c})}),Hn(i,Vn(t,i)),Un(i,t.graph().align)}function Gn(e,t,n){return function(r,i,a){var o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.prototype.hasOwnProperty.call(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2;break}if(l&&(c+=n?l:-l),l=0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.prototype.hasOwnProperty.call(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2;break}return l&&(c+=n?l:-l),l=0,c}}function Kn(e,t){return e.node(t).width}function qn(e){e=_t(e),Jn(e),Te(Wn(e),function(t,n){e.node(n).x=t})}function Jn(e){var t=H(e),n=e.graph().ranksep,r=0;S(t,function(t){var i=j(D(t,function(t){return e.node(t).height}));S(t,function(t){e.node(t).y=r+i/2}),r+=i+n})}function Yn(e,t){var n=t&&t.debugTiming?wt:Tt;n(`layout`,()=>{var t=n(` buildLayoutGraph`,()=>or(e));n(` runLayout`,()=>Xn(t,n)),n(` updateInputGraph`,()=>Zn(e,t))})}function Xn(e,t){t(` makeSpaceForEdgeLabels`,()=>sr(e)),t(` removeSelfEdges`,()=>gr(e)),t(` acyclic`,()=>pt(e)),t(` nestingGraph.run`,()=>an(e)),t(` rank`,()=>en(_t(e))),t(` injectEdgeLabelProxies`,()=>cr(e)),t(` removeEmptyRanks`,()=>bt(e)),t(` nestingGraph.cleanup`,()=>ln(e)),t(` normalizeRanks`,()=>yt(e)),t(` assignRankMinMax`,()=>lr(e)),t(` removeEdgeLabelProxies`,()=>ur(e)),t(` normalize.run`,()=>Nt(e)),t(` parentDummyChains`,()=>An(e)),t(` addBorderSegments`,()=>Et(e)),t(` order`,()=>En(e)),t(` insertSelfEdges`,()=>_r(e)),t(` adjustCoordinateSystem`,()=>Ot(e)),t(` position`,()=>qn(e)),t(` positionSelfEdges`,()=>vr(e)),t(` removeBorderNodes`,()=>hr(e)),t(` normalize.undo`,()=>Ft(e)),t(` fixupEdgeLabelCoords`,()=>pr(e)),t(` undoCoordinateSystem`,()=>kt(e)),t(` translateGraph`,()=>dr(e)),t(` assignNodeIntersects`,()=>fr(e)),t(` reversePoints`,()=>mr(e)),t(` acyclic.undo`,()=>ht(e))}function Zn(e,t){S(e.nodes(),function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))}),S(e.edges(),function(n){var r=e.edge(n),i=t.edge(n);r.points=i.points,Object.prototype.hasOwnProperty.call(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var Qn=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],$n={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},er=[`acyclicer`,`ranker`,`rankdir`,`align`],tr=[`width`,`height`],nr={width:0,height:0},rr=[`minlen`,`weight`,`width`,`height`,`labeloffset`],ir={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},ar=[`labelpos`];function or(t){var n=new k({multigraph:!0,compound:!0}),r=$(t.graph());return n.setGraph(e({},$n,Q(r,Qn),F(r,er))),S(t.nodes(),function(e){var r=$(t.node(e));n.setNode(e,fe(Q(r,tr),nr)),n.setParent(e,t.parent(e))}),S(t.edges(),function(r){var i=$(t.edge(r));n.setEdge(r,e({},ir,Q(i,rr),F(i,ar)))}),n}function sr(e){var t=e.graph();t.ranksep/=2,S(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function cr(e){S(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v);V(e,`edge-proxy`,{rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t},`_ep`)}})}function lr(e){var t=0;S(e.nodes(),function(n){var r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=j(t,r.maxRank))}),e.graph().maxRank=t}function ur(e){S(e.nodes(),function(t){var n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function dr(e){var t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(e){var a=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}S(e.nodes(),function(t){c(e.node(t))}),S(e.edges(),function(t){var n=e.edge(t);Object.prototype.hasOwnProperty.call(n,`x`)&&c(n)}),t-=o,r-=s,S(e.nodes(),function(n){var i=e.node(n);i.x-=t,i.y-=r}),S(e.edges(),function(n){var i=e.edge(n);S(i.points,function(e){e.x-=t,e.y-=r}),Object.prototype.hasOwnProperty.call(i,`x`)&&(i.x-=t),Object.prototype.hasOwnProperty.call(i,`y`)&&(i.y-=r)}),a.width=n-t+o,a.height=i-r+s}function fr(e){S(e.edges(),function(t){var n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(vt(r,a)),n.points.push(vt(i,o))})}function pr(e){S(e.edges(),function(t){var n=e.edge(t);if(Object.prototype.hasOwnProperty.call(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset;break}})}function mr(e){S(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function hr(e){S(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(O(n.borderLeft)),o=e.node(O(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),S(e.nodes(),function(t){e.node(t).dummy===`border`&&e.removeNode(t)})}function gr(e){S(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function _r(e){S(H(e),function(t){var n=0;S(t,function(t,r){var i=e.node(t);i.order=r+n,S(i.selfEdges,function(t){V(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,label:t.label},`_se`)}),delete i.selfEdges})})}function vr(e){S(e.nodes(),function(t){var n=e.node(t);if(n.dummy===`selfedge`){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function Q(e,t){return A(F(e,t),Number)}function $(e){var t={};return S(e,function(e,n){t[n.toLowerCase()]=e}),t}export{Yn as t};
|
|
1
|
+
import{_ as e}from"./chunk-GEFDOKGD-D5eIWnuf.js";import{G as t,M as n,N as r,a as i,b as a,c as o,f as s,h as c,i as l,n as u,o as d,r as f,s as p,v as m}from"./_createAssigner-BmxrMTIs.js";import{c as ee,o as te}from"./index-DXEtzDAV.js";import{C as ne,E as re,M as h,N as g,S as ie,a as _,c as ae,d as oe,f as v,i as y,m as se,n as b,p as ce,r as x,s as S,y as le}from"./_baseUniq-BdCUZ9M5.js";import{a as ue,c as de,d as fe,f as C,i as pe,l as w,m as T,n as E,o as me,r as he,s as D,t as ge,u as O}from"./_basePickBy-yrdMoyRa.js";import{t as k}from"./graphlib-Bm7lcrUK.js";function _e(e){return l(d(e,void 0,C),e+``)}var ve=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function ye(e){return ve.test(e)}var be=1,xe=4;function Se(e){return le(e,be|xe)}var Ce=function(){return t.Date.now()};function we(e,t){return e==null?e:n(e,ae(t),o)}function Te(e,t){return e&&oe(e,ae(t))}function Ee(e,t){return e>t}function A(e,t){var n={};return t=v(t,3),oe(e,function(e,i,a){r(n,i,t(e,i,a))}),n}function j(e){return e&&e.length?he(e,p,Ee):void 0}function M(e,t){return e&&e.length?he(e,v(t,2),pe):void 0}function De(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function Oe(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e===e,a=g(e),o=t!==void 0,s=t===null,c=t===t,l=g(t);if(!s&&!l&&!a&&e>t||a&&o&&c&&!s&&!l||r&&o&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e<t||l&&n&&i&&!r&&!a||s&&n&&i||!o&&i||!c)return-1}return 0}function ke(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var c=Oe(i[r],a[r]);if(c)return r>=s?c:c*(n[r]==`desc`?-1:1)}return e.index-t.index}function Ae(e,t,n){t=t.length?h(t,function(e){return a(e)?function(t){return ne(t,e.length===1?e[0]:e)}:e}):[p];var r=-1;return t=h(t,c(v)),De(de(e,function(e,n,i){return{criteria:h(t,function(t){return t(e)}),index:++r,value:e}}),function(e,t){return ke(e,t,n)})}var je=ce(`length`),Me=`\\ud800-\\udfff`,Ne=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,Pe=`\\ufe0e\\ufe0f`,Fe=`[`+Me+`]`,N=`[`+Ne+`]`,P=`\\ud83c[\\udffb-\\udfff]`,Ie=`(?:`+N+`|`+P+`)`,Le=`[^`+Me+`]`,Re=`(?:\\ud83c[\\udde6-\\uddff]){2}`,ze=`[\\ud800-\\udbff][\\udc00-\\udfff]`,Be=`\\u200d`,Ve=Ie+`?`,He=`[`+Pe+`]?`,Ue=`(?:`+Be+`(?:`+[Le,Re,ze].join(`|`)+`)`+He+Ve+`)*`,We=He+Ve+Ue,Ge=`(?:`+[Le+N+`?`,N,Re,ze,Fe].join(`|`)+`)`,Ke=RegExp(P+`(?=`+P+`)|`+Ge+We,`g`);function qe(e){for(var t=Ke.lastIndex=0;Ke.test(e);)++t;return t}function Je(e){return ye(e)?qe(e):je(e)}function Ye(e,t){return ge(e,t,function(t,n){return se(e,n)})}var F=_e(function(e,t){return e==null?{}:Ye(e,t)}),Xe=Math.ceil,Ze=Math.max;function Qe(e,t,n,r){for(var i=-1,a=Ze(Xe((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}function $e(e){return function(t,n,r){return r&&typeof r!=`number`&&u(t,n,r)&&(n=r=void 0),t=T(t),n===void 0?(n=t,t=0):n=T(n),r=r===void 0?t<n?1:-1:T(r),Qe(t,n,r,e)}}var I=$e(),et=`[object Map]`,tt=`[object Set]`;function nt(e){if(e==null)return 0;if(m(e))return ue(e)?Je(e):e.length;var t=te(e);return t==et||t==tt?e.size:ee(e).length}var L=f(function(e,t){if(e==null)return[];var n=t.length;return n>1&&u(e,t[0],t[1])?t=[]:n>2&&u(t[0],t[1],t[2])&&(t=[t[0]]),Ae(e,ie(t,1),[])}),rt=0;function R(e){var t=++rt;return re(e)+t}function it(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r<i;){var s=r<a?t[r]:void 0;n(o,e[r],s)}return o}function at(e,t){return it(e||[],t||[],s)}var ot=class{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,t=e._prev;if(t!==e)return st(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&st(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,ct)),n=n._prev;return`[`+e.join(`, `)+`]`}};function st(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function ct(e,t){if(e!==`_next`&&e!==`_prev`)return t}var lt=i(1);function ut(e,t){if(e.nodeCount()<=1)return[];var n=ft(e,t||lt);return C(D(dt(n.graph,n.buckets,n.zeroIdx),function(t){return e.outEdges(t.v,t.w)}))}function dt(e,t,n){for(var r=[],i=t[t.length-1],a=t[0],o;e.nodeCount();){for(;o=a.dequeue();)z(e,t,n,o);for(;o=i.dequeue();)z(e,t,n,o);if(e.nodeCount()){for(var s=t.length-2;s>0;--s)if(o=t[s].dequeue(),o){r=r.concat(z(e,t,n,o,!0));break}}}return r}function z(e,t,n,r,i){var a=i?[]:void 0;return S(e.inEdges(r.v),function(r){var o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,B(t,n,s)}),S(e.outEdges(r.v),function(r){var i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,B(t,n,o)}),e.removeNode(r.v),a}function ft(e,t){var n=new k,r=0,i=0;S(e.nodes(),function(e){n.setNode(e,{v:e,in:0,out:0})}),S(e.edges(),function(e){var a=n.edge(e.v,e.w)||0,o=t(e),s=a+o;n.setEdge(e.v,e.w,s),i=Math.max(i,n.node(e.v).out+=o),r=Math.max(r,n.node(e.w).in+=o)});var a=I(i+r+3).map(function(){return new ot}),o=r+1;return S(n.nodes(),function(e){B(a,o,n.node(e))}),{graph:n,buckets:a,zeroIdx:o}}function B(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function pt(e){S(e.graph().acyclicer===`greedy`?ut(e,t(e)):mt(e),function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,R(`rev`))});function t(e){return function(t){return e.edge(t).weight}}}function mt(e){var t=[],n={},r={};function i(a){Object.prototype.hasOwnProperty.call(r,a)||(r[a]=!0,n[a]=!0,S(e.outEdges(a),function(e){Object.prototype.hasOwnProperty.call(n,e.w)?t.push(e):i(e.w)}),delete n[a])}return S(e.nodes(),i),t}function ht(e){S(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}function V(e,t,n,r){var i;do i=R(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function gt(e){var t=new k().setGraph(e.graph());return S(e.nodes(),function(n){t.setNode(n,e.node(n))}),S(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function _t(e){var t=new k({multigraph:e.isMultigraph()}).setGraph(e.graph());return S(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),S(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function vt(e,t){var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);var c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function H(e){var t=D(I(St(e)+1),function(){return[]});return S(e.nodes(),function(n){var r=e.node(n),i=r.rank;x(i)||(t[i][r.order]=n)}),t}function yt(e){var t=E(D(e.nodes(),function(t){return e.node(t).rank}));S(e.nodes(),function(n){var r=e.node(n);me(r,`rank`)&&(r.rank-=t)})}function bt(e){var t=E(D(e.nodes(),function(t){return e.node(t).rank})),n=[];S(e.nodes(),function(r){var i=e.node(r).rank-t;n[i]||(n[i]=[]),n[i].push(r)});var r=0,i=e.graph().nodeRankFactor;S(n,function(t,n){x(t)&&n%i!==0?--r:r&&S(t,function(t){e.node(t).rank+=r})})}function xt(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),V(e,`border`,i,t)}function St(e){return j(D(e.nodes(),function(t){var n=e.node(t).rank;if(!x(n))return n}))}function Ct(e,t){var n={lhs:[],rhs:[]};return S(e,function(e){t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function wt(e,t){var n=Ce();try{return t()}finally{console.log(e+` time: `+(Ce()-n)+`ms`)}}function Tt(e,t){return t()}function Et(e){function t(n){var r=e.children(n),i=e.node(n);if(r.length&&S(r,t),Object.prototype.hasOwnProperty.call(i,`minRank`)){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;a<o;++a)Dt(e,`borderLeft`,`_bl`,n,i,a),Dt(e,`borderRight`,`_br`,n,i,a)}}S(e.children(),t)}function Dt(e,t,n,r,i,a){var o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],c=V(e,`border`,o,n);i[t][a]=c,e.setParent(c,r),s&&e.setEdge(s,c,{weight:1})}function Ot(e){var t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&At(e)}function kt(e){var t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&jt(e),(t===`lr`||t===`rl`)&&(Mt(e),At(e))}function At(e){S(e.nodes(),function(t){U(e.node(t))}),S(e.edges(),function(t){U(e.edge(t))})}function U(e){var t=e.width;e.width=e.height,e.height=t}function jt(e){S(e.nodes(),function(t){W(e.node(t))}),S(e.edges(),function(t){var n=e.edge(t);S(n.points,W),Object.prototype.hasOwnProperty.call(n,`y`)&&W(n)})}function W(e){e.y=-e.y}function Mt(e){S(e.nodes(),function(t){G(e.node(t))}),S(e.edges(),function(t){var n=e.edge(t);S(n.points,G),Object.prototype.hasOwnProperty.call(n,`x`)&&G(n)})}function G(e){var t=e.x;e.x=e.y,e.y=t}function Nt(e){e.graph().dummyChains=[],S(e.edges(),function(t){Pt(e,t)})}function Pt(e,t){var n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),c=s.labelRank;if(a!==r+1){e.removeEdge(t);var l=void 0,u,d;for(d=0,++r;r<a;++d,++r)s.points=[],l={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},u=V(e,`edge`,l,`_d`),r===c&&(l.width=s.width,l.height=s.height,l.dummy=`edge-label`,l.labelpos=s.labelpos),e.setEdge(n,u,{weight:s.weight},o),d===0&&e.graph().dummyChains.push(u),n=u;e.setEdge(n,i,{weight:s.weight},o)}}function Ft(e){S(e.graph().dummyChains,function(t){var n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}function K(e){var t={};function n(r){var i=e.node(r);if(Object.prototype.hasOwnProperty.call(t,r))return i.rank;t[r]=!0;var a=E(D(e.outEdges(r),function(t){return n(t.w)-e.edge(t).minlen}));return(a===1/0||a==null)&&(a=0),i.rank=a}S(e.sources(),n)}function q(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}function It(e){var t=new k({directed:!1}),n=e.nodes()[0],r=e.nodeCount();t.setNode(n,{});for(var i,a;Lt(t,e)<r;)i=Rt(t,e),a=t.hasNode(i.v)?q(e,i):-q(e,i),zt(t,e,a);return t}function Lt(e,t){function n(r){S(t.nodeEdges(r),function(i){var a=i.v,o=r===a?i.w:a;!e.hasNode(o)&&!q(t,i)&&(e.setNode(o,{}),e.setEdge(r,o,{}),n(o))})}return S(e.nodes(),n),e.nodeCount()}function Rt(e,t){return M(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return q(t,n)})}function zt(e,t,n){S(e.nodes(),function(e){t.node(e).rank+=n})}i(1),i(1),Bt.CycleException=J;function Bt(e){var t={},n={},r=[];function i(a){if(Object.prototype.hasOwnProperty.call(n,a))throw new J;Object.prototype.hasOwnProperty.call(t,a)||(n[a]=!0,t[a]=!0,S(e.predecessors(a),i),delete n[a],r.push(a))}if(S(e.sinks(),i),nt(t)!==e.nodeCount())throw new J;return r}function J(){}J.prototype=Error();function Vt(e,t,n){a(t)||(t=[t]);var r=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],o={};return S(t,function(t){if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);Ht(e,t,n===`post`,o,r,i)}),i}function Ht(e,t,n,r,i,a){Object.prototype.hasOwnProperty.call(r,t)||(r[t]=!0,n||a.push(t),S(i(t),function(t){Ht(e,t,n,r,i,a)}),n&&a.push(t))}function Ut(e,t){return Vt(e,t,`post`)}function Wt(e,t){return Vt(e,t,`pre`)}Y.initLowLimValues=Z,Y.initCutValues=X,Y.calcCutValue=Kt,Y.leaveEdge=Jt,Y.enterEdge=Yt,Y.exchangeEdges=Xt;function Y(e){e=gt(e),K(e);var t=It(e);Z(t),X(t,e);for(var n,r;n=Jt(t);)r=Yt(t,e,n),Xt(t,e,n,r)}function X(e,t){var n=Ut(e,e.nodes());n=n.slice(0,n.length-1),S(n,function(n){Gt(e,t,n)})}function Gt(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=Kt(e,t,n)}function Kt(e,t,n){var r=e.node(n).parent,i=!0,a=t.edge(n,r),o=0;return a||=(i=!1,t.edge(r,n)),o=a.weight,S(t.nodeEdges(n),function(a){var s=a.v===n,c=s?a.w:a.v;if(c!==r){var l=s===i,u=t.edge(a).weight;if(o+=l?u:-u,Qt(e,n,c)){var d=e.edge(n,c).cutvalue;o+=l?-d:d}}}),o}function Z(e,t){arguments.length<2&&(t=e.nodes()[0]),qt(e,{},1,t)}function qt(e,t,n,r,i){var a=n,o=e.node(r);return t[r]=!0,S(e.neighbors(r),function(i){Object.prototype.hasOwnProperty.call(t,i)||(n=qt(e,t,n,i,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function Jt(e){return w(e.edges(),function(t){return e.edge(t).cutvalue<0})}function Yt(e,t,n){var r=n.v,i=n.w;t.hasEdge(r,i)||(r=n.w,i=n.v);var a=e.node(r),o=e.node(i),s=a,c=!1;return a.lim>o.lim&&(s=o,c=!0),M(_(t.edges(),function(t){return c===$t(e,e.node(t.v),s)&&c!==$t(e,e.node(t.w),s)}),function(e){return q(t,e)})}function Xt(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),Z(e),X(e,t),Zt(e,t)}function Zt(e,t){var n=Wt(e,w(e.nodes(),function(e){return!t.node(e).parent}));n=n.slice(1),S(n,function(n){var r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function Qt(e,t,n){return e.hasEdge(t,n)}function $t(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}function en(e){switch(e.graph().ranker){case`network-simplex`:rn(e);break;case`tight-tree`:nn(e);break;case`longest-path`:tn(e);break;default:rn(e)}}var tn=K;function nn(e){K(e),It(e)}function rn(e){Y(e)}function an(e){var t=V(e,`root`,{},`_root`),n=sn(e),r=j(y(n))-1,i=2*r+1;e.graph().nestingRoot=t,S(e.edges(),function(t){e.edge(t).minlen*=i});var a=cn(e)+1;S(e.children(),function(o){on(e,t,i,a,r,n,o)}),e.graph().nodeRankFactor=i}function on(e,t,n,r,i,a,o){var s=e.children(o);if(!s.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:n});return}var c=xt(e,`_bt`),l=xt(e,`_bb`),u=e.node(o);e.setParent(c,o),u.borderTop=c,e.setParent(l,o),u.borderBottom=l,S(s,function(s){on(e,t,n,r,i,a,s);var u=e.node(s),d=u.borderTop?u.borderTop:s,f=u.borderBottom?u.borderBottom:s,p=u.borderTop?r:2*r,m=d===f?i-a[o]+1:1;e.setEdge(c,d,{weight:p,minlen:m,nestingEdge:!0}),e.setEdge(f,l,{weight:p,minlen:m,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,c,{weight:0,minlen:i+a[o]})}function sn(e){var t={};function n(r,i){var a=e.children(r);a&&a.length&&S(a,function(e){n(e,i+1)}),t[r]=i}return S(e.children(),function(e){n(e,1)}),t}function cn(e){return b(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function ln(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,S(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}function un(e,t,n){var r={},i;S(n,function(n){for(var a=e.parent(n),o,s;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}function dn(e,t,n){var r=fn(e),i=new k({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(function(t){return e.node(t)});return S(e.nodes(),function(a){var o=e.node(a),s=e.parent(a);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(i.setNode(a),i.setParent(a,s||r),S(e[n](a),function(t){var n=t.v===a?t.w:t.v,r=i.edge(n,a),o=x(r)?0:r.weight;i.setEdge(n,a,{weight:e.edge(t).weight+o})}),Object.prototype.hasOwnProperty.call(o,`minRank`)&&i.setNode(a,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),i}function fn(e){for(var t;e.hasNode(t=R(`_root`)););return t}function pn(e,t){for(var n=0,r=1;r<t.length;++r)n+=mn(e,t[r-1],t[r]);return n}function mn(e,t,n){for(var r=at(n,D(n,function(e,t){return t})),i=C(D(t,function(t){return L(D(e.outEdges(t),function(t){return{pos:r[t.w],weight:e.edge(t).weight}}),`pos`)})),a=1;a<n.length;)a<<=1;var o=2*a-1;--a;var s=D(Array(o),function(){return 0}),c=0;return S(i.forEach(function(e){var t=e.pos+a;s[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=s[t+1]),t=t-1>>1,s[t]+=e.weight;c+=e.weight*n})),c}function hn(e){var t={},n=_(e.nodes(),function(t){return!e.children(t).length}),r=D(I(j(D(n,function(t){return e.node(t).rank}))+1),function(){return[]});function i(n){me(t,n)||(t[n]=!0,r[e.node(n).rank].push(n),S(e.successors(n),i))}return S(L(n,function(t){return e.node(t).rank}),i),r}function gn(e,t){return D(t,function(t){var n=e.inEdges(t);if(n.length){var r=b(n,function(t,n){var r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}else return{v:t}})}function _n(e,t){var n={};return S(e,function(e,t){var r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};x(e.barycenter)||(r.barycenter=e.barycenter,r.weight=e.weight)}),S(t.edges(),function(e){var t=n[e.v],r=n[e.w];!x(t)&&!x(r)&&(r.indegree++,t.out.push(n[e.w]))}),vn(_(n,function(e){return!e.indegree}))}function vn(e){var t=[];function n(e){return function(t){t.merged||(x(t.barycenter)||x(e.barycenter)||t.barycenter>=e.barycenter)&&yn(e,t)}}function r(t){return function(n){n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){var i=e.pop();t.push(i),S(i.in.reverse(),n(i)),S(i.out,r(i))}return D(_(t,function(e){return!e.merged}),function(e){return F(e,[`vs`,`i`,`barycenter`,`weight`])})}function yn(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}function bn(e,t){var n=Ct(e,function(e){return Object.prototype.hasOwnProperty.call(e,`barycenter`)}),r=n.lhs,i=L(n.rhs,function(e){return-e.i}),a=[],o=0,s=0,c=0;r.sort(Sn(!!t)),c=xn(a,i,c),S(r,function(e){c+=e.vs.length,a.push(e.vs),o+=e.barycenter*e.weight,s+=e.weight,c=xn(a,i,c)});var l={vs:C(a)};return s&&(l.barycenter=o/s,l.weight=s),l}function xn(e,t,n){for(var r;t.length&&(r=O(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}function Sn(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}function Cn(e,t,n,r){var i=e.children(t),a=e.node(t),o=a?a.borderLeft:void 0,s=a?a.borderRight:void 0,c={};o&&(i=_(i,function(e){return e!==o&&e!==s}));var l=gn(e,i);S(l,function(t){if(e.children(t.v).length){var i=Cn(e,t.v,n,r);c[t.v]=i,Object.prototype.hasOwnProperty.call(i,`barycenter`)&&Tn(t,i)}});var u=_n(l,n);wn(u,c);var d=bn(u,r);if(o&&(d.vs=C([o,d.vs,s]),e.predecessors(o).length)){var f=e.node(e.predecessors(o)[0]),p=e.node(e.predecessors(s)[0]);Object.prototype.hasOwnProperty.call(d,`barycenter`)||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+f.order+p.order)/(d.weight+2),d.weight+=2}return d}function wn(e,t){S(e,function(e){e.vs=C(e.vs.map(function(e){return t[e]?t[e].vs:e}))})}function Tn(e,t){x(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}function En(e){var t=St(e),n=Dn(e,I(1,t+1),`inEdges`),r=Dn(e,I(t-1,-1,-1),`outEdges`),i=hn(e);kn(e,i);for(var a=1/0,o,s=0,c=0;c<4;++s,++c){On(s%2?n:r,s%4>=2),i=H(e);var l=pn(e,i);l<a&&(c=0,o=Se(i),a=l)}kn(e,o)}function Dn(e,t,n){return D(t,function(t){return dn(e,t,n)})}function On(e,t){var n=new k;S(e,function(e){var r=e.graph().root,i=Cn(e,r,n,t);S(i.vs,function(t,n){e.node(t).order=n}),un(e,n,i.vs)})}function kn(e,t){S(t,function(t){S(t,function(t,n){e.node(t).order=n})})}function An(e){var t=Mn(e);S(e.graph().dummyChains,function(n){for(var r=e.node(n),i=r.edgeObj,a=jn(e,t,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;n!==i.w;){if(r=e.node(n),u){for(;(l=o[c])!==s&&e.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&e.node(l=o[c+1]).minRank<=r.rank;)c++;l=o[c]}e.setParent(n,l),n=e.successors(n)[0]}})}function jn(e,t,n,r){var i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c=n,l;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function Mn(e){var t={},n=0;function r(i){var a=n;S(e.children(i),r),t[i]={low:a,lim:n++}}return S(e.children(),r),t}function Nn(e,t){var n={};function r(t,r){var i=0,a=0,o=t.length,s=O(r);return S(r,function(t,c){var l=Fn(e,t),u=l?e.node(l).order:o;(l||t===s)&&(S(r.slice(a,c+1),function(t){S(e.predecessors(t),function(r){var a=e.node(r),o=a.order;(o<i||u<o)&&!(a.dummy&&e.node(t).dummy)&&In(n,r,t)})}),a=c+1,i=u)}),r}return b(t,r),n}function Pn(e,t){var n={};function r(t,r,i,a,o){var s;S(I(r,i),function(r){s=t[r],e.node(s).dummy&&S(e.predecessors(s),function(t){var r=e.node(t);r.dummy&&(r.order<a||r.order>o)&&In(n,t,s)})})}function i(t,n){var i=-1,a,o=0;return S(n,function(s,c){if(e.node(s).dummy===`border`){var l=e.predecessors(s);l.length&&(a=e.node(l[0]).order,r(n,o,c,i,a),o=c,i=a)}r(n,o,n.length,a,t.length)}),n}return b(t,i),n}function Fn(e,t){if(e.node(t).dummy)return w(e.predecessors(t),function(t){return e.node(t).dummy})}function In(e,t,n){if(t>n){var r=t;t=n,n=r}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[t];Object.defineProperty(i,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Ln(e,t,n){if(t>n){var r=t;t=n,n=r}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],n)}function Rn(e,t,n,r){var i={},a={},o={};return S(t,function(e){S(e,function(e,t){i[e]=e,a[e]=e,o[e]=t})}),S(t,function(e){var t=-1;S(e,function(e){var s=r(e);if(s.length){s=L(s,function(e){return o[e]});for(var c=(s.length-1)/2,l=Math.floor(c),u=Math.ceil(c);l<=u;++l){var d=s[l];a[e]===e&&t<o[d]&&!Ln(n,e,d)&&(a[d]=e,a[e]=i[e]=i[d],t=o[d])}}})}),{root:i,align:a}}function zn(e,t,n,r,i){var a={},o=Bn(e,t,n,i),s=i?`borderLeft`:`borderRight`;function c(e,t){for(var n=o.nodes(),r=n.pop(),i={};r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}function l(e){a[e]=o.inEdges(e).reduce(function(e,t){return Math.max(e,a[t.v]+o.edge(t))},0)}function u(t){var n=o.outEdges(t).reduce(function(e,t){return Math.min(e,a[t.w]-o.edge(t))},1/0),r=e.node(t);n!==1/0&&r.borderType!==s&&(a[t]=Math.max(a[t],n))}return c(l,o.predecessors.bind(o)),c(u,o.successors.bind(o)),S(r,function(e){a[e]=a[n[e]]}),a}function Bn(e,t,n,r){var i=new k,a=e.graph(),o=Gn(a.nodesep,a.edgesep,r);return S(t,function(t){var r;S(t,function(t){var a=n[t];if(i.setNode(a),r){var s=n[r],c=i.edge(s,a);i.setEdge(s,a,Math.max(o(e,t,r),c||0))}r=t})}),i}function Vn(e,t){return M(y(t),function(t){var n=-1/0,r=1/0;return we(t,function(t,i){var a=Kn(e,i)/2;n=Math.max(t+a,n),r=Math.min(t-a,r)}),n-r})}function Hn(e,t){var n=y(t),r=E(n),i=j(n);S([`u`,`d`],function(n){S([`l`,`r`],function(a){var o=n+a,s=e[o],c;if(s!==t){var l=y(s);c=a===`l`?r-E(l):i-j(l),c&&(e[o]=A(s,function(e){return e+c}))}})})}function Un(e,t){return A(e.ul,function(n,r){if(t)return e[t.toLowerCase()][r];var i=L(D(e,r));return(i[1]+i[2])/2})}function Wn(t){var n=H(t),r=e(Nn(t,n),Pn(t,n)),i={},a;return S([`u`,`d`],function(e){a=e===`u`?n:y(n).reverse(),S([`l`,`r`],function(n){n===`r`&&(a=D(a,function(e){return y(e).reverse()}));var o=(e===`u`?t.predecessors:t.successors).bind(t),s=Rn(t,a,r,o),c=zn(t,a,s.root,s.align,n===`r`);n===`r`&&(c=A(c,function(e){return-e})),i[e+n]=c})}),Hn(i,Vn(t,i)),Un(i,t.graph().align)}function Gn(e,t,n){return function(r,i,a){var o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.prototype.hasOwnProperty.call(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2;break}if(l&&(c+=n?l:-l),l=0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.prototype.hasOwnProperty.call(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2;break}return l&&(c+=n?l:-l),l=0,c}}function Kn(e,t){return e.node(t).width}function qn(e){e=_t(e),Jn(e),Te(Wn(e),function(t,n){e.node(n).x=t})}function Jn(e){var t=H(e),n=e.graph().ranksep,r=0;S(t,function(t){var i=j(D(t,function(t){return e.node(t).height}));S(t,function(t){e.node(t).y=r+i/2}),r+=i+n})}function Yn(e,t){var n=t&&t.debugTiming?wt:Tt;n(`layout`,()=>{var t=n(` buildLayoutGraph`,()=>or(e));n(` runLayout`,()=>Xn(t,n)),n(` updateInputGraph`,()=>Zn(e,t))})}function Xn(e,t){t(` makeSpaceForEdgeLabels`,()=>sr(e)),t(` removeSelfEdges`,()=>gr(e)),t(` acyclic`,()=>pt(e)),t(` nestingGraph.run`,()=>an(e)),t(` rank`,()=>en(_t(e))),t(` injectEdgeLabelProxies`,()=>cr(e)),t(` removeEmptyRanks`,()=>bt(e)),t(` nestingGraph.cleanup`,()=>ln(e)),t(` normalizeRanks`,()=>yt(e)),t(` assignRankMinMax`,()=>lr(e)),t(` removeEdgeLabelProxies`,()=>ur(e)),t(` normalize.run`,()=>Nt(e)),t(` parentDummyChains`,()=>An(e)),t(` addBorderSegments`,()=>Et(e)),t(` order`,()=>En(e)),t(` insertSelfEdges`,()=>_r(e)),t(` adjustCoordinateSystem`,()=>Ot(e)),t(` position`,()=>qn(e)),t(` positionSelfEdges`,()=>vr(e)),t(` removeBorderNodes`,()=>hr(e)),t(` normalize.undo`,()=>Ft(e)),t(` fixupEdgeLabelCoords`,()=>pr(e)),t(` undoCoordinateSystem`,()=>kt(e)),t(` translateGraph`,()=>dr(e)),t(` assignNodeIntersects`,()=>fr(e)),t(` reversePoints`,()=>mr(e)),t(` acyclic.undo`,()=>ht(e))}function Zn(e,t){S(e.nodes(),function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))}),S(e.edges(),function(n){var r=e.edge(n),i=t.edge(n);r.points=i.points,Object.prototype.hasOwnProperty.call(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var Qn=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],$n={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},er=[`acyclicer`,`ranker`,`rankdir`,`align`],tr=[`width`,`height`],nr={width:0,height:0},rr=[`minlen`,`weight`,`width`,`height`,`labeloffset`],ir={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},ar=[`labelpos`];function or(t){var n=new k({multigraph:!0,compound:!0}),r=$(t.graph());return n.setGraph(e({},$n,Q(r,Qn),F(r,er))),S(t.nodes(),function(e){var r=$(t.node(e));n.setNode(e,fe(Q(r,tr),nr)),n.setParent(e,t.parent(e))}),S(t.edges(),function(r){var i=$(t.edge(r));n.setEdge(r,e({},ir,Q(i,rr),F(i,ar)))}),n}function sr(e){var t=e.graph();t.ranksep/=2,S(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function cr(e){S(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v);V(e,`edge-proxy`,{rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t},`_ep`)}})}function lr(e){var t=0;S(e.nodes(),function(n){var r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=j(t,r.maxRank))}),e.graph().maxRank=t}function ur(e){S(e.nodes(),function(t){var n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function dr(e){var t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(e){var a=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}S(e.nodes(),function(t){c(e.node(t))}),S(e.edges(),function(t){var n=e.edge(t);Object.prototype.hasOwnProperty.call(n,`x`)&&c(n)}),t-=o,r-=s,S(e.nodes(),function(n){var i=e.node(n);i.x-=t,i.y-=r}),S(e.edges(),function(n){var i=e.edge(n);S(i.points,function(e){e.x-=t,e.y-=r}),Object.prototype.hasOwnProperty.call(i,`x`)&&(i.x-=t),Object.prototype.hasOwnProperty.call(i,`y`)&&(i.y-=r)}),a.width=n-t+o,a.height=i-r+s}function fr(e){S(e.edges(),function(t){var n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(vt(r,a)),n.points.push(vt(i,o))})}function pr(e){S(e.edges(),function(t){var n=e.edge(t);if(Object.prototype.hasOwnProperty.call(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset;break}})}function mr(e){S(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function hr(e){S(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(O(n.borderLeft)),o=e.node(O(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),S(e.nodes(),function(t){e.node(t).dummy===`border`&&e.removeNode(t)})}function gr(e){S(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function _r(e){S(H(e),function(t){var n=0;S(t,function(t,r){var i=e.node(t);i.order=r+n,S(i.selfEdges,function(t){V(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,label:t.label},`_se`)}),delete i.selfEdges})})}function vr(e){S(e.nodes(),function(t){var n=e.node(t);if(n.dummy===`selfedge`){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function Q(e,t){return A(F(e,t),Number)}function $(e){var t={};return S(e,function(e,n){t[n.toLowerCase()]=e}),t}export{Yn as t};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{g as e,h as t}from"./src-B0URjIBy.js";import{b as n}from"./chunk-7R4GIKGN-B0Nk6xl6.js";import"./chunk-GEFDOKGD-D5eIWnuf.js";import"./chunk-MX3YWQON-FdgNOTEP.js";import{n as r}from"./chunk-YBOYWFTD-i-hva81G.js";import"./chunk-PQ6SQG4A-DB1drAIU.js";import"./chunk-PU5JKC2W-KA2MZku5.js";import{a as i,c as a,i as o,l as s,n as c,t as l,u}from"./chunk-KYZI473N-CXcIXlKo.js";import{a as d,i as f,n as p,r as m,t as h}from"./chunk-O4XLMI2P-n-oWchCV.js";import{r as g}from"./_baseUniq-BdCUZ9M5.js";import{s as _}from"./_basePickBy-yrdMoyRa.js";import{t as v}from"./dagre-4O7tL0je.js";import{t as y}from"./clone-CGkAhfYR.js";import{t as b}from"./graphlib-Bm7lcrUK.js";function x(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:S(e),edges:C(e)};return g(e.graph())||(t.value=y(e.graph())),t}function S(e){return _(e.nodes(),function(t){var n=e.node(t),r=e.parent(t),i={v:t};return g(n)||(i.value=n),g(r)||(i.parent=r),i})}function C(e){return _(e.edges(),function(t){var n=e.edge(t),r={v:t.v,w:t.w};return g(t.name)||(r.name=t.name),g(n)||(r.value=n),r})}var w=new Map,T=new Map,E=new Map,D=t(()=>{T.clear(),E.clear(),w.clear()},`clear`),O=t((t,n)=>{let r=T.get(n)||[];return e.trace(`In isDescendant`,n,` `,t,` = `,r.includes(t)),r.includes(t)},`isDescendant`),k=t((t,n)=>{let r=T.get(n)||[];return e.info(`Descendants of `,n,` is `,r),e.info(`Edge is `,t),t.v===n||t.w===n?!1:r?r.includes(t.v)||O(t.v,n)||O(t.w,n)||r.includes(t.w):(e.debug(`Tilt, `,n,`,not in descendants`),!1)},`edgeInCluster`),A=t((t,n,r,i)=>{e.warn(`Copying children of `,t,`root`,i,`data`,n.node(t),i);let a=n.children(t)||[];t!==i&&a.push(t),e.warn(`Copying (nodes) clusterId`,t,`nodes`,a),a.forEach(a=>{if(n.children(a).length>0)A(a,n,r,i);else{let o=n.node(a);e.info(`cp `,a,` to `,i,` with parent `,t),r.setNode(a,o),i!==n.parent(a)&&(e.warn(`Setting parent`,a,n.parent(a)),r.setParent(a,n.parent(a))),t!==i&&a!==t?(e.debug(`Setting parent`,a,t),r.setParent(a,t)):(e.info(`In copy `,t,`root`,i,`data`,n.node(t),i),e.debug(`Not Setting parent for node=`,a,`cluster!==rootId`,t!==i,`node!==clusterId`,a!==t));let s=n.edges(a);e.debug(`Copying Edges`,s),s.forEach(a=>{e.info(`Edge`,a);let o=n.edge(a.v,a.w,a.name);e.info(`Edge data`,o,i);try{k(a,i)?(e.info(`Copying as `,a.v,a.w,o,a.name),r.setEdge(a.v,a.w,o,a.name),e.info(`newGraph edges `,r.edges(),r.edge(r.edges()[0]))):e.info(`Skipping copy of edge `,a.v,`-->`,a.w,` rootId: `,i,` clusterId:`,t)}catch(t){e.error(t)}})}e.debug(`Removing node`,a),n.removeNode(a)})},`copy`),j=t((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)E.set(i,e),r=[...r,...j(i,t)];return r},`extractDescendants`),M=t((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),N=t((t,n,r)=>{let i=n.children(t);if(e.trace(`Searching children of id `,t,i),i.length<1)return t;let a;for(let e of i){let t=N(e,n,r),i=M(n,r,t);if(t)if(i.length>0)a=t;else return t}return a},`findNonClusterChild`),P=t(e=>!w.has(e)||!w.get(e).externalConnections?e:w.has(e)?w.get(e).id:e,`getAnchorId`),F=t((t,n)=>{if(!t||n>10){e.debug(`Opting out, no graph `);return}else e.debug(`Opting in, graph `);t.nodes().forEach(function(n){t.children(n).length>0&&(e.warn(`Cluster identified`,n,` Replacement id in edges: `,N(n,t,n)),T.set(n,j(n,t)),w.set(n,{id:N(n,t,n),clusterData:t.node(n)}))}),t.nodes().forEach(function(n){let r=t.children(n),i=t.edges();r.length>0?(e.debug(`Cluster identified`,n,T),i.forEach(t=>{O(t.v,n)^O(t.w,n)&&(e.warn(`Edge: `,t,` leaves cluster `,n),e.warn(`Descendants of XXX `,n,`: `,T.get(n)),w.get(n).externalConnections=!0)})):e.debug(`Not a cluster `,n,T)});for(let e of w.keys()){let n=w.get(e).id,r=t.parent(n);r!==e&&w.has(r)&&!w.get(r).externalConnections&&(w.get(e).id=r)}t.edges().forEach(function(n){let r=t.edge(n);e.warn(`Edge `+n.v+` -> `+n.w+`: `+JSON.stringify(n)),e.warn(`Edge `+n.v+` -> `+n.w+`: `+JSON.stringify(t.edge(n)));let i=n.v,a=n.w;if(e.warn(`Fix XXX`,w,`ids:`,n.v,n.w,`Translating: `,w.get(n.v),` --- `,w.get(n.w)),w.get(n.v)||w.get(n.w)){if(e.warn(`Fixing and trying - removing XXX`,n.v,n.w,n.name),i=P(n.v),a=P(n.w),t.removeEdge(n.v,n.w,n.name),i!==n.v){let e=t.parent(i);w.get(e).externalConnections=!0,r.fromCluster=n.v}if(a!==n.w){let e=t.parent(a);w.get(e).externalConnections=!0,r.toCluster=n.w}e.warn(`Fix Replacing with XXX`,i,a,n.name),t.setEdge(i,a,r,n.name)}}),e.warn(`Adjusted Graph`,x(t)),I(t,0),e.trace(w)},`adjustClustersAndEdges`),I=t((t,n)=>{if(e.warn(`extractor - `,n,x(t),t.children(`D`)),n>10){e.error(`Bailing out`);return}let r=t.nodes(),i=!1;for(let e of r){let n=t.children(e);i||=n.length>0}if(!i){e.debug(`Done, no node has children`,t.nodes());return}e.debug(`Nodes = `,r,n);for(let i of r)if(e.debug(`Extracting node`,i,w,w.has(i)&&!w.get(i).externalConnections,!t.parent(i),t.node(i),t.children(`D`),` Depth `,n),!w.has(i))e.debug(`Not a cluster`,i,n);else if(!w.get(i).externalConnections&&t.children(i)&&t.children(i).length>0){e.warn(`Cluster without external connections, without a parent and with children`,i,n);let r=t.graph().rankdir===`TB`?`LR`:`TB`;w.get(i)?.clusterData?.dir&&(r=w.get(i).clusterData.dir,e.warn(`Fixing dir`,w.get(i).clusterData.dir,r));let a=new b({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});e.warn(`Old graph before copy`,x(t)),A(i,t,a,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:w.get(i).clusterData,label:w.get(i).label,graph:a}),e.warn(`New graph after copy node: (`,i,`)`,x(a)),e.debug(`Old graph after copy`,x(t))}else e.warn(`Cluster ** `,i,` **not meeting the criteria !externalConnections:`,!w.get(i).externalConnections,` no parent: `,!t.parent(i),` children `,t.children(i)&&t.children(i).length>0,t.children(`D`),n),e.debug(w);r=t.nodes(),e.warn(`New list of nodes`,r);for(let i of r){let r=t.node(i);e.warn(` Now next level`,i,r),r?.clusterNode&&I(r.graph,n+1)}},`extractor`),L=t((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=L(e,e.children(t));n=[...n,...r]}),n},`sorter`),R=t(e=>L(e,e.children()),`sortNodesByHierarchy`),z=t(async(n,c,l,f,h,g)=>{e.warn(`Graph in recursive render:XAX`,x(c),h);let _=c.graph().rankdir;e.trace(`Dir in recursive render - dir:`,_);let y=n.insert(`g`).attr(`class`,`root`);c.nodes()?e.info(`Recursive render XXX`,c.nodes()):e.info(`No nodes found for`,c),c.edges().length>0&&e.info(`Recursive edges`,c.edge(c.edges()[0]));let b=y.insert(`g`).attr(`class`,`clusters`),S=y.insert(`g`).attr(`class`,`edgePaths`),C=y.insert(`g`).attr(`class`,`edgeLabels`),T=y.insert(`g`).attr(`class`,`nodes`);await Promise.all(c.nodes().map(async function(t){let n=c.node(t);if(h!==void 0){let n=JSON.parse(JSON.stringify(h.clusterData));e.trace(`Setting data for parent cluster XXX
|
|
2
|
+
Node.id = `,t,`
|
|
3
|
+
data=`,n.height,`
|
|
4
|
+
Parent cluster`,h.height),c.setNode(h.id,n),c.parent(t)||(e.trace(`Setting parent`,t,h.id),c.setParent(t,h.id,n))}if(e.info(`(Insert) Node XXX`+t+`: `+JSON.stringify(c.node(t))),n?.clusterNode){e.info(`Cluster identified XBX`,t,n.width,c.node(t));let{ranksep:r,nodesep:i}=c.graph();n.graph.setGraph({...n.graph.graph(),ranksep:r+25,nodesep:i});let a=await z(T,n.graph,l,f,c.node(t),g),o=a.elem;u(n,o),n.diff=a.diff||0,e.info(`New compound node after recursive render XAX`,t,`width`,n.width,`height`,n.height),s(o,n)}else c.children(t).length>0?(e.trace(`Cluster - the non recursive path XBX`,t,n.id,n,n.width,`Graph:`,c),e.trace(N(n.id,c)),w.set(n.id,{id:N(n.id,c),node:n})):(e.trace(`Node - the non recursive path XAX`,t,T,c.node(t),_),await i(T,c.node(t),{config:g,dir:_}))})),await t(async()=>{let t=c.edges().map(async function(t){let n=c.edge(t.v,t.w,t.name);e.info(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),e.info(`Edge `+t.v+` -> `+t.w+`: `,t,` `,JSON.stringify(c.edge(t))),e.info(`Fix`,w,`ids:`,t.v,t.w,`Translating: `,w.get(t.v),w.get(t.w)),await m(C,n)});await Promise.all(t)},`processEdges`)(),e.info(`Graph before layout:`,JSON.stringify(x(c))),e.info(`############################################# XXX`),e.info(`### Layout ### XXX`),e.info(`############################################# XXX`),v(c),e.info(`Graph after layout:`,JSON.stringify(x(c)));let E=0,{subGraphTitleTotalMargin:D}=r(g);return await Promise.all(R(c).map(async function(t){let n=c.node(t);if(e.info(`Position XBX => `+t+`: (`+n.x,`,`+n.y,`) width: `,n.width,` height: `,n.height),n?.clusterNode)n.y+=D,e.info(`A tainted cluster node XBX1`,t,n.id,n.width,n.height,n.x,n.y,c.parent(t)),w.get(n.id).node=n,a(n);else if(c.children(t).length>0){e.info(`A pure cluster node XBX1`,t,n.id,n.x,n.y,n.width,n.height,c.parent(t)),n.height+=D,c.node(n.parentId);let r=n?.padding/2||0,i=n?.labelBBox?.height||0,a=i-r||0;e.debug(`OffsetY`,a,`labelHeight`,i,`halfPadding`,r),await o(b,n),w.get(n.id).node=n}else{let t=c.node(n.parentId);n.y+=D/2,e.info(`A regular node XBX1 - using the padding`,n.id,`parent`,n.parentId,n.width,n.height,n.x,n.y,`offsetY`,n.offsetY,`parent`,t,t?.offsetY,n),a(n)}})),c.edges().forEach(function(t){let n=c.edge(t);e.info(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(n),n),n.points.forEach(e=>e.y+=D/2),d(n,p(S,n,w,l,c.node(t.v),c.node(t.w),f))}),c.nodes().forEach(function(t){let n=c.node(t);e.info(t,n.type,n.diff),n.isGroup&&(E=n.diff)}),e.warn(`Returning from recursive render XAX`,y,E),{elem:y,diff:E}},`recursiveRender`),B=t(async(t,r)=>{let i=new b({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.config?.flowchart?.nodeSpacing||t.nodeSpacing,ranksep:t.config?.rankSpacing||t.config?.flowchart?.rankSpacing||t.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=r.select(`g`);f(a,t.markers,t.type,t.diagramId),c(),h(),l(),D(),t.nodes.forEach(e=>{i.setNode(e.id,{...e}),e.parentId&&i.setParent(e.id,e.parentId)}),e.debug(`Edges:`,t.edges),t.edges.forEach(e=>{if(e.start===e.end){let t=e.start,n=t+`---`+t+`---1`,r=t+`---`+t+`---2`,a=i.node(t);i.setNode(n,{domId:n,id:n,parentId:a.parentId,labelStyle:``,label:``,padding:0,shape:`labelRect`,style:``,width:10,height:10}),i.setParent(n,a.parentId),i.setNode(r,{domId:r,id:r,parentId:a.parentId,labelStyle:``,padding:0,shape:`labelRect`,label:``,style:``,width:10,height:10}),i.setParent(r,a.parentId);let o=structuredClone(e),s=structuredClone(e),c=structuredClone(e);o.label=``,o.arrowTypeEnd=`none`,o.id=t+`-cyclic-special-1`,s.arrowTypeStart=`none`,s.arrowTypeEnd=`none`,s.id=t+`-cyclic-special-mid`,c.label=``,a.isGroup&&(o.fromCluster=t,c.toCluster=t),c.id=t+`-cyclic-special-2`,c.arrowTypeStart=`none`,i.setEdge(t,n,o,t+`-cyclic-special-0`),i.setEdge(n,r,s,t+`-cyclic-special-1`),i.setEdge(r,t,c,t+`-cyc<lic-special-2`)}else i.setEdge(e.start,e.end,{...e},e.id)}),e.warn(`Graph at first:`,JSON.stringify(x(i))),F(i),e.warn(`Graph after XAX:`,JSON.stringify(x(i)));let o=n();await z(a,i,t.type,t.diagramId,void 0,o)},`render`);export{B as render};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import{g as e,h as t,p as n}from"./src-B0URjIBy.js";import{B as r,C as i,V as a,W as o,_ as s,a as c,c as l,d as u,v as d,y as f}from"./chunk-7R4GIKGN-B0Nk6xl6.js";import{t as p}from"./ordinal-BffLatsF.js";import{t as m}from"./defaultLocale-DL4ssfbz.js";import{r as h}from"./chunk-GEFDOKGD-D5eIWnuf.js";import{i as g,n as _}from"./chunk-PQ6SQG4A-DB1drAIU.js";import{p as v}from"./index-DXEtzDAV.js";import{t as y}from"./chunk-4BX2VUAB-BMQY333L.js";import{t as b}from"./mermaid-parser.core-CCnSeR0B.js";import{t as x}from"./chunk-KX2RTZJC-yDo9-99g.js";function S(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function C(){return this.eachAfter(S)}function w(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function T(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function E(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function D(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function O(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function k(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function A(e){for(var t=this,n=j(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function j(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function M(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function N(){return Array.from(this)}function P(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function F(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*I(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function L(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=B)):t===void 0&&(t=z);for(var n=new U(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new U(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(H)}function R(){return L(this).eachBefore(V)}function z(e){return e.children}function B(e){return Array.isArray(e)?e[1]:null}function V(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function H(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function U(e){this.data=e,this.depth=this.height=0,this.parent=null}U.prototype=L.prototype={constructor:U,count:C,each:w,eachAfter:E,eachBefore:T,find:D,sum:O,sort:k,path:A,ancestors:M,descendants:N,leaves:P,links:F,copy:R,[Symbol.iterator]:I};function W(e){if(typeof e!=`function`)throw Error();return e}function G(){return 0}function K(e){return function(){return e}}function q(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function J(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++s<c;)o=a[s],o.y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*l}function ee(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(i-n)/e.value;++s<c;)o=a[s],o.x0=t,o.x1=r,o.y0=n,o.y1=n+=o.value*l}var te=(1+Math.sqrt(5))/2;function ne(e,t,n,r,i,a){for(var o=[],s=t.children,c,l,u=0,d=0,f=s.length,p,m,h=t.value,g,_,v,y,b,x,S;u<f;){p=i-n,m=a-r;do g=s[d++].value;while(!g&&d<f);for(_=v=g,x=Math.max(m/p,p/m)/(h*e),S=g*g*x,b=Math.max(v/S,S/_);d<f;++d){if(g+=l=s[d].value,l<_&&(_=l),l>v&&(v=l),S=g*g*x,y=Math.max(v/S,S/_),y>b){g-=l;break}b=y}o.push(c={value:g,dice:p<m,children:s.slice(u,d)}),c.dice?J(c,n,r,i,h?r+=m*g/h:a):ee(c,n,r,h?n+=p*g/h:i,a),h-=g,u=d}return o}var re=(function e(t){function n(e,n,r,i,a){ne(t,e,n,r,i,a)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n})(te);function ie(){var e=re,t=!1,n=1,r=1,i=[0],a=G,o=G,s=G,c=G,l=G;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(q),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,f=t.y1-n;d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),t.x0=r,t.y0=u,t.x1=d,t.y1=f,t.children&&(n=i[t.depth+1]=a(t)/2,r+=l(t)-n,u+=o(t)-n,d-=s(t)-n,f-=c(t)-n,d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),e(t,r,u,d,f))}return u.round=function(e){return arguments.length?(t=!!e,u):t},u.size=function(e){return arguments.length?(n=+e[0],r=+e[1],u):[n,r]},u.tile=function(t){return arguments.length?(e=W(t),u):e},u.padding=function(e){return arguments.length?u.paddingInner(e).paddingOuter(e):u.paddingInner()},u.paddingInner=function(e){return arguments.length?(a=typeof e==`function`?e:K(+e),u):a},u.paddingOuter=function(e){return arguments.length?u.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):u.paddingTop()},u.paddingTop=function(e){return arguments.length?(o=typeof e==`function`?e:K(+e),u):o},u.paddingRight=function(e){return arguments.length?(s=typeof e==`function`?e:K(+e),u):s},u.paddingBottom=function(e){return arguments.length?(c=typeof e==`function`?e:K(+e),u):c},u.paddingLeft=function(e){return arguments.length?(l=typeof e==`function`?e:K(+e),u):l},u}var Y=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=a,this.getAccTitle=d,this.setDiagramTitle=o,this.getDiagramTitle=i,this.getAccDescription=s,this.setAccDescription=r}static{t(this,`TreeMapDB`)}getNodes(){return this.nodes}getConfig(){let e=u,t=f();return h({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),t===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:``,children:this.outerNodes}}addClass(e,t){let n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},r=t.replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);r&&r.forEach(e=>{_(e)&&(n?.textStyles?n.textStyles.push(e):n.textStyles=[e]),n?.styles?n.styles.push(e):n.styles=[e]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){c(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function X(e){if(!e.length)return[];let t=[],n=[];return e.forEach(e=>{let r={name:e.name,children:e.type===`Leaf`?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=e.cssCompiledStyles),e.type===`Leaf`&&e.value!==void 0&&(r.value=e.value);n.length>0&&n[n.length-1].level>=e.level;)n.pop();if(n.length===0)t.push(r);else{let e=n[n.length-1].node;e.children?e.children.push(r):e.children=[r]}e.type!==`Leaf`&&n.push({node:r,level:e.level})}),t}t(X,`buildHierarchy`);var ae=t((e,n)=>{y(e,n);let r=[];for(let t of e.TreemapRows??[])t.$type===`ClassDefStatement`&&n.addClass(t.className??``,t.styleText??``);for(let t of e.TreemapRows??[]){let e=t.item;if(!e)continue;let i=t.indent?parseInt(t.indent):0,a=oe(e),o=e.classSelector?n.getStylesForClass(e.classSelector):[],s=o.length>0?o:void 0,c={level:i,name:a,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:s};r.push(c)}let i=X(r),a=t((e,t)=>{for(let r of e)n.addNode(r,t),r.children&&r.children.length>0&&a(r.children,t+1)},`addNodesRecursively`);a(i,0)},`populate`),oe=t(e=>e.name?String(e.name):``,`getItemName`),Z={parser:{yy:void 0},parse:t(async t=>{try{let n=await b(`treemap`,t);e.debug(`Treemap AST:`,n);let r=Z.parser?.yy;if(!(r instanceof Y))throw Error(`parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);ae(n,r)}catch(t){throw e.error(`Error parsing treemap:`,t),t}},`parse`)},se=10,Q=10,$=25,ce={draw:t((r,i,a,o)=>{let s=o.db,c=s.getConfig(),u=c.padding??se,d=s.getDiagramTitle(),h=s.getRoot(),{themeVariables:_}=f();if(!h)return;let y=d?30:0,b=v(i),S=c.nodeWidth?c.nodeWidth*Q:960,C=c.nodeHeight?c.nodeHeight*Q:500,w=S,T=C+y;b.attr(`viewBox`,`0 0 ${w} ${T}`),l(b,T,w,c.useMaxWidth);let E;try{let e=c.valueFormat||`,`;if(e===`$0,0`)E=t(e=>`$`+m(`,`)(e),`valueFormat`);else if(e.startsWith(`$`)&&e.includes(`,`)){let n=/\.\d+/.exec(e),r=n?n[0]:``;E=t(e=>`$`+m(`,`+r)(e),`valueFormat`)}else if(e.startsWith(`$`)){let n=e.substring(1);E=t(e=>`$`+m(n||``)(e),`valueFormat`)}else E=m(e)}catch(t){e.error(`Error creating format function:`,t),E=m(`,`)}let D=p().range([`transparent`,_.cScale0,_.cScale1,_.cScale2,_.cScale3,_.cScale4,_.cScale5,_.cScale6,_.cScale7,_.cScale8,_.cScale9,_.cScale10,_.cScale11]),O=p().range([`transparent`,_.cScalePeer0,_.cScalePeer1,_.cScalePeer2,_.cScalePeer3,_.cScalePeer4,_.cScalePeer5,_.cScalePeer6,_.cScalePeer7,_.cScalePeer8,_.cScalePeer9,_.cScalePeer10,_.cScalePeer11]),k=p().range([_.cScaleLabel0,_.cScaleLabel1,_.cScaleLabel2,_.cScaleLabel3,_.cScaleLabel4,_.cScaleLabel5,_.cScaleLabel6,_.cScaleLabel7,_.cScaleLabel8,_.cScaleLabel9,_.cScaleLabel10,_.cScaleLabel11]);d&&b.append(`text`).attr(`x`,w/2).attr(`y`,y/2).attr(`class`,`treemapTitle`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(d);let A=b.append(`g`).attr(`transform`,`translate(0, ${y})`).attr(`class`,`treemapContainer`),j=L(h).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),M=ie().size([S,C]).paddingTop(e=>e.children&&e.children.length>0?$+Q:0).paddingInner(u).paddingLeft(e=>e.children&&e.children.length>0?Q:0).paddingRight(e=>e.children&&e.children.length>0?Q:0).paddingBottom(e=>e.children&&e.children.length>0?Q:0).round(!0)(j),N=M.descendants().filter(e=>e.children&&e.children.length>0),P=A.selectAll(`.treemapSection`).data(N).enter().append(`g`).attr(`class`,`treemapSection`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,$).attr(`class`,`treemapSectionHeader`).attr(`fill`,`none`).attr(`fill-opacity`,.6).attr(`stroke-width`,.6).attr(`style`,e=>e.depth===0?`display: none;`:``),P.append(`clipPath`).attr(`id`,(e,t)=>`clip-section-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-12)).attr(`height`,$),P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,(e,t)=>`treemapSection section${t}`).attr(`fill`,e=>D(e.data.name)).attr(`fill-opacity`,.6).attr(`stroke`,e=>O(e.data.name)).attr(`stroke-width`,2).attr(`stroke-opacity`,.4).attr(`style`,e=>{if(e.depth===0)return`display: none;`;let t=g({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+`;`+t.borderStyles.join(`;`)}),P.append(`text`).attr(`class`,`treemapSectionLabel`).attr(`x`,6).attr(`y`,$/2).attr(`dominant-baseline`,`middle`).text(e=>e.depth===0?``:e.data.name).attr(`font-weight`,`bold`).attr(`style`,e=>e.depth===0?`display: none;`:`dominant-baseline: middle; font-size: 12px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+g({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).each(function(e){if(e.depth===0)return;let t=n(this),r=e.data.name;t.text(r);let i=e.x1-e.x0,a;a=c.showValues!==!1&&e.value?i-10-30-10-6:i-6-6;let o=Math.max(15,a),s=t.node();if(s.getComputedTextLength()>o){let e=r;for(;e.length>0;){if(e=r.substring(0,e.length-1),e.length===0){t.text(`...`),s.getComputedTextLength()>o&&t.text(``);break}if(t.text(e+`...`),s.getComputedTextLength()<=o)break}}}),c.showValues!==!1&&P.append(`text`).attr(`class`,`treemapSectionValue`).attr(`x`,e=>e.x1-e.x0-10).attr(`y`,$/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).text(e=>e.value?E(e.value):``).attr(`font-style`,`italic`).attr(`style`,e=>e.depth===0?`display: none;`:`text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+g({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`));let F=M.leaves(),I=A.selectAll(`.treemapLeafGroup`).data(F).enter().append(`g`).attr(`class`,(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:``}x`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);I.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,`treemapLeaf`).attr(`fill`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`style`,e=>g({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr(`fill-opacity`,.3).attr(`stroke`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`stroke-width`,3),I.append(`clipPath`).attr(`id`,(e,t)=>`clip-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-4)).attr(`height`,e=>Math.max(0,e.y1-e.y0-4)),I.append(`text`).attr(`class`,`treemapLabel`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,e=>(e.y1-e.y0)/2).attr(`style`,e=>`text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:`+k(e.data.name)+`;`+g({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.data.name).each(function(e){let t=n(this),r=e.x1-e.x0,i=e.y1-e.y0,a=t.node(),o=r-8,s=i-8;if(o<10||s<10){t.style(`display`,`none`);return}let c=parseInt(t.style(`font-size`),10),l=.6;for(;a.getComputedTextLength()>o&&c>8;)c--,t.style(`font-size`,`${c}px`);let u=Math.max(6,Math.min(28,Math.round(c*l))),d=c+2+u;for(;d>s&&c>8&&(c--,u=Math.max(6,Math.min(28,Math.round(c*l))),!(u<6&&c===8));)t.style(`font-size`,`${c}px`),d=c+2+u;t.style(`font-size`,`${c}px`),(a.getComputedTextLength()>o||c<8||s<c)&&t.style(`display`,`none`)}),c.showValues!==!1&&I.append(`text`).attr(`class`,`treemapValue`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,function(e){return(e.y1-e.y0)/2}).attr(`style`,e=>`text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:`+k(e.data.name)+`;`+g({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.value?E(e.value):``).each(function(e){let t=n(this),r=this.parentNode;if(!r){t.style(`display`,`none`);return}let i=n(r).select(`.treemapLabel`);if(i.empty()||i.style(`display`)===`none`){t.style(`display`,`none`);return}let a=parseFloat(i.style(`font-size`)),o=Math.max(6,Math.min(28,Math.round(a*.6)));t.style(`font-size`,`${o}px`);let s=(e.y1-e.y0)/2+a/2+2;t.attr(`y`,s);let c=e.x1-e.x0,l=e.y1-e.y0-4,u=c-8;t.node().getComputedTextLength()>u||s+o>l||o<6?t.style(`display`,`none`):t.style(`display`,null)}),x(b,c.diagramPadding??8,`flowchart`,c?.useMaxWidth||!1)},`draw`),getClasses:t(function(e,t){return t.db.getClasses()},`getClasses`)},le={sectionStrokeColor:`black`,sectionStrokeWidth:`1`,sectionFillColor:`#efefef`,leafStrokeColor:`black`,leafStrokeWidth:`1`,leafFillColor:`#efefef`,labelColor:`black`,labelFontSize:`12px`,valueFontSize:`10px`,valueColor:`black`,titleColor:`black`,titleFontSize:`14px`},ue={parser:Z,get db(){return new Y},renderer:ce,styles:t(({treemap:e}={})=>{let t=h(le,e);return`
|
|
2
|
+
.treemapNode.section {
|
|
3
|
+
stroke: ${t.sectionStrokeColor};
|
|
4
|
+
stroke-width: ${t.sectionStrokeWidth};
|
|
5
|
+
fill: ${t.sectionFillColor};
|
|
6
|
+
}
|
|
7
|
+
.treemapNode.leaf {
|
|
8
|
+
stroke: ${t.leafStrokeColor};
|
|
9
|
+
stroke-width: ${t.leafStrokeWidth};
|
|
10
|
+
fill: ${t.leafFillColor};
|
|
11
|
+
}
|
|
12
|
+
.treemapLabel {
|
|
13
|
+
fill: ${t.labelColor};
|
|
14
|
+
font-size: ${t.labelFontSize};
|
|
15
|
+
}
|
|
16
|
+
.treemapValue {
|
|
17
|
+
fill: ${t.valueColor};
|
|
18
|
+
font-size: ${t.valueFontSize};
|
|
19
|
+
}
|
|
20
|
+
.treemapTitle {
|
|
21
|
+
fill: ${t.titleColor};
|
|
22
|
+
font-size: ${t.titleFontSize};
|
|
23
|
+
}
|
|
24
|
+
`},`getStyles`)};export{ue as diagram};
|