cc-viewer 1.8.11 → 1.8.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{App-vpm6omRY.js → App-R6odqLoE.js} +2 -2
- package/dist/assets/MdxEditorPanel-CTqsETwc.js +1 -0
- package/dist/assets/{Mobile-BHIBdqHs.js → Mobile-o_QrQ_eI.js} +1 -1
- package/dist/assets/{ProxyStatsModal-DdV7wN2V.js → ProxyStatsModal-CM2H8JYh.js} +1 -1
- package/dist/assets/{_baseUniq-C2FCldN4.js → _baseUniq-B3e4JaL0.js} +1 -1
- package/dist/assets/{arc-CSzd_bdT.js → arc-DnoPn_qY.js} +1 -1
- package/dist/assets/architectureDiagram-Q4EWVU46-DrPKTbxH.js +1 -0
- package/dist/assets/blockDiagram-DXYQGD6D-CEaO0Vcw.js +1 -0
- package/dist/assets/c4Diagram-AHTNJAMY-BLaawFeg.js +1 -0
- package/dist/assets/{channel-xMmQtLq9.js → channel-DnYR1fF4.js} +1 -1
- package/dist/assets/{chunk-4BX2VUAB-DnFoMzQG.js → chunk-4BX2VUAB-Bfd4edKZ.js} +1 -1
- package/dist/assets/{chunk-4TB4RGXK-Dc5reuwv.js → chunk-4TB4RGXK-t2nMQmY7.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-DTKTLKcJ.js → chunk-55IACEB6-C6tLOjGX.js} +1 -1
- package/dist/assets/{chunk-EDXVE4YY-BNqgeN9r.js → chunk-EDXVE4YY-dWCvxbCb.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-DzJVZ11t.js → chunk-FMBD7UC4-BHELZLPK.js} +1 -1
- package/dist/assets/{chunk-OYMX7WX6-CjYwzMor.js → chunk-OYMX7WX6-C8XTkH1S.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-C0KVKecr.js → chunk-QZHKN3VN-CD0j6SAs.js} +1 -1
- package/dist/assets/{chunk-YZCP3GAM-3VhNeNVm.js → chunk-YZCP3GAM-D4dKfXJJ.js} +1 -1
- package/dist/assets/classDiagram-6PBFFD2Q-BecPAAuk.js +1 -0
- package/dist/assets/classDiagram-v2-HSJHXN6E-BecPAAuk.js +1 -0
- package/dist/assets/clone-B0_ghF3F.js +1 -0
- package/dist/assets/cose-bilkent-S5V4N54A-BF2HsiSD.js +1 -0
- package/dist/assets/dagre-KV5264BT-f3h967yx.js +1 -0
- package/dist/assets/diagram-5BDNPKRD-B9PzHQfh.js +1 -0
- package/dist/assets/diagram-G4DWMVQ6-kR953Bqm.js +1 -0
- package/dist/assets/diagram-MMDJMWI5-DAewa2eg.js +1 -0
- package/dist/assets/diagram-TYMM5635-C8HNTH6I.js +1 -0
- package/dist/assets/erDiagram-SMLLAGMA-BQ5P8wWK.js +1 -0
- package/dist/assets/flowDiagram-DWJPFMVM-BIpEkrMR.js +1 -0
- package/dist/assets/ganttDiagram-T4ZO3ILL-CWqSfB5v.js +1 -0
- package/dist/assets/gitGraphDiagram-UUTBAWPF-Ba-9yEbQ.js +1 -0
- package/dist/assets/{graph-CwiXMdRR.js → graph-D3zXKQ6P.js} +1 -1
- package/dist/assets/index--yjDHxJD.js +2 -0
- package/dist/assets/index-Bm3A5VLb.js +1 -0
- package/dist/assets/index-C9N0rZ7Z.js +1 -0
- package/dist/assets/index-DClD_EkN.js +1 -0
- package/dist/assets/index-DSd5P3WQ.js +1 -0
- package/dist/assets/index-G3xd-gLo.js +1 -0
- package/dist/assets/index-HLrnYsI1.js +1 -0
- package/dist/assets/index-Q8wp4Nof.js +1 -0
- package/dist/assets/infoDiagram-42DDH7IO-Cxm79ZJR.js +1 -0
- package/dist/assets/ishikawaDiagram-UXIWVN3A-Cd0vZP1B.js +1 -0
- package/dist/assets/journeyDiagram-VCZTEJTY-B2b57HXk.js +1 -0
- package/dist/assets/{jszip.min-Bq1JxqcN.js → jszip.min-Bj5uiEb2.js} +1 -1
- package/dist/assets/kanban-definition-6JOO6SKY-YCERiUCO.js +1 -0
- package/dist/assets/{layout-BQFiWq71.js → layout-Do5TlO2U.js} +1 -1
- package/dist/assets/{linear-BNV4po81.js → linear-BiJNTDgN.js} +1 -1
- package/dist/assets/{mermaid.core-DvwEdatr.js → mermaid.core-Dg0McRZt.js} +2 -2
- package/dist/assets/{min-DFik8k4L.js → min-T51iefht.js} +1 -1
- package/dist/assets/mindmap-definition-QFDTVHPH-Cu_GJxY3.js +1 -0
- package/dist/assets/pieDiagram-DEJITSTG-DldHHZXi.js +1 -0
- package/dist/assets/quadrantDiagram-34T5L4WZ-BzyTPNAJ.js +1 -0
- package/dist/assets/requirementDiagram-MS252O5E-C5xxFkvG.js +1 -0
- package/dist/assets/sankeyDiagram-XADWPNL6-OxdjoaE1.js +1 -0
- package/dist/assets/seqResourceLoaders-BgeRQt8C.js +2 -0
- package/dist/assets/{seqResourceLoaders-1EWxJwEP.css → seqResourceLoaders-Xx6a8E03.css} +2 -2
- package/dist/assets/sequenceDiagram-FGHM5R23-C7c89uIS.js +1 -0
- package/dist/assets/stateDiagram-FHFEXIEX-ssdJnDrO.js +1 -0
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-BP-0WClK.js +1 -0
- package/dist/assets/timeline-definition-GMOUNBTQ-sWScEpSM.js +1 -0
- package/dist/assets/{vendor-antd-BTBRwbax.js → vendor-antd-DKIytXho.js} +1 -1
- package/dist/assets/vendor-codemirror-4qgXq03k.js +1 -0
- package/dist/assets/vendor-mdxeditor-D5Z5D9fq.js +2 -0
- package/dist/assets/{vendor-qrcode-E9ld0lSz.js → vendor-qrcode-B7lb5qk1.js} +1 -1
- package/dist/assets/vendor-virtuoso-BqoXlbhH.js +1 -0
- package/dist/assets/vennDiagram-DHZGUBPP-DNfXR0ge.js +1 -0
- package/dist/assets/{wardley-RL74JXVD-BFcIn2-Q.js → wardley-RL74JXVD-JXd--CRD.js} +1 -1
- package/dist/assets/wardleyDiagram-NUSXRM2D-DHmNyVPM.js +1 -0
- package/dist/assets/xychartDiagram-5P7HB3ND-CTb0gltZ.js +1 -0
- package/dist/index.html +4 -5
- package/package.json +1 -1
- package/server/routes/files-content.js +2 -1
- package/server/routes/files-fs.js +3 -1
- package/dist/assets/MdxEditorPanel-CpknU7SR.js +0 -1
- package/dist/assets/architectureDiagram-Q4EWVU46-CjEbBe2R.js +0 -1
- package/dist/assets/blockDiagram-DXYQGD6D-BYzl2ukW.js +0 -1
- package/dist/assets/c4Diagram-AHTNJAMY-0x0_8O_X.js +0 -1
- package/dist/assets/classDiagram-6PBFFD2Q-DdUtH789.js +0 -1
- package/dist/assets/classDiagram-v2-HSJHXN6E-DdUtH789.js +0 -1
- package/dist/assets/clone-C6d2XDvR.js +0 -1
- package/dist/assets/cose-bilkent-S5V4N54A-DGE02sJS.js +0 -1
- package/dist/assets/dagre-KV5264BT-CY4eCcwS.js +0 -1
- package/dist/assets/diagram-5BDNPKRD-DHq2THYn.js +0 -1
- package/dist/assets/diagram-G4DWMVQ6-DD_76oJg.js +0 -1
- package/dist/assets/diagram-MMDJMWI5-BvQxk1jl.js +0 -1
- package/dist/assets/diagram-TYMM5635-B_tMXPJl.js +0 -1
- package/dist/assets/erDiagram-SMLLAGMA-DpuGbN9e.js +0 -1
- package/dist/assets/flowDiagram-DWJPFMVM-BW0xGFBf.js +0 -1
- package/dist/assets/ganttDiagram-T4ZO3ILL-BSzTiT93.js +0 -1
- package/dist/assets/gitGraphDiagram-UUTBAWPF-1tsgBlcn.js +0 -1
- package/dist/assets/index-9e6BGquk.js +0 -1
- package/dist/assets/index-BmpXfVQ8.js +0 -1
- package/dist/assets/index-CZWNaOo8.js +0 -1
- package/dist/assets/index-Cixs7aRD.js +0 -1
- package/dist/assets/index-Ct6Fi103.js +0 -1
- package/dist/assets/index-DIAMN9QO.js +0 -1
- package/dist/assets/index-DhjwHRxk.js +0 -1
- package/dist/assets/index-tnWldUm3.js +0 -2
- package/dist/assets/infoDiagram-42DDH7IO-Dk1ESZFk.js +0 -1
- package/dist/assets/ishikawaDiagram-UXIWVN3A-DcPyNwkI.js +0 -1
- package/dist/assets/journeyDiagram-VCZTEJTY-CZWieu1U.js +0 -1
- package/dist/assets/kanban-definition-6JOO6SKY-S1sSSTKx.js +0 -1
- package/dist/assets/mindmap-definition-QFDTVHPH-CebeX76u.js +0 -1
- package/dist/assets/pieDiagram-DEJITSTG-DMB5JbMP.js +0 -1
- package/dist/assets/quadrantDiagram-34T5L4WZ-BAYzoLVo.js +0 -1
- package/dist/assets/requirementDiagram-MS252O5E-CUQoAuOc.js +0 -1
- package/dist/assets/sankeyDiagram-XADWPNL6-Dt0AQuLW.js +0 -1
- package/dist/assets/seqResourceLoaders-C-QHRkUq.js +0 -2
- package/dist/assets/sequenceDiagram-FGHM5R23-HyZFUlMU.js +0 -1
- package/dist/assets/stateDiagram-FHFEXIEX-B8x24fuD.js +0 -1
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-2qtHlnwO.js +0 -1
- package/dist/assets/timeline-definition-GMOUNBTQ-TnbjDVtB.js +0 -1
- package/dist/assets/vendor-codemirror-CPWlhuQ1.js +0 -1
- package/dist/assets/vendor-mdxeditor-Cy5Xg_90.js +0 -2
- package/dist/assets/vendor-virtuoso-Bq6QMhgG.js +0 -1
- package/dist/assets/vennDiagram-DHZGUBPP-BqgIjkBO.js +0 -1
- package/dist/assets/wardleyDiagram-NUSXRM2D-CYDWQLb6.js +0 -1
- package/dist/assets/xychartDiagram-5P7HB3ND-zfusE3BC.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as __name,l as log,H as selectSvgElement,e as configureSvgSize}from"./mermaid.core-DvwEdatr.js";import{p as parse}from"./wardley-RL74JXVD-BFcIn2-Q.js";import"./vendor-mdxeditor-Cy5Xg_90.js";import"./vendor-antd-BTBRwbax.js";import"./vendor-virtuoso-Bq6QMhgG.js";import"./vendor-codemirror-CPWlhuQ1.js";import"./vendor-markdown-DOJHsAxX.js";import"./min-DFik8k4L.js";import"./_baseUniq-C2FCldN4.js";var DEFAULT_INFO_DB_version="11.14.0",diagram={parser:{parse:__name(async input=>{const ast=await parse("info",input);log.debug(ast)},"parse")},db:{getVersion:__name(()=>DEFAULT_INFO_DB_version,"getVersion")},renderer:{draw:__name((text,id,version)=>{log.debug("rendering info diagram\n"+text);const svg=selectSvgElement(id);configureSvgSize(svg,100,400,!0);svg.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${version}`)},"draw")}};export{diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var _a;import{_ as __name,c as getConfig2,M as parseFontSize,H as selectSvgElement,ar as at,y as clear,k as common_default,p as setDiagramTitle,a as getAccTitle,b as setAccTitle,g as getAccDescription,s as setAccDescription,q as getDiagramTitle,e as configureSvgSize}from"./mermaid.core-DvwEdatr.js";import"./vendor-mdxeditor-Cy5Xg_90.js";import"./vendor-antd-BTBRwbax.js";import"./vendor-virtuoso-Bq6QMhgG.js";import"./vendor-codemirror-CPWlhuQ1.js";import"./vendor-markdown-DOJHsAxX.js";var parser=function(){var o=__name(function(k,v,o2,l){for(o2=o2||{},l=k.length;l--;o2[k[l]]=v);return o2},"o"),$V0=[1,4],$V1=[1,14],$V2=[1,12],$V3=[1,13],$V4=[6,7,8],$V5=[1,20],$V6=[1,18],$V7=[1,19],$V8=[6,7,11],$V9=[1,6,13,14],$Va=[1,23],$Vb=[1,24],$Vc=[1,6,7,11,13,14],parser2={trace:__name(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:__name(function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 6:case 7:return yy;case 15:yy.addNode($$[$0-1].length,$$[$0].trim());break;case 16:yy.addNode(0,$$[$0].trim())}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:$V0},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:$V0},{6:$V1,7:[1,10],9:9,12:11,13:$V2,14:$V3},o($V4,[2,3]),{1:[2,2]},o($V4,[2,4]),o($V4,[2,5]),{1:[2,6],6:$V1,12:15,13:$V2,14:$V3},{6:$V1,9:16,12:11,13:$V2,14:$V3},{6:$V5,7:$V6,10:17,11:$V7},o($V8,[2,18],{14:[1,21]}),o($V8,[2,16]),o($V8,[2,17]),{6:$V5,7:$V6,10:22,11:$V7},{1:[2,7],6:$V1,12:15,13:$V2,14:$V3},o($V9,[2,14],{7:$Va,11:$Vb}),o($Vc,[2,8]),o($Vc,[2,9]),o($Vc,[2,10]),o($V8,[2,15]),o($V9,[2,13],{7:$Va,11:$Vb}),o($Vc,[2,11]),o($Vc,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:__name(function(str,hash){if(!hash.recoverable){var error=new Error(str);throw error.hash=hash,error}this.trace(str)},"parseError"),parse:__name(function(input){var self=this,stack=[0],tstack=[],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,args=lstack.slice.call(arguments,1),lexer2=Object.create(this.lexer),sharedState={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(sharedState.yy[k]=this.yy[k]);lexer2.setInput(input,sharedState.yy),sharedState.yy.lexer=lexer2,sharedState.yy.parser=this,void 0===lexer2.yylloc&&(lexer2.yylloc={});var yyloc=lexer2.yylloc;lstack.push(yyloc);var ranges=lexer2.options&&lexer2.options.ranges;function lex(){var token;return"number"!=typeof(token=tstack.pop()||lexer2.lex()||1)&&(token instanceof Array&&(token=(tstack=token).pop()),token=self.symbols_[token]||token),token}"function"==typeof sharedState.yy.parseError?this.parseError=sharedState.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,__name(function(n){stack.length=stack.length-2*n,vstack.length=vstack.length-n,lstack.length=lstack.length-n},"popStack"),__name(lex,"lex");for(var symbol,state,action,r,p,len,newState,expected,yyval={};;){if(state=stack[stack.length-1],this.defaultActions[state]?action=this.defaultActions[state]:(null==symbol&&(symbol=lex()),action=table[state]&&table[state][symbol]),void 0===action||!action.length||!action[0]){var errStr="";for(p in expected=[],table[state])this.terminals_[p]&&p>2&&expected.push("'"+this.terminals_[p]+"'");errStr=lexer2.showPosition?"Parse error on line "+(yylineno+1)+":\n"+lexer2.showPosition()+"\nExpecting "+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'":"Parse error on line "+(yylineno+1)+": Unexpected "+(1==symbol?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'"),this.parseError(errStr,{text:lexer2.match,token:this.terminals_[symbol]||symbol,line:lexer2.yylineno,loc:yyloc,expected:expected})}if(action[0]instanceof Array&&action.length>1)throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol);switch(action[0]){case 1:stack.push(symbol),vstack.push(lexer2.yytext),lstack.push(lexer2.yylloc),stack.push(action[1]),symbol=null,yyleng=lexer2.yyleng,yytext=lexer2.yytext,yylineno=lexer2.yylineno,yyloc=lexer2.yylloc;break;case 2:if(len=this.productions_[action[1]][1],yyval.$=vstack[vstack.length-len],yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column},ranges&&(yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]),void 0!==(r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,sharedState.yy,action[1],vstack,lstack].concat(args))))return r;len&&(stack=stack.slice(0,-1*len*2),vstack=vstack.slice(0,-1*len),lstack=lstack.slice(0,-1*len)),stack.push(this.productions_[action[1]][0]),vstack.push(yyval.$),lstack.push(yyval._$),newState=table[stack[stack.length-2]][stack[stack.length-1]],stack.push(newState);break;case 3:return!0}}return!0},"parse")},lexer=function(){return{EOF:1,parseError:__name(function(str,hash){if(!this.yy.parser)throw new Error(str);this.yy.parser.parseError(str,hash)},"parseError"),setInput:__name(function(input,yy){return this.yy=yy||this.yy||{},this._input=input,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:__name(function(){var ch=this._input[0];return this.yytext+=ch,this.yyleng++,this.offset++,this.match+=ch,this.matched+=ch,ch.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ch},"input"),unput:__name(function(ch){var len=ch.length,lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-len),this.offset-=len;var oldLines=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),lines.length-1&&(this.yylineno-=lines.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:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-len]),this.yyleng=this.yytext.length,this},"unput"),more:__name(function(){return this._more=!0,this},"more"),reject:__name(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:__name(function(n){this.unput(this.match.slice(n))},"less"),pastInput:__name(function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:__name(function(){var next=this.match;return next.length<20&&(next+=this._input.substr(0,20-next.length)),(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:__name(function(){var pre=this.pastInput(),c=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+"\n"+c+"^"},"showPosition"),test_match:__name(function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer&&(backup={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&&(backup.yylloc.range=this.yylloc.range.slice(0))),(lines=match[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=lines.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length},this.yytext+=match[0],this.match+=match[0],this.matches=match,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(match[0].length),this.matched+=match[0],token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),token)return token;if(this._backtrack){for(var k in backup)this[k]=backup[k];return!1}return!1},"test_match"),next:__name(function(){if(this.done)return this.EOF;var token,match,tempMatch,index;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var rules=this._currentRules(),i=0;i<rules.length;i++)if((tempMatch=this._input.match(this.rules[rules[i]]))&&(!match||tempMatch[0].length>match[0].length)){if(match=tempMatch,index=i,this.options.backtrack_lexer){if(!1!==(token=this.test_match(tempMatch,rules[i])))return token;if(this._backtrack){match=!1;continue}return!1}if(!this.options.flex)break}return match?!1!==(token=this.test_match(match,rules[index]))&&token:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:__name(function(){var r=this.next();return r||this.lex()},"lex"),begin:__name(function(condition){this.conditionStack.push(condition)},"begin"),popState:__name(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:__name(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:__name(function(n){return(n=this.conditionStack.length-1-Math.abs(n||0))>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:__name(function(condition){this.begin(condition)},"pushState"),stateStackSize:__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:__name(function(yy,yy_,$avoiding_name_collisions,YY_START){switch($avoiding_name_collisions){case 0:case 3:return 6;case 1:case 2:return 8;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}}}}();function Parser(){this.yy={}}return parser2.lexer=lexer,__name(Parser,"Parser"),Parser.prototype=parser2,parser2.Parser=Parser,new Parser}();parser.parser=parser;var ishikawa_default=parser,IshikawaDB=(__name(_a=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,clear()}getRoot(){return this.root}addNode(rawLevel,text){const label=common_default.sanitizeText(text,getConfig2());if(!this.root)return this.root={text:label,children:[]},this.stack=[{level:0,node:this.root}],void setDiagramTitle(label);this.baseLevel??(this.baseLevel=rawLevel);let level=rawLevel-this.baseLevel+1;for(level<=0&&(level=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=level;)this.stack.pop();const node={text:label,children:[]};this.stack[this.stack.length-1].node.children.push(node),this.stack.push({level:level,node:node})}getAccTitle(){return getAccTitle()}setAccTitle(title){setAccTitle(title)}getAccDescription(){return getAccDescription()}setAccDescription(description){setAccDescription(description)}getDiagramTitle(){return getDiagramTitle()}setDiagramTitle(title){setDiagramTitle(title)}},"IshikawaDB"),_a),ANGLE=82*Math.PI/180,COS_A=Math.cos(ANGLE),SIN_A=Math.sin(ANGLE),applyPaddedViewBox=__name((svgEl,pad,maxW)=>{const bbox=svgEl.node().getBBox(),w=bbox.width+2*pad,h=bbox.height+2*pad;configureSvgSize(svgEl,h,w,maxW),svgEl.attr("viewBox",`${bbox.x-pad} ${bbox.y-pad} ${w} ${h}`)},"applyPaddedViewBox"),draw=__name((_text,id,_version,diagram2)=>{var _a2,_b;const root=diagram2.db.getRoot();if(!root)return;const drawConfig=getConfig2(),{look:look,handDrawnSeed:handDrawnSeed,themeVariables:themeVariables}=drawConfig,fontSize=parseFontSize(drawConfig.fontSize)[0]??14,isHandDrawn="handDrawn"===look,causes=root.children??[],padding=(null==(_a2=drawConfig.ishikawa)?void 0:_a2.diagramPadding)??20,useMaxWidth=(null==(_b=drawConfig.ishikawa)?void 0:_b.useMaxWidth)??!1,svg=selectSvgElement(id),g=svg.append("g").attr("class","ishikawa"),roughSvg=isHandDrawn?at.svg(svg.node()):void 0,roughContext=roughSvg?{roughSvg:roughSvg,seed:handDrawnSeed??0,lineColor:(null==themeVariables?void 0:themeVariables.lineColor)??"#333",fillColor:(null==themeVariables?void 0:themeVariables.mainBkg)??"#fff"}:void 0,markerId=`ishikawa-arrow-${id}`;isHandDrawn||g.append("defs").append("marker").attr("id",markerId).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 spineX=0,spineY=250;const spineLine=isHandDrawn?void 0:drawLine(g,spineX,spineY,spineX,spineY,"ishikawa-spine");if(drawHead(g,spineX,spineY,root.text,fontSize,roughContext),!causes.length)return isHandDrawn&&drawLine(g,spineX,spineY,spineX,spineY,"ishikawa-spine",roughContext),void applyPaddedViewBox(svg,padding,useMaxWidth);spineX-=20;const upperCauses=causes.filter((_,i)=>i%2==0),lowerCauses=causes.filter((_,i)=>i%2==1),upperStats=sideStats(upperCauses),lowerStats=sideStats(lowerCauses),descendantTotal=upperStats.total+lowerStats.total;let upperLen=250,lowerLen=250;if(descendantTotal>0){const pool=500,minLen=75;upperLen=Math.max(minLen,pool*(upperStats.total/descendantTotal)),lowerLen=Math.max(minLen,pool*(lowerStats.total/descendantTotal))}const minSpacing=2*fontSize;upperLen=Math.max(upperLen,upperStats.max*minSpacing),lowerLen=Math.max(lowerLen,lowerStats.max*minSpacing),spineY=Math.max(upperLen,250),spineLine&&spineLine.attr("y1",spineY).attr("y2",spineY),g.select(".ishikawa-head-group").attr("transform",`translate(0,${spineY})`);const pairCount=Math.ceil(causes.length/2);for(let p=0;p<pairCount;p++){const pg=g.append("g").attr("class","ishikawa-pair");for(const[cause,dir,len]of[[causes[2*p],-1,upperLen],[causes[2*p+1],1,lowerLen]])cause&&drawBranch(pg,cause,spineX,spineY,dir,len,fontSize,roughContext);spineX=pg.selectAll("text").nodes().reduce((left,n)=>Math.min(left,n.getBBox().x),1/0)}if(isHandDrawn)drawLine(g,spineX,spineY,0,spineY,"ishikawa-spine",roughContext);else{spineLine.attr("x1",spineX);const markerUrl=`url(#${markerId})`;g.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",markerUrl)}applyPaddedViewBox(svg,padding,useMaxWidth)},"draw"),sideStats=__name(nodes=>{const countDescendants=__name(node=>node.children.reduce((sum,child)=>sum+1+countDescendants(child),0),"countDescendants");return nodes.reduce((stats,node)=>{const descendants=countDescendants(node);return stats.total+=descendants,stats.max=Math.max(stats.max,descendants),stats},{total:0,max:0})},"sideStats"),drawHead=__name((svg,x,y,label,fontSize,roughContext)=>{const maxChars=Math.max(6,Math.floor(110/(.6*fontSize))),headGroup=svg.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${x},${y})`),textEl=drawMultilineText(headGroup,wrapText(label,maxChars),0,0,"ishikawa-head-label","start",fontSize),tb=textEl.node().getBBox(),w=Math.max(60,tb.width+6),h=Math.max(40,2*tb.height+40),headPath=`M 0 ${-h/2} L 0 ${h/2} Q ${2.4*w} 0 0 ${-h/2} Z`;if(roughContext){const roughNode=roughContext.roughSvg.path(headPath,{roughness:1.5,seed:roughContext.seed,fill:roughContext.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:roughContext.lineColor,strokeWidth:2});headGroup.insert(()=>roughNode,":first-child").attr("class","ishikawa-head")}else headGroup.insert("path",":first-child").attr("class","ishikawa-head").attr("d",headPath);textEl.attr("transform",`translate(${(w-tb.width)/2-tb.x+3},${-tb.y-tb.height/2})`)},"drawHead"),flattenTree=__name((children,direction)=>{const entries=[],yOrder=[],walk=__name((nodes,pid,depth)=>{const ordered=-1===direction?[...nodes].reverse():nodes;for(const child of ordered){const idx=entries.length,gc=child.children??[];entries.push({depth:depth,text:wrapText(child.text,15),parentIndex:pid,childCount:gc.length}),depth%2==0?(yOrder.push(idx),gc.length&&walk(gc,idx,depth+1)):(gc.length&&walk(gc,idx,depth+1),yOrder.push(idx))}},"walk");return walk(children,-1,2),{entries:entries,yOrder:yOrder}},"flattenTree"),drawCauseLabel=__name((svg,text,x,y,direction,fontSize,roughContext)=>{const lg=svg.append("g").attr("class","ishikawa-label-group"),tb=drawMultilineText(lg,text,x,y+11*direction,"ishikawa-label cause","middle",fontSize).node().getBBox();if(roughContext){const roughNode=roughContext.roughSvg.rectangle(tb.x-20,tb.y-2,tb.width+40,tb.height+4,{roughness:1.5,seed:roughContext.seed,fill:roughContext.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:roughContext.lineColor,strokeWidth:2});lg.insert(()=>roughNode,":first-child").attr("class","ishikawa-label-box")}else lg.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",tb.x-20).attr("y",tb.y-2).attr("width",tb.width+40).attr("height",tb.height+4)},"drawCauseLabel"),drawArrowMarker=__name((g,x,y,dx,dy,roughContext)=>{const len=Math.sqrt(dx*dx+dy*dy);if(0===len)return;const ux=dx/len,uy=dy/len,px=6*-uy,py=6*ux,d=`M ${x} ${y} L ${x-6*ux*2+px} ${y-6*uy*2+py} L ${x-6*ux*2-px} ${y-6*uy*2-py} Z`,roughNode=roughContext.roughSvg.path(d,{roughness:1,seed:roughContext.seed,fill:roughContext.lineColor,fillStyle:"solid",stroke:roughContext.lineColor,strokeWidth:1});g.append(()=>roughNode)},"drawArrowMarker"),drawBranch=__name((svg,node,startX,startY,direction,length,fontSize,roughContext)=>{const children=node.children??[],lineLen=length*(children.length?1:.2),dy=SIN_A*lineLen*direction,endX=startX+-COS_A*lineLen,endY=startY+dy;if(drawLine(svg,startX,startY,endX,endY,"ishikawa-branch",roughContext),roughContext&&drawArrowMarker(svg,startX,startY,startX-endX,startY-endY,roughContext),drawCauseLabel(svg,node.text,endX,endY,direction,fontSize,roughContext),!children.length)return;const{entries:entries,yOrder:yOrder}=flattenTree(children,direction),entryCount=entries.length,ys=new Array(entryCount);for(const[slot,entryIdx]of yOrder.entries())ys[entryIdx]=startY+dy*((slot+1)/(entryCount+1));const bones=new Map;bones.set(-1,{x0:startX,y0:startY,x1:endX,y1:endY,childCount:children.length,childrenDrawn:0});const diagonalX=-COS_A,diagonalY=SIN_A*direction,oddLabel=direction<0?"ishikawa-label up":"ishikawa-label down";for(const[i,e]of entries.entries()){const y=ys[i],par=bones.get(e.parentIndex),grp=svg.append("g").attr("class","ishikawa-sub-group");let bx0=0,by0=0,bx1=0;if(e.depth%2==0){const dyP=par.y1-par.y0;bx0=lerp(par.x0,par.x1,dyP?(y-par.y0)/dyP:.5),by0=y,bx1=bx0-(e.childCount>0?60+5*e.childCount:30),drawLine(grp,bx0,y,bx1,y,"ishikawa-sub-branch",roughContext),roughContext&&drawArrowMarker(grp,bx0,y,1,0,roughContext),drawMultilineText(grp,e.text,bx1,y,"ishikawa-label align","end",fontSize)}else{const k=par.childrenDrawn++;bx0=lerp(par.x0,par.x1,(par.childCount-k)/(par.childCount+1)),by0=par.y0,bx1=bx0+diagonalX*((y-by0)/diagonalY),drawLine(grp,bx0,by0,bx1,y,"ishikawa-sub-branch",roughContext),roughContext&&drawArrowMarker(grp,bx0,by0,bx0-bx1,by0-y,roughContext),drawMultilineText(grp,e.text,bx1,y,oddLabel,"end",fontSize)}e.childCount>0&&bones.set(i,{x0:bx0,y0:by0,x1:bx1,y1:y,childCount:e.childCount,childrenDrawn:0})}},"drawBranch"),splitLines=__name(text=>text.split(/<br\s*\/?>|\n/),"splitLines"),wrapText=__name((text,maxChars)=>{if(text.length<=maxChars)return text;const lines=[];for(const word of text.split(/\s+/)){const last=lines.length-1;last>=0&&lines[last].length+1+word.length<=maxChars?lines[last]+=" "+word:lines.push(word)}return lines.join("\n")},"wrapText"),drawMultilineText=__name((g,text,x,y,cls,anchor,fontSize)=>{const lines=splitLines(text),lh=1.05*fontSize,el=g.append("text").attr("class",cls).attr("text-anchor",anchor).attr("x",x).attr("y",y-(lines.length-1)*lh/2);for(const[i,line]of lines.entries())el.append("tspan").attr("x",x).attr("dy",0===i?0:lh).text(line);return el},"drawMultilineText"),lerp=__name((a,b,t)=>a+(b-a)*t,"lerp"),drawLine=__name((g,x1,y1,x2,y2,cls,roughContext)=>{if(roughContext){const roughNode=roughContext.roughSvg.line(x1,y1,x2,y2,{roughness:1.5,seed:roughContext.seed,stroke:roughContext.lineColor,strokeWidth:2});return void g.append(()=>roughNode).attr("class",cls)}return g.append("line").attr("class",cls).attr("x1",x1).attr("y1",y1).attr("x2",x2).attr("y2",y2)},"drawLine"),renderer={draw:draw},ishikawaStyles_default=__name(options=>`\n.ishikawa .ishikawa-spine,\n.ishikawa .ishikawa-branch,\n.ishikawa .ishikawa-sub-branch {\n stroke: ${options.lineColor};\n stroke-width: 2;\n fill: none;\n}\n\n.ishikawa .ishikawa-sub-branch {\n stroke-width: 1;\n}\n\n.ishikawa .ishikawa-arrow {\n fill: ${options.lineColor};\n}\n\n.ishikawa .ishikawa-head {\n fill: ${options.mainBkg};\n stroke: ${options.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa .ishikawa-label-box {\n fill: ${options.mainBkg};\n stroke: ${options.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa text {\n font-family: ${options.fontFamily};\n font-size: ${options.fontSize};\n fill: ${options.textColor};\n}\n\n.ishikawa .ishikawa-head-label {\n font-weight: 600;\n text-anchor: middle;\n dominant-baseline: middle;\n font-size: 14px;\n}\n\n.ishikawa .ishikawa-label {\n text-anchor: end;\n}\n\n.ishikawa .ishikawa-label.cause {\n text-anchor: middle;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.align {\n text-anchor: end;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.up {\n dominant-baseline: baseline;\n}\n\n.ishikawa .ishikawa-label.down {\n dominant-baseline: hanging;\n}\n`,"getStyles"),diagram={parser:ishikawa_default,get db(){return new IshikawaDB},renderer:renderer,styles:ishikawaStyles_default};export{diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as getIconStyles}from"./chunk-FMBD7UC4-DzJVZ11t.js";import{a as drawBackgroundRect,g as getNoteRect,h as drawText,d as drawRect}from"./chunk-YZCP3GAM-3VhNeNVm.js";import{g as getAccDescription,s as setAccDescription,a as getAccTitle,b as setAccTitle,q as getDiagramTitle,p as setDiagramTitle,_ as __name,c as getConfig2,d as select,e as configureSvgSize,y as clear}from"./mermaid.core-DvwEdatr.js";import{d as d3arc}from"./arc-CSzd_bdT.js";import"./vendor-mdxeditor-Cy5Xg_90.js";import"./vendor-antd-BTBRwbax.js";import"./vendor-virtuoso-Bq6QMhgG.js";import"./vendor-codemirror-CPWlhuQ1.js";import"./vendor-markdown-DOJHsAxX.js";var parser=function(){var o=__name(function(k,v,o2,l){for(o2=o2||{},l=k.length;l--;o2[k[l]]=v);return o2},"o"),$V0=[6,8,10,11,12,14,16,17,18],$V1=[1,9],$V2=[1,10],$V3=[1,11],$V4=[1,12],$V5=[1,13],$V6=[1,14],parser2={trace:__name(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:__name(function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 1:return $$[$0-1];case 2:case 6:case 7:this.$=[];break;case 3:$$[$0-1].push($$[$0]),this.$=$$[$0-1];break;case 4:case 5:this.$=$$[$0];break;case 8:yy.setDiagramTitle($$[$0].substr(6)),this.$=$$[$0].substr(6);break;case 9:this.$=$$[$0].trim(),yy.setAccTitle(this.$);break;case 10:case 11:this.$=$$[$0].trim(),yy.setAccDescription(this.$);break;case 12:yy.addSection($$[$0].substr(8)),this.$=$$[$0].substr(8);break;case 13:yy.addTask($$[$0-1],$$[$0]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:$V1,12:$V2,14:$V3,16:$V4,17:$V5,18:$V6},o($V0,[2,7],{1:[2,1]}),o($V0,[2,3]),{9:15,11:$V1,12:$V2,14:$V3,16:$V4,17:$V5,18:$V6},o($V0,[2,5]),o($V0,[2,6]),o($V0,[2,8]),{13:[1,16]},{15:[1,17]},o($V0,[2,11]),o($V0,[2,12]),{19:[1,18]},o($V0,[2,4]),o($V0,[2,9]),o($V0,[2,10]),o($V0,[2,13])],defaultActions:{},parseError:__name(function(str,hash){if(!hash.recoverable){var error=new Error(str);throw error.hash=hash,error}this.trace(str)},"parseError"),parse:__name(function(input){var self=this,stack=[0],tstack=[],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,args=lstack.slice.call(arguments,1),lexer2=Object.create(this.lexer),sharedState={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(sharedState.yy[k]=this.yy[k]);lexer2.setInput(input,sharedState.yy),sharedState.yy.lexer=lexer2,sharedState.yy.parser=this,void 0===lexer2.yylloc&&(lexer2.yylloc={});var yyloc=lexer2.yylloc;lstack.push(yyloc);var ranges=lexer2.options&&lexer2.options.ranges;function lex(){var token;return"number"!=typeof(token=tstack.pop()||lexer2.lex()||1)&&(token instanceof Array&&(token=(tstack=token).pop()),token=self.symbols_[token]||token),token}"function"==typeof sharedState.yy.parseError?this.parseError=sharedState.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,__name(function(n){stack.length=stack.length-2*n,vstack.length=vstack.length-n,lstack.length=lstack.length-n},"popStack"),__name(lex,"lex");for(var symbol,state,action,r,p,len,newState,expected,yyval={};;){if(state=stack[stack.length-1],this.defaultActions[state]?action=this.defaultActions[state]:(null==symbol&&(symbol=lex()),action=table[state]&&table[state][symbol]),void 0===action||!action.length||!action[0]){var errStr="";for(p in expected=[],table[state])this.terminals_[p]&&p>2&&expected.push("'"+this.terminals_[p]+"'");errStr=lexer2.showPosition?"Parse error on line "+(yylineno+1)+":\n"+lexer2.showPosition()+"\nExpecting "+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'":"Parse error on line "+(yylineno+1)+": Unexpected "+(1==symbol?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'"),this.parseError(errStr,{text:lexer2.match,token:this.terminals_[symbol]||symbol,line:lexer2.yylineno,loc:yyloc,expected:expected})}if(action[0]instanceof Array&&action.length>1)throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol);switch(action[0]){case 1:stack.push(symbol),vstack.push(lexer2.yytext),lstack.push(lexer2.yylloc),stack.push(action[1]),symbol=null,yyleng=lexer2.yyleng,yytext=lexer2.yytext,yylineno=lexer2.yylineno,yyloc=lexer2.yylloc;break;case 2:if(len=this.productions_[action[1]][1],yyval.$=vstack[vstack.length-len],yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column},ranges&&(yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]),void 0!==(r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,sharedState.yy,action[1],vstack,lstack].concat(args))))return r;len&&(stack=stack.slice(0,-1*len*2),vstack=vstack.slice(0,-1*len),lstack=lstack.slice(0,-1*len)),stack.push(this.productions_[action[1]][0]),vstack.push(yyval.$),lstack.push(yyval._$),newState=table[stack[stack.length-2]][stack[stack.length-1]],stack.push(newState);break;case 3:return!0}}return!0},"parse")},lexer=function(){return{EOF:1,parseError:__name(function(str,hash){if(!this.yy.parser)throw new Error(str);this.yy.parser.parseError(str,hash)},"parseError"),setInput:__name(function(input,yy){return this.yy=yy||this.yy||{},this._input=input,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:__name(function(){var ch=this._input[0];return this.yytext+=ch,this.yyleng++,this.offset++,this.match+=ch,this.matched+=ch,ch.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ch},"input"),unput:__name(function(ch){var len=ch.length,lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-len),this.offset-=len;var oldLines=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),lines.length-1&&(this.yylineno-=lines.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:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-len]),this.yyleng=this.yytext.length,this},"unput"),more:__name(function(){return this._more=!0,this},"more"),reject:__name(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:__name(function(n){this.unput(this.match.slice(n))},"less"),pastInput:__name(function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:__name(function(){var next=this.match;return next.length<20&&(next+=this._input.substr(0,20-next.length)),(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:__name(function(){var pre=this.pastInput(),c=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+"\n"+c+"^"},"showPosition"),test_match:__name(function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer&&(backup={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&&(backup.yylloc.range=this.yylloc.range.slice(0))),(lines=match[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=lines.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length},this.yytext+=match[0],this.match+=match[0],this.matches=match,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(match[0].length),this.matched+=match[0],token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),token)return token;if(this._backtrack){for(var k in backup)this[k]=backup[k];return!1}return!1},"test_match"),next:__name(function(){if(this.done)return this.EOF;var token,match,tempMatch,index;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var rules=this._currentRules(),i=0;i<rules.length;i++)if((tempMatch=this._input.match(this.rules[rules[i]]))&&(!match||tempMatch[0].length>match[0].length)){if(match=tempMatch,index=i,this.options.backtrack_lexer){if(!1!==(token=this.test_match(tempMatch,rules[i])))return token;if(this._backtrack){match=!1;continue}return!1}if(!this.options.flex)break}return match?!1!==(token=this.test_match(match,rules[index]))&&token:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:__name(function(){var r=this.next();return r||this.lex()},"lex"),begin:__name(function(condition){this.conditionStack.push(condition)},"begin"),popState:__name(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:__name(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:__name(function(n){return(n=this.conditionStack.length-1-Math.abs(n||0))>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:__name(function(condition){this.begin(condition)},"pushState"),stateStackSize:__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:__name(function(yy,yy_,$avoiding_name_collisions,YY_START){switch($avoiding_name_collisions){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}}();function Parser(){this.yy={}}return parser2.lexer=lexer,__name(Parser,"Parser"),Parser.prototype=parser2,parser2.Parser=Parser,new Parser}();parser.parser=parser;var journey_default=parser,currentSection="",sections=[],tasks=[],rawTasks=[],clear2=__name(function(){sections.length=0,tasks.length=0,currentSection="",rawTasks.length=0,clear()},"clear"),addSection=__name(function(txt){currentSection=txt,sections.push(txt)},"addSection"),getSections=__name(function(){return sections},"getSections"),getTasks=__name(function(){let allItemsProcessed=compileTasks();let iterationCount=0;for(;!allItemsProcessed&&iterationCount<100;)allItemsProcessed=compileTasks(),iterationCount++;return tasks.push(...rawTasks),tasks},"getTasks"),updateActors=__name(function(){const tempActors=[];tasks.forEach(task=>{task.people&&tempActors.push(...task.people)});return[...new Set(tempActors)].sort()},"updateActors"),addTask=__name(function(descr,taskData){const pieces=taskData.substr(1).split(":");let score=0,peeps=[];1===pieces.length?(score=Number(pieces[0]),peeps=[]):(score=Number(pieces[0]),peeps=pieces[1].split(","));const peopleList=peeps.map(s=>s.trim()),rawTask={section:currentSection,type:currentSection,people:peopleList,task:descr,score:score};rawTasks.push(rawTask)},"addTask"),addTaskOrg=__name(function(descr){const newTask={section:currentSection,type:currentSection,description:descr,task:descr,classes:[]};tasks.push(newTask)},"addTaskOrg"),compileTasks=__name(function(){const compileTask=__name(function(pos){return rawTasks[pos].processed},"compileTask");let allProcessed=!0;for(const[i,rawTask]of rawTasks.entries())compileTask(i),allProcessed=allProcessed&&rawTask.processed;return allProcessed},"compileTasks"),getActors=__name(function(){return updateActors()},"getActors"),journeyDb_default={getConfig:__name(()=>getConfig2().journey,"getConfig"),clear:clear2,setDiagramTitle:setDiagramTitle,getDiagramTitle:getDiagramTitle,setAccTitle:setAccTitle,getAccTitle:getAccTitle,setAccDescription:setAccDescription,getAccDescription:getAccDescription,addSection:addSection,getSections:getSections,getTasks:getTasks,addTask:addTask,addTaskOrg:addTaskOrg,getActors:getActors},styles_default=__name(options=>`.label {\n font-family: ${options.fontFamily};\n color: ${options.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${options.textColor}\n }\n\n .legend {\n fill: ${options.textColor};\n font-family: ${options.fontFamily};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${options.textColor}\n }\n\n .face {\n ${options.faceColor?`fill: ${options.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${options.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${options.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${options.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${options.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${options.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${options.fontFamily};\n font-size: 12px;\n background: ${options.tertiaryColor};\n border: 1px solid ${options.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${options.fillType0?`fill: ${options.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${options.fillType0?`fill: ${options.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${options.fillType0?`fill: ${options.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${options.fillType0?`fill: ${options.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${options.fillType0?`fill: ${options.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${options.fillType0?`fill: ${options.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${options.fillType0?`fill: ${options.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${options.fillType0?`fill: ${options.fillType7}`:""};\n }\n\n .actor-0 {\n ${options.actor0?`fill: ${options.actor0}`:""};\n }\n .actor-1 {\n ${options.actor1?`fill: ${options.actor1}`:""};\n }\n .actor-2 {\n ${options.actor2?`fill: ${options.actor2}`:""};\n }\n .actor-3 {\n ${options.actor3?`fill: ${options.actor3}`:""};\n }\n .actor-4 {\n ${options.actor4?`fill: ${options.actor4}`:""};\n }\n .actor-5 {\n ${options.actor5?`fill: ${options.actor5}`:""};\n }\n ${getIconStyles()}\n`,"getStyles"),drawRect2=__name(function(elem,rectData){return drawRect(elem,rectData)},"drawRect"),drawFace=__name(function(element,faceData){const circleElement=element.append("circle").attr("cx",faceData.cx).attr("cy",faceData.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),face=element.append("g");function smile(face2){const arc=d3arc().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);face2.append("path").attr("class","mouth").attr("d",arc).attr("transform","translate("+faceData.cx+","+(faceData.cy+2)+")")}function sad(face2){const arc=d3arc().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);face2.append("path").attr("class","mouth").attr("d",arc).attr("transform","translate("+faceData.cx+","+(faceData.cy+7)+")")}function ambivalent(face2){face2.append("line").attr("class","mouth").attr("stroke",2).attr("x1",faceData.cx-5).attr("y1",faceData.cy+7).attr("x2",faceData.cx+5).attr("y2",faceData.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return face.append("circle").attr("cx",faceData.cx-5).attr("cy",faceData.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),face.append("circle").attr("cx",faceData.cx+5).attr("cy",faceData.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),__name(smile,"smile"),__name(sad,"sad"),__name(ambivalent,"ambivalent"),faceData.score>3?smile(face):faceData.score<3?sad(face):ambivalent(face),circleElement},"drawFace"),drawCircle=__name(function(element,circleData){const circleElement=element.append("circle");return circleElement.attr("cx",circleData.cx),circleElement.attr("cy",circleData.cy),circleElement.attr("class","actor-"+circleData.pos),circleElement.attr("fill",circleData.fill),circleElement.attr("stroke",circleData.stroke),circleElement.attr("r",circleData.r),void 0!==circleElement.class&&circleElement.attr("class",circleElement.class),void 0!==circleData.title&&circleElement.append("title").text(circleData.title),circleElement},"drawCircle"),drawText2=__name(function(elem,textData){return drawText(elem,textData)},"drawText"),drawLabel=__name(function(elem,txtObject){function genPoints(x,y,width,height,cut){return x+","+y+" "+(x+width)+","+y+" "+(x+width)+","+(y+height-cut)+" "+(x+width-1.2*cut)+","+(y+height)+" "+x+","+(y+height)}__name(genPoints,"genPoints");const polygon=elem.append("polygon");polygon.attr("points",genPoints(txtObject.x,txtObject.y,50,20,7)),polygon.attr("class","labelBox"),txtObject.y=txtObject.y+txtObject.labelMargin,txtObject.x=txtObject.x+.5*txtObject.labelMargin,drawText2(elem,txtObject)},"drawLabel"),drawSection=__name(function(elem,section,conf2){const g=elem.append("g"),rect=getNoteRect();rect.x=section.x,rect.y=section.y,rect.fill=section.fill,rect.width=conf2.width*section.taskCount+conf2.diagramMarginX*(section.taskCount-1),rect.height=conf2.height,rect.class="journey-section section-type-"+section.num,rect.rx=3,rect.ry=3,drawRect2(g,rect),_drawTextCandidateFunc(conf2)(section.text,g,rect.x,rect.y,rect.width,rect.height,{class:"journey-section section-type-"+section.num},conf2,section.colour)},"drawSection"),taskCount=-1,drawTask=__name(function(elem,task,conf2,diagramId){const center=task.x+conf2.width/2,g=elem.append("g");taskCount++;g.append("line").attr("id",diagramId+"-task"+taskCount).attr("x1",center).attr("y1",task.y).attr("x2",center).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),drawFace(g,{cx:center,cy:300+30*(5-task.score),score:task.score});const rect=getNoteRect();rect.x=task.x,rect.y=task.y,rect.fill=task.fill,rect.width=conf2.width,rect.height=conf2.height,rect.class="task task-type-"+task.num,rect.rx=3,rect.ry=3,drawRect2(g,rect);let xPos=task.x+14;task.people.forEach(person=>{const colour=task.actors[person].color,circle={cx:xPos,cy:task.y,r:7,fill:colour,stroke:"#000",title:person,pos:task.actors[person].position};drawCircle(g,circle),xPos+=10}),_drawTextCandidateFunc(conf2)(task.task,g,rect.x,rect.y,rect.width,rect.height,{class:"task"},conf2,task.colour)},"drawTask"),drawBackgroundRect2=__name(function(elem,bounds2){drawBackgroundRect(elem,bounds2)},"drawBackgroundRect"),_drawTextCandidateFunc=function(){function byText(content,g,x,y,width,height,textAttrs,colour){_setTextAttrs(g.append("text").attr("x",x+width/2).attr("y",y+height/2+5).style("font-color",colour).style("text-anchor","middle").text(content),textAttrs)}function byTspan(content,g,x,y,width,height,textAttrs,conf2,colour){const{taskFontSize:taskFontSize,taskFontFamily:taskFontFamily}=conf2,lines=content.split(/<br\s*\/?>/gi);for(let i=0;i<lines.length;i++){const dy=i*taskFontSize-taskFontSize*(lines.length-1)/2,text=g.append("text").attr("x",x+width/2).attr("y",y).attr("fill",colour).style("text-anchor","middle").style("font-size",taskFontSize).style("font-family",taskFontFamily);text.append("tspan").attr("x",x+width/2).attr("dy",dy).text(lines[i]),text.attr("y",y+height/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),_setTextAttrs(text,textAttrs)}}function byFo(content,g,x,y,width,height,textAttrs,conf2){const body=g.append("switch"),text=body.append("foreignObject").attr("x",x).attr("y",y).attr("width",width).attr("height",height).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");text.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(content),byTspan(content,body,x,y,width,height,textAttrs,conf2),_setTextAttrs(text,textAttrs)}function _setTextAttrs(toText,fromTextAttrsDict){for(const key in fromTextAttrsDict)key in fromTextAttrsDict&&toText.attr(key,fromTextAttrsDict[key])}return __name(byText,"byText"),__name(byTspan,"byTspan"),__name(byFo,"byFo"),__name(_setTextAttrs,"_setTextAttrs"),function(conf2){return"fo"===conf2.textPlacement?byFo:"old"===conf2.textPlacement?byText:byTspan}}(),svgDraw_default={drawRect:drawRect2,drawCircle:drawCircle,drawSection:drawSection,drawText:drawText2,drawLabel:drawLabel,drawTask:drawTask,drawBackgroundRect:drawBackgroundRect2,initGraphics:__name(function(graphics,id){taskCount=-1,graphics.append("defs").append("marker").attr("id",id+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics")},setConf=__name(function(cnf){Object.keys(cnf).forEach(function(key){conf[key]=cnf[key]})},"setConf"),actors={},maxWidth=0;function drawActorLegend(diagram2){const conf2=getConfig2().journey,maxLabelWidth=conf2.maxLabelWidth;maxWidth=0;let yPos=60;Object.keys(actors).forEach(person=>{const colour=actors[person].color,circleData={cx:20,cy:yPos,r:7,fill:colour,stroke:"#000",pos:actors[person].position};svgDraw_default.drawCircle(diagram2,circleData);let measureText=diagram2.append("text").attr("visibility","hidden").text(person);const fullTextWidth=measureText.node().getBoundingClientRect().width;measureText.remove();let lines=[];if(fullTextWidth<=maxLabelWidth)lines=[person];else{const words=person.split(" ");let currentLine="";measureText=diagram2.append("text").attr("visibility","hidden"),words.forEach(word=>{const testLine=currentLine?`${currentLine} ${word}`:word;measureText.text(testLine);if(measureText.node().getBoundingClientRect().width>maxLabelWidth){if(currentLine&&lines.push(currentLine),currentLine=word,measureText.text(word),measureText.node().getBoundingClientRect().width>maxLabelWidth){let brokenWord="";for(const char of word)brokenWord+=char,measureText.text(brokenWord+"-"),measureText.node().getBoundingClientRect().width>maxLabelWidth&&(lines.push(brokenWord.slice(0,-1)+"-"),brokenWord=char);currentLine=brokenWord}}else currentLine=testLine}),currentLine&&lines.push(currentLine),measureText.remove()}lines.forEach((line,index)=>{const labelData={x:40,y:yPos+7+20*index,fill:"#666",text:line,textMargin:conf2.boxTextMargin??5},lineWidth=svgDraw_default.drawText(diagram2,labelData).node().getBoundingClientRect().width;lineWidth>maxWidth&&lineWidth>conf2.leftMargin-lineWidth&&(maxWidth=lineWidth)}),yPos+=Math.max(20,20*lines.length)})}__name(drawActorLegend,"drawActorLegend");var conf=getConfig2().journey,leftMargin=0,draw=__name(function(text,id,version,diagObj){const configObject=getConfig2(),titleColor=configObject.journey.titleColor,titleFontSize=configObject.journey.titleFontSize,titleFontFamily=configObject.journey.titleFontFamily,securityLevel=configObject.securityLevel;let sandboxElement;"sandbox"===securityLevel&&(sandboxElement=select("#i"+id));const root=select("sandbox"===securityLevel?sandboxElement.nodes()[0].contentDocument.body:"body");bounds.init();const diagram2=root.select("#"+id);svgDraw_default.initGraphics(diagram2,id);const tasks2=diagObj.db.getTasks(),title=diagObj.db.getDiagramTitle(),actorNames=diagObj.db.getActors();for(const member in actors)delete actors[member];let actorPos=0;actorNames.forEach(actorName=>{actors[actorName]={color:conf.actorColours[actorPos%conf.actorColours.length],position:actorPos},actorPos++}),drawActorLegend(diagram2),leftMargin=conf.leftMargin+maxWidth,bounds.insert(0,0,leftMargin,50*Object.keys(actors).length),drawTasks(diagram2,tasks2,0,id);const box=bounds.getBounds();title&&diagram2.append("text").text(title).attr("x",leftMargin).attr("font-size",titleFontSize).attr("font-weight","bold").attr("y",25).attr("fill",titleColor).attr("font-family",titleFontFamily);const height=box.stopy-box.starty+2*conf.diagramMarginY,width=leftMargin+box.stopx+2*conf.diagramMarginX;configureSvgSize(diagram2,height,width,conf.useMaxWidth),diagram2.append("line").attr("x1",leftMargin).attr("y1",4*conf.height).attr("x2",width-leftMargin-4).attr("y2",4*conf.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+id+"-arrowhead)");const extraVertForTitle=title?70:0;diagram2.attr("viewBox",`${box.startx} -25 ${width} ${height+extraVertForTitle}`),diagram2.attr("preserveAspectRatio","xMinYMin meet"),diagram2.attr("height",height+extraVertForTitle+25)},"draw"),bounds={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:__name(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:__name(function(obj,key,val,fun){void 0===obj[key]?obj[key]=val:obj[key]=fun(val,obj[key])},"updateVal"),updateBounds:__name(function(startx,starty,stopx,stopy){const conf2=getConfig2().journey,_self=this;let cnt=0;function updateFn(type){return __name(function(item){cnt++;const n=_self.sequenceItems.length-cnt+1;_self.updateVal(item,"starty",starty-n*conf2.boxMargin,Math.min),_self.updateVal(item,"stopy",stopy+n*conf2.boxMargin,Math.max),_self.updateVal(bounds.data,"startx",startx-n*conf2.boxMargin,Math.min),_self.updateVal(bounds.data,"stopx",stopx+n*conf2.boxMargin,Math.max),"activation"!==type&&(_self.updateVal(item,"startx",startx-n*conf2.boxMargin,Math.min),_self.updateVal(item,"stopx",stopx+n*conf2.boxMargin,Math.max),_self.updateVal(bounds.data,"starty",starty-n*conf2.boxMargin,Math.min),_self.updateVal(bounds.data,"stopy",stopy+n*conf2.boxMargin,Math.max))},"updateItemBounds")}__name(updateFn,"updateFn"),this.sequenceItems.forEach(updateFn())},"updateBounds"),insert:__name(function(startx,starty,stopx,stopy){const _startx=Math.min(startx,stopx),_stopx=Math.max(startx,stopx),_starty=Math.min(starty,stopy),_stopy=Math.max(starty,stopy);this.updateVal(bounds.data,"startx",_startx,Math.min),this.updateVal(bounds.data,"starty",_starty,Math.min),this.updateVal(bounds.data,"stopx",_stopx,Math.max),this.updateVal(bounds.data,"stopy",_stopy,Math.max),this.updateBounds(_startx,_starty,_stopx,_stopy)},"insert"),bumpVerticalPos:__name(function(bump){this.verticalPos=this.verticalPos+bump,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:__name(function(){return this.verticalPos},"getVerticalPos"),getBounds:__name(function(){return this.data},"getBounds")},fills=conf.sectionFills,textColours=conf.sectionColours,drawTasks=__name(function(diagram2,tasks2,verticalPos,diagramId){const conf2=getConfig2().journey;let lastSection="";const taskPos=verticalPos+(2*conf2.height+conf2.diagramMarginY);let sectionNumber=0,fill="#CCC",colour="black",num=0;for(const[i,task]of tasks2.entries()){if(lastSection!==task.section){fill=fills[sectionNumber%fills.length],num=sectionNumber%fills.length,colour=textColours[sectionNumber%textColours.length];let taskInSectionCount=0;const currentSection2=task.section;for(let taskIndex=i;taskIndex<tasks2.length&&tasks2[taskIndex].section==currentSection2;taskIndex++)taskInSectionCount+=1;const section={x:i*conf2.taskMargin+i*conf2.width+leftMargin,y:50,text:task.section,fill:fill,num:num,colour:colour,taskCount:taskInSectionCount};svgDraw_default.drawSection(diagram2,section,conf2),lastSection=task.section,sectionNumber++}const taskActors=task.people.reduce((acc,actorName)=>(actors[actorName]&&(acc[actorName]=actors[actorName]),acc),{});task.x=i*conf2.taskMargin+i*conf2.width+leftMargin,task.y=taskPos,task.width=conf2.diagramMarginX,task.height=conf2.diagramMarginY,task.colour=colour,task.fill=fill,task.num=num,task.actors=taskActors,svgDraw_default.drawTask(diagram2,task,conf2,diagramId),bounds.insert(task.x,task.y,task.x+task.width+conf2.taskMargin,450)}},"drawTasks"),journeyRenderer_default={setConf:setConf,draw:draw},diagram={parser:journey_default,db:journeyDb_default,renderer:journeyRenderer_default,styles:styles_default,init:__name(cnf=>{journeyRenderer_default.setConf(cnf.journey),journeyDb_default.clear()},"init")};export{diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as __name,l as log,c as getConfig2,H as selectSvgElement,ae as insertCluster,af as insertNode,ag as positionNode,X as setupGraphViewbox,F as defaultConfig_default,i as sanitizeText,t as load,J as JSON_SCHEMA,U as isDark,V as lighten,W as darken}from"./mermaid.core-DvwEdatr.js";import{g as getIconStyles}from"./chunk-FMBD7UC4-DzJVZ11t.js";import"./vendor-mdxeditor-Cy5Xg_90.js";import"./vendor-antd-BTBRwbax.js";import"./vendor-virtuoso-Bq6QMhgG.js";import"./vendor-codemirror-CPWlhuQ1.js";import"./vendor-markdown-DOJHsAxX.js";var parser=function(){var o=__name(function(k,v,o2,l){for(o2=o2||{},l=k.length;l--;o2[k[l]]=v);return o2},"o"),$V0=[1,4],$V1=[1,13],$V2=[1,12],$V3=[1,15],$V4=[1,16],$V5=[1,20],$V6=[1,19],$V7=[6,7,8],$V8=[1,26],$V9=[1,24],$Va=[1,25],$Vb=[6,7,11],$Vc=[1,31],$Vd=[6,7,11,24],$Ve=[1,6,13,16,17,20,23],$Vf=[1,35],$Vg=[1,36],$Vh=[1,6,7,11,13,16,17,20,23],$Vi=[1,38],parser2={trace:__name(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:__name(function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 6:case 7:return yy;case 8:yy.getLogger().trace("Stop NL ");break;case 9:yy.getLogger().trace("Stop EOF ");break;case 11:yy.getLogger().trace("Stop NL2 ");break;case 12:yy.getLogger().trace("Stop EOF2 ");break;case 15:yy.getLogger().info("Node: ",$$[$0-1].id),yy.addNode($$[$0-2].length,$$[$0-1].id,$$[$0-1].descr,$$[$0-1].type,$$[$0]);break;case 16:yy.getLogger().info("Node: ",$$[$0].id),yy.addNode($$[$0-1].length,$$[$0].id,$$[$0].descr,$$[$0].type);break;case 17:yy.getLogger().trace("Icon: ",$$[$0]),yy.decorateNode({icon:$$[$0]});break;case 18:case 23:yy.decorateNode({class:$$[$0]});break;case 19:yy.getLogger().trace("SPACELIST");break;case 20:yy.getLogger().trace("Node: ",$$[$0-1].id),yy.addNode(0,$$[$0-1].id,$$[$0-1].descr,$$[$0-1].type,$$[$0]);break;case 21:yy.getLogger().trace("Node: ",$$[$0].id),yy.addNode(0,$$[$0].id,$$[$0].descr,$$[$0].type);break;case 22:yy.decorateNode({icon:$$[$0]});break;case 27:yy.getLogger().trace("node found ..",$$[$0-2]),this.$={id:$$[$0-1],descr:$$[$0-1],type:yy.getType($$[$0-2],$$[$0])};break;case 28:this.$={id:$$[$0],descr:$$[$0],type:0};break;case 29:yy.getLogger().trace("node found ..",$$[$0-3]),this.$={id:$$[$0-3],descr:$$[$0-1],type:yy.getType($$[$0-2],$$[$0])};break;case 30:this.$=$$[$0-1]+$$[$0];break;case 31:this.$=$$[$0]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:$V0},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:$V0},{6:$V1,7:[1,10],9:9,12:11,13:$V2,14:14,16:$V3,17:$V4,18:17,19:18,20:$V5,23:$V6},o($V7,[2,3]),{1:[2,2]},o($V7,[2,4]),o($V7,[2,5]),{1:[2,6],6:$V1,12:21,13:$V2,14:14,16:$V3,17:$V4,18:17,19:18,20:$V5,23:$V6},{6:$V1,9:22,12:11,13:$V2,14:14,16:$V3,17:$V4,18:17,19:18,20:$V5,23:$V6},{6:$V8,7:$V9,10:23,11:$Va},o($Vb,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:$V5,23:$V6}),o($Vb,[2,19]),o($Vb,[2,21],{15:30,24:$Vc}),o($Vb,[2,22]),o($Vb,[2,23]),o($Vd,[2,25]),o($Vd,[2,26]),o($Vd,[2,28],{20:[1,32]}),{21:[1,33]},{6:$V8,7:$V9,10:34,11:$Va},{1:[2,7],6:$V1,12:21,13:$V2,14:14,16:$V3,17:$V4,18:17,19:18,20:$V5,23:$V6},o($Ve,[2,14],{7:$Vf,11:$Vg}),o($Vh,[2,8]),o($Vh,[2,9]),o($Vh,[2,10]),o($Vb,[2,16],{15:37,24:$Vc}),o($Vb,[2,17]),o($Vb,[2,18]),o($Vb,[2,20],{24:$Vi}),o($Vd,[2,31]),{21:[1,39]},{22:[1,40]},o($Ve,[2,13],{7:$Vf,11:$Vg}),o($Vh,[2,11]),o($Vh,[2,12]),o($Vb,[2,15],{24:$Vi}),o($Vd,[2,30]),{22:[1,41]},o($Vd,[2,27]),o($Vd,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:__name(function(str,hash){if(!hash.recoverable){var error=new Error(str);throw error.hash=hash,error}this.trace(str)},"parseError"),parse:__name(function(input){var self=this,stack=[0],tstack=[],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,args=lstack.slice.call(arguments,1),lexer2=Object.create(this.lexer),sharedState={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(sharedState.yy[k]=this.yy[k]);lexer2.setInput(input,sharedState.yy),sharedState.yy.lexer=lexer2,sharedState.yy.parser=this,void 0===lexer2.yylloc&&(lexer2.yylloc={});var yyloc=lexer2.yylloc;lstack.push(yyloc);var ranges=lexer2.options&&lexer2.options.ranges;function lex(){var token;return"number"!=typeof(token=tstack.pop()||lexer2.lex()||1)&&(token instanceof Array&&(token=(tstack=token).pop()),token=self.symbols_[token]||token),token}"function"==typeof sharedState.yy.parseError?this.parseError=sharedState.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,__name(function(n){stack.length=stack.length-2*n,vstack.length=vstack.length-n,lstack.length=lstack.length-n},"popStack"),__name(lex,"lex");for(var symbol,state,action,r,p,len,newState,expected,yyval={};;){if(state=stack[stack.length-1],this.defaultActions[state]?action=this.defaultActions[state]:(null==symbol&&(symbol=lex()),action=table[state]&&table[state][symbol]),void 0===action||!action.length||!action[0]){var errStr="";for(p in expected=[],table[state])this.terminals_[p]&&p>2&&expected.push("'"+this.terminals_[p]+"'");errStr=lexer2.showPosition?"Parse error on line "+(yylineno+1)+":\n"+lexer2.showPosition()+"\nExpecting "+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'":"Parse error on line "+(yylineno+1)+": Unexpected "+(1==symbol?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'"),this.parseError(errStr,{text:lexer2.match,token:this.terminals_[symbol]||symbol,line:lexer2.yylineno,loc:yyloc,expected:expected})}if(action[0]instanceof Array&&action.length>1)throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol);switch(action[0]){case 1:stack.push(symbol),vstack.push(lexer2.yytext),lstack.push(lexer2.yylloc),stack.push(action[1]),symbol=null,yyleng=lexer2.yyleng,yytext=lexer2.yytext,yylineno=lexer2.yylineno,yyloc=lexer2.yylloc;break;case 2:if(len=this.productions_[action[1]][1],yyval.$=vstack[vstack.length-len],yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column},ranges&&(yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]),void 0!==(r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,sharedState.yy,action[1],vstack,lstack].concat(args))))return r;len&&(stack=stack.slice(0,-1*len*2),vstack=vstack.slice(0,-1*len),lstack=lstack.slice(0,-1*len)),stack.push(this.productions_[action[1]][0]),vstack.push(yyval.$),lstack.push(yyval._$),newState=table[stack[stack.length-2]][stack[stack.length-1]],stack.push(newState);break;case 3:return!0}}return!0},"parse")},lexer=function(){return{EOF:1,parseError:__name(function(str,hash){if(!this.yy.parser)throw new Error(str);this.yy.parser.parseError(str,hash)},"parseError"),setInput:__name(function(input,yy){return this.yy=yy||this.yy||{},this._input=input,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:__name(function(){var ch=this._input[0];return this.yytext+=ch,this.yyleng++,this.offset++,this.match+=ch,this.matched+=ch,ch.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ch},"input"),unput:__name(function(ch){var len=ch.length,lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-len),this.offset-=len;var oldLines=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),lines.length-1&&(this.yylineno-=lines.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:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-len]),this.yyleng=this.yytext.length,this},"unput"),more:__name(function(){return this._more=!0,this},"more"),reject:__name(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:__name(function(n){this.unput(this.match.slice(n))},"less"),pastInput:__name(function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:__name(function(){var next=this.match;return next.length<20&&(next+=this._input.substr(0,20-next.length)),(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:__name(function(){var pre=this.pastInput(),c=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+"\n"+c+"^"},"showPosition"),test_match:__name(function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer&&(backup={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&&(backup.yylloc.range=this.yylloc.range.slice(0))),(lines=match[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=lines.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length},this.yytext+=match[0],this.match+=match[0],this.matches=match,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(match[0].length),this.matched+=match[0],token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),token)return token;if(this._backtrack){for(var k in backup)this[k]=backup[k];return!1}return!1},"test_match"),next:__name(function(){if(this.done)return this.EOF;var token,match,tempMatch,index;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var rules=this._currentRules(),i=0;i<rules.length;i++)if((tempMatch=this._input.match(this.rules[rules[i]]))&&(!match||tempMatch[0].length>match[0].length)){if(match=tempMatch,index=i,this.options.backtrack_lexer){if(!1!==(token=this.test_match(tempMatch,rules[i])))return token;if(this._backtrack){match=!1;continue}return!1}if(!this.options.flex)break}return match?!1!==(token=this.test_match(match,rules[index]))&&token:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:__name(function(){var r=this.next();return r||this.lex()},"lex"),begin:__name(function(condition){this.conditionStack.push(condition)},"begin"),popState:__name(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:__name(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:__name(function(n){return(n=this.conditionStack.length-1-Math.abs(n||0))>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:__name(function(condition){this.begin(condition)},"pushState"),stateStackSize:__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:__name(function(yy,yy_,$avoiding_name_collisions,YY_START){switch($avoiding_name_collisions){case 0:return this.pushState("shapeData"),yy_.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const re=/\n\s*/g;return yy_.yytext=yy_.yytext.replace(re,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return yy.getLogger().trace("Found comment",yy_.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:yy.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return yy.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:yy.getLogger().trace("end icon"),this.popState();break;case 16:return yy.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return yy.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return yy.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return yy.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:yy.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return yy.getLogger().trace("description:",yy_.yytext),"NODE_DESCR";case 33:return this.popState(),yy.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),yy.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),yy.getLogger().trace("node end ...",yy_.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),yy.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),yy.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return yy.getLogger().trace("Long description:",yy_.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}}();function Parser(){this.yy={}}return parser2.lexer=lexer,__name(Parser,"Parser"),Parser.prototype=parser2,parser2.Parser=Parser,new Parser}();parser.parser=parser;var kanban_default=parser,nodes=[],sections=[],cnt=0,elements={},clear=__name(()=>{nodes=[],sections=[],cnt=0,elements={}},"clear"),getSection=__name(level=>{if(0===nodes.length)return null;const sectionLevel=nodes[0].level;let lastSection=null;for(let i=nodes.length-1;i>=0;i--)if(nodes[i].level!==sectionLevel||lastSection||(lastSection=nodes[i]),nodes[i].level<sectionLevel)throw new Error('Items without section detected, found section ("'+nodes[i].label+'")');return level===(null==lastSection?void 0:lastSection.level)?null:lastSection},"getSection"),getSections=__name(function(){return sections},"getSections"),getData=__name(function(){const _nodes=[],sections2=getSections(),conf=getConfig2();for(const section of sections2){const node={id:section.id,label:sanitizeText(section.label??"",conf),labelType:"markdown",isGroup:!0,ticket:section.ticket,shape:"kanbanSection",level:section.level,look:conf.look};_nodes.push(node);const children=nodes.filter(n=>n.parentId===section.id);for(const item of children){const childNode={id:item.id,parentId:section.id,label:sanitizeText(item.label??"",conf),labelType:"markdown",isGroup:!1,ticket:null==item?void 0:item.ticket,priority:null==item?void 0:item.priority,assigned:null==item?void 0:item.assigned,icon:null==item?void 0:item.icon,shape:"kanbanItem",level:item.level,rx:5,ry:5,cssStyles:["text-align: left"]};_nodes.push(childNode)}}return{nodes:_nodes,edges:[],other:{},config:getConfig2()}},"getData"),addNode=__name((level,id,descr,type,shapeData)=>{var _a,_b;const conf=getConfig2();let padding=(null==(_a=conf.mindmap)?void 0:_a.padding)??defaultConfig_default.mindmap.padding;switch(type){case nodeType.ROUNDED_RECT:case nodeType.RECT:case nodeType.HEXAGON:padding*=2}const node={id:sanitizeText(id,conf)||"kbn"+cnt++,level:level,label:sanitizeText(descr,conf),width:(null==(_b=conf.mindmap)?void 0:_b.maxNodeWidth)??defaultConfig_default.mindmap.maxNodeWidth,padding:padding,isGroup:!1};if(void 0!==shapeData){let yamlData;yamlData=shapeData.includes("\n")?shapeData+"\n":"{\n"+shapeData+"\n}";const doc=load(yamlData,{schema:JSON_SCHEMA});if(doc.shape&&(doc.shape!==doc.shape.toLowerCase()||doc.shape.includes("_")))throw new Error(`No such shape: ${doc.shape}. Shape names should be lowercase.`);(null==doc?void 0:doc.shape)&&"kanbanItem"===doc.shape&&(node.shape=null==doc?void 0:doc.shape),(null==doc?void 0:doc.label)&&(node.label=null==doc?void 0:doc.label),(null==doc?void 0:doc.icon)&&(node.icon=null==doc?void 0:doc.icon.toString()),(null==doc?void 0:doc.assigned)&&(node.assigned=null==doc?void 0:doc.assigned.toString()),(null==doc?void 0:doc.ticket)&&(node.ticket=null==doc?void 0:doc.ticket.toString()),(null==doc?void 0:doc.priority)&&(node.priority=null==doc?void 0:doc.priority)}const section=getSection(level);section?node.parentId=section.id||"kbn"+cnt++:sections.push(node),nodes.push(node)},"addNode"),nodeType={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},kanbanDb_default={clear:clear,addNode:addNode,getSections:getSections,getData:getData,nodeType:nodeType,getType:__name((startStr,endStr)=>{switch(log.debug("In get type",startStr,endStr),startStr){case"[":return nodeType.RECT;case"(":return")"===endStr?nodeType.ROUNDED_RECT:nodeType.CLOUD;case"((":return nodeType.CIRCLE;case")":return nodeType.CLOUD;case"))":return nodeType.BANG;case"{{":return nodeType.HEXAGON;default:return nodeType.DEFAULT}},"getType"),setElementForId:__name((id,element)=>{elements[id]=element},"setElementForId"),decorateNode:__name(decoration=>{if(!decoration)return;const config=getConfig2(),node=nodes[nodes.length-1];decoration.icon&&(node.icon=sanitizeText(decoration.icon,config)),decoration.class&&(node.cssClasses=sanitizeText(decoration.class,config))},"decorateNode"),type2Str:__name(type=>{switch(type){case nodeType.DEFAULT:return"no-border";case nodeType.RECT:return"rect";case nodeType.ROUNDED_RECT:return"rounded-rect";case nodeType.CIRCLE:return"circle";case nodeType.CLOUD:return"cloud";case nodeType.BANG:return"bang";case nodeType.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:__name(()=>log,"getLogger"),getElementById:__name(id=>elements[id],"getElementById")},kanbanRenderer_default={draw:__name(async(text,id,_version,diagObj)=>{var _a,_b,_c,_d,_e;log.debug("Rendering kanban diagram\n"+text);const data4Layout=diagObj.db.getData(),conf=getConfig2();conf.htmlLabels=!1;const svg=selectSvgElement(id);for(const node of data4Layout.nodes)node.domId=`${id}-${node.id}`;const sectionsElem=svg.append("g");sectionsElem.attr("class","sections");const nodesElem=svg.append("g");nodesElem.attr("class","items");const sections2=data4Layout.nodes.filter(node=>node.isGroup);let cnt2=0;const sectionObjects=[];let maxLabelHeight=25;for(const section of sections2){const WIDTH=(null==(_a=null==conf?void 0:conf.kanban)?void 0:_a.sectionWidth)||200;cnt2+=1,section.x=WIDTH*cnt2+10*(cnt2-1)/2,section.width=WIDTH,section.y=0,section.height=3*WIDTH,section.rx=5,section.ry=5,section.cssClasses=section.cssClasses+" section-"+cnt2;const sectionObj=await insertCluster(sectionsElem,section);maxLabelHeight=Math.max(maxLabelHeight,null==(_b=null==sectionObj?void 0:sectionObj.labelBBox)?void 0:_b.height),sectionObjects.push(sectionObj)}let i=0;for(const section of sections2){const sectionObj=sectionObjects[i];i+=1;const WIDTH=(null==(_c=null==conf?void 0:conf.kanban)?void 0:_c.sectionWidth)||200,top=3*-WIDTH/2+maxLabelHeight;let y=top;const sectionItems=data4Layout.nodes.filter(node=>node.parentId===section.id);for(const item of sectionItems){if(item.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");item.x=section.x,item.width=WIDTH-15;const bbox=(await insertNode(nodesElem,item,{config:conf})).node().getBBox();item.y=y+bbox.height/2,await positionNode(item),y=item.y+bbox.height/2+5}const rect=sectionObj.cluster.select("rect"),height=Math.max(y-top+30,50)+(maxLabelHeight-25);rect.attr("height",height)}setupGraphViewbox(void 0,svg,(null==(_d=conf.mindmap)?void 0:_d.padding)??defaultConfig_default.kanban.padding,(null==(_e=conf.mindmap)?void 0:_e.useMaxWidth)??defaultConfig_default.kanban.useMaxWidth)},"draw")},genSections=__name(options=>{let sections2="";for(let i=0;i<options.THEME_COLOR_LIMIT;i++)options["lineColor"+i]=options["lineColor"+i]||options["cScaleInv"+i],isDark(options["lineColor"+i])?options["lineColor"+i]=lighten(options["lineColor"+i],20):options["lineColor"+i]=darken(options["lineColor"+i],20);const adjuster=__name((color,level)=>options.darkMode?darken(color,level):lighten(color,level),"adjuster");for(let i=0;i<options.THEME_COLOR_LIMIT;i++){const sw=""+(17-3*i);sections2+=`\n .section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} polygon, .section-${i-1} path {\n fill: ${adjuster(options["cScale"+i],10)};\n stroke: ${adjuster(options["cScale"+i],10)};\n\n }\n .section-${i-1} text {\n fill: ${options["cScaleLabel"+i]};\n }\n .node-icon-${i-1} {\n font-size: 40px;\n color: ${options["cScaleLabel"+i]};\n }\n .section-edge-${i-1}{\n stroke: ${options["cScale"+i]};\n }\n .edge-depth-${i-1}{\n stroke-width: ${sw};\n }\n .section-${i-1} line {\n stroke: ${options["cScaleInv"+i]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${options.background};\n stroke: ${options.nodeBorder};\n stroke-width: 1px;\n }\n\n .kanban-ticket-link {\n fill: ${options.background};\n stroke: ${options.nodeBorder};\n text-decoration: underline;\n }\n `}return sections2},"genSections"),diagram={db:kanbanDb_default,renderer:kanbanRenderer_default,parser:kanban_default,styles:__name(options=>`\n .edge {\n stroke-width: 3;\n }\n ${genSections(options)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${options.git0};\n }\n .section-root text {\n fill: ${options.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .cluster-label, .label {\n color: ${options.textColor};\n fill: ${options.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n ${getIconStyles()}\n`,"getStyles")};export{diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var _a;import{g as getDiagramElement}from"./chunk-55IACEB6-DTKTLKcJ.js";import{s as setupViewPortForSVG}from"./chunk-EDXVE4YY-BNqgeN9r.js";import{_ as __name,l as log,o as getRegisteredLayoutAlgorithm,r as render,C as getConfig,F as defaultConfig_default,c as getConfig2,i as sanitizeText,aE as getUserDefinedConfig,U as isDark,V as lighten,W as darken}from"./mermaid.core-DvwEdatr.js";import"./vendor-mdxeditor-Cy5Xg_90.js";import"./vendor-antd-BTBRwbax.js";import"./vendor-virtuoso-Bq6QMhgG.js";import"./vendor-codemirror-CPWlhuQ1.js";import"./vendor-markdown-DOJHsAxX.js";const byteToHex=[];for(let i=0;i<256;++i)byteToHex.push((i+256).toString(16).slice(1));let getRandomValues;const rnds8=new Uint8Array(16);const native={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function v4(options,buf,offset){var _a2;if(native.randomUUID&&!options)return native.randomUUID();const rnds=(options=options||{}).random??(null==(_a2=options.rng)?void 0:_a2.call(options))??function(){if(!getRandomValues){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");getRandomValues=crypto.getRandomValues.bind(crypto)}return getRandomValues(rnds8)}();if(rnds.length<16)throw new Error("Random bytes length must be >= 16");return rnds[6]=15&rnds[6]|64,rnds[8]=63&rnds[8]|128,function(arr,offset=0){return(byteToHex[arr[offset+0]]+byteToHex[arr[offset+1]]+byteToHex[arr[offset+2]]+byteToHex[arr[offset+3]]+"-"+byteToHex[arr[offset+4]]+byteToHex[arr[offset+5]]+"-"+byteToHex[arr[offset+6]]+byteToHex[arr[offset+7]]+"-"+byteToHex[arr[offset+8]]+byteToHex[arr[offset+9]]+"-"+byteToHex[arr[offset+10]]+byteToHex[arr[offset+11]]+byteToHex[arr[offset+12]]+byteToHex[arr[offset+13]]+byteToHex[arr[offset+14]]+byteToHex[arr[offset+15]]).toLowerCase()}(rnds)}var parser=function(){var o=__name(function(k,v,o2,l){for(o2=o2||{},l=k.length;l--;o2[k[l]]=v);return o2},"o"),$V0=[1,4],$V1=[1,13],$V2=[1,12],$V3=[1,15],$V4=[1,16],$V5=[1,20],$V6=[1,19],$V7=[6,7,8],$V8=[1,26],$V9=[1,24],$Va=[1,25],$Vb=[6,7,11],$Vc=[1,6,13,15,16,19,22],$Vd=[1,33],$Ve=[1,34],$Vf=[1,6,7,11,13,15,16,19,22],parser2={trace:__name(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:__name(function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 6:case 7:return yy;case 8:yy.getLogger().trace("Stop NL ");break;case 9:yy.getLogger().trace("Stop EOF ");break;case 11:yy.getLogger().trace("Stop NL2 ");break;case 12:yy.getLogger().trace("Stop EOF2 ");break;case 15:yy.getLogger().info("Node: ",$$[$0].id),yy.addNode($$[$0-1].length,$$[$0].id,$$[$0].descr,$$[$0].type);break;case 16:yy.getLogger().trace("Icon: ",$$[$0]),yy.decorateNode({icon:$$[$0]});break;case 17:case 21:yy.decorateNode({class:$$[$0]});break;case 18:yy.getLogger().trace("SPACELIST");break;case 19:yy.getLogger().trace("Node: ",$$[$0].id),yy.addNode(0,$$[$0].id,$$[$0].descr,$$[$0].type);break;case 20:yy.decorateNode({icon:$$[$0]});break;case 25:yy.getLogger().trace("node found ..",$$[$0-2]),this.$={id:$$[$0-1],descr:$$[$0-1],type:yy.getType($$[$0-2],$$[$0])};break;case 26:this.$={id:$$[$0],descr:$$[$0],type:yy.nodeType.DEFAULT};break;case 27:yy.getLogger().trace("node found ..",$$[$0-3]),this.$={id:$$[$0-3],descr:$$[$0-1],type:yy.getType($$[$0-2],$$[$0])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:$V0},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:$V0},{6:$V1,7:[1,10],9:9,12:11,13:$V2,14:14,15:$V3,16:$V4,17:17,18:18,19:$V5,22:$V6},o($V7,[2,3]),{1:[2,2]},o($V7,[2,4]),o($V7,[2,5]),{1:[2,6],6:$V1,12:21,13:$V2,14:14,15:$V3,16:$V4,17:17,18:18,19:$V5,22:$V6},{6:$V1,9:22,12:11,13:$V2,14:14,15:$V3,16:$V4,17:17,18:18,19:$V5,22:$V6},{6:$V8,7:$V9,10:23,11:$Va},o($Vb,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:$V5,22:$V6}),o($Vb,[2,18]),o($Vb,[2,19]),o($Vb,[2,20]),o($Vb,[2,21]),o($Vb,[2,23]),o($Vb,[2,24]),o($Vb,[2,26],{19:[1,30]}),{20:[1,31]},{6:$V8,7:$V9,10:32,11:$Va},{1:[2,7],6:$V1,12:21,13:$V2,14:14,15:$V3,16:$V4,17:17,18:18,19:$V5,22:$V6},o($Vc,[2,14],{7:$Vd,11:$Ve}),o($Vf,[2,8]),o($Vf,[2,9]),o($Vf,[2,10]),o($Vb,[2,15]),o($Vb,[2,16]),o($Vb,[2,17]),{20:[1,35]},{21:[1,36]},o($Vc,[2,13],{7:$Vd,11:$Ve}),o($Vf,[2,11]),o($Vf,[2,12]),{21:[1,37]},o($Vb,[2,25]),o($Vb,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:__name(function(str,hash){if(!hash.recoverable){var error=new Error(str);throw error.hash=hash,error}this.trace(str)},"parseError"),parse:__name(function(input){var self=this,stack=[0],tstack=[],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,args=lstack.slice.call(arguments,1),lexer2=Object.create(this.lexer),sharedState={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(sharedState.yy[k]=this.yy[k]);lexer2.setInput(input,sharedState.yy),sharedState.yy.lexer=lexer2,sharedState.yy.parser=this,void 0===lexer2.yylloc&&(lexer2.yylloc={});var yyloc=lexer2.yylloc;lstack.push(yyloc);var ranges=lexer2.options&&lexer2.options.ranges;function lex(){var token;return"number"!=typeof(token=tstack.pop()||lexer2.lex()||1)&&(token instanceof Array&&(token=(tstack=token).pop()),token=self.symbols_[token]||token),token}"function"==typeof sharedState.yy.parseError?this.parseError=sharedState.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,__name(function(n){stack.length=stack.length-2*n,vstack.length=vstack.length-n,lstack.length=lstack.length-n},"popStack"),__name(lex,"lex");for(var symbol,state,action,r,p,len,newState,expected,yyval={};;){if(state=stack[stack.length-1],this.defaultActions[state]?action=this.defaultActions[state]:(null==symbol&&(symbol=lex()),action=table[state]&&table[state][symbol]),void 0===action||!action.length||!action[0]){var errStr="";for(p in expected=[],table[state])this.terminals_[p]&&p>2&&expected.push("'"+this.terminals_[p]+"'");errStr=lexer2.showPosition?"Parse error on line "+(yylineno+1)+":\n"+lexer2.showPosition()+"\nExpecting "+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'":"Parse error on line "+(yylineno+1)+": Unexpected "+(1==symbol?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'"),this.parseError(errStr,{text:lexer2.match,token:this.terminals_[symbol]||symbol,line:lexer2.yylineno,loc:yyloc,expected:expected})}if(action[0]instanceof Array&&action.length>1)throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol);switch(action[0]){case 1:stack.push(symbol),vstack.push(lexer2.yytext),lstack.push(lexer2.yylloc),stack.push(action[1]),symbol=null,yyleng=lexer2.yyleng,yytext=lexer2.yytext,yylineno=lexer2.yylineno,yyloc=lexer2.yylloc;break;case 2:if(len=this.productions_[action[1]][1],yyval.$=vstack[vstack.length-len],yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column},ranges&&(yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]),void 0!==(r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,sharedState.yy,action[1],vstack,lstack].concat(args))))return r;len&&(stack=stack.slice(0,-1*len*2),vstack=vstack.slice(0,-1*len),lstack=lstack.slice(0,-1*len)),stack.push(this.productions_[action[1]][0]),vstack.push(yyval.$),lstack.push(yyval._$),newState=table[stack[stack.length-2]][stack[stack.length-1]],stack.push(newState);break;case 3:return!0}}return!0},"parse")},lexer=function(){return{EOF:1,parseError:__name(function(str,hash){if(!this.yy.parser)throw new Error(str);this.yy.parser.parseError(str,hash)},"parseError"),setInput:__name(function(input,yy){return this.yy=yy||this.yy||{},this._input=input,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:__name(function(){var ch=this._input[0];return this.yytext+=ch,this.yyleng++,this.offset++,this.match+=ch,this.matched+=ch,ch.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ch},"input"),unput:__name(function(ch){var len=ch.length,lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-len),this.offset-=len;var oldLines=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),lines.length-1&&(this.yylineno-=lines.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:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-len]),this.yyleng=this.yytext.length,this},"unput"),more:__name(function(){return this._more=!0,this},"more"),reject:__name(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:__name(function(n){this.unput(this.match.slice(n))},"less"),pastInput:__name(function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:__name(function(){var next=this.match;return next.length<20&&(next+=this._input.substr(0,20-next.length)),(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:__name(function(){var pre=this.pastInput(),c=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+"\n"+c+"^"},"showPosition"),test_match:__name(function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer&&(backup={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&&(backup.yylloc.range=this.yylloc.range.slice(0))),(lines=match[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=lines.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length},this.yytext+=match[0],this.match+=match[0],this.matches=match,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(match[0].length),this.matched+=match[0],token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),token)return token;if(this._backtrack){for(var k in backup)this[k]=backup[k];return!1}return!1},"test_match"),next:__name(function(){if(this.done)return this.EOF;var token,match,tempMatch,index;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var rules=this._currentRules(),i=0;i<rules.length;i++)if((tempMatch=this._input.match(this.rules[rules[i]]))&&(!match||tempMatch[0].length>match[0].length)){if(match=tempMatch,index=i,this.options.backtrack_lexer){if(!1!==(token=this.test_match(tempMatch,rules[i])))return token;if(this._backtrack){match=!1;continue}return!1}if(!this.options.flex)break}return match?!1!==(token=this.test_match(match,rules[index]))&&token:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:__name(function(){var r=this.next();return r||this.lex()},"lex"),begin:__name(function(condition){this.conditionStack.push(condition)},"begin"),popState:__name(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:__name(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:__name(function(n){return(n=this.conditionStack.length-1-Math.abs(n||0))>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:__name(function(condition){this.begin(condition)},"pushState"),stateStackSize:__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:__name(function(yy,yy_,$avoiding_name_collisions,YY_START){switch($avoiding_name_collisions){case 0:return yy.getLogger().trace("Found comment",yy_.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:yy.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return yy.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:yy.getLogger().trace("end icon"),this.popState();break;case 10:return yy.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return yy.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return yy.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return yy.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16: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 24:yy.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return yy.getLogger().trace("description:",yy_.yytext),"NODE_DESCR";case 27:return this.popState(),yy.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),yy.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),yy.getLogger().trace("node end ...",yy_.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),yy.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),yy.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return yy.getLogger().trace("Long description:",yy_.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}}}}();function Parser(){this.yy={}}return parser2.lexer=lexer,__name(Parser,"Parser"),Parser.prototype=parser2,parser2.Parser=Parser,new Parser}();parser.parser=parser;var mindmap_default=parser,nodeType={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},MindmapDB=(__name(_a=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=nodeType,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(level){for(let i=this.nodes.length-1;i>=0;i--)if(this.nodes[i].level<level)return this.nodes[i];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(level,id,descr,type){var _a2,_b;log.info("addNode",level,id,descr,type);let isRoot=!1;0===this.nodes.length?(this.baseLevel=level,level=0,isRoot=!0):void 0!==this.baseLevel&&(level-=this.baseLevel,isRoot=!1);const conf=getConfig2();let padding=(null==(_a2=conf.mindmap)?void 0:_a2.padding)??defaultConfig_default.mindmap.padding;switch(type){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:padding*=2}const node={id:this.count++,nodeId:sanitizeText(id,conf),level:level,descr:sanitizeText(descr,conf),type:type,children:[],width:(null==(_b=conf.mindmap)?void 0:_b.maxNodeWidth)??defaultConfig_default.mindmap.maxNodeWidth,padding:padding,isRoot:isRoot},parent=this.getParent(level);if(parent)parent.children.push(node),this.nodes.push(node);else{if(!isRoot)throw new Error(`There can be only one root. No parent could be found for ("${node.descr}")`);this.nodes.push(node)}}getType(startStr,endStr){switch(log.debug("In get type",startStr,endStr),startStr){case"[":return this.nodeType.RECT;case"(":return")"===endStr?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(id,element){this.elements[id]=element}getElementById(id){return this.elements[id]}decorateNode(decoration){if(!decoration)return;const config=getConfig2(),node=this.nodes[this.nodes.length-1];decoration.icon&&(node.icon=sanitizeText(decoration.icon,config)),decoration.class&&(node.class=sanitizeText(decoration.class,config))}type2Str(type){switch(type){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(node,sectionNumber){if(0===node.level?node.section=void 0:node.section=sectionNumber,node.children)for(const[index,child]of node.children.entries()){const childSectionNumber=0===node.level?index%11:sectionNumber;this.assignSections(child,childSectionNumber)}}flattenNodes(node,processedNodes){const conf=getConfig2(),cssClasses=["mindmap-node"];!0===node.isRoot?cssClasses.push("section-root","section--1"):void 0!==node.section&&cssClasses.push(`section-${node.section}`),node.class&&cssClasses.push(node.class);const classes=cssClasses.join(" "),getShapeFromType=__name(type=>{var _a2;const isReduxTheme=((null==(_a2=conf.theme)?void 0:_a2.toLowerCase())??"").includes("redux");switch(type){case nodeType.CIRCLE:return"mindmapCircle";case nodeType.RECT:return"rect";case nodeType.ROUNDED_RECT:return"rounded";case nodeType.CLOUD:return"cloud";case nodeType.BANG:return"bang";case nodeType.HEXAGON:return"hexagon";case nodeType.DEFAULT:return isReduxTheme?"rounded":"defaultMindmapNode";default:return"rect"}},"getShapeFromType"),processedNode={id:node.id.toString(),domId:"node_"+node.id.toString(),label:node.descr,labelType:"markdown",isGroup:!1,shape:getShapeFromType(node.type),width:node.width,height:node.height??0,padding:node.padding,cssClasses:classes,cssStyles:[],look:conf.look,icon:node.icon,x:node.x,y:node.y,level:node.level,nodeId:node.nodeId,type:node.type,section:node.section};if(processedNodes.push(processedNode),node.children)for(const child of node.children)this.flattenNodes(child,processedNodes)}generateEdges(node,edges){if(!node.children)return;const conf=getConfig2();for(const child of node.children){let edgeClasses="edge";void 0!==child.section&&(edgeClasses+=` section-edge-${child.section}`);edgeClasses+=` edge-depth-${node.level+1}`;const edge={id:`edge_${node.id}_${child.id}`,start:node.id.toString(),end:child.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:conf.look,classes:edgeClasses,depth:node.level,section:child.section};edges.push(edge),this.generateEdges(child,edges)}}getData(){const mindmapRoot=this.getMindmap(),config=getConfig2(),finalConfig=config;if(void 0!==getUserDefinedConfig().layout||(finalConfig.layout="cose-bilkent"),!mindmapRoot)return{nodes:[],edges:[],config:finalConfig};log.debug("getData: mindmapRoot",mindmapRoot,config),this.assignSections(mindmapRoot);const processedNodes=[],processedEdges=[];this.flattenNodes(mindmapRoot,processedNodes),this.generateEdges(mindmapRoot,processedEdges),log.debug(`getData: processed ${processedNodes.length} nodes and ${processedEdges.length} edges`);const shapes=new Map;for(const node of processedNodes)shapes.set(node.id,{shape:node.shape,width:node.width,height:node.height,padding:node.padding});return{nodes:processedNodes,edges:processedEdges,config:finalConfig,rootNode:mindmapRoot,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(shapes),type:"mindmap",diagramId:"mindmap-"+v4()}}getLogger(){return log}},"MindmapDB"),_a),mindmapRenderer_default={draw:__name(async(text,id,_version,diagObj)=>{var _a2,_b;log.debug("Rendering mindmap diagram\n"+text);const db=diagObj.db,data4Layout=db.getData(),svg=getDiagramElement(id,data4Layout.config.securityLevel);data4Layout.type=diagObj.type,data4Layout.layoutAlgorithm=getRegisteredLayoutAlgorithm(data4Layout.config.layout,{fallback:"cose-bilkent"}),data4Layout.diagramId=id;if(!db.getMindmap())return;data4Layout.nodes.forEach(node=>{"rounded"===node.shape?(node.radius=15,node.taper=15,node.stroke="none",node.width=0,node.padding=15):"circle"===node.shape?node.padding=10:"rect"===node.shape?(node.width=0,node.padding=10):"hexagon"===node.shape&&(node.width=0,node.height=0)}),await render(data4Layout,svg);const{themeVariables:themeVariables}=getConfig(),{useGradient:useGradient,gradientStart:gradientStart,gradientStop:gradientStop}=themeVariables;if(useGradient&&gradientStart&&gradientStop){const svgId=svg.attr("id"),gradient=svg.append("defs").append("linearGradient").attr("id",`${svgId}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");gradient.append("stop").attr("offset","0%").attr("stop-color",gradientStart).attr("stop-opacity",1),gradient.append("stop").attr("offset","100%").attr("stop-color",gradientStop).attr("stop-opacity",1)}setupViewPortForSVG(svg,(null==(_a2=data4Layout.config.mindmap)?void 0:_a2.padding)??defaultConfig_default.mindmap.padding,"mindmapDiagram",(null==(_b=data4Layout.config.mindmap)?void 0:_b.useMaxWidth)??defaultConfig_default.mindmap.useMaxWidth)},"draw")},genSections=__name(options=>{const{theme:theme,look:look}=options;let sections="";for(let i=0;i<options.THEME_COLOR_LIMIT;i++)options["lineColor"+i]=options["lineColor"+i]||options["cScaleInv"+i],isDark(options["lineColor"+i])?options["lineColor"+i]=lighten(options["lineColor"+i],20):options["lineColor"+i]=darken(options["lineColor"+i],20);for(let i=0;i<options.THEME_COLOR_LIMIT;i++){const sw=""+("neo"===look?Math.max(10-2*(i-1),2):17-3*i);sections+=`\n .section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} polygon, .section-${i-1} path {\n fill: ${options["cScale"+i]};\n }\n .section-${i-1} text {\n fill: ${options["cScaleLabel"+i]};\n }\n .section-${i-1} span {\n color: ${options["cScaleLabel"+i]};\n }\n .node-icon-${i-1} {\n font-size: 40px;\n color: ${options["cScaleLabel"+i]};\n }\n .section-edge-${i-1}{\n stroke: ${options["cScale"+i]};\n }\n .edge-depth-${i-1}{\n stroke-width: ${sw};\n }\n .section-${i-1} line {\n stroke: ${options["cScaleInv"+i]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n [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 {\n fill: ${"redux"===theme||"redux-dark"===theme||"neutral"===theme?options.mainBkg:options["cScale"+i]};\n stroke: ${"redux"===theme||"redux-dark"===theme?options.nodeBorder:options["cScale"+i]};\n stroke-width: ${options.strokeWidth??2}px;\n }\n [data-look="neo"].section-edge-${i-1}{\n stroke: ${(null==theme?void 0:theme.includes("redux"))||"neo-dark"===theme?options.nodeBorder:options["cScale"+i]};\n }\n [data-look="neo"].mindmap-node.section-${i-1} text {\n fill: ${"redux"===theme||"redux-dark"===theme?options.nodeBorder:options["cScaleLabel"+("neutral"===theme?1:i)]};\n }\n `}return sections},"genSections"),genGradient=__name((THEME_COLOR_LIMIT,svgId,mainBkg)=>{let sections="";for(let i=0;i<THEME_COLOR_LIMIT;i++)sections+=`\n [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 {\n stroke: url(${svgId}-gradient);\n fill: ${mainBkg};\n }\n .section-${i-1} line {\n stroke-width: 0;\n }`;return sections},"genGradient"),styles_default=__name(options=>{const{theme:theme}=options,svgId=options.svgId,scopedDropShadow=options.dropShadow?options.dropShadow.replace("url(#drop-shadow)",`url(${svgId}-drop-shadow)`):"none";return`\n .edge {\n stroke-width: 3;\n }\n ${genSections(options)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${options.git0};\n }\n .section-root text {\n fill: ${options.gitBranchLabel0};\n }\n .section-root span {\n color: ${(null==theme?void 0:theme.includes("redux"))?options.nodeBorder:options.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n [data-look="neo"].mindmap-node {\n filter: ${scopedDropShadow};\n }\n [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 {\n fill: ${(null==theme?void 0:theme.includes("redux"))?options.mainBkg:options.git0};\n }\n [data-look="neo"].mindmap-node.section-root .text-inner-tspan {\n fill: ${(null==theme?void 0:theme.includes("redux"))?options.nodeBorder:options["cScaleLabel"+("neutral"===theme?1:0)]};\n }\n ${options.useGradient&&svgId&&options.mainBkg?genGradient(options.THEME_COLOR_LIMIT,svgId,options.mainBkg):""}\n`},"getStyles"),diagram={get db(){return new MindmapDB},renderer:mindmapRenderer_default,parser:mindmap_default,styles:styles_default};export{diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a3 as constant,a6 as tau,aD as array,g as getAccDescription,s as setAccDescription,a as getAccTitle,b as setAccTitle,q as getDiagramTitle,p as setDiagramTitle,_ as __name,l as log,c as getConfig2$1,E as cleanAndMerge,H as selectSvgElement,M as parseFontSize,e as configureSvgSize,y as clear,F as defaultConfig_default}from"./mermaid.core-DvwEdatr.js";import{p as populateCommonDb}from"./chunk-4BX2VUAB-DnFoMzQG.js";import{p as parse}from"./wardley-RL74JXVD-BFcIn2-Q.js";import{d as d3arc}from"./arc-CSzd_bdT.js";import{o as ordinal}from"./ordinal-DA-_8pMy.js";import"./vendor-mdxeditor-Cy5Xg_90.js";import"./vendor-antd-BTBRwbax.js";import"./vendor-virtuoso-Bq6QMhgG.js";import"./vendor-codemirror-CPWlhuQ1.js";import"./vendor-markdown-DOJHsAxX.js";import"./min-DFik8k4L.js";import"./_baseUniq-C2FCldN4.js";import"./init-DMZMl1PR.js";function descending(a,b){return b<a?-1:b>a?1:b>=a?0:NaN}function identity(d){return d}var DEFAULT_PIE_CONFIG=defaultConfig_default.pie,DEFAULT_PIE_DB={sections:new Map,showData:!1},sections=DEFAULT_PIE_DB.sections,showData=DEFAULT_PIE_DB.showData,config=structuredClone(DEFAULT_PIE_CONFIG),db={getConfig:__name(()=>structuredClone(config),"getConfig"),clear:__name(()=>{sections=new Map,showData=DEFAULT_PIE_DB.showData,clear()},"clear"),setDiagramTitle:setDiagramTitle,getDiagramTitle:getDiagramTitle,setAccTitle:setAccTitle,getAccTitle:getAccTitle,setAccDescription:setAccDescription,getAccDescription:getAccDescription,addSection:__name(({label:label,value:value})=>{if(value<0)throw new Error(`"${label}" has invalid value: ${value}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);sections.has(label)||(sections.set(label,value),log.debug(`added new section: ${label}, with value: ${value}`))},"addSection"),getSections:__name(()=>sections,"getSections"),setShowData:__name(toggle=>{showData=toggle},"setShowData"),getShowData:__name(()=>showData,"getShowData")},populateDb=__name((ast,db2)=>{populateCommonDb(ast,db2),db2.setShowData(ast.showData),ast.sections.map(db2.addSection)},"populateDb"),parser={parse:__name(async input=>{const ast=await parse("pie",input);log.debug(ast),populateDb(ast,db)},"parse")},pieStyles_default=__name(options=>`\n .pieCircle{\n stroke: ${options.pieStrokeColor};\n stroke-width : ${options.pieStrokeWidth};\n opacity : ${options.pieOpacity};\n }\n .pieOuterCircle{\n stroke: ${options.pieOuterStrokeColor};\n stroke-width: ${options.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${options.pieTitleTextSize};\n fill: ${options.pieTitleTextColor};\n font-family: ${options.fontFamily};\n }\n .slice {\n font-family: ${options.fontFamily};\n fill: ${options.pieSectionTextColor};\n font-size:${options.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${options.pieLegendTextColor};\n font-family: ${options.fontFamily};\n font-size: ${options.pieLegendTextSize};\n }\n`,"getStyles"),createPieArcs=__name(sections2=>{const sum=[...sections2.values()].reduce((acc,val)=>acc+val,0),pieData=[...sections2.entries()].map(([label,value])=>({label:label,value:value})).filter(d=>d.value/sum*100>=1),pie=function(){var value=identity,sortValues=descending,sort=null,startAngle=constant(0),endAngle=constant(tau),padAngle=constant(0);function pie(data){var i,j,k,a1,v,n=(data=array(data)).length,sum=0,index=new Array(n),arcs=new Array(n),a0=+startAngle.apply(this,arguments),da=Math.min(tau,Math.max(-tau,endAngle.apply(this,arguments)-a0)),p=Math.min(Math.abs(da)/n,padAngle.apply(this,arguments)),pa=p*(da<0?-1:1);for(i=0;i<n;++i)(v=arcs[index[i]=i]=+value(data[i],i,data))>0&&(sum+=v);for(null!=sortValues?index.sort(function(i2,j2){return sortValues(arcs[i2],arcs[j2])}):null!=sort&&index.sort(function(i2,j2){return sort(data[i2],data[j2])}),i=0,k=sum?(da-n*pa)/sum:0;i<n;++i,a0=a1)j=index[i],a1=a0+((v=arcs[j])>0?v*k:0)+pa,arcs[j]={data:data[j],index:i,value:v,startAngle:a0,endAngle:a1,padAngle:p};return arcs}return pie.value=function(_){return arguments.length?(value="function"==typeof _?_:constant(+_),pie):value},pie.sortValues=function(_){return arguments.length?(sortValues=_,sort=null,pie):sortValues},pie.sort=function(_){return arguments.length?(sort=_,sortValues=null,pie):sort},pie.startAngle=function(_){return arguments.length?(startAngle="function"==typeof _?_:constant(+_),pie):startAngle},pie.endAngle=function(_){return arguments.length?(endAngle="function"==typeof _?_:constant(+_),pie):endAngle},pie.padAngle=function(_){return arguments.length?(padAngle="function"==typeof _?_:constant(+_),pie):padAngle},pie}().value(d=>d.value).sort(null);return pie(pieData)},"createPieArcs"),diagram={parser:parser,db:db,renderer:{draw:__name((text,id,_version,diagObj)=>{var _a;log.debug("rendering pie chart\n"+text);const db2=diagObj.db,globalConfig=getConfig2$1(),pieConfig=cleanAndMerge(db2.getConfig(),globalConfig.pie),svg=selectSvgElement(id),group=svg.append("g");group.attr("transform","translate(225,225)");const{themeVariables:themeVariables}=globalConfig;let[outerStrokeWidth]=parseFontSize(themeVariables.pieOuterStrokeWidth);outerStrokeWidth??(outerStrokeWidth=2);const textPosition=pieConfig.textPosition,radius=Math.min(450,450)/2-40,arcGenerator=d3arc().innerRadius(0).outerRadius(radius),labelArcGenerator=d3arc().innerRadius(radius*textPosition).outerRadius(radius*textPosition);group.append("circle").attr("cx",0).attr("cy",0).attr("r",radius+outerStrokeWidth/2).attr("class","pieOuterCircle");const sections2=db2.getSections(),arcs=createPieArcs(sections2),myGeneratedColors=[themeVariables.pie1,themeVariables.pie2,themeVariables.pie3,themeVariables.pie4,themeVariables.pie5,themeVariables.pie6,themeVariables.pie7,themeVariables.pie8,themeVariables.pie9,themeVariables.pie10,themeVariables.pie11,themeVariables.pie12];let sum=0;sections2.forEach(section=>{sum+=section});const filteredArcs=arcs.filter(datum=>"0"!==(datum.data.value/sum*100).toFixed(0)),color=ordinal(myGeneratedColors).domain([...sections2.keys()]);group.selectAll("mySlices").data(filteredArcs).enter().append("path").attr("d",arcGenerator).attr("fill",datum=>color(datum.data.label)).attr("class","pieCircle"),group.selectAll("mySlices").data(filteredArcs).enter().append("text").text(datum=>(datum.data.value/sum*100).toFixed(0)+"%").attr("transform",datum=>"translate("+labelArcGenerator.centroid(datum)+")").style("text-anchor","middle").attr("class","slice");const titleText=group.append("text").text(db2.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText"),allSectionData=[...sections2.entries()].map(([label,value])=>({label:label,value:value})),legend=group.selectAll(".legend").data(allSectionData).enter().append("g").attr("class","legend").attr("transform",(_datum,index)=>"translate(216,"+(22*index-22*allSectionData.length/2)+")");legend.append("rect").attr("width",18).attr("height",18).style("fill",d=>color(d.label)).style("stroke",d=>color(d.label)),legend.append("text").attr("x",22).attr("y",14).text(d=>db2.getShowData()?`${d.label} [${d.value}]`:d.label);const chartAndLegendWidth=512+Math.max(...legend.selectAll("text").nodes().map(node=>(null==node?void 0:node.getBoundingClientRect().width)??0)),titleWidth=(null==(_a=titleText.node())?void 0:_a.getBoundingClientRect().width)??0,titleLeft=225-titleWidth/2,titleRight=225+titleWidth/2,viewBoxX=Math.min(0,titleLeft),totalWidth=Math.max(chartAndLegendWidth,titleRight)-viewBoxX;svg.attr("viewBox",`${viewBoxX} 0 ${totalWidth} 450`),configureSvgSize(svg,450,totalWidth,pieConfig.useMaxWidth)},"draw")},styles:pieStyles_default};export{diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var _a,_b;import{s as setAccDescription,g as getAccDescription,q as getDiagramTitle,p as setDiagramTitle,a as getAccTitle,b as setAccTitle,_ as __name,c as getConfig2,l as log,d as select,e as configureSvgSize,y as clear,F as defaultConfig_default,i as sanitizeText,I as getThemeVariables3}from"./mermaid.core-DvwEdatr.js";import{l as linear}from"./linear-BNV4po81.js";import"./vendor-mdxeditor-Cy5Xg_90.js";import"./vendor-antd-BTBRwbax.js";import"./vendor-virtuoso-Bq6QMhgG.js";import"./vendor-codemirror-CPWlhuQ1.js";import"./vendor-markdown-DOJHsAxX.js";import"./init-DMZMl1PR.js";import"./defaultLocale-DZ7E7S9R.js";var parser=function(){var o=__name(function(k,v,o2,l){for(o2=o2||{},l=k.length;l--;o2[k[l]]=v);return o2},"o"),$V0=[1,3],$V1=[1,4],$V2=[1,5],$V3=[1,6],$V4=[1,7],$V5=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],$V6=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],$V7=[55,56,57],$V8=[2,36],$V9=[1,37],$Va=[1,36],$Vb=[1,38],$Vc=[1,35],$Vd=[1,43],$Ve=[1,41],$Vf=[1,14],$Vg=[1,23],$Vh=[1,18],$Vi=[1,19],$Vj=[1,20],$Vk=[1,21],$Vl=[1,22],$Vm=[1,24],$Vn=[1,25],$Vo=[1,26],$Vp=[1,27],$Vq=[1,28],$Vr=[1,29],$Vs=[1,32],$Vt=[1,33],$Vu=[1,34],$Vv=[1,39],$Vw=[1,40],$Vx=[1,42],$Vy=[1,44],$Vz=[1,62],$VA=[1,61],$VB=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],$VC=[1,65],$VD=[1,66],$VE=[1,67],$VF=[1,68],$VG=[1,69],$VH=[1,70],$VI=[1,71],$VJ=[1,72],$VK=[1,73],$VL=[1,74],$VM=[1,75],$VN=[1,76],$VO=[4,5,6,7,8,9,10,11,12,13,14,15,18],$VP=[1,90],$VQ=[1,91],$VR=[1,92],$VS=[1,99],$VT=[1,93],$VU=[1,96],$VV=[1,94],$VW=[1,95],$VX=[1,97],$VY=[1,98],$VZ=[1,102],$V_=[10,55,56,57],$V$=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],parser2={trace:__name(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],[59,1],[59,1],[59,1]],performAction:__name(function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 23:case 68:this.$=$$[$0];break;case 24:case 69:this.$=$$[$0-1]+""+$$[$0];break;case 26:this.$=$$[$0-1]+$$[$0];break;case 27:this.$=[$$[$0].trim()];break;case 28:$$[$0-2].push($$[$0].trim()),this.$=$$[$0-2];break;case 29:this.$=$$[$0-4],yy.addClass($$[$0-2],$$[$0]);break;case 37:this.$=[];break;case 42:this.$=$$[$0].trim(),yy.setDiagramTitle(this.$);break;case 43:this.$=$$[$0].trim(),yy.setAccTitle(this.$);break;case 44:case 45:this.$=$$[$0].trim(),yy.setAccDescription(this.$);break;case 46:yy.addSection($$[$0].substr(8)),this.$=$$[$0].substr(8);break;case 47:yy.addPoint($$[$0-3],"",$$[$0-1],$$[$0],[]);break;case 48:yy.addPoint($$[$0-4],$$[$0-3],$$[$0-1],$$[$0],[]);break;case 49:yy.addPoint($$[$0-4],"",$$[$0-2],$$[$0-1],$$[$0]);break;case 50:yy.addPoint($$[$0-5],$$[$0-4],$$[$0-2],$$[$0-1],$$[$0]);break;case 51:yy.setXAxisLeftText($$[$0-2]),yy.setXAxisRightText($$[$0]);break;case 52:$$[$0-1].text+=" ⟶ ",yy.setXAxisLeftText($$[$0-1]);break;case 53:yy.setXAxisLeftText($$[$0]);break;case 54:yy.setYAxisBottomText($$[$0-2]),yy.setYAxisTopText($$[$0]);break;case 55:$$[$0-1].text+=" ⟶ ",yy.setYAxisBottomText($$[$0-1]);break;case 56:yy.setYAxisBottomText($$[$0]);break;case 57:yy.setQuadrant1Text($$[$0]);break;case 58:yy.setQuadrant2Text($$[$0]);break;case 59:yy.setQuadrant3Text($$[$0]);break;case 60:yy.setQuadrant4Text($$[$0]);break;case 64:case 66:this.$={text:$$[$0],type:"text"};break;case 65:this.$={text:$$[$0-1].text+""+$$[$0],type:$$[$0-1].type};break;case 67:this.$={text:$$[$0],type:"markdown"}}},"anonymous"),table:[{18:$V0,26:1,27:2,28:$V1,55:$V2,56:$V3,57:$V4},{1:[3]},{18:$V0,26:8,27:2,28:$V1,55:$V2,56:$V3,57:$V4},{18:$V0,26:9,27:2,28:$V1,55:$V2,56:$V3,57:$V4},o($V5,[2,33],{29:10}),o($V6,[2,61]),o($V6,[2,62]),o($V6,[2,63]),{1:[2,30]},{1:[2,31]},o($V7,$V8,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$Vf,25:$Vg,35:$Vh,37:$Vi,39:$Vj,41:$Vk,42:$Vl,48:$Vm,50:$Vn,51:$Vo,52:$Vp,53:$Vq,54:$Vr,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V5,[2,34]),{27:45,55:$V2,56:$V3,57:$V4},o($V7,[2,37]),o($V7,$V8,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$Vf,25:$Vg,35:$Vh,37:$Vi,39:$Vj,41:$Vk,42:$Vl,48:$Vm,50:$Vn,51:$Vo,52:$Vp,53:$Vq,54:$Vr,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,39]),o($V7,[2,40]),o($V7,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},o($V7,[2,45]),o($V7,[2,46]),{18:[1,50]},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:51,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:52,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:53,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:54,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:55,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:56,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,44:[1,57],47:[1,58],58:60,59:59,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},o($VB,[2,64]),o($VB,[2,66]),o($VB,[2,67]),o($VB,[2,70]),o($VB,[2,71]),o($VB,[2,72]),o($VB,[2,73]),o($VB,[2,74]),o($VB,[2,75]),o($VB,[2,76]),o($VB,[2,77]),o($VB,[2,78]),o($VB,[2,79]),o($VB,[2,80]),o($V5,[2,35]),o($V7,[2,38]),o($V7,[2,42]),o($V7,[2,43]),o($V7,[2,44]),{3:64,4:$VC,5:$VD,6:$VE,7:$VF,8:$VG,9:$VH,10:$VI,11:$VJ,12:$VK,13:$VL,14:$VM,15:$VN,21:63},o($V7,[2,53],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,49:[1,77],63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,56],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,49:[1,78],63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,57],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,58],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,59],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,60],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),{45:[1,79]},{44:[1,80]},o($VB,[2,65]),o($VB,[2,81]),o($VB,[2,82]),o($VB,[2,83]),{3:82,4:$VC,5:$VD,6:$VE,7:$VF,8:$VG,9:$VH,10:$VI,11:$VJ,12:$VK,13:$VL,14:$VM,15:$VN,18:[1,81]},o($VO,[2,23]),o($VO,[2,1]),o($VO,[2,2]),o($VO,[2,3]),o($VO,[2,4]),o($VO,[2,5]),o($VO,[2,6]),o($VO,[2,7]),o($VO,[2,8]),o($VO,[2,9]),o($VO,[2,10]),o($VO,[2,11]),o($VO,[2,12]),o($V7,[2,52],{58:31,43:83,4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,55],{58:31,43:84,4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),{46:[1,85]},{45:[1,86]},{4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,16:89,17:$VV,18:$VW,19:$VX,20:$VY,22:88,23:87},o($VO,[2,24]),o($V7,[2,51],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,54],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,47],{22:88,16:89,23:100,4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,17:$VV,18:$VW,19:$VX,20:$VY}),{46:[1,101]},o($V7,[2,29],{10:$VZ}),o($V_,[2,27],{16:103,4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,17:$VV,18:$VW,19:$VX,20:$VY}),o($V$,[2,25]),o($V$,[2,13]),o($V$,[2,14]),o($V$,[2,15]),o($V$,[2,16]),o($V$,[2,17]),o($V$,[2,18]),o($V$,[2,19]),o($V$,[2,20]),o($V$,[2,21]),o($V$,[2,22]),o($V7,[2,49],{10:$VZ}),o($V7,[2,48],{22:88,16:89,23:104,4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,17:$VV,18:$VW,19:$VX,20:$VY}),{4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,16:89,17:$VV,18:$VW,19:$VX,20:$VY,22:105},o($V$,[2,26]),o($V7,[2,50],{10:$VZ}),o($V_,[2,28],{16:103,4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,17:$VV,18:$VW,19:$VX,20:$VY})],defaultActions:{8:[2,30],9:[2,31]},parseError:__name(function(str,hash){if(!hash.recoverable){var error=new Error(str);throw error.hash=hash,error}this.trace(str)},"parseError"),parse:__name(function(input){var self=this,stack=[0],tstack=[],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,args=lstack.slice.call(arguments,1),lexer2=Object.create(this.lexer),sharedState={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(sharedState.yy[k]=this.yy[k]);lexer2.setInput(input,sharedState.yy),sharedState.yy.lexer=lexer2,sharedState.yy.parser=this,void 0===lexer2.yylloc&&(lexer2.yylloc={});var yyloc=lexer2.yylloc;lstack.push(yyloc);var ranges=lexer2.options&&lexer2.options.ranges;function lex(){var token;return"number"!=typeof(token=tstack.pop()||lexer2.lex()||1)&&(token instanceof Array&&(token=(tstack=token).pop()),token=self.symbols_[token]||token),token}"function"==typeof sharedState.yy.parseError?this.parseError=sharedState.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,__name(function(n){stack.length=stack.length-2*n,vstack.length=vstack.length-n,lstack.length=lstack.length-n},"popStack"),__name(lex,"lex");for(var symbol,state,action,r,p,len,newState,expected,yyval={};;){if(state=stack[stack.length-1],this.defaultActions[state]?action=this.defaultActions[state]:(null==symbol&&(symbol=lex()),action=table[state]&&table[state][symbol]),void 0===action||!action.length||!action[0]){var errStr="";for(p in expected=[],table[state])this.terminals_[p]&&p>2&&expected.push("'"+this.terminals_[p]+"'");errStr=lexer2.showPosition?"Parse error on line "+(yylineno+1)+":\n"+lexer2.showPosition()+"\nExpecting "+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'":"Parse error on line "+(yylineno+1)+": Unexpected "+(1==symbol?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'"),this.parseError(errStr,{text:lexer2.match,token:this.terminals_[symbol]||symbol,line:lexer2.yylineno,loc:yyloc,expected:expected})}if(action[0]instanceof Array&&action.length>1)throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol);switch(action[0]){case 1:stack.push(symbol),vstack.push(lexer2.yytext),lstack.push(lexer2.yylloc),stack.push(action[1]),symbol=null,yyleng=lexer2.yyleng,yytext=lexer2.yytext,yylineno=lexer2.yylineno,yyloc=lexer2.yylloc;break;case 2:if(len=this.productions_[action[1]][1],yyval.$=vstack[vstack.length-len],yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column},ranges&&(yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]),void 0!==(r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,sharedState.yy,action[1],vstack,lstack].concat(args))))return r;len&&(stack=stack.slice(0,-1*len*2),vstack=vstack.slice(0,-1*len),lstack=lstack.slice(0,-1*len)),stack.push(this.productions_[action[1]][0]),vstack.push(yyval.$),lstack.push(yyval._$),newState=table[stack[stack.length-2]][stack[stack.length-1]],stack.push(newState);break;case 3:return!0}}return!0},"parse")},lexer=function(){return{EOF:1,parseError:__name(function(str,hash){if(!this.yy.parser)throw new Error(str);this.yy.parser.parseError(str,hash)},"parseError"),setInput:__name(function(input,yy){return this.yy=yy||this.yy||{},this._input=input,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:__name(function(){var ch=this._input[0];return this.yytext+=ch,this.yyleng++,this.offset++,this.match+=ch,this.matched+=ch,ch.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ch},"input"),unput:__name(function(ch){var len=ch.length,lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-len),this.offset-=len;var oldLines=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),lines.length-1&&(this.yylineno-=lines.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:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-len]),this.yyleng=this.yytext.length,this},"unput"),more:__name(function(){return this._more=!0,this},"more"),reject:__name(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:__name(function(n){this.unput(this.match.slice(n))},"less"),pastInput:__name(function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:__name(function(){var next=this.match;return next.length<20&&(next+=this._input.substr(0,20-next.length)),(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:__name(function(){var pre=this.pastInput(),c=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+"\n"+c+"^"},"showPosition"),test_match:__name(function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer&&(backup={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&&(backup.yylloc.range=this.yylloc.range.slice(0))),(lines=match[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=lines.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length},this.yytext+=match[0],this.match+=match[0],this.matches=match,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(match[0].length),this.matched+=match[0],token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),token)return token;if(this._backtrack){for(var k in backup)this[k]=backup[k];return!1}return!1},"test_match"),next:__name(function(){if(this.done)return this.EOF;var token,match,tempMatch,index;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var rules=this._currentRules(),i=0;i<rules.length;i++)if((tempMatch=this._input.match(this.rules[rules[i]]))&&(!match||tempMatch[0].length>match[0].length)){if(match=tempMatch,index=i,this.options.backtrack_lexer){if(!1!==(token=this.test_match(tempMatch,rules[i])))return token;if(this._backtrack){match=!1;continue}return!1}if(!this.options.flex)break}return match?!1!==(token=this.test_match(match,rules[index]))&&token:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:__name(function(){var r=this.next();return r||this.lex()},"lex"),begin:__name(function(condition){this.conditionStack.push(condition)},"begin"),popState:__name(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:__name(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:__name(function(n){return(n=this.conditionStack.length-1-Math.abs(n||0))>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:__name(function(condition){this.begin(condition)},"pushState"),stateStackSize:__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:__name(function(yy,yy_,$avoiding_name_collisions,YY_START){switch($avoiding_name_collisions){case 0:case 1:case 3:break;case 2:return 55;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:case 23:case 25:case 31: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 24:this.begin("string");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 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 11;case 37:return 64;case 38:return 10;case 39:case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51: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,/^(?::)/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],inclusive:!0}}}}();function Parser(){this.yy={}}return parser2.lexer=lexer,__name(Parser,"Parser"),Parser.prototype=parser2,parser2.Parser=Parser,new Parser}();parser.parser=parser;var quadrant_default=parser,defaultThemeVariables=getThemeVariables3(),QuadrantBuilder=(__name(_a=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 _a2,_b2,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p,_q,_r;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:(null==(_a2=defaultConfig_default.quadrantChart)?void 0:_a2.chartWidth)||500,chartWidth:(null==(_b2=defaultConfig_default.quadrantChart)?void 0:_b2.chartHeight)||500,titlePadding:(null==(_c=defaultConfig_default.quadrantChart)?void 0:_c.titlePadding)||10,titleFontSize:(null==(_d=defaultConfig_default.quadrantChart)?void 0:_d.titleFontSize)||20,quadrantPadding:(null==(_e=defaultConfig_default.quadrantChart)?void 0:_e.quadrantPadding)||5,xAxisLabelPadding:(null==(_f=defaultConfig_default.quadrantChart)?void 0:_f.xAxisLabelPadding)||5,yAxisLabelPadding:(null==(_g=defaultConfig_default.quadrantChart)?void 0:_g.yAxisLabelPadding)||5,xAxisLabelFontSize:(null==(_h=defaultConfig_default.quadrantChart)?void 0:_h.xAxisLabelFontSize)||16,yAxisLabelFontSize:(null==(_i=defaultConfig_default.quadrantChart)?void 0:_i.yAxisLabelFontSize)||16,quadrantLabelFontSize:(null==(_j=defaultConfig_default.quadrantChart)?void 0:_j.quadrantLabelFontSize)||16,quadrantTextTopPadding:(null==(_k=defaultConfig_default.quadrantChart)?void 0:_k.quadrantTextTopPadding)||5,pointTextPadding:(null==(_l=defaultConfig_default.quadrantChart)?void 0:_l.pointTextPadding)||5,pointLabelFontSize:(null==(_m=defaultConfig_default.quadrantChart)?void 0:_m.pointLabelFontSize)||12,pointRadius:(null==(_n=defaultConfig_default.quadrantChart)?void 0:_n.pointRadius)||5,xAxisPosition:(null==(_o=defaultConfig_default.quadrantChart)?void 0:_o.xAxisPosition)||"top",yAxisPosition:(null==(_p=defaultConfig_default.quadrantChart)?void 0:_p.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:(null==(_q=defaultConfig_default.quadrantChart)?void 0:_q.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:(null==(_r=defaultConfig_default.quadrantChart)?void 0:_r.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:defaultThemeVariables.quadrant1Fill,quadrant2Fill:defaultThemeVariables.quadrant2Fill,quadrant3Fill:defaultThemeVariables.quadrant3Fill,quadrant4Fill:defaultThemeVariables.quadrant4Fill,quadrant1TextFill:defaultThemeVariables.quadrant1TextFill,quadrant2TextFill:defaultThemeVariables.quadrant2TextFill,quadrant3TextFill:defaultThemeVariables.quadrant3TextFill,quadrant4TextFill:defaultThemeVariables.quadrant4TextFill,quadrantPointFill:defaultThemeVariables.quadrantPointFill,quadrantPointTextFill:defaultThemeVariables.quadrantPointTextFill,quadrantXAxisTextFill:defaultThemeVariables.quadrantXAxisTextFill,quadrantYAxisTextFill:defaultThemeVariables.quadrantYAxisTextFill,quadrantTitleFill:defaultThemeVariables.quadrantTitleFill,quadrantInternalBorderStrokeFill:defaultThemeVariables.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:defaultThemeVariables.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,log.info("clear called")}setData(data){this.data={...this.data,...data}}addPoints(points){this.data.points=[...points,...this.data.points]}addClass(className,styles){this.classes.set(className,styles)}setConfig(config2){log.trace("setConfig called with: ",config2),this.config={...this.config,...config2}}setThemeConfig(themeConfig){log.trace("setThemeConfig called with: ",themeConfig),this.themeConfig={...this.themeConfig,...themeConfig}}calculateSpace(xAxisPosition,showXAxis,showYAxis,showTitle){const xAxisSpaceCalculation=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,xAxisSpace={top:"top"===xAxisPosition&&showXAxis?xAxisSpaceCalculation:0,bottom:"bottom"===xAxisPosition&&showXAxis?xAxisSpaceCalculation:0},yAxisSpaceCalculation=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,yAxisSpace={left:"left"===this.config.yAxisPosition&&showYAxis?yAxisSpaceCalculation:0,right:"right"===this.config.yAxisPosition&&showYAxis?yAxisSpaceCalculation:0},titleSpaceCalculation=this.config.titleFontSize+2*this.config.titlePadding,titleSpace={top:showTitle?titleSpaceCalculation:0},quadrantLeft=this.config.quadrantPadding+yAxisSpace.left,quadrantTop=this.config.quadrantPadding+xAxisSpace.top+titleSpace.top,quadrantWidth=this.config.chartWidth-2*this.config.quadrantPadding-yAxisSpace.left-yAxisSpace.right,quadrantHeight=this.config.chartHeight-2*this.config.quadrantPadding-xAxisSpace.top-xAxisSpace.bottom-titleSpace.top;return{xAxisSpace:xAxisSpace,yAxisSpace:yAxisSpace,titleSpace:titleSpace,quadrantSpace:{quadrantLeft:quadrantLeft,quadrantTop:quadrantTop,quadrantWidth:quadrantWidth,quadrantHalfWidth:quadrantWidth/2,quadrantHeight:quadrantHeight,quadrantHalfHeight:quadrantHeight/2}}}getAxisLabels(xAxisPosition,showXAxis,showYAxis,spaceData){const{quadrantSpace:quadrantSpace,titleSpace:titleSpace}=spaceData,{quadrantHalfHeight:quadrantHalfHeight,quadrantHeight:quadrantHeight,quadrantLeft:quadrantLeft,quadrantHalfWidth:quadrantHalfWidth,quadrantTop:quadrantTop,quadrantWidth:quadrantWidth}=quadrantSpace,drawXAxisLabelsInMiddle=Boolean(this.data.xAxisRightText),drawYAxisLabelsInMiddle=Boolean(this.data.yAxisTopText),axisLabels=[];return this.data.xAxisLeftText&&showXAxis&&axisLabels.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:quadrantLeft+(drawXAxisLabelsInMiddle?quadrantHalfWidth/2:0),y:"top"===xAxisPosition?this.config.xAxisLabelPadding+titleSpace.top:this.config.xAxisLabelPadding+quadrantTop+quadrantHeight+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:drawXAxisLabelsInMiddle?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&showXAxis&&axisLabels.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:quadrantLeft+quadrantHalfWidth+(drawXAxisLabelsInMiddle?quadrantHalfWidth/2:0),y:"top"===xAxisPosition?this.config.xAxisLabelPadding+titleSpace.top:this.config.xAxisLabelPadding+quadrantTop+quadrantHeight+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:drawXAxisLabelsInMiddle?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&showYAxis&&axisLabels.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+quadrantLeft+quadrantWidth+this.config.quadrantPadding,y:quadrantTop+quadrantHeight-(drawYAxisLabelsInMiddle?quadrantHalfHeight/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:drawYAxisLabelsInMiddle?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&showYAxis&&axisLabels.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+quadrantLeft+quadrantWidth+this.config.quadrantPadding,y:quadrantTop+quadrantHalfHeight-(drawYAxisLabelsInMiddle?quadrantHalfHeight/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:drawYAxisLabelsInMiddle?"center":"left",horizontalPos:"top",rotation:-90}),axisLabels}getQuadrants(spaceData){const{quadrantSpace:quadrantSpace}=spaceData,{quadrantHalfHeight:quadrantHalfHeight,quadrantLeft:quadrantLeft,quadrantHalfWidth:quadrantHalfWidth,quadrantTop:quadrantTop}=quadrantSpace,quadrants=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:quadrantLeft+quadrantHalfWidth,y:quadrantTop,width:quadrantHalfWidth,height:quadrantHalfHeight,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:quadrantLeft,y:quadrantTop,width:quadrantHalfWidth,height:quadrantHalfHeight,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:quadrantLeft,y:quadrantTop+quadrantHalfHeight,width:quadrantHalfWidth,height:quadrantHalfHeight,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:quadrantLeft+quadrantHalfWidth,y:quadrantTop+quadrantHalfHeight,width:quadrantHalfWidth,height:quadrantHalfHeight,fill:this.themeConfig.quadrant4Fill}];for(const quadrant of quadrants)quadrant.text.x=quadrant.x+quadrant.width/2,0===this.data.points.length?(quadrant.text.y=quadrant.y+quadrant.height/2,quadrant.text.horizontalPos="middle"):(quadrant.text.y=quadrant.y+this.config.quadrantTextTopPadding,quadrant.text.horizontalPos="top");return quadrants}getQuadrantPoints(spaceData){const{quadrantSpace:quadrantSpace}=spaceData,{quadrantHeight:quadrantHeight,quadrantLeft:quadrantLeft,quadrantTop:quadrantTop,quadrantWidth:quadrantWidth}=quadrantSpace,xAxis=linear().domain([0,1]).range([quadrantLeft,quadrantWidth+quadrantLeft]),yAxis=linear().domain([0,1]).range([quadrantHeight+quadrantTop,quadrantTop]);return this.data.points.map(point=>{const classStyles=this.classes.get(point.className);classStyles&&(point={...classStyles,...point});return{x:xAxis(point.x),y:yAxis(point.y),fill:point.color??this.themeConfig.quadrantPointFill,radius:point.radius??this.config.pointRadius,text:{text:point.text,fill:this.themeConfig.quadrantPointTextFill,x:xAxis(point.x),y:yAxis(point.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:point.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:point.strokeWidth??"0px"}})}getBorders(spaceData){const halfExternalBorderWidth=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:quadrantSpace}=spaceData,{quadrantHalfHeight:quadrantHalfHeight,quadrantHeight:quadrantHeight,quadrantLeft:quadrantLeft,quadrantHalfWidth:quadrantHalfWidth,quadrantTop:quadrantTop,quadrantWidth:quadrantWidth}=quadrantSpace;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:quadrantLeft-halfExternalBorderWidth,y1:quadrantTop,x2:quadrantLeft+quadrantWidth+halfExternalBorderWidth,y2:quadrantTop},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:quadrantLeft+quadrantWidth,y1:quadrantTop+halfExternalBorderWidth,x2:quadrantLeft+quadrantWidth,y2:quadrantTop+quadrantHeight-halfExternalBorderWidth},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:quadrantLeft-halfExternalBorderWidth,y1:quadrantTop+quadrantHeight,x2:quadrantLeft+quadrantWidth+halfExternalBorderWidth,y2:quadrantTop+quadrantHeight},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:quadrantLeft,y1:quadrantTop+halfExternalBorderWidth,x2:quadrantLeft,y2:quadrantTop+quadrantHeight-halfExternalBorderWidth},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:quadrantLeft+quadrantHalfWidth,y1:quadrantTop+halfExternalBorderWidth,x2:quadrantLeft+quadrantHalfWidth,y2:quadrantTop+quadrantHeight-halfExternalBorderWidth},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:quadrantLeft+halfExternalBorderWidth,y1:quadrantTop+quadrantHalfHeight,x2:quadrantLeft+quadrantWidth-halfExternalBorderWidth,y2:quadrantTop+quadrantHalfHeight}]}getTitle(showTitle){if(showTitle)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(){const showXAxis=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),showYAxis=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),showTitle=this.config.showTitle&&!!this.data.titleText,xAxisPosition=this.data.points.length>0?"bottom":this.config.xAxisPosition,calculatedSpace=this.calculateSpace(xAxisPosition,showXAxis,showYAxis,showTitle);return{points:this.getQuadrantPoints(calculatedSpace),quadrants:this.getQuadrants(calculatedSpace),axisLabels:this.getAxisLabels(xAxisPosition,showXAxis,showYAxis,calculatedSpace),borderLines:this.getBorders(calculatedSpace),title:this.getTitle(showTitle)}}},"QuadrantBuilder"),_a),InvalidStyleError=(_b=class extends Error{constructor(style,value,type){super(`value for ${style} ${value} is invalid, please use a valid ${type}`),this.name="InvalidStyleError"}},__name(_b,"InvalidStyleError"),_b);function validateHexCode(value){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(value)}function validateNumber(value){return!/^\d+$/.test(value)}function validateSizeInPixels(value){return!/^\d+px$/.test(value)}__name(validateHexCode,"validateHexCode"),__name(validateNumber,"validateNumber"),__name(validateSizeInPixels,"validateSizeInPixels");var config=getConfig2();function textSanitizer(text){return sanitizeText(text.trim(),config)}__name(textSanitizer,"textSanitizer");var quadrantBuilder=new QuadrantBuilder;function setQuadrant1Text(textObj){quadrantBuilder.setData({quadrant1Text:textSanitizer(textObj.text)})}function setQuadrant2Text(textObj){quadrantBuilder.setData({quadrant2Text:textSanitizer(textObj.text)})}function setQuadrant3Text(textObj){quadrantBuilder.setData({quadrant3Text:textSanitizer(textObj.text)})}function setQuadrant4Text(textObj){quadrantBuilder.setData({quadrant4Text:textSanitizer(textObj.text)})}function setXAxisLeftText(textObj){quadrantBuilder.setData({xAxisLeftText:textSanitizer(textObj.text)})}function setXAxisRightText(textObj){quadrantBuilder.setData({xAxisRightText:textSanitizer(textObj.text)})}function setYAxisTopText(textObj){quadrantBuilder.setData({yAxisTopText:textSanitizer(textObj.text)})}function setYAxisBottomText(textObj){quadrantBuilder.setData({yAxisBottomText:textSanitizer(textObj.text)})}function parseStyles(styles){const stylesObject={};for(const style of styles){const[key,value]=style.trim().split(/\s*:\s*/);if("radius"===key){if(validateNumber(value))throw new InvalidStyleError(key,value,"number");stylesObject.radius=parseInt(value)}else if("color"===key){if(validateHexCode(value))throw new InvalidStyleError(key,value,"hex code");stylesObject.color=value}else if("stroke-color"===key){if(validateHexCode(value))throw new InvalidStyleError(key,value,"hex code");stylesObject.strokeColor=value}else{if("stroke-width"!==key)throw new Error(`style named ${key} is not supported.`);if(validateSizeInPixels(value))throw new InvalidStyleError(key,value,"number of pixels (eg. 10px)");stylesObject.strokeWidth=value}}return stylesObject}function addPoint(textObj,className,x,y,styles){const stylesObject=parseStyles(styles);quadrantBuilder.addPoints([{x:x,y:y,text:textSanitizer(textObj.text),className:className,...stylesObject}])}function addClass(className,styles){quadrantBuilder.addClass(className,parseStyles(styles))}function setWidth(width){quadrantBuilder.setConfig({chartWidth:width})}function setHeight(height){quadrantBuilder.setConfig({chartHeight:height})}function getQuadrantData(){const config2=getConfig2(),{themeVariables:themeVariables,quadrantChart:quadrantChartConfig}=config2;return quadrantChartConfig&&quadrantBuilder.setConfig(quadrantChartConfig),quadrantBuilder.setThemeConfig({quadrant1Fill:themeVariables.quadrant1Fill,quadrant2Fill:themeVariables.quadrant2Fill,quadrant3Fill:themeVariables.quadrant3Fill,quadrant4Fill:themeVariables.quadrant4Fill,quadrant1TextFill:themeVariables.quadrant1TextFill,quadrant2TextFill:themeVariables.quadrant2TextFill,quadrant3TextFill:themeVariables.quadrant3TextFill,quadrant4TextFill:themeVariables.quadrant4TextFill,quadrantPointFill:themeVariables.quadrantPointFill,quadrantPointTextFill:themeVariables.quadrantPointTextFill,quadrantXAxisTextFill:themeVariables.quadrantXAxisTextFill,quadrantYAxisTextFill:themeVariables.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:themeVariables.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:themeVariables.quadrantInternalBorderStrokeFill,quadrantTitleFill:themeVariables.quadrantTitleFill}),quadrantBuilder.setData({titleText:getDiagramTitle()}),quadrantBuilder.build()}__name(setQuadrant1Text,"setQuadrant1Text"),__name(setQuadrant2Text,"setQuadrant2Text"),__name(setQuadrant3Text,"setQuadrant3Text"),__name(setQuadrant4Text,"setQuadrant4Text"),__name(setXAxisLeftText,"setXAxisLeftText"),__name(setXAxisRightText,"setXAxisRightText"),__name(setYAxisTopText,"setYAxisTopText"),__name(setYAxisBottomText,"setYAxisBottomText"),__name(parseStyles,"parseStyles"),__name(addPoint,"addPoint"),__name(addClass,"addClass"),__name(setWidth,"setWidth"),__name(setHeight,"setHeight"),__name(getQuadrantData,"getQuadrantData");var diagram={parser:quadrant_default,db:{setWidth:setWidth,setHeight:setHeight,setQuadrant1Text:setQuadrant1Text,setQuadrant2Text:setQuadrant2Text,setQuadrant3Text:setQuadrant3Text,setQuadrant4Text:setQuadrant4Text,setXAxisLeftText:setXAxisLeftText,setXAxisRightText:setXAxisRightText,setYAxisTopText:setYAxisTopText,setYAxisBottomText:setYAxisBottomText,parseStyles:parseStyles,addPoint:addPoint,addClass:addClass,getQuadrantData:getQuadrantData,clear:__name(function(){quadrantBuilder.clear(),clear()},"clear"),setAccTitle:setAccTitle,getAccTitle:getAccTitle,setDiagramTitle:setDiagramTitle,getDiagramTitle:getDiagramTitle,getAccDescription:getAccDescription,setAccDescription:setAccDescription},renderer:{draw:__name((txt,id,_version,diagObj)=>{var _a2,_b2,_c;function getDominantBaseLine(horizontalPos){return"top"===horizontalPos?"hanging":"middle"}function getTextAnchor(verticalPos){return"left"===verticalPos?"start":"middle"}function getTransformation(data){return`translate(${data.x}, ${data.y}) rotate(${data.rotation||0})`}__name(getDominantBaseLine,"getDominantBaseLine"),__name(getTextAnchor,"getTextAnchor"),__name(getTransformation,"getTransformation");const conf=getConfig2();log.debug("Rendering quadrant chart\n"+txt);const securityLevel=conf.securityLevel;let sandboxElement;"sandbox"===securityLevel&&(sandboxElement=select("#i"+id));const svg=select("sandbox"===securityLevel?sandboxElement.nodes()[0].contentDocument.body:"body").select(`[id="${id}"]`),group=svg.append("g").attr("class","main"),width=(null==(_a2=conf.quadrantChart)?void 0:_a2.chartWidth)??500,height=(null==(_b2=conf.quadrantChart)?void 0:_b2.chartHeight)??500;configureSvgSize(svg,height,width,(null==(_c=conf.quadrantChart)?void 0:_c.useMaxWidth)??!0),svg.attr("viewBox","0 0 "+width+" "+height),diagObj.db.setHeight(height),diagObj.db.setWidth(width);const quadrantData=diagObj.db.getQuadrantData(),quadrantsGroup=group.append("g").attr("class","quadrants"),borderGroup=group.append("g").attr("class","border"),dataPointGroup=group.append("g").attr("class","data-points"),labelGroup=group.append("g").attr("class","labels"),titleGroup=group.append("g").attr("class","title");quadrantData.title&&titleGroup.append("text").attr("x",0).attr("y",0).attr("fill",quadrantData.title.fill).attr("font-size",quadrantData.title.fontSize).attr("dominant-baseline",getDominantBaseLine(quadrantData.title.horizontalPos)).attr("text-anchor",getTextAnchor(quadrantData.title.verticalPos)).attr("transform",getTransformation(quadrantData.title)).text(quadrantData.title.text),quadrantData.borderLines&&borderGroup.selectAll("line").data(quadrantData.borderLines).enter().append("line").attr("x1",data=>data.x1).attr("y1",data=>data.y1).attr("x2",data=>data.x2).attr("y2",data=>data.y2).style("stroke",data=>data.strokeFill).style("stroke-width",data=>data.strokeWidth);const quadrants=quadrantsGroup.selectAll("g.quadrant").data(quadrantData.quadrants).enter().append("g").attr("class","quadrant");quadrants.append("rect").attr("x",data=>data.x).attr("y",data=>data.y).attr("width",data=>data.width).attr("height",data=>data.height).attr("fill",data=>data.fill),quadrants.append("text").attr("x",0).attr("y",0).attr("fill",data=>data.text.fill).attr("font-size",data=>data.text.fontSize).attr("dominant-baseline",data=>getDominantBaseLine(data.text.horizontalPos)).attr("text-anchor",data=>getTextAnchor(data.text.verticalPos)).attr("transform",data=>getTransformation(data.text)).text(data=>data.text.text);labelGroup.selectAll("g.label").data(quadrantData.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(data=>data.text).attr("fill",data=>data.fill).attr("font-size",data=>data.fontSize).attr("dominant-baseline",data=>getDominantBaseLine(data.horizontalPos)).attr("text-anchor",data=>getTextAnchor(data.verticalPos)).attr("transform",data=>getTransformation(data));const dataPoints=dataPointGroup.selectAll("g.data-point").data(quadrantData.points).enter().append("g").attr("class","data-point");dataPoints.append("circle").attr("cx",data=>data.x).attr("cy",data=>data.y).attr("r",data=>data.radius).attr("fill",data=>data.fill).attr("stroke",data=>data.strokeColor).attr("stroke-width",data=>data.strokeWidth),dataPoints.append("text").attr("x",0).attr("y",0).text(data=>data.text.text).attr("fill",data=>data.text.fill).attr("font-size",data=>data.text.fontSize).attr("dominant-baseline",data=>getDominantBaseLine(data.text.horizontalPos)).attr("text-anchor",data=>getTextAnchor(data.text.verticalPos)).attr("transform",data=>getTransformation(data.text))},"draw")},styles:__name(()=>"","styles")};export{diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var _a;import{g as getDiagramElement}from"./chunk-55IACEB6-DTKTLKcJ.js";import{s as setupViewPortForSVG}from"./chunk-EDXVE4YY-BNqgeN9r.js";import{_ as __name,C as getConfig,b as setAccTitle,a as getAccTitle,s as setAccDescription,g as getAccDescription,p as setDiagramTitle,q as getDiagramTitle,c as getConfig2,l as log,y as clear,B as __export,o as getRegisteredLayoutAlgorithm,r as render,u as utils_default}from"./mermaid.core-DvwEdatr.js";import"./vendor-mdxeditor-Cy5Xg_90.js";import"./vendor-antd-BTBRwbax.js";import"./vendor-virtuoso-Bq6QMhgG.js";import"./vendor-codemirror-CPWlhuQ1.js";import"./vendor-markdown-DOJHsAxX.js";var parser=function(){var o=__name(function(k,v,o2,l){for(o2=o2||{},l=k.length;l--;o2[k[l]]=v);return o2},"o"),$V0=[1,3],$V1=[1,4],$V2=[1,5],$V3=[1,6],$V4=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],$V5=[1,22],$V6=[2,7],$V7=[1,26],$V8=[1,27],$V9=[1,28],$Va=[1,29],$Vb=[1,33],$Vc=[1,34],$Vd=[1,35],$Ve=[1,36],$Vf=[1,37],$Vg=[1,38],$Vh=[1,24],$Vi=[1,31],$Vj=[1,32],$Vk=[1,30],$Vl=[1,39],$Vm=[1,40],$Vn=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],$Vo=[1,61],$Vp=[89,90],$Vq=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],$Vr=[27,29],$Vs=[1,70],$Vt=[1,71],$Vu=[1,72],$Vv=[1,73],$Vw=[1,74],$Vx=[1,75],$Vy=[1,76],$Vz=[1,83],$VA=[1,80],$VB=[1,84],$VC=[1,85],$VD=[1,86],$VE=[1,87],$VF=[1,88],$VG=[1,89],$VH=[1,90],$VI=[1,91],$VJ=[1,92],$VK=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],$VL=[63,64],$VM=[1,101],$VN=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],$VO=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],$VP=[1,110],$VQ=[1,106],$VR=[1,107],$VS=[1,108],$VT=[1,109],$VU=[1,111],$VV=[1,116],$VW=[1,117],$VX=[1,114],$VY=[1,115],parser2={trace:__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:__name(function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 4:this.$=$$[$0].trim(),yy.setAccTitle(this.$);break;case 5:case 6:this.$=$$[$0].trim(),yy.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:yy.setDirection("TB");break;case 18:yy.setDirection("BT");break;case 19:yy.setDirection("RL");break;case 20:yy.setDirection("LR");break;case 21:yy.addRequirement($$[$0-3],$$[$0-4]);break;case 22:yy.addRequirement($$[$0-5],$$[$0-6]),yy.setClass([$$[$0-5]],$$[$0-3]);break;case 23:yy.setNewReqId($$[$0-2]);break;case 24:yy.setNewReqText($$[$0-2]);break;case 25:yy.setNewReqRisk($$[$0-2]);break;case 26:yy.setNewReqVerifyMethod($$[$0-2]);break;case 29:this.$=yy.RequirementType.REQUIREMENT;break;case 30:this.$=yy.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=yy.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=yy.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=yy.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=yy.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=yy.RiskLevel.LOW_RISK;break;case 36:this.$=yy.RiskLevel.MED_RISK;break;case 37:this.$=yy.RiskLevel.HIGH_RISK;break;case 38:this.$=yy.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=yy.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=yy.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=yy.VerifyType.VERIFY_TEST;break;case 42:yy.addElement($$[$0-3]);break;case 43:yy.addElement($$[$0-5]),yy.setClass([$$[$0-5]],$$[$0-3]);break;case 44:yy.setNewElementType($$[$0-2]);break;case 45:yy.setNewElementDocRef($$[$0-2]);break;case 48:yy.addRelationship($$[$0-2],$$[$0],$$[$0-4]);break;case 49:yy.addRelationship($$[$0-2],$$[$0-4],$$[$0]);break;case 50:this.$=yy.Relationships.CONTAINS;break;case 51:this.$=yy.Relationships.COPIES;break;case 52:this.$=yy.Relationships.DERIVES;break;case 53:this.$=yy.Relationships.SATISFIES;break;case 54:this.$=yy.Relationships.VERIFIES;break;case 55:this.$=yy.Relationships.REFINES;break;case 56:this.$=yy.Relationships.TRACES;break;case 57:this.$=$$[$0-2],yy.defineClass($$[$0-1],$$[$0]);break;case 58:yy.setClass($$[$0-1],$$[$0]);break;case 59:yy.setClass([$$[$0-2]],$$[$0]);break;case 60:case 62:case 65:this.$=[$$[$0]];break;case 61:case 63:this.$=$$[$0-2].concat([$$[$0]]);break;case 64:this.$=$$[$0-2],yy.setCssStyle($$[$0-1],$$[$0]);break;case 66:$$[$0-2].push($$[$0]),this.$=$$[$0-2];break;case 68:this.$=$$[$0-1]+$$[$0]}},"anonymous"),table:[{3:1,4:2,6:$V0,9:$V1,11:$V2,13:$V3},{1:[3]},{3:8,4:2,5:[1,7],6:$V0,9:$V1,11:$V2,13:$V3},{5:[1,9]},{10:[1,10]},{12:[1,11]},o($V4,[2,6]),{3:12,4:2,6:$V0,9:$V1,11:$V2,13:$V3},{1:[2,2]},{4:17,5:$V5,7:13,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:$V7,22:$V8,23:$V9,24:$Va,25:23,33:25,41:$Vb,42:$Vc,43:$Vd,44:$Ve,45:$Vf,46:$Vg,54:$Vh,72:$Vi,74:$Vj,77:$Vk,89:$Vl,90:$Vm},o($V4,[2,4]),o($V4,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:$V5,7:42,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:$V7,22:$V8,23:$V9,24:$Va,25:23,33:25,41:$Vb,42:$Vc,43:$Vd,44:$Ve,45:$Vf,46:$Vg,54:$Vh,72:$Vi,74:$Vj,77:$Vk,89:$Vl,90:$Vm},{4:17,5:$V5,7:43,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:$V7,22:$V8,23:$V9,24:$Va,25:23,33:25,41:$Vb,42:$Vc,43:$Vd,44:$Ve,45:$Vf,46:$Vg,54:$Vh,72:$Vi,74:$Vj,77:$Vk,89:$Vl,90:$Vm},{4:17,5:$V5,7:44,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:$V7,22:$V8,23:$V9,24:$Va,25:23,33:25,41:$Vb,42:$Vc,43:$Vd,44:$Ve,45:$Vf,46:$Vg,54:$Vh,72:$Vi,74:$Vj,77:$Vk,89:$Vl,90:$Vm},{4:17,5:$V5,7:45,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:$V7,22:$V8,23:$V9,24:$Va,25:23,33:25,41:$Vb,42:$Vc,43:$Vd,44:$Ve,45:$Vf,46:$Vg,54:$Vh,72:$Vi,74:$Vj,77:$Vk,89:$Vl,90:$Vm},{4:17,5:$V5,7:46,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:$V7,22:$V8,23:$V9,24:$Va,25:23,33:25,41:$Vb,42:$Vc,43:$Vd,44:$Ve,45:$Vf,46:$Vg,54:$Vh,72:$Vi,74:$Vj,77:$Vk,89:$Vl,90:$Vm},{4:17,5:$V5,7:47,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:$V7,22:$V8,23:$V9,24:$Va,25:23,33:25,41:$Vb,42:$Vc,43:$Vd,44:$Ve,45:$Vf,46:$Vg,54:$Vh,72:$Vi,74:$Vj,77:$Vk,89:$Vl,90:$Vm},{4:17,5:$V5,7:48,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:$V7,22:$V8,23:$V9,24:$Va,25:23,33:25,41:$Vb,42:$Vc,43:$Vd,44:$Ve,45:$Vf,46:$Vg,54:$Vh,72:$Vi,74:$Vj,77:$Vk,89:$Vl,90:$Vm},{4:17,5:$V5,7:49,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:$V7,22:$V8,23:$V9,24:$Va,25:23,33:25,41:$Vb,42:$Vc,43:$Vd,44:$Ve,45:$Vf,46:$Vg,54:$Vh,72:$Vi,74:$Vj,77:$Vk,89:$Vl,90:$Vm},{4:17,5:$V5,7:50,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:$V7,22:$V8,23:$V9,24:$Va,25:23,33:25,41:$Vb,42:$Vc,43:$Vd,44:$Ve,45:$Vf,46:$Vg,54:$Vh,72:$Vi,74:$Vj,77:$Vk,89:$Vl,90:$Vm},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},o($Vn,[2,17]),o($Vn,[2,18]),o($Vn,[2,19]),o($Vn,[2,20]),{30:60,33:62,75:$Vo,89:$Vl,90:$Vm},{30:63,33:62,75:$Vo,89:$Vl,90:$Vm},{30:64,33:62,75:$Vo,89:$Vl,90:$Vm},o($Vp,[2,29]),o($Vp,[2,30]),o($Vp,[2,31]),o($Vp,[2,32]),o($Vp,[2,33]),o($Vp,[2,34]),o($Vq,[2,81]),o($Vq,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},o($Vr,[2,79]),o($Vr,[2,80]),{27:[1,67],29:[1,68]},o($Vr,[2,85]),o($Vr,[2,86]),{62:69,65:$Vs,66:$Vt,67:$Vu,68:$Vv,69:$Vw,70:$Vx,71:$Vy},{62:77,65:$Vs,66:$Vt,67:$Vu,68:$Vv,69:$Vw,70:$Vx,71:$Vy},{30:78,33:62,75:$Vo,89:$Vl,90:$Vm},{73:79,75:$Vz,76:$VA,78:81,79:82,80:$VB,81:$VC,82:$VD,83:$VE,84:$VF,85:$VG,86:$VH,87:$VI,88:$VJ},o($VK,[2,60]),o($VK,[2,62]),{73:93,75:$Vz,76:$VA,78:81,79:82,80:$VB,81:$VC,82:$VD,83:$VE,84:$VF,85:$VG,86:$VH,87:$VI,88:$VJ},{30:94,33:62,75:$Vo,76:$VA,89:$Vl,90:$Vm},{5:[1,95]},{30:96,33:62,75:$Vo,89:$Vl,90:$Vm},{5:[1,97]},{30:98,33:62,75:$Vo,89:$Vl,90:$Vm},{63:[1,99]},o($VL,[2,50]),o($VL,[2,51]),o($VL,[2,52]),o($VL,[2,53]),o($VL,[2,54]),o($VL,[2,55]),o($VL,[2,56]),{64:[1,100]},o($Vn,[2,59],{76:$VA}),o($Vn,[2,64],{76:$VM}),{33:103,75:[1,102],89:$Vl,90:$Vm},o($VN,[2,65],{79:104,75:$Vz,80:$VB,81:$VC,82:$VD,83:$VE,84:$VF,85:$VG,86:$VH,87:$VI,88:$VJ}),o($VO,[2,67]),o($VO,[2,69]),o($VO,[2,70]),o($VO,[2,71]),o($VO,[2,72]),o($VO,[2,73]),o($VO,[2,74]),o($VO,[2,75]),o($VO,[2,76]),o($VO,[2,77]),o($VO,[2,78]),o($Vn,[2,57],{76:$VM}),o($Vn,[2,58],{76:$VA}),{5:$VP,28:105,31:$VQ,34:$VR,36:$VS,38:$VT,40:$VU},{27:[1,112],76:$VA},{5:$VV,40:$VW,56:113,57:$VX,59:$VY},{27:[1,118],76:$VA},{33:119,89:$Vl,90:$Vm},{33:120,89:$Vl,90:$Vm},{75:$Vz,78:121,79:82,80:$VB,81:$VC,82:$VD,83:$VE,84:$VF,85:$VG,86:$VH,87:$VI,88:$VJ},o($VK,[2,61]),o($VK,[2,63]),o($VO,[2,68]),o($Vn,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:$VP,28:126,31:$VQ,34:$VR,36:$VS,38:$VT,40:$VU},o($Vn,[2,28]),{5:[1,127]},o($Vn,[2,42]),{32:[1,128]},{32:[1,129]},{5:$VV,40:$VW,56:130,57:$VX,59:$VY},o($Vn,[2,47]),{5:[1,131]},o($Vn,[2,48]),o($Vn,[2,49]),o($VN,[2,66],{79:104,75:$Vz,80:$VB,81:$VC,82:$VD,83:$VE,84:$VF,85:$VG,86:$VH,87:$VI,88:$VJ}),{33:132,89:$Vl,90:$Vm},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},o($Vn,[2,27]),{5:$VP,28:145,31:$VQ,34:$VR,36:$VS,38:$VT,40:$VU},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},o($Vn,[2,46]),{5:$VV,40:$VW,56:152,57:$VX,59:$VY},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},o($Vn,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},o($Vn,[2,43]),{5:$VP,28:159,31:$VQ,34:$VR,36:$VS,38:$VT,40:$VU},{5:$VP,28:160,31:$VQ,34:$VR,36:$VS,38:$VT,40:$VU},{5:$VP,28:161,31:$VQ,34:$VR,36:$VS,38:$VT,40:$VU},{5:$VP,28:162,31:$VQ,34:$VR,36:$VS,38:$VT,40:$VU},{5:$VV,40:$VW,56:163,57:$VX,59:$VY},{5:$VV,40:$VW,56:164,57:$VX,59:$VY},o($Vn,[2,23]),o($Vn,[2,24]),o($Vn,[2,25]),o($Vn,[2,26]),o($Vn,[2,44]),o($Vn,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:__name(function(str,hash){if(!hash.recoverable){var error=new Error(str);throw error.hash=hash,error}this.trace(str)},"parseError"),parse:__name(function(input){var self=this,stack=[0],tstack=[],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,args=lstack.slice.call(arguments,1),lexer2=Object.create(this.lexer),sharedState={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(sharedState.yy[k]=this.yy[k]);lexer2.setInput(input,sharedState.yy),sharedState.yy.lexer=lexer2,sharedState.yy.parser=this,void 0===lexer2.yylloc&&(lexer2.yylloc={});var yyloc=lexer2.yylloc;lstack.push(yyloc);var ranges=lexer2.options&&lexer2.options.ranges;function lex(){var token;return"number"!=typeof(token=tstack.pop()||lexer2.lex()||1)&&(token instanceof Array&&(token=(tstack=token).pop()),token=self.symbols_[token]||token),token}"function"==typeof sharedState.yy.parseError?this.parseError=sharedState.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,__name(function(n){stack.length=stack.length-2*n,vstack.length=vstack.length-n,lstack.length=lstack.length-n},"popStack"),__name(lex,"lex");for(var symbol,state,action,r,p,len,newState,expected,yyval={};;){if(state=stack[stack.length-1],this.defaultActions[state]?action=this.defaultActions[state]:(null==symbol&&(symbol=lex()),action=table[state]&&table[state][symbol]),void 0===action||!action.length||!action[0]){var errStr="";for(p in expected=[],table[state])this.terminals_[p]&&p>2&&expected.push("'"+this.terminals_[p]+"'");errStr=lexer2.showPosition?"Parse error on line "+(yylineno+1)+":\n"+lexer2.showPosition()+"\nExpecting "+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'":"Parse error on line "+(yylineno+1)+": Unexpected "+(1==symbol?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'"),this.parseError(errStr,{text:lexer2.match,token:this.terminals_[symbol]||symbol,line:lexer2.yylineno,loc:yyloc,expected:expected})}if(action[0]instanceof Array&&action.length>1)throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol);switch(action[0]){case 1:stack.push(symbol),vstack.push(lexer2.yytext),lstack.push(lexer2.yylloc),stack.push(action[1]),symbol=null,yyleng=lexer2.yyleng,yytext=lexer2.yytext,yylineno=lexer2.yylineno,yyloc=lexer2.yylloc;break;case 2:if(len=this.productions_[action[1]][1],yyval.$=vstack[vstack.length-len],yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column},ranges&&(yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]),void 0!==(r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,sharedState.yy,action[1],vstack,lstack].concat(args))))return r;len&&(stack=stack.slice(0,-1*len*2),vstack=vstack.slice(0,-1*len),lstack=lstack.slice(0,-1*len)),stack.push(this.productions_[action[1]][0]),vstack.push(yyval.$),lstack.push(yyval._$),newState=table[stack[stack.length-2]][stack[stack.length-1]],stack.push(newState);break;case 3:return!0}}return!0},"parse")},lexer=function(){return{EOF:1,parseError:__name(function(str,hash){if(!this.yy.parser)throw new Error(str);this.yy.parser.parseError(str,hash)},"parseError"),setInput:__name(function(input,yy){return this.yy=yy||this.yy||{},this._input=input,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:__name(function(){var ch=this._input[0];return this.yytext+=ch,this.yyleng++,this.offset++,this.match+=ch,this.matched+=ch,ch.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ch},"input"),unput:__name(function(ch){var len=ch.length,lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-len),this.offset-=len;var oldLines=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),lines.length-1&&(this.yylineno-=lines.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:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-len]),this.yyleng=this.yytext.length,this},"unput"),more:__name(function(){return this._more=!0,this},"more"),reject:__name(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:__name(function(n){this.unput(this.match.slice(n))},"less"),pastInput:__name(function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:__name(function(){var next=this.match;return next.length<20&&(next+=this._input.substr(0,20-next.length)),(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:__name(function(){var pre=this.pastInput(),c=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+"\n"+c+"^"},"showPosition"),test_match:__name(function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer&&(backup={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&&(backup.yylloc.range=this.yylloc.range.slice(0))),(lines=match[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=lines.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length},this.yytext+=match[0],this.match+=match[0],this.matches=match,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(match[0].length),this.matched+=match[0],token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),token)return token;if(this._backtrack){for(var k in backup)this[k]=backup[k];return!1}return!1},"test_match"),next:__name(function(){if(this.done)return this.EOF;var token,match,tempMatch,index;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var rules=this._currentRules(),i=0;i<rules.length;i++)if((tempMatch=this._input.match(this.rules[rules[i]]))&&(!match||tempMatch[0].length>match[0].length)){if(match=tempMatch,index=i,this.options.backtrack_lexer){if(!1!==(token=this.test_match(tempMatch,rules[i])))return token;if(this._backtrack){match=!1;continue}return!1}if(!this.options.flex)break}return match?!1!==(token=this.test_match(match,rules[index]))&&token:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:__name(function(){var r=this.next();return r||this.lex()},"lex"),begin:__name(function(condition){this.conditionStack.push(condition)},"begin"),popState:__name(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:__name(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:__name(function(n){return(n=this.conditionStack.length-1-Math.abs(n||0))>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:__name(function(condition){this.begin(condition)},"pushState"),stateStackSize:__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:__name(function(yy,yy_,$avoiding_name_collisions,YY_START){switch($avoiding_name_collisions){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 58:case 65:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:case 14:case 15:case 56:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;case 50:case 68:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 57:case 64:this.begin("string");break;case 59:return this.begin("style"),72;case 60:return this.begin("style"),74;case 61:return 61;case 62:return 64;case 63:return 63;case 66:return"qString";case 67:return yy_.yytext=yy_.yytext.trim(),89;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}}}();function Parser(){this.yy={}}return parser2.lexer=lexer,__name(Parser,"Parser"),Parser.prototype=parser2,parser2.Parser=Parser,new Parser}();parser.parser=parser;var requirementDiagram_default=parser,RequirementDB=(__name(_a=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=setAccTitle,this.getAccTitle=getAccTitle,this.setAccDescription=setAccDescription,this.getAccDescription=getAccDescription,this.setDiagramTitle=setDiagramTitle,this.getDiagramTitle=getDiagramTitle,this.getConfig=__name(()=>getConfig2().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}getDirection(){return this.direction}setDirection(dir){this.direction=dir}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(name,type){return this.requirements.has(name)||this.requirements.set(name,{name:name,type:type,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(name)}getRequirements(){return this.requirements}setNewReqId(id){void 0!==this.latestRequirement&&(this.latestRequirement.requirementId=id)}setNewReqText(text){void 0!==this.latestRequirement&&(this.latestRequirement.text=text)}setNewReqRisk(risk){void 0!==this.latestRequirement&&(this.latestRequirement.risk=risk)}setNewReqVerifyMethod(verifyMethod){void 0!==this.latestRequirement&&(this.latestRequirement.verifyMethod=verifyMethod)}addElement(name){return this.elements.has(name)||(this.elements.set(name,{name:name,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),log.info("Added new element: ",name)),this.resetLatestElement(),this.elements.get(name)}getElements(){return this.elements}setNewElementType(type){void 0!==this.latestElement&&(this.latestElement.type=type)}setNewElementDocRef(docRef){void 0!==this.latestElement&&(this.latestElement.docRef=docRef)}addRelationship(type,src,dst){this.relations.push({type:type,src:src,dst:dst})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,clear()}setCssStyle(ids,styles){for(const id of ids){const node=this.requirements.get(id)??this.elements.get(id);if(!styles||!node)return;for(const s of styles)s.includes(",")?node.cssStyles.push(...s.split(",")):node.cssStyles.push(s)}}setClass(ids,classNames){var _a2;for(const id of ids){const node=this.requirements.get(id)??this.elements.get(id);if(node)for(const _class of classNames){node.classes.push(_class);const styles=null==(_a2=this.classes.get(_class))?void 0:_a2.styles;styles&&node.cssStyles.push(...styles)}}}defineClass(ids,style){for(const id of ids){let styleClass=this.classes.get(id);void 0===styleClass&&(styleClass={id:id,styles:[],textStyles:[]},this.classes.set(id,styleClass)),style&&style.forEach(function(s){if(/color/.exec(s)){const newStyle=s.replace("fill","bgFill");styleClass.textStyles.push(newStyle)}styleClass.styles.push(s)}),this.requirements.forEach(value=>{value.classes.includes(id)&&value.cssStyles.push(...style.flatMap(s=>s.split(",")))}),this.elements.forEach(value=>{value.classes.includes(id)&&value.cssStyles.push(...style.flatMap(s=>s.split(",")))})}}getClasses(){return this.classes}getData(){var _a2,_b,_c,_d;const config=getConfig2(),nodes=[],edges=[];for(const requirement of this.requirements.values()){const node=requirement;node.id=requirement.name,node.cssStyles=requirement.cssStyles,node.cssClasses=requirement.classes.join(" "),node.shape="requirementBox",node.look=config.look,node.colorIndex=nodes.length,nodes.push(node)}for(const element of this.elements.values()){const node=element;node.shape="requirementBox",node.look=config.look,node.id=element.name,node.cssStyles=element.cssStyles,node.cssClasses=element.classes.join(" "),node.colorIndex=nodes.length,nodes.push(node)}for(const relation of this.relations){let counter=0;const isContains=relation.type===this.Relationships.CONTAINS,edge={id:`${relation.src}-${relation.dst}-${counter}`,start:(null==(_a2=this.requirements.get(relation.src))?void 0:_a2.name)??(null==(_b=this.elements.get(relation.src))?void 0:_b.name),end:(null==(_c=this.requirements.get(relation.dst))?void 0:_c.name)??(null==(_d=this.elements.get(relation.dst))?void 0:_d.name),label:`<<${relation.type}>>`,classes:"relationshipLine",style:["fill:none",isContains?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:isContains?"normal":"dashed",arrowTypeStart:isContains?"requirement_contains":"",arrowTypeEnd:isContains?"":"requirement_arrow",look:config.look,labelType:"markdown"};edges.push(edge),counter++}return{nodes:nodes,edges:edges,other:{},config:config,direction:this.getDirection()}}},"RequirementDB"),_a),genColor=__name(options=>{const config=getConfig(),{themeVariables:themeVariables,look:look}=config,{bkgColorArray:bkgColorArray,borderColorArray:borderColorArray}=themeVariables;if(!(null==borderColorArray?void 0:borderColorArray.length))return"";let sections="";for(let i=0;i<options.THEME_COLOR_LIMIT;i++)sections+=`\n\n [data-look="${look}"][data-color-id="color-${i}"].node path {\n stroke: ${borderColorArray[i]};\n fill: ${(null==bkgColorArray?void 0:bkgColorArray.length)?bkgColorArray[i]:""};\n }\n\n [data-look="${look}"][data-color-id="color-${i}"].node rect {\n stroke: ${borderColorArray[i]};\n fill: ${(null==bkgColorArray?void 0:bkgColorArray.length)?bkgColorArray[i]:""};\n }\n `;return sections},"genColor"),styles_default=__name(options=>{const config=getConfig(),{look:look,themeVariables:themeVariables}=config,{requirementEdgeLabelBackground:requirementEdgeLabelBackground}=themeVariables;return`\n ${genColor(options)}\n marker {\n fill: ${options.relationColor};\n stroke: ${options.relationColor};\n }\n\n marker.cross {\n stroke: ${options.lineColor};\n }\n\n svg {\n font-family: ${options.fontFamily};\n font-size: ${options.fontSize};\n }\n\n .reqBox {\n fill: ${options.requirementBackground};\n fill-opacity: 1.0;\n stroke: ${options.requirementBorderColor};\n stroke-width: ${options.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${options.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${options.relationLabelBackground};\n fill-opacity: 1.0;\n }\n\n .req-title-line {\n stroke: ${options.requirementBorderColor};\n stroke-width: ${options.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${options.relationColor};\n stroke-width: ${"neo"===look?options.strokeWidth:"1px"};\n }\n .relationshipLabel {\n fill: ${options.relationLabelColor};\n }\n .edgeLabel {\n background-color: ${options.edgeLabelBackground};\n }\n .edgeLabel .label rect {\n fill: ${options.edgeLabelBackground};\n }\n .edgeLabel .label text {\n fill: ${options.relationLabelColor};\n }\n .divider {\n stroke: ${options.nodeBorder};\n stroke-width: 1;\n }\n .label {\n font-family: ${options.fontFamily};\n color: ${options.nodeTextColor||options.textColor};\n }\n .label text,span {\n fill: ${options.nodeTextColor||options.textColor};\n color: ${options.nodeTextColor||options.textColor};\n }\n .labelBkg {\n background-color: ${requirementEdgeLabelBackground??options.edgeLabelBackground};\n }\n\n`},"getStyles"),requirementRenderer_exports={};__export(requirementRenderer_exports,{draw:()=>draw});var draw=__name(async function(text,id,_version,diag){log.info("REF0:"),log.info("Drawing requirement diagram (unified)",id);const{securityLevel:securityLevel,state:conf,layout:layout,look:look}=getConfig2(),data4Layout=diag.db.getData(),svg=getDiagramElement(id,securityLevel);data4Layout.type=diag.type,data4Layout.layoutAlgorithm=getRegisteredLayoutAlgorithm(layout),data4Layout.nodeSpacing=(null==conf?void 0:conf.nodeSpacing)??50,data4Layout.rankSpacing=(null==conf?void 0:conf.rankSpacing)??50,data4Layout.markers="neo"===look?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],data4Layout.diagramId=id,await render(data4Layout,svg);utils_default.insertTitle(svg,"requirementDiagramTitleText",(null==conf?void 0:conf.titleTopMargin)??25,diag.db.getDiagramTitle()),setupViewPortForSVG(svg,8,"requirementDiagram",(null==conf?void 0:conf.useMaxWidth)??!0)},"draw"),diagram={parser:requirementDiagram_default,get db(){return new RequirementDB},renderer:requirementRenderer_exports,styles:styles_default};export{diagram};
|