@nocobase/app 1.9.0-beta.9 → 2.0.0-alpha.3
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/client/1145.4029b0be.async.js +3 -0
- package/dist/client/1617.dd671a87.async.js +6 -0
- package/dist/client/1833.82373d30.async.js +6 -0
- package/dist/client/2134.1d86e440.async.js +5 -0
- package/dist/client/2190.90c718a9.async.js +3 -0
- package/dist/client/2498.be8b1194.async.js +7 -0
- package/dist/client/260.5b02a0a5.async.js +4 -0
- package/dist/client/2953.2e77d77c.async.js +24 -0
- package/dist/client/3130.7f60a040.async.js +35 -0
- package/dist/client/3170.6147bd19.async.js +24 -0
- package/dist/client/3255.e6303833.async.js +10 -0
- package/dist/client/3520.81fd6362.async.js +24 -0
- package/dist/client/3522.674f2264.async.js +4 -0
- package/dist/client/4088.0568ef31.async.js +5 -0
- package/dist/client/4205.c3eac46d.async.js +9 -0
- package/dist/client/4644.ae01f8a6.async.js +4 -0
- package/dist/client/4666.d20ff352.async.js +8 -0
- package/dist/client/4840.477401f9.async.js +8 -0
- package/dist/client/5068.72e9d750.async.js +5 -0
- package/dist/client/5087.468f5500.async.js +6 -0
- package/dist/client/5950.b83f8586.async.js +4 -0
- package/dist/client/6416.361c93ff.async.js +4 -0
- package/dist/client/6472.ac05f778.async.js +7 -0
- package/dist/client/6779.47fc1971.async.js +10 -0
- package/dist/client/6816.1ff200ac.async.js +5 -0
- package/dist/client/6996.836a3f7f.async.js +8 -0
- package/dist/client/7463.70ca58ce.async.js +20 -0
- package/dist/client/7522.1f91be5c.async.js +23 -0
- package/dist/client/7596.232a7185.async.js +10 -0
- package/dist/client/7688.85d6d7bb.async.js +4 -0
- package/dist/client/8106.829fd6b5.async.js +10 -0
- package/dist/client/816.b71d5e67.async.js +1 -0
- package/dist/client/8541.e3110aaa.async.js +8 -0
- package/dist/client/9017.28eacc5a.async.js +6 -0
- package/dist/client/937.a55819ab.async.js +5 -0
- package/dist/client/9489.25ca39a9.async.js +7 -0
- package/dist/client/9663.c04b2ad1.async.js +5 -0
- package/dist/client/9729.0d7a5c47.async.js +8 -0
- package/dist/client/9848.18f8d3db.async.js +4 -0
- package/dist/client/index.html +1 -1
- package/dist/client/index.html.tpl +1 -1
- package/dist/client/npm._at_ant-design.0bc226be.async.js +141 -0
- package/dist/client/npm._at_babel.aa6aa60c.async.js +3 -0
- package/dist/client/npm._at_codemirror.23366286.async.js +26 -0
- package/dist/client/npm._at_formily.7785699b.async.js +96 -0
- package/dist/client/npm._at_lezer.8e7184b5.async.js +2 -0
- package/dist/client/npm._at_rc-component.8d2d642c.async.js +8 -0
- package/dist/client/npm._at_umijs.47085d01.async.js +7 -0
- package/dist/client/npm.acorn.1f389fab.async.js +6 -0
- package/dist/client/npm.antd-mobile.ba8a4934.async.js +1 -0
- package/dist/client/npm.antd.acf65d87.async.js +935 -0
- package/dist/client/{npm.d3-selection.15d6ab5b.async.js → npm.d3-selection.605ec083.async.js} +1 -1
- package/dist/client/{npm.d3-transition.5fd82a9c.async.js → npm.d3-transition.1d02fe5d.async.js} +1 -1
- package/dist/client/{npm.dayjs.45ed1676.async.js → npm.dayjs.772d2a39.async.js} +1 -1
- package/dist/client/npm.dompurify.2dcd638d.async.js +2 -0
- package/dist/client/{npm.entities.8159ac3e.async.js → npm.entities.536e25f7.async.js} +1 -1
- package/dist/client/{npm.highlight.js.f727dfe3.async.js → npm.highlight.js.c1f693ec.async.js} +2 -2
- package/dist/client/{npm.htmlparser2.1a3babb6.async.js → npm.htmlparser2.a2f8d64d.async.js} +1 -1
- package/dist/client/npm.joi.0be0ffb8.async.js +1 -0
- package/dist/client/npm.lodash-es.d3d83c5d.async.js +1 -0
- package/dist/client/{npm.markdown-it.5b35f93d.async.js → npm.markdown-it.9eced26c.async.js} +1 -1
- package/dist/client/npm.mermaid.91e7e45d.async.js +1556 -0
- package/dist/client/npm.rc-cascader.641db835.async.js +4 -0
- package/dist/client/npm.rc-image.500705f3.async.js +1 -0
- package/dist/client/npm.rc-menu.623f9c7e.async.js +1 -0
- package/dist/client/npm.rc-picker.baba6981.async.js +22 -0
- package/dist/client/npm.rc-select.34fc277e.async.js +3 -0
- package/dist/client/npm.rc-slider.a10210c6.async.js +1 -0
- package/dist/client/npm.rc-table.ffbc8feb.async.js +22 -0
- package/dist/client/npm.rc-tree-select.866d1acb.async.js +5 -0
- package/dist/client/npm.rc-tree.c1d5eac5.async.js +1 -0
- package/dist/client/npm.rc-util.1c9d8b50.async.js +35 -0
- package/dist/client/{npm.react-router-dom.2109af81.async.js → npm.react-router-dom.c4482ef7.async.js} +1 -1
- package/dist/client/npm.ses.94a6543e.async.js +29 -0
- package/dist/client/npm.slate-react.ef6881ab.async.js +15 -0
- package/dist/client/npm.slate.44c32547.async.js +1 -0
- package/dist/client/npm.util.9c956416.async.js +10 -0
- package/dist/client/p__index.5eda2656.chunk.css +1 -0
- package/dist/client/p__index.ac284e3d.async.js +2316 -0
- package/dist/client/umi.aabb8b7a.js +63 -0
- package/package.json +6 -6
- package/dist/client/381.370f6149.async.js +0 -42
- package/dist/client/npm._at_ant-design.94678b5d.async.js +0 -141
- package/dist/client/npm._at_formily.f71b1c62.async.js +0 -96
- package/dist/client/npm._at_juggle.71821ece.async.js +0 -1
- package/dist/client/npm._at_rc-component.5f4cc5e2.async.js +0 -8
- package/dist/client/npm._at_umijs.7f6c4722.async.js +0 -7
- package/dist/client/npm.antd-mobile.6d2f2685.async.js +0 -1
- package/dist/client/npm.antd.a8e8f371.async.js +0 -464
- package/dist/client/npm.dompurify.2ca7a7c6.async.js +0 -3
- package/dist/client/npm.elkjs.f35a7d45.async.js +0 -26
- package/dist/client/npm.lodash-es.99877438.async.js +0 -1
- package/dist/client/npm.mermaid.b398414f.async.js +0 -1529
- package/dist/client/npm.rc-cascader.cf6ec555.async.js +0 -4
- package/dist/client/npm.rc-image.d550fa79.async.js +0 -1
- package/dist/client/npm.rc-menu.da4ef0ce.async.js +0 -1
- package/dist/client/npm.rc-picker.89eafb74.async.js +0 -22
- package/dist/client/npm.rc-select.44fb85b4.async.js +0 -3
- package/dist/client/npm.rc-slider.d2d511ab.async.js +0 -1
- package/dist/client/npm.rc-table.c5aa8a0d.async.js +0 -22
- package/dist/client/npm.rc-tree-select.5597dcbf.async.js +0 -5
- package/dist/client/npm.rc-tree.49888c60.async.js +0 -1
- package/dist/client/npm.rc-util.d5d23626.async.js +0 -18
- package/dist/client/p__index.7c1854dd.async.js +0 -1812
- package/dist/client/p__index.b3e3d810.chunk.css +0 -1
- package/dist/client/umi.639badb9.js +0 -63
|
@@ -1,1529 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[9517],{19487:function(Ro,Ys,xt){xt.d(Ys,{diagram:function(){return Xi}});var Vt=xt(46911),Je=xt(23198),_i=xt(43349),qi=xt(17295),Q=xt.n(qi),zs=xt(27484),$r=xt.n(zs),ot=xt(17967),Ot=xt(27856),fe=xt.n(Ot),le=xt(99791),Ws=xt(45625),Us=xt(46060),No=xt(91518),Dn=xt(59542),Oo=xt.n(Dn),Zs=xt(10285),In=xt.n(Zs),_s=xt(28734),Fo=xt.n(_s);const Es=(vt,zt,Wt)=>{const{parentById:Ht}=Wt,ee=new Set;let ve=vt;for(;ve;){if(ee.add(ve),ve===zt)return ve;ve=Ht[ve]}for(ve=zt;ve;){if(ee.has(ve))return ve;ve=Ht[ve]}return"root"},Hs=new(Q()),di={},ln={};let Ii={};const ts=function(vt,zt,Wt,Ht,ee,ve,He){const ce=Wt.select(`[id="${zt}"]`),fi=ce.insert("g").attr("class","nodes");return Object.keys(vt).forEach(function(me){const _e=vt[me];let zi="default";_e.classes.length>0&&(zi=_e.classes.join(" "));const vi=(0,Vt.a)(_e.styles);let Gt=_e.text!==void 0?_e.text:_e.id,$e;const Qe={width:0,height:0};if((0,Vt.e)((0,Vt.g)().flowchart.htmlLabels)){const J={label:Gt.replace(/fa[blrs]?:fa-[\w-]+/g,V=>`<i class='${V.replace(":"," ")}'></i>`)};$e=(0,_i.a)(ce,J).node();const ht=$e.getBBox();Qe.width=ht.width,Qe.height=ht.height,Qe.labelNode=$e,$e.parentNode.removeChild($e)}else{const J=Ht.createElementNS("http://www.w3.org/2000/svg","text");J.setAttribute("style",vi.labelStyle.replace("color:","fill:"));const ht=Gt.split(Vt.c.lineBreakRegex);for(const I of ht){const X=Ht.createElementNS("http://www.w3.org/2000/svg","tspan");X.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),X.setAttribute("dy","1em"),X.setAttribute("x","1"),X.textContent=I,J.appendChild(X)}$e=J;const V=$e.getBBox();Qe.width=V.width,Qe.height=V.height,Qe.labelNode=$e}const ti=[{id:_e.id+"-west",layoutOptions:{"port.side":"WEST"}},{id:_e.id+"-east",layoutOptions:{"port.side":"EAST"}},{id:_e.id+"-south",layoutOptions:{"port.side":"SOUTH"}},{id:_e.id+"-north",layoutOptions:{"port.side":"NORTH"}}];let pi=0,ze="",Wi={};switch(_e.type){case"round":pi=5,ze="rect";break;case"square":ze="rect";break;case"diamond":ze="question",Wi={portConstraints:"FIXED_SIDE"};break;case"hexagon":ze="hexagon";break;case"odd":ze="rect_left_inv_arrow";break;case"lean_right":ze="lean_right";break;case"lean_left":ze="lean_left";break;case"trapezoid":ze="trapezoid";break;case"inv_trapezoid":ze="inv_trapezoid";break;case"odd_right":ze="rect_left_inv_arrow";break;case"circle":ze="circle";break;case"ellipse":ze="ellipse";break;case"stadium":ze="stadium";break;case"subroutine":ze="subroutine";break;case"cylinder":ze="cylinder";break;case"group":ze="rect";break;case"doublecircle":ze="doublecircle";break;default:ze="rect"}const xr={labelStyle:vi.labelStyle,shape:ze,labelText:Gt,rx:pi,ry:pi,class:zi,style:vi.style,id:_e.id,link:_e.link,linkTarget:_e.linkTarget,tooltip:ee.db.getTooltip(_e.id)||"",domId:ee.db.lookUpDomId(_e.id),haveCallback:_e.haveCallback,width:_e.type==="group"?500:void 0,dir:_e.dir,type:_e.type,props:_e.props,padding:(0,Vt.g)().flowchart.padding};let kr,er;xr.type!=="group"&&(er=(0,Vt.b)(fi,xr,_e.dir),kr=er.node().getBBox());const mt={id:_e.id,ports:_e.type==="diamond"?ti:[],layoutOptions:Wi,labelText:Gt,labelData:Qe,domId:ee.db.lookUpDomId(_e.id),width:kr==null?void 0:kr.width,height:kr==null?void 0:kr.height,type:_e.type,el:er,parent:ve.parentById[_e.id]};Ii[xr.id]=mt}),He},Vi=(vt,zt,Wt)=>{const Ht={TB:{in:{north:"north"},out:{south:"west",west:"east",east:"south"}},LR:{in:{west:"west"},out:{east:"south",south:"north",north:"east"}},RL:{in:{east:"east"},out:{west:"north",north:"south",south:"west"}},BT:{in:{south:"south"},out:{north:"east",east:"west",west:"north"}}};return Ht.TD=Ht.TB,Vt.l.info("abc88",Wt,zt,vt),Ht[Wt][zt][vt]},Ei=(vt,zt,Wt)=>{if(Vt.l.info("getNextPort abc88",{node:vt,edgeDirection:zt,graphDirection:Wt}),!di[vt])switch(Wt){case"TB":case"TD":di[vt]={inPosition:"north",outPosition:"south"};break;case"BT":di[vt]={inPosition:"south",outPosition:"north"};break;case"RL":di[vt]={inPosition:"east",outPosition:"west"};break;case"LR":di[vt]={inPosition:"west",outPosition:"east"};break}const Ht=zt==="in"?di[vt].inPosition:di[vt].outPosition;return zt==="in"?di[vt].inPosition=Vi(di[vt].inPosition,zt,Wt):di[vt].outPosition=Vi(di[vt].outPosition,zt,Wt),Ht},vs=(vt,zt)=>{let Wt=vt.start,Ht=vt.end;const ee=Ii[Wt],ve=Ii[Ht];return!ee||!ve?{source:Wt,target:Ht}:(ee.type==="diamond"&&(Wt=`${Wt}-${Ei(Wt,"out",zt)}`),ve.type==="diamond"&&(Ht=`${Ht}-${Ei(Ht,"in",zt)}`),{source:Wt,target:Ht})},es=function(vt,zt,Wt,Ht){Vt.l.info("abc78 edges = ",vt);const ee=Ht.insert("g").attr("class","edgeLabels");let ve={},He=zt.db.getDirection(),ce,fi;if(vt.defaultStyle!==void 0){const ge=(0,Vt.a)(vt.defaultStyle);ce=ge.style,fi=ge.labelStyle}return vt.forEach(function(ge){var me="L-"+ge.start+"-"+ge.end;ve[me]===void 0?(ve[me]=0,Vt.l.info("abc78 new entry",me,ve[me])):(ve[me]++,Vt.l.info("abc78 new entry",me,ve[me]));let _e=me+"-"+ve[me];Vt.l.info("abc78 new link id to be used is",me,_e,ve[me]);var zi="LS-"+ge.start,vi="LE-"+ge.end;const Gt={style:"",labelStyle:""};switch(Gt.minlen=ge.length||1,ge.type==="arrow_open"?Gt.arrowhead="none":Gt.arrowhead="normal",Gt.arrowTypeStart="arrow_open",Gt.arrowTypeEnd="arrow_open",ge.type){case"double_arrow_cross":Gt.arrowTypeStart="arrow_cross";case"arrow_cross":Gt.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":Gt.arrowTypeStart="arrow_point";case"arrow_point":Gt.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":Gt.arrowTypeStart="arrow_circle";case"arrow_circle":Gt.arrowTypeEnd="arrow_circle";break}let $e="",Qe="";switch(ge.stroke){case"normal":$e="fill:none;",ce!==void 0&&($e=ce),fi!==void 0&&(Qe=fi),Gt.thickness="normal",Gt.pattern="solid";break;case"dotted":Gt.thickness="normal",Gt.pattern="dotted",Gt.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":Gt.thickness="thick",Gt.pattern="solid",Gt.style="stroke-width: 3.5px;fill:none;";break}if(ge.style!==void 0){const Wi=(0,Vt.a)(ge.style);$e=Wi.style,Qe=Wi.labelStyle}Gt.style=Gt.style+=$e,Gt.labelStyle=Gt.labelStyle+=Qe,ge.interpolate!==void 0?Gt.curve=(0,Vt.d)(ge.interpolate,Je.c_6):vt.defaultInterpolate!==void 0?Gt.curve=(0,Vt.d)(vt.defaultInterpolate,Je.c_6):Gt.curve=(0,Vt.d)(ln.curve,Je.c_6),ge.text===void 0?ge.style!==void 0&&(Gt.arrowheadStyle="fill: #333"):(Gt.arrowheadStyle="fill: #333",Gt.labelpos="c"),Gt.labelType="text",Gt.label=ge.text.replace(Vt.c.lineBreakRegex,`
|
|
2
|
-
`),ge.style===void 0&&(Gt.style=Gt.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),Gt.labelStyle=Gt.labelStyle.replace("color:","fill:"),Gt.id=_e,Gt.classes="flowchart-link "+zi+" "+vi;const ti=(0,Vt.f)(ee,Gt),{source:pi,target:ze}=vs(ge,He);Vt.l.debug("abc78 source and target",pi,ze),Wt.edges.push({id:"e"+ge.start+ge.end,sources:[pi],targets:[ze],labelEl:ti,labels:[{width:Gt.width,height:Gt.height,orgWidth:Gt.width,orgHeight:Gt.height,text:Gt.label,layoutOptions:{"edgeLabels.inline":"true","edgeLabels.placement":"CENTER"}}],edgeData:Gt})}),Wt},Gs=function(vt,zt,Wt,Ht){let ee="";switch(Ht&&(ee=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,ee=ee.replace(/\(/g,"\\("),ee=ee.replace(/\)/g,"\\)")),zt.arrowTypeStart){case"arrow_cross":vt.attr("marker-start","url("+ee+"#"+Wt+"-crossStart)");break;case"arrow_point":vt.attr("marker-start","url("+ee+"#"+Wt+"-pointStart)");break;case"arrow_barb":vt.attr("marker-start","url("+ee+"#"+Wt+"-barbStart)");break;case"arrow_circle":vt.attr("marker-start","url("+ee+"#"+Wt+"-circleStart)");break;case"aggregation":vt.attr("marker-start","url("+ee+"#"+Wt+"-aggregationStart)");break;case"extension":vt.attr("marker-start","url("+ee+"#"+Wt+"-extensionStart)");break;case"composition":vt.attr("marker-start","url("+ee+"#"+Wt+"-compositionStart)");break;case"dependency":vt.attr("marker-start","url("+ee+"#"+Wt+"-dependencyStart)");break;case"lollipop":vt.attr("marker-start","url("+ee+"#"+Wt+"-lollipopStart)");break}switch(zt.arrowTypeEnd){case"arrow_cross":vt.attr("marker-end","url("+ee+"#"+Wt+"-crossEnd)");break;case"arrow_point":vt.attr("marker-end","url("+ee+"#"+Wt+"-pointEnd)");break;case"arrow_barb":vt.attr("marker-end","url("+ee+"#"+Wt+"-barbEnd)");break;case"arrow_circle":vt.attr("marker-end","url("+ee+"#"+Wt+"-circleEnd)");break;case"aggregation":vt.attr("marker-end","url("+ee+"#"+Wt+"-aggregationEnd)");break;case"extension":vt.attr("marker-end","url("+ee+"#"+Wt+"-extensionEnd)");break;case"composition":vt.attr("marker-end","url("+ee+"#"+Wt+"-compositionEnd)");break;case"dependency":vt.attr("marker-end","url("+ee+"#"+Wt+"-dependencyEnd)");break;case"lollipop":vt.attr("marker-end","url("+ee+"#"+Wt+"-lollipopEnd)");break}},Cs=function(vt,zt){Vt.l.info("Extracting classes"),zt.db.clear("ver-2");try{return zt.parse(vt),zt.db.getClasses()}catch{return{}}},Ts=function(vt){const zt={parentById:{},childrenById:{}},Wt=vt.getSubGraphs();return Vt.l.info("Subgraphs - ",Wt),Wt.forEach(function(Ht){Ht.nodes.forEach(function(ee){zt.parentById[ee]=Ht.id,zt.childrenById[Ht.id]===void 0&&(zt.childrenById[Ht.id]=[]),zt.childrenById[Ht.id].push(ee)})}),Wt.forEach(function(Ht){Ht.id,zt.parentById[Ht.id]!==void 0&&zt.parentById[Ht.id]}),zt},Ur=function(vt,zt,Wt){const Ht=Es(vt,zt,Wt);if(Ht===void 0||Ht==="root")return{x:0,y:0};const ee=Ii[Ht].offset;return{x:ee.posX,y:ee.posY}},Ue=function(vt,zt,Wt,Ht,ee){const ve=Ur(zt.sources[0],zt.targets[0],ee),He=zt.sections[0].startPoint,ce=zt.sections[0].endPoint,ge=(zt.sections[0].bendPoints?zt.sections[0].bendPoints:[]).map(Qe=>[Qe.x+ve.x,Qe.y+ve.y]),me=[[He.x+ve.x,He.y+ve.y],...ge,[ce.x+ve.x,ce.y+ve.y]],_e=(0,Je.jvg)().curve(Je.c_6),zi=vt.insert("path").attr("d",_e(me)).attr("class","path").attr("fill","none"),vi=vt.insert("g").attr("class","edgeLabel"),Gt=(0,Je.Ys)(vi.node().appendChild(zt.labelEl)),$e=Gt.node().firstChild.getBoundingClientRect();Gt.attr("width",$e.width),Gt.attr("height",$e.height),vi.attr("transform",`translate(${zt.labels[0].x+ve.x}, ${zt.labels[0].y+ve.y})`),Gs(zi,Wt,Ht.type,Ht.arrowMarkerAbsolute)},Ss=(vt,zt)=>{vt.forEach(Wt=>{Wt.children||(Wt.children=[]);const Ht=zt.childrenById[Wt.id];Ht&&Ht.forEach(ee=>{Wt.children.push(Ii[ee])}),Ss(Wt.children,zt)})},Zr=async function(vt,zt,Wt,Ht){var ee;Ht.db.clear(),Ii={},Ht.db.setGen("gen-2"),Ht.parser.parse(vt);const ve=(0,Je.Ys)("body").append("div").attr("style","height:400px").attr("id","cy");let He={id:"root",layoutOptions:{"elk.hierarchyHandling":"INCLUDE_CHILDREN","org.eclipse.elk.padding":"[top=100, left=100, bottom=110, right=110]","elk.layered.spacing.edgeNodeBetweenLayers":"30","elk.direction":"DOWN"},children:[],edges:[]};switch(Vt.l.info("Drawing flowchart using v3 renderer",Hs),Ht.db.getDirection()){case"BT":He.layoutOptions["elk.direction"]="UP";break;case"TB":He.layoutOptions["elk.direction"]="DOWN";break;case"LR":He.layoutOptions["elk.direction"]="RIGHT";break;case"RL":He.layoutOptions["elk.direction"]="LEFT";break}const{securityLevel:fi,flowchart:ge}=(0,Vt.g)();let me;fi==="sandbox"&&(me=(0,Je.Ys)("#i"+zt));const _e=fi==="sandbox"?(0,Je.Ys)(me.nodes()[0].contentDocument.body):(0,Je.Ys)("body"),zi=fi==="sandbox"?me.nodes()[0].contentDocument:document,vi=_e.select(`[id="${zt}"]`),Gt=["point","circle","cross"];(0,Vt.i)(vi,Gt,Ht.type,Ht.arrowMarkerAbsolute);const $e=Ht.db.getVertices();let Qe;const ti=Ht.db.getSubGraphs();Vt.l.info("Subgraphs - ",ti);for(let mt=ti.length-1;mt>=0;mt--)Qe=ti[mt],Ht.db.addVertex(Qe.id,Qe.title,"group",void 0,Qe.classes,Qe.dir);const pi=vi.insert("g").attr("class","subgraphs"),ze=Ts(Ht.db);He=ts($e,zt,_e,zi,Ht,ze,He);const Wi=vi.insert("g").attr("class","edges edgePath"),xr=Ht.db.getEdges();He=es(xr,Ht,He,vi),Object.keys(Ii).forEach(mt=>{const J=Ii[mt];J.parent||He.children.push(J),ze.childrenById[mt]!==void 0&&(J.labels=[{text:J.labelText,layoutOptions:{"nodeLabels.placement":"[H_CENTER, V_TOP, INSIDE]"},width:J.labelData.width,height:J.labelData.height}],delete J.x,delete J.y,delete J.width,delete J.height)}),Ss(He.children,ze),Vt.l.info("after layout",JSON.stringify(He,null,2));const er=await Hs.layout(He);js(0,0,er.children,vi,pi,Ht,0),Vt.l.info("after layout",er),(ee=er.edges)==null||ee.map(mt=>{Ue(Wi,mt,mt.edgeData,Ht,ze)}),(0,Vt.s)({},vi,ge.diagramPadding,ge.useMaxWidth),ve.remove()},js=(vt,zt,Wt,Ht,ee,ve,He)=>{Wt.forEach(function(ce){if(ce)if(Ii[ce.id].offset={posX:ce.x+vt,posY:ce.y+zt,x:vt,y:zt,depth:He,width:ce.width,height:ce.height},ce.type==="group"){const fi=ee.insert("g").attr("class","subgraph");fi.insert("rect").attr("class","subgraph subgraph-lvl-"+He%5+" node").attr("x",ce.x+vt).attr("y",ce.y+zt).attr("width",ce.width).attr("height",ce.height);const ge=fi.insert("g").attr("class","label");ge.attr("transform",`translate(${ce.labels[0].x+vt+ce.x}, ${ce.labels[0].y+zt+ce.y})`),ge.node().appendChild(ce.labelData.labelNode),Vt.l.info("Id (UGH)= ",ce.type,ce.labels)}else Vt.l.info("Id (UGH)= ",ce.id),ce.el.attr("transform",`translate(${ce.x+vt+ce.width/2}, ${ce.y+zt+ce.height/2})`)}),Wt.forEach(function(ce){ce&&ce.type==="group"&&js(vt+ce.x,zt+ce.y,ce.children,Ht,ee,ve,He+1)})},Yi={getClasses:Cs,draw:Zr},ws=vt=>{let zt="";for(let Wt=0;Wt<5;Wt++)zt+=`
|
|
3
|
-
.subgraph-lvl-${Wt} {
|
|
4
|
-
fill: ${vt[`surface${Wt}`]};
|
|
5
|
-
stroke: ${vt[`surfacePeer${Wt}`]};
|
|
6
|
-
}
|
|
7
|
-
`;return zt},Lr=vt=>`.label {
|
|
8
|
-
font-family: ${vt.fontFamily};
|
|
9
|
-
color: ${vt.nodeTextColor||vt.textColor};
|
|
10
|
-
}
|
|
11
|
-
.cluster-label text {
|
|
12
|
-
fill: ${vt.titleColor};
|
|
13
|
-
}
|
|
14
|
-
.cluster-label span {
|
|
15
|
-
color: ${vt.titleColor};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.label text,span {
|
|
19
|
-
fill: ${vt.nodeTextColor||vt.textColor};
|
|
20
|
-
color: ${vt.nodeTextColor||vt.textColor};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.node rect,
|
|
24
|
-
.node circle,
|
|
25
|
-
.node ellipse,
|
|
26
|
-
.node polygon,
|
|
27
|
-
.node path {
|
|
28
|
-
fill: ${vt.mainBkg};
|
|
29
|
-
stroke: ${vt.nodeBorder};
|
|
30
|
-
stroke-width: 1px;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.node .label {
|
|
34
|
-
text-align: center;
|
|
35
|
-
}
|
|
36
|
-
.node.clickable {
|
|
37
|
-
cursor: pointer;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.arrowheadPath {
|
|
41
|
-
fill: ${vt.arrowheadColor};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.edgePath .path {
|
|
45
|
-
stroke: ${vt.lineColor};
|
|
46
|
-
stroke-width: 2.0px;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.flowchart-link {
|
|
50
|
-
stroke: ${vt.lineColor};
|
|
51
|
-
fill: none;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.edgeLabel {
|
|
55
|
-
background-color: ${vt.edgeLabelBackground};
|
|
56
|
-
rect {
|
|
57
|
-
opacity: 0.5;
|
|
58
|
-
background-color: ${vt.edgeLabelBackground};
|
|
59
|
-
fill: ${vt.edgeLabelBackground};
|
|
60
|
-
}
|
|
61
|
-
text-align: center;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.cluster rect {
|
|
65
|
-
fill: ${vt.clusterBkg};
|
|
66
|
-
stroke: ${vt.clusterBorder};
|
|
67
|
-
stroke-width: 1px;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.cluster text {
|
|
71
|
-
fill: ${vt.titleColor};
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.cluster span {
|
|
75
|
-
color: ${vt.titleColor};
|
|
76
|
-
}
|
|
77
|
-
/* .cluster div {
|
|
78
|
-
color: ${vt.titleColor};
|
|
79
|
-
} */
|
|
80
|
-
|
|
81
|
-
div.mermaidTooltip {
|
|
82
|
-
position: absolute;
|
|
83
|
-
text-align: center;
|
|
84
|
-
max-width: 200px;
|
|
85
|
-
padding: 2px;
|
|
86
|
-
font-family: ${vt.fontFamily};
|
|
87
|
-
font-size: 12px;
|
|
88
|
-
background: ${vt.tertiaryColor};
|
|
89
|
-
border: 1px solid ${vt.border2};
|
|
90
|
-
border-radius: 2px;
|
|
91
|
-
pointer-events: none;
|
|
92
|
-
z-index: 100;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.flowchartTitleText {
|
|
96
|
-
text-anchor: middle;
|
|
97
|
-
font-size: 18px;
|
|
98
|
-
fill: ${vt.textColor};
|
|
99
|
-
}
|
|
100
|
-
.subgraph {
|
|
101
|
-
stroke-width:2;
|
|
102
|
-
rx:3;
|
|
103
|
-
}
|
|
104
|
-
// .subgraph-lvl-1 {
|
|
105
|
-
// fill:#ccc;
|
|
106
|
-
// // stroke:black;
|
|
107
|
-
// }
|
|
108
|
-
${ws(vt)}
|
|
109
|
-
`,Xi={db:Vt.h,renderer:Yi,parser:Vt.p,styles:Lr}},46911:function(Ro,Ys,xt){xt.d(Ys,{a:function(){return as},b:function(){return ah},c:function(){return Qt},d:function(){return Er},e:function(){return Ge},f:function(){return ch},g:function(){return P},h:function(){return jy},i:function(){return q1},j:function(){return b1},k:function(){return el},l:function(){return k},m:function(){return ar},n:function(){return je},o:function(){return Sr},p:function(){return _l},s:function(){return Pn}});var Vt=xt(18464),Je=xt(27484),_i=xt.n(Je),qi=xt(17967),Q=xt(23198),zs=xt(27856),$r=xt.n(zs),ot=xt(83314),Ot=xt(44081),fe=xt(7201),le=xt(12281),Ws=xt(51117),Us=xt(42454),No="-ms-",Dn="-moz-",Oo="-webkit-",Zs="comm",In="rule",_s="decl",Fo="@page",Es="@media",Hs="@import",di="@charset",ln="@viewport",Ii="@supports",ts="@document",Vi="@namespace",Ei="@keyframes",vs="@font-face",es="@counter-style",Gs="@font-feature-values",Cs="@layer",Ts=Math.abs,Ur=String.fromCharCode,Ue=Object.assign;function Ss(t,e){return Ri(t,0)^45?(((e<<2^Ri(t,0))<<2^Ri(t,1))<<2^Ri(t,2))<<2^Ri(t,3):0}function Zr(t){return t.trim()}function js(t,e){return(t=e.exec(t))?t[0]:t}function Yi(t,e,i){return t.replace(e,i)}function ws(t,e){return t.indexOf(e)}function Ri(t,e){return t.charCodeAt(e)|0}function Lr(t,e,i){return t.slice(e,i)}function Xi(t){return t.length}function vt(t){return t.length}function zt(t,e){return e.push(t),t}function Wt(t,e){return t.map(e).join("")}function Ht(t,e){return t.filter(function(i){return!js(i,e)})}function ee(t,e){for(var i="",r=0;r<t.length;r++)i+=e(t[r],r,t,e)||"";return i}function ve(t,e,i,r){switch(t.type){case Cs:if(t.children.length)break;case Hs:case _s:return t.return=t.return||t.value;case Zs:return"";case Ei:return t.return=t.value+"{"+ee(t.children,r)+"}";case In:if(!Xi(t.value=t.props.join(",")))return""}return Xi(i=ee(t.children,r))?t.return=t.value+"{"+i+"}":""}var He=1,ce=1,fi=0,ge=0,me=0,_e="";function zi(t,e,i,r,s,n,a,o){return{value:t,root:e,parent:i,type:r,props:s,children:n,line:He,column:ce,length:a,return:"",siblings:o}}function vi(t,e){return assign(zi("",null,null,"",null,null,0,t.siblings),t,{length:-t.length},e)}function Gt(t){for(;t.root;)t=vi(t.root,{children:[t]});append(t,t.siblings)}function $e(){return me}function Qe(){return me=ge>0?Ri(_e,--ge):0,ce--,me===10&&(ce=1,He--),me}function ti(){return me=ge<fi?Ri(_e,ge++):0,ce++,me===10&&(ce=1,He++),me}function pi(){return Ri(_e,ge)}function ze(){return ge}function Wi(t,e){return Lr(_e,t,e)}function xr(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function kr(t){return He=ce=1,fi=Xi(_e=t),ge=0,[]}function er(t){return _e="",t}function mt(t){return Zr(Wi(ge-1,X(t===91?t+2:t===40?t+1:t)))}function J(t){return er(V(kr(t)))}function ht(t){for(;(me=pi())&&me<33;)ti();return xr(t)>2||xr(me)>3?"":" "}function V(t){for(;ti();)switch(xr(me)){case 0:append(ct(ge-1),t);break;case 2:append(mt(me),t);break;default:append(from(me),t)}return t}function I(t,e){for(;--e&&ti()&&!(me<48||me>102||me>57&&me<65||me>70&&me<97););return Wi(t,ze()+(e<6&&pi()==32&&ti()==32))}function X(t){for(;ti();)switch(me){case t:return ge;case 34:case 39:t!==34&&t!==39&&X(me);break;case 40:t===41&&X(t);break;case 92:ti();break}return ge}function ft(t,e){for(;ti()&&t+me!==47+10;)if(t+me===42+42&&pi()===47)break;return"/*"+Wi(e,ge-1)+"*"+Ur(t===47?t:ti())}function ct(t){for(;!xr(pi());)ti();return Wi(t,ge)}function Bt(t){return er(Yt("",null,null,null,[""],t=kr(t),0,[0],t))}function Yt(t,e,i,r,s,n,a,o,l){for(var h=0,u=0,d=a,f=0,p=0,x=0,E=1,T=1,S=1,_=0,D="",z=s,H=n,it=r,R=D;T;)switch(x=_,_=ti()){case 40:if(x!=108&&Ri(R,d-1)==58){ws(R+=Yi(mt(_),"&","&\f"),"&\f")!=-1&&(S=-1);break}case 34:case 39:case 91:R+=mt(_);break;case 9:case 10:case 13:case 32:R+=ht(x);break;case 92:R+=I(ze()-1,7);continue;case 47:switch(pi()){case 42:case 47:zt(be(ft(ti(),ze()),e,i,l),l);break;default:R+="/"}break;case 123*E:o[h++]=Xi(R)*S;case 125*E:case 59:case 0:switch(_){case 0:case 125:T=0;case 59+u:S==-1&&(R=Yi(R,/\f/g,"")),p>0&&Xi(R)-d&&zt(p>32?Se(R+";",r,i,d-1,l):Se(Yi(R," ","")+";",r,i,d-2,l),l);break;case 59:R+=";";default:if(zt(it=Ut(R,e,i,h,u,s,o,D,z=[],H=[],d,n),n),_===123)if(u===0)Yt(R,e,it,it,z,n,d,o,H);else switch(f===99&&Ri(R,3)===110?100:f){case 100:case 108:case 109:case 115:Yt(t,it,it,r&&zt(Ut(t,it,it,0,0,s,o,D,s,z=[],d,H),H),s,H,d,o,r?z:H);break;default:Yt(R,it,it,it,[""],H,0,o,H)}}h=u=p=0,E=S=1,D=R="",d=a;break;case 58:d=1+Xi(R),p=x;default:if(E<1){if(_==123)--E;else if(_==125&&E++==0&&Qe()==125)continue}switch(R+=Ur(_),_*E){case 38:S=u>0?1:(R+="\f",-1);break;case 44:o[h++]=(Xi(R)-1)*S,S=1;break;case 64:pi()===45&&(R+=mt(ti())),f=pi(),u=d=Xi(D=R+=ct(ze())),_++;break;case 45:x===45&&Xi(R)==2&&(E=0)}}return n}function Ut(t,e,i,r,s,n,a,o,l,h,u,d){for(var f=s-1,p=s===0?n:[""],x=vt(p),E=0,T=0,S=0;E<r;++E)for(var _=0,D=Lr(t,f+1,f=Ts(T=a[E])),z=t;_<x;++_)(z=Zr(T>0?p[_]+" "+D:Yi(D,/&\f/g,p[_])))&&(l[S++]=z);return zi(t,e,i,s===0?In:o,l,h,u,d)}function be(t,e,i,r){return zi(t,e,i,Zs,Ur($e()),Lr(t,2,-2),0,r)}function Se(t,e,i,r,s){return zi(t,e,i,_s,Lr(t,0,r),Lr(t,r+1,-1),r,s)}var xe=xt(99791),Be=xt(45625),pe=xt(46060),Xe=xt(95999),Mt=xt(91518),Kt=xt(96225),ie=xt(43349),ye=xt(23352),Ze=xt(22930),$t=xt(59542),Ci=xt.n($t),It=xt(10285),Rt=xt.n(It),Xt=xt(28734),he=xt.n(Xt),We=xt(79697);const Pt={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},k={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},Ae=function(t="fatal"){let e=Pt.fatal;typeof t=="string"?(t=t.toLowerCase(),t in Pt&&(e=Pt[t])):typeof t=="number"&&(e=t),k.trace=()=>{},k.debug=()=>{},k.info=()=>{},k.warn=()=>{},k.error=()=>{},k.fatal=()=>{},e<=Pt.fatal&&(k.fatal=console.error?console.error.bind(console,ai("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ai("FATAL"))),e<=Pt.error&&(k.error=console.error?console.error.bind(console,ai("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ai("ERROR"))),e<=Pt.warn&&(k.warn=console.warn?console.warn.bind(console,ai("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ai("WARN"))),e<=Pt.info&&(k.info=console.info?console.info.bind(console,ai("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ai("INFO"))),e<=Pt.debug&&(k.debug=console.debug?console.debug.bind(console,ai("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ai("DEBUG"))),e<=Pt.trace&&(k.trace=console.debug?console.debug.bind(console,ai("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ai("TRACE")))},ai=t=>`%c${_i()().format("ss.SSS")} : ${t} : `,As=t=>t?ir(t).replace(/\\n/g,"#br#").split("#br#"):[""],cn=t=>$r().sanitize(t),qs=(t,e)=>{var i;if(((i=e.flowchart)==null?void 0:i.htmlLabels)!==!1){const r=e.securityLevel;r==="antiscript"||r==="strict"?t=cn(t):r!=="loose"&&(t=ir(t),t=t.replace(/</g,"<").replace(/>/g,">"),t=t.replace(/=/g,"="),t=Ls(t))}return t},je=(t,e)=>t&&(e.dompurifyConfig?t=$r().sanitize(qs(t,e),e.dompurifyConfig).toString():t=$r().sanitize(qs(t,e),{FORBID_TAGS:["style"]}).toString(),t),Ke=(t,e)=>typeof t=="string"?je(t,e):t.flat().map(i=>je(i,e)),ei=/<br\s*\/?>/gi,is=t=>ei.test(t),_r=t=>t.split(ei),Ls=t=>t.replace(/#br#/g,"<br/>"),ir=t=>t.replace(ei,"#br#"),wi=t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},Ge=t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),ii=function(t){let e=t;if(t.split("~").length-1>=2){let i=e;do e=i,i=e.replace(/~([^\s,:;]+)~/,"<$1>");while(i!=e);return ii(i)}else return e},Qt={getRows:As,sanitizeText:je,sanitizeTextOrArray:Ke,hasBreaks:is,splitBreaks:_r,lineBreakRegex:ei,removeScript:cn,getUrl:wi,evaluate:Ge},ci=(t,e)=>e?(0,ot.Z)(t,{s:-40,l:10}):(0,ot.Z)(t,{s:-40,l:-10}),rs="#ffffff",rr="#f2f2f2";let Ea=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||(0,ot.Z)(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||(0,ot.Z)(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ci(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ci(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ci(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ci(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||(0,Ot.Z)(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||(0,Ot.Z)(this.tertiaryColor),this.lineColor=this.lineColor||(0,Ot.Z)(this.background),this.textColor=this.textColor||this.primaryTextColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,fe.Z)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,fe.Z)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||(0,Ot.Z)(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,le.Z)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||(0,ot.Z)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,ot.Z)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,ot.Z)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,ot.Z)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,ot.Z)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,ot.Z)(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||(0,ot.Z)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,ot.Z)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,ot.Z)(this.primaryColor,{h:330}),this.darkMode)for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScale"+i]=(0,fe.Z)(this["cScale"+i],75);else for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScale"+i]=(0,fe.Z)(this["cScale"+i],25);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleInv"+i]=this["cScaleInv"+i]||(0,Ot.Z)(this["cScale"+i]);for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this.darkMode?this["cScalePeer"+i]=this["cScalePeer"+i]||(0,le.Z)(this["cScale"+i],10):this["cScalePeer"+i]=this["cScalePeer"+i]||(0,fe.Z)(this["cScale"+i],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let i=0;i<this.THEME_COLOR_LIMIT;i++)this["cScaleLabel"+i]=this["cScaleLabel"+i]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let i=0;i<5;i++)this["surface"+i]=this["surface"+i]||(0,ot.Z)(this.mainBkg,{h:180,s:-15,l:e*(5+i*3)}),this["surfacePeer"+i]=this["surfacePeer"+i]||(0,ot.Z)(this.mainBkg,{h:180,s:-15,l:e*(8+i*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||(0,ot.Z)(this.primaryColor,{h:64}),this.fillType3=this.fillType3||(0,ot.Z)(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||(0,ot.Z)(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||(0,ot.Z)(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||(0,ot.Z)(this.primaryColor,{h:128}),this.fillType7=this.fillType7||(0,ot.Z)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||(0,ot.Z)(this.primaryColor,{l:-10}),this.pie5=this.pie5||(0,ot.Z)(this.secondaryColor,{l:-10}),this.pie6=this.pie6||(0,ot.Z)(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||(0,ot.Z)(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||(0,ot.Z)(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||(0,ot.Z)(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||(0,ot.Z)(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||(0,ot.Z)(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||(0,ot.Z)(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,fe.Z)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||(0,ot.Z)(this.primaryColor,{h:-30}),this.git4=this.git4||(0,ot.Z)(this.primaryColor,{h:-60}),this.git5=this.git5||(0,ot.Z)(this.primaryColor,{h:-90}),this.git6=this.git6||(0,ot.Z)(this.primaryColor,{h:60}),this.git7=this.git7||(0,ot.Z)(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,le.Z)(this.git0,25),this.git1=(0,le.Z)(this.git1,25),this.git2=(0,le.Z)(this.git2,25),this.git3=(0,le.Z)(this.git3,25),this.git4=(0,le.Z)(this.git4,25),this.git5=(0,le.Z)(this.git5,25),this.git6=(0,le.Z)(this.git6,25),this.git7=(0,le.Z)(this.git7,25)):(this.git0=(0,fe.Z)(this.git0,25),this.git1=(0,fe.Z)(this.git1,25),this.git2=(0,fe.Z)(this.git2,25),this.git3=(0,fe.Z)(this.git3,25),this.git4=(0,fe.Z)(this.git4,25),this.git5=(0,fe.Z)(this.git5,25),this.git6=(0,fe.Z)(this.git6,25),this.git7=(0,fe.Z)(this.git7,25)),this.gitInv0=this.gitInv0||(0,Ot.Z)(this.git0),this.gitInv1=this.gitInv1||(0,Ot.Z)(this.git1),this.gitInv2=this.gitInv2||(0,Ot.Z)(this.git2),this.gitInv3=this.gitInv3||(0,Ot.Z)(this.git3),this.gitInv4=this.gitInv4||(0,Ot.Z)(this.git4),this.gitInv5=this.gitInv5||(0,Ot.Z)(this.git5),this.gitInv6=this.gitInv6||(0,Ot.Z)(this.git6),this.gitInv7=this.gitInv7||(0,Ot.Z)(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||rs,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||rr}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(r=>{this[r]=e[r]}),this.updateColors(),i.forEach(r=>{this[r]=e[r]})}};const hn=t=>{const e=new Ea;return e.calculate(t),e};let Rn=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,le.Z)(this.primaryColor,16),this.tertiaryColor=(0,ot.Z)(this.primaryColor,{h:-160}),this.primaryBorderColor=(0,Ot.Z)(this.background),this.secondaryBorderColor=ci(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ci(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,Ot.Z)(this.primaryColor),this.secondaryTextColor=(0,Ot.Z)(this.secondaryColor),this.tertiaryTextColor=(0,Ot.Z)(this.tertiaryColor),this.lineColor=(0,Ot.Z)(this.background),this.textColor=(0,Ot.Z)(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,le.Z)((0,Ot.Z)("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=(0,Ws.Z)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=(0,fe.Z)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.taskBorderColor=(0,Ws.Z)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,Ws.Z)(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=(0,le.Z)(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=(0,le.Z)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=(0,le.Z)(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=(0,ot.Z)(this.primaryColor,{h:64}),this.fillType3=(0,ot.Z)(this.secondaryColor,{h:64}),this.fillType4=(0,ot.Z)(this.primaryColor,{h:-64}),this.fillType5=(0,ot.Z)(this.secondaryColor,{h:-64}),this.fillType6=(0,ot.Z)(this.primaryColor,{h:128}),this.fillType7=(0,ot.Z)(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||(0,ot.Z)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,ot.Z)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,ot.Z)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,ot.Z)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,ot.Z)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,ot.Z)(this.primaryColor,{h:210}),this.cScale9=this.cScale9||(0,ot.Z)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,ot.Z)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,ot.Z)(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||(0,Ot.Z)(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||(0,le.Z)(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||(0,ot.Z)(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this["surfacePeer"+e]=this["surfacePeer"+e]||(0,ot.Z)(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,fe.Z)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,le.Z)(this.secondaryColor,20),this.git1=(0,le.Z)(this.pie2||this.secondaryColor,20),this.git2=(0,le.Z)(this.pie3||this.tertiaryColor,20),this.git3=(0,le.Z)(this.pie4||(0,ot.Z)(this.primaryColor,{h:-30}),20),this.git4=(0,le.Z)(this.pie5||(0,ot.Z)(this.primaryColor,{h:-60}),20),this.git5=(0,le.Z)(this.pie6||(0,ot.Z)(this.primaryColor,{h:-90}),10),this.git6=(0,le.Z)(this.pie7||(0,ot.Z)(this.primaryColor,{h:60}),10),this.git7=(0,le.Z)(this.pie8||(0,ot.Z)(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||(0,Ot.Z)(this.git0),this.gitInv1=this.gitInv1||(0,Ot.Z)(this.git1),this.gitInv2=this.gitInv2||(0,Ot.Z)(this.git2),this.gitInv3=this.gitInv3||(0,Ot.Z)(this.git3),this.gitInv4=this.gitInv4||(0,Ot.Z)(this.git4),this.gitInv5=this.gitInv5||(0,Ot.Z)(this.git5),this.gitInv6=this.gitInv6||(0,Ot.Z)(this.git6),this.gitInv7=this.gitInv7||(0,Ot.Z)(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||(0,le.Z)(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||(0,le.Z)(this.background,2)}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(r=>{this[r]=e[r]}),this.updateColors(),i.forEach(r=>{this[r]=e[r]})}};const Br=t=>{const e=new Rn;return e.calculate(t),e};let sd=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=(0,ot.Z)(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=(0,ot.Z)(this.primaryColor,{h:-160}),this.primaryBorderColor=ci(this.primaryColor,this.darkMode),this.secondaryBorderColor=ci(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ci(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,Ot.Z)(this.primaryColor),this.secondaryTextColor=(0,Ot.Z)(this.secondaryColor),this.tertiaryTextColor=(0,Ot.Z)(this.tertiaryColor),this.lineColor=(0,Ot.Z)(this.background),this.textColor=(0,Ot.Z)(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=(0,Ws.Z)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||(0,ot.Z)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,ot.Z)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,ot.Z)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,ot.Z)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,ot.Z)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,ot.Z)(this.primaryColor,{h:210}),this.cScale9=this.cScale9||(0,ot.Z)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,ot.Z)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,ot.Z)(this.primaryColor,{h:330}),this["cScalePeer1"]=this["cScalePeer1"]||(0,fe.Z)(this.secondaryColor,45),this["cScalePeer2"]=this["cScalePeer2"]||(0,fe.Z)(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=(0,fe.Z)(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||(0,fe.Z)(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||(0,ot.Z)(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||(0,ot.Z)(this.mainBkg,{h:30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||(0,ot.Z)(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||(0,Ot.Z)(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||(0,Ot.Z)(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=(0,le.Z)(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=(0,ot.Z)(this.primaryColor,{h:64}),this.fillType3=(0,ot.Z)(this.secondaryColor,{h:64}),this.fillType4=(0,ot.Z)(this.primaryColor,{h:-64}),this.fillType5=(0,ot.Z)(this.secondaryColor,{h:-64}),this.fillType6=(0,ot.Z)(this.primaryColor,{h:128}),this.fillType7=(0,ot.Z)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||(0,ot.Z)(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||(0,ot.Z)(this.primaryColor,{l:-10}),this.pie5=this.pie5||(0,ot.Z)(this.secondaryColor,{l:-30}),this.pie6=this.pie6||(0,ot.Z)(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||(0,ot.Z)(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||(0,ot.Z)(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||(0,ot.Z)(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||(0,ot.Z)(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||(0,ot.Z)(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||(0,ot.Z)(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||(0,ot.Z)(this.primaryColor,{h:-30}),this.git4=this.git4||(0,ot.Z)(this.primaryColor,{h:-60}),this.git5=this.git5||(0,ot.Z)(this.primaryColor,{h:-90}),this.git6=this.git6||(0,ot.Z)(this.primaryColor,{h:60}),this.git7=this.git7||(0,ot.Z)(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,le.Z)(this.git0,25),this.git1=(0,le.Z)(this.git1,25),this.git2=(0,le.Z)(this.git2,25),this.git3=(0,le.Z)(this.git3,25),this.git4=(0,le.Z)(this.git4,25),this.git5=(0,le.Z)(this.git5,25),this.git6=(0,le.Z)(this.git6,25),this.git7=(0,le.Z)(this.git7,25)):(this.git0=(0,fe.Z)(this.git0,25),this.git1=(0,fe.Z)(this.git1,25),this.git2=(0,fe.Z)(this.git2,25),this.git3=(0,fe.Z)(this.git3,25),this.git4=(0,fe.Z)(this.git4,25),this.git5=(0,fe.Z)(this.git5,25),this.git6=(0,fe.Z)(this.git6,25),this.git7=(0,fe.Z)(this.git7,25)),this.gitInv0=this.gitInv0||(0,fe.Z)((0,Ot.Z)(this.git0),25),this.gitInv1=this.gitInv1||(0,Ot.Z)(this.git1),this.gitInv2=this.gitInv2||(0,Ot.Z)(this.git2),this.gitInv3=this.gitInv3||(0,Ot.Z)(this.git3),this.gitInv4=this.gitInv4||(0,Ot.Z)(this.git4),this.gitInv5=this.gitInv5||(0,Ot.Z)(this.git5),this.gitInv6=this.gitInv6||(0,Ot.Z)(this.git6),this.gitInv7=this.gitInv7||(0,Ot.Z)(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||(0,Ot.Z)(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||(0,Ot.Z)(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||rs,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||rr}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(r=>{this[r]=e[r]}),this.updateColors(),i.forEach(r=>{this[r]=e[r]})}};const nd=t=>{const e=new sd;return e.calculate(t),e};let ad=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=(0,le.Z)("#cde498",10),this.primaryBorderColor=ci(this.primaryColor,this.darkMode),this.secondaryBorderColor=ci(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ci(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,Ot.Z)(this.primaryColor),this.secondaryTextColor=(0,Ot.Z)(this.secondaryColor),this.tertiaryTextColor=(0,Ot.Z)(this.primaryColor),this.lineColor=(0,Ot.Z)(this.background),this.textColor=(0,Ot.Z)(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||(0,ot.Z)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,ot.Z)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,ot.Z)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,ot.Z)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,ot.Z)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,ot.Z)(this.primaryColor,{h:210}),this.cScale9=this.cScale9||(0,ot.Z)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,ot.Z)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,ot.Z)(this.primaryColor,{h:330}),this["cScalePeer1"]=this["cScalePeer1"]||(0,fe.Z)(this.secondaryColor,45),this["cScalePeer2"]=this["cScalePeer2"]||(0,fe.Z)(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=(0,fe.Z)(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||(0,fe.Z)(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||(0,ot.Z)(this["cScale"+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||(0,ot.Z)(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||(0,ot.Z)(this.mainBkg,{h:30,s:-30,l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.actorBorder=(0,fe.Z)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=(0,ot.Z)(this.primaryColor,{h:64}),this.fillType3=(0,ot.Z)(this.secondaryColor,{h:64}),this.fillType4=(0,ot.Z)(this.primaryColor,{h:-64}),this.fillType5=(0,ot.Z)(this.secondaryColor,{h:-64}),this.fillType6=(0,ot.Z)(this.primaryColor,{h:128}),this.fillType7=(0,ot.Z)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||(0,ot.Z)(this.primaryColor,{l:-30}),this.pie5=this.pie5||(0,ot.Z)(this.secondaryColor,{l:-30}),this.pie6=this.pie6||(0,ot.Z)(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||(0,ot.Z)(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||(0,ot.Z)(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||(0,ot.Z)(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||(0,ot.Z)(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||(0,ot.Z)(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||(0,ot.Z)(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||(0,ot.Z)(this.primaryColor,{h:-30}),this.git4=this.git4||(0,ot.Z)(this.primaryColor,{h:-60}),this.git5=this.git5||(0,ot.Z)(this.primaryColor,{h:-90}),this.git6=this.git6||(0,ot.Z)(this.primaryColor,{h:60}),this.git7=this.git7||(0,ot.Z)(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,le.Z)(this.git0,25),this.git1=(0,le.Z)(this.git1,25),this.git2=(0,le.Z)(this.git2,25),this.git3=(0,le.Z)(this.git3,25),this.git4=(0,le.Z)(this.git4,25),this.git5=(0,le.Z)(this.git5,25),this.git6=(0,le.Z)(this.git6,25),this.git7=(0,le.Z)(this.git7,25)):(this.git0=(0,fe.Z)(this.git0,25),this.git1=(0,fe.Z)(this.git1,25),this.git2=(0,fe.Z)(this.git2,25),this.git3=(0,fe.Z)(this.git3,25),this.git4=(0,fe.Z)(this.git4,25),this.git5=(0,fe.Z)(this.git5,25),this.git6=(0,fe.Z)(this.git6,25),this.git7=(0,fe.Z)(this.git7,25)),this.gitInv0=this.gitInv0||(0,Ot.Z)(this.git0),this.gitInv1=this.gitInv1||(0,Ot.Z)(this.git1),this.gitInv2=this.gitInv2||(0,Ot.Z)(this.git2),this.gitInv3=this.gitInv3||(0,Ot.Z)(this.git3),this.gitInv4=this.gitInv4||(0,Ot.Z)(this.git4),this.gitInv5=this.gitInv5||(0,Ot.Z)(this.git5),this.gitInv6=this.gitInv6||(0,Ot.Z)(this.git6),this.gitInv7=this.gitInv7||(0,Ot.Z)(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||rs,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||rr}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(r=>{this[r]=e[r]}),this.updateColors(),i.forEach(r=>{this[r]=e[r]})}};const od=t=>{const e=new ad;return e.calculate(t),e};class ld{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,le.Z)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=(0,ot.Z)(this.primaryColor,{h:-160}),this.primaryBorderColor=ci(this.primaryColor,this.darkMode),this.secondaryBorderColor=ci(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ci(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,Ot.Z)(this.primaryColor),this.secondaryTextColor=(0,Ot.Z)(this.secondaryColor),this.tertiaryTextColor=(0,Ot.Z)(this.tertiaryColor),this.lineColor=(0,Ot.Z)(this.background),this.textColor=(0,Ot.Z)(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=(0,le.Z)(this.contrast,55),this.border2=this.contrast,this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||(0,Ot.Z)(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||(0,le.Z)(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||(0,fe.Z)(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||(0,ot.Z)(this.mainBkg,{l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||(0,ot.Z)(this.mainBkg,{l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.actorBorder=(0,le.Z)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.sectionBkgColor=(0,le.Z)(this.contrast,30),this.sectionBkgColor2=(0,le.Z)(this.contrast,30),this.taskBorderColor=(0,fe.Z)(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=(0,le.Z)(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=(0,fe.Z)(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=(0,ot.Z)(this.primaryColor,{h:64}),this.fillType3=(0,ot.Z)(this.secondaryColor,{h:64}),this.fillType4=(0,ot.Z)(this.primaryColor,{h:-64}),this.fillType5=(0,ot.Z)(this.secondaryColor,{h:-64}),this.fillType6=(0,ot.Z)(this.primaryColor,{h:128}),this.fillType7=(0,ot.Z)(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,fe.Z)(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||(0,ot.Z)(this.primaryColor,{h:-30}),this.git4=this.pie5||(0,ot.Z)(this.primaryColor,{h:-60}),this.git5=this.pie6||(0,ot.Z)(this.primaryColor,{h:-90}),this.git6=this.pie7||(0,ot.Z)(this.primaryColor,{h:60}),this.git7=this.pie8||(0,ot.Z)(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||(0,Ot.Z)(this.git0),this.gitInv1=this.gitInv1||(0,Ot.Z)(this.git1),this.gitInv2=this.gitInv2||(0,Ot.Z)(this.git2),this.gitInv3=this.gitInv3||(0,Ot.Z)(this.git3),this.gitInv4=this.gitInv4||(0,Ot.Z)(this.git4),this.gitInv5=this.gitInv5||(0,Ot.Z)(this.git5),this.gitInv6=this.gitInv6||(0,Ot.Z)(this.git6),this.gitInv7=this.gitInv7||(0,Ot.Z)(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||rs,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||rr}calculate(e){if(typeof e!="object"){this.updateColors();return}const i=Object.keys(e);i.forEach(r=>{this[r]=e[r]}),this.updateColors(),i.forEach(r=>{this[r]=e[r]})}}const ss={base:{getThemeVariables:hn},dark:{getThemeVariables:Br},default:{getThemeVariables:nd},forest:{getThemeVariables:od},neutral:{getThemeVariables:t=>{const e=new ld;return e.calculate(t),e}}},Bs={theme:"default",themeVariables:ss.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,deterministicIDSeed:void 0,flowchart:{titleTopMargin:25,diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},sequence:{hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",tickInterval:void 0,useMaxWidth:!0,topAxis:!1,useWidth:void 0},journey:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},timeline:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},class:{titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},state:{titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},er:{titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0},pie:{useWidth:void 0,useMaxWidth:!0},requirement:{useWidth:void 0,useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},gitGraph:{titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0},c4:{useWidth:void 0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,useMaxWidth:!0,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},fontSize:16};Bs.class&&(Bs.class.arrowMarkerAbsolute=Bs.arrowMarkerAbsolute),Bs.gitGraph&&(Bs.gitGraph.arrowMarkerAbsolute=Bs.arrowMarkerAbsolute);const Ac=(t,e="")=>Object.keys(t).reduce((i,r)=>Array.isArray(t[r])?i:typeof t[r]=="object"&&t[r]!==null?[...i,e+r,...Ac(t[r],"")]:[...i,e+r],[]),cd=Ac(Bs,""),hd=Bs;function Lc(t){return typeof t>"u"||t===null}function ud(t){return typeof t=="object"&&t!==null}function dd(t){return Array.isArray(t)?t:Lc(t)?[]:[t]}function fd(t,e){var i,r,s,n;if(e)for(n=Object.keys(e),i=0,r=n.length;i<r;i+=1)s=n[i],t[s]=e[s];return t}function pd(t,e){var i="",r;for(r=0;r<e;r+=1)i+=t;return i}function gd(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var yd=Lc,md=ud,bd=dd,xd=pd,kd=gd,_d=fd,Ki={isNothing:yd,isObject:md,toArray:bd,repeat:xd,isNegativeZero:kd,extend:_d};function Bc(t,e){var i="",r=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(i+='in "'+t.mark.name+'" '),i+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(i+=`
|
|
110
|
-
|
|
111
|
-
`+t.mark.snippet),r+" "+i):r}function Nn(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=Bc(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Nn.prototype=Object.create(Error.prototype),Nn.prototype.constructor=Nn,Nn.prototype.toString=function(e){return this.name+": "+Bc(this,e)};var ns=Nn;function Mo(t,e,i,r,s){var n="",a="",o=Math.floor(s/2)-1;return r-e>o&&(n=" ... ",e=r-o+n.length),i-r>o&&(a=" ...",i=r+o-a.length),{str:n+t.slice(e,i).replace(/\t/g,"\u2192")+a,pos:r-e+n.length}}function Po(t,e){return Ki.repeat(" ",e-t.length)+t}function Ed(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var i=/\r?\n|\r|\0/g,r=[0],s=[],n,a=-1;n=i.exec(t.buffer);)s.push(n.index),r.push(n.index+n[0].length),t.position<=n.index&&a<0&&(a=r.length-2);a<0&&(a=r.length-1);var o="",l,h,u=Math.min(t.line+e.linesAfter,s.length).toString().length,d=e.maxLength-(e.indent+u+3);for(l=1;l<=e.linesBefore&&!(a-l<0);l++)h=Mo(t.buffer,r[a-l],s[a-l],t.position-(r[a]-r[a-l]),d),o=Ki.repeat(" ",e.indent)+Po((t.line-l+1).toString(),u)+" | "+h.str+`
|
|
112
|
-
`+o;for(h=Mo(t.buffer,r[a],s[a],t.position,d),o+=Ki.repeat(" ",e.indent)+Po((t.line+1).toString(),u)+" | "+h.str+`
|
|
113
|
-
`,o+=Ki.repeat("-",e.indent+u+3+h.pos)+`^
|
|
114
|
-
`,l=1;l<=e.linesAfter&&!(a+l>=s.length);l++)h=Mo(t.buffer,r[a+l],s[a+l],t.position-(r[a]-r[a+l]),d),o+=Ki.repeat(" ",e.indent)+Po((t.line+l+1).toString(),u)+" | "+h.str+`
|
|
115
|
-
`;return o.replace(/\n$/,"")}var vd=Ed,Cd=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Td=["scalar","sequence","mapping"];function Sd(t){var e={};return t!==null&&Object.keys(t).forEach(function(i){t[i].forEach(function(r){e[String(r)]=i})}),e}function wd(t,e){if(e=e||{},Object.keys(e).forEach(function(i){if(Cd.indexOf(i)===-1)throw new ns('Unknown option "'+i+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(i){return i},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=Sd(e.styleAliases||null),Td.indexOf(this.kind)===-1)throw new ns('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var Ui=wd;function Dc(t,e){var i=[];return t[e].forEach(function(r){var s=i.length;i.forEach(function(n,a){n.tag===r.tag&&n.kind===r.kind&&n.multi===r.multi&&(s=a)}),i[s]=r}),i}function Ad(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,i;function r(s){s.multi?(t.multi[s.kind].push(s),t.multi.fallback.push(s)):t[s.kind][s.tag]=t.fallback[s.tag]=s}for(e=0,i=arguments.length;e<i;e+=1)arguments[e].forEach(r);return t}function Vo(t){return this.extend(t)}Vo.prototype.extend=function(e){var i=[],r=[];if(e instanceof Ui)r.push(e);else if(Array.isArray(e))r=r.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(i=i.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit));else throw new ns("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(n){if(!(n instanceof Ui))throw new ns("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(n.loadKind&&n.loadKind!=="scalar")throw new ns("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(n.multi)throw new ns("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(n){if(!(n instanceof Ui))throw new ns("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(Vo.prototype);return s.implicit=(this.implicit||[]).concat(i),s.explicit=(this.explicit||[]).concat(r),s.compiledImplicit=Dc(s,"implicit"),s.compiledExplicit=Dc(s,"explicit"),s.compiledTypeMap=Ad(s.compiledImplicit,s.compiledExplicit),s};var Ld=Vo,Bd=new Ui("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),Dd=new Ui("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),Id=new Ui("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),Ic=new Ld({explicit:[Bd,Dd,Id]});function Rd(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function Nd(){return null}function Od(t){return t===null}var Fd=new Ui("tag:yaml.org,2002:null",{kind:"scalar",resolve:Rd,construct:Nd,predicate:Od,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function Md(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function Pd(t){return t==="true"||t==="True"||t==="TRUE"}function Vd(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var Yd=new Ui("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Md,construct:Pd,predicate:Vd,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function zd(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function Wd(t){return 48<=t&&t<=55}function Ud(t){return 48<=t&&t<=57}function Zd(t){if(t===null)return!1;var e=t.length,i=0,r=!1,s;if(!e)return!1;if(s=t[i],(s==="-"||s==="+")&&(s=t[++i]),s==="0"){if(i+1===e)return!0;if(s=t[++i],s==="b"){for(i++;i<e;i++)if(s=t[i],s!=="_"){if(s!=="0"&&s!=="1")return!1;r=!0}return r&&s!=="_"}if(s==="x"){for(i++;i<e;i++)if(s=t[i],s!=="_"){if(!zd(t.charCodeAt(i)))return!1;r=!0}return r&&s!=="_"}if(s==="o"){for(i++;i<e;i++)if(s=t[i],s!=="_"){if(!Wd(t.charCodeAt(i)))return!1;r=!0}return r&&s!=="_"}}if(s==="_")return!1;for(;i<e;i++)if(s=t[i],s!=="_"){if(!Ud(t.charCodeAt(i)))return!1;r=!0}return!(!r||s==="_")}function Hd(t){var e=t,i=1,r;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),r=e[0],(r==="-"||r==="+")&&(r==="-"&&(i=-1),e=e.slice(1),r=e[0]),e==="0")return 0;if(r==="0"){if(e[1]==="b")return i*parseInt(e.slice(2),2);if(e[1]==="x")return i*parseInt(e.slice(2),16);if(e[1]==="o")return i*parseInt(e.slice(2),8)}return i*parseInt(e,10)}function Gd(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!Ki.isNegativeZero(t)}var jd=new Ui("tag:yaml.org,2002:int",{kind:"scalar",resolve:Zd,construct:Hd,predicate:Gd,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),qd=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Xd(t){return!(t===null||!qd.test(t)||t[t.length-1]==="_")}function Kd(t){var e,i;return e=t.replace(/_/g,"").toLowerCase(),i=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:i*parseFloat(e,10)}var Qd=/^[-+]?[0-9]+e/;function Jd(t,e){var i;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ki.isNegativeZero(t))return"-0.0";return i=t.toString(10),Qd.test(i)?i.replace("e",".e"):i}function $d(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Ki.isNegativeZero(t))}var t2=new Ui("tag:yaml.org,2002:float",{kind:"scalar",resolve:Xd,construct:Kd,predicate:$d,represent:Jd,defaultStyle:"lowercase"}),e2=Ic.extend({implicit:[Fd,Yd,jd,t2]}),i2=e2,Rc=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Nc=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function r2(t){return t===null?!1:Rc.exec(t)!==null||Nc.exec(t)!==null}function s2(t){var e,i,r,s,n,a,o,l=0,h=null,u,d,f;if(e=Rc.exec(t),e===null&&(e=Nc.exec(t)),e===null)throw new Error("Date resolve error");if(i=+e[1],r=+e[2]-1,s=+e[3],!e[4])return new Date(Date.UTC(i,r,s));if(n=+e[4],a=+e[5],o=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(u=+e[10],d=+(e[11]||0),h=(u*60+d)*6e4,e[9]==="-"&&(h=-h)),f=new Date(Date.UTC(i,r,s,n,a,o,l)),h&&f.setTime(f.getTime()-h),f}function n2(t){return t.toISOString()}var a2=new Ui("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r2,construct:s2,instanceOf:Date,represent:n2});function o2(t){return t==="<<"||t===null}var l2=new Ui("tag:yaml.org,2002:merge",{kind:"scalar",resolve:o2}),Yo=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
116
|
-
\r`;function c2(t){if(t===null)return!1;var e,i,r=0,s=t.length,n=Yo;for(i=0;i<s;i++)if(e=n.indexOf(t.charAt(i)),!(e>64)){if(e<0)return!1;r+=6}return r%8===0}function h2(t){var e,i,r=t.replace(/[\r\n=]/g,""),s=r.length,n=Yo,a=0,o=[];for(e=0;e<s;e++)e%4===0&&e&&(o.push(a>>16&255),o.push(a>>8&255),o.push(a&255)),a=a<<6|n.indexOf(r.charAt(e));return i=s%4*6,i===0?(o.push(a>>16&255),o.push(a>>8&255),o.push(a&255)):i===18?(o.push(a>>10&255),o.push(a>>2&255)):i===12&&o.push(a>>4&255),new Uint8Array(o)}function u2(t){var e="",i=0,r,s,n=t.length,a=Yo;for(r=0;r<n;r++)r%3===0&&r&&(e+=a[i>>18&63],e+=a[i>>12&63],e+=a[i>>6&63],e+=a[i&63]),i=(i<<8)+t[r];return s=n%3,s===0?(e+=a[i>>18&63],e+=a[i>>12&63],e+=a[i>>6&63],e+=a[i&63]):s===2?(e+=a[i>>10&63],e+=a[i>>4&63],e+=a[i<<2&63],e+=a[64]):s===1&&(e+=a[i>>2&63],e+=a[i<<4&63],e+=a[64],e+=a[64]),e}function d2(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var f2=new Ui("tag:yaml.org,2002:binary",{kind:"scalar",resolve:c2,construct:h2,predicate:d2,represent:u2}),p2=Object.prototype.hasOwnProperty,g2=Object.prototype.toString;function y2(t){if(t===null)return!0;var e=[],i,r,s,n,a,o=t;for(i=0,r=o.length;i<r;i+=1){if(s=o[i],a=!1,g2.call(s)!=="[object Object]")return!1;for(n in s)if(p2.call(s,n))if(!a)a=!0;else return!1;if(!a)return!1;if(e.indexOf(n)===-1)e.push(n);else return!1}return!0}function m2(t){return t!==null?t:[]}var b2=new Ui("tag:yaml.org,2002:omap",{kind:"sequence",resolve:y2,construct:m2}),x2=Object.prototype.toString;function k2(t){if(t===null)return!0;var e,i,r,s,n,a=t;for(n=new Array(a.length),e=0,i=a.length;e<i;e+=1){if(r=a[e],x2.call(r)!=="[object Object]"||(s=Object.keys(r),s.length!==1))return!1;n[e]=[s[0],r[s[0]]]}return!0}function _2(t){if(t===null)return[];var e,i,r,s,n,a=t;for(n=new Array(a.length),e=0,i=a.length;e<i;e+=1)r=a[e],s=Object.keys(r),n[e]=[s[0],r[s[0]]];return n}var E2=new Ui("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:k2,construct:_2}),v2=Object.prototype.hasOwnProperty;function C2(t){if(t===null)return!0;var e,i=t;for(e in i)if(v2.call(i,e)&&i[e]!==null)return!1;return!0}function T2(t){return t!==null?t:{}}var S2=new Ui("tag:yaml.org,2002:set",{kind:"mapping",resolve:C2,construct:T2}),w2=i2.extend({implicit:[a2,l2],explicit:[f2,b2,E2,S2]}),Ds=Object.prototype.hasOwnProperty,va=1,Oc=2,Fc=3,Ca=4,zo=1,A2=2,Mc=3,L2=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,B2=/[\x85\u2028\u2029]/,D2=/[,\[\]\{\}]/,Pc=/^(?:!|!!|![a-z\-]+!)$/i,Vc=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Yc(t){return Object.prototype.toString.call(t)}function Hr(t){return t===10||t===13}function Xs(t){return t===9||t===32}function sr(t){return t===9||t===32||t===10||t===13}function un(t){return t===44||t===91||t===93||t===123||t===125}function I2(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function R2(t){return t===120?2:t===117?4:t===85?8:0}function N2(t){return 48<=t&&t<=57?t-48:-1}function zc(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
|
|
117
|
-
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function O2(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}for(var Wc=new Array(256),Uc=new Array(256),dn=0;dn<256;dn++)Wc[dn]=zc(dn)?1:0,Uc[dn]=zc(dn);function F2(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||w2,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Zc(t,e){var i={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return i.snippet=vd(i),new ns(e,i)}function ae(t,e){throw Zc(t,e)}function Ta(t,e){t.onWarning&&t.onWarning.call(null,Zc(t,e))}var Hc={YAML:function(e,i,r){var s,n,a;e.version!==null&&ae(e,"duplication of %YAML directive"),r.length!==1&&ae(e,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),s===null&&ae(e,"ill-formed argument of the YAML directive"),n=parseInt(s[1],10),a=parseInt(s[2],10),n!==1&&ae(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&Ta(e,"unsupported YAML version of the document")},TAG:function(e,i,r){var s,n;r.length!==2&&ae(e,"TAG directive accepts exactly two arguments"),s=r[0],n=r[1],Pc.test(s)||ae(e,"ill-formed tag handle (first argument) of the TAG directive"),Ds.call(e.tagMap,s)&&ae(e,'there is a previously declared suffix for "'+s+'" tag handle'),Vc.test(n)||ae(e,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch{ae(e,"tag prefix is malformed: "+n)}e.tagMap[s]=n}};function Is(t,e,i,r){var s,n,a,o;if(e<i){if(o=t.input.slice(e,i),r)for(s=0,n=o.length;s<n;s+=1)a=o.charCodeAt(s),a===9||32<=a&&a<=1114111||ae(t,"expected valid JSON character");else L2.test(o)&&ae(t,"the stream contains non-printable characters");t.result+=o}}function Gc(t,e,i,r){var s,n,a,o;for(Ki.isObject(i)||ae(t,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(i),a=0,o=s.length;a<o;a+=1)n=s[a],Ds.call(e,n)||(e[n]=i[n],r[n]=!0)}function fn(t,e,i,r,s,n,a,o,l){var h,u;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),h=0,u=s.length;h<u;h+=1)Array.isArray(s[h])&&ae(t,"nested arrays are not supported inside keys"),typeof s=="object"&&Yc(s[h])==="[object Object]"&&(s[h]="[object Object]");if(typeof s=="object"&&Yc(s)==="[object Object]"&&(s="[object Object]"),s=String(s),e===null&&(e={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(h=0,u=n.length;h<u;h+=1)Gc(t,e,n[h],i);else Gc(t,e,n,i);else!t.json&&!Ds.call(i,s)&&Ds.call(e,s)&&(t.line=a||t.line,t.lineStart=o||t.lineStart,t.position=l||t.position,ae(t,"duplicated mapping key")),s==="__proto__"?Object.defineProperty(e,s,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[s]=n,delete i[s];return e}function Wo(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):ae(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function Ti(t,e,i){for(var r=0,s=t.input.charCodeAt(t.position);s!==0;){for(;Xs(s);)s===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),s=t.input.charCodeAt(++t.position);if(e&&s===35)do s=t.input.charCodeAt(++t.position);while(s!==10&&s!==13&&s!==0);if(Hr(s))for(Wo(t),s=t.input.charCodeAt(t.position),r++,t.lineIndent=0;s===32;)t.lineIndent++,s=t.input.charCodeAt(++t.position);else break}return i!==-1&&r!==0&&t.lineIndent<i&&Ta(t,"deficient indentation"),r}function Sa(t){var e=t.position,i;return i=t.input.charCodeAt(e),!!((i===45||i===46)&&i===t.input.charCodeAt(e+1)&&i===t.input.charCodeAt(e+2)&&(e+=3,i=t.input.charCodeAt(e),i===0||sr(i)))}function Uo(t,e){e===1?t.result+=" ":e>1&&(t.result+=Ki.repeat(`
|
|
118
|
-
`,e-1))}function M2(t,e,i){var r,s,n,a,o,l,h,u,d=t.kind,f=t.result,p;if(p=t.input.charCodeAt(t.position),sr(p)||un(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(s=t.input.charCodeAt(t.position+1),sr(s)||i&&un(s)))return!1;for(t.kind="scalar",t.result="",n=a=t.position,o=!1;p!==0;){if(p===58){if(s=t.input.charCodeAt(t.position+1),sr(s)||i&&un(s))break}else if(p===35){if(r=t.input.charCodeAt(t.position-1),sr(r))break}else{if(t.position===t.lineStart&&Sa(t)||i&&un(p))break;if(Hr(p))if(l=t.line,h=t.lineStart,u=t.lineIndent,Ti(t,!1,-1),t.lineIndent>=e){o=!0,p=t.input.charCodeAt(t.position);continue}else{t.position=a,t.line=l,t.lineStart=h,t.lineIndent=u;break}}o&&(Is(t,n,a,!1),Uo(t,t.line-l),n=a=t.position,o=!1),Xs(p)||(a=t.position+1),p=t.input.charCodeAt(++t.position)}return Is(t,n,a,!1),t.result?!0:(t.kind=d,t.result=f,!1)}function P2(t,e){var i,r,s;if(i=t.input.charCodeAt(t.position),i!==39)return!1;for(t.kind="scalar",t.result="",t.position++,r=s=t.position;(i=t.input.charCodeAt(t.position))!==0;)if(i===39)if(Is(t,r,t.position,!0),i=t.input.charCodeAt(++t.position),i===39)r=t.position,t.position++,s=t.position;else return!0;else Hr(i)?(Is(t,r,s,!0),Uo(t,Ti(t,!1,e)),r=s=t.position):t.position===t.lineStart&&Sa(t)?ae(t,"unexpected end of the document within a single quoted scalar"):(t.position++,s=t.position);ae(t,"unexpected end of the stream within a single quoted scalar")}function V2(t,e){var i,r,s,n,a,o;if(o=t.input.charCodeAt(t.position),o!==34)return!1;for(t.kind="scalar",t.result="",t.position++,i=r=t.position;(o=t.input.charCodeAt(t.position))!==0;){if(o===34)return Is(t,i,t.position,!0),t.position++,!0;if(o===92){if(Is(t,i,t.position,!0),o=t.input.charCodeAt(++t.position),Hr(o))Ti(t,!1,e);else if(o<256&&Wc[o])t.result+=Uc[o],t.position++;else if((a=R2(o))>0){for(s=a,n=0;s>0;s--)o=t.input.charCodeAt(++t.position),(a=I2(o))>=0?n=(n<<4)+a:ae(t,"expected hexadecimal character");t.result+=O2(n),t.position++}else ae(t,"unknown escape sequence");i=r=t.position}else Hr(o)?(Is(t,i,r,!0),Uo(t,Ti(t,!1,e)),i=r=t.position):t.position===t.lineStart&&Sa(t)?ae(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}ae(t,"unexpected end of the stream within a double quoted scalar")}function Y2(t,e){var i=!0,r,s,n,a=t.tag,o,l=t.anchor,h,u,d,f,p,x=Object.create(null),E,T,S,_;if(_=t.input.charCodeAt(t.position),_===91)u=93,p=!1,o=[];else if(_===123)u=125,p=!0,o={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),_=t.input.charCodeAt(++t.position);_!==0;){if(Ti(t,!0,e),_=t.input.charCodeAt(t.position),_===u)return t.position++,t.tag=a,t.anchor=l,t.kind=p?"mapping":"sequence",t.result=o,!0;i?_===44&&ae(t,"expected the node content, but found ','"):ae(t,"missed comma between flow collection entries"),T=E=S=null,d=f=!1,_===63&&(h=t.input.charCodeAt(t.position+1),sr(h)&&(d=f=!0,t.position++,Ti(t,!0,e))),r=t.line,s=t.lineStart,n=t.position,pn(t,e,va,!1,!0),T=t.tag,E=t.result,Ti(t,!0,e),_=t.input.charCodeAt(t.position),(f||t.line===r)&&_===58&&(d=!0,_=t.input.charCodeAt(++t.position),Ti(t,!0,e),pn(t,e,va,!1,!0),S=t.result),p?fn(t,o,x,T,E,S,r,s,n):d?o.push(fn(t,null,x,T,E,S,r,s,n)):o.push(E),Ti(t,!0,e),_=t.input.charCodeAt(t.position),_===44?(i=!0,_=t.input.charCodeAt(++t.position)):i=!1}ae(t,"unexpected end of the stream within a flow collection")}function z2(t,e){var i,r,s=zo,n=!1,a=!1,o=e,l=0,h=!1,u,d;if(d=t.input.charCodeAt(t.position),d===124)r=!1;else if(d===62)r=!0;else return!1;for(t.kind="scalar",t.result="";d!==0;)if(d=t.input.charCodeAt(++t.position),d===43||d===45)zo===s?s=d===43?Mc:A2:ae(t,"repeat of a chomping mode identifier");else if((u=N2(d))>=0)u===0?ae(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?ae(t,"repeat of an indentation width identifier"):(o=e+u-1,a=!0);else break;if(Xs(d)){do d=t.input.charCodeAt(++t.position);while(Xs(d));if(d===35)do d=t.input.charCodeAt(++t.position);while(!Hr(d)&&d!==0)}for(;d!==0;){for(Wo(t),t.lineIndent=0,d=t.input.charCodeAt(t.position);(!a||t.lineIndent<o)&&d===32;)t.lineIndent++,d=t.input.charCodeAt(++t.position);if(!a&&t.lineIndent>o&&(o=t.lineIndent),Hr(d)){l++;continue}if(t.lineIndent<o){s===Mc?t.result+=Ki.repeat(`
|
|
119
|
-
`,n?1+l:l):s===zo&&n&&(t.result+=`
|
|
120
|
-
`);break}for(r?Xs(d)?(h=!0,t.result+=Ki.repeat(`
|
|
121
|
-
`,n?1+l:l)):h?(h=!1,t.result+=Ki.repeat(`
|
|
122
|
-
`,l+1)):l===0?n&&(t.result+=" "):t.result+=Ki.repeat(`
|
|
123
|
-
`,l):t.result+=Ki.repeat(`
|
|
124
|
-
`,n?1+l:l),n=!0,a=!0,l=0,i=t.position;!Hr(d)&&d!==0;)d=t.input.charCodeAt(++t.position);Is(t,i,t.position,!1)}return!0}function jc(t,e){var i,r=t.tag,s=t.anchor,n=[],a,o=!1,l;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,ae(t,"tab characters must not be used in indentation")),!(l!==45||(a=t.input.charCodeAt(t.position+1),!sr(a))));){if(o=!0,t.position++,Ti(t,!0,-1)&&t.lineIndent<=e){n.push(null),l=t.input.charCodeAt(t.position);continue}if(i=t.line,pn(t,e,Fc,!1,!0),n.push(t.result),Ti(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===i||t.lineIndent>e)&&l!==0)ae(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return o?(t.tag=r,t.anchor=s,t.kind="sequence",t.result=n,!0):!1}function W2(t,e,i){var r,s,n,a,o,l,h=t.tag,u=t.anchor,d={},f=Object.create(null),p=null,x=null,E=null,T=!1,S=!1,_;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=d),_=t.input.charCodeAt(t.position);_!==0;){if(!T&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,ae(t,"tab characters must not be used in indentation")),r=t.input.charCodeAt(t.position+1),n=t.line,(_===63||_===58)&&sr(r))_===63?(T&&(fn(t,d,f,p,x,null,a,o,l),p=x=E=null),S=!0,T=!0,s=!0):T?(T=!1,s=!0):ae(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,_=r;else{if(a=t.line,o=t.lineStart,l=t.position,!pn(t,i,Oc,!1,!0))break;if(t.line===n){for(_=t.input.charCodeAt(t.position);Xs(_);)_=t.input.charCodeAt(++t.position);if(_===58)_=t.input.charCodeAt(++t.position),sr(_)||ae(t,"a whitespace character is expected after the key-value separator within a block mapping"),T&&(fn(t,d,f,p,x,null,a,o,l),p=x=E=null),S=!0,T=!1,s=!1,p=t.tag,x=t.result;else if(S)ae(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=h,t.anchor=u,!0}else if(S)ae(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=h,t.anchor=u,!0}if((t.line===n||t.lineIndent>e)&&(T&&(a=t.line,o=t.lineStart,l=t.position),pn(t,e,Ca,!0,s)&&(T?x=t.result:E=t.result),T||(fn(t,d,f,p,x,E,a,o,l),p=x=E=null),Ti(t,!0,-1),_=t.input.charCodeAt(t.position)),(t.line===n||t.lineIndent>e)&&_!==0)ae(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return T&&fn(t,d,f,p,x,null,a,o,l),S&&(t.tag=h,t.anchor=u,t.kind="mapping",t.result=d),S}function U2(t){var e,i=!1,r=!1,s,n,a;if(a=t.input.charCodeAt(t.position),a!==33)return!1;if(t.tag!==null&&ae(t,"duplication of a tag property"),a=t.input.charCodeAt(++t.position),a===60?(i=!0,a=t.input.charCodeAt(++t.position)):a===33?(r=!0,s="!!",a=t.input.charCodeAt(++t.position)):s="!",e=t.position,i){do a=t.input.charCodeAt(++t.position);while(a!==0&&a!==62);t.position<t.length?(n=t.input.slice(e,t.position),a=t.input.charCodeAt(++t.position)):ae(t,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!sr(a);)a===33&&(r?ae(t,"tag suffix cannot contain exclamation marks"):(s=t.input.slice(e-1,t.position+1),Pc.test(s)||ae(t,"named tag handle cannot contain such characters"),r=!0,e=t.position+1)),a=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),D2.test(n)&&ae(t,"tag suffix cannot contain flow indicator characters")}n&&!Vc.test(n)&&ae(t,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch{ae(t,"tag name is malformed: "+n)}return i?t.tag=n:Ds.call(t.tagMap,s)?t.tag=t.tagMap[s]+n:s==="!"?t.tag="!"+n:s==="!!"?t.tag="tag:yaml.org,2002:"+n:ae(t,'undeclared tag handle "'+s+'"'),!0}function Z2(t){var e,i;if(i=t.input.charCodeAt(t.position),i!==38)return!1;for(t.anchor!==null&&ae(t,"duplication of an anchor property"),i=t.input.charCodeAt(++t.position),e=t.position;i!==0&&!sr(i)&&!un(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&ae(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function H2(t){var e,i,r;if(r=t.input.charCodeAt(t.position),r!==42)return!1;for(r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!sr(r)&&!un(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&ae(t,"name of an alias node must contain at least one character"),i=t.input.slice(e,t.position),Ds.call(t.anchorMap,i)||ae(t,'unidentified alias "'+i+'"'),t.result=t.anchorMap[i],Ti(t,!0,-1),!0}function pn(t,e,i,r,s){var n,a,o,l=1,h=!1,u=!1,d,f,p,x,E,T;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,n=a=o=Ca===i||Fc===i,r&&Ti(t,!0,-1)&&(h=!0,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)),l===1)for(;U2(t)||Z2(t);)Ti(t,!0,-1)?(h=!0,o=n,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)):o=!1;if(o&&(o=h||s),(l===1||Ca===i)&&(va===i||Oc===i?E=e:E=e+1,T=t.position-t.lineStart,l===1?o&&(jc(t,T)||W2(t,T,E))||Y2(t,E)?u=!0:(a&&z2(t,E)||P2(t,E)||V2(t,E)?u=!0:H2(t)?(u=!0,(t.tag!==null||t.anchor!==null)&&ae(t,"alias node should not have any properties")):M2(t,E,va===i)&&(u=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):l===0&&(u=o&&jc(t,T))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&ae(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),d=0,f=t.implicitTypes.length;d<f;d+=1)if(x=t.implicitTypes[d],x.resolve(t.result)){t.result=x.construct(t.result),t.tag=x.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(Ds.call(t.typeMap[t.kind||"fallback"],t.tag))x=t.typeMap[t.kind||"fallback"][t.tag];else for(x=null,p=t.typeMap.multi[t.kind||"fallback"],d=0,f=p.length;d<f;d+=1)if(t.tag.slice(0,p[d].tag.length)===p[d].tag){x=p[d];break}x||ae(t,"unknown tag !<"+t.tag+">"),t.result!==null&&x.kind!==t.kind&&ae(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+x.kind+'", not "'+t.kind+'"'),x.resolve(t.result,t.tag)?(t.result=x.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):ae(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||u}function G2(t){var e=t.position,i,r,s,n=!1,a;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(a=t.input.charCodeAt(t.position))!==0&&(Ti(t,!0,-1),a=t.input.charCodeAt(t.position),!(t.lineIndent>0||a!==37));){for(n=!0,a=t.input.charCodeAt(++t.position),i=t.position;a!==0&&!sr(a);)a=t.input.charCodeAt(++t.position);for(r=t.input.slice(i,t.position),s=[],r.length<1&&ae(t,"directive name must not be less than one character in length");a!==0;){for(;Xs(a);)a=t.input.charCodeAt(++t.position);if(a===35){do a=t.input.charCodeAt(++t.position);while(a!==0&&!Hr(a));break}if(Hr(a))break;for(i=t.position;a!==0&&!sr(a);)a=t.input.charCodeAt(++t.position);s.push(t.input.slice(i,t.position))}a!==0&&Wo(t),Ds.call(Hc,r)?Hc[r](t,r,s):Ta(t,'unknown document directive "'+r+'"')}if(Ti(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Ti(t,!0,-1)):n&&ae(t,"directives end mark is expected"),pn(t,t.lineIndent-1,Ca,!1,!0),Ti(t,!0,-1),t.checkLineBreaks&&B2.test(t.input.slice(e,t.position))&&Ta(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Sa(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Ti(t,!0,-1));return}if(t.position<t.length-1)ae(t,"end of the stream or a document separator is expected");else return}function qc(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
|
|
125
|
-
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var i=new F2(t,e),r=t.indexOf("\0");for(r!==-1&&(i.position=r,ae(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)G2(i);return i.documents}function j2(t,e,i){e!==null&&typeof e=="object"&&typeof i>"u"&&(i=e,e=null);var r=qc(t,i);if(typeof e!="function")return r;for(var s=0,n=r.length;s<n;s+=1)e(r[s])}function q2(t,e){var i=qc(t,e);if(i.length!==0){if(i.length===1)return i[0];throw new ns("expected a single document in the stream, but found more")}}var X2=j2,K2=q2,Q2={loadAll:X2,load:K2},J2=Ic,$2=Q2.load;const Xc=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s;function tf(t,e){var i;const r=t.match(Xc);if(r){const s=$2(r[1],{schema:J2});return s!=null&&s.title&&((i=e.setDiagramTitle)==null||i.call(e,s.title)),t.slice(r[0].length)}else return t}const ef=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,rf=/\s*%%.*\n/gm,wa={},Zo=function(t,e){t=t.replace(Xc,"").replace(ef,"").replace(rf,`
|
|
126
|
-
`);for(const[i,{detector:r}]of Object.entries(wa))if(r(t,e))return i;throw new Error(`No diagram type detected for text: ${t}`)},Kc=(...t)=>{for(const{id:e,detector:i,loader:r}of t)Qc(e,i,r)},Qc=(t,e,i)=>{wa[t]?k.error(`Detector with key ${t} already exists`):wa[t]={detector:e,loader:i},k.debug(`Detector with key ${t} added${i?" with loader":""}`)},sf=t=>wa[t].loader,Ho=function(t,e,i){const{depth:r,clobber:s}=Object.assign({depth:2,clobber:!1},i);return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(n=>Ho(t,n,i)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(n=>{t.includes(n)||t.push(n)}),t):t===void 0||r<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(n=>{typeof e[n]=="object"&&(t[n]===void 0||typeof t[n]=="object")?(t[n]===void 0&&(t[n]=Array.isArray(e[n])?[]:{}),t[n]=Ho(t[n],e[n],{depth:r-1,clobber:s})):(s||typeof t[n]!="object"&&typeof e[n]!="object")&&(t[n]=e[n])}),t)},Ni=Ho,nf={curveBasis:Q.$0Z,curveBasisClosed:Q.Dts,curveBasisOpen:Q.WQY,curveBumpX:Q.qpX,curveBumpY:Q.u93,curveBundle:Q.tFB,curveCardinalClosed:Q.OvA,curveCardinalOpen:Q.dCK,curveCardinal:Q.YY7,curveCatmullRomClosed:Q.fGX,curveCatmullRomOpen:Q.$m7,curveCatmullRom:Q.zgE,curveLinear:Q.c_6,curveLinearClosed:Q.fxm,curveMonotoneX:Q.FdL,curveMonotoneY:Q.ak_,curveNatural:Q.SxZ,curveStep:Q.eA_,curveStepAfter:Q.jsv,curveStepBefore:Q.iJ},Go=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,af=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,of=function(t,e){const i=Jc(t,/(?:init\b)|(?:initialize\b)/);let r={};if(Array.isArray(i)){const s=i.map(n=>n.args);Ks(s),r=Ni(r,[...s])}else r=i.args;if(r){let s=Zo(t,e);["config"].forEach(n=>{r[n]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),r[s]=r[n],delete r[n])})}return r},Jc=function(t,e=null){try{const i=new RegExp(`[%]{2}(?![{]${af.source})(?=[}][%]{2}).*
|
|
127
|
-
`,"ig");t=t.trim().replace(i,"").replace(/'/gm,'"'),k.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let r;const s=[];for(;(r=Go.exec(t))!==null;)if(r.index===Go.lastIndex&&Go.lastIndex++,r&&!e||e&&r[1]&&r[1].match(e)||e&&r[2]&&r[2].match(e)){const n=r[1]?r[1]:r[2],a=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;s.push({type:n,args:a})}return s.length===0&&s.push({type:t,args:null}),s.length===1?s[0]:s}catch(i){return k.error(`ERROR: ${i.message} - Unable to parse directive
|
|
128
|
-
${e!==null?" type:"+e:""} based on the text:${t}`),{type:null,args:null}}},lf=function(t,e){for(const[i,r]of e.entries())if(r.match(t))return i;return-1};function Er(t,e){if(!t)return e;const i=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return nf[i]||e}function cf(t,e){const i=t.trim();if(i)return e.securityLevel!=="loose"?(0,qi.Nm)(i):i}const hf=(t,...e)=>{const i=t.split("."),r=i.length-1,s=i[r];let n=window;for(let a=0;a<r;a++)if(n=n[i[a]],!n)return;n[s](...e)};function Aa(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function uf(t){let e,i=0;t.forEach(n=>{i+=Aa(n,e),e=n});let r=i/2,s;return e=void 0,t.forEach(n=>{if(e&&!s){const a=Aa(n,e);if(a<r)r-=a;else{const o=r/a;o<=0&&(s=e),o>=1&&(s={x:n.x,y:n.y}),o>0&&o<1&&(s={x:(1-o)*e.x+o*n.x,y:(1-o)*e.y+o*n.y})}}e=n}),s}function df(t){return t.length===1?t[0]:uf(t)}const ff=(t,e,i)=>{let r;k.info(`our points ${JSON.stringify(e)}`),e[0]!==i&&(e=e.reverse());let n=25,a;r=void 0,e.forEach(u=>{if(r&&!a){const d=Aa(u,r);if(d<n)n-=d;else{const f=n/d;f<=0&&(a=r),f>=1&&(a={x:u.x,y:u.y}),f>0&&f<1&&(a={x:(1-f)*r.x+f*u.x,y:(1-f)*r.y+f*u.y})}}r=u});const o=t?10:5,l=Math.atan2(e[0].y-a.y,e[0].x-a.x),h={x:0,y:0};return h.x=Math.sin(l)*o+(e[0].x+a.x)/2,h.y=-Math.cos(l)*o+(e[0].y+a.y)/2,h};function pf(t,e,i){let r=JSON.parse(JSON.stringify(i)),s;k.info("our points",r),e!=="start_left"&&e!=="start_right"&&(r=r.reverse()),r.forEach(d=>{s=d});let a=25+t,o;s=void 0,r.forEach(d=>{if(s&&!o){const f=Aa(d,s);if(f<a)a-=f;else{const p=a/f;p<=0&&(o=s),p>=1&&(o={x:d.x,y:d.y}),p>0&&p<1&&(o={x:(1-p)*s.x+p*d.x,y:(1-p)*s.y+p*d.y})}}s=d});const l=10+t*.5,h=Math.atan2(r[0].y-o.y,r[0].x-o.x),u={x:0,y:0};return u.x=Math.sin(h)*l+(r[0].x+o.x)/2,u.y=-Math.cos(h)*l+(r[0].y+o.y)/2,e==="start_left"&&(u.x=Math.sin(h+Math.PI)*l+(r[0].x+o.x)/2,u.y=-Math.cos(h+Math.PI)*l+(r[0].y+o.y)/2),e==="end_right"&&(u.x=Math.sin(h-Math.PI)*l+(r[0].x+o.x)/2-5,u.y=-Math.cos(h-Math.PI)*l+(r[0].y+o.y)/2-5),e==="end_left"&&(u.x=Math.sin(h)*l+(r[0].x+o.x)/2-5,u.y=-Math.cos(h)*l+(r[0].y+o.y)/2-5),u}function as(t){let e="",i="";for(const r of t)r!==void 0&&(r.startsWith("color:")||r.startsWith("text-align:")?i=i+r+";":e=e+r+";");return{style:e,labelStyle:i}}let $c=0;const t1=()=>($c++,"id-"+Math.random().toString(36).substr(2,12)+"-"+$c);function gf(t){let e="";const i="0123456789abcdef",r=i.length;for(let s=0;s<t;s++)e+=i.charAt(Math.floor(Math.random()*r));return e}const e1=t=>gf(t.length),yf=function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0}},mf=function(t,e){const i=e.text.replace(Qt.lineBreakRegex," "),[,r]=On(e.fontSize),s=t.append("text");s.attr("x",e.x),s.attr("y",e.y),s.style("text-anchor",e.anchor),s.style("font-family",e.fontFamily),s.style("font-size",r),s.style("font-weight",e.fontWeight),s.attr("fill",e.fill),e.class!==void 0&&s.attr("class",e.class);const n=s.append("tspan");return n.attr("x",e.x+e.textMargin*2),n.attr("fill",e.fill),n.text(i),s},i1=(0,Us.Z)((t,e,i)=>{if(!t||(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),Qt.lineBreakRegex.test(t)))return t;const r=t.split(" "),s=[];let n="";return r.forEach((a,o)=>{const l=Gr(`${a} `,i),h=Gr(n,i);if(l>e){const{hyphenatedStrings:f,remainingWord:p}=bf(a,e,"-",i);s.push(n,...f),n=p}else h+l>=e?(s.push(n),n=a):n=[n,a].filter(Boolean).join(" ");o+1===r.length&&s.push(n)}),s.filter(a=>a!=="").join(i.joinWith)},(t,e,i)=>`${t}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),bf=(0,Us.Z)((t,e,i="-",r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},r);const s=[...t],n=[];let a="";return s.forEach((o,l)=>{const h=`${a}${o}`;if(Gr(h,r)>=e){const d=l+1,f=s.length===d,p=`${h}${i}`;n.push(f?h:p),a=""}else a=h}),{hyphenatedStrings:n,remainingWord:a}},(t,e,i="-",r)=>`${t}${e}${i}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function jo(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),qo(t,e).height}function Gr(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),qo(t,e).width}const qo=(0,Us.Z)((t,e)=>{e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e);const{fontSize:i,fontFamily:r,fontWeight:s}=e;if(!t)return{width:0,height:0};const[,n]=On(i),a=["sans-serif",r],o=t.split(Qt.lineBreakRegex),l=[],h=(0,Q.Ys)("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const u=h.append("svg");for(const f of a){let p=0;const x={width:0,height:0,lineHeight:0};for(const E of o){const T=yf();T.text=E;const S=mf(u,T).style("font-size",n).style("font-weight",s).style("font-family",f),_=(S._groups||S)[0][0].getBBox();x.width=Math.round(Math.max(x.width,_.width)),p=Math.round(_.height),x.height+=p,x.lineHeight=Math.round(Math.max(x.lineHeight,p))}l.push(x)}u.remove();const d=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[d]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),xf=class{constructor(e,i){this.deterministic=e,this.seed=i,this.count=i?i.length:0}next(){return this.deterministic?this.count++:Date.now()}};let La;const kf=function(t){return La=La||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),La.innerHTML=t,unescape(La.textContent)},Ks=t=>{if(k.debug("directiveSanitizer called with",t),typeof t=="object"&&(t.length?t.forEach(e=>Ks(e)):Object.keys(t).forEach(e=>{k.debug("Checking key",e),e.startsWith("__")&&(k.debug("sanitize deleting __ option",e),delete t[e]),e.includes("proto")&&(k.debug("sanitize deleting proto option",e),delete t[e]),e.includes("constr")&&(k.debug("sanitize deleting constr option",e),delete t[e]),e.includes("themeCSS")&&(k.debug("sanitizing themeCss option"),t[e]=Ba(t[e])),e.includes("fontFamily")&&(k.debug("sanitizing fontFamily option"),t[e]=Ba(t[e])),e.includes("altFontFamily")&&(k.debug("sanitizing altFontFamily option"),t[e]=Ba(t[e])),cd.includes(e)?typeof t[e]=="object"&&(k.debug("sanitize deleting object",e),Ks(t[e])):(k.debug("sanitize deleting option",e),delete t[e])})),t.themeVariables){const e=Object.keys(t.themeVariables);for(const i of e){const r=t.themeVariables[i];r&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[i]="")}}k.debug("After sanitization",t)},Ba=t=>{let e=0,i=0;for(const r of t){if(e<i)return"{ /* ERROR: Unbalanced CSS */ }";r==="{"?e++:r==="}"&&i++}return e!==i?"{ /* ERROR: Unbalanced CSS */ }":t};function Xo(t){return"str"in t}function _f(t){return t instanceof Error?t.message:String(t)}const Ef=(t,e,i,r)=>{if(!r)return;const s=t.node().getBBox();t.append("text").text(r).attr("x",s.x+s.width/2).attr("y",-i).attr("class",e)},On=t=>{if(typeof t=="number")return[t,t+"px"];const e=parseInt(t,10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},ke={assignWithDepth:Ni,wrapLabel:i1,calculateTextHeight:jo,calculateTextWidth:Gr,calculateTextDimensions:qo,detectInit:of,detectDirective:Jc,isSubstringInArray:lf,interpolateToCurve:Er,calcLabelPosition:df,calcCardinalityPosition:ff,calcTerminalLabelPosition:pf,formatUrl:cf,getStylesFromArray:as,generateId:t1,random:e1,runFunc:hf,entityDecode:kf,initIdGenerator:xf,directiveSanitizer:Ks,sanitizeCss:Ba,insertTitle:Ef,parseFontSize:On},Da="9.4.3",gn=Object.freeze(hd);let nr=Ni({},gn),r1,yn=[],Fn=Ni({},gn);const Ia=(t,e)=>{let i=Ni({},t),r={};for(const s of e)a1(s),r=Ni(r,s);if(i=Ni(i,r),r.theme&&r.theme in ss){const s=Ni({},r1),n=Ni(s.themeVariables||{},r.themeVariables);i.theme&&i.theme in ss&&(i.themeVariables=ss[i.theme].getThemeVariables(n))}return Fn=i,c1(Fn),Fn},vf=t=>(nr=Ni({},gn),nr=Ni(nr,t),t.theme&&ss[t.theme]&&(nr.themeVariables=ss[t.theme].getThemeVariables(t.themeVariables)),Ia(nr,yn),nr),Cf=t=>{r1=Ni({},t)},Tf=t=>(nr=Ni(nr,t),Ia(nr,yn),nr),s1=()=>Ni({},nr),n1=t=>(c1(t),Ni(Fn,t),P()),P=()=>Ni({},Fn),a1=t=>{["secure",...nr.secure??[]].forEach(e=>{t[e]!==void 0&&(k.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.indexOf("__")===0&&delete t[e]}),Object.keys(t).forEach(e=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&a1(t[e])})},Ko=t=>{t.fontFamily&&(t.themeVariables?t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily}):t.themeVariables={fontFamily:t.fontFamily}),yn.push(t),Ia(nr,yn)},Mn=(t=nr)=>{yn=[],Ia(t,yn)};var o1=(t=>(t.LAZY_LOAD_DEPRECATED="The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",t))(o1||{});const l1={},Sf=t=>{l1[t]||(k.warn(o1[t]),l1[t]=!0)},c1=t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Sf("LAZY_LOAD_DEPRECATED")},wf=function(t,e){for(let i of e)t.attr(i[0],i[1])},Af=function(t,e,i){let r=new Map;return i?(r.set("width","100%"),r.set("style",`max-width: ${e}px;`)):(r.set("height",t),r.set("width",e)),r},Dr=function(t,e,i,r){const s=Af(e,i,r);wf(t,s)},Pn=function(t,e,i,r){const s=e.node().getBBox(),n=s.width,a=s.height;k.info(`SVG bounds: ${n}x${a}`,s);let o=0,l=0;k.info(`Graph bounds: ${o}x${l}`,t),o=n+i*2,l=a+i*2,k.info(`Calculated bounds: ${o}x${l}`),Dr(e,l,o,r);const h=`${s.x-i} ${s.y-i} ${s.width+2*i} ${s.height+2*i}`;e.attr("viewBox",h)},Vn=t=>`g.classGroup text {
|
|
129
|
-
fill: ${t.nodeBorder};
|
|
130
|
-
fill: ${t.classText};
|
|
131
|
-
stroke: none;
|
|
132
|
-
font-family: ${t.fontFamily};
|
|
133
|
-
font-size: 10px;
|
|
134
|
-
|
|
135
|
-
.title {
|
|
136
|
-
font-weight: bolder;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.nodeLabel, .edgeLabel {
|
|
142
|
-
color: ${t.classText};
|
|
143
|
-
}
|
|
144
|
-
.edgeLabel .label rect {
|
|
145
|
-
fill: ${t.mainBkg};
|
|
146
|
-
}
|
|
147
|
-
.label text {
|
|
148
|
-
fill: ${t.classText};
|
|
149
|
-
}
|
|
150
|
-
.edgeLabel .label span {
|
|
151
|
-
background: ${t.mainBkg};
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.classTitle {
|
|
155
|
-
font-weight: bolder;
|
|
156
|
-
}
|
|
157
|
-
.node rect,
|
|
158
|
-
.node circle,
|
|
159
|
-
.node ellipse,
|
|
160
|
-
.node polygon,
|
|
161
|
-
.node path {
|
|
162
|
-
fill: ${t.mainBkg};
|
|
163
|
-
stroke: ${t.nodeBorder};
|
|
164
|
-
stroke-width: 1px;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
.divider {
|
|
169
|
-
stroke: ${t.nodeBorder};
|
|
170
|
-
stroke: 1;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
g.clickable {
|
|
174
|
-
cursor: pointer;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
g.classGroup rect {
|
|
178
|
-
fill: ${t.mainBkg};
|
|
179
|
-
stroke: ${t.nodeBorder};
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
g.classGroup line {
|
|
183
|
-
stroke: ${t.nodeBorder};
|
|
184
|
-
stroke-width: 1;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.classLabel .box {
|
|
188
|
-
stroke: none;
|
|
189
|
-
stroke-width: 0;
|
|
190
|
-
fill: ${t.mainBkg};
|
|
191
|
-
opacity: 0.5;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.classLabel .label {
|
|
195
|
-
fill: ${t.nodeBorder};
|
|
196
|
-
font-size: 10px;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.relation {
|
|
200
|
-
stroke: ${t.lineColor};
|
|
201
|
-
stroke-width: 1;
|
|
202
|
-
fill: none;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.dashed-line{
|
|
206
|
-
stroke-dasharray: 3;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.dotted-line{
|
|
210
|
-
stroke-dasharray: 1 2;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
#compositionStart, .composition {
|
|
214
|
-
fill: ${t.lineColor} !important;
|
|
215
|
-
stroke: ${t.lineColor} !important;
|
|
216
|
-
stroke-width: 1;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
#compositionEnd, .composition {
|
|
220
|
-
fill: ${t.lineColor} !important;
|
|
221
|
-
stroke: ${t.lineColor} !important;
|
|
222
|
-
stroke-width: 1;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
#dependencyStart, .dependency {
|
|
226
|
-
fill: ${t.lineColor} !important;
|
|
227
|
-
stroke: ${t.lineColor} !important;
|
|
228
|
-
stroke-width: 1;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
#dependencyStart, .dependency {
|
|
232
|
-
fill: ${t.lineColor} !important;
|
|
233
|
-
stroke: ${t.lineColor} !important;
|
|
234
|
-
stroke-width: 1;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
#extensionStart, .extension {
|
|
238
|
-
fill: ${t.mainBkg} !important;
|
|
239
|
-
stroke: ${t.lineColor} !important;
|
|
240
|
-
stroke-width: 1;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
#extensionEnd, .extension {
|
|
244
|
-
fill: ${t.mainBkg} !important;
|
|
245
|
-
stroke: ${t.lineColor} !important;
|
|
246
|
-
stroke-width: 1;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
#aggregationStart, .aggregation {
|
|
250
|
-
fill: ${t.mainBkg} !important;
|
|
251
|
-
stroke: ${t.lineColor} !important;
|
|
252
|
-
stroke-width: 1;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
#aggregationEnd, .aggregation {
|
|
256
|
-
fill: ${t.mainBkg} !important;
|
|
257
|
-
stroke: ${t.lineColor} !important;
|
|
258
|
-
stroke-width: 1;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
#lollipopStart, .lollipop {
|
|
262
|
-
fill: ${t.mainBkg} !important;
|
|
263
|
-
stroke: ${t.lineColor} !important;
|
|
264
|
-
stroke-width: 1;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
#lollipopEnd, .lollipop {
|
|
268
|
-
fill: ${t.mainBkg} !important;
|
|
269
|
-
stroke: ${t.lineColor} !important;
|
|
270
|
-
stroke-width: 1;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
.edgeTerminals {
|
|
274
|
-
font-size: 11px;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
.classTitleText {
|
|
278
|
-
text-anchor: middle;
|
|
279
|
-
font-size: 18px;
|
|
280
|
-
fill: ${t.textColor};
|
|
281
|
-
}
|
|
282
|
-
`,h1=t=>`
|
|
283
|
-
.entityBox {
|
|
284
|
-
fill: ${t.mainBkg};
|
|
285
|
-
stroke: ${t.nodeBorder};
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
.attributeBoxOdd {
|
|
289
|
-
fill: ${t.attributeBackgroundColorOdd};
|
|
290
|
-
stroke: ${t.nodeBorder};
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
.attributeBoxEven {
|
|
294
|
-
fill: ${t.attributeBackgroundColorEven};
|
|
295
|
-
stroke: ${t.nodeBorder};
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
.relationshipLabelBox {
|
|
299
|
-
fill: ${t.tertiaryColor};
|
|
300
|
-
opacity: 0.7;
|
|
301
|
-
background-color: ${t.tertiaryColor};
|
|
302
|
-
rect {
|
|
303
|
-
opacity: 0.5;
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
.relationshipLine {
|
|
308
|
-
stroke: ${t.lineColor};
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
.entityTitleText {
|
|
312
|
-
text-anchor: middle;
|
|
313
|
-
font-size: 18px;
|
|
314
|
-
fill: ${t.textColor};
|
|
315
|
-
}
|
|
316
|
-
`,Qo=()=>"",Ra=t=>`.label {
|
|
317
|
-
font-family: ${t.fontFamily};
|
|
318
|
-
color: ${t.nodeTextColor||t.textColor};
|
|
319
|
-
}
|
|
320
|
-
.cluster-label text {
|
|
321
|
-
fill: ${t.titleColor};
|
|
322
|
-
}
|
|
323
|
-
.cluster-label span {
|
|
324
|
-
color: ${t.titleColor};
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
.label text,span {
|
|
328
|
-
fill: ${t.nodeTextColor||t.textColor};
|
|
329
|
-
color: ${t.nodeTextColor||t.textColor};
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
.node rect,
|
|
333
|
-
.node circle,
|
|
334
|
-
.node ellipse,
|
|
335
|
-
.node polygon,
|
|
336
|
-
.node path {
|
|
337
|
-
fill: ${t.mainBkg};
|
|
338
|
-
stroke: ${t.nodeBorder};
|
|
339
|
-
stroke-width: 1px;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
.node .label {
|
|
343
|
-
text-align: center;
|
|
344
|
-
}
|
|
345
|
-
.node.clickable {
|
|
346
|
-
cursor: pointer;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
.arrowheadPath {
|
|
350
|
-
fill: ${t.arrowheadColor};
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
.edgePath .path {
|
|
354
|
-
stroke: ${t.lineColor};
|
|
355
|
-
stroke-width: 2.0px;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
.flowchart-link {
|
|
359
|
-
stroke: ${t.lineColor};
|
|
360
|
-
fill: none;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
.edgeLabel {
|
|
364
|
-
background-color: ${t.edgeLabelBackground};
|
|
365
|
-
rect {
|
|
366
|
-
opacity: 0.5;
|
|
367
|
-
background-color: ${t.edgeLabelBackground};
|
|
368
|
-
fill: ${t.edgeLabelBackground};
|
|
369
|
-
}
|
|
370
|
-
text-align: center;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
.cluster rect {
|
|
374
|
-
fill: ${t.clusterBkg};
|
|
375
|
-
stroke: ${t.clusterBorder};
|
|
376
|
-
stroke-width: 1px;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
.cluster text {
|
|
380
|
-
fill: ${t.titleColor};
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
.cluster span {
|
|
384
|
-
color: ${t.titleColor};
|
|
385
|
-
}
|
|
386
|
-
/* .cluster div {
|
|
387
|
-
color: ${t.titleColor};
|
|
388
|
-
} */
|
|
389
|
-
|
|
390
|
-
div.mermaidTooltip {
|
|
391
|
-
position: absolute;
|
|
392
|
-
text-align: center;
|
|
393
|
-
max-width: 200px;
|
|
394
|
-
padding: 2px;
|
|
395
|
-
font-family: ${t.fontFamily};
|
|
396
|
-
font-size: 12px;
|
|
397
|
-
background: ${t.tertiaryColor};
|
|
398
|
-
border: 1px solid ${t.border2};
|
|
399
|
-
border-radius: 2px;
|
|
400
|
-
pointer-events: none;
|
|
401
|
-
z-index: 100;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
.flowchartTitleText {
|
|
405
|
-
text-anchor: middle;
|
|
406
|
-
font-size: 18px;
|
|
407
|
-
fill: ${t.textColor};
|
|
408
|
-
}
|
|
409
|
-
`,u1=t=>`
|
|
410
|
-
.mermaid-main-font {
|
|
411
|
-
font-family: "trebuchet ms", verdana, arial, sans-serif;
|
|
412
|
-
font-family: var(--mermaid-font-family);
|
|
413
|
-
}
|
|
414
|
-
.exclude-range {
|
|
415
|
-
fill: ${t.excludeBkgColor};
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
.section {
|
|
419
|
-
stroke: none;
|
|
420
|
-
opacity: 0.2;
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
.section0 {
|
|
424
|
-
fill: ${t.sectionBkgColor};
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
.section2 {
|
|
428
|
-
fill: ${t.sectionBkgColor2};
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
.section1,
|
|
432
|
-
.section3 {
|
|
433
|
-
fill: ${t.altSectionBkgColor};
|
|
434
|
-
opacity: 0.2;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
.sectionTitle0 {
|
|
438
|
-
fill: ${t.titleColor};
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
.sectionTitle1 {
|
|
442
|
-
fill: ${t.titleColor};
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
.sectionTitle2 {
|
|
446
|
-
fill: ${t.titleColor};
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
.sectionTitle3 {
|
|
450
|
-
fill: ${t.titleColor};
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
.sectionTitle {
|
|
454
|
-
text-anchor: start;
|
|
455
|
-
// font-size: ${t.ganttFontSize};
|
|
456
|
-
// text-height: 14px;
|
|
457
|
-
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
458
|
-
font-family: var(--mermaid-font-family);
|
|
459
|
-
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
/* Grid and axis */
|
|
464
|
-
|
|
465
|
-
.grid .tick {
|
|
466
|
-
stroke: ${t.gridColor};
|
|
467
|
-
opacity: 0.8;
|
|
468
|
-
shape-rendering: crispEdges;
|
|
469
|
-
text {
|
|
470
|
-
font-family: ${t.fontFamily};
|
|
471
|
-
fill: ${t.textColor};
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
.grid path {
|
|
476
|
-
stroke-width: 0;
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
/* Today line */
|
|
481
|
-
|
|
482
|
-
.today {
|
|
483
|
-
fill: none;
|
|
484
|
-
stroke: ${t.todayLineColor};
|
|
485
|
-
stroke-width: 2px;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
/* Task styling */
|
|
490
|
-
|
|
491
|
-
/* Default task */
|
|
492
|
-
|
|
493
|
-
.task {
|
|
494
|
-
stroke-width: 2;
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
.taskText {
|
|
498
|
-
text-anchor: middle;
|
|
499
|
-
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
500
|
-
font-family: var(--mermaid-font-family);
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
// .taskText:not([font-size]) {
|
|
504
|
-
// font-size: ${t.ganttFontSize};
|
|
505
|
-
// }
|
|
506
|
-
|
|
507
|
-
.taskTextOutsideRight {
|
|
508
|
-
fill: ${t.taskTextDarkColor};
|
|
509
|
-
text-anchor: start;
|
|
510
|
-
// font-size: ${t.ganttFontSize};
|
|
511
|
-
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
512
|
-
font-family: var(--mermaid-font-family);
|
|
513
|
-
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
.taskTextOutsideLeft {
|
|
517
|
-
fill: ${t.taskTextDarkColor};
|
|
518
|
-
text-anchor: end;
|
|
519
|
-
// font-size: ${t.ganttFontSize};
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
/* Special case clickable */
|
|
523
|
-
.task.clickable {
|
|
524
|
-
cursor: pointer;
|
|
525
|
-
}
|
|
526
|
-
.taskText.clickable {
|
|
527
|
-
cursor: pointer;
|
|
528
|
-
fill: ${t.taskTextClickableColor} !important;
|
|
529
|
-
font-weight: bold;
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
.taskTextOutsideLeft.clickable {
|
|
533
|
-
cursor: pointer;
|
|
534
|
-
fill: ${t.taskTextClickableColor} !important;
|
|
535
|
-
font-weight: bold;
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
.taskTextOutsideRight.clickable {
|
|
539
|
-
cursor: pointer;
|
|
540
|
-
fill: ${t.taskTextClickableColor} !important;
|
|
541
|
-
font-weight: bold;
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
/* Specific task settings for the sections*/
|
|
545
|
-
|
|
546
|
-
.taskText0,
|
|
547
|
-
.taskText1,
|
|
548
|
-
.taskText2,
|
|
549
|
-
.taskText3 {
|
|
550
|
-
fill: ${t.taskTextColor};
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
.task0,
|
|
554
|
-
.task1,
|
|
555
|
-
.task2,
|
|
556
|
-
.task3 {
|
|
557
|
-
fill: ${t.taskBkgColor};
|
|
558
|
-
stroke: ${t.taskBorderColor};
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
.taskTextOutside0,
|
|
562
|
-
.taskTextOutside2
|
|
563
|
-
{
|
|
564
|
-
fill: ${t.taskTextOutsideColor};
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
.taskTextOutside1,
|
|
568
|
-
.taskTextOutside3 {
|
|
569
|
-
fill: ${t.taskTextOutsideColor};
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
/* Active task */
|
|
574
|
-
|
|
575
|
-
.active0,
|
|
576
|
-
.active1,
|
|
577
|
-
.active2,
|
|
578
|
-
.active3 {
|
|
579
|
-
fill: ${t.activeTaskBkgColor};
|
|
580
|
-
stroke: ${t.activeTaskBorderColor};
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
.activeText0,
|
|
584
|
-
.activeText1,
|
|
585
|
-
.activeText2,
|
|
586
|
-
.activeText3 {
|
|
587
|
-
fill: ${t.taskTextDarkColor} !important;
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
/* Completed task */
|
|
592
|
-
|
|
593
|
-
.done0,
|
|
594
|
-
.done1,
|
|
595
|
-
.done2,
|
|
596
|
-
.done3 {
|
|
597
|
-
stroke: ${t.doneTaskBorderColor};
|
|
598
|
-
fill: ${t.doneTaskBkgColor};
|
|
599
|
-
stroke-width: 2;
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
.doneText0,
|
|
603
|
-
.doneText1,
|
|
604
|
-
.doneText2,
|
|
605
|
-
.doneText3 {
|
|
606
|
-
fill: ${t.taskTextDarkColor} !important;
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
/* Tasks on the critical line */
|
|
611
|
-
|
|
612
|
-
.crit0,
|
|
613
|
-
.crit1,
|
|
614
|
-
.crit2,
|
|
615
|
-
.crit3 {
|
|
616
|
-
stroke: ${t.critBorderColor};
|
|
617
|
-
fill: ${t.critBkgColor};
|
|
618
|
-
stroke-width: 2;
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
.activeCrit0,
|
|
622
|
-
.activeCrit1,
|
|
623
|
-
.activeCrit2,
|
|
624
|
-
.activeCrit3 {
|
|
625
|
-
stroke: ${t.critBorderColor};
|
|
626
|
-
fill: ${t.activeTaskBkgColor};
|
|
627
|
-
stroke-width: 2;
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
.doneCrit0,
|
|
631
|
-
.doneCrit1,
|
|
632
|
-
.doneCrit2,
|
|
633
|
-
.doneCrit3 {
|
|
634
|
-
stroke: ${t.critBorderColor};
|
|
635
|
-
fill: ${t.doneTaskBkgColor};
|
|
636
|
-
stroke-width: 2;
|
|
637
|
-
cursor: pointer;
|
|
638
|
-
shape-rendering: crispEdges;
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
.milestone {
|
|
642
|
-
transform: rotate(45deg) scale(0.8,0.8);
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
.milestoneText {
|
|
646
|
-
font-style: italic;
|
|
647
|
-
}
|
|
648
|
-
.doneCritText0,
|
|
649
|
-
.doneCritText1,
|
|
650
|
-
.doneCritText2,
|
|
651
|
-
.doneCritText3 {
|
|
652
|
-
fill: ${t.taskTextDarkColor} !important;
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
.activeCritText0,
|
|
656
|
-
.activeCritText1,
|
|
657
|
-
.activeCritText2,
|
|
658
|
-
.activeCritText3 {
|
|
659
|
-
fill: ${t.taskTextDarkColor} !important;
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
.titleText {
|
|
663
|
-
text-anchor: middle;
|
|
664
|
-
font-size: 18px;
|
|
665
|
-
fill: ${t.textColor} ;
|
|
666
|
-
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
667
|
-
font-family: var(--mermaid-font-family);
|
|
668
|
-
}
|
|
669
|
-
`,d1=()=>"",f1=t=>`
|
|
670
|
-
.pieCircle{
|
|
671
|
-
stroke: ${t.pieStrokeColor};
|
|
672
|
-
stroke-width : ${t.pieStrokeWidth};
|
|
673
|
-
opacity : ${t.pieOpacity};
|
|
674
|
-
}
|
|
675
|
-
.pieTitleText {
|
|
676
|
-
text-anchor: middle;
|
|
677
|
-
font-size: ${t.pieTitleTextSize};
|
|
678
|
-
fill: ${t.pieTitleTextColor};
|
|
679
|
-
font-family: ${t.fontFamily};
|
|
680
|
-
}
|
|
681
|
-
.slice {
|
|
682
|
-
font-family: ${t.fontFamily};
|
|
683
|
-
fill: ${t.pieSectionTextColor};
|
|
684
|
-
font-size:${t.pieSectionTextSize};
|
|
685
|
-
// fill: white;
|
|
686
|
-
}
|
|
687
|
-
.legend text {
|
|
688
|
-
fill: ${t.pieLegendTextColor};
|
|
689
|
-
font-family: ${t.fontFamily};
|
|
690
|
-
font-size: ${t.pieLegendTextSize};
|
|
691
|
-
}
|
|
692
|
-
`,p1=t=>`
|
|
693
|
-
|
|
694
|
-
marker {
|
|
695
|
-
fill: ${t.relationColor};
|
|
696
|
-
stroke: ${t.relationColor};
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
marker.cross {
|
|
700
|
-
stroke: ${t.lineColor};
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
svg {
|
|
704
|
-
font-family: ${t.fontFamily};
|
|
705
|
-
font-size: ${t.fontSize};
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
.reqBox {
|
|
709
|
-
fill: ${t.requirementBackground};
|
|
710
|
-
fill-opacity: 100%;
|
|
711
|
-
stroke: ${t.requirementBorderColor};
|
|
712
|
-
stroke-width: ${t.requirementBorderSize};
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
.reqTitle, .reqLabel{
|
|
716
|
-
fill: ${t.requirementTextColor};
|
|
717
|
-
}
|
|
718
|
-
.reqLabelBox {
|
|
719
|
-
fill: ${t.relationLabelBackground};
|
|
720
|
-
fill-opacity: 100%;
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
.req-title-line {
|
|
724
|
-
stroke: ${t.requirementBorderColor};
|
|
725
|
-
stroke-width: ${t.requirementBorderSize};
|
|
726
|
-
}
|
|
727
|
-
.relationshipLine {
|
|
728
|
-
stroke: ${t.relationColor};
|
|
729
|
-
stroke-width: 1;
|
|
730
|
-
}
|
|
731
|
-
.relationshipLabel {
|
|
732
|
-
fill: ${t.relationLabelColor};
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
`,g1=t=>`.actor {
|
|
736
|
-
stroke: ${t.actorBorder};
|
|
737
|
-
fill: ${t.actorBkg};
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
text.actor > tspan {
|
|
741
|
-
fill: ${t.actorTextColor};
|
|
742
|
-
stroke: none;
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
.actor-line {
|
|
746
|
-
stroke: ${t.actorLineColor};
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
.messageLine0 {
|
|
750
|
-
stroke-width: 1.5;
|
|
751
|
-
stroke-dasharray: none;
|
|
752
|
-
stroke: ${t.signalColor};
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
.messageLine1 {
|
|
756
|
-
stroke-width: 1.5;
|
|
757
|
-
stroke-dasharray: 2, 2;
|
|
758
|
-
stroke: ${t.signalColor};
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
#arrowhead path {
|
|
762
|
-
fill: ${t.signalColor};
|
|
763
|
-
stroke: ${t.signalColor};
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
.sequenceNumber {
|
|
767
|
-
fill: ${t.sequenceNumberColor};
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
#sequencenumber {
|
|
771
|
-
fill: ${t.signalColor};
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
#crosshead path {
|
|
775
|
-
fill: ${t.signalColor};
|
|
776
|
-
stroke: ${t.signalColor};
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
.messageText {
|
|
780
|
-
fill: ${t.signalTextColor};
|
|
781
|
-
stroke: none;
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
.labelBox {
|
|
785
|
-
stroke: ${t.labelBoxBorderColor};
|
|
786
|
-
fill: ${t.labelBoxBkgColor};
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
.labelText, .labelText > tspan {
|
|
790
|
-
fill: ${t.labelTextColor};
|
|
791
|
-
stroke: none;
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
.loopText, .loopText > tspan {
|
|
795
|
-
fill: ${t.loopTextColor};
|
|
796
|
-
stroke: none;
|
|
797
|
-
}
|
|
798
|
-
|
|
799
|
-
.loopLine {
|
|
800
|
-
stroke-width: 2px;
|
|
801
|
-
stroke-dasharray: 2, 2;
|
|
802
|
-
stroke: ${t.labelBoxBorderColor};
|
|
803
|
-
fill: ${t.labelBoxBorderColor};
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
.note {
|
|
807
|
-
//stroke: #decc93;
|
|
808
|
-
stroke: ${t.noteBorderColor};
|
|
809
|
-
fill: ${t.noteBkgColor};
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
.noteText, .noteText > tspan {
|
|
813
|
-
fill: ${t.noteTextColor};
|
|
814
|
-
stroke: none;
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
.activation0 {
|
|
818
|
-
fill: ${t.activationBkgColor};
|
|
819
|
-
stroke: ${t.activationBorderColor};
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
.activation1 {
|
|
823
|
-
fill: ${t.activationBkgColor};
|
|
824
|
-
stroke: ${t.activationBorderColor};
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
.activation2 {
|
|
828
|
-
fill: ${t.activationBkgColor};
|
|
829
|
-
stroke: ${t.activationBorderColor};
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
.actorPopupMenu {
|
|
833
|
-
position: absolute;
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
.actorPopupMenuPanel {
|
|
837
|
-
position: absolute;
|
|
838
|
-
fill: ${t.actorBkg};
|
|
839
|
-
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
|
840
|
-
filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
|
|
841
|
-
}
|
|
842
|
-
.actor-man line {
|
|
843
|
-
stroke: ${t.actorBorder};
|
|
844
|
-
fill: ${t.actorBkg};
|
|
845
|
-
}
|
|
846
|
-
.actor-man circle, line {
|
|
847
|
-
stroke: ${t.actorBorder};
|
|
848
|
-
fill: ${t.actorBkg};
|
|
849
|
-
stroke-width: 2px;
|
|
850
|
-
}
|
|
851
|
-
`,Na=t=>`
|
|
852
|
-
defs #statediagram-barbEnd {
|
|
853
|
-
fill: ${t.transitionColor};
|
|
854
|
-
stroke: ${t.transitionColor};
|
|
855
|
-
}
|
|
856
|
-
g.stateGroup text {
|
|
857
|
-
fill: ${t.nodeBorder};
|
|
858
|
-
stroke: none;
|
|
859
|
-
font-size: 10px;
|
|
860
|
-
}
|
|
861
|
-
g.stateGroup text {
|
|
862
|
-
fill: ${t.textColor};
|
|
863
|
-
stroke: none;
|
|
864
|
-
font-size: 10px;
|
|
865
|
-
|
|
866
|
-
}
|
|
867
|
-
g.stateGroup .state-title {
|
|
868
|
-
font-weight: bolder;
|
|
869
|
-
fill: ${t.stateLabelColor};
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
g.stateGroup rect {
|
|
873
|
-
fill: ${t.mainBkg};
|
|
874
|
-
stroke: ${t.nodeBorder};
|
|
875
|
-
}
|
|
876
|
-
|
|
877
|
-
g.stateGroup line {
|
|
878
|
-
stroke: ${t.lineColor};
|
|
879
|
-
stroke-width: 1;
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
.transition {
|
|
883
|
-
stroke: ${t.transitionColor};
|
|
884
|
-
stroke-width: 1;
|
|
885
|
-
fill: none;
|
|
886
|
-
}
|
|
887
|
-
|
|
888
|
-
.stateGroup .composit {
|
|
889
|
-
fill: ${t.background};
|
|
890
|
-
border-bottom: 1px
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
.stateGroup .alt-composit {
|
|
894
|
-
fill: #e0e0e0;
|
|
895
|
-
border-bottom: 1px
|
|
896
|
-
}
|
|
897
|
-
|
|
898
|
-
.state-note {
|
|
899
|
-
stroke: ${t.noteBorderColor};
|
|
900
|
-
fill: ${t.noteBkgColor};
|
|
901
|
-
|
|
902
|
-
text {
|
|
903
|
-
fill: ${t.noteTextColor};
|
|
904
|
-
stroke: none;
|
|
905
|
-
font-size: 10px;
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
.stateLabel .box {
|
|
910
|
-
stroke: none;
|
|
911
|
-
stroke-width: 0;
|
|
912
|
-
fill: ${t.mainBkg};
|
|
913
|
-
opacity: 0.5;
|
|
914
|
-
}
|
|
915
|
-
|
|
916
|
-
.edgeLabel .label rect {
|
|
917
|
-
fill: ${t.labelBackgroundColor};
|
|
918
|
-
opacity: 0.5;
|
|
919
|
-
}
|
|
920
|
-
.edgeLabel .label text {
|
|
921
|
-
fill: ${t.transitionLabelColor||t.tertiaryTextColor};
|
|
922
|
-
}
|
|
923
|
-
.label div .edgeLabel {
|
|
924
|
-
color: ${t.transitionLabelColor||t.tertiaryTextColor};
|
|
925
|
-
}
|
|
926
|
-
|
|
927
|
-
.stateLabel text {
|
|
928
|
-
fill: ${t.stateLabelColor};
|
|
929
|
-
font-size: 10px;
|
|
930
|
-
font-weight: bold;
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
.node circle.state-start {
|
|
934
|
-
fill: ${t.specialStateColor};
|
|
935
|
-
stroke: ${t.specialStateColor};
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
.node .fork-join {
|
|
939
|
-
fill: ${t.specialStateColor};
|
|
940
|
-
stroke: ${t.specialStateColor};
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
.node circle.state-end {
|
|
944
|
-
fill: ${t.innerEndBackground};
|
|
945
|
-
stroke: ${t.background};
|
|
946
|
-
stroke-width: 1.5
|
|
947
|
-
}
|
|
948
|
-
.end-state-inner {
|
|
949
|
-
fill: ${t.compositeBackground||t.background};
|
|
950
|
-
// stroke: ${t.background};
|
|
951
|
-
stroke-width: 1.5
|
|
952
|
-
}
|
|
953
|
-
|
|
954
|
-
.node rect {
|
|
955
|
-
fill: ${t.stateBkg||t.mainBkg};
|
|
956
|
-
stroke: ${t.stateBorder||t.nodeBorder};
|
|
957
|
-
stroke-width: 1px;
|
|
958
|
-
}
|
|
959
|
-
.node polygon {
|
|
960
|
-
fill: ${t.mainBkg};
|
|
961
|
-
stroke: ${t.stateBorder||t.nodeBorder};;
|
|
962
|
-
stroke-width: 1px;
|
|
963
|
-
}
|
|
964
|
-
#statediagram-barbEnd {
|
|
965
|
-
fill: ${t.lineColor};
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
.statediagram-cluster rect {
|
|
969
|
-
fill: ${t.compositeTitleBackground};
|
|
970
|
-
stroke: ${t.stateBorder||t.nodeBorder};
|
|
971
|
-
stroke-width: 1px;
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
.cluster-label, .nodeLabel {
|
|
975
|
-
color: ${t.stateLabelColor};
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
.statediagram-cluster rect.outer {
|
|
979
|
-
rx: 5px;
|
|
980
|
-
ry: 5px;
|
|
981
|
-
}
|
|
982
|
-
.statediagram-state .divider {
|
|
983
|
-
stroke: ${t.stateBorder||t.nodeBorder};
|
|
984
|
-
}
|
|
985
|
-
|
|
986
|
-
.statediagram-state .title-state {
|
|
987
|
-
rx: 5px;
|
|
988
|
-
ry: 5px;
|
|
989
|
-
}
|
|
990
|
-
.statediagram-cluster.statediagram-cluster .inner {
|
|
991
|
-
fill: ${t.compositeBackground||t.background};
|
|
992
|
-
}
|
|
993
|
-
.statediagram-cluster.statediagram-cluster-alt .inner {
|
|
994
|
-
fill: ${t.altBackground?t.altBackground:"#efefef"};
|
|
995
|
-
}
|
|
996
|
-
|
|
997
|
-
.statediagram-cluster .inner {
|
|
998
|
-
rx:0;
|
|
999
|
-
ry:0;
|
|
1000
|
-
}
|
|
1001
|
-
|
|
1002
|
-
.statediagram-state rect.basic {
|
|
1003
|
-
rx: 5px;
|
|
1004
|
-
ry: 5px;
|
|
1005
|
-
}
|
|
1006
|
-
.statediagram-state rect.divider {
|
|
1007
|
-
stroke-dasharray: 10,10;
|
|
1008
|
-
fill: ${t.altBackground?t.altBackground:"#efefef"};
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
.note-edge {
|
|
1012
|
-
stroke-dasharray: 5;
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
.statediagram-note rect {
|
|
1016
|
-
fill: ${t.noteBkgColor};
|
|
1017
|
-
stroke: ${t.noteBorderColor};
|
|
1018
|
-
stroke-width: 1px;
|
|
1019
|
-
rx: 0;
|
|
1020
|
-
ry: 0;
|
|
1021
|
-
}
|
|
1022
|
-
.statediagram-note rect {
|
|
1023
|
-
fill: ${t.noteBkgColor};
|
|
1024
|
-
stroke: ${t.noteBorderColor};
|
|
1025
|
-
stroke-width: 1px;
|
|
1026
|
-
rx: 0;
|
|
1027
|
-
ry: 0;
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
.statediagram-note text {
|
|
1031
|
-
fill: ${t.noteTextColor};
|
|
1032
|
-
}
|
|
1033
|
-
|
|
1034
|
-
.statediagram-note .nodeLabel {
|
|
1035
|
-
color: ${t.noteTextColor};
|
|
1036
|
-
}
|
|
1037
|
-
.statediagram .edgeLabel {
|
|
1038
|
-
color: red; // ${t.noteTextColor};
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
#dependencyStart, #dependencyEnd {
|
|
1042
|
-
fill: ${t.lineColor};
|
|
1043
|
-
stroke: ${t.lineColor};
|
|
1044
|
-
stroke-width: 1;
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
.statediagramTitleText {
|
|
1048
|
-
text-anchor: middle;
|
|
1049
|
-
font-size: 18px;
|
|
1050
|
-
fill: ${t.textColor};
|
|
1051
|
-
}
|
|
1052
|
-
`,y1=t=>`.label {
|
|
1053
|
-
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
1054
|
-
font-family: var(--mermaid-font-family);
|
|
1055
|
-
color: ${t.textColor};
|
|
1056
|
-
}
|
|
1057
|
-
.mouth {
|
|
1058
|
-
stroke: #666;
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
line {
|
|
1062
|
-
stroke: ${t.textColor}
|
|
1063
|
-
}
|
|
1064
|
-
|
|
1065
|
-
.legend {
|
|
1066
|
-
fill: ${t.textColor};
|
|
1067
|
-
}
|
|
1068
|
-
|
|
1069
|
-
.label text {
|
|
1070
|
-
fill: #333;
|
|
1071
|
-
}
|
|
1072
|
-
.label {
|
|
1073
|
-
color: ${t.textColor}
|
|
1074
|
-
}
|
|
1075
|
-
|
|
1076
|
-
.face {
|
|
1077
|
-
${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};
|
|
1078
|
-
stroke: #999;
|
|
1079
|
-
}
|
|
1080
|
-
|
|
1081
|
-
.node rect,
|
|
1082
|
-
.node circle,
|
|
1083
|
-
.node ellipse,
|
|
1084
|
-
.node polygon,
|
|
1085
|
-
.node path {
|
|
1086
|
-
fill: ${t.mainBkg};
|
|
1087
|
-
stroke: ${t.nodeBorder};
|
|
1088
|
-
stroke-width: 1px;
|
|
1089
|
-
}
|
|
1090
|
-
|
|
1091
|
-
.node .label {
|
|
1092
|
-
text-align: center;
|
|
1093
|
-
}
|
|
1094
|
-
.node.clickable {
|
|
1095
|
-
cursor: pointer;
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
.arrowheadPath {
|
|
1099
|
-
fill: ${t.arrowheadColor};
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
|
-
.edgePath .path {
|
|
1103
|
-
stroke: ${t.lineColor};
|
|
1104
|
-
stroke-width: 1.5px;
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
|
-
.flowchart-link {
|
|
1108
|
-
stroke: ${t.lineColor};
|
|
1109
|
-
fill: none;
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
.edgeLabel {
|
|
1113
|
-
background-color: ${t.edgeLabelBackground};
|
|
1114
|
-
rect {
|
|
1115
|
-
opacity: 0.5;
|
|
1116
|
-
}
|
|
1117
|
-
text-align: center;
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
|
-
.cluster rect {
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
.cluster text {
|
|
1124
|
-
fill: ${t.titleColor};
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
div.mermaidTooltip {
|
|
1128
|
-
position: absolute;
|
|
1129
|
-
text-align: center;
|
|
1130
|
-
max-width: 200px;
|
|
1131
|
-
padding: 2px;
|
|
1132
|
-
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
1133
|
-
font-family: var(--mermaid-font-family);
|
|
1134
|
-
font-size: 12px;
|
|
1135
|
-
background: ${t.tertiaryColor};
|
|
1136
|
-
border: 1px solid ${t.border2};
|
|
1137
|
-
border-radius: 2px;
|
|
1138
|
-
pointer-events: none;
|
|
1139
|
-
z-index: 100;
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1142
|
-
.task-type-0, .section-type-0 {
|
|
1143
|
-
${t.fillType0?`fill: ${t.fillType0}`:""};
|
|
1144
|
-
}
|
|
1145
|
-
.task-type-1, .section-type-1 {
|
|
1146
|
-
${t.fillType0?`fill: ${t.fillType1}`:""};
|
|
1147
|
-
}
|
|
1148
|
-
.task-type-2, .section-type-2 {
|
|
1149
|
-
${t.fillType0?`fill: ${t.fillType2}`:""};
|
|
1150
|
-
}
|
|
1151
|
-
.task-type-3, .section-type-3 {
|
|
1152
|
-
${t.fillType0?`fill: ${t.fillType3}`:""};
|
|
1153
|
-
}
|
|
1154
|
-
.task-type-4, .section-type-4 {
|
|
1155
|
-
${t.fillType0?`fill: ${t.fillType4}`:""};
|
|
1156
|
-
}
|
|
1157
|
-
.task-type-5, .section-type-5 {
|
|
1158
|
-
${t.fillType0?`fill: ${t.fillType5}`:""};
|
|
1159
|
-
}
|
|
1160
|
-
.task-type-6, .section-type-6 {
|
|
1161
|
-
${t.fillType0?`fill: ${t.fillType6}`:""};
|
|
1162
|
-
}
|
|
1163
|
-
.task-type-7, .section-type-7 {
|
|
1164
|
-
${t.fillType0?`fill: ${t.fillType7}`:""};
|
|
1165
|
-
}
|
|
1166
|
-
|
|
1167
|
-
.actor-0 {
|
|
1168
|
-
${t.actor0?`fill: ${t.actor0}`:""};
|
|
1169
|
-
}
|
|
1170
|
-
.actor-1 {
|
|
1171
|
-
${t.actor1?`fill: ${t.actor1}`:""};
|
|
1172
|
-
}
|
|
1173
|
-
.actor-2 {
|
|
1174
|
-
${t.actor2?`fill: ${t.actor2}`:""};
|
|
1175
|
-
}
|
|
1176
|
-
.actor-3 {
|
|
1177
|
-
${t.actor3?`fill: ${t.actor3}`:""};
|
|
1178
|
-
}
|
|
1179
|
-
.actor-4 {
|
|
1180
|
-
${t.actor4?`fill: ${t.actor4}`:""};
|
|
1181
|
-
}
|
|
1182
|
-
.actor-5 {
|
|
1183
|
-
${t.actor5?`fill: ${t.actor5}`:""};
|
|
1184
|
-
}
|
|
1185
|
-
`,m1=t=>`.person {
|
|
1186
|
-
stroke: ${t.personBorder};
|
|
1187
|
-
fill: ${t.personBkg};
|
|
1188
|
-
}
|
|
1189
|
-
`,Oa={flowchart:Ra,"flowchart-v2":Ra,sequence:g1,gantt:u1,classDiagram:Vn,"classDiagram-v2":Vn,class:Vn,stateDiagram:Na,state:Na,info:d1,pie:f1,er:h1,error:Qo,journey:y1,requirement:p1,c4:m1},Lf=(t,e,i)=>{let r="";return t in Oa&&Oa[t]?r=Oa[t](i):k.warn(`No theme found for ${t}`),` & {
|
|
1190
|
-
font-family: ${i.fontFamily};
|
|
1191
|
-
font-size: ${i.fontSize};
|
|
1192
|
-
fill: ${i.textColor}
|
|
1193
|
-
}
|
|
1194
|
-
|
|
1195
|
-
/* Classes common for multiple diagrams */
|
|
1196
|
-
|
|
1197
|
-
& .error-icon {
|
|
1198
|
-
fill: ${i.errorBkgColor};
|
|
1199
|
-
}
|
|
1200
|
-
& .error-text {
|
|
1201
|
-
fill: ${i.errorTextColor};
|
|
1202
|
-
stroke: ${i.errorTextColor};
|
|
1203
|
-
}
|
|
1204
|
-
|
|
1205
|
-
& .edge-thickness-normal {
|
|
1206
|
-
stroke-width: 2px;
|
|
1207
|
-
}
|
|
1208
|
-
& .edge-thickness-thick {
|
|
1209
|
-
stroke-width: 3.5px
|
|
1210
|
-
}
|
|
1211
|
-
& .edge-pattern-solid {
|
|
1212
|
-
stroke-dasharray: 0;
|
|
1213
|
-
}
|
|
1214
|
-
|
|
1215
|
-
& .edge-pattern-dashed{
|
|
1216
|
-
stroke-dasharray: 3;
|
|
1217
|
-
}
|
|
1218
|
-
.edge-pattern-dotted {
|
|
1219
|
-
stroke-dasharray: 2;
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
& .marker {
|
|
1223
|
-
fill: ${i.lineColor};
|
|
1224
|
-
stroke: ${i.lineColor};
|
|
1225
|
-
}
|
|
1226
|
-
& .marker.cross {
|
|
1227
|
-
stroke: ${i.lineColor};
|
|
1228
|
-
}
|
|
1229
|
-
|
|
1230
|
-
& svg {
|
|
1231
|
-
font-family: ${i.fontFamily};
|
|
1232
|
-
font-size: ${i.fontSize};
|
|
1233
|
-
}
|
|
1234
|
-
|
|
1235
|
-
${r}
|
|
1236
|
-
|
|
1237
|
-
${e}
|
|
1238
|
-
`},Bf=(t,e)=>{Oa[t]=e},Df=Lf;let Jo="",Fa="",$o="";const tl=t=>je(t,P()),ar=function(){Jo="",$o="",Fa=""},or=function(t){Jo=tl(t).replace(/^\s+/g,"")},fr=function(){return Jo||Fa},pr=function(t){$o=tl(t).replace(/\n\s+/g,`
|
|
1239
|
-
`)},gr=function(){return $o},Ir=function(t){Fa=tl(t)},Rr=function(){return Fa},b1=Object.freeze(Object.defineProperty({__proto__:null,clear:ar,default:{setAccTitle:or,getAccTitle:fr,setDiagramTitle:Ir,getDiagramTitle:Rr,getAccDescription:gr,setAccDescription:pr,clear:ar},getAccDescription:gr,getAccTitle:fr,getDiagramTitle:Rr,setAccDescription:pr,setAccTitle:or,setDiagramTitle:Ir},Symbol.toStringTag,{value:"Module"}));let Qs={};const el=function(t,e,i,r){k.debug("parseDirective is being called",e,i,r);try{if(e!==void 0)switch(e=e.trim(),i){case"open_directive":Qs={};break;case"type_directive":if(!Qs)throw new Error("currentDirective is undefined");Qs.type=e.toLowerCase();break;case"arg_directive":if(!Qs)throw new Error("currentDirective is undefined");Qs.args=JSON.parse(e);break;case"close_directive":If(t,Qs,r),Qs=void 0;break}}catch(s){k.error(`Error while rendering sequenceDiagram directive: ${e} jison context: ${i}`),k.error(s.message)}},If=function(t,e,i){switch(k.info(`Directive type=${e.type} with args:`,e.args),e.type){case"init":case"initialize":{["config"].forEach(r=>{e.args[r]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),e.args[i]=e.args[r],delete e.args[r])}),k.info("sanitize in handleDirective",e.args),Ks(e.args),k.info("sanitize in handleDirective (done)",e.args),Ko(e.args);break}case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap(e.type==="wrap");break;case"themeCss":k.warn("themeCss encountered");break;default:k.warn(`Unhandled directive: source: '%%{${e.type}: ${JSON.stringify(e.args?e.args:{})}}%%`,e);break}},Rf=k,Nf=Ae,Yn=P,Of=t=>je(t,Yn()),x1=Pn,Ff=()=>b1,Mf=(t,e,i,r)=>el(t,e,i,r),Ma={},Ai=(t,e,i)=>{if(Ma[t])throw new Error(`Diagram ${t} already registered.`);Ma[t]=e,i&&Qc(t,i),Bf(t,e.styles),e.injectUtils&&e.injectUtils(Rf,Nf,Yn,Of,x1,Ff(),Mf)},k1=t=>{if(t in Ma)return Ma[t];throw new Error(`Diagram ${t} not found.`)};var il=function(){var t=function(F,v,L,w){for(L=L||{},w=F.length;w--;L[F[w]]=v);return L},e=[1,4],i=[1,7],r=[1,5],s=[1,9],n=[1,6],a=[2,6],o=[1,16],l=[6,8,14,20,22,24,25,27,29,32,37,40,50,55],h=[8,14,20,22,24,25,27,29,32,37,40],u=[8,13,14,20,22,24,25,27,29,32,37,40],d=[1,26],f=[6,8,14,50,55],p=[8,14,55],x=[1,53],E=[1,52],T=[8,14,30,33,35,38,55],S=[1,67],_=[1,68],D=[1,69],z=[8,14,33,35,42,55],H={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,GG:6,document:7,EOF:8,":":9,DIR:10,options:11,body:12,OPT:13,NL:14,line:15,statement:16,commitStatement:17,mergeStatement:18,cherryPickStatement:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,branchStatement:26,CHECKOUT:27,ref:28,BRANCH:29,ORDER:30,NUM:31,CHERRY_PICK:32,COMMIT_ID:33,STR:34,COMMIT_TAG:35,EMPTYSTR:36,MERGE:37,COMMIT_TYPE:38,commitType:39,COMMIT:40,commit_arg:41,COMMIT_MSG:42,NORMAL:43,REVERSE:44,HIGHLIGHT:45,openDirective:46,typeDirective:47,closeDirective:48,argDirective:49,open_directive:50,type_directive:51,arg_directive:52,close_directive:53,ID:54,";":55,$accept:0,$end:1},terminals_:{2:"error",6:"GG",8:"EOF",9:":",10:"DIR",13:"OPT",14:"NL",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"CHECKOUT",29:"BRANCH",30:"ORDER",31:"NUM",32:"CHERRY_PICK",33:"COMMIT_ID",34:"STR",35:"COMMIT_TAG",36:"EMPTYSTR",37:"MERGE",38:"COMMIT_TYPE",40:"COMMIT",42:"COMMIT_MSG",43:"NORMAL",44:"REVERSE",45:"HIGHLIGHT",50:"open_directive",51:"type_directive",52:"arg_directive",53:"close_directive",54:"ID",55:";"},productions_:[0,[3,2],[3,2],[3,3],[3,4],[3,5],[7,0],[7,2],[11,2],[11,1],[12,0],[12,2],[15,2],[15,1],[16,1],[16,1],[16,1],[16,2],[16,2],[16,1],[16,1],[16,1],[16,2],[26,2],[26,4],[19,3],[19,5],[19,5],[19,5],[19,5],[18,2],[18,4],[18,4],[18,4],[18,6],[18,6],[18,6],[18,6],[18,6],[18,6],[18,8],[18,8],[18,8],[18,8],[18,8],[18,8],[17,2],[17,3],[17,3],[17,5],[17,5],[17,3],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,3],[17,5],[17,5],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[41,0],[41,1],[39,1],[39,1],[39,1],[5,3],[5,5],[46,1],[47,1],[49,1],[48,1],[28,1],[28,1],[4,1],[4,1],[4,1]],performAction:function(v,L,w,m,B,g,O){var y=g.length-1;switch(B){case 3:return g[y];case 4:return g[y-1];case 5:return m.setDirection(g[y-3]),g[y-1];case 7:m.setOptions(g[y-1]),this.$=g[y];break;case 8:g[y-1]+=g[y],this.$=g[y-1];break;case 10:this.$=[];break;case 11:g[y-1].push(g[y]),this.$=g[y-1];break;case 12:this.$=g[y-1];break;case 17:this.$=g[y].trim(),m.setAccTitle(this.$);break;case 18:case 19:this.$=g[y].trim(),m.setAccDescription(this.$);break;case 20:m.addSection(g[y].substr(8)),this.$=g[y].substr(8);break;case 22:m.checkout(g[y]);break;case 23:m.branch(g[y]);break;case 24:m.branch(g[y-2],g[y]);break;case 25:m.cherryPick(g[y],"",void 0);break;case 26:m.cherryPick(g[y-2],"",g[y]);break;case 27:case 29:m.cherryPick(g[y-2],"","");break;case 28:m.cherryPick(g[y],"",g[y-2]);break;case 30:m.merge(g[y],"","","");break;case 31:m.merge(g[y-2],g[y],"","");break;case 32:m.merge(g[y-2],"",g[y],"");break;case 33:m.merge(g[y-2],"","",g[y]);break;case 34:m.merge(g[y-4],g[y],"",g[y-2]);break;case 35:m.merge(g[y-4],"",g[y],g[y-2]);break;case 36:m.merge(g[y-4],"",g[y-2],g[y]);break;case 37:m.merge(g[y-4],g[y-2],g[y],"");break;case 38:m.merge(g[y-4],g[y-2],"",g[y]);break;case 39:m.merge(g[y-4],g[y],g[y-2],"");break;case 40:m.merge(g[y-6],g[y-4],g[y-2],g[y]);break;case 41:m.merge(g[y-6],g[y],g[y-4],g[y-2]);break;case 42:m.merge(g[y-6],g[y-4],g[y],g[y-2]);break;case 43:m.merge(g[y-6],g[y-2],g[y-4],g[y]);break;case 44:m.merge(g[y-6],g[y],g[y-2],g[y-4]);break;case 45:m.merge(g[y-6],g[y-2],g[y],g[y-4]);break;case 46:m.commit(g[y]);break;case 47:m.commit("","",m.commitType.NORMAL,g[y]);break;case 48:m.commit("","",g[y],"");break;case 49:m.commit("","",g[y],g[y-2]);break;case 50:m.commit("","",g[y-2],g[y]);break;case 51:m.commit("",g[y],m.commitType.NORMAL,"");break;case 52:m.commit("",g[y-2],m.commitType.NORMAL,g[y]);break;case 53:m.commit("",g[y],m.commitType.NORMAL,g[y-2]);break;case 54:m.commit("",g[y-2],g[y],"");break;case 55:m.commit("",g[y],g[y-2],"");break;case 56:m.commit("",g[y-4],g[y-2],g[y]);break;case 57:m.commit("",g[y-4],g[y],g[y-2]);break;case 58:m.commit("",g[y-2],g[y-4],g[y]);break;case 59:m.commit("",g[y],g[y-4],g[y-2]);break;case 60:m.commit("",g[y],g[y-2],g[y-4]);break;case 61:m.commit("",g[y-2],g[y],g[y-4]);break;case 62:m.commit(g[y],"",m.commitType.NORMAL,"");break;case 63:m.commit(g[y],"",m.commitType.NORMAL,g[y-2]);break;case 64:m.commit(g[y-2],"",m.commitType.NORMAL,g[y]);break;case 65:m.commit(g[y-2],"",g[y],"");break;case 66:m.commit(g[y],"",g[y-2],"");break;case 67:m.commit(g[y],g[y-2],m.commitType.NORMAL,"");break;case 68:m.commit(g[y-2],g[y],m.commitType.NORMAL,"");break;case 69:m.commit(g[y-4],"",g[y-2],g[y]);break;case 70:m.commit(g[y-4],"",g[y],g[y-2]);break;case 71:m.commit(g[y-2],"",g[y-4],g[y]);break;case 72:m.commit(g[y],"",g[y-4],g[y-2]);break;case 73:m.commit(g[y],"",g[y-2],g[y-4]);break;case 74:m.commit(g[y-2],"",g[y],g[y-4]);break;case 75:m.commit(g[y-4],g[y],g[y-2],"");break;case 76:m.commit(g[y-4],g[y-2],g[y],"");break;case 77:m.commit(g[y-2],g[y],g[y-4],"");break;case 78:m.commit(g[y],g[y-2],g[y-4],"");break;case 79:m.commit(g[y],g[y-4],g[y-2],"");break;case 80:m.commit(g[y-2],g[y-4],g[y],"");break;case 81:m.commit(g[y-4],g[y],m.commitType.NORMAL,g[y-2]);break;case 82:m.commit(g[y-4],g[y-2],m.commitType.NORMAL,g[y]);break;case 83:m.commit(g[y-2],g[y],m.commitType.NORMAL,g[y-4]);break;case 84:m.commit(g[y],g[y-2],m.commitType.NORMAL,g[y-4]);break;case 85:m.commit(g[y],g[y-4],m.commitType.NORMAL,g[y-2]);break;case 86:m.commit(g[y-2],g[y-4],m.commitType.NORMAL,g[y]);break;case 87:m.commit(g[y-6],g[y-4],g[y-2],g[y]);break;case 88:m.commit(g[y-6],g[y-4],g[y],g[y-2]);break;case 89:m.commit(g[y-6],g[y-2],g[y-4],g[y]);break;case 90:m.commit(g[y-6],g[y],g[y-4],g[y-2]);break;case 91:m.commit(g[y-6],g[y-2],g[y],g[y-4]);break;case 92:m.commit(g[y-6],g[y],g[y-2],g[y-4]);break;case 93:m.commit(g[y-4],g[y-6],g[y-2],g[y]);break;case 94:m.commit(g[y-4],g[y-6],g[y],g[y-2]);break;case 95:m.commit(g[y-2],g[y-6],g[y-4],g[y]);break;case 96:m.commit(g[y],g[y-6],g[y-4],g[y-2]);break;case 97:m.commit(g[y-2],g[y-6],g[y],g[y-4]);break;case 98:m.commit(g[y],g[y-6],g[y-2],g[y-4]);break;case 99:m.commit(g[y],g[y-4],g[y-2],g[y-6]);break;case 100:m.commit(g[y-2],g[y-4],g[y],g[y-6]);break;case 101:m.commit(g[y],g[y-2],g[y-4],g[y-6]);break;case 102:m.commit(g[y-2],g[y],g[y-4],g[y-6]);break;case 103:m.commit(g[y-4],g[y-2],g[y],g[y-6]);break;case 104:m.commit(g[y-4],g[y],g[y-2],g[y-6]);break;case 105:m.commit(g[y-2],g[y-4],g[y-6],g[y]);break;case 106:m.commit(g[y],g[y-4],g[y-6],g[y-2]);break;case 107:m.commit(g[y-2],g[y],g[y-6],g[y-4]);break;case 108:m.commit(g[y],g[y-2],g[y-6],g[y-4]);break;case 109:m.commit(g[y-4],g[y-2],g[y-6],g[y]);break;case 110:m.commit(g[y-4],g[y],g[y-6],g[y-2]);break;case 111:this.$="";break;case 112:this.$=g[y];break;case 113:this.$=m.commitType.NORMAL;break;case 114:this.$=m.commitType.REVERSE;break;case 115:this.$=m.commitType.HIGHLIGHT;break;case 118:m.parseDirective("%%{","open_directive");break;case 119:m.parseDirective(g[y],"type_directive");break;case 120:g[y]=g[y].trim().replace(/'/g,'"'),m.parseDirective(g[y],"arg_directive");break;case 121:m.parseDirective("}%%","close_directive","gitGraph");break}},table:[{3:1,4:2,5:3,6:e,8:i,14:r,46:8,50:s,55:n},{1:[3]},{3:10,4:2,5:3,6:e,8:i,14:r,46:8,50:s,55:n},{3:11,4:2,5:3,6:e,8:i,14:r,46:8,50:s,55:n},{7:12,8:a,9:[1,13],10:[1,14],11:15,14:o},t(l,[2,124]),t(l,[2,125]),t(l,[2,126]),{47:17,51:[1,18]},{51:[2,118]},{1:[2,1]},{1:[2,2]},{8:[1,19]},{7:20,8:a,11:15,14:o},{9:[1,21]},t(h,[2,10],{12:22,13:[1,23]}),t(u,[2,9]),{9:[1,25],48:24,53:d},t([9,53],[2,119]),{1:[2,3]},{8:[1,27]},{7:28,8:a,11:15,14:o},{8:[2,7],14:[1,31],15:29,16:30,17:32,18:33,19:34,20:[1,35],22:[1,36],24:[1,37],25:[1,38],26:39,27:[1,40],29:[1,44],32:[1,43],37:[1,42],40:[1,41]},t(u,[2,8]),t(f,[2,116]),{49:45,52:[1,46]},t(f,[2,121]),{1:[2,4]},{8:[1,47]},t(h,[2,11]),{4:48,8:i,14:r,55:n},t(h,[2,13]),t(p,[2,14]),t(p,[2,15]),t(p,[2,16]),{21:[1,49]},{23:[1,50]},t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),{28:51,34:x,54:E},t(p,[2,111],{41:54,33:[1,57],34:[1,59],35:[1,55],38:[1,56],42:[1,58]}),{28:60,34:x,54:E},{33:[1,61],35:[1,62]},{28:63,34:x,54:E},{48:64,53:d},{53:[2,120]},{1:[2,5]},t(h,[2,12]),t(p,[2,17]),t(p,[2,18]),t(p,[2,22]),t(T,[2,122]),t(T,[2,123]),t(p,[2,46]),{34:[1,65]},{39:66,43:S,44:_,45:D},{34:[1,70]},{34:[1,71]},t(p,[2,112]),t(p,[2,30],{33:[1,72],35:[1,74],38:[1,73]}),{34:[1,75]},{34:[1,76],36:[1,77]},t(p,[2,23],{30:[1,78]}),t(f,[2,117]),t(p,[2,47],{33:[1,80],38:[1,79],42:[1,81]}),t(p,[2,48],{33:[1,83],35:[1,82],42:[1,84]}),t(z,[2,113]),t(z,[2,114]),t(z,[2,115]),t(p,[2,51],{35:[1,85],38:[1,86],42:[1,87]}),t(p,[2,62],{33:[1,90],35:[1,88],38:[1,89]}),{34:[1,91]},{39:92,43:S,44:_,45:D},{34:[1,93]},t(p,[2,25],{35:[1,94]}),{33:[1,95]},{33:[1,96]},{31:[1,97]},{39:98,43:S,44:_,45:D},{34:[1,99]},{34:[1,100]},{34:[1,101]},{34:[1,102]},{34:[1,103]},{34:[1,104]},{39:105,43:S,44:_,45:D},{34:[1,106]},{34:[1,107]},{39:108,43:S,44:_,45:D},{34:[1,109]},t(p,[2,31],{35:[1,111],38:[1,110]}),t(p,[2,32],{33:[1,113],35:[1,112]}),t(p,[2,33],{33:[1,114],38:[1,115]}),{34:[1,116],36:[1,117]},{34:[1,118]},{34:[1,119]},t(p,[2,24]),t(p,[2,49],{33:[1,120],42:[1,121]}),t(p,[2,53],{38:[1,122],42:[1,123]}),t(p,[2,63],{33:[1,125],38:[1,124]}),t(p,[2,50],{33:[1,126],42:[1,127]}),t(p,[2,55],{35:[1,128],42:[1,129]}),t(p,[2,66],{33:[1,131],35:[1,130]}),t(p,[2,52],{38:[1,132],42:[1,133]}),t(p,[2,54],{35:[1,134],42:[1,135]}),t(p,[2,67],{35:[1,137],38:[1,136]}),t(p,[2,64],{33:[1,139],38:[1,138]}),t(p,[2,65],{33:[1,141],35:[1,140]}),t(p,[2,68],{35:[1,143],38:[1,142]}),{39:144,43:S,44:_,45:D},{34:[1,145]},{34:[1,146]},{34:[1,147]},{34:[1,148]},{39:149,43:S,44:_,45:D},t(p,[2,26]),t(p,[2,27]),t(p,[2,28]),t(p,[2,29]),{34:[1,150]},{34:[1,151]},{39:152,43:S,44:_,45:D},{34:[1,153]},{39:154,43:S,44:_,45:D},{34:[1,155]},{34:[1,156]},{34:[1,157]},{34:[1,158]},{34:[1,159]},{34:[1,160]},{34:[1,161]},{39:162,43:S,44:_,45:D},{34:[1,163]},{34:[1,164]},{34:[1,165]},{39:166,43:S,44:_,45:D},{34:[1,167]},{39:168,43:S,44:_,45:D},{34:[1,169]},{34:[1,170]},{34:[1,171]},{39:172,43:S,44:_,45:D},{34:[1,173]},t(p,[2,37],{35:[1,174]}),t(p,[2,38],{38:[1,175]}),t(p,[2,36],{33:[1,176]}),t(p,[2,39],{35:[1,177]}),t(p,[2,34],{38:[1,178]}),t(p,[2,35],{33:[1,179]}),t(p,[2,60],{42:[1,180]}),t(p,[2,73],{33:[1,181]}),t(p,[2,61],{42:[1,182]}),t(p,[2,84],{38:[1,183]}),t(p,[2,74],{33:[1,184]}),t(p,[2,83],{38:[1,185]}),t(p,[2,59],{42:[1,186]}),t(p,[2,72],{33:[1,187]}),t(p,[2,58],{42:[1,188]}),t(p,[2,78],{35:[1,189]}),t(p,[2,71],{33:[1,190]}),t(p,[2,77],{35:[1,191]}),t(p,[2,57],{42:[1,192]}),t(p,[2,85],{38:[1,193]}),t(p,[2,56],{42:[1,194]}),t(p,[2,79],{35:[1,195]}),t(p,[2,80],{35:[1,196]}),t(p,[2,86],{38:[1,197]}),t(p,[2,70],{33:[1,198]}),t(p,[2,81],{38:[1,199]}),t(p,[2,69],{33:[1,200]}),t(p,[2,75],{35:[1,201]}),t(p,[2,76],{35:[1,202]}),t(p,[2,82],{38:[1,203]}),{34:[1,204]},{39:205,43:S,44:_,45:D},{34:[1,206]},{34:[1,207]},{39:208,43:S,44:_,45:D},{34:[1,209]},{34:[1,210]},{34:[1,211]},{34:[1,212]},{39:213,43:S,44:_,45:D},{34:[1,214]},{39:215,43:S,44:_,45:D},{34:[1,216]},{34:[1,217]},{34:[1,218]},{34:[1,219]},{34:[1,220]},{34:[1,221]},{34:[1,222]},{39:223,43:S,44:_,45:D},{34:[1,224]},{34:[1,225]},{34:[1,226]},{39:227,43:S,44:_,45:D},{34:[1,228]},{39:229,43:S,44:_,45:D},{34:[1,230]},{34:[1,231]},{34:[1,232]},{39:233,43:S,44:_,45:D},t(p,[2,40]),t(p,[2,42]),t(p,[2,41]),t(p,[2,43]),t(p,[2,45]),t(p,[2,44]),t(p,[2,101]),t(p,[2,102]),t(p,[2,99]),t(p,[2,100]),t(p,[2,104]),t(p,[2,103]),t(p,[2,108]),t(p,[2,107]),t(p,[2,106]),t(p,[2,105]),t(p,[2,110]),t(p,[2,109]),t(p,[2,98]),t(p,[2,97]),t(p,[2,96]),t(p,[2,95]),t(p,[2,93]),t(p,[2,94]),t(p,[2,92]),t(p,[2,91]),t(p,[2,90]),t(p,[2,89]),t(p,[2,87]),t(p,[2,88])],defaultActions:{9:[2,118],10:[2,1],11:[2,2],19:[2,3],27:[2,4],46:[2,120],47:[2,5]},parseError:function(v,L){if(L.recoverable)this.trace(v);else{var w=new Error(v);throw w.hash=L,w}},parse:function(v){var L=this,w=[0],m=[],B=[null],g=[],O=this.table,y="",Y=0,wt=0,at=2,st=1,nt=g.slice.call(arguments,1),et=Object.create(this.lexer),tt={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(tt.yy[Tt]=this.yy[Tt]);et.setInput(v,tt.yy),tt.yy.lexer=et,tt.yy.parser=this,typeof et.yylloc>"u"&&(et.yylloc={});var bt=et.yylloc;g.push(bt);var Z=et.options&&et.options.ranges;typeof tt.yy.parseError=="function"?this.parseError=tt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function jt(){var Jt;return Jt=m.pop()||et.lex()||st,typeof Jt!="number"&&(Jt instanceof Array&&(m=Jt,Jt=m.pop()),Jt=L.symbols_[Jt]||Jt),Jt}for(var U,pt,$,K,N={},A,G,C,dt;;){if(pt=w[w.length-1],this.defaultActions[pt]?$=this.defaultActions[pt]:((U===null||typeof U>"u")&&(U=jt()),$=O[pt]&&O[pt][U]),typeof $>"u"||!$.length||!$[0]){var b="";dt=[];for(A in O[pt])this.terminals_[A]&&A>at&&dt.push("'"+this.terminals_[A]+"'");et.showPosition?b="Parse error on line "+(Y+1)+`:
|
|
1240
|
-
`+et.showPosition()+`
|
|
1241
|
-
Expecting `+dt.join(", ")+", got '"+(this.terminals_[U]||U)+"'":b="Parse error on line "+(Y+1)+": Unexpected "+(U==st?"end of input":"'"+(this.terminals_[U]||U)+"'"),this.parseError(b,{text:et.match,token:this.terminals_[U]||U,line:et.yylineno,loc:bt,expected:dt})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+pt+", token: "+U);switch($[0]){case 1:w.push(U),B.push(et.yytext),g.push(et.yylloc),w.push($[1]),U=null,wt=et.yyleng,y=et.yytext,Y=et.yylineno,bt=et.yylloc;break;case 2:if(G=this.productions_[$[1]][1],N.$=B[B.length-G],N._$={first_line:g[g.length-(G||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(G||1)].first_column,last_column:g[g.length-1].last_column},Z&&(N._$.range=[g[g.length-(G||1)].range[0],g[g.length-1].range[1]]),K=this.performAction.apply(N,[y,wt,Y,tt.yy,$[1],B,g].concat(nt)),typeof K<"u")return K;G&&(w=w.slice(0,-1*G*2),B=B.slice(0,-1*G),g=g.slice(0,-1*G)),w.push(this.productions_[$[1]][0]),B.push(N.$),g.push(N._$),C=O[w[w.length-2]][w[w.length-1]],w.push(C);break;case 3:return!0}}return!0}},it=function(){var F={EOF:1,parseError:function(L,w){if(this.yy.parser)this.yy.parser.parseError(L,w);else throw new Error(L)},setInput:function(v,L){return this.yy=L||this.yy||{},this._input=v,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},input:function(){var v=this._input[0];this.yytext+=v,this.yyleng++,this.offset++,this.match+=v,this.matched+=v;var L=v.match(/(?:\r\n?|\n).*/g);return L?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),v},unput:function(v){var L=v.length,w=v.split(/(?:\r\n?|\n)/g);this._input=v+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-L),this.offset-=L;var m=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),w.length-1&&(this.yylineno-=w.length-1);var B=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:w?(w.length===m.length?this.yylloc.first_column:0)+m[m.length-w.length].length-w[0].length:this.yylloc.first_column-L},this.options.ranges&&(this.yylloc.range=[B[0],B[0]+this.yyleng-L]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1242
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(v){this.unput(this.match.slice(v))},pastInput:function(){var v=this.matched.substr(0,this.matched.length-this.match.length);return(v.length>20?"...":"")+v.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var v=this.match;return v.length<20&&(v+=this._input.substr(0,20-v.length)),(v.substr(0,20)+(v.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var v=this.pastInput(),L=new Array(v.length+1).join("-");return v+this.upcomingInput()+`
|
|
1243
|
-
`+L+"^"},test_match:function(v,L){var w,m,B;if(this.options.backtrack_lexer&&(B={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&&(B.yylloc.range=this.yylloc.range.slice(0))),m=v[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+v[0].length},this.yytext+=v[0],this.match+=v[0],this.matches=v,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(v[0].length),this.matched+=v[0],w=this.performAction.call(this,this.yy,this,L,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),w)return w;if(this._backtrack){for(var g in B)this[g]=B[g];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var v,L,w,m;this._more||(this.yytext="",this.match="");for(var B=this._currentRules(),g=0;g<B.length;g++)if(w=this._input.match(this.rules[B[g]]),w&&(!L||w[0].length>L[0].length)){if(L=w,m=g,this.options.backtrack_lexer){if(v=this.test_match(w,B[g]),v!==!1)return v;if(this._backtrack){L=!1;continue}else return!1}else if(!this.options.flex)break}return L?(v=this.test_match(L,B[m]),v!==!1?v:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1244
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var L=this.next();return L||this.lex()},begin:function(L){this.conditionStack.push(L)},popState:function(){var L=this.conditionStack.length-1;return L>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(L){return L=this.conditionStack.length-1-Math.abs(L||0),L>=0?this.conditionStack[L]:"INITIAL"},pushState:function(L){this.begin(L)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(L,w,m,B){switch(m){case 0:return this.begin("open_directive"),50;case 1:return this.begin("type_directive"),51;case 2:return this.popState(),this.begin("arg_directive"),9;case 3:return this.popState(),this.popState(),53;case 4:return 52;case 5:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:return 14;case 13:break;case 14:break;case 15:return 6;case 16:return 40;case 17:return 33;case 18:return 38;case 19:return 42;case 20:return 43;case 21:return 44;case 22:return 45;case 23:return 35;case 24:return 29;case 25:return 30;case 26:return 37;case 27:return 32;case 28:return 27;case 29:return 10;case 30:return 10;case 31:return 9;case 32:return"CARET";case 33:this.begin("options");break;case 34:this.popState();break;case 35:return 13;case 36:return 36;case 37:this.begin("string");break;case 38:this.popState();break;case 39:return 34;case 40:return 31;case 41:return 54;case 42:return 8}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit(?=\s|$))/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch(?=\s|$))/i,/^(?:order:)/i,/^(?:merge(?=\s|$))/i,/^(?:cherry-pick(?=\s|$))/i,/^(?:checkout(?=\s|$))/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+(?=\s|$))/i,/^(?:\w([-\./\w]*[-\w])?)/i,/^(?:$)/i,/^(?:\s+)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},options:{rules:[34,35],inclusive:!1},string:{rules:[38,39],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,36,37,40,41,42,43],inclusive:!0}}};return F}();H.lexer=it;function R(){this.yy={}}return R.prototype=H,H.Parser=R,new R}();il.parser=il;const Pf=il,Vf=t=>t.match(/^\s*gitGraph/)!==null;let Pa=P().gitGraph.mainBranchName,Yf=P().gitGraph.mainBranchOrder,Li={},Qi=null,zn={};zn[Pa]={name:Pa,order:Yf};let Si={};Si[Pa]=Qi;let Oi=Pa,_1="LR",Js=0;function rl(){return e1({length:7})}const zf=function(t,e,i){si.parseDirective(this,t,e,i)};function Wf(t,e){const i=Object.create(null);return t.reduce((r,s)=>{const n=e(s);return i[n]||(i[n]=!0,r.push(s)),r},[])}const Uf=function(t){_1=t};let E1={};const Zf=function(t){k.debug("options str",t),t=t&&t.trim(),t=t||"{}";try{E1=JSON.parse(t)}catch(e){k.error("error while parsing gitGraph options",e.message)}},Hf=function(){return E1},Gf=function(t,e,i,r){k.debug("Entering commit:",t,e,i,r),e=Qt.sanitizeText(e,P()),t=Qt.sanitizeText(t,P()),r=Qt.sanitizeText(r,P());const s={id:e||Js+"-"+rl(),message:t,seq:Js++,type:i||Wn.NORMAL,tag:r||"",parents:Qi==null?[]:[Qi.id],branch:Oi};Qi=s,Li[s.id]=s,Si[Oi]=s.id,k.debug("in pushCommit "+s.id)},jf=function(t,e){if(t=Qt.sanitizeText(t,P()),Si[t]===void 0)Si[t]=Qi!=null?Qi.id:null,zn[t]={name:t,order:e?parseInt(e,10):null},v1(t),k.debug("in createBranch");else{let i=new Error('Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout '+t+'")');throw i.hash={text:"branch "+t,token:"branch "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+t+'"']},i}},qf=function(t,e,i,r){t=Qt.sanitizeText(t,P()),e=Qt.sanitizeText(e,P());const s=Li[Si[Oi]],n=Li[Si[t]];if(Oi===t){let o=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},o}else if(s===void 0||!s){let o=new Error('Incorrect usage of "merge". Current branch ('+Oi+")has no commits");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},o}else if(Si[t]===void 0){let o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+t]},o}else if(n===void 0||!n){let o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},o}else if(s===n){let o=new Error('Incorrect usage of "merge". Both branches have same head');throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},o}else if(e&&Li[e]!==void 0){let o=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom Id");throw o.hash={text:"merge "+t+e+i+r,token:"merge "+t+e+i+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+t+" "+e+"_UNIQUE "+i+" "+r]},o}const a={id:e||Js+"-"+rl(),message:"merged branch "+t+" into "+Oi,seq:Js++,parents:[Qi==null?null:Qi.id,Si[t]],branch:Oi,type:Wn.MERGE,customType:i,customId:!!e,tag:r||""};Qi=a,Li[a.id]=a,Si[Oi]=a.id,k.debug(Si),k.debug("in mergeBranch")},Xf=function(t,e,i){if(k.debug("Entering cherryPick:",t,e,i),t=Qt.sanitizeText(t,P()),e=Qt.sanitizeText(e,P()),i=Qt.sanitizeText(i,P()),!t||Li[t]===void 0){let n=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw n.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},n}let r=Li[t],s=r.branch;if(r.type===Wn.MERGE){let n=new Error('Incorrect usage of "cherryPick". Source commit should not be a merge commit');throw n.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},n}if(!e||Li[e]===void 0){if(s===Oi){let o=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw o.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},o}const n=Li[Si[Oi]];if(n===void 0||!n){let o=new Error('Incorrect usage of "cherry-pick". Current branch ('+Oi+")has no commits");throw o.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},o}const a={id:Js+"-"+rl(),message:"cherry-picked "+r+" into "+Oi,seq:Js++,parents:[Qi==null?null:Qi.id,r.id],branch:Oi,type:Wn.CHERRY_PICK,tag:i??"cherry-pick:"+r.id};Qi=a,Li[a.id]=a,Si[Oi]=a.id,k.debug(Si),k.debug("in cherryPick")}},v1=function(t){if(t=Qt.sanitizeText(t,P()),Si[t]===void 0){let e=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+t+'")');throw e.hash={text:"checkout "+t,token:"checkout "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+t+'"']},e}else{Oi=t;const e=Si[Oi];Qi=Li[e]}};function C1(t,e,i){const r=t.indexOf(e);r===-1?t.push(i):t.splice(r,1,i)}function T1(t){const e=t.reduce((s,n)=>s.seq>n.seq?s:n,t[0]);let i="";t.forEach(function(s){s===e?i+=" *":i+=" |"});const r=[i,e.id,e.seq];for(let s in Si)Si[s]===e.id&&r.push(s);if(k.debug(r.join(" ")),e.parents&&e.parents.length==2){const s=Li[e.parents[0]];C1(t,e,s),t.push(Li[e.parents[1]])}else{if(e.parents.length==0)return;{const s=Li[e.parents];C1(t,e,s)}}t=Wf(t,s=>s.id),T1(t)}const Kf=function(){k.debug(Li);const t=S1()[0];T1([t])},Qf=function(){Li={},Qi=null;let t=P().gitGraph.mainBranchName,e=P().gitGraph.mainBranchOrder;Si={},Si[t]=null,zn={},zn[t]={name:t,order:e},Oi=t,Js=0,ar()},Jf=function(){return Object.values(zn).map((e,i)=>e.order!==null?e:{...e,order:parseFloat(`0.${i}`,10)}).sort((e,i)=>e.order-i.order).map(({name:e})=>({name:e}))},$f=function(){return Si},tp=function(){return Li},S1=function(){const t=Object.keys(Li).map(function(e){return Li[e]});return t.forEach(function(e){k.debug(e.id)}),t.sort((e,i)=>e.seq-i.seq),t},ep=function(){return Oi},ip=function(){return _1},rp=function(){return Qi},Wn={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},sp={parseDirective:zf,getConfig:()=>P().gitGraph,setDirection:Uf,setOptions:Zf,getOptions:Hf,commit:Gf,branch:jf,merge:qf,cherryPick:Xf,checkout:v1,prettyPrint:Kf,clear:Qf,getBranchesAsObjArray:Jf,getBranches:$f,getCommits:tp,getCommitsArray:S1,getCurrentBranch:ep,getDirection:ip,getHead:rp,setAccTitle:or,getAccTitle:fr,getAccDescription:gr,setAccDescription:pr,setDiagramTitle:Ir,getDiagramTitle:Rr,commitType:Wn};let Un={};const yr={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},$s=8;let lr={},Va={},Ya=[],za=0;const np=()=>{lr={},Va={},Un={},za=0,Ya=[]},ap=t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");let i=[];typeof t=="string"?i=t.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(t)?i=t:i=[];for(const r of i){const s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),s.setAttribute("class","row"),s.textContent=r.trim(),e.appendChild(s)}return e},w1=(t,e,i)=>{const r=Yn().gitGraph,s=t.append("g").attr("class","commit-bullets"),n=t.append("g").attr("class","commit-labels");let a=0;Object.keys(e).sort((h,u)=>e[h].seq-e[u].seq).forEach(h=>{const u=e[h],d=lr[u.branch].pos,f=a+10;if(i){let p,x=u.customType!==void 0&&u.customType!==""?u.customType:u.type;switch(x){case yr.NORMAL:p="commit-normal";break;case yr.REVERSE:p="commit-reverse";break;case yr.HIGHLIGHT:p="commit-highlight";break;case yr.MERGE:p="commit-merge";break;case yr.CHERRY_PICK:p="commit-cherry-pick";break;default:p="commit-normal"}if(x===yr.HIGHLIGHT){const E=s.append("rect");E.attr("x",f-10),E.attr("y",d-10),E.attr("height",20),E.attr("width",20),E.attr("class",`commit ${u.id} commit-highlight${lr[u.branch].index%$s} ${p}-outer`),s.append("rect").attr("x",f-6).attr("y",d-6).attr("height",12).attr("width",12).attr("class",`commit ${u.id} commit${lr[u.branch].index%$s} ${p}-inner`)}else if(x===yr.CHERRY_PICK)s.append("circle").attr("cx",f).attr("cy",d).attr("r",10).attr("class",`commit ${u.id} ${p}`),s.append("circle").attr("cx",f-3).attr("cy",d+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${u.id} ${p}`),s.append("circle").attr("cx",f+3).attr("cy",d+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${u.id} ${p}`),s.append("line").attr("x1",f+3).attr("y1",d+1).attr("x2",f).attr("y2",d-5).attr("stroke","#fff").attr("class",`commit ${u.id} ${p}`),s.append("line").attr("x1",f-3).attr("y1",d+1).attr("x2",f).attr("y2",d-5).attr("stroke","#fff").attr("class",`commit ${u.id} ${p}`);else{const E=s.append("circle");if(E.attr("cx",f),E.attr("cy",d),E.attr("r",u.type===yr.MERGE?9:10),E.attr("class",`commit ${u.id} commit${lr[u.branch].index%$s}`),x===yr.MERGE){const T=s.append("circle");T.attr("cx",f),T.attr("cy",d),T.attr("r",6),T.attr("class",`commit ${p} ${u.id} commit${lr[u.branch].index%$s}`)}x===yr.REVERSE&&s.append("path").attr("d",`M ${f-5},${d-5}L${f+5},${d+5}M${f-5},${d+5}L${f+5},${d-5}`).attr("class",`commit ${p} ${u.id} commit${lr[u.branch].index%$s}`)}}if(Va[u.id]={x:a+10,y:d},i){if(u.type!==yr.CHERRY_PICK&&(u.customId&&u.type===yr.MERGE||u.type!==yr.MERGE)&&r.showCommitLabel){const E=n.append("g"),T=E.insert("rect").attr("class","commit-label-bkg"),S=E.append("text").attr("x",a).attr("y",d+25).attr("class","commit-label").text(u.id);let _=S.node().getBBox();if(T.attr("x",a+10-_.width/2-2).attr("y",d+13.5).attr("width",_.width+2*2).attr("height",_.height+2*2),S.attr("x",a+10-_.width/2),r.rotateCommitLabel){let D=-7.5-(_.width+10)/25*9.5,z=10+_.width/25*8.5;E.attr("transform","translate("+D+", "+z+") rotate(-45, "+a+", "+d+")")}}if(u.tag){const E=n.insert("polygon"),T=n.append("circle"),S=n.append("text").attr("y",d-16).attr("class","tag-label").text(u.tag);let _=S.node().getBBox();S.attr("x",a+10-_.width/2);const D=_.height/2,z=d-19.2;E.attr("class","tag-label-bkg").attr("points",`
|
|
1245
|
-
${a-_.width/2-4/2},${z+2}
|
|
1246
|
-
${a-_.width/2-4/2},${z-2}
|
|
1247
|
-
${a+10-_.width/2-4},${z-D-2}
|
|
1248
|
-
${a+10+_.width/2+4},${z-D-2}
|
|
1249
|
-
${a+10+_.width/2+4},${z+D+2}
|
|
1250
|
-
${a+10-_.width/2-4},${z+D+2}`),T.attr("cx",a-_.width/2+4/2).attr("cy",z).attr("r",1.5).attr("class","tag-hole")}}a+=50,a>za&&(za=a)})},op=(t,e,i)=>Object.keys(i).filter(n=>i[n].branch===e.branch&&i[n].seq>t.seq&&i[n].seq<e.seq).length>0,sl=(t,e,i=0)=>{const r=t+Math.abs(t-e)/2;if(i>5)return r;if(Ya.every(a=>Math.abs(a-r)>=10))return Ya.push(r),r;const n=Math.abs(t-e);return sl(t,e-n/5,i+1)},lp=(t,e,i,r)=>{const s=Va[e.id],n=Va[i.id],a=op(e,i,r);let o="",l="",h=0,u=0,d=lr[i.branch].index,f;if(a){o="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",h=10,u=10,d=lr[i.branch].index;const p=s.y<n.y?sl(s.y,n.y):sl(n.y,s.y);s.y<n.y?f=`M ${s.x} ${s.y} L ${s.x} ${p-h} ${o} ${s.x+u} ${p} L ${n.x-h} ${p} ${l} ${n.x} ${p+u} L ${n.x} ${n.y}`:f=`M ${s.x} ${s.y} L ${s.x} ${p+h} ${l} ${s.x+u} ${p} L ${n.x-h} ${p} ${o} ${n.x} ${p-u} L ${n.x} ${n.y}`}else s.y<n.y&&(o="A 20 20, 0, 0, 0,",h=20,u=20,d=lr[i.branch].index,f=`M ${s.x} ${s.y} L ${s.x} ${n.y-h} ${o} ${s.x+u} ${n.y} L ${n.x} ${n.y}`),s.y>n.y&&(o="A 20 20, 0, 0, 0,",h=20,u=20,d=lr[e.branch].index,f=`M ${s.x} ${s.y} L ${n.x-h} ${s.y} ${o} ${n.x} ${s.y-u} L ${n.x} ${n.y}`),s.y===n.y&&(d=lr[e.branch].index,f=`M ${s.x} ${s.y} L ${s.x} ${n.y-h} ${o} ${s.x+u} ${n.y} L ${n.x} ${n.y}`);t.append("path").attr("d",f).attr("class","arrow arrow"+d%$s)},cp=(t,e)=>{const i=t.append("g").attr("class","commit-arrows");Object.keys(e).forEach(r=>{const s=e[r];s.parents&&s.parents.length>0&&s.parents.forEach(n=>{lp(i,e[n],s,e)})})},hp=(t,e)=>{const i=Yn().gitGraph,r=t.append("g");e.forEach((s,n)=>{const a=n%$s,o=lr[s.name].pos,l=r.append("line");l.attr("x1",0),l.attr("y1",o),l.attr("x2",za),l.attr("y2",o),l.attr("class","branch branch"+a),Ya.push(o);let h=s.name;const u=ap(h),d=r.insert("rect"),p=r.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);p.node().appendChild(u);let x=u.getBBox();d.attr("class","branchLabelBkg label"+a).attr("rx",4).attr("ry",4).attr("x",-x.width-4-(i.rotateCommitLabel===!0?30:0)).attr("y",-x.height/2+8).attr("width",x.width+18).attr("height",x.height+4),p.attr("transform","translate("+(-x.width-14-(i.rotateCommitLabel===!0?30:0))+", "+(o-x.height/2-1)+")"),d.attr("transform","translate(-19, "+(o-x.height/2)+")")})},up={draw:function(t,e,i,r){np();const s=Yn(),n=s.gitGraph;k.debug("in gitgraph renderer",t+`
|
|
1251
|
-
`,"id:",e,i),Un=r.db.getCommits();const a=r.db.getBranchesAsObjArray();let o=0;a.forEach((h,u)=>{lr[h.name]={pos:o,index:u},o+=50+(n.rotateCommitLabel?40:0)});const l=(0,Q.Ys)(`[id="${e}"]`);w1(l,Un,!1),n.showBranches&&hp(l,a),cp(l,Un),w1(l,Un,!0),ke.insertTitle(l,"gitTitleText",n.titleTopMargin,r.db.getDiagramTitle()),x1(void 0,l,n.diagramPadding,n.useMaxWidth??s.useMaxWidth)}},dp=t=>`
|
|
1252
|
-
.commit-id,
|
|
1253
|
-
.commit-msg,
|
|
1254
|
-
.branch-label {
|
|
1255
|
-
fill: lightgrey;
|
|
1256
|
-
color: lightgrey;
|
|
1257
|
-
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
1258
|
-
font-family: var(--mermaid-font-family);
|
|
1259
|
-
}
|
|
1260
|
-
${[0,1,2,3,4,5,6,7].map(e=>`
|
|
1261
|
-
.branch-label${e} { fill: ${t["gitBranchLabel"+e]}; }
|
|
1262
|
-
.commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }
|
|
1263
|
-
.commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }
|
|
1264
|
-
.label${e} { fill: ${t["git"+e]}; }
|
|
1265
|
-
.arrow${e} { stroke: ${t["git"+e]}; }
|
|
1266
|
-
`).join(`
|
|
1267
|
-
`)}
|
|
1268
|
-
|
|
1269
|
-
.branch {
|
|
1270
|
-
stroke-width: 1;
|
|
1271
|
-
stroke: ${t.lineColor};
|
|
1272
|
-
stroke-dasharray: 2;
|
|
1273
|
-
}
|
|
1274
|
-
.commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}
|
|
1275
|
-
.commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }
|
|
1276
|
-
.tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}
|
|
1277
|
-
.tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }
|
|
1278
|
-
.tag-hole { fill: ${t.textColor}; }
|
|
1279
|
-
|
|
1280
|
-
.commit-merge {
|
|
1281
|
-
stroke: ${t.primaryColor};
|
|
1282
|
-
fill: ${t.primaryColor};
|
|
1283
|
-
}
|
|
1284
|
-
.commit-reverse {
|
|
1285
|
-
stroke: ${t.primaryColor};
|
|
1286
|
-
fill: ${t.primaryColor};
|
|
1287
|
-
stroke-width: 3;
|
|
1288
|
-
}
|
|
1289
|
-
.commit-highlight-outer {
|
|
1290
|
-
}
|
|
1291
|
-
.commit-highlight-inner {
|
|
1292
|
-
stroke: ${t.primaryColor};
|
|
1293
|
-
fill: ${t.primaryColor};
|
|
1294
|
-
}
|
|
1295
|
-
|
|
1296
|
-
.arrow { stroke-width: 8; stroke-linecap: round; fill: none}
|
|
1297
|
-
.gitTitleText {
|
|
1298
|
-
text-anchor: middle;
|
|
1299
|
-
font-size: 18px;
|
|
1300
|
-
fill: ${t.textColor};
|
|
1301
|
-
}
|
|
1302
|
-
}
|
|
1303
|
-
`;var Wa=function(){var t=function(Zt,St,Et,Dt){for(Et=Et||{},Dt=Zt.length;Dt--;Et[Zt[Dt]]=St);return Et},e=[1,6],i=[1,7],r=[1,8],s=[1,9],n=[1,16],a=[1,11],o=[1,12],l=[1,13],h=[1,14],u=[1,15],d=[1,27],f=[1,33],p=[1,34],x=[1,35],E=[1,36],T=[1,37],S=[1,72],_=[1,73],D=[1,74],z=[1,75],H=[1,76],it=[1,77],R=[1,78],F=[1,38],v=[1,39],L=[1,40],w=[1,41],m=[1,42],B=[1,43],g=[1,44],O=[1,45],y=[1,46],Y=[1,47],wt=[1,48],at=[1,49],st=[1,50],nt=[1,51],et=[1,52],tt=[1,53],Tt=[1,54],bt=[1,55],Z=[1,56],jt=[1,57],U=[1,59],pt=[1,60],$=[1,61],K=[1,62],N=[1,63],A=[1,64],G=[1,65],C=[1,66],dt=[1,67],b=[1,68],Jt=[1,69],j=[24,52],Nt=[24,44,46,47,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],At=[15,24,44,46,47,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],kt=[1,94],gt=[1,95],_t=[1,96],yt=[1,97],Ct=[15,24,52],qe=[7,8,9,10,18,22,25,26,27,28],Ne=[15,24,43,52],se=[15,24,43,52,86,87,89,90],re=[15,43],Le=[44,46,47,48,49,50,51,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],ni={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,directive:6,direction_tb:7,direction_bt:8,direction_rl:9,direction_lr:10,graphConfig:11,openDirective:12,typeDirective:13,closeDirective:14,NEWLINE:15,":":16,argDirective:17,open_directive:18,type_directive:19,arg_directive:20,close_directive:21,C4_CONTEXT:22,statements:23,EOF:24,C4_CONTAINER:25,C4_COMPONENT:26,C4_DYNAMIC:27,C4_DEPLOYMENT:28,otherStatements:29,diagramStatements:30,otherStatement:31,title:32,accDescription:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,boundaryStatement:39,boundaryStartStatement:40,boundaryStopStatement:41,boundaryStart:42,LBRACE:43,ENTERPRISE_BOUNDARY:44,attributes:45,SYSTEM_BOUNDARY:46,BOUNDARY:47,CONTAINER_BOUNDARY:48,NODE:49,NODE_L:50,NODE_R:51,RBRACE:52,diagramStatement:53,PERSON:54,PERSON_EXT:55,SYSTEM:56,SYSTEM_DB:57,SYSTEM_QUEUE:58,SYSTEM_EXT:59,SYSTEM_EXT_DB:60,SYSTEM_EXT_QUEUE:61,CONTAINER:62,CONTAINER_DB:63,CONTAINER_QUEUE:64,CONTAINER_EXT:65,CONTAINER_EXT_DB:66,CONTAINER_EXT_QUEUE:67,COMPONENT:68,COMPONENT_DB:69,COMPONENT_QUEUE:70,COMPONENT_EXT:71,COMPONENT_EXT_DB:72,COMPONENT_EXT_QUEUE:73,REL:74,BIREL:75,REL_U:76,REL_D:77,REL_L:78,REL_R:79,REL_B:80,REL_INDEX:81,UPDATE_EL_STYLE:82,UPDATE_REL_STYLE:83,UPDATE_LAYOUT_CONFIG:84,attribute:85,STR:86,STR_KEY:87,STR_VALUE:88,ATTRIBUTE:89,ATTRIBUTE_EMPTY:90,$accept:0,$end:1},terminals_:{2:"error",7:"direction_tb",8:"direction_bt",9:"direction_rl",10:"direction_lr",15:"NEWLINE",16:":",18:"open_directive",19:"type_directive",20:"arg_directive",21:"close_directive",22:"C4_CONTEXT",24:"EOF",25:"C4_CONTAINER",26:"C4_COMPONENT",27:"C4_DYNAMIC",28:"C4_DEPLOYMENT",32:"title",33:"accDescription",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",43:"LBRACE",44:"ENTERPRISE_BOUNDARY",46:"SYSTEM_BOUNDARY",47:"BOUNDARY",48:"CONTAINER_BOUNDARY",49:"NODE",50:"NODE_L",51:"NODE_R",52:"RBRACE",54:"PERSON",55:"PERSON_EXT",56:"SYSTEM",57:"SYSTEM_DB",58:"SYSTEM_QUEUE",59:"SYSTEM_EXT",60:"SYSTEM_EXT_DB",61:"SYSTEM_EXT_QUEUE",62:"CONTAINER",63:"CONTAINER_DB",64:"CONTAINER_QUEUE",65:"CONTAINER_EXT",66:"CONTAINER_EXT_DB",67:"CONTAINER_EXT_QUEUE",68:"COMPONENT",69:"COMPONENT_DB",70:"COMPONENT_QUEUE",71:"COMPONENT_EXT",72:"COMPONENT_EXT_DB",73:"COMPONENT_EXT_QUEUE",74:"REL",75:"BIREL",76:"REL_U",77:"REL_D",78:"REL_L",79:"REL_R",80:"REL_B",81:"REL_INDEX",82:"UPDATE_EL_STYLE",83:"UPDATE_REL_STYLE",84:"UPDATE_LAYOUT_CONFIG",86:"STR",87:"STR_KEY",88:"STR_VALUE",89:"ATTRIBUTE",90:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[3,2],[5,1],[5,1],[5,1],[5,1],[4,1],[6,4],[6,6],[12,1],[13,1],[17,1],[14,1],[11,4],[11,4],[11,4],[11,4],[11,4],[23,1],[23,1],[23,2],[29,1],[29,2],[29,3],[31,1],[31,1],[31,2],[31,2],[31,1],[39,3],[40,3],[40,3],[40,4],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[41,1],[30,1],[30,2],[30,3],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,1],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[45,1],[45,2],[85,1],[85,2],[85,1],[85,1]],performAction:function(St,Et,Dt,ut,qt,rt,we){var lt=rt.length-1;switch(qt){case 4:ut.setDirection("TB");break;case 5:ut.setDirection("BT");break;case 6:ut.setDirection("RL");break;case 7:ut.setDirection("LR");break;case 11:ut.parseDirective("%%{","open_directive");break;case 12:break;case 13:rt[lt]=rt[lt].trim().replace(/'/g,'"'),ut.parseDirective(rt[lt],"arg_directive");break;case 14:ut.parseDirective("}%%","close_directive","c4Context");break;case 15:case 16:case 17:case 18:case 19:ut.setC4Type(rt[lt-3]);break;case 26:ut.setTitle(rt[lt].substring(6)),this.$=rt[lt].substring(6);break;case 27:ut.setAccDescription(rt[lt].substring(15)),this.$=rt[lt].substring(15);break;case 28:this.$=rt[lt].trim(),ut.setTitle(this.$);break;case 29:case 30:this.$=rt[lt].trim(),ut.setAccDescription(this.$);break;case 35:case 36:rt[lt].splice(2,0,"ENTERPRISE"),ut.addPersonOrSystemBoundary(...rt[lt]),this.$=rt[lt];break;case 37:ut.addPersonOrSystemBoundary(...rt[lt]),this.$=rt[lt];break;case 38:rt[lt].splice(2,0,"CONTAINER"),ut.addContainerBoundary(...rt[lt]),this.$=rt[lt];break;case 39:ut.addDeploymentNode("node",...rt[lt]),this.$=rt[lt];break;case 40:ut.addDeploymentNode("nodeL",...rt[lt]),this.$=rt[lt];break;case 41:ut.addDeploymentNode("nodeR",...rt[lt]),this.$=rt[lt];break;case 42:ut.popBoundaryParseStack();break;case 46:ut.addPersonOrSystem("person",...rt[lt]),this.$=rt[lt];break;case 47:ut.addPersonOrSystem("external_person",...rt[lt]),this.$=rt[lt];break;case 48:ut.addPersonOrSystem("system",...rt[lt]),this.$=rt[lt];break;case 49:ut.addPersonOrSystem("system_db",...rt[lt]),this.$=rt[lt];break;case 50:ut.addPersonOrSystem("system_queue",...rt[lt]),this.$=rt[lt];break;case 51:ut.addPersonOrSystem("external_system",...rt[lt]),this.$=rt[lt];break;case 52:ut.addPersonOrSystem("external_system_db",...rt[lt]),this.$=rt[lt];break;case 53:ut.addPersonOrSystem("external_system_queue",...rt[lt]),this.$=rt[lt];break;case 54:ut.addContainer("container",...rt[lt]),this.$=rt[lt];break;case 55:ut.addContainer("container_db",...rt[lt]),this.$=rt[lt];break;case 56:ut.addContainer("container_queue",...rt[lt]),this.$=rt[lt];break;case 57:ut.addContainer("external_container",...rt[lt]),this.$=rt[lt];break;case 58:ut.addContainer("external_container_db",...rt[lt]),this.$=rt[lt];break;case 59:ut.addContainer("external_container_queue",...rt[lt]),this.$=rt[lt];break;case 60:ut.addComponent("component",...rt[lt]),this.$=rt[lt];break;case 61:ut.addComponent("component_db",...rt[lt]),this.$=rt[lt];break;case 62:ut.addComponent("component_queue",...rt[lt]),this.$=rt[lt];break;case 63:ut.addComponent("external_component",...rt[lt]),this.$=rt[lt];break;case 64:ut.addComponent("external_component_db",...rt[lt]),this.$=rt[lt];break;case 65:ut.addComponent("external_component_queue",...rt[lt]),this.$=rt[lt];break;case 67:ut.addRel("rel",...rt[lt]),this.$=rt[lt];break;case 68:ut.addRel("birel",...rt[lt]),this.$=rt[lt];break;case 69:ut.addRel("rel_u",...rt[lt]),this.$=rt[lt];break;case 70:ut.addRel("rel_d",...rt[lt]),this.$=rt[lt];break;case 71:ut.addRel("rel_l",...rt[lt]),this.$=rt[lt];break;case 72:ut.addRel("rel_r",...rt[lt]),this.$=rt[lt];break;case 73:ut.addRel("rel_b",...rt[lt]),this.$=rt[lt];break;case 74:rt[lt].splice(0,1),ut.addRel("rel",...rt[lt]),this.$=rt[lt];break;case 75:ut.updateElStyle("update_el_style",...rt[lt]),this.$=rt[lt];break;case 76:ut.updateRelStyle("update_rel_style",...rt[lt]),this.$=rt[lt];break;case 77:ut.updateLayoutConfig("update_layout_config",...rt[lt]),this.$=rt[lt];break;case 78:this.$=[rt[lt]];break;case 79:rt[lt].unshift(rt[lt-1]),this.$=rt[lt];break;case 80:case 82:this.$=rt[lt].trim();break;case 81:let Ce={};Ce[rt[lt-1].trim()]=rt[lt].trim(),this.$=Ce;break;case 83:this.$="";break}},table:[{3:1,4:2,5:3,6:4,7:e,8:i,9:r,10:s,11:5,12:10,18:n,22:a,25:o,26:l,27:h,28:u},{1:[3]},{1:[2,1]},{1:[2,2]},{3:17,4:2,5:3,6:4,7:e,8:i,9:r,10:s,11:5,12:10,18:n,22:a,25:o,26:l,27:h,28:u},{1:[2,8]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{1:[2,7]},{13:18,19:[1,19]},{15:[1,20]},{15:[1,21]},{15:[1,22]},{15:[1,23]},{15:[1,24]},{19:[2,11]},{1:[2,3]},{14:25,16:[1,26],21:d},t([16,21],[2,12]),{23:28,29:29,30:30,31:31,32:f,33:p,34:x,36:E,38:T,39:58,40:70,42:71,44:S,46:_,47:D,48:z,49:H,50:it,51:R,53:32,54:F,55:v,56:L,57:w,58:m,59:B,60:g,61:O,62:y,63:Y,64:wt,65:at,66:st,67:nt,68:et,69:tt,70:Tt,71:bt,72:Z,73:jt,74:U,75:pt,76:$,77:K,78:N,79:A,80:G,81:C,82:dt,83:b,84:Jt},{23:79,29:29,30:30,31:31,32:f,33:p,34:x,36:E,38:T,39:58,40:70,42:71,44:S,46:_,47:D,48:z,49:H,50:it,51:R,53:32,54:F,55:v,56:L,57:w,58:m,59:B,60:g,61:O,62:y,63:Y,64:wt,65:at,66:st,67:nt,68:et,69:tt,70:Tt,71:bt,72:Z,73:jt,74:U,75:pt,76:$,77:K,78:N,79:A,80:G,81:C,82:dt,83:b,84:Jt},{23:80,29:29,30:30,31:31,32:f,33:p,34:x,36:E,38:T,39:58,40:70,42:71,44:S,46:_,47:D,48:z,49:H,50:it,51:R,53:32,54:F,55:v,56:L,57:w,58:m,59:B,60:g,61:O,62:y,63:Y,64:wt,65:at,66:st,67:nt,68:et,69:tt,70:Tt,71:bt,72:Z,73:jt,74:U,75:pt,76:$,77:K,78:N,79:A,80:G,81:C,82:dt,83:b,84:Jt},{23:81,29:29,30:30,31:31,32:f,33:p,34:x,36:E,38:T,39:58,40:70,42:71,44:S,46:_,47:D,48:z,49:H,50:it,51:R,53:32,54:F,55:v,56:L,57:w,58:m,59:B,60:g,61:O,62:y,63:Y,64:wt,65:at,66:st,67:nt,68:et,69:tt,70:Tt,71:bt,72:Z,73:jt,74:U,75:pt,76:$,77:K,78:N,79:A,80:G,81:C,82:dt,83:b,84:Jt},{23:82,29:29,30:30,31:31,32:f,33:p,34:x,36:E,38:T,39:58,40:70,42:71,44:S,46:_,47:D,48:z,49:H,50:it,51:R,53:32,54:F,55:v,56:L,57:w,58:m,59:B,60:g,61:O,62:y,63:Y,64:wt,65:at,66:st,67:nt,68:et,69:tt,70:Tt,71:bt,72:Z,73:jt,74:U,75:pt,76:$,77:K,78:N,79:A,80:G,81:C,82:dt,83:b,84:Jt},{15:[1,83]},{17:84,20:[1,85]},{15:[2,14]},{24:[1,86]},t(j,[2,20],{53:32,39:58,40:70,42:71,30:87,44:S,46:_,47:D,48:z,49:H,50:it,51:R,54:F,55:v,56:L,57:w,58:m,59:B,60:g,61:O,62:y,63:Y,64:wt,65:at,66:st,67:nt,68:et,69:tt,70:Tt,71:bt,72:Z,73:jt,74:U,75:pt,76:$,77:K,78:N,79:A,80:G,81:C,82:dt,83:b,84:Jt}),t(j,[2,21]),t(Nt,[2,23],{15:[1,88]}),t(j,[2,43],{15:[1,89]}),t(At,[2,26]),t(At,[2,27]),{35:[1,90]},{37:[1,91]},t(At,[2,30]),{45:92,85:93,86:kt,87:gt,89:_t,90:yt},{45:98,85:93,86:kt,87:gt,89:_t,90:yt},{45:99,85:93,86:kt,87:gt,89:_t,90:yt},{45:100,85:93,86:kt,87:gt,89:_t,90:yt},{45:101,85:93,86:kt,87:gt,89:_t,90:yt},{45:102,85:93,86:kt,87:gt,89:_t,90:yt},{45:103,85:93,86:kt,87:gt,89:_t,90:yt},{45:104,85:93,86:kt,87:gt,89:_t,90:yt},{45:105,85:93,86:kt,87:gt,89:_t,90:yt},{45:106,85:93,86:kt,87:gt,89:_t,90:yt},{45:107,85:93,86:kt,87:gt,89:_t,90:yt},{45:108,85:93,86:kt,87:gt,89:_t,90:yt},{45:109,85:93,86:kt,87:gt,89:_t,90:yt},{45:110,85:93,86:kt,87:gt,89:_t,90:yt},{45:111,85:93,86:kt,87:gt,89:_t,90:yt},{45:112,85:93,86:kt,87:gt,89:_t,90:yt},{45:113,85:93,86:kt,87:gt,89:_t,90:yt},{45:114,85:93,86:kt,87:gt,89:_t,90:yt},{45:115,85:93,86:kt,87:gt,89:_t,90:yt},{45:116,85:93,86:kt,87:gt,89:_t,90:yt},t(Ct,[2,66]),{45:117,85:93,86:kt,87:gt,89:_t,90:yt},{45:118,85:93,86:kt,87:gt,89:_t,90:yt},{45:119,85:93,86:kt,87:gt,89:_t,90:yt},{45:120,85:93,86:kt,87:gt,89:_t,90:yt},{45:121,85:93,86:kt,87:gt,89:_t,90:yt},{45:122,85:93,86:kt,87:gt,89:_t,90:yt},{45:123,85:93,86:kt,87:gt,89:_t,90:yt},{45:124,85:93,86:kt,87:gt,89:_t,90:yt},{45:125,85:93,86:kt,87:gt,89:_t,90:yt},{45:126,85:93,86:kt,87:gt,89:_t,90:yt},{45:127,85:93,86:kt,87:gt,89:_t,90:yt},{30:128,39:58,40:70,42:71,44:S,46:_,47:D,48:z,49:H,50:it,51:R,53:32,54:F,55:v,56:L,57:w,58:m,59:B,60:g,61:O,62:y,63:Y,64:wt,65:at,66:st,67:nt,68:et,69:tt,70:Tt,71:bt,72:Z,73:jt,74:U,75:pt,76:$,77:K,78:N,79:A,80:G,81:C,82:dt,83:b,84:Jt},{15:[1,130],43:[1,129]},{45:131,85:93,86:kt,87:gt,89:_t,90:yt},{45:132,85:93,86:kt,87:gt,89:_t,90:yt},{45:133,85:93,86:kt,87:gt,89:_t,90:yt},{45:134,85:93,86:kt,87:gt,89:_t,90:yt},{45:135,85:93,86:kt,87:gt,89:_t,90:yt},{45:136,85:93,86:kt,87:gt,89:_t,90:yt},{45:137,85:93,86:kt,87:gt,89:_t,90:yt},{24:[1,138]},{24:[1,139]},{24:[1,140]},{24:[1,141]},t(qe,[2,9]),{14:142,21:d},{21:[2,13]},{1:[2,15]},t(j,[2,22]),t(Nt,[2,24],{31:31,29:143,32:f,33:p,34:x,36:E,38:T}),t(j,[2,44],{29:29,30:30,31:31,53:32,39:58,40:70,42:71,23:144,32:f,33:p,34:x,36:E,38:T,44:S,46:_,47:D,48:z,49:H,50:it,51:R,54:F,55:v,56:L,57:w,58:m,59:B,60:g,61:O,62:y,63:Y,64:wt,65:at,66:st,67:nt,68:et,69:tt,70:Tt,71:bt,72:Z,73:jt,74:U,75:pt,76:$,77:K,78:N,79:A,80:G,81:C,82:dt,83:b,84:Jt}),t(At,[2,28]),t(At,[2,29]),t(Ct,[2,46]),t(Ne,[2,78],{85:93,45:145,86:kt,87:gt,89:_t,90:yt}),t(se,[2,80]),{88:[1,146]},t(se,[2,82]),t(se,[2,83]),t(Ct,[2,47]),t(Ct,[2,48]),t(Ct,[2,49]),t(Ct,[2,50]),t(Ct,[2,51]),t(Ct,[2,52]),t(Ct,[2,53]),t(Ct,[2,54]),t(Ct,[2,55]),t(Ct,[2,56]),t(Ct,[2,57]),t(Ct,[2,58]),t(Ct,[2,59]),t(Ct,[2,60]),t(Ct,[2,61]),t(Ct,[2,62]),t(Ct,[2,63]),t(Ct,[2,64]),t(Ct,[2,65]),t(Ct,[2,67]),t(Ct,[2,68]),t(Ct,[2,69]),t(Ct,[2,70]),t(Ct,[2,71]),t(Ct,[2,72]),t(Ct,[2,73]),t(Ct,[2,74]),t(Ct,[2,75]),t(Ct,[2,76]),t(Ct,[2,77]),{41:147,52:[1,148]},{15:[1,149]},{43:[1,150]},t(re,[2,35]),t(re,[2,36]),t(re,[2,37]),t(re,[2,38]),t(re,[2,39]),t(re,[2,40]),t(re,[2,41]),{1:[2,16]},{1:[2,17]},{1:[2,18]},{1:[2,19]},{15:[1,151]},t(Nt,[2,25]),t(j,[2,45]),t(Ne,[2,79]),t(se,[2,81]),t(Ct,[2,31]),t(Ct,[2,42]),t(Le,[2,32]),t(Le,[2,33],{15:[1,152]}),t(qe,[2,10]),t(Le,[2,34])],defaultActions:{2:[2,1],3:[2,2],5:[2,8],6:[2,4],7:[2,5],8:[2,6],9:[2,7],16:[2,11],17:[2,3],27:[2,14],85:[2,13],86:[2,15],138:[2,16],139:[2,17],140:[2,18],141:[2,19]},parseError:function(St,Et){if(Et.recoverable)this.trace(St);else{var Dt=new Error(St);throw Dt.hash=Et,Dt}},parse:function(St){var Et=this,Dt=[0],ut=[],qt=[null],rt=[],we=this.table,lt="",Ce=0,Oe=0,Me=2,Fe=1,Pe=rt.slice.call(arguments,1),oe=Object.create(this.lexer),Te={yy:{}};for(var De in this.yy)Object.prototype.hasOwnProperty.call(this.yy,De)&&(Te.yy[De]=this.yy[De]);oe.setInput(St,Te.yy),Te.yy.lexer=oe,Te.yy.parser=this,typeof oe.yylloc>"u"&&(oe.yylloc={});var Ie=oe.yylloc;rt.push(Ie);var ka=oe.options&&oe.options.ranges;typeof Te.yy.parseError=="function"?this.parseError=Te.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Bo(){var ki;return ki=ut.pop()||oe.lex()||Fe,typeof ki!="number"&&(ki instanceof Array&&(ut=ki,ki=ut.pop()),ki=Et.symbols_[ki]||ki),ki}for(var bi,Ee,$i,Ln,Fi={},Gi,xi,ur,ji;;){if(Ee=Dt[Dt.length-1],this.defaultActions[Ee]?$i=this.defaultActions[Ee]:((bi===null||typeof bi>"u")&&(bi=Bo()),$i=we[Ee]&&we[Ee][bi]),typeof $i>"u"||!$i.length||!$i[0]){var tr="";ji=[];for(Gi in we[Ee])this.terminals_[Gi]&&Gi>Me&&ji.push("'"+this.terminals_[Gi]+"'");oe.showPosition?tr="Parse error on line "+(Ce+1)+`:
|
|
1304
|
-
`+oe.showPosition()+`
|
|
1305
|
-
Expecting `+ji.join(", ")+", got '"+(this.terminals_[bi]||bi)+"'":tr="Parse error on line "+(Ce+1)+": Unexpected "+(bi==Fe?"end of input":"'"+(this.terminals_[bi]||bi)+"'"),this.parseError(tr,{text:oe.match,token:this.terminals_[bi]||bi,line:oe.yylineno,loc:Ie,expected:ji})}if($i[0]instanceof Array&&$i.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ee+", token: "+bi);switch($i[0]){case 1:Dt.push(bi),qt.push(oe.yytext),rt.push(oe.yylloc),Dt.push($i[1]),bi=null,Oe=oe.yyleng,lt=oe.yytext,Ce=oe.yylineno,Ie=oe.yylloc;break;case 2:if(xi=this.productions_[$i[1]][1],Fi.$=qt[qt.length-xi],Fi._$={first_line:rt[rt.length-(xi||1)].first_line,last_line:rt[rt.length-1].last_line,first_column:rt[rt.length-(xi||1)].first_column,last_column:rt[rt.length-1].last_column},ka&&(Fi._$.range=[rt[rt.length-(xi||1)].range[0],rt[rt.length-1].range[1]]),Ln=this.performAction.apply(Fi,[lt,Oe,Ce,Te.yy,$i[1],qt,rt].concat(Pe)),typeof Ln<"u")return Ln;xi&&(Dt=Dt.slice(0,-1*xi*2),qt=qt.slice(0,-1*xi),rt=rt.slice(0,-1*xi)),Dt.push(this.productions_[$i[1]][0]),qt.push(Fi.$),rt.push(Fi._$),ur=we[Dt[Dt.length-2]][Dt[Dt.length-1]],Dt.push(ur);break;case 3:return!0}}return!0}},Ye=function(){var Zt={EOF:1,parseError:function(Et,Dt){if(this.yy.parser)this.yy.parser.parseError(Et,Dt);else throw new Error(Et)},setInput:function(St,Et){return this.yy=Et||this.yy||{},this._input=St,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},input:function(){var St=this._input[0];this.yytext+=St,this.yyleng++,this.offset++,this.match+=St,this.matched+=St;var Et=St.match(/(?:\r\n?|\n).*/g);return Et?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),St},unput:function(St){var Et=St.length,Dt=St.split(/(?:\r\n?|\n)/g);this._input=St+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Et),this.offset-=Et;var ut=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),Dt.length-1&&(this.yylineno-=Dt.length-1);var qt=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:Dt?(Dt.length===ut.length?this.yylloc.first_column:0)+ut[ut.length-Dt.length].length-Dt[0].length:this.yylloc.first_column-Et},this.options.ranges&&(this.yylloc.range=[qt[0],qt[0]+this.yyleng-Et]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1306
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(St){this.unput(this.match.slice(St))},pastInput:function(){var St=this.matched.substr(0,this.matched.length-this.match.length);return(St.length>20?"...":"")+St.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var St=this.match;return St.length<20&&(St+=this._input.substr(0,20-St.length)),(St.substr(0,20)+(St.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var St=this.pastInput(),Et=new Array(St.length+1).join("-");return St+this.upcomingInput()+`
|
|
1307
|
-
`+Et+"^"},test_match:function(St,Et){var Dt,ut,qt;if(this.options.backtrack_lexer&&(qt={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&&(qt.yylloc.range=this.yylloc.range.slice(0))),ut=St[0].match(/(?:\r\n?|\n).*/g),ut&&(this.yylineno+=ut.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ut?ut[ut.length-1].length-ut[ut.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+St[0].length},this.yytext+=St[0],this.match+=St[0],this.matches=St,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(St[0].length),this.matched+=St[0],Dt=this.performAction.call(this,this.yy,this,Et,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Dt)return Dt;if(this._backtrack){for(var rt in qt)this[rt]=qt[rt];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var St,Et,Dt,ut;this._more||(this.yytext="",this.match="");for(var qt=this._currentRules(),rt=0;rt<qt.length;rt++)if(Dt=this._input.match(this.rules[qt[rt]]),Dt&&(!Et||Dt[0].length>Et[0].length)){if(Et=Dt,ut=rt,this.options.backtrack_lexer){if(St=this.test_match(Dt,qt[rt]),St!==!1)return St;if(this._backtrack){Et=!1;continue}else return!1}else if(!this.options.flex)break}return Et?(St=this.test_match(Et,qt[ut]),St!==!1?St:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1308
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Et=this.next();return Et||this.lex()},begin:function(Et){this.conditionStack.push(Et)},popState:function(){var Et=this.conditionStack.length-1;return Et>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(Et){return Et=this.conditionStack.length-1-Math.abs(Et||0),Et>=0?this.conditionStack[Et]:"INITIAL"},pushState:function(Et){this.begin(Et)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(Et,Dt,ut,qt){switch(ut){case 0:return this.begin("open_directive"),18;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 10;case 5:return this.begin("type_directive"),19;case 6:return this.popState(),this.begin("arg_directive"),16;case 7:return this.popState(),this.popState(),21;case 8:return 20;case 9:return 32;case 10:return 33;case 11:return this.begin("acc_title"),34;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),36;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:break;case 19:c;break;case 20:return 15;case 21:break;case 22:return 22;case 23:return 25;case 24:return 26;case 25:return 27;case 26:return 28;case 27:return this.begin("person_ext"),55;case 28:return this.begin("person"),54;case 29:return this.begin("system_ext_queue"),61;case 30:return this.begin("system_ext_db"),60;case 31:return this.begin("system_ext"),59;case 32:return this.begin("system_queue"),58;case 33:return this.begin("system_db"),57;case 34:return this.begin("system"),56;case 35:return this.begin("boundary"),47;case 36:return this.begin("enterprise_boundary"),44;case 37:return this.begin("system_boundary"),46;case 38:return this.begin("container_ext_queue"),67;case 39:return this.begin("container_ext_db"),66;case 40:return this.begin("container_ext"),65;case 41:return this.begin("container_queue"),64;case 42:return this.begin("container_db"),63;case 43:return this.begin("container"),62;case 44:return this.begin("container_boundary"),48;case 45:return this.begin("component_ext_queue"),73;case 46:return this.begin("component_ext_db"),72;case 47:return this.begin("component_ext"),71;case 48:return this.begin("component_queue"),70;case 49:return this.begin("component_db"),69;case 50:return this.begin("component"),68;case 51:return this.begin("node"),49;case 52:return this.begin("node"),49;case 53:return this.begin("node_l"),50;case 54:return this.begin("node_r"),51;case 55:return this.begin("rel"),74;case 56:return this.begin("birel"),75;case 57:return this.begin("rel_u"),76;case 58:return this.begin("rel_u"),76;case 59:return this.begin("rel_d"),77;case 60:return this.begin("rel_d"),77;case 61:return this.begin("rel_l"),78;case 62:return this.begin("rel_l"),78;case 63:return this.begin("rel_r"),79;case 64:return this.begin("rel_r"),79;case 65:return this.begin("rel_b"),80;case 66:return this.begin("rel_index"),81;case 67:return this.begin("update_el_style"),82;case 68:return this.begin("update_rel_style"),83;case 69:return this.begin("update_layout_config"),84;case 70:return"EOF_IN_STRUCT";case 71:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 72:this.begin("attribute");break;case 73:this.popState(),this.popState();break;case 74:return 90;case 75:break;case 76:return 90;case 77:this.begin("string");break;case 78:this.popState();break;case 79:return"STR";case 80:this.begin("string_kv");break;case 81:return this.begin("string_kv_key"),"STR_KEY";case 82:this.popState(),this.begin("string_kv_value");break;case 83:return"STR_VALUE";case 84:this.popState(),this.popState();break;case 85:return"STR";case 86:return"LBRACE";case 87:return"RBRACE";case 88:return"SPACE";case 89:return"EOL";case 90:return 24}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},string_kv_value:{rules:[83,84],inclusive:!1},string_kv_key:{rules:[82],inclusive:!1},string_kv:{rules:[81],inclusive:!1},string:{rules:[78,79],inclusive:!1},attribute:{rules:[73,74,75,76,77,80,85],inclusive:!1},update_layout_config:{rules:[70,71,72,73],inclusive:!1},update_rel_style:{rules:[70,71,72,73],inclusive:!1},update_el_style:{rules:[70,71,72,73],inclusive:!1},rel_b:{rules:[70,71,72,73],inclusive:!1},rel_r:{rules:[70,71,72,73],inclusive:!1},rel_l:{rules:[70,71,72,73],inclusive:!1},rel_d:{rules:[70,71,72,73],inclusive:!1},rel_u:{rules:[70,71,72,73],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[70,71,72,73],inclusive:!1},node_r:{rules:[70,71,72,73],inclusive:!1},node_l:{rules:[70,71,72,73],inclusive:!1},node:{rules:[70,71,72,73],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[70,71,72,73],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[70,71,72,73],inclusive:!1},component_ext:{rules:[70,71,72,73],inclusive:!1},component_queue:{rules:[70,71,72,73],inclusive:!1},component_db:{rules:[70,71,72,73],inclusive:!1},component:{rules:[70,71,72,73],inclusive:!1},container_boundary:{rules:[70,71,72,73],inclusive:!1},container_ext_queue:{rules:[],inclusive:!1},container_ext_db:{rules:[70,71,72,73],inclusive:!1},container_ext:{rules:[70,71,72,73],inclusive:!1},container_queue:{rules:[70,71,72,73],inclusive:!1},container_db:{rules:[70,71,72,73],inclusive:!1},container:{rules:[70,71,72,73],inclusive:!1},birel:{rules:[70,71,72,73],inclusive:!1},system_boundary:{rules:[70,71,72,73],inclusive:!1},enterprise_boundary:{rules:[70,71,72,73],inclusive:!1},boundary:{rules:[70,71,72,73],inclusive:!1},system_ext_queue:{rules:[70,71,72,73],inclusive:!1},system_ext_db:{rules:[70,71,72,73],inclusive:!1},system_ext:{rules:[70,71,72,73],inclusive:!1},system_queue:{rules:[70,71,72,73],inclusive:!1},system_db:{rules:[70,71,72,73],inclusive:!1},system:{rules:[70,71,72,73],inclusive:!1},person_ext:{rules:[70,71,72,73],inclusive:!1},person:{rules:[70,71,72,73],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,86,87,88,89,90],inclusive:!0}}};return Zt}();ni.lexer=Ye;function ue(){this.yy={}}return ue.prototype=ni,ni.Parser=ue,new ue}();Wa.parser=Wa;const fp=Wa,pp=t=>t.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/)!==null;let Nr=[],Rs=[""],Ji="global",Or="",jr=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Zn=[],nl="",al=!1,Ua=4,Za=2;var A1;const gp=function(){return A1},yp=function(t){A1=je(t,P())},mp=function(t,e,i){si.parseDirective(this,t,e,i)},bp=function(t,e,i,r,s,n,a,o,l){if(t==null||e===void 0||e===null||i===void 0||i===null||r===void 0||r===null)return;let h={};const u=Zn.find(d=>d.from===e&&d.to===i);if(u?h=u:Zn.push(h),h.type=t,h.from=e,h.to=i,h.label={text:r},s==null)h.techn={text:""};else if(typeof s=="object"){let[d,f]=Object.entries(s)[0];h[d]={text:f}}else h.techn={text:s};if(n==null)h.descr={text:""};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];h[d]={text:f}}else h.descr={text:n};if(typeof a=="object"){let[d,f]=Object.entries(a)[0];h[d]=f}else h.sprite=a;if(typeof o=="object"){let[d,f]=Object.entries(o)[0];h[d]=f}else h.tags=o;if(typeof l=="object"){let[d,f]=Object.entries(l)[0];h[d]=f}else h.link=l;h.wrap=Ns()},xp=function(t,e,i,r,s,n,a){if(e===null||i===null)return;let o={};const l=Nr.find(h=>h.alias===e);if(l&&e===l.alias?o=l:(o.alias=e,Nr.push(o)),i==null?o.label={text:""}:o.label={text:i},r==null)o.descr={text:""};else if(typeof r=="object"){let[h,u]=Object.entries(r)[0];o[h]={text:u}}else o.descr={text:r};if(typeof s=="object"){let[h,u]=Object.entries(s)[0];o[h]=u}else o.sprite=s;if(typeof n=="object"){let[h,u]=Object.entries(n)[0];o[h]=u}else o.tags=n;if(typeof a=="object"){let[h,u]=Object.entries(a)[0];o[h]=u}else o.link=a;o.typeC4Shape={text:t},o.parentBoundary=Ji,o.wrap=Ns()},kp=function(t,e,i,r,s,n,a,o){if(e===null||i===null)return;let l={};const h=Nr.find(u=>u.alias===e);if(h&&e===h.alias?l=h:(l.alias=e,Nr.push(l)),i==null?l.label={text:""}:l.label={text:i},r==null)l.techn={text:""};else if(typeof r=="object"){let[u,d]=Object.entries(r)[0];l[u]={text:d}}else l.techn={text:r};if(s==null)l.descr={text:""};else if(typeof s=="object"){let[u,d]=Object.entries(s)[0];l[u]={text:d}}else l.descr={text:s};if(typeof n=="object"){let[u,d]=Object.entries(n)[0];l[u]=d}else l.sprite=n;if(typeof a=="object"){let[u,d]=Object.entries(a)[0];l[u]=d}else l.tags=a;if(typeof o=="object"){let[u,d]=Object.entries(o)[0];l[u]=d}else l.link=o;l.wrap=Ns(),l.typeC4Shape={text:t},l.parentBoundary=Ji},_p=function(t,e,i,r,s,n,a,o){if(e===null||i===null)return;let l={};const h=Nr.find(u=>u.alias===e);if(h&&e===h.alias?l=h:(l.alias=e,Nr.push(l)),i==null?l.label={text:""}:l.label={text:i},r==null)l.techn={text:""};else if(typeof r=="object"){let[u,d]=Object.entries(r)[0];l[u]={text:d}}else l.techn={text:r};if(s==null)l.descr={text:""};else if(typeof s=="object"){let[u,d]=Object.entries(s)[0];l[u]={text:d}}else l.descr={text:s};if(typeof n=="object"){let[u,d]=Object.entries(n)[0];l[u]=d}else l.sprite=n;if(typeof a=="object"){let[u,d]=Object.entries(a)[0];l[u]=d}else l.tags=a;if(typeof o=="object"){let[u,d]=Object.entries(o)[0];l[u]=d}else l.link=o;l.wrap=Ns(),l.typeC4Shape={text:t},l.parentBoundary=Ji},Ep=function(t,e,i,r,s){if(t===null||e===null)return;let n={};const a=jr.find(o=>o.alias===t);if(a&&t===a.alias?n=a:(n.alias=t,jr.push(n)),e==null?n.label={text:""}:n.label={text:e},i==null)n.type={text:"system"};else if(typeof i=="object"){let[o,l]=Object.entries(i)[0];n[o]={text:l}}else n.type={text:i};if(typeof r=="object"){let[o,l]=Object.entries(r)[0];n[o]=l}else n.tags=r;if(typeof s=="object"){let[o,l]=Object.entries(s)[0];n[o]=l}else n.link=s;n.parentBoundary=Ji,n.wrap=Ns(),Or=Ji,Ji=t,Rs.push(Or)},vp=function(t,e,i,r,s){if(t===null||e===null)return;let n={};const a=jr.find(o=>o.alias===t);if(a&&t===a.alias?n=a:(n.alias=t,jr.push(n)),e==null?n.label={text:""}:n.label={text:e},i==null)n.type={text:"container"};else if(typeof i=="object"){let[o,l]=Object.entries(i)[0];n[o]={text:l}}else n.type={text:i};if(typeof r=="object"){let[o,l]=Object.entries(r)[0];n[o]=l}else n.tags=r;if(typeof s=="object"){let[o,l]=Object.entries(s)[0];n[o]=l}else n.link=s;n.parentBoundary=Ji,n.wrap=Ns(),Or=Ji,Ji=t,Rs.push(Or)},Cp=function(t,e,i,r,s,n,a,o){if(e===null||i===null)return;let l={};const h=jr.find(u=>u.alias===e);if(h&&e===h.alias?l=h:(l.alias=e,jr.push(l)),i==null?l.label={text:""}:l.label={text:i},r==null)l.type={text:"node"};else if(typeof r=="object"){let[u,d]=Object.entries(r)[0];l[u]={text:d}}else l.type={text:r};if(s==null)l.descr={text:""};else if(typeof s=="object"){let[u,d]=Object.entries(s)[0];l[u]={text:d}}else l.descr={text:s};if(typeof a=="object"){let[u,d]=Object.entries(a)[0];l[u]=d}else l.tags=a;if(typeof o=="object"){let[u,d]=Object.entries(o)[0];l[u]=d}else l.link=o;l.nodeType=t,l.parentBoundary=Ji,l.wrap=Ns(),Or=Ji,Ji=e,Rs.push(Or)},Tp=function(){Ji=Or,Rs.pop(),Or=Rs.pop(),Rs.push(Or)},Sp=function(t,e,i,r,s,n,a,o,l,h,u){let d=Nr.find(f=>f.alias===e);if(!(d===void 0&&(d=jr.find(f=>f.alias===e),d===void 0))){if(i!=null)if(typeof i=="object"){let[f,p]=Object.entries(i)[0];d[f]=p}else d.bgColor=i;if(r!=null)if(typeof r=="object"){let[f,p]=Object.entries(r)[0];d[f]=p}else d.fontColor=r;if(s!=null)if(typeof s=="object"){let[f,p]=Object.entries(s)[0];d[f]=p}else d.borderColor=s;if(n!=null)if(typeof n=="object"){let[f,p]=Object.entries(n)[0];d[f]=p}else d.shadowing=n;if(a!=null)if(typeof a=="object"){let[f,p]=Object.entries(a)[0];d[f]=p}else d.shape=a;if(o!=null)if(typeof o=="object"){let[f,p]=Object.entries(o)[0];d[f]=p}else d.sprite=o;if(l!=null)if(typeof l=="object"){let[f,p]=Object.entries(l)[0];d[f]=p}else d.techn=l;if(h!=null)if(typeof h=="object"){let[f,p]=Object.entries(h)[0];d[f]=p}else d.legendText=h;if(u!=null)if(typeof u=="object"){let[f,p]=Object.entries(u)[0];d[f]=p}else d.legendSprite=u}},wp=function(t,e,i,r,s,n,a){const o=Zn.find(l=>l.from===e&&l.to===i);if(o!==void 0){if(r!=null)if(typeof r=="object"){let[l,h]=Object.entries(r)[0];o[l]=h}else o.textColor=r;if(s!=null)if(typeof s=="object"){let[l,h]=Object.entries(s)[0];o[l]=h}else o.lineColor=s;if(n!=null)if(typeof n=="object"){let[l,h]=Object.entries(n)[0];o[l]=parseInt(h)}else o.offsetX=parseInt(n);if(a!=null)if(typeof a=="object"){let[l,h]=Object.entries(a)[0];o[l]=parseInt(h)}else o.offsetY=parseInt(a)}},Ap=function(t,e,i){let r=Ua,s=Za;if(typeof e=="object"){const n=Object.values(e)[0];r=parseInt(n)}else r=parseInt(e);if(typeof i=="object"){const n=Object.values(i)[0];s=parseInt(n)}else s=parseInt(i);r>=1&&(Ua=r),s>=1&&(Za=s)},Lp=function(){return Ua},Bp=function(){return Za},Dp=function(){return Ji},Ip=function(){return Or},L1=function(t){return t==null?Nr:Nr.filter(e=>e.parentBoundary===t)},Rp=function(t){return Nr.find(e=>e.alias===t)},Np=function(t){return Object.keys(L1(t))},Op=function(t){return t==null?jr:jr.filter(e=>e.parentBoundary===t)},Fp=function(){return Zn},Mp=function(){return nl},Pp=function(t){al=t},Ns=function(){return al},B1={addPersonOrSystem:xp,addPersonOrSystemBoundary:Ep,addContainer:kp,addContainerBoundary:vp,addComponent:_p,addDeploymentNode:Cp,popBoundaryParseStack:Tp,addRel:bp,updateElStyle:Sp,updateRelStyle:wp,updateLayoutConfig:Ap,autoWrap:Ns,setWrap:Pp,getC4ShapeArray:L1,getC4Shape:Rp,getC4ShapeKeys:Np,getBoundarys:Op,getCurrentBoundaryParse:Dp,getParentBoundaryParse:Ip,getRels:Fp,getTitle:Mp,getC4Type:gp,getC4ShapeInRow:Lp,getC4BoundaryInRow:Bp,setAccTitle:or,getAccTitle:fr,getAccDescription:gr,setAccDescription:pr,parseDirective:mp,getConfig:()=>P().c4,clear:function(){Nr=[],jr=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Or="",Ji="global",Rs=[""],Zn=[],Rs=[""],nl="",al=!1,Ua=4,Za=2},LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:function(t){nl=je(t,P())},setC4Type:yp},ol=function(t,e){const i=t.append("rect");if(i.attr("x",e.x),i.attr("y",e.y),i.attr("fill",e.fill),i.attr("stroke",e.stroke),i.attr("width",e.width),i.attr("height",e.height),i.attr("rx",e.rx),i.attr("ry",e.ry),e.attrs!=="undefined"&&e.attrs!==null)for(let r in e.attrs)i.attr(r,e.attrs[r]);return e.class!=="undefined"&&i.attr("class",e.class),i},D1=function(t,e,i,r,s,n){const a=t.append("image");a.attr("width",e),a.attr("height",i),a.attr("x",r),a.attr("y",s);let o=n.startsWith("data:image/png;base64")?n:(0,qi.Nm)(n);a.attr("xlink:href",o)},Vp=(t,e,i)=>{const r=t.append("g");let s=0;for(let n of e){let a=n.textColor?n.textColor:"#444444",o=n.lineColor?n.lineColor:"#444444",l=n.offsetX?parseInt(n.offsetX):0,h=n.offsetY?parseInt(n.offsetY):0,u="";if(s===0){let f=r.append("line");f.attr("x1",n.startPoint.x),f.attr("y1",n.startPoint.y),f.attr("x2",n.endPoint.x),f.attr("y2",n.endPoint.y),f.attr("stroke-width","1"),f.attr("stroke",o),f.style("fill","none"),n.type!=="rel_b"&&f.attr("marker-end","url("+u+"#arrowhead)"),(n.type==="birel"||n.type==="rel_b")&&f.attr("marker-start","url("+u+"#arrowend)"),s=-1}else{let f=r.append("path");f.attr("fill","none").attr("stroke-width","1").attr("stroke",o).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",n.startPoint.x).replaceAll("starty",n.startPoint.y).replaceAll("controlx",n.startPoint.x+(n.endPoint.x-n.startPoint.x)/2-(n.endPoint.x-n.startPoint.x)/4).replaceAll("controly",n.startPoint.y+(n.endPoint.y-n.startPoint.y)/2).replaceAll("stopx",n.endPoint.x).replaceAll("stopy",n.endPoint.y)),n.type!=="rel_b"&&f.attr("marker-end","url("+u+"#arrowhead)"),(n.type==="birel"||n.type==="rel_b")&&f.attr("marker-start","url("+u+"#arrowend)")}let d=i.messageFont();os(i)(n.label.text,r,Math.min(n.startPoint.x,n.endPoint.x)+Math.abs(n.endPoint.x-n.startPoint.x)/2+l,Math.min(n.startPoint.y,n.endPoint.y)+Math.abs(n.endPoint.y-n.startPoint.y)/2+h,n.label.width,n.label.height,{fill:a},d),n.techn&&n.techn.text!==""&&(d=i.messageFont(),os(i)("["+n.techn.text+"]",r,Math.min(n.startPoint.x,n.endPoint.x)+Math.abs(n.endPoint.x-n.startPoint.x)/2+l,Math.min(n.startPoint.y,n.endPoint.y)+Math.abs(n.endPoint.y-n.startPoint.y)/2+i.messageFontSize+5+h,Math.max(n.label.width,n.techn.width),n.techn.height,{fill:a,"font-style":"italic"},d))}},Yp=function(t,e,i){const r=t.append("g");let s=e.bgColor?e.bgColor:"none",n=e.borderColor?e.borderColor:"#444444",a=e.fontColor?e.fontColor:"black",o={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(o={"stroke-width":1});let l={x:e.x,y:e.y,fill:s,stroke:n,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o};ol(r,l);let h=i.boundaryFont();h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=a,os(i)(e.label.text,r,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},h),e.type&&e.type.text!==""&&(h=i.boundaryFont(),h.fontColor=a,os(i)(e.type.text,r,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},h)),e.descr&&e.descr.text!==""&&(h=i.boundaryFont(),h.fontSize=h.fontSize-2,h.fontColor=a,os(i)(e.descr.text,r,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},h))},zp=function(t,e,i){var r;let s=e.bgColor?e.bgColor:i[e.typeC4Shape.text+"_bg_color"],n=e.borderColor?e.borderColor:i[e.typeC4Shape.text+"_border_color"],a=e.fontColor?e.fontColor:"#FFFFFF",o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}const l=t.append("g");l.attr("class","person-man");const h=I1();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":h.x=e.x,h.y=e.y,h.fill=s,h.width=e.width,h.height=e.height,h.stroke=n,h.rx=2.5,h.ry=2.5,h.attrs={"stroke-width":.5},ol(l,h);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":l.append("path").attr("fill",s).attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":l.append("path").attr("fill",s).attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2));break}let u=Kp(i,e.typeC4Shape.text);switch(l.append("text").attr("fill",a).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":D1(l,48,48,e.x+e.width/2-24,e.y+e.image.Y,o);break}let d=i[e.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=a,os(i)(e.label.text,l,e.x,e.y+e.label.Y,e.width,e.height,{fill:a},d),d=i[e.typeC4Shape.text+"Font"](),d.fontColor=a,e.techn&&((r=e.techn)==null?void 0:r.text)!==""?os(i)(e.techn.text,l,e.x,e.y+e.techn.Y,e.width,e.height,{fill:a,"font-style":"italic"},d):e.type&&e.type.text!==""&&os(i)(e.type.text,l,e.x,e.y+e.type.Y,e.width,e.height,{fill:a,"font-style":"italic"},d),e.descr&&e.descr.text!==""&&(d=i.personFont(),d.fontColor=a,os(i)(e.descr.text,l,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},d)),e.height},Wp=function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},Up=function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},Zp=function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},Hp=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},Gp=function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},jp=function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},qp=function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},Xp=function(t){const i=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);i.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),i.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},I1=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},Kp=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),os=function(){function t(s,n,a,o,l,h,u){const d=n.append("text").attr("x",a+l/2).attr("y",o+h/2+5).style("text-anchor","middle").text(s);r(d,u)}function e(s,n,a,o,l,h,u,d){const{fontSize:f,fontFamily:p,fontWeight:x}=d,E=s.split(Qt.lineBreakRegex);for(let T=0;T<E.length;T++){const S=T*f-f*(E.length-1)/2,_=n.append("text").attr("x",a+l/2).attr("y",o).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",f).style("font-weight",x).style("font-family",p);_.append("tspan").attr("dy",S).text(E[T]).attr("alignment-baseline","mathematical"),r(_,u)}}function i(s,n,a,o,l,h,u,d){const f=n.append("switch"),x=f.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");x.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(s),e(s,f,a,o,l,h,u,d),r(x,u)}function r(s,n){for(const a in n)n.hasOwnProperty(a)&&s.attr(a,n[a])}return function(s){return s.textPlacement==="fo"?i:s.textPlacement==="old"?t:e}}(),qr={drawRect:ol,drawBoundary:Yp,drawC4Shape:zp,drawRels:Vp,drawImage:D1,insertArrowHead:Hp,insertArrowEnd:Gp,insertArrowFilledHead:jp,insertDynamicNumber:qp,insertArrowCrossHead:Xp,insertDatabaseIcon:Wp,insertComputerIcon:Up,insertClockIcon:Zp,getNoteRect:I1,sanitizeUrl:qi.Nm};let Ha=0,Ga=0,R1=4,ll=2;Wa.yy=B1;let te={};class N1{constructor(e){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,cl(e.db.getConfig())}setData(e,i,r,s){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=i,this.nextData.starty=this.data.starty=r,this.nextData.stopy=this.data.stopy=s}updateVal(e,i,r,s){e[i]===void 0?e[i]=r:e[i]=s(r,e[i])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let i=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+e.margin:this.nextData.stopx+e.margin*2,r=i+e.width,s=this.nextData.starty+e.margin*2,n=s+e.height;(i>=this.data.widthLimit||r>=this.data.widthLimit||this.nextData.cnt>R1)&&(i=this.nextData.startx+e.margin+te.nextLinePaddingX,s=this.nextData.stopy+e.margin*2,this.nextData.stopx=r=i+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=n=s+e.height,this.nextData.cnt=1),e.x=i,e.y=s,this.updateVal(this.data,"startx",i,Math.min),this.updateVal(this.data,"starty",s,Math.min),this.updateVal(this.data,"stopx",r,Math.max),this.updateVal(this.data,"stopy",n,Math.max),this.updateVal(this.nextData,"startx",i,Math.min),this.updateVal(this.nextData,"starty",s,Math.min),this.updateVal(this.nextData,"stopx",r,Math.max),this.updateVal(this.nextData,"stopy",n,Math.max)}init(e){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},cl(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}}const cl=function(t){Ni(te,t),t.fontFamily&&(te.personFontFamily=te.systemFontFamily=te.messageFontFamily=t.fontFamily),t.fontSize&&(te.personFontSize=te.systemFontSize=te.messageFontSize=t.fontSize),t.fontWeight&&(te.personFontWeight=te.systemFontWeight=te.messageFontWeight=t.fontWeight)},Hn=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),ja=t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),Qp=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight});function Fr(t,e,i,r,s){if(!e[t].width)if(i)e[t].text=i1(e[t].text,s,r),e[t].textLines=e[t].text.split(Qt.lineBreakRegex).length,e[t].width=s,e[t].height=jo(e[t].text,r);else{let n=e[t].text.split(Qt.lineBreakRegex);e[t].textLines=n.length;let a=0;e[t].height=0,e[t].width=0;for(const o of n)e[t].width=Math.max(Gr(o,r),e[t].width),a=jo(o,r),e[t].height=e[t].height+a}}const O1=function(t,e,i){e.x=i.data.startx,e.y=i.data.starty,e.width=i.data.stopx-i.data.startx,e.height=i.data.stopy-i.data.starty,e.label.y=te.c4ShapeMargin-35;let r=e.wrap&&te.wrap,s=ja(te);s.fontSize=s.fontSize+2,s.fontWeight="bold";let n=Gr(e.label.text,s);Fr("label",e,r,s,n),qr.drawBoundary(t,e,te)},F1=function(t,e,i,r){let s=0;for(const n of r){s=0;const a=i[n];let o=Hn(te,a.typeC4Shape.text);switch(o.fontSize=o.fontSize-2,a.typeC4Shape.width=Gr("<<"+a.typeC4Shape.text+">>",o),a.typeC4Shape.height=o.fontSize+2,a.typeC4Shape.Y=te.c4ShapePadding,s=a.typeC4Shape.Y+a.typeC4Shape.height-4,a.image={width:0,height:0,Y:0},a.typeC4Shape.text){case"person":case"external_person":a.image.width=48,a.image.height=48,a.image.Y=s,s=a.image.Y+a.image.height;break}a.sprite&&(a.image.width=48,a.image.height=48,a.image.Y=s,s=a.image.Y+a.image.height);let l=a.wrap&&te.wrap,h=te.width-te.c4ShapePadding*2,u=Hn(te,a.typeC4Shape.text);if(u.fontSize=u.fontSize+2,u.fontWeight="bold",Fr("label",a,l,u,h),a.label.Y=s+8,s=a.label.Y+a.label.height,a.type&&a.type.text!==""){a.type.text="["+a.type.text+"]";let p=Hn(te,a.typeC4Shape.text);Fr("type",a,l,p,h),a.type.Y=s+5,s=a.type.Y+a.type.height}else if(a.techn&&a.techn.text!==""){a.techn.text="["+a.techn.text+"]";let p=Hn(te,a.techn.text);Fr("techn",a,l,p,h),a.techn.Y=s+5,s=a.techn.Y+a.techn.height}let d=s,f=a.label.width;if(a.descr&&a.descr.text!==""){let p=Hn(te,a.typeC4Shape.text);Fr("descr",a,l,p,h),a.descr.Y=s+20,s=a.descr.Y+a.descr.height,f=Math.max(a.label.width,a.descr.width),d=s-a.descr.textLines*5}f=f+te.c4ShapePadding,a.width=Math.max(a.width||te.width,f,te.width),a.height=Math.max(a.height||te.height,d,te.height),a.margin=a.margin||te.c4ShapeMargin,t.insert(a),qr.drawC4Shape(e,a,te)}t.bumpLastMargin(te.c4ShapeMargin)};class vr{constructor(e,i){this.x=e,this.y=i}}let M1=function(t,e){let i=t.x,r=t.y,s=e.x,n=e.y,a=i+t.width/2,o=r+t.height/2,l=Math.abs(i-s),h=Math.abs(r-n),u=h/l,d=t.height/t.width,f=null;return r==n&&i<s?f=new vr(i+t.width,o):r==n&&i>s?f=new vr(i,o):i==s&&r<n?f=new vr(a,r+t.height):i==s&&r>n&&(f=new vr(a,r)),i>s&&r<n?d>=u?f=new vr(i,o+u*t.width/2):f=new vr(a-l/h*t.height/2,r+t.height):i<s&&r<n?d>=u?f=new vr(i+t.width,o+u*t.width/2):f=new vr(a+l/h*t.height/2,r+t.height):i<s&&r>n?d>=u?f=new vr(i+t.width,o-u*t.width/2):f=new vr(a+t.height/2*l/h,r):i>s&&r>n&&(d>=u?f=new vr(i,o-t.width/2*u):f=new vr(a-t.height/2*l/h,r)),f},Jp=function(t,e){let i={x:0,y:0};i.x=e.x+e.width/2,i.y=e.y+e.height/2;let r=M1(t,i);i.x=t.x+t.width/2,i.y=t.y+t.height/2;let s=M1(e,i);return{startPoint:r,endPoint:s}};const $p=function(t,e,i,r){let s=0;for(let n of e){s=s+1;let a=n.wrap&&te.wrap,o=Qp(te);r.db.getC4Type()==="C4Dynamic"&&(n.label.text=s+": "+n.label.text);let h=Gr(n.label.text,o);Fr("label",n,a,o,h),n.techn&&n.techn.text!==""&&(h=Gr(n.techn.text,o),Fr("techn",n,a,o,h)),n.descr&&n.descr.text!==""&&(h=Gr(n.descr.text,o),Fr("descr",n,a,o,h));let u=i(n.from),d=i(n.to),f=Jp(u,d);n.startPoint=f.startPoint,n.endPoint=f.endPoint}qr.drawRels(t,e,te)};function P1(t,e,i,r,s){let n=new N1(s);n.data.widthLimit=i.data.widthLimit/Math.min(ll,r.length);for(let[a,o]of r.entries()){let l=0;o.image={width:0,height:0,Y:0},o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=l,l=o.image.Y+o.image.height);let h=o.wrap&&te.wrap,u=ja(te);if(u.fontSize=u.fontSize+2,u.fontWeight="bold",Fr("label",o,h,u,n.data.widthLimit),o.label.Y=l+8,l=o.label.Y+o.label.height,o.type&&o.type.text!==""){o.type.text="["+o.type.text+"]";let x=ja(te);Fr("type",o,h,x,n.data.widthLimit),o.type.Y=l+5,l=o.type.Y+o.type.height}if(o.descr&&o.descr.text!==""){let x=ja(te);x.fontSize=x.fontSize-2,Fr("descr",o,h,x,n.data.widthLimit),o.descr.Y=l+20,l=o.descr.Y+o.descr.height}if(a==0||a%ll===0){let x=i.data.startx+te.diagramMarginX,E=i.data.stopy+te.diagramMarginY+l;n.setData(x,x,E,E)}else{let x=n.data.stopx!==n.data.startx?n.data.stopx+te.diagramMarginX:n.data.startx,E=n.data.starty;n.setData(x,x,E,E)}n.name=o.alias;let d=s.db.getC4ShapeArray(o.alias),f=s.db.getC4ShapeKeys(o.alias);f.length>0&&F1(n,t,d,f),e=o.alias;let p=s.db.getBoundarys(e);p.length>0&&P1(t,e,n,p,s),o.alias!=="global"&&O1(t,o,n),i.data.stopy=Math.max(n.data.stopy+te.c4ShapeMargin,i.data.stopy),i.data.stopx=Math.max(n.data.stopx+te.c4ShapeMargin,i.data.stopx),Ha=Math.max(Ha,i.data.stopx),Ga=Math.max(Ga,i.data.stopy)}}const V1={drawPersonOrSystemArray:F1,drawBoundary:O1,setConf:cl,draw:function(t,e,i,r){te=P().c4;const s=P().securityLevel;let n;s==="sandbox"&&(n=(0,Q.Ys)("#i"+e));const a=s==="sandbox"?(0,Q.Ys)(n.nodes()[0].contentDocument.body):(0,Q.Ys)("body");let o=r.db;r.db.setWrap(te.wrap),R1=o.getC4ShapeInRow(),ll=o.getC4BoundaryInRow(),k.debug(`C:${JSON.stringify(te,null,2)}`);const l=s==="sandbox"?a.select(`[id="${e}"]`):(0,Q.Ys)(`[id="${e}"]`);qr.insertComputerIcon(l),qr.insertDatabaseIcon(l),qr.insertClockIcon(l);let h=new N1(r);h.setData(te.diagramMarginX,te.diagramMarginX,te.diagramMarginY,te.diagramMarginY),h.data.widthLimit=screen.availWidth,Ha=te.diagramMarginX,Ga=te.diagramMarginY;const u=r.db.getTitle();let d=r.db.getBoundarys("");P1(l,"",h,d,r),qr.insertArrowHead(l),qr.insertArrowEnd(l),qr.insertArrowCrossHead(l),qr.insertArrowFilledHead(l),$p(l,r.db.getRels(),r.db.getC4Shape,r),h.data.stopx=Ha,h.data.stopy=Ga;const f=h.data;let x=f.stopy-f.starty+2*te.diagramMarginY;const T=f.stopx-f.startx+2*te.diagramMarginX;u&&l.append("text").text(u).attr("x",(f.stopx-f.startx)/2-4*te.diagramMarginX).attr("y",f.starty+te.diagramMarginY),Dr(l,x,T,te.useMaxWidth);const S=u?60:0;l.attr("viewBox",f.startx-te.diagramMarginX+" -"+(te.diagramMarginY+S)+" "+T+" "+(x+S)),k.debug("models:",f)}};var hl=function(){var t=function(K,N,A,G){for(A=A||{},G=K.length;G--;A[K[G]]=N);return A},e=[1,3],i=[1,7],r=[1,8],s=[1,9],n=[1,10],a=[1,13],o=[1,12],l=[1,16,25],h=[1,20],u=[1,32],d=[1,33],f=[1,34],p=[1,36],x=[1,39],E=[1,37],T=[1,38],S=[1,44],_=[1,45],D=[1,40],z=[1,41],H=[1,42],it=[1,43],R=[1,48],F=[1,49],v=[1,50],L=[1,51],w=[16,25],m=[1,65],B=[1,66],g=[1,67],O=[1,68],y=[1,69],Y=[1,70],wt=[1,71],at=[1,80],st=[16,25,32,45,46,54,60,61,62,63,64,65,66,71,73],nt=[16,25,30,32,45,46,50,54,60,61,62,63,64,65,66,71,73,88,89,90,91],et=[5,8,9,10,11,16,19,23,25],tt=[54,88,89,90,91],Tt=[54,65,66,88,89,90,91],bt=[54,60,61,62,63,64,88,89,90,91],Z=[16,25,32],jt=[1,107],U={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statments:5,direction:6,directive:7,direction_tb:8,direction_bt:9,direction_rl:10,direction_lr:11,graphConfig:12,openDirective:13,typeDirective:14,closeDirective:15,NEWLINE:16,":":17,argDirective:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,CLASS_DIAGRAM:23,statements:24,EOF:25,statement:26,className:27,alphaNumToken:28,classLiteralName:29,GENERICTYPE:30,relationStatement:31,LABEL:32,classStatement:33,methodStatement:34,annotationStatement:35,clickStatement:36,cssClassStatement:37,noteStatement:38,acc_title:39,acc_title_value:40,acc_descr:41,acc_descr_value:42,acc_descr_multiline_value:43,CLASS:44,STYLE_SEPARATOR:45,STRUCT_START:46,members:47,STRUCT_STOP:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,STR:54,NOTE_FOR:55,noteText:56,NOTE:57,relationType:58,lineType:59,AGGREGATION:60,EXTENSION:61,COMPOSITION:62,DEPENDENCY:63,LOLLIPOP:64,LINE:65,DOTTED_LINE:66,CALLBACK:67,LINK:68,LINK_TARGET:69,CLICK:70,CALLBACK_NAME:71,CALLBACK_ARGS:72,HREF:73,CSSCLASS:74,commentToken:75,textToken:76,graphCodeTokens:77,textNoTagsToken:78,TAGSTART:79,TAGEND:80,"==":81,"--":82,PCT:83,DEFAULT:84,SPACE:85,MINUS:86,keywords:87,UNICODE_TEXT:88,NUM:89,ALPHA:90,BQUOTE_STR:91,$accept:0,$end:1},terminals_:{2:"error",5:"statments",8:"direction_tb",9:"direction_bt",10:"direction_rl",11:"direction_lr",16:"NEWLINE",17:":",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",23:"CLASS_DIAGRAM",25:"EOF",30:"GENERICTYPE",32:"LABEL",39:"acc_title",40:"acc_title_value",41:"acc_descr",42:"acc_descr_value",43:"acc_descr_multiline_value",44:"CLASS",45:"STYLE_SEPARATOR",46:"STRUCT_START",48:"STRUCT_STOP",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"STR",55:"NOTE_FOR",57:"NOTE",60:"AGGREGATION",61:"EXTENSION",62:"COMPOSITION",63:"DEPENDENCY",64:"LOLLIPOP",65:"LINE",66:"DOTTED_LINE",67:"CALLBACK",68:"LINK",69:"LINK_TARGET",70:"CLICK",71:"CALLBACK_NAME",72:"CALLBACK_ARGS",73:"HREF",74:"CSSCLASS",77:"graphCodeTokens",79:"TAGSTART",80:"TAGEND",81:"==",82:"--",83:"PCT",84:"DEFAULT",85:"SPACE",86:"MINUS",87:"keywords",88:"UNICODE_TEXT",89:"NUM",90:"ALPHA",91:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[3,1],[3,2],[6,1],[6,1],[6,1],[6,1],[4,1],[7,4],[7,6],[13,1],[14,1],[18,1],[15,1],[12,4],[24,1],[24,2],[24,3],[27,1],[27,1],[27,2],[27,2],[27,2],[26,1],[26,2],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,2],[26,2],[26,1],[33,2],[33,4],[33,5],[33,7],[35,4],[47,1],[47,2],[34,1],[34,2],[34,1],[34,1],[31,3],[31,4],[31,4],[31,5],[38,3],[38,2],[53,3],[53,2],[53,2],[53,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[36,3],[36,4],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[37,3],[75,1],[75,1],[76,1],[76,1],[76,1],[76,1],[76,1],[76,1],[76,1],[78,1],[78,1],[78,1],[78,1],[28,1],[28,1],[28,1],[29,1],[56,1]],performAction:function(N,A,G,C,dt,b,Jt){var j=b.length-1;switch(dt){case 5:C.setDirection("TB");break;case 6:C.setDirection("BT");break;case 7:C.setDirection("RL");break;case 8:C.setDirection("LR");break;case 12:C.parseDirective("%%{","open_directive");break;case 13:C.parseDirective(b[j],"type_directive");break;case 14:b[j]=b[j].trim().replace(/'/g,'"'),C.parseDirective(b[j],"arg_directive");break;case 15:C.parseDirective("}%%","close_directive","class");break;case 20:case 21:this.$=b[j];break;case 22:this.$=b[j-1]+b[j];break;case 23:case 24:this.$=b[j-1]+"~"+b[j];break;case 25:C.addRelation(b[j]);break;case 26:b[j-1].title=C.cleanupLabel(b[j]),C.addRelation(b[j-1]);break;case 35:this.$=b[j].trim(),C.setAccTitle(this.$);break;case 36:case 37:this.$=b[j].trim(),C.setAccDescription(this.$);break;case 38:C.addClass(b[j]);break;case 39:C.addClass(b[j-2]),C.setCssClass(b[j-2],b[j]);break;case 40:C.addClass(b[j-3]),C.addMembers(b[j-3],b[j-1]);break;case 41:C.addClass(b[j-5]),C.setCssClass(b[j-5],b[j-3]),C.addMembers(b[j-5],b[j-1]);break;case 42:C.addAnnotation(b[j],b[j-2]);break;case 43:this.$=[b[j]];break;case 44:b[j].push(b[j-1]),this.$=b[j];break;case 45:break;case 46:C.addMember(b[j-1],C.cleanupLabel(b[j]));break;case 47:break;case 48:break;case 49:this.$={id1:b[j-2],id2:b[j],relation:b[j-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:b[j-3],id2:b[j],relation:b[j-1],relationTitle1:b[j-2],relationTitle2:"none"};break;case 51:this.$={id1:b[j-3],id2:b[j],relation:b[j-2],relationTitle1:"none",relationTitle2:b[j-1]};break;case 52:this.$={id1:b[j-4],id2:b[j],relation:b[j-2],relationTitle1:b[j-3],relationTitle2:b[j-1]};break;case 53:C.addNote(b[j],b[j-1]);break;case 54:C.addNote(b[j]);break;case 55:this.$={type1:b[j-2],type2:b[j],lineType:b[j-1]};break;case 56:this.$={type1:"none",type2:b[j],lineType:b[j-1]};break;case 57:this.$={type1:b[j-1],type2:"none",lineType:b[j]};break;case 58:this.$={type1:"none",type2:"none",lineType:b[j]};break;case 59:this.$=C.relationType.AGGREGATION;break;case 60:this.$=C.relationType.EXTENSION;break;case 61:this.$=C.relationType.COMPOSITION;break;case 62:this.$=C.relationType.DEPENDENCY;break;case 63:this.$=C.relationType.LOLLIPOP;break;case 64:this.$=C.lineType.LINE;break;case 65:this.$=C.lineType.DOTTED_LINE;break;case 66:case 72:this.$=b[j-2],C.setClickEvent(b[j-1],b[j]);break;case 67:case 73:this.$=b[j-3],C.setClickEvent(b[j-2],b[j-1]),C.setTooltip(b[j-2],b[j]);break;case 68:case 76:this.$=b[j-2],C.setLink(b[j-1],b[j]);break;case 69:this.$=b[j-3],C.setLink(b[j-2],b[j-1],b[j]);break;case 70:case 78:this.$=b[j-3],C.setLink(b[j-2],b[j-1]),C.setTooltip(b[j-2],b[j]);break;case 71:case 79:this.$=b[j-4],C.setLink(b[j-3],b[j-2],b[j]),C.setTooltip(b[j-3],b[j-1]);break;case 74:this.$=b[j-3],C.setClickEvent(b[j-2],b[j-1],b[j]);break;case 75:this.$=b[j-4],C.setClickEvent(b[j-3],b[j-2],b[j-1]),C.setTooltip(b[j-3],b[j]);break;case 77:this.$=b[j-3],C.setLink(b[j-2],b[j-1],b[j]);break;case 80:C.setCssClass(b[j-1],b[j]);break}},table:[{3:1,4:2,5:e,6:4,7:5,8:i,9:r,10:s,11:n,12:6,13:11,19:a,23:o},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{3:14,4:2,5:e,6:4,7:5,8:i,9:r,10:s,11:n,12:6,13:11,19:a,23:o},{1:[2,9]},t(l,[2,5]),t(l,[2,6]),t(l,[2,7]),t(l,[2,8]),{14:15,20:[1,16]},{16:[1,17]},{20:[2,12]},{1:[2,4]},{15:18,17:[1,19],22:h},t([17,22],[2,13]),{6:31,7:30,8:i,9:r,10:s,11:n,13:11,19:a,24:21,26:22,27:35,28:46,29:47,31:23,33:24,34:25,35:26,36:27,37:28,38:29,39:u,41:d,43:f,44:p,49:x,51:E,52:T,55:S,57:_,67:D,68:z,70:H,74:it,88:R,89:F,90:v,91:L},{16:[1,52]},{18:53,21:[1,54]},{16:[2,15]},{25:[1,55]},{16:[1,56],25:[2,17]},t(w,[2,25],{32:[1,57]}),t(w,[2,27]),t(w,[2,28]),t(w,[2,29]),t(w,[2,30]),t(w,[2,31]),t(w,[2,32]),t(w,[2,33]),t(w,[2,34]),{40:[1,58]},{42:[1,59]},t(w,[2,37]),t(w,[2,45],{53:60,58:63,59:64,32:[1,62],54:[1,61],60:m,61:B,62:g,63:O,64:y,65:Y,66:wt}),{27:72,28:46,29:47,88:R,89:F,90:v,91:L},t(w,[2,47]),t(w,[2,48]),{28:73,88:R,89:F,90:v},{27:74,28:46,29:47,88:R,89:F,90:v,91:L},{27:75,28:46,29:47,88:R,89:F,90:v,91:L},{27:76,28:46,29:47,88:R,89:F,90:v,91:L},{54:[1,77]},{27:78,28:46,29:47,88:R,89:F,90:v,91:L},{54:at,56:79},t(st,[2,20],{28:46,29:47,27:81,30:[1,82],88:R,89:F,90:v,91:L}),t(st,[2,21],{30:[1,83]}),t(nt,[2,94]),t(nt,[2,95]),t(nt,[2,96]),t([16,25,30,32,45,46,54,60,61,62,63,64,65,66,71,73],[2,97]),t(et,[2,10]),{15:84,22:h},{22:[2,14]},{1:[2,16]},{6:31,7:30,8:i,9:r,10:s,11:n,13:11,19:a,24:85,25:[2,18],26:22,27:35,28:46,29:47,31:23,33:24,34:25,35:26,36:27,37:28,38:29,39:u,41:d,43:f,44:p,49:x,51:E,52:T,55:S,57:_,67:D,68:z,70:H,74:it,88:R,89:F,90:v,91:L},t(w,[2,26]),t(w,[2,35]),t(w,[2,36]),{27:86,28:46,29:47,54:[1,87],88:R,89:F,90:v,91:L},{53:88,58:63,59:64,60:m,61:B,62:g,63:O,64:y,65:Y,66:wt},t(w,[2,46]),{59:89,65:Y,66:wt},t(tt,[2,58],{58:90,60:m,61:B,62:g,63:O,64:y}),t(Tt,[2,59]),t(Tt,[2,60]),t(Tt,[2,61]),t(Tt,[2,62]),t(Tt,[2,63]),t(bt,[2,64]),t(bt,[2,65]),t(w,[2,38],{45:[1,91],46:[1,92]}),{50:[1,93]},{54:[1,94]},{54:[1,95]},{71:[1,96],73:[1,97]},{28:98,88:R,89:F,90:v},{54:at,56:99},t(w,[2,54]),t(w,[2,98]),t(st,[2,22]),t(st,[2,23]),t(st,[2,24]),{16:[1,100]},{25:[2,19]},t(Z,[2,49]),{27:101,28:46,29:47,88:R,89:F,90:v,91:L},{27:102,28:46,29:47,54:[1,103],88:R,89:F,90:v,91:L},t(tt,[2,57],{58:104,60:m,61:B,62:g,63:O,64:y}),t(tt,[2,56]),{28:105,88:R,89:F,90:v},{47:106,51:jt},{27:108,28:46,29:47,88:R,89:F,90:v,91:L},t(w,[2,66],{54:[1,109]}),t(w,[2,68],{54:[1,111],69:[1,110]}),t(w,[2,72],{54:[1,112],72:[1,113]}),t(w,[2,76],{54:[1,115],69:[1,114]}),t(w,[2,80]),t(w,[2,53]),t(et,[2,11]),t(Z,[2,51]),t(Z,[2,50]),{27:116,28:46,29:47,88:R,89:F,90:v,91:L},t(tt,[2,55]),t(w,[2,39],{46:[1,117]}),{48:[1,118]},{47:119,48:[2,43],51:jt},t(w,[2,42]),t(w,[2,67]),t(w,[2,69]),t(w,[2,70],{69:[1,120]}),t(w,[2,73]),t(w,[2,74],{54:[1,121]}),t(w,[2,77]),t(w,[2,78],{69:[1,122]}),t(Z,[2,52]),{47:123,51:jt},t(w,[2,40]),{48:[2,44]},t(w,[2,71]),t(w,[2,75]),t(w,[2,79]),{48:[1,124]},t(w,[2,41])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],6:[2,9],13:[2,12],14:[2,4],20:[2,15],54:[2,14],55:[2,16],85:[2,19],119:[2,44]},parseError:function(N,A){if(A.recoverable)this.trace(N);else{var G=new Error(N);throw G.hash=A,G}},parse:function(N){var A=this,G=[0],C=[],dt=[null],b=[],Jt=this.table,j="",Nt=0,At=0,kt=2,gt=1,_t=b.slice.call(arguments,1),yt=Object.create(this.lexer),Ct={yy:{}};for(var qe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,qe)&&(Ct.yy[qe]=this.yy[qe]);yt.setInput(N,Ct.yy),Ct.yy.lexer=yt,Ct.yy.parser=this,typeof yt.yylloc>"u"&&(yt.yylloc={});var Ne=yt.yylloc;b.push(Ne);var se=yt.options&&yt.options.ranges;typeof Ct.yy.parseError=="function"?this.parseError=Ct.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re(){var rt;return rt=C.pop()||yt.lex()||gt,typeof rt!="number"&&(rt instanceof Array&&(C=rt,rt=C.pop()),rt=A.symbols_[rt]||rt),rt}for(var Le,ni,Ye,ue,Zt={},St,Et,Dt,ut;;){if(ni=G[G.length-1],this.defaultActions[ni]?Ye=this.defaultActions[ni]:((Le===null||typeof Le>"u")&&(Le=re()),Ye=Jt[ni]&&Jt[ni][Le]),typeof Ye>"u"||!Ye.length||!Ye[0]){var qt="";ut=[];for(St in Jt[ni])this.terminals_[St]&&St>kt&&ut.push("'"+this.terminals_[St]+"'");yt.showPosition?qt="Parse error on line "+(Nt+1)+`:
|
|
1309
|
-
`+yt.showPosition()+`
|
|
1310
|
-
Expecting `+ut.join(", ")+", got '"+(this.terminals_[Le]||Le)+"'":qt="Parse error on line "+(Nt+1)+": Unexpected "+(Le==gt?"end of input":"'"+(this.terminals_[Le]||Le)+"'"),this.parseError(qt,{text:yt.match,token:this.terminals_[Le]||Le,line:yt.yylineno,loc:Ne,expected:ut})}if(Ye[0]instanceof Array&&Ye.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ni+", token: "+Le);switch(Ye[0]){case 1:G.push(Le),dt.push(yt.yytext),b.push(yt.yylloc),G.push(Ye[1]),Le=null,At=yt.yyleng,j=yt.yytext,Nt=yt.yylineno,Ne=yt.yylloc;break;case 2:if(Et=this.productions_[Ye[1]][1],Zt.$=dt[dt.length-Et],Zt._$={first_line:b[b.length-(Et||1)].first_line,last_line:b[b.length-1].last_line,first_column:b[b.length-(Et||1)].first_column,last_column:b[b.length-1].last_column},se&&(Zt._$.range=[b[b.length-(Et||1)].range[0],b[b.length-1].range[1]]),ue=this.performAction.apply(Zt,[j,At,Nt,Ct.yy,Ye[1],dt,b].concat(_t)),typeof ue<"u")return ue;Et&&(G=G.slice(0,-1*Et*2),dt=dt.slice(0,-1*Et),b=b.slice(0,-1*Et)),G.push(this.productions_[Ye[1]][0]),dt.push(Zt.$),b.push(Zt._$),Dt=Jt[G[G.length-2]][G[G.length-1]],G.push(Dt);break;case 3:return!0}}return!0}},pt=function(){var K={EOF:1,parseError:function(A,G){if(this.yy.parser)this.yy.parser.parseError(A,G);else throw new Error(A)},setInput:function(N,A){return this.yy=A||this.yy||{},this._input=N,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var N=this._input[0];this.yytext+=N,this.yyleng++,this.offset++,this.match+=N,this.matched+=N;var A=N.match(/(?:\r\n?|\n).*/g);return A?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),N},unput:function(N){var A=N.length,G=N.split(/(?:\r\n?|\n)/g);this._input=N+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-A),this.offset-=A;var C=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),G.length-1&&(this.yylineno-=G.length-1);var dt=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:G?(G.length===C.length?this.yylloc.first_column:0)+C[C.length-G.length].length-G[0].length:this.yylloc.first_column-A},this.options.ranges&&(this.yylloc.range=[dt[0],dt[0]+this.yyleng-A]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1311
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(N){this.unput(this.match.slice(N))},pastInput:function(){var N=this.matched.substr(0,this.matched.length-this.match.length);return(N.length>20?"...":"")+N.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var N=this.match;return N.length<20&&(N+=this._input.substr(0,20-N.length)),(N.substr(0,20)+(N.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var N=this.pastInput(),A=new Array(N.length+1).join("-");return N+this.upcomingInput()+`
|
|
1312
|
-
`+A+"^"},test_match:function(N,A){var G,C,dt;if(this.options.backtrack_lexer&&(dt={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&&(dt.yylloc.range=this.yylloc.range.slice(0))),C=N[0].match(/(?:\r\n?|\n).*/g),C&&(this.yylineno+=C.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:C?C[C.length-1].length-C[C.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+N[0].length},this.yytext+=N[0],this.match+=N[0],this.matches=N,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(N[0].length),this.matched+=N[0],G=this.performAction.call(this,this.yy,this,A,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),G)return G;if(this._backtrack){for(var b in dt)this[b]=dt[b];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var N,A,G,C;this._more||(this.yytext="",this.match="");for(var dt=this._currentRules(),b=0;b<dt.length;b++)if(G=this._input.match(this.rules[dt[b]]),G&&(!A||G[0].length>A[0].length)){if(A=G,C=b,this.options.backtrack_lexer){if(N=this.test_match(G,dt[b]),N!==!1)return N;if(this._backtrack){A=!1;continue}else return!1}else if(!this.options.flex)break}return A?(N=this.test_match(A,dt[C]),N!==!1?N:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1313
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var A=this.next();return A||this.lex()},begin:function(A){this.conditionStack.push(A)},popState:function(){var A=this.conditionStack.length-1;return A>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(A){return A=this.conditionStack.length-1-Math.abs(A||0),A>=0?this.conditionStack[A]:"INITIAL"},pushState:function(A){this.begin(A)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(A,G,C,dt){switch(C){case 0:return this.begin("open_directive"),19;case 1:return 8;case 2:return 9;case 3:return 10;case 4:return 11;case 5:return this.begin("type_directive"),20;case 6:return this.popState(),this.begin("arg_directive"),17;case 7:return this.popState(),this.popState(),22;case 8:return 21;case 9:break;case 10:break;case 11:return this.begin("acc_title"),39;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),41;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:return 16;case 19:break;case 20:return 23;case 21:return 23;case 22:return this.begin("struct"),46;case 23:return"EDGE_STATE";case 24:return"EOF_IN_STRUCT";case 25:return"OPEN_IN_STRUCT";case 26:return this.popState(),48;case 27:break;case 28:return"MEMBER";case 29:return 44;case 30:return 74;case 31:return 67;case 32:return 68;case 33:return 70;case 34:return 55;case 35:return 57;case 36:return 49;case 37:return 50;case 38:this.begin("generic");break;case 39:this.popState();break;case 40:return"GENERICTYPE";case 41:this.begin("string");break;case 42:this.popState();break;case 43:return"STR";case 44:this.begin("bqstring");break;case 45:this.popState();break;case 46:return"BQUOTE_STR";case 47:this.begin("href");break;case 48:this.popState();break;case 49:return 73;case 50:this.begin("callback_name");break;case 51:this.popState();break;case 52:this.popState(),this.begin("callback_args");break;case 53:return 71;case 54:this.popState();break;case 55:return 72;case 56:return 69;case 57:return 69;case 58:return 69;case 59:return 69;case 60:return 61;case 61:return 61;case 62:return 63;case 63:return 63;case 64:return 62;case 65:return 60;case 66:return 64;case 67:return 65;case 68:return 66;case 69:return 32;case 70:return 45;case 71:return 86;case 72:return"DOT";case 73:return"PLUS";case 74:return 83;case 75:return"EQUALS";case 76:return"EQUALS";case 77:return 90;case 78:return"PUNCTUATION";case 79:return 89;case 80:return 88;case 81:return 85;case 82:return 25}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:\[\*\])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},callback_args:{rules:[54,55],inclusive:!1},callback_name:{rules:[51,52,53],inclusive:!1},href:{rules:[48,49],inclusive:!1},struct:{rules:[23,24,25,26,27,28],inclusive:!1},generic:{rules:[39,40],inclusive:!1},bqstring:{rules:[45,46],inclusive:!1},string:{rules:[42,43],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,29,30,31,32,33,34,35,36,37,38,41,44,47,50,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82],inclusive:!0}}};return K}();U.lexer=pt;function $(){this.yy={}}return $.prototype=U,U.Parser=$,new $}();hl.parser=hl;const Y1=hl,tg=(t,e)=>{var i;return((i=e==null?void 0:e.class)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*classDiagram/)!==null},eg=(t,e)=>{var i;return t.match(/^\s*classDiagram/)!==null&&((i=e==null?void 0:e.class)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!0:t.match(/^\s*classDiagram-v2/)!==null},ul="classid-";let dl=[],gi={},qa=[],z1=0,Gn=[];const jn=t=>Qt.sanitizeText(t,P()),ig=function(t,e,i){si.parseDirective(this,t,e,i)},qn=function(t){let e="",i=t;if(t.indexOf("~")>0){let r=t.split("~");i=r[0],e=Qt.sanitizeText(r[1],P())}return{className:i,type:e}},fl=function(t){let e=qn(t);gi[e.className]===void 0&&(gi[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:ul+e.className+"-"+z1},z1++)},W1=function(t){const e=Object.keys(gi);for(const i of e)if(gi[i].id===t)return gi[i].domId},rg=function(){dl=[],gi={},qa=[],Gn=[],Gn.push(Z1),ar()},sg=function(t){return gi[t]},ng=function(){return gi},ag=function(){return dl},og=function(){return qa},lg=function(t){k.debug("Adding relation: "+JSON.stringify(t)),fl(t.id1),fl(t.id2),t.id1=qn(t.id1).className,t.id2=qn(t.id2).className,t.relationTitle1=Qt.sanitizeText(t.relationTitle1.trim(),P()),t.relationTitle2=Qt.sanitizeText(t.relationTitle2.trim(),P()),dl.push(t)},cg=function(t,e){const i=qn(t).className;gi[i].annotations.push(e)},U1=function(t,e){const i=qn(t).className,r=gi[i];if(typeof e=="string"){const s=e.trim();s.startsWith("<<")&&s.endsWith(">>")?r.annotations.push(jn(s.substring(2,s.length-2))):s.indexOf(")")>0?r.methods.push(jn(s)):s&&r.members.push(jn(s))}},hg=function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(i=>U1(t,i)))},ug=function(t,e){const i={id:`note${qa.length}`,class:e,text:t};qa.push(i)},dg=function(t){return t.substring(0,1)===":"?Qt.sanitizeText(t.substr(1).trim(),P()):jn(t.trim())},pl=function(t,e){t.split(",").forEach(function(i){let r=i;i[0].match(/\d/)&&(r=ul+r),gi[r]!==void 0&&gi[r].cssClasses.push(e)})},fg=function(t,e){const i=P();t.split(",").forEach(function(r){e!==void 0&&(gi[r].tooltip=Qt.sanitizeText(e,i))})},pg=function(t){return gi[t].tooltip},gg=function(t,e,i){const r=P();t.split(",").forEach(function(s){let n=s;s[0].match(/\d/)&&(n=ul+n),gi[n]!==void 0&&(gi[n].link=ke.formatUrl(e,r),r.securityLevel==="sandbox"?gi[n].linkTarget="_top":typeof i=="string"?gi[n].linkTarget=jn(i):gi[n].linkTarget="_blank")}),pl(t,"clickable")},yg=function(t,e,i){t.split(",").forEach(function(r){mg(r,e,i),gi[r].haveCallback=!0}),pl(t,"clickable")},mg=function(t,e,i){const r=P();let s=t,n=W1(s);if(r.securityLevel==="loose"&&e!==void 0&&gi[s]!==void 0){let a=[];if(typeof i=="string"){a=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let o=0;o<a.length;o++){let l=a[o].trim();l.charAt(0)==='"'&&l.charAt(l.length-1)==='"'&&(l=l.substr(1,l.length-2)),a[o]=l}}a.length===0&&a.push(n),Gn.push(function(){const o=document.querySelector(`[id="${n}"]`);o!==null&&o.addEventListener("click",function(){ke.runFunc(e,...a)},!1)})}},bg=function(t){Gn.forEach(function(e){e(t)})},xg={LINE:0,DOTTED_LINE:1},kg={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},Z1=function(t){let e=(0,Q.Ys)(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=(0,Q.Ys)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),(0,Q.Ys)(t).select("svg").selectAll("g.node").on("mouseover",function(){const s=(0,Q.Ys)(this);if(s.attr("title")===null)return;const a=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(s.attr("title")).style("left",window.scrollX+a.left+(a.right-a.left)/2+"px").style("top",window.scrollY+a.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/<br\/>/g,"<br/>")),s.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),(0,Q.Ys)(this).classed("hover",!1)})};Gn.push(Z1);let H1="TB";const mn={parseDirective:ig,setAccTitle:or,getAccTitle:fr,getAccDescription:gr,setAccDescription:pr,getConfig:()=>P().class,addClass:fl,bindFunctions:bg,clear:rg,getClass:sg,getClasses:ng,getNotes:og,addAnnotation:cg,addNote:ug,getRelations:ag,addRelation:lg,getDirection:()=>H1,setDirection:t=>{H1=t},addMember:U1,addMembers:hg,cleanupLabel:dg,lineType:xg,relationType:kg,setClickEvent:yg,setCssClass:pl,setLink:gg,getTooltip:pg,setTooltip:fg,lookUpDomId:W1,setDiagramTitle:Ir,getDiagramTitle:Rr};let G1=0;const _g=function(t,e,i,r,s){const n=function(_){switch(_){case s.db.relationType.AGGREGATION:return"aggregation";case s.db.relationType.EXTENSION:return"extension";case s.db.relationType.COMPOSITION:return"composition";case s.db.relationType.DEPENDENCY:return"dependency";case s.db.relationType.LOLLIPOP:return"lollipop"}};e.points=e.points.filter(_=>!Number.isNaN(_.y));const a=e.points,o=(0,Q.jvg)().x(function(_){return _.x}).y(function(_){return _.y}).curve(Q.$0Z),l=t.append("path").attr("d",o(a)).attr("id","edge"+G1).attr("class","relation");let h="";r.arrowMarkerAbsolute&&(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,h=h.replace(/\(/g,"\\("),h=h.replace(/\)/g,"\\)")),i.relation.lineType==1&&l.attr("class","relation dashed-line"),i.relation.lineType==10&&l.attr("class","relation dotted-line"),i.relation.type1!=="none"&&l.attr("marker-start","url("+h+"#"+n(i.relation.type1)+"Start)"),i.relation.type2!=="none"&&l.attr("marker-end","url("+h+"#"+n(i.relation.type2)+"End)");let u,d;const f=e.points.length;let p=ke.calcLabelPosition(e.points);u=p.x,d=p.y;let x,E,T,S;if(f%2!==0&&f>1){let _=ke.calcCardinalityPosition(i.relation.type1!=="none",e.points,e.points[0]),D=ke.calcCardinalityPosition(i.relation.type2!=="none",e.points,e.points[f-1]);k.debug("cardinality_1_point "+JSON.stringify(_)),k.debug("cardinality_2_point "+JSON.stringify(D)),x=_.x,E=_.y,T=D.x,S=D.y}if(i.title!==void 0){const _=t.append("g").attr("class","classLabel"),D=_.append("text").attr("class","label").attr("x",u).attr("y",d).attr("fill","red").attr("text-anchor","middle").text(i.title);window.label=D;const z=D.node().getBBox();_.insert("rect",":first-child").attr("class","box").attr("x",z.x-r.padding/2).attr("y",z.y-r.padding/2).attr("width",z.width+r.padding).attr("height",z.height+r.padding)}k.info("Rendering relation "+JSON.stringify(i)),i.relationTitle1!==void 0&&i.relationTitle1!=="none"&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",x).attr("y",E).attr("fill","black").attr("font-size","6").text(i.relationTitle1),i.relationTitle2!==void 0&&i.relationTitle2!=="none"&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",T).attr("y",S).attr("fill","black").attr("font-size","6").text(i.relationTitle2),G1++},Eg=function(t,e,i,r){k.debug("Rendering class ",e,i);const s=e.id,n={id:s,label:e.id,width:0,height:0},a=t.append("g").attr("id",r.db.lookUpDomId(s)).attr("class","classGroup");let o;e.link?o=a.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",i.textHeight+i.padding).attr("x",0):o=a.append("text").attr("y",i.textHeight+i.padding).attr("x",0);let l=!0;e.annotations.forEach(function(H){const it=o.append("tspan").text("\xAB"+H+"\xBB");l||it.attr("dy",i.textHeight),l=!1});let h=e.id;e.type!==void 0&&e.type!==""&&(h+="<"+e.type+">");const u=o.append("tspan").text(h).attr("class","title");l||u.attr("dy",i.textHeight);const d=o.node().getBBox().height,f=a.append("line").attr("x1",0).attr("y1",i.padding+d+i.dividerMargin/2).attr("y2",i.padding+d+i.dividerMargin/2),p=a.append("text").attr("x",i.padding).attr("y",d+i.dividerMargin+i.textHeight).attr("fill","white").attr("class","classText");l=!0,e.members.forEach(function(H){j1(p,H,l,i),l=!1});const x=p.node().getBBox(),E=a.append("line").attr("x1",0).attr("y1",i.padding+d+i.dividerMargin+x.height).attr("y2",i.padding+d+i.dividerMargin+x.height),T=a.append("text").attr("x",i.padding).attr("y",d+2*i.dividerMargin+x.height+i.textHeight).attr("fill","white").attr("class","classText");l=!0,e.methods.forEach(function(H){j1(T,H,l,i),l=!1});const S=a.node().getBBox();var _=" ";e.cssClasses.length>0&&(_=_+e.cssClasses.join(" "));const z=a.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",S.width+2*i.padding).attr("height",S.height+i.padding+.5*i.dividerMargin).attr("class",_).node().getBBox().width;return o.node().childNodes.forEach(function(H){H.setAttribute("x",(z-H.getBBox().width)/2)}),e.tooltip&&o.insert("title").text(e.tooltip),f.attr("x2",z),E.attr("x2",z),n.width=z,n.height=S.height+i.padding+.5*i.dividerMargin,n},vg=function(t,e,i,r){k.debug("Rendering note ",e,i);const s=e.id,n={id:s,text:e.text,width:0,height:0},a=t.append("g").attr("id",s).attr("class","classGroup");let o=a.append("text").attr("y",i.textHeight+i.padding).attr("x",0);const l=JSON.parse(`"${e.text}"`).split(`
|
|
1314
|
-
`);l.forEach(function(f){k.debug(`Adding line: ${f}`),o.append("tspan").text(f).attr("class","title").attr("dy",i.textHeight)});const h=a.node().getBBox(),d=a.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",h.width+2*i.padding).attr("height",h.height+l.length*i.textHeight+i.padding+.5*i.dividerMargin).node().getBBox().width;return o.node().childNodes.forEach(function(f){f.setAttribute("x",(d-f.getBBox().width)/2)}),n.width=d,n.height=h.height+l.length*i.textHeight+i.padding+.5*i.dividerMargin,n},Xa=function(t){const e=/^([#+~-])?(\w+)(~\w+~|\[])?\s+(\w+) *([$*])?$/,i=/^([#+|~-])?(\w+) *\( *(.*)\) *([$*])? *(\w*[[\]|~]*\s*\w*~?)$/;let r=t.match(e),s=t.match(i);return r&&!s?Cg(r):s?Tg(s):Sg(t)},Cg=function(t){let e="",i="";try{let r=t[1]?t[1].trim():"",s=t[2]?t[2].trim():"",n=t[3]?ii(t[3].trim()):"",a=t[4]?t[4].trim():"",o=t[5]?t[5].trim():"";i=r+s+n+" "+a,e=gl(o)}catch{i=t}return{displayText:i,cssStyle:e}},Tg=function(t){let e="",i="";try{let r=t[1]?t[1].trim():"",s=t[2]?t[2].trim():"",n=t[3]?ii(t[3].trim()):"",a=t[4]?t[4].trim():"",o=t[5]?" : "+ii(t[5]).trim():"";i=r+s+"("+n+")"+o,e=gl(a)}catch{i=t}return{displayText:i,cssStyle:e}},Sg=function(t){let e="",i="",r="",s=t.indexOf("("),n=t.indexOf(")");if(s>1&&n>s&&n<=t.length){let a="",o="",l=t.substring(0,1);l.match(/\w/)?o=t.substring(0,s).trim():(l.match(/[#+~-]/)&&(a=l),o=t.substring(1,s).trim());const h=t.substring(s+1,n);t.substring(n+1,1),i=gl(t.substring(n+1,n+2)),e=a+o+"("+ii(h.trim())+")",n<t.length&&(r=t.substring(n+2).trim(),r!==""&&(r=" : "+ii(r),e+=r))}else e=ii(t);return{displayText:e,cssStyle:i}},j1=function(t,e,i,r){let s=Xa(e);const n=t.append("tspan").attr("x",r.padding).text(s.displayText);s.cssStyle!==""&&n.attr("style",s.cssStyle),i||n.attr("dy",r.textHeight)},gl=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}},yl={drawClass:Eg,drawEdge:_g,drawNote:vg,parseMember:Xa};let Ka={};const Qa=20,Xn=function(t){const e=Object.entries(Ka).find(i=>i[1].label===t);if(e)return e[0]},wg=function(t){t.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.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 18,7 L9,13 L14,7 L9,1 Z")},Ag={draw:function(t,e,i,r){const s=P().class;Ka={},k.info("Rendering diagram "+t);const n=P().securityLevel;let a;n==="sandbox"&&(a=(0,Q.Ys)("#i"+e));const o=n==="sandbox"?(0,Q.Ys)(a.nodes()[0].contentDocument.body):(0,Q.Ys)("body"),l=o.select(`[id='${e}']`);wg(l);const h=new Be.k({multigraph:!0});h.setGraph({isMultiGraph:!0}),h.setDefaultEdgeLabel(function(){return{}});const u=r.db.getClasses(),d=Object.keys(u);for(const _ of d){const D=u[_],z=yl.drawClass(l,D,s,r);Ka[z.id]=z,h.setNode(z.id,z),k.info("Org height: "+z.height)}r.db.getRelations().forEach(function(_){k.info("tjoho"+Xn(_.id1)+Xn(_.id2)+JSON.stringify(_)),h.setEdge(Xn(_.id1),Xn(_.id2),{relation:_},_.title||"DEFAULT")}),r.db.getNotes().forEach(function(_){k.debug(`Adding note: ${JSON.stringify(_)}`);const D=yl.drawNote(l,_,s,r);Ka[D.id]=D,h.setNode(D.id,D),_.class&&_.class in u&&h.setEdge(_.id,Xn(_.class),{relation:{id1:_.id,id2:_.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),(0,xe.bK)(h),h.nodes().forEach(function(_){_!==void 0&&h.node(_)!==void 0&&(k.debug("Node "+_+": "+JSON.stringify(h.node(_))),o.select("#"+(r.db.lookUpDomId(_)||_)).attr("transform","translate("+(h.node(_).x-h.node(_).width/2)+","+(h.node(_).y-h.node(_).height/2)+" )"))}),h.edges().forEach(function(_){_!==void 0&&h.edge(_)!==void 0&&(k.debug("Edge "+_.v+" -> "+_.w+": "+JSON.stringify(h.edge(_))),yl.drawEdge(l,h.edge(_),h.edge(_).relation,s,r))});const x=l.node().getBBox(),E=x.width+Qa*2,T=x.height+Qa*2;Dr(l,T,E,s.useMaxWidth);const S=`${x.x-Qa} ${x.y-Qa} ${E} ${T}`;k.debug(`viewBox ${S}`),l.attr("viewBox",S)}},Lg=(t,e,i,r)=>{e.forEach(s=>{Bg[s](t,i,r)})},Bg={extension:(t,e,i)=>{k.trace("Making markers for ",i),t.append("defs").append("marker").attr("id",e+"-extensionStart").attr("class","marker extension "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},composition:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-compositionStart").attr("class","marker composition "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},aggregation:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},dependency:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},lollipop:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","white").attr("cx",6).attr("cy",7).attr("r",6)},point:(t,e)=>{t.append("marker").attr("id",e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 12 20").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},circle:(t,e)=>{t.append("marker").attr("id",e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},cross:(t,e)=>{t.append("marker").attr("id",e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},barb:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}},q1=Lg;function Dg(t,e){e&&t.attr("style",e)}function Ig(t){const e=(0,Q.Ys)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),i=e.append("xhtml:div"),r=t.label,s=t.isNode?"nodeLabel":"edgeLabel";return i.html('<span class="'+s+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+r+"</span>"),Dg(i,t.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap"),i.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}const cr=(t,e,i,r)=>{let s=t||"";if(typeof s=="object"&&(s=s[0]),Ge(P().flowchart.htmlLabels)){s=s.replace(/\\n|\n/g,"<br />"),k.info("vertexText"+s);const n={isNode:r,label:kc(s).replace(/fa[blrs]?:fa-[\w-]+/g,o=>`<i class='${o.replace(":"," ")}'></i>`),labelStyle:e.replace("fill:","color:")};return Ig(n)}else{const n=document.createElementNS("http://www.w3.org/2000/svg","text");n.setAttribute("style",e.replace("color:","fill:"));let a=[];typeof s=="string"?a=s.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(s)?a=s:a=[];for(const o of a){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),i?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),n.appendChild(l)}return n}},Zi=(t,e,i,r)=>{let s;i?s=i:s="node default";const n=t.insert("g").attr("class",s).attr("id",e.domId||e.id),a=n.insert("g").attr("class","label").attr("style",e.labelStyle);let o;e.labelText===void 0?o="":o=typeof e.labelText=="string"?e.labelText:e.labelText[0];const l=a.node().appendChild(cr(je(kc(o),P()),e.labelStyle,!1,r));let h=l.getBBox();if(Ge(P().flowchart.htmlLabels)){const d=l.children[0],f=(0,Q.Ys)(l);h=d.getBoundingClientRect(),f.attr("width",h.width),f.attr("height",h.height)}const u=e.padding/2;return a.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),{shapeSvg:n,bbox:h,halfPadding:u,label:a}},yi=(t,e)=>{const i=e.node().getBBox();t.width=i.width,t.height=i.height};function ls(t,e,i,r){return t.insert("polygon",":first-child").attr("points",r.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+i/2+")")}let Ve={},Mr={},X1={};const Rg=()=>{Mr={},X1={},Ve={}},Ja=(t,e)=>(k.trace("In isDecendant",e," ",t," = ",Mr[e].includes(t)),!!Mr[e].includes(t)),Ng=(t,e)=>(k.info("Decendants of ",e," is ",Mr[e]),k.info("Edge is ",t),t.v===e||t.w===e?!1:Mr[e]?Mr[e].includes(t.v)||Ja(t.v,e)||Ja(t.w,e)||Mr[e].includes(t.w):(k.debug("Tilt, ",e,",not in decendants"),!1)),K1=(t,e,i,r)=>{k.warn("Copying children of ",t,"root",r,"data",e.node(t),r);const s=e.children(t)||[];t!==r&&s.push(t),k.warn("Copying (nodes) clusterId",t,"nodes",s),s.forEach(n=>{if(e.children(n).length>0)K1(n,e,i,r);else{const a=e.node(n);k.info("cp ",n," to ",r," with parent ",t),i.setNode(n,a),r!==e.parent(n)&&(k.warn("Setting parent",n,e.parent(n)),i.setParent(n,e.parent(n))),t!==r&&n!==t?(k.debug("Setting parent",n,t),i.setParent(n,t)):(k.info("In copy ",t,"root",r,"data",e.node(t),r),k.debug("Not Setting parent for node=",n,"cluster!==rootId",t!==r,"node!==clusterId",n!==t));const o=e.edges(n);k.debug("Copying Edges",o),o.forEach(l=>{k.info("Edge",l);const h=e.edge(l.v,l.w,l.name);k.info("Edge data",h,r);try{Ng(l,r)?(k.info("Copying as ",l.v,l.w,h,l.name),i.setEdge(l.v,l.w,h,l.name),k.info("newGraph edges ",i.edges(),i.edge(i.edges()[0]))):k.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",r," clusterId:",t)}catch(u){k.error(u)}})}k.debug("Removing node",n),e.removeNode(n)})},Q1=(t,e)=>{const i=e.children(t);let r=[...i];for(const s of i)X1[s]=t,r=[...r,...Q1(s,e)];return r},Kn=(t,e)=>{k.trace("Searching",t);const i=e.children(t);if(k.trace("Searching children of id ",t,i),i.length<1)return k.trace("This is a valid node",t),t;for(const r of i){const s=Kn(r,e);if(s)return k.trace("Found replacement for",t," => ",s),s}},$a=t=>!Ve[t]||!Ve[t].externalConnections?t:Ve[t]?Ve[t].id:t,Og=(t,e)=>{if(!t||e>10){k.debug("Opting out, no graph ");return}else k.debug("Opting in, graph ");t.nodes().forEach(function(i){t.children(i).length>0&&(k.warn("Cluster identified",i," Replacement id in edges: ",Kn(i,t)),Mr[i]=Q1(i,t),Ve[i]={id:Kn(i,t),clusterData:t.node(i)})}),t.nodes().forEach(function(i){const r=t.children(i),s=t.edges();r.length>0?(k.debug("Cluster identified",i,Mr),s.forEach(n=>{if(n.v!==i&&n.w!==i){const a=Ja(n.v,i),o=Ja(n.w,i);a^o&&(k.warn("Edge: ",n," leaves cluster ",i),k.warn("Decendants of XXX ",i,": ",Mr[i]),Ve[i].externalConnections=!0)}})):k.debug("Not a cluster ",i,Mr)}),t.edges().forEach(function(i){const r=t.edge(i);k.warn("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(i)),k.warn("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(t.edge(i)));let s=i.v,n=i.w;if(k.warn("Fix XXX",Ve,"ids:",i.v,i.w,"Translating: ",Ve[i.v]," --- ",Ve[i.w]),Ve[i.v]&&Ve[i.w]&&Ve[i.v]===Ve[i.w]){k.warn("Fixing and trixing link to self - removing XXX",i.v,i.w,i.name),k.warn("Fixing and trixing - removing XXX",i.v,i.w,i.name),s=$a(i.v),n=$a(i.w),t.removeEdge(i.v,i.w,i.name);const a=i.w+"---"+i.v;t.setNode(a,{domId:a,id:a,labelStyle:"",labelText:r.label,padding:0,shape:"labelRect",style:""});const o=JSON.parse(JSON.stringify(r)),l=JSON.parse(JSON.stringify(r));o.label="",o.arrowTypeEnd="none",l.label="",o.fromCluster=i.v,l.toCluster=i.v,t.setEdge(s,a,o,i.name+"-cyclic-special"),t.setEdge(a,n,l,i.name+"-cyclic-special")}else(Ve[i.v]||Ve[i.w])&&(k.warn("Fixing and trixing - removing XXX",i.v,i.w,i.name),s=$a(i.v),n=$a(i.w),t.removeEdge(i.v,i.w,i.name),s!==i.v&&(r.fromCluster=i.v),n!==i.w&&(r.toCluster=i.w),k.warn("Fix Replacing with XXX",s,n,i.name),t.setEdge(s,n,r,i.name))}),k.warn("Adjusted Graph",pe.c(t)),J1(t,0),k.trace(Ve)},J1=(t,e)=>{if(k.warn("extractor - ",e,pe.c(t),t.children("D")),e>10){k.error("Bailing out");return}let i=t.nodes(),r=!1;for(const s of i){const n=t.children(s);r=r||n.length>0}if(!r){k.debug("Done, no node has children",t.nodes());return}k.debug("Nodes = ",i,e);for(const s of i)if(k.debug("Extracting node",s,Ve,Ve[s]&&!Ve[s].externalConnections,!t.parent(s),t.node(s),t.children("D")," Depth ",e),!Ve[s])k.debug("Not a cluster",s,e);else if(!Ve[s].externalConnections&&t.children(s)&&t.children(s).length>0){k.warn("Cluster without external connections, without a parent and with children",s,e);let a=t.graph().rankdir==="TB"?"LR":"TB";Ve[s]&&Ve[s].clusterData&&Ve[s].clusterData.dir&&(a=Ve[s].clusterData.dir,k.warn("Fixing dir",Ve[s].clusterData.dir,a));const o=new Be.k({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});k.warn("Old graph before copy",pe.c(t)),K1(s,t,o,s),t.setNode(s,{clusterNode:!0,id:s,clusterData:Ve[s].clusterData,labelText:Ve[s].labelText,graph:o}),k.warn("New graph after copy node: (",s,")",pe.c(o)),k.debug("Old graph after copy",pe.c(t))}else k.warn("Cluster ** ",s," **not meeting the criteria !externalConnections:",!Ve[s].externalConnections," no parent: ",!t.parent(s)," children ",t.children(s)&&t.children(s).length>0,t.children("D"),e),k.debug(Ve);i=t.nodes(),k.warn("New list of nodes",i);for(const s of i){const n=t.node(s);k.warn(" Now next level",s,n),n.clusterNode&&J1(n.graph,e+1)}},$1=(t,e)=>{if(e.length===0)return[];let i=Object.assign(e);return e.forEach(r=>{const s=t.children(r),n=$1(t,s);i=[...i,...n]}),i},Fg=t=>$1(t,t.children());function Mg(t,e){return t.intersect(e)}function th(t,e,i,r){var s=t.x,n=t.y,a=s-r.x,o=n-r.y,l=Math.sqrt(e*e*o*o+i*i*a*a),h=Math.abs(e*i*a/l);r.x<s&&(h=-h);var u=Math.abs(e*i*o/l);return r.y<n&&(u=-u),{x:s+h,y:n+u}}function Pg(t,e,i){return th(t,e,e,i)}function Vg(t,e,i,r){var s,n,a,o,l,h,u,d,f,p,x,E,T,S,_;if(s=e.y-t.y,a=t.x-e.x,l=e.x*t.y-t.x*e.y,f=s*i.x+a*i.y+l,p=s*r.x+a*r.y+l,!(f!==0&&p!==0&&eh(f,p))&&(n=r.y-i.y,o=i.x-r.x,h=r.x*i.y-i.x*r.y,u=n*t.x+o*t.y+h,d=n*e.x+o*e.y+h,!(u!==0&&d!==0&&eh(u,d))&&(x=s*o-n*a,x!==0)))return E=Math.abs(x/2),T=a*h-o*l,S=T<0?(T-E)/x:(T+E)/x,T=n*l-s*h,_=T<0?(T-E)/x:(T+E)/x,{x:S,y:_}}function eh(t,e){return t*e>0}function Yg(t,e,i){var r=t.x,s=t.y,n=[],a=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(x){a=Math.min(a,x.x),o=Math.min(o,x.y)}):(a=Math.min(a,e.x),o=Math.min(o,e.y));for(var l=r-t.width/2-a,h=s-t.height/2-o,u=0;u<e.length;u++){var d=e[u],f=e[u<e.length-1?u+1:0],p=Vg(t,i,{x:l+d.x,y:h+d.y},{x:l+f.x,y:h+f.y});p&&n.push(p)}return n.length?(n.length>1&&n.sort(function(x,E){var T=x.x-i.x,S=x.y-i.y,_=Math.sqrt(T*T+S*S),D=E.x-i.x,z=E.y-i.y,H=Math.sqrt(D*D+z*z);return _<H?-1:_===H?0:1}),n[0]):t}const Qn=(t,e)=>{var i=t.x,r=t.y,s=e.x-i,n=e.y-r,a=t.width/2,o=t.height/2,l,h;return Math.abs(n)*a>Math.abs(s)*o?(n<0&&(o=-o),l=n===0?0:o*s/n,h=o):(s<0&&(a=-a),l=a,h=s===0?0:a*n/s),{x:i+l,y:r+h}},hi={node:Mg,circle:Pg,ellipse:th,polygon:Yg,rect:Qn},zg=(t,e)=>{const{shapeSvg:i,bbox:r,halfPadding:s}=Zi(t,e,"node "+e.classes,!0);k.info("Classes = ",e.classes);const n=i.insert("rect",":first-child");return n.attr("rx",e.rx).attr("ry",e.ry).attr("x",-r.width/2-s).attr("y",-r.height/2-s).attr("width",r.width+e.padding).attr("height",r.height+e.padding),yi(e,n),e.intersect=function(a){return hi.rect(e,a)},i},ih=(t,e)=>{const{shapeSvg:i,bbox:r}=Zi(t,e,void 0,!0),s=r.width+e.padding,n=r.height+e.padding,a=s+n,o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];k.info("Question main (Circle)");const l=ls(i,a,a,o);return l.attr("style",e.style),yi(e,l),e.intersect=function(h){return k.warn("Intersect called"),hi.polygon(e,o,h)},i},Wg=(t,e)=>{const i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=28,s=[{x:0,y:r/2},{x:r/2,y:0},{x:0,y:-r/2},{x:-r/2,y:0}];return i.insert("polygon",":first-child").attr("points",s.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(a){return hi.circle(e,14,a)},i},Ug=(t,e)=>{const{shapeSvg:i,bbox:r}=Zi(t,e,void 0,!0),s=4,n=r.height+e.padding,a=n/s,o=r.width+2*a+e.padding,l=[{x:a,y:0},{x:o-a,y:0},{x:o,y:-n/2},{x:o-a,y:-n},{x:a,y:-n},{x:0,y:-n/2}],h=ls(i,o,n,l);return h.attr("style",e.style),yi(e,h),e.intersect=function(u){return hi.polygon(e,l,u)},i},Zg=(t,e)=>{const{shapeSvg:i,bbox:r}=Zi(t,e,void 0,!0),s=r.width+e.padding,n=r.height+e.padding,a=[{x:-n/2,y:0},{x:s,y:0},{x:s,y:-n},{x:-n/2,y:-n},{x:0,y:-n/2}];return ls(i,s,n,a).attr("style",e.style),e.width=s+n,e.height=n,e.intersect=function(l){return hi.polygon(e,a,l)},i},Hg=(t,e)=>{const{shapeSvg:i,bbox:r}=Zi(t,e,void 0,!0),s=r.width+e.padding,n=r.height+e.padding,a=[{x:-2*n/6,y:0},{x:s-n/6,y:0},{x:s+2*n/6,y:-n},{x:n/6,y:-n}],o=ls(i,s,n,a);return o.attr("style",e.style),yi(e,o),e.intersect=function(l){return hi.polygon(e,a,l)},i},Gg=(t,e)=>{const{shapeSvg:i,bbox:r}=Zi(t,e,void 0,!0),s=r.width+e.padding,n=r.height+e.padding,a=[{x:2*n/6,y:0},{x:s+n/6,y:0},{x:s-2*n/6,y:-n},{x:-n/6,y:-n}],o=ls(i,s,n,a);return o.attr("style",e.style),yi(e,o),e.intersect=function(l){return hi.polygon(e,a,l)},i},jg=(t,e)=>{const{shapeSvg:i,bbox:r}=Zi(t,e,void 0,!0),s=r.width+e.padding,n=r.height+e.padding,a=[{x:-2*n/6,y:0},{x:s+2*n/6,y:0},{x:s-n/6,y:-n},{x:n/6,y:-n}],o=ls(i,s,n,a);return o.attr("style",e.style),yi(e,o),e.intersect=function(l){return hi.polygon(e,a,l)},i},qg=(t,e)=>{const{shapeSvg:i,bbox:r}=Zi(t,e,void 0,!0),s=r.width+e.padding,n=r.height+e.padding,a=[{x:n/6,y:0},{x:s-n/6,y:0},{x:s+2*n/6,y:-n},{x:-2*n/6,y:-n}],o=ls(i,s,n,a);return o.attr("style",e.style),yi(e,o),e.intersect=function(l){return hi.polygon(e,a,l)},i},Xg=(t,e)=>{const{shapeSvg:i,bbox:r}=Zi(t,e,void 0,!0),s=r.width+e.padding,n=r.height+e.padding,a=[{x:0,y:0},{x:s+n/2,y:0},{x:s,y:-n/2},{x:s+n/2,y:-n},{x:0,y:-n}],o=ls(i,s,n,a);return o.attr("style",e.style),yi(e,o),e.intersect=function(l){return hi.polygon(e,a,l)},i},Kg=(t,e)=>{const{shapeSvg:i,bbox:r}=Zi(t,e,void 0,!0),s=r.width+e.padding,n=s/2,a=n/(2.5+s/50),o=r.height+a+e.padding,l="M 0,"+a+" a "+n+","+a+" 0,0,0 "+s+" 0 a "+n+","+a+" 0,0,0 "+-s+" 0 l 0,"+o+" a "+n+","+a+" 0,0,0 "+s+" 0 l 0,"+-o,h=i.attr("label-offset-y",a).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-s/2+","+-(o/2+a)+")");return yi(e,h),e.intersect=function(u){const d=hi.rect(e,u),f=d.x-e.x;if(n!=0&&(Math.abs(f)<e.width/2||Math.abs(f)==e.width/2&&Math.abs(d.y-e.y)>e.height/2-a)){let p=a*a*(1-f*f/(n*n));p!=0&&(p=Math.sqrt(p)),p=a-p,u.y-e.y>0&&(p=-p),d.y+=p}return d},i},Qg=(t,e)=>{const{shapeSvg:i,bbox:r,halfPadding:s}=Zi(t,e,"node "+e.classes,!0);k.trace("Classes = ",e.classes);const n=i.insert("rect",":first-child"),a=r.width+e.padding,o=r.height+e.padding;if(n.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",-r.width/2-s).attr("y",-r.height/2-s).attr("width",a).attr("height",o),e.props){const l=new Set(Object.keys(e.props));e.props.borders&&(rh(n,e.props.borders,a,o),l.delete("borders")),l.forEach(h=>{k.warn(`Unknown node property ${h}`)})}return yi(e,n),e.intersect=function(l){return hi.rect(e,l)},i},Jg=(t,e)=>{const{shapeSvg:i}=Zi(t,e,"label",!0);k.trace("Classes = ",e.classes);const r=i.insert("rect",":first-child"),s=0,n=0;if(r.attr("width",s).attr("height",n),i.attr("class","label edgeLabel"),e.props){const a=new Set(Object.keys(e.props));e.props.borders&&(rh(r,e.props.borders,s,n),a.delete("borders")),a.forEach(o=>{k.warn(`Unknown node property ${o}`)})}return yi(e,r),e.intersect=function(a){return hi.rect(e,a)},i};function rh(t,e,i,r){const s=[],n=o=>{s.push(o,0)},a=o=>{s.push(0,o)};e.includes("t")?(k.debug("add top border"),n(i)):a(i),e.includes("r")?(k.debug("add right border"),n(r)):a(r),e.includes("b")?(k.debug("add bottom border"),n(i)):a(i),e.includes("l")?(k.debug("add left border"),n(r)):a(r),t.attr("stroke-dasharray",s.join(" "))}const $g=(t,e)=>{let i;e.classes?i="node "+e.classes:i="node default";const r=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=r.insert("rect",":first-child"),n=r.insert("line"),a=r.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText;let l="";typeof o=="object"?l=o[0]:l=o,k.info("Label text abc79",l,o,typeof o=="object");const h=a.node().appendChild(cr(l,e.labelStyle,!0,!0));let u={width:0,height:0};if(Ge(P().flowchart.htmlLabels)){const E=h.children[0],T=(0,Q.Ys)(h);u=E.getBoundingClientRect(),T.attr("width",u.width),T.attr("height",u.height)}k.info("Text 2",o);const d=o.slice(1,o.length);let f=h.getBBox();const p=a.node().appendChild(cr(d.join?d.join("<br/>"):d,e.labelStyle,!0,!0));if(Ge(P().flowchart.htmlLabels)){const E=p.children[0],T=(0,Q.Ys)(p);u=E.getBoundingClientRect(),T.attr("width",u.width),T.attr("height",u.height)}const x=e.padding/2;return(0,Q.Ys)(p).attr("transform","translate( "+(u.width>f.width?0:(f.width-u.width)/2)+", "+(f.height+x+5)+")"),(0,Q.Ys)(h).attr("transform","translate( "+(u.width<f.width?0:-(f.width-u.width)/2)+", 0)"),u=a.node().getBBox(),a.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")"),s.attr("class","outer title-state").attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+e.padding).attr("height",u.height+e.padding),n.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+f.height+x).attr("y2",-u.height/2-x+f.height+x),yi(e,s),e.intersect=function(E){return hi.rect(e,E)},r},ty=(t,e)=>{const{shapeSvg:i,bbox:r}=Zi(t,e,void 0,!0),s=r.height+e.padding,n=r.width+s/4+e.padding,a=i.insert("rect",":first-child").attr("style",e.style).attr("rx",s/2).attr("ry",s/2).attr("x",-n/2).attr("y",-s/2).attr("width",n).attr("height",s);return yi(e,a),e.intersect=function(o){return hi.rect(e,o)},i},ey=(t,e)=>{const{shapeSvg:i,bbox:r,halfPadding:s}=Zi(t,e,void 0,!0),n=i.insert("circle",":first-child");return n.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+s).attr("width",r.width+e.padding).attr("height",r.height+e.padding),k.info("Circle main"),yi(e,n),e.intersect=function(a){return k.info("Circle intersect",e,r.width/2+s,a),hi.circle(e,r.width/2+s,a)},i},iy=(t,e)=>{const{shapeSvg:i,bbox:r,halfPadding:s}=Zi(t,e,void 0,!0),n=5,a=i.insert("g",":first-child"),o=a.insert("circle"),l=a.insert("circle");return o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+s+n).attr("width",r.width+e.padding+n*2).attr("height",r.height+e.padding+n*2),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+s).attr("width",r.width+e.padding).attr("height",r.height+e.padding),k.info("DoubleCircle main"),yi(e,o),e.intersect=function(h){return k.info("DoubleCircle intersect",e,r.width/2+s+n,h),hi.circle(e,r.width/2+s+n,h)},i},ry=(t,e)=>{const{shapeSvg:i,bbox:r}=Zi(t,e,void 0,!0),s=r.width+e.padding,n=r.height+e.padding,a=[{x:0,y:0},{x:s,y:0},{x:s,y:-n},{x:0,y:-n},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-n},{x:-8,y:-n},{x:-8,y:0}],o=ls(i,s,n,a);return o.attr("style",e.style),yi(e,o),e.intersect=function(l){return hi.polygon(e,a,l)},i},sy=(t,e)=>{const i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=i.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),yi(e,r),e.intersect=function(s){return hi.circle(e,7,s)},i},sh=(t,e,i)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let s=70,n=10;i==="LR"&&(s=10,n=70);const a=r.append("rect").attr("x",-1*s/2).attr("y",-1*n/2).attr("width",s).attr("height",n).attr("class","fork-join");return yi(e,a),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(o){return hi.rect(e,o)},r},nh={rhombus:ih,question:ih,rect:Qg,labelRect:Jg,rectWithTitle:$g,choice:Wg,circle:ey,doublecircle:iy,stadium:ty,hexagon:Ug,rect_left_inv_arrow:Zg,lean_right:Hg,lean_left:Gg,trapezoid:jg,inv_trapezoid:qg,rect_right_inv_arrow:Xg,cylinder:Kg,start:sy,end:(t,e)=>{const i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=i.insert("circle",":first-child"),s=i.insert("circle",":first-child");return s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),yi(e,s),e.intersect=function(n){return hi.circle(e,7,n)},i},note:zg,subroutine:ry,fork:sh,join:sh,class_box:(t,e)=>{const i=e.padding/2,r=4,s=8;let n;e.classes?n="node "+e.classes:n="node default";const a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),o=a.insert("rect",":first-child"),l=a.insert("line"),h=a.insert("line");let u=0,d=r;const f=a.insert("g").attr("class","label");let p=0;const x=e.classData.annotations&&e.classData.annotations[0],E=e.classData.annotations[0]?"\xAB"+e.classData.annotations[0]+"\xBB":"",T=f.node().appendChild(cr(E,e.labelStyle,!0,!0));let S=T.getBBox();if(Ge(P().flowchart.htmlLabels)){const F=T.children[0],v=(0,Q.Ys)(T);S=F.getBoundingClientRect(),v.attr("width",S.width),v.attr("height",S.height)}e.classData.annotations[0]&&(d+=S.height+r,u+=S.width);let _=e.classData.id;e.classData.type!==void 0&&e.classData.type!==""&&(P().flowchart.htmlLabels?_+="<"+e.classData.type+">":_+="<"+e.classData.type+">");const D=f.node().appendChild(cr(_,e.labelStyle,!0,!0));(0,Q.Ys)(D).attr("class","classTitle");let z=D.getBBox();if(Ge(P().flowchart.htmlLabels)){const F=D.children[0],v=(0,Q.Ys)(D);z=F.getBoundingClientRect(),v.attr("width",z.width),v.attr("height",z.height)}d+=z.height+r,z.width>u&&(u=z.width);const H=[];e.classData.members.forEach(F=>{const v=Xa(F);let L=v.displayText;P().flowchart.htmlLabels&&(L=L.replace(/</g,"<").replace(/>/g,">"));const w=f.node().appendChild(cr(L,v.cssStyle?v.cssStyle:e.labelStyle,!0,!0));let m=w.getBBox();if(Ge(P().flowchart.htmlLabels)){const B=w.children[0],g=(0,Q.Ys)(w);m=B.getBoundingClientRect(),g.attr("width",m.width),g.attr("height",m.height)}m.width>u&&(u=m.width),d+=m.height+r,H.push(w)}),d+=s;const it=[];if(e.classData.methods.forEach(F=>{const v=Xa(F);let L=v.displayText;P().flowchart.htmlLabels&&(L=L.replace(/</g,"<").replace(/>/g,">"));const w=f.node().appendChild(cr(L,v.cssStyle?v.cssStyle:e.labelStyle,!0,!0));let m=w.getBBox();if(Ge(P().flowchart.htmlLabels)){const B=w.children[0],g=(0,Q.Ys)(w);m=B.getBoundingClientRect(),g.attr("width",m.width),g.attr("height",m.height)}m.width>u&&(u=m.width),d+=m.height+r,it.push(w)}),d+=s,x){let F=(u-S.width)/2;(0,Q.Ys)(T).attr("transform","translate( "+(-1*u/2+F)+", "+-1*d/2+")"),p=S.height+r}let R=(u-z.width)/2;return(0,Q.Ys)(D).attr("transform","translate( "+(-1*u/2+R)+", "+(-1*d/2+p)+")"),p+=z.height+r,l.attr("class","divider").attr("x1",-u/2-i).attr("x2",u/2+i).attr("y1",-d/2-i+s+p).attr("y2",-d/2-i+s+p),p+=s,H.forEach(F=>{(0,Q.Ys)(F).attr("transform","translate( "+-u/2+", "+(-1*d/2+p+s/2)+")"),p+=z.height+r}),p+=s,h.attr("class","divider").attr("x1",-u/2-i).attr("x2",u/2+i).attr("y1",-d/2-i+s+p).attr("y2",-d/2-i+s+p),p+=s,it.forEach(F=>{(0,Q.Ys)(F).attr("transform","translate( "+-u/2+", "+(-1*d/2+p)+")"),p+=z.height+r}),o.attr("class","outer title-state").attr("x",-u/2-i).attr("y",-(d/2)-i).attr("width",u+e.padding).attr("height",d+e.padding),yi(e,o),e.intersect=function(F){return hi.rect(e,F)},a}};let bn={};const ah=(t,e,i)=>{let r,s;if(e.link){let n;P().securityLevel==="sandbox"?n="_top":e.linkTarget&&(n=e.linkTarget||"_blank"),r=t.insert("svg:a").attr("xlink:href",e.link).attr("target",n),s=nh[e.shape](r,e,i)}else s=nh[e.shape](t,e,i),r=s;return e.tooltip&&s.attr("title",e.tooltip),e.class&&s.attr("class","node default "+e.class),bn[e.id]=r,e.haveCallback&&bn[e.id].attr("class",bn[e.id].attr("class")+" clickable"),r},ny=(t,e)=>{bn[e.id]=t},ay=()=>{bn={}},oh=t=>{const e=bn[t.id];k.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const i=8,r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-i)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},oy={rect:(t,e)=>{k.trace("Creating subgraph rect for ",e.id,e);const i=t.insert("g").attr("class","cluster"+(e.class?" "+e.class:"")).attr("id",e.id),r=i.insert("rect",":first-child"),s=i.insert("g").attr("class","cluster-label"),n=s.node().appendChild(cr(e.labelText,e.labelStyle,void 0,!0));let a=n.getBBox();if(Ge(P().flowchart.htmlLabels)){const d=n.children[0],f=(0,Q.Ys)(n);a=d.getBoundingClientRect(),f.attr("width",a.width),f.attr("height",a.height)}const o=0*e.padding,l=o/2,h=e.width<=a.width+o?a.width+o:e.width;e.width<=a.width+o?e.diff=(a.width-e.width)/2-e.padding/2:e.diff=-e.padding/2,k.trace("Data ",e,JSON.stringify(e)),r.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-h/2).attr("y",e.y-e.height/2-l).attr("width",h).attr("height",e.height+o),s.attr("transform","translate("+(e.x-a.width/2)+", "+(e.y-e.height/2)+")");const u=r.node().getBBox();return e.width=u.width,e.height=u.height,e.intersect=function(d){return Qn(e,d)},i},roundedWithTitle:(t,e)=>{const i=t.insert("g").attr("class",e.classes).attr("id",e.id),r=i.insert("rect",":first-child"),s=i.insert("g").attr("class","cluster-label"),n=i.append("rect"),a=s.node().appendChild(cr(e.labelText,e.labelStyle,void 0,!0));let o=a.getBBox();if(Ge(P().flowchart.htmlLabels)){const f=a.children[0],p=(0,Q.Ys)(a);o=f.getBoundingClientRect(),p.attr("width",o.width),p.attr("height",o.height)}o=a.getBBox();const l=0*e.padding,h=l/2,u=e.width<=o.width+e.padding?o.width+e.padding:e.width;e.width<=o.width+e.padding?e.diff=(o.width+e.padding*0-e.width)/2:e.diff=-e.padding/2,r.attr("class","outer").attr("x",e.x-u/2-h).attr("y",e.y-e.height/2-h).attr("width",u+l).attr("height",e.height+l),n.attr("class","inner").attr("x",e.x-u/2-h).attr("y",e.y-e.height/2-h+o.height-1).attr("width",u+l).attr("height",e.height+l-o.height-3),s.attr("transform","translate("+(e.x-o.width/2)+", "+(e.y-e.height/2-e.padding/3+(Ge(P().flowchart.htmlLabels)?5:3))+")");const d=r.node().getBBox();return e.height=d.height,e.intersect=function(f){return Qn(e,f)},i},noteGroup:(t,e)=>{const i=t.insert("g").attr("class","note-cluster").attr("id",e.id),r=i.insert("rect",":first-child"),s=0*e.padding,n=s/2;r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-n).attr("y",e.y-e.height/2-n).attr("width",e.width+s).attr("height",e.height+s).attr("fill","none");const a=r.node().getBBox();return e.width=a.width,e.height=a.height,e.intersect=function(o){return Qn(e,o)},i},divider:(t,e)=>{const i=t.insert("g").attr("class",e.classes).attr("id",e.id),r=i.insert("rect",":first-child"),s=0*e.padding,n=s/2;r.attr("class","divider").attr("x",e.x-e.width/2-n).attr("y",e.y-e.height/2).attr("width",e.width+s).attr("height",e.height+s);const a=r.node().getBBox();return e.width=a.width,e.height=a.height,e.diff=-e.padding/2,e.intersect=function(o){return Qn(e,o)},i}};let lh={};const ly=(t,e)=>{k.trace("Inserting cluster");const i=e.shape||"rect";lh[e.id]=oy[i](t,e)},cy=()=>{lh={}};let to={},Pi={};const hy=()=>{to={},Pi={}},ch=(t,e)=>{const i=cr(e.label,e.labelStyle),r=t.insert("g").attr("class","edgeLabel"),s=r.insert("g").attr("class","label");s.node().appendChild(i);let n=i.getBBox();if(Ge(P().flowchart.htmlLabels)){const o=i.children[0],l=(0,Q.Ys)(i);n=o.getBoundingClientRect(),l.attr("width",n.width),l.attr("height",n.height)}s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),to[e.id]=r,e.width=n.width,e.height=n.height;let a;if(e.startLabelLeft){const o=cr(e.startLabelLeft,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");a=h.node().appendChild(o);const u=o.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),Pi[e.id]||(Pi[e.id]={}),Pi[e.id].startLeft=l,eo(a,e.startLabelLeft)}if(e.startLabelRight){const o=cr(e.startLabelRight,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");a=l.node().appendChild(o),h.node().appendChild(o);const u=o.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),Pi[e.id]||(Pi[e.id]={}),Pi[e.id].startRight=l,eo(a,e.startLabelRight)}if(e.endLabelLeft){const o=cr(e.endLabelLeft,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");a=h.node().appendChild(o);const u=o.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),l.node().appendChild(o),Pi[e.id]||(Pi[e.id]={}),Pi[e.id].endLeft=l,eo(a,e.endLabelLeft)}if(e.endLabelRight){const o=cr(e.endLabelRight,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");a=h.node().appendChild(o);const u=o.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),l.node().appendChild(o),Pi[e.id]||(Pi[e.id]={}),Pi[e.id].endRight=l,eo(a,e.endLabelRight)}return i};function eo(t,e){P().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}const uy=(t,e)=>{k.info("Moving label abc78 ",t.id,t.label,to[t.id]);let i=e.updatedPath?e.updatedPath:e.originalPath;if(t.label){const r=to[t.id];let s=t.x,n=t.y;if(i){const a=ke.calcLabelPosition(i);k.info("Moving label "+t.label+" from (",s,",",n,") to (",a.x,",",a.y,") abc78"),e.updatedPath&&(s=a.x,n=a.y)}r.attr("transform","translate("+s+", "+n+")")}if(t.startLabelLeft){const r=Pi[t.id].startLeft;let s=t.x,n=t.y;if(i){const a=ke.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",i);s=a.x,n=a.y}r.attr("transform","translate("+s+", "+n+")")}if(t.startLabelRight){const r=Pi[t.id].startRight;let s=t.x,n=t.y;if(i){const a=ke.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",i);s=a.x,n=a.y}r.attr("transform","translate("+s+", "+n+")")}if(t.endLabelLeft){const r=Pi[t.id].endLeft;let s=t.x,n=t.y;if(i){const a=ke.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",i);s=a.x,n=a.y}r.attr("transform","translate("+s+", "+n+")")}if(t.endLabelRight){const r=Pi[t.id].endRight;let s=t.x,n=t.y;if(i){const a=ke.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",i);s=a.x,n=a.y}r.attr("transform","translate("+s+", "+n+")")}},dy=(t,e)=>{const i=t.x,r=t.y,s=Math.abs(e.x-i),n=Math.abs(e.y-r),a=t.width/2,o=t.height/2;return s>=a||n>=o},fy=(t,e,i)=>{k.warn(`intersection calc abc89:
|
|
1315
|
-
outsidePoint: ${JSON.stringify(e)}
|
|
1316
|
-
insidePoint : ${JSON.stringify(i)}
|
|
1317
|
-
node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const r=t.x,s=t.y,n=Math.abs(r-i.x),a=t.width/2;let o=i.x<e.x?a-n:a+n;const l=t.height/2,h=Math.abs(e.y-i.y),u=Math.abs(e.x-i.x);if(Math.abs(s-e.y)*a>Math.abs(r-e.x)*l){let d=i.y<e.y?e.y-l-s:s-l-e.y;o=u*d/h;const f={x:i.x<e.x?i.x+o:i.x-u+o,y:i.y<e.y?i.y+h-d:i.y-h+d};return o===0&&(f.x=e.x,f.y=e.y),u===0&&(f.x=e.x),h===0&&(f.y=e.y),k.warn(`abc89 topp/bott calc, Q ${h}, q ${d}, R ${u}, r ${o}`,f),f}else{i.x<e.x?o=e.x-a-r:o=r-a-e.x;let d=h*o/u,f=i.x<e.x?i.x+u-o:i.x-u+o,p=i.y<e.y?i.y+d:i.y-d;return k.warn(`sides calc abc89, Q ${h}, q ${d}, R ${u}, r ${o}`,{_x:f,_y:p}),o===0&&(f=e.x,p=e.y),u===0&&(f=e.x),h===0&&(p=e.y),{x:f,y:p}}},hh=(t,e)=>{k.warn("abc88 cutPathAtIntersect",t,e);let i=[],r=t[0],s=!1;return t.forEach(n=>{if(k.info("abc88 checking point",n,e),!dy(e,n)&&!s){const a=fy(e,r,n);k.warn("abc88 inside",n,r,a),k.warn("abc88 intersection",a);let o=!1;i.forEach(l=>{o=o||l.x===a.x&&l.y===a.y}),i.some(l=>l.x===a.x&&l.y===a.y)?k.warn("abc88 no intersect",a,i):i.push(a),s=!0}else k.warn("abc88 outside",n,r),r=n,s||i.push(n)}),k.warn("abc88 returning points",i),i},py=function(t,e,i,r,s,n){let a=i.points,o=!1;const l=n.node(e.v);var h=n.node(e.w);k.info("abc88 InsertEdge: ",i),h.intersect&&l.intersect&&(a=a.slice(1,i.points.length-1),a.unshift(l.intersect(a[0])),k.info("Last point",a[a.length-1],h,h.intersect(a[a.length-1])),a.push(h.intersect(a[a.length-1]))),i.toCluster&&(k.info("to cluster abc88",r[i.toCluster]),a=hh(i.points,r[i.toCluster].node),o=!0),i.fromCluster&&(k.info("from cluster abc88",r[i.fromCluster]),a=hh(a.reverse(),r[i.fromCluster].node).reverse(),o=!0);const u=a.filter(S=>!Number.isNaN(S.y));let d;s==="graph"||s==="flowchart"?d=i.curve||Q.$0Z:d=Q.$0Z;const f=(0,Q.jvg)().x(function(S){return S.x}).y(function(S){return S.y}).curve(d);let p;switch(i.thickness){case"normal":p="edge-thickness-normal";break;case"thick":p="edge-thickness-thick";break;default:p=""}switch(i.pattern){case"solid":p+=" edge-pattern-solid";break;case"dotted":p+=" edge-pattern-dotted";break;case"dashed":p+=" edge-pattern-dashed";break}const x=t.append("path").attr("d",f(u)).attr("id",i.id).attr("class"," "+p+(i.classes?" "+i.classes:"")).attr("style",i.style);let E="";switch((P().flowchart.arrowMarkerAbsolute||P().state.arrowMarkerAbsolute)&&(E=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,E=E.replace(/\(/g,"\\("),E=E.replace(/\)/g,"\\)")),k.info("arrowTypeStart",i.arrowTypeStart),k.info("arrowTypeEnd",i.arrowTypeEnd),i.arrowTypeStart){case"arrow_cross":x.attr("marker-start","url("+E+"#"+s+"-crossStart)");break;case"arrow_point":x.attr("marker-start","url("+E+"#"+s+"-pointStart)");break;case"arrow_barb":x.attr("marker-start","url("+E+"#"+s+"-barbStart)");break;case"arrow_circle":x.attr("marker-start","url("+E+"#"+s+"-circleStart)");break;case"aggregation":x.attr("marker-start","url("+E+"#"+s+"-aggregationStart)");break;case"extension":x.attr("marker-start","url("+E+"#"+s+"-extensionStart)");break;case"composition":x.attr("marker-start","url("+E+"#"+s+"-compositionStart)");break;case"dependency":x.attr("marker-start","url("+E+"#"+s+"-dependencyStart)");break;case"lollipop":x.attr("marker-start","url("+E+"#"+s+"-lollipopStart)");break}switch(i.arrowTypeEnd){case"arrow_cross":x.attr("marker-end","url("+E+"#"+s+"-crossEnd)");break;case"arrow_point":x.attr("marker-end","url("+E+"#"+s+"-pointEnd)");break;case"arrow_barb":x.attr("marker-end","url("+E+"#"+s+"-barbEnd)");break;case"arrow_circle":x.attr("marker-end","url("+E+"#"+s+"-circleEnd)");break;case"aggregation":x.attr("marker-end","url("+E+"#"+s+"-aggregationEnd)");break;case"extension":x.attr("marker-end","url("+E+"#"+s+"-extensionEnd)");break;case"composition":x.attr("marker-end","url("+E+"#"+s+"-compositionEnd)");break;case"dependency":x.attr("marker-end","url("+E+"#"+s+"-dependencyEnd)");break;case"lollipop":x.attr("marker-end","url("+E+"#"+s+"-lollipopEnd)");break}let T={};return o&&(T.updatedPath=a),T.originalPath=i.points,T},uh=(t,e,i,r)=>{k.info("Graph in recursive render: XXX",pe.c(e),r);const s=e.graph().rankdir;k.trace("Dir in recursive render - dir:",s);const n=t.insert("g").attr("class","root");e.nodes()?k.info("Recursive render XXX",e.nodes()):k.info("No nodes found for",e),e.edges().length>0&&k.trace("Recursive edges",e.edge(e.edges()[0]));const a=n.insert("g").attr("class","clusters"),o=n.insert("g").attr("class","edgePaths"),l=n.insert("g").attr("class","edgeLabels"),h=n.insert("g").attr("class","nodes");e.nodes().forEach(function(d){const f=e.node(d);if(r!==void 0){const p=JSON.parse(JSON.stringify(r.clusterData));k.info("Setting data for cluster XXX (",d,") ",p,r),e.setNode(r.id,p),e.parent(d)||(k.trace("Setting parent",d,r.id),e.setParent(d,r.id,p))}if(k.info("(Insert) Node XXX"+d+": "+JSON.stringify(e.node(d))),f&&f.clusterNode){k.info("Cluster identified",d,f.width,e.node(d));const p=uh(h,f.graph,i,e.node(d)),x=p.elem;yi(f,x),f.diff=p.diff||0,k.info("Node bounds (abc123)",d,f,f.width,f.x,f.y),ny(x,f),k.warn("Recursive render complete ",x,f)}else e.children(d).length>0?(k.info("Cluster - the non recursive path XXX",d,f.id,f,e),k.info(Kn(f.id,e)),Ve[f.id]={id:Kn(f.id,e),node:f}):(k.info("Node - the non recursive path",d,f.id,f),ah(h,e.node(d),s))}),e.edges().forEach(function(d){const f=e.edge(d.v,d.w,d.name);k.info("Edge "+d.v+" -> "+d.w+": "+JSON.stringify(d)),k.info("Edge "+d.v+" -> "+d.w+": ",d," ",JSON.stringify(e.edge(d))),k.info("Fix",Ve,"ids:",d.v,d.w,"Translateing: ",Ve[d.v],Ve[d.w]),ch(l,f)}),e.edges().forEach(function(d){k.info("Edge "+d.v+" -> "+d.w+": "+JSON.stringify(d))}),k.info("#############################################"),k.info("### Layout ###"),k.info("#############################################"),k.info(e),(0,xe.bK)(e),k.info("Graph after layout:",pe.c(e));let u=0;return Fg(e).forEach(function(d){const f=e.node(d);k.info("Position "+d+": "+JSON.stringify(e.node(d))),k.info("Position "+d+": ("+f.x,","+f.y,") width: ",f.width," height: ",f.height),f&&f.clusterNode?oh(f):e.children(d).length>0?(ly(a,f),Ve[f.id].node=f):oh(f)}),e.edges().forEach(function(d){const f=e.edge(d);k.info("Edge "+d.v+" -> "+d.w+": "+JSON.stringify(f),f);const p=py(o,d,f,Ve,i,e);uy(f,p)}),e.nodes().forEach(function(d){const f=e.node(d);k.info(d,f.type,f.diff),f.type==="group"&&(u=f.diff)}),{elem:n,diff:u}},ml=(t,e,i,r,s)=>{q1(t,i,r,s),ay(),hy(),cy(),Rg(),k.warn("Graph at first:",pe.c(e)),Og(e),k.warn("Graph after:",pe.c(e)),uh(t,e,r)},dh=t=>Qt.sanitizeText(t,P());let fh={dividerMargin:10,padding:5,textHeight:10};const gy=function(t,e,i,r){const s=Object.keys(t);k.info("keys:",s),k.info(t),s.forEach(function(n){const a=t[n];let o="";a.cssClasses.length>0&&(o=o+" "+a.cssClasses.join(" "));const l={labelStyle:""};let h=a.text!==void 0?a.text:a.id,u=0,d="";switch(a.type){case"class":d="class_box";break;default:d="class_box"}e.setNode(a.id,{labelStyle:l.labelStyle,shape:d,labelText:dh(h),classData:a,rx:u,ry:u,class:o,style:l.style,id:a.id,domId:a.domId,tooltip:r.db.getTooltip(a.id)||"",haveCallback:a.haveCallback,link:a.link,width:a.type==="group"?500:void 0,type:a.type,padding:P().flowchart.padding}),k.info("setNode",{labelStyle:l.labelStyle,shape:d,labelText:h,rx:u,ry:u,class:o,style:l.style,id:a.id,width:a.type==="group"?500:void 0,type:a.type,padding:P().flowchart.padding})})},yy=function(t,e,i,r){k.info(t),t.forEach(function(s,n){const a=s;let o="";const l={labelStyle:"",style:""};let h=a.text,u=0,d="note";if(e.setNode(a.id,{labelStyle:l.labelStyle,shape:d,labelText:dh(h),noteData:a,rx:u,ry:u,class:o,style:l.style,id:a.id,domId:a.id,tooltip:"",type:"note",padding:P().flowchart.padding}),k.info("setNode",{labelStyle:l.labelStyle,shape:d,labelText:h,rx:u,ry:u,style:l.style,id:a.id,type:"note",padding:P().flowchart.padding}),!a.class||!(a.class in r))return;const f=i+n,p={};p.classes="relation",p.pattern="dotted",p.id=`edgeNote${f}`,p.arrowhead="none",k.info(`Note edge: ${JSON.stringify(p)}, ${JSON.stringify(a)}`),p.startLabelRight="",p.endLabelLeft="",p.arrowTypeStart="none",p.arrowTypeEnd="none";let x="fill:none",E="";p.style=x,p.labelStyle=E,p.curve=Er(fh.curve,Q.c_6),e.setEdge(a.id,a.class,p,f)})},my=function(t,e){const i=P().flowchart;let r=0;t.forEach(function(s){r++;const n={};n.classes="relation",n.pattern=s.relation.lineType==1?"dashed":"solid",n.id="id"+r,s.type==="arrow_open"?n.arrowhead="none":n.arrowhead="normal",k.info(n,s),n.startLabelRight=s.relationTitle1==="none"?"":s.relationTitle1,n.endLabelLeft=s.relationTitle2==="none"?"":s.relationTitle2,n.arrowTypeStart=ph(s.relation.type1),n.arrowTypeEnd=ph(s.relation.type2);let a="",o="";if(s.style!==void 0){const l=as(s.style);a=l.style,o=l.labelStyle}else a="fill:none";n.style=a,n.labelStyle=o,s.interpolate!==void 0?n.curve=Er(s.interpolate,Q.c_6):t.defaultInterpolate!==void 0?n.curve=Er(t.defaultInterpolate,Q.c_6):n.curve=Er(i.curve,Q.c_6),s.text=s.title,s.text===void 0?s.style!==void 0&&(n.arrowheadStyle="fill: #333"):(n.arrowheadStyle="fill: #333",n.labelpos="c",P().flowchart.htmlLabels?(n.labelType="html",n.label='<span class="edgeLabel">'+s.text+"</span>"):(n.labelType="text",n.label=s.text.replace(Qt.lineBreakRegex,`
|
|
1318
|
-
`),s.style===void 0&&(n.style=n.style||"stroke: #333; stroke-width: 1.5px;fill:none"),n.labelStyle=n.labelStyle.replace("color:","fill:"))),e.setEdge(s.id1,s.id2,n,r)})},by=function(t){Object.keys(t).forEach(function(i){fh[i]=t[i]})},xy=function(t,e,i,r){k.info("Drawing class - ",e);const s=P().flowchart,n=P().securityLevel;k.info("config:",s);const a=s.nodeSpacing||50,o=s.rankSpacing||50,l=new Be.k({multigraph:!0,compound:!0}).setGraph({rankdir:r.db.getDirection(),nodesep:a,ranksep:o,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),h=r.db.getClasses(),u=r.db.getRelations(),d=r.db.getNotes();k.info(u),gy(h,l,e,r),my(u,l),yy(d,l,u.length+1,h);let f;n==="sandbox"&&(f=(0,Q.Ys)("#i"+e));const p=n==="sandbox"?(0,Q.Ys)(f.nodes()[0].contentDocument.body):(0,Q.Ys)("body"),x=p.select(`[id="${e}"]`),E=p.select("#"+e+" g");if(ml(E,l,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",e),ke.insertTitle(x,"classTitleText",s.titleTopMargin,r.db.getDiagramTitle()),Pn(l,x,s.diagramPadding,s.useMaxWidth),!s.htmlLabels){const T=n==="sandbox"?f.nodes()[0].contentDocument:document,S=T.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const _ of S){const D=_.getBBox(),z=T.createElementNS("http://www.w3.org/2000/svg","rect");z.setAttribute("rx",0),z.setAttribute("ry",0),z.setAttribute("width",D.width),z.setAttribute("height",D.height),_.insertBefore(z,_.firstChild)}}};function ph(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}const ky={setConf:by,draw:xy};var bl=function(){var t=function(w,m,B,g){for(B=B||{},g=w.length;g--;B[w[g]]=m);return B},e=[1,2],i=[1,5],r=[6,9,11,23,25,27,29,30,31,51],s=[1,17],n=[1,18],a=[1,19],o=[1,20],l=[1,21],h=[1,22],u=[1,25],d=[1,30],f=[1,31],p=[1,32],x=[1,33],E=[6,9,11,15,20,23,25,27,29,30,31,44,45,46,47,51],T=[1,45],S=[30,31,48,49],_=[4,6,9,11,23,25,27,29,30,31,51],D=[44,45,46,47],z=[22,37],H=[1,65],it=[1,64],R=[22,37,39,41],F={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,BLOCK_START:20,attributes:21,BLOCK_STOP:22,title:23,title_value:24,acc_title:25,acc_title_value:26,acc_descr:27,acc_descr_value:28,acc_descr_multiline_value:29,ALPHANUM:30,ENTITY_NAME:31,attribute:32,attributeType:33,attributeName:34,attributeKeyTypeList:35,attributeComment:36,ATTRIBUTE_WORD:37,attributeKeyType:38,COMMA:39,ATTRIBUTE_KEY:40,COMMENT:41,cardinality:42,relType:43,ZERO_OR_ONE:44,ZERO_OR_MORE:45,ONE_OR_MORE:46,ONLY_ONE:47,NON_IDENTIFYING:48,IDENTIFYING:49,WORD:50,open_directive:51,type_directive:52,arg_directive:53,close_directive:54,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"title",24:"title_value",25:"acc_title",26:"acc_title_value",27:"acc_descr",28:"acc_descr_value",29:"acc_descr_multiline_value",30:"ALPHANUM",31:"ENTITY_NAME",37:"ATTRIBUTE_WORD",39:"COMMA",40:"ATTRIBUTE_KEY",41:"COMMENT",44:"ZERO_OR_ONE",45:"ZERO_OR_MORE",46:"ONE_OR_MORE",47:"ONLY_ONE",48:"NON_IDENTIFYING",49:"IDENTIFYING",50:"WORD",51:"open_directive",52:"type_directive",53:"arg_directive",54:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[10,2],[10,2],[10,2],[10,1],[17,1],[17,1],[21,1],[21,2],[32,2],[32,3],[32,3],[32,4],[33,1],[34,1],[35,1],[35,3],[38,1],[36,1],[18,3],[42,1],[42,1],[42,1],[42,1],[43,1],[43,1],[19,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(m,B,g,O,y,Y,wt){var at=Y.length-1;switch(y){case 1:break;case 3:this.$=[];break;case 4:Y[at-1].push(Y[at]),this.$=Y[at-1];break;case 5:case 6:this.$=Y[at];break;case 7:case 8:this.$=[];break;case 12:O.addEntity(Y[at-4]),O.addEntity(Y[at-2]),O.addRelationship(Y[at-4],Y[at],Y[at-2],Y[at-3]);break;case 13:O.addEntity(Y[at-3]),O.addAttributes(Y[at-3],Y[at-1]);break;case 14:O.addEntity(Y[at-2]);break;case 15:O.addEntity(Y[at]);break;case 16:case 17:this.$=Y[at].trim(),O.setAccTitle(this.$);break;case 18:case 19:this.$=Y[at].trim(),O.setAccDescription(this.$);break;case 20:case 43:this.$=Y[at];break;case 21:case 41:case 42:this.$=Y[at].replace(/"/g,"");break;case 22:case 30:this.$=[Y[at]];break;case 23:Y[at].push(Y[at-1]),this.$=Y[at];break;case 24:this.$={attributeType:Y[at-1],attributeName:Y[at]};break;case 25:this.$={attributeType:Y[at-2],attributeName:Y[at-1],attributeKeyTypeList:Y[at]};break;case 26:this.$={attributeType:Y[at-2],attributeName:Y[at-1],attributeComment:Y[at]};break;case 27:this.$={attributeType:Y[at-3],attributeName:Y[at-2],attributeKeyTypeList:Y[at-1],attributeComment:Y[at]};break;case 28:case 29:case 32:this.$=Y[at];break;case 31:Y[at-2].push(Y[at]),this.$=Y[at-2];break;case 33:this.$=Y[at].replace(/"/g,"");break;case 34:this.$={cardA:Y[at],relType:Y[at-1],cardB:Y[at-2]};break;case 35:this.$=O.Cardinality.ZERO_OR_ONE;break;case 36:this.$=O.Cardinality.ZERO_OR_MORE;break;case 37:this.$=O.Cardinality.ONE_OR_MORE;break;case 38:this.$=O.Cardinality.ONLY_ONE;break;case 39:this.$=O.Identification.NON_IDENTIFYING;break;case 40:this.$=O.Identification.IDENTIFYING;break;case 44:O.parseDirective("%%{","open_directive");break;case 45:O.parseDirective(Y[at],"type_directive");break;case 46:Y[at]=Y[at].trim().replace(/'/g,'"'),O.parseDirective(Y[at],"arg_directive");break;case 47:O.parseDirective("}%%","close_directive","er");break}},table:[{3:1,4:e,7:3,12:4,51:i},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,51:i},{13:8,52:[1,9]},{52:[2,44]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:s,25:n,27:a,29:o,30:l,31:h,51:i},{1:[2,2]},{14:23,15:[1,24],54:u},t([15,54],[2,45]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:15,10:26,12:4,17:16,23:s,25:n,27:a,29:o,30:l,31:h,51:i},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),t(r,[2,15],{18:27,42:29,20:[1,28],44:d,45:f,46:p,47:x}),{24:[1,34]},{26:[1,35]},{28:[1,36]},t(r,[2,19]),t(E,[2,20]),t(E,[2,21]),{11:[1,37]},{16:38,53:[1,39]},{11:[2,47]},t(r,[2,5]),{17:40,30:l,31:h},{21:41,22:[1,42],32:43,33:44,37:T},{43:46,48:[1,47],49:[1,48]},t(S,[2,35]),t(S,[2,36]),t(S,[2,37]),t(S,[2,38]),t(r,[2,16]),t(r,[2,17]),t(r,[2,18]),t(_,[2,9]),{14:49,54:u},{54:[2,46]},{15:[1,50]},{22:[1,51]},t(r,[2,14]),{21:52,22:[2,22],32:43,33:44,37:T},{34:53,37:[1,54]},{37:[2,28]},{42:55,44:d,45:f,46:p,47:x},t(D,[2,39]),t(D,[2,40]),{11:[1,56]},{19:57,30:[1,60],31:[1,59],50:[1,58]},t(r,[2,13]),{22:[2,23]},t(z,[2,24],{35:61,36:62,38:63,40:H,41:it}),t([22,37,40,41],[2,29]),t([30,31],[2,34]),t(_,[2,10]),t(r,[2,12]),t(r,[2,41]),t(r,[2,42]),t(r,[2,43]),t(z,[2,25],{36:66,39:[1,67],41:it}),t(z,[2,26]),t(R,[2,30]),t(z,[2,33]),t(R,[2,32]),t(z,[2,27]),{38:68,40:H},t(R,[2,31])],defaultActions:{5:[2,44],7:[2,2],25:[2,47],39:[2,46],45:[2,28],52:[2,23]},parseError:function(m,B){if(B.recoverable)this.trace(m);else{var g=new Error(m);throw g.hash=B,g}},parse:function(m){var B=this,g=[0],O=[],y=[null],Y=[],wt=this.table,at="",st=0,nt=0,et=2,tt=1,Tt=Y.slice.call(arguments,1),bt=Object.create(this.lexer),Z={yy:{}};for(var jt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,jt)&&(Z.yy[jt]=this.yy[jt]);bt.setInput(m,Z.yy),Z.yy.lexer=bt,Z.yy.parser=this,typeof bt.yylloc>"u"&&(bt.yylloc={});var U=bt.yylloc;Y.push(U);var pt=bt.options&&bt.options.ranges;typeof Z.yy.parseError=="function"?this.parseError=Z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function $(){var At;return At=O.pop()||bt.lex()||tt,typeof At!="number"&&(At instanceof Array&&(O=At,At=O.pop()),At=B.symbols_[At]||At),At}for(var K,N,A,G,C={},dt,b,Jt,j;;){if(N=g[g.length-1],this.defaultActions[N]?A=this.defaultActions[N]:((K===null||typeof K>"u")&&(K=$()),A=wt[N]&&wt[N][K]),typeof A>"u"||!A.length||!A[0]){var Nt="";j=[];for(dt in wt[N])this.terminals_[dt]&&dt>et&&j.push("'"+this.terminals_[dt]+"'");bt.showPosition?Nt="Parse error on line "+(st+1)+`:
|
|
1319
|
-
`+bt.showPosition()+`
|
|
1320
|
-
Expecting `+j.join(", ")+", got '"+(this.terminals_[K]||K)+"'":Nt="Parse error on line "+(st+1)+": Unexpected "+(K==tt?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(Nt,{text:bt.match,token:this.terminals_[K]||K,line:bt.yylineno,loc:U,expected:j})}if(A[0]instanceof Array&&A.length>1)throw new Error("Parse Error: multiple actions possible at state: "+N+", token: "+K);switch(A[0]){case 1:g.push(K),y.push(bt.yytext),Y.push(bt.yylloc),g.push(A[1]),K=null,nt=bt.yyleng,at=bt.yytext,st=bt.yylineno,U=bt.yylloc;break;case 2:if(b=this.productions_[A[1]][1],C.$=y[y.length-b],C._$={first_line:Y[Y.length-(b||1)].first_line,last_line:Y[Y.length-1].last_line,first_column:Y[Y.length-(b||1)].first_column,last_column:Y[Y.length-1].last_column},pt&&(C._$.range=[Y[Y.length-(b||1)].range[0],Y[Y.length-1].range[1]]),G=this.performAction.apply(C,[at,nt,st,Z.yy,A[1],y,Y].concat(Tt)),typeof G<"u")return G;b&&(g=g.slice(0,-1*b*2),y=y.slice(0,-1*b),Y=Y.slice(0,-1*b)),g.push(this.productions_[A[1]][0]),y.push(C.$),Y.push(C._$),Jt=wt[g[g.length-2]][g[g.length-1]],g.push(Jt);break;case 3:return!0}}return!0}},v=function(){var w={EOF:1,parseError:function(B,g){if(this.yy.parser)this.yy.parser.parseError(B,g);else throw new Error(B)},setInput:function(m,B){return this.yy=B||this.yy||{},this._input=m,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},input:function(){var m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var B=m.match(/(?:\r\n?|\n).*/g);return B?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),m},unput:function(m){var B=m.length,g=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-B),this.offset-=B;var O=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===O.length?this.yylloc.first_column:0)+O[O.length-g.length].length-g[0].length:this.yylloc.first_column-B},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-B]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1321
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(m){this.unput(this.match.slice(m))},pastInput:function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var m=this.pastInput(),B=new Array(m.length+1).join("-");return m+this.upcomingInput()+`
|
|
1322
|
-
`+B+"^"},test_match:function(m,B){var g,O,y;if(this.options.backtrack_lexer&&(y={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&&(y.yylloc.range=this.yylloc.range.slice(0))),O=m[0].match(/(?:\r\n?|\n).*/g),O&&(this.yylineno+=O.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:O?O[O.length-1].length-O[O.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+m[0].length},this.yytext+=m[0],this.match+=m[0],this.matches=m,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(m[0].length),this.matched+=m[0],g=this.performAction.call(this,this.yy,this,B,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var Y in y)this[Y]=y[Y];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var m,B,g,O;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),Y=0;Y<y.length;Y++)if(g=this._input.match(this.rules[y[Y]]),g&&(!B||g[0].length>B[0].length)){if(B=g,O=Y,this.options.backtrack_lexer){if(m=this.test_match(g,y[Y]),m!==!1)return m;if(this._backtrack){B=!1;continue}else return!1}else if(!this.options.flex)break}return B?(m=this.test_match(B,y[O]),m!==!1?m:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1323
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var B=this.next();return B||this.lex()},begin:function(B){this.conditionStack.push(B)},popState:function(){var B=this.conditionStack.length-1;return B>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(B){return B=this.conditionStack.length-1-Math.abs(B||0),B>=0?this.conditionStack[B]:"INITIAL"},pushState:function(B){this.begin(B)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(B,g,O,y){switch(O){case 0:return this.begin("acc_title"),25;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),27;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.begin("open_directive"),51;case 8:return this.begin("type_directive"),52;case 9:return this.popState(),this.begin("arg_directive"),15;case 10:return this.popState(),this.popState(),54;case 11:return 53;case 12:break;case 13:break;case 14:return 11;case 15:break;case 16:return 9;case 17:return 31;case 18:return 50;case 19:return 4;case 20:return this.begin("block"),20;case 21:return 39;case 22:break;case 23:return 40;case 24:return 37;case 25:return 37;case 26:return 41;case 27:break;case 28:return this.popState(),22;case 29:return g.yytext[0];case 30:return 44;case 31:return 46;case 32:return 46;case 33:return 46;case 34:return 44;case 35:return 44;case 36:return 45;case 37:return 45;case 38:return 45;case 39:return 45;case 40:return 45;case 41:return 46;case 42:return 45;case 43:return 46;case 44:return 47;case 45:return 47;case 46:return 47;case 47:return 47;case 48:return 44;case 49:return 45;case 50:return 46;case 51:return 48;case 52:return 49;case 53:return 49;case 54:return 48;case 55:return 48;case 56:return 48;case 57:return 30;case 58:return g.yytext[0];case 59:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},open_directive:{rules:[8],inclusive:!1},type_directive:{rules:[9,10],inclusive:!1},arg_directive:{rules:[10,11],inclusive:!1},block:{rules:[21,22,23,24,25,26,27,28,29],inclusive:!1},INITIAL:{rules:[0,2,4,7,12,13,14,15,16,17,18,19,20,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59],inclusive:!0}}};return w}();F.lexer=v;function L(){this.yy={}}return L.prototype=F,F.Parser=L,new L}();bl.parser=bl;const _y=bl,Ey=t=>t.match(/^\s*erDiagram/)!==null;let Jn={},xl=[];const vy={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},Cy={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},Ty=function(t,e,i){si.parseDirective(this,t,e,i)},gh=function(t){return Jn[t]===void 0&&(Jn[t]={attributes:[]},k.info("Added new entity :",t)),Jn[t]},Sy={Cardinality:vy,Identification:Cy,parseDirective:Ty,getConfig:()=>P().er,addEntity:gh,addAttributes:function(t,e){let i=gh(t),r;for(r=e.length-1;r>=0;r--)i.attributes.push(e[r]),k.debug("Added attribute ",e[r].attributeName)},getEntities:()=>Jn,addRelationship:function(t,e,i,r){let s={entityA:t,roleA:e,entityB:i,relSpec:r};xl.push(s),k.debug("Added new relationship :",s)},getRelationships:()=>xl,clear:function(){Jn={},xl=[],ar()},setAccTitle:or,getAccTitle:fr,setAccDescription:pr,getAccDescription:gr,setDiagramTitle:Ir,getDiagramTitle:Rr},cs={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END"},hs={ERMarkers:cs,insertMarkers:function(t,e){let i;t.append("defs").append("marker").attr("id",cs.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",cs.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),i=t.append("defs").append("marker").attr("id",cs.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),i.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),i=t.append("defs").append("marker").attr("id",cs.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),i.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",cs.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",cs.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),i=t.append("defs").append("marker").attr("id",cs.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),i.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),i=t.append("defs").append("marker").attr("id",cs.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),i.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")}},wy=/[^\dA-Za-z](\W)*/g;let Bi={},$n=new Map;const Ay=function(t){const e=Object.keys(t);for(const i of e)Bi[i]=t[i]},Ly=(t,e,i)=>{const r=Bi.entityPadding/3,s=Bi.entityPadding/3,n=Bi.fontSize*.85,a=e.node().getBBox(),o=[];let l=!1,h=!1,u=0,d=0,f=0,p=0,x=a.height+r*2,E=1;i.forEach(D=>{D.attributeKeyTypeList!==void 0&&D.attributeKeyTypeList.length>0&&(l=!0),D.attributeComment!==void 0&&(h=!0)}),i.forEach(D=>{const z=`${e.node().id}-attr-${E}`;let H=0;const it=ii(D.attributeType),R=t.append("text").classed("er entityLabel",!0).attr("id",`${z}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",P().fontFamily).style("font-size",n+"px").text(it),F=t.append("text").classed("er entityLabel",!0).attr("id",`${z}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",P().fontFamily).style("font-size",n+"px").text(D.attributeName),v={};v.tn=R,v.nn=F;const L=R.node().getBBox(),w=F.node().getBBox();if(u=Math.max(u,L.width),d=Math.max(d,w.width),H=Math.max(L.height,w.height),l){const m=D.attributeKeyTypeList!==void 0?D.attributeKeyTypeList.join(","):"",B=t.append("text").classed("er entityLabel",!0).attr("id",`${z}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",P().fontFamily).style("font-size",n+"px").text(m);v.kn=B;const g=B.node().getBBox();f=Math.max(f,g.width),H=Math.max(H,g.height)}if(h){const m=t.append("text").classed("er entityLabel",!0).attr("id",`${z}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",P().fontFamily).style("font-size",n+"px").text(D.attributeComment||"");v.cn=m;const B=m.node().getBBox();p=Math.max(p,B.width),H=Math.max(H,B.height)}v.height=H,o.push(v),x+=H+r*2,E+=1});let T=4;l&&(T+=2),h&&(T+=2);const S=u+d+f+p,_={width:Math.max(Bi.minEntityWidth,Math.max(a.width+Bi.entityPadding*2,S+s*T)),height:i.length>0?x:Math.max(Bi.minEntityHeight,a.height+Bi.entityPadding*2)};if(i.length>0){const D=Math.max(0,(_.width-S-s*T)/(T/2));e.attr("transform","translate("+_.width/2+","+(r+a.height/2)+")");let z=a.height+r*2,H="attributeBoxOdd";o.forEach(it=>{const R=z+r+it.height/2;it.tn.attr("transform","translate("+s+","+R+")");const F=t.insert("rect","#"+it.tn.node().id).classed(`er ${H}`,!0).attr("x",0).attr("y",z).attr("width",u+s*2+D).attr("height",it.height+r*2),v=parseFloat(F.attr("x"))+parseFloat(F.attr("width"));it.nn.attr("transform","translate("+(v+s)+","+R+")");const L=t.insert("rect","#"+it.nn.node().id).classed(`er ${H}`,!0).attr("x",v).attr("y",z).attr("width",d+s*2+D).attr("height",it.height+r*2);let w=parseFloat(L.attr("x"))+parseFloat(L.attr("width"));if(l){it.kn.attr("transform","translate("+(w+s)+","+R+")");const m=t.insert("rect","#"+it.kn.node().id).classed(`er ${H}`,!0).attr("x",w).attr("y",z).attr("width",f+s*2+D).attr("height",it.height+r*2);w=parseFloat(m.attr("x"))+parseFloat(m.attr("width"))}h&&(it.cn.attr("transform","translate("+(w+s)+","+R+")"),t.insert("rect","#"+it.cn.node().id).classed(`er ${H}`,"true").attr("x",w).attr("y",z).attr("width",p+s*2+D).attr("height",it.height+r*2)),z+=it.height+r*2,H=H==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else _.height=Math.max(Bi.minEntityHeight,x),e.attr("transform","translate("+_.width/2+","+_.height/2+")");return _},By=function(t,e,i){const r=Object.keys(e);let s;return r.forEach(function(n){const a=Fy(n,"entity");$n.set(n,a);const o=t.append("g").attr("id",a);s=s===void 0?a:s;const l="text-"+a,h=o.append("text").classed("er entityLabel",!0).attr("id",l).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",P().fontFamily).style("font-size",Bi.fontSize+"px").text(n),{width:u,height:d}=Ly(o,h,e[n].attributes),p=o.insert("rect","#"+l).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",u).attr("height",d).node().getBBox();i.setNode(a,{width:p.width,height:p.height,shape:"rect",id:a})}),s},Dy=function(t,e){e.nodes().forEach(function(i){i!==void 0&&e.node(i)!==void 0&&t.select("#"+i).attr("transform","translate("+(e.node(i).x-e.node(i).width/2)+","+(e.node(i).y-e.node(i).height/2)+" )")})},yh=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},Iy=function(t,e){return t.forEach(function(i){e.setEdge($n.get(i.entityA),$n.get(i.entityB),{relationship:i},yh(i))}),t};let mh=0;const Ry=function(t,e,i,r,s){mh++;const n=i.edge($n.get(e.entityA),$n.get(e.entityB),yh(e)),a=(0,Q.jvg)().x(function(x){return x.x}).y(function(x){return x.y}).curve(Q.$0Z),o=t.insert("path","#"+r).classed("er relationshipLine",!0).attr("d",a(n.points)).style("stroke",Bi.stroke).style("fill","none");e.relSpec.relType===s.db.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");let l="";switch(Bi.arrowMarkerAbsolute&&(l=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,l=l.replace(/\(/g,"\\("),l=l.replace(/\)/g,"\\)")),e.relSpec.cardA){case s.db.Cardinality.ZERO_OR_ONE:o.attr("marker-end","url("+l+"#"+hs.ERMarkers.ZERO_OR_ONE_END+")");break;case s.db.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+l+"#"+hs.ERMarkers.ZERO_OR_MORE_END+")");break;case s.db.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+l+"#"+hs.ERMarkers.ONE_OR_MORE_END+")");break;case s.db.Cardinality.ONLY_ONE:o.attr("marker-end","url("+l+"#"+hs.ERMarkers.ONLY_ONE_END+")");break}switch(e.relSpec.cardB){case s.db.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+l+"#"+hs.ERMarkers.ZERO_OR_ONE_START+")");break;case s.db.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+l+"#"+hs.ERMarkers.ZERO_OR_MORE_START+")");break;case s.db.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+l+"#"+hs.ERMarkers.ONE_OR_MORE_START+")");break;case s.db.Cardinality.ONLY_ONE:o.attr("marker-start","url("+l+"#"+hs.ERMarkers.ONLY_ONE_START+")");break}const h=o.node().getTotalLength(),u=o.node().getPointAtLength(h*.5),d="rel"+mh,p=t.append("text").classed("er relationshipLabel",!0).attr("id",d).attr("x",u.x).attr("y",u.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",P().fontFamily).style("font-size",Bi.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+d).classed("er relationshipLabelBox",!0).attr("x",u.x-p.width/2).attr("y",u.y-p.height/2).attr("width",p.width).attr("height",p.height)},Ny=function(t,e,i,r){Bi=P().er,k.info("Drawing ER diagram");const s=P().securityLevel;let n;s==="sandbox"&&(n=(0,Q.Ys)("#i"+e));const o=(s==="sandbox"?(0,Q.Ys)(n.nodes()[0].contentDocument.body):(0,Q.Ys)("body")).select(`[id='${e}']`);hs.insertMarkers(o,Bi);let l;l=new Be.k({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:Bi.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});const h=By(o,r.db.getEntities(),l),u=Iy(r.db.getRelationships(),l);(0,xe.bK)(l),Dy(o,l),u.forEach(function(E){Ry(o,E,l,h,r)});const d=Bi.diagramPadding;ke.insertTitle(o,"entityTitleText",Bi.titleTopMargin,r.db.getDiagramTitle());const f=o.node().getBBox(),p=f.width+d*2,x=f.height+d*2;Dr(o,x,p,Bi.useMaxWidth),o.attr("viewBox",`${f.x-d} ${f.y-d} ${p} ${x}`)},Oy="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function Fy(t="",e=""){const i=t.replace(wy,"");return`${bh(e)}${bh(i)}${(0,Xe.Z)(t,Oy)}`}function bh(t=""){return t.length>0?`${t}-`:""}const My={setConf:Ay,draw:Ny};var kl=function(){var t=function(Vs,ne,de,Re){for(de=de||{},Re=Vs.length;Re--;de[Vs[Re]]=ne);return de},e=[1,9],i=[1,7],r=[1,6],s=[1,8],n=[1,20,21,22,23,38,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],a=[2,10],o=[1,20],l=[1,21],h=[1,22],u=[1,23],d=[1,30],f=[1,32],p=[1,33],x=[1,34],E=[1,62],T=[1,48],S=[1,52],_=[1,36],D=[1,37],z=[1,38],H=[1,39],it=[1,40],R=[1,56],F=[1,63],v=[1,51],L=[1,53],w=[1,55],m=[1,59],B=[1,60],g=[1,41],O=[1,42],y=[1,43],Y=[1,44],wt=[1,61],at=[1,50],st=[1,54],nt=[1,57],et=[1,58],tt=[1,49],Tt=[1,66],bt=[1,71],Z=[1,20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],jt=[1,75],U=[1,74],pt=[1,76],$=[20,21,23,81,82],K=[1,99],N=[1,104],A=[1,107],G=[1,108],C=[1,101],dt=[1,106],b=[1,109],Jt=[1,102],j=[1,114],Nt=[1,113],At=[1,103],kt=[1,105],gt=[1,110],_t=[1,111],yt=[1,112],Ct=[1,115],qe=[20,21,22,23,81,82],Ne=[20,21,22,23,53,81,82],se=[20,21,22,23,40,52,53,55,57,59,61,63,65,66,67,69,71,73,74,76,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],re=[20,21,23],Le=[20,21,23,52,66,67,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],ni=[1,12,20,21,22,23,24,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],Ye=[52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],ue=[1,149],Zt=[1,157],St=[1,158],Et=[1,159],Dt=[1,160],ut=[1,144],qt=[1,145],rt=[1,141],we=[1,152],lt=[1,153],Ce=[1,154],Oe=[1,155],Me=[1,156],Fe=[1,161],Pe=[1,162],oe=[1,147],Te=[1,150],De=[1,146],Ie=[1,143],ka=[20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],Bo=[1,165],bi=[20,21,22,23,26,52,66,67,91,105,106,109,111,112,122,123,124,125,126,127],Ee=[20,21,22,23,24,26,38,40,41,42,52,56,58,60,62,64,66,67,68,70,72,73,75,77,81,82,86,87,88,89,90,91,92,95,105,106,109,111,112,113,114,122,123,124,125,126,127],$i=[12,21,22,24],Ln=[22,106],Fi=[1,250],Gi=[1,245],xi=[1,246],ur=[1,254],ji=[1,251],tr=[1,248],ki=[1,247],Vr=[1,249],Yr=[1,252],zr=[1,253],Wr=[1,255],Ps=[1,273],td=[20,21,23,106],br=[20,21,22,23,66,67,86,102,105,106,109,110,111,112,113],Ec={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,direction:43,acc_title:44,acc_title_value:45,acc_descr:46,acc_descr_value:47,acc_descr_multiline_value:48,link:49,node:50,vertex:51,AMP:52,STYLE_SEPARATOR:53,idString:54,DOUBLECIRCLESTART:55,DOUBLECIRCLEEND:56,PS:57,PE:58,"(-":59,"-)":60,STADIUMSTART:61,STADIUMEND:62,SUBROUTINESTART:63,SUBROUTINEEND:64,VERTEX_WITH_PROPS_START:65,ALPHA:66,COLON:67,PIPE:68,CYLINDERSTART:69,CYLINDEREND:70,DIAMOND_START:71,DIAMOND_STOP:72,TAGEND:73,TRAPSTART:74,TRAPEND:75,INVTRAPSTART:76,INVTRAPEND:77,linkStatement:78,arrowText:79,TESTSTR:80,START_LINK:81,LINK:82,textToken:83,STR:84,keywords:85,STYLE:86,LINKSTYLE:87,CLASSDEF:88,CLASS:89,CLICK:90,DOWN:91,UP:92,textNoTags:93,textNoTagsToken:94,DEFAULT:95,stylesOpt:96,alphaNum:97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,HEX:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,MINUS:109,UNIT:110,BRKT:111,DOT:112,PCT:113,TAGSTART:114,alphaNumToken:115,idStringToken:116,alphaNumStatement:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,PUNCTUATION:122,UNICODE_TEXT:123,PLUS:124,EQUALS:125,MULT:126,UNDERSCORE:127,graphCodeTokens:128,ARROW_CROSS:129,ARROW_POINT:130,ARROW_CIRCLE:131,ARROW_OPEN:132,QUOTE:133,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",44:"acc_title",45:"acc_title_value",46:"acc_descr",47:"acc_descr_value",48:"acc_descr_multiline_value",52:"AMP",53:"STYLE_SEPARATOR",55:"DOUBLECIRCLESTART",56:"DOUBLECIRCLEEND",57:"PS",58:"PE",59:"(-",60:"-)",61:"STADIUMSTART",62:"STADIUMEND",63:"SUBROUTINESTART",64:"SUBROUTINEEND",65:"VERTEX_WITH_PROPS_START",66:"ALPHA",67:"COLON",68:"PIPE",69:"CYLINDERSTART",70:"CYLINDEREND",71:"DIAMOND_START",72:"DIAMOND_STOP",73:"TAGEND",74:"TRAPSTART",75:"TRAPEND",76:"INVTRAPSTART",77:"INVTRAPEND",80:"TESTSTR",81:"START_LINK",82:"LINK",84:"STR",86:"STYLE",87:"LINKSTYLE",88:"CLASSDEF",89:"CLASS",90:"CLICK",91:"DOWN",92:"UP",95:"DEFAULT",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"HEX",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"MINUS",110:"UNIT",111:"BRKT",112:"DOT",113:"PCT",114:"TAGSTART",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"direction_lr",122:"PUNCTUATION",123:"UNICODE_TEXT",124:"PLUS",125:"EQUALS",126:"MULT",127:"UNDERSCORE",129:"ARROW_CROSS",130:"ARROW_POINT",131:"ARROW_CIRCLE",132:"ARROW_OPEN",133:"QUOTE"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[19,1],[19,2],[19,2],[19,1],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[50,1],[50,5],[50,3],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,8],[51,4],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,4],[51,4],[51,1],[49,2],[49,3],[49,3],[49,1],[49,3],[78,1],[79,3],[39,1],[39,2],[39,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[93,1],[93,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[103,1],[103,3],[96,1],[96,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[94,1],[94,1],[94,1],[94,1],[54,1],[54,2],[97,1],[97,2],[117,1],[117,1],[117,1],[117,1],[43,1],[43,1],[43,1],[43,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1]],performAction:function(ne,de,Re,Ft,li,M,_a){var W=M.length-1;switch(li){case 5:Ft.parseDirective("%%{","open_directive");break;case 6:Ft.parseDirective(M[W],"type_directive");break;case 7:M[W]=M[W].trim().replace(/'/g,'"'),Ft.parseDirective(M[W],"arg_directive");break;case 8:Ft.parseDirective("}%%","close_directive","flowchart");break;case 10:this.$=[];break;case 11:(!Array.isArray(M[W])||M[W].length>0)&&M[W-1].push(M[W]),this.$=M[W-1];break;case 12:case 82:case 84:case 96:case 152:case 154:case 155:this.$=M[W];break;case 19:Ft.setDirection("TB"),this.$="TB";break;case 20:Ft.setDirection(M[W-1]),this.$=M[W-1];break;case 35:this.$=M[W-1].nodes;break;case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 41:this.$=Ft.addSubGraph(M[W-6],M[W-1],M[W-4]);break;case 42:this.$=Ft.addSubGraph(M[W-3],M[W-1],M[W-3]);break;case 43:this.$=Ft.addSubGraph(void 0,M[W-1],void 0);break;case 45:this.$=M[W].trim(),Ft.setAccTitle(this.$);break;case 46:case 47:this.$=M[W].trim(),Ft.setAccDescription(this.$);break;case 51:Ft.addLink(M[W-2].stmt,M[W],M[W-1]),this.$={stmt:M[W],nodes:M[W].concat(M[W-2].nodes)};break;case 52:Ft.addLink(M[W-3].stmt,M[W-1],M[W-2]),this.$={stmt:M[W-1],nodes:M[W-1].concat(M[W-3].nodes)};break;case 53:this.$={stmt:M[W-1],nodes:M[W-1]};break;case 54:this.$={stmt:M[W],nodes:M[W]};break;case 55:this.$=[M[W]];break;case 56:this.$=M[W-4].concat(M[W]);break;case 57:this.$=[M[W-2]],Ft.setClass(M[W-2],M[W]);break;case 58:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"square");break;case 59:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"doublecircle");break;case 60:this.$=M[W-5],Ft.addVertex(M[W-5],M[W-2],"circle");break;case 61:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"ellipse");break;case 62:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"stadium");break;case 63:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"subroutine");break;case 64:this.$=M[W-7],Ft.addVertex(M[W-7],M[W-1],"rect",void 0,void 0,void 0,Object.fromEntries([[M[W-5],M[W-3]]]));break;case 65:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"cylinder");break;case 66:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"round");break;case 67:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"diamond");break;case 68:this.$=M[W-5],Ft.addVertex(M[W-5],M[W-2],"hexagon");break;case 69:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"odd");break;case 70:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"trapezoid");break;case 71:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"inv_trapezoid");break;case 72:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"lean_right");break;case 73:this.$=M[W-3],Ft.addVertex(M[W-3],M[W-1],"lean_left");break;case 74:this.$=M[W],Ft.addVertex(M[W]);break;case 75:M[W-1].text=M[W],this.$=M[W-1];break;case 76:case 77:M[W-2].text=M[W-1],this.$=M[W-2];break;case 78:this.$=M[W];break;case 79:var wr=Ft.destructLink(M[W],M[W-2]);this.$={type:wr.type,stroke:wr.stroke,length:wr.length,text:M[W-1]};break;case 80:var wr=Ft.destructLink(M[W]);this.$={type:wr.type,stroke:wr.stroke,length:wr.length};break;case 81:this.$=M[W-1];break;case 83:case 97:case 153:this.$=M[W-1]+""+M[W];break;case 98:case 99:this.$=M[W-4],Ft.addClass(M[W-2],M[W]);break;case 100:this.$=M[W-4],Ft.setClass(M[W-2],M[W]);break;case 101:case 109:this.$=M[W-1],Ft.setClickEvent(M[W-1],M[W]);break;case 102:case 110:this.$=M[W-3],Ft.setClickEvent(M[W-3],M[W-2]),Ft.setTooltip(M[W-3],M[W]);break;case 103:this.$=M[W-2],Ft.setClickEvent(M[W-2],M[W-1],M[W]);break;case 104:this.$=M[W-4],Ft.setClickEvent(M[W-4],M[W-3],M[W-2]),Ft.setTooltip(M[W-4],M[W]);break;case 105:case 111:this.$=M[W-1],Ft.setLink(M[W-1],M[W]);break;case 106:case 112:this.$=M[W-3],Ft.setLink(M[W-3],M[W-2]),Ft.setTooltip(M[W-3],M[W]);break;case 107:case 113:this.$=M[W-3],Ft.setLink(M[W-3],M[W-2],M[W]);break;case 108:case 114:this.$=M[W-5],Ft.setLink(M[W-5],M[W-4],M[W]),Ft.setTooltip(M[W-5],M[W-2]);break;case 115:this.$=M[W-4],Ft.addVertex(M[W-2],void 0,void 0,M[W]);break;case 116:case 118:this.$=M[W-4],Ft.updateLink(M[W-2],M[W]);break;case 117:this.$=M[W-4],Ft.updateLink([M[W-2]],M[W]);break;case 119:this.$=M[W-8],Ft.updateLinkInterpolate([M[W-6]],M[W-2]),Ft.updateLink([M[W-6]],M[W]);break;case 120:this.$=M[W-8],Ft.updateLinkInterpolate(M[W-6],M[W-2]),Ft.updateLink(M[W-6],M[W]);break;case 121:this.$=M[W-6],Ft.updateLinkInterpolate([M[W-4]],M[W]);break;case 122:this.$=M[W-6],Ft.updateLinkInterpolate(M[W-4],M[W]);break;case 123:case 125:this.$=[M[W]];break;case 124:case 126:M[W-2].push(M[W]),this.$=M[W-2];break;case 128:this.$=M[W-1]+M[W];break;case 150:this.$=M[W];break;case 151:this.$=M[W-1]+""+M[W];break;case 156:this.$="v";break;case 157:this.$="-";break;case 158:this.$={stmt:"dir",value:"TB"};break;case 159:this.$={stmt:"dir",value:"BT"};break;case 160:this.$={stmt:"dir",value:"RL"};break;case 161:this.$={stmt:"dir",value:"LR"};break}},table:[{3:1,4:2,5:3,6:5,12:e,16:4,21:i,22:r,24:s},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:e,16:4,21:i,22:r,24:s},t(n,a,{17:11}),{7:12,13:[1,13]},{16:14,21:i,22:r,24:s},{16:15,21:i,22:r,24:s},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:o,21:l,22:h,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:d,43:31,44:f,46:p,48:x,50:35,51:45,52:E,54:46,66:T,67:S,86:_,87:D,88:z,89:H,90:it,91:R,95:F,105:v,106:L,109:w,111:m,112:B,116:47,118:g,119:O,120:y,121:Y,122:wt,123:at,124:st,125:nt,126:et,127:tt},{8:64,10:[1,65],15:Tt},t([10,15],[2,6]),t(n,[2,17]),t(n,[2,18]),t(n,[2,19]),{20:[1,68],21:[1,69],22:bt,27:67,30:70},t(Z,[2,11]),t(Z,[2,12]),t(Z,[2,13]),t(Z,[2,14]),t(Z,[2,15]),t(Z,[2,16]),{9:72,20:jt,21:U,23:pt,49:73,78:77,81:[1,78],82:[1,79]},{9:80,20:jt,21:U,23:pt},{9:81,20:jt,21:U,23:pt},{9:82,20:jt,21:U,23:pt},{9:83,20:jt,21:U,23:pt},{9:84,20:jt,21:U,23:pt},{9:86,20:jt,21:U,22:[1,85],23:pt},t(Z,[2,44]),{45:[1,87]},{47:[1,88]},t(Z,[2,47]),t($,[2,54],{30:89,22:bt}),{22:[1,90]},{22:[1,91]},{22:[1,92]},{22:[1,93]},{26:K,52:N,66:A,67:G,84:[1,97],91:C,97:96,98:[1,94],100:[1,95],105:dt,106:b,109:Jt,111:j,112:Nt,115:100,117:98,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},t(Z,[2,158]),t(Z,[2,159]),t(Z,[2,160]),t(Z,[2,161]),t(qe,[2,55],{53:[1,116]}),t(Ne,[2,74],{116:129,40:[1,117],52:E,55:[1,118],57:[1,119],59:[1,120],61:[1,121],63:[1,122],65:[1,123],66:T,67:S,69:[1,124],71:[1,125],73:[1,126],74:[1,127],76:[1,128],91:R,95:F,105:v,106:L,109:w,111:m,112:B,122:wt,123:at,124:st,125:nt,126:et,127:tt}),t(se,[2,150]),t(se,[2,175]),t(se,[2,176]),t(se,[2,177]),t(se,[2,178]),t(se,[2,179]),t(se,[2,180]),t(se,[2,181]),t(se,[2,182]),t(se,[2,183]),t(se,[2,184]),t(se,[2,185]),t(se,[2,186]),t(se,[2,187]),t(se,[2,188]),t(se,[2,189]),t(se,[2,190]),{9:130,20:jt,21:U,23:pt},{11:131,14:[1,132]},t(re,[2,8]),t(n,[2,20]),t(n,[2,26]),t(n,[2,27]),{21:[1,133]},t(Le,[2,34],{30:134,22:bt}),t(Z,[2,35]),{50:135,51:45,52:E,54:46,66:T,67:S,91:R,95:F,105:v,106:L,109:w,111:m,112:B,116:47,122:wt,123:at,124:st,125:nt,126:et,127:tt},t(ni,[2,48]),t(ni,[2,49]),t(ni,[2,50]),t(Ye,[2,78],{79:136,68:[1,138],80:[1,137]}),{22:ue,24:Zt,26:St,38:Et,39:139,42:Dt,52:N,66:A,67:G,73:ut,81:qt,83:140,84:rt,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},t([52,66,67,68,80,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,80]),t(Z,[2,36]),t(Z,[2,37]),t(Z,[2,38]),t(Z,[2,39]),t(Z,[2,40]),{22:ue,24:Zt,26:St,38:Et,39:163,42:Dt,52:N,66:A,67:G,73:ut,81:qt,83:140,84:rt,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},t(ka,a,{17:164}),t(Z,[2,45]),t(Z,[2,46]),t($,[2,53],{52:Bo}),{26:K,52:N,66:A,67:G,91:C,97:166,102:[1,167],105:dt,106:b,109:Jt,111:j,112:Nt,115:100,117:98,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{95:[1,168],103:169,105:[1,170]},{26:K,52:N,66:A,67:G,91:C,95:[1,171],97:172,105:dt,106:b,109:Jt,111:j,112:Nt,115:100,117:98,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{26:K,52:N,66:A,67:G,91:C,97:173,105:dt,106:b,109:Jt,111:j,112:Nt,115:100,117:98,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},t(re,[2,101],{22:[1,174],99:[1,175]}),t(re,[2,105],{22:[1,176]}),t(re,[2,109],{115:100,117:178,22:[1,177],26:K,52:N,66:A,67:G,91:C,105:dt,106:b,109:Jt,111:j,112:Nt,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct}),t(re,[2,111],{22:[1,179]}),t(bi,[2,152]),t(bi,[2,154]),t(bi,[2,155]),t(bi,[2,156]),t(bi,[2,157]),t(Ee,[2,162]),t(Ee,[2,163]),t(Ee,[2,164]),t(Ee,[2,165]),t(Ee,[2,166]),t(Ee,[2,167]),t(Ee,[2,168]),t(Ee,[2,169]),t(Ee,[2,170]),t(Ee,[2,171]),t(Ee,[2,172]),t(Ee,[2,173]),t(Ee,[2,174]),{52:E,54:180,66:T,67:S,91:R,95:F,105:v,106:L,109:w,111:m,112:B,116:47,122:wt,123:at,124:st,125:nt,126:et,127:tt},{22:ue,24:Zt,26:St,38:Et,39:181,42:Dt,52:N,66:A,67:G,73:ut,81:qt,83:140,84:rt,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{22:ue,24:Zt,26:St,38:Et,39:182,42:Dt,52:N,66:A,67:G,73:ut,81:qt,83:140,84:rt,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{22:ue,24:Zt,26:St,38:Et,39:184,42:Dt,52:N,57:[1,183],66:A,67:G,73:ut,81:qt,83:140,84:rt,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{22:ue,24:Zt,26:St,38:Et,39:185,42:Dt,52:N,66:A,67:G,73:ut,81:qt,83:140,84:rt,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{22:ue,24:Zt,26:St,38:Et,39:186,42:Dt,52:N,66:A,67:G,73:ut,81:qt,83:140,84:rt,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{22:ue,24:Zt,26:St,38:Et,39:187,42:Dt,52:N,66:A,67:G,73:ut,81:qt,83:140,84:rt,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{66:[1,188]},{22:ue,24:Zt,26:St,38:Et,39:189,42:Dt,52:N,66:A,67:G,73:ut,81:qt,83:140,84:rt,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{22:ue,24:Zt,26:St,38:Et,39:190,42:Dt,52:N,66:A,67:G,71:[1,191],73:ut,81:qt,83:140,84:rt,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{22:ue,24:Zt,26:St,38:Et,39:192,42:Dt,52:N,66:A,67:G,73:ut,81:qt,83:140,84:rt,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{22:ue,24:Zt,26:St,38:Et,39:193,42:Dt,52:N,66:A,67:G,73:ut,81:qt,83:140,84:rt,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{22:ue,24:Zt,26:St,38:Et,39:194,42:Dt,52:N,66:A,67:G,73:ut,81:qt,83:140,84:rt,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},t(se,[2,151]),t($i,[2,3]),{8:195,15:Tt},{15:[2,7]},t(n,[2,28]),t(Le,[2,33]),t($,[2,51],{30:196,22:bt}),t(Ye,[2,75],{22:[1,197]}),{22:[1,198]},{22:ue,24:Zt,26:St,38:Et,39:199,42:Dt,52:N,66:A,67:G,73:ut,81:qt,83:140,84:rt,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{22:ue,24:Zt,26:St,38:Et,42:Dt,52:N,66:A,67:G,73:ut,81:qt,82:[1,200],83:201,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},t(Ee,[2,82]),t(Ee,[2,84]),t(Ee,[2,140]),t(Ee,[2,141]),t(Ee,[2,142]),t(Ee,[2,143]),t(Ee,[2,144]),t(Ee,[2,145]),t(Ee,[2,146]),t(Ee,[2,147]),t(Ee,[2,148]),t(Ee,[2,149]),t(Ee,[2,85]),t(Ee,[2,86]),t(Ee,[2,87]),t(Ee,[2,88]),t(Ee,[2,89]),t(Ee,[2,90]),t(Ee,[2,91]),t(Ee,[2,92]),t(Ee,[2,93]),t(Ee,[2,94]),t(Ee,[2,95]),{9:203,20:jt,21:U,22:ue,23:pt,24:Zt,26:St,38:Et,40:[1,202],42:Dt,52:N,66:A,67:G,73:ut,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{18:18,19:19,20:o,21:l,22:h,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:d,42:[1,204],43:31,44:f,46:p,48:x,50:35,51:45,52:E,54:46,66:T,67:S,86:_,87:D,88:z,89:H,90:it,91:R,95:F,105:v,106:L,109:w,111:m,112:B,116:47,118:g,119:O,120:y,121:Y,122:wt,123:at,124:st,125:nt,126:et,127:tt},{22:bt,30:205},{22:[1,206],26:K,52:N,66:A,67:G,91:C,105:dt,106:b,109:Jt,111:j,112:Nt,115:100,117:178,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{22:[1,207]},{22:[1,208]},{22:[1,209],106:[1,210]},t(Ln,[2,123]),{22:[1,211]},{22:[1,212],26:K,52:N,66:A,67:G,91:C,105:dt,106:b,109:Jt,111:j,112:Nt,115:100,117:178,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{22:[1,213],26:K,52:N,66:A,67:G,91:C,105:dt,106:b,109:Jt,111:j,112:Nt,115:100,117:178,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{84:[1,214]},t(re,[2,103],{22:[1,215]}),{84:[1,216],101:[1,217]},{84:[1,218]},t(bi,[2,153]),{84:[1,219],101:[1,220]},t(qe,[2,57],{116:129,52:E,66:T,67:S,91:R,95:F,105:v,106:L,109:w,111:m,112:B,122:wt,123:at,124:st,125:nt,126:et,127:tt}),{22:ue,24:Zt,26:St,38:Et,41:[1,221],42:Dt,52:N,66:A,67:G,73:ut,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{22:ue,24:Zt,26:St,38:Et,42:Dt,52:N,56:[1,222],66:A,67:G,73:ut,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{22:ue,24:Zt,26:St,38:Et,39:223,42:Dt,52:N,66:A,67:G,73:ut,81:qt,83:140,84:rt,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{22:ue,24:Zt,26:St,38:Et,42:Dt,52:N,58:[1,224],66:A,67:G,73:ut,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{22:ue,24:Zt,26:St,38:Et,42:Dt,52:N,60:[1,225],66:A,67:G,73:ut,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{22:ue,24:Zt,26:St,38:Et,42:Dt,52:N,62:[1,226],66:A,67:G,73:ut,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{22:ue,24:Zt,26:St,38:Et,42:Dt,52:N,64:[1,227],66:A,67:G,73:ut,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{67:[1,228]},{22:ue,24:Zt,26:St,38:Et,42:Dt,52:N,66:A,67:G,70:[1,229],73:ut,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{22:ue,24:Zt,26:St,38:Et,42:Dt,52:N,66:A,67:G,72:[1,230],73:ut,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{22:ue,24:Zt,26:St,38:Et,39:231,42:Dt,52:N,66:A,67:G,73:ut,81:qt,83:140,84:rt,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{22:ue,24:Zt,26:St,38:Et,41:[1,232],42:Dt,52:N,66:A,67:G,73:ut,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{22:ue,24:Zt,26:St,38:Et,42:Dt,52:N,66:A,67:G,73:ut,75:[1,233],77:[1,234],81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{22:ue,24:Zt,26:St,38:Et,42:Dt,52:N,66:A,67:G,73:ut,75:[1,236],77:[1,235],81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{9:237,20:jt,21:U,23:pt},t($,[2,52],{52:Bo}),t(Ye,[2,77]),t(Ye,[2,76]),{22:ue,24:Zt,26:St,38:Et,42:Dt,52:N,66:A,67:G,68:[1,238],73:ut,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},t(Ye,[2,79]),t(Ee,[2,83]),{22:ue,24:Zt,26:St,38:Et,39:239,42:Dt,52:N,66:A,67:G,73:ut,81:qt,83:140,84:rt,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},t(ka,a,{17:240}),t(Z,[2,43]),{51:241,52:E,54:46,66:T,67:S,91:R,95:F,105:v,106:L,109:w,111:m,112:B,116:47,122:wt,123:at,124:st,125:nt,126:et,127:tt},{22:Fi,66:Gi,67:xi,86:ur,96:242,102:ji,105:tr,107:243,108:244,109:ki,110:Vr,111:Yr,112:zr,113:Wr},{22:Fi,66:Gi,67:xi,86:ur,96:256,102:ji,105:tr,107:243,108:244,109:ki,110:Vr,111:Yr,112:zr,113:Wr},{22:Fi,66:Gi,67:xi,86:ur,96:257,102:ji,104:[1,258],105:tr,107:243,108:244,109:ki,110:Vr,111:Yr,112:zr,113:Wr},{22:Fi,66:Gi,67:xi,86:ur,96:259,102:ji,104:[1,260],105:tr,107:243,108:244,109:ki,110:Vr,111:Yr,112:zr,113:Wr},{105:[1,261]},{22:Fi,66:Gi,67:xi,86:ur,96:262,102:ji,105:tr,107:243,108:244,109:ki,110:Vr,111:Yr,112:zr,113:Wr},{22:Fi,66:Gi,67:xi,86:ur,96:263,102:ji,105:tr,107:243,108:244,109:ki,110:Vr,111:Yr,112:zr,113:Wr},{26:K,52:N,66:A,67:G,91:C,97:264,105:dt,106:b,109:Jt,111:j,112:Nt,115:100,117:98,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},t(re,[2,102]),{84:[1,265]},t(re,[2,106],{22:[1,266]}),t(re,[2,107]),t(re,[2,110]),t(re,[2,112],{22:[1,267]}),t(re,[2,113]),t(Ne,[2,58]),t(Ne,[2,59]),{22:ue,24:Zt,26:St,38:Et,42:Dt,52:N,58:[1,268],66:A,67:G,73:ut,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},t(Ne,[2,66]),t(Ne,[2,61]),t(Ne,[2,62]),t(Ne,[2,63]),{66:[1,269]},t(Ne,[2,65]),t(Ne,[2,67]),{22:ue,24:Zt,26:St,38:Et,42:Dt,52:N,66:A,67:G,72:[1,270],73:ut,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},t(Ne,[2,69]),t(Ne,[2,70]),t(Ne,[2,72]),t(Ne,[2,71]),t(Ne,[2,73]),t($i,[2,4]),t([22,52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,81]),{22:ue,24:Zt,26:St,38:Et,41:[1,271],42:Dt,52:N,66:A,67:G,73:ut,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{18:18,19:19,20:o,21:l,22:h,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:d,42:[1,272],43:31,44:f,46:p,48:x,50:35,51:45,52:E,54:46,66:T,67:S,86:_,87:D,88:z,89:H,90:it,91:R,95:F,105:v,106:L,109:w,111:m,112:B,116:47,118:g,119:O,120:y,121:Y,122:wt,123:at,124:st,125:nt,126:et,127:tt},t(qe,[2,56]),t(re,[2,115],{106:Ps}),t(td,[2,125],{108:274,22:Fi,66:Gi,67:xi,86:ur,102:ji,105:tr,109:ki,110:Vr,111:Yr,112:zr,113:Wr}),t(br,[2,127]),t(br,[2,129]),t(br,[2,130]),t(br,[2,131]),t(br,[2,132]),t(br,[2,133]),t(br,[2,134]),t(br,[2,135]),t(br,[2,136]),t(br,[2,137]),t(br,[2,138]),t(br,[2,139]),t(re,[2,116],{106:Ps}),t(re,[2,117],{106:Ps}),{22:[1,275]},t(re,[2,118],{106:Ps}),{22:[1,276]},t(Ln,[2,124]),t(re,[2,98],{106:Ps}),t(re,[2,99],{106:Ps}),t(re,[2,100],{115:100,117:178,26:K,52:N,66:A,67:G,91:C,105:dt,106:b,109:Jt,111:j,112:Nt,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct}),t(re,[2,104]),{101:[1,277]},{101:[1,278]},{58:[1,279]},{68:[1,280]},{72:[1,281]},{9:282,20:jt,21:U,23:pt},t(Z,[2,42]),{22:Fi,66:Gi,67:xi,86:ur,102:ji,105:tr,107:283,108:244,109:ki,110:Vr,111:Yr,112:zr,113:Wr},t(br,[2,128]),{26:K,52:N,66:A,67:G,91:C,97:284,105:dt,106:b,109:Jt,111:j,112:Nt,115:100,117:98,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{26:K,52:N,66:A,67:G,91:C,97:285,105:dt,106:b,109:Jt,111:j,112:Nt,115:100,117:98,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},t(re,[2,108]),t(re,[2,114]),t(Ne,[2,60]),{22:ue,24:Zt,26:St,38:Et,39:286,42:Dt,52:N,66:A,67:G,73:ut,81:qt,83:140,84:rt,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},t(Ne,[2,68]),t(ka,a,{17:287}),t(td,[2,126],{108:274,22:Fi,66:Gi,67:xi,86:ur,102:ji,105:tr,109:ki,110:Vr,111:Yr,112:zr,113:Wr}),t(re,[2,121],{115:100,117:178,22:[1,288],26:K,52:N,66:A,67:G,91:C,105:dt,106:b,109:Jt,111:j,112:Nt,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct}),t(re,[2,122],{115:100,117:178,22:[1,289],26:K,52:N,66:A,67:G,91:C,105:dt,106:b,109:Jt,111:j,112:Nt,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct}),{22:ue,24:Zt,26:St,38:Et,41:[1,290],42:Dt,52:N,66:A,67:G,73:ut,81:qt,83:201,85:151,86:we,87:lt,88:Ce,89:Oe,90:Me,91:Fe,92:Pe,94:142,95:oe,105:dt,106:b,109:Te,111:j,112:Nt,113:De,114:Ie,115:148,122:At,123:kt,124:gt,125:_t,126:yt,127:Ct},{18:18,19:19,20:o,21:l,22:h,23:u,32:24,33:25,34:26,35:27,36:28,37:29,38:d,42:[1,291],43:31,44:f,46:p,48:x,50:35,51:45,52:E,54:46,66:T,67:S,86:_,87:D,88:z,89:H,90:it,91:R,95:F,105:v,106:L,109:w,111:m,112:B,116:47,118:g,119:O,120:y,121:Y,122:wt,123:at,124:st,125:nt,126:et,127:tt},{22:Fi,66:Gi,67:xi,86:ur,96:292,102:ji,105:tr,107:243,108:244,109:ki,110:Vr,111:Yr,112:zr,113:Wr},{22:Fi,66:Gi,67:xi,86:ur,96:293,102:ji,105:tr,107:243,108:244,109:ki,110:Vr,111:Yr,112:zr,113:Wr},t(Ne,[2,64]),t(Z,[2,41]),t(re,[2,119],{106:Ps}),t(re,[2,120],{106:Ps})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],132:[2,7]},parseError:function(ne,de){if(de.recoverable)this.trace(ne);else{var Re=new Error(ne);throw Re.hash=de,Re}},parse:function(ne){var de=this,Re=[0],Ft=[],li=[null],M=[],_a=this.table,W="",wr=0,ed=0,eb=2,id=1,ib=M.slice.call(arguments,1),Mi=Object.create(this.lexer),an={yy:{}};for(var Cc in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Cc)&&(an.yy[Cc]=this.yy[Cc]);Mi.setInput(ne,an.yy),an.yy.lexer=Mi,an.yy.parser=this,typeof Mi.yylloc>"u"&&(Mi.yylloc={});var Tc=Mi.yylloc;M.push(Tc);var rb=Mi.options&&Mi.options.ranges;typeof an.yy.parseError=="function"?this.parseError=an.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function sb(){var ks;return ks=Ft.pop()||Mi.lex()||id,typeof ks!="number"&&(ks instanceof Array&&(Ft=ks,ks=Ft.pop()),ks=de.symbols_[ks]||ks),ks}for(var dr,on,Ar,Sc,Bn={},Do,xs,rd,Io;;){if(on=Re[Re.length-1],this.defaultActions[on]?Ar=this.defaultActions[on]:((dr===null||typeof dr>"u")&&(dr=sb()),Ar=_a[on]&&_a[on][dr]),typeof Ar>"u"||!Ar.length||!Ar[0]){var wc="";Io=[];for(Do in _a[on])this.terminals_[Do]&&Do>eb&&Io.push("'"+this.terminals_[Do]+"'");Mi.showPosition?wc="Parse error on line "+(wr+1)+`:
|
|
1324
|
-
`+Mi.showPosition()+`
|
|
1325
|
-
Expecting `+Io.join(", ")+", got '"+(this.terminals_[dr]||dr)+"'":wc="Parse error on line "+(wr+1)+": Unexpected "+(dr==id?"end of input":"'"+(this.terminals_[dr]||dr)+"'"),this.parseError(wc,{text:Mi.match,token:this.terminals_[dr]||dr,line:Mi.yylineno,loc:Tc,expected:Io})}if(Ar[0]instanceof Array&&Ar.length>1)throw new Error("Parse Error: multiple actions possible at state: "+on+", token: "+dr);switch(Ar[0]){case 1:Re.push(dr),li.push(Mi.yytext),M.push(Mi.yylloc),Re.push(Ar[1]),dr=null,ed=Mi.yyleng,W=Mi.yytext,wr=Mi.yylineno,Tc=Mi.yylloc;break;case 2:if(xs=this.productions_[Ar[1]][1],Bn.$=li[li.length-xs],Bn._$={first_line:M[M.length-(xs||1)].first_line,last_line:M[M.length-1].last_line,first_column:M[M.length-(xs||1)].first_column,last_column:M[M.length-1].last_column},rb&&(Bn._$.range=[M[M.length-(xs||1)].range[0],M[M.length-1].range[1]]),Sc=this.performAction.apply(Bn,[W,ed,wr,an.yy,Ar[1],li,M].concat(ib)),typeof Sc<"u")return Sc;xs&&(Re=Re.slice(0,-1*xs*2),li=li.slice(0,-1*xs),M=M.slice(0,-1*xs)),Re.push(this.productions_[Ar[1]][0]),li.push(Bn.$),M.push(Bn._$),rd=_a[Re[Re.length-2]][Re[Re.length-1]],Re.push(rd);break;case 3:return!0}}return!0}},tb=function(){var Vs={EOF:1,parseError:function(de,Re){if(this.yy.parser)this.yy.parser.parseError(de,Re);else throw new Error(de)},setInput:function(ne,de){return this.yy=de||this.yy||{},this._input=ne,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},input:function(){var ne=this._input[0];this.yytext+=ne,this.yyleng++,this.offset++,this.match+=ne,this.matched+=ne;var de=ne.match(/(?:\r\n?|\n).*/g);return de?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ne},unput:function(ne){var de=ne.length,Re=ne.split(/(?:\r\n?|\n)/g);this._input=ne+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-de),this.offset-=de;var Ft=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),Re.length-1&&(this.yylineno-=Re.length-1);var li=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:Re?(Re.length===Ft.length?this.yylloc.first_column:0)+Ft[Ft.length-Re.length].length-Re[0].length:this.yylloc.first_column-de},this.options.ranges&&(this.yylloc.range=[li[0],li[0]+this.yyleng-de]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1326
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(ne){this.unput(this.match.slice(ne))},pastInput:function(){var ne=this.matched.substr(0,this.matched.length-this.match.length);return(ne.length>20?"...":"")+ne.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var ne=this.match;return ne.length<20&&(ne+=this._input.substr(0,20-ne.length)),(ne.substr(0,20)+(ne.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var ne=this.pastInput(),de=new Array(ne.length+1).join("-");return ne+this.upcomingInput()+`
|
|
1327
|
-
`+de+"^"},test_match:function(ne,de){var Re,Ft,li;if(this.options.backtrack_lexer&&(li={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&&(li.yylloc.range=this.yylloc.range.slice(0))),Ft=ne[0].match(/(?:\r\n?|\n).*/g),Ft&&(this.yylineno+=Ft.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Ft?Ft[Ft.length-1].length-Ft[Ft.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+ne[0].length},this.yytext+=ne[0],this.match+=ne[0],this.matches=ne,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(ne[0].length),this.matched+=ne[0],Re=this.performAction.call(this,this.yy,this,de,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Re)return Re;if(this._backtrack){for(var M in li)this[M]=li[M];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ne,de,Re,Ft;this._more||(this.yytext="",this.match="");for(var li=this._currentRules(),M=0;M<li.length;M++)if(Re=this._input.match(this.rules[li[M]]),Re&&(!de||Re[0].length>de[0].length)){if(de=Re,Ft=M,this.options.backtrack_lexer){if(ne=this.test_match(Re,li[M]),ne!==!1)return ne;if(this._backtrack){de=!1;continue}else return!1}else if(!this.options.flex)break}return de?(ne=this.test_match(de,li[Ft]),ne!==!1?ne:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1328
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var de=this.next();return de||this.lex()},begin:function(de){this.conditionStack.push(de)},popState:function(){var de=this.conditionStack.length-1;return de>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(de){return de=this.conditionStack.length-1-Math.abs(de||0),de>=0?this.conditionStack[de]:"INITIAL"},pushState:function(de){this.begin(de)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(de,Re,Ft,li){switch(Ft){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:break;case 6:break;case 7:return this.begin("acc_title"),44;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),46;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 15:this.popState();break;case 16:return"STR";case 17:return 86;case 18:return 95;case 19:return 87;case 20:return 104;case 21:return 88;case 22:return 89;case 23:this.begin("href");break;case 24:this.popState();break;case 25:return 100;case 26:this.begin("callbackname");break;case 27:this.popState();break;case 28:this.popState(),this.begin("callbackargs");break;case 29:return 98;case 30:this.popState();break;case 31:return 99;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 90;case 35:return de.lex.firstGraph()&&this.begin("dir"),24;case 36:return de.lex.firstGraph()&&this.begin("dir"),24;case 37:return de.lex.firstGraph()&&this.begin("dir"),24;case 38:return 38;case 39:return 42;case 40:return 101;case 41:return 101;case 42:return 101;case 43:return 101;case 44:return this.popState(),25;case 45:return this.popState(),26;case 46:return this.popState(),26;case 47:return this.popState(),26;case 48:return this.popState(),26;case 49:return this.popState(),26;case 50:return this.popState(),26;case 51:return this.popState(),26;case 52:return this.popState(),26;case 53:return this.popState(),26;case 54:return this.popState(),26;case 55:return 118;case 56:return 119;case 57:return 120;case 58:return 121;case 59:return 105;case 60:return 111;case 61:return 53;case 62:return 67;case 63:return 52;case 64:return 20;case 65:return 106;case 66:return 126;case 67:return 82;case 68:return 82;case 69:return 82;case 70:return 81;case 71:return 81;case 72:return 81;case 73:return 59;case 74:return 60;case 75:return 61;case 76:return 62;case 77:return 63;case 78:return 64;case 79:return 65;case 80:return 69;case 81:return 70;case 82:return 55;case 83:return 56;case 84:return 109;case 85:return 112;case 86:return 127;case 87:return 124;case 88:return 113;case 89:return 125;case 90:return 125;case 91:return 114;case 92:return 73;case 93:return 92;case 94:return"SEP";case 95:return 91;case 96:return 66;case 97:return 75;case 98:return 74;case 99:return 77;case 100:return 76;case 101:return 122;case 102:return 123;case 103:return 68;case 104:return 57;case 105:return 58;case 106:return 40;case 107:return 41;case 108:return 71;case 109:return 72;case 110:return 133;case 111:return 21;case 112:return 22;case 113:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\])/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[30,31],inclusive:!1},callbackname:{rules:[27,28,29],inclusive:!1},href:{rules:[24,25],inclusive:!1},click:{rules:[33,34],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[44,45,46,47,48,49,50,51,52,53,54],inclusive:!1},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,5,6,7,9,11,14,17,18,19,20,21,22,23,26,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113],inclusive:!0}}};return Vs}();Ec.lexer=tb;function vc(){this.yy={}}return vc.prototype=Ec,Ec.Parser=vc,new vc}();kl.parser=kl;const _l=kl,Py=(t,e)=>{var i,r;return((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="dagre-wrapper"||((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk"?!1:t.match(/^\s*graph/)!==null},Vy=(t,e)=>{var i,r;return((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="dagre-d3"||((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk"?!1:t.match(/^\s*graph/)!==null?!0:t.match(/^\s*flowchart/)!==null},Yy="flowchart-";let xh=0,El=P(),ri={},tn=[],xn={},us=[],io={},vl={},ro=0,Cl=!0,Cr,so,no=[];const ao=t=>Qt.sanitizeText(t,El),kh=function(t,e,i){si.parseDirective(this,t,e,i)},ta=function(t){const e=Object.keys(ri);for(const i of e)if(ri[i].id===t)return ri[i].domId;return t},_h=function(t,e,i,r,s,n,a={}){let o,l=t;l!==void 0&&l.trim().length!==0&&(ri[l]===void 0&&(ri[l]={id:l,domId:Yy+l+"-"+xh,styles:[],classes:[]}),xh++,e!==void 0?(El=P(),o=ao(e.trim()),o[0]==='"'&&o[o.length-1]==='"'&&(o=o.substring(1,o.length-1)),ri[l].text=o):ri[l].text===void 0&&(ri[l].text=t),i!==void 0&&(ri[l].type=i),r!=null&&r.forEach(function(h){ri[l].styles.push(h)}),s!=null&&s.forEach(function(h){ri[l].classes.push(h)}),n!==void 0&&(ri[l].dir=n),ri[l].props===void 0?ri[l].props=a:a!==void 0&&Object.assign(ri[l].props,a))},Eh=function(t,e,i,r){const a={start:t,end:e,type:void 0,text:""};r=i.text,r!==void 0&&(a.text=ao(r.trim()),a.text[0]==='"'&&a.text[a.text.length-1]==='"'&&(a.text=a.text.substring(1,a.text.length-1))),i!==void 0&&(a.type=i.type,a.stroke=i.stroke,a.length=i.length),tn.push(a)},vh=function(t,e,i,r){let s,n;for(s=0;s<t.length;s++)for(n=0;n<e.length;n++)Eh(t[s],e[n],i,r)},Ch=function(t,e){t.forEach(function(i){i==="default"?tn.defaultInterpolate=e:tn[i].interpolate=e})},Th=function(t,e){t.forEach(function(i){i==="default"?tn.defaultStyle=e:(ke.isSubstringInArray("fill",e)===-1&&e.push("fill:none"),tn[i].style=e)})},Sh=function(t,e){xn[t]===void 0&&(xn[t]={id:t,styles:[],textStyles:[]}),e!=null&&e.forEach(function(i){if(i.match("color")){const s=i.replace("fill","bgFill").replace("color","fill");xn[t].textStyles.push(s)}xn[t].styles.push(i)})},wh=function(t){Cr=t,Cr.match(/.*</)&&(Cr="RL"),Cr.match(/.*\^/)&&(Cr="BT"),Cr.match(/.*>/)&&(Cr="LR"),Cr.match(/.*v/)&&(Cr="TB"),Cr==="TD"&&(Cr="TB")},oo=function(t,e){t.split(",").forEach(function(i){let r=i;ri[r]!==void 0&&ri[r].classes.push(e),io[r]!==void 0&&io[r].classes.push(e)})},zy=function(t,e){t.split(",").forEach(function(i){e!==void 0&&(vl[so==="gen-1"?ta(i):i]=ao(e))})},Wy=function(t,e,i){let r=ta(t);if(P().securityLevel!=="loose"||e===void 0)return;let s=[];if(typeof i=="string"){s=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let n=0;n<s.length;n++){let a=s[n].trim();a.charAt(0)==='"'&&a.charAt(a.length-1)==='"'&&(a=a.substr(1,a.length-2)),s[n]=a}}s.length===0&&s.push(t),ri[t]!==void 0&&(ri[t].haveCallback=!0,no.push(function(){const n=document.querySelector(`[id="${r}"]`);n!==null&&n.addEventListener("click",function(){ke.runFunc(e,...s)},!1)}))},Ah=function(t,e,i){t.split(",").forEach(function(r){ri[r]!==void 0&&(ri[r].link=ke.formatUrl(e,El),ri[r].linkTarget=i)}),oo(t,"clickable")},Lh=function(t){return vl[t]},Bh=function(t,e,i){t.split(",").forEach(function(r){Wy(r,e,i)}),oo(t,"clickable")},Dh=function(t){no.forEach(function(e){e(t)})},Ih=function(){return Cr.trim()},Rh=function(){return ri},Nh=function(){return tn},Oh=function(){return xn},Fh=function(t){let e=(0,Q.Ys)(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=(0,Q.Ys)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),(0,Q.Ys)(t).select("svg").selectAll("g.node").on("mouseover",function(){const s=(0,Q.Ys)(this);if(s.attr("title")===null)return;const a=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(s.attr("title")).style("left",window.scrollX+a.left+(a.right-a.left)/2+"px").style("top",window.scrollY+a.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/<br\/>/g,"<br/>")),s.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),(0,Q.Ys)(this).classed("hover",!1)})};no.push(Fh);const Mh=function(t="gen-1"){ri={},xn={},tn=[],no=[Fh],us=[],io={},ro=0,vl=[],Cl=!0,so=t,ar()},Ph=t=>{so=t||"gen-2"},Vh=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},Yh=function(t,e,i){let r=t.trim(),s=i;t===i&&i.match(/\s/)&&(r=void 0);function n(u){const d={boolean:{},number:{},string:{}},f=[];let p;return{nodeList:u.filter(function(E){const T=typeof E;return E.stmt&&E.stmt==="dir"?(p=E.value,!1):E.trim()===""?!1:T in d?d[T].hasOwnProperty(E)?!1:d[T][E]=!0:f.includes(E)?!1:f.push(E)}),dir:p}}let a=[];const{nodeList:o,dir:l}=n(a.concat.apply(a,e));if(a=o,so==="gen-1")for(let u=0;u<a.length;u++)a[u]=ta(a[u]);r=r||"subGraph"+ro,s=s||"",s=ao(s),ro=ro+1;const h={id:r,nodes:a,title:s.trim(),classes:[],dir:l};return k.info("Adding",h.id,h.nodes,h.dir),h.nodes=Xh(h,us).nodes,us.push(h),io[r]=h,r},Uy=function(t){for(const[e,i]of us.entries())if(i.id===t)return e;return-1};let ea=-1;const zh=[],Wh=function(t,e){const i=us[e].nodes;if(ea=ea+1,ea>2e3)return;if(zh[ea]=e,us[e].id===t)return{result:!0,count:0};let r=0,s=1;for(;r<i.length;){const n=Uy(i[r]);if(n>=0){const a=Wh(t,n);if(a.result)return{result:!0,count:s+a.count};s=s+a.count}r=r+1}return{result:!1,count:s}},Uh=function(t){return zh[t]},Zh=function(){ea=-1,us.length>0&&Wh("none",us.length-1)},Hh=function(){return us},Gh=()=>Cl?(Cl=!1,!0):!1,Zy=t=>{let e=t.trim(),i="arrow_open";switch(e[0]){case"<":i="arrow_point",e=e.slice(1);break;case"x":i="arrow_cross",e=e.slice(1);break;case"o":i="arrow_circle",e=e.slice(1);break}let r="normal";return e.includes("=")&&(r="thick"),e.includes(".")&&(r="dotted"),{type:i,stroke:r}},Hy=(t,e)=>{const i=e.length;let r=0;for(let s=0;s<i;++s)e[s]===t&&++r;return r},Gy=t=>{const e=t.trim();let i=e.slice(0,-1),r="arrow_open";switch(e.slice(-1)){case"x":r="arrow_cross",e[0]==="x"&&(r="double_"+r,i=i.slice(1));break;case">":r="arrow_point",e[0]==="<"&&(r="double_"+r,i=i.slice(1));break;case"o":r="arrow_circle",e[0]==="o"&&(r="double_"+r,i=i.slice(1));break}let s="normal",n=i.length-1;i[0]==="="&&(s="thick");let a=Hy(".",i);return a&&(s="dotted",n=a),{type:r,stroke:s,length:n}},jh=(t,e)=>{const i=Gy(t);let r;if(e){if(r=Zy(e),r.stroke!==i.stroke)return{type:"INVALID",stroke:"INVALID"};if(r.type==="arrow_open")r.type=i.type;else{if(r.type!==i.type)return{type:"INVALID",stroke:"INVALID"};r.type="double_"+r.type}return r.type==="double_arrow"&&(r.type="double_arrow_point"),r.length=i.length,r}return i},qh=(t,e)=>{let i=!1;return t.forEach(r=>{r.nodes.indexOf(e)>=0&&(i=!0)}),i},Xh=(t,e)=>{const i=[];return t.nodes.forEach((r,s)=>{qh(e,r)||i.push(t.nodes[s])}),{nodes:i}},Kh={firstGraph:Gh},Xr={parseDirective:kh,defaultConfig:()=>gn.flowchart,setAccTitle:or,getAccTitle:fr,getAccDescription:gr,setAccDescription:pr,addVertex:_h,lookUpDomId:ta,addLink:vh,updateLinkInterpolate:Ch,updateLink:Th,addClass:Sh,setDirection:wh,setClass:oo,setTooltip:zy,getTooltip:Lh,setClickEvent:Bh,setLink:Ah,bindFunctions:Dh,getDirection:Ih,getVertices:Rh,getEdges:Nh,getClasses:Oh,clear:Mh,setGen:Ph,defaultStyle:Vh,addSubGraph:Yh,getDepthFirstPos:Uh,indexNodes:Zh,getSubGraphs:Hh,destructLink:jh,lex:Kh,exists:qh,makeUniq:Xh,setDiagramTitle:Ir,getDiagramTitle:Rr},jy=Object.freeze(Object.defineProperty({__proto__:null,addClass:Sh,addLink:vh,addSingleLink:Eh,addSubGraph:Yh,addVertex:_h,bindFunctions:Dh,clear:Mh,default:Xr,defaultStyle:Vh,destructLink:jh,firstGraph:Gh,getClasses:Oh,getDepthFirstPos:Uh,getDirection:Ih,getEdges:Nh,getSubGraphs:Hh,getTooltip:Lh,getVertices:Rh,indexNodes:Zh,lex:Kh,lookUpDomId:ta,parseDirective:kh,setClass:oo,setClickEvent:Bh,setDirection:wh,setGen:Ph,setLink:Ah,updateLink:Th,updateLinkInterpolate:Ch},Symbol.toStringTag,{value:"Module"}));function Qh(t,e,i){const r=e.width,s=e.height,n=(r+s)*.9,a=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],o=ds(t,n,n,a);return i.intersect=function(l){return(0,ye.A)(i,a,l)},o}function Jh(t,e,i){const s=e.height,n=s/4,a=e.width+2*n,o=[{x:n,y:0},{x:a-n,y:0},{x:a,y:-s/2},{x:a-n,y:-s},{x:n,y:-s},{x:0,y:-s/2}],l=ds(t,a,s,o);return i.intersect=function(h){return(0,ye.A)(i,o,h)},l}function $h(t,e,i){const r=e.width,s=e.height,n=[{x:-s/2,y:0},{x:r,y:0},{x:r,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}],a=ds(t,r,s,n);return i.intersect=function(o){return(0,ye.A)(i,n,o)},a}function t0(t,e,i){const r=e.width,s=e.height,n=[{x:-2*s/6,y:0},{x:r-s/6,y:0},{x:r+2*s/6,y:-s},{x:s/6,y:-s}],a=ds(t,r,s,n);return i.intersect=function(o){return(0,ye.A)(i,n,o)},a}function e0(t,e,i){const r=e.width,s=e.height,n=[{x:2*s/6,y:0},{x:r+s/6,y:0},{x:r-2*s/6,y:-s},{x:-s/6,y:-s}],a=ds(t,r,s,n);return i.intersect=function(o){return(0,ye.A)(i,n,o)},a}function i0(t,e,i){const r=e.width,s=e.height,n=[{x:-2*s/6,y:0},{x:r+2*s/6,y:0},{x:r-s/6,y:-s},{x:s/6,y:-s}],a=ds(t,r,s,n);return i.intersect=function(o){return(0,ye.A)(i,n,o)},a}function r0(t,e,i){const r=e.width,s=e.height,n=[{x:s/6,y:0},{x:r-s/6,y:0},{x:r+2*s/6,y:-s},{x:-2*s/6,y:-s}],a=ds(t,r,s,n);return i.intersect=function(o){return(0,ye.A)(i,n,o)},a}function s0(t,e,i){const r=e.width,s=e.height,n=[{x:0,y:0},{x:r+s/2,y:0},{x:r,y:-s/2},{x:r+s/2,y:-s},{x:0,y:-s}],a=ds(t,r,s,n);return i.intersect=function(o){return(0,ye.A)(i,n,o)},a}function n0(t,e,i){const r=e.height,s=e.width+r/4,n=t.insert("rect",":first-child").attr("rx",r/2).attr("ry",r/2).attr("x",-s/2).attr("y",-r/2).attr("width",s).attr("height",r);return i.intersect=function(a){return(0,Ze.q)(i,a)},n}function a0(t,e,i){const r=e.width,s=e.height,n=[{x:0,y:0},{x:r,y:0},{x:r,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:r+8,y:0},{x:r+8,y:-s},{x:-8,y:-s},{x:-8,y:0}],a=ds(t,r,s,n);return i.intersect=function(o){return(0,ye.A)(i,n,o)},a}function o0(t,e,i){const r=e.width,s=r/2,n=s/(2.5+r/50),a=e.height+n,o="M 0,"+n+" a "+s+","+n+" 0,0,0 "+r+" 0 a "+s+","+n+" 0,0,0 "+-r+" 0 l 0,"+a+" a "+s+","+n+" 0,0,0 "+r+" 0 l 0,"+-a,l=t.attr("label-offset-y",n).insert("path",":first-child").attr("d",o).attr("transform","translate("+-r/2+","+-(a/2+n)+")");return i.intersect=function(h){const u=(0,Ze.q)(i,h),d=u.x-i.x;if(s!=0&&(Math.abs(d)<i.width/2||Math.abs(d)==i.width/2&&Math.abs(u.y-i.y)>i.height/2-n)){let f=n*n*(1-d*d/(s*s));f!=0&&(f=Math.sqrt(f)),f=n-f,h.y-i.y>0&&(f=-f),u.y+=f}return u},l}function qy(t){t.shapes().question=Qh,t.shapes().hexagon=Jh,t.shapes().stadium=n0,t.shapes().subroutine=a0,t.shapes().cylinder=o0,t.shapes().rect_left_inv_arrow=$h,t.shapes().lean_right=t0,t.shapes().lean_left=e0,t.shapes().trapezoid=i0,t.shapes().inv_trapezoid=r0,t.shapes().rect_right_inv_arrow=s0}function Xy(t){t({question:Qh}),t({hexagon:Jh}),t({stadium:n0}),t({subroutine:a0}),t({cylinder:o0}),t({rect_left_inv_arrow:$h}),t({lean_right:t0}),t({lean_left:e0}),t({trapezoid:i0}),t({inv_trapezoid:r0}),t({rect_right_inv_arrow:s0})}function ds(t,e,i,r){return t.insert("polygon",":first-child").attr("points",r.map(function(s){return s.x+","+s.y}).join(" ")).attr("transform","translate("+-e/2+","+i/2+")")}const Ky={addToRender:qy,addToRenderV2:Xy},l0={},Qy=function(t){const e=Object.keys(t);for(const i of e)l0[i]=t[i]},c0=function(t,e,i,r,s,n){const a=r?r.select(`[id="${i}"]`):(0,Q.Ys)(`[id="${i}"]`),o=s||document;Object.keys(t).forEach(function(h){const u=t[h];let d="default";u.classes.length>0&&(d=u.classes.join(" "));const f=as(u.styles);let p=u.text!==void 0?u.text:u.id,x;if(Ge(P().flowchart.htmlLabels)){const S={label:p.replace(/fa[blrs]?:fa-[\w-]+/g,_=>`<i class='${_.replace(":"," ")}'></i>`)};x=(0,ie.a)(a,S).node(),x.parentNode.removeChild(x)}else{const S=o.createElementNS("http://www.w3.org/2000/svg","text");S.setAttribute("style",f.labelStyle.replace("color:","fill:"));const _=p.split(Qt.lineBreakRegex);for(const D of _){const z=o.createElementNS("http://www.w3.org/2000/svg","tspan");z.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),z.setAttribute("dy","1em"),z.setAttribute("x","1"),z.textContent=D,S.appendChild(z)}x=S}let E=0,T="";switch(u.type){case"round":E=5,T="rect";break;case"square":T="rect";break;case"diamond":T="question";break;case"hexagon":T="hexagon";break;case"odd":T="rect_left_inv_arrow";break;case"lean_right":T="lean_right";break;case"lean_left":T="lean_left";break;case"trapezoid":T="trapezoid";break;case"inv_trapezoid":T="inv_trapezoid";break;case"odd_right":T="rect_left_inv_arrow";break;case"circle":T="circle";break;case"ellipse":T="ellipse";break;case"stadium":T="stadium";break;case"subroutine":T="subroutine";break;case"cylinder":T="cylinder";break;case"group":T="rect";break;default:T="rect"}k.warn("Adding node",u.id,u.domId),e.setNode(n.db.lookUpDomId(u.id),{labelType:"svg",labelStyle:f.labelStyle,shape:T,label:x,rx:E,ry:E,class:d,style:f.style,id:n.db.lookUpDomId(u.id)})})},h0=function(t,e,i){let r=0,s,n;if(t.defaultStyle!==void 0){const a=as(t.defaultStyle);s=a.style,n=a.labelStyle}t.forEach(function(a){r++;var o="L-"+a.start+"-"+a.end,l="LS-"+a.start,h="LE-"+a.end;const u={};a.type==="arrow_open"?u.arrowhead="none":u.arrowhead="normal";let d="",f="";if(a.style!==void 0){const p=as(a.style);d=p.style,f=p.labelStyle}else switch(a.stroke){case"normal":d="fill:none",s!==void 0&&(d=s),n!==void 0&&(f=n);break;case"dotted":d="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":d=" stroke-width: 3.5px;fill:none";break}u.style=d,u.labelStyle=f,a.interpolate!==void 0?u.curve=Er(a.interpolate,Q.c_6):t.defaultInterpolate!==void 0?u.curve=Er(t.defaultInterpolate,Q.c_6):u.curve=Er(l0.curve,Q.c_6),a.text===void 0?a.style!==void 0&&(u.arrowheadStyle="fill: #333"):(u.arrowheadStyle="fill: #333",u.labelpos="c",Ge(P().flowchart.htmlLabels)?(u.labelType="html",u.label=`<span id="L-${o}" class="edgeLabel L-${l}' L-${h}" style="${u.labelStyle}">${a.text.replace(/fa[blrs]?:fa-[\w-]+/g,p=>`<i class='${p.replace(":"," ")}'></i>`)}</span>`):(u.labelType="text",u.label=a.text.replace(Qt.lineBreakRegex,`
|
|
1329
|
-
`),a.style===void 0&&(u.style=u.style||"stroke: #333; stroke-width: 1.5px;fill:none"),u.labelStyle=u.labelStyle.replace("color:","fill:"))),u.id=o,u.class=l+" "+h,u.minlen=a.length||1,e.setEdge(i.db.lookUpDomId(a.start),i.db.lookUpDomId(a.end),u,r)})},Jy={setConf:Qy,addVertices:c0,addEdges:h0,getClasses:function(t,e){k.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch(i){return k.error(i),{}}},draw:function(t,e,i,r){k.info("Drawing flowchart"),r.db.clear();const{securityLevel:s,flowchart:n}=P();let a;s==="sandbox"&&(a=(0,Q.Ys)("#i"+e));const o=s==="sandbox"?(0,Q.Ys)(a.nodes()[0].contentDocument.body):(0,Q.Ys)("body"),l=s==="sandbox"?a.nodes()[0].contentDocument:document;try{r.parser.parse(t)}catch{k.debug("Parsing failed")}let h=r.db.getDirection();h===void 0&&(h="TD");const u=n.nodeSpacing||50,d=n.rankSpacing||50,f=new Be.k({multigraph:!0,compound:!0}).setGraph({rankdir:h,nodesep:u,ranksep:d,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});let p;const x=r.db.getSubGraphs();for(let it=x.length-1;it>=0;it--)p=x[it],r.db.addVertex(p.id,p.title,"group",void 0,p.classes);const E=r.db.getVertices();k.warn("Get vertices",E);const T=r.db.getEdges();let S=0;for(S=x.length-1;S>=0;S--){p=x[S],(0,Q.td_)("cluster").append("text");for(let it=0;it<p.nodes.length;it++)k.warn("Setting subgraph",p.nodes[it],r.db.lookUpDomId(p.nodes[it]),r.db.lookUpDomId(p.id)),f.setParent(r.db.lookUpDomId(p.nodes[it]),r.db.lookUpDomId(p.id))}c0(E,f,e,o,l,r),h0(T,f,r);const _=new Mt.sY;Ky.addToRender(_),_.arrows().none=function(R,F,v,L){const m=R.append("marker").attr("id",F).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 0 0 L 0 0 z");(0,Kt.bg)(m,v[L+"Style"])},_.arrows().normal=function(R,F){R.append("marker").attr("id",F).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")};const D=o.select(`[id="${e}"]`),z=o.select("#"+e+" g");for(_(z,f),z.selectAll("g.node").attr("title",function(){return r.db.getTooltip(this.id)}),r.db.indexNodes("subGraph"+S),S=0;S<x.length;S++)if(p=x[S],p.title!=="undefined"){const it=l.querySelectorAll("#"+e+' [id="'+r.db.lookUpDomId(p.id)+'"] rect'),R=l.querySelectorAll("#"+e+' [id="'+r.db.lookUpDomId(p.id)+'"]'),F=it[0].x.baseVal.value,v=it[0].y.baseVal.value,L=it[0].width.baseVal.value,m=(0,Q.Ys)(R[0]).select(".label");m.attr("transform",`translate(${F+L/2}, ${v+14})`),m.attr("id",e+"Text");for(let B=0;B<p.classes.length;B++)R[0].classList.add(p.classes[B])}if(!n.htmlLabels){const it=l.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const R of it){const F=R.getBBox(),v=l.createElementNS("http://www.w3.org/2000/svg","rect");v.setAttribute("rx",0),v.setAttribute("ry",0),v.setAttribute("width",F.width),v.setAttribute("height",F.height),R.insertBefore(v,R.firstChild)}}Pn(f,D,n.diagramPadding,n.useMaxWidth),Object.keys(E).forEach(function(it){const R=E[it];if(R.link){const F=o.select("#"+e+' [id="'+r.db.lookUpDomId(it)+'"]');if(F){const v=l.createElementNS("http://www.w3.org/2000/svg","a");v.setAttributeNS("http://www.w3.org/2000/svg","class",R.classes.join(" ")),v.setAttributeNS("http://www.w3.org/2000/svg","href",R.link),v.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),s==="sandbox"?v.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):R.linkTarget&&v.setAttributeNS("http://www.w3.org/2000/svg","target",R.linkTarget);const L=F.insert(function(){return v},":first-child"),w=F.select(".label-container");w&&L.append(function(){return w.node()});const m=F.select(".label");m&&L.append(function(){return m.node()})}}})}},u0={},$y=function(t){const e=Object.keys(t);for(const i of e)u0[i]=t[i]},d0=function(t,e,i,r,s,n){const a=r.select(`[id="${i}"]`);Object.keys(t).forEach(function(l){const h=t[l];let u="default";h.classes.length>0&&(u=h.classes.join(" "));const d=as(h.styles);let f=h.text!==void 0?h.text:h.id,p;if(Ge(P().flowchart.htmlLabels)){const T={label:f.replace(/fa[blrs]?:fa-[\w-]+/g,S=>`<i class='${S.replace(":"," ")}'></i>`)};p=(0,ie.a)(a,T).node(),p.parentNode.removeChild(p)}else{const T=s.createElementNS("http://www.w3.org/2000/svg","text");T.setAttribute("style",d.labelStyle.replace("color:","fill:"));const S=f.split(Qt.lineBreakRegex);for(const _ of S){const D=s.createElementNS("http://www.w3.org/2000/svg","tspan");D.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),D.setAttribute("dy","1em"),D.setAttribute("x","1"),D.textContent=_,T.appendChild(D)}p=T}let x=0,E="";switch(h.type){case"round":x=5,E="rect";break;case"square":E="rect";break;case"diamond":E="question";break;case"hexagon":E="hexagon";break;case"odd":E="rect_left_inv_arrow";break;case"lean_right":E="lean_right";break;case"lean_left":E="lean_left";break;case"trapezoid":E="trapezoid";break;case"inv_trapezoid":E="inv_trapezoid";break;case"odd_right":E="rect_left_inv_arrow";break;case"circle":E="circle";break;case"ellipse":E="ellipse";break;case"stadium":E="stadium";break;case"subroutine":E="subroutine";break;case"cylinder":E="cylinder";break;case"group":E="rect";break;case"doublecircle":E="doublecircle";break;default:E="rect"}e.setNode(h.id,{labelStyle:d.labelStyle,shape:E,labelText:f,rx:x,ry:x,class:u,style:d.style,id:h.id,link:h.link,linkTarget:h.linkTarget,tooltip:n.db.getTooltip(h.id)||"",domId:n.db.lookUpDomId(h.id),haveCallback:h.haveCallback,width:h.type==="group"?500:void 0,dir:h.dir,type:h.type,props:h.props,padding:P().flowchart.padding}),k.info("setNode",{labelStyle:d.labelStyle,shape:E,labelText:f,rx:x,ry:x,class:u,style:d.style,id:h.id,domId:n.db.lookUpDomId(h.id),width:h.type==="group"?500:void 0,type:h.type,dir:h.dir,props:h.props,padding:P().flowchart.padding})})},f0=function(t,e,i){k.info("abc78 edges = ",t);let r=0,s={},n,a;if(t.defaultStyle!==void 0){const o=as(t.defaultStyle);n=o.style,a=o.labelStyle}t.forEach(function(o){r++;var l="L-"+o.start+"-"+o.end;s[l]===void 0?(s[l]=0,k.info("abc78 new entry",l,s[l])):(s[l]++,k.info("abc78 new entry",l,s[l]));let h=l+"-"+s[l];k.info("abc78 new link id to be used is",l,h,s[l]);var u="LS-"+o.start,d="LE-"+o.end;const f={style:"",labelStyle:""};switch(f.minlen=o.length||1,o.type==="arrow_open"?f.arrowhead="none":f.arrowhead="normal",f.arrowTypeStart="arrow_open",f.arrowTypeEnd="arrow_open",o.type){case"double_arrow_cross":f.arrowTypeStart="arrow_cross";case"arrow_cross":f.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":f.arrowTypeStart="arrow_point";case"arrow_point":f.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":f.arrowTypeStart="arrow_circle";case"arrow_circle":f.arrowTypeEnd="arrow_circle";break}let p="",x="";switch(o.stroke){case"normal":p="fill:none;",n!==void 0&&(p=n),a!==void 0&&(x=a),f.thickness="normal",f.pattern="solid";break;case"dotted":f.thickness="normal",f.pattern="dotted",f.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":f.thickness="thick",f.pattern="solid",f.style="stroke-width: 3.5px;fill:none;";break}if(o.style!==void 0){const E=as(o.style);p=E.style,x=E.labelStyle}f.style=f.style+=p,f.labelStyle=f.labelStyle+=x,o.interpolate!==void 0?f.curve=Er(o.interpolate,Q.c_6):t.defaultInterpolate!==void 0?f.curve=Er(t.defaultInterpolate,Q.c_6):f.curve=Er(u0.curve,Q.c_6),o.text===void 0?o.style!==void 0&&(f.arrowheadStyle="fill: #333"):(f.arrowheadStyle="fill: #333",f.labelpos="c"),f.labelType="text",f.label=o.text.replace(Qt.lineBreakRegex,`
|
|
1330
|
-
`),o.style===void 0&&(f.style=f.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),f.labelStyle=f.labelStyle.replace("color:","fill:"),f.id=h,f.classes="flowchart-link "+u+" "+d,e.setEdge(o.start,o.end,f,r)})},Tl={setConf:$y,addVertices:d0,addEdges:f0,getClasses:function(t,e){k.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch{return}},draw:function(t,e,i,r){k.info("Drawing flowchart"),r.db.clear(),Xr.setGen("gen-2"),r.parser.parse(t);let s=r.db.getDirection();s===void 0&&(s="TD");const{securityLevel:n,flowchart:a}=P(),o=a.nodeSpacing||50,l=a.rankSpacing||50;let h;n==="sandbox"&&(h=(0,Q.Ys)("#i"+e));const u=n==="sandbox"?(0,Q.Ys)(h.nodes()[0].contentDocument.body):(0,Q.Ys)("body"),d=n==="sandbox"?h.nodes()[0].contentDocument:document,f=new Be.k({multigraph:!0,compound:!0}).setGraph({rankdir:s,nodesep:o,ranksep:l,marginx:0,marginy:0}).setDefaultEdgeLabel(function(){return{}});let p;const x=r.db.getSubGraphs();k.info("Subgraphs - ",x);for(let H=x.length-1;H>=0;H--)p=x[H],k.info("Subgraph - ",p),r.db.addVertex(p.id,p.title,"group",void 0,p.classes,p.dir);const E=r.db.getVertices(),T=r.db.getEdges();k.info("Edges",T);let S=0;for(S=x.length-1;S>=0;S--){p=x[S],(0,Q.td_)("cluster").append("text");for(let H=0;H<p.nodes.length;H++)k.info("Setting up subgraphs",p.nodes[H],p.id),f.setParent(p.nodes[H],p.id)}d0(E,f,e,u,d,r),f0(T,f);const _=u.select(`[id="${e}"]`),D=u.select("#"+e+" g");if(ml(D,f,["point","circle","cross"],"flowchart",e),ke.insertTitle(_,"flowchartTitleText",a.titleTopMargin,r.db.getDiagramTitle()),Pn(f,_,a.diagramPadding,a.useMaxWidth),r.db.indexNodes("subGraph"+S),!a.htmlLabels){const H=d.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const it of H){const R=it.getBBox(),F=d.createElementNS("http://www.w3.org/2000/svg","rect");F.setAttribute("rx",0),F.setAttribute("ry",0),F.setAttribute("width",R.width),F.setAttribute("height",R.height),it.insertBefore(F,it.firstChild)}}Object.keys(E).forEach(function(H){const it=E[H];if(it.link){const R=(0,Q.Ys)("#"+e+' [id="'+H+'"]');if(R){const F=d.createElementNS("http://www.w3.org/2000/svg","a");F.setAttributeNS("http://www.w3.org/2000/svg","class",it.classes.join(" ")),F.setAttributeNS("http://www.w3.org/2000/svg","href",it.link),F.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),n==="sandbox"?F.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):it.linkTarget&&F.setAttributeNS("http://www.w3.org/2000/svg","target",it.linkTarget);const v=R.insert(function(){return F},":first-child"),L=R.select(".label-container");L&&v.append(function(){return L.node()});const w=R.select(".label");w&&v.append(function(){return w.node()})}}})}};var Sl=function(){var t=function(F,v,L,w){for(L=L||{},w=F.length;w--;L[F[w]]=v);return L},e=[1,3],i=[1,5],r=[7,9,11,12,13,14,15,16,17,18,19,20,21,23,25,26,28,35,40],s=[1,15],n=[1,16],a=[1,17],o=[1,18],l=[1,19],h=[1,20],u=[1,21],d=[1,22],f=[1,23],p=[1,24],x=[1,25],E=[1,26],T=[1,27],S=[1,29],_=[1,31],D=[1,34],z=[5,7,9,11,12,13,14,15,16,17,18,19,20,21,23,25,26,28,35,40],H={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,gantt:5,document:6,EOF:7,line:8,SPACE:9,statement:10,NL:11,dateFormat:12,inclusiveEndDates:13,topAxis:14,axisFormat:15,tickInterval:16,excludes:17,includes:18,todayMarker:19,title:20,acc_title:21,acc_title_value:22,acc_descr:23,acc_descr_value:24,acc_descr_multiline_value:25,section:26,clickStatement:27,taskTxt:28,taskData:29,openDirective:30,typeDirective:31,closeDirective:32,":":33,argDirective:34,click:35,callbackname:36,callbackargs:37,href:38,clickStatementDebug:39,open_directive:40,type_directive:41,arg_directive:42,close_directive:43,$accept:0,$end:1},terminals_:{2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",12:"dateFormat",13:"inclusiveEndDates",14:"topAxis",15:"axisFormat",16:"tickInterval",17:"excludes",18:"includes",19:"todayMarker",20:"title",21:"acc_title",22:"acc_title_value",23:"acc_descr",24:"acc_descr_value",25:"acc_descr_multiline_value",26:"section",28:"taskTxt",29:"taskData",33:":",35:"click",36:"callbackname",37:"callbackargs",38:"href",40:"open_directive",41:"type_directive",42:"arg_directive",43:"close_directive"},productions_:[0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[27,2],[27,3],[27,3],[27,4],[27,3],[27,4],[27,2],[39,2],[39,3],[39,3],[39,4],[39,3],[39,4],[39,2],[30,1],[31,1],[34,1],[32,1]],performAction:function(v,L,w,m,B,g,O){var y=g.length-1;switch(B){case 2:return g[y-1];case 3:this.$=[];break;case 4:g[y-1].push(g[y]),this.$=g[y-1];break;case 5:case 6:this.$=g[y];break;case 7:case 8:this.$=[];break;case 9:m.setDateFormat(g[y].substr(11)),this.$=g[y].substr(11);break;case 10:m.enableInclusiveEndDates(),this.$=g[y].substr(18);break;case 11:m.TopAxis(),this.$=g[y].substr(8);break;case 12:m.setAxisFormat(g[y].substr(11)),this.$=g[y].substr(11);break;case 13:m.setTickInterval(g[y].substr(13)),this.$=g[y].substr(13);break;case 14:m.setExcludes(g[y].substr(9)),this.$=g[y].substr(9);break;case 15:m.setIncludes(g[y].substr(9)),this.$=g[y].substr(9);break;case 16:m.setTodayMarker(g[y].substr(12)),this.$=g[y].substr(12);break;case 17:m.setDiagramTitle(g[y].substr(6)),this.$=g[y].substr(6);break;case 18:this.$=g[y].trim(),m.setAccTitle(this.$);break;case 19:case 20:this.$=g[y].trim(),m.setAccDescription(this.$);break;case 21:m.addSection(g[y].substr(8)),this.$=g[y].substr(8);break;case 23:m.addTask(g[y-1],g[y]),this.$="task";break;case 27:this.$=g[y-1],m.setClickEvent(g[y-1],g[y],null);break;case 28:this.$=g[y-2],m.setClickEvent(g[y-2],g[y-1],g[y]);break;case 29:this.$=g[y-2],m.setClickEvent(g[y-2],g[y-1],null),m.setLink(g[y-2],g[y]);break;case 30:this.$=g[y-3],m.setClickEvent(g[y-3],g[y-2],g[y-1]),m.setLink(g[y-3],g[y]);break;case 31:this.$=g[y-2],m.setClickEvent(g[y-2],g[y],null),m.setLink(g[y-2],g[y-1]);break;case 32:this.$=g[y-3],m.setClickEvent(g[y-3],g[y-1],g[y]),m.setLink(g[y-3],g[y-2]);break;case 33:this.$=g[y-1],m.setLink(g[y-1],g[y]);break;case 34:case 40:this.$=g[y-1]+" "+g[y];break;case 35:case 36:case 38:this.$=g[y-2]+" "+g[y-1]+" "+g[y];break;case 37:case 39:this.$=g[y-3]+" "+g[y-2]+" "+g[y-1]+" "+g[y];break;case 41:m.parseDirective("%%{","open_directive");break;case 42:m.parseDirective(g[y],"type_directive");break;case 43:g[y]=g[y].trim().replace(/'/g,'"'),m.parseDirective(g[y],"arg_directive");break;case 44:m.parseDirective("}%%","close_directive","gantt");break}},table:[{3:1,4:2,5:e,30:4,40:i},{1:[3]},{3:6,4:2,5:e,30:4,40:i},t(r,[2,3],{6:7}),{31:8,41:[1,9]},{41:[2,41]},{1:[2,1]},{4:30,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:s,13:n,14:a,15:o,16:l,17:h,18:u,19:d,20:f,21:p,23:x,25:E,26:T,27:28,28:S,30:4,35:_,40:i},{32:32,33:[1,33],43:D},t([33,43],[2,42]),t(r,[2,8],{1:[2,2]}),t(r,[2,4]),{4:30,10:35,12:s,13:n,14:a,15:o,16:l,17:h,18:u,19:d,20:f,21:p,23:x,25:E,26:T,27:28,28:S,30:4,35:_,40:i},t(r,[2,6]),t(r,[2,7]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),t(r,[2,17]),{22:[1,36]},{24:[1,37]},t(r,[2,20]),t(r,[2,21]),t(r,[2,22]),{29:[1,38]},t(r,[2,24]),{36:[1,39],38:[1,40]},{11:[1,41]},{34:42,42:[1,43]},{11:[2,44]},t(r,[2,5]),t(r,[2,18]),t(r,[2,19]),t(r,[2,23]),t(r,[2,27],{37:[1,44],38:[1,45]}),t(r,[2,33],{36:[1,46]}),t(z,[2,25]),{32:47,43:D},{43:[2,43]},t(r,[2,28],{38:[1,48]}),t(r,[2,29]),t(r,[2,31],{37:[1,49]}),{11:[1,50]},t(r,[2,30]),t(r,[2,32]),t(z,[2,26])],defaultActions:{5:[2,41],6:[2,1],34:[2,44],43:[2,43]},parseError:function(v,L){if(L.recoverable)this.trace(v);else{var w=new Error(v);throw w.hash=L,w}},parse:function(v){var L=this,w=[0],m=[],B=[null],g=[],O=this.table,y="",Y=0,wt=0,at=2,st=1,nt=g.slice.call(arguments,1),et=Object.create(this.lexer),tt={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(tt.yy[Tt]=this.yy[Tt]);et.setInput(v,tt.yy),tt.yy.lexer=et,tt.yy.parser=this,typeof et.yylloc>"u"&&(et.yylloc={});var bt=et.yylloc;g.push(bt);var Z=et.options&&et.options.ranges;typeof tt.yy.parseError=="function"?this.parseError=tt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function jt(){var Jt;return Jt=m.pop()||et.lex()||st,typeof Jt!="number"&&(Jt instanceof Array&&(m=Jt,Jt=m.pop()),Jt=L.symbols_[Jt]||Jt),Jt}for(var U,pt,$,K,N={},A,G,C,dt;;){if(pt=w[w.length-1],this.defaultActions[pt]?$=this.defaultActions[pt]:((U===null||typeof U>"u")&&(U=jt()),$=O[pt]&&O[pt][U]),typeof $>"u"||!$.length||!$[0]){var b="";dt=[];for(A in O[pt])this.terminals_[A]&&A>at&&dt.push("'"+this.terminals_[A]+"'");et.showPosition?b="Parse error on line "+(Y+1)+`:
|
|
1331
|
-
`+et.showPosition()+`
|
|
1332
|
-
Expecting `+dt.join(", ")+", got '"+(this.terminals_[U]||U)+"'":b="Parse error on line "+(Y+1)+": Unexpected "+(U==st?"end of input":"'"+(this.terminals_[U]||U)+"'"),this.parseError(b,{text:et.match,token:this.terminals_[U]||U,line:et.yylineno,loc:bt,expected:dt})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+pt+", token: "+U);switch($[0]){case 1:w.push(U),B.push(et.yytext),g.push(et.yylloc),w.push($[1]),U=null,wt=et.yyleng,y=et.yytext,Y=et.yylineno,bt=et.yylloc;break;case 2:if(G=this.productions_[$[1]][1],N.$=B[B.length-G],N._$={first_line:g[g.length-(G||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(G||1)].first_column,last_column:g[g.length-1].last_column},Z&&(N._$.range=[g[g.length-(G||1)].range[0],g[g.length-1].range[1]]),K=this.performAction.apply(N,[y,wt,Y,tt.yy,$[1],B,g].concat(nt)),typeof K<"u")return K;G&&(w=w.slice(0,-1*G*2),B=B.slice(0,-1*G),g=g.slice(0,-1*G)),w.push(this.productions_[$[1]][0]),B.push(N.$),g.push(N._$),C=O[w[w.length-2]][w[w.length-1]],w.push(C);break;case 3:return!0}}return!0}},it=function(){var F={EOF:1,parseError:function(L,w){if(this.yy.parser)this.yy.parser.parseError(L,w);else throw new Error(L)},setInput:function(v,L){return this.yy=L||this.yy||{},this._input=v,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},input:function(){var v=this._input[0];this.yytext+=v,this.yyleng++,this.offset++,this.match+=v,this.matched+=v;var L=v.match(/(?:\r\n?|\n).*/g);return L?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),v},unput:function(v){var L=v.length,w=v.split(/(?:\r\n?|\n)/g);this._input=v+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-L),this.offset-=L;var m=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),w.length-1&&(this.yylineno-=w.length-1);var B=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:w?(w.length===m.length?this.yylloc.first_column:0)+m[m.length-w.length].length-w[0].length:this.yylloc.first_column-L},this.options.ranges&&(this.yylloc.range=[B[0],B[0]+this.yyleng-L]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1333
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(v){this.unput(this.match.slice(v))},pastInput:function(){var v=this.matched.substr(0,this.matched.length-this.match.length);return(v.length>20?"...":"")+v.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var v=this.match;return v.length<20&&(v+=this._input.substr(0,20-v.length)),(v.substr(0,20)+(v.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var v=this.pastInput(),L=new Array(v.length+1).join("-");return v+this.upcomingInput()+`
|
|
1334
|
-
`+L+"^"},test_match:function(v,L){var w,m,B;if(this.options.backtrack_lexer&&(B={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&&(B.yylloc.range=this.yylloc.range.slice(0))),m=v[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+v[0].length},this.yytext+=v[0],this.match+=v[0],this.matches=v,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(v[0].length),this.matched+=v[0],w=this.performAction.call(this,this.yy,this,L,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),w)return w;if(this._backtrack){for(var g in B)this[g]=B[g];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var v,L,w,m;this._more||(this.yytext="",this.match="");for(var B=this._currentRules(),g=0;g<B.length;g++)if(w=this._input.match(this.rules[B[g]]),w&&(!L||w[0].length>L[0].length)){if(L=w,m=g,this.options.backtrack_lexer){if(v=this.test_match(w,B[g]),v!==!1)return v;if(this._backtrack){L=!1;continue}else return!1}else if(!this.options.flex)break}return L?(v=this.test_match(L,B[m]),v!==!1?v:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1335
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var L=this.next();return L||this.lex()},begin:function(L){this.conditionStack.push(L)},popState:function(){var L=this.conditionStack.length-1;return L>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(L){return L=this.conditionStack.length-1-Math.abs(L||0),L>=0?this.conditionStack[L]:"INITIAL"},pushState:function(L){this.begin(L)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(L,w,m,B){switch(m){case 0:return this.begin("open_directive"),40;case 1:return this.begin("type_directive"),41;case 2:return this.popState(),this.begin("arg_directive"),33;case 3:return this.popState(),this.popState(),43;case 4:return 42;case 5:return this.begin("acc_title"),21;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),23;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:break;case 13:break;case 14:break;case 15:return 11;case 16:break;case 17:break;case 18:break;case 19:this.begin("href");break;case 20:this.popState();break;case 21:return 38;case 22:this.begin("callbackname");break;case 23:this.popState();break;case 24:this.popState(),this.begin("callbackargs");break;case 25:return 36;case 26:this.popState();break;case 27:return 37;case 28:this.begin("click");break;case 29:this.popState();break;case 30:return 35;case 31:return 5;case 32:return 12;case 33:return 13;case 34:return 14;case 35:return 15;case 36:return 16;case 37:return 18;case 38:return 17;case 39:return 19;case 40:return"date";case 41:return 20;case 42:return"accDescription";case 43:return 26;case 44:return 28;case 45:return 29;case 46:return 33;case 47:return 7;case 48:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[26,27],inclusive:!1},callbackname:{rules:[23,24,25],inclusive:!1},href:{rules:[20,21],inclusive:!1},click:{rules:[29,30],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,22,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],inclusive:!0}}};return F}();H.lexer=it;function R(){this.yy={}}return R.prototype=H,H.Parser=R,new R}();Sl.parser=Sl;const t3=Sl,e3=t=>t.match(/^\s*gantt/)!==null;_i().extend(Ci()),_i().extend(Rt()),_i().extend(he());let Kr="",wl="",Al,Ll="",ia=[],ra=[],Bl={},Dl=[],lo=[],kn="";const p0=["active","done","crit","milestone"];let Il=[],sa=!1,Rl=!1,Nl=0;const i3=function(t,e,i){si.parseDirective(this,t,e,i)},r3=function(){Dl=[],lo=[],kn="",Il=[],co=0,Fl=void 0,ho=void 0,Di=[],Kr="",wl="",Al=void 0,Ll="",ia=[],ra=[],sa=!1,Rl=!1,Nl=0,Bl={},ar()},s3=function(t){wl=t},n3=function(){return wl},a3=function(t){Al=t},o3=function(){return Al},l3=function(t){Ll=t},c3=function(){return Ll},h3=function(t){Kr=t},u3=function(){sa=!0},d3=function(){return sa},f3=function(){Rl=!0},p3=function(){return Rl},g3=function(){return Kr},y3=function(t){ia=t.toLowerCase().split(/[\s,]+/)},m3=function(){return ia},b3=function(t){ra=t.toLowerCase().split(/[\s,]+/)},x3=function(){return ra},k3=function(){return Bl},_3=function(t){kn=t,Dl.push(t)},E3=function(){return Dl},v3=function(){let t=k0();const e=10;let i=0;for(;!t&&i<e;)t=k0(),i++;return lo=Di,lo},g0=function(t,e,i,r){return r.includes(t.format(e.trim()))?!1:t.isoWeekday()>=6&&i.includes("weekends")||i.includes(t.format("dddd").toLowerCase())?!0:i.includes(t.format(e.trim()))},y0=function(t,e,i,r){if(!i.length||t.manualEndTime)return;let s;t.startTime instanceof Date?s=_i()(t.startTime):s=_i()(t.startTime,e,!0),s=s.add(1,"d");let n;t.endTime instanceof Date?n=_i()(t.endTime):n=_i()(t.endTime,e,!0);const[a,o]=C3(s,n,e,i,r);t.endTime=a.toDate(),t.renderEndTime=o},C3=function(t,e,i,r,s){let n=!1,a=null;for(;t<=e;)n||(a=e.toDate()),n=g0(t,i,r,s),n&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,a]},Ol=function(t,e,i){i=i.trim();const s=/^after\s+([\d\w- ]+)/.exec(i.trim());if(s!==null){let a=null;if(s[1].split(" ").forEach(function(o){let l=En(o);l!==void 0&&(a?l.endTime>a.endTime&&(a=l):a=l)}),a)return a.endTime;{const o=new Date;return o.setHours(0,0,0,0),o}}let n=_i()(i,e.trim(),!0);if(n.isValid())return n.toDate();{k.debug("Invalid date:"+i),k.debug("With date format:"+e.trim());const a=new Date(i);if(a===void 0||isNaN(a.getTime()))throw new Error("Invalid date:"+i);return a}},m0=function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},b0=function(t,e,i,r=!1){i=i.trim();let s=_i()(i,e.trim(),!0);if(s.isValid())return r&&(s=s.add(1,"d")),s.toDate();let n=_i()(t);const[a,o]=m0(i);if(!Number.isNaN(a)){const l=n.add(a,o);l.isValid()&&(n=l)}return n.toDate()};let co=0;const _n=function(t){return t===void 0?(co=co+1,"task"+co):t},T3=function(t,e){let i;e.substr(0,1)===":"?i=e.substr(1,e.length):i=e;const r=i.split(","),s={};v0(r,s,p0);for(let a=0;a<r.length;a++)r[a]=r[a].trim();let n="";switch(r.length){case 1:s.id=_n(),s.startTime=t.endTime,n=r[0];break;case 2:s.id=_n(),s.startTime=Ol(void 0,Kr,r[0]),n=r[1];break;case 3:s.id=_n(r[0]),s.startTime=Ol(void 0,Kr,r[1]),n=r[2];break}return n&&(s.endTime=b0(s.startTime,Kr,n,sa),s.manualEndTime=_i()(n,"YYYY-MM-DD",!0).isValid(),y0(s,Kr,ra,ia)),s},S3=function(t,e){let i;e.substr(0,1)===":"?i=e.substr(1,e.length):i=e;const r=i.split(","),s={};v0(r,s,p0);for(let n=0;n<r.length;n++)r[n]=r[n].trim();switch(r.length){case 1:s.id=_n(),s.startTime={type:"prevTaskEnd",id:t},s.endTime={data:r[0]};break;case 2:s.id=_n(),s.startTime={type:"getStartDate",startData:r[0]},s.endTime={data:r[1]};break;case 3:s.id=_n(r[0]),s.startTime={type:"getStartDate",startData:r[1]},s.endTime={data:r[2]};break}return s};let Fl,ho,Di=[];const x0={},w3=function(t,e){const i={section:kn,type:kn,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},r=S3(ho,e);i.raw.startTime=r.startTime,i.raw.endTime=r.endTime,i.id=r.id,i.prevTaskId=ho,i.active=r.active,i.done=r.done,i.crit=r.crit,i.milestone=r.milestone,i.order=Nl,Nl++;const s=Di.push(i);ho=i.id,x0[i.id]=s-1},En=function(t){const e=x0[t];return Di[e]},A3=function(t,e){const i={section:kn,type:kn,description:t,task:t,classes:[]},r=T3(Fl,e);i.startTime=r.startTime,i.endTime=r.endTime,i.id=r.id,i.active=r.active,i.done=r.done,i.crit=r.crit,i.milestone=r.milestone,Fl=i,lo.push(i)},k0=function(){const t=function(i){const r=Di[i];let s="";switch(Di[i].raw.startTime.type){case"prevTaskEnd":{const n=En(r.prevTaskId);r.startTime=n.endTime;break}case"getStartDate":s=Ol(void 0,Kr,Di[i].raw.startTime.startData),s&&(Di[i].startTime=s);break}return Di[i].startTime&&(Di[i].endTime=b0(Di[i].startTime,Kr,Di[i].raw.endTime.data,sa),Di[i].endTime&&(Di[i].processed=!0,Di[i].manualEndTime=_i()(Di[i].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),y0(Di[i],Kr,ra,ia))),Di[i].processed};let e=!0;for(const[i,r]of Di.entries())t(i),e=e&&r.processed;return e},L3=function(t,e){let i=e;P().securityLevel!=="loose"&&(i=(0,qi.Nm)(e)),t.split(",").forEach(function(r){En(r)!==void 0&&(E0(r,()=>{window.open(i,"_self")}),Bl[r]=i)}),_0(t,"clickable")},_0=function(t,e){t.split(",").forEach(function(i){let r=En(i);r!==void 0&&r.classes.push(e)})},B3=function(t,e,i){if(P().securityLevel!=="loose"||e===void 0)return;let r=[];if(typeof i=="string"){r=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let n=0;n<r.length;n++){let a=r[n].trim();a.charAt(0)==='"'&&a.charAt(a.length-1)==='"'&&(a=a.substr(1,a.length-2)),r[n]=a}}r.length===0&&r.push(t),En(t)!==void 0&&E0(t,()=>{ke.runFunc(e,...r)})},E0=function(t,e){Il.push(function(){const i=document.querySelector(`[id="${t}"]`);i!==null&&i.addEventListener("click",function(){e()})},function(){const i=document.querySelector(`[id="${t}-text"]`);i!==null&&i.addEventListener("click",function(){e()})})},Ml={parseDirective:i3,getConfig:()=>P().gantt,clear:r3,setDateFormat:h3,getDateFormat:g3,enableInclusiveEndDates:u3,endDatesAreInclusive:d3,enableTopAxis:f3,topAxisEnabled:p3,setAxisFormat:s3,getAxisFormat:n3,setTickInterval:a3,getTickInterval:o3,setTodayMarker:l3,getTodayMarker:c3,setAccTitle:or,getAccTitle:fr,setDiagramTitle:Ir,getDiagramTitle:Rr,setAccDescription:pr,getAccDescription:gr,addSection:_3,getSections:E3,getTasks:v3,addTask:w3,findTaskById:En,addTaskOrg:A3,setIncludes:y3,getIncludes:m3,setExcludes:b3,getExcludes:x3,setClickEvent:function(t,e,i){t.split(",").forEach(function(r){B3(r,e,i)}),_0(t,"clickable")},setLink:L3,getLinks:k3,bindFunctions:function(t){Il.forEach(function(e){e(t)})},parseDuration:m0,isInvalidDate:g0};function v0(t,e,i){let r=!0;for(;r;)r=!1,i.forEach(function(s){const n="^\\s*"+s+"\\s*$",a=new RegExp(n);t[0].match(a)&&(e[s]=!0,t.shift(1),r=!0)})}const D3=function(){k.debug("Something is calling, setConf, remove the call")};let fs;const I3={setConf:D3,draw:function(t,e,i,r){const s=P().gantt,n=P().securityLevel;let a;n==="sandbox"&&(a=(0,Q.Ys)("#i"+e));const o=n==="sandbox"?(0,Q.Ys)(a.nodes()[0].contentDocument.body):(0,Q.Ys)("body"),l=n==="sandbox"?a.nodes()[0].contentDocument:document,h=l.getElementById(e);fs=h.parentElement.offsetWidth,fs===void 0&&(fs=1200),s.useWidth!==void 0&&(fs=s.useWidth);const u=r.db.getTasks(),d=u.length*(s.barHeight+s.barGap)+2*s.topPadding;h.setAttribute("viewBox","0 0 "+fs+" "+d);const f=o.select(`[id="${e}"]`),p=(0,Q.Xf)().domain([(0,Q.VV$)(u,function(L){return L.startTime}),(0,Q.Fp7)(u,function(L){return L.endTime})]).rangeRound([0,fs-s.leftPadding-s.rightPadding]);let x=[];for(const L of u)x.push(L.type);const E=x;x=R(x);function T(L,w){const m=L.startTime,B=w.startTime;let g=0;return m>B?g=1:m<B&&(g=-1),g}u.sort(T),S(u,fs,d),Dr(f,d,fs,s.useMaxWidth),f.append("text").text(r.db.getDiagramTitle()).attr("x",fs/2).attr("y",s.titleTopMargin).attr("class","titleText");function S(L,w,m){const B=s.barHeight,g=B+s.barGap,O=s.topPadding,y=s.leftPadding,Y=(0,Q.BYU)().domain([0,x.length]).range(["#00B9FA","#F95002"]).interpolate(Q.JHv);D(g,O,y,w,m,L,r.db.getExcludes(),r.db.getIncludes()),z(y,O,w,m),_(L,g,O,y,B,Y,w),H(g,O),it(y,O,w,m)}function _(L,w,m,B,g,O,y){f.append("g").selectAll("rect").data(L).enter().append("rect").attr("x",0).attr("y",function(st,nt){return nt=st.order,nt*w+m-2}).attr("width",function(){return y-s.rightPadding/2}).attr("height",w).attr("class",function(st){for(const[nt,et]of x.entries())if(st.type===et)return"section section"+nt%s.numberSectionStyles;return"section section0"});const Y=f.append("g").selectAll("rect").data(L).enter(),wt=r.db.getLinks();if(Y.append("rect").attr("id",function(st){return st.id}).attr("rx",3).attr("ry",3).attr("x",function(st){return st.milestone?p(st.startTime)+B+.5*(p(st.endTime)-p(st.startTime))-.5*g:p(st.startTime)+B}).attr("y",function(st,nt){return nt=st.order,nt*w+m}).attr("width",function(st){return st.milestone?g:p(st.renderEndTime||st.endTime)-p(st.startTime)}).attr("height",g).attr("transform-origin",function(st,nt){return nt=st.order,(p(st.startTime)+B+.5*(p(st.endTime)-p(st.startTime))).toString()+"px "+(nt*w+m+.5*g).toString()+"px"}).attr("class",function(st){const nt="task";let et="";st.classes.length>0&&(et=st.classes.join(" "));let tt=0;for(const[bt,Z]of x.entries())st.type===Z&&(tt=bt%s.numberSectionStyles);let Tt="";return st.active?st.crit?Tt+=" activeCrit":Tt=" active":st.done?st.crit?Tt=" doneCrit":Tt=" done":st.crit&&(Tt+=" crit"),Tt.length===0&&(Tt=" task"),st.milestone&&(Tt=" milestone "+Tt),Tt+=tt,Tt+=" "+et,nt+Tt}),Y.append("text").attr("id",function(st){return st.id+"-text"}).text(function(st){return st.task}).attr("font-size",s.fontSize).attr("x",function(st){let nt=p(st.startTime),et=p(st.renderEndTime||st.endTime);st.milestone&&(nt+=.5*(p(st.endTime)-p(st.startTime))-.5*g),st.milestone&&(et=nt+g);const tt=this.getBBox().width;return tt>et-nt?et+tt+1.5*s.leftPadding>y?nt+B-5:et+B+5:(et-nt)/2+nt+B}).attr("y",function(st,nt){return nt=st.order,nt*w+s.barHeight/2+(s.fontSize/2-2)+m}).attr("text-height",g).attr("class",function(st){const nt=p(st.startTime);let et=p(st.endTime);st.milestone&&(et=nt+g);const tt=this.getBBox().width;let Tt="";st.classes.length>0&&(Tt=st.classes.join(" "));let bt=0;for(const[jt,U]of x.entries())st.type===U&&(bt=jt%s.numberSectionStyles);let Z="";return st.active&&(st.crit?Z="activeCritText"+bt:Z="activeText"+bt),st.done?st.crit?Z=Z+" doneCritText"+bt:Z=Z+" doneText"+bt:st.crit&&(Z=Z+" critText"+bt),st.milestone&&(Z+=" milestoneText"),tt>et-nt?et+tt+1.5*s.leftPadding>y?Tt+" taskTextOutsideLeft taskTextOutside"+bt+" "+Z:Tt+" taskTextOutsideRight taskTextOutside"+bt+" "+Z+" width-"+tt:Tt+" taskText taskText"+bt+" "+Z+" width-"+tt}),P().securityLevel==="sandbox"){let st;st=(0,Q.Ys)("#i"+e);const nt=st.nodes()[0].contentDocument;Y.filter(function(et){return wt[et.id]!==void 0}).each(function(et){var tt=nt.querySelector("#"+et.id),Tt=nt.querySelector("#"+et.id+"-text");const bt=tt.parentNode;var Z=nt.createElement("a");Z.setAttribute("xlink:href",wt[et.id]),Z.setAttribute("target","_top"),bt.appendChild(Z),Z.appendChild(tt),Z.appendChild(Tt)})}}function D(L,w,m,B,g,O,y,Y){const wt=O.reduce((bt,{startTime:Z})=>bt?Math.min(bt,Z):Z,0),at=O.reduce((bt,{endTime:Z})=>bt?Math.max(bt,Z):Z,0),st=r.db.getDateFormat();if(!wt||!at)return;const nt=[];let et=null,tt=_i()(wt);for(;tt.valueOf()<=at;)r.db.isInvalidDate(tt,st,y,Y)?et?et.end=tt:et={start:tt,end:tt}:et&&(nt.push(et),et=null),tt=tt.add(1,"d");f.append("g").selectAll("rect").data(nt).enter().append("rect").attr("id",function(bt){return"exclude-"+bt.start.format("YYYY-MM-DD")}).attr("x",function(bt){return p(bt.start)+m}).attr("y",s.gridLineStartPadding).attr("width",function(bt){const Z=bt.end.add(1,"day");return p(Z)-p(bt.start)}).attr("height",g-w-s.gridLineStartPadding).attr("transform-origin",function(bt,Z){return(p(bt.start)+m+.5*(p(bt.end)-p(bt.start))).toString()+"px "+(Z*L+.5*g).toString()+"px"}).attr("class","exclude-range")}function z(L,w,m,B){let g=(0,Q.LLu)(p).tickSize(-B+w+s.gridLineStartPadding).tickFormat((0,Q.i$Z)(r.db.getAxisFormat()||s.axisFormat||"%Y-%m-%d"));const y=/^([1-9]\d*)(minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||s.tickInterval);if(y!==null){const Y=y[1];switch(y[2]){case"minute":g.ticks(Q.Z_i.every(Y));break;case"hour":g.ticks(Q.WQD.every(Y));break;case"day":g.ticks(Q.rr1.every(Y));break;case"week":g.ticks(Q.NGh.every(Y));break;case"month":g.ticks(Q.F0B.every(Y));break}}if(f.append("g").attr("class","grid").attr("transform","translate("+L+", "+(B-50)+")").call(g).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),r.db.topAxisEnabled()||s.topAxis){let Y=(0,Q.F5q)(p).tickSize(-B+w+s.gridLineStartPadding).tickFormat((0,Q.i$Z)(r.db.getAxisFormat()||s.axisFormat||"%Y-%m-%d"));if(y!==null){const wt=y[1];switch(y[2]){case"minute":Y.ticks(Q.Z_i.every(wt));break;case"hour":Y.ticks(Q.WQD.every(wt));break;case"day":Y.ticks(Q.rr1.every(wt));break;case"week":Y.ticks(Q.NGh.every(wt));break;case"month":Y.ticks(Q.F0B.every(wt));break}}f.append("g").attr("class","grid").attr("transform","translate("+L+", "+w+")").call(Y).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function H(L,w){const m=[];let B=0;for(const[g,O]of x.entries())m[g]=[O,v(O,E)];f.append("g").selectAll("text").data(m).enter().append(function(g){const O=g[0].split(Qt.lineBreakRegex),y=-(O.length-1)/2,Y=l.createElementNS("http://www.w3.org/2000/svg","text");Y.setAttribute("dy",y+"em");for(const[wt,at]of O.entries()){const st=l.createElementNS("http://www.w3.org/2000/svg","tspan");st.setAttribute("alignment-baseline","central"),st.setAttribute("x","10"),wt>0&&st.setAttribute("dy","1em"),st.textContent=at,Y.appendChild(st)}return Y}).attr("x",10).attr("y",function(g,O){if(O>0)for(let y=0;y<O;y++)return B+=m[O-1][1],g[1]*L/2+B*L+w;else return g[1]*L/2+w}).attr("font-size",s.sectionFontSize).attr("font-size",s.sectionFontSize).attr("class",function(g){for(const[O,y]of x.entries())if(g[0]===y)return"sectionTitle sectionTitle"+O%s.numberSectionStyles;return"sectionTitle"})}function it(L,w,m,B){const g=r.db.getTodayMarker();if(g==="off")return;const O=f.append("g").attr("class","today"),y=new Date,Y=O.append("line");Y.attr("x1",p(y)+L).attr("x2",p(y)+L).attr("y1",s.titleTopMargin).attr("y2",B-s.titleTopMargin).attr("class","today"),g!==""&&Y.attr("style",g.replace(/,/g,";"))}function R(L){const w={},m=[];for(let B=0,g=L.length;B<g;++B)Object.prototype.hasOwnProperty.call(w,L[B])||(w[L[B]]=!0,m.push(L[B]));return m}function F(L){let w=L.length;const m={};for(;w;)m[L[--w]]=(m[L[w]]||0)+1;return m}function v(L,w){return F(w)[L]||0}}};var Pl=function(){var t=function(n,a,o,l){for(o=o||{},l=n.length;l--;o[n[l]]=a);return o},e=[6,9,10],i={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(a,o,l,h,u,d,f){switch(d.length-1,u){case 1:return h;case 4:break;case 6:h.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),t(e,[2,6])],defaultActions:{4:[2,1]},parseError:function(a,o){if(o.recoverable)this.trace(a);else{var l=new Error(a);throw l.hash=o,l}},parse:function(a){var o=this,l=[0],h=[],u=[null],d=[],f=this.table,p="",x=0,E=0,T=2,S=1,_=d.slice.call(arguments,1),D=Object.create(this.lexer),z={yy:{}};for(var H in this.yy)Object.prototype.hasOwnProperty.call(this.yy,H)&&(z.yy[H]=this.yy[H]);D.setInput(a,z.yy),z.yy.lexer=D,z.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var it=D.yylloc;d.push(it);var R=D.options&&D.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function F(){var at;return at=h.pop()||D.lex()||S,typeof at!="number"&&(at instanceof Array&&(h=at,at=h.pop()),at=o.symbols_[at]||at),at}for(var v,L,w,m,B={},g,O,y,Y;;){if(L=l[l.length-1],this.defaultActions[L]?w=this.defaultActions[L]:((v===null||typeof v>"u")&&(v=F()),w=f[L]&&f[L][v]),typeof w>"u"||!w.length||!w[0]){var wt="";Y=[];for(g in f[L])this.terminals_[g]&&g>T&&Y.push("'"+this.terminals_[g]+"'");D.showPosition?wt="Parse error on line "+(x+1)+`:
|
|
1336
|
-
`+D.showPosition()+`
|
|
1337
|
-
Expecting `+Y.join(", ")+", got '"+(this.terminals_[v]||v)+"'":wt="Parse error on line "+(x+1)+": Unexpected "+(v==S?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(wt,{text:D.match,token:this.terminals_[v]||v,line:D.yylineno,loc:it,expected:Y})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+L+", token: "+v);switch(w[0]){case 1:l.push(v),u.push(D.yytext),d.push(D.yylloc),l.push(w[1]),v=null,E=D.yyleng,p=D.yytext,x=D.yylineno,it=D.yylloc;break;case 2:if(O=this.productions_[w[1]][1],B.$=u[u.length-O],B._$={first_line:d[d.length-(O||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(O||1)].first_column,last_column:d[d.length-1].last_column},R&&(B._$.range=[d[d.length-(O||1)].range[0],d[d.length-1].range[1]]),m=this.performAction.apply(B,[p,E,x,z.yy,w[1],u,d].concat(_)),typeof m<"u")return m;O&&(l=l.slice(0,-1*O*2),u=u.slice(0,-1*O),d=d.slice(0,-1*O)),l.push(this.productions_[w[1]][0]),u.push(B.$),d.push(B._$),y=f[l[l.length-2]][l[l.length-1]],l.push(y);break;case 3:return!0}}return!0}},r=function(){var n={EOF:1,parseError:function(o,l){if(this.yy.parser)this.yy.parser.parseError(o,l);else throw new Error(o)},setInput:function(a,o){return this.yy=o||this.yy||{},this._input=a,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},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var o=a.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var o=a.length,l=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var h=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===h.length?this.yylloc.first_column:0)+h[h.length-l.length].length-l[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1338
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),o=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
|
|
1339
|
-
`+o+"^"},test_match:function(a,o){var l,h,u;if(this.options.backtrack_lexer&&(u={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&&(u.yylloc.range=this.yylloc.range.slice(0))),h=a[0].match(/(?:\r\n?|\n).*/g),h&&(this.yylineno+=h.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:h?h[h.length-1].length-h[h.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],l=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var d in u)this[d]=u[d];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,o,l,h;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),d=0;d<u.length;d++)if(l=this._input.match(this.rules[u[d]]),l&&(!o||l[0].length>o[0].length)){if(o=l,h=d,this.options.backtrack_lexer){if(a=this.test_match(l,u[d]),a!==!1)return a;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(a=this.test_match(o,u[h]),a!==!1?a:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1340
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var o=this.next();return o||this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},pushState:function(o){this.begin(o)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(o,l,h,u){switch(h){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};return n}();i.lexer=r;function s(){this.yy={}}return s.prototype=i,i.Parser=s,new s}();Pl.parser=Pl;const R3=Pl;var C0="",T0=!1;const N3={setMessage:t=>{k.debug("Setting message to: "+t),C0=t},getMessage:()=>C0,setInfo:t=>{T0=t},getInfo:()=>T0,clear:ar},O3={draw:(t,e,i)=>{try{k.debug(`Rendering info diagram
|
|
1341
|
-
`+t);const r=P().securityLevel;let s;r==="sandbox"&&(s=(0,Q.Ys)("#i"+e));const a=(r==="sandbox"?(0,Q.Ys)(s.nodes()[0].contentDocument.body):(0,Q.Ys)("body")).select("#"+e);a.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+i),a.attr("height",100),a.attr("width",400)}catch(r){k.error("Error while rendering info diagram"),k.error(r.message)}}},F3=t=>t.match(/^\s*info/)!==null;var Vl=function(){var t=function(it,R,F,v){for(F=F||{},v=it.length;v--;F[it[v]]=R);return F},e=[1,4],i=[1,5],r=[1,6],s=[1,7],n=[1,9],a=[1,11,13,15,17,19,20,26,27,28,29],o=[2,5],l=[1,6,11,13,15,17,19,20,26,27,28,29],h=[26,27,28],u=[2,8],d=[1,18],f=[1,19],p=[1,20],x=[1,21],E=[1,22],T=[1,23],S=[1,28],_=[6,26,27,28,29],D={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement:10,txt:11,value:12,title:13,title_value:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,openDirective:21,typeDirective:22,closeDirective:23,":":24,argDirective:25,NEWLINE:26,";":27,EOF:28,open_directive:29,type_directive:30,arg_directive:31,close_directive:32,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",13:"title",14:"title_value",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",24:":",26:"NEWLINE",27:";",28:"EOF",29:"open_directive",30:"type_directive",31:"arg_directive",32:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[21,1],[22,1],[25,1],[23,1]],performAction:function(R,F,v,L,w,m,B){var g=m.length-1;switch(w){case 4:L.setShowData(!0);break;case 7:this.$=m[g-1];break;case 9:L.addSection(m[g-1],L.cleanupValue(m[g]));break;case 10:this.$=m[g].trim(),L.setDiagramTitle(this.$);break;case 11:this.$=m[g].trim(),L.setAccTitle(this.$);break;case 12:case 13:this.$=m[g].trim(),L.setAccDescription(this.$);break;case 14:L.addSection(m[g].substr(8)),this.$=m[g].substr(8);break;case 21:L.parseDirective("%%{","open_directive");break;case 22:L.parseDirective(m[g],"type_directive");break;case 23:m[g]=m[g].trim().replace(/'/g,'"'),L.parseDirective(m[g],"arg_directive");break;case 24:L.parseDirective("}%%","close_directive","pie");break}},table:[{3:1,4:2,5:3,6:e,21:8,26:i,27:r,28:s,29:n},{1:[3]},{3:10,4:2,5:3,6:e,21:8,26:i,27:r,28:s,29:n},{3:11,4:2,5:3,6:e,21:8,26:i,27:r,28:s,29:n},t(a,o,{7:12,8:[1,13]}),t(l,[2,18]),t(l,[2,19]),t(l,[2,20]),{22:14,30:[1,15]},{30:[2,21]},{1:[2,1]},{1:[2,2]},t(h,u,{21:8,9:16,10:17,5:24,1:[2,3],11:d,13:f,15:p,17:x,19:E,20:T,29:n}),t(a,o,{7:25}),{23:26,24:[1,27],32:S},t([24,32],[2,22]),t(a,[2,6]),{4:29,26:i,27:r,28:s},{12:[1,30]},{14:[1,31]},{16:[1,32]},{18:[1,33]},t(h,[2,13]),t(h,[2,14]),t(h,[2,15]),t(h,u,{21:8,9:16,10:17,5:24,1:[2,4],11:d,13:f,15:p,17:x,19:E,20:T,29:n}),t(_,[2,16]),{25:34,31:[1,35]},t(_,[2,24]),t(a,[2,7]),t(h,[2,9]),t(h,[2,10]),t(h,[2,11]),t(h,[2,12]),{23:36,32:S},{32:[2,23]},t(_,[2,17])],defaultActions:{9:[2,21],10:[2,1],11:[2,2],35:[2,23]},parseError:function(R,F){if(F.recoverable)this.trace(R);else{var v=new Error(R);throw v.hash=F,v}},parse:function(R){var F=this,v=[0],L=[],w=[null],m=[],B=this.table,g="",O=0,y=0,Y=2,wt=1,at=m.slice.call(arguments,1),st=Object.create(this.lexer),nt={yy:{}};for(var et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,et)&&(nt.yy[et]=this.yy[et]);st.setInput(R,nt.yy),nt.yy.lexer=st,nt.yy.parser=this,typeof st.yylloc>"u"&&(st.yylloc={});var tt=st.yylloc;m.push(tt);var Tt=st.options&&st.options.ranges;typeof nt.yy.parseError=="function"?this.parseError=nt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function bt(){var dt;return dt=L.pop()||st.lex()||wt,typeof dt!="number"&&(dt instanceof Array&&(L=dt,dt=L.pop()),dt=F.symbols_[dt]||dt),dt}for(var Z,jt,U,pt,$={},K,N,A,G;;){if(jt=v[v.length-1],this.defaultActions[jt]?U=this.defaultActions[jt]:((Z===null||typeof Z>"u")&&(Z=bt()),U=B[jt]&&B[jt][Z]),typeof U>"u"||!U.length||!U[0]){var C="";G=[];for(K in B[jt])this.terminals_[K]&&K>Y&&G.push("'"+this.terminals_[K]+"'");st.showPosition?C="Parse error on line "+(O+1)+`:
|
|
1342
|
-
`+st.showPosition()+`
|
|
1343
|
-
Expecting `+G.join(", ")+", got '"+(this.terminals_[Z]||Z)+"'":C="Parse error on line "+(O+1)+": Unexpected "+(Z==wt?"end of input":"'"+(this.terminals_[Z]||Z)+"'"),this.parseError(C,{text:st.match,token:this.terminals_[Z]||Z,line:st.yylineno,loc:tt,expected:G})}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+jt+", token: "+Z);switch(U[0]){case 1:v.push(Z),w.push(st.yytext),m.push(st.yylloc),v.push(U[1]),Z=null,y=st.yyleng,g=st.yytext,O=st.yylineno,tt=st.yylloc;break;case 2:if(N=this.productions_[U[1]][1],$.$=w[w.length-N],$._$={first_line:m[m.length-(N||1)].first_line,last_line:m[m.length-1].last_line,first_column:m[m.length-(N||1)].first_column,last_column:m[m.length-1].last_column},Tt&&($._$.range=[m[m.length-(N||1)].range[0],m[m.length-1].range[1]]),pt=this.performAction.apply($,[g,y,O,nt.yy,U[1],w,m].concat(at)),typeof pt<"u")return pt;N&&(v=v.slice(0,-1*N*2),w=w.slice(0,-1*N),m=m.slice(0,-1*N)),v.push(this.productions_[U[1]][0]),w.push($.$),m.push($._$),A=B[v[v.length-2]][v[v.length-1]],v.push(A);break;case 3:return!0}}return!0}},z=function(){var it={EOF:1,parseError:function(F,v){if(this.yy.parser)this.yy.parser.parseError(F,v);else throw new Error(F)},setInput:function(R,F){return this.yy=F||this.yy||{},this._input=R,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},input:function(){var R=this._input[0];this.yytext+=R,this.yyleng++,this.offset++,this.match+=R,this.matched+=R;var F=R.match(/(?:\r\n?|\n).*/g);return F?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),R},unput:function(R){var F=R.length,v=R.split(/(?:\r\n?|\n)/g);this._input=R+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-F),this.offset-=F;var L=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),v.length-1&&(this.yylineno-=v.length-1);var w=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:v?(v.length===L.length?this.yylloc.first_column:0)+L[L.length-v.length].length-v[0].length:this.yylloc.first_column-F},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-F]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1344
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(R){this.unput(this.match.slice(R))},pastInput:function(){var R=this.matched.substr(0,this.matched.length-this.match.length);return(R.length>20?"...":"")+R.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var R=this.match;return R.length<20&&(R+=this._input.substr(0,20-R.length)),(R.substr(0,20)+(R.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var R=this.pastInput(),F=new Array(R.length+1).join("-");return R+this.upcomingInput()+`
|
|
1345
|
-
`+F+"^"},test_match:function(R,F){var v,L,w;if(this.options.backtrack_lexer&&(w={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&&(w.yylloc.range=this.yylloc.range.slice(0))),L=R[0].match(/(?:\r\n?|\n).*/g),L&&(this.yylineno+=L.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:L?L[L.length-1].length-L[L.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+R[0].length},this.yytext+=R[0],this.match+=R[0],this.matches=R,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(R[0].length),this.matched+=R[0],v=this.performAction.call(this,this.yy,this,F,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),v)return v;if(this._backtrack){for(var m in w)this[m]=w[m];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var R,F,v,L;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),m=0;m<w.length;m++)if(v=this._input.match(this.rules[w[m]]),v&&(!F||v[0].length>F[0].length)){if(F=v,L=m,this.options.backtrack_lexer){if(R=this.test_match(v,w[m]),R!==!1)return R;if(this._backtrack){F=!1;continue}else return!1}else if(!this.options.flex)break}return F?(R=this.test_match(F,w[L]),R!==!1?R:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1346
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var F=this.next();return F||this.lex()},begin:function(F){this.conditionStack.push(F)},popState:function(){var F=this.conditionStack.length-1;return F>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(F){return F=this.conditionStack.length-1-Math.abs(F||0),F>=0?this.conditionStack[F]:"INITIAL"},pushState:function(F){this.begin(F)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(F,v,L,w){switch(L){case 0:return this.begin("open_directive"),29;case 1:return this.begin("type_directive"),30;case 2:return this.popState(),this.begin("arg_directive"),24;case 3:return this.popState(),this.popState(),32;case 4:return 31;case 5:break;case 6:break;case 7:return 26;case 8:break;case 9:break;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:return this.begin("acc_title"),15;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),17;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:this.begin("string");break;case 20:this.popState();break;case 21:return"txt";case 22:return 6;case 23:return 8;case 24:return"value";case 25:return 28}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[20,21],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,14,16,19,22,23,24,25],inclusive:!0}}};return it}();D.lexer=z;function H(){this.yy={}}return H.prototype=D,D.Parser=H,new H}();Vl.parser=Vl;const M3=Vl,P3=t=>t.match(/^\s*pie/)!==null||t.match(/^\s*bar/)!==null;let uo={},Yl=!1;const V3={parseDirective:function(t,e,i){si.parseDirective(this,t,e,i)},getConfig:()=>P().pie,addSection:function(t,e){t=Qt.sanitizeText(t,P()),uo[t]===void 0&&(uo[t]=e,k.debug("Added new section :",t))},getSections:()=>uo,cleanupValue:function(t){return t.substring(0,1)===":"&&(t=t.substring(1).trim()),Number(t.trim())},clear:function(){uo={},Yl=!1,ar()},setAccTitle:or,getAccTitle:fr,setDiagramTitle:Ir,getDiagramTitle:Rr,setShowData:function(t){Yl=t},getShowData:function(){return Yl},getAccDescription:gr,setAccDescription:pr};let ps=P(),gs;const na=450,Y3={draw:(t,e,i,r)=>{try{ps=P(),k.debug(`Rendering info diagram
|
|
1347
|
-
`+t);const _=P().securityLevel;let D;_==="sandbox"&&(D=(0,Q.Ys)("#i"+e));const z=_==="sandbox"?(0,Q.Ys)(D.nodes()[0].contentDocument.body):(0,Q.Ys)("body"),H=_==="sandbox"?D.nodes()[0].contentDocument:document;r.db.clear(),r.parser.parse(t),k.debug("Parsed info diagram");const it=H.getElementById(e);gs=it.parentElement.offsetWidth,gs===void 0&&(gs=1200),ps.useWidth!==void 0&&(gs=ps.useWidth),ps.pie.useWidth!==void 0&&(gs=ps.pie.useWidth);const R=z.select("#"+e);Dr(R,na,gs,ps.pie.useMaxWidth),it.setAttribute("viewBox","0 0 "+gs+" "+na);var s=40,n=18,a=4,o=Math.min(gs,na)/2-s,l=R.append("g").attr("transform","translate("+gs/2+","+na/2+")"),h=r.db.getSections(),u=0;Object.keys(h).forEach(function(v){u+=h[v]});const F=ps.themeVariables;var d=[F.pie1,F.pie2,F.pie3,F.pie4,F.pie5,F.pie6,F.pie7,F.pie8,F.pie9,F.pie10,F.pie11,F.pie12],f=(0,Q.PKp)().range(d),p=Object.entries(h).map(function(v,L){return{order:L,name:v[0],value:v[1]}}),x=(0,Q.ve8)().value(function(v){return v.value}).sort(function(v,L){return v.order-L.order}),E=x(p),T=(0,Q.Nb1)().innerRadius(0).outerRadius(o);l.selectAll("mySlices").data(E).enter().append("path").attr("d",T).attr("fill",function(v){return f(v.data.name)}).attr("class","pieCircle"),l.selectAll("mySlices").data(E).enter().append("text").text(function(v){return(v.data.value/u*100).toFixed(0)+"%"}).attr("transform",function(v){return"translate("+T.centroid(v)+")"}).style("text-anchor","middle").attr("class","slice"),l.append("text").text(r.db.getDiagramTitle()).attr("x",0).attr("y",-(na-50)/2).attr("class","pieTitleText");var S=l.selectAll(".legend").data(f.domain()).enter().append("g").attr("class","legend").attr("transform",function(v,L){const w=n+a,m=w*f.domain().length/2,B=12*n,g=L*w-m;return"translate("+B+","+g+")"});S.append("rect").attr("width",n).attr("height",n).style("fill",f).style("stroke",f),S.data(E).append("text").attr("x",n+a).attr("y",n-a).text(function(v){return r.db.getShowData()||ps.showData||ps.pie.showData?v.data.name+" ["+v.data.value+"]":v.data.name})}catch(_){k.error("Error while rendering info diagram"),k.error(_)}}};var zl=function(){var t=function(jt,U,pt,$){for(pt=pt||{},$=jt.length;$--;pt[jt[$]]=U);return pt},e=[1,3],i=[1,5],r=[1,6],s=[1,7],n=[1,8],a=[5,6,8,14,16,18,19,40,41,42,43,44,45,53,71,72],o=[1,22],l=[2,13],h=[1,26],u=[1,27],d=[1,28],f=[1,29],p=[1,30],x=[1,31],E=[1,24],T=[1,32],S=[1,33],_=[1,36],D=[71,72],z=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],H=[1,56],it=[1,57],R=[1,58],F=[1,59],v=[1,60],L=[1,61],w=[1,62],m=[62,63],B=[1,74],g=[1,70],O=[1,71],y=[1,72],Y=[1,73],wt=[1,75],at=[1,79],st=[1,80],nt=[1,77],et=[1,78],tt=[5,8,14,16,18,19,40,41,42,43,44,45,53,71,72],Tt={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,requirementDef:23,elementDef:24,relationshipDef:25,requirementType:26,requirementName:27,STRUCT_START:28,requirementBody:29,ID:30,COLONSEP:31,id:32,TEXT:33,text:34,RISK:35,riskLevel:36,VERIFYMTHD:37,verifyType:38,STRUCT_STOP:39,REQUIREMENT:40,FUNCTIONAL_REQUIREMENT:41,INTERFACE_REQUIREMENT:42,PERFORMANCE_REQUIREMENT:43,PHYSICAL_REQUIREMENT:44,DESIGN_CONSTRAINT:45,LOW_RISK:46,MED_RISK:47,HIGH_RISK:48,VERIFY_ANALYSIS:49,VERIFY_DEMONSTRATION:50,VERIFY_INSPECTION:51,VERIFY_TEST:52,ELEMENT:53,elementName:54,elementBody:55,TYPE:56,type:57,DOCREF:58,ref:59,END_ARROW_L:60,relationship:61,LINE:62,END_ARROW_R:63,CONTAINS:64,COPIES:65,DERIVES:66,SATISFIES:67,VERIFIES:68,REFINES:69,TRACES:70,unqString:71,qString:72,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",28:"STRUCT_START",30:"ID",31:"COLONSEP",33:"TEXT",35:"RISK",37:"VERIFYMTHD",39:"STRUCT_STOP",40:"REQUIREMENT",41:"FUNCTIONAL_REQUIREMENT",42:"INTERFACE_REQUIREMENT",43:"PERFORMANCE_REQUIREMENT",44:"PHYSICAL_REQUIREMENT",45:"DESIGN_CONSTRAINT",46:"LOW_RISK",47:"MED_RISK",48:"HIGH_RISK",49:"VERIFY_ANALYSIS",50:"VERIFY_DEMONSTRATION",51:"VERIFY_INSPECTION",52:"VERIFY_TEST",53:"ELEMENT",56:"TYPE",58:"DOCREF",60:"END_ARROW_L",62:"LINE",63:"END_ARROW_R",64:"CONTAINS",65:"COPIES",66:"DERIVES",67:"SATISFIES",68:"VERIFIES",69:"REFINES",70:"TRACES",71:"unqString",72:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[4,2],[4,2],[4,1],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[23,5],[29,5],[29,5],[29,5],[29,5],[29,2],[29,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[36,1],[36,1],[36,1],[38,1],[38,1],[38,1],[38,1],[24,5],[55,5],[55,5],[55,2],[55,1],[25,5],[25,5],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[27,1],[27,1],[32,1],[32,1],[34,1],[34,1],[54,1],[54,1],[57,1],[57,1],[59,1],[59,1]],performAction:function(U,pt,$,K,N,A,G){var C=A.length-1;switch(N){case 6:this.$=A[C].trim(),K.setAccTitle(this.$);break;case 7:case 8:this.$=A[C].trim(),K.setAccDescription(this.$);break;case 9:K.parseDirective("%%{","open_directive");break;case 10:K.parseDirective(A[C],"type_directive");break;case 11:A[C]=A[C].trim().replace(/'/g,'"'),K.parseDirective(A[C],"arg_directive");break;case 12:K.parseDirective("}%%","close_directive","pie");break;case 13:this.$=[];break;case 19:K.addRequirement(A[C-3],A[C-4]);break;case 20:K.setNewReqId(A[C-2]);break;case 21:K.setNewReqText(A[C-2]);break;case 22:K.setNewReqRisk(A[C-2]);break;case 23:K.setNewReqVerifyMethod(A[C-2]);break;case 26:this.$=K.RequirementType.REQUIREMENT;break;case 27:this.$=K.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 28:this.$=K.RequirementType.INTERFACE_REQUIREMENT;break;case 29:this.$=K.RequirementType.PERFORMANCE_REQUIREMENT;break;case 30:this.$=K.RequirementType.PHYSICAL_REQUIREMENT;break;case 31:this.$=K.RequirementType.DESIGN_CONSTRAINT;break;case 32:this.$=K.RiskLevel.LOW_RISK;break;case 33:this.$=K.RiskLevel.MED_RISK;break;case 34:this.$=K.RiskLevel.HIGH_RISK;break;case 35:this.$=K.VerifyType.VERIFY_ANALYSIS;break;case 36:this.$=K.VerifyType.VERIFY_DEMONSTRATION;break;case 37:this.$=K.VerifyType.VERIFY_INSPECTION;break;case 38:this.$=K.VerifyType.VERIFY_TEST;break;case 39:K.addElement(A[C-3]);break;case 40:K.setNewElementType(A[C-2]);break;case 41:K.setNewElementDocRef(A[C-2]);break;case 44:K.addRelationship(A[C-2],A[C],A[C-4]);break;case 45:K.addRelationship(A[C-2],A[C-4],A[C]);break;case 46:this.$=K.Relationships.CONTAINS;break;case 47:this.$=K.Relationships.COPIES;break;case 48:this.$=K.Relationships.DERIVES;break;case 49:this.$=K.Relationships.SATISFIES;break;case 50:this.$=K.Relationships.VERIFIES;break;case 51:this.$=K.Relationships.REFINES;break;case 52:this.$=K.Relationships.TRACES;break}},table:[{3:1,4:2,6:e,9:4,14:i,16:r,18:s,19:n},{1:[3]},{3:10,4:2,5:[1,9],6:e,9:4,14:i,16:r,18:s,19:n},{5:[1,11]},{10:12,20:[1,13]},{15:[1,14]},{17:[1,15]},t(a,[2,8]),{20:[2,9]},{3:16,4:2,6:e,9:4,14:i,16:r,18:s,19:n},{1:[2,2]},{4:21,5:o,7:17,8:l,9:4,14:i,16:r,18:s,19:n,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:d,43:f,44:p,45:x,53:E,71:T,72:S},{11:34,12:[1,35],22:_},t([12,22],[2,10]),t(a,[2,6]),t(a,[2,7]),{1:[2,1]},{8:[1,37]},{4:21,5:o,7:38,8:l,9:4,14:i,16:r,18:s,19:n,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:d,43:f,44:p,45:x,53:E,71:T,72:S},{4:21,5:o,7:39,8:l,9:4,14:i,16:r,18:s,19:n,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:d,43:f,44:p,45:x,53:E,71:T,72:S},{4:21,5:o,7:40,8:l,9:4,14:i,16:r,18:s,19:n,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:d,43:f,44:p,45:x,53:E,71:T,72:S},{4:21,5:o,7:41,8:l,9:4,14:i,16:r,18:s,19:n,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:d,43:f,44:p,45:x,53:E,71:T,72:S},{4:21,5:o,7:42,8:l,9:4,14:i,16:r,18:s,19:n,23:18,24:19,25:20,26:23,32:25,40:h,41:u,42:d,43:f,44:p,45:x,53:E,71:T,72:S},{27:43,71:[1,44],72:[1,45]},{54:46,71:[1,47],72:[1,48]},{60:[1,49],62:[1,50]},t(D,[2,26]),t(D,[2,27]),t(D,[2,28]),t(D,[2,29]),t(D,[2,30]),t(D,[2,31]),t(z,[2,55]),t(z,[2,56]),t(a,[2,4]),{13:51,21:[1,52]},t(a,[2,12]),{1:[2,3]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{8:[2,17]},{8:[2,18]},{28:[1,53]},{28:[2,53]},{28:[2,54]},{28:[1,54]},{28:[2,59]},{28:[2,60]},{61:55,64:H,65:it,66:R,67:F,68:v,69:L,70:w},{61:63,64:H,65:it,66:R,67:F,68:v,69:L,70:w},{11:64,22:_},{22:[2,11]},{5:[1,65]},{5:[1,66]},{62:[1,67]},t(m,[2,46]),t(m,[2,47]),t(m,[2,48]),t(m,[2,49]),t(m,[2,50]),t(m,[2,51]),t(m,[2,52]),{63:[1,68]},t(a,[2,5]),{5:B,29:69,30:g,33:O,35:y,37:Y,39:wt},{5:at,39:st,55:76,56:nt,58:et},{32:81,71:T,72:S},{32:82,71:T,72:S},t(tt,[2,19]),{31:[1,83]},{31:[1,84]},{31:[1,85]},{31:[1,86]},{5:B,29:87,30:g,33:O,35:y,37:Y,39:wt},t(tt,[2,25]),t(tt,[2,39]),{31:[1,88]},{31:[1,89]},{5:at,39:st,55:90,56:nt,58:et},t(tt,[2,43]),t(tt,[2,44]),t(tt,[2,45]),{32:91,71:T,72:S},{34:92,71:[1,93],72:[1,94]},{36:95,46:[1,96],47:[1,97],48:[1,98]},{38:99,49:[1,100],50:[1,101],51:[1,102],52:[1,103]},t(tt,[2,24]),{57:104,71:[1,105],72:[1,106]},{59:107,71:[1,108],72:[1,109]},t(tt,[2,42]),{5:[1,110]},{5:[1,111]},{5:[2,57]},{5:[2,58]},{5:[1,112]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[1,113]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[2,38]},{5:[1,114]},{5:[2,61]},{5:[2,62]},{5:[1,115]},{5:[2,63]},{5:[2,64]},{5:B,29:116,30:g,33:O,35:y,37:Y,39:wt},{5:B,29:117,30:g,33:O,35:y,37:Y,39:wt},{5:B,29:118,30:g,33:O,35:y,37:Y,39:wt},{5:B,29:119,30:g,33:O,35:y,37:Y,39:wt},{5:at,39:st,55:120,56:nt,58:et},{5:at,39:st,55:121,56:nt,58:et},t(tt,[2,20]),t(tt,[2,21]),t(tt,[2,22]),t(tt,[2,23]),t(tt,[2,40]),t(tt,[2,41])],defaultActions:{8:[2,9],10:[2,2],16:[2,1],37:[2,3],38:[2,14],39:[2,15],40:[2,16],41:[2,17],42:[2,18],44:[2,53],45:[2,54],47:[2,59],48:[2,60],52:[2,11],93:[2,57],94:[2,58],96:[2,32],97:[2,33],98:[2,34],100:[2,35],101:[2,36],102:[2,37],103:[2,38],105:[2,61],106:[2,62],108:[2,63],109:[2,64]},parseError:function(U,pt){if(pt.recoverable)this.trace(U);else{var $=new Error(U);throw $.hash=pt,$}},parse:function(U){var pt=this,$=[0],K=[],N=[null],A=[],G=this.table,C="",dt=0,b=0,Jt=2,j=1,Nt=A.slice.call(arguments,1),At=Object.create(this.lexer),kt={yy:{}};for(var gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,gt)&&(kt.yy[gt]=this.yy[gt]);At.setInput(U,kt.yy),kt.yy.lexer=At,kt.yy.parser=this,typeof At.yylloc>"u"&&(At.yylloc={});var _t=At.yylloc;A.push(_t);var yt=At.options&&At.options.ranges;typeof kt.yy.parseError=="function"?this.parseError=kt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ct(){var Et;return Et=K.pop()||At.lex()||j,typeof Et!="number"&&(Et instanceof Array&&(K=Et,Et=K.pop()),Et=pt.symbols_[Et]||Et),Et}for(var qe,Ne,se,re,Le={},ni,Ye,ue,Zt;;){if(Ne=$[$.length-1],this.defaultActions[Ne]?se=this.defaultActions[Ne]:((qe===null||typeof qe>"u")&&(qe=Ct()),se=G[Ne]&&G[Ne][qe]),typeof se>"u"||!se.length||!se[0]){var St="";Zt=[];for(ni in G[Ne])this.terminals_[ni]&&ni>Jt&&Zt.push("'"+this.terminals_[ni]+"'");At.showPosition?St="Parse error on line "+(dt+1)+`:
|
|
1348
|
-
`+At.showPosition()+`
|
|
1349
|
-
Expecting `+Zt.join(", ")+", got '"+(this.terminals_[qe]||qe)+"'":St="Parse error on line "+(dt+1)+": Unexpected "+(qe==j?"end of input":"'"+(this.terminals_[qe]||qe)+"'"),this.parseError(St,{text:At.match,token:this.terminals_[qe]||qe,line:At.yylineno,loc:_t,expected:Zt})}if(se[0]instanceof Array&&se.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ne+", token: "+qe);switch(se[0]){case 1:$.push(qe),N.push(At.yytext),A.push(At.yylloc),$.push(se[1]),qe=null,b=At.yyleng,C=At.yytext,dt=At.yylineno,_t=At.yylloc;break;case 2:if(Ye=this.productions_[se[1]][1],Le.$=N[N.length-Ye],Le._$={first_line:A[A.length-(Ye||1)].first_line,last_line:A[A.length-1].last_line,first_column:A[A.length-(Ye||1)].first_column,last_column:A[A.length-1].last_column},yt&&(Le._$.range=[A[A.length-(Ye||1)].range[0],A[A.length-1].range[1]]),re=this.performAction.apply(Le,[C,b,dt,kt.yy,se[1],N,A].concat(Nt)),typeof re<"u")return re;Ye&&($=$.slice(0,-1*Ye*2),N=N.slice(0,-1*Ye),A=A.slice(0,-1*Ye)),$.push(this.productions_[se[1]][0]),N.push(Le.$),A.push(Le._$),ue=G[$[$.length-2]][$[$.length-1]],$.push(ue);break;case 3:return!0}}return!0}},bt=function(){var jt={EOF:1,parseError:function(pt,$){if(this.yy.parser)this.yy.parser.parseError(pt,$);else throw new Error(pt)},setInput:function(U,pt){return this.yy=pt||this.yy||{},this._input=U,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},input:function(){var U=this._input[0];this.yytext+=U,this.yyleng++,this.offset++,this.match+=U,this.matched+=U;var pt=U.match(/(?:\r\n?|\n).*/g);return pt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),U},unput:function(U){var pt=U.length,$=U.split(/(?:\r\n?|\n)/g);this._input=U+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-pt),this.offset-=pt;var K=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),$.length-1&&(this.yylineno-=$.length-1);var N=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:$?($.length===K.length?this.yylloc.first_column:0)+K[K.length-$.length].length-$[0].length:this.yylloc.first_column-pt},this.options.ranges&&(this.yylloc.range=[N[0],N[0]+this.yyleng-pt]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1350
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(U){this.unput(this.match.slice(U))},pastInput:function(){var U=this.matched.substr(0,this.matched.length-this.match.length);return(U.length>20?"...":"")+U.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var U=this.match;return U.length<20&&(U+=this._input.substr(0,20-U.length)),(U.substr(0,20)+(U.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var U=this.pastInput(),pt=new Array(U.length+1).join("-");return U+this.upcomingInput()+`
|
|
1351
|
-
`+pt+"^"},test_match:function(U,pt){var $,K,N;if(this.options.backtrack_lexer&&(N={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&&(N.yylloc.range=this.yylloc.range.slice(0))),K=U[0].match(/(?:\r\n?|\n).*/g),K&&(this.yylineno+=K.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:K?K[K.length-1].length-K[K.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+U[0].length},this.yytext+=U[0],this.match+=U[0],this.matches=U,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(U[0].length),this.matched+=U[0],$=this.performAction.call(this,this.yy,this,pt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),$)return $;if(this._backtrack){for(var A in N)this[A]=N[A];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var U,pt,$,K;this._more||(this.yytext="",this.match="");for(var N=this._currentRules(),A=0;A<N.length;A++)if($=this._input.match(this.rules[N[A]]),$&&(!pt||$[0].length>pt[0].length)){if(pt=$,K=A,this.options.backtrack_lexer){if(U=this.test_match($,N[A]),U!==!1)return U;if(this._backtrack){pt=!1;continue}else return!1}else if(!this.options.flex)break}return pt?(U=this.test_match(pt,N[K]),U!==!1?U:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1352
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var pt=this.next();return pt||this.lex()},begin:function(pt){this.conditionStack.push(pt)},popState:function(){var pt=this.conditionStack.length-1;return pt>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(pt){return pt=this.conditionStack.length-1-Math.abs(pt||0),pt>=0?this.conditionStack[pt]:"INITIAL"},pushState:function(pt){this.begin(pt)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(pt,$,K,N){switch(K){case 0:return this.begin("open_directive"),19;case 1:return this.begin("type_directive"),20;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),22;case 4:return 21;case 5:return"title";case 6:return this.begin("acc_title"),14;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),16;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 5;case 14:break;case 15:break;case 16:break;case 17:return 8;case 18:return 6;case 19:return 28;case 20:return 39;case 21:return 31;case 22:return 30;case 23:return 33;case 24:return 35;case 25:return 37;case 26:return 40;case 27:return 41;case 28:return 42;case 29:return 43;case 30:return 44;case 31:return 45;case 32:return 46;case 33:return 47;case 34:return 48;case 35:return 49;case 36:return 50;case 37:return 51;case 38:return 52;case 39:return 53;case 40:return 64;case 41:return 65;case 42:return 66;case 43:return 67;case 44:return 68;case 45:return 69;case 46:return 70;case 47:return 56;case 48:return 58;case 49:return 60;case 50:return 63;case 51:return 62;case 52:this.begin("string");break;case 53:this.popState();break;case 54:return"qString";case 55:return $.yytext=$.yytext.trim(),71}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/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,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[53,54],inclusive:!1},INITIAL:{rules:[0,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,55],inclusive:!0}}};return jt}();Tt.lexer=bt;function Z(){this.yy={}}return Z.prototype=Tt,Tt.Parser=Z,new Z}();zl.parser=zl;const z3=zl,W3=t=>t.match(/^\s*requirement(Diagram)?/)!==null;let Wl=[],hr={},aa={},Os={},oa={};const U3={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},parseDirective:function(t,e,i){si.parseDirective(this,t,e,i)},getConfig:()=>P().req,addRequirement:(t,e)=>(aa[t]===void 0&&(aa[t]={name:t,type:e,id:hr.id,text:hr.text,risk:hr.risk,verifyMethod:hr.verifyMethod}),hr={},aa[t]),getRequirements:()=>aa,setNewReqId:t=>{hr!==void 0&&(hr.id=t)},setNewReqText:t=>{hr!==void 0&&(hr.text=t)},setNewReqRisk:t=>{hr!==void 0&&(hr.risk=t)},setNewReqVerifyMethod:t=>{hr!==void 0&&(hr.verifyMethod=t)},setAccTitle:or,getAccTitle:fr,setAccDescription:pr,getAccDescription:gr,addElement:t=>(oa[t]===void 0&&(oa[t]={name:t,type:Os.type,docRef:Os.docRef},k.info("Added new requirement: ",t)),Os={},oa[t]),getElements:()=>oa,setNewElementType:t=>{Os!==void 0&&(Os.type=t)},setNewElementDocRef:t=>{Os!==void 0&&(Os.docRef=t)},addRelationship:(t,e,i)=>{Wl.push({type:t,src:e,dst:i})},getRelationships:()=>Wl,clear:()=>{Wl=[],hr={},aa={},Os={},oa={},ar()}},Ul={CONTAINS:"contains",ARROW:"arrow"},S0={ReqMarkers:Ul,insertLineEndings:(t,e)=>{let i=t.append("defs").append("marker").attr("id",Ul.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");i.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),i.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),i.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",Ul.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d",`M0,0
|
|
1353
|
-
L${e.line_height},${e.line_height/2}
|
|
1354
|
-
M${e.line_height},${e.line_height/2}
|
|
1355
|
-
L0,${e.line_height}`).attr("stroke-width",1)}};let ui={},w0=0;const A0=(t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",ui.rect_min_width+"px").attr("height",ui.rect_min_height+"px"),L0=(t,e,i)=>{let r=ui.rect_min_width/2,s=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",r).attr("y",ui.rect_padding).attr("dominant-baseline","hanging"),n=0;i.forEach(h=>{n==0?s.append("tspan").attr("text-anchor","middle").attr("x",ui.rect_min_width/2).attr("dy",0).text(h):s.append("tspan").attr("text-anchor","middle").attr("x",ui.rect_min_width/2).attr("dy",ui.line_height*.75).text(h),n++});let a=1.5*ui.rect_padding,o=n*ui.line_height*.75,l=a+o;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",ui.rect_min_width).attr("y1",l).attr("y2",l),{titleNode:s,y:l}},B0=(t,e,i,r)=>{let s=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",ui.rect_padding).attr("y",r).attr("dominant-baseline","hanging"),n=0;const a=30;let o=[];return i.forEach(l=>{let h=l.length;for(;h>a&&n<3;){let u=l.substring(0,a);l=l.substring(a,l.length),h=l.length,o[o.length]=u,n++}if(n==3){let u=o[o.length-1];o[o.length-1]=u.substring(0,u.length-4)+"..."}else o[o.length]=l;n=0}),o.forEach(l=>{s.append("tspan").attr("x",ui.rect_padding).attr("dy",ui.line_height).text(l)}),s},Z3=(t,e,i,r)=>{const s=e.node().getTotalLength(),n=e.node().getPointAtLength(s*.5),a="rel"+w0;w0++;const l=t.append("text").attr("class","req relationshipLabel").attr("id",a).attr("x",n.x).attr("y",n.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(r).node().getBBox();t.insert("rect","#"+a).attr("class","req reqLabelBox").attr("x",n.x-l.width/2).attr("y",n.y-l.height/2).attr("width",l.width).attr("height",l.height).attr("fill","white").attr("fill-opacity","85%")},H3=function(t,e,i,r,s){const n=i.edge(vn(e.src),vn(e.dst)),a=(0,Q.jvg)().x(function(l){return l.x}).y(function(l){return l.y}),o=t.insert("path","#"+r).attr("class","er relationshipLine").attr("d",a(n.points)).attr("fill","none");e.type==s.db.Relationships.CONTAINS?o.attr("marker-start","url("+Qt.getUrl(ui.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(o.attr("stroke-dasharray","10,7"),o.attr("marker-end","url("+Qt.getUrl(ui.arrowMarkerAbsolute)+"#"+S0.ReqMarkers.ARROW+"_line_ending)")),Z3(t,o,ui,`<<${e.type}>>`)},G3=(t,e,i)=>{Object.keys(t).forEach(r=>{let s=t[r];r=vn(r),k.info("Added new requirement: ",r);const n=i.append("g").attr("id",r),a="req-"+r,o=A0(n,a);let l=L0(n,r+"_title",[`<<${s.type}>>`,`${s.name}`]);B0(n,r+"_body",[`Id: ${s.id}`,`Text: ${s.text}`,`Risk: ${s.risk}`,`Verification: ${s.verifyMethod}`],l.y);const h=o.node().getBBox();e.setNode(r,{width:h.width,height:h.height,shape:"rect",id:r})})},j3=(t,e,i)=>{Object.keys(t).forEach(r=>{let s=t[r];const n=vn(r),a=i.append("g").attr("id",n),o="element-"+n,l=A0(a,o);let h=L0(a,o+"_title",["<<Element>>",`${r}`]);B0(a,o+"_body",[`Type: ${s.type||"Not Specified"}`,`Doc Ref: ${s.docRef||"None"}`],h.y);const u=l.node().getBBox();e.setNode(n,{width:u.width,height:u.height,shape:"rect",id:n})})},q3=(t,e)=>(t.forEach(function(i){let r=vn(i.src),s=vn(i.dst);e.setEdge(r,s,{relationship:i})}),t),X3=function(t,e){e.nodes().forEach(function(i){i!==void 0&&e.node(i)!==void 0&&(t.select("#"+i),t.select("#"+i).attr("transform","translate("+(e.node(i).x-e.node(i).width/2)+","+(e.node(i).y-e.node(i).height/2)+" )"))})},vn=t=>t.replace(/\s/g,"").replace(/\./g,"_"),K3={draw:(t,e,i,r)=>{ui=P().requirement,r.db.clear(),r.parser.parse(t);const s=ui.securityLevel;let n;s==="sandbox"&&(n=(0,Q.Ys)("#i"+e));const o=(s==="sandbox"?(0,Q.Ys)(n.nodes()[0].contentDocument.body):(0,Q.Ys)("body")).select(`[id='${e}']`);S0.insertLineEndings(o,ui);const l=new Be.k({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:ui.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});let h=r.db.getRequirements(),u=r.db.getElements(),d=r.db.getRelationships();G3(h,l,o),j3(u,l,o),q3(d,l),(0,xe.bK)(l),X3(o,l),d.forEach(function(T){H3(o,T,l,e,r)});const f=ui.rect_padding,p=o.node().getBBox(),x=p.width+f*2,E=p.height+f*2;Dr(o,E,x,ui.useMaxWidth),o.attr("viewBox",`${p.x-f} ${p.y-f} ${x} ${E}`)}};var Zl=function(){var t=function(pt,$,K,N){for(K=K||{},N=pt.length;N--;K[pt[N]]=$);return K},e=[1,2],i=[1,3],r=[1,5],s=[1,7],n=[2,5],a=[1,15],o=[1,17],l=[1,19],h=[1,21],u=[1,22],d=[1,23],f=[1,29],p=[1,30],x=[1,31],E=[1,32],T=[1,33],S=[1,34],_=[1,35],D=[1,36],z=[1,37],H=[1,38],it=[1,39],R=[1,40],F=[1,42],v=[1,43],L=[1,45],w=[1,46],m=[1,47],B=[1,48],g=[1,49],O=[1,50],y=[1,53],Y=[1,4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,51,52,53,54,56,57,62,63,64,65,73,83],wt=[4,5,21,54,56],at=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,54,56,57,62,63,64,65,73,83],st=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,53,54,56,57,62,63,64,65,73,83],nt=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,52,54,56,57,62,63,64,65,73,83],et=[4,5,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,51,54,56,57,62,63,64,65,73,83],tt=[71,72,73],Tt=[1,125],bt=[1,4,5,7,19,21,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,51,52,53,54,56,57,62,63,64,65,73,83],Z={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,box_section:11,box_line:12,participant_statement:13,openDirective:14,typeDirective:15,closeDirective:16,":":17,argDirective:18,box:19,restOfLine:20,end:21,signal:22,autonumber:23,NUM:24,off:25,activate:26,actor:27,deactivate:28,note_statement:29,links_statement:30,link_statement:31,properties_statement:32,details_statement:33,title:34,legacy_title:35,acc_title:36,acc_title_value:37,acc_descr:38,acc_descr_value:39,acc_descr_multiline_value:40,loop:41,rect:42,opt:43,alt:44,else_sections:45,par:46,par_sections:47,critical:48,option_sections:49,break:50,option:51,and:52,else:53,participant:54,AS:55,participant_actor:56,note:57,placement:58,text2:59,over:60,actor_pair:61,links:62,link:63,properties:64,details:65,spaceList:66,",":67,left_of:68,right_of:69,signaltype:70,"+":71,"-":72,ACTOR:73,SOLID_OPEN_ARROW:74,DOTTED_OPEN_ARROW:75,SOLID_ARROW:76,DOTTED_ARROW:77,SOLID_CROSS:78,DOTTED_CROSS:79,SOLID_POINT:80,DOTTED_POINT:81,TXT:82,open_directive:83,type_directive:84,arg_directive:85,close_directive:86,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",17:":",19:"box",20:"restOfLine",21:"end",23:"autonumber",24:"NUM",25:"off",26:"activate",28:"deactivate",34:"title",35:"legacy_title",36:"acc_title",37:"acc_title_value",38:"acc_descr",39:"acc_descr_value",40:"acc_descr_multiline_value",41:"loop",42:"rect",43:"opt",44:"alt",46:"par",48:"critical",50:"break",51:"option",52:"and",53:"else",54:"participant",55:"AS",56:"participant_actor",57:"note",60:"over",62:"links",63:"link",64:"properties",65:"details",67:",",68:"left_of",69:"right_of",71:"+",72:"-",73:"ACTOR",74:"SOLID_OPEN_ARROW",75:"DOTTED_OPEN_ARROW",76:"SOLID_ARROW",77:"DOTTED_ARROW",78:"SOLID_CROSS",79:"DOTTED_CROSS",80:"SOLID_POINT",81:"DOTTED_POINT",82:"TXT",83:"open_directive",84:"type_directive",85:"arg_directive",86:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[11,0],[11,2],[12,2],[12,1],[12,1],[6,4],[6,6],[10,1],[10,4],[10,2],[10,4],[10,3],[10,3],[10,2],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,2],[10,2],[10,1],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[49,1],[49,4],[47,1],[47,4],[45,1],[45,4],[13,5],[13,3],[13,5],[13,3],[29,4],[29,4],[30,3],[31,3],[32,3],[33,3],[66,2],[66,1],[61,3],[61,1],[58,1],[58,1],[22,5],[22,5],[22,4],[27,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[59,1],[14,1],[15,1],[18,1],[16,1]],performAction:function($,K,N,A,G,C,dt){var b=C.length-1;switch(G){case 4:return A.apply(C[b]),C[b];case 5:case 10:this.$=[];break;case 6:case 11:C[b-1].push(C[b]),this.$=C[b-1];break;case 7:case 8:case 12:case 13:this.$=C[b];break;case 9:case 14:this.$=[];break;case 18:C[b-1].unshift({type:"boxStart",boxData:A.parseBoxData(C[b-2])}),C[b-1].push({type:"boxEnd",boxText:C[b-2]}),this.$=C[b-1];break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(C[b-2]),sequenceIndexStep:Number(C[b-1]),sequenceVisible:!0,signalType:A.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceIndex:Number(C[b-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:A.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:A.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:A.LINETYPE.AUTONUMBER};break;case 24:this.$={type:"activeStart",signalType:A.LINETYPE.ACTIVE_START,actor:C[b-1]};break;case 25:this.$={type:"activeEnd",signalType:A.LINETYPE.ACTIVE_END,actor:C[b-1]};break;case 31:A.setDiagramTitle(C[b].substring(6)),this.$=C[b].substring(6);break;case 32:A.setDiagramTitle(C[b].substring(7)),this.$=C[b].substring(7);break;case 33:this.$=C[b].trim(),A.setAccTitle(this.$);break;case 34:case 35:this.$=C[b].trim(),A.setAccDescription(this.$);break;case 36:C[b-1].unshift({type:"loopStart",loopText:A.parseMessage(C[b-2]),signalType:A.LINETYPE.LOOP_START}),C[b-1].push({type:"loopEnd",loopText:C[b-2],signalType:A.LINETYPE.LOOP_END}),this.$=C[b-1];break;case 37:C[b-1].unshift({type:"rectStart",color:A.parseMessage(C[b-2]),signalType:A.LINETYPE.RECT_START}),C[b-1].push({type:"rectEnd",color:A.parseMessage(C[b-2]),signalType:A.LINETYPE.RECT_END}),this.$=C[b-1];break;case 38:C[b-1].unshift({type:"optStart",optText:A.parseMessage(C[b-2]),signalType:A.LINETYPE.OPT_START}),C[b-1].push({type:"optEnd",optText:A.parseMessage(C[b-2]),signalType:A.LINETYPE.OPT_END}),this.$=C[b-1];break;case 39:C[b-1].unshift({type:"altStart",altText:A.parseMessage(C[b-2]),signalType:A.LINETYPE.ALT_START}),C[b-1].push({type:"altEnd",signalType:A.LINETYPE.ALT_END}),this.$=C[b-1];break;case 40:C[b-1].unshift({type:"parStart",parText:A.parseMessage(C[b-2]),signalType:A.LINETYPE.PAR_START}),C[b-1].push({type:"parEnd",signalType:A.LINETYPE.PAR_END}),this.$=C[b-1];break;case 41:C[b-1].unshift({type:"criticalStart",criticalText:A.parseMessage(C[b-2]),signalType:A.LINETYPE.CRITICAL_START}),C[b-1].push({type:"criticalEnd",signalType:A.LINETYPE.CRITICAL_END}),this.$=C[b-1];break;case 42:C[b-1].unshift({type:"breakStart",breakText:A.parseMessage(C[b-2]),signalType:A.LINETYPE.BREAK_START}),C[b-1].push({type:"breakEnd",optText:A.parseMessage(C[b-2]),signalType:A.LINETYPE.BREAK_END}),this.$=C[b-1];break;case 45:this.$=C[b-3].concat([{type:"option",optionText:A.parseMessage(C[b-1]),signalType:A.LINETYPE.CRITICAL_OPTION},C[b]]);break;case 47:this.$=C[b-3].concat([{type:"and",parText:A.parseMessage(C[b-1]),signalType:A.LINETYPE.PAR_AND},C[b]]);break;case 49:this.$=C[b-3].concat([{type:"else",altText:A.parseMessage(C[b-1]),signalType:A.LINETYPE.ALT_ELSE},C[b]]);break;case 50:C[b-3].type="addParticipant",C[b-3].description=A.parseMessage(C[b-1]),this.$=C[b-3];break;case 51:C[b-1].type="addParticipant",this.$=C[b-1];break;case 52:C[b-3].type="addActor",C[b-3].description=A.parseMessage(C[b-1]),this.$=C[b-3];break;case 53:C[b-1].type="addActor",this.$=C[b-1];break;case 54:this.$=[C[b-1],{type:"addNote",placement:C[b-2],actor:C[b-1].actor,text:C[b]}];break;case 55:C[b-2]=[].concat(C[b-1],C[b-1]).slice(0,2),C[b-2][0]=C[b-2][0].actor,C[b-2][1]=C[b-2][1].actor,this.$=[C[b-1],{type:"addNote",placement:A.PLACEMENT.OVER,actor:C[b-2].slice(0,2),text:C[b]}];break;case 56:this.$=[C[b-1],{type:"addLinks",actor:C[b-1].actor,text:C[b]}];break;case 57:this.$=[C[b-1],{type:"addALink",actor:C[b-1].actor,text:C[b]}];break;case 58:this.$=[C[b-1],{type:"addProperties",actor:C[b-1].actor,text:C[b]}];break;case 59:this.$=[C[b-1],{type:"addDetails",actor:C[b-1].actor,text:C[b]}];break;case 62:this.$=[C[b-2],C[b]];break;case 63:this.$=C[b];break;case 64:this.$=A.PLACEMENT.LEFTOF;break;case 65:this.$=A.PLACEMENT.RIGHTOF;break;case 66:this.$=[C[b-4],C[b-1],{type:"addMessage",from:C[b-4].actor,to:C[b-1].actor,signalType:C[b-3],msg:C[b]},{type:"activeStart",signalType:A.LINETYPE.ACTIVE_START,actor:C[b-1]}];break;case 67:this.$=[C[b-4],C[b-1],{type:"addMessage",from:C[b-4].actor,to:C[b-1].actor,signalType:C[b-3],msg:C[b]},{type:"activeEnd",signalType:A.LINETYPE.ACTIVE_END,actor:C[b-4]}];break;case 68:this.$=[C[b-3],C[b-1],{type:"addMessage",from:C[b-3].actor,to:C[b-1].actor,signalType:C[b-2],msg:C[b]}];break;case 69:this.$={type:"addParticipant",actor:C[b]};break;case 70:this.$=A.LINETYPE.SOLID_OPEN;break;case 71:this.$=A.LINETYPE.DOTTED_OPEN;break;case 72:this.$=A.LINETYPE.SOLID;break;case 73:this.$=A.LINETYPE.DOTTED;break;case 74:this.$=A.LINETYPE.SOLID_CROSS;break;case 75:this.$=A.LINETYPE.DOTTED_CROSS;break;case 76:this.$=A.LINETYPE.SOLID_POINT;break;case 77:this.$=A.LINETYPE.DOTTED_POINT;break;case 78:this.$=A.parseMessage(C[b].trim().substring(1));break;case 79:A.parseDirective("%%{","open_directive");break;case 80:A.parseDirective(C[b],"type_directive");break;case 81:C[b]=C[b].trim().replace(/'/g,'"'),A.parseDirective(C[b],"arg_directive");break;case 82:A.parseDirective("}%%","close_directive","sequence");break}},table:[{3:1,4:e,5:i,6:4,7:r,14:6,83:s},{1:[3]},{3:8,4:e,5:i,6:4,7:r,14:6,83:s},{3:9,4:e,5:i,6:4,7:r,14:6,83:s},{3:10,4:e,5:i,6:4,7:r,14:6,83:s},t([1,4,5,19,23,26,28,34,35,36,38,40,41,42,43,44,46,48,50,54,56,57,62,63,64,65,73,83],n,{8:11}),{15:12,84:[1,13]},{84:[2,79]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:f,35:p,36:x,38:E,40:T,41:S,42:_,43:D,44:z,46:H,48:it,50:R,54:F,56:v,57:L,62:w,63:m,64:B,65:g,73:O,83:s},{16:51,17:[1,52],86:y},t([17,86],[2,80]),t(Y,[2,6]),{6:41,10:54,13:18,14:6,19:l,22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:f,35:p,36:x,38:E,40:T,41:S,42:_,43:D,44:z,46:H,48:it,50:R,54:F,56:v,57:L,62:w,63:m,64:B,65:g,73:O,83:s},t(Y,[2,8]),t(Y,[2,9]),t(Y,[2,17]),{20:[1,55]},{5:[1,56]},{5:[1,59],24:[1,57],25:[1,58]},{27:60,73:O},{27:61,73:O},{5:[1,62]},{5:[1,63]},{5:[1,64]},{5:[1,65]},{5:[1,66]},t(Y,[2,31]),t(Y,[2,32]),{37:[1,67]},{39:[1,68]},t(Y,[2,35]),{20:[1,69]},{20:[1,70]},{20:[1,71]},{20:[1,72]},{20:[1,73]},{20:[1,74]},{20:[1,75]},t(Y,[2,43]),{27:76,73:O},{27:77,73:O},{70:78,74:[1,79],75:[1,80],76:[1,81],77:[1,82],78:[1,83],79:[1,84],80:[1,85],81:[1,86]},{58:87,60:[1,88],68:[1,89],69:[1,90]},{27:91,73:O},{27:92,73:O},{27:93,73:O},{27:94,73:O},t([5,55,67,74,75,76,77,78,79,80,81,82],[2,69]),{5:[1,95]},{18:96,85:[1,97]},{5:[2,82]},t(Y,[2,7]),t(wt,[2,10],{11:98}),t(Y,[2,19]),{5:[1,100],24:[1,99]},{5:[1,101]},t(Y,[2,23]),{5:[1,102]},{5:[1,103]},t(Y,[2,26]),t(Y,[2,27]),t(Y,[2,28]),t(Y,[2,29]),t(Y,[2,30]),t(Y,[2,33]),t(Y,[2,34]),t(at,n,{8:104}),t(at,n,{8:105}),t(at,n,{8:106}),t(st,n,{45:107,8:108}),t(nt,n,{47:109,8:110}),t(et,n,{49:111,8:112}),t(at,n,{8:113}),{5:[1,115],55:[1,114]},{5:[1,117],55:[1,116]},{27:120,71:[1,118],72:[1,119],73:O},t(tt,[2,70]),t(tt,[2,71]),t(tt,[2,72]),t(tt,[2,73]),t(tt,[2,74]),t(tt,[2,75]),t(tt,[2,76]),t(tt,[2,77]),{27:121,73:O},{27:123,61:122,73:O},{73:[2,64]},{73:[2,65]},{59:124,82:Tt},{59:126,82:Tt},{59:127,82:Tt},{59:128,82:Tt},t(bt,[2,15]),{16:129,86:y},{86:[2,81]},{4:[1,132],5:[1,134],12:131,13:133,21:[1,130],54:F,56:v},{5:[1,135]},t(Y,[2,21]),t(Y,[2,22]),t(Y,[2,24]),t(Y,[2,25]),{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[1,136],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:f,35:p,36:x,38:E,40:T,41:S,42:_,43:D,44:z,46:H,48:it,50:R,54:F,56:v,57:L,62:w,63:m,64:B,65:g,73:O,83:s},{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[1,137],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:f,35:p,36:x,38:E,40:T,41:S,42:_,43:D,44:z,46:H,48:it,50:R,54:F,56:v,57:L,62:w,63:m,64:B,65:g,73:O,83:s},{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[1,138],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:f,35:p,36:x,38:E,40:T,41:S,42:_,43:D,44:z,46:H,48:it,50:R,54:F,56:v,57:L,62:w,63:m,64:B,65:g,73:O,83:s},{21:[1,139]},{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[2,48],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:f,35:p,36:x,38:E,40:T,41:S,42:_,43:D,44:z,46:H,48:it,50:R,53:[1,140],54:F,56:v,57:L,62:w,63:m,64:B,65:g,73:O,83:s},{21:[1,141]},{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[2,46],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:f,35:p,36:x,38:E,40:T,41:S,42:_,43:D,44:z,46:H,48:it,50:R,52:[1,142],54:F,56:v,57:L,62:w,63:m,64:B,65:g,73:O,83:s},{21:[1,143]},{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[2,44],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:f,35:p,36:x,38:E,40:T,41:S,42:_,43:D,44:z,46:H,48:it,50:R,51:[1,144],54:F,56:v,57:L,62:w,63:m,64:B,65:g,73:O,83:s},{4:a,5:o,6:41,9:14,10:16,13:18,14:6,19:l,21:[1,145],22:20,23:h,26:u,27:44,28:d,29:24,30:25,31:26,32:27,33:28,34:f,35:p,36:x,38:E,40:T,41:S,42:_,43:D,44:z,46:H,48:it,50:R,54:F,56:v,57:L,62:w,63:m,64:B,65:g,73:O,83:s},{20:[1,146]},t(Y,[2,51]),{20:[1,147]},t(Y,[2,53]),{27:148,73:O},{27:149,73:O},{59:150,82:Tt},{59:151,82:Tt},{59:152,82:Tt},{67:[1,153],82:[2,63]},{5:[2,56]},{5:[2,78]},{5:[2,57]},{5:[2,58]},{5:[2,59]},{5:[1,154]},t(Y,[2,18]),t(wt,[2,11]),{13:155,54:F,56:v},t(wt,[2,13]),t(wt,[2,14]),t(Y,[2,20]),t(Y,[2,36]),t(Y,[2,37]),t(Y,[2,38]),t(Y,[2,39]),{20:[1,156]},t(Y,[2,40]),{20:[1,157]},t(Y,[2,41]),{20:[1,158]},t(Y,[2,42]),{5:[1,159]},{5:[1,160]},{59:161,82:Tt},{59:162,82:Tt},{5:[2,68]},{5:[2,54]},{5:[2,55]},{27:163,73:O},t(bt,[2,16]),t(wt,[2,12]),t(st,n,{8:108,45:164}),t(nt,n,{8:110,47:165}),t(et,n,{8:112,49:166}),t(Y,[2,50]),t(Y,[2,52]),{5:[2,66]},{5:[2,67]},{82:[2,62]},{21:[2,49]},{21:[2,47]},{21:[2,45]}],defaultActions:{7:[2,79],8:[2,1],9:[2,2],10:[2,3],53:[2,82],89:[2,64],90:[2,65],97:[2,81],124:[2,56],125:[2,78],126:[2,57],127:[2,58],128:[2,59],150:[2,68],151:[2,54],152:[2,55],161:[2,66],162:[2,67],163:[2,62],164:[2,49],165:[2,47],166:[2,45]},parseError:function($,K){if(K.recoverable)this.trace($);else{var N=new Error($);throw N.hash=K,N}},parse:function($){var K=this,N=[0],A=[],G=[null],C=[],dt=this.table,b="",Jt=0,j=0,Nt=2,At=1,kt=C.slice.call(arguments,1),gt=Object.create(this.lexer),_t={yy:{}};for(var yt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,yt)&&(_t.yy[yt]=this.yy[yt]);gt.setInput($,_t.yy),_t.yy.lexer=gt,_t.yy.parser=this,typeof gt.yylloc>"u"&&(gt.yylloc={});var Ct=gt.yylloc;C.push(Ct);var qe=gt.options&>.options.ranges;typeof _t.yy.parseError=="function"?this.parseError=_t.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ne(){var ut;return ut=A.pop()||gt.lex()||At,typeof ut!="number"&&(ut instanceof Array&&(A=ut,ut=A.pop()),ut=K.symbols_[ut]||ut),ut}for(var se,re,Le,ni,Ye={},ue,Zt,St,Et;;){if(re=N[N.length-1],this.defaultActions[re]?Le=this.defaultActions[re]:((se===null||typeof se>"u")&&(se=Ne()),Le=dt[re]&&dt[re][se]),typeof Le>"u"||!Le.length||!Le[0]){var Dt="";Et=[];for(ue in dt[re])this.terminals_[ue]&&ue>Nt&&Et.push("'"+this.terminals_[ue]+"'");gt.showPosition?Dt="Parse error on line "+(Jt+1)+`:
|
|
1356
|
-
`+gt.showPosition()+`
|
|
1357
|
-
Expecting `+Et.join(", ")+", got '"+(this.terminals_[se]||se)+"'":Dt="Parse error on line "+(Jt+1)+": Unexpected "+(se==At?"end of input":"'"+(this.terminals_[se]||se)+"'"),this.parseError(Dt,{text:gt.match,token:this.terminals_[se]||se,line:gt.yylineno,loc:Ct,expected:Et})}if(Le[0]instanceof Array&&Le.length>1)throw new Error("Parse Error: multiple actions possible at state: "+re+", token: "+se);switch(Le[0]){case 1:N.push(se),G.push(gt.yytext),C.push(gt.yylloc),N.push(Le[1]),se=null,j=gt.yyleng,b=gt.yytext,Jt=gt.yylineno,Ct=gt.yylloc;break;case 2:if(Zt=this.productions_[Le[1]][1],Ye.$=G[G.length-Zt],Ye._$={first_line:C[C.length-(Zt||1)].first_line,last_line:C[C.length-1].last_line,first_column:C[C.length-(Zt||1)].first_column,last_column:C[C.length-1].last_column},qe&&(Ye._$.range=[C[C.length-(Zt||1)].range[0],C[C.length-1].range[1]]),ni=this.performAction.apply(Ye,[b,j,Jt,_t.yy,Le[1],G,C].concat(kt)),typeof ni<"u")return ni;Zt&&(N=N.slice(0,-1*Zt*2),G=G.slice(0,-1*Zt),C=C.slice(0,-1*Zt)),N.push(this.productions_[Le[1]][0]),G.push(Ye.$),C.push(Ye._$),St=dt[N[N.length-2]][N[N.length-1]],N.push(St);break;case 3:return!0}}return!0}},jt=function(){var pt={EOF:1,parseError:function(K,N){if(this.yy.parser)this.yy.parser.parseError(K,N);else throw new Error(K)},setInput:function($,K){return this.yy=K||this.yy||{},this._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},input:function(){var $=this._input[0];this.yytext+=$,this.yyleng++,this.offset++,this.match+=$,this.matched+=$;var K=$.match(/(?:\r\n?|\n).*/g);return K?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),$},unput:function($){var K=$.length,N=$.split(/(?:\r\n?|\n)/g);this._input=$+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-K),this.offset-=K;var A=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),N.length-1&&(this.yylineno-=N.length-1);var G=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:N?(N.length===A.length?this.yylloc.first_column:0)+A[A.length-N.length].length-N[0].length:this.yylloc.first_column-K},this.options.ranges&&(this.yylloc.range=[G[0],G[0]+this.yyleng-K]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1358
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function($){this.unput(this.match.slice($))},pastInput:function(){var $=this.matched.substr(0,this.matched.length-this.match.length);return($.length>20?"...":"")+$.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var $=this.match;return $.length<20&&($+=this._input.substr(0,20-$.length)),($.substr(0,20)+($.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var $=this.pastInput(),K=new Array($.length+1).join("-");return $+this.upcomingInput()+`
|
|
1359
|
-
`+K+"^"},test_match:function($,K){var N,A,G;if(this.options.backtrack_lexer&&(G={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&&(G.yylloc.range=this.yylloc.range.slice(0))),A=$[0].match(/(?:\r\n?|\n).*/g),A&&(this.yylineno+=A.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:A?A[A.length-1].length-A[A.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+$[0].length},this.yytext+=$[0],this.match+=$[0],this.matches=$,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($[0].length),this.matched+=$[0],N=this.performAction.call(this,this.yy,this,K,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),N)return N;if(this._backtrack){for(var C in G)this[C]=G[C];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var $,K,N,A;this._more||(this.yytext="",this.match="");for(var G=this._currentRules(),C=0;C<G.length;C++)if(N=this._input.match(this.rules[G[C]]),N&&(!K||N[0].length>K[0].length)){if(K=N,A=C,this.options.backtrack_lexer){if($=this.test_match(N,G[C]),$!==!1)return $;if(this._backtrack){K=!1;continue}else return!1}else if(!this.options.flex)break}return K?($=this.test_match(K,G[A]),$!==!1?$:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1360
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var K=this.next();return K||this.lex()},begin:function(K){this.conditionStack.push(K)},popState:function(){var K=this.conditionStack.length-1;return K>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(K){return K=this.conditionStack.length-1-Math.abs(K||0),K>=0?this.conditionStack[K]:"INITIAL"},pushState:function(K){this.begin(K)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(K,N,A,G){switch(A){case 0:return this.begin("open_directive"),83;case 1:return this.begin("type_directive"),84;case 2:return this.popState(),this.begin("arg_directive"),17;case 3:return this.popState(),this.popState(),86;case 4:return 85;case 5:return 5;case 6:break;case 7:break;case 8:break;case 9:break;case 10:break;case 11:return 24;case 12:return this.begin("LINE"),19;case 13:return this.begin("ID"),54;case 14:return this.begin("ID"),56;case 15:return N.yytext=N.yytext.trim(),this.begin("ALIAS"),73;case 16:return this.popState(),this.popState(),this.begin("LINE"),55;case 17:return this.popState(),this.popState(),5;case 18:return this.begin("LINE"),41;case 19:return this.begin("LINE"),42;case 20:return this.begin("LINE"),43;case 21:return this.begin("LINE"),44;case 22:return this.begin("LINE"),53;case 23:return this.begin("LINE"),46;case 24:return this.begin("LINE"),52;case 25:return this.begin("LINE"),48;case 26:return this.begin("LINE"),51;case 27:return this.begin("LINE"),50;case 28:return this.popState(),20;case 29:return 21;case 30:return 68;case 31:return 69;case 32:return 62;case 33:return 63;case 34:return 64;case 35:return 65;case 36:return 60;case 37:return 57;case 38:return this.begin("ID"),26;case 39:return this.begin("ID"),28;case 40:return 34;case 41:return 35;case 42:return this.begin("acc_title"),36;case 43:return this.popState(),"acc_title_value";case 44:return this.begin("acc_descr"),38;case 45:return this.popState(),"acc_descr_value";case 46:this.begin("acc_descr_multiline");break;case 47:this.popState();break;case 48:return"acc_descr_multiline_value";case 49:return 7;case 50:return 23;case 51:return 25;case 52:return 67;case 53:return 5;case 54:return N.yytext=N.yytext.trim(),73;case 55:return 76;case 56:return 77;case 57:return 74;case 58:return 75;case 59:return 78;case 60:return 79;case 61:return 80;case 62:return 81;case 63:return 82;case 64:return 71;case 65:return 72;case 66:return 5;case 67:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/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,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[47,48],inclusive:!1},acc_descr:{rules:[45],inclusive:!1},acc_title:{rules:[43],inclusive:!1},open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,15],inclusive:!1},ALIAS:{rules:[7,8,16,17],inclusive:!1},LINE:{rules:[7,8,28],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,12,13,14,18,19,20,21,22,23,24,25,26,27,29,30,31,32,33,34,35,36,37,38,39,40,41,42,44,46,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};return pt}();Z.lexer=jt;function U(){this.yy={}}return U.prototype=Z,Z.Parser=U,new U}();Zl.parser=Zl;const Q3=Zl,J3=t=>t.match(/^\s*sequenceDiagram/)!==null;let la,Fs={},Cn=[],Pr=[],fo=!1,Hl,ys;const $3=function(t,e,i){si.parseDirective(this,t,e,i)},t4=function(t){Cn.push({name:t.text,wrap:t.wrap===void 0&&en()||!!t.wrap,fill:t.color,actorKeys:[]}),ys=Cn.slice(-1)[0]},Gl=function(t,e,i,r){let s=ys;const n=Fs[t];if(n){if(ys&&n.box&&ys!==n.box)throw new Error("A same participant should only be defined in one Box: "+n.name+" can't be in '"+n.box.name+"' and in '"+ys.name+"' at the same time.");if(s=n.box?n.box:ys,n.box=s,n&&e===n.name&&i==null)return}(i==null||i.text==null)&&(i={text:e,wrap:null,type:r}),(r==null||i.text==null)&&(i={text:e,wrap:null,type:r}),Fs[t]={box:s,name:e,description:i.text,wrap:i.wrap===void 0&&en()||!!i.wrap,prevActor:la,links:{},properties:{},actorCnt:null,rectData:null,type:r||"participant"},la&&Fs[la]&&(Fs[la].nextActor=t),ys&&ys.actorKeys.push(t),la=t},e4=t=>{let e,i=0;for(e=0;e<Pr.length;e++)Pr[e].type===ha.ACTIVE_START&&Pr[e].from.actor===t&&i++,Pr[e].type===ha.ACTIVE_END&&Pr[e].from.actor===t&&i--;return i},i4=function(t,e,i,r){Pr.push({from:t,to:e,message:i.text,wrap:i.wrap===void 0&&en()||!!i.wrap,answer:r})},mi=function(t,e,i={text:void 0,wrap:void 0},r){if(r===ha.ACTIVE_END&&e4(t.actor)<1){let n=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw n.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},n}return Pr.push({from:t,to:e,message:i.text,wrap:i.wrap===void 0&&en()||!!i.wrap,type:r}),!0},r4=function(){return Cn.length>0},s4=function(){return Cn.some(t=>t.name)},n4=function(){return Pr},a4=function(){return Cn},o4=function(){return Fs},ca=function(t){return Fs[t]},l4=function(){return Object.keys(Fs)},c4=function(){fo=!0},h4=function(){fo=!1},u4=()=>fo,d4=function(t){Hl=t},en=()=>Hl!==void 0?Hl:P().sequence.wrap,f4=function(){Fs={},Cn=[],Pr=[],fo=!1,ar()},p4=function(t){const e=t.trim(),i={text:e.replace(/^:?(?:no)?wrap:/,"").trim(),wrap:e.match(/^:?wrap:/)!==null?!0:e.match(/^:?nowrap:/)!==null?!1:void 0};return k.debug("parseMessage:",i),i},g4=function(t){const e=t.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);let i=e!=null&&e[1]?e[1].trim():"transparent",r=e!=null&&e[2]?e[2].trim():void 0;if(window&&window.CSS)window.CSS.supports("color",i)||(i="transparent",r=t.trim());else{const n=new Option().style;n.color=i,n.color!==i&&(i="transparent",r=t.trim())}return{color:i,text:r!==void 0?je(r.replace(/^:?(?:no)?wrap:/,""),P()):void 0,wrap:r!==void 0?r.match(/^:?wrap:/)!==null?!0:r.match(/^:?nowrap:/)!==null?!1:void 0:void 0}},ha={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31},y4={FILLED:0,OPEN:1},m4={LEFTOF:0,RIGHTOF:1,OVER:2},D0=function(t,e,i){i.text,i.wrap===void 0&&en()||i.wrap;const r=[].concat(t,t);Pr.push({from:r[0],to:r[1],message:i.text,wrap:i.wrap===void 0&&en()||!!i.wrap,type:ha.NOTE,placement:e})},I0=function(t,e){const i=ca(t);try{let r=je(e.text,P());r=r.replace(/&/g,"&"),r=r.replace(/=/g,"=");const s=JSON.parse(r);jl(i,s)}catch(r){k.error("error while parsing actor link text",r)}},b4=function(t,e){const i=ca(t);try{const a={};let o=je(e.text,P());var r=o.indexOf("@");o=o.replace(/&/g,"&"),o=o.replace(/=/g,"=");var s=o.slice(0,r-1).trim(),n=o.slice(r+1).trim();a[s]=n,jl(i,a)}catch(a){k.error("error while parsing actor link text",a)}};function jl(t,e){if(t.links==null)t.links=e;else for(let i in e)t.links[i]=e[i]}const R0=function(t,e){const i=ca(t);try{let r=je(e.text,P());const s=JSON.parse(r);N0(i,s)}catch(r){k.error("error while parsing actor properties text",r)}};function N0(t,e){if(t.properties==null)t.properties=e;else for(let i in e)t.properties[i]=e[i]}function x4(){ys=void 0}const O0=function(t,e){const i=ca(t),r=document.getElementById(e.text);try{const s=r.innerHTML,n=JSON.parse(s);n.properties&&N0(i,n.properties),n.links&&jl(i,n.links)}catch(s){k.error("error while parsing actor details text",s)}},k4=function(t,e){if(t!==void 0&&t.properties!==void 0)return t.properties[e]},F0=function(t){if(Array.isArray(t))t.forEach(function(e){F0(e)});else switch(t.type){case"sequenceIndex":Pr.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":Gl(t.actor,t.actor,t.description,"participant");break;case"addActor":Gl(t.actor,t.actor,t.description,"actor");break;case"activeStart":mi(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":mi(t.actor,void 0,void 0,t.signalType);break;case"addNote":D0(t.actor,t.placement,t.text);break;case"addLinks":I0(t.actor,t.text);break;case"addALink":b4(t.actor,t.text);break;case"addProperties":R0(t.actor,t.text);break;case"addDetails":O0(t.actor,t.text);break;case"addMessage":mi(t.from,t.to,t.msg,t.signalType);break;case"boxStart":t4(t.boxData);break;case"boxEnd":x4();break;case"loopStart":mi(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":mi(void 0,void 0,void 0,t.signalType);break;case"rectStart":mi(void 0,void 0,t.color,t.signalType);break;case"rectEnd":mi(void 0,void 0,void 0,t.signalType);break;case"optStart":mi(void 0,void 0,t.optText,t.signalType);break;case"optEnd":mi(void 0,void 0,void 0,t.signalType);break;case"altStart":mi(void 0,void 0,t.altText,t.signalType);break;case"else":mi(void 0,void 0,t.altText,t.signalType);break;case"altEnd":mi(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":or(t.text);break;case"parStart":mi(void 0,void 0,t.parText,t.signalType);break;case"and":mi(void 0,void 0,t.parText,t.signalType);break;case"parEnd":mi(void 0,void 0,void 0,t.signalType);break;case"criticalStart":mi(void 0,void 0,t.criticalText,t.signalType);break;case"option":mi(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":mi(void 0,void 0,void 0,t.signalType);break;case"breakStart":mi(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":mi(void 0,void 0,void 0,t.signalType);break}},M0={addActor:Gl,addMessage:i4,addSignal:mi,addLinks:I0,addDetails:O0,addProperties:R0,autoWrap:en,setWrap:d4,enableSequenceNumbers:c4,disableSequenceNumbers:h4,showSequenceNumbers:u4,getMessages:n4,getActors:o4,getActor:ca,getActorKeys:l4,getActorProperty:k4,getAccTitle:fr,getBoxes:a4,getDiagramTitle:Rr,setDiagramTitle:Ir,parseDirective:$3,getConfig:()=>P().sequence,clear:f4,parseMessage:p4,parseBoxData:g4,LINETYPE:ha,ARROWTYPE:y4,PLACEMENT:m4,addNote:D0,setAccTitle:or,apply:F0,setAccDescription:pr,getAccDescription:gr,hasAtLeastOneBox:r4,hasAtLeastOneBoxWithTitle:s4};let ql=[];const _4=t=>{ql.push(t)},P0=()=>{ql.forEach(t=>{t()}),ql=[]},po=function(t,e){const i=t.append("rect");return i.attr("x",e.x),i.attr("y",e.y),i.attr("fill",e.fill),i.attr("stroke",e.stroke),i.attr("width",e.width),i.attr("height",e.height),i.attr("rx",e.rx),i.attr("ry",e.ry),e.class!==void 0&&i.attr("class",e.class),i},V0=(t,e)=>{_4(()=>{const i=document.querySelectorAll(t);i.length!==0&&(i[0].addEventListener("mouseover",function(){T4("actor"+e+"_popup")}),i[0].addEventListener("mouseout",function(){S4("actor"+e+"_popup")}))})},E4=function(t,e,i,r,s){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};const n=e.links,a=e.actorCnt,o=e.rectData;var l="none";s&&(l="block !important");const h=t.append("g");h.attr("id","actor"+a+"_popup"),h.attr("class","actorPopupMenu"),h.attr("display",l),V0("#actor"+a+"_popup",a);var u="";o.class!==void 0&&(u=" "+o.class);let d=o.width>i?o.width:i;const f=h.append("rect");if(f.attr("class","actorPopupMenuPanel"+u),f.attr("x",o.x),f.attr("y",o.height),f.attr("fill",o.fill),f.attr("stroke",o.stroke),f.attr("width",d),f.attr("height",o.height),f.attr("rx",o.rx),f.attr("ry",o.ry),n!=null){var p=20;for(let T in n){var x=h.append("a"),E=(0,qi.Nm)(n[T]);x.attr("xlink:href",E),x.attr("target","_blank"),z4(r)(T,x,o.x+10,o.height+p,d,20,{class:"actor"},r),p+=30}}return f.attr("height",p),{height:o.height+p,width:d}},Y0=function(t,e,i,r){const s=t.append("image");s.attr("x",e),s.attr("y",i);var n=(0,qi.Nm)(r);s.attr("xlink:href",n)},z0=function(t,e,i,r){const s=t.append("use");s.attr("x",e),s.attr("y",i);var n=(0,qi.Nm)(r);s.attr("xlink:href","#"+n)},v4=function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'block'; }"},C4=function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'none'; }"},T4=function(t){var e=document.getElementById(t);e!=null&&(e.style.display="block")},S4=function(t){var e=document.getElementById(t);e!=null&&(e.style.display="none")},Tn=function(t,e){let i=0,r=0;const s=e.text.split(Qt.lineBreakRegex),[n,a]=On(e.fontSize);let o=[],l=0,h=()=>e.y;if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":h=()=>Math.round(e.y+e.textMargin);break;case"middle":case"center":h=()=>Math.round(e.y+(i+r+e.textMargin)/2);break;case"bottom":case"end":h=()=>Math.round(e.y+(i+r+2*e.textMargin)-e.textMargin);break}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle";break}for(let[u,d]of s.entries()){e.textMargin!==void 0&&e.textMargin===0&&n!==void 0&&(l=u*n);const f=t.append("text");if(f.attr("x",e.x),f.attr("y",h()),e.anchor!==void 0&&f.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&f.style("font-family",e.fontFamily),a!==void 0&&f.style("font-size",a),e.fontWeight!==void 0&&f.style("font-weight",e.fontWeight),e.fill!==void 0&&f.attr("fill",e.fill),e.class!==void 0&&f.attr("class",e.class),e.dy!==void 0?f.attr("dy",e.dy):l!==0&&f.attr("dy",l),e.tspan){const p=f.append("tspan");p.attr("x",e.x),e.fill!==void 0&&p.attr("fill",e.fill),p.text(d)}else f.text(d);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(r+=(f._groups||f)[0][0].getBBox().height,i=r),o.push(f)}return o},W0=function(t,e){function i(s,n,a,o,l){return s+","+n+" "+(s+a)+","+n+" "+(s+a)+","+(n+o-l)+" "+(s+a-l*1.2)+","+(n+o)+" "+s+","+(n+o)}const r=t.append("polygon");return r.attr("points",i(e.x,e.y,e.width,e.height,7)),r.attr("class","labelBox"),e.y=e.y+e.height/2,Tn(t,e),r};let Qr=-1;const U0=(t,e)=>{t.selectAll&&t.selectAll(".actor-line").attr("class","200").attr("y2",e-55)},w4=function(t,e,i,r){const s=e.x+e.width/2,n=e.y+5,a=t.append("g");var o=a;r||(Qr++,o.append("line").attr("id","actor"+Qr).attr("x1",s).attr("y1",n).attr("x2",s).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"),o=a.append("g"),e.actorCnt=Qr,e.links!=null&&(o.attr("id","root-"+Qr),V0("#root-"+Qr,Qr)));const l=go();var h="actor";e.properties!=null&&e.properties.class?h=e.properties.class:l.fill="#eaeaea",l.x=e.x,l.y=e.y,l.width=e.width,l.height=e.height,l.class=h,l.rx=3,l.ry=3;const u=po(o,l);if(e.rectData=l,e.properties!=null&&e.properties.icon){const f=e.properties.icon.trim();f.charAt(0)==="@"?z0(o,l.x+l.width-20,l.y+10,f.substr(1)):Y0(o,l.x+l.width-20,l.y+10,f)}Kl(i)(e.description,o,l.x,l.y,l.width,l.height,{class:"actor"},i);let d=e.height;if(u.node){const f=u.node().getBBox();e.height=f.height,d=f.height}return d},A4=function(t,e,i,r){const s=e.x+e.width/2,n=e.y+80;r||(Qr++,t.append("line").attr("id","actor"+Qr).attr("x1",s).attr("y1",n).attr("x2",s).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));const a=t.append("g");a.attr("class","actor-man");const o=go();o.x=e.x,o.y=e.y,o.fill="#eaeaea",o.width=e.width,o.height=e.height,o.class="actor",o.rx=3,o.ry=3,a.append("line").attr("id","actor-man-torso"+Qr).attr("x1",s).attr("y1",e.y+25).attr("x2",s).attr("y2",e.y+45),a.append("line").attr("id","actor-man-arms"+Qr).attr("x1",s-18).attr("y1",e.y+33).attr("x2",s+18).attr("y2",e.y+33),a.append("line").attr("x1",s-18).attr("y1",e.y+60).attr("x2",s).attr("y2",e.y+45),a.append("line").attr("x1",s).attr("y1",e.y+45).attr("x2",s+16).attr("y2",e.y+60);const l=a.append("circle");l.attr("cx",e.x+e.width/2),l.attr("cy",e.y+10),l.attr("r",15),l.attr("width",e.width),l.attr("height",e.height);const h=a.node().getBBox();return e.height=h.height,Kl(i)(e.description,a,o.x,o.y+35,o.width,o.height,{class:"actor"},i),e.height},L4=function(t,e,i,r){switch(e.type){case"actor":return A4(t,e,i,r);case"participant":return w4(t,e,i,r)}},B4=function(t,e,i){const s=t.append("g");Z0(s,e),e.name&&Kl(i)(e.name,s,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},i),s.lower()},D4=function(t){return t.append("g")},I4=function(t,e,i,r,s){const n=go(),a=e.anchored;n.x=e.startx,n.y=e.starty,n.class="activation"+s%3,n.width=e.stopx-e.startx,n.height=i-e.starty,po(a,n)},R4=function(t,e,i,r){const{boxMargin:s,boxTextMargin:n,labelBoxHeight:a,labelBoxWidth:o,messageFontFamily:l,messageFontSize:h,messageFontWeight:u}=r,d=t.append("g"),f=function(E,T,S,_){return d.append("line").attr("x1",E).attr("y1",T).attr("x2",S).attr("y2",_).attr("class","loopLine")};f(e.startx,e.starty,e.stopx,e.starty),f(e.stopx,e.starty,e.stopx,e.stopy),f(e.startx,e.stopy,e.stopx,e.stopy),f(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0&&e.sections.forEach(function(E){f(e.startx,E.y,e.stopx,E.y).style("stroke-dasharray","3, 3")});let p=Xl();p.text=i,p.x=e.startx,p.y=e.starty,p.fontFamily=l,p.fontSize=h,p.fontWeight=u,p.anchor="middle",p.valign="middle",p.tspan=!1,p.width=o||50,p.height=a||20,p.textMargin=n,p.class="labelText",W0(d,p),p=Xl(),p.text=e.title,p.x=e.startx+o/2+(e.stopx-e.startx)/2,p.y=e.starty+s+n,p.anchor="middle",p.valign="middle",p.textMargin=n,p.class="loopText",p.fontFamily=l,p.fontSize=h,p.fontWeight=u,p.wrap=!0;let x=Tn(d,p);return e.sectionTitles!==void 0&&e.sectionTitles.forEach(function(E,T){if(E.message){p.text=E.message,p.x=e.startx+(e.stopx-e.startx)/2,p.y=e.sections[T].y+s+n,p.class="loopText",p.anchor="middle",p.valign="middle",p.tspan=!1,p.fontFamily=l,p.fontSize=h,p.fontWeight=u,p.wrap=e.wrap,x=Tn(d,p);let S=Math.round(x.map(_=>(_._groups||_)[0][0].getBBox().height).reduce((_,D)=>_+D));e.sections[T].height+=S-(s+n)}}),e.height=Math.round(e.stopy-e.starty),d},Z0=function(t,e){po(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},N4=function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},O4=function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},F4=function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},M4=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},P4=function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},V4=function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},Y4=function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},Xl=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},go=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},Kl=function(){function t(s,n,a,o,l,h,u){const d=n.append("text").attr("x",a+l/2).attr("y",o+h/2+5).style("text-anchor","middle").text(s);r(d,u)}function e(s,n,a,o,l,h,u,d){const{actorFontSize:f,actorFontFamily:p,actorFontWeight:x}=d,[E,T]=On(f),S=s.split(Qt.lineBreakRegex);for(let _=0;_<S.length;_++){const D=_*E-E*(S.length-1)/2,z=n.append("text").attr("x",a+l/2).attr("y",o).style("text-anchor","middle").style("font-size",T).style("font-weight",x).style("font-family",p);z.append("tspan").attr("x",a+l/2).attr("dy",D).text(S[_]),z.attr("y",o+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(z,u)}}function i(s,n,a,o,l,h,u,d){const f=n.append("switch"),x=f.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");x.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(s),e(s,f,a,o,l,h,u,d),r(x,u)}function r(s,n){for(const a in n)n.hasOwnProperty(a)&&s.attr(a,n[a])}return function(s){return s.textPlacement==="fo"?i:s.textPlacement==="old"?t:e}}(),z4=function(){function t(s,n,a,o,l,h,u){const d=n.append("text").attr("x",a).attr("y",o).style("text-anchor","start").text(s);r(d,u)}function e(s,n,a,o,l,h,u,d){const{actorFontSize:f,actorFontFamily:p,actorFontWeight:x}=d,E=s.split(Qt.lineBreakRegex);for(let T=0;T<E.length;T++){const S=T*f-f*(E.length-1)/2,_=n.append("text").attr("x",a).attr("y",o).style("text-anchor","start").style("font-size",f).style("font-weight",x).style("font-family",p);_.append("tspan").attr("x",a).attr("dy",S).text(E[T]),_.attr("y",o+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(_,u)}}function i(s,n,a,o,l,h,u,d){const f=n.append("switch"),x=f.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");x.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(s),e(s,f,a,o,l,h,u,d),r(x,u)}function r(s,n){for(const a in n)n.hasOwnProperty(a)&&s.attr(a,n[a])}return function(s){return s.textPlacement==="fo"?i:s.textPlacement==="old"?t:e}}(),oi={drawRect:po,drawText:Tn,drawLabel:W0,drawActor:L4,drawBox:B4,drawPopup:E4,drawImage:Y0,drawEmbeddedImage:z0,anchorElement:D4,drawActivation:I4,drawLoop:R4,drawBackgroundRect:Z0,insertArrowHead:M4,insertArrowFilledHead:P4,insertSequenceNumber:V4,insertArrowCrossHead:Y4,insertDatabaseIcon:N4,insertComputerIcon:O4,insertClockIcon:F4,getTextObj:Xl,getNoteRect:go,popupMenu:v4,popdownMenu:C4,fixLifeLineHeights:U0,sanitizeUrl:qi.Nm};let q={};const Lt={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(t=>t.height||0))+(this.loops.length===0?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.messages.length===0?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.notes.length===0?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},clear:function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},addBox:function(t){this.boxes.push(t)},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],boxes:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,G0(P())},updateVal:function(t,e,i,r){t[e]===void 0?t[e]=i:t[e]=r(i,t[e])},updateBounds:function(t,e,i,r){const s=this;let n=0;function a(o){return function(h){n++;const u=s.sequenceItems.length-n+1;s.updateVal(h,"starty",e-u*q.boxMargin,Math.min),s.updateVal(h,"stopy",r+u*q.boxMargin,Math.max),s.updateVal(Lt.data,"startx",t-u*q.boxMargin,Math.min),s.updateVal(Lt.data,"stopx",i+u*q.boxMargin,Math.max),o!=="activation"&&(s.updateVal(h,"startx",t-u*q.boxMargin,Math.min),s.updateVal(h,"stopx",i+u*q.boxMargin,Math.max),s.updateVal(Lt.data,"starty",e-u*q.boxMargin,Math.min),s.updateVal(Lt.data,"stopy",r+u*q.boxMargin,Math.max))}}this.sequenceItems.forEach(a()),this.activations.forEach(a("activation"))},insert:function(t,e,i,r){const s=Math.min(t,i),n=Math.max(t,i),a=Math.min(e,r),o=Math.max(e,r);this.updateVal(Lt.data,"startx",s,Math.min),this.updateVal(Lt.data,"starty",a,Math.min),this.updateVal(Lt.data,"stopx",n,Math.max),this.updateVal(Lt.data,"stopy",o,Math.max),this.updateBounds(s,a,n,o)},newActivation:function(t,e,i){const r=i[t.from.actor],s=yo(t.from.actor).length||0,n=r.x+r.width/2+(s-1)*q.activationWidth/2;this.activations.push({startx:n,starty:this.verticalPos+2,stopx:n+q.activationWidth,stopy:void 0,actor:t.from.actor,anchored:oi.anchorElement(e)})},endActivation:function(t){const e=this.activations.map(function(i){return i.actor}).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:Lt.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},W4=function(t,e){Lt.bumpVerticalPos(q.boxMargin),e.height=q.boxMargin,e.starty=Lt.getVerticalPos();const i=oi.getNoteRect();i.x=e.startx,i.y=e.starty,i.width=e.width||q.width,i.class="note";const r=t.append("g"),s=oi.drawRect(r,i),n=oi.getTextObj();n.x=e.startx,n.y=e.starty,n.width=i.width,n.dy="1em",n.text=e.message,n.class="noteText",n.fontFamily=q.noteFontFamily,n.fontSize=q.noteFontSize,n.fontWeight=q.noteFontWeight,n.anchor=q.noteAlign,n.textMargin=q.noteMargin,n.valign="center";const a=Tn(r,n),o=Math.round(a.map(l=>(l._groups||l)[0][0].getBBox().height).reduce((l,h)=>l+h));s.attr("height",o+2*q.noteMargin),e.height+=o+2*q.noteMargin,Lt.bumpVerticalPos(o+2*q.noteMargin),e.stopy=e.starty+o+2*q.noteMargin,e.stopx=e.startx+i.width,Lt.insert(e.startx,e.starty,e.stopx,e.stopy),Lt.models.addNote(e)},rn=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),Sn=t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),Ql=t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight});function U4(t,e){Lt.bumpVerticalPos(10);const{startx:i,stopx:r,message:s}=e,n=Qt.splitBreaks(s).length,a=ke.calculateTextDimensions(s,rn(q)),o=a.height/n;e.height+=o,Lt.bumpVerticalPos(o);let l,h=a.height-10;const u=a.width;if(i===r){l=Lt.getVerticalPos()+h,q.rightAngles||(h+=q.boxMargin,l=Lt.getVerticalPos()+h),h+=30;const d=Math.max(u/2,q.width/2);Lt.insert(i-d,Lt.getVerticalPos()-10+h,r+d,Lt.getVerticalPos()+30+h)}else h+=q.boxMargin,l=Lt.getVerticalPos()+h,Lt.insert(i,l-10,r,l);return Lt.bumpVerticalPos(h),e.height+=h,e.stopy=e.starty+e.height,Lt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),l}const Z4=function(t,e,i,r){const{startx:s,stopx:n,starty:a,message:o,type:l,sequenceIndex:h,sequenceVisible:u}=e,d=ke.calculateTextDimensions(o,rn(q)),f=oi.getTextObj();f.x=s,f.y=a+10,f.width=n-s,f.class="messageText",f.dy="1em",f.text=o,f.fontFamily=q.messageFontFamily,f.fontSize=q.messageFontSize,f.fontWeight=q.messageFontWeight,f.anchor=q.messageAlign,f.valign="center",f.textMargin=q.wrapPadding,f.tspan=!1,Tn(t,f);const p=d.width;let x;s===n?q.rightAngles?x=t.append("path").attr("d",`M ${s},${i} H ${s+Math.max(q.width/2,p/2)} V ${i+25} H ${s}`):x=t.append("path").attr("d","M "+s+","+i+" C "+(s+60)+","+(i-10)+" "+(s+60)+","+(i+30)+" "+s+","+(i+20)):(x=t.append("line"),x.attr("x1",s),x.attr("y1",i),x.attr("x2",n),x.attr("y2",i)),l===r.db.LINETYPE.DOTTED||l===r.db.LINETYPE.DOTTED_CROSS||l===r.db.LINETYPE.DOTTED_POINT||l===r.db.LINETYPE.DOTTED_OPEN?(x.style("stroke-dasharray","3, 3"),x.attr("class","messageLine1")):x.attr("class","messageLine0");let E="";q.arrowMarkerAbsolute&&(E=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,E=E.replace(/\(/g,"\\("),E=E.replace(/\)/g,"\\)")),x.attr("stroke-width",2),x.attr("stroke","none"),x.style("fill","none"),(l===r.db.LINETYPE.SOLID||l===r.db.LINETYPE.DOTTED)&&x.attr("marker-end","url("+E+"#arrowhead)"),(l===r.db.LINETYPE.SOLID_POINT||l===r.db.LINETYPE.DOTTED_POINT)&&x.attr("marker-end","url("+E+"#filled-head)"),(l===r.db.LINETYPE.SOLID_CROSS||l===r.db.LINETYPE.DOTTED_CROSS)&&x.attr("marker-end","url("+E+"#crosshead)"),(u||q.showSequenceNumbers)&&(x.attr("marker-start","url("+E+"#sequencenumber)"),t.append("text").attr("x",s).attr("y",i+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(h))},Jl=function(t,e,i,r,s,n,a){if(s.hideUnusedParticipants===!0){const d=new Set;n.forEach(f=>{d.add(f.from),d.add(f.to)}),i=i.filter(f=>d.has(f))}let o=0,l=0,h=0,u;for(const d of i){const f=e[d],p=f.box;u&&u!=p&&(a||Lt.models.addBox(u),l+=q.boxMargin+u.margin),p&&p!=u&&(a||(p.x=o+l,p.y=r),l+=p.margin),f.width=f.width||q.width,f.height=Math.max(f.height||q.height,q.height),f.margin=f.margin||q.actorMargin,f.x=o+l,f.y=Lt.getVerticalPos();const x=oi.drawActor(t,f,q,a);h=Math.max(h,x),Lt.insert(f.x,r,f.x+f.width,f.height),o+=f.width+l,f.box&&(f.box.width=o+p.margin-f.box.x),l=f.margin,u=f.box,Lt.models.addActor(f)}u&&!a&&Lt.models.addBox(u),Lt.bumpVerticalPos(h)},H0=function(t,e,i,r){let s=0,n=0;for(const a of i){const o=e[a],l=j4(o),h=oi.drawPopup(t,o,l,q,q.forceMenus,r);h.height>s&&(s=h.height),h.width+o.x>n&&(n=h.width+o.x)}return{maxHeight:s,maxWidth:n}},G0=function(t){Ni(q,t),t.fontFamily&&(q.actorFontFamily=q.noteFontFamily=q.messageFontFamily=t.fontFamily),t.fontSize&&(q.actorFontSize=q.noteFontSize=q.messageFontSize=t.fontSize),t.fontWeight&&(q.actorFontWeight=q.noteFontWeight=q.messageFontWeight=t.fontWeight)},yo=function(t){return Lt.activations.filter(function(e){return e.actor===t})},j0=function(t,e){const i=e[t],r=yo(t),s=r.reduce(function(a,o){return Math.min(a,o.startx)},i.x+i.width/2),n=r.reduce(function(a,o){return Math.max(a,o.stopx)},i.x+i.width/2);return[s,n]};function Jr(t,e,i,r,s){Lt.bumpVerticalPos(i);let n=r;if(e.id&&e.message&&t[e.id]){const a=t[e.id].width,o=rn(q);e.message=ke.wrapLabel(`[${e.message}]`,a-2*q.wrapPadding,o),e.width=a,e.wrap=!0;const l=ke.calculateTextDimensions(e.message,o),h=Math.max(l.height,q.labelBoxHeight);n=r+h,k.debug(`${h} - ${e.message}`)}s(e),Lt.bumpVerticalPos(n)}const H4=function(t,e,i,r){const{securityLevel:s,sequence:n}=P();q=n,r.db.clear(),r.parser.parse(t);let a;s==="sandbox"&&(a=(0,Q.Ys)("#i"+e));const o=s==="sandbox"?(0,Q.Ys)(a.nodes()[0].contentDocument.body):(0,Q.Ys)("body"),l=s==="sandbox"?a.nodes()[0].contentDocument:document;Lt.init(),k.debug(r.db);const h=s==="sandbox"?o.select(`[id="${e}"]`):(0,Q.Ys)(`[id="${e}"]`),u=r.db.getActors(),d=r.db.getBoxes(),f=r.db.getActorKeys(),p=r.db.getMessages(),x=r.db.getDiagramTitle(),E=r.db.hasAtLeastOneBox(),T=r.db.hasAtLeastOneBoxWithTitle(),S=G4(u,p,r);q.height=q4(u,S,d),oi.insertComputerIcon(h),oi.insertDatabaseIcon(h),oi.insertClockIcon(h),E&&(Lt.bumpVerticalPos(q.boxMargin),T&&Lt.bumpVerticalPos(d[0].textMaxHeight)),Jl(h,u,f,0,q,p,!1);const _=Q4(p,u,S,r);oi.insertArrowHead(h),oi.insertArrowCrossHead(h),oi.insertArrowFilledHead(h),oi.insertSequenceNumber(h);function D(O,y){const Y=Lt.endActivation(O);Y.starty+18>y&&(Y.starty=y-6,y+=12),oi.drawActivation(h,Y,y,q,yo(O.from.actor).length),Lt.insert(Y.startx,y-10,Y.stopx,y)}let z=1,H=1;const it=[];p.forEach(function(O){let y,Y,wt;switch(O.type){case r.db.LINETYPE.NOTE:Y=O.noteModel,W4(h,Y);break;case r.db.LINETYPE.ACTIVE_START:Lt.newActivation(O,h,u);break;case r.db.LINETYPE.ACTIVE_END:D(O,Lt.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:Jr(_,O,q.boxMargin,q.boxMargin+q.boxTextMargin,at=>Lt.newLoop(at));break;case r.db.LINETYPE.LOOP_END:y=Lt.endLoop(),oi.drawLoop(h,y,"loop",q),Lt.bumpVerticalPos(y.stopy-Lt.getVerticalPos()),Lt.models.addLoop(y);break;case r.db.LINETYPE.RECT_START:Jr(_,O,q.boxMargin,q.boxMargin,at=>Lt.newLoop(void 0,at.message));break;case r.db.LINETYPE.RECT_END:y=Lt.endLoop(),oi.drawBackgroundRect(h,y),Lt.models.addLoop(y),Lt.bumpVerticalPos(y.stopy-Lt.getVerticalPos());break;case r.db.LINETYPE.OPT_START:Jr(_,O,q.boxMargin,q.boxMargin+q.boxTextMargin,at=>Lt.newLoop(at));break;case r.db.LINETYPE.OPT_END:y=Lt.endLoop(),oi.drawLoop(h,y,"opt",q),Lt.bumpVerticalPos(y.stopy-Lt.getVerticalPos()),Lt.models.addLoop(y);break;case r.db.LINETYPE.ALT_START:Jr(_,O,q.boxMargin,q.boxMargin+q.boxTextMargin,at=>Lt.newLoop(at));break;case r.db.LINETYPE.ALT_ELSE:Jr(_,O,q.boxMargin+q.boxTextMargin,q.boxMargin,at=>Lt.addSectionToLoop(at));break;case r.db.LINETYPE.ALT_END:y=Lt.endLoop(),oi.drawLoop(h,y,"alt",q),Lt.bumpVerticalPos(y.stopy-Lt.getVerticalPos()),Lt.models.addLoop(y);break;case r.db.LINETYPE.PAR_START:Jr(_,O,q.boxMargin,q.boxMargin+q.boxTextMargin,at=>Lt.newLoop(at));break;case r.db.LINETYPE.PAR_AND:Jr(_,O,q.boxMargin+q.boxTextMargin,q.boxMargin,at=>Lt.addSectionToLoop(at));break;case r.db.LINETYPE.PAR_END:y=Lt.endLoop(),oi.drawLoop(h,y,"par",q),Lt.bumpVerticalPos(y.stopy-Lt.getVerticalPos()),Lt.models.addLoop(y);break;case r.db.LINETYPE.AUTONUMBER:z=O.message.start||z,H=O.message.step||H,O.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:Jr(_,O,q.boxMargin,q.boxMargin+q.boxTextMargin,at=>Lt.newLoop(at));break;case r.db.LINETYPE.CRITICAL_OPTION:Jr(_,O,q.boxMargin+q.boxTextMargin,q.boxMargin,at=>Lt.addSectionToLoop(at));break;case r.db.LINETYPE.CRITICAL_END:y=Lt.endLoop(),oi.drawLoop(h,y,"critical",q),Lt.bumpVerticalPos(y.stopy-Lt.getVerticalPos()),Lt.models.addLoop(y);break;case r.db.LINETYPE.BREAK_START:Jr(_,O,q.boxMargin,q.boxMargin+q.boxTextMargin,at=>Lt.newLoop(at));break;case r.db.LINETYPE.BREAK_END:y=Lt.endLoop(),oi.drawLoop(h,y,"break",q),Lt.bumpVerticalPos(y.stopy-Lt.getVerticalPos()),Lt.models.addLoop(y);break;default:try{wt=O.msgModel,wt.starty=Lt.getVerticalPos(),wt.sequenceIndex=z,wt.sequenceVisible=r.db.showSequenceNumbers();const at=U4(h,wt);it.push({messageModel:wt,lineStartY:at}),Lt.models.addMessage(wt)}catch(at){k.error("error while drawing message",at)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT].includes(O.type)&&(z=z+H)}),it.forEach(O=>Z4(h,O.messageModel,O.lineStartY,r)),q.mirrorActors&&(Lt.bumpVerticalPos(q.boxMargin*2),Jl(h,u,f,Lt.getVerticalPos(),q,p,!0),Lt.bumpVerticalPos(q.boxMargin),U0(h,Lt.getVerticalPos())),Lt.models.boxes.forEach(function(O){O.height=Lt.getVerticalPos()-O.y,Lt.insert(O.x,O.y,O.x+O.width,O.height),O.startx=O.x,O.starty=O.y,O.stopx=O.startx+O.width,O.stopy=O.starty+O.height,O.stroke="rgb(0,0,0, 0.5)",oi.drawBox(h,O,q)}),E&&Lt.bumpVerticalPos(q.boxMargin);const R=H0(h,u,f,l),{bounds:F}=Lt.getBounds();k.debug("For line height fix Querying: #"+e+" .actor-line"),(0,Q.td_)("#"+e+" .actor-line").attr("y2",F.stopy);let L=F.stopy-F.starty;L<R.maxHeight&&(L=R.maxHeight);let w=L+2*q.diagramMarginY;q.mirrorActors&&(w=w-q.boxMargin+q.bottomMarginAdj);let m=F.stopx-F.startx;m<R.maxWidth&&(m=R.maxWidth);const B=m+2*q.diagramMarginX;x&&h.append("text").text(x).attr("x",(F.stopx-F.startx)/2-2*q.diagramMarginX).attr("y",-25),Dr(h,w,B,q.useMaxWidth);const g=x?40:0;h.attr("viewBox",F.startx-q.diagramMarginX+" -"+(q.diagramMarginY+g)+" "+B+" "+(w+g)),k.debug("models:",Lt.models)};function G4(t,e,i){const r={};return e.forEach(function(s){if(t[s.to]&&t[s.from]){const n=t[s.to];if(s.placement===i.db.PLACEMENT.LEFTOF&&!n.prevActor||s.placement===i.db.PLACEMENT.RIGHTOF&&!n.nextActor)return;const a=s.placement!==void 0,o=!a,l=a?Sn(q):rn(q),h=s.wrap?ke.wrapLabel(s.message,q.width-2*q.wrapPadding,l):s.message,d=ke.calculateTextDimensions(h,l).width+2*q.wrapPadding;o&&s.from===n.nextActor?r[s.to]=Math.max(r[s.to]||0,d):o&&s.from===n.prevActor?r[s.from]=Math.max(r[s.from]||0,d):o&&s.from===s.to?(r[s.from]=Math.max(r[s.from]||0,d/2),r[s.to]=Math.max(r[s.to]||0,d/2)):s.placement===i.db.PLACEMENT.RIGHTOF?r[s.from]=Math.max(r[s.from]||0,d):s.placement===i.db.PLACEMENT.LEFTOF?r[n.prevActor]=Math.max(r[n.prevActor]||0,d):s.placement===i.db.PLACEMENT.OVER&&(n.prevActor&&(r[n.prevActor]=Math.max(r[n.prevActor]||0,d/2)),n.nextActor&&(r[s.from]=Math.max(r[s.from]||0,d/2)))}}),k.debug("maxMessageWidthPerActor:",r),r}const j4=function(t){let e=0;const i=Ql(q);for(const r in t.links){const n=ke.calculateTextDimensions(r,i).width+2*q.wrapPadding+2*q.boxMargin;e<n&&(e=n)}return e};function q4(t,e,i){let r=0;Object.keys(t).forEach(n=>{const a=t[n];a.wrap&&(a.description=ke.wrapLabel(a.description,q.width-2*q.wrapPadding,Ql(q)));const o=ke.calculateTextDimensions(a.description,Ql(q));a.width=a.wrap?q.width:Math.max(q.width,o.width+2*q.wrapPadding),a.height=a.wrap?Math.max(o.height,q.height):q.height,r=Math.max(r,a.height)});for(const n in e){const a=t[n];if(!a)continue;const o=t[a.nextActor];if(!o){const d=e[n]+q.actorMargin-a.width/2;a.margin=Math.max(d,q.actorMargin);continue}const h=e[n]+q.actorMargin-a.width/2-o.width/2;a.margin=Math.max(h,q.actorMargin)}let s=0;return i.forEach(n=>{const a=rn(q);let o=n.actorKeys.reduce((u,d)=>u+=t[d].width+(t[d].margin||0),0);o-=2*q.boxTextMargin,n.wrap&&(n.name=ke.wrapLabel(n.name,o-2*q.wrapPadding,a));const l=ke.calculateTextDimensions(n.name,a);s=Math.max(l.height,s);const h=Math.max(o,l.width+2*q.wrapPadding);if(n.margin=q.boxTextMargin,o<h){const u=(h-o)/2;n.margin+=u}}),i.forEach(n=>n.textMaxHeight=s),Math.max(r,q.height)}const X4=function(t,e,i){const r=e[t.from].x,s=e[t.to].x,n=t.wrap&&t.message;let a=ke.calculateTextDimensions(n?ke.wrapLabel(t.message,q.width,Sn(q)):t.message,Sn(q));const o={width:n?q.width:Math.max(q.width,a.width+2*q.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===i.db.PLACEMENT.RIGHTOF?(o.width=n?Math.max(q.width,a.width):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*q.noteMargin),o.startx=r+(e[t.from].width+q.actorMargin)/2):t.placement===i.db.PLACEMENT.LEFTOF?(o.width=Math.max(n?q.width:e[t.from].width/2+e[t.to].width/2,a.width+2*q.noteMargin),o.startx=r-o.width+(e[t.from].width-q.actorMargin)/2):t.to===t.from?(a=ke.calculateTextDimensions(n?ke.wrapLabel(t.message,Math.max(q.width,e[t.from].width),Sn(q)):t.message,Sn(q)),o.width=n?Math.max(q.width,e[t.from].width):Math.max(e[t.from].width,q.width,a.width+2*q.noteMargin),o.startx=r+(e[t.from].width-o.width)/2):(o.width=Math.abs(r+e[t.from].width/2-(s+e[t.to].width/2))+q.actorMargin,o.startx=r<s?r+e[t.from].width/2-q.actorMargin/2:s+e[t.to].width/2-q.actorMargin/2),n&&(o.message=ke.wrapLabel(t.message,o.width-2*q.wrapPadding,Sn(q))),k.debug(`NM:[${o.startx},${o.stopx},${o.starty},${o.stopy}:${o.width},${o.height}=${t.message}]`),o},K4=function(t,e,i){let r=!1;if([i.db.LINETYPE.SOLID_OPEN,i.db.LINETYPE.DOTTED_OPEN,i.db.LINETYPE.SOLID,i.db.LINETYPE.DOTTED,i.db.LINETYPE.SOLID_CROSS,i.db.LINETYPE.DOTTED_CROSS,i.db.LINETYPE.SOLID_POINT,i.db.LINETYPE.DOTTED_POINT].includes(t.type)&&(r=!0),!r)return{};const s=j0(t.from,e),n=j0(t.to,e),a=s[0]<=n[0]?1:0,o=s[0]<n[0]?0:1,l=[...s,...n],h=Math.abs(n[o]-s[a]);t.wrap&&t.message&&(t.message=ke.wrapLabel(t.message,Math.max(h+2*q.wrapPadding,q.width),rn(q)));const u=ke.calculateTextDimensions(t.message,rn(q));return{width:Math.max(t.wrap?0:u.width+2*q.wrapPadding,h+2*q.wrapPadding,q.width),height:0,startx:s[a],stopx:n[o],starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,l),toBounds:Math.max.apply(null,l)}},Q4=function(t,e,i,r){const s={},n=[];let a,o,l;return t.forEach(function(h){switch(h.id=ke.random({length:10}),h.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:n.push({id:h.id,msg:h.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:h.message&&(a=n.pop(),s[a.id]=a,s[h.id]=a,n.push(a));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:a=n.pop(),s[a.id]=a;break;case r.db.LINETYPE.ACTIVE_START:{const d=e[h.from?h.from.actor:h.to.actor],f=yo(h.from?h.from.actor:h.to.actor).length,p=d.x+d.width/2+(f-1)*q.activationWidth/2,x={startx:p,stopx:p+q.activationWidth,actor:h.from.actor,enabled:!0};Lt.activations.push(x)}break;case r.db.LINETYPE.ACTIVE_END:{const d=Lt.activations.map(f=>f.actor).lastIndexOf(h.from.actor);delete Lt.activations.splice(d,1)[0]}break}h.placement!==void 0?(o=X4(h,e,r),h.noteModel=o,n.forEach(d=>{a=d,a.from=Math.min(a.from,o.startx),a.to=Math.max(a.to,o.startx+o.width),a.width=Math.max(a.width,Math.abs(a.from-a.to))-q.labelBoxWidth})):(l=K4(h,e,r),h.msgModel=l,l.startx&&l.stopx&&n.length>0&&n.forEach(d=>{if(a=d,l.startx===l.stopx){const f=e[h.from],p=e[h.to];a.from=Math.min(f.x-l.width/2,f.x-f.width/2,a.from),a.to=Math.max(p.x+l.width/2,p.x+f.width/2,a.to),a.width=Math.max(a.width,Math.abs(a.to-a.from))-q.labelBoxWidth}else a.from=Math.min(l.startx,a.from),a.to=Math.max(l.stopx,a.to),a.width=Math.max(a.width,l.width)-q.labelBoxWidth}))}),Lt.activations=[],k.debug("Loop type widths:",s),s},q0={bounds:Lt,drawActors:Jl,drawActorsPopup:H0,setConf:G0,draw:H4};var $l=function(){var t=function(st,nt,et,tt){for(et=et||{},tt=st.length;tt--;et[st[tt]]=nt);return et},e=[1,2],i=[1,3],r=[1,5],s=[1,7],n=[2,5],a=[1,15],o=[1,17],l=[1,21],h=[1,22],u=[1,23],d=[1,24],f=[1,37],p=[1,25],x=[1,26],E=[1,27],T=[1,28],S=[1,29],_=[1,32],D=[1,33],z=[1,34],H=[1,35],it=[1,36],R=[1,39],F=[1,40],v=[1,41],L=[1,42],w=[1,38],m=[1,45],B=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],g=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],O=[1,4,5,7,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],y=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],Y={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,classDefStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,class:42,CLASSENTITY_IDS:43,STYLECLASS:44,openDirective:45,typeDirective:46,closeDirective:47,":":48,argDirective:49,direction_tb:50,direction_bt:51,direction_rl:52,direction_lr:53,eol:54,";":55,EDGE_STATE:56,STYLE_SEPARATOR:57,left_of:58,right_of:59,open_directive:60,type_directive:61,arg_directive:62,close_directive:63,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"class",43:"CLASSENTITY_IDS",44:"STYLECLASS",48:":",50:"direction_tb",51:"direction_bt",52:"direction_rl",53:"direction_lr",55:";",56:"EDGE_STATE",57:"STYLE_SEPARATOR",58:"left_of",59:"right_of",60:"open_directive",61:"type_directive",62:"arg_directive",63:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[10,1],[10,2],[10,2],[10,1],[11,3],[11,3],[12,3],[6,3],[6,5],[32,1],[32,1],[32,1],[32,1],[54,1],[54,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1],[45,1],[46,1],[49,1],[47,1]],performAction:function(nt,et,tt,Tt,bt,Z,jt){var U=Z.length-1;switch(bt){case 4:return Tt.setRootDoc(Z[U]),Z[U];case 5:this.$=[];break;case 6:Z[U]!="nl"&&(Z[U-1].push(Z[U]),this.$=Z[U-1]);break;case 7:case 8:this.$=Z[U];break;case 9:this.$="nl";break;case 12:this.$=Z[U];break;case 13:const N=Z[U-1];N.description=Tt.trimColon(Z[U]),this.$=N;break;case 14:this.$={stmt:"relation",state1:Z[U-2],state2:Z[U]};break;case 15:const A=Tt.trimColon(Z[U]);this.$={stmt:"relation",state1:Z[U-3],state2:Z[U-1],description:A};break;case 19:this.$={stmt:"state",id:Z[U-3],type:"default",description:"",doc:Z[U-1]};break;case 20:var pt=Z[U],$=Z[U-2].trim();if(Z[U].match(":")){var K=Z[U].split(":");pt=K[0],$=[$,K[1]]}this.$={stmt:"state",id:pt,type:"default",description:$};break;case 21:this.$={stmt:"state",id:Z[U-3],type:"default",description:Z[U-5],doc:Z[U-1]};break;case 22:this.$={stmt:"state",id:Z[U],type:"fork"};break;case 23:this.$={stmt:"state",id:Z[U],type:"join"};break;case 24:this.$={stmt:"state",id:Z[U],type:"choice"};break;case 25:this.$={stmt:"state",id:Tt.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:Z[U-1].trim(),note:{position:Z[U-2].trim(),text:Z[U].trim()}};break;case 30:this.$=Z[U].trim(),Tt.setAccTitle(this.$);break;case 31:case 32:this.$=Z[U].trim(),Tt.setAccDescription(this.$);break;case 33:case 34:this.$={stmt:"classDef",id:Z[U-1].trim(),classes:Z[U].trim()};break;case 35:this.$={stmt:"applyClass",id:Z[U-1].trim(),styleClass:Z[U].trim()};break;case 38:Tt.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:Tt.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:Tt.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:Tt.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:Z[U].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:Z[U-2].trim(),classes:[Z[U].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:Z[U-2].trim(),classes:[Z[U].trim()],type:"default",description:""};break;case 50:Tt.parseDirective("%%{","open_directive");break;case 51:Tt.parseDirective(Z[U],"type_directive");break;case 52:Z[U]=Z[U].trim().replace(/'/g,'"'),Tt.parseDirective(Z[U],"arg_directive");break;case 53:Tt.parseDirective("}%%","close_directive","state");break}},table:[{3:1,4:e,5:i,6:4,7:r,45:6,60:s},{1:[3]},{3:8,4:e,5:i,6:4,7:r,45:6,60:s},{3:9,4:e,5:i,6:4,7:r,45:6,60:s},{3:10,4:e,5:i,6:4,7:r,45:6,60:s},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],n,{8:11}),{46:12,61:[1,13]},{61:[2,50]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:h,19:u,22:d,24:f,25:p,26:x,27:E,28:T,29:S,32:31,33:_,35:D,37:z,38:H,42:it,45:6,50:R,51:F,52:v,53:L,56:w,60:s},{47:43,48:[1,44],63:m},t([48,63],[2,51]),t(B,[2,6]),{6:30,10:46,11:18,12:19,13:20,16:l,17:h,19:u,22:d,24:f,25:p,26:x,27:E,28:T,29:S,32:31,33:_,35:D,37:z,38:H,42:it,45:6,50:R,51:F,52:v,53:L,56:w,60:s},t(B,[2,8]),t(B,[2,9]),t(B,[2,10]),t(B,[2,11]),t(B,[2,12],{14:[1,47],15:[1,48]}),t(B,[2,16]),{18:[1,49]},t(B,[2,18],{20:[1,50]}),{23:[1,51]},t(B,[2,22]),t(B,[2,23]),t(B,[2,24]),t(B,[2,25]),{30:52,31:[1,53],58:[1,54],59:[1,55]},t(B,[2,28]),t(B,[2,29]),{34:[1,56]},{36:[1,57]},t(B,[2,32]),{39:[1,58],41:[1,59]},{43:[1,60]},t(g,[2,44],{57:[1,61]}),t(g,[2,45],{57:[1,62]}),t(B,[2,38]),t(B,[2,39]),t(B,[2,40]),t(B,[2,41]),t(O,[2,36]),{49:63,62:[1,64]},t(O,[2,53]),t(B,[2,7]),t(B,[2,13]),{13:65,24:f,56:w},t(B,[2,17]),t(y,n,{8:66}),{24:[1,67]},{24:[1,68]},{23:[1,69]},{24:[2,48]},{24:[2,49]},t(B,[2,30]),t(B,[2,31]),{40:[1,70]},{40:[1,71]},{44:[1,72]},{24:[1,73]},{24:[1,74]},{47:75,63:m},{63:[2,52]},t(B,[2,14],{14:[1,76]}),{4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:h,19:u,21:[1,77],22:d,24:f,25:p,26:x,27:E,28:T,29:S,32:31,33:_,35:D,37:z,38:H,42:it,45:6,50:R,51:F,52:v,53:L,56:w,60:s},t(B,[2,20],{20:[1,78]}),{31:[1,79]},{24:[1,80]},t(B,[2,33]),t(B,[2,34]),t(B,[2,35]),t(g,[2,46]),t(g,[2,47]),t(O,[2,37]),t(B,[2,15]),t(B,[2,19]),t(y,n,{8:81}),t(B,[2,26]),t(B,[2,27]),{4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:h,19:u,21:[1,82],22:d,24:f,25:p,26:x,27:E,28:T,29:S,32:31,33:_,35:D,37:z,38:H,42:it,45:6,50:R,51:F,52:v,53:L,56:w,60:s},t(B,[2,21])],defaultActions:{7:[2,50],8:[2,1],9:[2,2],10:[2,3],54:[2,48],55:[2,49],64:[2,52]},parseError:function(nt,et){if(et.recoverable)this.trace(nt);else{var tt=new Error(nt);throw tt.hash=et,tt}},parse:function(nt){var et=this,tt=[0],Tt=[],bt=[null],Z=[],jt=this.table,U="",pt=0,$=0,K=2,N=1,A=Z.slice.call(arguments,1),G=Object.create(this.lexer),C={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(C.yy[dt]=this.yy[dt]);G.setInput(nt,C.yy),C.yy.lexer=G,C.yy.parser=this,typeof G.yylloc>"u"&&(G.yylloc={});var b=G.yylloc;Z.push(b);var Jt=G.options&&G.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function j(){var re;return re=Tt.pop()||G.lex()||N,typeof re!="number"&&(re instanceof Array&&(Tt=re,re=Tt.pop()),re=et.symbols_[re]||re),re}for(var Nt,At,kt,gt,_t={},yt,Ct,qe,Ne;;){if(At=tt[tt.length-1],this.defaultActions[At]?kt=this.defaultActions[At]:((Nt===null||typeof Nt>"u")&&(Nt=j()),kt=jt[At]&&jt[At][Nt]),typeof kt>"u"||!kt.length||!kt[0]){var se="";Ne=[];for(yt in jt[At])this.terminals_[yt]&&yt>K&&Ne.push("'"+this.terminals_[yt]+"'");G.showPosition?se="Parse error on line "+(pt+1)+`:
|
|
1361
|
-
`+G.showPosition()+`
|
|
1362
|
-
Expecting `+Ne.join(", ")+", got '"+(this.terminals_[Nt]||Nt)+"'":se="Parse error on line "+(pt+1)+": Unexpected "+(Nt==N?"end of input":"'"+(this.terminals_[Nt]||Nt)+"'"),this.parseError(se,{text:G.match,token:this.terminals_[Nt]||Nt,line:G.yylineno,loc:b,expected:Ne})}if(kt[0]instanceof Array&&kt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+At+", token: "+Nt);switch(kt[0]){case 1:tt.push(Nt),bt.push(G.yytext),Z.push(G.yylloc),tt.push(kt[1]),Nt=null,$=G.yyleng,U=G.yytext,pt=G.yylineno,b=G.yylloc;break;case 2:if(Ct=this.productions_[kt[1]][1],_t.$=bt[bt.length-Ct],_t._$={first_line:Z[Z.length-(Ct||1)].first_line,last_line:Z[Z.length-1].last_line,first_column:Z[Z.length-(Ct||1)].first_column,last_column:Z[Z.length-1].last_column},Jt&&(_t._$.range=[Z[Z.length-(Ct||1)].range[0],Z[Z.length-1].range[1]]),gt=this.performAction.apply(_t,[U,$,pt,C.yy,kt[1],bt,Z].concat(A)),typeof gt<"u")return gt;Ct&&(tt=tt.slice(0,-1*Ct*2),bt=bt.slice(0,-1*Ct),Z=Z.slice(0,-1*Ct)),tt.push(this.productions_[kt[1]][0]),bt.push(_t.$),Z.push(_t._$),qe=jt[tt[tt.length-2]][tt[tt.length-1]],tt.push(qe);break;case 3:return!0}}return!0}},wt=function(){var st={EOF:1,parseError:function(et,tt){if(this.yy.parser)this.yy.parser.parseError(et,tt);else throw new Error(et)},setInput:function(nt,et){return this.yy=et||this.yy||{},this._input=nt,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},input:function(){var nt=this._input[0];this.yytext+=nt,this.yyleng++,this.offset++,this.match+=nt,this.matched+=nt;var et=nt.match(/(?:\r\n?|\n).*/g);return et?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),nt},unput:function(nt){var et=nt.length,tt=nt.split(/(?:\r\n?|\n)/g);this._input=nt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-et),this.offset-=et;var Tt=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),tt.length-1&&(this.yylineno-=tt.length-1);var bt=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:tt?(tt.length===Tt.length?this.yylloc.first_column:0)+Tt[Tt.length-tt.length].length-tt[0].length:this.yylloc.first_column-et},this.options.ranges&&(this.yylloc.range=[bt[0],bt[0]+this.yyleng-et]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1363
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(nt){this.unput(this.match.slice(nt))},pastInput:function(){var nt=this.matched.substr(0,this.matched.length-this.match.length);return(nt.length>20?"...":"")+nt.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var nt=this.match;return nt.length<20&&(nt+=this._input.substr(0,20-nt.length)),(nt.substr(0,20)+(nt.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var nt=this.pastInput(),et=new Array(nt.length+1).join("-");return nt+this.upcomingInput()+`
|
|
1364
|
-
`+et+"^"},test_match:function(nt,et){var tt,Tt,bt;if(this.options.backtrack_lexer&&(bt={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&&(bt.yylloc.range=this.yylloc.range.slice(0))),Tt=nt[0].match(/(?:\r\n?|\n).*/g),Tt&&(this.yylineno+=Tt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Tt?Tt[Tt.length-1].length-Tt[Tt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+nt[0].length},this.yytext+=nt[0],this.match+=nt[0],this.matches=nt,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(nt[0].length),this.matched+=nt[0],tt=this.performAction.call(this,this.yy,this,et,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),tt)return tt;if(this._backtrack){for(var Z in bt)this[Z]=bt[Z];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var nt,et,tt,Tt;this._more||(this.yytext="",this.match="");for(var bt=this._currentRules(),Z=0;Z<bt.length;Z++)if(tt=this._input.match(this.rules[bt[Z]]),tt&&(!et||tt[0].length>et[0].length)){if(et=tt,Tt=Z,this.options.backtrack_lexer){if(nt=this.test_match(tt,bt[Z]),nt!==!1)return nt;if(this._backtrack){et=!1;continue}else return!1}else if(!this.options.flex)break}return et?(nt=this.test_match(et,bt[Tt]),nt!==!1?nt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1365
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var et=this.next();return et||this.lex()},begin:function(et){this.conditionStack.push(et)},popState:function(){var et=this.conditionStack.length-1;return et>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(et){return et=this.conditionStack.length-1-Math.abs(et||0),et>=0?this.conditionStack[et]:"INITIAL"},pushState:function(et){this.begin(et)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(et,tt,Tt,bt){switch(Tt){case 0:return 41;case 1:return 50;case 2:return 51;case 3:return 52;case 4:return 53;case 5:return this.begin("open_directive"),60;case 6:return this.begin("type_directive"),61;case 7:return this.popState(),this.begin("arg_directive"),48;case 8:return this.popState(),this.popState(),63;case 9:return 62;case 10:break;case 11:break;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:break;case 17:return this.pushState("SCALE"),17;case 18:return 18;case 19:this.popState();break;case 20:return this.begin("acc_title"),33;case 21:return this.popState(),"acc_title_value";case 22:return this.begin("acc_descr"),35;case 23:return this.popState(),"acc_descr_value";case 24:this.begin("acc_descr_multiline");break;case 25:this.popState();break;case 26:return"acc_descr_multiline_value";case 27:return this.pushState("CLASSDEF"),38;case 28:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 29:return this.popState(),this.pushState("CLASSDEFID"),39;case 30:return this.popState(),40;case 31:return this.pushState("CLASS"),42;case 32:return this.popState(),this.pushState("CLASS_STYLE"),43;case 33:return this.popState(),44;case 34:return this.pushState("SCALE"),17;case 35:return 18;case 36:this.popState();break;case 37:this.pushState("STATE");break;case 38:return this.popState(),tt.yytext=tt.yytext.slice(0,-8).trim(),25;case 39:return this.popState(),tt.yytext=tt.yytext.slice(0,-8).trim(),26;case 40:return this.popState(),tt.yytext=tt.yytext.slice(0,-10).trim(),27;case 41:return this.popState(),tt.yytext=tt.yytext.slice(0,-8).trim(),25;case 42:return this.popState(),tt.yytext=tt.yytext.slice(0,-8).trim(),26;case 43:return this.popState(),tt.yytext=tt.yytext.slice(0,-10).trim(),27;case 44:return 50;case 45:return 51;case 46:return 52;case 47:return 53;case 48:this.pushState("STATE_STRING");break;case 49:return this.pushState("STATE_ID"),"AS";case 50:return this.popState(),"ID";case 51:this.popState();break;case 52:return"STATE_DESCR";case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;case 56:break;case 57:return this.popState(),21;case 58:break;case 59:return this.begin("NOTE"),29;case 60:return this.popState(),this.pushState("NOTE_ID"),58;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:this.popState(),this.pushState("FLOATING_NOTE");break;case 63:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 64:break;case 65:return"NOTE_TEXT";case 66:return this.popState(),"ID";case 67:return this.popState(),this.pushState("NOTE_TEXT"),24;case 68:return this.popState(),tt.yytext=tt.yytext.substr(2).trim(),31;case 69:return this.popState(),tt.yytext=tt.yytext.slice(0,-8).trim(),31;case 70:return 7;case 71:return 7;case 72:return 16;case 73:return 56;case 74:return 24;case 75:return tt.yytext=tt.yytext.trim(),14;case 76:return 15;case 77:return 28;case 78:return 57;case 79:return 5;case 80:return"INVALID"}},rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[14,15],inclusive:!1},close_directive:{rules:[14,15],inclusive:!1},arg_directive:{rules:[8,9,14,15],inclusive:!1},type_directive:{rules:[7,8,14,15],inclusive:!1},open_directive:{rules:[6,14,15],inclusive:!1},struct:{rules:[14,15,27,31,37,44,45,46,47,56,57,58,59,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[66],inclusive:!1},FLOATING_NOTE:{rules:[63,64,65],inclusive:!1},NOTE_TEXT:{rules:[68,69],inclusive:!1},NOTE_ID:{rules:[67],inclusive:!1},NOTE:{rules:[60,61,62],inclusive:!1},CLASS_STYLE:{rules:[33],inclusive:!1},CLASS:{rules:[32],inclusive:!1},CLASSDEFID:{rules:[30],inclusive:!1},CLASSDEF:{rules:[28,29],inclusive:!1},acc_descr_multiline:{rules:[25,26],inclusive:!1},acc_descr:{rules:[23],inclusive:!1},acc_title:{rules:[21],inclusive:!1},SCALE:{rules:[18,19,35,36],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[50],inclusive:!1},STATE_STRING:{rules:[51,52],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[14,15,38,39,40,41,42,43,48,49,53,54,55],inclusive:!1},ID:{rules:[14,15],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,10,11,12,13,15,16,17,20,22,24,27,31,34,37,55,59,70,71,72,73,74,75,76,78,79,80],inclusive:!0}}};return st}();Y.lexer=wt;function at(){this.yy={}}return at.prototype=Y,Y.Parser=at,new at}();$l.parser=$l;const X0=$l,J4=(t,e)=>{var i;return((i=e==null?void 0:e.state)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*stateDiagram/)!==null},$4=(t,e)=>{var i;return!!(t.match(/^\s*stateDiagram-v2/)!==null||t.match(/^\s*stateDiagram/)&&((i=e==null?void 0:e.state)==null?void 0:i.defaultRenderer)==="dagre-wrapper")},K0="LR",t5="TB",mo="state",tc="relation",e5="classDef",i5="applyClass",ua="default",Q0="divider",ec="[*]",J0="start",$0=ec,tu="end",eu="color",iu="fill",r5="bgFill",s5=",";function ru(){return{}}let su=K0,bo=[],da=ru();const nu=()=>({relations:[],states:{},documents:{}});let xo={root:nu()},Hi=xo.root,fa=0,au=0;const n5={LINE:0,DOTTED_LINE:1},a5={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},ko=t=>JSON.parse(JSON.stringify(t)),o5=function(t,e,i){si.parseDirective(this,t,e,i)},l5=t=>{k.info("Setting root doc",t),bo=t},c5=()=>bo,_o=(t,e,i)=>{if(e.stmt===tc)_o(t,e.state1,!0),_o(t,e.state2,!1);else if(e.stmt===mo&&(e.id==="[*]"?(e.id=i?t.id+"_start":t.id+"_end",e.start=i):e.id=e.id.trim()),e.doc){const r=[];let s=[],n;for(n=0;n<e.doc.length;n++)if(e.doc[n].type===Q0){const a=ko(e.doc[n]);a.doc=ko(s),r.push(a),s=[]}else s.push(e.doc[n]);if(r.length>0&&s.length>0){const a={stmt:mo,id:t1(),type:"divider",doc:ko(s)};r.push(ko(a)),e.doc=r}e.doc.forEach(a=>_o(e,a,!0))}},h5=()=>(_o({id:"root"},{id:"root",doc:bo},!0),{id:"root",doc:bo}),u5=t=>{let e;t.doc?e=t.doc:e=t,k.info(e),ou(!0),k.info("Extract",e),e.forEach(i=>{switch(i.stmt){case mo:sn(i.id.trim(),i.type,i.doc,i.description,i.note,i.classes,i.styles,i.textStyles);break;case tc:lu(i.state1,i.state2,i.description);break;case e5:cu(i.id.trim(),i.classes);break;case i5:nc(i.id.trim(),i.styleClass);break}})},sn=function(t,e=ua,i=null,r=null,s=null,n=null,a=null,o=null){const l=t==null?void 0:t.trim();Hi.states[l]===void 0?(k.info("Adding state ",l,r),Hi.states[l]={id:l,descriptions:[],type:e,doc:i,note:s,classes:[],styles:[],textStyles:[]}):(Hi.states[l].doc||(Hi.states[l].doc=i),Hi.states[l].type||(Hi.states[l].type=e)),r&&(k.info("Setting state description",l,r),typeof r=="string"&&sc(l,r.trim()),typeof r=="object"&&r.forEach(h=>sc(l,h.trim()))),s&&(Hi.states[l].note=s,Hi.states[l].note.text=Qt.sanitizeText(Hi.states[l].note.text,P())),n&&(k.info("Setting state classes",l,n),(typeof n=="string"?[n]:n).forEach(u=>nc(l,u.trim()))),a&&(k.info("Setting state styles",l,a),(typeof a=="string"?[a]:a).forEach(u=>_5(l,u.trim()))),o&&(k.info("Setting state styles",l,a),(typeof o=="string"?[o]:o).forEach(u=>E5(l,u.trim())))},ou=function(t){xo={root:nu()},Hi=xo.root,fa=0,da=ru(),t||ar()},pa=function(t){return Hi.states[t]},d5=function(){return Hi.states},f5=function(){k.info("Documents = ",xo)},p5=function(){return Hi.relations};function ic(t=""){let e=t;return t===ec&&(fa++,e=`${J0}${fa}`),e}function rc(t="",e=ua){return t===ec?J0:e}function g5(t=""){let e=t;return t===$0&&(fa++,e=`${tu}${fa}`),e}function y5(t="",e=ua){return t===$0?tu:e}function m5(t,e,i){let r=ic(t.id.trim()),s=rc(t.id.trim(),t.type),n=ic(e.id.trim()),a=rc(e.id.trim(),e.type);sn(r,s,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),sn(n,a,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),Hi.relations.push({id1:r,id2:n,relationTitle:Qt.sanitizeText(i,P())})}const lu=function(t,e,i){if(typeof t=="object")m5(t,e,i);else{const r=ic(t.trim()),s=rc(t),n=g5(e.trim()),a=y5(e);sn(r,s),sn(n,a),Hi.relations.push({id1:r,id2:n,title:Qt.sanitizeText(i,P())})}},sc=function(t,e){const i=Hi.states[t],r=e.startsWith(":")?e.replace(":","").trim():e;i.descriptions.push(Qt.sanitizeText(r,P()))},b5=function(t){return t.substring(0,1)===":"?t.substr(2).trim():t.trim()},x5=()=>(au++,"divider-id-"+au),cu=function(t,e=""){da[t]===void 0&&(da[t]={id:t,styles:[],textStyles:[]});const i=da[t];e!=null&&e.split(s5).forEach(r=>{const s=r.replace(/([^;]*);/,"$1").trim();if(r.match(eu)){const a=s.replace(iu,r5).replace(eu,iu);i.textStyles.push(a)}i.styles.push(s)})},k5=function(){return da},nc=function(t,e){t.split(",").forEach(function(i){let r=pa(i);if(r===void 0){const s=i.trim();sn(s),r=pa(s)}r.classes.push(e)})},_5=function(t,e){const i=pa(t);i!==void 0&&i.textStyles.push(e)},E5=function(t,e){const i=pa(t);i!==void 0&&i.textStyles.push(e)},ms={parseDirective:o5,getConfig:()=>P().state,addState:sn,clear:ou,getState:pa,getStates:d5,getRelations:p5,getClasses:k5,getDirection:()=>su,addRelation:lu,getDividerId:x5,setDirection:t=>{su=t},cleanupLabel:b5,lineType:n5,relationType:a5,logDocuments:f5,getRootDoc:c5,setRootDoc:l5,getRootDocV2:h5,extract:u5,trimColon:t=>t&&t[0]===":"?t.substr(1).trim():t.trim(),getAccTitle:fr,setAccTitle:or,getAccDescription:gr,setAccDescription:pr,addStyleClass:cu,setCssClass:nc,addDescription:sc,setDiagramTitle:Ir,getDiagramTitle:Rr},ac={},v5=(t,e)=>{ac[t]=e},C5=t=>ac[t],hu=()=>Object.keys(ac),T5={get:C5,set:v5,keys:hu,size:()=>hu().length},S5=t=>t.append("circle").attr("class","start-state").attr("r",P().state.sizeUnit).attr("cx",P().state.padding+P().state.sizeUnit).attr("cy",P().state.padding+P().state.sizeUnit),w5=t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",P().state.textHeight).attr("class","divider").attr("x2",P().state.textHeight*2).attr("y1",0).attr("y2",0),A5=(t,e)=>{const i=t.append("text").attr("x",2*P().state.padding).attr("y",P().state.textHeight+2*P().state.padding).attr("font-size",P().state.fontSize).attr("class","state-title").text(e.id),r=i.node().getBBox();return t.insert("rect",":first-child").attr("x",P().state.padding).attr("y",P().state.padding).attr("width",r.width+2*P().state.padding).attr("height",r.height+2*P().state.padding).attr("rx",P().state.radius),i},L5=(t,e)=>{const i=function(f,p,x){const E=f.append("tspan").attr("x",2*P().state.padding).text(p);x||E.attr("dy",P().state.textHeight)},s=t.append("text").attr("x",2*P().state.padding).attr("y",P().state.textHeight+1.3*P().state.padding).attr("font-size",P().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),n=s.height,a=t.append("text").attr("x",P().state.padding).attr("y",n+P().state.padding*.4+P().state.dividerMargin+P().state.textHeight).attr("class","state-description");let o=!0,l=!0;e.descriptions.forEach(function(f){o||(i(a,f,l),l=!1),o=!1});const h=t.append("line").attr("x1",P().state.padding).attr("y1",P().state.padding+n+P().state.dividerMargin/2).attr("y2",P().state.padding+n+P().state.dividerMargin/2).attr("class","descr-divider"),u=a.node().getBBox(),d=Math.max(u.width,s.width);return h.attr("x2",d+3*P().state.padding),t.insert("rect",":first-child").attr("x",P().state.padding).attr("y",P().state.padding).attr("width",d+2*P().state.padding).attr("height",u.height+n+2*P().state.padding).attr("rx",P().state.radius),t},B5=(t,e,i)=>{const r=P().state.padding,s=2*P().state.padding,n=t.node().getBBox(),a=n.width,o=n.x,l=t.append("text").attr("x",0).attr("y",P().state.titleShift).attr("font-size",P().state.fontSize).attr("class","state-title").text(e.id),u=l.node().getBBox().width+s;let d=Math.max(u,a);d===a&&(d=d+s);let f;const p=t.node().getBBox();e.doc,f=o-r,u>a&&(f=(a-d)/2+r),Math.abs(o-p.x)<r&&u>a&&(f=o-(u-a)/2);const x=1-P().state.textHeight;return t.insert("rect",":first-child").attr("x",f).attr("y",x).attr("class",i?"alt-composit":"composit").attr("width",d).attr("height",p.height+P().state.textHeight+P().state.titleShift+1).attr("rx","0"),l.attr("x",f+r),u<=a&&l.attr("x",o+(d-s)/2-u/2+r),t.insert("rect",":first-child").attr("x",f).attr("y",P().state.titleShift-P().state.textHeight-P().state.padding).attr("width",d).attr("height",P().state.textHeight*3).attr("rx",P().state.radius),t.insert("rect",":first-child").attr("x",f).attr("y",P().state.titleShift-P().state.textHeight-P().state.padding).attr("width",d).attr("height",p.height+3+2*P().state.textHeight).attr("rx",P().state.radius),t},D5=t=>(t.append("circle").attr("class","end-state-outer").attr("r",P().state.sizeUnit+P().state.miniPadding).attr("cx",P().state.padding+P().state.sizeUnit+P().state.miniPadding).attr("cy",P().state.padding+P().state.sizeUnit+P().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",P().state.sizeUnit).attr("cx",P().state.padding+P().state.sizeUnit+2).attr("cy",P().state.padding+P().state.sizeUnit+2)),I5=(t,e)=>{let i=P().state.forkWidth,r=P().state.forkHeight;if(e.parentId){let s=i;i=r,r=s}return t.append("rect").style("stroke","black").style("fill","black").attr("width",i).attr("height",r).attr("x",P().state.padding).attr("y",P().state.padding)},R5=(t,e,i,r)=>{let s=0;const n=r.append("text");n.style("text-anchor","start"),n.attr("class","noteText");let a=t.replace(/\r\n/g,"<br/>");a=a.replace(/\n/g,"<br/>");const o=a.split(Qt.lineBreakRegex);let l=1.25*P().state.noteMargin;for(const h of o){const u=h.trim();if(u.length>0){const d=n.append("tspan");if(d.text(u),l===0){const f=d.node().getBBox();l+=f.height}s+=l,d.attr("x",e+P().state.noteMargin),d.attr("y",i+s+1.25*P().state.noteMargin)}}return{textWidth:n.node().getBBox().width,textHeight:s}},N5=(t,e)=>{e.attr("class","state-note");const i=e.append("rect").attr("x",0).attr("y",P().state.padding),r=e.append("g"),{textWidth:s,textHeight:n}=R5(t,0,0,r);return i.attr("height",n+2*P().state.noteMargin),i.attr("width",s+P().state.noteMargin*2),i},uu=function(t,e){const i=e.id,r={id:i,label:e.id,width:0,height:0},s=t.append("g").attr("id",i).attr("class","stateGroup");e.type==="start"&&S5(s),e.type==="end"&&D5(s),(e.type==="fork"||e.type==="join")&&I5(s,e),e.type==="note"&&N5(e.note.text,s),e.type==="divider"&&w5(s),e.type==="default"&&e.descriptions.length===0&&A5(s,e),e.type==="default"&&e.descriptions.length>0&&L5(s,e);const n=s.node().getBBox();return r.width=n.width+2*P().state.padding,r.height=n.height+2*P().state.padding,T5.set(i,r),r};let du=0;const O5=function(t,e,i){const r=function(l){switch(l){case ms.relationType.AGGREGATION:return"aggregation";case ms.relationType.EXTENSION:return"extension";case ms.relationType.COMPOSITION:return"composition";case ms.relationType.DEPENDENCY:return"dependency"}};e.points=e.points.filter(l=>!Number.isNaN(l.y));const s=e.points,n=(0,Q.jvg)().x(function(l){return l.x}).y(function(l){return l.y}).curve(Q.$0Z),a=t.append("path").attr("d",n(s)).attr("id","edge"+du).attr("class","transition");let o="";if(P().state.arrowMarkerAbsolute&&(o=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,o=o.replace(/\(/g,"\\("),o=o.replace(/\)/g,"\\)")),a.attr("marker-end","url("+o+"#"+r(ms.relationType.DEPENDENCY)+"End)"),i.title!==void 0){const l=t.append("g").attr("class","stateLabel"),{x:h,y:u}=ke.calcLabelPosition(e.points),d=Qt.getRows(i.title);let f=0;const p=[];let x=0,E=0;for(let _=0;_<=d.length;_++){const D=l.append("text").attr("text-anchor","middle").text(d[_]).attr("x",h).attr("y",u+f),z=D.node().getBBox();x=Math.max(x,z.width),E=Math.min(E,z.x),k.info(z.x,h,u+f),f===0&&(f=D.node().getBBox().height,k.info("Title height",f,u)),p.push(D)}let T=f*d.length;if(d.length>1){const _=(d.length-1)*f*.5;p.forEach((D,z)=>D.attr("y",u+z*f-_)),T=f*d.length}const S=l.node().getBBox();l.insert("rect",":first-child").attr("class","box").attr("x",h-x/2-P().state.padding/2).attr("y",u-T/2-P().state.padding/2-3.5).attr("width",x+P().state.padding).attr("height",T+P().state.padding),k.info(S)}du++};let mr;const oc={},F5=function(){},M5=function(t){t.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")},P5=function(t,e,i,r){mr=P().state;const s=P().securityLevel;let n;s==="sandbox"&&(n=(0,Q.Ys)("#i"+e));const a=s==="sandbox"?(0,Q.Ys)(n.nodes()[0].contentDocument.body):(0,Q.Ys)("body"),o=s==="sandbox"?n.nodes()[0].contentDocument:document;k.debug("Rendering diagram "+t);const l=a.select(`[id='${e}']`);M5(l),new Be.k({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel(function(){return{}});const u=r.db.getRootDoc();fu(u,l,void 0,!1,a,o,r);const d=mr.padding,f=l.node().getBBox(),p=f.width+d*2,x=f.height+d*2,E=p*1.75;Dr(l,x,E,mr.useMaxWidth),l.attr("viewBox",`${f.x-mr.padding} ${f.y-mr.padding} `+p+" "+x)},V5=t=>t?t.length*mr.fontSizeFactor:1,fu=(t,e,i,r,s,n,a)=>{const o=new Be.k({compound:!0,multigraph:!0});let l,h=!0;for(l=0;l<t.length;l++)if(t[l].stmt==="relation"){h=!1;break}i?o.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:h?1:mr.edgeLengthFactor,nodeSep:h?1:50,isMultiGraph:!0}):o.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:h?1:mr.edgeLengthFactor,nodeSep:h?1:50,ranker:"tight-tree",isMultiGraph:!0}),o.setDefaultEdgeLabel(function(){return{}}),a.db.extract(t);const u=a.db.getStates(),d=a.db.getRelations(),f=Object.keys(u);for(const S of f){const _=u[S];i&&(_.parentId=i);let D;if(_.doc){let z=e.append("g").attr("id",_.id).attr("class","stateGroup");D=fu(_.doc,z,_.id,!r,s,n,a);{z=B5(z,_,r);let H=z.node().getBBox();D.width=H.width,D.height=H.height+mr.padding/2,oc[_.id]={y:mr.compositTitleSize}}}else D=uu(e,_);if(_.note){const z={descriptions:[],id:_.id+"-note",note:_.note,type:"note"},H=uu(e,z);_.note.position==="left of"?(o.setNode(D.id+"-note",H),o.setNode(D.id,D)):(o.setNode(D.id,D),o.setNode(D.id+"-note",H)),o.setParent(D.id,D.id+"-group"),o.setParent(D.id+"-note",D.id+"-group")}else o.setNode(D.id,D)}k.debug("Count=",o.nodeCount(),o);let p=0;d.forEach(function(S){p++,k.debug("Setting edge",S),o.setEdge(S.id1,S.id2,{relation:S,width:V5(S.title),height:mr.labelHeight*Qt.getRows(S.title).length,labelpos:"c"},"id"+p)}),(0,xe.bK)(o),k.debug("Graph after layout",o.nodes());const x=e.node();o.nodes().forEach(function(S){S!==void 0&&o.node(S)!==void 0?(k.warn("Node "+S+": "+JSON.stringify(o.node(S))),s.select("#"+x.id+" #"+S).attr("transform","translate("+(o.node(S).x-o.node(S).width/2)+","+(o.node(S).y+(oc[S]?oc[S].y:0)-o.node(S).height/2)+" )"),s.select("#"+x.id+" #"+S).attr("data-x-shift",o.node(S).x-o.node(S).width/2),n.querySelectorAll("#"+x.id+" #"+S+" .divider").forEach(D=>{const z=D.parentElement;let H=0,it=0;z&&(z.parentElement&&(H=z.parentElement.getBBox().width),it=parseInt(z.getAttribute("data-x-shift"),10),Number.isNaN(it)&&(it=0)),D.setAttribute("x1",0-it+8),D.setAttribute("x2",H-it-8)})):k.debug("No Node "+S+": "+JSON.stringify(o.node(S)))});let E=x.getBBox();o.edges().forEach(function(S){S!==void 0&&o.edge(S)!==void 0&&(k.debug("Edge "+S.v+" -> "+S.w+": "+JSON.stringify(o.edge(S))),O5(e,o.edge(S),o.edge(S).relation))}),E=x.getBBox();const T={id:i||"root",label:i||"root",width:0,height:0};return T.width=E.width+2*mr.padding,T.height=E.height+2*mr.padding,k.debug("Doc rendered",T,o),T},Y5={setConf:F5,draw:P5},Eo="rect",lc="rectWithTitle",z5="start",W5="end",U5="divider",Z5="roundedWithTitle",H5="note",G5="noteGroup",wn="statediagram",j5=`${wn}-state`,pu="transition",q5="note",X5=`${pu} note-edge`,K5=`${wn}-${q5}`,Q5=`${wn}-cluster`,J5=`${wn}-cluster-alt`,gu="parent",yu="note",$5="state",cc="----",tm=`${cc}${yu}`,mu=`${cc}${gu}`,bu="fill:none",xu="fill: #333",ku="c",_u="text",Eu="normal";let vo={},Ms=0;const em=function(t){const e=Object.keys(t);for(const i of e)t[i]},im=function(t,e){k.trace("Extracting classes"),e.db.clear();try{return e.parser.parse(t),e.db.extract(e.db.getRootDocV2()),e.db.getClasses()}catch(i){return i}};function rm(t){return t==null?"":t.classes?t.classes.join(" "):""}function hc(t="",e=0,i="",r=cc){const s=i!==null&&i.length>0?`${r}${i}`:"";return`${$5}-${t}${s}-${e}`}const ga=(t,e,i,r,s,n)=>{const a=i.id,o=rm(r[a]);if(a!=="root"){let l=Eo;i.start===!0&&(l=z5),i.start===!1&&(l=W5),i.type!==ua&&(l=i.type),vo[a]||(vo[a]={id:a,shape:l,description:Qt.sanitizeText(a,P()),classes:`${o} ${j5}`});const h=vo[a];i.description&&(Array.isArray(h.description)?(h.shape=lc,h.description.push(i.description)):h.description.length>0?(h.shape=lc,h.description===a?h.description=[i.description]:h.description=[h.description,i.description]):(h.shape=Eo,h.description=i.description),h.description=Qt.sanitizeTextOrArray(h.description,P())),h.description.length===1&&h.shape===lc&&(h.shape=Eo),!h.type&&i.doc&&(k.info("Setting cluster for ",a,uc(i)),h.type="group",h.dir=uc(i),h.shape=i.type===Q0?U5:Z5,h.classes=h.classes+" "+Q5+" "+(n?J5:""));const u={labelStyle:"",shape:h.shape,labelText:h.description,classes:h.classes,style:"",id:a,dir:h.dir,domId:hc(a,Ms),type:h.type,padding:15};if(i.note){const d={labelStyle:"",shape:H5,labelText:i.note.text,classes:K5,style:"",id:a+tm+"-"+Ms,domId:hc(a,Ms,yu),type:h.type,padding:15},f={labelStyle:"",shape:G5,labelText:i.note.text,classes:h.classes,style:"",id:a+mu,domId:hc(a,Ms,gu),type:"group",padding:0};Ms++;const p=a+mu;t.setNode(p,f),t.setNode(d.id,d),t.setNode(a,u),t.setParent(a,p),t.setParent(d.id,p);let x=a,E=d.id;i.note.position==="left of"&&(x=d.id,E=a),t.setEdge(x,E,{arrowhead:"none",arrowType:"",style:bu,labelStyle:"",classes:X5,arrowheadStyle:xu,labelpos:ku,labelType:_u,thickness:Eu})}else t.setNode(a,u)}e&&e.id!=="root"&&(k.trace("Setting node ",a," to be child of its parent ",e.id),t.setParent(a,e.id)),i.doc&&(k.trace("Adding nodes children "),sm(t,i,i.doc,r,s,!n))},sm=(t,e,i,r,s,n)=>{k.trace("items",i),i.forEach(a=>{switch(a.stmt){case mo:ga(t,e,a,r,s,n);break;case ua:ga(t,e,a,r,s,n);break;case tc:{ga(t,e,a.state1,r,s,n),ga(t,e,a.state2,r,s,n);const o={id:"edge"+Ms,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:bu,labelStyle:"",label:Qt.sanitizeText(a.description,P()),arrowheadStyle:xu,labelpos:ku,labelType:_u,thickness:Eu,classes:pu};t.setEdge(a.state1.id,a.state2.id,o,Ms),Ms++}break}})},uc=(t,e=t5)=>{let i=e;if(t.doc)for(let r=0;r<t.doc.length;r++){const s=t.doc[r];s.stmt==="dir"&&(i=s.value)}return i},nm={setConf:em,getClasses:im,draw:function(t,e,i,r){k.info("Drawing state diagram (v2)",e),vo={};let s=r.db.getDirection();s===void 0&&(s=K0);const{securityLevel:n,state:a}=P(),o=a.nodeSpacing||50,l=a.rankSpacing||50;k.info(r.db.getRootDocV2()),r.db.extract(r.db.getRootDocV2()),k.info(r.db.getRootDocV2());const h=r.db.getStates(),u=new Be.k({multigraph:!0,compound:!0}).setGraph({rankdir:uc(r.db.getRootDocV2()),nodesep:o,ranksep:l,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});ga(u,void 0,r.db.getRootDocV2(),h,r.db,!0);let d;n==="sandbox"&&(d=(0,Q.Ys)("#i"+e));const f=n==="sandbox"?(0,Q.Ys)(d.nodes()[0].contentDocument.body):(0,Q.Ys)("body"),p=f.select(`[id="${e}"]`),x=f.select("#"+e+" g");ml(x,u,["barb"],wn,e);const E=8;ke.insertTitle(p,"statediagramTitleText",a.titleTopMargin,r.db.getDiagramTitle());const T=p.node().getBBox(),S=T.width+E*2,_=T.height+E*2;p.attr("class",wn);const D=p.node().getBBox();Dr(p,_,S,a.useMaxWidth);const z=`${D.x-E} ${D.y-E} ${S} ${_}`;k.debug(`viewBox ${z}`),p.attr("viewBox",z);const H=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const it of H){const R=it.getBBox(),F=document.createElementNS("http://www.w3.org/2000/svg",Eo);F.setAttribute("rx",0),F.setAttribute("ry",0),F.setAttribute("width",R.width),F.setAttribute("height",R.height),it.insertBefore(F,it.firstChild)}}};var dc=function(){var t=function(E,T,S,_){for(S=S||{},_=E.length;_--;S[E[_]]=T);return S},e=[1,2],i=[1,5],r=[6,9,11,17,18,20,22,23,24,26],s=[1,15],n=[1,16],a=[1,17],o=[1,18],l=[1,19],h=[1,20],u=[1,24],d=[4,6,9,11,17,18,20,22,23,24,26],f={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,taskName:24,taskData:25,open_directive:26,type_directive:27,arg_directive:28,close_directive:29,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",24:"taskName",25:"taskData",26:"open_directive",27:"type_directive",28:"arg_directive",29:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,2],[10,2],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(T,S,_,D,z,H,it){var R=H.length-1;switch(z){case 1:return H[R-1];case 3:this.$=[];break;case 4:H[R-1].push(H[R]),this.$=H[R-1];break;case 5:case 6:this.$=H[R];break;case 7:case 8:this.$=[];break;case 11:D.setDiagramTitle(H[R].substr(6)),this.$=H[R].substr(6);break;case 12:this.$=H[R].trim(),D.setAccTitle(this.$);break;case 13:case 14:this.$=H[R].trim(),D.setAccDescription(this.$);break;case 15:D.addSection(H[R].substr(8)),this.$=H[R].substr(8);break;case 16:D.addTask(H[R-1],H[R]),this.$="task";break;case 18:D.parseDirective("%%{","open_directive");break;case 19:D.parseDirective(H[R],"type_directive");break;case 20:H[R]=H[R].trim().replace(/'/g,'"'),D.parseDirective(H[R],"arg_directive");break;case 21:D.parseDirective("}%%","close_directive","journey");break}},table:[{3:1,4:e,7:3,12:4,26:i},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,26:i},{13:8,27:[1,9]},{27:[2,18]},{6:[1,10],7:21,8:11,9:[1,12],10:13,11:[1,14],12:4,17:s,18:n,20:a,22:o,23:l,24:h,26:i},{1:[2,2]},{14:22,15:[1,23],29:u},t([15,29],[2,19]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:21,10:25,12:4,17:s,18:n,20:a,22:o,23:l,24:h,26:i},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),{19:[1,26]},{21:[1,27]},t(r,[2,14]),t(r,[2,15]),{25:[1,28]},t(r,[2,17]),{11:[1,29]},{16:30,28:[1,31]},{11:[2,21]},t(r,[2,5]),t(r,[2,12]),t(r,[2,13]),t(r,[2,16]),t(d,[2,9]),{14:32,29:u},{29:[2,20]},{11:[1,33]},t(d,[2,10])],defaultActions:{5:[2,18],7:[2,2],24:[2,21],31:[2,20]},parseError:function(T,S){if(S.recoverable)this.trace(T);else{var _=new Error(T);throw _.hash=S,_}},parse:function(T){var S=this,_=[0],D=[],z=[null],H=[],it=this.table,R="",F=0,v=0,L=2,w=1,m=H.slice.call(arguments,1),B=Object.create(this.lexer),g={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(g.yy[O]=this.yy[O]);B.setInput(T,g.yy),g.yy.lexer=B,g.yy.parser=this,typeof B.yylloc>"u"&&(B.yylloc={});var y=B.yylloc;H.push(y);var Y=B.options&&B.options.ranges;typeof g.yy.parseError=="function"?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function wt(){var pt;return pt=D.pop()||B.lex()||w,typeof pt!="number"&&(pt instanceof Array&&(D=pt,pt=D.pop()),pt=S.symbols_[pt]||pt),pt}for(var at,st,nt,et,tt={},Tt,bt,Z,jt;;){if(st=_[_.length-1],this.defaultActions[st]?nt=this.defaultActions[st]:((at===null||typeof at>"u")&&(at=wt()),nt=it[st]&&it[st][at]),typeof nt>"u"||!nt.length||!nt[0]){var U="";jt=[];for(Tt in it[st])this.terminals_[Tt]&&Tt>L&&jt.push("'"+this.terminals_[Tt]+"'");B.showPosition?U="Parse error on line "+(F+1)+`:
|
|
1366
|
-
`+B.showPosition()+`
|
|
1367
|
-
Expecting `+jt.join(", ")+", got '"+(this.terminals_[at]||at)+"'":U="Parse error on line "+(F+1)+": Unexpected "+(at==w?"end of input":"'"+(this.terminals_[at]||at)+"'"),this.parseError(U,{text:B.match,token:this.terminals_[at]||at,line:B.yylineno,loc:y,expected:jt})}if(nt[0]instanceof Array&&nt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+st+", token: "+at);switch(nt[0]){case 1:_.push(at),z.push(B.yytext),H.push(B.yylloc),_.push(nt[1]),at=null,v=B.yyleng,R=B.yytext,F=B.yylineno,y=B.yylloc;break;case 2:if(bt=this.productions_[nt[1]][1],tt.$=z[z.length-bt],tt._$={first_line:H[H.length-(bt||1)].first_line,last_line:H[H.length-1].last_line,first_column:H[H.length-(bt||1)].first_column,last_column:H[H.length-1].last_column},Y&&(tt._$.range=[H[H.length-(bt||1)].range[0],H[H.length-1].range[1]]),et=this.performAction.apply(tt,[R,v,F,g.yy,nt[1],z,H].concat(m)),typeof et<"u")return et;bt&&(_=_.slice(0,-1*bt*2),z=z.slice(0,-1*bt),H=H.slice(0,-1*bt)),_.push(this.productions_[nt[1]][0]),z.push(tt.$),H.push(tt._$),Z=it[_[_.length-2]][_[_.length-1]],_.push(Z);break;case 3:return!0}}return!0}},p=function(){var E={EOF:1,parseError:function(S,_){if(this.yy.parser)this.yy.parser.parseError(S,_);else throw new Error(S)},setInput:function(T,S){return this.yy=S||this.yy||{},this._input=T,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var T=this._input[0];this.yytext+=T,this.yyleng++,this.offset++,this.match+=T,this.matched+=T;var S=T.match(/(?:\r\n?|\n).*/g);return S?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),T},unput:function(T){var S=T.length,_=T.split(/(?:\r\n?|\n)/g);this._input=T+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-S),this.offset-=S;var D=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),_.length-1&&(this.yylineno-=_.length-1);var z=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:_?(_.length===D.length?this.yylloc.first_column:0)+D[D.length-_.length].length-_[0].length:this.yylloc.first_column-S},this.options.ranges&&(this.yylloc.range=[z[0],z[0]+this.yyleng-S]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1368
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(T){this.unput(this.match.slice(T))},pastInput:function(){var T=this.matched.substr(0,this.matched.length-this.match.length);return(T.length>20?"...":"")+T.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var T=this.match;return T.length<20&&(T+=this._input.substr(0,20-T.length)),(T.substr(0,20)+(T.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var T=this.pastInput(),S=new Array(T.length+1).join("-");return T+this.upcomingInput()+`
|
|
1369
|
-
`+S+"^"},test_match:function(T,S){var _,D,z;if(this.options.backtrack_lexer&&(z={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&&(z.yylloc.range=this.yylloc.range.slice(0))),D=T[0].match(/(?:\r\n?|\n).*/g),D&&(this.yylineno+=D.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:D?D[D.length-1].length-D[D.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+T[0].length},this.yytext+=T[0],this.match+=T[0],this.matches=T,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(T[0].length),this.matched+=T[0],_=this.performAction.call(this,this.yy,this,S,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),_)return _;if(this._backtrack){for(var H in z)this[H]=z[H];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var T,S,_,D;this._more||(this.yytext="",this.match="");for(var z=this._currentRules(),H=0;H<z.length;H++)if(_=this._input.match(this.rules[z[H]]),_&&(!S||_[0].length>S[0].length)){if(S=_,D=H,this.options.backtrack_lexer){if(T=this.test_match(_,z[H]),T!==!1)return T;if(this._backtrack){S=!1;continue}else return!1}else if(!this.options.flex)break}return S?(T=this.test_match(S,z[D]),T!==!1?T:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1370
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var S=this.next();return S||this.lex()},begin:function(S){this.conditionStack.push(S)},popState:function(){var S=this.conditionStack.length-1;return S>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(S){return S=this.conditionStack.length-1-Math.abs(S||0),S>=0?this.conditionStack[S]:"INITIAL"},pushState:function(S){this.begin(S)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(S,_,D,z){switch(D){case 0:return this.begin("open_directive"),26;case 1:return this.begin("type_directive"),27;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),29;case 4:return 28;case 5:break;case 6:break;case 7:return 11;case 8:break;case 9:break;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 24;case 21:return 25;case 22:return 15;case 23:return 6;case 24:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23,24],inclusive:!0}}};return E}();f.lexer=p;function x(){this.yy={}}return x.prototype=f,f.Parser=x,new x}();dc.parser=dc;const am=dc,om=t=>t.match(/^\s*journey/)!==null;let An="";const fc=[],ya=[],ma=[],lm=function(t,e,i){si.parseDirective(this,t,e,i)},cm=function(){fc.length=0,ya.length=0,An="",ma.length=0,ar()},hm=function(t){An=t,fc.push(t)},um=function(){return fc},dm=function(){let t=vu();const e=100;let i=0;for(;!t&&i<e;)t=vu(),i++;return ya.push(...ma),ya},fm=function(){const t=[];return ya.forEach(i=>{i.people&&t.push(...i.people)}),[...new Set(t)].sort()},pm=function(t,e){const i=e.substr(1).split(":");let r=0,s=[];i.length===1?(r=Number(i[0]),s=[]):(r=Number(i[0]),s=i[1].split(","));const n=s.map(o=>o.trim()),a={section:An,type:An,people:n,task:t,score:r};ma.push(a)},gm=function(t){const e={section:An,type:An,description:t,task:t,classes:[]};ya.push(e)},vu=function(){const t=function(i){return ma[i].processed};let e=!0;for(const[i,r]of ma.entries())t(i),e=e&&r.processed;return e},Cu={parseDirective:lm,getConfig:()=>P().journey,clear:cm,setDiagramTitle:Ir,getDiagramTitle:Rr,setAccTitle:or,getAccTitle:fr,setAccDescription:pr,getAccDescription:gr,addSection:hm,getSections:um,getTasks:dm,addTask:pm,addTaskOrg:gm,getActors:function(){return fm()}},Co=function(t,e){const i=t.append("rect");return i.attr("x",e.x),i.attr("y",e.y),i.attr("fill",e.fill),i.attr("stroke",e.stroke),i.attr("width",e.width),i.attr("height",e.height),i.attr("rx",e.rx),i.attr("ry",e.ry),e.class!==void 0&&i.attr("class",e.class),i},ym=function(t,e){const r=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),s=t.append("g");s.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function n(l){const h=(0,Q.Nb1)().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function a(l){const h=(0,Q.Nb1)().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function o(l){l.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return e.score>3?n(s):e.score<3?a(s):o(s),r},Tu=function(t,e){const i=t.append("circle");return i.attr("cx",e.cx),i.attr("cy",e.cy),i.attr("class","actor-"+e.pos),i.attr("fill",e.fill),i.attr("stroke",e.stroke),i.attr("r",e.r),i.class!==void 0&&i.attr("class",i.class),e.title!==void 0&&i.append("title").text(e.title),i},Su=function(t,e){const i=e.text.replace(/<br\s*\/?>/gi," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),e.class!==void 0&&r.attr("class",e.class);const s=r.append("tspan");return s.attr("x",e.x+e.textMargin*2),s.text(i),r},mm=function(t,e){function i(s,n,a,o,l){return s+","+n+" "+(s+a)+","+n+" "+(s+a)+","+(n+o-l)+" "+(s+a-l*1.2)+","+(n+o)+" "+s+","+(n+o)}const r=t.append("polygon");r.attr("points",i(e.x,e.y,50,20,7)),r.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,Su(t,e)},bm=function(t,e,i){const r=t.append("g"),s=pc();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=i.width,s.height=i.height,s.class="journey-section section-type-"+e.num,s.rx=3,s.ry=3,Co(r,s),Au(i)(e.text,r,s.x,s.y,s.width,s.height,{class:"journey-section section-type-"+e.num},i,e.colour)};let wu=-1;const xm=function(t,e,i){const r=e.x+i.width/2,s=t.append("g");wu++;const n=300+5*30;s.append("line").attr("id","task"+wu).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",n).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),ym(s,{cx:r,cy:300+(5-e.score)*30,score:e.score});const a=pc();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=i.width,a.height=i.height,a.class="task task-type-"+e.num,a.rx=3,a.ry=3,Co(s,a);let o=e.x+14;e.people.forEach(l=>{const h=e.actors[l].color,u={cx:o,cy:e.y,r:7,fill:h,stroke:"#000",title:l,pos:e.actors[l].position};Tu(s,u),o+=10}),Au(i)(e.task,s,a.x,a.y,a.width,a.height,{class:"task"},i,e.colour)},km=function(t,e){Co(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},_m=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},pc=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},Au=function(){function t(s,n,a,o,l,h,u,d){const f=n.append("text").attr("x",a+l/2).attr("y",o+h/2+5).style("font-color",d).style("text-anchor","middle").text(s);r(f,u)}function e(s,n,a,o,l,h,u,d,f){const{taskFontSize:p,taskFontFamily:x}=d,E=s.split(/<br\s*\/?>/gi);for(let T=0;T<E.length;T++){const S=T*p-p*(E.length-1)/2,_=n.append("text").attr("x",a+l/2).attr("y",o).attr("fill",f).style("text-anchor","middle").style("font-size",p).style("font-family",x);_.append("tspan").attr("x",a+l/2).attr("dy",S).text(E[T]),_.attr("y",o+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(_,u)}}function i(s,n,a,o,l,h,u,d){const f=n.append("switch"),x=f.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",h).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");x.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(s),e(s,f,a,o,l,h,u,d),r(x,u)}function r(s,n){for(const a in n)a in n&&s.attr(a,n[a])}return function(s){return s.textPlacement==="fo"?i:s.textPlacement==="old"?t:e}}(),ba={drawRect:Co,drawCircle:Tu,drawSection:bm,drawText:Su,drawLabel:mm,drawTask:xm,drawBackgroundRect:km,getTextObj:_m,getNoteRect:pc,initGraphics:function(t){t.append("defs").append("marker").attr("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")}},Em=function(t){Object.keys(t).forEach(function(i){To[i]=t[i]})},bs={};function vm(t){const e=P().journey;let i=60;Object.keys(bs).forEach(r=>{const s=bs[r].color,n={cx:20,cy:i,r:7,fill:s,stroke:"#000",pos:bs[r].position};ba.drawCircle(t,n);const a={x:40,y:i+7,fill:"#666",text:r,textMargin:e.boxTextMargin|5};ba.drawText(t,a),i+=20})}const To=P().journey,nn=To.leftMargin,Cm=function(t,e,i,r){const s=P().journey;r.db.clear(),r.parser.parse(t+`
|
|
1371
|
-
`);const n=P().securityLevel;let a;n==="sandbox"&&(a=(0,Q.Ys)("#i"+e));const o=n==="sandbox"?(0,Q.Ys)(a.nodes()[0].contentDocument.body):(0,Q.Ys)("body");Tr.init();const l=o.select("#"+e);ba.initGraphics(l);const h=r.db.getTasks(),u=r.db.getDiagramTitle(),d=r.db.getActors();for(const S in bs)delete bs[S];let f=0;d.forEach(S=>{bs[S]={color:s.actorColours[f%s.actorColours.length],position:f},f++}),vm(l),Tr.insert(0,0,nn,Object.keys(bs).length*50),Tm(l,h,0);const p=Tr.getBounds();u&&l.append("text").text(u).attr("x",nn).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const x=p.stopy-p.starty+2*s.diagramMarginY,E=nn+p.stopx+2*s.diagramMarginX;Dr(l,x,E,s.useMaxWidth),l.append("line").attr("x1",nn).attr("y1",s.height*4).attr("x2",E-nn-4).attr("y2",s.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const T=u?70:0;l.attr("viewBox",`${p.startx} -25 ${E} ${x+T}`),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",x+T+25)},Tr={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,i,r){t[e]===void 0?t[e]=i:t[e]=r(i,t[e])},updateBounds:function(t,e,i,r){const s=P().journey,n=this;let a=0;function o(l){return function(u){a++;const d=n.sequenceItems.length-a+1;n.updateVal(u,"starty",e-d*s.boxMargin,Math.min),n.updateVal(u,"stopy",r+d*s.boxMargin,Math.max),n.updateVal(Tr.data,"startx",t-d*s.boxMargin,Math.min),n.updateVal(Tr.data,"stopx",i+d*s.boxMargin,Math.max),l!=="activation"&&(n.updateVal(u,"startx",t-d*s.boxMargin,Math.min),n.updateVal(u,"stopx",i+d*s.boxMargin,Math.max),n.updateVal(Tr.data,"starty",e-d*s.boxMargin,Math.min),n.updateVal(Tr.data,"stopy",r+d*s.boxMargin,Math.max))}}this.sequenceItems.forEach(o())},insert:function(t,e,i,r){const s=Math.min(t,i),n=Math.max(t,i),a=Math.min(e,r),o=Math.max(e,r);this.updateVal(Tr.data,"startx",s,Math.min),this.updateVal(Tr.data,"starty",a,Math.min),this.updateVal(Tr.data,"stopx",n,Math.max),this.updateVal(Tr.data,"stopy",o,Math.max),this.updateBounds(s,a,n,o)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},gc=To.sectionFills,Lu=To.sectionColours,Tm=function(t,e,i){const r=P().journey;let s="";const n=r.height*2+r.diagramMarginY,a=i+n;let o=0,l="#CCC",h="black",u=0;for(const[d,f]of e.entries()){if(s!==f.section){l=gc[o%gc.length],u=o%gc.length,h=Lu[o%Lu.length];const x={x:d*r.taskMargin+d*r.width+nn,y:50,text:f.section,fill:l,num:u,colour:h};ba.drawSection(t,x,r),s=f.section,o++}const p=f.people.reduce((x,E)=>(bs[E]&&(x[E]=bs[E]),x),{});f.x=d*r.taskMargin+d*r.width+nn,f.y=a,f.width=r.diagramMarginX,f.height=r.diagramMarginY,f.colour=h,f.fill=l,f.num=u,f.actors=p,ba.drawTask(t,f,r),Tr.insert(f.x,f.y,f.x+f.width+r.taskMargin,300+5*30)}},Bu={setConf:Em,draw:Cm};let Du={};const So={setConf:function(t){Du={...Du,...t}},draw:(t,e,i)=>{try{k.debug(`Renering svg for syntax error
|
|
1372
|
-
`);const r=(0,Q.Ys)("#"+e),s=r.append("g");s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+i),r.attr("height",100),r.attr("width",500),r.attr("viewBox","768 0 912 512")}catch(r){k.error("Error while rendering info diagram"),k.error(_f(r))}}},Iu="flowchart-elk",Sm={id:Iu,detector:(t,e)=>{var i;return!!(t.match(/^\s*flowchart-elk/)||t.match(/^\s*flowchart|graph/)&&((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="elk")},loader:async()=>{const{diagram:t}=await Promise.all([xt.e(9517),xt.e(1160)]).then(xt.bind(xt,19487));return{id:Iu,diagram:t}}},Ru="timeline",wm={id:Ru,detector:t=>t.match(/^\s*timeline/)!==null,loader:async()=>{const{diagram:t}=await Promise.all([xt.e(9517),xt.e(5493)]).then(xt.bind(xt,96316));return{id:Ru,diagram:t}}},Nu="mindmap",Am={id:Nu,detector:t=>t.match(/^\s*mindmap/)!==null,loader:async()=>{const{diagram:t}=await Promise.all([xt.e(9517),xt.e(5493),xt.e(8359),xt.e(8329),xt.e(4607)]).then(xt.bind(xt,47724));return{id:Nu,diagram:t}}};let Ou=!1;const xa=()=>{Ou||(Ou=!0,Kc(Sm,wm,Am),Ai("error",{db:{clear:()=>{}},styles:Qo,renderer:So,parser:{parser:{yy:{}},parse:()=>{}},init:()=>{}},t=>t.toLowerCase().trim()==="error"),Ai("---",{db:{clear:()=>{}},styles:Qo,renderer:So,parser:{parser:{yy:{}},parse:()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with unindented `---` blocks")}},init:()=>null},t=>t.toLowerCase().trimStart().startsWith("---")),Ai("c4",{parser:fp,db:B1,renderer:V1,styles:m1,init:t=>{V1.setConf(t.c4)}},pp),Ai("class",{parser:Y1,db:mn,renderer:Ag,styles:Vn,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,mn.clear()}},tg),Ai("classDiagram",{parser:Y1,db:mn,renderer:ky,styles:Vn,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,mn.clear()}},eg),Ai("er",{parser:_y,db:Sy,renderer:My,styles:h1},Ey),Ai("gantt",{parser:t3,db:Ml,renderer:I3,styles:u1},e3),Ai("info",{parser:R3,db:N3,renderer:O3,styles:d1},F3),Ai("pie",{parser:M3,db:V3,renderer:Y3,styles:f1},P3),Ai("requirement",{parser:z3,db:U3,renderer:K3,styles:p1},W3),Ai("sequence",{parser:Q3,db:M0,renderer:q0,styles:g1,init:t=>{if(t.sequence||(t.sequence={}),t.sequence.arrowMarkerAbsolute=t.arrowMarkerAbsolute,"sequenceDiagram"in t)throw new Error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.");M0.setWrap(t.wrap),q0.setConf(t.sequence)}},J3),Ai("state",{parser:X0,db:ms,renderer:Y5,styles:Na,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,ms.clear()}},J4),Ai("stateDiagram",{parser:X0,db:ms,renderer:nm,styles:Na,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,ms.clear()}},$4),Ai("journey",{parser:am,db:Cu,renderer:Bu,styles:y1,init:t=>{Bu.setConf(t.journey),Cu.clear()}},om),Ai("flowchart",{parser:_l,db:Xr,renderer:Tl,styles:Ra,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Jy.setConf(t.flowchart),Xr.clear(),Xr.setGen("gen-1")}},Py),Ai("flowchart-v2",{parser:_l,db:Xr,renderer:Tl,styles:Ra,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,n1({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),Tl.setConf(t.flowchart),Xr.clear(),Xr.setGen("gen-2")}},Vy),Ai("gitGraph",{parser:Pf,db:sp,renderer:up,styles:dp},Vf))};class yc{constructor(e,i){var r,s;this.txt=e,this.type="graph",this.detectTypeFailed=!1;const n=P();this.txt=e;try{this.type=Zo(e,n)}catch(l){this.handleError(l,i),this.type="error",this.detectTypeFailed=!0}const a=k1(this.type);k.debug("Type "+this.type),this.db=a.db,(s=(r=this.db).clear)==null||s.call(r),this.renderer=a.renderer,this.parser=a.parser;const o=this.parser.parse.bind(this.parser);this.parser.parse=l=>o(tf(l,this.db)),this.parser.parser.yy=this.db,a.init&&(a.init(n),k.info("Initialized diagram "+this.type,n)),this.txt+=`
|
|
1373
|
-
`,this.parse(this.txt,i)}parse(e,i){var r,s;if(this.detectTypeFailed)return!1;try{return e=e+`
|
|
1374
|
-
`,(s=(r=this.db).clear)==null||s.call(r),this.parser.parse(e),!0}catch(n){this.handleError(n,i)}return!1}handleError(e,i){if(i===void 0)throw e;if(Xo(e)){i(e.str,e.hash);return}i(e)}getParser(){return this.parser}getType(){return this.type}}const mc=(t,e)=>{const i=Zo(t,P());try{k1(i)}catch{const s=sf(i);if(!s)throw new Error(`Diagram ${i} not found.`);return s().then(({diagram:n})=>(Ai(i,n,void 0),new yc(t,e)))}return new yc(t,e)},bc=yc,Lm="graphics-document document";function Bm(t,e){t.attr("role",Lm),(0,We.Z)(e)||t.attr("aria-roledescription",e)}function Dm(t,e,i,r){if(t.insert!==void 0)if(e||i){if(i){const s="chart-desc-"+r;t.attr("aria-describedby",s),t.insert("desc",":first-child").attr("id",s).text(i)}if(e){const s="chart-title-"+r;t.attr("aria-labelledby",s),t.insert("title",":first-child").attr("id",s).text(e)}}else return}const xc=["graph","flowchart","flowchart-v2","stateDiagram","stateDiagram-v2"],Fu="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Mu="sandbox",Pu="loose",Im="http://www.w3.org/2000/svg",Vu="http://www.w3.org/1999/xlink",Yu="http://www.w3.org/1999/xhtml",Rm="100%",Nm="100%",Om="border:0;margin:0;",Fm="margin:0",Mm="allow-top-navigation-by-user-activation allow-popups",Pm='The "iframe" tag is not supported by your browser.',zu=["foreignobject"],Wu=["dominant-baseline"];function Vm(t,e){return xa(),new bc(t,e).parse(t,e)}async function Ym(t,e){return xa(),(await mc(t,e)).parse(t,e)}const Uu=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(i){return i.substring(0,i.length-1)}),e=e.replace(/#\w+;/g,function(i){const r=i.substring(1,i.length-1);return/^\+?\d+$/.test(r)?"\uFB02\xB0\xB0"+r+"\xB6\xDF":"\uFB02\xB0"+r+"\xB6\xDF"}),e},kc=function(t){let e=t;return e=e.replace(/fl°°/g,"&#"),e=e.replace(/fl°/g,"&"),e=e.replace(/¶ß/g,";"),e},Zu=(t,e,i=[])=>`
|
|
1375
|
-
.${t} ${e} { ${i.join(" !important; ")} !important; }`,zm=(t,e,i={})=>{var r;let s="";if(t.themeCSS!==void 0&&(s+=`
|
|
1376
|
-
${t.themeCSS}`),t.fontFamily!==void 0&&(s+=`
|
|
1377
|
-
:root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(s+=`
|
|
1378
|
-
:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!(0,We.Z)(i)&&xc.includes(e)){const l=t.htmlLabels||((r=t.flowchart)==null?void 0:r.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const h in i){const u=i[h];(0,We.Z)(u.styles)||l.forEach(d=>{s+=Zu(u.id,d,u.styles)}),(0,We.Z)(u.textStyles)||(s+=Zu(u.id,"tspan",u.textStyles))}}return s},Hu=(t,e,i,r)=>{const s=zm(t,e,i),n=Df(e,s,t.themeVariables);return ee(Bt(`${r}{${n}}`),ve)},Gu=(t="",e,i)=>{let r=t;return!i&&!e&&(r=r.replace(/marker-end="url\(.*?#/g,'marker-end="url(#')),r=kc(r),r=r.replace(/<br>/g,"<br/>"),r},ju=(t="",e)=>{const i=e?e.viewBox.baseVal.height+"px":Nm,r=btoa('<body style="'+Fm+'">'+t+"</body>");return`<iframe style="width:${Rm};height:${i};${Om}" src="data:text/html;base64,${r}" sandbox="${Mm}">
|
|
1379
|
-
${Pm}
|
|
1380
|
-
</iframe>`},wo=(t,e,i,r,s)=>{const n=t.append("div");n.attr("id",i),r&&n.attr("style",r);const a=n.append("svg").attr("id",e).attr("width","100%").attr("xmlns",Im);return s&&a.attr("xmlns:xlink",s),a.append("g"),t};function Ao(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const qu=(t,e,i,r)=>{var s,n,a;(s=t.getElementById(e))==null||s.remove(),(n=t.getElementById(i))==null||n.remove(),(a=t.getElementById(r))==null||a.remove()},Wm=function(t,e,i,r){var s,n,a,o;xa(),Mn();const l=ke.detectInit(e);l&&(Ks(l),Ko(l));const h=P();k.debug(h),e.length>((h==null?void 0:h.maxTextSize)??5e4)&&(e=Fu),e=e.replace(/\r\n?/g,`
|
|
1381
|
-
`);const u="#"+t,d="i"+t,f="#"+d,p="d"+t,x="#"+p;let E=(0,Q.Ys)("body");const T=h.securityLevel===Mu,S=h.securityLevel===Pu,_=h.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),T){const wt=Ao((0,Q.Ys)(r),d);E=(0,Q.Ys)(wt.nodes()[0].contentDocument.body),E.node().style.margin=0}else E=(0,Q.Ys)(r);wo(E,t,p,`font-family: ${_}`,Vu)}else{if(qu(document,t,p,d),T){const wt=Ao((0,Q.Ys)("body"),d);E=(0,Q.Ys)(wt.nodes()[0].contentDocument.body),E.node().style.margin=0}else E=(0,Q.Ys)("body");wo(E,t,p)}e=Uu(e);let D,z;try{if(D=mc(e),"then"in D)throw new Error("Diagram is a promise. Use renderAsync.")}catch(wt){D=new bc("error"),z=wt}const H=E.select(x).node(),it=D.type,R=H.firstChild,F=R.firstChild,v=xc.includes(it)?D.renderer.getClasses(e,D):{},L=Hu(h,it,v,u),w=document.createElement("style");w.innerHTML=L,R.insertBefore(w,F);try{D.renderer.draw(e,t,Da,D)}catch(wt){throw So.draw(e,t,Da),wt}const m=E.select(`${x} svg`),B=(n=(s=D.db).getAccTitle)==null?void 0:n.call(s),g=(o=(a=D.db).getAccDescription)==null?void 0:o.call(a);Xu(it,m,B,g),E.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",Yu);let O=E.select(x).node().innerHTML;if(k.debug("config.arrowMarkerAbsolute",h.arrowMarkerAbsolute),O=Gu(O,T,Ge(h.arrowMarkerAbsolute)),T){const wt=E.select(x+" svg").node();O=ju(O,wt)}else S||(O=$r().sanitize(O,{ADD_TAGS:zu,ADD_ATTR:Wu}));if(i!==void 0)switch(it){case"flowchart":case"flowchart-v2":i(O,Xr.bindFunctions);break;case"gantt":i(O,Ml.bindFunctions);break;case"class":case"classDiagram":i(O,mn.bindFunctions);break;default:i(O)}else k.debug("CB = undefined!");P0();const y=T?f:x,Y=(0,Q.Ys)(y).node();if(Y&&"remove"in Y&&Y.remove(),z)throw z;return O},Um=async function(t,e,i,r){var s,n,a,o;xa(),Mn();const l=ke.detectInit(e);l&&(Ks(l),Ko(l));const h=P();k.debug(h),e.length>((h==null?void 0:h.maxTextSize)??5e4)&&(e=Fu),e=e.replace(/\r\n?/g,`
|
|
1382
|
-
`);const u="#"+t,d="i"+t,f="#"+d,p="d"+t,x="#"+p;let E=(0,Q.Ys)("body");const T=h.securityLevel===Mu,S=h.securityLevel===Pu,_=h.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),T){const wt=Ao((0,Q.Ys)(r),d);E=(0,Q.Ys)(wt.nodes()[0].contentDocument.body),E.node().style.margin=0}else E=(0,Q.Ys)(r);wo(E,t,p,`font-family: ${_}`,Vu)}else{if(qu(document,t,p,d),T){const wt=Ao((0,Q.Ys)("body"),d);E=(0,Q.Ys)(wt.nodes()[0].contentDocument.body),E.node().style.margin=0}else E=(0,Q.Ys)("body");wo(E,t,p)}e=Uu(e);let D,z;try{D=await mc(e)}catch(wt){D=new bc("error"),z=wt}const H=E.select(x).node(),it=D.type,R=H.firstChild,F=R.firstChild,v=xc.includes(it)?D.renderer.getClasses(e,D):{},L=Hu(h,it,v,u),w=document.createElement("style");w.innerHTML=L,R.insertBefore(w,F);try{await D.renderer.draw(e,t,Da,D)}catch(wt){throw So.draw(e,t,Da),wt}const m=E.select(`${x} svg`),B=(n=(s=D.db).getAccTitle)==null?void 0:n.call(s),g=(o=(a=D.db).getAccDescription)==null?void 0:o.call(a);Xu(it,m,B,g),E.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",Yu);let O=E.select(x).node().innerHTML;if(k.debug("config.arrowMarkerAbsolute",h.arrowMarkerAbsolute),O=Gu(O,T,Ge(h.arrowMarkerAbsolute)),T){const wt=E.select(x+" svg").node();O=ju(O,wt)}else S||(O=$r().sanitize(O,{ADD_TAGS:zu,ADD_ATTR:Wu}));if(i!==void 0)switch(it){case"flowchart":case"flowchart-v2":i(O,Xr.bindFunctions);break;case"gantt":i(O,Ml.bindFunctions);break;case"class":case"classDiagram":i(O,mn.bindFunctions);break;default:i(O)}else k.debug("CB = undefined!");P0();const y=T?f:x,Y=(0,Q.Ys)(y).node();if(Y&&"remove"in Y&&Y.remove(),z)throw z;return O};function Zm(t={}){var e;t!=null&&t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables={fontFamily:t.fontFamily}),Cf(t),t!=null&&t.theme&&t.theme in ss?t.themeVariables=ss[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ss.default.getThemeVariables(t.themeVariables));const i=typeof t=="object"?vf(t):s1();Ae(i.logLevel),xa()}function Xu(t,e,i,r){Bm(e,t),Dm(e,i,r,e.attr("id"))}const si=Object.freeze({render:Wm,renderAsync:Um,parse:Vm,parseAsync:Ym,parseDirective:el,initialize:Zm,getConfig:P,setConfig:n1,getSiteConfig:s1,updateSiteConfig:Tf,reset:()=>{Mn()},globalReset:()=>{Mn(gn)},defaultConfig:gn});Ae(P().logLevel),Mn(P());const Hm=async function(t,e,i){try{await Qu(t,e,i)}catch(r){k.warn("Syntax Error rendering"),Xo(r)&&k.warn(r.str),Sr.parseError&&Sr.parseError(r)}},Ku=(t,e,i)=>{k.warn(t),Xo(t)?(i&&i(t.str,t.hash),e.push({...t,message:t.str,error:t})):(i&&i(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},Gm=function(t,e,i){const r=si.getConfig();t&&(Sr.sequenceConfig=t),k.debug(`${i?"":"No "}Callback function found`);let s;if(e===void 0)s=document.querySelectorAll(".mermaid");else if(typeof e=="string")s=document.querySelectorAll(e);else if(e instanceof HTMLElement)s=[e];else if(e instanceof NodeList)s=e;else throw new Error("Invalid argument nodes for mermaid.init");k.debug(`Found ${s.length} diagrams`),(t==null?void 0:t.startOnLoad)!==void 0&&(k.debug("Start On Load: "+(t==null?void 0:t.startOnLoad)),si.updateSiteConfig({startOnLoad:t==null?void 0:t.startOnLoad}));const n=new ke.initIdGenerator(r.deterministicIds,r.deterministicIDSeed);let a;const o=[];for(const l of Array.from(s)){k.info("Rendering diagram: "+l.id);if(l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${n.next()}`;a=l.innerHTML,a=(0,Vt.C)(ke.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const u=ke.detectInit(a);u&&k.debug("Detected early reinit: ",u);try{si.render(h,a,(d,f)=>{l.innerHTML=d,i!==void 0&&i(h),f&&f(l)},l)}catch(d){Ku(d,o,Sr.parseError)}}if(o.length>0)throw o[0]},jm=async(...t)=>{k.debug(`Loading ${t.length} external diagrams`);const i=(await Promise.allSettled(t.map(async({id:r,detector:s,loader:n})=>{const{diagram:a}=await n();Ai(r,a,s)}))).filter(r=>r.status==="rejected");if(i.length>0){k.error(`Failed to load ${i.length} external diagrams`);for(const r of i)k.error(r);throw new Error(`Failed to load ${i.length} external diagrams`)}},Qu=async function(t,e,i){const r=si.getConfig();t&&(Sr.sequenceConfig=t),k.debug(`${i?"":"No "}Callback function found`);let s;if(e===void 0)s=document.querySelectorAll(".mermaid");else if(typeof e=="string")s=document.querySelectorAll(e);else if(e instanceof HTMLElement)s=[e];else if(e instanceof NodeList)s=e;else throw new Error("Invalid argument nodes for mermaid.init");k.debug(`Found ${s.length} diagrams`),(t==null?void 0:t.startOnLoad)!==void 0&&(k.debug("Start On Load: "+(t==null?void 0:t.startOnLoad)),si.updateSiteConfig({startOnLoad:t==null?void 0:t.startOnLoad}));const n=new ke.initIdGenerator(r.deterministicIds,r.deterministicIDSeed);let a;const o=[];for(const l of Array.from(s)){k.info("Rendering diagram: "+l.id);if(l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${n.next()}`;a=l.innerHTML,a=(0,Vt.C)(ke.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const u=ke.detectInit(a);u&&k.debug("Detected early reinit: ",u);try{await si.renderAsync(h,a,(d,f)=>{l.innerHTML=d,i!==void 0&&i(h),f&&f(l)},l)}catch(d){Ku(d,o,Sr.parseError)}}if(o.length>0)throw o[0]},qm=function(t){si.initialize(t)},Xm=async(t,{lazyLoad:e=!0}={})=>{e?Kc(...t):await jm(...t)},Ju=function(){if(Sr.startOnLoad){const{startOnLoad:t}=si.getConfig();t&&Sr.init().catch(e=>k.error("Mermaid failed to initialize",e))}};if(typeof document<"u"){window.addEventListener("load",Ju,!1)}const Km=function(t){Sr.parseError=t},Qm=t=>si.parse(t,Sr.parseError),Lo=[];let _c=!1;const $u=async()=>{if(!_c){for(_c=!0;Lo.length>0;){const t=Lo.shift();if(t)try{await t()}catch(e){k.error("Error executing queue",e)}}_c=!1}},Jm=t=>new Promise((e,i)=>{const r=()=>new Promise((s,n)=>{si.parseAsync(t,Sr.parseError).then(a=>{s(a),e(a)},a=>{k.error("Error parsing",a),n(a),i(a)})});Lo.push(r),$u().catch(i)}),$m=(t,e,i,r)=>new Promise((s,n)=>{const a=()=>new Promise((o,l)=>{si.renderAsync(t,e,i,r).then(h=>{o(h),s(h)},h=>{k.error("Error parsing",h),l(h),n(h)})});Lo.push(a),$u().catch(n)}),Sr={startOnLoad:!0,diagrams:{},mermaidAPI:si,parse:Qm,parseAsync:Jm,render:si.render,renderAsync:$m,init:Hm,initThrowsErrors:Gm,initThrowsErrorsAsync:Qu,registerExternalDiagrams:Xm,initialize:qm,parseError:void 0,contentLoaded:Ju,setParseErrorHandler:Km}},47724:function(Ro,Ys,xt){xt.d(Ys,{diagram:function(){return ht}});var Vt=xt(46911),Je=xt(23198),_i=xt(71377),qi=xt.n(_i),Q=xt(14607),zs=xt.n(Q),$r=xt(91619),ot=xt(12281),Ot=xt(7201),fe=xt(27484),le=xt.n(fe),Ws=xt(17967),Us=xt(27856),No=xt.n(Us),Dn=xt(99791),Oo=xt(45625),Zs=xt(46060),In=xt(91518),_s=xt(59542),Fo=xt.n(_s),Es=xt(10285),Hs=xt.n(Es),di=xt(28734),ln=xt.n(di),Ii=function(){var V=function(Ci,It,Rt,Xt){for(Rt=Rt||{},Xt=Ci.length;Xt--;Rt[Ci[Xt]]=It);return Rt},I=[1,4],X=[1,13],ft=[1,12],ct=[1,15],Bt=[1,16],Yt=[1,20],Ut=[1,19],be=[6,7,8],Se=[1,26],xe=[1,24],Be=[1,25],pe=[6,7,11],Xe=[1,6,13,15,16,19,22],Mt=[1,33],Kt=[1,34],ie=[1,6,7,11,13,15,16,19,22],ye={trace:function(){},yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:function(It,Rt,Xt,he,We,Pt,k){var Ae=Pt.length-1;switch(We){case 6:case 7:return he;case 8:he.getLogger().trace("Stop NL ");break;case 9:he.getLogger().trace("Stop EOF ");break;case 11:he.getLogger().trace("Stop NL2 ");break;case 12:he.getLogger().trace("Stop EOF2 ");break;case 15:he.getLogger().info("Node: ",Pt[Ae].id),he.addNode(Pt[Ae-1].length,Pt[Ae].id,Pt[Ae].descr,Pt[Ae].type);break;case 16:he.getLogger().trace("Icon: ",Pt[Ae]),he.decorateNode({icon:Pt[Ae]});break;case 17:case 21:he.decorateNode({class:Pt[Ae]});break;case 18:he.getLogger().trace("SPACELIST");break;case 19:he.getLogger().trace("Node: ",Pt[Ae].id),he.addNode(0,Pt[Ae].id,Pt[Ae].descr,Pt[Ae].type);break;case 20:he.decorateNode({icon:Pt[Ae]});break;case 25:he.getLogger().trace("node found ..",Pt[Ae-2]),this.$={id:Pt[Ae-1],descr:Pt[Ae-1],type:he.getType(Pt[Ae-2],Pt[Ae])};break;case 26:this.$={id:Pt[Ae],descr:Pt[Ae],type:he.nodeType.DEFAULT};break;case 27:he.getLogger().trace("node found ..",Pt[Ae-3]),this.$={id:Pt[Ae-3],descr:Pt[Ae-1],type:he.getType(Pt[Ae-2],Pt[Ae])};break}},table:[{3:1,4:2,5:3,6:[1,5],8:I},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:I},{6:X,7:[1,10],9:9,12:11,13:ft,14:14,15:ct,16:Bt,17:17,18:18,19:Yt,22:Ut},V(be,[2,3]),{1:[2,2]},V(be,[2,4]),V(be,[2,5]),{1:[2,6],6:X,12:21,13:ft,14:14,15:ct,16:Bt,17:17,18:18,19:Yt,22:Ut},{6:X,9:22,12:11,13:ft,14:14,15:ct,16:Bt,17:17,18:18,19:Yt,22:Ut},{6:Se,7:xe,10:23,11:Be},V(pe,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:Yt,22:Ut}),V(pe,[2,18]),V(pe,[2,19]),V(pe,[2,20]),V(pe,[2,21]),V(pe,[2,23]),V(pe,[2,24]),V(pe,[2,26],{19:[1,30]}),{20:[1,31]},{6:Se,7:xe,10:32,11:Be},{1:[2,7],6:X,12:21,13:ft,14:14,15:ct,16:Bt,17:17,18:18,19:Yt,22:Ut},V(Xe,[2,14],{7:Mt,11:Kt}),V(ie,[2,8]),V(ie,[2,9]),V(ie,[2,10]),V(pe,[2,15]),V(pe,[2,16]),V(pe,[2,17]),{20:[1,35]},{21:[1,36]},V(Xe,[2,13],{7:Mt,11:Kt}),V(ie,[2,11]),V(ie,[2,12]),{21:[1,37]},V(pe,[2,25]),V(pe,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:function(It,Rt){if(Rt.recoverable)this.trace(It);else{var Xt=new Error(It);throw Xt.hash=Rt,Xt}},parse:function(It){var Rt=this,Xt=[0],he=[],We=[null],Pt=[],k=this.table,Ae="",ai=0,As=0,cn=2,qs=1,je=Pt.slice.call(arguments,1),Ke=Object.create(this.lexer),ei={yy:{}};for(var is in this.yy)Object.prototype.hasOwnProperty.call(this.yy,is)&&(ei.yy[is]=this.yy[is]);Ke.setInput(It,ei.yy),ei.yy.lexer=Ke,ei.yy.parser=this,typeof Ke.yylloc>"u"&&(Ke.yylloc={});var _r=Ke.yylloc;Pt.push(_r);var Ls=Ke.options&&Ke.options.ranges;typeof ei.yy.parseError=="function"?this.parseError=ei.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ir(){var Br;return Br=he.pop()||Ke.lex()||qs,typeof Br!="number"&&(Br instanceof Array&&(he=Br,Br=he.pop()),Br=Rt.symbols_[Br]||Br),Br}for(var wi,Ge,ii,Qt,ci={},rs,rr,Ea,hn;;){if(Ge=Xt[Xt.length-1],this.defaultActions[Ge]?ii=this.defaultActions[Ge]:((wi===null||typeof wi>"u")&&(wi=ir()),ii=k[Ge]&&k[Ge][wi]),typeof ii>"u"||!ii.length||!ii[0]){var Rn="";hn=[];for(rs in k[Ge])this.terminals_[rs]&&rs>cn&&hn.push("'"+this.terminals_[rs]+"'");Ke.showPosition?Rn="Parse error on line "+(ai+1)+`:
|
|
1383
|
-
`+Ke.showPosition()+`
|
|
1384
|
-
Expecting `+hn.join(", ")+", got '"+(this.terminals_[wi]||wi)+"'":Rn="Parse error on line "+(ai+1)+": Unexpected "+(wi==qs?"end of input":"'"+(this.terminals_[wi]||wi)+"'"),this.parseError(Rn,{text:Ke.match,token:this.terminals_[wi]||wi,line:Ke.yylineno,loc:_r,expected:hn})}if(ii[0]instanceof Array&&ii.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ge+", token: "+wi);switch(ii[0]){case 1:Xt.push(wi),We.push(Ke.yytext),Pt.push(Ke.yylloc),Xt.push(ii[1]),wi=null,As=Ke.yyleng,Ae=Ke.yytext,ai=Ke.yylineno,_r=Ke.yylloc;break;case 2:if(rr=this.productions_[ii[1]][1],ci.$=We[We.length-rr],ci._$={first_line:Pt[Pt.length-(rr||1)].first_line,last_line:Pt[Pt.length-1].last_line,first_column:Pt[Pt.length-(rr||1)].first_column,last_column:Pt[Pt.length-1].last_column},Ls&&(ci._$.range=[Pt[Pt.length-(rr||1)].range[0],Pt[Pt.length-1].range[1]]),Qt=this.performAction.apply(ci,[Ae,As,ai,ei.yy,ii[1],We,Pt].concat(je)),typeof Qt<"u")return Qt;rr&&(Xt=Xt.slice(0,-1*rr*2),We=We.slice(0,-1*rr),Pt=Pt.slice(0,-1*rr)),Xt.push(this.productions_[ii[1]][0]),We.push(ci.$),Pt.push(ci._$),Ea=k[Xt[Xt.length-2]][Xt[Xt.length-1]],Xt.push(Ea);break;case 3:return!0}}return!0}},Ze=function(){var Ci={EOF:1,parseError:function(Rt,Xt){if(this.yy.parser)this.yy.parser.parseError(Rt,Xt);else throw new Error(Rt)},setInput:function(It,Rt){return this.yy=Rt||this.yy||{},this._input=It,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},input:function(){var It=this._input[0];this.yytext+=It,this.yyleng++,this.offset++,this.match+=It,this.matched+=It;var Rt=It.match(/(?:\r\n?|\n).*/g);return Rt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),It},unput:function(It){var Rt=It.length,Xt=It.split(/(?:\r\n?|\n)/g);this._input=It+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Rt),this.offset-=Rt;var he=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),Xt.length-1&&(this.yylineno-=Xt.length-1);var We=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:Xt?(Xt.length===he.length?this.yylloc.first_column:0)+he[he.length-Xt.length].length-Xt[0].length:this.yylloc.first_column-Rt},this.options.ranges&&(this.yylloc.range=[We[0],We[0]+this.yyleng-Rt]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1385
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(It){this.unput(this.match.slice(It))},pastInput:function(){var It=this.matched.substr(0,this.matched.length-this.match.length);return(It.length>20?"...":"")+It.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var It=this.match;return It.length<20&&(It+=this._input.substr(0,20-It.length)),(It.substr(0,20)+(It.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var It=this.pastInput(),Rt=new Array(It.length+1).join("-");return It+this.upcomingInput()+`
|
|
1386
|
-
`+Rt+"^"},test_match:function(It,Rt){var Xt,he,We;if(this.options.backtrack_lexer&&(We={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&&(We.yylloc.range=this.yylloc.range.slice(0))),he=It[0].match(/(?:\r\n?|\n).*/g),he&&(this.yylineno+=he.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:he?he[he.length-1].length-he[he.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+It[0].length},this.yytext+=It[0],this.match+=It[0],this.matches=It,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(It[0].length),this.matched+=It[0],Xt=this.performAction.call(this,this.yy,this,Rt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Xt)return Xt;if(this._backtrack){for(var Pt in We)this[Pt]=We[Pt];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var It,Rt,Xt,he;this._more||(this.yytext="",this.match="");for(var We=this._currentRules(),Pt=0;Pt<We.length;Pt++)if(Xt=this._input.match(this.rules[We[Pt]]),Xt&&(!Rt||Xt[0].length>Rt[0].length)){if(Rt=Xt,he=Pt,this.options.backtrack_lexer){if(It=this.test_match(Xt,We[Pt]),It!==!1)return It;if(this._backtrack){Rt=!1;continue}else return!1}else if(!this.options.flex)break}return Rt?(It=this.test_match(Rt,We[he]),It!==!1?It:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1387
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Rt=this.next();return Rt||this.lex()},begin:function(Rt){this.conditionStack.push(Rt)},popState:function(){var Rt=this.conditionStack.length-1;return Rt>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(Rt){return Rt=this.conditionStack.length-1-Math.abs(Rt||0),Rt>=0?this.conditionStack[Rt]:"INITIAL"},pushState:function(Rt){this.begin(Rt)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(Rt,Xt,he,We){switch(he){case 0:Rt.getLogger().trace("Found comment",Xt.yytext);break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:Rt.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return Rt.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:Rt.getLogger().trace("end icon"),this.popState();break;case 10:return Rt.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return Rt.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return Rt.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return Rt.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:Rt.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 22:return Rt.getLogger().trace("description:",Xt.yytext),"NODE_DESCR";case 23:this.popState();break;case 24:return this.popState(),Rt.getLogger().trace("node end ))"),"NODE_DEND";case 25:return this.popState(),Rt.getLogger().trace("node end )"),"NODE_DEND";case 26:return this.popState(),Rt.getLogger().trace("node end ...",Xt.yytext),"NODE_DEND";case 27:return this.popState(),Rt.getLogger().trace("node end (("),"NODE_DEND";case 28:return this.popState(),Rt.getLogger().trace("node end (-"),"NODE_DEND";case 29:return this.popState(),Rt.getLogger().trace("node end (-"),"NODE_DEND";case 30:return this.popState(),Rt.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),Rt.getLogger().trace("node end (("),"NODE_DEND";case 32:return Rt.getLogger().trace("Long description:",Xt.yytext),20;case 33:return Rt.getLogger().trace("Long description:",Xt.yytext),20}},rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\-\)\{\}]+)/i,/^(?:$)/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR:{rules:[22,23],inclusive:!1},NODE:{rules:[21,24,25,26,27,28,29,30,31,32,33],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return Ci}();ye.lexer=Ze;function $t(){this.yy={}}return $t.prototype=ye,ye.Parser=$t,new $t}();Ii.parser=Ii;const ts=Ii,Vi=V=>(0,Vt.n)(V,(0,Vt.g)());let Ei=[],vs=0,es={};const Gs=()=>{Ei=[],vs=0,es={}},Cs=function(V){for(let I=Ei.length-1;I>=0;I--)if(Ei[I].level<V)return Ei[I];return null},Ts=()=>Ei.length>0?Ei[0]:null,Ur=(V,I,X,ft)=>{Vt.l.info("addNode",V,I,X,ft);const ct=(0,Vt.g)(),Bt={id:vs++,nodeId:Vi(I),level:V,descr:Vi(X),type:ft,children:[],width:(0,Vt.g)().mindmap.maxNodeWidth};switch(Bt.type){case Ue.ROUNDED_RECT:Bt.padding=2*ct.mindmap.padding;break;case Ue.RECT:Bt.padding=2*ct.mindmap.padding;break;case Ue.HEXAGON:Bt.padding=2*ct.mindmap.padding;break;default:Bt.padding=ct.mindmap.padding}const Yt=Cs(V);if(Yt)Yt.children.push(Bt),Ei.push(Bt);else if(Ei.length===0)Ei.push(Bt);else{let Ut=new Error('There can be only one root. No parent could be found for ("'+Bt.descr+'")');throw Ut.hash={text:"branch "+name,token:"branch "+name,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+name+'"']},Ut}},Ue={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Ss=(V,I)=>{switch(Vt.l.debug("In get type",V,I),V){case"[":return Ue.RECT;case"(":return I===")"?Ue.ROUNDED_RECT:Ue.CLOUD;case"((":return Ue.CIRCLE;case")":return Ue.CLOUD;case"))":return Ue.BANG;case"{{":return Ue.HEXAGON;default:return Ue.DEFAULT}},Zr=(V,I)=>{es[V]=I},js=V=>{const I=Ei[Ei.length-1];V&&V.icon&&(I.icon=Vi(V.icon)),V&&V.class&&(I.class=Vi(V.class))},Yi=V=>{switch(V){case Ue.DEFAULT:return"no-border";case Ue.RECT:return"rect";case Ue.ROUNDED_RECT:return"rounded-rect";case Ue.CIRCLE:return"circle";case Ue.CLOUD:return"cloud";case Ue.BANG:return"bang";case Ue.HEXAGON:return"hexgon";default:return"no-border"}};let ws;const Ri=V=>{ws=V},Lr=()=>Vt.l,Xi=V=>Ei[V],vt=V=>es[V],zt=Object.freeze(Object.defineProperty({__proto__:null,addNode:Ur,clear:Gs,decorateNode:js,getElementById:vt,getLogger:Lr,getMindmap:Ts,getNodeById:Xi,getType:Ss,nodeType:Ue,get parseError(){return ws},sanitizeText:Vi,setElementForId:Zr,setErrorHandler:Ri,type2Str:Yi},Symbol.toStringTag,{value:"Module"})),Wt=12;function Ht(V,I){V.each(function(){var X=(0,Je.Ys)(this),ft=X.text().split(/(\s+|<br>)/).reverse(),ct,Bt=[],Yt=1.1,Ut=X.attr("y"),be=parseFloat(X.attr("dy")),Se=X.text(null).append("tspan").attr("x",0).attr("y",Ut).attr("dy",be+"em");for(let xe=0;xe<ft.length;xe++)ct=ft[ft.length-1-xe],Bt.push(ct),Se.text(Bt.join(" ").trim()),(Se.node().getComputedTextLength()>I||ct==="<br>")&&(Bt.pop(),Se.text(Bt.join(" ").trim()),ct==="<br>"?Bt=[""]:Bt=[ct],Se=X.append("tspan").attr("x",0).attr("y",Ut).attr("dy",Yt+"em").text(ct))})}const ee=function(V,I,X){V.append("path").attr("id","node-"+I.id).attr("class","node-bkg node-"+Yi(I.type)).attr("d",`M0 ${I.height-5} v${-I.height+2*5} q0,-5 5,-5 h${I.width-2*5} q5,0 5,5 v${I.height-5} H0 Z`),V.append("line").attr("class","node-line-"+X).attr("x1",0).attr("y1",I.height).attr("x2",I.width).attr("y2",I.height)},ve=function(V,I){V.append("rect").attr("id","node-"+I.id).attr("class","node-bkg node-"+Yi(I.type)).attr("height",I.height).attr("width",I.width)},He=function(V,I){const X=I.width,ft=I.height,ct=.15*X,Bt=.25*X,Yt=.35*X,Ut=.2*X;V.append("path").attr("id","node-"+I.id).attr("class","node-bkg node-"+Yi(I.type)).attr("d",`M0 0 a${ct},${ct} 0 0,1 ${X*.25},${-1*X*.1}
|
|
1388
|
-
a${Yt},${Yt} 1 0,1 ${X*.4},${-1*X*.1}
|
|
1389
|
-
a${Bt},${Bt} 1 0,1 ${X*.35},${1*X*.2}
|
|
1390
|
-
|
|
1391
|
-
a${ct},${ct} 1 0,1 ${X*.15},${1*ft*.35}
|
|
1392
|
-
a${Ut},${Ut} 1 0,1 ${-1*X*.15},${1*ft*.65}
|
|
1393
|
-
|
|
1394
|
-
a${Bt},${ct} 1 0,1 ${-1*X*.25},${X*.15}
|
|
1395
|
-
a${Yt},${Yt} 1 0,1 ${-1*X*.5},0
|
|
1396
|
-
a${ct},${ct} 1 0,1 ${-1*X*.25},${-1*X*.15}
|
|
1397
|
-
|
|
1398
|
-
a${ct},${ct} 1 0,1 ${-1*X*.1},${-1*ft*.35}
|
|
1399
|
-
a${Ut},${Ut} 1 0,1 ${X*.1},${-1*ft*.65}
|
|
1400
|
-
|
|
1401
|
-
H0 V0 Z`)},ce=function(V,I){const X=I.width,ft=I.height,ct=.15*X;V.append("path").attr("id","node-"+I.id).attr("class","node-bkg node-"+Yi(I.type)).attr("d",`M0 0 a${ct},${ct} 1 0,0 ${X*.25},${-1*ft*.1}
|
|
1402
|
-
a${ct},${ct} 1 0,0 ${X*.25},0
|
|
1403
|
-
a${ct},${ct} 1 0,0 ${X*.25},0
|
|
1404
|
-
a${ct},${ct} 1 0,0 ${X*.25},${1*ft*.1}
|
|
1405
|
-
|
|
1406
|
-
a${ct},${ct} 1 0,0 ${X*.15},${1*ft*.33}
|
|
1407
|
-
a${ct*.8},${ct*.8} 1 0,0 0,${1*ft*.34}
|
|
1408
|
-
a${ct},${ct} 1 0,0 ${-1*X*.15},${1*ft*.33}
|
|
1409
|
-
|
|
1410
|
-
a${ct},${ct} 1 0,0 ${-1*X*.25},${ft*.15}
|
|
1411
|
-
a${ct},${ct} 1 0,0 ${-1*X*.25},0
|
|
1412
|
-
a${ct},${ct} 1 0,0 ${-1*X*.25},0
|
|
1413
|
-
a${ct},${ct} 1 0,0 ${-1*X*.25},${-1*ft*.15}
|
|
1414
|
-
|
|
1415
|
-
a${ct},${ct} 1 0,0 ${-1*X*.1},${-1*ft*.33}
|
|
1416
|
-
a${ct*.8},${ct*.8} 1 0,0 0,${-1*ft*.34}
|
|
1417
|
-
a${ct},${ct} 1 0,0 ${X*.1},${-1*ft*.33}
|
|
1418
|
-
|
|
1419
|
-
H0 V0 Z`)},fi=function(V,I){V.append("circle").attr("id","node-"+I.id).attr("class","node-bkg node-"+Yi(I.type)).attr("r",I.width/2)};function ge(V,I,X,ft,ct){return V.insert("polygon",":first-child").attr("points",ft.map(function(Bt){return Bt.x+","+Bt.y}).join(" ")).attr("transform","translate("+(ct.width-I)/2+", "+X+")")}const me=function(V,I){const X=I.height,ct=X/4,Bt=I.width-I.padding+2*ct,Yt=[{x:ct,y:0},{x:Bt-ct,y:0},{x:Bt,y:-X/2},{x:Bt-ct,y:-X},{x:ct,y:-X},{x:0,y:-X/2}];ge(V,Bt,X,Yt,I)},_e=function(V,I){V.append("rect").attr("id","node-"+I.id).attr("class","node-bkg node-"+Yi(I.type)).attr("height",I.height).attr("rx",I.padding).attr("ry",I.padding).attr("width",I.width)},$e={drawNode:function(V,I,X,ft){const ct=X%(Wt-1),Bt=V.append("g");I.section=ct;let Yt="section-"+ct;ct<0&&(Yt+=" section-root"),Bt.attr("class",(I.class?I.class+" ":"")+"mindmap-node "+Yt);const Ut=Bt.append("g"),be=Bt.append("g"),xe=be.append("text").text(I.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(Ht,I.width).node().getBBox(),Be=ft.fontSize.replace?ft.fontSize.replace("px",""):ft.fontSize;if(I.height=xe.height+Be*1.1*.5+I.padding,I.width=xe.width+2*I.padding,I.icon)if(I.type===Ue.CIRCLE)I.height+=50,I.width+=50,Bt.append("foreignObject").attr("height","50px").attr("width",I.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+ct+" "+I.icon),be.attr("transform","translate("+I.width/2+", "+(I.height/2-1.5*I.padding)+")");else{I.width+=50;const pe=I.height;I.height=Math.max(pe,60);const Xe=Math.abs(I.height-pe);Bt.append("foreignObject").attr("width","60px").attr("height",I.height).attr("style","text-align: center;margin-top:"+Xe/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+ct+" "+I.icon),be.attr("transform","translate("+(25+I.width/2)+", "+(Xe/2+I.padding/2)+")")}else be.attr("transform","translate("+I.width/2+", "+I.padding/2+")");switch(I.type){case Ue.DEFAULT:ee(Ut,I,ct);break;case Ue.ROUNDED_RECT:_e(Ut,I);break;case Ue.RECT:ve(Ut,I);break;case Ue.CIRCLE:Ut.attr("transform","translate("+I.width/2+", "+ +I.height/2+")"),fi(Ut,I);break;case Ue.CLOUD:He(Ut,I);break;case Ue.BANG:ce(Ut,I);break;case Ue.HEXAGON:me(Ut,I);break}return Zr(I.id,Bt),I.height},positionNode:function(V){const I=vt(V.id),X=V.x||0,ft=V.y||0;I.attr("transform","translate("+X+","+ft+")")},drawEdge:function(I,X,ft,ct,Bt){const Yt=Bt%(Wt-1),Ut=ft.x+ft.width/2,be=ft.y+ft.height/2,Se=X.x+X.width/2,xe=X.y+X.height/2,Be=Se>Ut?Ut+Math.abs(Ut-Se)/2:Ut-Math.abs(Ut-Se)/2,pe=xe>be?be+Math.abs(be-xe)/2:be-Math.abs(be-xe)/2,Xe=Se>Ut?Math.abs(Ut-Be)/2+Ut:-Math.abs(Ut-Be)/2+Ut,Mt=xe>be?Math.abs(be-pe)/2+be:-Math.abs(be-pe)/2+be;I.append("path").attr("d",ft.direction==="TB"||ft.direction==="BT"?`M${Ut},${be} Q${Ut},${Mt} ${Be},${pe} T${Se},${xe}`:`M${Ut},${be} Q${Xe},${be} ${Be},${pe} T${Se},${xe}`).attr("class","edge section-edge-"+Yt+" edge-depth-"+ct)}};qi().use(zs());function Qe(V,I,X,ft){$e.drawNode(V,I,X,ft),I.children&&I.children.forEach((ct,Bt)=>{Qe(V,ct,X<0?Bt:X,ft)})}function ti(V,I){I.edges().map((X,ft)=>{const ct=X.data();if(X[0]._private.bodyBounds){const Bt=X[0]._private.rscratch;Vt.l.trace("Edge: ",ft,ct),V.insert("path").attr("d",`M ${Bt.startX},${Bt.startY} L ${Bt.midX},${Bt.midY} L${Bt.endX},${Bt.endY} `).attr("class","edge section-edge-"+ct.section+" edge-depth-"+ct.depth)}})}function pi(V,I,X,ft){I.add({group:"nodes",data:{id:V.id,labelText:V.descr,height:V.height,width:V.width,level:ft,nodeId:V.id,padding:V.padding,type:V.type},position:{x:V.x,y:V.y}}),V.children&&V.children.forEach(ct=>{pi(ct,I,X,ft+1),I.add({group:"edges",data:{id:`${V.id}_${ct.id}`,source:V.id,target:ct.id,depth:ft,section:ct.section}})})}function ze(V,I){return new Promise(X=>{const ft=(0,Je.Ys)("body").append("div").attr("id","cy").attr("style","display:none"),ct=qi()({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});ft.remove(),pi(V,ct,I,0),ct.nodes().forEach(function(Bt){Bt.layoutDimensions=()=>{const Yt=Bt.data();return{w:Yt.width,h:Yt.height}}}),ct.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),ct.ready(Bt=>{Vt.l.info("Ready",Bt),X(ct)})})}function Wi(V){V.nodes().map((I,X)=>{const ft=I.data();ft.x=I.position().x,ft.y=I.position().y,$e.positionNode(ft);const ct=vt(ft.nodeId);Vt.l.info("Id:",X,"Position: (",I.position().x,", ",I.position().y,")",ft),ct.attr("transform",`translate(${I.position().x-ft.width/2}, ${I.position().y-ft.height/2})`),ct.attr("attr",`apa-${X})`)})}const kr={draw:async(V,I,X,ft)=>{const ct=(0,Vt.g)();ft.db.clear(),ft.parser.parse(V),Vt.l.debug(`Renering info diagram
|
|
1420
|
-
`+V);const Bt=(0,Vt.g)().securityLevel;let Yt;Bt==="sandbox"&&(Yt=(0,Je.Ys)("#i"+I));const be=(Bt==="sandbox"?(0,Je.Ys)(Yt.nodes()[0].contentDocument.body):(0,Je.Ys)("body")).select("#"+I);be.append("g");const Se=ft.db.getMindmap(),xe=be.append("g");xe.attr("class","mindmap-edges");const Be=be.append("g");Be.attr("class","mindmap-nodes"),Qe(Be,Se,-1,ct);const pe=await ze(Se,ct);ti(xe,pe),Wi(pe),(0,Vt.s)(void 0,be,ct.mindmap.padding,ct.mindmap.useMaxWidth)}},er=V=>{let I="";for(let X=0;X<V.THEME_COLOR_LIMIT;X++)V["lineColor"+X]=V["lineColor"+X]||V["cScaleInv"+X],(0,$r.Z)(V["lineColor"+X])?V["lineColor"+X]=(0,ot.Z)(V["lineColor"+X],20):V["lineColor"+X]=(0,Ot.Z)(V["lineColor"+X],20);for(let X=0;X<V.THEME_COLOR_LIMIT;X++){const ft=""+(17-3*X);I+=`
|
|
1421
|
-
.section-${X-1} rect, .section-${X-1} path, .section-${X-1} circle, .section-${X-1} polygon, .section-${X-1} path {
|
|
1422
|
-
fill: ${V["cScale"+X]};
|
|
1423
|
-
}
|
|
1424
|
-
.section-${X-1} text {
|
|
1425
|
-
fill: ${V["cScaleLabel"+X]};
|
|
1426
|
-
}
|
|
1427
|
-
.node-icon-${X-1} {
|
|
1428
|
-
font-size: 40px;
|
|
1429
|
-
color: ${V["cScaleLabel"+X]};
|
|
1430
|
-
}
|
|
1431
|
-
.section-edge-${X-1}{
|
|
1432
|
-
stroke: ${V["cScale"+X]};
|
|
1433
|
-
}
|
|
1434
|
-
.edge-depth-${X-1}{
|
|
1435
|
-
stroke-width: ${ft};
|
|
1436
|
-
}
|
|
1437
|
-
.section-${X-1} line {
|
|
1438
|
-
stroke: ${V["cScaleInv"+X]} ;
|
|
1439
|
-
stroke-width: 3;
|
|
1440
|
-
}
|
|
1441
|
-
|
|
1442
|
-
.disabled, .disabled circle, .disabled text {
|
|
1443
|
-
fill: lightgray;
|
|
1444
|
-
}
|
|
1445
|
-
.disabled text {
|
|
1446
|
-
fill: #efefef;
|
|
1447
|
-
}
|
|
1448
|
-
`}return I},ht={db:zt,renderer:kr,parser:ts,styles:V=>`
|
|
1449
|
-
.edge {
|
|
1450
|
-
stroke-width: 3;
|
|
1451
|
-
}
|
|
1452
|
-
${er(V)}
|
|
1453
|
-
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
|
1454
|
-
fill: ${V.git0};
|
|
1455
|
-
}
|
|
1456
|
-
.section-root text {
|
|
1457
|
-
fill: ${V.gitBranchLabel0};
|
|
1458
|
-
}
|
|
1459
|
-
.icon-container {
|
|
1460
|
-
height:100%;
|
|
1461
|
-
display: flex;
|
|
1462
|
-
justify-content: center;
|
|
1463
|
-
align-items: center;
|
|
1464
|
-
}
|
|
1465
|
-
.edge {
|
|
1466
|
-
fill: none;
|
|
1467
|
-
}
|
|
1468
|
-
`}},96316:function(Ro,Ys,xt){xt.d(Ys,{diagram:function(){return er}});var Vt=xt(46911),Je=xt(23198),_i=xt(91619),qi=xt(12281),Q=xt(7201),zs=xt(27484),$r=xt.n(zs),ot=xt(17967),Ot=xt(27856),fe=xt.n(Ot),le=xt(99791),Ws=xt(45625),Us=xt(46060),No=xt(91518),Dn=xt(59542),Oo=xt.n(Dn),Zs=xt(10285),In=xt.n(Zs),_s=xt(28734),Fo=xt.n(_s),Es=function(){var mt=function(Xe,Mt,Kt,ie){for(Kt=Kt||{},ie=Xe.length;ie--;Kt[Xe[ie]]=Mt);return Kt},J=[1,2],ht=[1,5],V=[6,9,11,17,18,20,22,23,26,27,28],I=[1,15],X=[1,16],ft=[1,17],ct=[1,18],Bt=[1,19],Yt=[1,23],Ut=[1,24],be=[1,27],Se=[4,6,9,11,17,18,20,22,23,26,27,28],xe={trace:function(){},yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,period_statement:24,event_statement:25,period:26,event:27,open_directive:28,type_directive:29,arg_directive:30,close_directive:31,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",26:"period",27:"event",28:"open_directive",29:"type_directive",30:"arg_directive",31:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,2],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[24,1],[25,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(Mt,Kt,ie,ye,Ze,$t,Ci){var It=$t.length-1;switch(Ze){case 1:return $t[It-1];case 3:this.$=[];break;case 4:$t[It-1].push($t[It]),this.$=$t[It-1];break;case 5:case 6:this.$=$t[It];break;case 7:case 8:this.$=[];break;case 11:ye.getCommonDb().setDiagramTitle($t[It].substr(6)),this.$=$t[It].substr(6);break;case 12:this.$=$t[It].trim(),ye.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=$t[It].trim(),ye.getCommonDb().setAccDescription(this.$);break;case 15:ye.addSection($t[It].substr(8)),this.$=$t[It].substr(8);break;case 19:ye.addTask($t[It],0,""),this.$=$t[It];break;case 20:ye.addEvent($t[It].substr(2)),this.$=$t[It];break;case 21:ye.parseDirective("%%{","open_directive");break;case 22:ye.parseDirective($t[It],"type_directive");break;case 23:$t[It]=$t[It].trim().replace(/'/g,'"'),ye.parseDirective($t[It],"arg_directive");break;case 24:ye.parseDirective("}%%","close_directive","timeline");break}},table:[{3:1,4:J,7:3,12:4,28:ht},{1:[3]},mt(V,[2,3],{5:6}),{3:7,4:J,7:3,12:4,28:ht},{13:8,29:[1,9]},{29:[2,21]},{6:[1,10],7:22,8:11,9:[1,12],10:13,11:[1,14],12:4,17:I,18:X,20:ft,22:ct,23:Bt,24:20,25:21,26:Yt,27:Ut,28:ht},{1:[2,2]},{14:25,15:[1,26],31:be},mt([15,31],[2,22]),mt(V,[2,8],{1:[2,1]}),mt(V,[2,4]),{7:22,10:28,12:4,17:I,18:X,20:ft,22:ct,23:Bt,24:20,25:21,26:Yt,27:Ut,28:ht},mt(V,[2,6]),mt(V,[2,7]),mt(V,[2,11]),{19:[1,29]},{21:[1,30]},mt(V,[2,14]),mt(V,[2,15]),mt(V,[2,16]),mt(V,[2,17]),mt(V,[2,18]),mt(V,[2,19]),mt(V,[2,20]),{11:[1,31]},{16:32,30:[1,33]},{11:[2,24]},mt(V,[2,5]),mt(V,[2,12]),mt(V,[2,13]),mt(Se,[2,9]),{14:34,31:be},{31:[2,23]},{11:[1,35]},mt(Se,[2,10])],defaultActions:{5:[2,21],7:[2,2],27:[2,24],33:[2,23]},parseError:function(Mt,Kt){if(Kt.recoverable)this.trace(Mt);else{var ie=new Error(Mt);throw ie.hash=Kt,ie}},parse:function(Mt){var Kt=this,ie=[0],ye=[],Ze=[null],$t=[],Ci=this.table,It="",Rt=0,Xt=0,he=2,We=1,Pt=$t.slice.call(arguments,1),k=Object.create(this.lexer),Ae={yy:{}};for(var ai in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ai)&&(Ae.yy[ai]=this.yy[ai]);k.setInput(Mt,Ae.yy),Ae.yy.lexer=k,Ae.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var As=k.yylloc;$t.push(As);var cn=k.options&&k.options.ranges;typeof Ae.yy.parseError=="function"?this.parseError=Ae.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function qs(){var Qt;return Qt=ye.pop()||k.lex()||We,typeof Qt!="number"&&(Qt instanceof Array&&(ye=Qt,Qt=ye.pop()),Qt=Kt.symbols_[Qt]||Qt),Qt}for(var je,Ke,ei,is,_r={},Ls,ir,wi,Ge;;){if(Ke=ie[ie.length-1],this.defaultActions[Ke]?ei=this.defaultActions[Ke]:((je===null||typeof je>"u")&&(je=qs()),ei=Ci[Ke]&&Ci[Ke][je]),typeof ei>"u"||!ei.length||!ei[0]){var ii="";Ge=[];for(Ls in Ci[Ke])this.terminals_[Ls]&&Ls>he&&Ge.push("'"+this.terminals_[Ls]+"'");k.showPosition?ii="Parse error on line "+(Rt+1)+`:
|
|
1469
|
-
`+k.showPosition()+`
|
|
1470
|
-
Expecting `+Ge.join(", ")+", got '"+(this.terminals_[je]||je)+"'":ii="Parse error on line "+(Rt+1)+": Unexpected "+(je==We?"end of input":"'"+(this.terminals_[je]||je)+"'"),this.parseError(ii,{text:k.match,token:this.terminals_[je]||je,line:k.yylineno,loc:As,expected:Ge})}if(ei[0]instanceof Array&&ei.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ke+", token: "+je);switch(ei[0]){case 1:ie.push(je),Ze.push(k.yytext),$t.push(k.yylloc),ie.push(ei[1]),je=null,Xt=k.yyleng,It=k.yytext,Rt=k.yylineno,As=k.yylloc;break;case 2:if(ir=this.productions_[ei[1]][1],_r.$=Ze[Ze.length-ir],_r._$={first_line:$t[$t.length-(ir||1)].first_line,last_line:$t[$t.length-1].last_line,first_column:$t[$t.length-(ir||1)].first_column,last_column:$t[$t.length-1].last_column},cn&&(_r._$.range=[$t[$t.length-(ir||1)].range[0],$t[$t.length-1].range[1]]),is=this.performAction.apply(_r,[It,Xt,Rt,Ae.yy,ei[1],Ze,$t].concat(Pt)),typeof is<"u")return is;ir&&(ie=ie.slice(0,-1*ir*2),Ze=Ze.slice(0,-1*ir),$t=$t.slice(0,-1*ir)),ie.push(this.productions_[ei[1]][0]),Ze.push(_r.$),$t.push(_r._$),wi=Ci[ie[ie.length-2]][ie[ie.length-1]],ie.push(wi);break;case 3:return!0}}return!0}},Be=function(){var Xe={EOF:1,parseError:function(Kt,ie){if(this.yy.parser)this.yy.parser.parseError(Kt,ie);else throw new Error(Kt)},setInput:function(Mt,Kt){return this.yy=Kt||this.yy||{},this._input=Mt,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},input:function(){var Mt=this._input[0];this.yytext+=Mt,this.yyleng++,this.offset++,this.match+=Mt,this.matched+=Mt;var Kt=Mt.match(/(?:\r\n?|\n).*/g);return Kt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Mt},unput:function(Mt){var Kt=Mt.length,ie=Mt.split(/(?:\r\n?|\n)/g);this._input=Mt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Kt),this.offset-=Kt;var ye=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),ie.length-1&&(this.yylineno-=ie.length-1);var Ze=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:ie?(ie.length===ye.length?this.yylloc.first_column:0)+ye[ye.length-ie.length].length-ie[0].length:this.yylloc.first_column-Kt},this.options.ranges&&(this.yylloc.range=[Ze[0],Ze[0]+this.yyleng-Kt]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1471
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(Mt){this.unput(this.match.slice(Mt))},pastInput:function(){var Mt=this.matched.substr(0,this.matched.length-this.match.length);return(Mt.length>20?"...":"")+Mt.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var Mt=this.match;return Mt.length<20&&(Mt+=this._input.substr(0,20-Mt.length)),(Mt.substr(0,20)+(Mt.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var Mt=this.pastInput(),Kt=new Array(Mt.length+1).join("-");return Mt+this.upcomingInput()+`
|
|
1472
|
-
`+Kt+"^"},test_match:function(Mt,Kt){var ie,ye,Ze;if(this.options.backtrack_lexer&&(Ze={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&&(Ze.yylloc.range=this.yylloc.range.slice(0))),ye=Mt[0].match(/(?:\r\n?|\n).*/g),ye&&(this.yylineno+=ye.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ye?ye[ye.length-1].length-ye[ye.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Mt[0].length},this.yytext+=Mt[0],this.match+=Mt[0],this.matches=Mt,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(Mt[0].length),this.matched+=Mt[0],ie=this.performAction.call(this,this.yy,this,Kt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ie)return ie;if(this._backtrack){for(var $t in Ze)this[$t]=Ze[$t];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Mt,Kt,ie,ye;this._more||(this.yytext="",this.match="");for(var Ze=this._currentRules(),$t=0;$t<Ze.length;$t++)if(ie=this._input.match(this.rules[Ze[$t]]),ie&&(!Kt||ie[0].length>Kt[0].length)){if(Kt=ie,ye=$t,this.options.backtrack_lexer){if(Mt=this.test_match(ie,Ze[$t]),Mt!==!1)return Mt;if(this._backtrack){Kt=!1;continue}else return!1}else if(!this.options.flex)break}return Kt?(Mt=this.test_match(Kt,Ze[ye]),Mt!==!1?Mt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1473
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Kt=this.next();return Kt||this.lex()},begin:function(Kt){this.conditionStack.push(Kt)},popState:function(){var Kt=this.conditionStack.length-1;return Kt>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(Kt){return Kt=this.conditionStack.length-1-Math.abs(Kt||0),Kt>=0?this.conditionStack[Kt]:"INITIAL"},pushState:function(Kt){this.begin(Kt)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(Kt,ie,ye,Ze){switch(ye){case 0:return this.begin("open_directive"),28;case 1:return this.begin("type_directive"),29;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),31;case 4:return 30;case 5:break;case 6:break;case 7:return 11;case 8:break;case 9:break;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 27;case 21:return 26;case 22:return 6;case 23:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/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;]+)/i,/^(?:[^#:\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23],inclusive:!0}}};return Xe}();xe.lexer=Be;function pe(){this.yy={}}return pe.prototype=xe,xe.Parser=pe,new pe}();Es.parser=Es;const Hs=Es;let di="",ln=0;const Ii=[],ts=[],Vi=[],Ei=()=>Vt.j,vs=(mt,J,ht)=>{(0,Vt.k)(globalThis,mt,J,ht)},es=function(){Ii.length=0,ts.length=0,di="",Vi.length=0,(0,Vt.m)()},Gs=function(mt){di=mt,Ii.push(mt)},Cs=function(){return Ii},Ts=function(){let mt=Zr();const J=100;let ht=0;for(;!mt&&ht<J;)mt=Zr(),ht++;return ts.push(...Vi),ts},Ur=function(mt,J,ht){const V={id:ln++,section:di,type:di,task:mt,score:J||0,events:ht?[ht]:[]};Vi.push(V)},Ue=function(mt){Vi.find(ht=>ht.id===ln-1).events.push(mt)},Ss=function(mt){const J={section:di,type:di,description:mt,task:mt,classes:[]};ts.push(J)},Zr=function(){const mt=function(ht){return Vi[ht].processed};let J=!0;for(const[ht,V]of Vi.entries())mt(ht),J=J&&V.processed;return J},Yi=Object.freeze(Object.defineProperty({__proto__:null,addEvent:Ue,addSection:Gs,addTask:Ur,addTaskOrg:Ss,clear:es,default:{clear:es,getCommonDb:Ei,addSection:Gs,getSections:Cs,getTasks:Ts,addTask:Ur,addTaskOrg:Ss,addEvent:Ue,parseDirective:vs},getCommonDb:Ei,getSections:Cs,getTasks:Ts,parseDirective:vs},Symbol.toStringTag,{value:"Module"})),ws=12,Ri=function(mt,J){const ht=mt.append("rect");return ht.attr("x",J.x),ht.attr("y",J.y),ht.attr("fill",J.fill),ht.attr("stroke",J.stroke),ht.attr("width",J.width),ht.attr("height",J.height),ht.attr("rx",J.rx),ht.attr("ry",J.ry),J.class!==void 0&&ht.attr("class",J.class),ht},Lr=function(mt,J){const V=mt.append("circle").attr("cx",J.cx).attr("cy",J.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),I=mt.append("g");I.append("circle").attr("cx",J.cx-15/3).attr("cy",J.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),I.append("circle").attr("cx",J.cx+15/3).attr("cy",J.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function X(Bt){const Yt=(0,Je.Nb1)().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);Bt.append("path").attr("class","mouth").attr("d",Yt).attr("transform","translate("+J.cx+","+(J.cy+2)+")")}function ft(Bt){const Yt=(0,Je.Nb1)().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);Bt.append("path").attr("class","mouth").attr("d",Yt).attr("transform","translate("+J.cx+","+(J.cy+7)+")")}function ct(Bt){Bt.append("line").attr("class","mouth").attr("stroke",2).attr("x1",J.cx-5).attr("y1",J.cy+7).attr("x2",J.cx+5).attr("y2",J.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return J.score>3?X(I):J.score<3?ft(I):ct(I),V},Xi=function(mt,J){const ht=mt.append("circle");return ht.attr("cx",J.cx),ht.attr("cy",J.cy),ht.attr("class","actor-"+J.pos),ht.attr("fill",J.fill),ht.attr("stroke",J.stroke),ht.attr("r",J.r),ht.class!==void 0&&ht.attr("class",ht.class),J.title!==void 0&&ht.append("title").text(J.title),ht},vt=function(mt,J){const ht=J.text.replace(/<br\s*\/?>/gi," "),V=mt.append("text");V.attr("x",J.x),V.attr("y",J.y),V.attr("class","legend"),V.style("text-anchor",J.anchor),J.class!==void 0&&V.attr("class",J.class);const I=V.append("tspan");return I.attr("x",J.x+J.textMargin*2),I.text(ht),V},zt=function(mt,J){function ht(I,X,ft,ct,Bt){return I+","+X+" "+(I+ft)+","+X+" "+(I+ft)+","+(X+ct-Bt)+" "+(I+ft-Bt*1.2)+","+(X+ct)+" "+I+","+(X+ct)}const V=mt.append("polygon");V.attr("points",ht(J.x,J.y,50,20,7)),V.attr("class","labelBox"),J.y=J.y+J.labelMargin,J.x=J.x+.5*J.labelMargin,vt(mt,J)},Wt=function(mt,J,ht){const V=mt.append("g"),I=ce();I.x=J.x,I.y=J.y,I.fill=J.fill,I.width=ht.width,I.height=ht.height,I.class="journey-section section-type-"+J.num,I.rx=3,I.ry=3,Ri(V,I),fi(ht)(J.text,V,I.x,I.y,I.width,I.height,{class:"journey-section section-type-"+J.num},ht,J.colour)};let Ht=-1;const ee=function(mt,J,ht){const V=J.x+ht.width/2,I=mt.append("g");Ht++;const X=300+5*30;I.append("line").attr("id","task"+Ht).attr("x1",V).attr("y1",J.y).attr("x2",V).attr("y2",X).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Lr(I,{cx:V,cy:300+(5-J.score)*30,score:J.score});const ft=ce();ft.x=J.x,ft.y=J.y,ft.fill=J.fill,ft.width=ht.width,ft.height=ht.height,ft.class="task task-type-"+J.num,ft.rx=3,ft.ry=3,Ri(I,ft),J.x+14,fi(ht)(J.task,I,ft.x,ft.y,ft.width,ft.height,{class:"task"},ht,J.colour)},ve=function(mt,J){Ri(mt,{x:J.startx,y:J.starty,width:J.stopx-J.startx,height:J.stopy-J.starty,fill:J.fill,class:"rect"}).lower()},He=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},ce=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},fi=function(){function mt(I,X,ft,ct,Bt,Yt,Ut,be){const Se=X.append("text").attr("x",ft+Bt/2).attr("y",ct+Yt/2+5).style("font-color",be).style("text-anchor","middle").text(I);V(Se,Ut)}function J(I,X,ft,ct,Bt,Yt,Ut,be,Se){const{taskFontSize:xe,taskFontFamily:Be}=be,pe=I.split(/<br\s*\/?>/gi);for(let Xe=0;Xe<pe.length;Xe++){const Mt=Xe*xe-xe*(pe.length-1)/2,Kt=X.append("text").attr("x",ft+Bt/2).attr("y",ct).attr("fill",Se).style("text-anchor","middle").style("font-size",xe).style("font-family",Be);Kt.append("tspan").attr("x",ft+Bt/2).attr("dy",Mt).text(pe[Xe]),Kt.attr("y",ct+Yt/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),V(Kt,Ut)}}function ht(I,X,ft,ct,Bt,Yt,Ut,be){const Se=X.append("switch"),Be=Se.append("foreignObject").attr("x",ft).attr("y",ct).attr("width",Bt).attr("height",Yt).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");Be.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(I),J(I,Se,ft,ct,Bt,Yt,Ut,be),V(Be,Ut)}function V(I,X){for(const ft in X)ft in X&&I.attr(ft,X[ft])}return function(I){return I.textPlacement==="fo"?ht:I.textPlacement==="old"?mt:J}}(),ge=function(mt){mt.append("defs").append("marker").attr("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")};function me(mt,J){mt.each(function(){var ht=(0,Je.Ys)(this),V=ht.text().split(/(\s+|<br>)/).reverse(),I,X=[],ft=1.1,ct=ht.attr("y"),Bt=parseFloat(ht.attr("dy")),Yt=ht.text(null).append("tspan").attr("x",0).attr("y",ct).attr("dy",Bt+"em");for(let Ut=0;Ut<V.length;Ut++)I=V[V.length-1-Ut],X.push(I),Yt.text(X.join(" ").trim()),(Yt.node().getComputedTextLength()>J||I==="<br>")&&(X.pop(),Yt.text(X.join(" ").trim()),I==="<br>"?X=[""]:X=[I],Yt=ht.append("tspan").attr("x",0).attr("y",ct).attr("dy",ft+"em").text(I))})}const _e=function(mt,J,ht,V){const I=ht%ws-1,X=mt.append("g");J.section=I,X.attr("class",(J.class?J.class+" ":"")+"timeline-node "+("section-"+I));const ft=X.append("g"),ct=X.append("g"),Yt=ct.append("text").text(J.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(me,J.width).node().getBBox(),Ut=V.fontSize&&V.fontSize.replace?V.fontSize.replace("px",""):V.fontSize;return J.height=Yt.height+Ut*1.1*.5+J.padding,J.height=Math.max(J.height,J.maxHeight),J.width=J.width+2*J.padding,ct.attr("transform","translate("+J.width/2+", "+J.padding/2+")"),vi(ft,J,I),J},zi=function(mt,J,ht){const V=mt.append("g"),X=V.append("text").text(J.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(me,J.width).node().getBBox(),ft=ht.fontSize&&ht.fontSize.replace?ht.fontSize.replace("px",""):ht.fontSize;return V.remove(),X.height+ft*1.1*.5+J.padding},vi=function(mt,J,ht){mt.append("path").attr("id","node-"+J.id).attr("class","node-bkg node-"+J.type).attr("d",`M0 ${J.height-5} v${-J.height+2*5} q0,-5 5,-5 h${J.width-2*5} q5,0 5,5 v${J.height-5} H0 Z`),mt.append("line").attr("class","node-line-"+ht).attr("x1",0).attr("y1",J.height).attr("x2",J.width).attr("y2",J.height)},Gt={drawRect:Ri,drawCircle:Xi,drawSection:Wt,drawText:vt,drawLabel:zt,drawTask:ee,drawBackgroundRect:ve,getTextObj:He,getNoteRect:ce,initGraphics:ge,drawNode:_e,getVirtualNodeHeight:zi},$e=function(mt){Object.keys(mt).forEach(function(ht){conf[ht]=mt[ht]})},Qe=function(mt,J,ht,V){const I=(0,Vt.g)(),X=I.leftMargin?I.leftMargin:50;V.db.clear(),V.parser.parse(mt+`
|
|
1474
|
-
`),Vt.l.debug("timeline",V.db);const ft=I.securityLevel;let ct;ft==="sandbox"&&(ct=(0,Je.Ys)("#i"+J));const Yt=(ft==="sandbox"?(0,Je.Ys)(ct.nodes()[0].contentDocument.body):(0,Je.Ys)("body")).select("#"+J);Yt.append("g");const Ut=V.db.getTasks(),be=V.db.getCommonDb().getDiagramTitle();Vt.l.debug("task",Ut),Gt.initGraphics(Yt);const Se=V.db.getSections();Vt.l.debug("sections",Se);let xe=0,Be=0,pe=0,Xe=0,Mt=50+X,Kt=50;Xe=50;let ie=0,ye=!0;Se.forEach(function(Rt){const Xt={number:ie,descr:Rt,section:ie,width:150,padding:20,maxHeight:xe},he=Gt.getVirtualNodeHeight(Yt,Xt,I);Vt.l.debug("sectionHeight before draw",he),xe=Math.max(xe,he+20)});let Ze=0,$t=0;Vt.l.debug("tasks.length",Ut.length);for(const[Rt,Xt]of Ut.entries()){const he={number:Rt,descr:Xt,section:Xt.section,width:150,padding:20,maxHeight:Be},We=Gt.getVirtualNodeHeight(Yt,he,I);Vt.l.debug("taskHeight before draw",We),Be=Math.max(Be,We+20),Ze=Math.max(Ze,Xt.events.length);let Pt=0;for(let k=0;k<Xt.events.length;k++){const ai={descr:Xt.events[k],section:Xt.section,number:Xt.section,width:150,padding:20,maxHeight:50};Pt+=Gt.getVirtualNodeHeight(Yt,ai,I)}$t=Math.max($t,Pt)}Vt.l.debug("maxSectionHeight before draw",xe),Vt.l.debug("maxTaskHeight before draw",Be),Se&&Se.length>0?Se.forEach(Rt=>{const Xt={number:ie,descr:Rt,section:ie,width:150,padding:20,maxHeight:xe};Vt.l.debug("sectionNode",Xt);const he=Yt.append("g"),We=Gt.drawNode(he,Xt,ie,I);Vt.l.debug("sectionNode output",We),he.attr("transform",`translate(${Mt}, ${Xe})`),Kt+=xe+50;const Pt=Ut.filter(k=>k.section===Rt);Pt.length>0&&ti(Yt,Pt,ie,Mt,Kt,Be,I,Ze,$t,xe,!1),Mt+=200*Math.max(Pt.length,1),Kt=Xe,ie++}):(ye=!1,ti(Yt,Ut,ie,Mt,Kt,Be,I,Ze,$t,xe,!0));const Ci=Yt.node().getBBox();Vt.l.debug("bounds",Ci),be&&Yt.append("text").text(be).attr("x",Ci.width/2-X).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),pe=ye?xe+Be+150:Be+100,Yt.append("g").attr("class","lineWrapper").append("line").attr("x1",X).attr("y1",pe).attr("x2",Ci.width+3*X).attr("y2",pe).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),(0,Vt.s)(void 0,Yt,I.timeline.padding?I.timeline.padding:50,I.timeline.useMaxWidth?I.timeline.useMaxWidth:!1)},ti=function(mt,J,ht,V,I,X,ft,ct,Bt,Yt,Ut){for(const be of J){const Se={descr:be.task,section:ht,number:ht,width:150,padding:20,maxHeight:X};Vt.l.debug("taskNode",Se);const xe=mt.append("g").attr("class","taskWrapper"),pe=Gt.drawNode(xe,Se,ht,ft).height;if(Vt.l.debug("taskHeight after draw",pe),xe.attr("transform",`translate(${V}, ${I})`),X=Math.max(X,pe),be.events){const Xe=mt.append("g").attr("class","lineWrapper");let Mt=X;I+=100,Mt=Mt+pi(mt,be.events,ht,V,I,ft),I-=100,Xe.append("line").attr("x1",V+190/2).attr("y1",I+X).attr("x2",V+190/2).attr("y2",I+X+(Ut?X:Yt)+Bt+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}V=V+200,Ut&&!(0,Vt.g)().timeline.disableMulticolor&&ht++}I=I-10},pi=function(mt,J,ht,V,I,X){let ft=0;const ct=I;I=I+100;for(const Bt of J){const Yt={descr:Bt,section:ht,number:ht,width:150,padding:20,maxHeight:50};Vt.l.debug("eventNode",Yt);const Ut=mt.append("g").attr("class","eventWrapper"),Se=Gt.drawNode(Ut,Yt,ht,X).height;ft=ft+Se,Ut.attr("transform",`translate(${V}, ${I})`),I=I+10+Se}return I=ct,ft},ze={setConf:$e,draw:Qe},Wi=mt=>{let J="";for(let ht=0;ht<mt.THEME_COLOR_LIMIT;ht++)mt["lineColor"+ht]=mt["lineColor"+ht]||mt["cScaleInv"+ht],(0,_i.Z)(mt["lineColor"+ht])?mt["lineColor"+ht]=(0,qi.Z)(mt["lineColor"+ht],20):mt["lineColor"+ht]=(0,Q.Z)(mt["lineColor"+ht],20);for(let ht=0;ht<mt.THEME_COLOR_LIMIT;ht++){const V=""+(17-3*ht);J+=`
|
|
1475
|
-
.section-${ht-1} rect, .section-${ht-1} path, .section-${ht-1} circle, .section-${ht-1} path {
|
|
1476
|
-
fill: ${mt["cScale"+ht]};
|
|
1477
|
-
}
|
|
1478
|
-
.section-${ht-1} text {
|
|
1479
|
-
fill: ${mt["cScaleLabel"+ht]};
|
|
1480
|
-
}
|
|
1481
|
-
.node-icon-${ht-1} {
|
|
1482
|
-
font-size: 40px;
|
|
1483
|
-
color: ${mt["cScaleLabel"+ht]};
|
|
1484
|
-
}
|
|
1485
|
-
.section-edge-${ht-1}{
|
|
1486
|
-
stroke: ${mt["cScale"+ht]};
|
|
1487
|
-
}
|
|
1488
|
-
.edge-depth-${ht-1}{
|
|
1489
|
-
stroke-width: ${V};
|
|
1490
|
-
}
|
|
1491
|
-
.section-${ht-1} line {
|
|
1492
|
-
stroke: ${mt["cScaleInv"+ht]} ;
|
|
1493
|
-
stroke-width: 3;
|
|
1494
|
-
}
|
|
1495
|
-
|
|
1496
|
-
.lineWrapper line{
|
|
1497
|
-
stroke: ${mt["cScaleLabel"+ht]} ;
|
|
1498
|
-
}
|
|
1499
|
-
|
|
1500
|
-
.disabled, .disabled circle, .disabled text {
|
|
1501
|
-
fill: lightgray;
|
|
1502
|
-
}
|
|
1503
|
-
.disabled text {
|
|
1504
|
-
fill: #efefef;
|
|
1505
|
-
}
|
|
1506
|
-
`}return J},er={db:Yi,renderer:ze,parser:Hs,styles:mt=>`
|
|
1507
|
-
.edge {
|
|
1508
|
-
stroke-width: 3;
|
|
1509
|
-
}
|
|
1510
|
-
${Wi(mt)}
|
|
1511
|
-
.section-root rect, .section-root path, .section-root circle {
|
|
1512
|
-
fill: ${mt.git0};
|
|
1513
|
-
}
|
|
1514
|
-
.section-root text {
|
|
1515
|
-
fill: ${mt.gitBranchLabel0};
|
|
1516
|
-
}
|
|
1517
|
-
.icon-container {
|
|
1518
|
-
height:100%;
|
|
1519
|
-
display: flex;
|
|
1520
|
-
justify-content: center;
|
|
1521
|
-
align-items: center;
|
|
1522
|
-
}
|
|
1523
|
-
.edge {
|
|
1524
|
-
fill: none;
|
|
1525
|
-
}
|
|
1526
|
-
.eventWrapper {
|
|
1527
|
-
filter: brightness(120%);
|
|
1528
|
-
}
|
|
1529
|
-
`}}}]);
|