cc-viewer 1.6.261 → 1.6.262
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-Co-5BI9q.js → App-DfhQt_ed.js} +1 -1
- package/dist/assets/{MdxEditorPanel-DFNyQW6b.js → MdxEditorPanel-j9aQWwCJ.js} +1 -1
- package/dist/assets/{Mobile-DwYIskc6.js → Mobile-0ZF71DQy.js} +1 -1
- package/dist/assets/{_baseUniq-DGKwdzTD.js → _baseUniq-DiLy7vi3.js} +1 -1
- package/dist/assets/{arc-nTLBi2ib.js → arc-CAB2oIHx.js} +1 -1
- package/dist/assets/{architectureDiagram-Q4EWVU46-pWWvthzV.js → architectureDiagram-Q4EWVU46-Cijl_JpW.js} +1 -1
- package/dist/assets/{blockDiagram-DXYQGD6D-CpU6v2gv.js → blockDiagram-DXYQGD6D-Bk4yWCPQ.js} +1 -1
- package/dist/assets/{c4Diagram-AHTNJAMY-zdTsx1jJ.js → c4Diagram-AHTNJAMY-Vz4JKuzi.js} +1 -1
- package/dist/assets/{channel-Cq1UANGu.js → channel-BnYKz_zI.js} +1 -1
- package/dist/assets/{chunk-4BX2VUAB-D6w9m5kB.js → chunk-4BX2VUAB-DM3ZjqKX.js} +1 -1
- package/dist/assets/{chunk-4TB4RGXK-DjZZc11c.js → chunk-4TB4RGXK-BTiJOoNa.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-Cw2U09Tu.js → chunk-55IACEB6-B4fMQcTE.js} +1 -1
- package/dist/assets/{chunk-EDXVE4YY-Cv-G70H7.js → chunk-EDXVE4YY-B_WylnyS.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-Dykxux6b.js → chunk-FMBD7UC4-Cx2lqZi9.js} +1 -1
- package/dist/assets/{chunk-OYMX7WX6-Cn9oAaEC.js → chunk-OYMX7WX6-CPZm7o6V.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-CA1IccbG.js → chunk-QZHKN3VN-DuYVzv7E.js} +1 -1
- package/dist/assets/{chunk-YZCP3GAM-CbReBNg5.js → chunk-YZCP3GAM-Bk3OysLK.js} +1 -1
- package/dist/assets/classDiagram-6PBFFD2Q-CeAAXpgl.js +1 -0
- package/dist/assets/classDiagram-v2-HSJHXN6E-CeAAXpgl.js +1 -0
- package/dist/assets/clone-BcGHaFBY.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-TwxpCIwM.js → cose-bilkent-S5V4N54A-CQuaqKHt.js} +1 -1
- package/dist/assets/{dagre-KV5264BT-CxuHKd9a.js → dagre-KV5264BT-BFdoRcuo.js} +1 -1
- package/dist/assets/{diagram-5BDNPKRD-BzR9Peib.js → diagram-5BDNPKRD-ByFdSFIu.js} +1 -1
- package/dist/assets/{diagram-G4DWMVQ6-PWFXrQqF.js → diagram-G4DWMVQ6-C1TcKWp0.js} +1 -1
- package/dist/assets/{diagram-MMDJMWI5-CqnrwtNB.js → diagram-MMDJMWI5-B5N1Sn5F.js} +1 -1
- package/dist/assets/{diagram-TYMM5635-Do2MhBCf.js → diagram-TYMM5635-B-payI0e.js} +1 -1
- package/dist/assets/{erDiagram-SMLLAGMA-CklZI6kO.js → erDiagram-SMLLAGMA-zziefklH.js} +1 -1
- package/dist/assets/{flowDiagram-DWJPFMVM-C_SKJN0d.js → flowDiagram-DWJPFMVM-BOSomu1b.js} +1 -1
- package/dist/assets/{ganttDiagram-T4ZO3ILL-ChhhqFiR.js → ganttDiagram-T4ZO3ILL-DILUsv0T.js} +1 -1
- package/dist/assets/{gitGraphDiagram-UUTBAWPF-HarEJVSI.js → gitGraphDiagram-UUTBAWPF-BKp2DE69.js} +1 -1
- package/dist/assets/{graph-BTcI3kpi.js → graph-NObGxitU.js} +1 -1
- package/dist/assets/{index-B0NtFDg2.js → index-0aPBVZuP.js} +1 -1
- package/dist/assets/{index-B7-pqPyp.js → index-BI-0Lyyt.js} +1 -1
- package/dist/assets/{index-CQ579eP2.js → index-BbXZgnby.js} +1 -1
- package/dist/assets/{index-BG6Hzhck.js → index-Bq9Sic2n.js} +1 -1
- package/dist/assets/{index-NNx0667m.js → index-C88BDuL0.js} +1 -1
- package/dist/assets/index-DX4SlYho.js +2 -0
- package/dist/assets/{index-CF0YP7s8.js → index-PsZiLKrC.js} +1 -1
- package/dist/assets/{index-Bzp41aRh.js → index-VqFARC4A.js} +1 -1
- package/dist/assets/{infoDiagram-42DDH7IO-DOcCtSEj.js → infoDiagram-42DDH7IO-D409o-BL.js} +1 -1
- package/dist/assets/{ishikawaDiagram-UXIWVN3A-Crb_pmG4.js → ishikawaDiagram-UXIWVN3A-CMVPOGr3.js} +1 -1
- package/dist/assets/{journeyDiagram-VCZTEJTY-BUv2Exj_.js → journeyDiagram-VCZTEJTY-Bl_5WlaZ.js} +1 -1
- package/dist/assets/{jszip.min-BuZCDHia.js → jszip.min-C2654z9i.js} +1 -1
- package/dist/assets/{kanban-definition-6JOO6SKY-DwSHz9oV.js → kanban-definition-6JOO6SKY-BfCyUP29.js} +1 -1
- package/dist/assets/{layout-Dp3N3WRT.js → layout-CgAMa0xE.js} +1 -1
- package/dist/assets/{linear-JU5ltHCp.js → linear-J1N1npGr.js} +1 -1
- package/dist/assets/{mermaid.core-f1mZHh7u.js → mermaid.core-YnqOkuoS.js} +2 -2
- package/dist/assets/{min-CDzial6q.js → min-CowkZam8.js} +1 -1
- package/dist/assets/{mindmap-definition-QFDTVHPH-DnhPHplB.js → mindmap-definition-QFDTVHPH-D7yMfot2.js} +1 -1
- package/dist/assets/{pieDiagram-DEJITSTG-dMhPj5wG.js → pieDiagram-DEJITSTG-DKUHBCwB.js} +1 -1
- package/dist/assets/{quadrantDiagram-34T5L4WZ-GCi1_zHo.js → quadrantDiagram-34T5L4WZ-DhRqBNfT.js} +1 -1
- package/dist/assets/{requirementDiagram-MS252O5E-WeErs64x.js → requirementDiagram-MS252O5E-DVE3wKT7.js} +1 -1
- package/dist/assets/{sankeyDiagram-XADWPNL6-BKpP6-8Q.js → sankeyDiagram-XADWPNL6-Rn_9b5V_.js} +1 -1
- package/dist/assets/seqResourceLoaders-CH1DqmCg.js +2 -0
- package/dist/assets/{seqResourceLoaders-B8CyM6Ul.css → seqResourceLoaders-DSKrKxVy.css} +1 -1
- package/dist/assets/{sequenceDiagram-FGHM5R23-CAC5BKbx.js → sequenceDiagram-FGHM5R23-CemLRaXC.js} +1 -1
- package/dist/assets/{stateDiagram-FHFEXIEX-Cxrg604Z.js → stateDiagram-FHFEXIEX-DNT1gAty.js} +1 -1
- package/dist/assets/{stateDiagram-v2-QKLJ7IA2-DaUpf340.js → stateDiagram-v2-QKLJ7IA2-DPlMhu-M.js} +1 -1
- package/dist/assets/{timeline-definition-GMOUNBTQ-DbvXGDTU.js → timeline-definition-GMOUNBTQ-B-F8vgZN.js} +1 -1
- package/dist/assets/{vendor-antd-jGWxgt_-.js → vendor-antd-Dq3DHFa-.js} +1 -1
- package/dist/assets/{vendor-codemirror-9gysGjWj.js → vendor-codemirror-DjMkT0sn.js} +1 -1
- package/dist/assets/{vendor-mdxeditor-BFiCaYAL.js → vendor-mdxeditor-CrZ9SWce.js} +2 -2
- package/dist/assets/{vendor-qrcode-DjZ-VpGR.js → vendor-qrcode-C_77dtHg.js} +1 -1
- package/dist/assets/{vendor-virtuoso-DB1J9xKG.js → vendor-virtuoso-aMZPf2fi.js} +1 -1
- package/dist/assets/{vennDiagram-DHZGUBPP-BoIw-nWl.js → vennDiagram-DHZGUBPP-K67JHnnN.js} +1 -1
- package/dist/assets/{wardley-RL74JXVD-4PjirsHP.js → wardley-RL74JXVD-CCis01LD.js} +1 -1
- package/dist/assets/{wardleyDiagram-NUSXRM2D-C8RzJmfU.js → wardleyDiagram-NUSXRM2D-BjqRIOpN.js} +1 -1
- package/dist/assets/{xychartDiagram-5P7HB3ND-Ct6fDXwq.js → xychartDiagram-5P7HB3ND-CaXETYTI.js} +1 -1
- package/dist/index.html +4 -4
- package/package.json +1 -1
- package/pty-manager.js +1 -1
- package/scratch-pty-manager.js +2 -2
- package/dist/assets/classDiagram-6PBFFD2Q-PgwmelQQ.js +0 -1
- package/dist/assets/classDiagram-v2-HSJHXN6E-PgwmelQQ.js +0 -1
- package/dist/assets/clone-Dnu1HdEX.js +0 -1
- package/dist/assets/index-C6MrFmhs.js +0 -2
- package/dist/assets/seqResourceLoaders-80G7f5Kr.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as styles_default,a as stateDiagram_default,S as StateDB}from"./chunk-OYMX7WX6-Cn9oAaEC.js";import{_ as __name,c as getConfig2,d as select,l as log,e as configureSvgSize,k as common_default,Q as line,R as curveBasis,N as getUrl,u as utils_default}from"./mermaid.core-f1mZHh7u.js";import{G as Graph}from"./graph-BTcI3kpi.js";import{l as layout}from"./layout-Dp3N3WRT.js";import"./chunk-55IACEB6-Cw2U09Tu.js";import"./chunk-EDXVE4YY-Cv-G70H7.js";import"./vendor-mdxeditor-BFiCaYAL.js";import"./vendor-antd-jGWxgt_-.js";import"./vendor-codemirror-9gysGjWj.js";import"./vendor-markdown-BFrYfpb0.js";import"./_baseUniq-DGKwdzTD.js";import"./min-CDzial6q.js";var conf,drawStartState=__name(g=>g.append("circle").attr("class","start-state").attr("r",getConfig2().state.sizeUnit).attr("cx",getConfig2().state.padding+getConfig2().state.sizeUnit).attr("cy",getConfig2().state.padding+getConfig2().state.sizeUnit),"drawStartState"),drawDivider=__name(g=>g.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",getConfig2().state.textHeight).attr("class","divider").attr("x2",2*getConfig2().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),drawSimpleState=__name((g,stateDef)=>{const state=g.append("text").attr("x",2*getConfig2().state.padding).attr("y",getConfig2().state.textHeight+2*getConfig2().state.padding).attr("font-size",getConfig2().state.fontSize).attr("class","state-title").text(stateDef.id),classBox=state.node().getBBox();return g.insert("rect",":first-child").attr("x",getConfig2().state.padding).attr("y",getConfig2().state.padding).attr("width",classBox.width+2*getConfig2().state.padding).attr("height",classBox.height+2*getConfig2().state.padding).attr("rx",getConfig2().state.radius),state},"drawSimpleState"),drawDescrState=__name((g,stateDef)=>{const addTspan=__name(function(textEl,txt,isFirst2){const tSpan=textEl.append("tspan").attr("x",2*getConfig2().state.padding).text(txt);isFirst2||tSpan.attr("dy",getConfig2().state.textHeight)},"addTspan"),titleBox=g.append("text").attr("x",2*getConfig2().state.padding).attr("y",getConfig2().state.textHeight+1.3*getConfig2().state.padding).attr("font-size",getConfig2().state.fontSize).attr("class","state-title").text(stateDef.descriptions[0]).node().getBBox(),titleHeight=titleBox.height,description=g.append("text").attr("x",getConfig2().state.padding).attr("y",titleHeight+.4*getConfig2().state.padding+getConfig2().state.dividerMargin+getConfig2().state.textHeight).attr("class","state-description");let isFirst=!0,isSecond=!0;stateDef.descriptions.forEach(function(descr){isFirst||(addTspan(description,descr,isSecond),isSecond=!1),isFirst=!1});const descrLine=g.append("line").attr("x1",getConfig2().state.padding).attr("y1",getConfig2().state.padding+titleHeight+getConfig2().state.dividerMargin/2).attr("y2",getConfig2().state.padding+titleHeight+getConfig2().state.dividerMargin/2).attr("class","descr-divider"),descrBox=description.node().getBBox(),width=Math.max(descrBox.width,titleBox.width);return descrLine.attr("x2",width+3*getConfig2().state.padding),g.insert("rect",":first-child").attr("x",getConfig2().state.padding).attr("y",getConfig2().state.padding).attr("width",width+2*getConfig2().state.padding).attr("height",descrBox.height+titleHeight+2*getConfig2().state.padding).attr("rx",getConfig2().state.radius),g},"drawDescrState"),addTitleAndBox=__name((g,stateDef,altBkg)=>{const pad=getConfig2().state.padding,dblPad=2*getConfig2().state.padding,orgBox=g.node().getBBox(),orgWidth=orgBox.width,orgX=orgBox.x,title=g.append("text").attr("x",0).attr("y",getConfig2().state.titleShift).attr("font-size",getConfig2().state.fontSize).attr("class","state-title").text(stateDef.id),titleWidth=title.node().getBBox().width+dblPad;let startX,width=Math.max(titleWidth,orgWidth);width===orgWidth&&(width+=dblPad);const graphBox=g.node().getBBox();stateDef.doc,startX=orgX-pad,titleWidth>orgWidth&&(startX=(orgWidth-width)/2+pad),Math.abs(orgX-graphBox.x)<pad&&titleWidth>orgWidth&&(startX=orgX-(titleWidth-orgWidth)/2);const lineY=1-getConfig2().state.textHeight;return g.insert("rect",":first-child").attr("x",startX).attr("y",lineY).attr("class",altBkg?"alt-composit":"composit").attr("width",width).attr("height",graphBox.height+getConfig2().state.textHeight+getConfig2().state.titleShift+1).attr("rx","0"),title.attr("x",startX+pad),titleWidth<=orgWidth&&title.attr("x",orgX+(width-dblPad)/2-titleWidth/2+pad),g.insert("rect",":first-child").attr("x",startX).attr("y",getConfig2().state.titleShift-getConfig2().state.textHeight-getConfig2().state.padding).attr("width",width).attr("height",3*getConfig2().state.textHeight).attr("rx",getConfig2().state.radius),g.insert("rect",":first-child").attr("x",startX).attr("y",getConfig2().state.titleShift-getConfig2().state.textHeight-getConfig2().state.padding).attr("width",width).attr("height",graphBox.height+3+2*getConfig2().state.textHeight).attr("rx",getConfig2().state.radius),g},"addTitleAndBox"),drawEndState=__name(g=>(g.append("circle").attr("class","end-state-outer").attr("r",getConfig2().state.sizeUnit+getConfig2().state.miniPadding).attr("cx",getConfig2().state.padding+getConfig2().state.sizeUnit+getConfig2().state.miniPadding).attr("cy",getConfig2().state.padding+getConfig2().state.sizeUnit+getConfig2().state.miniPadding),g.append("circle").attr("class","end-state-inner").attr("r",getConfig2().state.sizeUnit).attr("cx",getConfig2().state.padding+getConfig2().state.sizeUnit+2).attr("cy",getConfig2().state.padding+getConfig2().state.sizeUnit+2)),"drawEndState"),drawForkJoinState=__name((g,stateDef)=>{let width=getConfig2().state.forkWidth,height=getConfig2().state.forkHeight;if(stateDef.parentId){let tmp=width;width=height,height=tmp}return g.append("rect").style("stroke","black").style("fill","black").attr("width",width).attr("height",height).attr("x",getConfig2().state.padding).attr("y",getConfig2().state.padding)},"drawForkJoinState"),_drawLongText=__name((_text,x,y,g)=>{let textHeight=0;const textElem=g.append("text");textElem.style("text-anchor","start"),textElem.attr("class","noteText");let text=_text.replace(/\r\n/g,"<br/>");text=text.replace(/\n/g,"<br/>");const lines=text.split(common_default.lineBreakRegex);let tHeight=1.25*getConfig2().state.noteMargin;for(const line2 of lines){const txt=line2.trim();if(txt.length>0){const span=textElem.append("tspan");if(span.text(txt),0===tHeight){tHeight+=span.node().getBBox().height}textHeight+=tHeight,span.attr("x",x+getConfig2().state.noteMargin),span.attr("y",y+textHeight+1.25*getConfig2().state.noteMargin)}}return{textWidth:textElem.node().getBBox().width,textHeight:textHeight}},"_drawLongText"),drawNote=__name((text,g)=>{g.attr("class","state-note");const note=g.append("rect").attr("x",0).attr("y",getConfig2().state.padding),rectElem=g.append("g"),{textWidth:textWidth,textHeight:textHeight}=_drawLongText(text,0,0,rectElem);return note.attr("height",textHeight+2*getConfig2().state.noteMargin),note.attr("width",textWidth+2*getConfig2().state.noteMargin),note},"drawNote"),drawState=__name(function(elem,stateDef){const id=stateDef.id,stateInfo={id:id,label:stateDef.id,width:0,height:0},g=elem.append("g").attr("id",id).attr("class","stateGroup");"start"===stateDef.type&&drawStartState(g),"end"===stateDef.type&&drawEndState(g),"fork"!==stateDef.type&&"join"!==stateDef.type||drawForkJoinState(g,stateDef),"note"===stateDef.type&&drawNote(stateDef.note.text,g),"divider"===stateDef.type&&drawDivider(g),"default"===stateDef.type&&0===stateDef.descriptions.length&&drawSimpleState(g,stateDef),"default"===stateDef.type&&stateDef.descriptions.length>0&&drawDescrState(g,stateDef);const stateBox=g.node().getBBox();return stateInfo.width=stateBox.width+2*getConfig2().state.padding,stateInfo.height=stateBox.height+2*getConfig2().state.padding,stateInfo},"drawState"),edgeCount=0,drawEdge=__name(function(elem,path,relation){const getRelationType=__name(function(type){switch(type){case StateDB.relationType.AGGREGATION:return"aggregation";case StateDB.relationType.EXTENSION:return"extension";case StateDB.relationType.COMPOSITION:return"composition";case StateDB.relationType.DEPENDENCY:return"dependency"}},"getRelationType");path.points=path.points.filter(p=>!Number.isNaN(p.y));const lineData=path.points,lineFunction=line().x(function(d){return d.x}).y(function(d){return d.y}).curve(curveBasis),svgPath=elem.append("path").attr("d",lineFunction(lineData)).attr("id","edge"+edgeCount).attr("class","transition");let url="";if(getConfig2().state.arrowMarkerAbsolute&&(url=getUrl(!0)),svgPath.attr("marker-end","url("+url+"#"+getRelationType(StateDB.relationType.DEPENDENCY)+"End)"),void 0!==relation.title){const label=elem.append("g").attr("class","stateLabel"),{x:x,y:y}=utils_default.calcLabelPosition(path.points),rows=common_default.getRows(relation.title);let titleHeight=0;const titleRows=[];let maxWidth=0,minX=0;for(let i=0;i<=rows.length;i++){const title=label.append("text").attr("text-anchor","middle").text(rows[i]).attr("x",x).attr("y",y+titleHeight),boundsTmp=title.node().getBBox();if(maxWidth=Math.max(maxWidth,boundsTmp.width),minX=Math.min(minX,boundsTmp.x),log.info(boundsTmp.x,x,y+titleHeight),0===titleHeight){const titleBox=title.node().getBBox();titleHeight=titleBox.height,log.info("Title height",titleHeight,y)}titleRows.push(title)}let boxHeight=titleHeight*rows.length;if(rows.length>1){const heightAdj=(rows.length-1)*titleHeight*.5;titleRows.forEach((title,i)=>title.attr("y",y+i*titleHeight-heightAdj)),boxHeight=titleHeight*rows.length}const bounds=label.node().getBBox();label.insert("rect",":first-child").attr("class","box").attr("x",x-maxWidth/2-getConfig2().state.padding/2).attr("y",y-boxHeight/2-getConfig2().state.padding/2-3.5).attr("width",maxWidth+getConfig2().state.padding).attr("height",boxHeight+getConfig2().state.padding),log.info(bounds)}edgeCount++},"drawEdge"),transformationLog={},setConf=__name(function(){},"setConf"),insertMarkers=__name(function(elem){elem.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),draw=__name(function(text,id,_version,diagObj){conf=getConfig2().state;const securityLevel=getConfig2().securityLevel;let sandboxElement;"sandbox"===securityLevel&&(sandboxElement=select("#i"+id));const root=select("sandbox"===securityLevel?sandboxElement.nodes()[0].contentDocument.body:"body"),doc="sandbox"===securityLevel?sandboxElement.nodes()[0].contentDocument:document;log.debug("Rendering diagram "+text);const diagram2=root.select(`[id='${id}']`);insertMarkers(diagram2);const rootDoc=diagObj.db.getRootDoc(),rootG=diagram2.append("g").attr("id",id+"-root");renderDoc(rootDoc,rootG,void 0,!1,root,doc,diagObj);const padding=conf.padding,bounds=diagram2.node().getBBox(),width=bounds.width+2*padding,height=bounds.height+2*padding;configureSvgSize(diagram2,height,1.75*width,conf.useMaxWidth),diagram2.attr("viewBox",`${bounds.x-conf.padding} ${bounds.y-conf.padding} `+width+" "+height)},"draw"),getLabelWidth=__name(text=>text?text.length*conf.fontSizeFactor:1,"getLabelWidth"),renderDoc=__name((doc,diagram2,parentId,altBkg,root,domDocument,diagObj)=>{const graph=new Graph({compound:!0,multigraph:!0});let i,edgeFreeDoc=!0;for(i=0;i<doc.length;i++)if("relation"===doc[i].stmt){edgeFreeDoc=!1;break}parentId?graph.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:edgeFreeDoc?1:conf.edgeLengthFactor,nodeSep:edgeFreeDoc?1:50,isMultiGraph:!0}):graph.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:edgeFreeDoc?1:conf.edgeLengthFactor,nodeSep:edgeFreeDoc?1:50,ranker:"tight-tree",isMultiGraph:!0}),graph.setDefaultEdgeLabel(function(){return{}});const states=diagObj.db.getStates(),relations=diagObj.db.getRelations(),keys=Object.keys(states);for(const key of keys){const stateDef=states[key];let node;if(parentId&&(stateDef.parentId=parentId),stateDef.doc){let sub=diagram2.append("g").attr("id",stateDef.id).attr("class","stateGroup");node=renderDoc(stateDef.doc,sub,stateDef.id,!altBkg,root,domDocument,diagObj);{sub=addTitleAndBox(sub,stateDef,altBkg);let boxBounds=sub.node().getBBox();node.width=boxBounds.width,node.height=boxBounds.height+conf.padding/2,transformationLog[stateDef.id]={y:conf.compositTitleSize}}}else node=drawState(diagram2,stateDef,graph);if(stateDef.note){const noteDef={descriptions:[],id:stateDef.id+"-note",note:stateDef.note,type:"note"},note=drawState(diagram2,noteDef,graph);"left of"===stateDef.note.position?(graph.setNode(node.id+"-note",note),graph.setNode(node.id,node)):(graph.setNode(node.id,node),graph.setNode(node.id+"-note",note)),graph.setParent(node.id,node.id+"-group"),graph.setParent(node.id+"-note",node.id+"-group")}else graph.setNode(node.id,node)}log.debug("Count=",graph.nodeCount(),graph);let cnt=0;relations.forEach(function(relation){cnt++,log.debug("Setting edge",relation),graph.setEdge(relation.id1,relation.id2,{relation:relation,width:getLabelWidth(relation.title),height:conf.labelHeight*common_default.getRows(relation.title).length,labelpos:"c"},"id"+cnt)}),layout(graph),log.debug("Graph after layout",graph.nodes());const svgElem=diagram2.node();graph.nodes().forEach(function(v){if(void 0!==v&&void 0!==graph.node(v)){log.warn("Node "+v+": "+JSON.stringify(graph.node(v))),root.select("#"+svgElem.id+" #"+v).attr("transform","translate("+(graph.node(v).x-graph.node(v).width/2)+","+(graph.node(v).y+(transformationLog[v]?transformationLog[v].y:0)-graph.node(v).height/2)+" )"),root.select("#"+svgElem.id+" #"+v).attr("data-x-shift",graph.node(v).x-graph.node(v).width/2);domDocument.querySelectorAll("#"+svgElem.id+" #"+v+" .divider").forEach(divider=>{const parent=divider.parentElement;let pWidth=0,pShift=0;parent&&(parent.parentElement&&(pWidth=parent.parentElement.getBBox().width),pShift=parseInt(parent.getAttribute("data-x-shift"),10),Number.isNaN(pShift)&&(pShift=0)),divider.setAttribute("x1",0-pShift+8),divider.setAttribute("x2",pWidth-pShift-8)})}else log.debug("No Node "+v+": "+JSON.stringify(graph.node(v)))});let stateBox=svgElem.getBBox();graph.edges().forEach(function(e){void 0!==e&&void 0!==graph.edge(e)&&(log.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(graph.edge(e))),drawEdge(diagram2,graph.edge(e),graph.edge(e).relation))}),stateBox=svgElem.getBBox();const stateInfo={id:parentId||"root",label:parentId||"root",width:0,height:0};return stateInfo.width=stateBox.width+2*conf.padding,stateInfo.height=stateBox.height+2*conf.padding,log.debug("Doc rendered",stateInfo,graph),stateInfo},"renderDoc"),stateRenderer_default={setConf:setConf,draw:draw},diagram={parser:stateDiagram_default,get db(){return new StateDB(1)},renderer:stateRenderer_default,styles:styles_default,init:__name(cnf=>{cnf.state||(cnf.state={}),cnf.state.arrowMarkerAbsolute=cnf.arrowMarkerAbsolute},"init")};export{diagram};
|
|
1
|
+
import{s as styles_default,a as stateDiagram_default,S as StateDB}from"./chunk-OYMX7WX6-CPZm7o6V.js";import{_ as __name,c as getConfig2,d as select,l as log,e as configureSvgSize,k as common_default,Q as line,R as curveBasis,N as getUrl,u as utils_default}from"./mermaid.core-YnqOkuoS.js";import{G as Graph}from"./graph-NObGxitU.js";import{l as layout}from"./layout-CgAMa0xE.js";import"./chunk-55IACEB6-B4fMQcTE.js";import"./chunk-EDXVE4YY-B_WylnyS.js";import"./vendor-mdxeditor-CrZ9SWce.js";import"./vendor-antd-Dq3DHFa-.js";import"./vendor-codemirror-DjMkT0sn.js";import"./vendor-markdown-BFrYfpb0.js";import"./_baseUniq-DiLy7vi3.js";import"./min-CowkZam8.js";var conf,drawStartState=__name(g=>g.append("circle").attr("class","start-state").attr("r",getConfig2().state.sizeUnit).attr("cx",getConfig2().state.padding+getConfig2().state.sizeUnit).attr("cy",getConfig2().state.padding+getConfig2().state.sizeUnit),"drawStartState"),drawDivider=__name(g=>g.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",getConfig2().state.textHeight).attr("class","divider").attr("x2",2*getConfig2().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),drawSimpleState=__name((g,stateDef)=>{const state=g.append("text").attr("x",2*getConfig2().state.padding).attr("y",getConfig2().state.textHeight+2*getConfig2().state.padding).attr("font-size",getConfig2().state.fontSize).attr("class","state-title").text(stateDef.id),classBox=state.node().getBBox();return g.insert("rect",":first-child").attr("x",getConfig2().state.padding).attr("y",getConfig2().state.padding).attr("width",classBox.width+2*getConfig2().state.padding).attr("height",classBox.height+2*getConfig2().state.padding).attr("rx",getConfig2().state.radius),state},"drawSimpleState"),drawDescrState=__name((g,stateDef)=>{const addTspan=__name(function(textEl,txt,isFirst2){const tSpan=textEl.append("tspan").attr("x",2*getConfig2().state.padding).text(txt);isFirst2||tSpan.attr("dy",getConfig2().state.textHeight)},"addTspan"),titleBox=g.append("text").attr("x",2*getConfig2().state.padding).attr("y",getConfig2().state.textHeight+1.3*getConfig2().state.padding).attr("font-size",getConfig2().state.fontSize).attr("class","state-title").text(stateDef.descriptions[0]).node().getBBox(),titleHeight=titleBox.height,description=g.append("text").attr("x",getConfig2().state.padding).attr("y",titleHeight+.4*getConfig2().state.padding+getConfig2().state.dividerMargin+getConfig2().state.textHeight).attr("class","state-description");let isFirst=!0,isSecond=!0;stateDef.descriptions.forEach(function(descr){isFirst||(addTspan(description,descr,isSecond),isSecond=!1),isFirst=!1});const descrLine=g.append("line").attr("x1",getConfig2().state.padding).attr("y1",getConfig2().state.padding+titleHeight+getConfig2().state.dividerMargin/2).attr("y2",getConfig2().state.padding+titleHeight+getConfig2().state.dividerMargin/2).attr("class","descr-divider"),descrBox=description.node().getBBox(),width=Math.max(descrBox.width,titleBox.width);return descrLine.attr("x2",width+3*getConfig2().state.padding),g.insert("rect",":first-child").attr("x",getConfig2().state.padding).attr("y",getConfig2().state.padding).attr("width",width+2*getConfig2().state.padding).attr("height",descrBox.height+titleHeight+2*getConfig2().state.padding).attr("rx",getConfig2().state.radius),g},"drawDescrState"),addTitleAndBox=__name((g,stateDef,altBkg)=>{const pad=getConfig2().state.padding,dblPad=2*getConfig2().state.padding,orgBox=g.node().getBBox(),orgWidth=orgBox.width,orgX=orgBox.x,title=g.append("text").attr("x",0).attr("y",getConfig2().state.titleShift).attr("font-size",getConfig2().state.fontSize).attr("class","state-title").text(stateDef.id),titleWidth=title.node().getBBox().width+dblPad;let startX,width=Math.max(titleWidth,orgWidth);width===orgWidth&&(width+=dblPad);const graphBox=g.node().getBBox();stateDef.doc,startX=orgX-pad,titleWidth>orgWidth&&(startX=(orgWidth-width)/2+pad),Math.abs(orgX-graphBox.x)<pad&&titleWidth>orgWidth&&(startX=orgX-(titleWidth-orgWidth)/2);const lineY=1-getConfig2().state.textHeight;return g.insert("rect",":first-child").attr("x",startX).attr("y",lineY).attr("class",altBkg?"alt-composit":"composit").attr("width",width).attr("height",graphBox.height+getConfig2().state.textHeight+getConfig2().state.titleShift+1).attr("rx","0"),title.attr("x",startX+pad),titleWidth<=orgWidth&&title.attr("x",orgX+(width-dblPad)/2-titleWidth/2+pad),g.insert("rect",":first-child").attr("x",startX).attr("y",getConfig2().state.titleShift-getConfig2().state.textHeight-getConfig2().state.padding).attr("width",width).attr("height",3*getConfig2().state.textHeight).attr("rx",getConfig2().state.radius),g.insert("rect",":first-child").attr("x",startX).attr("y",getConfig2().state.titleShift-getConfig2().state.textHeight-getConfig2().state.padding).attr("width",width).attr("height",graphBox.height+3+2*getConfig2().state.textHeight).attr("rx",getConfig2().state.radius),g},"addTitleAndBox"),drawEndState=__name(g=>(g.append("circle").attr("class","end-state-outer").attr("r",getConfig2().state.sizeUnit+getConfig2().state.miniPadding).attr("cx",getConfig2().state.padding+getConfig2().state.sizeUnit+getConfig2().state.miniPadding).attr("cy",getConfig2().state.padding+getConfig2().state.sizeUnit+getConfig2().state.miniPadding),g.append("circle").attr("class","end-state-inner").attr("r",getConfig2().state.sizeUnit).attr("cx",getConfig2().state.padding+getConfig2().state.sizeUnit+2).attr("cy",getConfig2().state.padding+getConfig2().state.sizeUnit+2)),"drawEndState"),drawForkJoinState=__name((g,stateDef)=>{let width=getConfig2().state.forkWidth,height=getConfig2().state.forkHeight;if(stateDef.parentId){let tmp=width;width=height,height=tmp}return g.append("rect").style("stroke","black").style("fill","black").attr("width",width).attr("height",height).attr("x",getConfig2().state.padding).attr("y",getConfig2().state.padding)},"drawForkJoinState"),_drawLongText=__name((_text,x,y,g)=>{let textHeight=0;const textElem=g.append("text");textElem.style("text-anchor","start"),textElem.attr("class","noteText");let text=_text.replace(/\r\n/g,"<br/>");text=text.replace(/\n/g,"<br/>");const lines=text.split(common_default.lineBreakRegex);let tHeight=1.25*getConfig2().state.noteMargin;for(const line2 of lines){const txt=line2.trim();if(txt.length>0){const span=textElem.append("tspan");if(span.text(txt),0===tHeight){tHeight+=span.node().getBBox().height}textHeight+=tHeight,span.attr("x",x+getConfig2().state.noteMargin),span.attr("y",y+textHeight+1.25*getConfig2().state.noteMargin)}}return{textWidth:textElem.node().getBBox().width,textHeight:textHeight}},"_drawLongText"),drawNote=__name((text,g)=>{g.attr("class","state-note");const note=g.append("rect").attr("x",0).attr("y",getConfig2().state.padding),rectElem=g.append("g"),{textWidth:textWidth,textHeight:textHeight}=_drawLongText(text,0,0,rectElem);return note.attr("height",textHeight+2*getConfig2().state.noteMargin),note.attr("width",textWidth+2*getConfig2().state.noteMargin),note},"drawNote"),drawState=__name(function(elem,stateDef){const id=stateDef.id,stateInfo={id:id,label:stateDef.id,width:0,height:0},g=elem.append("g").attr("id",id).attr("class","stateGroup");"start"===stateDef.type&&drawStartState(g),"end"===stateDef.type&&drawEndState(g),"fork"!==stateDef.type&&"join"!==stateDef.type||drawForkJoinState(g,stateDef),"note"===stateDef.type&&drawNote(stateDef.note.text,g),"divider"===stateDef.type&&drawDivider(g),"default"===stateDef.type&&0===stateDef.descriptions.length&&drawSimpleState(g,stateDef),"default"===stateDef.type&&stateDef.descriptions.length>0&&drawDescrState(g,stateDef);const stateBox=g.node().getBBox();return stateInfo.width=stateBox.width+2*getConfig2().state.padding,stateInfo.height=stateBox.height+2*getConfig2().state.padding,stateInfo},"drawState"),edgeCount=0,drawEdge=__name(function(elem,path,relation){const getRelationType=__name(function(type){switch(type){case StateDB.relationType.AGGREGATION:return"aggregation";case StateDB.relationType.EXTENSION:return"extension";case StateDB.relationType.COMPOSITION:return"composition";case StateDB.relationType.DEPENDENCY:return"dependency"}},"getRelationType");path.points=path.points.filter(p=>!Number.isNaN(p.y));const lineData=path.points,lineFunction=line().x(function(d){return d.x}).y(function(d){return d.y}).curve(curveBasis),svgPath=elem.append("path").attr("d",lineFunction(lineData)).attr("id","edge"+edgeCount).attr("class","transition");let url="";if(getConfig2().state.arrowMarkerAbsolute&&(url=getUrl(!0)),svgPath.attr("marker-end","url("+url+"#"+getRelationType(StateDB.relationType.DEPENDENCY)+"End)"),void 0!==relation.title){const label=elem.append("g").attr("class","stateLabel"),{x:x,y:y}=utils_default.calcLabelPosition(path.points),rows=common_default.getRows(relation.title);let titleHeight=0;const titleRows=[];let maxWidth=0,minX=0;for(let i=0;i<=rows.length;i++){const title=label.append("text").attr("text-anchor","middle").text(rows[i]).attr("x",x).attr("y",y+titleHeight),boundsTmp=title.node().getBBox();if(maxWidth=Math.max(maxWidth,boundsTmp.width),minX=Math.min(minX,boundsTmp.x),log.info(boundsTmp.x,x,y+titleHeight),0===titleHeight){const titleBox=title.node().getBBox();titleHeight=titleBox.height,log.info("Title height",titleHeight,y)}titleRows.push(title)}let boxHeight=titleHeight*rows.length;if(rows.length>1){const heightAdj=(rows.length-1)*titleHeight*.5;titleRows.forEach((title,i)=>title.attr("y",y+i*titleHeight-heightAdj)),boxHeight=titleHeight*rows.length}const bounds=label.node().getBBox();label.insert("rect",":first-child").attr("class","box").attr("x",x-maxWidth/2-getConfig2().state.padding/2).attr("y",y-boxHeight/2-getConfig2().state.padding/2-3.5).attr("width",maxWidth+getConfig2().state.padding).attr("height",boxHeight+getConfig2().state.padding),log.info(bounds)}edgeCount++},"drawEdge"),transformationLog={},setConf=__name(function(){},"setConf"),insertMarkers=__name(function(elem){elem.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),draw=__name(function(text,id,_version,diagObj){conf=getConfig2().state;const securityLevel=getConfig2().securityLevel;let sandboxElement;"sandbox"===securityLevel&&(sandboxElement=select("#i"+id));const root=select("sandbox"===securityLevel?sandboxElement.nodes()[0].contentDocument.body:"body"),doc="sandbox"===securityLevel?sandboxElement.nodes()[0].contentDocument:document;log.debug("Rendering diagram "+text);const diagram2=root.select(`[id='${id}']`);insertMarkers(diagram2);const rootDoc=diagObj.db.getRootDoc(),rootG=diagram2.append("g").attr("id",id+"-root");renderDoc(rootDoc,rootG,void 0,!1,root,doc,diagObj);const padding=conf.padding,bounds=diagram2.node().getBBox(),width=bounds.width+2*padding,height=bounds.height+2*padding;configureSvgSize(diagram2,height,1.75*width,conf.useMaxWidth),diagram2.attr("viewBox",`${bounds.x-conf.padding} ${bounds.y-conf.padding} `+width+" "+height)},"draw"),getLabelWidth=__name(text=>text?text.length*conf.fontSizeFactor:1,"getLabelWidth"),renderDoc=__name((doc,diagram2,parentId,altBkg,root,domDocument,diagObj)=>{const graph=new Graph({compound:!0,multigraph:!0});let i,edgeFreeDoc=!0;for(i=0;i<doc.length;i++)if("relation"===doc[i].stmt){edgeFreeDoc=!1;break}parentId?graph.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:edgeFreeDoc?1:conf.edgeLengthFactor,nodeSep:edgeFreeDoc?1:50,isMultiGraph:!0}):graph.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:edgeFreeDoc?1:conf.edgeLengthFactor,nodeSep:edgeFreeDoc?1:50,ranker:"tight-tree",isMultiGraph:!0}),graph.setDefaultEdgeLabel(function(){return{}});const states=diagObj.db.getStates(),relations=diagObj.db.getRelations(),keys=Object.keys(states);for(const key of keys){const stateDef=states[key];let node;if(parentId&&(stateDef.parentId=parentId),stateDef.doc){let sub=diagram2.append("g").attr("id",stateDef.id).attr("class","stateGroup");node=renderDoc(stateDef.doc,sub,stateDef.id,!altBkg,root,domDocument,diagObj);{sub=addTitleAndBox(sub,stateDef,altBkg);let boxBounds=sub.node().getBBox();node.width=boxBounds.width,node.height=boxBounds.height+conf.padding/2,transformationLog[stateDef.id]={y:conf.compositTitleSize}}}else node=drawState(diagram2,stateDef,graph);if(stateDef.note){const noteDef={descriptions:[],id:stateDef.id+"-note",note:stateDef.note,type:"note"},note=drawState(diagram2,noteDef,graph);"left of"===stateDef.note.position?(graph.setNode(node.id+"-note",note),graph.setNode(node.id,node)):(graph.setNode(node.id,node),graph.setNode(node.id+"-note",note)),graph.setParent(node.id,node.id+"-group"),graph.setParent(node.id+"-note",node.id+"-group")}else graph.setNode(node.id,node)}log.debug("Count=",graph.nodeCount(),graph);let cnt=0;relations.forEach(function(relation){cnt++,log.debug("Setting edge",relation),graph.setEdge(relation.id1,relation.id2,{relation:relation,width:getLabelWidth(relation.title),height:conf.labelHeight*common_default.getRows(relation.title).length,labelpos:"c"},"id"+cnt)}),layout(graph),log.debug("Graph after layout",graph.nodes());const svgElem=diagram2.node();graph.nodes().forEach(function(v){if(void 0!==v&&void 0!==graph.node(v)){log.warn("Node "+v+": "+JSON.stringify(graph.node(v))),root.select("#"+svgElem.id+" #"+v).attr("transform","translate("+(graph.node(v).x-graph.node(v).width/2)+","+(graph.node(v).y+(transformationLog[v]?transformationLog[v].y:0)-graph.node(v).height/2)+" )"),root.select("#"+svgElem.id+" #"+v).attr("data-x-shift",graph.node(v).x-graph.node(v).width/2);domDocument.querySelectorAll("#"+svgElem.id+" #"+v+" .divider").forEach(divider=>{const parent=divider.parentElement;let pWidth=0,pShift=0;parent&&(parent.parentElement&&(pWidth=parent.parentElement.getBBox().width),pShift=parseInt(parent.getAttribute("data-x-shift"),10),Number.isNaN(pShift)&&(pShift=0)),divider.setAttribute("x1",0-pShift+8),divider.setAttribute("x2",pWidth-pShift-8)})}else log.debug("No Node "+v+": "+JSON.stringify(graph.node(v)))});let stateBox=svgElem.getBBox();graph.edges().forEach(function(e){void 0!==e&&void 0!==graph.edge(e)&&(log.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(graph.edge(e))),drawEdge(diagram2,graph.edge(e),graph.edge(e).relation))}),stateBox=svgElem.getBBox();const stateInfo={id:parentId||"root",label:parentId||"root",width:0,height:0};return stateInfo.width=stateBox.width+2*conf.padding,stateInfo.height=stateBox.height+2*conf.padding,log.debug("Doc rendered",stateInfo,graph),stateInfo},"renderDoc"),stateRenderer_default={setConf:setConf,draw:draw},diagram={parser:stateDiagram_default,get db(){return new StateDB(1)},renderer:stateRenderer_default,styles:styles_default,init:__name(cnf=>{cnf.state||(cnf.state={}),cnf.state.arrowMarkerAbsolute=cnf.arrowMarkerAbsolute},"init")};export{diagram};
|
package/dist/assets/{stateDiagram-v2-QKLJ7IA2-DaUpf340.js → stateDiagram-v2-QKLJ7IA2-DPlMhu-M.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as styles_default,b as stateRenderer_v3_unified_default,a as stateDiagram_default,S as StateDB}from"./chunk-OYMX7WX6-
|
|
1
|
+
import{s as styles_default,b as stateRenderer_v3_unified_default,a as stateDiagram_default,S as StateDB}from"./chunk-OYMX7WX6-CPZm7o6V.js";import{_ as __name}from"./mermaid.core-YnqOkuoS.js";import"./chunk-55IACEB6-B4fMQcTE.js";import"./chunk-EDXVE4YY-B_WylnyS.js";import"./vendor-mdxeditor-CrZ9SWce.js";import"./vendor-antd-Dq3DHFa-.js";import"./vendor-codemirror-DjMkT0sn.js";import"./vendor-markdown-BFrYfpb0.js";var diagram={parser:stateDiagram_default,get db(){return new StateDB(2)},renderer:stateRenderer_v3_unified_default,styles:styles_default,init:__name(cnf=>{cnf.state||(cnf.state={}),cnf.state.arrowMarkerAbsolute=cnf.arrowMarkerAbsolute},"init")};export{diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as __name,C as getConfig,U as isDark,V as lighten,W as darken,c as getConfig2,l as log,H as selectSvgElement,M as parseFontSize,X as setupGraphViewbox,d as select,B as __export,Y as commonDb_exports,y as clear}from"./mermaid.core-f1mZHh7u.js";import{d as d3arc}from"./arc-nTLBi2ib.js";import"./vendor-mdxeditor-BFiCaYAL.js";import"./vendor-antd-jGWxgt_-.js";import"./vendor-codemirror-9gysGjWj.js";import"./vendor-markdown-BFrYfpb0.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,11,13,14,15,17,19,20,23,24],$V1=[1,12],$V2=[1,13],$V3=[1,14],$V4=[1,15],$V5=[1,16],$V6=[1,19],$V7=[1,20],parser2={trace:__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:__name(function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 1:return $$[$0-1];case 3:yy.setDirection("LR");break;case 4:yy.setDirection("TD");break;case 5:case 9:case 10:this.$=[];break;case 6:$$[$0-1].push($$[$0]),this.$=$$[$0-1];break;case 7:case 8:this.$=$$[$0];break;case 11:yy.getCommonDb().setDiagramTitle($$[$0].substr(6)),this.$=$$[$0].substr(6);break;case 12:this.$=$$[$0].trim(),yy.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=$$[$0].trim(),yy.getCommonDb().setAccDescription(this.$);break;case 15:yy.addSection($$[$0].substr(8)),this.$=$$[$0].substr(8);break;case 18:yy.addTask($$[$0],0,""),this.$=$$[$0];break;case 19:yy.addEvent($$[$0].substr(2)),this.$=$$[$0]}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},o($V0,[2,5],{5:6}),o($V0,[2,2]),o($V0,[2,3]),o($V0,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:$V1,15:$V2,17:$V3,19:$V4,20:$V5,21:17,22:18,23:$V6,24:$V7},o($V0,[2,10],{1:[2,1]}),o($V0,[2,6]),{12:21,14:$V1,15:$V2,17:$V3,19:$V4,20:$V5,21:17,22:18,23:$V6,24:$V7},o($V0,[2,8]),o($V0,[2,9]),o($V0,[2,11]),{16:[1,22]},{18:[1,23]},o($V0,[2,14]),o($V0,[2,15]),o($V0,[2,16]),o($V0,[2,17]),o($V0,[2,18]),o($V0,[2,19]),o($V0,[2,7]),o($V0,[2,12]),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 13;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;case 10:return this.popState(),"acc_title_value";case 11:return this.begin("acc_descr"),17;case 12:return this.popState(),"acc_descr_value";case 13:this.begin("acc_descr_multiline");break;case 14:this.popState();break;case 15:return"acc_descr_multiline_value";case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/i,/^(?:timeline\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,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,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 timeline_default=parser,timelineDb_exports={};__export(timelineDb_exports,{addEvent:()=>addEvent,addSection:()=>addSection,addTask:()=>addTask,addTaskOrg:()=>addTaskOrg,clear:()=>clear2,default:()=>timelineDb_default,getCommonDb:()=>getCommonDb,getDirection:()=>getDirection,getSections:()=>getSections,getTasks:()=>getTasks,setDirection:()=>setDirection});var currentSection="",currentTaskId=0,direction="LR",sections=[],tasks=[],rawTasks=[],getCommonDb=__name(()=>commonDb_exports,"getCommonDb"),clear2=__name(function(){sections.length=0,tasks.length=0,currentSection="",rawTasks.length=0,direction="LR",clear()},"clear"),setDirection=__name(function(dir){direction=dir},"setDirection"),getDirection=__name(function(){return direction},"getDirection"),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"),addTask=__name(function(period,length,event){const rawTask={id:currentTaskId++,section:currentSection,type:currentSection,task:period,score:length||0,events:event?[event]:[]};rawTasks.push(rawTask)},"addTask"),addEvent=__name(function(event){rawTasks.find(task=>task.id===currentTaskId-1).events.push(event)},"addEvent"),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"),timelineDb_default={clear:clear2,getCommonDb:getCommonDb,getDirection:getDirection,setDirection:setDirection,addSection:addSection,getSections:getSections,getTasks:getTasks,addTask:addTask,addTaskOrg:addTaskOrg,addEvent:addEvent},nodeCount=0,drawRect=__name(function(elem,rectData){const rectElem=elem.append("rect");return rectElem.attr("x",rectData.x),rectElem.attr("y",rectData.y),rectElem.attr("fill",rectData.fill),rectElem.attr("stroke",rectData.stroke),rectElem.attr("width",rectData.width),rectElem.attr("height",rectData.height),rectElem.attr("rx",rectData.rx),rectElem.attr("ry",rectData.ry),void 0!==rectData.class&&rectElem.attr("class",rectData.class),rectElem},"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"),drawText=__name(function(elem,textData){const nText=textData.text.replace(/<br\s*\/?>/gi," "),textElem=elem.append("text");textElem.attr("x",textData.x),textElem.attr("y",textData.y),textElem.attr("class","legend"),textElem.style("text-anchor",textData.anchor),void 0!==textData.class&&textElem.attr("class",textData.class);const span=textElem.append("tspan");return span.attr("x",textData.x+2*textData.textMargin),span.text(nText),textElem},"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,drawText(elem,txtObject)},"drawLabel"),drawSection=__name(function(elem,section,conf){const g=elem.append("g"),rect=getNoteRect();rect.x=section.x,rect.y=section.y,rect.fill=section.fill,rect.width=conf.width,rect.height=conf.height,rect.class="journey-section section-type-"+section.num,rect.rx=3,rect.ry=3,drawRect(g,rect),_drawTextCandidateFunc(conf)(section.text,g,rect.x,rect.y,rect.width,rect.height,{class:"journey-section section-type-"+section.num},conf,section.colour)},"drawSection"),taskCount=-1,drawTask=__name(function(elem,task,conf,diagramId){const center=task.x+conf.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=conf.width,rect.height=conf.height,rect.class="task task-type-"+task.num,rect.rx=3,rect.ry=3,drawRect(g,rect),_drawTextCandidateFunc(conf)(task.task,g,rect.x,rect.y,rect.width,rect.height,{class:"task"},conf,task.colour)},"drawTask"),drawBackgroundRect=__name(function(elem,bounds){drawRect(elem,{x:bounds.startx,y:bounds.starty,width:bounds.stopx-bounds.startx,height:bounds.stopy-bounds.starty,fill:bounds.fill,class:"rect"}).lower()},"drawBackgroundRect"),getTextObj=__name(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),getNoteRect=__name(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),_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,conf,colour){const{taskFontSize:taskFontSize,taskFontFamily:taskFontFamily}=conf,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,conf){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,conf),_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(conf){return"fo"===conf.textPlacement?byFo:"old"===conf.textPlacement?byText:byTspan}}(),initGraphics=__name(function(graphics,id){nodeCount=0,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");function wrap(text,width){text.each(function(){var word,text2=select(this),words=text2.text().split(/(\s+|<br>)/).reverse(),line=[],y=text2.attr("y"),dy=parseFloat(text2.attr("dy")),tspan=text2.text(null).append("tspan").attr("x",0).attr("y",y).attr("dy",dy+"em");for(let j=0;j<words.length;j++)word=words[words.length-1-j],line.push(word),tspan.text(line.join(" ").trim()),(tspan.node().getComputedTextLength()>width||"<br>"===word)&&(line.pop(),tspan.text(line.join(" ").trim()),line="<br>"===word?[""]:[word],tspan=text2.append("tspan").attr("x",0).attr("y",y).attr("dy","1.1em").text(word))})}__name(wrap,"wrap");var drawNode=__name(function(elem,node,fullSection,conf,diagramId,isEvent=!1){var _a,_b,_c;const{theme:theme,look:look}=conf,isReduxTheme=null==theme?void 0:theme.includes("redux"),section=fullSection%((null==(_a=null==conf?void 0:conf.themeVariables)?void 0:_a.THEME_COLOR_LIMIT)??12)-1,nodeElem=elem.append("g");node.section=section,nodeElem.attr("class",(node.class?node.class+" ":"")+"timeline-node section-"+section);const bkgElem=nodeElem.append("g"),textElem=nodeElem.append("g"),bbox=textElem.append("text").text(node.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(wrap,node.width).node().getBBox(),fontSize=(null==(_b=conf.fontSize)?void 0:_b.replace)?conf.fontSize.replace("px",""):conf.fontSize;if(node.height=bbox.height+1.1*fontSize*.5+node.padding,node.height=Math.max(node.height,node.maxHeight),node.width=node.width+2*node.padding,textElem.attr("transform","translate("+node.width/2+", "+node.padding/2+")"),isReduxTheme&&textElem.attr("transform",`translate(${node.width/2}, ${isEvent?node.padding/2+3:node.padding})`),defaultBkg(bkgElem,node,section,diagramId,conf),"neo"===look&&(nodeElem.attr("data-look","neo"),isReduxTheme)){const isDark2=theme.includes("dark"),rootSvgNode=(null==(_c=elem.node())?void 0:_c.ownerSVGElement)??elem.node(),rootSvg=select(rootSvgNode),svgId=rootSvg.attr("id")??"",dropShadowId=svgId?`${svgId}-drop-shadow`:"drop-shadow";if(rootSvg.select(`#${dropShadowId}`).empty()){const existingDefs=rootSvg.select("defs");(existingDefs.empty()?rootSvg.append("defs"):existingDefs).append("filter").attr("id",dropShadowId).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity",isDark2?"0.2":"0.06").attr("flood-color",isDark2?"#FFFFFF":"#000000")}}return node},"drawNode"),getVirtualNodeHeight=__name(function(elem,node,conf){var _a;const textElem=elem.append("g"),bbox=textElem.append("text").text(node.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(wrap,node.width).node().getBBox(),fontSize=(null==(_a=conf.fontSize)?void 0:_a.replace)?conf.fontSize.replace("px",""):conf.fontSize;return textElem.remove(),bbox.height+1.1*fontSize*.5+node.padding},"getVirtualNodeHeight"),defaultBkg=__name(function(elem,node,section,diagramId,config){const{theme:theme}=config,r=(null==theme?void 0:theme.includes("redux"))?0:5,d=r>0?`M0 ${node.height-5} v${10-node.height} q0,-${r},${r},-${r} h${node.width-10} q${r},0,${r},${r} v${node.height-5} H0 Z`:`M0 ${node.height-5} v${-(node.height-5)} h${node.width} v${node.height} H0 Z`;elem.append("path").attr("id",diagramId+"-node-"+nodeCount++).attr("class","node-bkg node-"+node.type).attr("d",d),(null==theme?void 0:theme.includes("redux"))||elem.append("line").attr("class","node-line-"+section).attr("x1",0).attr("y1",node.height).attr("x2",node.width).attr("y2",node.height)},"defaultBkg"),svgDraw_default={drawRect:drawRect,drawCircle:drawCircle,drawSection:drawSection,drawText:drawText,drawLabel:drawLabel,drawTask:drawTask,drawBackgroundRect:drawBackgroundRect,getTextObj:getTextObj,getNoteRect:getNoteRect,initGraphics:initGraphics,drawNode:drawNode,getVirtualNodeHeight:getVirtualNodeHeight},draw=__name(function(text,id,version,diagObj){var _a,_b,_c;const conf=getConfig2(),{look:look,theme:theme,themeVariables:themeVariables}=conf,{useGradient:useGradient,gradientStart:gradientStart,gradientStop:gradientStop}=themeVariables,LEFT_MARGIN=(null==(_a=conf.timeline)?void 0:_a.leftMargin)??50;log.debug("timeline",diagObj.db);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);svg.append("g");const tasks2=diagObj.db.getTasks(),title=diagObj.db.getCommonDb().getDiagramTitle();log.debug("task",tasks2),svgDraw_default.initGraphics(svg,id);const sections2=diagObj.db.getSections();log.debug("sections",sections2);let maxSectionHeight=0,maxTaskHeight=0,depthY=0,sectionBeginY=0,masterX=50+LEFT_MARGIN,masterY=50;sectionBeginY=50;let sectionNumber=0,hasSections=!0;sections2.forEach(function(section){const sectionNode={number:sectionNumber,descr:section,section:sectionNumber,width:150,padding:20,maxHeight:maxSectionHeight},sectionHeight=svgDraw_default.getVirtualNodeHeight(svg,sectionNode,conf);log.debug("sectionHeight before draw",sectionHeight),maxSectionHeight=Math.max(maxSectionHeight,sectionHeight+20)});let maxEventCount=0,maxEventLineLength=0;log.debug("tasks.length",tasks2.length);for(const[i,task]of tasks2.entries()){const taskNode={number:i,descr:task,section:task.section,width:150,padding:20,maxHeight:maxTaskHeight},taskHeight=svgDraw_default.getVirtualNodeHeight(svg,taskNode,conf);log.debug("taskHeight before draw",taskHeight),maxTaskHeight=Math.max(maxTaskHeight,taskHeight+20),maxEventCount=Math.max(maxEventCount,task.events.length);let maxEventLineLengthTemp=0;for(const event of task.events){const eventNode={descr:event,section:task.section,number:task.section,width:150,padding:20,maxHeight:50};maxEventLineLengthTemp+=svgDraw_default.getVirtualNodeHeight(svg,eventNode,conf)}task.events.length>0&&(maxEventLineLengthTemp+=10*(task.events.length-1)),maxEventLineLength=Math.max(maxEventLineLength,maxEventLineLengthTemp)}log.debug("maxSectionHeight before draw",maxSectionHeight),log.debug("maxTaskHeight before draw",maxTaskHeight),sections2&§ions2.length>0?sections2.forEach(section=>{const tasksForSection=tasks2.filter(task=>task.section===section),sectionNode={number:sectionNumber,descr:section,section:sectionNumber,width:200*Math.max(tasksForSection.length,1)-50,padding:20,maxHeight:maxSectionHeight};log.debug("sectionNode",sectionNode);const sectionNodeWrapper=svg.append("g"),node=svgDraw_default.drawNode(sectionNodeWrapper,sectionNode,sectionNumber,conf,id);log.debug("sectionNode output",node),sectionNodeWrapper.attr("transform",`translate(${masterX}, 50)`),masterY+=maxSectionHeight+50,tasksForSection.length>0&&drawTasks(svg,tasksForSection,sectionNumber,masterX,masterY,maxTaskHeight,conf,maxEventCount,maxEventLineLength,maxSectionHeight,!1,id),masterX+=200*Math.max(tasksForSection.length,1),masterY=50,sectionNumber++}):(hasSections=!1,drawTasks(svg,tasks2,sectionNumber,masterX,masterY,maxTaskHeight,conf,maxEventCount,maxEventLineLength,maxSectionHeight,!0,id));const box=svg.node().getBBox();log.debug("bounds",box),title&&svg.append("text").text(title).attr("x","neo"===look?2*box.x+LEFT_MARGIN:box.width/2-LEFT_MARGIN).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),depthY=hasSections?maxSectionHeight+maxTaskHeight+150:maxTaskHeight+100;if(svg.append("g").attr("class","lineWrapper").append("line").attr("x1",LEFT_MARGIN).attr("y1",depthY).attr("x2",box.width+3*LEFT_MARGIN).attr("y2",depthY).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${id}-arrowhead)`),"neo"===look&&useGradient&&"neutral"!==theme){const existingDefs=svg.select("defs"),gradient=(existingDefs.empty()?svg.append("defs"):existingDefs).append("linearGradient").attr("id",svg.attr("id")+"-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)}setupGraphViewbox(void 0,svg,(null==(_b=conf.timeline)?void 0:_b.padding)??50,(null==(_c=conf.timeline)?void 0:_c.useMaxWidth)??!1)},"draw"),drawTasks=__name(function(diagram2,tasks2,sectionColor,masterX,masterY,maxTaskHeight,conf,maxEventCount,maxEventLineLength,maxSectionHeight,isWithoutSections,diagramId){var _a;for(const task of tasks2){const taskNode={descr:task.task,section:sectionColor,number:sectionColor,width:150,padding:20,maxHeight:maxTaskHeight};log.debug("taskNode",taskNode);const taskWrapper=diagram2.append("g").attr("class","taskWrapper"),taskHeight=svgDraw_default.drawNode(taskWrapper,taskNode,sectionColor,conf,diagramId).height;if(log.debug("taskHeight after draw",taskHeight),taskWrapper.attr("transform",`translate(${masterX}, ${masterY})`),maxTaskHeight=Math.max(maxTaskHeight,taskHeight),task.events){const lineWrapper=diagram2.append("g").attr("class","lineWrapper");let lineLength=maxTaskHeight;masterY+=100,lineLength+=drawEvents(diagram2,task.events,sectionColor,masterX,masterY,conf,diagramId),masterY-=100,lineWrapper.append("line").attr("x1",masterX+95).attr("y1",masterY+maxTaskHeight).attr("x2",masterX+95).attr("y2",masterY+maxTaskHeight+100+maxEventLineLength+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${diagramId}-arrowhead)`).attr("stroke-dasharray","5,5")}masterX+=200,isWithoutSections&&!(null==(_a=conf.timeline)?void 0:_a.disableMulticolor)&§ionColor++}masterY-=10},"drawTasks"),drawEvents=__name(function(diagram2,events,sectionColor,masterX,masterY,conf,diagramId){let maxEventHeight=0;const eventBeginY=masterY;masterY+=100;for(const event of events){const eventNode={descr:event,section:sectionColor,number:sectionColor,width:150,padding:20,maxHeight:50};log.debug("eventNode",eventNode);const eventWrapper=diagram2.append("g").attr("class","eventWrapper"),eventHeight=svgDraw_default.drawNode(eventWrapper,eventNode,sectionColor,conf,diagramId,!0).height;maxEventHeight+=eventHeight,eventWrapper.attr("transform",`translate(${masterX}, ${masterY})`),masterY=masterY+10+eventHeight}return masterY=eventBeginY,maxEventHeight},"drawEvents"),timelineRenderer_default={setConf:__name(()=>{},"setConf"),draw:draw},draw2=__name(function(text,id,version,diagObj){var _a,_b,_c,_d,_e;const conf=getConfig2(),LEFT_MARGIN=(null==(_a=conf.timeline)?void 0:_a.leftMargin)??50;log.debug("timeline",diagObj.db);const svg=selectSvgElement(id);svg.append("g");const tasks2=diagObj.db.getTasks(),title=diagObj.db.getCommonDb().getDiagramTitle();log.debug("task",tasks2),svgDraw_default.initGraphics(svg);const sections2=diagObj.db.getSections();log.debug("sections",sections2);let maxSectionHeight=0,maxTaskHeight=0;const masterX=50+LEFT_MARGIN;let masterY=50;const contentTopY=masterY,axisX=masterX+230;let sectionNumber=0;const hasSections=sections2&§ions2.length>0,timelineX=hasSections?axisX:masterX+230,sectionWidth=Math.max(50,580);sections2.forEach(function(section){const sectionNode={number:sectionNumber,descr:section,section:sectionNumber,width:sectionWidth,padding:5,maxHeight:maxSectionHeight},sectionHeight=svgDraw_default.getVirtualNodeHeight(svg,sectionNode,conf);log.debug("sectionHeight before draw",sectionHeight),maxSectionHeight=Math.max(maxSectionHeight,sectionHeight)});let maxEventStackHeight=0;log.debug("tasks.length",tasks2.length);for(const[i,task]of tasks2.entries()){const taskNode={number:i,descr:task,section:task.section,width:200,padding:5,maxHeight:maxTaskHeight},taskHeight=svgDraw_default.getVirtualNodeHeight(svg,taskNode,conf);log.debug("taskHeight before draw",taskHeight),maxTaskHeight=Math.max(maxTaskHeight,taskHeight);let maxEventStackHeightTemp=0;for(const event of task.events){const eventNode={descr:event,section:task.section,number:task.section,width:300,padding:5,maxHeight:50};maxEventStackHeightTemp+=svgDraw_default.getVirtualNodeHeight(svg,eventNode,conf)}task.events.length>0&&(maxEventStackHeightTemp+=10*(task.events.length-1)),maxEventStackHeight=Math.max(maxEventStackHeight,maxEventStackHeightTemp)+0}log.debug("maxSectionHeight before draw",maxSectionHeight),log.debug("maxTaskHeight before draw",maxTaskHeight);const taskSpacing=Math.max(maxTaskHeight,maxEventStackHeight)+30;hasSections?sections2.forEach(section=>{const tasksForSection=tasks2.filter(task=>task.section===section),sectionNode={number:sectionNumber,descr:section,section:sectionNumber,width:sectionWidth,padding:5,maxHeight:maxSectionHeight};log.debug("sectionNode",sectionNode);const sectionNodeWrapper=svg.append("g"),node=svgDraw_default.drawNode(sectionNodeWrapper,sectionNode,sectionNumber,conf);log.debug("sectionNode output",node);const sectionX=timelineX-230;sectionNodeWrapper.attr("transform",`translate(${sectionX}, ${masterY})`);const taskStartY=masterY+node.height+20;tasksForSection.length>0&&drawTasks2(svg,tasksForSection,sectionNumber,timelineX,taskStartY,maxTaskHeight,conf,taskSpacing,!1);const taskCount2=tasksForSection.length,sectionHeight=node.height+20+taskSpacing*Math.max(taskCount2,1)-(taskCount2>0?60:0);masterY+=sectionHeight,sectionNumber++}):drawTasks2(svg,tasks2,sectionNumber,timelineX,masterY,maxTaskHeight,conf,taskSpacing,!0);let box=null==(_b=svg.node())?void 0:_b.getBBox();if(!box)throw new Error("bbox not found");if(log.debug("bounds",box),title){if(svg.append("text").text(title).attr("x",box.width/2-LEFT_MARGIN).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),box=null==(_c=svg.node())?void 0:_c.getBBox(),!box)throw new Error("bbox not found");log.debug("bounds after title",box)}const[fontSize]=parseFontSize(conf.fontSize),arrowTopOffset=2*(fontSize??16),arrowBottomPadding=.5*(fontSize??16)+20,lineWrapper=svg.append("g").attr("class","lineWrapper");lineWrapper.append("line").attr("x1",timelineX).attr("y1",contentTopY-arrowTopOffset).attr("x2",timelineX).attr("y2",box.y+box.height+arrowBottomPadding).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),lineWrapper.lower(),setupGraphViewbox(void 0,svg,(null==(_d=conf.timeline)?void 0:_d.padding)??50,(null==(_e=conf.timeline)?void 0:_e.useMaxWidth)??!1)},"draw"),drawTasks2=__name(function(diagram2,tasks2,sectionColor,timelineX,masterY,maxTaskHeight,conf,taskSpacing,isWithoutSections){var _a;for(const task of tasks2){const taskNode={descr:task.task,section:sectionColor,number:sectionColor,width:200,padding:5,maxHeight:maxTaskHeight};log.debug("taskNode",taskNode);const taskWrapper=diagram2.append("g").attr("class","taskWrapper"),node=svgDraw_default.drawNode(taskWrapper,taskNode,sectionColor,conf),taskHeight=node.height;log.debug("taskHeight after draw",taskHeight);const taskX=timelineX-20-node.width;if(taskWrapper.attr("transform",`translate(${taskX}, ${masterY})`),maxTaskHeight=Math.max(maxTaskHeight,taskHeight),task.events&&task.events.length>0){const eventsStartY=masterY,eventsX=timelineX+50;drawEvents2(diagram2,task.events,sectionColor,timelineX,eventsX,eventsStartY,conf)}masterY+=taskSpacing,isWithoutSections&&!(null==(_a=conf.timeline)?void 0:_a.disableMulticolor)&§ionColor++}},"drawTasks"),drawEvents2=__name(function(diagram2,events,sectionColor,axisX,eventsX,startY,conf){let currentY=startY;for(const event of events){const eventNode={descr:event,section:sectionColor,number:sectionColor,width:300,padding:5,maxHeight:0};log.debug("eventNode",eventNode);const eventWrapper=diagram2.append("g").attr("class","eventWrapper"),eventHeight=svgDraw_default.drawNode(eventWrapper,eventNode,sectionColor,conf).height;eventWrapper.attr("transform",`translate(${eventsX}, ${currentY})`);const lineY=currentY+eventHeight/2;diagram2.append("g").attr("class","lineWrapper").append("line").attr("x1",axisX).attr("y1",lineY).attr("x2",eventsX).attr("y2",lineY).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),currentY=currentY+eventHeight+10}return currentY-startY},"drawEvents"),timelineRendererVertical_default={setConf:__name(()=>{},"setConf"),draw:draw2},genReduxSections=__name(options=>{var _a;const{theme:theme}=getConfig(),isDarkTheme=null==theme?void 0:theme.includes("dark"),isColorTheme=null==theme?void 0:theme.includes("color"),rawSvgId=(null==(_a=options.svgId)?void 0:_a.replace(/^#/,""))??"",scopedDropShadow=rawSvgId?`url(#${rawSvgId}-drop-shadow)`:options.dropShadow??"none";let sections2="";for(let i=0;i<options.THEME_COLOR_LIMIT;i++){const sw=""+(17-3*i),color=isColorTheme?options.borderColorArray[i]:options.mainBkg,stroke=isColorTheme?options.borderColorArray[i]:options.nodeBorder;sections2+=`\n .section-${i-1} rect,\n .section-${i-1} path,\n .section-${i-1} circle {\n fill: ${isDarkTheme&&isColorTheme?options.mainBkg:color};\n stroke: ${stroke};\n stroke-width: ${options.strokeWidth};\n filter: ${scopedDropShadow};\n }\n\n .section-${i-1} text {\n fill: ${options.nodeBorder};\n font-weight: ${options.fontWeight}\n }\n\n .node-icon-${i-1} {\n font-size: 40px;\n color: ${options["cScaleLabel"+i]};\n }\n\n .section-edge-${i-1} {\n stroke: ${options["cScale"+i]};\n }\n\n .edge-depth-${i-1} {\n stroke-width: ${sw};\n }\n\n .section-${i-1} line {\n stroke: ${options["cScaleInv"+i]};\n stroke-width: 3;\n }\n\n .lineWrapper line {\n stroke: ${options.nodeBorder};\n stroke-width:${options.strokeWidth}\n }\n\n .disabled,\n .disabled circle,\n .disabled text {\n fill: ${options.tertiaryColor??"lightgray"};\n }\n\n .disabled text {\n fill: ${options.clusterBorder??"#efefef"};\n }\n `}return sections2},"genReduxSections"),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);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} path {\n fill: ${options["cScale"+i]};\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 .lineWrapper line{\n stroke: ${options["cScaleLabel"+i]} ;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: ${options.tertiaryColor??"lightgray"};\n }\n .disabled text {\n fill: ${options.clusterBorder??"#efefef"};\n }\n `}return sections2},"genSections"),styles_default=__name(options=>{var _a;const{theme:theme}=getConfig(),isReduxTheme=null==theme?void 0:theme.includes("redux"),isNeutralTheme="neutral"===theme,rawSvgId=(null==(_a=options.svgId)?void 0:_a.replace(/^#/,""))??"";let gradientSections="";if(options.useGradient&&rawSvgId&&options.THEME_COLOR_LIMIT&&!isNeutralTheme)for(let i=0;i<options.THEME_COLOR_LIMIT;i++)gradientSections+=`\n .section-${i-1}[data-look="neo"] rect,\n .section-${i-1}[data-look="neo"] path,\n .section-${i-1}[data-look="neo"] circle {\n fill: ${options.mainBkg};\n stroke: url(#${rawSvgId}-gradient);\n stroke-width: 2;\n }\n .section-${i-1}[data-look="neo"] line {\n stroke: url(#${rawSvgId}-gradient);\n stroke-width: 2;\n }`;return`\n .edge {\n stroke-width: 3;\n }\n ${isReduxTheme?genReduxSections(options):genSections(options)}\n ${gradientSections}\n .section-root rect, .section-root path, .section-root circle {\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 .eventWrapper {\n filter: brightness(120%);\n }\n`},"getStyles"),diagram={db:timelineDb_exports,renderer:{setConf:__name(()=>{},"setConf"),draw:__name((text,id,version,diagObj)=>{var _a,_b;return"TD"===((null==(_b=null==(_a=null==diagObj?void 0:diagObj.db)?void 0:_a.getDirection)?void 0:_b.call(_a))??"LR")?timelineRendererVertical_default.draw(text,id,version,diagObj):timelineRenderer_default.draw(text,id,version,diagObj)},"draw")},parser:timeline_default,styles:styles_default};export{diagram};
|
|
1
|
+
import{_ as __name,C as getConfig,U as isDark,V as lighten,W as darken,c as getConfig2,l as log,H as selectSvgElement,M as parseFontSize,X as setupGraphViewbox,d as select,B as __export,Y as commonDb_exports,y as clear}from"./mermaid.core-YnqOkuoS.js";import{d as d3arc}from"./arc-CAB2oIHx.js";import"./vendor-mdxeditor-CrZ9SWce.js";import"./vendor-antd-Dq3DHFa-.js";import"./vendor-codemirror-DjMkT0sn.js";import"./vendor-markdown-BFrYfpb0.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,11,13,14,15,17,19,20,23,24],$V1=[1,12],$V2=[1,13],$V3=[1,14],$V4=[1,15],$V5=[1,16],$V6=[1,19],$V7=[1,20],parser2={trace:__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:__name(function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 1:return $$[$0-1];case 3:yy.setDirection("LR");break;case 4:yy.setDirection("TD");break;case 5:case 9:case 10:this.$=[];break;case 6:$$[$0-1].push($$[$0]),this.$=$$[$0-1];break;case 7:case 8:this.$=$$[$0];break;case 11:yy.getCommonDb().setDiagramTitle($$[$0].substr(6)),this.$=$$[$0].substr(6);break;case 12:this.$=$$[$0].trim(),yy.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=$$[$0].trim(),yy.getCommonDb().setAccDescription(this.$);break;case 15:yy.addSection($$[$0].substr(8)),this.$=$$[$0].substr(8);break;case 18:yy.addTask($$[$0],0,""),this.$=$$[$0];break;case 19:yy.addEvent($$[$0].substr(2)),this.$=$$[$0]}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},o($V0,[2,5],{5:6}),o($V0,[2,2]),o($V0,[2,3]),o($V0,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:$V1,15:$V2,17:$V3,19:$V4,20:$V5,21:17,22:18,23:$V6,24:$V7},o($V0,[2,10],{1:[2,1]}),o($V0,[2,6]),{12:21,14:$V1,15:$V2,17:$V3,19:$V4,20:$V5,21:17,22:18,23:$V6,24:$V7},o($V0,[2,8]),o($V0,[2,9]),o($V0,[2,11]),{16:[1,22]},{18:[1,23]},o($V0,[2,14]),o($V0,[2,15]),o($V0,[2,16]),o($V0,[2,17]),o($V0,[2,18]),o($V0,[2,19]),o($V0,[2,7]),o($V0,[2,12]),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 13;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;case 10:return this.popState(),"acc_title_value";case 11:return this.begin("acc_descr"),17;case 12:return this.popState(),"acc_descr_value";case 13:this.begin("acc_descr_multiline");break;case 14:this.popState();break;case 15:return"acc_descr_multiline_value";case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/i,/^(?:timeline\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,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,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 timeline_default=parser,timelineDb_exports={};__export(timelineDb_exports,{addEvent:()=>addEvent,addSection:()=>addSection,addTask:()=>addTask,addTaskOrg:()=>addTaskOrg,clear:()=>clear2,default:()=>timelineDb_default,getCommonDb:()=>getCommonDb,getDirection:()=>getDirection,getSections:()=>getSections,getTasks:()=>getTasks,setDirection:()=>setDirection});var currentSection="",currentTaskId=0,direction="LR",sections=[],tasks=[],rawTasks=[],getCommonDb=__name(()=>commonDb_exports,"getCommonDb"),clear2=__name(function(){sections.length=0,tasks.length=0,currentSection="",rawTasks.length=0,direction="LR",clear()},"clear"),setDirection=__name(function(dir){direction=dir},"setDirection"),getDirection=__name(function(){return direction},"getDirection"),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"),addTask=__name(function(period,length,event){const rawTask={id:currentTaskId++,section:currentSection,type:currentSection,task:period,score:length||0,events:event?[event]:[]};rawTasks.push(rawTask)},"addTask"),addEvent=__name(function(event){rawTasks.find(task=>task.id===currentTaskId-1).events.push(event)},"addEvent"),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"),timelineDb_default={clear:clear2,getCommonDb:getCommonDb,getDirection:getDirection,setDirection:setDirection,addSection:addSection,getSections:getSections,getTasks:getTasks,addTask:addTask,addTaskOrg:addTaskOrg,addEvent:addEvent},nodeCount=0,drawRect=__name(function(elem,rectData){const rectElem=elem.append("rect");return rectElem.attr("x",rectData.x),rectElem.attr("y",rectData.y),rectElem.attr("fill",rectData.fill),rectElem.attr("stroke",rectData.stroke),rectElem.attr("width",rectData.width),rectElem.attr("height",rectData.height),rectElem.attr("rx",rectData.rx),rectElem.attr("ry",rectData.ry),void 0!==rectData.class&&rectElem.attr("class",rectData.class),rectElem},"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"),drawText=__name(function(elem,textData){const nText=textData.text.replace(/<br\s*\/?>/gi," "),textElem=elem.append("text");textElem.attr("x",textData.x),textElem.attr("y",textData.y),textElem.attr("class","legend"),textElem.style("text-anchor",textData.anchor),void 0!==textData.class&&textElem.attr("class",textData.class);const span=textElem.append("tspan");return span.attr("x",textData.x+2*textData.textMargin),span.text(nText),textElem},"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,drawText(elem,txtObject)},"drawLabel"),drawSection=__name(function(elem,section,conf){const g=elem.append("g"),rect=getNoteRect();rect.x=section.x,rect.y=section.y,rect.fill=section.fill,rect.width=conf.width,rect.height=conf.height,rect.class="journey-section section-type-"+section.num,rect.rx=3,rect.ry=3,drawRect(g,rect),_drawTextCandidateFunc(conf)(section.text,g,rect.x,rect.y,rect.width,rect.height,{class:"journey-section section-type-"+section.num},conf,section.colour)},"drawSection"),taskCount=-1,drawTask=__name(function(elem,task,conf,diagramId){const center=task.x+conf.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=conf.width,rect.height=conf.height,rect.class="task task-type-"+task.num,rect.rx=3,rect.ry=3,drawRect(g,rect),_drawTextCandidateFunc(conf)(task.task,g,rect.x,rect.y,rect.width,rect.height,{class:"task"},conf,task.colour)},"drawTask"),drawBackgroundRect=__name(function(elem,bounds){drawRect(elem,{x:bounds.startx,y:bounds.starty,width:bounds.stopx-bounds.startx,height:bounds.stopy-bounds.starty,fill:bounds.fill,class:"rect"}).lower()},"drawBackgroundRect"),getTextObj=__name(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),getNoteRect=__name(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),_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,conf,colour){const{taskFontSize:taskFontSize,taskFontFamily:taskFontFamily}=conf,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,conf){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,conf),_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(conf){return"fo"===conf.textPlacement?byFo:"old"===conf.textPlacement?byText:byTspan}}(),initGraphics=__name(function(graphics,id){nodeCount=0,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");function wrap(text,width){text.each(function(){var word,text2=select(this),words=text2.text().split(/(\s+|<br>)/).reverse(),line=[],y=text2.attr("y"),dy=parseFloat(text2.attr("dy")),tspan=text2.text(null).append("tspan").attr("x",0).attr("y",y).attr("dy",dy+"em");for(let j=0;j<words.length;j++)word=words[words.length-1-j],line.push(word),tspan.text(line.join(" ").trim()),(tspan.node().getComputedTextLength()>width||"<br>"===word)&&(line.pop(),tspan.text(line.join(" ").trim()),line="<br>"===word?[""]:[word],tspan=text2.append("tspan").attr("x",0).attr("y",y).attr("dy","1.1em").text(word))})}__name(wrap,"wrap");var drawNode=__name(function(elem,node,fullSection,conf,diagramId,isEvent=!1){var _a,_b,_c;const{theme:theme,look:look}=conf,isReduxTheme=null==theme?void 0:theme.includes("redux"),section=fullSection%((null==(_a=null==conf?void 0:conf.themeVariables)?void 0:_a.THEME_COLOR_LIMIT)??12)-1,nodeElem=elem.append("g");node.section=section,nodeElem.attr("class",(node.class?node.class+" ":"")+"timeline-node section-"+section);const bkgElem=nodeElem.append("g"),textElem=nodeElem.append("g"),bbox=textElem.append("text").text(node.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(wrap,node.width).node().getBBox(),fontSize=(null==(_b=conf.fontSize)?void 0:_b.replace)?conf.fontSize.replace("px",""):conf.fontSize;if(node.height=bbox.height+1.1*fontSize*.5+node.padding,node.height=Math.max(node.height,node.maxHeight),node.width=node.width+2*node.padding,textElem.attr("transform","translate("+node.width/2+", "+node.padding/2+")"),isReduxTheme&&textElem.attr("transform",`translate(${node.width/2}, ${isEvent?node.padding/2+3:node.padding})`),defaultBkg(bkgElem,node,section,diagramId,conf),"neo"===look&&(nodeElem.attr("data-look","neo"),isReduxTheme)){const isDark2=theme.includes("dark"),rootSvgNode=(null==(_c=elem.node())?void 0:_c.ownerSVGElement)??elem.node(),rootSvg=select(rootSvgNode),svgId=rootSvg.attr("id")??"",dropShadowId=svgId?`${svgId}-drop-shadow`:"drop-shadow";if(rootSvg.select(`#${dropShadowId}`).empty()){const existingDefs=rootSvg.select("defs");(existingDefs.empty()?rootSvg.append("defs"):existingDefs).append("filter").attr("id",dropShadowId).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity",isDark2?"0.2":"0.06").attr("flood-color",isDark2?"#FFFFFF":"#000000")}}return node},"drawNode"),getVirtualNodeHeight=__name(function(elem,node,conf){var _a;const textElem=elem.append("g"),bbox=textElem.append("text").text(node.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(wrap,node.width).node().getBBox(),fontSize=(null==(_a=conf.fontSize)?void 0:_a.replace)?conf.fontSize.replace("px",""):conf.fontSize;return textElem.remove(),bbox.height+1.1*fontSize*.5+node.padding},"getVirtualNodeHeight"),defaultBkg=__name(function(elem,node,section,diagramId,config){const{theme:theme}=config,r=(null==theme?void 0:theme.includes("redux"))?0:5,d=r>0?`M0 ${node.height-5} v${10-node.height} q0,-${r},${r},-${r} h${node.width-10} q${r},0,${r},${r} v${node.height-5} H0 Z`:`M0 ${node.height-5} v${-(node.height-5)} h${node.width} v${node.height} H0 Z`;elem.append("path").attr("id",diagramId+"-node-"+nodeCount++).attr("class","node-bkg node-"+node.type).attr("d",d),(null==theme?void 0:theme.includes("redux"))||elem.append("line").attr("class","node-line-"+section).attr("x1",0).attr("y1",node.height).attr("x2",node.width).attr("y2",node.height)},"defaultBkg"),svgDraw_default={drawRect:drawRect,drawCircle:drawCircle,drawSection:drawSection,drawText:drawText,drawLabel:drawLabel,drawTask:drawTask,drawBackgroundRect:drawBackgroundRect,getTextObj:getTextObj,getNoteRect:getNoteRect,initGraphics:initGraphics,drawNode:drawNode,getVirtualNodeHeight:getVirtualNodeHeight},draw=__name(function(text,id,version,diagObj){var _a,_b,_c;const conf=getConfig2(),{look:look,theme:theme,themeVariables:themeVariables}=conf,{useGradient:useGradient,gradientStart:gradientStart,gradientStop:gradientStop}=themeVariables,LEFT_MARGIN=(null==(_a=conf.timeline)?void 0:_a.leftMargin)??50;log.debug("timeline",diagObj.db);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);svg.append("g");const tasks2=diagObj.db.getTasks(),title=diagObj.db.getCommonDb().getDiagramTitle();log.debug("task",tasks2),svgDraw_default.initGraphics(svg,id);const sections2=diagObj.db.getSections();log.debug("sections",sections2);let maxSectionHeight=0,maxTaskHeight=0,depthY=0,sectionBeginY=0,masterX=50+LEFT_MARGIN,masterY=50;sectionBeginY=50;let sectionNumber=0,hasSections=!0;sections2.forEach(function(section){const sectionNode={number:sectionNumber,descr:section,section:sectionNumber,width:150,padding:20,maxHeight:maxSectionHeight},sectionHeight=svgDraw_default.getVirtualNodeHeight(svg,sectionNode,conf);log.debug("sectionHeight before draw",sectionHeight),maxSectionHeight=Math.max(maxSectionHeight,sectionHeight+20)});let maxEventCount=0,maxEventLineLength=0;log.debug("tasks.length",tasks2.length);for(const[i,task]of tasks2.entries()){const taskNode={number:i,descr:task,section:task.section,width:150,padding:20,maxHeight:maxTaskHeight},taskHeight=svgDraw_default.getVirtualNodeHeight(svg,taskNode,conf);log.debug("taskHeight before draw",taskHeight),maxTaskHeight=Math.max(maxTaskHeight,taskHeight+20),maxEventCount=Math.max(maxEventCount,task.events.length);let maxEventLineLengthTemp=0;for(const event of task.events){const eventNode={descr:event,section:task.section,number:task.section,width:150,padding:20,maxHeight:50};maxEventLineLengthTemp+=svgDraw_default.getVirtualNodeHeight(svg,eventNode,conf)}task.events.length>0&&(maxEventLineLengthTemp+=10*(task.events.length-1)),maxEventLineLength=Math.max(maxEventLineLength,maxEventLineLengthTemp)}log.debug("maxSectionHeight before draw",maxSectionHeight),log.debug("maxTaskHeight before draw",maxTaskHeight),sections2&§ions2.length>0?sections2.forEach(section=>{const tasksForSection=tasks2.filter(task=>task.section===section),sectionNode={number:sectionNumber,descr:section,section:sectionNumber,width:200*Math.max(tasksForSection.length,1)-50,padding:20,maxHeight:maxSectionHeight};log.debug("sectionNode",sectionNode);const sectionNodeWrapper=svg.append("g"),node=svgDraw_default.drawNode(sectionNodeWrapper,sectionNode,sectionNumber,conf,id);log.debug("sectionNode output",node),sectionNodeWrapper.attr("transform",`translate(${masterX}, 50)`),masterY+=maxSectionHeight+50,tasksForSection.length>0&&drawTasks(svg,tasksForSection,sectionNumber,masterX,masterY,maxTaskHeight,conf,maxEventCount,maxEventLineLength,maxSectionHeight,!1,id),masterX+=200*Math.max(tasksForSection.length,1),masterY=50,sectionNumber++}):(hasSections=!1,drawTasks(svg,tasks2,sectionNumber,masterX,masterY,maxTaskHeight,conf,maxEventCount,maxEventLineLength,maxSectionHeight,!0,id));const box=svg.node().getBBox();log.debug("bounds",box),title&&svg.append("text").text(title).attr("x","neo"===look?2*box.x+LEFT_MARGIN:box.width/2-LEFT_MARGIN).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),depthY=hasSections?maxSectionHeight+maxTaskHeight+150:maxTaskHeight+100;if(svg.append("g").attr("class","lineWrapper").append("line").attr("x1",LEFT_MARGIN).attr("y1",depthY).attr("x2",box.width+3*LEFT_MARGIN).attr("y2",depthY).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${id}-arrowhead)`),"neo"===look&&useGradient&&"neutral"!==theme){const existingDefs=svg.select("defs"),gradient=(existingDefs.empty()?svg.append("defs"):existingDefs).append("linearGradient").attr("id",svg.attr("id")+"-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)}setupGraphViewbox(void 0,svg,(null==(_b=conf.timeline)?void 0:_b.padding)??50,(null==(_c=conf.timeline)?void 0:_c.useMaxWidth)??!1)},"draw"),drawTasks=__name(function(diagram2,tasks2,sectionColor,masterX,masterY,maxTaskHeight,conf,maxEventCount,maxEventLineLength,maxSectionHeight,isWithoutSections,diagramId){var _a;for(const task of tasks2){const taskNode={descr:task.task,section:sectionColor,number:sectionColor,width:150,padding:20,maxHeight:maxTaskHeight};log.debug("taskNode",taskNode);const taskWrapper=diagram2.append("g").attr("class","taskWrapper"),taskHeight=svgDraw_default.drawNode(taskWrapper,taskNode,sectionColor,conf,diagramId).height;if(log.debug("taskHeight after draw",taskHeight),taskWrapper.attr("transform",`translate(${masterX}, ${masterY})`),maxTaskHeight=Math.max(maxTaskHeight,taskHeight),task.events){const lineWrapper=diagram2.append("g").attr("class","lineWrapper");let lineLength=maxTaskHeight;masterY+=100,lineLength+=drawEvents(diagram2,task.events,sectionColor,masterX,masterY,conf,diagramId),masterY-=100,lineWrapper.append("line").attr("x1",masterX+95).attr("y1",masterY+maxTaskHeight).attr("x2",masterX+95).attr("y2",masterY+maxTaskHeight+100+maxEventLineLength+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${diagramId}-arrowhead)`).attr("stroke-dasharray","5,5")}masterX+=200,isWithoutSections&&!(null==(_a=conf.timeline)?void 0:_a.disableMulticolor)&§ionColor++}masterY-=10},"drawTasks"),drawEvents=__name(function(diagram2,events,sectionColor,masterX,masterY,conf,diagramId){let maxEventHeight=0;const eventBeginY=masterY;masterY+=100;for(const event of events){const eventNode={descr:event,section:sectionColor,number:sectionColor,width:150,padding:20,maxHeight:50};log.debug("eventNode",eventNode);const eventWrapper=diagram2.append("g").attr("class","eventWrapper"),eventHeight=svgDraw_default.drawNode(eventWrapper,eventNode,sectionColor,conf,diagramId,!0).height;maxEventHeight+=eventHeight,eventWrapper.attr("transform",`translate(${masterX}, ${masterY})`),masterY=masterY+10+eventHeight}return masterY=eventBeginY,maxEventHeight},"drawEvents"),timelineRenderer_default={setConf:__name(()=>{},"setConf"),draw:draw},draw2=__name(function(text,id,version,diagObj){var _a,_b,_c,_d,_e;const conf=getConfig2(),LEFT_MARGIN=(null==(_a=conf.timeline)?void 0:_a.leftMargin)??50;log.debug("timeline",diagObj.db);const svg=selectSvgElement(id);svg.append("g");const tasks2=diagObj.db.getTasks(),title=diagObj.db.getCommonDb().getDiagramTitle();log.debug("task",tasks2),svgDraw_default.initGraphics(svg);const sections2=diagObj.db.getSections();log.debug("sections",sections2);let maxSectionHeight=0,maxTaskHeight=0;const masterX=50+LEFT_MARGIN;let masterY=50;const contentTopY=masterY,axisX=masterX+230;let sectionNumber=0;const hasSections=sections2&§ions2.length>0,timelineX=hasSections?axisX:masterX+230,sectionWidth=Math.max(50,580);sections2.forEach(function(section){const sectionNode={number:sectionNumber,descr:section,section:sectionNumber,width:sectionWidth,padding:5,maxHeight:maxSectionHeight},sectionHeight=svgDraw_default.getVirtualNodeHeight(svg,sectionNode,conf);log.debug("sectionHeight before draw",sectionHeight),maxSectionHeight=Math.max(maxSectionHeight,sectionHeight)});let maxEventStackHeight=0;log.debug("tasks.length",tasks2.length);for(const[i,task]of tasks2.entries()){const taskNode={number:i,descr:task,section:task.section,width:200,padding:5,maxHeight:maxTaskHeight},taskHeight=svgDraw_default.getVirtualNodeHeight(svg,taskNode,conf);log.debug("taskHeight before draw",taskHeight),maxTaskHeight=Math.max(maxTaskHeight,taskHeight);let maxEventStackHeightTemp=0;for(const event of task.events){const eventNode={descr:event,section:task.section,number:task.section,width:300,padding:5,maxHeight:50};maxEventStackHeightTemp+=svgDraw_default.getVirtualNodeHeight(svg,eventNode,conf)}task.events.length>0&&(maxEventStackHeightTemp+=10*(task.events.length-1)),maxEventStackHeight=Math.max(maxEventStackHeight,maxEventStackHeightTemp)+0}log.debug("maxSectionHeight before draw",maxSectionHeight),log.debug("maxTaskHeight before draw",maxTaskHeight);const taskSpacing=Math.max(maxTaskHeight,maxEventStackHeight)+30;hasSections?sections2.forEach(section=>{const tasksForSection=tasks2.filter(task=>task.section===section),sectionNode={number:sectionNumber,descr:section,section:sectionNumber,width:sectionWidth,padding:5,maxHeight:maxSectionHeight};log.debug("sectionNode",sectionNode);const sectionNodeWrapper=svg.append("g"),node=svgDraw_default.drawNode(sectionNodeWrapper,sectionNode,sectionNumber,conf);log.debug("sectionNode output",node);const sectionX=timelineX-230;sectionNodeWrapper.attr("transform",`translate(${sectionX}, ${masterY})`);const taskStartY=masterY+node.height+20;tasksForSection.length>0&&drawTasks2(svg,tasksForSection,sectionNumber,timelineX,taskStartY,maxTaskHeight,conf,taskSpacing,!1);const taskCount2=tasksForSection.length,sectionHeight=node.height+20+taskSpacing*Math.max(taskCount2,1)-(taskCount2>0?60:0);masterY+=sectionHeight,sectionNumber++}):drawTasks2(svg,tasks2,sectionNumber,timelineX,masterY,maxTaskHeight,conf,taskSpacing,!0);let box=null==(_b=svg.node())?void 0:_b.getBBox();if(!box)throw new Error("bbox not found");if(log.debug("bounds",box),title){if(svg.append("text").text(title).attr("x",box.width/2-LEFT_MARGIN).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),box=null==(_c=svg.node())?void 0:_c.getBBox(),!box)throw new Error("bbox not found");log.debug("bounds after title",box)}const[fontSize]=parseFontSize(conf.fontSize),arrowTopOffset=2*(fontSize??16),arrowBottomPadding=.5*(fontSize??16)+20,lineWrapper=svg.append("g").attr("class","lineWrapper");lineWrapper.append("line").attr("x1",timelineX).attr("y1",contentTopY-arrowTopOffset).attr("x2",timelineX).attr("y2",box.y+box.height+arrowBottomPadding).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),lineWrapper.lower(),setupGraphViewbox(void 0,svg,(null==(_d=conf.timeline)?void 0:_d.padding)??50,(null==(_e=conf.timeline)?void 0:_e.useMaxWidth)??!1)},"draw"),drawTasks2=__name(function(diagram2,tasks2,sectionColor,timelineX,masterY,maxTaskHeight,conf,taskSpacing,isWithoutSections){var _a;for(const task of tasks2){const taskNode={descr:task.task,section:sectionColor,number:sectionColor,width:200,padding:5,maxHeight:maxTaskHeight};log.debug("taskNode",taskNode);const taskWrapper=diagram2.append("g").attr("class","taskWrapper"),node=svgDraw_default.drawNode(taskWrapper,taskNode,sectionColor,conf),taskHeight=node.height;log.debug("taskHeight after draw",taskHeight);const taskX=timelineX-20-node.width;if(taskWrapper.attr("transform",`translate(${taskX}, ${masterY})`),maxTaskHeight=Math.max(maxTaskHeight,taskHeight),task.events&&task.events.length>0){const eventsStartY=masterY,eventsX=timelineX+50;drawEvents2(diagram2,task.events,sectionColor,timelineX,eventsX,eventsStartY,conf)}masterY+=taskSpacing,isWithoutSections&&!(null==(_a=conf.timeline)?void 0:_a.disableMulticolor)&§ionColor++}},"drawTasks"),drawEvents2=__name(function(diagram2,events,sectionColor,axisX,eventsX,startY,conf){let currentY=startY;for(const event of events){const eventNode={descr:event,section:sectionColor,number:sectionColor,width:300,padding:5,maxHeight:0};log.debug("eventNode",eventNode);const eventWrapper=diagram2.append("g").attr("class","eventWrapper"),eventHeight=svgDraw_default.drawNode(eventWrapper,eventNode,sectionColor,conf).height;eventWrapper.attr("transform",`translate(${eventsX}, ${currentY})`);const lineY=currentY+eventHeight/2;diagram2.append("g").attr("class","lineWrapper").append("line").attr("x1",axisX).attr("y1",lineY).attr("x2",eventsX).attr("y2",lineY).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),currentY=currentY+eventHeight+10}return currentY-startY},"drawEvents"),timelineRendererVertical_default={setConf:__name(()=>{},"setConf"),draw:draw2},genReduxSections=__name(options=>{var _a;const{theme:theme}=getConfig(),isDarkTheme=null==theme?void 0:theme.includes("dark"),isColorTheme=null==theme?void 0:theme.includes("color"),rawSvgId=(null==(_a=options.svgId)?void 0:_a.replace(/^#/,""))??"",scopedDropShadow=rawSvgId?`url(#${rawSvgId}-drop-shadow)`:options.dropShadow??"none";let sections2="";for(let i=0;i<options.THEME_COLOR_LIMIT;i++){const sw=""+(17-3*i),color=isColorTheme?options.borderColorArray[i]:options.mainBkg,stroke=isColorTheme?options.borderColorArray[i]:options.nodeBorder;sections2+=`\n .section-${i-1} rect,\n .section-${i-1} path,\n .section-${i-1} circle {\n fill: ${isDarkTheme&&isColorTheme?options.mainBkg:color};\n stroke: ${stroke};\n stroke-width: ${options.strokeWidth};\n filter: ${scopedDropShadow};\n }\n\n .section-${i-1} text {\n fill: ${options.nodeBorder};\n font-weight: ${options.fontWeight}\n }\n\n .node-icon-${i-1} {\n font-size: 40px;\n color: ${options["cScaleLabel"+i]};\n }\n\n .section-edge-${i-1} {\n stroke: ${options["cScale"+i]};\n }\n\n .edge-depth-${i-1} {\n stroke-width: ${sw};\n }\n\n .section-${i-1} line {\n stroke: ${options["cScaleInv"+i]};\n stroke-width: 3;\n }\n\n .lineWrapper line {\n stroke: ${options.nodeBorder};\n stroke-width:${options.strokeWidth}\n }\n\n .disabled,\n .disabled circle,\n .disabled text {\n fill: ${options.tertiaryColor??"lightgray"};\n }\n\n .disabled text {\n fill: ${options.clusterBorder??"#efefef"};\n }\n `}return sections2},"genReduxSections"),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);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} path {\n fill: ${options["cScale"+i]};\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 .lineWrapper line{\n stroke: ${options["cScaleLabel"+i]} ;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: ${options.tertiaryColor??"lightgray"};\n }\n .disabled text {\n fill: ${options.clusterBorder??"#efefef"};\n }\n `}return sections2},"genSections"),styles_default=__name(options=>{var _a;const{theme:theme}=getConfig(),isReduxTheme=null==theme?void 0:theme.includes("redux"),isNeutralTheme="neutral"===theme,rawSvgId=(null==(_a=options.svgId)?void 0:_a.replace(/^#/,""))??"";let gradientSections="";if(options.useGradient&&rawSvgId&&options.THEME_COLOR_LIMIT&&!isNeutralTheme)for(let i=0;i<options.THEME_COLOR_LIMIT;i++)gradientSections+=`\n .section-${i-1}[data-look="neo"] rect,\n .section-${i-1}[data-look="neo"] path,\n .section-${i-1}[data-look="neo"] circle {\n fill: ${options.mainBkg};\n stroke: url(#${rawSvgId}-gradient);\n stroke-width: 2;\n }\n .section-${i-1}[data-look="neo"] line {\n stroke: url(#${rawSvgId}-gradient);\n stroke-width: 2;\n }`;return`\n .edge {\n stroke-width: 3;\n }\n ${isReduxTheme?genReduxSections(options):genSections(options)}\n ${gradientSections}\n .section-root rect, .section-root path, .section-root circle {\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 .eventWrapper {\n filter: brightness(120%);\n }\n`},"getStyles"),diagram={db:timelineDb_exports,renderer:{setConf:__name(()=>{},"setConf"),draw:__name((text,id,version,diagObj)=>{var _a,_b;return"TD"===((null==(_b=null==(_a=null==diagObj?void 0:diagObj.db)?void 0:_a.getDirection)?void 0:_b.call(_a))??"LR")?timelineRendererVertical_default.draw(text,id,version,diagObj):timelineRenderer_default.draw(text,id,version,diagObj)},"draw")},parser:timeline_default,styles:styles_default};export{diagram};
|