@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
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d}from"./wardley-L42UT6IY-5TKZOOLJ-C-ZcgEBb.js";import{m as e,p as s,a7 as n,b as o}from"./index-VTKdaklA.js";var p={parse:e(async r=>{let a=await d("info",r);s.debug(a)},"parse")},m={version:"11.15.0"},g=e(()=>m.version,"getVersion"),v={getVersion:g},f=e((r,a,i)=>{s.debug(`rendering info diagram
|
|
2
|
+
`+r);let t=n(a);o(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${i}`)},"draw"),l={draw:f},c={parser:p,db:v,renderer:l};export{c as diagram};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{m as h,q as ot,a8 as yt,a7 as dt,
|
|
1
|
+
import{m as h,q as ot,a8 as yt,a7 as dt,aM as pt,u as gt,C as ft,n as st,s as kt,e as mt,a as wt,l as xt,o as bt,b as _t}from"./index-VTKdaklA.js";var et=function(){var i=h(function(v,t,e,l){for(e=e||{},l=v.length;l--;e[v[l]]=t);return e},"o"),o=[1,4],a=[1,14],n=[1,12],s=[1,13],u=[6,7,8],g=[1,20],c=[1,18],y=[1,19],p=[6,7,11],m=[1,6,13,14],f=[1,23],$=[1,24],_=[1,6,7,11,13,14],B={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:h(function(v,t,e,l,d,r,k){var w=r.length-1;switch(d){case 6:case 7:return l;case 15:l.addNode(r[w-1].length,r[w].trim());break;case 16:l.addNode(0,r[w].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:o},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:o},{6:a,7:[1,10],9:9,12:11,13:n,14:s},i(u,[2,3]),{1:[2,2]},i(u,[2,4]),i(u,[2,5]),{1:[2,6],6:a,12:15,13:n,14:s},{6:a,9:16,12:11,13:n,14:s},{6:g,7:c,10:17,11:y},i(p,[2,18],{14:[1,21]}),i(p,[2,16]),i(p,[2,17]),{6:g,7:c,10:22,11:y},{1:[2,7],6:a,12:15,13:n,14:s},i(m,[2,14],{7:f,11:$}),i(_,[2,8]),i(_,[2,9]),i(_,[2,10]),i(p,[2,15]),i(m,[2,13],{7:f,11:$}),i(_,[2,11]),i(_,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:h(function(v,t){if(t.recoverable)this.trace(v);else{var e=new Error(v);throw e.hash=t,e}},"parseError"),parse:h(function(v){var t=this,e=[0],l=[],d=[null],r=[],k=this.table,w="",b=0,C=0,S=0,M=2,P=1,F=r.slice.call(arguments,1),x=Object.create(this.lexer),W={yy:{}};for(var I in this.yy)Object.prototype.hasOwnProperty.call(this.yy,I)&&(W.yy[I]=this.yy[I]);x.setInput(v,W.yy),W.yy.lexer=x,W.yy.parser=this,typeof x.yylloc>"u"&&(x.yylloc={});var T=x.yylloc;r.push(T);var z=x.options&&x.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Z(N){e.length=e.length-2*N,d.length=d.length-N,r.length=r.length-N}h(Z,"popStack");function G(){var N;return N=l.pop()||x.lex()||P,typeof N!="number"&&(N instanceof Array&&(l=N,N=l.pop()),N=t.symbols_[N]||N),N}h(G,"lex");for(var E,Q,O,D,Rt,J,j={},U,R,it,q;;){if(O=e[e.length-1],this.defaultActions[O]?D=this.defaultActions[O]:((E===null||typeof E>"u")&&(E=G()),D=k[O]&&k[O][E]),typeof D>"u"||!D.length||!D[0]){var V="";q=[];for(U in k[O])this.terminals_[U]&&U>M&&q.push("'"+this.terminals_[U]+"'");x.showPosition?V="Parse error on line "+(b+1)+`:
|
|
2
2
|
`+x.showPosition()+`
|
|
3
|
-
Expecting `+q.join(", ")+", got '"+(this.terminals_[E]||E)+"'":V="Parse error on line "+(b+1)+": Unexpected "+(E==P?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(V,{text:x.match,token:this.terminals_[E]||E,line:x.yylineno,loc:T,expected:q})}if(D[0]instanceof Array&&D.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+E);switch(D[0]){case 1:e.push(E),d.push(x.yytext),r.push(x.yylloc),e.push(D[1]),E=null,Q?(E=Q,Q=null):(C=x.yyleng,w=x.yytext,b=x.yylineno,T=x.yylloc,S>0);break;case 2:if(R=this.productions_[D[1]][1],
|
|
3
|
+
Expecting `+q.join(", ")+", got '"+(this.terminals_[E]||E)+"'":V="Parse error on line "+(b+1)+": Unexpected "+(E==P?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(V,{text:x.match,token:this.terminals_[E]||E,line:x.yylineno,loc:T,expected:q})}if(D[0]instanceof Array&&D.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+E);switch(D[0]){case 1:e.push(E),d.push(x.yytext),r.push(x.yylloc),e.push(D[1]),E=null,Q?(E=Q,Q=null):(C=x.yyleng,w=x.yytext,b=x.yylineno,T=x.yylloc,S>0);break;case 2:if(R=this.productions_[D[1]][1],j.$=d[d.length-R],j._$={first_line:r[r.length-(R||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(R||1)].first_column,last_column:r[r.length-1].last_column},z&&(j._$.range=[r[r.length-(R||1)].range[0],r[r.length-1].range[1]]),J=this.performAction.apply(j,[w,C,b,W.yy,D[1],d,r].concat(F)),typeof J<"u")return J;R&&(e=e.slice(0,-1*R*2),d=d.slice(0,-1*R),r=r.slice(0,-1*R)),e.push(this.productions_[D[1]][0]),d.push(j.$),r.push(j._$),it=k[e[e.length-2]][e[e.length-1]],e.push(it);break;case 3:return!0}}return!0},"parse")},A=function(){var v={EOF:1,parseError:h(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw new Error(t)},"parseError"),setInput:h(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:h(function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:h(function(t){var e=t.length,l=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===d.length?this.yylloc.first_column:0)+d[d.length-l.length].length-l[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(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:h(function(t){this.unput(this.match.slice(t))},"less"),pastInput:h(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
|
5
5
|
`+e+"^"},"showPosition"),test_match:h(function(t,e){var l,d,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),d=t[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],l=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var k in r)this[k]=r[k];return!1}return!1},"test_match"),next:h(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,l,d;this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),k=0;k<r.length;k++)if(l=this._input.match(this.rules[r[k]]),l&&(!e||l[0].length>e[0].length)){if(e=l,d=k,this.options.backtrack_lexer){if(t=this.test_match(l,r[k]),t!==!1)return t;if(this._backtrack){e=!1;continue}else return!1}else if(!this.options.flex)break}return e?(t=this.test_match(e,r[d]),t!==!1?t:!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:h(function(){var t=this.next();return t||this.lex()},"lex"),begin:h(function(t){this.conditionStack.push(t)},"begin"),popState:h(function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:h(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:h(function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:h(function(t){this.begin(t)},"pushState"),stateStackSize:h(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:h(function(t,e,l,d){switch(l){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return v}();B.lexer=A;function L(){this.yy={}}return h(L,"Parser"),L.prototype=B,B.Parser=L,new L}();et.parser=et;var vt=et,Y,St=(Y=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,gt()}getRoot(){return this.root}addNode(o,a){let n=ft.sanitizeText(a,ot());if(!this.root){this.root={text:n,children:[]},this.stack=[{level:0,node:this.root}],st(n);return}this.baseLevel??(this.baseLevel=o);let s=o-this.baseLevel+1;for(s<=0&&(s=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=s;)this.stack.pop();let u=this.stack[this.stack.length-1].node,g={text:n,children:[]};u.children.push(g),this.stack.push({level:s,node:g})}getAccTitle(){return kt()}setAccTitle(o){mt(o)}getAccDescription(){return wt()}setAccDescription(o){xt(o)}getDiagramTitle(){return bt()}setDiagramTitle(o){st(o)}},h(Y,"IshikawaDB"),Y),$t=14,
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:h(function(){var t=this.next();return t||this.lex()},"lex"),begin:h(function(t){this.conditionStack.push(t)},"begin"),popState:h(function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:h(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:h(function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:h(function(t){this.begin(t)},"pushState"),stateStackSize:h(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:h(function(t,e,l,d){switch(l){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return v}();B.lexer=A;function L(){this.yy={}}return h(L,"Parser"),L.prototype=B,B.Parser=L,new L}();et.parser=et;var vt=et,Y,St=(Y=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,gt()}getRoot(){return this.root}addNode(o,a){let n=ft.sanitizeText(a,ot());if(!this.root){this.root={text:n,children:[]},this.stack=[{level:0,node:this.root}],st(n);return}this.baseLevel??(this.baseLevel=o);let s=o-this.baseLevel+1;for(s<=0&&(s=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=s;)this.stack.pop();let u=this.stack[this.stack.length-1].node,g={text:n,children:[]};u.children.push(g),this.stack.push({level:s,node:g})}getAccTitle(){return kt()}setAccTitle(o){mt(o)}getAccDescription(){return wt()}setAccDescription(o){xt(o)}getDiagramTitle(){return bt()}setDiagramTitle(o){st(o)}},h(Y,"IshikawaDB"),Y),$t=14,K=250,It=30,Et=60,At=5,ct=82*Math.PI/180,nt=Math.cos(ct),at=Math.sin(ct),rt=h((i,o,a)=>{let n=i.node().getBBox(),s=n.width+o*2,u=n.height+o*2;_t(i,u,s,a),i.attr("viewBox",`${n.x-o} ${n.y-o} ${s} ${u}`)},"applyPaddedViewBox"),Mt=h((i,o,a,n)=>{var x,W;let s=n.db.getRoot();if(!s)return;let u=ot(),{look:g,handDrawnSeed:c,themeVariables:y}=u,p=yt(u.fontSize)[0]??$t,m=g==="handDrawn",f=s.children??[],$=((x=u.ishikawa)==null?void 0:x.diagramPadding)??20,_=((W=u.ishikawa)==null?void 0:W.useMaxWidth)??!1,B=dt(o),A=B.append("g").attr("class","ishikawa"),L=m?pt.svg(B.node()):void 0,v=L?{roughSvg:L,seed:c??0,lineColor:(y==null?void 0:y.lineColor)??"#333",fillColor:(y==null?void 0:y.mainBkg)??"#fff"}:void 0,t=`ishikawa-arrow-${o}`;m||A.append("defs").append("marker").attr("id",t).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let e=0,l=K,d=m?void 0:X(A,e,l,e,l,"ishikawa-spine");if(Pt(A,e,l,s.text,p,v),!f.length){m&&X(A,e,l,e,l,"ishikawa-spine",v),rt(B,$,_);return}e-=20;let r=f.filter((I,T)=>T%2===0),k=f.filter((I,T)=>T%2===1),w=lt(r),b=lt(k),C=w.total+b.total,S=K,M=K;if(C>0){let I=K*2,T=K*.3;S=Math.max(T,I*(w.total/C)),M=Math.max(T,I*(b.total/C))}let P=p*2;S=Math.max(S,w.max*P),M=Math.max(M,b.max*P),l=Math.max(S,K),d&&d.attr("y1",l).attr("y2",l),A.select(".ishikawa-head-group").attr("transform",`translate(0,${l})`);let F=Math.ceil(f.length/2);for(let I=0;I<F;I++){let T=A.append("g").attr("class","ishikawa-pair");for(let[z,Z,G]of[[f[I*2],-1,S],[f[I*2+1],1,M]])z&&Tt(T,z,e,l,Z,G,p,v);e=T.selectAll("text").nodes().reduce((z,Z)=>Math.min(z,Z.getBBox().x),1/0)}if(m)X(A,e,l,0,l,"ishikawa-spine",v);else{d.attr("x1",e);let I=`url(#${t})`;A.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",I)}rt(B,$,_)},"draw"),lt=h(i=>{let o=h(a=>a.children.reduce((n,s)=>n+1+o(s),0),"countDescendants");return i.reduce((a,n)=>{let s=o(n);return a.total+=s,a.max=Math.max(a.max,s),a},{total:0,max:0})},"sideStats"),Pt=h((i,o,a,n,s,u)=>{let g=Math.max(6,Math.floor(110/(s*.6))),c=i.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${o},${a})`),y=H(c,ut(n,g),0,0,"ishikawa-head-label","start",s),p=y.node().getBBox(),m=Math.max(60,p.width+6),f=Math.max(40,p.height*2+40),$=`M 0 ${-f/2} L 0 ${f/2} Q ${m*2.4} 0 0 ${-f/2} Z`;if(u){let _=u.roughSvg.path($,{roughness:1.5,seed:u.seed,fill:u.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:u.lineColor,strokeWidth:2});c.insert(()=>_,":first-child").attr("class","ishikawa-head")}else c.insert("path",":first-child").attr("class","ishikawa-head").attr("d",$);y.attr("transform",`translate(${(m-p.width)/2-p.x+3},${-p.y-p.height/2})`)},"drawHead"),Bt=h((i,o)=>{let a=[],n=[],s=h((u,g,c)=>{let y=o===-1?[...u].reverse():u;for(let p of y){let m=a.length,f=p.children??[];a.push({depth:c,text:ut(p.text,15),parentIndex:g,childCount:f.length}),c%2===0?(n.push(m),f.length&&s(f,m,c+1)):(f.length&&s(f,m,c+1),n.push(m))}},"walk");return s(i,-1,2),{entries:a,yOrder:n}},"flattenTree"),Ct=h((i,o,a,n,s,u,g)=>{let c=i.append("g").attr("class","ishikawa-label-group"),y=H(c,o,a,n+11*s,"ishikawa-label cause","middle",u).node().getBBox();if(g){let p=g.roughSvg.rectangle(y.x-20,y.y-2,y.width+40,y.height+4,{roughness:1.5,seed:g.seed,fill:g.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:g.lineColor,strokeWidth:2});c.insert(()=>p,":first-child").attr("class","ishikawa-label-box")}else c.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",y.x-20).attr("y",y.y-2).attr("width",y.width+40).attr("height",y.height+4)},"drawCauseLabel"),tt=h((i,o,a,n,s,u)=>{let g=Math.sqrt(n*n+s*s);if(g===0)return;let c=n/g,y=s/g,p=6,m=-y*p,f=c*p,$=o,_=a,B=`M ${$} ${_} L ${$-c*p*2+m} ${_-y*p*2+f} L ${$-c*p*2-m} ${_-y*p*2-f} Z`,A=u.roughSvg.path(B,{roughness:1,seed:u.seed,fill:u.lineColor,fillStyle:"solid",stroke:u.lineColor,strokeWidth:1});i.append(()=>A)},"drawArrowMarker"),Tt=h((i,o,a,n,s,u,g,c)=>{let y=o.children??[],p=u*(y.length?1:.2),m=-nt*p,f=at*p*s,$=a+m,_=n+f;if(X(i,a,n,$,_,"ishikawa-branch",c),c&&tt(i,a,n,a-$,n-_,c),Ct(i,o.text,$,_,s,g,c),!y.length)return;let{entries:B,yOrder:A}=Bt(y,s),L=B.length,v=new Array(L);for(let[r,k]of A.entries())v[k]=n+f*((r+1)/(L+1));let t=new Map;t.set(-1,{x0:a,y0:n,x1:$,y1:_,childCount:y.length,childrenDrawn:0});let e=-nt,l=at*s,d=s<0?"ishikawa-label up":"ishikawa-label down";for(let[r,k]of B.entries()){let w=v[r],b=t.get(k.parentIndex),C=i.append("g").attr("class","ishikawa-sub-group"),S=0,M=0,P=0;if(k.depth%2===0){let F=b.y1-b.y0;S=ht(b.x0,b.x1,F?(w-b.y0)/F:.5),M=w,P=S-(k.childCount>0?Et+k.childCount*At:It),X(C,S,w,P,w,"ishikawa-sub-branch",c),c&&tt(C,S,w,1,0,c),H(C,k.text,P,w,"ishikawa-label align","end",g)}else{let F=b.childrenDrawn++;S=ht(b.x0,b.x1,(b.childCount-F)/(b.childCount+1)),M=b.y0,P=S+e*((w-M)/l),X(C,S,M,P,w,"ishikawa-sub-branch",c),c&&tt(C,S,M,S-P,M-w,c),H(C,k.text,P,w,d,"end",g)}k.childCount>0&&t.set(r,{x0:S,y0:M,x1:P,y1:w,childCount:k.childCount,childrenDrawn:0})}},"drawBranch"),Nt=h(i=>i.split(/<br\s*\/?>|\n/),"splitLines"),ut=h((i,o)=>{if(i.length<=o)return i;let a=[];for(let n of i.split(/\s+/)){let s=a.length-1;s>=0&&a[s].length+1+n.length<=o?a[s]+=" "+n:a.push(n)}return a.join(`
|
|
7
7
|
`)},"wrapText"),H=h((i,o,a,n,s,u,g)=>{let c=Nt(o),y=g*1.05,p=i.append("text").attr("class",s).attr("text-anchor",u).attr("x",a).attr("y",n-(c.length-1)*y/2);for(let[m,f]of c.entries())p.append("tspan").attr("x",a).attr("dy",m===0?0:y).text(f);return p},"drawMultilineText"),ht=h((i,o,a)=>i+(o-i)*a,"lerp"),X=h((i,o,a,n,s,u,g)=>{if(g){let c=g.roughSvg.line(o,a,n,s,{roughness:1.5,seed:g.seed,stroke:g.lineColor,strokeWidth:2});i.append(()=>c).attr("class",u);return}return i.append("line").attr("class",u).attr("x1",o).attr("y1",a).attr("x2",n).attr("y2",s)},"drawLine"),Dt={draw:Mt},Lt=h(i=>`
|
|
8
8
|
.ishikawa .ishikawa-spine,
|
|
9
9
|
.ishikawa .ishikawa-branch,
|
package/dist/web/assets/{journeyDiagram-SO5T7YLQ-RMFPNNqz.js → journeyDiagram-M6C3CM3L-B5ojIuqu.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as mt}from"./chunk-
|
|
1
|
+
import{o as mt}from"./chunk-AZZRMDJM-BHlLC7p3.js";import{g as xt,u as ot,f as kt,x as _t}from"./chunk-LII3EMHJ-Dqq0Qguw.js";import{a as bt,l as wt,s as $t,e as vt,o as St,n as Mt,m as s,q as L,i as W,b as Et,u as Tt,a9 as it}from"./index-VTKdaklA.js";var Z=function(){var e=s(function(d,i,n,y){for(n=n||{},y=d.length;y--;n[d[y]]=i);return n},"o"),t=[6,8,10,11,12,14,16,17,18],o=[1,9],p=[1,10],r=[1,11],l=[1,12],c=[1,13],h=[1,14],f={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(d,i,n,y,u,a,k){var x=a.length-1;switch(u){case 1:return a[x-1];case 2:this.$=[];break;case 3:a[x-1].push(a[x]),this.$=a[x-1];break;case 4:case 5:this.$=a[x];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(a[x].substr(6)),this.$=a[x].substr(6);break;case 9:this.$=a[x].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=a[x].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(a[x].substr(8)),this.$=a[x].substr(8);break;case 13:y.addTask(a[x-1],a[x]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:o,12:p,14:r,16:l,17:c,18:h},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:15,11:o,12:p,14:r,16:l,17:c,18:h},e(t,[2,5]),e(t,[2,6]),e(t,[2,8]),{13:[1,16]},{15:[1,17]},e(t,[2,11]),e(t,[2,12]),{19:[1,18]},e(t,[2,4]),e(t,[2,9]),e(t,[2,10]),e(t,[2,13])],defaultActions:{},parseError:s(function(d,i){if(i.recoverable)this.trace(d);else{var n=new Error(d);throw n.hash=i,n}},"parseError"),parse:s(function(d){var i=this,n=[0],y=[],u=[null],a=[],k=this.table,x="",C=0,P=0,pt=0,yt=2,H=1,dt=a.slice.call(arguments,1),_=Object.create(this.lexer),A={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(A.yy[z]=this.yy[z]);_.setInput(d,A.yy),A.yy.lexer=_,A.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var q=_.yylloc;a.push(q);var ft=_.options&&_.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function gt(w){n.length=n.length-2*w,u.length=u.length-w,a.length=a.length-w}s(gt,"popStack");function tt(){var w;return w=y.pop()||_.lex()||H,typeof w!="number"&&(w instanceof Array&&(y=w,w=y.pop()),w=i.symbols_[w]||w),w}s(tt,"lex");for(var b,Y,I,$,Zt,G,j={},V,M,et,N;;){if(I=n[n.length-1],this.defaultActions[I]?$=this.defaultActions[I]:((b===null||typeof b>"u")&&(b=tt()),$=k[I]&&k[I][b]),typeof $>"u"||!$.length||!$[0]){var U="";N=[];for(V in k[I])this.terminals_[V]&&V>yt&&N.push("'"+this.terminals_[V]+"'");_.showPosition?U="Parse error on line "+(C+1)+`:
|
|
2
2
|
`+_.showPosition()+`
|
|
3
3
|
Expecting `+N.join(", ")+", got '"+(this.terminals_[b]||b)+"'":U="Parse error on line "+(C+1)+": Unexpected "+(b==H?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(U,{text:_.match,token:this.terminals_[b]||b,line:_.yylineno,loc:q,expected:N})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+b);switch($[0]){case 1:n.push(b),u.push(_.yytext),a.push(_.yylloc),n.push($[1]),b=null,Y?(b=Y,Y=null):(P=_.yyleng,x=_.yytext,C=_.yylineno,q=_.yylloc,pt>0);break;case 2:if(M=this.productions_[$[1]][1],j.$=u[u.length-M],j._$={first_line:a[a.length-(M||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(M||1)].first_column,last_column:a[a.length-1].last_column},ft&&(j._$.range=[a[a.length-(M||1)].range[0],a[a.length-1].range[1]]),G=this.performAction.apply(j,[x,P,C,A.yy,$[1],u,a].concat(dt)),typeof G<"u")return G;M&&(n=n.slice(0,-1*M*2),u=u.slice(0,-1*M),a=a.slice(0,-1*M)),n.push(this.productions_[$[1]][0]),u.push(j.$),a.push(j._$),et=k[n[n.length-2]][n[n.length-1]],n.push(et);break;case 3:return!0}}return!0},"parse")},m=function(){var d={EOF:1,parseError:s(function(i,n){if(this.yy.parser)this.yy.parser.parseError(i,n);else throw new Error(i)},"parseError"),setInput:s(function(i,n){return this.yy=n||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var n=i.length,y=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var u=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),y.length-1&&(this.yylineno-=y.length-1);var a=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:y?(y.length===u.length?this.yylloc.first_column:0)+u[u.length-y.length].length-y[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(i){this.unput(this.match.slice(i))},"less"),pastInput:s(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{m as o,p as te,q as W,a7 as fe,av as me,aw as be,ax as
|
|
1
|
+
import{m as o,p as te,q as W,a7 as fe,av as me,aw as be,ax as Ee,as as ke,E as J,d as U,A as _e,r as Se,ap as Ne,aq as le,ar as ce}from"./index-VTKdaklA.js";import{o as xe}from"./chunk-AZZRMDJM-BHlLC7p3.js";var Z=function(){var i=o(function(_,e,n,a){for(n=n||{},a=_.length;a--;n[_[a]]=e);return n},"o"),g=[1,4],d=[1,13],r=[1,12],u=[1,15],p=[1,16],k=[1,20],c=[1,19],D=[6,7,8],w=[1,26],O=[1,24],v=[1,25],s=[6,7,11],T=[1,31],C=[6,7,11,24],F=[1,6,13,16,17,20,23],M=[1,35],H=[1,36],I=[1,6,7,11,13,16,17,20,23],G=[1,38],y={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:o(function(_,e,n,a,h,t,b){var l=t.length-1;switch(h){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",t[l-1].id),a.addNode(t[l-2].length,t[l-1].id,t[l-1].descr,t[l-1].type,t[l]);break;case 16:a.getLogger().info("Node: ",t[l].id),a.addNode(t[l-1].length,t[l].id,t[l].descr,t[l].type);break;case 17:a.getLogger().trace("Icon: ",t[l]),a.decorateNode({icon:t[l]});break;case 18:case 23:a.decorateNode({class:t[l]});break;case 19:a.getLogger().trace("SPACELIST");break;case 20:a.getLogger().trace("Node: ",t[l-1].id),a.addNode(0,t[l-1].id,t[l-1].descr,t[l-1].type,t[l]);break;case 21:a.getLogger().trace("Node: ",t[l].id),a.addNode(0,t[l].id,t[l].descr,t[l].type);break;case 22:a.decorateNode({icon:t[l]});break;case 27:a.getLogger().trace("node found ..",t[l-2]),this.$={id:t[l-1],descr:t[l-1],type:a.getType(t[l-2],t[l])};break;case 28:this.$={id:t[l],descr:t[l],type:0};break;case 29:a.getLogger().trace("node found ..",t[l-3]),this.$={id:t[l-3],descr:t[l-1],type:a.getType(t[l-2],t[l])};break;case 30:this.$=t[l-1]+t[l];break;case 31:this.$=t[l];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:g},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:g},{6:d,7:[1,10],9:9,12:11,13:r,14:14,16:u,17:p,18:17,19:18,20:k,23:c},i(D,[2,3]),{1:[2,2]},i(D,[2,4]),i(D,[2,5]),{1:[2,6],6:d,12:21,13:r,14:14,16:u,17:p,18:17,19:18,20:k,23:c},{6:d,9:22,12:11,13:r,14:14,16:u,17:p,18:17,19:18,20:k,23:c},{6:w,7:O,10:23,11:v},i(s,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:k,23:c}),i(s,[2,19]),i(s,[2,21],{15:30,24:T}),i(s,[2,22]),i(s,[2,23]),i(C,[2,25]),i(C,[2,26]),i(C,[2,28],{20:[1,32]}),{21:[1,33]},{6:w,7:O,10:34,11:v},{1:[2,7],6:d,12:21,13:r,14:14,16:u,17:p,18:17,19:18,20:k,23:c},i(F,[2,14],{7:M,11:H}),i(I,[2,8]),i(I,[2,9]),i(I,[2,10]),i(s,[2,16],{15:37,24:T}),i(s,[2,17]),i(s,[2,18]),i(s,[2,20],{24:G}),i(C,[2,31]),{21:[1,39]},{22:[1,40]},i(F,[2,13],{7:M,11:H}),i(I,[2,11]),i(I,[2,12]),i(s,[2,15],{24:G}),i(C,[2,30]),{22:[1,41]},i(C,[2,27]),i(C,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(_,e){if(e.recoverable)this.trace(_);else{var n=new Error(_);throw n.hash=e,n}},"parseError"),parse:o(function(_){var e=this,n=[0],a=[],h=[null],t=[],b=this.table,l="",K=0,ne=0,ge=0,ue=2,re=1,de=t.slice.call(arguments,1),m=Object.create(this.lexer),R={yy:{}};for(var q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,q)&&(R.yy[q]=this.yy[q]);m.setInput(_,R.yy),R.yy.lexer=m,R.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var Q=m.yylloc;t.push(Q);var pe=m.options&&m.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ye(S){n.length=n.length-2*S,h.length=h.length-S,t.length=t.length-S}o(ye,"popStack");function ae(){var S;return S=a.pop()||m.lex()||re,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=e.symbols_[S]||S),S}o(ae,"lex");for(var E,V,P,x,We,X,B={},j,A,oe,z;;){if(P=n[n.length-1],this.defaultActions[P]?x=this.defaultActions[P]:((E===null||typeof E>"u")&&(E=ae()),x=b[P]&&b[P][E]),typeof x>"u"||!x.length||!x[0]){var Y="";z=[];for(j in b[P])this.terminals_[j]&&j>ue&&z.push("'"+this.terminals_[j]+"'");m.showPosition?Y="Parse error on line "+(K+1)+`:
|
|
2
2
|
`+m.showPosition()+`
|
|
3
|
-
Expecting `+z.join(", ")+", got '"+(this.terminals_[
|
|
3
|
+
Expecting `+z.join(", ")+", got '"+(this.terminals_[E]||E)+"'":Y="Parse error on line "+(K+1)+": Unexpected "+(E==re?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(Y,{text:m.match,token:this.terminals_[E]||E,line:m.yylineno,loc:Q,expected:z})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+E);switch(x[0]){case 1:n.push(E),h.push(m.yytext),t.push(m.yylloc),n.push(x[1]),E=null,V?(E=V,V=null):(ne=m.yyleng,l=m.yytext,K=m.yylineno,Q=m.yylloc,ge>0);break;case 2:if(A=this.productions_[x[1]][1],B.$=h[h.length-A],B._$={first_line:t[t.length-(A||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(A||1)].first_column,last_column:t[t.length-1].last_column},pe&&(B._$.range=[t[t.length-(A||1)].range[0],t[t.length-1].range[1]]),X=this.performAction.apply(B,[l,ne,K,R.yy,x[1],h,t].concat(de)),typeof X<"u")return X;A&&(n=n.slice(0,-1*A*2),h=h.slice(0,-1*A),t=t.slice(0,-1*A)),n.push(this.productions_[x[1]][0]),h.push(B.$),t.push(B._$),oe=b[n[n.length-2]][n[n.length-1]],n.push(oe);break;case 3:return!0}}return!0},"parse")},$=function(){var _={EOF:1,parseError:o(function(e,n){if(this.yy.parser)this.yy.parser.parseError(e,n);else throw new Error(e)},"parseError"),setInput:o(function(e,n){return this.yy=n||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var n=e.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),e},"input"),unput:o(function(e){var n=e.length,a=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var h=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),a.length-1&&(this.yylineno-=a.length-1);var t=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:a?(a.length===h.length?this.yylloc.first_column:0)+h[h.length-a.length].length-a[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[t[0],t[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(e){this.unput(this.match.slice(e))},"less"),pastInput:o(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var e=this.pastInput(),n=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
|
|
5
5
|
`+n+"^"},"showPosition"),test_match:o(function(e,n){var a,h,t;if(this.options.backtrack_lexer&&(t={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&&(t.yylloc.range=this.yylloc.range.slice(0))),h=e[0].match(/(?:\r\n?|\n).*/g),h&&(this.yylineno+=h.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:h?h[h.length-1].length-h[h.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],a=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var b in t)this[b]=t[b];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,n,a,h;this._more||(this.yytext="",this.match="");for(var t=this._currentRules(),b=0;b<t.length;b++)if(a=this._input.match(this.rules[t[b]]),a&&(!n||a[0].length>n[0].length)){if(n=a,h=b,this.options.backtrack_lexer){if(e=this.test_match(a,t[b]),e!==!1)return e;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(e=this.test_match(n,t[h]),e!==!1?e:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var e=this.next();return e||this.lex()},"lex"),begin:o(function(e){this.conditionStack.push(e)},"begin"),popState:o(function(){var e=this.conditionStack.length-1;return e>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:o(function(e){this.begin(e)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(e,n,a,h){switch(a){case 0:return this.pushState("shapeData"),n.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:let t=/\n\s*/g;return n.yytext=n.yytext.replace(t,"<br/>"),24;case 4:return 24;case 5:this.popState();break;case 6:return e.getLogger().trace("Found comment",n.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return e.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:e.getLogger().trace("end icon"),this.popState();break;case 16:return e.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return e.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:return this.begin("NODE"),20;case 21:return this.begin("NODE"),20;case 22:return this.begin("NODE"),20;case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return e.getLogger().trace("description:",n.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),e.getLogger().trace("node end ...",n.yytext),"NODE_DEND";case 36:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 37:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 38:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 39:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 40:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 41:return e.getLogger().trace("Long description:",n.yytext),21;case 42:return e.getLogger().trace("Long description:",n.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return _}();y.lexer=$;function N(){this.yy={}}return o(N,"Parser"),N.prototype=y,y.Parser=N,new N}();Z.parser=Z;var Le=Z,L=[],ie=[],ee=0,se={},De=o(()=>{L=[],ie=[],ee=0,se={}},"clear"),Oe=o(i=>{if(L.length===0)return null;let g=L[0].level,d=null;for(let r=L.length-1;r>=0;r--)if(L[r].level===g&&!d&&(d=L[r]),L[r].level<g)throw new Error('Items without section detected, found section ("'+L[r].label+'")');return i===(d==null?void 0:d.level)?null:d},"getSection"),he=o(function(){return ie},"getSections"),ve=o(function(){let i=[],g=[],d=he(),r=W();for(let u of d){let p={id:u.id,label:U(u.label??"",r),labelType:"markdown",isGroup:!0,ticket:u.ticket,shape:"kanbanSection",level:u.level,look:r.look};g.push(p);let
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var e=this.next();return e||this.lex()},"lex"),begin:o(function(e){this.conditionStack.push(e)},"begin"),popState:o(function(){var e=this.conditionStack.length-1;return e>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:o(function(e){this.begin(e)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(e,n,a,h){switch(a){case 0:return this.pushState("shapeData"),n.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:let t=/\n\s*/g;return n.yytext=n.yytext.replace(t,"<br/>"),24;case 4:return 24;case 5:this.popState();break;case 6:return e.getLogger().trace("Found comment",n.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return e.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:e.getLogger().trace("end icon"),this.popState();break;case 16:return e.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return e.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:return this.begin("NODE"),20;case 21:return this.begin("NODE"),20;case 22:return this.begin("NODE"),20;case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return e.getLogger().trace("description:",n.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),e.getLogger().trace("node end ...",n.yytext),"NODE_DEND";case 36:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 37:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 38:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 39:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 40:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 41:return e.getLogger().trace("Long description:",n.yytext),21;case 42:return e.getLogger().trace("Long description:",n.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return _}();y.lexer=$;function N(){this.yy={}}return o(N,"Parser"),N.prototype=y,y.Parser=N,new N}();Z.parser=Z;var Le=Z,L=[],ie=[],ee=0,se={},De=o(()=>{L=[],ie=[],ee=0,se={}},"clear"),Oe=o(i=>{if(L.length===0)return null;let g=L[0].level,d=null;for(let r=L.length-1;r>=0;r--)if(L[r].level===g&&!d&&(d=L[r]),L[r].level<g)throw new Error('Items without section detected, found section ("'+L[r].label+'")');return i===(d==null?void 0:d.level)?null:d},"getSection"),he=o(function(){return ie},"getSections"),ve=o(function(){let i=[],g=[],d=he(),r=W();for(let u of d){let p={id:u.id,label:U(u.label??"",r),labelType:"markdown",isGroup:!0,ticket:u.ticket,shape:"kanbanSection",level:u.level,look:r.look};g.push(p);let k=L.filter(c=>c.parentId===u.id);for(let c of k){let D={id:c.id,parentId:u.id,label:U(c.label??"",r),labelType:"markdown",isGroup:!1,ticket:c==null?void 0:c.ticket,priority:c==null?void 0:c.priority,assigned:c==null?void 0:c.assigned,icon:c==null?void 0:c.icon,shape:"kanbanItem",level:c.level,rx:5,ry:5,cssStyles:["text-align: left"]};g.push(D)}}return{nodes:g,edges:i,other:{},config:W()}},"getData"),Ce=o((i,g,d,r,u)=>{var w,O;let p=W(),k=((w=p.mindmap)==null?void 0:w.padding)??J.mindmap.padding;switch(r){case f.ROUNDED_RECT:case f.RECT:case f.HEXAGON:k*=2}let c={id:U(g,p)||"kbn"+ee++,level:i,label:U(d,p),width:((O=p.mindmap)==null?void 0:O.maxNodeWidth)??J.mindmap.maxNodeWidth,padding:k,isGroup:!1};if(u!==void 0){let v;u.includes(`
|
|
7
7
|
`)?v=u+`
|
|
8
8
|
`:v=`{
|
|
9
9
|
`+u+`
|
|
10
10
|
}`;let s=_e(v,{schema:Se});if(s.shape&&(s.shape!==s.shape.toLowerCase()||s.shape.includes("_")))throw new Error(`No such shape: ${s.shape}. Shape names should be lowercase.`);s!=null&&s.shape&&s.shape==="kanbanItem"&&(c.shape=s==null?void 0:s.shape),s!=null&&s.label&&(c.label=s==null?void 0:s.label),s!=null&&s.icon&&(c.icon=s==null?void 0:s.icon.toString()),s!=null&&s.assigned&&(c.assigned=s==null?void 0:s.assigned.toString()),s!=null&&s.ticket&&(c.ticket=s==null?void 0:s.ticket.toString()),s!=null&&s.priority&&(c.priority=s==null?void 0:s.priority)}let D=Oe(i);D?c.parentId=D.id||"kbn"+ee++:ie.push(c),L.push(c)},"addNode"),f={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Ae=o((i,g)=>{switch(te.debug("In get type",i,g),i){case"[":return f.RECT;case"(":return g===")"?f.ROUNDED_RECT:f.CLOUD;case"((":return f.CIRCLE;case")":return f.CLOUD;case"))":return f.BANG;case"{{":return f.HEXAGON;default:return f.DEFAULT}},"getType"),we=o((i,g)=>{se[i]=g},"setElementForId"),Ie=o(i=>{if(!i)return;let g=W(),d=L[L.length-1];i.icon&&(d.icon=U(i.icon,g)),i.class&&(d.cssClasses=U(i.class,g))},"decorateNode"),Te=o(i=>{switch(i){case f.DEFAULT:return"no-border";case f.RECT:return"rect";case f.ROUNDED_RECT:return"rounded-rect";case f.CIRCLE:return"circle";case f.CLOUD:return"cloud";case f.BANG:return"bang";case f.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),$e=o(()=>te,"getLogger"),Re=o(i=>se[i],"getElementById"),Pe={clear:De,addNode:Ce,getSections:he,getData:ve,nodeType:f,getType:Ae,setElementForId:we,decorateNode:Ie,type2Str:Te,getLogger:$e,getElementById:Re},Be=Pe,Ue=o(async(i,g,d,r)=>{var F,M,H,I,G;te.debug(`Rendering kanban diagram
|
|
11
|
-
`+i);let u=r.db.getData(),p=W();p.htmlLabels=!1;let
|
|
11
|
+
`+i);let u=r.db.getData(),p=W();p.htmlLabels=!1;let k=fe(g);for(let y of u.nodes)y.domId=`${g}-${y.id}`;let c=k.append("g");c.attr("class","sections");let D=k.append("g");D.attr("class","items");let w=u.nodes.filter(y=>y.isGroup),O=0,v=10,s=[],T=25;for(let y of w){let $=((F=p==null?void 0:p.kanban)==null?void 0:F.sectionWidth)||200;O=O+1,y.x=$*O+(O-1)*v/2,y.width=$,y.y=0,y.height=$*3,y.rx=5,y.ry=5,y.cssClasses=y.cssClasses+" section-"+O;let N=await me(c,y);T=Math.max(T,(M=N==null?void 0:N.labelBBox)==null?void 0:M.height),s.push(N)}let C=0;for(let y of w){let $=s[C];C=C+1;let N=((H=p==null?void 0:p.kanban)==null?void 0:H.sectionWidth)||200,_=-N*3/2+T,e=_,n=u.nodes.filter(t=>t.parentId===y.id);for(let t of n){if(t.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");t.x=y.x,t.width=N-1.5*v;let b=(await be(D,t,{config:p})).node().getBBox();t.y=e+b.height/2,await Ee(t),e=t.y+b.height/2+v/2}let a=$.cluster.select("rect"),h=Math.max(e-_+3*v,50)+(T-25);a.attr("height",h)}ke(void 0,k,((I=p.mindmap)==null?void 0:I.padding)??J.kanban.padding,((G=p.mindmap)==null?void 0:G.useMaxWidth)??J.kanban.useMaxWidth)},"draw"),Fe={draw:Ue},Me=o(i=>{let g="";for(let r=0;r<i.THEME_COLOR_LIMIT;r++)i["lineColor"+r]=i["lineColor"+r]||i["cScaleInv"+r],Ne(i["lineColor"+r])?i["lineColor"+r]=le(i["lineColor"+r],20):i["lineColor"+r]=ce(i["lineColor"+r],20);let d=o((r,u)=>i.darkMode?ce(r,u):le(r,u),"adjuster");for(let r=0;r<i.THEME_COLOR_LIMIT;r++){let u=""+(17-3*r);g+=`
|
|
12
12
|
.section-${r-1} rect, .section-${r-1} path, .section-${r-1} circle, .section-${r-1} polygon, .section-${r-1} path {
|
|
13
13
|
fill: ${d(i["cScale"+r],10)};
|
|
14
14
|
stroke: ${d(i["cScale"+r],10)};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m as p}from"./index-
|
|
1
|
+
import{m as p}from"./index-VTKdaklA.js";var _e,ce=(_e=class{constructor(e,r,a){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=r,this.end=a}static range(e,r){return r?!e||!e.loc||!r.loc||e.loc.lexer!==r.loc.lexer?null:new _e(e.loc.lexer,e.loc.start,r.loc.end):e&&e.loc}},p(_e,"SourceLocation"),_e),je,ye=(je=class{constructor(e,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=r}range(e,r){return new je(r,ce.range(this,e))}},p(je,"Token"),je),Ze,M=(Ze=class{constructor(e,r){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var a="KaTeX parse error: "+e,i,o,l=r&&r.loc;if(l&&l.start<=l.end){var h=l.lexer.input;i=l.start,o=l.end,i===h.length?a+=" at end of input: ":a+=" at position "+(i+1)+": ";var c=h.slice(i,o).replace(/[^]/g,"$&̲"),f;i>15?f="…"+h.slice(i-15,i):f=h.slice(0,i);var b;o+15<h.length?b=h.slice(o,o+15)+"…":b=h.slice(o),a+=f+c+b}var x=new Error(a);return x.name="ParseError",x.__proto__=Ze.prototype,x.position=i,i!=null&&o!=null&&(x.length=o-i),x.rawMessage=e,x}},p(Ze,"ParseError"),Ze);M.prototype.__proto__=Error.prototype;var U1=p(function(t,e){return t===void 0?e:t},"deflt"),W1=/([A-Z])/g,$1=p(function(t){return t.replace(W1,"-$1").toLowerCase()},"hyphenate"),X1={"&":"&",">":">","<":"<",'"':""","'":"'"},Y1=/[&><"']/g;function Pr(t){return String(t).replace(Y1,e=>X1[e])}p(Pr,"escape");var Vr=p(function t(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?t(e.body[0]):e:e.type==="font"?t(e.body):e},"getBaseElem"),_1=p(function(t){var e=Vr(t);return e.type==="mathord"||e.type==="textord"||e.type==="atom"},"isCharacterBox"),j1=p(function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t},"assert"),Z1=p(function(t){var e=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t);return e?e[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?null:e[1].toLowerCase():"_relative"},"protocolFromUrl"),G={deflt:U1,escape:Pr,hyphenate:$1,getBaseElem:Vr,isCharacterBox:_1,protocolFromUrl:Z1},K0={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:p(t=>"#"+t,"cliProcessor")},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:p((t,e)=>(e.push(t),e),"cliProcessor")},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:p(t=>Math.max(0,t),"processor"),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:p(t=>Math.max(0,t),"processor"),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:p(t=>Math.max(0,t),"processor"),cli:"-e, --max-expand <n>",cliProcessor:p(t=>t==="Infinity"?1/0:parseInt(t),"cliProcessor")},globalGroup:{type:"boolean",cli:!1}};function Gr(t){if(t.default)return t.default;var e=t.type,r=Array.isArray(e)?e[0]:e;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}p(Gr,"getDefaultValue");var n0,Gt=(n0=class{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var r in K0)if(K0.hasOwnProperty(r)){var a=K0[r];this[r]=e[r]!==void 0?a.processor?a.processor(e[r]):e[r]:Gr(a)}}reportNonstrict(e,r,a){var i=this.strict;if(typeof i=="function"&&(i=i(e,r,a)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new M("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+e+"]"),a);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+e+"]"))}}useStrictBehavior(e,r,a){var i=this.strict;if(typeof i=="function")try{i=i(e,r,a)}catch{i="error"}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var r=G.protocolFromUrl(e.url);if(r==null)return!1;e.protocol=r}var a=typeof this.trust=="function"?this.trust(e):this.trust;return!!a}},p(n0,"Settings"),n0),o0,Le=(o0=class{constructor(e,r,a){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=r,this.cramped=a}sup(){return we[K1[this.id]]}sub(){return we[J1[this.id]]}fracNum(){return we[Q1[this.id]]}fracDen(){return we[ea[this.id]]}cramp(){return we[ta[this.id]]}text(){return we[ra[this.id]]}isTight(){return this.size>=2}},p(o0,"Style"),o0),Ut=0,et=1,i0=2,Ee=3,T0=4,de=5,w0=6,ie=7,we=[new Le(Ut,0,!1),new Le(et,0,!0),new Le(i0,1,!1),new Le(Ee,1,!0),new Le(T0,2,!1),new Le(de,2,!0),new Le(w0,3,!1),new Le(ie,3,!0)],K1=[T0,de,T0,de,w0,ie,w0,ie],J1=[de,de,de,de,ie,ie,ie,ie],Q1=[i0,Ee,T0,de,w0,ie,w0,ie],ea=[Ee,Ee,de,de,ie,ie,ie,ie],ta=[et,et,Ee,Ee,de,de,ie,ie],ra=[Ut,et,i0,Ee,i0,Ee,i0,Ee],I={DISPLAY:we[Ut],TEXT:we[i0],SCRIPT:we[T0],SCRIPTSCRIPT:we[w0]},Tt=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Ur(t){for(var e=0;e<Tt.length;e++)for(var r=Tt[e],a=0;a<r.blocks.length;a++){var i=r.blocks[a];if(t>=i[0]&&t<=i[1])return r.name}return null}p(Ur,"scriptFromCodepoint");var J0=[];Tt.forEach(t=>t.blocks.forEach(e=>J0.push(...e)));function Wt(t){for(var e=0;e<J0.length;e+=2)if(t>=J0[e]&&t<=J0[e+1])return!0;return!1}p(Wt,"supportedCodepoint");var a0=80,aa=p(function(t,e){return"M95,"+(622+t+e)+`
|
|
2
2
|
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
3
3
|
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
4
4
|
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import{m as ge}from"./chunk-6764PJDD-Cppb-jH-.js";import{y as ue}from"./chunk-ZXARS5L4-wcrIaQvY.js";import{m as h,p as C,M as pe,j as ye,I as me,E as H,q as P,d as j,au as fe,ap as be,aq as _e,ar as ke}from"./index-VTKdaklA.js";var K=function(){var t=h(function(D,n,r,a){for(r=r||{},a=D.length;a--;r[D[a]]=n);return r},"o"),e=[1,4],o=[1,13],l=[1,12],i=[1,15],c=[1,16],u=[1,20],f=[1,19],p=[6,7,8],x=[1,26],L=[1,24],I=[1,25],_=[6,7,11],y=[1,6,13,15,16,19,22],A=[1,33],Q=[1,34],B=[1,6,7,11,13,15,16,19,22],z={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:h(function(D,n,r,a,d,s,E){var g=s.length-1;switch(d){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",s[g].id),a.addNode(s[g-1].length,s[g].id,s[g].descr,s[g].type);break;case 16:a.getLogger().trace("Icon: ",s[g]),a.decorateNode({icon:s[g]});break;case 17:case 21:a.decorateNode({class:s[g]});break;case 18:a.getLogger().trace("SPACELIST");break;case 19:a.getLogger().trace("Node: ",s[g].id),a.addNode(0,s[g].id,s[g].descr,s[g].type);break;case 20:a.decorateNode({icon:s[g]});break;case 25:a.getLogger().trace("node found ..",s[g-2]),this.$={id:s[g-1],descr:s[g-1],type:a.getType(s[g-2],s[g])};break;case 26:this.$={id:s[g],descr:s[g],type:a.nodeType.DEFAULT};break;case 27:a.getLogger().trace("node found ..",s[g-3]),this.$={id:s[g-3],descr:s[g-1],type:a.getType(s[g-2],s[g])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:o,7:[1,10],9:9,12:11,13:l,14:14,15:i,16:c,17:17,18:18,19:u,22:f},t(p,[2,3]),{1:[2,2]},t(p,[2,4]),t(p,[2,5]),{1:[2,6],6:o,12:21,13:l,14:14,15:i,16:c,17:17,18:18,19:u,22:f},{6:o,9:22,12:11,13:l,14:14,15:i,16:c,17:17,18:18,19:u,22:f},{6:x,7:L,10:23,11:I},t(_,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:u,22:f}),t(_,[2,18]),t(_,[2,19]),t(_,[2,20]),t(_,[2,21]),t(_,[2,23]),t(_,[2,24]),t(_,[2,26],{19:[1,30]}),{20:[1,31]},{6:x,7:L,10:32,11:I},{1:[2,7],6:o,12:21,13:l,14:14,15:i,16:c,17:17,18:18,19:u,22:f},t(y,[2,14],{7:A,11:Q}),t(B,[2,8]),t(B,[2,9]),t(B,[2,10]),t(_,[2,15]),t(_,[2,16]),t(_,[2,17]),{20:[1,35]},{21:[1,36]},t(y,[2,13],{7:A,11:Q}),t(B,[2,11]),t(B,[2,12]),{21:[1,37]},t(_,[2,25]),t(_,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:h(function(D,n){if(n.recoverable)this.trace(D);else{var r=new Error(D);throw r.hash=n,r}},"parseError"),parse:h(function(D){var n=this,r=[0],a=[],d=[null],s=[],E=this.table,g="",U=0,Y=0,ae=0,ce=2,Z=1,le=s.slice.call(arguments,1),m=Object.create(this.lexer),T={yy:{}};for(var W in this.yy)Object.prototype.hasOwnProperty.call(this.yy,W)&&(T.yy[W]=this.yy[W]);m.setInput(D,T.yy),T.yy.lexer=m,T.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var q=m.yylloc;s.push(q);var he=m.options&&m.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function de(S){r.length=r.length-2*S,d.length=d.length-S,s.length=s.length-S}h(de,"popStack");function ee(){var S;return S=a.pop()||m.lex()||Z,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=n.symbols_[S]||S),S}h(ee,"lex");for(var k,V,w,N,$e,X,$={},F,v,te,G;;){if(w=r[r.length-1],this.defaultActions[w]?N=this.defaultActions[w]:((k===null||typeof k>"u")&&(k=ee()),N=E[w]&&E[w][k]),typeof N>"u"||!N.length||!N[0]){var J="";G=[];for(F in E[w])this.terminals_[F]&&F>ce&&G.push("'"+this.terminals_[F]+"'");m.showPosition?J="Parse error on line "+(U+1)+`:
|
|
2
|
+
`+m.showPosition()+`
|
|
3
|
+
Expecting `+G.join(", ")+", got '"+(this.terminals_[k]||k)+"'":J="Parse error on line "+(U+1)+": Unexpected "+(k==Z?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(J,{text:m.match,token:this.terminals_[k]||k,line:m.yylineno,loc:q,expected:G})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+k);switch(N[0]){case 1:r.push(k),d.push(m.yytext),s.push(m.yylloc),r.push(N[1]),k=null,V?(k=V,V=null):(Y=m.yyleng,g=m.yytext,U=m.yylineno,q=m.yylloc,ae>0);break;case 2:if(v=this.productions_[N[1]][1],$.$=d[d.length-v],$._$={first_line:s[s.length-(v||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(v||1)].first_column,last_column:s[s.length-1].last_column},he&&($._$.range=[s[s.length-(v||1)].range[0],s[s.length-1].range[1]]),X=this.performAction.apply($,[g,Y,U,T.yy,N[1],d,s].concat(le)),typeof X<"u")return X;v&&(r=r.slice(0,-1*v*2),d=d.slice(0,-1*v),s=s.slice(0,-1*v)),r.push(this.productions_[N[1]][0]),d.push($.$),s.push($._$),te=E[r[r.length-2]][r[r.length-1]],r.push(te);break;case 3:return!0}}return!0},"parse")},re=function(){var D={EOF:1,parseError:h(function(n,r){if(this.yy.parser)this.yy.parser.parseError(n,r);else throw new Error(n)},"parseError"),setInput:h(function(n,r){return this.yy=r||this.yy||{},this._input=n,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:h(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var r=n.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:h(function(n){var r=n.length,a=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.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:a?(a.length===d.length?this.yylloc.first_column:0)+d[d.length-a.length].length-a[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(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:h(function(n){this.unput(this.match.slice(n))},"less"),pastInput:h(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var n=this.pastInput(),r=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
|
|
5
|
+
`+r+"^"},"showPosition"),test_match:h(function(n,r){var a,d,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))),d=n[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,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(n[0].length),this.matched+=n[0],a=this.performAction.call(this,this.yy,this,r,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var E in s)this[E]=s[E];return!1}return!1},"test_match"),next:h(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,r,a,d;this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),E=0;E<s.length;E++)if(a=this._input.match(this.rules[s[E]]),a&&(!r||a[0].length>r[0].length)){if(r=a,d=E,this.options.backtrack_lexer){if(n=this.test_match(a,s[E]),n!==!1)return n;if(this._backtrack){r=!1;continue}else return!1}else if(!this.options.flex)break}return r?(n=this.test_match(r,s[d]),n!==!1?n:!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:h(function(){var n=this.next();return n||this.lex()},"lex"),begin:h(function(n){this.conditionStack.push(n)},"begin"),popState:h(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:h(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:h(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:h(function(n){this.begin(n)},"pushState"),stateStackSize:h(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:h(function(n,r,a,d){switch(a){case 0:return n.getLogger().trace("Found comment",r.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:n.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return n.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:n.getLogger().trace("end icon"),this.popState();break;case 10:return n.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return n.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return n.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return n.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:n.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return n.getLogger().trace("description:",r.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),n.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),n.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),n.getLogger().trace("node end ...",r.yytext),"NODE_DEND";case 30:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 35:return n.getLogger().trace("Long description:",r.yytext),20;case 36:return n.getLogger().trace("Long description:",r.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return D}();z.lexer=re;function M(){this.yy={}}return h(M,"Parser"),M.prototype=z,z.Parser=M,new M}();K.parser=K;var Ee=K,b=[];for(let t=0;t<256;++t)b.push((t+256).toString(16).slice(1));function ne(t,e=0){return(b[t[e+0]]+b[t[e+1]]+b[t[e+2]]+b[t[e+3]]+"-"+b[t[e+4]]+b[t[e+5]]+"-"+b[t[e+6]]+b[t[e+7]]+"-"+b[t[e+8]]+b[t[e+9]]+"-"+b[t[e+10]]+b[t[e+11]]+b[t[e+12]]+b[t[e+13]]+b[t[e+14]]+b[t[e+15]]).toLowerCase()}h(ne,"unsafeStringify");var Se=new Uint8Array(16);function ie(){return crypto.getRandomValues(Se)}h(ie,"rng");function se(t,e,o){return!e&&!t&&crypto.randomUUID?crypto.randomUUID():oe(t,e,o)}h(se,"v4");function oe(t,e,o){var i;t=t||{};let l=t.random??((i=t.rng)==null?void 0:i.call(t))??ie();if(l.length<16)throw new Error("Random bytes length must be >= 16");if(l[6]=l[6]&15|64,l[8]=l[8]&63|128,e){if(o=o||0,o<0||o+16>e.length)throw new RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`);for(let c=0;c<16;++c)e[o+c]=l[c];return e}return ne(l)}h(oe,"_v4");var Ne=se,Le=12,O={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},R,xe=(R=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=O,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let o=this.nodes.length-1;o>=0;o--)if(this.nodes[o].level<e)return this.nodes[o];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,o,l,i){var L,I;C.info("addNode",e,o,l,i);let c=!1;this.nodes.length===0?(this.baseLevel=e,e=0,c=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,c=!1);let u=P(),f=((L=u.mindmap)==null?void 0:L.padding)??H.mindmap.padding;switch(i){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:f*=2;break}let p={id:this.count++,nodeId:j(o,u),level:e,descr:j(l,u),type:i,children:[],width:((I=u.mindmap)==null?void 0:I.maxNodeWidth)??H.mindmap.maxNodeWidth,padding:f,isRoot:c},x=this.getParent(e);if(x)x.children.push(p),this.nodes.push(p);else if(c)this.nodes.push(p);else throw new Error(`There can be only one root. No parent could be found for ("${p.descr}")`)}getType(e,o){switch(C.debug("In get type",e,o),e){case"[":return this.nodeType.RECT;case"(":return o===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,o){this.elements[e]=o}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;let o=P(),l=this.nodes[this.nodes.length-1];e.icon&&(l.icon=j(e.icon,o)),e.class&&(l.class=j(e.class,o))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,o){if(e.level===0?e.section=void 0:e.section=o,e.children)for(let[l,i]of e.children.entries()){let c=e.level===0?l%(Le-1):o;this.assignSections(i,c)}}flattenNodes(e,o){let l=P(),i=["mindmap-node"];e.isRoot===!0?i.push("section-root","section--1"):e.section!==void 0&&i.push(`section-${e.section}`),e.class&&i.push(e.class);let c=i.join(" "),u=h(p=>{var L;let x=(((L=l.theme)==null?void 0:L.toLowerCase())??"").includes("redux");switch(p){case O.CIRCLE:return"mindmapCircle";case O.RECT:return"rect";case O.ROUNDED_RECT:return"rounded";case O.CLOUD:return"cloud";case O.BANG:return"bang";case O.HEXAGON:return"hexagon";case O.DEFAULT:return x?"rounded":"defaultMindmapNode";case O.NO_BORDER:default:return"rect"}},"getShapeFromType"),f={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:u(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:c,cssStyles:[],look:l.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(o.push(f),e.children)for(let p of e.children)this.flattenNodes(p,o)}generateEdges(e,o){if(!e.children)return;let l=P();for(let i of e.children){let c="edge";i.section!==void 0&&(c+=` section-edge-${i.section}`);let u=e.level+1;c+=` edge-depth-${u}`;let f={id:`edge_${e.id}_${i.id}`,start:e.id.toString(),end:i.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:l.look,classes:c,depth:e.level,section:i.section};o.push(f),this.generateEdges(i,o)}}getData(){let e=this.getMindmap(),o=P(),l=fe().layout!==void 0,i=o;if(l||(i.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:i};C.debug("getData: mindmapRoot",e,o),this.assignSections(e);let c=[],u=[];this.flattenNodes(e,c),this.generateEdges(e,u),C.debug(`getData: processed ${c.length} nodes and ${u.length} edges`);let f=new Map;for(let p of c)f.set(p.id,{shape:p.shape,width:p.width,height:p.height,padding:p.padding});return{nodes:c,edges:u,config:i,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(f),type:"mindmap",diagramId:"mindmap-"+Ne()}}getLogger(){return C}},h(R,"MindmapDB"),R),De=h(async(t,e,o,l)=>{var I,_;C.debug(`Rendering mindmap diagram
|
|
7
|
+
`+t);let i=l.db,c=i.getData(),u=ge(e,c.config.securityLevel);if(c.type=l.type,c.layoutAlgorithm=pe(c.config.layout,{fallback:"cose-bilkent"}),c.diagramId=e,!i.getMindmap())return;c.nodes.forEach(y=>{y.shape==="rounded"?(y.radius=15,y.taper=15,y.stroke="none",y.width=0,y.padding=15):y.shape==="circle"?y.padding=10:y.shape==="rect"?(y.width=0,y.padding=10):y.shape==="hexagon"&&(y.width=0,y.height=0)}),await ye(c,u);let{themeVariables:f}=me(),{useGradient:p,gradientStart:x,gradientStop:L}=f;if(p&&x&&L){let y=u.attr("id"),A=u.append("defs").append("linearGradient").attr("id",`${y}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");A.append("stop").attr("offset","0%").attr("stop-color",x).attr("stop-opacity",1),A.append("stop").attr("offset","100%").attr("stop-color",L).attr("stop-opacity",1)}ue(u,((I=c.config.mindmap)==null?void 0:I.padding)??H.mindmap.padding,"mindmapDiagram",((_=c.config.mindmap)==null?void 0:_.useMaxWidth)??H.mindmap.useMaxWidth)},"draw"),ve={draw:De},Oe=h(t=>{let{theme:e,look:o}=t,l="";for(let i=0;i<t.THEME_COLOR_LIMIT;i++)t["lineColor"+i]=t["lineColor"+i]||t["cScaleInv"+i],be(t["lineColor"+i])?t["lineColor"+i]=_e(t["lineColor"+i],20):t["lineColor"+i]=ke(t["lineColor"+i],20);for(let i=0;i<t.THEME_COLOR_LIMIT;i++){let c=""+(o==="neo"?Math.max(10-(i-1)*2,2):17-3*i);l+=`
|
|
8
|
+
.section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} polygon, .section-${i-1} path {
|
|
9
|
+
fill: ${t["cScale"+i]};
|
|
10
|
+
}
|
|
11
|
+
.section-${i-1} text {
|
|
12
|
+
fill: ${t["cScaleLabel"+i]};
|
|
13
|
+
}
|
|
14
|
+
.section-${i-1} span {
|
|
15
|
+
color: ${t["cScaleLabel"+i]};
|
|
16
|
+
}
|
|
17
|
+
.node-icon-${i-1} {
|
|
18
|
+
font-size: 40px;
|
|
19
|
+
color: ${t["cScaleLabel"+i]};
|
|
20
|
+
}
|
|
21
|
+
.section-edge-${i-1}{
|
|
22
|
+
stroke: ${t["cScale"+i]};
|
|
23
|
+
}
|
|
24
|
+
.edge-depth-${i-1}{
|
|
25
|
+
stroke-width: ${c};
|
|
26
|
+
}
|
|
27
|
+
.section-${i-1} line {
|
|
28
|
+
stroke: ${t["cScaleInv"+i]} ;
|
|
29
|
+
stroke-width: 3;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.disabled, .disabled circle, .disabled text {
|
|
33
|
+
fill: lightgray;
|
|
34
|
+
}
|
|
35
|
+
.disabled text {
|
|
36
|
+
fill: #efefef;
|
|
37
|
+
}
|
|
38
|
+
[data-look="neo"].mindmap-node.section-${i-1} rect, [data-look="neo"].mindmap-node.section-${i-1} path, [data-look="neo"].mindmap-node.section-${i-1} circle, [data-look="neo"].mindmap-node.section-${i-1} polygon {
|
|
39
|
+
fill: ${e==="redux"||e==="redux-dark"||e==="neutral"?t.mainBkg:t["cScale"+i]};
|
|
40
|
+
stroke: ${e==="redux"||e==="redux-dark"?t.nodeBorder:t["cScale"+i]};
|
|
41
|
+
stroke-width: ${t.strokeWidth??2}px;
|
|
42
|
+
}
|
|
43
|
+
[data-look="neo"].section-edge-${i-1}{
|
|
44
|
+
stroke: ${e!=null&&e.includes("redux")||e==="neo-dark"?t.nodeBorder:t["cScale"+i]};
|
|
45
|
+
}
|
|
46
|
+
[data-look="neo"].mindmap-node.section-${i-1} text {
|
|
47
|
+
fill: ${e==="redux"||e==="redux-dark"?t.nodeBorder:t["cScaleLabel"+(e==="neutral"?1:i)]};
|
|
48
|
+
}
|
|
49
|
+
`}return l},"genSections"),Ie=h((t,e,o)=>{let l="";for(let i=0;i<t;i++)l+=`
|
|
50
|
+
[data-look="neo"].mindmap-node.section-${i-1} rect, [data-look="neo"].mindmap-node.section-${i-1} path, [data-look="neo"].mindmap-node.section-${i-1} circle, [data-look="neo"].mindmap-node.section-${i-1} polygon {
|
|
51
|
+
stroke: url(${e}-gradient);
|
|
52
|
+
fill: ${o};
|
|
53
|
+
}
|
|
54
|
+
.section-${i-1} line {
|
|
55
|
+
stroke-width: 0;
|
|
56
|
+
}`;return l},"genGradient"),Te=h(t=>{let{theme:e}=t,o=t.svgId,l=t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none";return`
|
|
57
|
+
.edge {
|
|
58
|
+
stroke-width: 3;
|
|
59
|
+
}
|
|
60
|
+
${Oe(t)}
|
|
61
|
+
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
|
62
|
+
fill: ${t.git0};
|
|
63
|
+
}
|
|
64
|
+
.section-root text {
|
|
65
|
+
fill: ${t.gitBranchLabel0};
|
|
66
|
+
}
|
|
67
|
+
.section-root span {
|
|
68
|
+
color: ${e!=null&&e.includes("redux")?t.nodeBorder:t.gitBranchLabel0};
|
|
69
|
+
}
|
|
70
|
+
.icon-container {
|
|
71
|
+
height:100%;
|
|
72
|
+
display: flex;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
align-items: center;
|
|
75
|
+
}
|
|
76
|
+
.edge {
|
|
77
|
+
fill: none;
|
|
78
|
+
}
|
|
79
|
+
.mindmap-node-label {
|
|
80
|
+
dy: 1em;
|
|
81
|
+
alignment-baseline: middle;
|
|
82
|
+
text-anchor: middle;
|
|
83
|
+
dominant-baseline: middle;
|
|
84
|
+
text-align: center;
|
|
85
|
+
}
|
|
86
|
+
[data-look="neo"].mindmap-node {
|
|
87
|
+
filter: ${l};
|
|
88
|
+
}
|
|
89
|
+
[data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon {
|
|
90
|
+
fill: ${e!=null&&e.includes("redux")?t.mainBkg:t.git0};
|
|
91
|
+
}
|
|
92
|
+
[data-look="neo"].mindmap-node.section-root .text-inner-tspan {
|
|
93
|
+
fill: ${e!=null&&e.includes("redux")?t.nodeBorder:t["cScaleLabel"+(e==="neutral"?1:0)]};
|
|
94
|
+
}
|
|
95
|
+
${t.useGradient&&o&&t.mainBkg?Ie(t.THEME_COLOR_LIMIT,o,t.mainBkg):""}
|
|
96
|
+
`},"getStyles"),we=Te,Be={get db(){return new xe},renderer:ve,parser:Ee,styles:we};export{Be as diagram};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import{c as U}from"./chunk-JQRUD6KW-3F8Zg-1N.js";import{d as X}from"./wardley-L42UT6IY-5TKZOOLJ-C-ZcgEBb.js";import{a as Z,l as _,s as ee,e as te,o as ae,n as ie,m as l,p as $,q as le,L as re,a7 as se,a8 as oe,a9 as L,aa as ne,b as de,u as pe,ab as ce,E as ue}from"./index-VTKdaklA.js";var ge=ue.pie,v={sections:new Map,showData:!1},h=v.sections,y=v.showData,he=structuredClone(ge),me=l(()=>structuredClone(he),"getConfig"),fe=l(()=>{h=new Map,y=v.showData,pe()},"clear"),xe=l(({label:e,value:a})=>{if(a<0)throw new Error(`"${e}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);h.has(e)||(h.set(e,a),$.debug(`added new section: ${e}, with value: ${a}`))},"addSection"),we=l(()=>h,"getSections"),Se=l(e=>{y=e},"setShowData"),$e=l(()=>y,"getShowData"),W={getConfig:me,clear:fe,setDiagramTitle:ie,getDiagramTitle:ae,setAccTitle:te,getAccTitle:ee,setAccDescription:_,getAccDescription:Z,addSection:xe,getSections:we,setShowData:Se,getShowData:$e},ve=l((e,a)=>{U(e,a),a.setShowData(e.showData),e.sections.map(a.addSection)},"populateDb"),ye={parse:l(async e=>{let a=await X("pie",e);$.debug(a),ve(a,W)},"parse")},Te=l(e=>`
|
|
2
|
+
.pieCircle{
|
|
3
|
+
stroke: ${e.pieStrokeColor};
|
|
4
|
+
stroke-width : ${e.pieStrokeWidth};
|
|
5
|
+
opacity : ${e.pieOpacity};
|
|
6
|
+
}
|
|
7
|
+
.pieOuterCircle{
|
|
8
|
+
stroke: ${e.pieOuterStrokeColor};
|
|
9
|
+
stroke-width: ${e.pieOuterStrokeWidth};
|
|
10
|
+
fill: none;
|
|
11
|
+
}
|
|
12
|
+
.pieTitleText {
|
|
13
|
+
text-anchor: middle;
|
|
14
|
+
font-size: ${e.pieTitleTextSize};
|
|
15
|
+
fill: ${e.pieTitleTextColor};
|
|
16
|
+
font-family: ${e.fontFamily};
|
|
17
|
+
}
|
|
18
|
+
.slice {
|
|
19
|
+
font-family: ${e.fontFamily};
|
|
20
|
+
fill: ${e.pieSectionTextColor};
|
|
21
|
+
font-size:${e.pieSectionTextSize};
|
|
22
|
+
// fill: white;
|
|
23
|
+
}
|
|
24
|
+
.legend text {
|
|
25
|
+
fill: ${e.pieLegendTextColor};
|
|
26
|
+
font-family: ${e.fontFamily};
|
|
27
|
+
font-size: ${e.pieLegendTextSize};
|
|
28
|
+
}
|
|
29
|
+
`,"getStyles"),be=Te,De=l(e=>{let a=[...e.values()].reduce((r,s)=>r+s,0),T=[...e.entries()].map(([r,s])=>({label:r,value:s})).filter(r=>r.value/a*100>=1);return ce().value(r=>r.value).sort(null)(T)},"createPieArcs"),Ce=l((e,a,T,r)=>{var B;$.debug(`rendering pie chart
|
|
30
|
+
`+e);let s=r.db,b=le(),D=re(s.getConfig(),b.pie),C=40,o=18,c=4,d=450,p=d,m=se(a),n=m.append("g");n.attr("transform","translate("+p/2+","+d/2+")");let{themeVariables:i}=b,[k]=oe(i.pieOuterStrokeWidth);k??(k=2);let A=D.textPosition,u=Math.min(p,d)/2-C,P=L().innerRadius(0).outerRadius(u),q=L().innerRadius(u*A).outerRadius(u*A);n.append("circle").attr("cx",0).attr("cy",0).attr("r",u+k/2).attr("class","pieOuterCircle");let g=s.getSections(),j=De(g),G=[i.pie1,i.pie2,i.pie3,i.pie4,i.pie5,i.pie6,i.pie7,i.pie8,i.pie9,i.pie10,i.pie11,i.pie12],f=0;g.forEach(t=>{f+=t});let M=j.filter(t=>(t.data.value/f*100).toFixed(0)!=="0"),x=ne(G).domain([...g.keys()]);n.selectAll("mySlices").data(M).enter().append("path").attr("d",P).attr("fill",t=>x(t.data.label)).attr("class","pieCircle"),n.selectAll("mySlices").data(M).enter().append("text").text(t=>(t.data.value/f*100).toFixed(0)+"%").attr("transform",t=>"translate("+q.centroid(t)+")").style("text-anchor","middle").attr("class","slice");let H=n.append("text").text(s.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText"),O=[...g.entries()].map(([t,S])=>({label:t,value:S})),w=n.selectAll(".legend").data(O).enter().append("g").attr("class","legend").attr("transform",(t,S)=>{let E=o+c,J=E*O.length/2,K=12*o,Q=S*E-J;return"translate("+K+","+Q+")"});w.append("rect").attr("width",o).attr("height",o).style("fill",t=>x(t.label)).style("stroke",t=>x(t.label)),w.append("text").attr("x",o+c).attr("y",o-c).text(t=>s.getShowData()?`${t.label} [${t.value}]`:t.label);let N=Math.max(...w.selectAll("text").nodes().map(t=>(t==null?void 0:t.getBoundingClientRect().width)??0)),V=p+C+o+c+N,R=((B=H.node())==null?void 0:B.getBoundingClientRect().width)??0,Y=p/2-R/2,I=p/2+R/2,z=Math.min(0,Y),F=Math.max(V,I)-z;m.attr("viewBox",`${z} 0 ${F} ${d}`),de(m,d,F,D.useMaxWidth)},"draw"),ke={draw:Ce},Re={parser:ye,db:W,renderer:ke,styles:be};export{Re as diagram};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{l as ke,a as Fe,o as ae,n as Pe,s as Ce,e as ve,m as l,q as It,p as St,i as Et,b as Le,u as Ee,E as D,Z as ie,d as De,ac as ze}from"./index-VTKdaklA.js";var Dt=function(){var t=l(function(Q,s,c,o){for(c=c||{},o=Q.length;o--;c[Q[o]]=s);return c},"o"),n=[1,3],d=[1,4],u=[1,5],h=[1,6],f=[1,7],g=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],b=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],a=[55,56,57],T=[2,36],p=[1,37],y=[1,36],A=[1,38],m=[1,35],x=[1,43],q=[1,41],_=[1,45],Z=[1,14],K=[1,23],pt=[1,18],ut=[1,19],dt=[1,20],xt=[1,21],ft=[1,22],gt=[1,24],i=[1,25],wt=[1,26],Nt=[1,27],Bt=[1,28],Rt=[1,29],W=[1,32],O=[1,33],k=[1,34],F=[1,39],P=[1,40],C=[1,42],v=[1,44],H=[1,63],M=[1,62],L=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],$t=[1,66],Ut=[1,67],Wt=[1,68],Ot=[1,69],Qt=[1,70],Xt=[1,71],Ht=[1,72],Mt=[1,73],Yt=[1,74],Zt=[1,75],Kt=[1,76],jt=[1,77],N=[4,5,6,7,8,9,10,11,12,13,14,15,18],G=[1,91],V=[1,92],tt=[1,93],et=[1,100],it=[1,94],at=[1,97],nt=[1,95],st=[1,96],rt=[1,98],lt=[1,99],_t=[1,103],Jt=[10,55,56,57],$=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],kt={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:l(function(Q,s,c,o,S,e,B){var r=e.length-1;switch(S){case 23:this.$=e[r];break;case 24:this.$=e[r-1]+""+e[r];break;case 26:this.$=e[r-1]+e[r];break;case 27:this.$=[e[r].trim()];break;case 28:e[r-2].push(e[r].trim()),this.$=e[r-2];break;case 29:this.$=e[r-4],o.addClass(e[r-2],e[r]);break;case 37:this.$=[];break;case 42:this.$=e[r].trim(),o.setDiagramTitle(this.$);break;case 43:this.$=e[r].trim(),o.setAccTitle(this.$);break;case 44:case 45:this.$=e[r].trim(),o.setAccDescription(this.$);break;case 46:o.addSection(e[r].substr(8)),this.$=e[r].substr(8);break;case 47:o.addPoint(e[r-3],"",e[r-1],e[r],[]);break;case 48:o.addPoint(e[r-4],e[r-3],e[r-1],e[r],[]);break;case 49:o.addPoint(e[r-4],"",e[r-2],e[r-1],e[r]);break;case 50:o.addPoint(e[r-5],e[r-4],e[r-2],e[r-1],e[r]);break;case 51:o.setXAxisLeftText(e[r-2]),o.setXAxisRightText(e[r]);break;case 52:e[r-1].text+=" ⟶ ",o.setXAxisLeftText(e[r-1]);break;case 53:o.setXAxisLeftText(e[r]);break;case 54:o.setYAxisBottomText(e[r-2]),o.setYAxisTopText(e[r]);break;case 55:e[r-1].text+=" ⟶ ",o.setYAxisBottomText(e[r-1]);break;case 56:o.setYAxisBottomText(e[r]);break;case 57:o.setQuadrant1Text(e[r]);break;case 58:o.setQuadrant2Text(e[r]);break;case 59:o.setQuadrant3Text(e[r]);break;case 60:o.setQuadrant4Text(e[r]);break;case 64:this.$={text:e[r],type:"text"};break;case 65:this.$={text:e[r-1].text+""+e[r],type:e[r-1].type};break;case 66:this.$={text:e[r],type:"text"};break;case 67:this.$={text:e[r],type:"markdown"};break;case 68:this.$=e[r];break;case 69:this.$=e[r-1]+""+e[r];break}},"anonymous"),table:[{18:n,26:1,27:2,28:d,55:u,56:h,57:f},{1:[3]},{18:n,26:8,27:2,28:d,55:u,56:h,57:f},{18:n,26:9,27:2,28:d,55:u,56:h,57:f},t(g,[2,33],{29:10}),t(b,[2,61]),t(b,[2,62]),t(b,[2,63]),{1:[2,30]},{1:[2,31]},t(a,T,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:p,5:y,10:A,12:m,13:x,14:q,15:_,18:Z,25:K,35:pt,37:ut,39:dt,41:xt,42:ft,48:gt,50:i,51:wt,52:Nt,53:Bt,54:Rt,60:W,61:O,63:k,64:F,65:P,66:C,67:v}),t(g,[2,34]),{27:46,55:u,56:h,57:f},t(a,[2,37]),t(a,T,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:p,5:y,10:A,12:m,13:x,14:q,15:_,18:Z,25:K,35:pt,37:ut,39:dt,41:xt,42:ft,48:gt,50:i,51:wt,52:Nt,53:Bt,54:Rt,60:W,61:O,63:k,64:F,65:P,66:C,67:v}),t(a,[2,39]),t(a,[2,40]),t(a,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(a,[2,45]),t(a,[2,46]),{18:[1,51]},{4:p,5:y,10:A,12:m,13:x,14:q,15:_,43:52,58:31,60:W,61:O,63:k,64:F,65:P,66:C,67:v},{4:p,5:y,10:A,12:m,13:x,14:q,15:_,43:53,58:31,60:W,61:O,63:k,64:F,65:P,66:C,67:v},{4:p,5:y,10:A,12:m,13:x,14:q,15:_,43:54,58:31,60:W,61:O,63:k,64:F,65:P,66:C,67:v},{4:p,5:y,10:A,12:m,13:x,14:q,15:_,43:55,58:31,60:W,61:O,63:k,64:F,65:P,66:C,67:v},{4:p,5:y,10:A,12:m,13:x,14:q,15:_,43:56,58:31,60:W,61:O,63:k,64:F,65:P,66:C,67:v},{4:p,5:y,10:A,12:m,13:x,14:q,15:_,43:57,58:31,60:W,61:O,63:k,64:F,65:P,66:C,67:v},{4:p,5:y,8:H,10:A,12:m,13:x,14:q,15:_,18:M,44:[1,58],47:[1,59],58:61,59:60,63:k,64:F,65:P,66:C,67:v},t(L,[2,64]),t(L,[2,66]),t(L,[2,67]),t(L,[2,70]),t(L,[2,71]),t(L,[2,72]),t(L,[2,73]),t(L,[2,74]),t(L,[2,75]),t(L,[2,76]),t(L,[2,77]),t(L,[2,78]),t(L,[2,79]),t(L,[2,80]),t(L,[2,81]),t(g,[2,35]),t(a,[2,38]),t(a,[2,42]),t(a,[2,43]),t(a,[2,44]),{3:65,4:$t,5:Ut,6:Wt,7:Ot,8:Qt,9:Xt,10:Ht,11:Mt,12:Yt,13:Zt,14:Kt,15:jt,21:64},t(a,[2,53],{59:60,58:61,4:p,5:y,8:H,10:A,12:m,13:x,14:q,15:_,18:M,49:[1,78],63:k,64:F,65:P,66:C,67:v}),t(a,[2,56],{59:60,58:61,4:p,5:y,8:H,10:A,12:m,13:x,14:q,15:_,18:M,49:[1,79],63:k,64:F,65:P,66:C,67:v}),t(a,[2,57],{59:60,58:61,4:p,5:y,8:H,10:A,12:m,13:x,14:q,15:_,18:M,63:k,64:F,65:P,66:C,67:v}),t(a,[2,58],{59:60,58:61,4:p,5:y,8:H,10:A,12:m,13:x,14:q,15:_,18:M,63:k,64:F,65:P,66:C,67:v}),t(a,[2,59],{59:60,58:61,4:p,5:y,8:H,10:A,12:m,13:x,14:q,15:_,18:M,63:k,64:F,65:P,66:C,67:v}),t(a,[2,60],{59:60,58:61,4:p,5:y,8:H,10:A,12:m,13:x,14:q,15:_,18:M,63:k,64:F,65:P,66:C,67:v}),{45:[1,80]},{44:[1,81]},t(L,[2,65]),t(L,[2,82]),t(L,[2,83]),t(L,[2,84]),{3:83,4:$t,5:Ut,6:Wt,7:Ot,8:Qt,9:Xt,10:Ht,11:Mt,12:Yt,13:Zt,14:Kt,15:jt,18:[1,82]},t(N,[2,23]),t(N,[2,1]),t(N,[2,2]),t(N,[2,3]),t(N,[2,4]),t(N,[2,5]),t(N,[2,6]),t(N,[2,7]),t(N,[2,8]),t(N,[2,9]),t(N,[2,10]),t(N,[2,11]),t(N,[2,12]),t(a,[2,52],{58:31,43:84,4:p,5:y,10:A,12:m,13:x,14:q,15:_,60:W,61:O,63:k,64:F,65:P,66:C,67:v}),t(a,[2,55],{58:31,43:85,4:p,5:y,10:A,12:m,13:x,14:q,15:_,60:W,61:O,63:k,64:F,65:P,66:C,67:v}),{46:[1,86]},{45:[1,87]},{4:G,5:V,6:tt,8:et,11:it,13:at,16:90,17:nt,18:st,19:rt,20:lt,22:89,23:88},t(N,[2,24]),t(a,[2,51],{59:60,58:61,4:p,5:y,8:H,10:A,12:m,13:x,14:q,15:_,18:M,63:k,64:F,65:P,66:C,67:v}),t(a,[2,54],{59:60,58:61,4:p,5:y,8:H,10:A,12:m,13:x,14:q,15:_,18:M,63:k,64:F,65:P,66:C,67:v}),t(a,[2,47],{22:89,16:90,23:101,4:G,5:V,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:lt}),{46:[1,102]},t(a,[2,29],{10:_t}),t(Jt,[2,27],{16:104,4:G,5:V,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:lt}),t($,[2,25]),t($,[2,13]),t($,[2,14]),t($,[2,15]),t($,[2,16]),t($,[2,17]),t($,[2,18]),t($,[2,19]),t($,[2,20]),t($,[2,21]),t($,[2,22]),t(a,[2,49],{10:_t}),t(a,[2,48],{22:89,16:90,23:105,4:G,5:V,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:lt}),{4:G,5:V,6:tt,8:et,11:it,13:at,16:90,17:nt,18:st,19:rt,20:lt,22:106},t($,[2,26]),t(a,[2,50],{10:_t}),t(Jt,[2,28],{16:104,4:G,5:V,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:lt})],defaultActions:{8:[2,30],9:[2,31]},parseError:l(function(Q,s){if(s.recoverable)this.trace(Q);else{var c=new Error(Q);throw c.hash=s,c}},"parseError"),parse:l(function(Q){var s=this,c=[0],o=[],S=[null],e=[],B=this.table,r="",Tt=0,Gt=0,qe=0,Ae=2,Vt=1,Se=e.slice.call(arguments,1),E=Object.create(this.lexer),j={yy:{}};for(var Ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ft)&&(j.yy[Ft]=this.yy[Ft]);E.setInput(Q,j.yy),j.yy.lexer=E,j.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var Pt=E.yylloc;e.push(Pt);var be=E.options&&E.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _e(R){c.length=c.length-2*R,S.length=S.length-R,e.length=e.length-R}l(_e,"popStack");function te(){var R;return R=o.pop()||E.lex()||Vt,typeof R!="number"&&(R instanceof Array&&(o=R,R=o.pop()),R=s.symbols_[R]||R),R}l(te,"lex");for(var I,Ct,J,U,We,vt,ot={},mt,Y,ee,qt;;){if(J=c[c.length-1],this.defaultActions[J]?U=this.defaultActions[J]:((I===null||typeof I>"u")&&(I=te()),U=B[J]&&B[J][I]),typeof U>"u"||!U.length||!U[0]){var Lt="";qt=[];for(mt in B[J])this.terminals_[mt]&&mt>Ae&&qt.push("'"+this.terminals_[mt]+"'");E.showPosition?Lt="Parse error on line "+(Tt+1)+`:
|
|
2
|
+
`+E.showPosition()+`
|
|
3
|
+
Expecting `+qt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Lt="Parse error on line "+(Tt+1)+": Unexpected "+(I==Vt?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Lt,{text:E.match,token:this.terminals_[I]||I,line:E.yylineno,loc:Pt,expected:qt})}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+I);switch(U[0]){case 1:c.push(I),S.push(E.yytext),e.push(E.yylloc),c.push(U[1]),I=null,Ct?(I=Ct,Ct=null):(Gt=E.yyleng,r=E.yytext,Tt=E.yylineno,Pt=E.yylloc,qe>0);break;case 2:if(Y=this.productions_[U[1]][1],ot.$=S[S.length-Y],ot._$={first_line:e[e.length-(Y||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(Y||1)].first_column,last_column:e[e.length-1].last_column},be&&(ot._$.range=[e[e.length-(Y||1)].range[0],e[e.length-1].range[1]]),vt=this.performAction.apply(ot,[r,Gt,Tt,j.yy,U[1],S,e].concat(Se)),typeof vt<"u")return vt;Y&&(c=c.slice(0,-1*Y*2),S=S.slice(0,-1*Y),e=e.slice(0,-1*Y)),c.push(this.productions_[U[1]][0]),S.push(ot.$),e.push(ot._$),ee=B[c[c.length-2]][c[c.length-1]],c.push(ee);break;case 3:return!0}}return!0},"parse")},me=function(){var Q={EOF:1,parseError:l(function(s,c){if(this.yy.parser)this.yy.parser.parseError(s,c);else throw new Error(s)},"parseError"),setInput:l(function(s,c){return this.yy=c||this.yy||{},this._input=s,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:l(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var c=s.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:l(function(s){var c=s.length,o=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var S=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),o.length-1&&(this.yylineno-=o.length-1);var e=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:o?(o.length===S.length?this.yylloc.first_column:0)+S[S.length-o.length].length-o[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(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:l(function(s){this.unput(this.match.slice(s))},"less"),pastInput:l(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var s=this.pastInput(),c=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
5
|
+
`+c+"^"},"showPosition"),test_match:l(function(s,c){var o,S,e;if(this.options.backtrack_lexer&&(e={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&&(e.yylloc.range=this.yylloc.range.slice(0))),S=s[0].match(/(?:\r\n?|\n).*/g),S&&(this.yylineno+=S.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:S?S[S.length-1].length-S[S.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,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(s[0].length),this.matched+=s[0],o=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var B in e)this[B]=e[B];return!1}return!1},"test_match"),next:l(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,c,o,S;this._more||(this.yytext="",this.match="");for(var e=this._currentRules(),B=0;B<e.length;B++)if(o=this._input.match(this.rules[e[B]]),o&&(!c||o[0].length>c[0].length)){if(c=o,S=B,this.options.backtrack_lexer){if(s=this.test_match(o,e[B]),s!==!1)return s;if(this._backtrack){c=!1;continue}else return!1}else if(!this.options.flex)break}return c?(s=this.test_match(c,e[S]),s!==!1?s:!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:l(function(){var s=this.next();return s||this.lex()},"lex"),begin:l(function(s){this.conditionStack.push(s)},"begin"),popState:l(function(){var s=this.conditionStack.length-1;return s>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:l(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:l(function(s){return s=this.conditionStack.length-1-Math.abs(s||0),s>=0?this.conditionStack[s]:"INITIAL"},"topState"),pushState:l(function(s){this.begin(s)},"pushState"),stateStackSize:l(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:l(function(s,c,o,S){switch(o){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 15;case 37:return 11;case 38:return 64;case 39:return 10;case 40:return 65;case 41:return 65;case 42:return 14;case 43:return 13;case 44:return 67;case 45:return 66;case 46:return 12;case 47:return 8;case 48:return 5;case 49:return 18;case 50:return 56;case 51:return 63;case 52:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?:[^\x00-\x7F]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return Q}();kt.lexer=me;function yt(){this.yy={}}return l(yt,"Parser"),yt.prototype=kt,kt.Parser=yt,new yt}();Dt.parser=Dt;var Ie=Dt,w=ze(),ht,we=(ht=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){var n,d,u,h,f,g,b,a,T,p,y,A,m,x,q,_,Z,K;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:((n=D.quadrantChart)==null?void 0:n.chartWidth)||500,chartWidth:((d=D.quadrantChart)==null?void 0:d.chartHeight)||500,titlePadding:((u=D.quadrantChart)==null?void 0:u.titlePadding)||10,titleFontSize:((h=D.quadrantChart)==null?void 0:h.titleFontSize)||20,quadrantPadding:((f=D.quadrantChart)==null?void 0:f.quadrantPadding)||5,xAxisLabelPadding:((g=D.quadrantChart)==null?void 0:g.xAxisLabelPadding)||5,yAxisLabelPadding:((b=D.quadrantChart)==null?void 0:b.yAxisLabelPadding)||5,xAxisLabelFontSize:((a=D.quadrantChart)==null?void 0:a.xAxisLabelFontSize)||16,yAxisLabelFontSize:((T=D.quadrantChart)==null?void 0:T.yAxisLabelFontSize)||16,quadrantLabelFontSize:((p=D.quadrantChart)==null?void 0:p.quadrantLabelFontSize)||16,quadrantTextTopPadding:((y=D.quadrantChart)==null?void 0:y.quadrantTextTopPadding)||5,pointTextPadding:((A=D.quadrantChart)==null?void 0:A.pointTextPadding)||5,pointLabelFontSize:((m=D.quadrantChart)==null?void 0:m.pointLabelFontSize)||12,pointRadius:((x=D.quadrantChart)==null?void 0:x.pointRadius)||5,xAxisPosition:((q=D.quadrantChart)==null?void 0:q.xAxisPosition)||"top",yAxisPosition:((_=D.quadrantChart)==null?void 0:_.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:((Z=D.quadrantChart)==null?void 0:Z.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:((K=D.quadrantChart)==null?void 0:K.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:w.quadrant1Fill,quadrant2Fill:w.quadrant2Fill,quadrant3Fill:w.quadrant3Fill,quadrant4Fill:w.quadrant4Fill,quadrant1TextFill:w.quadrant1TextFill,quadrant2TextFill:w.quadrant2TextFill,quadrant3TextFill:w.quadrant3TextFill,quadrant4TextFill:w.quadrant4TextFill,quadrantPointFill:w.quadrantPointFill,quadrantPointTextFill:w.quadrantPointTextFill,quadrantXAxisTextFill:w.quadrantXAxisTextFill,quadrantYAxisTextFill:w.quadrantYAxisTextFill,quadrantTitleFill:w.quadrantTitleFill,quadrantInternalBorderStrokeFill:w.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:w.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,St.info("clear called")}setData(n){this.data={...this.data,...n}}addPoints(n){this.data.points=[...n,...this.data.points]}addClass(n,d){this.classes.set(n,d)}setConfig(n){St.trace("setConfig called with: ",n),this.config={...this.config,...n}}setThemeConfig(n){St.trace("setThemeConfig called with: ",n),this.themeConfig={...this.themeConfig,...n}}calculateSpace(n,d,u,h){let f=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,g={top:n==="top"&&d?f:0,bottom:n==="bottom"&&d?f:0},b=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,a={left:this.config.yAxisPosition==="left"&&u?b:0,right:this.config.yAxisPosition==="right"&&u?b:0},T=this.config.titleFontSize+this.config.titlePadding*2,p={top:h?T:0},y=this.config.quadrantPadding+a.left,A=this.config.quadrantPadding+g.top+p.top,m=this.config.chartWidth-this.config.quadrantPadding*2-a.left-a.right,x=this.config.chartHeight-this.config.quadrantPadding*2-g.top-g.bottom-p.top,q=m/2,_=x/2;return{xAxisSpace:g,yAxisSpace:a,titleSpace:p,quadrantSpace:{quadrantLeft:y,quadrantTop:A,quadrantWidth:m,quadrantHalfWidth:q,quadrantHeight:x,quadrantHalfHeight:_}}}getAxisLabels(n,d,u,h){let{quadrantSpace:f,titleSpace:g}=h,{quadrantHalfHeight:b,quadrantHeight:a,quadrantLeft:T,quadrantHalfWidth:p,quadrantTop:y,quadrantWidth:A}=f,m=!!this.data.xAxisRightText,x=!!this.data.yAxisTopText,q=[];return this.data.xAxisLeftText&&d&&q.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:T+(m?p/2:0),y:n==="top"?this.config.xAxisLabelPadding+g.top:this.config.xAxisLabelPadding+y+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&d&&q.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:T+p+(m?p/2:0),y:n==="top"?this.config.xAxisLabelPadding+g.top:this.config.xAxisLabelPadding+y+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&u&&q.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+T+A+this.config.quadrantPadding,y:y+a-(x?b/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&u&&q.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+T+A+this.config.quadrantPadding,y:y+b-(x?b/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),q}getQuadrants(n){let{quadrantSpace:d}=n,{quadrantHalfHeight:u,quadrantLeft:h,quadrantHalfWidth:f,quadrantTop:g}=d,b=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h+f,y:g,width:f,height:u,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h,y:g,width:f,height:u,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h,y:g+u,width:f,height:u,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h+f,y:g+u,width:f,height:u,fill:this.themeConfig.quadrant4Fill}];for(let a of b)a.text.x=a.x+a.width/2,this.data.points.length===0?(a.text.y=a.y+a.height/2,a.text.horizontalPos="middle"):(a.text.y=a.y+this.config.quadrantTextTopPadding,a.text.horizontalPos="top");return b}getQuadrantPoints(n){let{quadrantSpace:d}=n,{quadrantHeight:u,quadrantLeft:h,quadrantTop:f,quadrantWidth:g}=d,b=ie().domain([0,1]).range([h,g+h]),a=ie().domain([0,1]).range([u+f,f]);return this.data.points.map(T=>{let p=this.classes.get(T.className);return p&&(T={...p,...T}),{x:b(T.x),y:a(T.y),fill:T.color??this.themeConfig.quadrantPointFill,radius:T.radius??this.config.pointRadius,text:{text:T.text,fill:this.themeConfig.quadrantPointTextFill,x:b(T.x),y:a(T.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:T.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:T.strokeWidth??"0px"}})}getBorders(n){let d=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:u}=n,{quadrantHalfHeight:h,quadrantHeight:f,quadrantLeft:g,quadrantHalfWidth:b,quadrantTop:a,quadrantWidth:T}=u;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:g-d,y1:a,x2:g+T+d,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:g+T,y1:a+d,x2:g+T,y2:a+f-d},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:g-d,y1:a+f,x2:g+T+d,y2:a+f},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:g,y1:a+d,x2:g,y2:a+f-d},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:g+b,y1:a+d,x2:g+b,y2:a+f-d},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:g+d,y1:a+h,x2:g+T-d,y2:a+h}]}getTitle(n){if(n)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){let n=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),d=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),u=this.config.showTitle&&!!this.data.titleText,h=this.data.points.length>0?"bottom":this.config.xAxisPosition,f=this.calculateSpace(h,n,d,u);return{points:this.getQuadrantPoints(f),quadrants:this.getQuadrants(f),axisLabels:this.getAxisLabels(h,n,d,f),borderLines:this.getBorders(f),title:this.getTitle(u)}}},l(ht,"QuadrantBuilder"),ht),ct,At=(ct=class extends Error{constructor(n,d,u){super(`value for ${n} ${d} is invalid, please use a valid ${u}`),this.name="InvalidStyleError"}},l(ct,"InvalidStyleError"),ct);function zt(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}l(zt,"validateHexCode");function ne(t){return!/^\d+$/.test(t)}l(ne,"validateNumber");function se(t){return!/^\d+px$/.test(t)}l(se,"validateSizeInPixels");var Ne=It();function X(t){return De(t.trim(),Ne)}l(X,"textSanitizer");var z=new we;function re(t){z.setData({quadrant1Text:X(t.text)})}l(re,"setQuadrant1Text");function le(t){z.setData({quadrant2Text:X(t.text)})}l(le,"setQuadrant2Text");function oe(t){z.setData({quadrant3Text:X(t.text)})}l(oe,"setQuadrant3Text");function he(t){z.setData({quadrant4Text:X(t.text)})}l(he,"setQuadrant4Text");function ce(t){z.setData({xAxisLeftText:X(t.text)})}l(ce,"setXAxisLeftText");function ue(t){z.setData({xAxisRightText:X(t.text)})}l(ue,"setXAxisRightText");function de(t){z.setData({yAxisTopText:X(t.text)})}l(de,"setYAxisTopText");function xe(t){z.setData({yAxisBottomText:X(t.text)})}l(xe,"setYAxisBottomText");function bt(t){let n={};for(let d of t){let[u,h]=d.trim().split(/\s*:\s*/);if(u==="radius"){if(ne(h))throw new At(u,h,"number");n.radius=parseInt(h)}else if(u==="color"){if(zt(h))throw new At(u,h,"hex code");n.color=h}else if(u==="stroke-color"){if(zt(h))throw new At(u,h,"hex code");n.strokeColor=h}else if(u==="stroke-width"){if(se(h))throw new At(u,h,"number of pixels (eg. 10px)");n.strokeWidth=h}else throw new Error(`style named ${u} is not supported.`)}return n}l(bt,"parseStyles");function fe(t,n,d,u,h){let f=bt(h);z.addPoints([{x:d,y:u,text:X(t.text),className:n,...f}])}l(fe,"addPoint");function ge(t,n){z.addClass(t,bt(n))}l(ge,"addClass");function pe(t){z.setConfig({chartWidth:t})}l(pe,"setWidth");function ye(t){z.setConfig({chartHeight:t})}l(ye,"setHeight");function Te(){let t=It(),{themeVariables:n,quadrantChart:d}=t;return d&&z.setConfig(d),z.setThemeConfig({quadrant1Fill:n.quadrant1Fill,quadrant2Fill:n.quadrant2Fill,quadrant3Fill:n.quadrant3Fill,quadrant4Fill:n.quadrant4Fill,quadrant1TextFill:n.quadrant1TextFill,quadrant2TextFill:n.quadrant2TextFill,quadrant3TextFill:n.quadrant3TextFill,quadrant4TextFill:n.quadrant4TextFill,quadrantPointFill:n.quadrantPointFill,quadrantPointTextFill:n.quadrantPointTextFill,quadrantXAxisTextFill:n.quadrantXAxisTextFill,quadrantYAxisTextFill:n.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:n.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:n.quadrantInternalBorderStrokeFill,quadrantTitleFill:n.quadrantTitleFill}),z.setData({titleText:ae()}),z.build()}l(Te,"getQuadrantData");var Be=l(function(){z.clear(),Ee()},"clear"),Re={setWidth:pe,setHeight:ye,setQuadrant1Text:re,setQuadrant2Text:le,setQuadrant3Text:oe,setQuadrant4Text:he,setXAxisLeftText:ce,setXAxisRightText:ue,setYAxisTopText:de,setYAxisBottomText:xe,parseStyles:bt,addPoint:fe,addClass:ge,getQuadrantData:Te,clear:Be,setAccTitle:ve,getAccTitle:Ce,setDiagramTitle:Pe,getDiagramTitle:ae,getAccDescription:Fe,setAccDescription:ke},$e=l((t,n,d,u)=>{var xt,ft,gt;function h(i){return i==="top"?"hanging":"middle"}l(h,"getDominantBaseLine");function f(i){return i==="left"?"start":"middle"}l(f,"getTextAnchor");function g(i){return`translate(${i.x}, ${i.y}) rotate(${i.rotation||0})`}l(g,"getTransformation");let b=It();St.debug(`Rendering quadrant chart
|
|
7
|
+
`+t);let a=b.securityLevel,T;a==="sandbox"&&(T=Et("#i"+n));let p=(a==="sandbox"?Et(T.nodes()[0].contentDocument.body):Et("body")).select(`[id="${n}"]`),y=p.append("g").attr("class","main"),A=((xt=b.quadrantChart)==null?void 0:xt.chartWidth)??500,m=((ft=b.quadrantChart)==null?void 0:ft.chartHeight)??500;Le(p,m,A,((gt=b.quadrantChart)==null?void 0:gt.useMaxWidth)??!0),p.attr("viewBox","0 0 "+A+" "+m),u.db.setHeight(m),u.db.setWidth(A);let x=u.db.getQuadrantData(),q=y.append("g").attr("class","quadrants"),_=y.append("g").attr("class","border"),Z=y.append("g").attr("class","data-points"),K=y.append("g").attr("class","labels"),pt=y.append("g").attr("class","title");x.title&&pt.append("text").attr("x",0).attr("y",0).attr("fill",x.title.fill).attr("font-size",x.title.fontSize).attr("dominant-baseline",h(x.title.horizontalPos)).attr("text-anchor",f(x.title.verticalPos)).attr("transform",g(x.title)).text(x.title.text),x.borderLines&&_.selectAll("line").data(x.borderLines).enter().append("line").attr("x1",i=>i.x1).attr("y1",i=>i.y1).attr("x2",i=>i.x2).attr("y2",i=>i.y2).style("stroke",i=>i.strokeFill).style("stroke-width",i=>i.strokeWidth);let ut=q.selectAll("g.quadrant").data(x.quadrants).enter().append("g").attr("class","quadrant");ut.append("rect").attr("x",i=>i.x).attr("y",i=>i.y).attr("width",i=>i.width).attr("height",i=>i.height).attr("fill",i=>i.fill),ut.append("text").attr("x",0).attr("y",0).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>h(i.text.horizontalPos)).attr("text-anchor",i=>f(i.text.verticalPos)).attr("transform",i=>g(i.text)).text(i=>i.text.text),K.selectAll("g.label").data(x.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(i=>i.text).attr("fill",i=>i.fill).attr("font-size",i=>i.fontSize).attr("dominant-baseline",i=>h(i.horizontalPos)).attr("text-anchor",i=>f(i.verticalPos)).attr("transform",i=>g(i));let dt=Z.selectAll("g.data-point").data(x.points).enter().append("g").attr("class","data-point");dt.append("circle").attr("cx",i=>i.x).attr("cy",i=>i.y).attr("r",i=>i.radius).attr("fill",i=>i.fill).attr("stroke",i=>i.strokeColor).attr("stroke-width",i=>i.strokeWidth),dt.append("text").attr("x",0).attr("y",0).text(i=>i.text.text).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>h(i.text.horizontalPos)).attr("text-anchor",i=>f(i.text.verticalPos)).attr("transform",i=>g(i.text))},"draw"),Ue={draw:$e},Qe={parser:Ie,db:Re,renderer:Ue,styles:l(()=>"","styles")};export{Qe as diagram};
|