@codragraph/cli 2.1.5 → 2.2.0-rc.6
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 +18 -13
- package/dist/cli/analyze.d.ts +9 -4
- package/dist/cli/analyze.js +37 -13
- package/dist/cli/graphpack.d.ts +48 -0
- package/dist/cli/graphpack.js +217 -0
- package/dist/cli/index.js +81 -3
- package/dist/cli/status.d.ts +1 -1
- package/dist/cli/status.js +8 -0
- package/dist/cli/tool.d.ts +11 -2
- package/dist/cli/tool.js +138 -8
- package/dist/core/adaptive-profile.d.ts +52 -0
- package/dist/core/adaptive-profile.js +180 -0
- package/dist/core/cgdb/cgdb-adapter.d.ts +34 -5
- package/dist/core/cgdb/cgdb-adapter.js +418 -5
- package/dist/core/cgdb/pool-adapter.js +1 -1
- package/dist/core/graphpack/index.d.ts +14 -0
- package/dist/core/graphpack/index.js +474 -0
- package/dist/core/graphpack/types.d.ts +129 -0
- package/dist/core/graphpack/types.js +4 -0
- package/dist/core/ingestion/pipeline-phases/parse-impl.js +3 -1
- package/dist/core/ingestion/pipeline-phases/structure.js +19 -3
- package/dist/core/ingestion/pipeline.d.ts +10 -0
- package/dist/core/run-analyze.d.ts +27 -2
- package/dist/core/run-analyze.js +598 -27
- package/dist/core/search/bm25-index.d.ts +19 -0
- package/dist/core/search/bm25-index.js +68 -29
- package/dist/core/semantic/relationships.d.ts +36 -0
- package/dist/core/semantic/relationships.js +261 -0
- package/dist/mcp/local/local-backend.js +48 -3
- package/dist/mcp/resources.js +125 -0
- package/dist/mcp/tools.js +105 -0
- package/dist/server/api.js +112 -0
- package/dist/storage/repo-manager.d.ts +29 -0
- package/dist/web/assets/agent-CQNZQ-hg.js +1139 -0
- package/dist/web/assets/architectureDiagram-UL44E2DR-B5_goS_i.js +36 -0
- package/dist/web/assets/blockDiagram-7IZFK4PR-D7ZAlDyv.js +132 -0
- package/dist/web/assets/{c4Diagram-DFAF54RM-C4Hl3J2U.js → c4Diagram-Y2BXMSZH-Djcgm_54.js} +1 -1
- package/dist/web/assets/{chunk-7RZVMHOQ-BitYcNVR.js → chunk-3SSMPTDK-Cv2Zy2FO.js} +1 -1
- package/dist/web/assets/{chunk-TBF5ZNIQ-DL5stGM1.js → chunk-6764PJDD-Cppb-jH-.js} +1 -1
- package/dist/web/assets/{chunk-KSICW3F5-BYzvDLNI.js → chunk-AZZRMDJM-BHlLC7p3.js} +1 -1
- package/dist/web/assets/{chunk-AEOMTBSW-BgTIXPsY.js → chunk-JQRUD6KW-3F8Zg-1N.js} +1 -1
- package/dist/web/assets/chunk-KRXBNO2N-C0mbN9a7.js +1 -0
- package/dist/web/assets/chunk-LCXTWHL2-BoiuJpIF.js +231 -0
- package/dist/web/assets/{chunk-O5ABG6QK-dHwHzA6n.js → chunk-LII3EMHJ-Dqq0Qguw.js} +1 -1
- package/dist/web/assets/chunk-RG4AUYOV-Bl5F_gDs.js +206 -0
- package/dist/web/assets/{chunk-TU3PZOEN-RLyvLcv-.js → chunk-T5OCTHI4-B2tIcggA.js} +1 -1
- package/dist/web/assets/chunk-W44A43WB-BHe37iN7.js +13 -0
- package/dist/web/assets/{chunk-RWUO3TPN-BgRTY0_k.js → chunk-ZXARS5L4-wcrIaQvY.js} +1 -1
- package/dist/web/assets/classDiagram-KGZ6W3CR-IbI6v_24.js +1 -0
- package/dist/web/assets/classDiagram-v2-72OJOZXJ-IbI6v_24.js +1 -0
- package/dist/web/assets/{cose-bilkent-PNC4W37J-DVhePRYg.js → cose-bilkent-UX7MHV2Q-BWr7v0Wr.js} +1 -1
- package/dist/web/assets/dagre-ND4H6XIP-De5LIh1B.js +4 -0
- package/dist/web/assets/diagram-3NCE3AQN-Dd22FSHy.js +43 -0
- package/dist/web/assets/diagram-GF46GFSD-Cev3THY8.js +24 -0
- package/dist/web/assets/diagram-HNR7UZ2L-D8Z8RQGs.js +3 -0
- package/dist/web/assets/diagram-QXG6HAR7-B8VOJOiE.js +24 -0
- package/dist/web/assets/diagram-WEQXMOUZ-va1bLoMD.js +10 -0
- package/dist/web/assets/{erDiagram-GCSMX5X6-C3dhDFA8.js → erDiagram-L5TCEMPS-B3_9uAoP.js} +5 -5
- package/dist/web/assets/{flowDiagram-OTCZ4VVT-CWSFWmhr.js → flowDiagram-H6V6AXG4-98m6maI1.js} +9 -9
- package/dist/web/assets/ganttDiagram-JCBTUEKG-vE2nzETb.js +292 -0
- package/dist/web/assets/gitGraphDiagram-S2ZK5IYY-DKc8uUg_.js +106 -0
- package/dist/web/assets/index-BAhe1HSk.css +1 -0
- package/dist/web/assets/index-VTKdaklA.js +1415 -0
- package/dist/web/assets/infoDiagram-3YFTVSEB-DYP-Srzx.js +2 -0
- package/dist/web/assets/{ishikawaDiagram-YMYX4NHK-DUoJvNP2.js → ishikawaDiagram-BNXS4ZKH-QZnkpmmb.js} +3 -3
- package/dist/web/assets/{journeyDiagram-SO5T7YLQ-RMFPNNqz.js → journeyDiagram-M6C3CM3L-B5ojIuqu.js} +1 -1
- package/dist/web/assets/{kanban-definition-LJHFXRCJ-BzpDs1K9.js → kanban-definition-75IXJCU3-BJA8liRR.js} +4 -4
- package/dist/web/assets/{katex-GD7MH7QM-DBQvrix-.js → katex-K3KEBU37-DUqZiCRL.js} +1 -1
- package/dist/web/assets/mindmap-definition-2TDM6QVE-BQj5yylD.js +96 -0
- package/dist/web/assets/pieDiagram-CU6KROY3-4eSrPiQz.js +30 -0
- package/dist/web/assets/quadrantDiagram-VICAPDV7-PzxN8j55.js +7 -0
- package/dist/web/assets/{requirementDiagram-M5DCFWZL-DLHOVTSv.js → requirementDiagram-JXO7QTGE-CtplTc5y.js} +2 -2
- package/dist/web/assets/sankeyDiagram-URQDO5SZ-CoSgvkxv.js +40 -0
- package/dist/web/assets/sequenceDiagram-VS2MUI6T-D7ygyXvJ.js +162 -0
- package/dist/web/assets/stateDiagram-7D4R322I-v01gvwji.js +1 -0
- package/dist/web/assets/stateDiagram-v2-36443NZ5-DFD2b8_x.js +1 -0
- package/dist/web/assets/{timeline-definition-5SPVSISX-TRSDRgPw.js → timeline-definition-O6YCAMPW-CTI3M65J.js} +4 -4
- package/dist/web/assets/{vennDiagram-IE5QUKF5-DNy7HRBM.js → vennDiagram-MWXL3ELB-RnB0XMP7.js} +6 -6
- package/dist/web/assets/wardley-L42UT6IY-5TKZOOLJ-C-ZcgEBb.js +173 -0
- package/dist/web/assets/wardleyDiagram-CUQ6CDDI-EwRi4kwo.js +78 -0
- package/dist/web/assets/{xychartDiagram-ZHJ5623Y-Dr9r7a35.js → xychartDiagram-N2JHSOCM-DA38II6y.js} +4 -4
- package/dist/web/index.html +2 -2
- package/package.json +2 -2
- package/vendor/node_modules/node-addon-api/node_addon_api_except.stamp +0 -0
- package/dist/web/assets/agent-D5lb0zXz.js +0 -1089
- package/dist/web/assets/architectureDiagram-EMZXCZ2Q-CZtc99v_.js +0 -36
- package/dist/web/assets/blockDiagram-IGV67L2C-BtoUp-6Y.js +0 -132
- package/dist/web/assets/chunk-3GS5O3IE-DkUjU0WD.js +0 -231
- package/dist/web/assets/chunk-3YCYZ6SJ-CQkVgT_z.js +0 -1
- package/dist/web/assets/chunk-H3VCZNTA-Cx5XV_aC.js +0 -13
- package/dist/web/assets/chunk-HN6EAY2L-BBnyTNdB.js +0 -1
- package/dist/web/assets/chunk-PK6DOVAG-CvsEnugt.js +0 -206
- package/dist/web/assets/classDiagram-PPOCWD7C-DTr8QIOf.js +0 -1
- package/dist/web/assets/classDiagram-v2-23LJLIIU-DTr8QIOf.js +0 -1
- package/dist/web/assets/dagre-E77IOHMT-Dzx0A6ZU.js +0 -4
- package/dist/web/assets/diagram-H7BISOXX-CC9pRew1.js +0 -43
- package/dist/web/assets/diagram-JC5VWROH-Bau_i9tf.js +0 -24
- package/dist/web/assets/diagram-LXUTUG65-D9_FM2Gt.js +0 -10
- package/dist/web/assets/diagram-WEHSV5V5-BMlayouL.js +0 -24
- package/dist/web/assets/ganttDiagram-MUNLMDZQ-D3a67Yol.js +0 -292
- package/dist/web/assets/gitGraphDiagram-3HKGZ4G3-7jmry-vM.js +0 -106
- package/dist/web/assets/index-BgeqpYgd.js +0 -1415
- package/dist/web/assets/index-CT0GtFLZ.css +0 -1
- package/dist/web/assets/infoDiagram-MN7RKWGX-G7lhP0Ib.js +0 -2
- package/dist/web/assets/mindmap-definition-2EUWGEK5-Bk0O4roa.js +0 -96
- package/dist/web/assets/pieDiagram-3IATQBI2-DKU7kpgS.js +0 -30
- package/dist/web/assets/quadrantDiagram-E256RVCF-BY0TGWCS.js +0 -7
- package/dist/web/assets/sankeyDiagram-L3NBLAOT-DVMj5rX2.js +0 -10
- package/dist/web/assets/sequenceDiagram-ZOUHS735-CJC73bV-.js +0 -157
- package/dist/web/assets/stateDiagram-MLPALWAM-BCFyESls.js +0 -1
- package/dist/web/assets/stateDiagram-v2-B5LQ5ZB2-DahzzIca.js +0 -1
- package/dist/web/assets/wardley-RL74JXVD-BCRCBASE-B-eZEzf9.js +0 -161
- package/dist/web/assets/wardleyDiagram-XU3VSMPF-BP-r1xzR.js +0 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m,i as e}from"./index-
|
|
1
|
+
import{m,i as e}from"./index-VTKdaklA.js";var r=m((o,t)=>{let a;return t==="sandbox"&&(a=e("#i"+o)),(t==="sandbox"?e(a.nodes()[0].contentDocument.body):e("body")).select(`[id="${o}"]`)},"getDiagramElement");export{r as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m}from"./index-
|
|
1
|
+
import{m}from"./index-VTKdaklA.js";function r(t,c){var a,o,l;t.accDescr&&((a=c.setAccDescription)==null||a.call(c,t.accDescr)),t.accTitle&&((o=c.setAccTitle)==null||o.call(c,t.accTitle)),t.title&&((l=c.setDiagramTitle)==null||l.call(c,t.title))}m(r,"populateCommonDb");export{r as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as f,H as y,I as X,e as Y,R as ot,P as x,a as D,T as A,b as ie,t as m,s as O,u as b,j as C,m as Ne,L as Ee,M as R,c as ae,d as rt,Q as ue,F as T,K as I,B as q,f as it,h as j,g as at,o as ut,i as dt,V as st,l as ct}from"./chunk-W44A43WB-BHe37iN7.js";import{m as d}from"./index-VTKdaklA.js";function E(e,n,t,o){var r;do r=ie(o);while(e.hasNode(r));return t.dummy=n,e.setNode(r,t),r}d(E,"addDummyNode");function Oe(e){var n=new y().setGraph(e.graph());return f(e.nodes(),function(t){n.setNode(t,e.node(t))}),f(e.edges(),function(t){var o=n.edge(t.v,t.w)||{weight:0,minlen:1},r=e.edge(t);n.setEdge(t.v,t.w,{weight:o.weight+r.weight,minlen:Math.max(o.minlen,r.minlen)})}),n}d(Oe,"simplify");function de(e){var n=new y({multigraph:e.isMultigraph()}).setGraph(e.graph());return f(e.nodes(),function(t){e.children(t).length||n.setNode(t,e.node(t))}),f(e.edges(),function(t){n.setEdge(t,e.edge(t))}),n}d(de,"asNonCompoundGraph");function K(e,n){var t=e.x,o=e.y,r=n.x-t,i=n.y-o,a=e.width/2,u=e.height/2;if(!r&&!i)throw new Error("Not possible to find intersection inside of the rectangle");var s,c;return Math.abs(i)*a>Math.abs(r)*u?(i<0&&(u=-u),s=u*r/i,c=u):(r<0&&(a=-a),s=a,c=a*i/r),{x:t+s,y:o+c}}d(K,"intersectRect");function M(e){var n=m(O(se(e)+1),function(){return[]});return f(e.nodes(),function(t){var o=e.node(t),r=o.rank;b(r)||(n[r][o.order]=t)}),n}d(M,"buildLayerMatrix");function Ie(e){var n=C(m(e.nodes(),function(t){return e.node(t).rank}));f(e.nodes(),function(t){var o=e.node(t);Ne(o,"rank")&&(o.rank-=n)})}d(Ie,"normalizeRanks");function Pe(e){var n=C(m(e.nodes(),function(i){return e.node(i).rank})),t=[];f(e.nodes(),function(i){var a=e.node(i).rank-n;t[a]||(t[a]=[]),t[a].push(i)});var o=0,r=e.graph().nodeRankFactor;f(t,function(i,a){b(i)&&a%r!==0?--o:o&&f(i,function(u){e.node(u).rank+=o})})}d(Pe,"removeEmptyRanks");function J(e,n,t,o){var r={width:0,height:0};return arguments.length>=4&&(r.rank=t,r.order=o),E(e,"border",r,n)}d(J,"addBorderNode");function se(e){return x(m(e.nodes(),function(n){var t=e.node(n).rank;if(!b(t))return t}))}d(se,"maxRank");function Le(e,n){var t={lhs:[],rhs:[]};return f(e,function(o){n(o)?t.lhs.push(o):t.rhs.push(o)}),t}d(Le,"partition");function Ce(e,n){var t=Ee();try{return n()}finally{console.log(e+" time: "+(Ee()-t)+"ms")}}d(Ce,"time");function _e(e,n){return n()}d(_e,"notime");function Re(e){function n(t){var o=e.children(t),r=e.node(t);if(o.length&&f(o,n),Object.prototype.hasOwnProperty.call(r,"minRank")){r.borderLeft=[],r.borderRight=[];for(var i=r.minRank,a=r.maxRank+1;i<a;++i)Q(e,"borderLeft","_bl",t,r,i),Q(e,"borderRight","_br",t,r,i)}}d(n,"dfs"),f(e.children(),n)}d(Re,"addBorderSegments");function Q(e,n,t,o,r,i){var a={width:0,height:0,rank:i,borderType:n},u=r[n][i-1],s=E(e,"border",a,t);r[n][i]=s,e.setParent(s,o),u&&e.setEdge(u,s,{weight:1})}d(Q,"addBorderNode");function Te(e){var n=e.graph().rankdir.toLowerCase();(n==="lr"||n==="rl")&&ce(e)}d(Te,"adjust");function je(e){var n=e.graph().rankdir.toLowerCase();(n==="bt"||n==="rl")&&Me(e),(n==="lr"||n==="rl")&&(Se(e),ce(e))}d(je,"undo");function ce(e){f(e.nodes(),function(n){U(e.node(n))}),f(e.edges(),function(n){U(e.edge(n))})}d(ce,"swapWidthHeight");function U(e){var n=e.width;e.width=e.height,e.height=n}d(U,"swapWidthHeightOne");function Me(e){f(e.nodes(),function(n){S(e.node(n))}),f(e.edges(),function(n){var t=e.edge(n);f(t.points,S),Object.prototype.hasOwnProperty.call(t,"y")&&S(t)})}d(Me,"reverseY");function S(e){e.y=-e.y}d(S,"reverseYOne");function Se(e){f(e.nodes(),function(n){B(e.node(n))}),f(e.edges(),function(n){var t=e.edge(n);f(t.points,B),Object.prototype.hasOwnProperty.call(t,"x")&&B(t)})}d(Se,"swapXY");function B(e){var n=e.x;e.x=e.y,e.y=n}d(B,"swapXYOne");var N,ft=(N=class{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,t=n._prev;if(t!==n)return Z(t),t}enqueue(n){var t=this._sentinel;n._prev&&n._next&&Z(n),n._next=t._next,t._next._prev=n,t._next=n,n._prev=t}toString(){for(var n=[],t=this._sentinel,o=t._prev;o!==t;)n.push(JSON.stringify(o,Be)),o=o._prev;return"["+n.join(", ")+"]"}},d(N,"List"),N);function Z(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}d(Z,"unlink");function Be(e,n){if(e!=="_next"&&e!=="_prev")return n}d(Be,"filterOutLinks");var ht=st(1);function Fe(e,n){if(e.nodeCount()<=1)return[];var t=Ve(e,n||ht),o=Ge(t.graph,t.buckets,t.zeroIdx);return R(m(o,function(r){return e.outEdges(r.v,r.w)}))}d(Fe,"greedyFAS");function Ge(e,n,t){for(var o=[],r=n[n.length-1],i=n[0],a;e.nodeCount();){for(;a=i.dequeue();)F(e,n,t,a);for(;a=r.dequeue();)F(e,n,t,a);if(e.nodeCount()){for(var u=n.length-2;u>0;--u)if(a=n[u].dequeue(),a){o=o.concat(F(e,n,t,a,!0));break}}}return o}d(Ge,"doGreedyFAS");function F(e,n,t,o,r){var i=r?[]:void 0;return f(e.inEdges(o.v),function(a){var u=e.edge(a),s=e.node(a.v);r&&i.push({v:a.v,w:a.w}),s.out-=u,z(n,t,s)}),f(e.outEdges(o.v),function(a){var u=e.edge(a),s=a.w,c=e.node(s);c.in-=u,z(n,t,c)}),e.removeNode(o.v),i}d(F,"removeNode");function Ve(e,n){var t=new y,o=0,r=0;f(e.nodes(),function(u){t.setNode(u,{v:u,in:0,out:0})}),f(e.edges(),function(u){var s=t.edge(u.v,u.w)||0,c=n(u),h=s+c;t.setEdge(u.v,u.w,h),r=Math.max(r,t.node(u.v).out+=c),o=Math.max(o,t.node(u.w).in+=c)});var i=O(r+o+3).map(function(){return new ft}),a=o+1;return f(t.nodes(),function(u){z(i,a,t.node(u))}),{graph:t,buckets:i,zeroIdx:a}}d(Ve,"buildState");function z(e,n,t){t.out?t.in?e[t.out-t.in+n].enqueue(t):e[e.length-1].enqueue(t):e[0].enqueue(t)}d(z,"assignBucket");function Ye(e){var n=e.graph().acyclicer==="greedy"?Fe(e,t(e)):De(e);f(n,function(o){var r=e.edge(o);e.removeEdge(o),r.forwardName=o.name,r.reversed=!0,e.setEdge(o.w,o.v,r,ie("rev"))});function t(o){return function(r){return o.edge(r).weight}}d(t,"weightFn")}d(Ye,"run");function De(e){var n=[],t={},o={};function r(i){Object.prototype.hasOwnProperty.call(o,i)||(o[i]=!0,t[i]=!0,f(e.outEdges(i),function(a){Object.prototype.hasOwnProperty.call(t,a.w)?n.push(a):r(a.w)}),delete t[i])}return d(r,"dfs"),f(e.nodes(),r),n}d(De,"dfsFAS");function ze(e){f(e.edges(),function(n){var t=e.edge(n);if(t.reversed){e.removeEdge(n);var o=t.forwardName;delete t.reversed,delete t.forwardName,e.setEdge(n.w,n.v,t,o)}})}d(ze,"undo");function Ae(e){e.graph().dummyChains=[],f(e.edges(),function(n){qe(e,n)})}d(Ae,"run");function qe(e,n){var t=n.v,o=e.node(t).rank,r=n.w,i=e.node(r).rank,a=n.name,u=e.edge(n),s=u.labelRank;if(i!==o+1){e.removeEdge(n);var c=void 0,h,g;for(g=0,++o;o<i;++g,++o)u.points=[],c={width:0,height:0,edgeLabel:u,edgeObj:n,rank:o},h=E(e,"edge",c,"_d"),o===s&&(c.width=u.width,c.height=u.height,c.dummy="edge-label",c.labelpos=u.labelpos),e.setEdge(t,h,{weight:u.weight},a),g===0&&e.graph().dummyChains.push(h),t=h;e.setEdge(t,r,{weight:u.weight},a)}}d(qe,"normalizeEdge");function He(e){f(e.graph().dummyChains,function(n){var t=e.node(n),o=t.edgeLabel,r;for(e.setEdge(t.edgeObj,o);t.dummy;)r=e.successors(n)[0],e.removeNode(n),o.points.push({x:t.x,y:t.y}),t.dummy==="edge-label"&&(o.x=t.x,o.y=t.y,o.width=t.width,o.height=t.height),n=r,t=e.node(n)})}d(He,"undo");function H(e){var n={};function t(o){var r=e.node(o);if(Object.prototype.hasOwnProperty.call(n,o))return r.rank;n[o]=!0;var i=C(m(e.outEdges(o),function(a){return t(a.w)-e.edge(a).minlen}));return(i===Number.POSITIVE_INFINITY||i===void 0||i===null)&&(i=0),r.rank=i}d(t,"dfs"),f(e.sources(),t)}d(H,"longestPath");function P(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}d(P,"slack");function fe(e){var n=new y({directed:!1}),t=e.nodes()[0],o=e.nodeCount();n.setNode(t,{});for(var r,i;We(n,e)<o;)r=$e(n,e),i=n.hasNode(r.v)?P(e,r):-P(e,r),Xe(n,e,i);return n}d(fe,"feasibleTree");function We(e,n){function t(o){f(n.nodeEdges(o),function(r){var i=r.v,a=o===i?r.w:i;!e.hasNode(a)&&!P(n,r)&&(e.setNode(a,{}),e.setEdge(o,a,{}),t(a))})}return d(t,"dfs"),f(e.nodes(),t),e.nodeCount()}d(We,"tightTree");function $e(e,n){return ae(n.edges(),function(t){if(e.hasNode(t.v)!==e.hasNode(t.w))return P(n,t)})}d($e,"findMinSlackEdge");function Xe(e,n,t){f(e.nodes(),function(o){n.node(o).rank+=t})}d(Xe,"shiftRanks");Ke.CycleException=_;function Ke(e){var n={},t={},o=[];function r(i){if(Object.prototype.hasOwnProperty.call(t,i))throw new _;Object.prototype.hasOwnProperty.call(n,i)||(t[i]=!0,n[i]=!0,f(e.predecessors(i),r),delete t[i],o.push(i))}if(d(r,"visit"),f(e.sinks(),r),rt(n)!==e.nodeCount())throw new _;return o}d(Ke,"topsort");function _(){}d(_,"CycleException");_.prototype=new Error;function he(e,n,t){ct(n)||(n=[n]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),r=[],i={};return f(n,function(a){if(!e.hasNode(a))throw new Error("Graph does not have node: "+a);ge(e,a,t==="post",i,o,r)}),r}d(he,"dfs");function ge(e,n,t,o,r,i){Object.prototype.hasOwnProperty.call(o,n)||(o[n]=!0,t||i.push(n),f(r(n),function(a){ge(e,a,t,o,r,i)}),t&&i.push(n))}d(ge,"doDfs");function Je(e,n){return he(e,n,"post")}d(Je,"postorder");function Qe(e,n){return he(e,n,"pre")}d(Qe,"preorder");k.initLowLimValues=$;k.initCutValues=W;k.calcCutValue=le;k.leaveEdge=ve;k.enterEdge=me;k.exchangeEdges=we;function k(e){e=Oe(e),H(e);var n=fe(e);$(n),W(n,e);for(var t,o;t=ve(n);)o=me(n,e,t),we(n,e,t,o)}d(k,"networkSimplex");function W(e,n){var t=Je(e,e.nodes());t=t.slice(0,t.length-1),f(t,function(o){Ue(e,n,o)})}d(W,"initCutValues");function Ue(e,n,t){var o=e.node(t),r=o.parent;e.edge(t,r).cutvalue=le(e,n,t)}d(Ue,"assignCutValue");function le(e,n,t){var o=e.node(t),r=o.parent,i=!0,a=n.edge(t,r),u=0;return a||(i=!1,a=n.edge(r,t)),u=a.weight,f(n.nodeEdges(t),function(s){var c=s.v===t,h=c?s.w:s.v;if(h!==r){var g=c===i,l=n.edge(s).weight;if(u+=g?l:-l,en(e,t,h)){var p=e.edge(t,h).cutvalue;u+=g?-p:p}}}),u}d(le,"calcCutValue");function $(e,n){arguments.length<2&&(n=e.nodes()[0]),pe(e,{},1,n)}d($,"initLowLimValues");function pe(e,n,t,o,r){var i=t,a=e.node(o);return n[o]=!0,f(e.neighbors(o),function(u){Object.prototype.hasOwnProperty.call(n,u)||(t=pe(e,n,t,u,o))}),a.low=i,a.lim=t++,r?a.parent=r:delete a.parent,t}d(pe,"dfsAssignLowLim");function ve(e){return ue(e.edges(),function(n){return e.edge(n).cutvalue<0})}d(ve,"leaveEdge");function me(e,n,t){var o=t.v,r=t.w;n.hasEdge(o,r)||(o=t.w,r=t.v);var i=e.node(o),a=e.node(r),u=i,s=!1;i.lim>a.lim&&(u=a,s=!0);var c=T(n.edges(),function(h){return s===ee(e,e.node(h.v),u)&&s!==ee(e,e.node(h.w),u)});return ae(c,function(h){return P(n,h)})}d(me,"enterEdge");function we(e,n,t,o){var r=t.v,i=t.w;e.removeEdge(r,i),e.setEdge(o.v,o.w,{}),$(e),W(e,n),Ze(e,n)}d(we,"exchangeEdges");function Ze(e,n){var t=ue(e.nodes(),function(r){return!n.node(r).parent}),o=Qe(e,t);o=o.slice(1),f(o,function(r){var i=e.node(r).parent,a=n.edge(r,i),u=!1;a||(a=n.edge(i,r),u=!0),n.node(r).rank=n.node(i).rank+(u?a.minlen:-a.minlen)})}d(Ze,"updateRanks");function en(e,n,t){return e.hasEdge(n,t)}d(en,"isTreeEdge");function ee(e,n,t){return t.low<=n.lim&&n.lim<=t.lim}d(ee,"isDescendant");function nn(e){switch(e.graph().ranker){case"network-simplex":ne(e);break;case"tight-tree":tn(e);break;case"longest-path":gt(e);break;default:ne(e)}}d(nn,"rank");var gt=H;function tn(e){H(e),fe(e)}d(tn,"tightTreeRanker");function ne(e){k(e)}d(ne,"networkSimplexRanker");function on(e){var n=E(e,"root",{},"_root"),t=rn(e),o=x(I(t))-1,r=2*o+1;e.graph().nestingRoot=n,f(e.edges(),function(a){e.edge(a).minlen*=r});var i=an(e)+1;f(e.children(),function(a){be(e,n,r,i,o,t,a)}),e.graph().nodeRankFactor=r}d(on,"run");function be(e,n,t,o,r,i,a){var u=e.children(a);if(!u.length){a!==n&&e.setEdge(n,a,{weight:0,minlen:t});return}var s=J(e,"_bt"),c=J(e,"_bb"),h=e.node(a);e.setParent(s,a),h.borderTop=s,e.setParent(c,a),h.borderBottom=c,f(u,function(g){be(e,n,t,o,r,i,g);var l=e.node(g),p=l.borderTop?l.borderTop:g,v=l.borderBottom?l.borderBottom:g,w=l.borderTop?o:2*o,L=p!==v?1:r-i[a]+1;e.setEdge(s,p,{weight:w,minlen:L,nestingEdge:!0}),e.setEdge(v,c,{weight:w,minlen:L,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,s,{weight:0,minlen:r+i[a]})}d(be,"dfs");function rn(e){var n={};function t(o,r){var i=e.children(o);i&&i.length&&f(i,function(a){t(a,r+1)}),n[o]=r}return d(t,"dfs"),f(e.children(),function(o){t(o,1)}),n}d(rn,"treeDepths");function an(e){return q(e.edges(),function(n,t){return n+e.edge(t).weight},0)}d(an,"sumWeights");function un(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,f(e.edges(),function(t){var o=e.edge(t);o.nestingEdge&&e.removeEdge(t)})}d(un,"cleanup");function dn(e,n,t){var o={},r;f(t,function(i){for(var a=e.parent(i),u,s;a;){if(u=e.parent(a),u?(s=o[u],o[u]=a):(s=r,r=a),s&&s!==a){n.setEdge(s,a);return}a=u}})}d(dn,"addSubgraphConstraints");function sn(e,n,t){var o=cn(e),r=new y({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(i){return e.node(i)});return f(e.nodes(),function(i){var a=e.node(i),u=e.parent(i);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(r.setNode(i),r.setParent(i,u||o),f(e[t](i),function(s){var c=s.v===i?s.w:s.v,h=r.edge(c,i),g=b(h)?0:h.weight;r.setEdge(c,i,{weight:e.edge(s).weight+g})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&r.setNode(i,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))}),r}d(sn,"buildLayerGraph");function cn(e){for(var n;e.hasNode(n=ie("_root")););return n}d(cn,"createRootNode");function fn(e,n){for(var t=0,o=1;o<n.length;++o)t+=hn(e,n[o-1],n[o]);return t}d(fn,"crossCount");function hn(e,n,t){for(var o=it(t,m(t,function(c,h){return h})),r=R(m(n,function(c){return j(m(e.outEdges(c),function(h){return{pos:o[h.w],weight:e.edge(h).weight}}),"pos")})),i=1;i<t.length;)i<<=1;var a=2*i-1;i-=1;var u=m(new Array(a),function(){return 0}),s=0;return f(r.forEach(function(c){var h=c.pos+i;u[h]+=c.weight;for(var g=0;h>0;)h%2&&(g+=u[h+1]),h=h-1>>1,u[h]+=c.weight;s+=c.weight*g})),s}d(hn,"twoLayerCrossCount");function gn(e){var n={},t=T(e.nodes(),function(u){return!e.children(u).length}),o=x(m(t,function(u){return e.node(u).rank})),r=m(O(o+1),function(){return[]});function i(u){if(!Ne(n,u)){n[u]=!0;var s=e.node(u);r[s.rank].push(u),f(e.successors(u),i)}}d(i,"dfs");var a=j(t,function(u){return e.node(u).rank});return f(a,i),r}d(gn,"initOrder");function ln(e,n){return m(n,function(t){var o=e.inEdges(t);if(o.length){var r=q(o,function(i,a){var u=e.edge(a),s=e.node(a.v);return{sum:i.sum+u.weight*s.order,weight:i.weight+u.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}else return{v:t}})}d(ln,"barycenter");function pn(e,n){var t={};f(e,function(r,i){var a=t[r.v]={indegree:0,in:[],out:[],vs:[r.v],i};b(r.barycenter)||(a.barycenter=r.barycenter,a.weight=r.weight)}),f(n.edges(),function(r){var i=t[r.v],a=t[r.w];!b(i)&&!b(a)&&(a.indegree++,i.out.push(t[r.w]))});var o=T(t,function(r){return!r.indegree});return vn(o)}d(pn,"resolveConflicts");function vn(e){var n=[];function t(i){return function(a){a.merged||(b(a.barycenter)||b(i.barycenter)||a.barycenter>=i.barycenter)&&mn(i,a)}}d(t,"handleIn");function o(i){return function(a){a.in.push(i),--a.indegree===0&&e.push(a)}}for(d(o,"handleOut");e.length;){var r=e.pop();n.push(r),f(r.in.reverse(),t(r)),f(r.out,o(r))}return m(T(n,function(i){return!i.merged}),function(i){return Y(i,["vs","i","barycenter","weight"])})}d(vn,"doResolveConflicts");function mn(e,n){var t=0,o=0;e.weight&&(t+=e.barycenter*e.weight,o+=e.weight),n.weight&&(t+=n.barycenter*n.weight,o+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=t/o,e.weight=o,e.i=Math.min(n.i,e.i),n.merged=!0}d(mn,"mergeEntries");function wn(e,n){var t=Le(e,function(h){return Object.prototype.hasOwnProperty.call(h,"barycenter")}),o=t.lhs,r=j(t.rhs,function(h){return-h.i}),i=[],a=0,u=0,s=0;o.sort(bn(!!n)),s=te(i,r,s),f(o,function(h){s+=h.vs.length,i.push(h.vs),a+=h.barycenter*h.weight,u+=h.weight,s=te(i,r,s)});var c={vs:R(i)};return u&&(c.barycenter=a/u,c.weight=u),c}d(wn,"sort");function te(e,n,t){for(var o;n.length&&(o=D(n)).i<=t;)n.pop(),e.push(o.vs),t++;return t}d(te,"consumeUnsortable");function bn(e){return function(n,t){return n.barycenter<t.barycenter?-1:n.barycenter>t.barycenter?1:e?t.i-n.i:n.i-t.i}}d(bn,"compareWithBias");function ye(e,n,t,o){var r=e.children(n),i=e.node(n),a=i?i.borderLeft:void 0,u=i?i.borderRight:void 0,s={};a&&(r=T(r,function(v){return v!==a&&v!==u}));var c=ln(e,r);f(c,function(v){if(e.children(v.v).length){var w=ye(e,v.v,t,o);s[v.v]=w,Object.prototype.hasOwnProperty.call(w,"barycenter")&&kn(v,w)}});var h=pn(c,t);yn(h,s);var g=wn(h,o);if(a&&(g.vs=R([a,g.vs,u]),e.predecessors(a).length)){var l=e.node(e.predecessors(a)[0]),p=e.node(e.predecessors(u)[0]);Object.prototype.hasOwnProperty.call(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+l.order+p.order)/(g.weight+2),g.weight+=2}return g}d(ye,"sortSubgraph");function yn(e,n){f(e,function(t){t.vs=R(t.vs.map(function(o){return n[o]?n[o].vs:o}))})}d(yn,"expandSubgraphs");function kn(e,n){b(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}d(kn,"mergeBarycenters");function xn(e){var n=se(e),t=oe(e,O(1,n+1),"inEdges"),o=oe(e,O(n-1,-1,-1),"outEdges"),r=gn(e);re(e,r);for(var i=Number.POSITIVE_INFINITY,a,u=0,s=0;s<4;++u,++s){En(u%2?t:o,u%4>=2),r=M(e);var c=fn(e,r);c<i&&(s=0,a=at(r),i=c)}re(e,a)}d(xn,"order");function oe(e,n,t){return m(n,function(o){return sn(e,o,t)})}d(oe,"buildLayerGraphs");function En(e,n){var t=new y;f(e,function(o){var r=o.graph().root,i=ye(o,r,t,n);f(i.vs,function(a,u){o.node(a).order=u}),dn(o,t,i.vs)})}d(En,"sweepLayerGraphs");function re(e,n){f(n,function(t){f(t,function(o,r){e.node(o).order=r})})}d(re,"assignOrder");function Nn(e){var n=In(e);f(e.graph().dummyChains,function(t){for(var o=e.node(t),r=o.edgeObj,i=On(e,n,r.v,r.w),a=i.path,u=i.lca,s=0,c=a[s],h=!0;t!==r.w;){if(o=e.node(t),h){for(;(c=a[s])!==u&&e.node(c).maxRank<o.rank;)s++;c===u&&(h=!1)}if(!h){for(;s<a.length-1&&e.node(c=a[s+1]).minRank<=o.rank;)s++;c=a[s]}e.setParent(t,c),t=e.successors(t)[0]}})}d(Nn,"parentDummyChains");function On(e,n,t,o){var r=[],i=[],a=Math.min(n[t].low,n[o].low),u=Math.max(n[t].lim,n[o].lim),s,c;s=t;do s=e.parent(s),r.push(s);while(s&&(n[s].low>a||u>n[s].lim));for(c=s,s=o;(s=e.parent(s))!==c;)i.push(s);return{path:r.concat(i.reverse()),lca:c}}d(On,"findPath");function In(e){var n={},t=0;function o(r){var i=t;f(e.children(r),o),n[r]={low:i,lim:t++}}return d(o,"dfs"),f(e.children(),o),n}d(In,"postorder");function Pn(e,n){var t={};function o(r,i){var a=0,u=0,s=r.length,c=D(i);return f(i,function(h,g){var l=Cn(e,h),p=l?e.node(l).order:s;(l||h===c)&&(f(i.slice(u,g+1),function(v){f(e.predecessors(v),function(w){var L=e.node(w),xe=L.order;(xe<a||p<xe)&&!(L.dummy&&e.node(v).dummy)&&ke(t,w,v)})}),u=g+1,a=p)}),i}return d(o,"visitLayer"),q(n,o),t}d(Pn,"findType1Conflicts");function Ln(e,n){var t={};function o(i,a,u,s,c){var h;f(O(a,u),function(g){h=i[g],e.node(h).dummy&&f(e.predecessors(h),function(l){var p=e.node(l);p.dummy&&(p.order<s||p.order>c)&&ke(t,l,h)})})}d(o,"scan");function r(i,a){var u=-1,s,c=0;return f(a,function(h,g){if(e.node(h).dummy==="border"){var l=e.predecessors(h);l.length&&(s=e.node(l[0]).order,o(a,c,g,u,s),c=g,u=s)}o(a,c,a.length,s,i.length)}),a}return d(r,"visitLayer"),q(n,r),t}d(Ln,"findType2Conflicts");function Cn(e,n){if(e.node(n).dummy)return ue(e.predecessors(n),function(t){return e.node(t).dummy})}d(Cn,"findOtherInnerSegmentNode");function ke(e,n,t){if(n>t){var o=n;n=t,t=o}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var r=e[n];Object.defineProperty(r,t,{enumerable:!0,configurable:!0,value:!0,writable:!0})}d(ke,"addConflict");function _n(e,n,t){if(n>t){var o=n;n=t,t=o}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],t)}d(_n,"hasConflict");function Rn(e,n,t,o){var r={},i={},a={};return f(n,function(u){f(u,function(s,c){r[s]=s,i[s]=s,a[s]=c})}),f(n,function(u){var s=-1;f(u,function(c){var h=o(c);if(h.length){h=j(h,function(w){return a[w]});for(var g=(h.length-1)/2,l=Math.floor(g),p=Math.ceil(g);l<=p;++l){var v=h[l];i[c]===c&&s<a[v]&&!_n(t,c,v)&&(i[v]=c,i[c]=r[c]=r[v],s=a[v])}}})}),{root:r,align:i}}d(Rn,"verticalAlignment");function Tn(e,n,t,o,r){var i={},a=jn(e,n,t,r),u=r?"borderLeft":"borderRight";function s(g,l){for(var p=a.nodes(),v=p.pop(),w={};v;)w[v]?g(v):(w[v]=!0,p.push(v),p=p.concat(l(v))),v=p.pop()}d(s,"iterate");function c(g){i[g]=a.inEdges(g).reduce(function(l,p){return Math.max(l,i[p.v]+a.edge(p))},0)}d(c,"pass1");function h(g){var l=a.outEdges(g).reduce(function(v,w){return Math.min(v,i[w.w]-a.edge(w))},Number.POSITIVE_INFINITY),p=e.node(g);l!==Number.POSITIVE_INFINITY&&p.borderType!==u&&(i[g]=Math.max(i[g],l))}return d(h,"pass2"),s(c,a.predecessors.bind(a)),s(h,a.successors.bind(a)),f(o,function(g){i[g]=i[t[g]]}),i}d(Tn,"horizontalCompaction");function jn(e,n,t,o){var r=new y,i=e.graph(),a=Gn(i.nodesep,i.edgesep,o);return f(n,function(u){var s;f(u,function(c){var h=t[c];if(r.setNode(h),s){var g=t[s],l=r.edge(g,h);r.setEdge(g,h,Math.max(a(e,c,s),l||0))}s=c})}),r}d(jn,"buildBlockGraph");function Mn(e,n){return ae(I(n),function(t){var o=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY;return ut(t,function(i,a){var u=Vn(e,a)/2;o=Math.max(i+u,o),r=Math.min(i-u,r)}),o-r})}d(Mn,"findSmallestWidthAlignment");function Sn(e,n){var t=I(n),o=C(t),r=x(t);f(["u","d"],function(i){f(["l","r"],function(a){var u=i+a,s=e[u],c;if(s!==n){var h=I(s);c=a==="l"?o-C(h):r-x(h),c&&(e[u]=A(s,function(g){return g+c}))}})})}d(Sn,"alignCoordinates");function Bn(e,n){return A(e.ul,function(t,o){if(n)return e[n.toLowerCase()][o];var r=j(m(e,o));return(r[1]+r[2])/2})}d(Bn,"balance");function Fn(e){var n=M(e),t=X(Pn(e,n),Ln(e,n)),o={},r;f(["u","d"],function(a){r=a==="u"?n:I(n).reverse(),f(["l","r"],function(u){u==="r"&&(r=m(r,function(g){return I(g).reverse()}));var s=(a==="u"?e.predecessors:e.successors).bind(e),c=Rn(e,r,t,s),h=Tn(e,r,c.root,c.align,u==="r");u==="r"&&(h=A(h,function(g){return-g})),o[a+u]=h})});var i=Mn(e,o);return Sn(o,i),Bn(o,e.graph().align)}d(Fn,"positionX");function Gn(e,n,t){return function(o,r,i){var a=o.node(r),u=o.node(i),s=0,c;if(s+=a.width/2,Object.prototype.hasOwnProperty.call(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":c=-a.width/2;break;case"r":c=a.width/2;break}if(c&&(s+=t?c:-c),c=0,s+=(a.dummy?n:e)/2,s+=(u.dummy?n:e)/2,s+=u.width/2,Object.prototype.hasOwnProperty.call(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":c=u.width/2;break;case"r":c=-u.width/2;break}return c&&(s+=t?c:-c),c=0,s}}d(Gn,"sep");function Vn(e,n){return e.node(n).width}d(Vn,"width");function Yn(e){e=de(e),Dn(e),dt(Fn(e),function(n,t){e.node(t).x=n})}d(Yn,"position");function Dn(e){var n=M(e),t=e.graph().ranksep,o=0;f(n,function(r){var i=x(m(r,function(a){return e.node(a).height}));f(r,function(a){e.node(a).y=o+i/2}),o+=i+t})}d(Dn,"positionY");function lt(e,n){var t=n&&n.debugTiming?Ce:_e;t("layout",()=>{var o=t(" buildLayoutGraph",()=>qn(e));t(" runLayout",()=>zn(o,t)),t(" updateInputGraph",()=>An(e,o))})}d(lt,"layout");function zn(e,n){n(" makeSpaceForEdgeLabels",()=>Hn(e)),n(" removeSelfEdges",()=>et(e)),n(" acyclic",()=>Ye(e)),n(" nestingGraph.run",()=>on(e)),n(" rank",()=>nn(de(e))),n(" injectEdgeLabelProxies",()=>Wn(e)),n(" removeEmptyRanks",()=>Pe(e)),n(" nestingGraph.cleanup",()=>un(e)),n(" normalizeRanks",()=>Ie(e)),n(" assignRankMinMax",()=>$n(e)),n(" removeEdgeLabelProxies",()=>Xn(e)),n(" normalize.run",()=>Ae(e)),n(" parentDummyChains",()=>Nn(e)),n(" addBorderSegments",()=>Re(e)),n(" order",()=>xn(e)),n(" insertSelfEdges",()=>nt(e)),n(" adjustCoordinateSystem",()=>Te(e)),n(" position",()=>Yn(e)),n(" positionSelfEdges",()=>tt(e)),n(" removeBorderNodes",()=>Zn(e)),n(" normalize.undo",()=>He(e)),n(" fixupEdgeLabelCoords",()=>Qn(e)),n(" undoCoordinateSystem",()=>je(e)),n(" translateGraph",()=>Kn(e)),n(" assignNodeIntersects",()=>Jn(e)),n(" reversePoints",()=>Un(e)),n(" acyclic.undo",()=>ze(e))}d(zn,"runLayout");function An(e,n){f(e.nodes(),function(t){var o=e.node(t),r=n.node(t);o&&(o.x=r.x,o.y=r.y,n.children(t).length&&(o.width=r.width,o.height=r.height))}),f(e.edges(),function(t){var o=e.edge(t),r=n.edge(t);o.points=r.points,Object.prototype.hasOwnProperty.call(r,"x")&&(o.x=r.x,o.y=r.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}d(An,"updateInputGraph");var pt=["nodesep","edgesep","ranksep","marginx","marginy"],vt={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},mt=["acyclicer","ranker","rankdir","align"],wt=["width","height"],bt={width:0,height:0},yt=["minlen","weight","width","height","labeloffset"],kt={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},xt=["labelpos"];function qn(e){var n=new y({multigraph:!0,compound:!0}),t=V(e.graph());return n.setGraph(X({},vt,G(t,pt),Y(t,mt))),f(e.nodes(),function(o){var r=V(e.node(o));n.setNode(o,ot(G(r,wt),bt)),n.setParent(o,e.parent(o))}),f(e.edges(),function(o){var r=V(e.edge(o));n.setEdge(o,X({},kt,G(r,yt),Y(r,xt)))}),n}d(qn,"buildLayoutGraph");function Hn(e){var n=e.graph();n.ranksep/=2,f(e.edges(),function(t){var o=e.edge(t);o.minlen*=2,o.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?o.width+=o.labeloffset:o.height+=o.labeloffset)})}d(Hn,"makeSpaceForEdgeLabels");function Wn(e){f(e.edges(),function(n){var t=e.edge(n);if(t.width&&t.height){var o=e.node(n.v),r=e.node(n.w),i={rank:(r.rank-o.rank)/2+o.rank,e:n};E(e,"edge-proxy",i,"_ep")}})}d(Wn,"injectEdgeLabelProxies");function $n(e){var n=0;f(e.nodes(),function(t){var o=e.node(t);o.borderTop&&(o.minRank=e.node(o.borderTop).rank,o.maxRank=e.node(o.borderBottom).rank,n=x(n,o.maxRank))}),e.graph().maxRank=n}d($n,"assignRankMinMax");function Xn(e){f(e.nodes(),function(n){var t=e.node(n);t.dummy==="edge-proxy"&&(e.edge(t.e).labelRank=t.rank,e.removeNode(n))})}d(Xn,"removeEdgeLabelProxies");function Kn(e){var n=Number.POSITIVE_INFINITY,t=0,o=Number.POSITIVE_INFINITY,r=0,i=e.graph(),a=i.marginx||0,u=i.marginy||0;function s(c){var h=c.x,g=c.y,l=c.width,p=c.height;n=Math.min(n,h-l/2),t=Math.max(t,h+l/2),o=Math.min(o,g-p/2),r=Math.max(r,g+p/2)}d(s,"getExtremes"),f(e.nodes(),function(c){s(e.node(c))}),f(e.edges(),function(c){var h=e.edge(c);Object.prototype.hasOwnProperty.call(h,"x")&&s(h)}),n-=a,o-=u,f(e.nodes(),function(c){var h=e.node(c);h.x-=n,h.y-=o}),f(e.edges(),function(c){var h=e.edge(c);f(h.points,function(g){g.x-=n,g.y-=o}),Object.prototype.hasOwnProperty.call(h,"x")&&(h.x-=n),Object.prototype.hasOwnProperty.call(h,"y")&&(h.y-=o)}),i.width=t-n+a,i.height=r-o+u}d(Kn,"translateGraph");function Jn(e){f(e.edges(),function(n){var t=e.edge(n),o=e.node(n.v),r=e.node(n.w),i,a;t.points?(i=t.points[0],a=t.points[t.points.length-1]):(t.points=[],i=r,a=o),t.points.unshift(K(o,i)),t.points.push(K(r,a))})}d(Jn,"assignNodeIntersects");function Qn(e){f(e.edges(),function(n){var t=e.edge(n);if(Object.prototype.hasOwnProperty.call(t,"x"))switch((t.labelpos==="l"||t.labelpos==="r")&&(t.width-=t.labeloffset),t.labelpos){case"l":t.x-=t.width/2+t.labeloffset;break;case"r":t.x+=t.width/2+t.labeloffset;break}})}d(Qn,"fixupEdgeLabelCoords");function Un(e){f(e.edges(),function(n){var t=e.edge(n);t.reversed&&t.points.reverse()})}d(Un,"reversePointsForReversedEdges");function Zn(e){f(e.nodes(),function(n){if(e.children(n).length){var t=e.node(n),o=e.node(t.borderTop),r=e.node(t.borderBottom),i=e.node(D(t.borderLeft)),a=e.node(D(t.borderRight));t.width=Math.abs(a.x-i.x),t.height=Math.abs(r.y-o.y),t.x=i.x+t.width/2,t.y=o.y+t.height/2}}),f(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}d(Zn,"removeBorderNodes");function et(e){f(e.edges(),function(n){if(n.v===n.w){var t=e.node(n.v);t.selfEdges||(t.selfEdges=[]),t.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}d(et,"removeSelfEdges");function nt(e){var n=M(e);f(n,function(t){var o=0;f(t,function(r,i){var a=e.node(r);a.order=i+o,f(a.selfEdges,function(u){E(e,"selfedge",{width:u.label.width,height:u.label.height,rank:a.rank,order:i+ ++o,e:u.e,label:u.label},"_se")}),delete a.selfEdges})})}d(nt,"insertSelfEdges");function tt(e){f(e.nodes(),function(n){var t=e.node(n);if(t.dummy==="selfedge"){var o=e.node(t.e.v),r=o.x+o.width/2,i=o.y,a=t.x-r,u=o.height/2;e.setEdge(t.e,t.label),e.removeNode(n),t.label.points=[{x:r+2*a/3,y:i-u},{x:r+5*a/6,y:i-u},{x:r+a,y:i},{x:r+5*a/6,y:i+u},{x:r+2*a/3,y:i+u}],t.label.x=t.x,t.label.y=t.y}})}d(tt,"positionSelfEdges");function G(e,n){return A(Y(e,n),Number)}d(G,"selectNumberAttrs");function V(e){var n={};return f(e,function(t,o){n[o.toLowerCase()]=t}),n}d(V,"canonicalize");export{lt as f};
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import{m as Zt}from"./chunk-6764PJDD-Cppb-jH-.js";import{y as Jt}from"./chunk-ZXARS5L4-wcrIaQvY.js";import{m as d,p as _,q as w,j as te,k as ee,s as se,e as ie,a as re,l as ae,n as ne,o as oe,an as le,C as K,u as ce}from"./index-VTKdaklA.js";var Ct=function(){var t=d(function(Y,o,n,g){for(n=n||{},g=Y.length;g--;n[Y[g]]=o);return n},"o"),e=[1,2],i=[1,3],a=[1,4],r=[2,4],l=[1,9],h=[1,11],y=[1,16],u=[1,17],S=[1,18],m=[1,19],E=[1,33],x=[1,20],O=[1,21],I=[1,22],R=[1,23],$=[1,24],p=[1,26],v=[1,27],L=[1,28],F=[1,29],M=[1,30],G=[1,31],W=[1,32],it=[1,35],rt=[1,36],at=[1,37],nt=[1,38],H=[1,34],f=[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],ot=[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],vt=[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],mt={trace:d(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:d(function(Y,o,n,g,k,s,T){var c=s.length-1;switch(k){case 3:return g.setRootDoc(s[c]),s[c];case 4:this.$=[];break;case 5:s[c]!="nl"&&(s[c-1].push(s[c]),this.$=s[c-1]);break;case 6:case 7:this.$=s[c];break;case 8:this.$="nl";break;case 12:this.$=s[c];break;case 13:let ht=s[c-1];ht.description=g.trimColon(s[c]),this.$=ht;break;case 14:this.$={stmt:"relation",state1:s[c-2],state2:s[c]};break;case 15:let dt=g.trimColon(s[c]);this.$={stmt:"relation",state1:s[c-3],state2:s[c-1],description:dt};break;case 19:this.$={stmt:"state",id:s[c-3],type:"default",description:"",doc:s[c-1]};break;case 20:var B=s[c],q=s[c-2].trim();if(s[c].match(":")){var ct=s[c].split(":");B=ct[0],q=[q,ct[1]]}this.$={stmt:"state",id:B,type:"default",description:q};break;case 21:this.$={stmt:"state",id:s[c-3],type:"default",description:s[c-5],doc:s[c-1]};break;case 22:this.$={stmt:"state",id:s[c],type:"fork"};break;case 23:this.$={stmt:"state",id:s[c],type:"join"};break;case 24:this.$={stmt:"state",id:s[c],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:s[c-1].trim(),note:{position:s[c-2].trim(),text:s[c].trim()}};break;case 29:this.$=s[c].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=s[c].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:s[c-3],url:s[c-2],tooltip:s[c-1]};break;case 33:this.$={stmt:"click",id:s[c-3],url:s[c-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:s[c-1].trim(),classes:s[c].trim()};break;case 36:this.$={stmt:"style",id:s[c-1].trim(),styleClass:s[c].trim()};break;case 37:this.$={stmt:"applyClass",id:s[c-1].trim(),styleClass:s[c].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:s[c].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:s[c-2].trim(),classes:[s[c].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:s[c-2].trim(),classes:[s[c].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:i,6:a},{1:[3]},{3:5,4:e,5:i,6:a},{3:6,4:e,5:i,6:a},t([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],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:l,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:u,19:S,22:m,24:E,25:x,26:O,27:I,28:R,29:$,32:25,33:p,35:v,37:L,38:F,41:M,45:G,48:W,51:it,52:rt,53:at,54:nt,57:H},t(f,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:y,17:u,19:S,22:m,24:E,25:x,26:O,27:I,28:R,29:$,32:25,33:p,35:v,37:L,38:F,41:M,45:G,48:W,51:it,52:rt,53:at,54:nt,57:H},t(f,[2,7]),t(f,[2,8]),t(f,[2,9]),t(f,[2,10]),t(f,[2,11]),t(f,[2,12],{14:[1,40],15:[1,41]}),t(f,[2,16]),{18:[1,42]},t(f,[2,18],{20:[1,43]}),{23:[1,44]},t(f,[2,22]),t(f,[2,23]),t(f,[2,24]),t(f,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(f,[2,28]),{34:[1,49]},{36:[1,50]},t(f,[2,31]),{13:51,24:E,57:H},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(ot,[2,44],{58:[1,56]}),t(ot,[2,45],{58:[1,57]}),t(f,[2,38]),t(f,[2,39]),t(f,[2,40]),t(f,[2,41]),t(f,[2,6]),t(f,[2,13]),{13:58,24:E,57:H},t(f,[2,17]),t(vt,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(f,[2,29]),t(f,[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]},t(f,[2,14],{14:[1,71]}),{4:l,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:u,19:S,21:[1,72],22:m,24:E,25:x,26:O,27:I,28:R,29:$,32:25,33:p,35:v,37:L,38:F,41:M,45:G,48:W,51:it,52:rt,53:at,54:nt,57:H},t(f,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(f,[2,34]),t(f,[2,35]),t(f,[2,36]),t(f,[2,37]),t(ot,[2,46]),t(ot,[2,47]),t(f,[2,15]),t(f,[2,19]),t(vt,r,{7:78}),t(f,[2,26]),t(f,[2,27]),{5:[1,79]},{5:[1,80]},{4:l,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:u,19:S,21:[1,81],22:m,24:E,25:x,26:O,27:I,28:R,29:$,32:25,33:p,35:v,37:L,38:F,41:M,45:G,48:W,51:it,52:rt,53:at,54:nt,57:H},t(f,[2,32]),t(f,[2,33]),t(f,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:d(function(Y,o){if(o.recoverable)this.trace(Y);else{var n=new Error(Y);throw n.hash=o,n}},"parseError"),parse:d(function(Y){var o=this,n=[0],g=[],k=[null],s=[],T=this.table,c="",B=0,q=0,ct=0,ht=2,dt=1,qt=s.slice.call(arguments,1),b=Object.create(this.lexer),j={yy:{}};for(var St in this.yy)Object.prototype.hasOwnProperty.call(this.yy,St)&&(j.yy[St]=this.yy[St]);b.setInput(Y,j.yy),j.yy.lexer=b,j.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var kt=b.yylloc;s.push(kt);var Vt=b.options&&b.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Qt(A){n.length=n.length-2*A,k.length=k.length-A,s.length=s.length-A}d(Qt,"popStack");function Lt(){var A;return A=g.pop()||b.lex()||dt,typeof A!="number"&&(A instanceof Array&&(g=A,A=g.pop()),A=o.symbols_[A]||A),A}d(Lt,"lex");for(var C,_t,U,N,we,Tt,V={},ut,P,It,pt;;){if(U=n[n.length-1],this.defaultActions[U]?N=this.defaultActions[U]:((C===null||typeof C>"u")&&(C=Lt()),N=T[U]&&T[U][C]),typeof N>"u"||!N.length||!N[0]){var bt="";pt=[];for(ut in T[U])this.terminals_[ut]&&ut>ht&&pt.push("'"+this.terminals_[ut]+"'");b.showPosition?bt="Parse error on line "+(B+1)+`:
|
|
2
|
+
`+b.showPosition()+`
|
|
3
|
+
Expecting `+pt.join(", ")+", got '"+(this.terminals_[C]||C)+"'":bt="Parse error on line "+(B+1)+": Unexpected "+(C==dt?"end of input":"'"+(this.terminals_[C]||C)+"'"),this.parseError(bt,{text:b.match,token:this.terminals_[C]||C,line:b.yylineno,loc:kt,expected:pt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+C);switch(N[0]){case 1:n.push(C),k.push(b.yytext),s.push(b.yylloc),n.push(N[1]),C=null,_t?(C=_t,_t=null):(q=b.yyleng,c=b.yytext,B=b.yylineno,kt=b.yylloc,ct>0);break;case 2:if(P=this.productions_[N[1]][1],V.$=k[k.length-P],V._$={first_line:s[s.length-(P||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(P||1)].first_column,last_column:s[s.length-1].last_column},Vt&&(V._$.range=[s[s.length-(P||1)].range[0],s[s.length-1].range[1]]),Tt=this.performAction.apply(V,[c,q,B,j.yy,N[1],k,s].concat(qt)),typeof Tt<"u")return Tt;P&&(n=n.slice(0,-1*P*2),k=k.slice(0,-1*P),s=s.slice(0,-1*P)),n.push(this.productions_[N[1]][0]),k.push(V.$),s.push(V._$),It=T[n[n.length-2]][n[n.length-1]],n.push(It);break;case 3:return!0}}return!0},"parse")},Ht=function(){var Y={EOF:1,parseError:d(function(o,n){if(this.yy.parser)this.yy.parser.parseError(o,n);else throw new Error(o)},"parseError"),setInput:d(function(o,n){return this.yy=n||this.yy||{},this._input=o,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:d(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var n=o.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:d(function(o){var n=o.length,g=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var k=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),g.length-1&&(this.yylineno-=g.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===k.length?this.yylloc.first_column:0)+k[k.length-g.length].length-g[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(o){this.unput(this.match.slice(o))},"less"),pastInput:d(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var o=this.pastInput(),n=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
5
|
+
`+n+"^"},"showPosition"),test_match:d(function(o,n){var g,k,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),k=o[0].match(/(?:\r\n?|\n).*/g),k&&(this.yylineno+=k.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:k?k[k.length-1].length-k[k.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],g=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var T in s)this[T]=s[T];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,n,g,k;this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),T=0;T<s.length;T++)if(g=this._input.match(this.rules[s[T]]),g&&(!n||g[0].length>n[0].length)){if(n=g,k=T,this.options.backtrack_lexer){if(o=this.test_match(g,s[T]),o!==!1)return o;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(o=this.test_match(n,s[k]),o!==!1?o:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:d(function(){var o=this.next();return o||this.lex()},"lex"),begin:d(function(o){this.conditionStack.push(o)},"begin"),popState:d(function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:d(function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},"topState"),pushState:d(function(o){this.begin(o)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:d(function(o,n,g,k){function s(){let T=n.yytext.indexOf("%%");if(T===0)return!1;if(T>0){let c=n.yytext.slice(0,T),B=n.yytext.slice(T);B&&o.lexer.unput(B),n.yytext=c}return!0}switch(d(s,"processId"),g){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState("SCALE"),17;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;case 17:return this.popState(),"acc_title_value";case 18:return this.begin("acc_descr"),35;case 19:return this.popState(),"acc_descr_value";case 20:this.begin("acc_descr_multiline");break;case 21:this.popState();break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 25:return this.popState(),this.pushState("CLASSDEFID"),42;case 26:return this.popState(),43;case 27:return this.pushState("CLASS"),48;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;case 29:return this.popState(),50;case 30:return this.pushState("STYLE"),45;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 32:return this.popState(),47;case 33:return this.pushState("SCALE"),17;case 34:return 18;case 35:this.popState();break;case 36:this.pushState("STATE");break;case 37:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 38:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 39:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 40:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 41:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 42:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";case 49:return s()?(this.popState(),"ID"):void 0;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:return 19;case 53:this.popState();break;case 54:return this.popState(),this.pushState("struct"),20;case 55:return this.popState(),21;case 56:break;case 57:return this.begin("NOTE"),29;case 58:return this.popState(),this.pushState("NOTE_ID"),59;case 59:return this.popState(),this.pushState("NOTE_ID"),60;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 62:break;case 63:return"NOTE_TEXT";case 64:return s()?(this.popState(),"ID"):void 0;case 65:return s()?(this.popState(),this.pushState("NOTE_TEXT"),24):void 0;case 66:return this.popState(),n.yytext=n.yytext.substr(2).trim(),31;case 67:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),31;case 68:return 6;case 69:return 6;case 70:return 16;case 71:return 57;case 72:return s()?24:void 0;case 73:return n.yytext=n.yytext.trim(),14;case 74:return 15;case 75:return 28;case 76:return 58;case 77:return 5;case 78:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,55,56,57,71,72,73,74,75,76],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,54,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}};return Y}();mt.lexer=Ht;function lt(){this.yy={}}return d(lt,"Parser"),lt.prototype=mt,mt.Parser=lt,new lt}();Ct.parser=Ct;var Be=Ct,Z="state",Q="root",Dt="relation",he="classDef",de="style",ue="applyClass",et="default",Yt="divider",Bt="fill:none",Pt="fill: #333",Gt="markdown",Wt="normal",Et="rect",$t="rectWithTitle",pe="stateStart",ye="stateEnd",At="divider",Nt="roundedWithTitle",fe="note",ge="noteGroup",st="statediagram",me="state",Se=`${st}-${me}`,zt="transition",ke="note",_e="note-edge",Te=`${zt} ${_e}`,be=`${st}-${ke}`,Ee="cluster",$e=`${st}-${Ee}`,Ce="cluster-alt",De=`${st}-${Ce}`,Mt="parent",jt="note",xe="state",xt="----",ve=`${xt}${jt}`,Ot=`${xt}${Mt}`,Ut=d((t,e="TB")=>{if(!t.doc)return e;let i=e;for(let a of t.doc)a.stmt==="dir"&&(i=a.value);return i},"getDir"),Le=d(function(t,e){return e.db.getClasses()},"getClasses"),Ie=d(async function(t,e,i,a){_.info("REF0:"),_.info("Drawing state diagram (v2)",e);let{securityLevel:r,state:l,layout:h}=w();a.db.extract(a.db.getRootDocV2());let y=a.db.getData(),u=Zt(e,r);y.type=a.type,y.layoutAlgorithm=h,y.nodeSpacing=(l==null?void 0:l.nodeSpacing)||50,y.rankSpacing=(l==null?void 0:l.rankSpacing)||50,w().look==="neo"?y.markers=["barbNeo"]:y.markers=["barb"],y.diagramId=e,await te(y,u);let S=8;try{(typeof a.db.getLinks=="function"?a.db.getLinks():new Map).forEach((m,E)=>{var v;let x=typeof E=="string"?E:typeof(E==null?void 0:E.id)=="string"?E.id:"";if(!x){_.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(E));return}let O=(v=u.node())==null?void 0:v.querySelectorAll("g"),I;if(O==null||O.forEach(L=>{var F;((F=L.textContent)==null?void 0:F.trim())===x&&(I=L)}),!I){_.warn("⚠️ Could not find node matching text:",x);return}let R=I.parentNode;if(!R){_.warn("⚠️ Node has no parent, cannot wrap:",x);return}let $=document.createElementNS("http://www.w3.org/2000/svg","a"),p=m.url.replace(/^"+|"+$/g,"");if($.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",p),$.setAttribute("target","_blank"),m.tooltip){let L=m.tooltip.replace(/^"+|"+$/g,"");$.setAttribute("title",L)}R.replaceChild($,I),$.appendChild(I),_.info("🔗 Wrapped node in <a> tag for:",x,m.url)})}catch(m){_.error("❌ Error injecting clickable links:",m)}ee.insertTitle(u,"statediagramTitleText",(l==null?void 0:l.titleTopMargin)??25,a.db.getDiagramTitle()),Jt(u,S,st,(l==null?void 0:l.useMaxWidth)??!0)},"draw"),Pe={getClasses:Le,draw:Ie,getDir:Ut},ft=new Map,z=0;function gt(t="",e=0,i="",a=xt){let r=i!==null&&i.length>0?`${a}${i}`:"";return`${xe}-${t}${r}-${e}`}d(gt,"stateDomId");var Ae=d((t,e,i,a,r,l,h,y)=>{_.trace("items",e),e.forEach(u=>{switch(u.stmt){case Z:tt(t,u,i,a,r,l,h,y);break;case et:tt(t,u,i,a,r,l,h,y);break;case Dt:{tt(t,u.state1,i,a,r,l,h,y),tt(t,u.state2,i,a,r,l,h,y);let S=h==="neo",m={id:"edge"+z,start:u.state1.id,end:u.state2.id,arrowhead:"normal",arrowTypeEnd:S?"arrow_barb_neo":"arrow_barb",style:Bt,labelStyle:"",label:K.sanitizeText(u.description??"",w()),arrowheadStyle:Pt,labelpos:"c",labelType:Gt,thickness:Wt,classes:zt,look:h};r.push(m),z++}break}})},"setupDoc"),wt=d((t,e="TB")=>{let i=e;if(t.doc)for(let a of t.doc)a.stmt==="dir"&&(i=a.value);return i},"getDir");function J(t,e,i){if(!e.id||e.id==="</join></fork>"||e.id==="</choice>")return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(r=>{let l=i.get(r);l&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...l.styles])}));let a=t.find(r=>r.id===e.id);a?Object.assign(a,e):t.push(e)}d(J,"insertOrUpdateNode");function Kt(t){var e;return((e=t==null?void 0:t.classes)==null?void 0:e.join(" "))??""}d(Kt,"getClassesFromDbInfo");function Xt(t){return(t==null?void 0:t.styles)??[]}d(Xt,"getStylesFromDbInfo");var tt=d((t,e,i,a,r,l,h,y)=>{var O,I,R;let u=e.id,S=i.get(u),m=Kt(S),E=Xt(S),x=w();if(_.info("dataFetcher parsedItem",e,S,E),u!=="root"){let $=Et;e.start===!0?$=pe:e.start===!1&&($=ye),e.type!==et&&($=e.type),ft.get(u)||ft.set(u,{id:u,shape:$,description:K.sanitizeText(u,x),cssClasses:`${m} ${Se}`,cssStyles:E});let p=ft.get(u);e.description&&(Array.isArray(p.description)?(p.shape=$t,p.description.push(e.description)):(O=p.description)!=null&&O.length&&p.description.length>0?(p.shape=$t,p.description===u?p.description=[e.description]:p.description=[p.description,e.description]):(p.shape=Et,p.description=e.description),p.description=K.sanitizeTextOrArray(p.description,x)),((I=p.description)==null?void 0:I.length)===1&&p.shape===$t&&(p.type==="group"?p.shape=Nt:p.shape=Et),!p.type&&e.doc&&(_.info("Setting cluster for XCX",u,wt(e)),p.type="group",p.isGroup=!0,p.dir=wt(e),p.shape=e.type===Yt?At:Nt,p.cssClasses=`${p.cssClasses} ${$e} ${l?De:""}`);let v={labelStyle:"",shape:p.shape,label:p.description,cssClasses:p.cssClasses,cssCompiledStyles:[],cssStyles:p.cssStyles,id:u,dir:p.dir,domId:gt(u,z),type:p.type,isGroup:p.type==="group",padding:8,rx:10,ry:10,look:h,labelType:"markdown"};if(v.shape===At&&(v.label=""),t&&t.id!=="root"&&(_.trace("Setting node ",u," to be child of its parent ",t.id),v.parentId=t.id),v.centerLabel=!0,e.note){let L={labelStyle:"",shape:fe,label:e.note.text,labelType:"markdown",cssClasses:be,cssStyles:[],cssCompiledStyles:[],id:u+ve+"-"+z,domId:gt(u,z,jt),type:p.type,isGroup:p.type==="group",padding:(R=x.flowchart)==null?void 0:R.padding,look:h,position:e.note.position},F=u+Ot,M={labelStyle:"",shape:ge,label:e.note.text,cssClasses:p.cssClasses,cssStyles:[],id:u+Ot,domId:gt(u,z,Mt),type:"group",isGroup:!0,padding:16,look:h,position:e.note.position};z++,M.id=F,L.parentId=F,J(a,M,y),J(a,L,y),J(a,v,y);let G=u,W=L.id;e.note.position==="left of"&&(G=L.id,W=u),r.push({id:G+"-"+W,start:G,end:W,arrowhead:"none",arrowTypeEnd:"",style:Bt,labelStyle:"",classes:Te,arrowheadStyle:Pt,labelpos:"c",labelType:Gt,thickness:Wt,look:h})}else J(a,v,y)}e.doc&&(_.trace("Adding nodes children "),Ae(e,e.doc,i,a,r,!l,h,y))},"dataFetcher"),Ne=d(()=>{ft.clear(),z=0},"reset"),D={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Rt=d(()=>new Map,"newClassesList"),Ft=d(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),yt=d(t=>JSON.parse(JSON.stringify(t)),"clone"),X,Ge=(X=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Rt(),this.documents={root:Ft()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=se,this.setAccTitle=ie,this.getAccDescription=re,this.setAccDescription=ae,this.setDiagramTitle=ne,this.getDiagramTitle=oe,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}extract(e){this.clear(!0);for(let r of Array.isArray(e)?e:e.doc)switch(r.stmt){case Z:this.addState(r.id.trim(),r.type,r.doc,r.description,r.note);break;case Dt:this.addRelation(r.state1,r.state2,r.description);break;case he:this.addStyleClass(r.id.trim(),r.classes);break;case de:this.handleStyleDef(r);break;case ue:this.setCssClass(r.id.trim(),r.styleClass);break;case"click":this.addLink(r.id,r.url,r.tooltip);break}let i=this.getStates(),a=w();Ne(),tt(void 0,this.getRootDocV2(),i,this.nodes,this.edges,!0,a.look,this.classes);for(let r of this.nodes)if(Array.isArray(r.label)){if(r.description=r.label.slice(1),r.isGroup&&r.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${r.id}]`);r.label=r.label[0]}}handleStyleDef(e){let i=e.id.trim().split(","),a=e.styleClass.split(",");for(let r of i){let l=this.getState(r);if(!l){let h=r.trim();this.addState(h),l=this.getState(h)}l&&(l.styles=a.map(h=>{var y;return(y=h.replace(/;/g,""))==null?void 0:y.trim()}))}}setRootDoc(e){_.info("Setting root doc",e),this.rootDoc=e,this.version===1?this.extract(e):this.extract(this.getRootDocV2())}docTranslator(e,i,a){if(i.stmt===Dt){this.docTranslator(e,i.state1,!0),this.docTranslator(e,i.state2,!1);return}if(i.stmt===Z&&(i.id===D.START_NODE?(i.id=e.id+(a?"_start":"_end"),i.start=a):i.id=i.id.trim()),i.stmt!==Q&&i.stmt!==Z||!i.doc)return;let r=[],l=[];for(let h of i.doc)if(h.type===Yt){let y=yt(h);y.doc=yt(l),r.push(y),l=[]}else l.push(h);if(r.length>0&&l.length>0){let h={stmt:Z,id:le(),type:"divider",doc:yt(l)};r.push(yt(h)),i.doc=r}i.doc.forEach(h=>this.docTranslator(i,h,!0))}getRootDocV2(){return this.docTranslator({id:Q,stmt:Q},{id:Q,stmt:Q,doc:this.rootDoc},!0),{id:Q,doc:this.rootDoc}}addState(e,i=et,a=void 0,r=void 0,l=void 0,h=void 0,y=void 0,u=void 0){let S=e==null?void 0:e.trim();if(!this.currentDocument.states.has(S))_.info("Adding state ",S,r),this.currentDocument.states.set(S,{stmt:Z,id:S,descriptions:[],type:i,doc:a,note:l,classes:[],styles:[],textStyles:[]});else{let m=this.currentDocument.states.get(S);if(!m)throw new Error(`State not found: ${S}`);m.doc||(m.doc=a),m.type||(m.type=i)}if(r&&(_.info("Setting state description",S,r),(Array.isArray(r)?r:[r]).forEach(m=>this.addDescription(S,m.trim()))),l){let m=this.currentDocument.states.get(S);if(!m)throw new Error(`State not found: ${S}`);m.note=l,m.note.text=K.sanitizeText(m.note.text,w())}h&&(_.info("Setting state classes",S,h),(Array.isArray(h)?h:[h]).forEach(m=>this.setCssClass(S,m.trim()))),y&&(_.info("Setting state styles",S,y),(Array.isArray(y)?y:[y]).forEach(m=>this.setStyle(S,m.trim()))),u&&(_.info("Setting state styles",S,y),(Array.isArray(u)?u:[u]).forEach(m=>this.setTextStyle(S,m.trim())))}clear(e){this.nodes=[],this.edges=[],this.documents={root:Ft()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Rt(),e||(this.links=new Map,ce())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){_.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,i,a){this.links.set(e,{url:i,tooltip:a}),_.warn("Adding link",e,i,a)}getLinks(){return this.links}startIdIfNeeded(e=""){return e===D.START_NODE?(this.startEndCount++,`${D.START_TYPE}${this.startEndCount}`):e}startTypeIfNeeded(e="",i=et){return e===D.START_NODE?D.START_TYPE:i}endIdIfNeeded(e=""){return e===D.END_NODE?(this.startEndCount++,`${D.END_TYPE}${this.startEndCount}`):e}endTypeIfNeeded(e="",i=et){return e===D.END_NODE?D.END_TYPE:i}addRelationObjs(e,i,a=""){let r=this.startIdIfNeeded(e.id.trim()),l=this.startTypeIfNeeded(e.id.trim(),e.type),h=this.startIdIfNeeded(i.id.trim()),y=this.startTypeIfNeeded(i.id.trim(),i.type);this.addState(r,l,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(h,y,i.doc,i.description,i.note,i.classes,i.styles,i.textStyles),this.currentDocument.relations.push({id1:r,id2:h,relationTitle:K.sanitizeText(a,w())})}addRelation(e,i,a){if(typeof e=="object"&&typeof i=="object")this.addRelationObjs(e,i,a);else if(typeof e=="string"&&typeof i=="string"){let r=this.startIdIfNeeded(e.trim()),l=this.startTypeIfNeeded(e),h=this.endIdIfNeeded(i.trim()),y=this.endTypeIfNeeded(i);this.addState(r,l),this.addState(h,y),this.currentDocument.relations.push({id1:r,id2:h,relationTitle:a?K.sanitizeText(a,w()):void 0})}}addDescription(e,i){var l;let a=this.currentDocument.states.get(e),r=i.startsWith(":")?i.replace(":","").trim():i;(l=a==null?void 0:a.descriptions)==null||l.push(K.sanitizeText(r,w()))}cleanupLabel(e){return e.startsWith(":")?e.slice(2).trim():e.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(e,i=""){this.classes.has(e)||this.classes.set(e,{id:e,styles:[],textStyles:[]});let a=this.classes.get(e);i&&a&&i.split(D.STYLECLASS_SEP).forEach(r=>{let l=r.replace(/([^;]*);/,"$1").trim();if(RegExp(D.COLOR_KEYWORD).exec(r)){let h=l.replace(D.FILL_KEYWORD,D.BG_FILL).replace(D.COLOR_KEYWORD,D.FILL_KEYWORD);a.textStyles.push(h)}a.styles.push(l)})}getClasses(){return this.classes}setCssClass(e,i){e.split(",").forEach(a=>{var l;let r=this.getState(a);if(!r){let h=a.trim();this.addState(h),r=this.getState(h)}(l=r==null?void 0:r.classes)==null||l.push(i)})}setStyle(e,i){var a,r;(r=(a=this.getState(e))==null?void 0:a.styles)==null||r.push(i)}setTextStyle(e,i){var a,r;(r=(a=this.getState(e))==null?void 0:a.textStyles)==null||r.push(i)}getDirectionStatement(){return this.rootDoc.find(e=>e.stmt==="dir")}getDirection(){var e;return((e=this.getDirectionStatement())==null?void 0:e.value)??"TB"}setDirection(e){let i=this.getDirectionStatement();i?i.value=e:this.rootDoc.unshift({stmt:"dir",value:e})}trimColon(e){return e.startsWith(":")?e.slice(1).trim():e.trim()}getData(){let e=w();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:Ut(this.getRootDocV2())}}getConfig(){return w().state}},d(X,"StateDB"),X.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},X),Oe=d(t=>`
|
|
7
|
+
defs [id$="-barbEnd"] {
|
|
8
|
+
fill: ${t.transitionColor};
|
|
9
|
+
stroke: ${t.transitionColor};
|
|
10
|
+
}
|
|
11
|
+
g.stateGroup text {
|
|
12
|
+
fill: ${t.nodeBorder};
|
|
13
|
+
stroke: none;
|
|
14
|
+
font-size: 10px;
|
|
15
|
+
}
|
|
16
|
+
g.stateGroup text {
|
|
17
|
+
fill: ${t.textColor};
|
|
18
|
+
stroke: none;
|
|
19
|
+
font-size: 10px;
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
g.stateGroup .state-title {
|
|
23
|
+
font-weight: bolder;
|
|
24
|
+
fill: ${t.stateLabelColor};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
g.stateGroup rect {
|
|
28
|
+
fill: ${t.mainBkg};
|
|
29
|
+
stroke: ${t.nodeBorder};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
g.stateGroup line {
|
|
33
|
+
stroke: ${t.lineColor};
|
|
34
|
+
stroke-width: ${t.strokeWidth||1};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.transition {
|
|
38
|
+
stroke: ${t.transitionColor};
|
|
39
|
+
stroke-width: ${t.strokeWidth||1};
|
|
40
|
+
fill: none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.stateGroup .composit {
|
|
44
|
+
fill: ${t.background};
|
|
45
|
+
border-bottom: 1px
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.stateGroup .alt-composit {
|
|
49
|
+
fill: #e0e0e0;
|
|
50
|
+
border-bottom: 1px
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.state-note {
|
|
54
|
+
stroke: ${t.noteBorderColor};
|
|
55
|
+
fill: ${t.noteBkgColor};
|
|
56
|
+
|
|
57
|
+
text {
|
|
58
|
+
fill: ${t.noteTextColor};
|
|
59
|
+
stroke: none;
|
|
60
|
+
font-size: 10px;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.stateLabel .box {
|
|
65
|
+
stroke: none;
|
|
66
|
+
stroke-width: 0;
|
|
67
|
+
fill: ${t.mainBkg};
|
|
68
|
+
opacity: 0.5;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.edgeLabel .label rect {
|
|
72
|
+
fill: ${t.labelBackgroundColor};
|
|
73
|
+
opacity: 0.5;
|
|
74
|
+
}
|
|
75
|
+
.edgeLabel {
|
|
76
|
+
background-color: ${t.edgeLabelBackground};
|
|
77
|
+
p {
|
|
78
|
+
background-color: ${t.edgeLabelBackground};
|
|
79
|
+
}
|
|
80
|
+
rect {
|
|
81
|
+
opacity: 0.5;
|
|
82
|
+
background-color: ${t.edgeLabelBackground};
|
|
83
|
+
fill: ${t.edgeLabelBackground};
|
|
84
|
+
}
|
|
85
|
+
text-align: center;
|
|
86
|
+
}
|
|
87
|
+
.edgeLabel .label text {
|
|
88
|
+
fill: ${t.transitionLabelColor||t.tertiaryTextColor};
|
|
89
|
+
}
|
|
90
|
+
.label div .edgeLabel {
|
|
91
|
+
color: ${t.transitionLabelColor||t.tertiaryTextColor};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.stateLabel text {
|
|
95
|
+
fill: ${t.stateLabelColor};
|
|
96
|
+
font-size: 10px;
|
|
97
|
+
font-weight: bold;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.node circle.state-start {
|
|
101
|
+
fill: ${t.specialStateColor};
|
|
102
|
+
stroke: ${t.specialStateColor};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.node .fork-join {
|
|
106
|
+
fill: ${t.specialStateColor};
|
|
107
|
+
stroke: ${t.specialStateColor};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.node circle.state-end {
|
|
111
|
+
fill: ${t.innerEndBackground};
|
|
112
|
+
stroke: ${t.background};
|
|
113
|
+
stroke-width: 1.5
|
|
114
|
+
}
|
|
115
|
+
.end-state-inner {
|
|
116
|
+
fill: ${t.compositeBackground||t.background};
|
|
117
|
+
// stroke: ${t.background};
|
|
118
|
+
stroke-width: 1.5
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.node rect {
|
|
122
|
+
fill: ${t.stateBkg||t.mainBkg};
|
|
123
|
+
stroke: ${t.stateBorder||t.nodeBorder};
|
|
124
|
+
stroke-width: ${t.strokeWidth||1}px;
|
|
125
|
+
}
|
|
126
|
+
.node polygon {
|
|
127
|
+
fill: ${t.mainBkg};
|
|
128
|
+
stroke: ${t.stateBorder||t.nodeBorder};;
|
|
129
|
+
stroke-width: ${t.strokeWidth||1}px;
|
|
130
|
+
}
|
|
131
|
+
[id$="-barbEnd"] {
|
|
132
|
+
fill: ${t.lineColor};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.statediagram-cluster rect {
|
|
136
|
+
fill: ${t.compositeTitleBackground};
|
|
137
|
+
stroke: ${t.stateBorder||t.nodeBorder};
|
|
138
|
+
stroke-width: ${t.strokeWidth||1}px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.cluster-label, .nodeLabel {
|
|
142
|
+
color: ${t.stateLabelColor};
|
|
143
|
+
// line-height: 1;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.statediagram-cluster rect.outer {
|
|
147
|
+
rx: 5px;
|
|
148
|
+
ry: 5px;
|
|
149
|
+
}
|
|
150
|
+
.statediagram-state .divider {
|
|
151
|
+
stroke: ${t.stateBorder||t.nodeBorder};
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.statediagram-state .title-state {
|
|
155
|
+
rx: 5px;
|
|
156
|
+
ry: 5px;
|
|
157
|
+
}
|
|
158
|
+
.statediagram-cluster.statediagram-cluster .inner {
|
|
159
|
+
fill: ${t.compositeBackground||t.background};
|
|
160
|
+
}
|
|
161
|
+
.statediagram-cluster.statediagram-cluster-alt .inner {
|
|
162
|
+
fill: ${t.altBackground?t.altBackground:"#efefef"};
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.statediagram-cluster .inner {
|
|
166
|
+
rx:0;
|
|
167
|
+
ry:0;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.statediagram-state rect.basic {
|
|
171
|
+
rx: 5px;
|
|
172
|
+
ry: 5px;
|
|
173
|
+
}
|
|
174
|
+
.statediagram-state rect.divider {
|
|
175
|
+
stroke-dasharray: 10,10;
|
|
176
|
+
fill: ${t.altBackground?t.altBackground:"#efefef"};
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.note-edge {
|
|
180
|
+
stroke-dasharray: 5;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.statediagram-note rect {
|
|
184
|
+
fill: ${t.noteBkgColor};
|
|
185
|
+
stroke: ${t.noteBorderColor};
|
|
186
|
+
stroke-width: 1px;
|
|
187
|
+
rx: 0;
|
|
188
|
+
ry: 0;
|
|
189
|
+
}
|
|
190
|
+
.statediagram-note rect {
|
|
191
|
+
fill: ${t.noteBkgColor};
|
|
192
|
+
stroke: ${t.noteBorderColor};
|
|
193
|
+
stroke-width: 1px;
|
|
194
|
+
rx: 0;
|
|
195
|
+
ry: 0;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.statediagram-note text {
|
|
199
|
+
fill: ${t.noteTextColor};
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.statediagram-note .nodeLabel {
|
|
203
|
+
color: ${t.noteTextColor};
|
|
204
|
+
}
|
|
205
|
+
.statediagram .edgeLabel {
|
|
206
|
+
color: red; // ${t.noteTextColor};
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
[id$="-dependencyStart"], [id$="-dependencyEnd"] {
|
|
210
|
+
fill: ${t.lineColor};
|
|
211
|
+
stroke: ${t.lineColor};
|
|
212
|
+
stroke-width: ${t.strokeWidth||1};
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.statediagramTitleText {
|
|
216
|
+
text-anchor: middle;
|
|
217
|
+
font-size: 18px;
|
|
218
|
+
fill: ${t.textColor};
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
[data-look="neo"].statediagram-cluster rect {
|
|
222
|
+
fill: ${t.mainBkg};
|
|
223
|
+
stroke: ${t.useGradient?"url("+t.svgId+"-gradient)":t.stateBorder||t.nodeBorder};
|
|
224
|
+
stroke-width: ${t.strokeWidth??1};
|
|
225
|
+
}
|
|
226
|
+
[data-look="neo"].statediagram-cluster rect.outer {
|
|
227
|
+
rx: ${t.radius}px;
|
|
228
|
+
ry: ${t.radius}px;
|
|
229
|
+
filter: ${t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${t.svgId}-drop-shadow)`):"none"}
|
|
230
|
+
}
|
|
231
|
+
`,"getStyles"),We=Oe;export{Be as Y,Ge as _,We as g,Pe as q};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as l,i as n,ao as o,
|
|
1
|
+
import{m as l,i as n,ao as o,f as d,g as p}from"./index-VTKdaklA.js";var x=d(p()),y=l((a,t)=>{let e=a.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(let r in t.attrs)e.attr(r,t.attrs[r]);return t.class&&e.attr("class",t.class),e},"drawRect"),h=l((a,t)=>{let e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};y(a,e).lower()},"drawBackgroundRect"),g=l((a,t)=>{let e=t.text.replace(o," "),r=a.append("text");r.attr("x",t.x),r.attr("y",t.y),r.attr("class","legend"),r.style("text-anchor",t.anchor),t.class&&r.attr("class",t.class);let s=r.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.text(e),r},"drawText"),f=l((a,t,e,r)=>{let s=a.append("image");s.attr("x",t),s.attr("y",e);let i=(0,x.sanitizeUrl)(r);s.attr("xlink:href",i)},"drawImage"),m=l((a,t,e,r)=>{let s=a.append("use");s.attr("x",t),s.attr("y",e);let i=(0,x.sanitizeUrl)(r);s.attr("xlink:href",`#${i}`)},"drawEmbeddedImage"),w=l(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),u=l(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),k=l(()=>{let a=n(".mermaidTooltip");return a.empty()&&(a=n("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),a},"createTooltip");export{f as E,u as G,k as T,g as f,h as g,m as h,w as u,y as x};
|