@nocobase/app 1.3.38-beta → 1.4.0-alpha

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.
Files changed (103) hide show
  1. package/client/.umirc.ts +12 -14
  2. package/client/src/pages/index.tsx +3 -0
  3. package/dist/client/4607.bae81918.async.js +1 -0
  4. package/dist/client/5617.d114c98c.async.js +78 -0
  5. package/dist/client/5721.ee2b0cf3.async.js +7 -0
  6. package/dist/client/index.html +2 -1
  7. package/dist/client/index.html.tpl +2 -1
  8. package/dist/client/npm._at_ant-design.e1f1f4b0.async.js +110 -0
  9. package/dist/client/{npm._at_antv.5ea2df50.async.js → npm._at_antv.56fcebdf.async.js} +5 -5
  10. package/dist/client/npm._at_budibase.113c5b6a.async.js +36 -0
  11. package/dist/client/npm._at_dnd-kit.2fac5dde.async.js +9 -0
  12. package/dist/client/npm._at_emotion.6969cd50.async.js +2 -0
  13. package/dist/client/npm._at_formily.b1a03e41.async.js +96 -0
  14. package/dist/client/npm._at_formulajs.ff63776b.async.js +1 -0
  15. package/dist/client/npm._at_rc-component.43f95f42.async.js +5 -0
  16. package/dist/client/npm._at_remix-run.9a0418a9.async.js +2 -0
  17. package/dist/client/npm.ahooks.b416801a.async.js +6 -0
  18. package/dist/client/npm.antd-style.ecb45bdd.async.js +1 -0
  19. package/dist/client/npm.antd.732d7b9d.async.js +476 -0
  20. package/dist/client/npm.axios.c42e25ff.async.js +11 -0
  21. package/dist/client/npm.bignumber.js.cb49cd48.async.js +1 -0
  22. package/dist/client/npm.buffer.6f3eca94.async.js +1 -0
  23. package/dist/client/npm.cytoscape.cba0c14d.async.js +5 -0
  24. package/dist/client/{npm.d3-selection.e2684be8.async.js → npm.d3-selection.15d6ab5b.async.js} +1 -1
  25. package/dist/client/npm.d3-shape.b48fc404.async.js +1 -0
  26. package/dist/client/{npm.d3-transition.83e0f431.async.js → npm.d3-transition.5fd82a9c.async.js} +1 -1
  27. package/dist/client/{npm.dayjs.f4357565.async.js → npm.dayjs.0a5fd152.async.js} +1 -1
  28. package/dist/client/{npm.decimal.js.bb6d6d2e.async.js → npm.decimal.js.19391b1c.async.js} +1 -1
  29. package/dist/client/npm.dompurify.d5071c22.async.js +3 -0
  30. package/dist/client/{npm.elkjs.d0ff4db1.async.js → npm.elkjs.f35a7d45.async.js} +4 -4
  31. package/dist/client/npm.gl-matrix.d851d654.async.js +1 -0
  32. package/dist/client/{npm.handlebars.c04806e7.async.js → npm.handlebars.ade4c4fe.async.js} +5 -5
  33. package/dist/client/{npm.highlight.js.4213abe5.async.js → npm.highlight.js.8a8320c8.async.js} +1 -1
  34. package/dist/client/{npm.html-tokenize.360bb6e8.async.js → npm.html-tokenize.a6d58ae7.async.js} +1 -1
  35. package/dist/client/npm.htmlparser2.27ad86bc.async.js +2 -0
  36. package/dist/client/npm.i18next.98bb572b.async.js +1 -0
  37. package/dist/client/npm.json5.d58066fd.async.js +14 -0
  38. package/dist/client/npm.jstat.733c0b2c.async.js +1 -0
  39. package/dist/client/{npm.layout-base.49e322a0.async.js → npm.layout-base.0bdb6d00.async.js} +1 -1
  40. package/dist/client/npm.lodash-es.c06b3dd5.async.js +1 -0
  41. package/dist/client/npm.lodash.0ff318b3.async.js +37 -0
  42. package/dist/client/npm.markdown-it.5b35f93d.async.js +15 -0
  43. package/dist/client/npm.mathjs.fd97f3b7.async.js +52 -0
  44. package/dist/client/npm.mermaid.defd0c88.async.js +1529 -0
  45. package/dist/client/npm.moment.36abbf2c.async.js +4 -0
  46. package/dist/client/npm.picomatch.7a2f1314.async.js +1 -0
  47. package/dist/client/npm.postcss.2ccf11ae.async.js +27 -0
  48. package/dist/client/{npm.quill.e91b3c12.async.js → npm.quill.9d4c2cd1.async.js} +7 -7
  49. package/dist/client/{npm.rc-menu.2e06b9c3.async.js → npm.rc-menu.adf5ade6.async.js} +1 -1
  50. package/dist/client/npm.rc-picker.ef8a3e8b.async.js +1 -0
  51. package/dist/client/{npm.rc-select.13236fb8.async.js → npm.rc-select.7c36e54e.async.js} +2 -2
  52. package/dist/client/{npm.rc-table.de3dd762.async.js → npm.rc-table.a153e021.async.js} +1 -1
  53. package/dist/client/npm.rc-tree.f61b7d87.async.js +1 -0
  54. package/dist/client/npm.rc-util.23a9b855.async.js +18 -0
  55. package/dist/client/npm.react-dom.b9fb5fd7.async.js +11 -0
  56. package/dist/client/npm.react-image-lightbox.727d3218.async.js +3 -0
  57. package/dist/client/npm.react-router-dom.832efba3.async.js +1 -0
  58. package/dist/client/npm.readable-stream.6e743f2a.async.js +1 -0
  59. package/dist/client/p__index.89314c11.async.js +1533 -0
  60. package/dist/client/umi.9e319d79.js +21 -0
  61. package/lib/index.js +11 -3
  62. package/package.json +6 -6
  63. package/src/index.ts +12 -9
  64. package/dist/client/4607.6d585996.async.js +0 -1
  65. package/dist/client/5721.cf90e884.async.js +0 -8
  66. package/dist/client/6718.1e7fe05d.async.js +0 -66
  67. package/dist/client/npm._at_ant-design.4fe52a2f.async.js +0 -110
  68. package/dist/client/npm._at_dnd-kit.01a3ad70.async.js +0 -6
  69. package/dist/client/npm._at_emotion.0c6b11eb.async.js +0 -2
  70. package/dist/client/npm._at_formily.f9d0b213.async.js +0 -101
  71. package/dist/client/npm._at_formulajs.fe3f9fca.async.js +0 -1
  72. package/dist/client/npm._at_rc-component.086dbf23.async.js +0 -5
  73. package/dist/client/npm._at_remix-run.55137b87.async.js +0 -3
  74. package/dist/client/npm.ahooks.c3df4eb6.async.js +0 -6
  75. package/dist/client/npm.antd-style.47ebbe31.async.js +0 -1
  76. package/dist/client/npm.antd.91188318.async.js +0 -476
  77. package/dist/client/npm.axios.f696c6e5.async.js +0 -2
  78. package/dist/client/npm.bignumber.js.70d3d7e8.async.js +0 -1
  79. package/dist/client/npm.buffer.9cce4593.async.js +0 -1
  80. package/dist/client/npm.cytoscape.39239e7b.async.js +0 -5
  81. package/dist/client/npm.d3-shape.3660138b.async.js +0 -1
  82. package/dist/client/npm.dompurify.93b5a130.async.js +0 -3
  83. package/dist/client/npm.gl-matrix.31b80e16.async.js +0 -1
  84. package/dist/client/npm.htmlparser2.cbbea4c4.async.js +0 -2
  85. package/dist/client/npm.i18next.eee0fc0f.async.js +0 -1
  86. package/dist/client/npm.json5.87aca70f.async.js +0 -14
  87. package/dist/client/npm.jstat.657c7dba.async.js +0 -1
  88. package/dist/client/npm.lodash-es.5eff0420.async.js +0 -1
  89. package/dist/client/npm.lodash.0f9322fa.async.js +0 -37
  90. package/dist/client/npm.markdown-it.5875530c.async.js +0 -15
  91. package/dist/client/npm.mathjs.d8df2940.async.js +0 -53
  92. package/dist/client/npm.mermaid.7057e144.async.js +0 -1530
  93. package/dist/client/npm.moment.3c26e672.async.js +0 -4
  94. package/dist/client/npm.postcss.368fceaf.async.js +0 -28
  95. package/dist/client/npm.rc-picker.218fa2cc.async.js +0 -1
  96. package/dist/client/npm.rc-tree.bdb9cee8.async.js +0 -1
  97. package/dist/client/npm.rc-util.87a2c212.async.js +0 -18
  98. package/dist/client/npm.react-dom.6236e62b.async.js +0 -11
  99. package/dist/client/npm.react-image-lightbox.0e0cf81f.async.js +0 -3
  100. package/dist/client/npm.react-router-dom.06c80c5d.async.js +0 -2
  101. package/dist/client/npm.readable-stream.41117b5f.async.js +0 -1
  102. package/dist/client/p__index.4c7bade9.async.js +0 -1509
  103. package/dist/client/umi.016284ce.js +0 -22
@@ -0,0 +1,1529 @@
1
+ "use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[9517],{19487:function(Bo,Ps,bt){bt.d(Ps,{diagram:function(){return Zs}});var Pt=bt(54311),ti=bt(23198),bi=bt(43349),Hi=bt(17295),J=bt.n(Hi),Vs=bt(27484),$r=bt.n(Vs),at=bt(17967),Ot=bt(77482),fe=bt.n(Ot),le=bt(99791),Ys=bt(45625),zs=bt(46060),Ln=bt(91518),nn=bt(59542),xs=bt.n(nn),Gi=bt(10285),xr=bt.n(Gi),si=bt(28734),Bn=bt.n(si);const ks=(vt,Wt,Vt)=>{const{parentById:Ut}=Vt,ie=new Set;let ye=vt;for(;ye;){if(ie.add(ye),ye===Wt)return ye;ye=Ut[ye]}for(ye=Wt;ye;){if(ie.has(ye))return ye;ye=Ut[ye]}return"root"},an=new(J()),oi={},Ws={};let Ti={};const Wr=function(vt,Wt,Vt,Ut,ie,ye,Pe){const b=Vt.select(`[id="${Wt}"]`),li=b.insert("g").attr("class","nodes");return Object.keys(vt).forEach(function($e){const ve=vt[$e];let $i="default";ve.classes.length>0&&($i=ve.classes.join(" "));const Ze=(0,Pt.a)(ve.styles);let Ht=ve.text!==void 0?ve.text:ve.id,qe;const Qe={width:0,height:0};if((0,Pt.e)((0,Pt.g)().flowchart.htmlLabels)){const K={label:Ht.replace(/fa[blrs]?:fa-[\w-]+/g,P=>`<i class='${P.replace(":"," ")}'></i>`)};qe=(0,bi.a)(b,K).node();const ct=qe.getBBox();Qe.width=ct.width,Qe.height=ct.height,Qe.labelNode=qe,qe.parentNode.removeChild(qe)}else{const K=Ut.createElementNS("http://www.w3.org/2000/svg","text");K.setAttribute("style",Ze.labelStyle.replace("color:","fill:"));const ct=Ht.split(Pt.c.lineBreakRegex);for(const D of ct){const X=Ut.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=D,K.appendChild(X)}qe=K;const P=qe.getBBox();Qe.width=P.width,Qe.height=P.height,Qe.labelNode=qe}const tr=[{id:ve.id+"-west",layoutOptions:{"port.side":"WEST"}},{id:ve.id+"-east",layoutOptions:{"port.side":"EAST"}},{id:ve.id+"-south",layoutOptions:{"port.side":"SOUTH"}},{id:ve.id+"-north",layoutOptions:{"port.side":"NORTH"}}];let ji=0,We="",dr={};switch(ve.type){case"round":ji=5,We="rect";break;case"square":We="rect";break;case"diamond":We="question",dr={portConstraints:"FIXED_SIDE"};break;case"hexagon":We="hexagon";break;case"odd":We="rect_left_inv_arrow";break;case"lean_right":We="lean_right";break;case"lean_left":We="lean_left";break;case"trapezoid":We="trapezoid";break;case"inv_trapezoid":We="inv_trapezoid";break;case"odd_right":We="rect_left_inv_arrow";break;case"circle":We="circle";break;case"ellipse":We="ellipse";break;case"stadium":We="stadium";break;case"subroutine":We="subroutine";break;case"cylinder":We="cylinder";break;case"group":We="rect";break;case"doublecircle":We="doublecircle";break;default:We="rect"}const Je={labelStyle:Ze.labelStyle,shape:We,labelText:Ht,rx:ji,ry:ji,class:$i,style:Ze.style,id:ve.id,link:ve.link,linkTarget:ve.linkTarget,tooltip:ie.db.getTooltip(ve.id)||"",domId:ie.db.lookUpDomId(ve.id),haveCallback:ve.haveCallback,width:ve.type==="group"?500:void 0,dir:ve.dir,type:ve.type,props:ve.props,padding:(0,Pt.g)().flowchart.padding};let Bi,Jt;Je.type!=="group"&&(Jt=(0,Pt.b)(li,Je,ve.dir),Bi=Jt.node().getBBox());const ht={id:ve.id,ports:ve.type==="diamond"?tr:[],layoutOptions:dr,labelText:Ht,labelData:Qe,domId:ie.db.lookUpDomId(ve.id),width:Bi==null?void 0:Bi.width,height:Bi==null?void 0:Bi.height,type:ve.type,el:Jt,parent:ye.parentById[ve.id]};Ti[Je.id]=ht}),Pe},Fi=(vt,Wt,Vt)=>{const Ut={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 Ut.TD=Ut.TB,Pt.l.info("abc88",Vt,Wt,vt),Ut[Vt][Wt][vt]},xi=(vt,Wt,Vt)=>{if(Pt.l.info("getNextPort abc88",{node:vt,edgeDirection:Wt,graphDirection:Vt}),!oi[vt])switch(Vt){case"TB":case"TD":oi[vt]={inPosition:"north",outPosition:"south"};break;case"BT":oi[vt]={inPosition:"south",outPosition:"north"};break;case"RL":oi[vt]={inPosition:"east",outPosition:"west"};break;case"LR":oi[vt]={inPosition:"west",outPosition:"east"};break}const Ut=Wt==="in"?oi[vt].inPosition:oi[vt].outPosition;return Wt==="in"?oi[vt].inPosition=Fi(oi[vt].inPosition,Wt,Vt):oi[vt].outPosition=Fi(oi[vt].outPosition,Wt,Vt),Ut},ts=(vt,Wt)=>{let Vt=vt.start,Ut=vt.end;const ie=Ti[Vt],ye=Ti[Ut];return!ie||!ye?{source:Vt,target:Ut}:(ie.type==="diamond"&&(Vt=`${Vt}-${xi(Vt,"out",Wt)}`),ye.type==="diamond"&&(Ut=`${Ut}-${xi(Ut,"in",Wt)}`),{source:Vt,target:Ut})},Ur=function(vt,Wt,Vt,Ut){Pt.l.info("abc78 edges = ",vt);const ie=Ut.insert("g").attr("class","edgeLabels");let ye={},Pe=Wt.db.getDirection(),b,li;if(vt.defaultStyle!==void 0){const pe=(0,Pt.a)(vt.defaultStyle);b=pe.style,li=pe.labelStyle}return vt.forEach(function(pe){var $e="L-"+pe.start+"-"+pe.end;ye[$e]===void 0?(ye[$e]=0,Pt.l.info("abc78 new entry",$e,ye[$e])):(ye[$e]++,Pt.l.info("abc78 new entry",$e,ye[$e]));let ve=$e+"-"+ye[$e];Pt.l.info("abc78 new link id to be used is",$e,ve,ye[$e]);var $i="LS-"+pe.start,Ze="LE-"+pe.end;const Ht={style:"",labelStyle:""};switch(Ht.minlen=pe.length||1,pe.type==="arrow_open"?Ht.arrowhead="none":Ht.arrowhead="normal",Ht.arrowTypeStart="arrow_open",Ht.arrowTypeEnd="arrow_open",pe.type){case"double_arrow_cross":Ht.arrowTypeStart="arrow_cross";case"arrow_cross":Ht.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":Ht.arrowTypeStart="arrow_point";case"arrow_point":Ht.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":Ht.arrowTypeStart="arrow_circle";case"arrow_circle":Ht.arrowTypeEnd="arrow_circle";break}let qe="",Qe="";switch(pe.stroke){case"normal":qe="fill:none;",b!==void 0&&(qe=b),li!==void 0&&(Qe=li),Ht.thickness="normal",Ht.pattern="solid";break;case"dotted":Ht.thickness="normal",Ht.pattern="dotted",Ht.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":Ht.thickness="thick",Ht.pattern="solid",Ht.style="stroke-width: 3.5px;fill:none;";break}if(pe.style!==void 0){const dr=(0,Pt.a)(pe.style);qe=dr.style,Qe=dr.labelStyle}Ht.style=Ht.style+=qe,Ht.labelStyle=Ht.labelStyle+=Qe,pe.interpolate!==void 0?Ht.curve=(0,Pt.d)(pe.interpolate,ti.c_6):vt.defaultInterpolate!==void 0?Ht.curve=(0,Pt.d)(vt.defaultInterpolate,ti.c_6):Ht.curve=(0,Pt.d)(Ws.curve,ti.c_6),pe.text===void 0?pe.style!==void 0&&(Ht.arrowheadStyle="fill: #333"):(Ht.arrowheadStyle="fill: #333",Ht.labelpos="c"),Ht.labelType="text",Ht.label=pe.text.replace(Pt.c.lineBreakRegex,`
2
+ `),pe.style===void 0&&(Ht.style=Ht.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),Ht.labelStyle=Ht.labelStyle.replace("color:","fill:"),Ht.id=ve,Ht.classes="flowchart-link "+$i+" "+Ze;const tr=(0,Pt.f)(ie,Ht),{source:ji,target:We}=ts(pe,Pe);Pt.l.debug("abc78 source and target",ji,We),Vt.edges.push({id:"e"+pe.start+pe.end,sources:[ji],targets:[We],labelEl:tr,labels:[{width:Ht.width,height:Ht.height,orgWidth:Ht.width,orgHeight:Ht.height,text:Ht.label,layoutOptions:{"edgeLabels.inline":"true","edgeLabels.placement":"CENTER"}}],edgeData:Ht})}),Vt},_s=function(vt,Wt,Vt,Ut){let ie="";switch(Ut&&(ie=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,ie=ie.replace(/\(/g,"\\("),ie=ie.replace(/\)/g,"\\)")),Wt.arrowTypeStart){case"arrow_cross":vt.attr("marker-start","url("+ie+"#"+Vt+"-crossStart)");break;case"arrow_point":vt.attr("marker-start","url("+ie+"#"+Vt+"-pointStart)");break;case"arrow_barb":vt.attr("marker-start","url("+ie+"#"+Vt+"-barbStart)");break;case"arrow_circle":vt.attr("marker-start","url("+ie+"#"+Vt+"-circleStart)");break;case"aggregation":vt.attr("marker-start","url("+ie+"#"+Vt+"-aggregationStart)");break;case"extension":vt.attr("marker-start","url("+ie+"#"+Vt+"-extensionStart)");break;case"composition":vt.attr("marker-start","url("+ie+"#"+Vt+"-compositionStart)");break;case"dependency":vt.attr("marker-start","url("+ie+"#"+Vt+"-dependencyStart)");break;case"lollipop":vt.attr("marker-start","url("+ie+"#"+Vt+"-lollipopStart)");break}switch(Wt.arrowTypeEnd){case"arrow_cross":vt.attr("marker-end","url("+ie+"#"+Vt+"-crossEnd)");break;case"arrow_point":vt.attr("marker-end","url("+ie+"#"+Vt+"-pointEnd)");break;case"arrow_barb":vt.attr("marker-end","url("+ie+"#"+Vt+"-barbEnd)");break;case"arrow_circle":vt.attr("marker-end","url("+ie+"#"+Vt+"-circleEnd)");break;case"aggregation":vt.attr("marker-end","url("+ie+"#"+Vt+"-aggregationEnd)");break;case"extension":vt.attr("marker-end","url("+ie+"#"+Vt+"-extensionEnd)");break;case"composition":vt.attr("marker-end","url("+ie+"#"+Vt+"-compositionEnd)");break;case"dependency":vt.attr("marker-end","url("+ie+"#"+Vt+"-dependencyEnd)");break;case"lollipop":vt.attr("marker-end","url("+ie+"#"+Vt+"-lollipopEnd)");break}},Es=function(vt,Wt){Pt.l.info("Extracting classes"),Wt.db.clear("ver-2");try{return Wt.parse(vt),Wt.db.getClasses()}catch{return{}}},Zr=function(vt){const Wt={parentById:{},childrenById:{}},Vt=vt.getSubGraphs();return Pt.l.info("Subgraphs - ",Vt),Vt.forEach(function(Ut){Ut.nodes.forEach(function(ie){Wt.parentById[ie]=Ut.id,Wt.childrenById[Ut.id]===void 0&&(Wt.childrenById[Ut.id]=[]),Wt.childrenById[Ut.id].push(ie)})}),Vt.forEach(function(Ut){Ut.id,Wt.parentById[Ut.id]!==void 0&&Wt.parentById[Ut.id]}),Wt},vs=function(vt,Wt,Vt){const Ut=ks(vt,Wt,Vt);if(Ut===void 0||Ut==="root")return{x:0,y:0};const ie=Ti[Ut].offset;return{x:ie.posX,y:ie.posY}},ze=function(vt,Wt,Vt,Ut,ie){const ye=vs(Wt.sources[0],Wt.targets[0],ie),Pe=Wt.sections[0].startPoint,b=Wt.sections[0].endPoint,pe=(Wt.sections[0].bendPoints?Wt.sections[0].bendPoints:[]).map(Qe=>[Qe.x+ye.x,Qe.y+ye.y]),$e=[[Pe.x+ye.x,Pe.y+ye.y],...pe,[b.x+ye.x,b.y+ye.y]],ve=(0,ti.jvg)().curve(ti.c_6),$i=vt.insert("path").attr("d",ve($e)).attr("class","path").attr("fill","none"),Ze=vt.insert("g").attr("class","edgeLabel"),Ht=(0,ti.Ys)(Ze.node().appendChild(Wt.labelEl)),qe=Ht.node().firstChild.getBoundingClientRect();Ht.attr("width",qe.width),Ht.attr("height",qe.height),Ze.attr("transform",`translate(${Wt.labels[0].x+ye.x}, ${Wt.labels[0].y+ye.y})`),_s($i,Vt,Ut.type,Ut.arrowMarkerAbsolute)},Cs=(vt,Wt)=>{vt.forEach(Vt=>{Vt.children||(Vt.children=[]);const Ut=Wt.childrenById[Vt.id];Ut&&Ut.forEach(ie=>{Vt.children.push(Ti[ie])}),Cs(Vt.children,Wt)})},es=async function(vt,Wt,Vt,Ut){var ie;Ut.db.clear(),Ti={},Ut.db.setGen("gen-2"),Ut.parser.parse(vt);const ye=(0,ti.Ys)("body").append("div").attr("style","height:400px").attr("id","cy");let Pe={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(Pt.l.info("Drawing flowchart using v3 renderer",an),Ut.db.getDirection()){case"BT":Pe.layoutOptions["elk.direction"]="UP";break;case"TB":Pe.layoutOptions["elk.direction"]="DOWN";break;case"LR":Pe.layoutOptions["elk.direction"]="RIGHT";break;case"RL":Pe.layoutOptions["elk.direction"]="LEFT";break}const{securityLevel:li,flowchart:pe}=(0,Pt.g)();let $e;li==="sandbox"&&($e=(0,ti.Ys)("#i"+Wt));const ve=li==="sandbox"?(0,ti.Ys)($e.nodes()[0].contentDocument.body):(0,ti.Ys)("body"),$i=li==="sandbox"?$e.nodes()[0].contentDocument:document,Ze=ve.select(`[id="${Wt}"]`),Ht=["point","circle","cross"];(0,Pt.i)(Ze,Ht,Ut.type,Ut.arrowMarkerAbsolute);const qe=Ut.db.getVertices();let Qe;const tr=Ut.db.getSubGraphs();Pt.l.info("Subgraphs - ",tr);for(let ht=tr.length-1;ht>=0;ht--)Qe=tr[ht],Ut.db.addVertex(Qe.id,Qe.title,"group",void 0,Qe.classes,Qe.dir);const ji=Ze.insert("g").attr("class","subgraphs"),We=Zr(Ut.db);Pe=Wr(qe,Wt,ve,$i,Ut,We,Pe);const dr=Ze.insert("g").attr("class","edges edgePath"),Je=Ut.db.getEdges();Pe=Ur(Je,Ut,Pe,Ze),Object.keys(Ti).forEach(ht=>{const K=Ti[ht];K.parent||Pe.children.push(K),We.childrenById[ht]!==void 0&&(K.labels=[{text:K.labelText,layoutOptions:{"nodeLabels.placement":"[H_CENTER, V_TOP, INSIDE]"},width:K.labelData.width,height:K.labelData.height}],delete K.x,delete K.y,delete K.width,delete K.height)}),Cs(Pe.children,We),Pt.l.info("after layout",JSON.stringify(Pe,null,2));const Jt=await an.layout(Pe);Us(0,0,Jt.children,Ze,ji,Ut,0),Pt.l.info("after layout",Jt),(ie=Jt.edges)==null||ie.map(ht=>{ze(dr,ht,ht.edgeData,Ut,We)}),(0,Pt.s)({},Ze,pe.diagramPadding,pe.useMaxWidth),ye.remove()},Us=(vt,Wt,Vt,Ut,ie,ye,Pe)=>{Vt.forEach(function(b){if(b)if(Ti[b.id].offset={posX:b.x+vt,posY:b.y+Wt,x:vt,y:Wt,depth:Pe,width:b.width,height:b.height},b.type==="group"){const li=ie.insert("g").attr("class","subgraph");li.insert("rect").attr("class","subgraph subgraph-lvl-"+Pe%5+" node").attr("x",b.x+vt).attr("y",b.y+Wt).attr("width",b.width).attr("height",b.height);const pe=li.insert("g").attr("class","label");pe.attr("transform",`translate(${b.labels[0].x+vt+b.x}, ${b.labels[0].y+Wt+b.y})`),pe.node().appendChild(b.labelData.labelNode),Pt.l.info("Id (UGH)= ",b.type,b.labels)}else Pt.l.info("Id (UGH)= ",b.id),b.el.attr("transform",`translate(${b.x+vt+b.width/2}, ${b.y+Wt+b.height/2})`)}),Vt.forEach(function(b){b&&b.type==="group"&&Us(vt+b.x,Wt+b.y,b.children,Ut,ie,ye,Pe+1)})},ur={getClasses:Es,draw:es},is=vt=>{let Wt="";for(let Vt=0;Vt<5;Vt++)Wt+=`
3
+ .subgraph-lvl-${Vt} {
4
+ fill: ${vt[`surface${Vt}`]};
5
+ stroke: ${vt[`surfacePeer${Vt}`]};
6
+ }
7
+ `;return Wt},Ts=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
+ ${is(vt)}
109
+ `,Zs={db:Pt.h,renderer:ur,parser:Pt.p,styles:Ts}},54311:function(Bo,Ps,bt){bt.d(Ps,{a:function(){return ss},b:function(){return G1},c:function(){return Jt},d:function(){return _r},e:function(){return Je},f:function(){return X1},g:function(){return M},h:function(){return ey},i:function(){return N1},j:function(){return s1},k:function(){return Go},l:function(){return b},m:function(){return sr},n:function(){return Ze},o:function(){return Tr},p:function(){return dl},s:function(){return Fn}});var Pt=bt(18464),ti=bt(27484),bi=bt.n(ti),Hi=bt(17967),J=bt(23198),Vs=bt(77482),$r=bt.n(Vs),at=bt(83314),Ot=bt(44081),fe=bt(7201),le=bt(12281),Ys=bt(51117),zs=bt(42454),Ln=bt(20211),nn=bt(38044),xs=bt(99791),Gi=bt(45625),xr=bt(46060);const si=[];for(let t=0;t<256;++t)si.push((t+256).toString(16).slice(1));function Bn(t,e=0){return si[t[e+0]]+si[t[e+1]]+si[t[e+2]]+si[t[e+3]]+"-"+si[t[e+4]]+si[t[e+5]]+"-"+si[t[e+6]]+si[t[e+7]]+"-"+si[t[e+8]]+si[t[e+9]]+"-"+si[t[e+10]]+si[t[e+11]]+si[t[e+12]]+si[t[e+13]]+si[t[e+14]]+si[t[e+15]]}function ks(t,e=0){const i=Bn(t,e);if(!validate(i))throw TypeError("Stringified UUID is invalid");return i}var an=null,oi=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Ws(t){return typeof t=="string"&&oi.test(t)}var Ti=Ws;function Wr(t){if(!Ti(t))throw TypeError("Invalid UUID");let e;const i=new Uint8Array(16);return i[0]=(e=parseInt(t.slice(0,8),16))>>>24,i[1]=e>>>16&255,i[2]=e>>>8&255,i[3]=e&255,i[4]=(e=parseInt(t.slice(9,13),16))>>>8,i[5]=e&255,i[6]=(e=parseInt(t.slice(14,18),16))>>>8,i[7]=e&255,i[8]=(e=parseInt(t.slice(19,23),16))>>>8,i[9]=e&255,i[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,i[11]=e/4294967296&255,i[12]=e>>>24&255,i[13]=e>>>16&255,i[14]=e>>>8&255,i[15]=e&255,i}var Fi=Wr;function xi(t){t=unescape(encodeURIComponent(t));const e=[];for(let i=0;i<t.length;++i)e.push(t.charCodeAt(i));return e}const ts="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Ur="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function _s(t,e,i){function r(s,n,a,o){var l;if(typeof s=="string"&&(s=xi(s)),typeof n=="string"&&(n=Fi(n)),((l=n)===null||l===void 0?void 0:l.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let h=new Uint8Array(16+s.length);if(h.set(n),h.set(s,n.length),h=i(h),h[6]=h[6]&15|e,h[8]=h[8]&63|128,a){o=o||0;for(let u=0;u<16;++u)a[o+u]=h[u];return a}return Bn(h)}try{r.name=t}catch{}return r.DNS=ts,r.URL=Ur,r}function Es(t,e,i,r){switch(t){case 0:return e&i^~e&r;case 1:return e^i^r;case 2:return e&i^e&r^i&r;case 3:return e^i^r}}function Zr(t,e){return t<<e|t>>>32-e}function vs(t){const e=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const a=unescape(encodeURIComponent(t));t=[];for(let o=0;o<a.length;++o)t.push(a.charCodeAt(o))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);const r=t.length/4+2,s=Math.ceil(r/16),n=new Array(s);for(let a=0;a<s;++a){const o=new Uint32Array(16);for(let l=0;l<16;++l)o[l]=t[a*64+l*4]<<24|t[a*64+l*4+1]<<16|t[a*64+l*4+2]<<8|t[a*64+l*4+3];n[a]=o}n[s-1][14]=(t.length-1)*8/Math.pow(2,32),n[s-1][14]=Math.floor(n[s-1][14]),n[s-1][15]=(t.length-1)*8&4294967295;for(let a=0;a<s;++a){const o=new Uint32Array(80);for(let p=0;p<16;++p)o[p]=n[a][p];for(let p=16;p<80;++p)o[p]=Zr(o[p-3]^o[p-8]^o[p-14]^o[p-16],1);let l=i[0],h=i[1],u=i[2],f=i[3],d=i[4];for(let p=0;p<80;++p){const k=Math.floor(p/20),_=Zr(l,5)+Es(k,h,u,f)+d+e[k]+o[p]>>>0;d=f,f=u,u=Zr(h,30)>>>0,h=l,l=_}i[0]=i[0]+l>>>0,i[1]=i[1]+h>>>0,i[2]=i[2]+u>>>0,i[3]=i[3]+f>>>0,i[4]=i[4]+d>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,i[0]&255,i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,i[1]&255,i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,i[2]&255,i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,i[3]&255,i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,i[4]&255]}var ze=vs,es=_s("v5",80,ze),Us=bt(91518),ur=bt(96225),is=bt(43349),Mi=bt(23352),Ts=bt(22930),Zs=bt(59542),vt=bt.n(Zs),Wt=bt(10285),Vt=bt.n(Wt),Ut=bt(28734),ie=bt.n(Ut),ye=bt(79697);const Pe={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},b={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},li=function(t="fatal"){let e=Pe.fatal;typeof t=="string"?(t=t.toLowerCase(),t in Pe&&(e=Pe[t])):typeof t=="number"&&(e=t),b.trace=()=>{},b.debug=()=>{},b.info=()=>{},b.warn=()=>{},b.error=()=>{},b.fatal=()=>{},e<=Pe.fatal&&(b.fatal=console.error?console.error.bind(console,pe("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",pe("FATAL"))),e<=Pe.error&&(b.error=console.error?console.error.bind(console,pe("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",pe("ERROR"))),e<=Pe.warn&&(b.warn=console.warn?console.warn.bind(console,pe("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",pe("WARN"))),e<=Pe.info&&(b.info=console.info?console.info.bind(console,pe("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",pe("INFO"))),e<=Pe.debug&&(b.debug=console.debug?console.debug.bind(console,pe("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",pe("DEBUG"))),e<=Pe.trace&&(b.trace=console.debug?console.debug.bind(console,pe("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",pe("TRACE")))},pe=t=>`%c${bi()().format("ss.SSS")} : ${t} : `,$e=t=>t?We(t).replace(/\\n/g,"#br#").split("#br#"):[""],ve=t=>$r().sanitize(t),$i=(t,e)=>{var i;if(((i=e.flowchart)==null?void 0:i.htmlLabels)!==!1){const r=e.securityLevel;r==="antiscript"||r==="strict"?t=ve(t):r!=="loose"&&(t=We(t),t=t.replace(/</g,"&lt;").replace(/>/g,"&gt;"),t=t.replace(/=/g,"&equals;"),t=ji(t))}return t},Ze=(t,e)=>t&&(e.dompurifyConfig?t=$r().sanitize($i(t,e),e.dompurifyConfig).toString():t=$r().sanitize($i(t,e),{FORBID_TAGS:["style"]}).toString(),t),Ht=(t,e)=>typeof t=="string"?Ze(t,e):t.flat().map(i=>Ze(i,e)),qe=/<br\s*\/?>/gi,Qe=t=>qe.test(t),tr=t=>t.split(qe),ji=t=>t.replace(/#br#/g,"<br/>"),We=t=>t.replace(qe,"#br#"),dr=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},Je=t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),Bi=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 Bi(i)}else return e},Jt={getRows:$e,sanitizeText:Ze,sanitizeTextOrArray:Ht,hasBreaks:Qe,splitBreaks:tr,lineBreakRegex:qe,removeScript:ve,getUrl:dr,evaluate:Je},ht=(t,e)=>e?(0,at.Z)(t,{s:-40,l:10}):(0,at.Z)(t,{s:-40,l:-10}),K="#ffffff",ct="#f2f2f2";let P=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,at.Z)(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||(0,at.Z)(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ht(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ht(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ht(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,at.Z)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,at.Z)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,at.Z)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,at.Z)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,at.Z)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,at.Z)(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||(0,at.Z)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,at.Z)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,at.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,at.Z)(this.mainBkg,{h:180,s:-15,l:e*(5+i*3)}),this["surfacePeer"+i]=this["surfacePeer"+i]||(0,at.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,at.Z)(this.primaryColor,{h:64}),this.fillType3=this.fillType3||(0,at.Z)(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||(0,at.Z)(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||(0,at.Z)(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||(0,at.Z)(this.primaryColor,{h:128}),this.fillType7=this.fillType7||(0,at.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,at.Z)(this.primaryColor,{l:-10}),this.pie5=this.pie5||(0,at.Z)(this.secondaryColor,{l:-10}),this.pie6=this.pie6||(0,at.Z)(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||(0,at.Z)(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||(0,at.Z)(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||(0,at.Z)(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||(0,at.Z)(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||(0,at.Z)(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||(0,at.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,at.Z)(this.primaryColor,{h:-30}),this.git4=this.git4||(0,at.Z)(this.primaryColor,{h:-60}),this.git5=this.git5||(0,at.Z)(this.primaryColor,{h:-90}),this.git6=this.git6||(0,at.Z)(this.primaryColor,{h:60}),this.git7=this.git7||(0,at.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||K,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ct}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 D=t=>{const e=new P;return e.calculate(t),e};let X=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,le.Z)(this.primaryColor,16),this.tertiaryColor=(0,at.Z)(this.primaryColor,{h:-160}),this.primaryBorderColor=(0,Ot.Z)(this.background),this.secondaryBorderColor=ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ht(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,Ys.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,Ys.Z)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,Ys.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,at.Z)(this.primaryColor,{h:64}),this.fillType3=(0,at.Z)(this.secondaryColor,{h:64}),this.fillType4=(0,at.Z)(this.primaryColor,{h:-64}),this.fillType5=(0,at.Z)(this.secondaryColor,{h:-64}),this.fillType6=(0,at.Z)(this.primaryColor,{h:128}),this.fillType7=(0,at.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,at.Z)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,at.Z)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,at.Z)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,at.Z)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,at.Z)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,at.Z)(this.primaryColor,{h:210}),this.cScale9=this.cScale9||(0,at.Z)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,at.Z)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,at.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,at.Z)(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this["surfacePeer"+e]=this["surfacePeer"+e]||(0,at.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,at.Z)(this.primaryColor,{h:-30}),20),this.git4=(0,le.Z)(this.pie5||(0,at.Z)(this.primaryColor,{h:-60}),20),this.git5=(0,le.Z)(this.pie6||(0,at.Z)(this.primaryColor,{h:-90}),10),this.git6=(0,le.Z)(this.pie7||(0,at.Z)(this.primaryColor,{h:60}),10),this.git7=(0,le.Z)(this.pie8||(0,at.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 pt=t=>{const e=new X;return e.calculate(t),e};let ut=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=(0,at.Z)(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=(0,at.Z)(this.primaryColor,{h:-160}),this.primaryBorderColor=ht(this.primaryColor,this.darkMode),this.secondaryBorderColor=ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ht(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,Ys.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,at.Z)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,at.Z)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,at.Z)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,at.Z)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,at.Z)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,at.Z)(this.primaryColor,{h:210}),this.cScale9=this.cScale9||(0,at.Z)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,at.Z)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,at.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,at.Z)(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||(0,at.Z)(this.mainBkg,{h:30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||(0,at.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,at.Z)(this.primaryColor,{h:64}),this.fillType3=(0,at.Z)(this.secondaryColor,{h:64}),this.fillType4=(0,at.Z)(this.primaryColor,{h:-64}),this.fillType5=(0,at.Z)(this.secondaryColor,{h:-64}),this.fillType6=(0,at.Z)(this.primaryColor,{h:128}),this.fillType7=(0,at.Z)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||(0,at.Z)(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||(0,at.Z)(this.primaryColor,{l:-10}),this.pie5=this.pie5||(0,at.Z)(this.secondaryColor,{l:-30}),this.pie6=this.pie6||(0,at.Z)(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||(0,at.Z)(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||(0,at.Z)(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||(0,at.Z)(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||(0,at.Z)(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||(0,at.Z)(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||(0,at.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,at.Z)(this.primaryColor,{h:-30}),this.git4=this.git4||(0,at.Z)(this.primaryColor,{h:-60}),this.git5=this.git5||(0,at.Z)(this.primaryColor,{h:-90}),this.git6=this.git6||(0,at.Z)(this.primaryColor,{h:60}),this.git7=this.git7||(0,at.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||K,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ct}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 Bt=t=>{const e=new ut;return e.calculate(t),e};let zt=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=ht(this.primaryColor,this.darkMode),this.secondaryBorderColor=ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ht(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,at.Z)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,at.Z)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,at.Z)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,at.Z)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,at.Z)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,at.Z)(this.primaryColor,{h:210}),this.cScale9=this.cScale9||(0,at.Z)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,at.Z)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,at.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,at.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,at.Z)(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||(0,at.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,at.Z)(this.primaryColor,{h:64}),this.fillType3=(0,at.Z)(this.secondaryColor,{h:64}),this.fillType4=(0,at.Z)(this.primaryColor,{h:-64}),this.fillType5=(0,at.Z)(this.secondaryColor,{h:-64}),this.fillType6=(0,at.Z)(this.primaryColor,{h:128}),this.fillType7=(0,at.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,at.Z)(this.primaryColor,{l:-30}),this.pie5=this.pie5||(0,at.Z)(this.secondaryColor,{l:-30}),this.pie6=this.pie6||(0,at.Z)(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||(0,at.Z)(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||(0,at.Z)(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||(0,at.Z)(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||(0,at.Z)(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||(0,at.Z)(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||(0,at.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,at.Z)(this.primaryColor,{h:-30}),this.git4=this.git4||(0,at.Z)(this.primaryColor,{h:-60}),this.git5=this.git5||(0,at.Z)(this.primaryColor,{h:-90}),this.git6=this.git6||(0,at.Z)(this.primaryColor,{h:60}),this.git7=this.git7||(0,at.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||K,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ct}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 Yt=t=>{const e=new zt;return e.calculate(t),e};class ge{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,le.Z)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=(0,at.Z)(this.primaryColor,{h:-160}),this.primaryBorderColor=ht(this.primaryColor,this.darkMode),this.secondaryBorderColor=ht(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ht(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,at.Z)(this.mainBkg,{l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||(0,at.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,at.Z)(this.primaryColor,{h:64}),this.fillType3=(0,at.Z)(this.secondaryColor,{h:64}),this.fillType4=(0,at.Z)(this.primaryColor,{h:-64}),this.fillType5=(0,at.Z)(this.secondaryColor,{h:-64}),this.fillType6=(0,at.Z)(this.primaryColor,{h:128}),this.fillType7=(0,at.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,at.Z)(this.primaryColor,{h:-30}),this.git4=this.pie5||(0,at.Z)(this.primaryColor,{h:-60}),this.git5=this.pie6||(0,at.Z)(this.primaryColor,{h:-90}),this.git6=this.pie7||(0,at.Z)(this.primaryColor,{h:60}),this.git7=this.pie8||(0,at.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||K,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ct}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 ue={base:{getThemeVariables:D},dark:{getThemeVariables:pt},default:{getThemeVariables:Bt},forest:{getThemeVariables:Yt},neutral:{getThemeVariables:t=>{const e=new ge;return e.calculate(t),e}}},Oe={theme:"default",themeVariables:ue.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};Oe.class&&(Oe.class.arrowMarkerAbsolute=Oe.arrowMarkerAbsolute),Oe.gitGraph&&(Oe.gitGraph.arrowMarkerAbsolute=Oe.arrowMarkerAbsolute);const Ee=(t,e="")=>Object.keys(t).reduce((i,r)=>Array.isArray(t[r])?i:typeof t[r]=="object"&&t[r]!==null?[...i,e+r,...Ee(t[r],"")]:[...i,e+r],[]),je=Ee(Oe,""),Mt=Oe;function Xt(t){return typeof t>"u"||t===null}function re(t){return typeof t=="object"&&t!==null}function Se(t){return Array.isArray(t)?t:Xt(t)?[]:[t]}function He(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 $t(t,e){var i="",r;for(r=0;r<e;r+=1)i+=t;return i}function ki(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var Dt=Xt,Rt=re,Kt=Se,ce=$t,Ue=ki,Gt=He,be={isNothing:Dt,isObject:Rt,toArray:Kt,repeat:ce,isNegativeZero:Ue,extend:Gt};function Ae(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 Vi(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=Ae(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Vi.prototype=Object.create(Error.prototype),Vi.prototype.constructor=Vi,Vi.prototype.toString=function(e){return this.name+": "+Ae(this,e)};var Yi=Vi;function Hs(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 Ss(t,e){return be.repeat(" ",e-t.length)+t}function Ii(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,f=e.maxLength-(e.indent+u+3);for(l=1;l<=e.linesBefore&&!(a-l<0);l++)h=Hs(t.buffer,r[a-l],s[a-l],t.position-(r[a]-r[a-l]),f),o=be.repeat(" ",e.indent)+Ss((t.line-l+1).toString(),u)+" | "+h.str+`
112
+ `+o;for(h=Hs(t.buffer,r[a],s[a],t.position,f),o+=be.repeat(" ",e.indent)+Ss((t.line+1).toString(),u)+" | "+h.str+`
113
+ `,o+=be.repeat("-",e.indent+u+3+h.pos)+`^
114
+ `,l=1;l<=e.linesAfter&&!(a+l>=s.length);l++)h=Hs(t.buffer,r[a+l],s[a+l],t.position-(r[a]-r[a+l]),f),o+=be.repeat(" ",e.indent)+Ss((t.line+l+1).toString(),u)+" | "+h.str+`
115
+ `;return o.replace(/\n$/,"")}var Xe=Ii,ci=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],rs=["scalar","sequence","mapping"];function kr(t){var e={};return t!==null&&Object.keys(t).forEach(function(i){t[i].forEach(function(r){e[String(r)]=i})}),e}function ws(t,e){if(e=e||{},Object.keys(e).forEach(function(i){if(ci.indexOf(i)===-1)throw new Yi('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=kr(e.styleAliases||null),rs.indexOf(this.kind)===-1)throw new Yi('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var Ke=ws;function _i(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 er(){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 Ei(t){return this.extend(t)}Ei.prototype.extend=function(e){var i=[],r=[];if(e instanceof Ke)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 Yi("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(n){if(!(n instanceof Ke))throw new Yi("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(n.loadKind&&n.loadKind!=="scalar")throw new Yi("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 Yi("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 Ke))throw new Yi("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(Ei.prototype);return s.implicit=(this.implicit||[]).concat(i),s.explicit=(this.explicit||[]).concat(r),s.compiledImplicit=_i(s,"implicit"),s.compiledExplicit=_i(s,"explicit"),s.compiledTypeMap=er(s.compiledImplicit,s.compiledExplicit),s};var qi=Ei,As=new Ke("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),on=new Ke("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),Ar=new Ke("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),In=new qi({explicit:[As,on,Ar]});function ln(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function Dn(){return null}function Lr(t){return t===null}var Zu=new Ke("tag:yaml.org,2002:null",{kind:"scalar",resolve:ln,construct:Dn,predicate:Lr,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function Hu(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 Gu(t){return t==="true"||t==="True"||t==="TRUE"}function ju(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var qu=new Ke("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Hu,construct:Gu,predicate:ju,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 Xu(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function Ku(t){return 48<=t&&t<=55}function Qu(t){return 48<=t&&t<=57}function Ju(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(!Xu(t.charCodeAt(i)))return!1;r=!0}return r&&s!=="_"}if(s==="o"){for(i++;i<e;i++)if(s=t[i],s!=="_"){if(!Ku(t.charCodeAt(i)))return!1;r=!0}return r&&s!=="_"}}if(s==="_")return!1;for(;i<e;i++)if(s=t[i],s!=="_"){if(!Qu(t.charCodeAt(i)))return!1;r=!0}return!(!r||s==="_")}function $u(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 td(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!be.isNegativeZero(t)}var ed=new Ke("tag:yaml.org,2002:int",{kind:"scalar",resolve:Ju,construct:$u,predicate:td,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"]}}),id=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function rd(t){return!(t===null||!id.test(t)||t[t.length-1]==="_")}function sd(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 nd=/^[-+]?[0-9]+e/;function ad(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(be.isNegativeZero(t))return"-0.0";return i=t.toString(10),nd.test(i)?i.replace("e",".e"):i}function od(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||be.isNegativeZero(t))}var ld=new Ke("tag:yaml.org,2002:float",{kind:"scalar",resolve:rd,construct:sd,predicate:od,represent:ad,defaultStyle:"lowercase"}),cd=In.extend({implicit:[Zu,qu,ed,ld]}),hd=cd,xc=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),kc=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 ud(t){return t===null?!1:xc.exec(t)!==null||kc.exec(t)!==null}function dd(t){var e,i,r,s,n,a,o,l=0,h=null,u,f,d;if(e=xc.exec(t),e===null&&(e=kc.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],f=+(e[11]||0),h=(u*60+f)*6e4,e[9]==="-"&&(h=-h)),d=new Date(Date.UTC(i,r,s,n,a,o,l)),h&&d.setTime(d.getTime()-h),d}function fd(t){return t.toISOString()}var pd=new Ke("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:ud,construct:dd,instanceOf:Date,represent:fd});function gd(t){return t==="<<"||t===null}var yd=new Ke("tag:yaml.org,2002:merge",{kind:"scalar",resolve:gd}),Io=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
116
+ \r`;function md(t){if(t===null)return!1;var e,i,r=0,s=t.length,n=Io;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 bd(t){var e,i,r=t.replace(/[\r\n=]/g,""),s=r.length,n=Io,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 xd(t){var e="",i=0,r,s,n=t.length,a=Io;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 kd(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var _d=new Ke("tag:yaml.org,2002:binary",{kind:"scalar",resolve:md,construct:bd,predicate:kd,represent:xd}),Ed=Object.prototype.hasOwnProperty,vd=Object.prototype.toString;function Cd(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,vd.call(s)!=="[object Object]")return!1;for(n in s)if(Ed.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 Td(t){return t!==null?t:[]}var Sd=new Ke("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Cd,construct:Td}),wd=Object.prototype.toString;function Ad(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],wd.call(r)!=="[object Object]"||(s=Object.keys(r),s.length!==1))return!1;n[e]=[s[0],r[s[0]]]}return!0}function Ld(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 Bd=new Ke("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Ad,construct:Ld}),Id=Object.prototype.hasOwnProperty;function Dd(t){if(t===null)return!0;var e,i=t;for(e in i)if(Id.call(i,e)&&i[e]!==null)return!1;return!0}function Rd(t){return t!==null?t:{}}var Nd=new Ke("tag:yaml.org,2002:set",{kind:"mapping",resolve:Dd,construct:Rd}),Od=hd.extend({implicit:[pd,yd],explicit:[_d,Sd,Bd,Nd]}),Ls=Object.prototype.hasOwnProperty,ka=1,_c=2,Ec=3,_a=4,Do=1,Fd=2,vc=3,Md=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Pd=/[\x85\u2028\u2029]/,Vd=/[,\[\]\{\}]/,Cc=/^(?:!|!!|![a-z\-]+!)$/i,Tc=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Sc(t){return Object.prototype.toString.call(t)}function Hr(t){return t===10||t===13}function Gs(t){return t===9||t===32}function ir(t){return t===9||t===32||t===10||t===13}function cn(t){return t===44||t===91||t===93||t===123||t===125}function Yd(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function zd(t){return t===120?2:t===117?4:t===85?8:0}function Wd(t){return 48<=t&&t<=57?t-48:-1}function wc(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 Ud(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}for(var Ac=new Array(256),Lc=new Array(256),hn=0;hn<256;hn++)Ac[hn]=wc(hn)?1:0,Lc[hn]=wc(hn);function Zd(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Od,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 Bc(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=Xe(i),new Yi(e,i)}function ae(t,e){throw Bc(t,e)}function Ea(t,e){t.onWarning&&t.onWarning.call(null,Bc(t,e))}var Ic={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&&Ea(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],Cc.test(s)||ae(e,"ill-formed tag handle (first argument) of the TAG directive"),Ls.call(e.tagMap,s)&&ae(e,'there is a previously declared suffix for "'+s+'" tag handle'),Tc.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 Bs(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 Md.test(o)&&ae(t,"the stream contains non-printable characters");t.result+=o}}function Dc(t,e,i,r){var s,n,a,o;for(be.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],Ls.call(e,n)||(e[n]=i[n],r[n]=!0)}function un(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"&&Sc(s[h])==="[object Object]"&&(s[h]="[object Object]");if(typeof s=="object"&&Sc(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)Dc(t,e,n[h],i);else Dc(t,e,n,i);else!t.json&&!Ls.call(i,s)&&Ls.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 Ro(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 vi(t,e,i){for(var r=0,s=t.input.charCodeAt(t.position);s!==0;){for(;Gs(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(Ro(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&&Ea(t,"deficient indentation"),r}function va(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||ir(i)))}function No(t,e){e===1?t.result+=" ":e>1&&(t.result+=be.repeat(`
118
+ `,e-1))}function Hd(t,e,i){var r,s,n,a,o,l,h,u,f=t.kind,d=t.result,p;if(p=t.input.charCodeAt(t.position),ir(p)||cn(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),ir(s)||i&&cn(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),ir(s)||i&&cn(s))break}else if(p===35){if(r=t.input.charCodeAt(t.position-1),ir(r))break}else{if(t.position===t.lineStart&&va(t)||i&&cn(p))break;if(Hr(p))if(l=t.line,h=t.lineStart,u=t.lineIndent,vi(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&&(Bs(t,n,a,!1),No(t,t.line-l),n=a=t.position,o=!1),Gs(p)||(a=t.position+1),p=t.input.charCodeAt(++t.position)}return Bs(t,n,a,!1),t.result?!0:(t.kind=f,t.result=d,!1)}function Gd(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(Bs(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)?(Bs(t,r,s,!0),No(t,vi(t,!1,e)),r=s=t.position):t.position===t.lineStart&&va(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 jd(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 Bs(t,i,t.position,!0),t.position++,!0;if(o===92){if(Bs(t,i,t.position,!0),o=t.input.charCodeAt(++t.position),Hr(o))vi(t,!1,e);else if(o<256&&Ac[o])t.result+=Lc[o],t.position++;else if((a=zd(o))>0){for(s=a,n=0;s>0;s--)o=t.input.charCodeAt(++t.position),(a=Yd(o))>=0?n=(n<<4)+a:ae(t,"expected hexadecimal character");t.result+=Ud(n),t.position++}else ae(t,"unknown escape sequence");i=r=t.position}else Hr(o)?(Bs(t,i,r,!0),No(t,vi(t,!1,e)),i=r=t.position):t.position===t.lineStart&&va(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 qd(t,e){var i=!0,r,s,n,a=t.tag,o,l=t.anchor,h,u,f,d,p,k=Object.create(null),_,T,S,E;if(E=t.input.charCodeAt(t.position),E===91)u=93,p=!1,o=[];else if(E===123)u=125,p=!0,o={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),E=t.input.charCodeAt(++t.position);E!==0;){if(vi(t,!0,e),E=t.input.charCodeAt(t.position),E===u)return t.position++,t.tag=a,t.anchor=l,t.kind=p?"mapping":"sequence",t.result=o,!0;i?E===44&&ae(t,"expected the node content, but found ','"):ae(t,"missed comma between flow collection entries"),T=_=S=null,f=d=!1,E===63&&(h=t.input.charCodeAt(t.position+1),ir(h)&&(f=d=!0,t.position++,vi(t,!0,e))),r=t.line,s=t.lineStart,n=t.position,dn(t,e,ka,!1,!0),T=t.tag,_=t.result,vi(t,!0,e),E=t.input.charCodeAt(t.position),(d||t.line===r)&&E===58&&(f=!0,E=t.input.charCodeAt(++t.position),vi(t,!0,e),dn(t,e,ka,!1,!0),S=t.result),p?un(t,o,k,T,_,S,r,s,n):f?o.push(un(t,null,k,T,_,S,r,s,n)):o.push(_),vi(t,!0,e),E=t.input.charCodeAt(t.position),E===44?(i=!0,E=t.input.charCodeAt(++t.position)):i=!1}ae(t,"unexpected end of the stream within a flow collection")}function Xd(t,e){var i,r,s=Do,n=!1,a=!1,o=e,l=0,h=!1,u,f;if(f=t.input.charCodeAt(t.position),f===124)r=!1;else if(f===62)r=!0;else return!1;for(t.kind="scalar",t.result="";f!==0;)if(f=t.input.charCodeAt(++t.position),f===43||f===45)Do===s?s=f===43?vc:Fd:ae(t,"repeat of a chomping mode identifier");else if((u=Wd(f))>=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(Gs(f)){do f=t.input.charCodeAt(++t.position);while(Gs(f));if(f===35)do f=t.input.charCodeAt(++t.position);while(!Hr(f)&&f!==0)}for(;f!==0;){for(Ro(t),t.lineIndent=0,f=t.input.charCodeAt(t.position);(!a||t.lineIndent<o)&&f===32;)t.lineIndent++,f=t.input.charCodeAt(++t.position);if(!a&&t.lineIndent>o&&(o=t.lineIndent),Hr(f)){l++;continue}if(t.lineIndent<o){s===vc?t.result+=be.repeat(`
119
+ `,n?1+l:l):s===Do&&n&&(t.result+=`
120
+ `);break}for(r?Gs(f)?(h=!0,t.result+=be.repeat(`
121
+ `,n?1+l:l)):h?(h=!1,t.result+=be.repeat(`
122
+ `,l+1)):l===0?n&&(t.result+=" "):t.result+=be.repeat(`
123
+ `,l):t.result+=be.repeat(`
124
+ `,n?1+l:l),n=!0,a=!0,l=0,i=t.position;!Hr(f)&&f!==0;)f=t.input.charCodeAt(++t.position);Bs(t,i,t.position,!1)}return!0}function Rc(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),!ir(a))));){if(o=!0,t.position++,vi(t,!0,-1)&&t.lineIndent<=e){n.push(null),l=t.input.charCodeAt(t.position);continue}if(i=t.line,dn(t,e,Ec,!1,!0),n.push(t.result),vi(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 Kd(t,e,i){var r,s,n,a,o,l,h=t.tag,u=t.anchor,f={},d=Object.create(null),p=null,k=null,_=null,T=!1,S=!1,E;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=f),E=t.input.charCodeAt(t.position);E!==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,(E===63||E===58)&&ir(r))E===63?(T&&(un(t,f,d,p,k,null,a,o,l),p=k=_=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,E=r;else{if(a=t.line,o=t.lineStart,l=t.position,!dn(t,i,_c,!1,!0))break;if(t.line===n){for(E=t.input.charCodeAt(t.position);Gs(E);)E=t.input.charCodeAt(++t.position);if(E===58)E=t.input.charCodeAt(++t.position),ir(E)||ae(t,"a whitespace character is expected after the key-value separator within a block mapping"),T&&(un(t,f,d,p,k,null,a,o,l),p=k=_=null),S=!0,T=!1,s=!1,p=t.tag,k=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),dn(t,e,_a,!0,s)&&(T?k=t.result:_=t.result),T||(un(t,f,d,p,k,_,a,o,l),p=k=_=null),vi(t,!0,-1),E=t.input.charCodeAt(t.position)),(t.line===n||t.lineIndent>e)&&E!==0)ae(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return T&&un(t,f,d,p,k,null,a,o,l),S&&(t.tag=h,t.anchor=u,t.kind="mapping",t.result=f),S}function Qd(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&&!ir(a);)a===33&&(r?ae(t,"tag suffix cannot contain exclamation marks"):(s=t.input.slice(e-1,t.position+1),Cc.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),Vd.test(n)&&ae(t,"tag suffix cannot contain flow indicator characters")}n&&!Tc.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:Ls.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 Jd(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&&!ir(i)&&!cn(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 $d(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&&!ir(r)&&!cn(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),Ls.call(t.anchorMap,i)||ae(t,'unidentified alias "'+i+'"'),t.result=t.anchorMap[i],vi(t,!0,-1),!0}function dn(t,e,i,r,s){var n,a,o,l=1,h=!1,u=!1,f,d,p,k,_,T;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,n=a=o=_a===i||Ec===i,r&&vi(t,!0,-1)&&(h=!0,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)),l===1)for(;Qd(t)||Jd(t);)vi(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||_a===i)&&(ka===i||_c===i?_=e:_=e+1,T=t.position-t.lineStart,l===1?o&&(Rc(t,T)||Kd(t,T,_))||qd(t,_)?u=!0:(a&&Xd(t,_)||Gd(t,_)||jd(t,_)?u=!0:$d(t)?(u=!0,(t.tag!==null||t.anchor!==null)&&ae(t,"alias node should not have any properties")):Hd(t,_,ka===i)&&(u=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):l===0&&(u=o&&Rc(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+'"'),f=0,d=t.implicitTypes.length;f<d;f+=1)if(k=t.implicitTypes[f],k.resolve(t.result)){t.result=k.construct(t.result),t.tag=k.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(Ls.call(t.typeMap[t.kind||"fallback"],t.tag))k=t.typeMap[t.kind||"fallback"][t.tag];else for(k=null,p=t.typeMap.multi[t.kind||"fallback"],f=0,d=p.length;f<d;f+=1)if(t.tag.slice(0,p[f].tag.length)===p[f].tag){k=p[f];break}k||ae(t,"unknown tag !<"+t.tag+">"),t.result!==null&&k.kind!==t.kind&&ae(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+k.kind+'", not "'+t.kind+'"'),k.resolve(t.result,t.tag)?(t.result=k.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 t2(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&&(vi(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&&!ir(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(;Gs(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&&!ir(a);)a=t.input.charCodeAt(++t.position);s.push(t.input.slice(i,t.position))}a!==0&&Ro(t),Ls.call(Ic,r)?Ic[r](t,r,s):Ea(t,'unknown document directive "'+r+'"')}if(vi(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,vi(t,!0,-1)):n&&ae(t,"directives end mark is expected"),dn(t,t.lineIndent-1,_a,!1,!0),vi(t,!0,-1),t.checkLineBreaks&&Pd.test(t.input.slice(e,t.position))&&Ea(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&va(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,vi(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 Nc(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 Zd(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;)t2(i);return i.documents}function e2(t,e,i){e!==null&&typeof e=="object"&&typeof i>"u"&&(i=e,e=null);var r=Nc(t,i);if(typeof e!="function")return r;for(var s=0,n=r.length;s<n;s+=1)e(r[s])}function i2(t,e){var i=Nc(t,e);if(i.length!==0){if(i.length===1)return i[0];throw new Yi("expected a single document in the stream, but found more")}}var r2=e2,s2=i2,n2={loadAll:r2,load:s2},a2=In,o2=n2.load;const Oc=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s;function l2(t,e){var i;const r=t.match(Oc);if(r){const s=o2(r[1],{schema:a2});return s!=null&&s.title&&((i=e.setDiagramTitle)==null||i.call(e,s.title)),t.slice(r[0].length)}else return t}const c2=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,h2=/\s*%%.*\n/gm,Ca={},Oo=function(t,e){t=t.replace(Oc,"").replace(c2,"").replace(h2,`
126
+ `);for(const[i,{detector:r}]of Object.entries(Ca))if(r(t,e))return i;throw new Error(`No diagram type detected for text: ${t}`)},Fc=(...t)=>{for(const{id:e,detector:i,loader:r}of t)Mc(e,i,r)},Mc=(t,e,i)=>{Ca[t]?b.error(`Detector with key ${t} already exists`):Ca[t]={detector:e,loader:i},b.debug(`Detector with key ${t} added${i?" with loader":""}`)},u2=t=>Ca[t].loader,Fo=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=>Fo(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]=Fo(t[n],e[n],{depth:r-1,clobber:s})):(s||typeof t[n]!="object"&&typeof e[n]!="object")&&(t[n]=e[n])}),t)},Di=Fo,d2={curveBasis:J.$0Z,curveBasisClosed:J.Dts,curveBasisOpen:J.WQY,curveBumpX:J.qpX,curveBumpY:J.u93,curveBundle:J.tFB,curveCardinalClosed:J.OvA,curveCardinalOpen:J.dCK,curveCardinal:J.YY7,curveCatmullRomClosed:J.fGX,curveCatmullRomOpen:J.$m7,curveCatmullRom:J.zgE,curveLinear:J.c_6,curveLinearClosed:J.fxm,curveMonotoneX:J.FdL,curveMonotoneY:J.ak_,curveNatural:J.SxZ,curveStep:J.eA_,curveStepAfter:J.jsv,curveStepBefore:J.iJ},Mo=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,f2=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,p2=function(t,e){const i=Pc(t,/(?:init\b)|(?:initialize\b)/);let r={};if(Array.isArray(i)){const s=i.map(n=>n.args);js(s),r=Di(r,[...s])}else r=i.args;if(r){let s=Oo(t,e);["config"].forEach(n=>{r[n]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),r[s]=r[n],delete r[n])})}return r},Pc=function(t,e=null){try{const i=new RegExp(`[%]{2}(?![{]${f2.source})(?=[}][%]{2}).*
127
+ `,"ig");t=t.trim().replace(i,"").replace(/'/gm,'"'),b.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let r;const s=[];for(;(r=Mo.exec(t))!==null;)if(r.index===Mo.lastIndex&&Mo.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 b.error(`ERROR: ${i.message} - Unable to parse directive
128
+ ${e!==null?" type:"+e:""} based on the text:${t}`),{type:null,args:null}}},g2=function(t,e){for(const[i,r]of e.entries())if(r.match(t))return i;return-1};function _r(t,e){if(!t)return e;const i=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return d2[i]||e}function y2(t,e){const i=t.trim();if(i)return e.securityLevel!=="loose"?(0,Hi.Nm)(i):i}const m2=(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 Ta(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function b2(t){let e,i=0;t.forEach(n=>{i+=Ta(n,e),e=n});let r=i/2,s;return e=void 0,t.forEach(n=>{if(e&&!s){const a=Ta(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 x2(t){return t.length===1?t[0]:b2(t)}const k2=(t,e,i)=>{let r;b.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 f=Ta(u,r);if(f<n)n-=f;else{const d=n/f;d<=0&&(a=r),d>=1&&(a={x:u.x,y:u.y}),d>0&&d<1&&(a={x:(1-d)*r.x+d*u.x,y:(1-d)*r.y+d*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 _2(t,e,i){let r=JSON.parse(JSON.stringify(i)),s;b.info("our points",r),e!=="start_left"&&e!=="start_right"&&(r=r.reverse()),r.forEach(f=>{s=f});let a=25+t,o;s=void 0,r.forEach(f=>{if(s&&!o){const d=Ta(f,s);if(d<a)a-=d;else{const p=a/d;p<=0&&(o=s),p>=1&&(o={x:f.x,y:f.y}),p>0&&p<1&&(o={x:(1-p)*s.x+p*f.x,y:(1-p)*s.y+p*f.y})}}s=f});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 ss(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 Vc=0;const Yc=()=>(Vc++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Vc);function E2(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 zc=t=>E2(t.length),v2=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}},C2=function(t,e){const i=e.text.replace(Jt.lineBreakRegex," "),[,r]=Rn(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},Wc=(0,zs.Z)((t,e,i)=>{if(!t||(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},i),Jt.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:d,remainingWord:p}=T2(a,e,"-",i);s.push(n,...d),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}`),T2=(0,zs.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 f=l+1,d=s.length===f,p=`${h}${i}`;n.push(d?h:p),a=""}else a=h}),{hyphenatedStrings:n,remainingWord:a}},(t,e,i="-",r)=>`${t}${e}${i}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function Po(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),Vo(t,e).height}function Gr(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),Vo(t,e).width}const Vo=(0,zs.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]=Rn(i),a=["sans-serif",r],o=t.split(Jt.lineBreakRegex),l=[],h=(0,J.Ys)("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const u=h.append("svg");for(const d of a){let p=0;const k={width:0,height:0,lineHeight:0};for(const _ of o){const T=v2();T.text=_;const S=C2(u,T).style("font-size",n).style("font-weight",s).style("font-family",d),E=(S._groups||S)[0][0].getBBox();k.width=Math.round(Math.max(k.width,E.width)),p=Math.round(E.height),k.height+=p,k.lineHeight=Math.round(Math.max(k.lineHeight,p))}l.push(k)}u.remove();const f=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[f]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),S2=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 Sa;const w2=function(t){return Sa=Sa||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Sa.innerHTML=t,unescape(Sa.textContent)},js=t=>{if(b.debug("directiveSanitizer called with",t),typeof t=="object"&&(t.length?t.forEach(e=>js(e)):Object.keys(t).forEach(e=>{b.debug("Checking key",e),e.startsWith("__")&&(b.debug("sanitize deleting __ option",e),delete t[e]),e.includes("proto")&&(b.debug("sanitize deleting proto option",e),delete t[e]),e.includes("constr")&&(b.debug("sanitize deleting constr option",e),delete t[e]),e.includes("themeCSS")&&(b.debug("sanitizing themeCss option"),t[e]=wa(t[e])),e.includes("fontFamily")&&(b.debug("sanitizing fontFamily option"),t[e]=wa(t[e])),e.includes("altFontFamily")&&(b.debug("sanitizing altFontFamily option"),t[e]=wa(t[e])),je.includes(e)?typeof t[e]=="object"&&(b.debug("sanitize deleting object",e),js(t[e])):(b.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]="")}}b.debug("After sanitization",t)},wa=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 Yo(t){return"str"in t}function A2(t){return t instanceof Error?t.message:String(t)}const L2=(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)},Rn=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]},me={assignWithDepth:Di,wrapLabel:Wc,calculateTextHeight:Po,calculateTextWidth:Gr,calculateTextDimensions:Vo,detectInit:p2,detectDirective:Pc,isSubstringInArray:g2,interpolateToCurve:_r,calcLabelPosition:x2,calcCardinalityPosition:k2,calcTerminalLabelPosition:_2,formatUrl:y2,getStylesFromArray:ss,generateId:Yc,random:zc,runFunc:m2,entityDecode:w2,initIdGenerator:S2,directiveSanitizer:js,sanitizeCss:wa,insertTitle:L2,parseFontSize:Rn},Aa="9.4.3",fn=Object.freeze(Mt);let rr=Di({},fn),Uc,pn=[],Nn=Di({},fn);const La=(t,e)=>{let i=Di({},t),r={};for(const s of e)Gc(s),r=Di(r,s);if(i=Di(i,r),r.theme&&r.theme in ue){const s=Di({},Uc),n=Di(s.themeVariables||{},r.themeVariables);i.theme&&i.theme in ue&&(i.themeVariables=ue[i.theme].getThemeVariables(n))}return Nn=i,Xc(Nn),Nn},B2=t=>(rr=Di({},fn),rr=Di(rr,t),t.theme&&ue[t.theme]&&(rr.themeVariables=ue[t.theme].getThemeVariables(t.themeVariables)),La(rr,pn),rr),I2=t=>{Uc=Di({},t)},D2=t=>(rr=Di(rr,t),La(rr,pn),rr),Zc=()=>Di({},rr),Hc=t=>(Xc(t),Di(Nn,t),M()),M=()=>Di({},Nn),Gc=t=>{["secure",...rr.secure??[]].forEach(e=>{t[e]!==void 0&&(b.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"&&Gc(t[e])})},zo=t=>{t.fontFamily&&(t.themeVariables?t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily}):t.themeVariables={fontFamily:t.fontFamily}),pn.push(t),La(rr,pn)},On=(t=rr)=>{pn=[],La(t,pn)};var jc=(t=>(t.LAZY_LOAD_DEPRECATED="The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",t))(jc||{});const qc={},R2=t=>{qc[t]||(b.warn(jc[t]),qc[t]=!0)},Xc=t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&R2("LAZY_LOAD_DEPRECATED")},N2=function(t,e){for(let i of e)t.attr(i[0],i[1])},O2=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},Br=function(t,e,i,r){const s=O2(e,i,r);N2(t,s)},Fn=function(t,e,i,r){const s=e.node().getBBox(),n=s.width,a=s.height;b.info(`SVG bounds: ${n}x${a}`,s);let o=0,l=0;b.info(`Graph bounds: ${o}x${l}`,t),o=n+i*2,l=a+i*2,b.info(`Calculated bounds: ${o}x${l}`),Br(e,l,o,r);const h=`${s.x-i} ${s.y-i} ${s.width+2*i} ${s.height+2*i}`;e.attr("viewBox",h)},Mn=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
+ `,Kc=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
+ `,Wo=()=>"",Ba=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
+ `,Qc=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
+ `,Jc=()=>"",$c=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
+ `,t1=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
+ `,e1=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
+ `,Ia=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
+ `,i1=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
+ `,r1=t=>`.person {
1186
+ stroke: ${t.personBorder};
1187
+ fill: ${t.personBkg};
1188
+ }
1189
+ `,Da={flowchart:Ba,"flowchart-v2":Ba,sequence:e1,gantt:Qc,classDiagram:Mn,"classDiagram-v2":Mn,class:Mn,stateDiagram:Ia,state:Ia,info:Jc,pie:$c,er:Kc,error:Wo,journey:i1,requirement:t1,c4:r1},F2=(t,e,i)=>{let r="";return t in Da&&Da[t]?r=Da[t](i):b.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
+ `},M2=(t,e)=>{Da[t]=e},P2=F2;let Uo="",Ra="",Zo="";const Ho=t=>Ze(t,M()),sr=function(){Uo="",Zo="",Ra=""},nr=function(t){Uo=Ho(t).replace(/^\s+/g,"")},fr=function(){return Uo||Ra},pr=function(t){Zo=Ho(t).replace(/\n\s+/g,`
1239
+ `)},gr=function(){return Zo},Ir=function(t){Ra=Ho(t)},Dr=function(){return Ra},s1=Object.freeze(Object.defineProperty({__proto__:null,clear:sr,default:{setAccTitle:nr,getAccTitle:fr,setDiagramTitle:Ir,getDiagramTitle:Dr,getAccDescription:gr,setAccDescription:pr,clear:sr},getAccDescription:gr,getAccTitle:fr,getDiagramTitle:Dr,setAccDescription:pr,setAccTitle:nr,setDiagramTitle:Ir},Symbol.toStringTag,{value:"Module"}));let qs={};const Go=function(t,e,i,r){b.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":V2(t,qs,r),qs=void 0;break}}catch(s){b.error(`Error while rendering sequenceDiagram directive: ${e} jison context: ${i}`),b.error(s.message)}},V2=function(t,e,i){switch(b.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])}),b.info("sanitize in handleDirective",e.args),js(e.args),b.info("sanitize in handleDirective (done)",e.args),zo(e.args);break}case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap(e.type==="wrap");break;case"themeCss":b.warn("themeCss encountered");break;default:b.warn(`Unhandled directive: source: '%%{${e.type}: ${JSON.stringify(e.args?e.args:{})}}%%`,e);break}},Y2=b,z2=li,Pn=M,W2=t=>Ze(t,Pn()),n1=Fn,U2=()=>s1,Z2=(t,e,i,r)=>Go(t,e,i,r),Na={},Si=(t,e,i)=>{if(Na[t])throw new Error(`Diagram ${t} already registered.`);Na[t]=e,i&&Mc(t,i),M2(t,e.styles),e.injectUtils&&e.injectUtils(Y2,z2,Pn,W2,n1,U2(),Z2)},a1=t=>{if(t in Na)return Na[t];throw new Error(`Diagram ${t} not found.`)};var jo=function(){var t=function(O,v,L,w){for(L=L||{},w=O.length;w--;L[O[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],f=[1,26],d=[6,8,14,50,55],p=[8,14,55],k=[1,53],_=[1,52],T=[8,14,30,33,35,38,55],S=[1,67],E=[1,68],I=[1,69],z=[8,14,33,35,42,55],Q={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,N){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:f},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(d,[2,116]),{49:45,52:[1,46]},t(d,[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:k,54:_},t(p,[2,111],{41:54,33:[1,57],34:[1,59],35:[1,55],38:[1,56],42:[1,58]}),{28:60,34:k,54:_},{33:[1,61],35:[1,62]},{28:63,34:k,54:_},{48:64,53:f},{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:E,45:I},{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(d,[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:E,45:I},{34:[1,93]},t(p,[2,25],{35:[1,94]}),{33:[1,95]},{33:[1,96]},{31:[1,97]},{39:98,43:S,44:E,45:I},{34:[1,99]},{34:[1,100]},{34:[1,101]},{34:[1,102]},{34:[1,103]},{34:[1,104]},{39:105,43:S,44:E,45:I},{34:[1,106]},{34:[1,107]},{39:108,43:S,44:E,45:I},{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:E,45:I},{34:[1,145]},{34:[1,146]},{34:[1,147]},{34:[1,148]},{39:149,43:S,44:E,45:I},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:E,45:I},{34:[1,153]},{39:154,43:S,44:E,45:I},{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:E,45:I},{34:[1,163]},{34:[1,164]},{34:[1,165]},{39:166,43:S,44:E,45:I},{34:[1,167]},{39:168,43:S,44:E,45:I},{34:[1,169]},{34:[1,170]},{34:[1,171]},{39:172,43:S,44:E,45:I},{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:E,45:I},{34:[1,206]},{34:[1,207]},{39:208,43:S,44:E,45:I},{34:[1,209]},{34:[1,210]},{34:[1,211]},{34:[1,212]},{39:213,43:S,44:E,45:I},{34:[1,214]},{39:215,43:S,44:E,45:I},{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:E,45:I},{34:[1,224]},{34:[1,225]},{34:[1,226]},{39:227,43:S,44:E,45:I},{34:[1,228]},{39:229,43:S,44:E,45:I},{34:[1,230]},{34:[1,231]},{34:[1,232]},{39:233,43:S,44:E,45:I},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=[],N=this.table,y="",V=0,wt=0,nt=2,rt=1,st=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 xt=et.yylloc;g.push(xt);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 Qt;return Qt=m.pop()||et.lex()||rt,typeof Qt!="number"&&(Qt instanceof Array&&(m=Qt,Qt=m.pop()),Qt=L.symbols_[Qt]||Qt),Qt}for(var U,gt,$,q,R={},A,H,C,ft;;){if(gt=w[w.length-1],this.defaultActions[gt]?$=this.defaultActions[gt]:((U===null||typeof U>"u")&&(U=jt()),$=N[gt]&&N[gt][U]),typeof $>"u"||!$.length||!$[0]){var x="";ft=[];for(A in N[gt])this.terminals_[A]&&A>nt&&ft.push("'"+this.terminals_[A]+"'");et.showPosition?x="Parse error on line "+(V+1)+`:
1240
+ `+et.showPosition()+`
1241
+ Expecting `+ft.join(", ")+", got '"+(this.terminals_[U]||U)+"'":x="Parse error on line "+(V+1)+": Unexpected "+(U==rt?"end of input":"'"+(this.terminals_[U]||U)+"'"),this.parseError(x,{text:et.match,token:this.terminals_[U]||U,line:et.yylineno,loc:xt,expected:ft})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+gt+", 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,V=et.yylineno,xt=et.yylloc;break;case 2:if(H=this.productions_[$[1]][1],R.$=B[B.length-H],R._$={first_line:g[g.length-(H||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(H||1)].first_column,last_column:g[g.length-1].last_column},Z&&(R._$.range=[g[g.length-(H||1)].range[0],g[g.length-1].range[1]]),q=this.performAction.apply(R,[y,wt,V,tt.yy,$[1],B,g].concat(st)),typeof q<"u")return q;H&&(w=w.slice(0,-1*H*2),B=B.slice(0,-1*H),g=g.slice(0,-1*H)),w.push(this.productions_[$[1]][0]),B.push(R.$),g.push(R._$),C=N[w[w.length-2]][w[w.length-1]],w.push(C);break;case 3:return!0}}return!0}},ot=function(){var O={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 O}();Q.lexer=ot;function Y(){this.yy={}}return Y.prototype=Q,Q.Parser=Y,new Y}();jo.parser=jo;const H2=jo,G2=t=>t.match(/^\s*gitGraph/)!==null;let Oa=M().gitGraph.mainBranchName,j2=M().gitGraph.mainBranchOrder,wi={},Xi=null,Vn={};Vn[Oa]={name:Oa,order:j2};let Ci={};Ci[Oa]=Xi;let Ri=Oa,o1="LR",Xs=0;function qo(){return zc({length:7})}const q2=function(t,e,i){ii.parseDirective(this,t,e,i)};function X2(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 K2=function(t){o1=t};let l1={};const Q2=function(t){b.debug("options str",t),t=t&&t.trim(),t=t||"{}";try{l1=JSON.parse(t)}catch(e){b.error("error while parsing gitGraph options",e.message)}},J2=function(){return l1},$2=function(t,e,i,r){b.debug("Entering commit:",t,e,i,r),e=Jt.sanitizeText(e,M()),t=Jt.sanitizeText(t,M()),r=Jt.sanitizeText(r,M());const s={id:e||Xs+"-"+qo(),message:t,seq:Xs++,type:i||Yn.NORMAL,tag:r||"",parents:Xi==null?[]:[Xi.id],branch:Ri};Xi=s,wi[s.id]=s,Ci[Ri]=s.id,b.debug("in pushCommit "+s.id)},tf=function(t,e){if(t=Jt.sanitizeText(t,M()),Ci[t]===void 0)Ci[t]=Xi!=null?Xi.id:null,Vn[t]={name:t,order:e?parseInt(e,10):null},c1(t),b.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}},ef=function(t,e,i,r){t=Jt.sanitizeText(t,M()),e=Jt.sanitizeText(e,M());const s=wi[Ci[Ri]],n=wi[Ci[t]];if(Ri===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 ('+Ri+")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(Ci[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&&wi[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||Xs+"-"+qo(),message:"merged branch "+t+" into "+Ri,seq:Xs++,parents:[Xi==null?null:Xi.id,Ci[t]],branch:Ri,type:Yn.MERGE,customType:i,customId:!!e,tag:r||""};Xi=a,wi[a.id]=a,Ci[Ri]=a.id,b.debug(Ci),b.debug("in mergeBranch")},rf=function(t,e,i){if(b.debug("Entering cherryPick:",t,e,i),t=Jt.sanitizeText(t,M()),e=Jt.sanitizeText(e,M()),i=Jt.sanitizeText(i,M()),!t||wi[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=wi[t],s=r.branch;if(r.type===Yn.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||wi[e]===void 0){if(s===Ri){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=wi[Ci[Ri]];if(n===void 0||!n){let o=new Error('Incorrect usage of "cherry-pick". Current branch ('+Ri+")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:Xs+"-"+qo(),message:"cherry-picked "+r+" into "+Ri,seq:Xs++,parents:[Xi==null?null:Xi.id,r.id],branch:Ri,type:Yn.CHERRY_PICK,tag:i??"cherry-pick:"+r.id};Xi=a,wi[a.id]=a,Ci[Ri]=a.id,b.debug(Ci),b.debug("in cherryPick")}},c1=function(t){if(t=Jt.sanitizeText(t,M()),Ci[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{Ri=t;const e=Ci[Ri];Xi=wi[e]}};function h1(t,e,i){const r=t.indexOf(e);r===-1?t.push(i):t.splice(r,1,i)}function u1(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 Ci)Ci[s]===e.id&&r.push(s);if(b.debug(r.join(" ")),e.parents&&e.parents.length==2){const s=wi[e.parents[0]];h1(t,e,s),t.push(wi[e.parents[1]])}else{if(e.parents.length==0)return;{const s=wi[e.parents];h1(t,e,s)}}t=X2(t,s=>s.id),u1(t)}const sf=function(){b.debug(wi);const t=d1()[0];u1([t])},nf=function(){wi={},Xi=null;let t=M().gitGraph.mainBranchName,e=M().gitGraph.mainBranchOrder;Ci={},Ci[t]=null,Vn={},Vn[t]={name:t,order:e},Ri=t,Xs=0,sr()},af=function(){return Object.values(Vn).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}))},of=function(){return Ci},lf=function(){return wi},d1=function(){const t=Object.keys(wi).map(function(e){return wi[e]});return t.forEach(function(e){b.debug(e.id)}),t.sort((e,i)=>e.seq-i.seq),t},cf=function(){return Ri},hf=function(){return o1},uf=function(){return Xi},Yn={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},df={parseDirective:q2,getConfig:()=>M().gitGraph,setDirection:K2,setOptions:Q2,getOptions:J2,commit:$2,branch:tf,merge:ef,cherryPick:rf,checkout:c1,prettyPrint:sf,clear:nf,getBranchesAsObjArray:af,getBranches:of,getCommits:lf,getCommitsArray:d1,getCurrentBranch:cf,getDirection:hf,getHead:uf,setAccTitle:nr,getAccTitle:fr,getAccDescription:gr,setAccDescription:pr,setDiagramTitle:Ir,getDiagramTitle:Dr,commitType:Yn};let zn={};const yr={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Ks=8;let ar={},Fa={},Ma=[],Pa=0;const ff=()=>{ar={},Fa={},zn={},Pa=0,Ma=[]},pf=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},f1=(t,e,i)=>{const r=Pn().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],f=ar[u.branch].pos,d=a+10;if(i){let p,k=u.customType!==void 0&&u.customType!==""?u.customType:u.type;switch(k){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(k===yr.HIGHLIGHT){const _=s.append("rect");_.attr("x",d-10),_.attr("y",f-10),_.attr("height",20),_.attr("width",20),_.attr("class",`commit ${u.id} commit-highlight${ar[u.branch].index%Ks} ${p}-outer`),s.append("rect").attr("x",d-6).attr("y",f-6).attr("height",12).attr("width",12).attr("class",`commit ${u.id} commit${ar[u.branch].index%Ks} ${p}-inner`)}else if(k===yr.CHERRY_PICK)s.append("circle").attr("cx",d).attr("cy",f).attr("r",10).attr("class",`commit ${u.id} ${p}`),s.append("circle").attr("cx",d-3).attr("cy",f+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${u.id} ${p}`),s.append("circle").attr("cx",d+3).attr("cy",f+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${u.id} ${p}`),s.append("line").attr("x1",d+3).attr("y1",f+1).attr("x2",d).attr("y2",f-5).attr("stroke","#fff").attr("class",`commit ${u.id} ${p}`),s.append("line").attr("x1",d-3).attr("y1",f+1).attr("x2",d).attr("y2",f-5).attr("stroke","#fff").attr("class",`commit ${u.id} ${p}`);else{const _=s.append("circle");if(_.attr("cx",d),_.attr("cy",f),_.attr("r",u.type===yr.MERGE?9:10),_.attr("class",`commit ${u.id} commit${ar[u.branch].index%Ks}`),k===yr.MERGE){const T=s.append("circle");T.attr("cx",d),T.attr("cy",f),T.attr("r",6),T.attr("class",`commit ${p} ${u.id} commit${ar[u.branch].index%Ks}`)}k===yr.REVERSE&&s.append("path").attr("d",`M ${d-5},${f-5}L${d+5},${f+5}M${d-5},${f+5}L${d+5},${f-5}`).attr("class",`commit ${p} ${u.id} commit${ar[u.branch].index%Ks}`)}}if(Fa[u.id]={x:a+10,y:f},i){if(u.type!==yr.CHERRY_PICK&&(u.customId&&u.type===yr.MERGE||u.type!==yr.MERGE)&&r.showCommitLabel){const _=n.append("g"),T=_.insert("rect").attr("class","commit-label-bkg"),S=_.append("text").attr("x",a).attr("y",f+25).attr("class","commit-label").text(u.id);let E=S.node().getBBox();if(T.attr("x",a+10-E.width/2-2).attr("y",f+13.5).attr("width",E.width+2*2).attr("height",E.height+2*2),S.attr("x",a+10-E.width/2),r.rotateCommitLabel){let I=-7.5-(E.width+10)/25*9.5,z=10+E.width/25*8.5;_.attr("transform","translate("+I+", "+z+") rotate(-45, "+a+", "+f+")")}}if(u.tag){const _=n.insert("polygon"),T=n.append("circle"),S=n.append("text").attr("y",f-16).attr("class","tag-label").text(u.tag);let E=S.node().getBBox();S.attr("x",a+10-E.width/2);const I=E.height/2,z=f-19.2;_.attr("class","tag-label-bkg").attr("points",`
1245
+ ${a-E.width/2-4/2},${z+2}
1246
+ ${a-E.width/2-4/2},${z-2}
1247
+ ${a+10-E.width/2-4},${z-I-2}
1248
+ ${a+10+E.width/2+4},${z-I-2}
1249
+ ${a+10+E.width/2+4},${z+I+2}
1250
+ ${a+10-E.width/2-4},${z+I+2}`),T.attr("cx",a-E.width/2+4/2).attr("cy",z).attr("r",1.5).attr("class","tag-hole")}}a+=50,a>Pa&&(Pa=a)})},gf=(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,Xo=(t,e,i=0)=>{const r=t+Math.abs(t-e)/2;if(i>5)return r;if(Ma.every(a=>Math.abs(a-r)>=10))return Ma.push(r),r;const n=Math.abs(t-e);return Xo(t,e-n/5,i+1)},yf=(t,e,i,r)=>{const s=Fa[e.id],n=Fa[i.id],a=gf(e,i,r);let o="",l="",h=0,u=0,f=ar[i.branch].index,d;if(a){o="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",h=10,u=10,f=ar[i.branch].index;const p=s.y<n.y?Xo(s.y,n.y):Xo(n.y,s.y);s.y<n.y?d=`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}`:d=`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,f=ar[i.branch].index,d=`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,f=ar[e.branch].index,d=`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&&(f=ar[e.branch].index,d=`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",d).attr("class","arrow arrow"+f%Ks)},mf=(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=>{yf(i,e[n],s,e)})})},bf=(t,e)=>{const i=Pn().gitGraph,r=t.append("g");e.forEach((s,n)=>{const a=n%Ks,o=ar[s.name].pos,l=r.append("line");l.attr("x1",0),l.attr("y1",o),l.attr("x2",Pa),l.attr("y2",o),l.attr("class","branch branch"+a),Ma.push(o);let h=s.name;const u=pf(h),f=r.insert("rect"),p=r.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);p.node().appendChild(u);let k=u.getBBox();f.attr("class","branchLabelBkg label"+a).attr("rx",4).attr("ry",4).attr("x",-k.width-4-(i.rotateCommitLabel===!0?30:0)).attr("y",-k.height/2+8).attr("width",k.width+18).attr("height",k.height+4),p.attr("transform","translate("+(-k.width-14-(i.rotateCommitLabel===!0?30:0))+", "+(o-k.height/2-1)+")"),f.attr("transform","translate(-19, "+(o-k.height/2)+")")})},xf={draw:function(t,e,i,r){ff();const s=Pn(),n=s.gitGraph;b.debug("in gitgraph renderer",t+`
1251
+ `,"id:",e,i),zn=r.db.getCommits();const a=r.db.getBranchesAsObjArray();let o=0;a.forEach((h,u)=>{ar[h.name]={pos:o,index:u},o+=50+(n.rotateCommitLabel?40:0)});const l=(0,J.Ys)(`[id="${e}"]`);f1(l,zn,!1),n.showBranches&&bf(l,a),mf(l,zn),f1(l,zn,!0),me.insertTitle(l,"gitTitleText",n.titleTopMargin,r.db.getDiagramTitle()),n1(void 0,l,n.diagramPadding,n.useMaxWidth??s.useMaxWidth)}},kf=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 Va=function(){var t=function(Zt,St,Et,It){for(Et=Et||{},It=Zt.length;It--;Et[Zt[It]]=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],f=[1,27],d=[1,33],p=[1,34],k=[1,35],_=[1,36],T=[1,37],S=[1,72],E=[1,73],I=[1,74],z=[1,75],Q=[1,76],ot=[1,77],Y=[1,78],O=[1,38],v=[1,39],L=[1,40],w=[1,41],m=[1,42],B=[1,43],g=[1,44],N=[1,45],y=[1,46],V=[1,47],wt=[1,48],nt=[1,49],rt=[1,50],st=[1,51],et=[1,52],tt=[1,53],Tt=[1,54],xt=[1,55],Z=[1,56],jt=[1,57],U=[1,59],gt=[1,60],$=[1,61],q=[1,62],R=[1,63],A=[1,64],H=[1,65],C=[1,66],ft=[1,67],x=[1,68],Qt=[1,69],G=[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],yt=[1,95],_t=[1,96],mt=[1,97],Ct=[15,24,52],Ge=[7,8,9,10,18,22,25,26,27,28],De=[15,24,43,52],se=[15,24,43,52,86,87,89,90],ee=[15,43],we=[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],ri={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,It,dt,qt,it,Ce){var lt=it.length-1;switch(qt){case 4:dt.setDirection("TB");break;case 5:dt.setDirection("BT");break;case 6:dt.setDirection("RL");break;case 7:dt.setDirection("LR");break;case 11:dt.parseDirective("%%{","open_directive");break;case 12:break;case 13:it[lt]=it[lt].trim().replace(/'/g,'"'),dt.parseDirective(it[lt],"arg_directive");break;case 14:dt.parseDirective("}%%","close_directive","c4Context");break;case 15:case 16:case 17:case 18:case 19:dt.setC4Type(it[lt-3]);break;case 26:dt.setTitle(it[lt].substring(6)),this.$=it[lt].substring(6);break;case 27:dt.setAccDescription(it[lt].substring(15)),this.$=it[lt].substring(15);break;case 28:this.$=it[lt].trim(),dt.setTitle(this.$);break;case 29:case 30:this.$=it[lt].trim(),dt.setAccDescription(this.$);break;case 35:case 36:it[lt].splice(2,0,"ENTERPRISE"),dt.addPersonOrSystemBoundary(...it[lt]),this.$=it[lt];break;case 37:dt.addPersonOrSystemBoundary(...it[lt]),this.$=it[lt];break;case 38:it[lt].splice(2,0,"CONTAINER"),dt.addContainerBoundary(...it[lt]),this.$=it[lt];break;case 39:dt.addDeploymentNode("node",...it[lt]),this.$=it[lt];break;case 40:dt.addDeploymentNode("nodeL",...it[lt]),this.$=it[lt];break;case 41:dt.addDeploymentNode("nodeR",...it[lt]),this.$=it[lt];break;case 42:dt.popBoundaryParseStack();break;case 46:dt.addPersonOrSystem("person",...it[lt]),this.$=it[lt];break;case 47:dt.addPersonOrSystem("external_person",...it[lt]),this.$=it[lt];break;case 48:dt.addPersonOrSystem("system",...it[lt]),this.$=it[lt];break;case 49:dt.addPersonOrSystem("system_db",...it[lt]),this.$=it[lt];break;case 50:dt.addPersonOrSystem("system_queue",...it[lt]),this.$=it[lt];break;case 51:dt.addPersonOrSystem("external_system",...it[lt]),this.$=it[lt];break;case 52:dt.addPersonOrSystem("external_system_db",...it[lt]),this.$=it[lt];break;case 53:dt.addPersonOrSystem("external_system_queue",...it[lt]),this.$=it[lt];break;case 54:dt.addContainer("container",...it[lt]),this.$=it[lt];break;case 55:dt.addContainer("container_db",...it[lt]),this.$=it[lt];break;case 56:dt.addContainer("container_queue",...it[lt]),this.$=it[lt];break;case 57:dt.addContainer("external_container",...it[lt]),this.$=it[lt];break;case 58:dt.addContainer("external_container_db",...it[lt]),this.$=it[lt];break;case 59:dt.addContainer("external_container_queue",...it[lt]),this.$=it[lt];break;case 60:dt.addComponent("component",...it[lt]),this.$=it[lt];break;case 61:dt.addComponent("component_db",...it[lt]),this.$=it[lt];break;case 62:dt.addComponent("component_queue",...it[lt]),this.$=it[lt];break;case 63:dt.addComponent("external_component",...it[lt]),this.$=it[lt];break;case 64:dt.addComponent("external_component_db",...it[lt]),this.$=it[lt];break;case 65:dt.addComponent("external_component_queue",...it[lt]),this.$=it[lt];break;case 67:dt.addRel("rel",...it[lt]),this.$=it[lt];break;case 68:dt.addRel("birel",...it[lt]),this.$=it[lt];break;case 69:dt.addRel("rel_u",...it[lt]),this.$=it[lt];break;case 70:dt.addRel("rel_d",...it[lt]),this.$=it[lt];break;case 71:dt.addRel("rel_l",...it[lt]),this.$=it[lt];break;case 72:dt.addRel("rel_r",...it[lt]),this.$=it[lt];break;case 73:dt.addRel("rel_b",...it[lt]),this.$=it[lt];break;case 74:it[lt].splice(0,1),dt.addRel("rel",...it[lt]),this.$=it[lt];break;case 75:dt.updateElStyle("update_el_style",...it[lt]),this.$=it[lt];break;case 76:dt.updateRelStyle("update_rel_style",...it[lt]),this.$=it[lt];break;case 77:dt.updateLayoutConfig("update_layout_config",...it[lt]),this.$=it[lt];break;case 78:this.$=[it[lt]];break;case 79:it[lt].unshift(it[lt-1]),this.$=it[lt];break;case 80:case 82:this.$=it[lt].trim();break;case 81:let ke={};ke[it[lt-1].trim()]=it[lt].trim(),this.$=ke;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:f},t([16,21],[2,12]),{23:28,29:29,30:30,31:31,32:d,33:p,34:k,36:_,38:T,39:58,40:70,42:71,44:S,46:E,47:I,48:z,49:Q,50:ot,51:Y,53:32,54:O,55:v,56:L,57:w,58:m,59:B,60:g,61:N,62:y,63:V,64:wt,65:nt,66:rt,67:st,68:et,69:tt,70:Tt,71:xt,72:Z,73:jt,74:U,75:gt,76:$,77:q,78:R,79:A,80:H,81:C,82:ft,83:x,84:Qt},{23:79,29:29,30:30,31:31,32:d,33:p,34:k,36:_,38:T,39:58,40:70,42:71,44:S,46:E,47:I,48:z,49:Q,50:ot,51:Y,53:32,54:O,55:v,56:L,57:w,58:m,59:B,60:g,61:N,62:y,63:V,64:wt,65:nt,66:rt,67:st,68:et,69:tt,70:Tt,71:xt,72:Z,73:jt,74:U,75:gt,76:$,77:q,78:R,79:A,80:H,81:C,82:ft,83:x,84:Qt},{23:80,29:29,30:30,31:31,32:d,33:p,34:k,36:_,38:T,39:58,40:70,42:71,44:S,46:E,47:I,48:z,49:Q,50:ot,51:Y,53:32,54:O,55:v,56:L,57:w,58:m,59:B,60:g,61:N,62:y,63:V,64:wt,65:nt,66:rt,67:st,68:et,69:tt,70:Tt,71:xt,72:Z,73:jt,74:U,75:gt,76:$,77:q,78:R,79:A,80:H,81:C,82:ft,83:x,84:Qt},{23:81,29:29,30:30,31:31,32:d,33:p,34:k,36:_,38:T,39:58,40:70,42:71,44:S,46:E,47:I,48:z,49:Q,50:ot,51:Y,53:32,54:O,55:v,56:L,57:w,58:m,59:B,60:g,61:N,62:y,63:V,64:wt,65:nt,66:rt,67:st,68:et,69:tt,70:Tt,71:xt,72:Z,73:jt,74:U,75:gt,76:$,77:q,78:R,79:A,80:H,81:C,82:ft,83:x,84:Qt},{23:82,29:29,30:30,31:31,32:d,33:p,34:k,36:_,38:T,39:58,40:70,42:71,44:S,46:E,47:I,48:z,49:Q,50:ot,51:Y,53:32,54:O,55:v,56:L,57:w,58:m,59:B,60:g,61:N,62:y,63:V,64:wt,65:nt,66:rt,67:st,68:et,69:tt,70:Tt,71:xt,72:Z,73:jt,74:U,75:gt,76:$,77:q,78:R,79:A,80:H,81:C,82:ft,83:x,84:Qt},{15:[1,83]},{17:84,20:[1,85]},{15:[2,14]},{24:[1,86]},t(G,[2,20],{53:32,39:58,40:70,42:71,30:87,44:S,46:E,47:I,48:z,49:Q,50:ot,51:Y,54:O,55:v,56:L,57:w,58:m,59:B,60:g,61:N,62:y,63:V,64:wt,65:nt,66:rt,67:st,68:et,69:tt,70:Tt,71:xt,72:Z,73:jt,74:U,75:gt,76:$,77:q,78:R,79:A,80:H,81:C,82:ft,83:x,84:Qt}),t(G,[2,21]),t(Nt,[2,23],{15:[1,88]}),t(G,[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:yt,89:_t,90:mt},{45:98,85:93,86:kt,87:yt,89:_t,90:mt},{45:99,85:93,86:kt,87:yt,89:_t,90:mt},{45:100,85:93,86:kt,87:yt,89:_t,90:mt},{45:101,85:93,86:kt,87:yt,89:_t,90:mt},{45:102,85:93,86:kt,87:yt,89:_t,90:mt},{45:103,85:93,86:kt,87:yt,89:_t,90:mt},{45:104,85:93,86:kt,87:yt,89:_t,90:mt},{45:105,85:93,86:kt,87:yt,89:_t,90:mt},{45:106,85:93,86:kt,87:yt,89:_t,90:mt},{45:107,85:93,86:kt,87:yt,89:_t,90:mt},{45:108,85:93,86:kt,87:yt,89:_t,90:mt},{45:109,85:93,86:kt,87:yt,89:_t,90:mt},{45:110,85:93,86:kt,87:yt,89:_t,90:mt},{45:111,85:93,86:kt,87:yt,89:_t,90:mt},{45:112,85:93,86:kt,87:yt,89:_t,90:mt},{45:113,85:93,86:kt,87:yt,89:_t,90:mt},{45:114,85:93,86:kt,87:yt,89:_t,90:mt},{45:115,85:93,86:kt,87:yt,89:_t,90:mt},{45:116,85:93,86:kt,87:yt,89:_t,90:mt},t(Ct,[2,66]),{45:117,85:93,86:kt,87:yt,89:_t,90:mt},{45:118,85:93,86:kt,87:yt,89:_t,90:mt},{45:119,85:93,86:kt,87:yt,89:_t,90:mt},{45:120,85:93,86:kt,87:yt,89:_t,90:mt},{45:121,85:93,86:kt,87:yt,89:_t,90:mt},{45:122,85:93,86:kt,87:yt,89:_t,90:mt},{45:123,85:93,86:kt,87:yt,89:_t,90:mt},{45:124,85:93,86:kt,87:yt,89:_t,90:mt},{45:125,85:93,86:kt,87:yt,89:_t,90:mt},{45:126,85:93,86:kt,87:yt,89:_t,90:mt},{45:127,85:93,86:kt,87:yt,89:_t,90:mt},{30:128,39:58,40:70,42:71,44:S,46:E,47:I,48:z,49:Q,50:ot,51:Y,53:32,54:O,55:v,56:L,57:w,58:m,59:B,60:g,61:N,62:y,63:V,64:wt,65:nt,66:rt,67:st,68:et,69:tt,70:Tt,71:xt,72:Z,73:jt,74:U,75:gt,76:$,77:q,78:R,79:A,80:H,81:C,82:ft,83:x,84:Qt},{15:[1,130],43:[1,129]},{45:131,85:93,86:kt,87:yt,89:_t,90:mt},{45:132,85:93,86:kt,87:yt,89:_t,90:mt},{45:133,85:93,86:kt,87:yt,89:_t,90:mt},{45:134,85:93,86:kt,87:yt,89:_t,90:mt},{45:135,85:93,86:kt,87:yt,89:_t,90:mt},{45:136,85:93,86:kt,87:yt,89:_t,90:mt},{45:137,85:93,86:kt,87:yt,89:_t,90:mt},{24:[1,138]},{24:[1,139]},{24:[1,140]},{24:[1,141]},t(Ge,[2,9]),{14:142,21:f},{21:[2,13]},{1:[2,15]},t(G,[2,22]),t(Nt,[2,24],{31:31,29:143,32:d,33:p,34:k,36:_,38:T}),t(G,[2,44],{29:29,30:30,31:31,53:32,39:58,40:70,42:71,23:144,32:d,33:p,34:k,36:_,38:T,44:S,46:E,47:I,48:z,49:Q,50:ot,51:Y,54:O,55:v,56:L,57:w,58:m,59:B,60:g,61:N,62:y,63:V,64:wt,65:nt,66:rt,67:st,68:et,69:tt,70:Tt,71:xt,72:Z,73:jt,74:U,75:gt,76:$,77:q,78:R,79:A,80:H,81:C,82:ft,83:x,84:Qt}),t(At,[2,28]),t(At,[2,29]),t(Ct,[2,46]),t(De,[2,78],{85:93,45:145,86:kt,87:yt,89:_t,90:mt}),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(ee,[2,35]),t(ee,[2,36]),t(ee,[2,37]),t(ee,[2,38]),t(ee,[2,39]),t(ee,[2,40]),t(ee,[2,41]),{1:[2,16]},{1:[2,17]},{1:[2,18]},{1:[2,19]},{15:[1,151]},t(Nt,[2,25]),t(G,[2,45]),t(De,[2,79]),t(se,[2,81]),t(Ct,[2,31]),t(Ct,[2,42]),t(we,[2,32]),t(we,[2,33],{15:[1,152]}),t(Ge,[2,10]),t(we,[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 It=new Error(St);throw It.hash=Et,It}},parse:function(St){var Et=this,It=[0],dt=[],qt=[null],it=[],Ce=this.table,lt="",ke=0,Re=0,Fe=2,Ne=1,Me=it.slice.call(arguments,1),oe=Object.create(this.lexer),_e={yy:{}};for(var Le in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Le)&&(_e.yy[Le]=this.yy[Le]);oe.setInput(St,_e.yy),_e.yy.lexer=oe,_e.yy.parser=this,typeof oe.yylloc>"u"&&(oe.yylloc={});var Be=oe.yylloc;it.push(Be);var ba=oe.options&&oe.options.ranges;typeof _e.yy.parseError=="function"?this.parseError=_e.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function wo(){var mi;return mi=dt.pop()||oe.lex()||Ne,typeof mi!="number"&&(mi instanceof Array&&(dt=mi,mi=dt.pop()),mi=Et.symbols_[mi]||mi),mi}for(var gi,xe,Qi,wn,Ni={},Ui,yi,cr,Zi;;){if(xe=It[It.length-1],this.defaultActions[xe]?Qi=this.defaultActions[xe]:((gi===null||typeof gi>"u")&&(gi=wo()),Qi=Ce[xe]&&Ce[xe][gi]),typeof Qi>"u"||!Qi.length||!Qi[0]){var Ji="";Zi=[];for(Ui in Ce[xe])this.terminals_[Ui]&&Ui>Fe&&Zi.push("'"+this.terminals_[Ui]+"'");oe.showPosition?Ji="Parse error on line "+(ke+1)+`:
1304
+ `+oe.showPosition()+`
1305
+ Expecting `+Zi.join(", ")+", got '"+(this.terminals_[gi]||gi)+"'":Ji="Parse error on line "+(ke+1)+": Unexpected "+(gi==Ne?"end of input":"'"+(this.terminals_[gi]||gi)+"'"),this.parseError(Ji,{text:oe.match,token:this.terminals_[gi]||gi,line:oe.yylineno,loc:Be,expected:Zi})}if(Qi[0]instanceof Array&&Qi.length>1)throw new Error("Parse Error: multiple actions possible at state: "+xe+", token: "+gi);switch(Qi[0]){case 1:It.push(gi),qt.push(oe.yytext),it.push(oe.yylloc),It.push(Qi[1]),gi=null,Re=oe.yyleng,lt=oe.yytext,ke=oe.yylineno,Be=oe.yylloc;break;case 2:if(yi=this.productions_[Qi[1]][1],Ni.$=qt[qt.length-yi],Ni._$={first_line:it[it.length-(yi||1)].first_line,last_line:it[it.length-1].last_line,first_column:it[it.length-(yi||1)].first_column,last_column:it[it.length-1].last_column},ba&&(Ni._$.range=[it[it.length-(yi||1)].range[0],it[it.length-1].range[1]]),wn=this.performAction.apply(Ni,[lt,Re,ke,_e.yy,Qi[1],qt,it].concat(Me)),typeof wn<"u")return wn;yi&&(It=It.slice(0,-1*yi*2),qt=qt.slice(0,-1*yi),it=it.slice(0,-1*yi)),It.push(this.productions_[Qi[1]][0]),qt.push(Ni.$),it.push(Ni._$),cr=Ce[It[It.length-2]][It[It.length-1]],It.push(cr);break;case 3:return!0}}return!0}},Ye=function(){var Zt={EOF:1,parseError:function(Et,It){if(this.yy.parser)this.yy.parser.parseError(Et,It);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,It=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 dt=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),It.length-1&&(this.yylineno-=It.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:It?(It.length===dt.length?this.yylloc.first_column:0)+dt[dt.length-It.length].length-It[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 It,dt,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))),dt=St[0].match(/(?:\r\n?|\n).*/g),dt&&(this.yylineno+=dt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:dt?dt[dt.length-1].length-dt[dt.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],It=this.performAction.call(this,this.yy,this,Et,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),It)return It;if(this._backtrack){for(var it in qt)this[it]=qt[it];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var St,Et,It,dt;this._more||(this.yytext="",this.match="");for(var qt=this._currentRules(),it=0;it<qt.length;it++)if(It=this._input.match(this.rules[qt[it]]),It&&(!Et||It[0].length>Et[0].length)){if(Et=It,dt=it,this.options.backtrack_lexer){if(St=this.test_match(It,qt[it]),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[dt]),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,It,dt,qt){switch(dt){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}();ri.lexer=Ye;function he(){this.yy={}}return he.prototype=ri,ri.Parser=he,new he}();Va.parser=Va;const _f=Va,Ef=t=>t.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/)!==null;let Rr=[],Is=[""],Ki="global",Nr="",jr=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Wn=[],Ko="",Qo=!1,Ya=4,za=2;var p1;const vf=function(){return p1},Cf=function(t){p1=Ze(t,M())},Tf=function(t,e,i){ii.parseDirective(this,t,e,i)},Sf=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=Wn.find(f=>f.from===e&&f.to===i);if(u?h=u:Wn.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[f,d]=Object.entries(s)[0];h[f]={text:d}}else h.techn={text:s};if(n==null)h.descr={text:""};else if(typeof n=="object"){let[f,d]=Object.entries(n)[0];h[f]={text:d}}else h.descr={text:n};if(typeof a=="object"){let[f,d]=Object.entries(a)[0];h[f]=d}else h.sprite=a;if(typeof o=="object"){let[f,d]=Object.entries(o)[0];h[f]=d}else h.tags=o;if(typeof l=="object"){let[f,d]=Object.entries(l)[0];h[f]=d}else h.link=l;h.wrap=Ds()},wf=function(t,e,i,r,s,n,a){if(e===null||i===null)return;let o={};const l=Rr.find(h=>h.alias===e);if(l&&e===l.alias?o=l:(o.alias=e,Rr.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=Ki,o.wrap=Ds()},Af=function(t,e,i,r,s,n,a,o){if(e===null||i===null)return;let l={};const h=Rr.find(u=>u.alias===e);if(h&&e===h.alias?l=h:(l.alias=e,Rr.push(l)),i==null?l.label={text:""}:l.label={text:i},r==null)l.techn={text:""};else if(typeof r=="object"){let[u,f]=Object.entries(r)[0];l[u]={text:f}}else l.techn={text:r};if(s==null)l.descr={text:""};else if(typeof s=="object"){let[u,f]=Object.entries(s)[0];l[u]={text:f}}else l.descr={text:s};if(typeof n=="object"){let[u,f]=Object.entries(n)[0];l[u]=f}else l.sprite=n;if(typeof a=="object"){let[u,f]=Object.entries(a)[0];l[u]=f}else l.tags=a;if(typeof o=="object"){let[u,f]=Object.entries(o)[0];l[u]=f}else l.link=o;l.wrap=Ds(),l.typeC4Shape={text:t},l.parentBoundary=Ki},Lf=function(t,e,i,r,s,n,a,o){if(e===null||i===null)return;let l={};const h=Rr.find(u=>u.alias===e);if(h&&e===h.alias?l=h:(l.alias=e,Rr.push(l)),i==null?l.label={text:""}:l.label={text:i},r==null)l.techn={text:""};else if(typeof r=="object"){let[u,f]=Object.entries(r)[0];l[u]={text:f}}else l.techn={text:r};if(s==null)l.descr={text:""};else if(typeof s=="object"){let[u,f]=Object.entries(s)[0];l[u]={text:f}}else l.descr={text:s};if(typeof n=="object"){let[u,f]=Object.entries(n)[0];l[u]=f}else l.sprite=n;if(typeof a=="object"){let[u,f]=Object.entries(a)[0];l[u]=f}else l.tags=a;if(typeof o=="object"){let[u,f]=Object.entries(o)[0];l[u]=f}else l.link=o;l.wrap=Ds(),l.typeC4Shape={text:t},l.parentBoundary=Ki},Bf=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=Ki,n.wrap=Ds(),Nr=Ki,Ki=t,Is.push(Nr)},If=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=Ki,n.wrap=Ds(),Nr=Ki,Ki=t,Is.push(Nr)},Df=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,f]=Object.entries(r)[0];l[u]={text:f}}else l.type={text:r};if(s==null)l.descr={text:""};else if(typeof s=="object"){let[u,f]=Object.entries(s)[0];l[u]={text:f}}else l.descr={text:s};if(typeof a=="object"){let[u,f]=Object.entries(a)[0];l[u]=f}else l.tags=a;if(typeof o=="object"){let[u,f]=Object.entries(o)[0];l[u]=f}else l.link=o;l.nodeType=t,l.parentBoundary=Ki,l.wrap=Ds(),Nr=Ki,Ki=e,Is.push(Nr)},Rf=function(){Ki=Nr,Is.pop(),Nr=Is.pop(),Is.push(Nr)},Nf=function(t,e,i,r,s,n,a,o,l,h,u){let f=Rr.find(d=>d.alias===e);if(!(f===void 0&&(f=jr.find(d=>d.alias===e),f===void 0))){if(i!=null)if(typeof i=="object"){let[d,p]=Object.entries(i)[0];f[d]=p}else f.bgColor=i;if(r!=null)if(typeof r=="object"){let[d,p]=Object.entries(r)[0];f[d]=p}else f.fontColor=r;if(s!=null)if(typeof s=="object"){let[d,p]=Object.entries(s)[0];f[d]=p}else f.borderColor=s;if(n!=null)if(typeof n=="object"){let[d,p]=Object.entries(n)[0];f[d]=p}else f.shadowing=n;if(a!=null)if(typeof a=="object"){let[d,p]=Object.entries(a)[0];f[d]=p}else f.shape=a;if(o!=null)if(typeof o=="object"){let[d,p]=Object.entries(o)[0];f[d]=p}else f.sprite=o;if(l!=null)if(typeof l=="object"){let[d,p]=Object.entries(l)[0];f[d]=p}else f.techn=l;if(h!=null)if(typeof h=="object"){let[d,p]=Object.entries(h)[0];f[d]=p}else f.legendText=h;if(u!=null)if(typeof u=="object"){let[d,p]=Object.entries(u)[0];f[d]=p}else f.legendSprite=u}},Of=function(t,e,i,r,s,n,a){const o=Wn.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)}},Ff=function(t,e,i){let r=Ya,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&&(Ya=r),s>=1&&(za=s)},Mf=function(){return Ya},Pf=function(){return za},Vf=function(){return Ki},Yf=function(){return Nr},g1=function(t){return t==null?Rr:Rr.filter(e=>e.parentBoundary===t)},zf=function(t){return Rr.find(e=>e.alias===t)},Wf=function(t){return Object.keys(g1(t))},Uf=function(t){return t==null?jr:jr.filter(e=>e.parentBoundary===t)},Zf=function(){return Wn},Hf=function(){return Ko},Gf=function(t){Qo=t},Ds=function(){return Qo},y1={addPersonOrSystem:wf,addPersonOrSystemBoundary:Bf,addContainer:Af,addContainerBoundary:If,addComponent:Lf,addDeploymentNode:Df,popBoundaryParseStack:Rf,addRel:Sf,updateElStyle:Nf,updateRelStyle:Of,updateLayoutConfig:Ff,autoWrap:Ds,setWrap:Gf,getC4ShapeArray:g1,getC4Shape:zf,getC4ShapeKeys:Wf,getBoundarys:Uf,getCurrentBoundaryParse:Vf,getParentBoundaryParse:Yf,getRels:Zf,getTitle:Hf,getC4Type:vf,getC4ShapeInRow:Mf,getC4BoundaryInRow:Pf,setAccTitle:nr,getAccTitle:fr,getAccDescription:gr,setAccDescription:pr,parseDirective:Tf,getConfig:()=>M().c4,clear:function(){Rr=[],jr=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Nr="",Ki="global",Is=[""],Wn=[],Is=[""],Ko="",Qo=!1,Ya=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){Ko=Ze(t,M())},setC4Type:Cf},Jo=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},m1=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,Hi.Nm)(n);a.attr("xlink:href",o)},jf=(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 d=r.append("line");d.attr("x1",n.startPoint.x),d.attr("y1",n.startPoint.y),d.attr("x2",n.endPoint.x),d.attr("y2",n.endPoint.y),d.attr("stroke-width","1"),d.attr("stroke",o),d.style("fill","none"),n.type!=="rel_b"&&d.attr("marker-end","url("+u+"#arrowhead)"),(n.type==="birel"||n.type==="rel_b")&&d.attr("marker-start","url("+u+"#arrowend)"),s=-1}else{let d=r.append("path");d.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"&&d.attr("marker-end","url("+u+"#arrowhead)"),(n.type==="birel"||n.type==="rel_b")&&d.attr("marker-start","url("+u+"#arrowend)")}let f=i.messageFont();ns(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},f),n.techn&&n.techn.text!==""&&(f=i.messageFont(),ns(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"},f))}},qf=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};Jo(r,l);let h=i.boundaryFont();h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=a,ns(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,ns(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,ns(i)(e.descr.text,r,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},h))},Xf=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=b1();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},Jo(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=sp(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":m1(l,48,48,e.x+e.width/2-24,e.y+e.image.Y,o);break}let f=i[e.typeC4Shape.text+"Font"]();return f.fontWeight="bold",f.fontSize=f.fontSize+2,f.fontColor=a,ns(i)(e.label.text,l,e.x,e.y+e.label.Y,e.width,e.height,{fill:a},f),f=i[e.typeC4Shape.text+"Font"](),f.fontColor=a,e.techn&&((r=e.techn)==null?void 0:r.text)!==""?ns(i)(e.techn.text,l,e.x,e.y+e.techn.Y,e.width,e.height,{fill:a,"font-style":"italic"},f):e.type&&e.type.text!==""&&ns(i)(e.type.text,l,e.x,e.y+e.type.Y,e.width,e.height,{fill:a,"font-style":"italic"},f),e.descr&&e.descr.text!==""&&(f=i.personFont(),f.fontColor=a,ns(i)(e.descr.text,l,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},f)),e.height},Kf=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")},Qf=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")},Jf=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")},$f=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")},tp=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")},ep=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")},ip=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)},rp=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")},b1=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},sp=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),ns=function(){function t(s,n,a,o,l,h,u){const f=n.append("text").attr("x",a+l/2).attr("y",o+h/2+5).style("text-anchor","middle").text(s);r(f,u)}function e(s,n,a,o,l,h,u,f){const{fontSize:d,fontFamily:p,fontWeight:k}=f,_=s.split(Jt.lineBreakRegex);for(let T=0;T<_.length;T++){const S=T*d-d*(_.length-1)/2,E=n.append("text").attr("x",a+l/2).attr("y",o).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",d).style("font-weight",k).style("font-family",p);E.append("tspan").attr("dy",S).text(_[T]).attr("alignment-baseline","mathematical"),r(E,u)}}function i(s,n,a,o,l,h,u,f){const d=n.append("switch"),k=d.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%");k.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(s),e(s,d,a,o,l,h,u,f),r(k,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:Jo,drawBoundary:qf,drawC4Shape:Xf,drawRels:jf,drawImage:m1,insertArrowHead:$f,insertArrowEnd:tp,insertArrowFilledHead:ep,insertDynamicNumber:ip,insertArrowCrossHead:rp,insertDatabaseIcon:Kf,insertComputerIcon:Qf,insertClockIcon:Jf,getNoteRect:b1,sanitizeUrl:Hi.Nm};let Wa=0,Ua=0,x1=4,$o=2;Va.yy=y1;let te={};class k1{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,tl(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>x1)&&(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},tl(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}}const tl=function(t){Di(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)},Un=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),Za=t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),np=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight});function Or(t,e,i,r,s){if(!e[t].width)if(i)e[t].text=Wc(e[t].text,s,r),e[t].textLines=e[t].text.split(Jt.lineBreakRegex).length,e[t].width=s,e[t].height=Po(e[t].text,r);else{let n=e[t].text.split(Jt.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=Po(o,r),e[t].height=e[t].height+a}}const _1=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=Za(te);s.fontSize=s.fontSize+2,s.fontWeight="bold";let n=Gr(e.label.text,s);Or("label",e,r,s,n),qr.drawBoundary(t,e,te)},E1=function(t,e,i,r){let s=0;for(const n of r){s=0;const a=i[n];let o=Un(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=Un(te,a.typeC4Shape.text);if(u.fontSize=u.fontSize+2,u.fontWeight="bold",Or("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=Un(te,a.typeC4Shape.text);Or("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=Un(te,a.techn.text);Or("techn",a,l,p,h),a.techn.Y=s+5,s=a.techn.Y+a.techn.height}let f=s,d=a.label.width;if(a.descr&&a.descr.text!==""){let p=Un(te,a.typeC4Shape.text);Or("descr",a,l,p,h),a.descr.Y=s+20,s=a.descr.Y+a.descr.height,d=Math.max(a.label.width,a.descr.width),f=s-a.descr.textLines*5}d=d+te.c4ShapePadding,a.width=Math.max(a.width||te.width,d,te.width),a.height=Math.max(a.height||te.height,f,te.height),a.margin=a.margin||te.c4ShapeMargin,t.insert(a),qr.drawC4Shape(e,a,te)}t.bumpLastMargin(te.c4ShapeMargin)};class Er{constructor(e,i){this.x=e,this.y=i}}let v1=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,f=t.height/t.width,d=null;return r==n&&i<s?d=new Er(i+t.width,o):r==n&&i>s?d=new Er(i,o):i==s&&r<n?d=new Er(a,r+t.height):i==s&&r>n&&(d=new Er(a,r)),i>s&&r<n?f>=u?d=new Er(i,o+u*t.width/2):d=new Er(a-l/h*t.height/2,r+t.height):i<s&&r<n?f>=u?d=new Er(i+t.width,o+u*t.width/2):d=new Er(a+l/h*t.height/2,r+t.height):i<s&&r>n?f>=u?d=new Er(i+t.width,o-u*t.width/2):d=new Er(a+t.height/2*l/h,r):i>s&&r>n&&(f>=u?d=new Er(i,o-t.width/2*u):d=new Er(a-t.height/2*l/h,r)),d},ap=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=v1(t,i);i.x=t.x+t.width/2,i.y=t.y+t.height/2;let s=v1(e,i);return{startPoint:r,endPoint:s}};const op=function(t,e,i,r){let s=0;for(let n of e){s=s+1;let a=n.wrap&&te.wrap,o=np(te);r.db.getC4Type()==="C4Dynamic"&&(n.label.text=s+": "+n.label.text);let h=Gr(n.label.text,o);Or("label",n,a,o,h),n.techn&&n.techn.text!==""&&(h=Gr(n.techn.text,o),Or("techn",n,a,o,h)),n.descr&&n.descr.text!==""&&(h=Gr(n.descr.text,o),Or("descr",n,a,o,h));let u=i(n.from),f=i(n.to),d=ap(u,f);n.startPoint=d.startPoint,n.endPoint=d.endPoint}qr.drawRels(t,e,te)};function C1(t,e,i,r,s){let n=new k1(s);n.data.widthLimit=i.data.widthLimit/Math.min($o,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=Za(te);if(u.fontSize=u.fontSize+2,u.fontWeight="bold",Or("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 k=Za(te);Or("type",o,h,k,n.data.widthLimit),o.type.Y=l+5,l=o.type.Y+o.type.height}if(o.descr&&o.descr.text!==""){let k=Za(te);k.fontSize=k.fontSize-2,Or("descr",o,h,k,n.data.widthLimit),o.descr.Y=l+20,l=o.descr.Y+o.descr.height}if(a==0||a%$o===0){let k=i.data.startx+te.diagramMarginX,_=i.data.stopy+te.diagramMarginY+l;n.setData(k,k,_,_)}else{let k=n.data.stopx!==n.data.startx?n.data.stopx+te.diagramMarginX:n.data.startx,_=n.data.starty;n.setData(k,k,_,_)}n.name=o.alias;let f=s.db.getC4ShapeArray(o.alias),d=s.db.getC4ShapeKeys(o.alias);d.length>0&&E1(n,t,f,d),e=o.alias;let p=s.db.getBoundarys(e);p.length>0&&C1(t,e,n,p,s),o.alias!=="global"&&_1(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),Wa=Math.max(Wa,i.data.stopx),Ua=Math.max(Ua,i.data.stopy)}}const T1={drawPersonOrSystemArray:E1,drawBoundary:_1,setConf:tl,draw:function(t,e,i,r){te=M().c4;const s=M().securityLevel;let n;s==="sandbox"&&(n=(0,J.Ys)("#i"+e));const a=s==="sandbox"?(0,J.Ys)(n.nodes()[0].contentDocument.body):(0,J.Ys)("body");let o=r.db;r.db.setWrap(te.wrap),x1=o.getC4ShapeInRow(),$o=o.getC4BoundaryInRow(),b.debug(`C:${JSON.stringify(te,null,2)}`);const l=s==="sandbox"?a.select(`[id="${e}"]`):(0,J.Ys)(`[id="${e}"]`);qr.insertComputerIcon(l),qr.insertDatabaseIcon(l),qr.insertClockIcon(l);let h=new k1(r);h.setData(te.diagramMarginX,te.diagramMarginX,te.diagramMarginY,te.diagramMarginY),h.data.widthLimit=screen.availWidth,Wa=te.diagramMarginX,Ua=te.diagramMarginY;const u=r.db.getTitle();let f=r.db.getBoundarys("");C1(l,"",h,f,r),qr.insertArrowHead(l),qr.insertArrowEnd(l),qr.insertArrowCrossHead(l),qr.insertArrowFilledHead(l),op(l,r.db.getRels(),r.db.getC4Shape,r),h.data.stopx=Wa,h.data.stopy=Ua;const d=h.data;let k=d.stopy-d.starty+2*te.diagramMarginY;const T=d.stopx-d.startx+2*te.diagramMarginX;u&&l.append("text").text(u).attr("x",(d.stopx-d.startx)/2-4*te.diagramMarginX).attr("y",d.starty+te.diagramMarginY),Br(l,k,T,te.useMaxWidth);const S=u?60:0;l.attr("viewBox",d.startx-te.diagramMarginX+" -"+(te.diagramMarginY+S)+" "+T+" "+(k+S)),b.debug("models:",d)}};var el=function(){var t=function(q,R,A,H){for(A=A||{},H=q.length;H--;A[q[H]]=R);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],f=[1,33],d=[1,34],p=[1,36],k=[1,39],_=[1,37],T=[1,38],S=[1,44],E=[1,45],I=[1,40],z=[1,41],Q=[1,42],ot=[1,43],Y=[1,48],O=[1,49],v=[1,50],L=[1,51],w=[16,25],m=[1,65],B=[1,66],g=[1,67],N=[1,68],y=[1,69],V=[1,70],wt=[1,71],nt=[1,80],rt=[16,25,32,45,46,54,60,61,62,63,64,65,66,71,73],st=[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],xt=[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(R,A,H,C,ft,x,Qt){var G=x.length-1;switch(ft){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(x[G],"type_directive");break;case 14:x[G]=x[G].trim().replace(/'/g,'"'),C.parseDirective(x[G],"arg_directive");break;case 15:C.parseDirective("}%%","close_directive","class");break;case 20:case 21:this.$=x[G];break;case 22:this.$=x[G-1]+x[G];break;case 23:case 24:this.$=x[G-1]+"~"+x[G];break;case 25:C.addRelation(x[G]);break;case 26:x[G-1].title=C.cleanupLabel(x[G]),C.addRelation(x[G-1]);break;case 35:this.$=x[G].trim(),C.setAccTitle(this.$);break;case 36:case 37:this.$=x[G].trim(),C.setAccDescription(this.$);break;case 38:C.addClass(x[G]);break;case 39:C.addClass(x[G-2]),C.setCssClass(x[G-2],x[G]);break;case 40:C.addClass(x[G-3]),C.addMembers(x[G-3],x[G-1]);break;case 41:C.addClass(x[G-5]),C.setCssClass(x[G-5],x[G-3]),C.addMembers(x[G-5],x[G-1]);break;case 42:C.addAnnotation(x[G],x[G-2]);break;case 43:this.$=[x[G]];break;case 44:x[G].push(x[G-1]),this.$=x[G];break;case 45:break;case 46:C.addMember(x[G-1],C.cleanupLabel(x[G]));break;case 47:break;case 48:break;case 49:this.$={id1:x[G-2],id2:x[G],relation:x[G-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:x[G-3],id2:x[G],relation:x[G-1],relationTitle1:x[G-2],relationTitle2:"none"};break;case 51:this.$={id1:x[G-3],id2:x[G],relation:x[G-2],relationTitle1:"none",relationTitle2:x[G-1]};break;case 52:this.$={id1:x[G-4],id2:x[G],relation:x[G-2],relationTitle1:x[G-3],relationTitle2:x[G-1]};break;case 53:C.addNote(x[G],x[G-1]);break;case 54:C.addNote(x[G]);break;case 55:this.$={type1:x[G-2],type2:x[G],lineType:x[G-1]};break;case 56:this.$={type1:"none",type2:x[G],lineType:x[G-1]};break;case 57:this.$={type1:x[G-1],type2:"none",lineType:x[G]};break;case 58:this.$={type1:"none",type2:"none",lineType:x[G]};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.$=x[G-2],C.setClickEvent(x[G-1],x[G]);break;case 67:case 73:this.$=x[G-3],C.setClickEvent(x[G-2],x[G-1]),C.setTooltip(x[G-2],x[G]);break;case 68:case 76:this.$=x[G-2],C.setLink(x[G-1],x[G]);break;case 69:this.$=x[G-3],C.setLink(x[G-2],x[G-1],x[G]);break;case 70:case 78:this.$=x[G-3],C.setLink(x[G-2],x[G-1]),C.setTooltip(x[G-2],x[G]);break;case 71:case 79:this.$=x[G-4],C.setLink(x[G-3],x[G-2],x[G]),C.setTooltip(x[G-3],x[G-1]);break;case 74:this.$=x[G-3],C.setClickEvent(x[G-2],x[G-1],x[G]);break;case 75:this.$=x[G-4],C.setClickEvent(x[G-3],x[G-2],x[G-1]),C.setTooltip(x[G-3],x[G]);break;case 77:this.$=x[G-3],C.setLink(x[G-2],x[G-1],x[G]);break;case 80:C.setCssClass(x[G-1],x[G]);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:f,43:d,44:p,49:k,51:_,52:T,55:S,57:E,67:I,68:z,70:Q,74:ot,88:Y,89:O,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:N,64:y,65:V,66:wt}),{27:72,28:46,29:47,88:Y,89:O,90:v,91:L},t(w,[2,47]),t(w,[2,48]),{28:73,88:Y,89:O,90:v},{27:74,28:46,29:47,88:Y,89:O,90:v,91:L},{27:75,28:46,29:47,88:Y,89:O,90:v,91:L},{27:76,28:46,29:47,88:Y,89:O,90:v,91:L},{54:[1,77]},{27:78,28:46,29:47,88:Y,89:O,90:v,91:L},{54:nt,56:79},t(rt,[2,20],{28:46,29:47,27:81,30:[1,82],88:Y,89:O,90:v,91:L}),t(rt,[2,21],{30:[1,83]}),t(st,[2,94]),t(st,[2,95]),t(st,[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:f,43:d,44:p,49:k,51:_,52:T,55:S,57:E,67:I,68:z,70:Q,74:ot,88:Y,89:O,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:Y,89:O,90:v,91:L},{53:88,58:63,59:64,60:m,61:B,62:g,63:N,64:y,65:V,66:wt},t(w,[2,46]),{59:89,65:V,66:wt},t(tt,[2,58],{58:90,60:m,61:B,62:g,63:N,64:y}),t(Tt,[2,59]),t(Tt,[2,60]),t(Tt,[2,61]),t(Tt,[2,62]),t(Tt,[2,63]),t(xt,[2,64]),t(xt,[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:Y,89:O,90:v},{54:nt,56:99},t(w,[2,54]),t(w,[2,98]),t(rt,[2,22]),t(rt,[2,23]),t(rt,[2,24]),{16:[1,100]},{25:[2,19]},t(Z,[2,49]),{27:101,28:46,29:47,88:Y,89:O,90:v,91:L},{27:102,28:46,29:47,54:[1,103],88:Y,89:O,90:v,91:L},t(tt,[2,57],{58:104,60:m,61:B,62:g,63:N,64:y}),t(tt,[2,56]),{28:105,88:Y,89:O,90:v},{47:106,51:jt},{27:108,28:46,29:47,88:Y,89:O,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:Y,89:O,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(R,A){if(A.recoverable)this.trace(R);else{var H=new Error(R);throw H.hash=A,H}},parse:function(R){var A=this,H=[0],C=[],ft=[null],x=[],Qt=this.table,G="",Nt=0,At=0,kt=2,yt=1,_t=x.slice.call(arguments,1),mt=Object.create(this.lexer),Ct={yy:{}};for(var Ge in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ge)&&(Ct.yy[Ge]=this.yy[Ge]);mt.setInput(R,Ct.yy),Ct.yy.lexer=mt,Ct.yy.parser=this,typeof mt.yylloc>"u"&&(mt.yylloc={});var De=mt.yylloc;x.push(De);var se=mt.options&&mt.options.ranges;typeof Ct.yy.parseError=="function"?this.parseError=Ct.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ee(){var it;return it=C.pop()||mt.lex()||yt,typeof it!="number"&&(it instanceof Array&&(C=it,it=C.pop()),it=A.symbols_[it]||it),it}for(var we,ri,Ye,he,Zt={},St,Et,It,dt;;){if(ri=H[H.length-1],this.defaultActions[ri]?Ye=this.defaultActions[ri]:((we===null||typeof we>"u")&&(we=ee()),Ye=Qt[ri]&&Qt[ri][we]),typeof Ye>"u"||!Ye.length||!Ye[0]){var qt="";dt=[];for(St in Qt[ri])this.terminals_[St]&&St>kt&&dt.push("'"+this.terminals_[St]+"'");mt.showPosition?qt="Parse error on line "+(Nt+1)+`:
1309
+ `+mt.showPosition()+`
1310
+ Expecting `+dt.join(", ")+", got '"+(this.terminals_[we]||we)+"'":qt="Parse error on line "+(Nt+1)+": Unexpected "+(we==yt?"end of input":"'"+(this.terminals_[we]||we)+"'"),this.parseError(qt,{text:mt.match,token:this.terminals_[we]||we,line:mt.yylineno,loc:De,expected:dt})}if(Ye[0]instanceof Array&&Ye.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ri+", token: "+we);switch(Ye[0]){case 1:H.push(we),ft.push(mt.yytext),x.push(mt.yylloc),H.push(Ye[1]),we=null,At=mt.yyleng,G=mt.yytext,Nt=mt.yylineno,De=mt.yylloc;break;case 2:if(Et=this.productions_[Ye[1]][1],Zt.$=ft[ft.length-Et],Zt._$={first_line:x[x.length-(Et||1)].first_line,last_line:x[x.length-1].last_line,first_column:x[x.length-(Et||1)].first_column,last_column:x[x.length-1].last_column},se&&(Zt._$.range=[x[x.length-(Et||1)].range[0],x[x.length-1].range[1]]),he=this.performAction.apply(Zt,[G,At,Nt,Ct.yy,Ye[1],ft,x].concat(_t)),typeof he<"u")return he;Et&&(H=H.slice(0,-1*Et*2),ft=ft.slice(0,-1*Et),x=x.slice(0,-1*Et)),H.push(this.productions_[Ye[1]][0]),ft.push(Zt.$),x.push(Zt._$),It=Qt[H[H.length-2]][H[H.length-1]],H.push(It);break;case 3:return!0}}return!0}},gt=function(){var q={EOF:1,parseError:function(A,H){if(this.yy.parser)this.yy.parser.parseError(A,H);else throw new Error(A)},setInput:function(R,A){return this.yy=A||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 A=R.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),R},unput:function(R){var A=R.length,H=R.split(/(?:\r\n?|\n)/g);this._input=R+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),H.length-1&&(this.yylineno-=H.length-1);var ft=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:H?(H.length===C.length?this.yylloc.first_column:0)+C[C.length-H.length].length-H[0].length:this.yylloc.first_column-A},this.options.ranges&&(this.yylloc.range=[ft[0],ft[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(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(),A=new Array(R.length+1).join("-");return R+this.upcomingInput()+`
1312
+ `+A+"^"},test_match:function(R,A){var H,C,ft;if(this.options.backtrack_lexer&&(ft={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&&(ft.yylloc.range=this.yylloc.range.slice(0))),C=R[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+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],H=this.performAction.call(this,this.yy,this,A,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),H)return H;if(this._backtrack){for(var x in ft)this[x]=ft[x];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var R,A,H,C;this._more||(this.yytext="",this.match="");for(var ft=this._currentRules(),x=0;x<ft.length;x++)if(H=this._input.match(this.rules[ft[x]]),H&&(!A||H[0].length>A[0].length)){if(A=H,C=x,this.options.backtrack_lexer){if(R=this.test_match(H,ft[x]),R!==!1)return R;if(this._backtrack){A=!1;continue}else return!1}else if(!this.options.flex)break}return A?(R=this.test_match(A,ft[C]),R!==!1?R:!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,H,C,ft){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 q}();U.lexer=gt;function $(){this.yy={}}return $.prototype=U,U.Parser=$,new $}();el.parser=el;const S1=el,lp=(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},cp=(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},il="classid-";let rl=[],di={},Ha=[],w1=0,Zn=[];const Hn=t=>Jt.sanitizeText(t,M()),hp=function(t,e,i){ii.parseDirective(this,t,e,i)},Gn=function(t){let e="",i=t;if(t.indexOf("~")>0){let r=t.split("~");i=r[0],e=Jt.sanitizeText(r[1],M())}return{className:i,type:e}},sl=function(t){let e=Gn(t);di[e.className]===void 0&&(di[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:il+e.className+"-"+w1},w1++)},A1=function(t){const e=Object.keys(di);for(const i of e)if(di[i].id===t)return di[i].domId},up=function(){rl=[],di={},Ha=[],Zn=[],Zn.push(B1),sr()},dp=function(t){return di[t]},fp=function(){return di},pp=function(){return rl},gp=function(){return Ha},yp=function(t){b.debug("Adding relation: "+JSON.stringify(t)),sl(t.id1),sl(t.id2),t.id1=Gn(t.id1).className,t.id2=Gn(t.id2).className,t.relationTitle1=Jt.sanitizeText(t.relationTitle1.trim(),M()),t.relationTitle2=Jt.sanitizeText(t.relationTitle2.trim(),M()),rl.push(t)},mp=function(t,e){const i=Gn(t).className;di[i].annotations.push(e)},L1=function(t,e){const i=Gn(t).className,r=di[i];if(typeof e=="string"){const s=e.trim();s.startsWith("<<")&&s.endsWith(">>")?r.annotations.push(Hn(s.substring(2,s.length-2))):s.indexOf(")")>0?r.methods.push(Hn(s)):s&&r.members.push(Hn(s))}},bp=function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(i=>L1(t,i)))},xp=function(t,e){const i={id:`note${Ha.length}`,class:e,text:t};Ha.push(i)},kp=function(t){return t.substring(0,1)===":"?Jt.sanitizeText(t.substr(1).trim(),M()):Hn(t.trim())},nl=function(t,e){t.split(",").forEach(function(i){let r=i;i[0].match(/\d/)&&(r=il+r),di[r]!==void 0&&di[r].cssClasses.push(e)})},_p=function(t,e){const i=M();t.split(",").forEach(function(r){e!==void 0&&(di[r].tooltip=Jt.sanitizeText(e,i))})},Ep=function(t){return di[t].tooltip},vp=function(t,e,i){const r=M();t.split(",").forEach(function(s){let n=s;s[0].match(/\d/)&&(n=il+n),di[n]!==void 0&&(di[n].link=me.formatUrl(e,r),r.securityLevel==="sandbox"?di[n].linkTarget="_top":typeof i=="string"?di[n].linkTarget=Hn(i):di[n].linkTarget="_blank")}),nl(t,"clickable")},Cp=function(t,e,i){t.split(",").forEach(function(r){Tp(r,e,i),di[r].haveCallback=!0}),nl(t,"clickable")},Tp=function(t,e,i){const r=M();let s=t,n=A1(s);if(r.securityLevel==="loose"&&e!==void 0&&di[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),Zn.push(function(){const o=document.querySelector(`[id="${n}"]`);o!==null&&o.addEventListener("click",function(){me.runFunc(e,...a)},!1)})}},Sp=function(t){Zn.forEach(function(e){e(t)})},wp={LINE:0,DOTTED_LINE:1},Ap={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},B1=function(t){let e=(0,J.Ys)(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=(0,J.Ys)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),(0,J.Ys)(t).select("svg").selectAll("g.node").on("mouseover",function(){const s=(0,J.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(/&lt;br\/&gt;/g,"<br/>")),s.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),(0,J.Ys)(this).classed("hover",!1)})};Zn.push(B1);let I1="TB";const gn={parseDirective:hp,setAccTitle:nr,getAccTitle:fr,getAccDescription:gr,setAccDescription:pr,getConfig:()=>M().class,addClass:sl,bindFunctions:Sp,clear:up,getClass:dp,getClasses:fp,getNotes:gp,addAnnotation:mp,addNote:xp,getRelations:pp,addRelation:yp,getDirection:()=>I1,setDirection:t=>{I1=t},addMember:L1,addMembers:bp,cleanupLabel:kp,lineType:wp,relationType:Ap,setClickEvent:Cp,setCssClass:nl,setLink:vp,getTooltip:Ep,setTooltip:_p,lookUpDomId:A1,setDiagramTitle:Ir,getDiagramTitle:Dr};let D1=0;const Lp=function(t,e,i,r,s){const n=function(E){switch(E){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(E=>!Number.isNaN(E.y));const a=e.points,o=(0,J.jvg)().x(function(E){return E.x}).y(function(E){return E.y}).curve(J.$0Z),l=t.append("path").attr("d",o(a)).attr("id","edge"+D1).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,f;const d=e.points.length;let p=me.calcLabelPosition(e.points);u=p.x,f=p.y;let k,_,T,S;if(d%2!==0&&d>1){let E=me.calcCardinalityPosition(i.relation.type1!=="none",e.points,e.points[0]),I=me.calcCardinalityPosition(i.relation.type2!=="none",e.points,e.points[d-1]);b.debug("cardinality_1_point "+JSON.stringify(E)),b.debug("cardinality_2_point "+JSON.stringify(I)),k=E.x,_=E.y,T=I.x,S=I.y}if(i.title!==void 0){const E=t.append("g").attr("class","classLabel"),I=E.append("text").attr("class","label").attr("x",u).attr("y",f).attr("fill","red").attr("text-anchor","middle").text(i.title);window.label=I;const z=I.node().getBBox();E.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)}b.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",k).attr("y",_).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),D1++},Bp=function(t,e,i,r){b.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(Q){const ot=o.append("tspan").text("\xAB"+Q+"\xBB");l||ot.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 f=o.node().getBBox().height,d=a.append("line").attr("x1",0).attr("y1",i.padding+f+i.dividerMargin/2).attr("y2",i.padding+f+i.dividerMargin/2),p=a.append("text").attr("x",i.padding).attr("y",f+i.dividerMargin+i.textHeight).attr("fill","white").attr("class","classText");l=!0,e.members.forEach(function(Q){R1(p,Q,l,i),l=!1});const k=p.node().getBBox(),_=a.append("line").attr("x1",0).attr("y1",i.padding+f+i.dividerMargin+k.height).attr("y2",i.padding+f+i.dividerMargin+k.height),T=a.append("text").attr("x",i.padding).attr("y",f+2*i.dividerMargin+k.height+i.textHeight).attr("fill","white").attr("class","classText");l=!0,e.methods.forEach(function(Q){R1(T,Q,l,i),l=!1});const S=a.node().getBBox();var E=" ";e.cssClasses.length>0&&(E=E+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",E).node().getBBox().width;return o.node().childNodes.forEach(function(Q){Q.setAttribute("x",(z-Q.getBBox().width)/2)}),e.tooltip&&o.insert("title").text(e.tooltip),d.attr("x2",z),_.attr("x2",z),n.width=z,n.height=S.height+i.padding+.5*i.dividerMargin,n},Ip=function(t,e,i,r){b.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(d){b.debug(`Adding line: ${d}`),o.append("tspan").text(d).attr("class","title").attr("dy",i.textHeight)});const h=a.node().getBBox(),f=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(d){d.setAttribute("x",(f-d.getBBox().width)/2)}),n.width=f,n.height=h.height+l.length*i.textHeight+i.padding+.5*i.dividerMargin,n},Ga=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?Dp(r):s?Rp(s):Np(t)},Dp=function(t){let e="",i="";try{let r=t[1]?t[1].trim():"",s=t[2]?t[2].trim():"",n=t[3]?Bi(t[3].trim()):"",a=t[4]?t[4].trim():"",o=t[5]?t[5].trim():"";i=r+s+n+" "+a,e=al(o)}catch{i=t}return{displayText:i,cssStyle:e}},Rp=function(t){let e="",i="";try{let r=t[1]?t[1].trim():"",s=t[2]?t[2].trim():"",n=t[3]?Bi(t[3].trim()):"",a=t[4]?t[4].trim():"",o=t[5]?" : "+Bi(t[5]).trim():"";i=r+s+"("+n+")"+o,e=al(a)}catch{i=t}return{displayText:i,cssStyle:e}},Np=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=al(t.substring(n+1,n+2)),e=a+o+"("+Bi(h.trim())+")",n<t.length&&(r=t.substring(n+2).trim(),r!==""&&(r=" : "+Bi(r),e+=r))}else e=Bi(t);return{displayText:e,cssStyle:i}},R1=function(t,e,i,r){let s=Ga(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)},al=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}},ol={drawClass:Bp,drawEdge:Lp,drawNote:Ip,parseMember:Ga};let ja={};const qa=20,jn=function(t){const e=Object.entries(ja).find(i=>i[1].label===t);if(e)return e[0]},Op=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")},Fp={draw:function(t,e,i,r){const s=M().class;ja={},b.info("Rendering diagram "+t);const n=M().securityLevel;let a;n==="sandbox"&&(a=(0,J.Ys)("#i"+e));const o=n==="sandbox"?(0,J.Ys)(a.nodes()[0].contentDocument.body):(0,J.Ys)("body"),l=o.select(`[id='${e}']`);Op(l);const h=new Gi.k({multigraph:!0});h.setGraph({isMultiGraph:!0}),h.setDefaultEdgeLabel(function(){return{}});const u=r.db.getClasses(),f=Object.keys(u);for(const E of f){const I=u[E],z=ol.drawClass(l,I,s,r);ja[z.id]=z,h.setNode(z.id,z),b.info("Org height: "+z.height)}r.db.getRelations().forEach(function(E){b.info("tjoho"+jn(E.id1)+jn(E.id2)+JSON.stringify(E)),h.setEdge(jn(E.id1),jn(E.id2),{relation:E},E.title||"DEFAULT")}),r.db.getNotes().forEach(function(E){b.debug(`Adding note: ${JSON.stringify(E)}`);const I=ol.drawNote(l,E,s,r);ja[I.id]=I,h.setNode(I.id,I),E.class&&E.class in u&&h.setEdge(E.id,jn(E.class),{relation:{id1:E.id,id2:E.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),(0,xs.bK)(h),h.nodes().forEach(function(E){E!==void 0&&h.node(E)!==void 0&&(b.debug("Node "+E+": "+JSON.stringify(h.node(E))),o.select("#"+(r.db.lookUpDomId(E)||E)).attr("transform","translate("+(h.node(E).x-h.node(E).width/2)+","+(h.node(E).y-h.node(E).height/2)+" )"))}),h.edges().forEach(function(E){E!==void 0&&h.edge(E)!==void 0&&(b.debug("Edge "+E.v+" -> "+E.w+": "+JSON.stringify(h.edge(E))),ol.drawEdge(l,h.edge(E),h.edge(E).relation,s,r))});const k=l.node().getBBox(),_=k.width+qa*2,T=k.height+qa*2;Br(l,T,_,s.useMaxWidth);const S=`${k.x-qa} ${k.y-qa} ${_} ${T}`;b.debug(`viewBox ${S}`),l.attr("viewBox",S)}},Mp=(t,e,i,r)=>{e.forEach(s=>{Pp[s](t,i,r)})},Pp={extension:(t,e,i)=>{b.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")}},N1=Mp;function Vp(t,e){e&&t.attr("style",e)}function Yp(t){const e=(0,J.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>"),Vp(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 or=(t,e,i,r)=>{let s=t||"";if(typeof s=="object"&&(s=s[0]),Je(M().flowchart.htmlLabels)){s=s.replace(/\\n|\n/g,"<br />"),b.info("vertexText"+s);const n={isNode:r,label:uc(s).replace(/fa[blrs]?:fa-[\w-]+/g,o=>`<i class='${o.replace(":"," ")}'></i>`),labelStyle:e.replace("fill:","color:")};return Yp(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(or(Ze(uc(o),M()),e.labelStyle,!1,r));let h=l.getBBox();if(Je(M().flowchart.htmlLabels)){const f=l.children[0],d=(0,J.Ys)(l);h=f.getBoundingClientRect(),d.attr("width",h.width),d.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}},fi=(t,e)=>{const i=e.node().getBBox();t.width=i.width,t.height=i.height};function as(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={},Fr={},O1={};const zp=()=>{Fr={},O1={},Ve={}},Xa=(t,e)=>(b.trace("In isDecendant",e," ",t," = ",Fr[e].includes(t)),!!Fr[e].includes(t)),Wp=(t,e)=>(b.info("Decendants of ",e," is ",Fr[e]),b.info("Edge is ",t),t.v===e||t.w===e?!1:Fr[e]?Fr[e].includes(t.v)||Xa(t.v,e)||Xa(t.w,e)||Fr[e].includes(t.w):(b.debug("Tilt, ",e,",not in decendants"),!1)),F1=(t,e,i,r)=>{b.warn("Copying children of ",t,"root",r,"data",e.node(t),r);const s=e.children(t)||[];t!==r&&s.push(t),b.warn("Copying (nodes) clusterId",t,"nodes",s),s.forEach(n=>{if(e.children(n).length>0)F1(n,e,i,r);else{const a=e.node(n);b.info("cp ",n," to ",r," with parent ",t),i.setNode(n,a),r!==e.parent(n)&&(b.warn("Setting parent",n,e.parent(n)),i.setParent(n,e.parent(n))),t!==r&&n!==t?(b.debug("Setting parent",n,t),i.setParent(n,t)):(b.info("In copy ",t,"root",r,"data",e.node(t),r),b.debug("Not Setting parent for node=",n,"cluster!==rootId",t!==r,"node!==clusterId",n!==t));const o=e.edges(n);b.debug("Copying Edges",o),o.forEach(l=>{b.info("Edge",l);const h=e.edge(l.v,l.w,l.name);b.info("Edge data",h,r);try{Wp(l,r)?(b.info("Copying as ",l.v,l.w,h,l.name),i.setEdge(l.v,l.w,h,l.name),b.info("newGraph edges ",i.edges(),i.edge(i.edges()[0]))):b.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",r," clusterId:",t)}catch(u){b.error(u)}})}b.debug("Removing node",n),e.removeNode(n)})},M1=(t,e)=>{const i=e.children(t);let r=[...i];for(const s of i)O1[s]=t,r=[...r,...M1(s,e)];return r},qn=(t,e)=>{b.trace("Searching",t);const i=e.children(t);if(b.trace("Searching children of id ",t,i),i.length<1)return b.trace("This is a valid node",t),t;for(const r of i){const s=qn(r,e);if(s)return b.trace("Found replacement for",t," => ",s),s}},Ka=t=>!Ve[t]||!Ve[t].externalConnections?t:Ve[t]?Ve[t].id:t,Up=(t,e)=>{if(!t||e>10){b.debug("Opting out, no graph ");return}else b.debug("Opting in, graph ");t.nodes().forEach(function(i){t.children(i).length>0&&(b.warn("Cluster identified",i," Replacement id in edges: ",qn(i,t)),Fr[i]=M1(i,t),Ve[i]={id:qn(i,t),clusterData:t.node(i)})}),t.nodes().forEach(function(i){const r=t.children(i),s=t.edges();r.length>0?(b.debug("Cluster identified",i,Fr),s.forEach(n=>{if(n.v!==i&&n.w!==i){const a=Xa(n.v,i),o=Xa(n.w,i);a^o&&(b.warn("Edge: ",n," leaves cluster ",i),b.warn("Decendants of XXX ",i,": ",Fr[i]),Ve[i].externalConnections=!0)}})):b.debug("Not a cluster ",i,Fr)}),t.edges().forEach(function(i){const r=t.edge(i);b.warn("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(i)),b.warn("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(t.edge(i)));let s=i.v,n=i.w;if(b.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]){b.warn("Fixing and trixing link to self - removing XXX",i.v,i.w,i.name),b.warn("Fixing and trixing - removing XXX",i.v,i.w,i.name),s=Ka(i.v),n=Ka(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])&&(b.warn("Fixing and trixing - removing XXX",i.v,i.w,i.name),s=Ka(i.v),n=Ka(i.w),t.removeEdge(i.v,i.w,i.name),s!==i.v&&(r.fromCluster=i.v),n!==i.w&&(r.toCluster=i.w),b.warn("Fix Replacing with XXX",s,n,i.name),t.setEdge(s,n,r,i.name))}),b.warn("Adjusted Graph",xr.c(t)),P1(t,0),b.trace(Ve)},P1=(t,e)=>{if(b.warn("extractor - ",e,xr.c(t),t.children("D")),e>10){b.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){b.debug("Done, no node has children",t.nodes());return}b.debug("Nodes = ",i,e);for(const s of i)if(b.debug("Extracting node",s,Ve,Ve[s]&&!Ve[s].externalConnections,!t.parent(s),t.node(s),t.children("D")," Depth ",e),!Ve[s])b.debug("Not a cluster",s,e);else if(!Ve[s].externalConnections&&t.children(s)&&t.children(s).length>0){b.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,b.warn("Fixing dir",Ve[s].clusterData.dir,a));const o=new Gi.k({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});b.warn("Old graph before copy",xr.c(t)),F1(s,t,o,s),t.setNode(s,{clusterNode:!0,id:s,clusterData:Ve[s].clusterData,labelText:Ve[s].labelText,graph:o}),b.warn("New graph after copy node: (",s,")",xr.c(o)),b.debug("Old graph after copy",xr.c(t))}else b.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),b.debug(Ve);i=t.nodes(),b.warn("New list of nodes",i);for(const s of i){const n=t.node(s);b.warn(" Now next level",s,n),n.clusterNode&&P1(n.graph,e+1)}},V1=(t,e)=>{if(e.length===0)return[];let i=Object.assign(e);return e.forEach(r=>{const s=t.children(r),n=V1(t,s);i=[...i,...n]}),i},Zp=t=>V1(t,t.children());function Hp(t,e){return t.intersect(e)}function Y1(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 Gp(t,e,i){return Y1(t,e,e,i)}function jp(t,e,i,r){var s,n,a,o,l,h,u,f,d,p,k,_,T,S,E;if(s=e.y-t.y,a=t.x-e.x,l=e.x*t.y-t.x*e.y,d=s*i.x+a*i.y+l,p=s*r.x+a*r.y+l,!(d!==0&&p!==0&&z1(d,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,f=n*e.x+o*e.y+h,!(u!==0&&f!==0&&z1(u,f))&&(k=s*o-n*a,k!==0)))return _=Math.abs(k/2),T=a*h-o*l,S=T<0?(T-_)/k:(T+_)/k,T=n*l-s*h,E=T<0?(T-_)/k:(T+_)/k,{x:S,y:E}}function z1(t,e){return t*e>0}function qp(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(k){a=Math.min(a,k.x),o=Math.min(o,k.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 f=e[u],d=e[u<e.length-1?u+1:0],p=jp(t,i,{x:l+f.x,y:h+f.y},{x:l+d.x,y:h+d.y});p&&n.push(p)}return n.length?(n.length>1&&n.sort(function(k,_){var T=k.x-i.x,S=k.y-i.y,E=Math.sqrt(T*T+S*S),I=_.x-i.x,z=_.y-i.y,Q=Math.sqrt(I*I+z*z);return E<Q?-1:E===Q?0:1}),n[0]):t}const Xn=(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:Hp,circle:Gp,ellipse:Y1,polygon:qp,rect:Xn},Xp=(t,e)=>{const{shapeSvg:i,bbox:r,halfPadding:s}=zi(t,e,"node "+e.classes,!0);b.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),fi(e,n),e.intersect=function(a){return hi.rect(e,a)},i},W1=(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}];b.info("Question main (Circle)");const l=as(i,a,a,o);return l.attr("style",e.style),fi(e,l),e.intersect=function(h){return b.warn("Intersect called"),hi.polygon(e,o,h)},i},Kp=(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},Qp=(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=as(i,o,n,l);return h.attr("style",e.style),fi(e,h),e.intersect=function(u){return hi.polygon(e,l,u)},i},Jp=(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 as(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},$p=(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=as(i,s,n,a);return o.attr("style",e.style),fi(e,o),e.intersect=function(l){return hi.polygon(e,a,l)},i},tg=(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=as(i,s,n,a);return o.attr("style",e.style),fi(e,o),e.intersect=function(l){return hi.polygon(e,a,l)},i},eg=(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=as(i,s,n,a);return o.attr("style",e.style),fi(e,o),e.intersect=function(l){return hi.polygon(e,a,l)},i},ig=(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=as(i,s,n,a);return o.attr("style",e.style),fi(e,o),e.intersect=function(l){return hi.polygon(e,a,l)},i},rg=(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=as(i,s,n,a);return o.attr("style",e.style),fi(e,o),e.intersect=function(l){return hi.polygon(e,a,l)},i},sg=(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 fi(e,h),e.intersect=function(u){const f=hi.rect(e,u),d=f.x-e.x;if(n!=0&&(Math.abs(d)<e.width/2||Math.abs(d)==e.width/2&&Math.abs(f.y-e.y)>e.height/2-a)){let p=a*a*(1-d*d/(n*n));p!=0&&(p=Math.sqrt(p)),p=a-p,u.y-e.y>0&&(p=-p),f.y+=p}return f},i},ng=(t,e)=>{const{shapeSvg:i,bbox:r,halfPadding:s}=zi(t,e,"node "+e.classes,!0);b.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&&(U1(n,e.props.borders,a,o),l.delete("borders")),l.forEach(h=>{b.warn(`Unknown node property ${h}`)})}return fi(e,n),e.intersect=function(l){return hi.rect(e,l)},i},ag=(t,e)=>{const{shapeSvg:i}=zi(t,e,"label",!0);b.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&&(U1(r,e.props.borders,s,n),a.delete("borders")),a.forEach(o=>{b.warn(`Unknown node property ${o}`)})}return fi(e,r),e.intersect=function(a){return hi.rect(e,a)},i};function U1(t,e,i,r){const s=[],n=o=>{s.push(o,0)},a=o=>{s.push(0,o)};e.includes("t")?(b.debug("add top border"),n(i)):a(i),e.includes("r")?(b.debug("add right border"),n(r)):a(r),e.includes("b")?(b.debug("add bottom border"),n(i)):a(i),e.includes("l")?(b.debug("add left border"),n(r)):a(r),t.attr("stroke-dasharray",s.join(" "))}const og=(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,b.info("Label text abc79",l,o,typeof o=="object");const h=a.node().appendChild(or(l,e.labelStyle,!0,!0));let u={width:0,height:0};if(Je(M().flowchart.htmlLabels)){const _=h.children[0],T=(0,J.Ys)(h);u=_.getBoundingClientRect(),T.attr("width",u.width),T.attr("height",u.height)}b.info("Text 2",o);const f=o.slice(1,o.length);let d=h.getBBox();const p=a.node().appendChild(or(f.join?f.join("<br/>"):f,e.labelStyle,!0,!0));if(Je(M().flowchart.htmlLabels)){const _=p.children[0],T=(0,J.Ys)(p);u=_.getBoundingClientRect(),T.attr("width",u.width),T.attr("height",u.height)}const k=e.padding/2;return(0,J.Ys)(p).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+k+5)+")"),(0,J.Ys)(h).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=a.node().getBBox(),a.attr("transform","translate("+-u.width/2+", "+(-u.height/2-k+3)+")"),s.attr("class","outer title-state").attr("x",-u.width/2-k).attr("y",-u.height/2-k).attr("width",u.width+e.padding).attr("height",u.height+e.padding),n.attr("class","divider").attr("x1",-u.width/2-k).attr("x2",u.width/2+k).attr("y1",-u.height/2-k+d.height+k).attr("y2",-u.height/2-k+d.height+k),fi(e,s),e.intersect=function(_){return hi.rect(e,_)},r},lg=(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 fi(e,a),e.intersect=function(o){return hi.rect(e,o)},i},cg=(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),b.info("Circle main"),fi(e,n),e.intersect=function(a){return b.info("Circle intersect",e,r.width/2+s,a),hi.circle(e,r.width/2+s,a)},i},hg=(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),b.info("DoubleCircle main"),fi(e,o),e.intersect=function(h){return b.info("DoubleCircle intersect",e,r.width/2+s+n,h),hi.circle(e,r.width/2+s+n,h)},i},ug=(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=as(i,s,n,a);return o.attr("style",e.style),fi(e,o),e.intersect=function(l){return hi.polygon(e,a,l)},i},dg=(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),fi(e,r),e.intersect=function(s){return hi.circle(e,7,s)},i},Z1=(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 fi(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},H1={rhombus:W1,question:W1,rect:ng,labelRect:ag,rectWithTitle:og,choice:Kp,circle:cg,doublecircle:hg,stadium:lg,hexagon:Qp,rect_left_inv_arrow:Jp,lean_right:$p,lean_left:tg,trapezoid:eg,inv_trapezoid:ig,rect_right_inv_arrow:rg,cylinder:sg,start:dg,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),fi(e,s),e.intersect=function(n){return hi.circle(e,7,n)},i},note:Xp,subroutine:ug,fork:Z1,join:Z1,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,f=r;const d=a.insert("g").attr("class","label");let p=0;const k=e.classData.annotations&&e.classData.annotations[0],_=e.classData.annotations[0]?"\xAB"+e.classData.annotations[0]+"\xBB":"",T=d.node().appendChild(or(_,e.labelStyle,!0,!0));let S=T.getBBox();if(Je(M().flowchart.htmlLabels)){const O=T.children[0],v=(0,J.Ys)(T);S=O.getBoundingClientRect(),v.attr("width",S.width),v.attr("height",S.height)}e.classData.annotations[0]&&(f+=S.height+r,u+=S.width);let E=e.classData.id;e.classData.type!==void 0&&e.classData.type!==""&&(M().flowchart.htmlLabels?E+="&lt;"+e.classData.type+"&gt;":E+="<"+e.classData.type+">");const I=d.node().appendChild(or(E,e.labelStyle,!0,!0));(0,J.Ys)(I).attr("class","classTitle");let z=I.getBBox();if(Je(M().flowchart.htmlLabels)){const O=I.children[0],v=(0,J.Ys)(I);z=O.getBoundingClientRect(),v.attr("width",z.width),v.attr("height",z.height)}f+=z.height+r,z.width>u&&(u=z.width);const Q=[];e.classData.members.forEach(O=>{const v=Ga(O);let L=v.displayText;M().flowchart.htmlLabels&&(L=L.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const w=d.node().appendChild(or(L,v.cssStyle?v.cssStyle:e.labelStyle,!0,!0));let m=w.getBBox();if(Je(M().flowchart.htmlLabels)){const B=w.children[0],g=(0,J.Ys)(w);m=B.getBoundingClientRect(),g.attr("width",m.width),g.attr("height",m.height)}m.width>u&&(u=m.width),f+=m.height+r,Q.push(w)}),f+=s;const ot=[];if(e.classData.methods.forEach(O=>{const v=Ga(O);let L=v.displayText;M().flowchart.htmlLabels&&(L=L.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const w=d.node().appendChild(or(L,v.cssStyle?v.cssStyle:e.labelStyle,!0,!0));let m=w.getBBox();if(Je(M().flowchart.htmlLabels)){const B=w.children[0],g=(0,J.Ys)(w);m=B.getBoundingClientRect(),g.attr("width",m.width),g.attr("height",m.height)}m.width>u&&(u=m.width),f+=m.height+r,ot.push(w)}),f+=s,k){let O=(u-S.width)/2;(0,J.Ys)(T).attr("transform","translate( "+(-1*u/2+O)+", "+-1*f/2+")"),p=S.height+r}let Y=(u-z.width)/2;return(0,J.Ys)(I).attr("transform","translate( "+(-1*u/2+Y)+", "+(-1*f/2+p)+")"),p+=z.height+r,l.attr("class","divider").attr("x1",-u/2-i).attr("x2",u/2+i).attr("y1",-f/2-i+s+p).attr("y2",-f/2-i+s+p),p+=s,Q.forEach(O=>{(0,J.Ys)(O).attr("transform","translate( "+-u/2+", "+(-1*f/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",-f/2-i+s+p).attr("y2",-f/2-i+s+p),p+=s,ot.forEach(O=>{(0,J.Ys)(O).attr("transform","translate( "+-u/2+", "+(-1*f/2+p)+")"),p+=z.height+r}),o.attr("class","outer title-state").attr("x",-u/2-i).attr("y",-(f/2)-i).attr("width",u+e.padding).attr("height",f+e.padding),fi(e,o),e.intersect=function(O){return hi.rect(e,O)},a}};let yn={};const G1=(t,e,i)=>{let r,s;if(e.link){let n;M().securityLevel==="sandbox"?n="_top":e.linkTarget&&(n=e.linkTarget||"_blank"),r=t.insert("svg:a").attr("xlink:href",e.link).attr("target",n),s=H1[e.shape](r,e,i)}else s=H1[e.shape](t,e,i),r=s;return e.tooltip&&s.attr("title",e.tooltip),e.class&&s.attr("class","node default "+e.class),yn[e.id]=r,e.haveCallback&&yn[e.id].attr("class",yn[e.id].attr("class")+" clickable"),r},fg=(t,e)=>{yn[e.id]=t},pg=()=>{yn={}},j1=t=>{const e=yn[t.id];b.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},gg={rect:(t,e)=>{b.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(or(e.labelText,e.labelStyle,void 0,!0));let a=n.getBBox();if(Je(M().flowchart.htmlLabels)){const f=n.children[0],d=(0,J.Ys)(n);a=f.getBoundingClientRect(),d.attr("width",a.width),d.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,b.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(f){return Xn(e,f)},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(or(e.labelText,e.labelStyle,void 0,!0));let o=a.getBBox();if(Je(M().flowchart.htmlLabels)){const d=a.children[0],p=(0,J.Ys)(a);o=d.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+(Je(M().flowchart.htmlLabels)?5:3))+")");const f=r.node().getBBox();return e.height=f.height,e.intersect=function(d){return Xn(e,d)},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 Xn(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 Xn(e,o)},i}};let q1={};const yg=(t,e)=>{b.trace("Inserting cluster");const i=e.shape||"rect";q1[e.id]=gg[i](t,e)},mg=()=>{q1={}};let Qa={},Pi={};const bg=()=>{Qa={},Pi={}},X1=(t,e)=>{const i=or(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(Je(M().flowchart.htmlLabels)){const o=i.children[0],l=(0,J.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+")"),Qa[e.id]=r,e.width=n.width,e.height=n.height;let a;if(e.startLabelLeft){const o=or(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,Ja(a,e.startLabelLeft)}if(e.startLabelRight){const o=or(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,Ja(a,e.startLabelRight)}if(e.endLabelLeft){const o=or(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,Ja(a,e.endLabelLeft)}if(e.endLabelRight){const o=or(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,Ja(a,e.endLabelRight)}return i};function Ja(t,e){M().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}const xg=(t,e)=>{b.info("Moving label abc78 ",t.id,t.label,Qa[t.id]);let i=e.updatedPath?e.updatedPath:e.originalPath;if(t.label){const r=Qa[t.id];let s=t.x,n=t.y;if(i){const a=me.calcLabelPosition(i);b.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=me.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=me.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=me.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=me.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",i);s=a.x,n=a.y}r.attr("transform","translate("+s+", "+n+")")}},kg=(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},_g=(t,e,i)=>{b.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 f=i.y<e.y?e.y-l-s:s-l-e.y;o=u*f/h;const d={x:i.x<e.x?i.x+o:i.x-u+o,y:i.y<e.y?i.y+h-f:i.y-h+f};return o===0&&(d.x=e.x,d.y=e.y),u===0&&(d.x=e.x),h===0&&(d.y=e.y),b.warn(`abc89 topp/bott calc, Q ${h}, q ${f}, R ${u}, r ${o}`,d),d}else{i.x<e.x?o=e.x-a-r:o=r-a-e.x;let f=h*o/u,d=i.x<e.x?i.x+u-o:i.x-u+o,p=i.y<e.y?i.y+f:i.y-f;return b.warn(`sides calc abc89, Q ${h}, q ${f}, R ${u}, r ${o}`,{_x:d,_y:p}),o===0&&(d=e.x,p=e.y),u===0&&(d=e.x),h===0&&(p=e.y),{x:d,y:p}}},K1=(t,e)=>{b.warn("abc88 cutPathAtIntersect",t,e);let i=[],r=t[0],s=!1;return t.forEach(n=>{if(b.info("abc88 checking point",n,e),!kg(e,n)&&!s){const a=_g(e,r,n);b.warn("abc88 inside",n,r,a),b.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)?b.warn("abc88 no intersect",a,i):i.push(a),s=!0}else b.warn("abc88 outside",n,r),r=n,s||i.push(n)}),b.warn("abc88 returning points",i),i},Eg=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);b.info("abc88 InsertEdge: ",i),h.intersect&&l.intersect&&(a=a.slice(1,i.points.length-1),a.unshift(l.intersect(a[0])),b.info("Last point",a[a.length-1],h,h.intersect(a[a.length-1])),a.push(h.intersect(a[a.length-1]))),i.toCluster&&(b.info("to cluster abc88",r[i.toCluster]),a=K1(i.points,r[i.toCluster].node),o=!0),i.fromCluster&&(b.info("from cluster abc88",r[i.fromCluster]),a=K1(a.reverse(),r[i.fromCluster].node).reverse(),o=!0);const u=a.filter(S=>!Number.isNaN(S.y));let f;s==="graph"||s==="flowchart"?f=i.curve||J.$0Z:f=J.$0Z;const d=(0,J.jvg)().x(function(S){return S.x}).y(function(S){return S.y}).curve(f);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 k=t.append("path").attr("d",d(u)).attr("id",i.id).attr("class"," "+p+(i.classes?" "+i.classes:"")).attr("style",i.style);let _="";switch((M().flowchart.arrowMarkerAbsolute||M().state.arrowMarkerAbsolute)&&(_=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,_=_.replace(/\(/g,"\\("),_=_.replace(/\)/g,"\\)")),b.info("arrowTypeStart",i.arrowTypeStart),b.info("arrowTypeEnd",i.arrowTypeEnd),i.arrowTypeStart){case"arrow_cross":k.attr("marker-start","url("+_+"#"+s+"-crossStart)");break;case"arrow_point":k.attr("marker-start","url("+_+"#"+s+"-pointStart)");break;case"arrow_barb":k.attr("marker-start","url("+_+"#"+s+"-barbStart)");break;case"arrow_circle":k.attr("marker-start","url("+_+"#"+s+"-circleStart)");break;case"aggregation":k.attr("marker-start","url("+_+"#"+s+"-aggregationStart)");break;case"extension":k.attr("marker-start","url("+_+"#"+s+"-extensionStart)");break;case"composition":k.attr("marker-start","url("+_+"#"+s+"-compositionStart)");break;case"dependency":k.attr("marker-start","url("+_+"#"+s+"-dependencyStart)");break;case"lollipop":k.attr("marker-start","url("+_+"#"+s+"-lollipopStart)");break}switch(i.arrowTypeEnd){case"arrow_cross":k.attr("marker-end","url("+_+"#"+s+"-crossEnd)");break;case"arrow_point":k.attr("marker-end","url("+_+"#"+s+"-pointEnd)");break;case"arrow_barb":k.attr("marker-end","url("+_+"#"+s+"-barbEnd)");break;case"arrow_circle":k.attr("marker-end","url("+_+"#"+s+"-circleEnd)");break;case"aggregation":k.attr("marker-end","url("+_+"#"+s+"-aggregationEnd)");break;case"extension":k.attr("marker-end","url("+_+"#"+s+"-extensionEnd)");break;case"composition":k.attr("marker-end","url("+_+"#"+s+"-compositionEnd)");break;case"dependency":k.attr("marker-end","url("+_+"#"+s+"-dependencyEnd)");break;case"lollipop":k.attr("marker-end","url("+_+"#"+s+"-lollipopEnd)");break}let T={};return o&&(T.updatedPath=a),T.originalPath=i.points,T},Q1=(t,e,i,r)=>{b.info("Graph in recursive render: XXX",xr.c(e),r);const s=e.graph().rankdir;b.trace("Dir in recursive render - dir:",s);const n=t.insert("g").attr("class","root");e.nodes()?b.info("Recursive render XXX",e.nodes()):b.info("No nodes found for",e),e.edges().length>0&&b.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(f){const d=e.node(f);if(r!==void 0){const p=JSON.parse(JSON.stringify(r.clusterData));b.info("Setting data for cluster XXX (",f,") ",p,r),e.setNode(r.id,p),e.parent(f)||(b.trace("Setting parent",f,r.id),e.setParent(f,r.id,p))}if(b.info("(Insert) Node XXX"+f+": "+JSON.stringify(e.node(f))),d&&d.clusterNode){b.info("Cluster identified",f,d.width,e.node(f));const p=Q1(h,d.graph,i,e.node(f)),k=p.elem;fi(d,k),d.diff=p.diff||0,b.info("Node bounds (abc123)",f,d,d.width,d.x,d.y),fg(k,d),b.warn("Recursive render complete ",k,d)}else e.children(f).length>0?(b.info("Cluster - the non recursive path XXX",f,d.id,d,e),b.info(qn(d.id,e)),Ve[d.id]={id:qn(d.id,e),node:d}):(b.info("Node - the non recursive path",f,d.id,d),G1(h,e.node(f),s))}),e.edges().forEach(function(f){const d=e.edge(f.v,f.w,f.name);b.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(f)),b.info("Edge "+f.v+" -> "+f.w+": ",f," ",JSON.stringify(e.edge(f))),b.info("Fix",Ve,"ids:",f.v,f.w,"Translateing: ",Ve[f.v],Ve[f.w]),X1(l,d)}),e.edges().forEach(function(f){b.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(f))}),b.info("#############################################"),b.info("### Layout ###"),b.info("#############################################"),b.info(e),(0,xs.bK)(e),b.info("Graph after layout:",xr.c(e));let u=0;return Zp(e).forEach(function(f){const d=e.node(f);b.info("Position "+f+": "+JSON.stringify(e.node(f))),b.info("Position "+f+": ("+d.x,","+d.y,") width: ",d.width," height: ",d.height),d&&d.clusterNode?j1(d):e.children(f).length>0?(yg(a,d),Ve[d.id].node=d):j1(d)}),e.edges().forEach(function(f){const d=e.edge(f);b.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(d),d);const p=Eg(o,f,d,Ve,i,e);xg(d,p)}),e.nodes().forEach(function(f){const d=e.node(f);b.info(f,d.type,d.diff),d.type==="group"&&(u=d.diff)}),{elem:n,diff:u}},ll=(t,e,i,r,s)=>{N1(t,i,r,s),pg(),bg(),mg(),zp(),b.warn("Graph at first:",xr.c(e)),Up(e),b.warn("Graph after:",xr.c(e)),Q1(t,e,r)},J1=t=>Jt.sanitizeText(t,M());let $1={dividerMargin:10,padding:5,textHeight:10};const vg=function(t,e,i,r){const s=Object.keys(t);b.info("keys:",s),b.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,f="";switch(a.type){case"class":f="class_box";break;default:f="class_box"}e.setNode(a.id,{labelStyle:l.labelStyle,shape:f,labelText:J1(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:M().flowchart.padding}),b.info("setNode",{labelStyle:l.labelStyle,shape:f,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:M().flowchart.padding})})},Cg=function(t,e,i,r){b.info(t),t.forEach(function(s,n){const a=s;let o="";const l={labelStyle:"",style:""};let h=a.text,u=0,f="note";if(e.setNode(a.id,{labelStyle:l.labelStyle,shape:f,labelText:J1(h),noteData:a,rx:u,ry:u,class:o,style:l.style,id:a.id,domId:a.id,tooltip:"",type:"note",padding:M().flowchart.padding}),b.info("setNode",{labelStyle:l.labelStyle,shape:f,labelText:h,rx:u,ry:u,style:l.style,id:a.id,type:"note",padding:M().flowchart.padding}),!a.class||!(a.class in r))return;const d=i+n,p={};p.classes="relation",p.pattern="dotted",p.id=`edgeNote${d}`,p.arrowhead="none",b.info(`Note edge: ${JSON.stringify(p)}, ${JSON.stringify(a)}`),p.startLabelRight="",p.endLabelLeft="",p.arrowTypeStart="none",p.arrowTypeEnd="none";let k="fill:none",_="";p.style=k,p.labelStyle=_,p.curve=_r($1.curve,J.c_6),e.setEdge(a.id,a.class,p,d)})},Tg=function(t,e){const i=M().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",b.info(n,s),n.startLabelRight=s.relationTitle1==="none"?"":s.relationTitle1,n.endLabelLeft=s.relationTitle2==="none"?"":s.relationTitle2,n.arrowTypeStart=th(s.relation.type1),n.arrowTypeEnd=th(s.relation.type2);let a="",o="";if(s.style!==void 0){const l=ss(s.style);a=l.style,o=l.labelStyle}else a="fill:none";n.style=a,n.labelStyle=o,s.interpolate!==void 0?n.curve=_r(s.interpolate,J.c_6):t.defaultInterpolate!==void 0?n.curve=_r(t.defaultInterpolate,J.c_6):n.curve=_r(i.curve,J.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",M().flowchart.htmlLabels?(n.labelType="html",n.label='<span class="edgeLabel">'+s.text+"</span>"):(n.labelType="text",n.label=s.text.replace(Jt.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)})},Sg=function(t){Object.keys(t).forEach(function(i){$1[i]=t[i]})},wg=function(t,e,i,r){b.info("Drawing class - ",e);const s=M().flowchart,n=M().securityLevel;b.info("config:",s);const a=s.nodeSpacing||50,o=s.rankSpacing||50,l=new Gi.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(),f=r.db.getNotes();b.info(u),vg(h,l,e,r),Tg(u,l),Cg(f,l,u.length+1,h);let d;n==="sandbox"&&(d=(0,J.Ys)("#i"+e));const p=n==="sandbox"?(0,J.Ys)(d.nodes()[0].contentDocument.body):(0,J.Ys)("body"),k=p.select(`[id="${e}"]`),_=p.select("#"+e+" g");if(ll(_,l,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",e),me.insertTitle(k,"classTitleText",s.titleTopMargin,r.db.getDiagramTitle()),Fn(l,k,s.diagramPadding,s.useMaxWidth),!s.htmlLabels){const T=n==="sandbox"?d.nodes()[0].contentDocument:document,S=T.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const E of S){const I=E.getBBox(),z=T.createElementNS("http://www.w3.org/2000/svg","rect");z.setAttribute("rx",0),z.setAttribute("ry",0),z.setAttribute("width",I.width),z.setAttribute("height",I.height),E.insertBefore(z,E.firstChild)}}};function th(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 Ag={setConf:Sg,draw:wg};var cl=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],f=[1,30],d=[1,31],p=[1,32],k=[1,33],_=[6,9,11,15,20,23,25,27,29,30,31,44,45,46,47,51],T=[1,45],S=[30,31,48,49],E=[4,6,9,11,23,25,27,29,30,31,51],I=[44,45,46,47],z=[22,37],Q=[1,65],ot=[1,64],Y=[22,37,39,41],O={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,N,y,V,wt){var nt=V.length-1;switch(y){case 1:break;case 3:this.$=[];break;case 4:V[nt-1].push(V[nt]),this.$=V[nt-1];break;case 5:case 6:this.$=V[nt];break;case 7:case 8:this.$=[];break;case 12:N.addEntity(V[nt-4]),N.addEntity(V[nt-2]),N.addRelationship(V[nt-4],V[nt],V[nt-2],V[nt-3]);break;case 13:N.addEntity(V[nt-3]),N.addAttributes(V[nt-3],V[nt-1]);break;case 14:N.addEntity(V[nt-2]);break;case 15:N.addEntity(V[nt]);break;case 16:case 17:this.$=V[nt].trim(),N.setAccTitle(this.$);break;case 18:case 19:this.$=V[nt].trim(),N.setAccDescription(this.$);break;case 20:case 43:this.$=V[nt];break;case 21:case 41:case 42:this.$=V[nt].replace(/"/g,"");break;case 22:case 30:this.$=[V[nt]];break;case 23:V[nt].push(V[nt-1]),this.$=V[nt];break;case 24:this.$={attributeType:V[nt-1],attributeName:V[nt]};break;case 25:this.$={attributeType:V[nt-2],attributeName:V[nt-1],attributeKeyTypeList:V[nt]};break;case 26:this.$={attributeType:V[nt-2],attributeName:V[nt-1],attributeComment:V[nt]};break;case 27:this.$={attributeType:V[nt-3],attributeName:V[nt-2],attributeKeyTypeList:V[nt-1],attributeComment:V[nt]};break;case 28:case 29:case 32:this.$=V[nt];break;case 31:V[nt-2].push(V[nt]),this.$=V[nt-2];break;case 33:this.$=V[nt].replace(/"/g,"");break;case 34:this.$={cardA:V[nt],relType:V[nt-1],cardB:V[nt-2]};break;case 35:this.$=N.Cardinality.ZERO_OR_ONE;break;case 36:this.$=N.Cardinality.ZERO_OR_MORE;break;case 37:this.$=N.Cardinality.ONE_OR_MORE;break;case 38:this.$=N.Cardinality.ONLY_ONE;break;case 39:this.$=N.Identification.NON_IDENTIFYING;break;case 40:this.$=N.Identification.IDENTIFYING;break;case 44:N.parseDirective("%%{","open_directive");break;case 45:N.parseDirective(V[nt],"type_directive");break;case 46:V[nt]=V[nt].trim().replace(/'/g,'"'),N.parseDirective(V[nt],"arg_directive");break;case 47:N.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:f,45:d,46:p,47:k}),{24:[1,34]},{26:[1,35]},{28:[1,36]},t(r,[2,19]),t(_,[2,20]),t(_,[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(E,[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:f,45:d,46:p,47:k},t(I,[2,39]),t(I,[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:Q,41:ot}),t([22,37,40,41],[2,29]),t([30,31],[2,34]),t(E,[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:ot}),t(z,[2,26]),t(Y,[2,30]),t(z,[2,33]),t(Y,[2,32]),t(z,[2,27]),{38:68,40:Q},t(Y,[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],N=[],y=[null],V=[],wt=this.table,nt="",rt=0,st=0,et=2,tt=1,Tt=V.slice.call(arguments,1),xt=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]);xt.setInput(m,Z.yy),Z.yy.lexer=xt,Z.yy.parser=this,typeof xt.yylloc>"u"&&(xt.yylloc={});var U=xt.yylloc;V.push(U);var gt=xt.options&&xt.options.ranges;typeof Z.yy.parseError=="function"?this.parseError=Z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function $(){var At;return At=N.pop()||xt.lex()||tt,typeof At!="number"&&(At instanceof Array&&(N=At,At=N.pop()),At=B.symbols_[At]||At),At}for(var q,R,A,H,C={},ft,x,Qt,G;;){if(R=g[g.length-1],this.defaultActions[R]?A=this.defaultActions[R]:((q===null||typeof q>"u")&&(q=$()),A=wt[R]&&wt[R][q]),typeof A>"u"||!A.length||!A[0]){var Nt="";G=[];for(ft in wt[R])this.terminals_[ft]&&ft>et&&G.push("'"+this.terminals_[ft]+"'");xt.showPosition?Nt="Parse error on line "+(rt+1)+`:
1319
+ `+xt.showPosition()+`
1320
+ Expecting `+G.join(", ")+", got '"+(this.terminals_[q]||q)+"'":Nt="Parse error on line "+(rt+1)+": Unexpected "+(q==tt?"end of input":"'"+(this.terminals_[q]||q)+"'"),this.parseError(Nt,{text:xt.match,token:this.terminals_[q]||q,line:xt.yylineno,loc:U,expected:G})}if(A[0]instanceof Array&&A.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+q);switch(A[0]){case 1:g.push(q),y.push(xt.yytext),V.push(xt.yylloc),g.push(A[1]),q=null,st=xt.yyleng,nt=xt.yytext,rt=xt.yylineno,U=xt.yylloc;break;case 2:if(x=this.productions_[A[1]][1],C.$=y[y.length-x],C._$={first_line:V[V.length-(x||1)].first_line,last_line:V[V.length-1].last_line,first_column:V[V.length-(x||1)].first_column,last_column:V[V.length-1].last_column},gt&&(C._$.range=[V[V.length-(x||1)].range[0],V[V.length-1].range[1]]),H=this.performAction.apply(C,[nt,st,rt,Z.yy,A[1],y,V].concat(Tt)),typeof H<"u")return H;x&&(g=g.slice(0,-1*x*2),y=y.slice(0,-1*x),V=V.slice(0,-1*x)),g.push(this.productions_[A[1]][0]),y.push(C.$),V.push(C._$),Qt=wt[g[g.length-2]][g[g.length-1]],g.push(Qt);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 N=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===N.length?this.yylloc.first_column:0)+N[N.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,N,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))),N=m[0].match(/(?:\r\n?|\n).*/g),N&&(this.yylineno+=N.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:N?N[N.length-1].length-N[N.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 V in y)this[V]=y[V];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var m,B,g,N;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),V=0;V<y.length;V++)if(g=this._input.match(this.rules[y[V]]),g&&(!B||g[0].length>B[0].length)){if(B=g,N=V,this.options.backtrack_lexer){if(m=this.test_match(g,y[V]),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[N]),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,N,y){switch(N){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}();O.lexer=v;function L(){this.yy={}}return L.prototype=O,O.Parser=L,new L}();cl.parser=cl;const Lg=cl,Bg=t=>t.match(/^\s*erDiagram/)!==null;let Kn={},hl=[];const Ig={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},Dg={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},Rg=function(t,e,i){ii.parseDirective(this,t,e,i)},eh=function(t){return Kn[t]===void 0&&(Kn[t]={attributes:[]},b.info("Added new entity :",t)),Kn[t]},Ng={Cardinality:Ig,Identification:Dg,parseDirective:Rg,getConfig:()=>M().er,addEntity:eh,addAttributes:function(t,e){let i=eh(t),r;for(r=e.length-1;r>=0;r--)i.attributes.push(e[r]),b.debug("Added attribute ",e[r].attributeName)},getEntities:()=>Kn,addRelationship:function(t,e,i,r){let s={entityA:t,roleA:e,entityB:i,relSpec:r};hl.push(s),b.debug("Added new relationship :",s)},getRelationships:()=>hl,clear:function(){Kn={},hl=[],sr()},setAccTitle:nr,getAccTitle:fr,setAccDescription:pr,getAccDescription:gr,setDiagramTitle:Ir,getDiagramTitle:Dr},os={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"},ls={ERMarkers:os,insertMarkers:function(t,e){let i;t.append("defs").append("marker").attr("id",os.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",os.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",os.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",os.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",os.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",os.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",os.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",os.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")}},Og=/[^\dA-Za-z](\W)*/g;let Ai={},Qn=new Map;const Fg=function(t){const e=Object.keys(t);for(const i of e)Ai[i]=t[i]},Mg=(t,e,i)=>{const r=Ai.entityPadding/3,s=Ai.entityPadding/3,n=Ai.fontSize*.85,a=e.node().getBBox(),o=[];let l=!1,h=!1,u=0,f=0,d=0,p=0,k=a.height+r*2,_=1;i.forEach(I=>{I.attributeKeyTypeList!==void 0&&I.attributeKeyTypeList.length>0&&(l=!0),I.attributeComment!==void 0&&(h=!0)}),i.forEach(I=>{const z=`${e.node().id}-attr-${_}`;let Q=0;const ot=Bi(I.attributeType),Y=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",M().fontFamily).style("font-size",n+"px").text(ot),O=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",M().fontFamily).style("font-size",n+"px").text(I.attributeName),v={};v.tn=Y,v.nn=O;const L=Y.node().getBBox(),w=O.node().getBBox();if(u=Math.max(u,L.width),f=Math.max(f,w.width),Q=Math.max(L.height,w.height),l){const m=I.attributeKeyTypeList!==void 0?I.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",M().fontFamily).style("font-size",n+"px").text(m);v.kn=B;const g=B.node().getBBox();d=Math.max(d,g.width),Q=Math.max(Q,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",M().fontFamily).style("font-size",n+"px").text(I.attributeComment||"");v.cn=m;const B=m.node().getBBox();p=Math.max(p,B.width),Q=Math.max(Q,B.height)}v.height=Q,o.push(v),k+=Q+r*2,_+=1});let T=4;l&&(T+=2),h&&(T+=2);const S=u+f+d+p,E={width:Math.max(Ai.minEntityWidth,Math.max(a.width+Ai.entityPadding*2,S+s*T)),height:i.length>0?k:Math.max(Ai.minEntityHeight,a.height+Ai.entityPadding*2)};if(i.length>0){const I=Math.max(0,(E.width-S-s*T)/(T/2));e.attr("transform","translate("+E.width/2+","+(r+a.height/2)+")");let z=a.height+r*2,Q="attributeBoxOdd";o.forEach(ot=>{const Y=z+r+ot.height/2;ot.tn.attr("transform","translate("+s+","+Y+")");const O=t.insert("rect","#"+ot.tn.node().id).classed(`er ${Q}`,!0).attr("x",0).attr("y",z).attr("width",u+s*2+I).attr("height",ot.height+r*2),v=parseFloat(O.attr("x"))+parseFloat(O.attr("width"));ot.nn.attr("transform","translate("+(v+s)+","+Y+")");const L=t.insert("rect","#"+ot.nn.node().id).classed(`er ${Q}`,!0).attr("x",v).attr("y",z).attr("width",f+s*2+I).attr("height",ot.height+r*2);let w=parseFloat(L.attr("x"))+parseFloat(L.attr("width"));if(l){ot.kn.attr("transform","translate("+(w+s)+","+Y+")");const m=t.insert("rect","#"+ot.kn.node().id).classed(`er ${Q}`,!0).attr("x",w).attr("y",z).attr("width",d+s*2+I).attr("height",ot.height+r*2);w=parseFloat(m.attr("x"))+parseFloat(m.attr("width"))}h&&(ot.cn.attr("transform","translate("+(w+s)+","+Y+")"),t.insert("rect","#"+ot.cn.node().id).classed(`er ${Q}`,"true").attr("x",w).attr("y",z).attr("width",p+s*2+I).attr("height",ot.height+r*2)),z+=ot.height+r*2,Q=Q==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else E.height=Math.max(Ai.minEntityHeight,k),e.attr("transform","translate("+E.width/2+","+E.height/2+")");return E},Pg=function(t,e,i){const r=Object.keys(e);let s;return r.forEach(function(n){const a=Zg(n,"entity");Qn.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",M().fontFamily).style("font-size",Ai.fontSize+"px").text(n),{width:u,height:f}=Mg(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",f).node().getBBox();i.setNode(a,{width:p.width,height:p.height,shape:"rect",id:a})}),s},Vg=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)+" )")})},ih=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},Yg=function(t,e){return t.forEach(function(i){e.setEdge(Qn.get(i.entityA),Qn.get(i.entityB),{relationship:i},ih(i))}),t};let rh=0;const zg=function(t,e,i,r,s){rh++;const n=i.edge(Qn.get(e.entityA),Qn.get(e.entityB),ih(e)),a=(0,J.jvg)().x(function(k){return k.x}).y(function(k){return k.y}).curve(J.$0Z),o=t.insert("path","#"+r).classed("er relationshipLine",!0).attr("d",a(n.points)).style("stroke",Ai.stroke).style("fill","none");e.relSpec.relType===s.db.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");let l="";switch(Ai.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+"#"+ls.ERMarkers.ZERO_OR_ONE_END+")");break;case s.db.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+l+"#"+ls.ERMarkers.ZERO_OR_MORE_END+")");break;case s.db.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+l+"#"+ls.ERMarkers.ONE_OR_MORE_END+")");break;case s.db.Cardinality.ONLY_ONE:o.attr("marker-end","url("+l+"#"+ls.ERMarkers.ONLY_ONE_END+")");break}switch(e.relSpec.cardB){case s.db.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+l+"#"+ls.ERMarkers.ZERO_OR_ONE_START+")");break;case s.db.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+l+"#"+ls.ERMarkers.ZERO_OR_MORE_START+")");break;case s.db.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+l+"#"+ls.ERMarkers.ONE_OR_MORE_START+")");break;case s.db.Cardinality.ONLY_ONE:o.attr("marker-start","url("+l+"#"+ls.ERMarkers.ONLY_ONE_START+")");break}const h=o.node().getTotalLength(),u=o.node().getPointAtLength(h*.5),f="rel"+rh,p=t.append("text").classed("er relationshipLabel",!0).attr("id",f).attr("x",u.x).attr("y",u.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",M().fontFamily).style("font-size",Ai.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+f).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)},Wg=function(t,e,i,r){Ai=M().er,b.info("Drawing ER diagram");const s=M().securityLevel;let n;s==="sandbox"&&(n=(0,J.Ys)("#i"+e));const o=(s==="sandbox"?(0,J.Ys)(n.nodes()[0].contentDocument.body):(0,J.Ys)("body")).select(`[id='${e}']`);ls.insertMarkers(o,Ai);let l;l=new Gi.k({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:Ai.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});const h=Pg(o,r.db.getEntities(),l),u=Yg(r.db.getRelationships(),l);(0,xs.bK)(l),Vg(o,l),u.forEach(function(_){zg(o,_,l,h,r)});const f=Ai.diagramPadding;me.insertTitle(o,"entityTitleText",Ai.titleTopMargin,r.db.getDiagramTitle());const d=o.node().getBBox(),p=d.width+f*2,k=d.height+f*2;Br(o,k,p,Ai.useMaxWidth),o.attr("viewBox",`${d.x-f} ${d.y-f} ${p} ${k}`)},Ug="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function Zg(t="",e=""){const i=t.replace(Og,"");return`${sh(e)}${sh(i)}${es(t,Ug)}`}function sh(t=""){return t.length>0?`${t}-`:""}const Hg={setConf:Fg,draw:Wg};var ul=function(){var t=function(Ms,ne,de,Ie){for(de=de||{},Ie=Ms.length;Ie--;de[Ms[Ie]]=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],f=[1,30],d=[1,32],p=[1,33],k=[1,34],_=[1,62],T=[1,48],S=[1,52],E=[1,36],I=[1,37],z=[1,38],Q=[1,39],ot=[1,40],Y=[1,56],O=[1,63],v=[1,51],L=[1,53],w=[1,55],m=[1,59],B=[1,60],g=[1,41],N=[1,42],y=[1,43],V=[1,44],wt=[1,61],nt=[1,50],rt=[1,54],st=[1,57],et=[1,58],tt=[1,49],Tt=[1,66],xt=[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],gt=[1,76],$=[20,21,23,81,82],q=[1,99],R=[1,104],A=[1,107],H=[1,108],C=[1,101],ft=[1,106],x=[1,109],Qt=[1,102],G=[1,114],Nt=[1,113],At=[1,103],kt=[1,105],yt=[1,110],_t=[1,111],mt=[1,112],Ct=[1,115],Ge=[20,21,22,23,81,82],De=[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],ee=[20,21,23],we=[20,21,23,52,66,67,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],ri=[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],he=[1,149],Zt=[1,157],St=[1,158],Et=[1,159],It=[1,160],dt=[1,144],qt=[1,145],it=[1,141],Ce=[1,152],lt=[1,153],ke=[1,154],Re=[1,155],Fe=[1,156],Ne=[1,161],Me=[1,162],oe=[1,147],_e=[1,150],Le=[1,146],Be=[1,143],ba=[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],wo=[1,165],gi=[20,21,22,23,26,52,66,67,91,105,106,109,111,112,122,123,124,125,126,127],xe=[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],Qi=[12,21,22,24],wn=[22,106],Ni=[1,250],Ui=[1,245],yi=[1,246],cr=[1,254],Zi=[1,251],Ji=[1,248],mi=[1,247],Pr=[1,249],Vr=[1,252],Yr=[1,253],zr=[1,255],Fs=[1,273],Yu=[20,21,23,106],br=[20,21,22,23,66,67,86,102,105,106,109,110,111,112,113],fc={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,Ie,Ft,ai,F,xa){var W=F.length-1;switch(ai){case 5:Ft.parseDirective("%%{","open_directive");break;case 6:Ft.parseDirective(F[W],"type_directive");break;case 7:F[W]=F[W].trim().replace(/'/g,'"'),Ft.parseDirective(F[W],"arg_directive");break;case 8:Ft.parseDirective("}%%","close_directive","flowchart");break;case 10:this.$=[];break;case 11:(!Array.isArray(F[W])||F[W].length>0)&&F[W-1].push(F[W]),this.$=F[W-1];break;case 12:case 82:case 84:case 96:case 152:case 154:case 155:this.$=F[W];break;case 19:Ft.setDirection("TB"),this.$="TB";break;case 20:Ft.setDirection(F[W-1]),this.$=F[W-1];break;case 35:this.$=F[W-1].nodes;break;case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 41:this.$=Ft.addSubGraph(F[W-6],F[W-1],F[W-4]);break;case 42:this.$=Ft.addSubGraph(F[W-3],F[W-1],F[W-3]);break;case 43:this.$=Ft.addSubGraph(void 0,F[W-1],void 0);break;case 45:this.$=F[W].trim(),Ft.setAccTitle(this.$);break;case 46:case 47:this.$=F[W].trim(),Ft.setAccDescription(this.$);break;case 51:Ft.addLink(F[W-2].stmt,F[W],F[W-1]),this.$={stmt:F[W],nodes:F[W].concat(F[W-2].nodes)};break;case 52:Ft.addLink(F[W-3].stmt,F[W-1],F[W-2]),this.$={stmt:F[W-1],nodes:F[W-1].concat(F[W-3].nodes)};break;case 53:this.$={stmt:F[W-1],nodes:F[W-1]};break;case 54:this.$={stmt:F[W],nodes:F[W]};break;case 55:this.$=[F[W]];break;case 56:this.$=F[W-4].concat(F[W]);break;case 57:this.$=[F[W-2]],Ft.setClass(F[W-2],F[W]);break;case 58:this.$=F[W-3],Ft.addVertex(F[W-3],F[W-1],"square");break;case 59:this.$=F[W-3],Ft.addVertex(F[W-3],F[W-1],"doublecircle");break;case 60:this.$=F[W-5],Ft.addVertex(F[W-5],F[W-2],"circle");break;case 61:this.$=F[W-3],Ft.addVertex(F[W-3],F[W-1],"ellipse");break;case 62:this.$=F[W-3],Ft.addVertex(F[W-3],F[W-1],"stadium");break;case 63:this.$=F[W-3],Ft.addVertex(F[W-3],F[W-1],"subroutine");break;case 64:this.$=F[W-7],Ft.addVertex(F[W-7],F[W-1],"rect",void 0,void 0,void 0,Object.fromEntries([[F[W-5],F[W-3]]]));break;case 65:this.$=F[W-3],Ft.addVertex(F[W-3],F[W-1],"cylinder");break;case 66:this.$=F[W-3],Ft.addVertex(F[W-3],F[W-1],"round");break;case 67:this.$=F[W-3],Ft.addVertex(F[W-3],F[W-1],"diamond");break;case 68:this.$=F[W-5],Ft.addVertex(F[W-5],F[W-2],"hexagon");break;case 69:this.$=F[W-3],Ft.addVertex(F[W-3],F[W-1],"odd");break;case 70:this.$=F[W-3],Ft.addVertex(F[W-3],F[W-1],"trapezoid");break;case 71:this.$=F[W-3],Ft.addVertex(F[W-3],F[W-1],"inv_trapezoid");break;case 72:this.$=F[W-3],Ft.addVertex(F[W-3],F[W-1],"lean_right");break;case 73:this.$=F[W-3],Ft.addVertex(F[W-3],F[W-1],"lean_left");break;case 74:this.$=F[W],Ft.addVertex(F[W]);break;case 75:F[W-1].text=F[W],this.$=F[W-1];break;case 76:case 77:F[W-2].text=F[W-1],this.$=F[W-2];break;case 78:this.$=F[W];break;case 79:var Sr=Ft.destructLink(F[W],F[W-2]);this.$={type:Sr.type,stroke:Sr.stroke,length:Sr.length,text:F[W-1]};break;case 80:var Sr=Ft.destructLink(F[W]);this.$={type:Sr.type,stroke:Sr.stroke,length:Sr.length};break;case 81:this.$=F[W-1];break;case 83:case 97:case 153:this.$=F[W-1]+""+F[W];break;case 98:case 99:this.$=F[W-4],Ft.addClass(F[W-2],F[W]);break;case 100:this.$=F[W-4],Ft.setClass(F[W-2],F[W]);break;case 101:case 109:this.$=F[W-1],Ft.setClickEvent(F[W-1],F[W]);break;case 102:case 110:this.$=F[W-3],Ft.setClickEvent(F[W-3],F[W-2]),Ft.setTooltip(F[W-3],F[W]);break;case 103:this.$=F[W-2],Ft.setClickEvent(F[W-2],F[W-1],F[W]);break;case 104:this.$=F[W-4],Ft.setClickEvent(F[W-4],F[W-3],F[W-2]),Ft.setTooltip(F[W-4],F[W]);break;case 105:case 111:this.$=F[W-1],Ft.setLink(F[W-1],F[W]);break;case 106:case 112:this.$=F[W-3],Ft.setLink(F[W-3],F[W-2]),Ft.setTooltip(F[W-3],F[W]);break;case 107:case 113:this.$=F[W-3],Ft.setLink(F[W-3],F[W-2],F[W]);break;case 108:case 114:this.$=F[W-5],Ft.setLink(F[W-5],F[W-4],F[W]),Ft.setTooltip(F[W-5],F[W-2]);break;case 115:this.$=F[W-4],Ft.addVertex(F[W-2],void 0,void 0,F[W]);break;case 116:case 118:this.$=F[W-4],Ft.updateLink(F[W-2],F[W]);break;case 117:this.$=F[W-4],Ft.updateLink([F[W-2]],F[W]);break;case 119:this.$=F[W-8],Ft.updateLinkInterpolate([F[W-6]],F[W-2]),Ft.updateLink([F[W-6]],F[W]);break;case 120:this.$=F[W-8],Ft.updateLinkInterpolate(F[W-6],F[W-2]),Ft.updateLink(F[W-6],F[W]);break;case 121:this.$=F[W-6],Ft.updateLinkInterpolate([F[W-4]],F[W]);break;case 122:this.$=F[W-6],Ft.updateLinkInterpolate(F[W-4],F[W]);break;case 123:case 125:this.$=[F[W]];break;case 124:case 126:F[W-2].push(F[W]),this.$=F[W-2];break;case 128:this.$=F[W-1]+F[W];break;case 150:this.$=F[W];break;case 151:this.$=F[W-1]+""+F[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:f,43:31,44:d,46:p,48:k,50:35,51:45,52:_,54:46,66:T,67:S,86:E,87:I,88:z,89:Q,90:ot,91:Y,95:O,105:v,106:L,109:w,111:m,112:B,116:47,118:g,119:N,120:y,121:V,122:wt,123:nt,124:rt,125:st,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:xt,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:gt,49:73,78:77,81:[1,78],82:[1,79]},{9:80,20:jt,21:U,23:gt},{9:81,20:jt,21:U,23:gt},{9:82,20:jt,21:U,23:gt},{9:83,20:jt,21:U,23:gt},{9:84,20:jt,21:U,23:gt},{9:86,20:jt,21:U,22:[1,85],23:gt},t(Z,[2,44]),{45:[1,87]},{47:[1,88]},t(Z,[2,47]),t($,[2,54],{30:89,22:xt}),{22:[1,90]},{22:[1,91]},{22:[1,92]},{22:[1,93]},{26:q,52:R,66:A,67:H,84:[1,97],91:C,97:96,98:[1,94],100:[1,95],105:ft,106:x,109:Qt,111:G,112:Nt,115:100,117:98,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},t(Z,[2,158]),t(Z,[2,159]),t(Z,[2,160]),t(Z,[2,161]),t(Ge,[2,55],{53:[1,116]}),t(De,[2,74],{116:129,40:[1,117],52:_,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:Y,95:O,105:v,106:L,109:w,111:m,112:B,122:wt,123:nt,124:rt,125:st,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:gt},{11:131,14:[1,132]},t(ee,[2,8]),t(n,[2,20]),t(n,[2,26]),t(n,[2,27]),{21:[1,133]},t(we,[2,34],{30:134,22:xt}),t(Z,[2,35]),{50:135,51:45,52:_,54:46,66:T,67:S,91:Y,95:O,105:v,106:L,109:w,111:m,112:B,116:47,122:wt,123:nt,124:rt,125:st,126:et,127:tt},t(ri,[2,48]),t(ri,[2,49]),t(ri,[2,50]),t(Ye,[2,78],{79:136,68:[1,138],80:[1,137]}),{22:he,24:Zt,26:St,38:Et,39:139,42:It,52:R,66:A,67:H,73:dt,81:qt,83:140,84:it,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,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:he,24:Zt,26:St,38:Et,39:163,42:It,52:R,66:A,67:H,73:dt,81:qt,83:140,84:it,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},t(ba,a,{17:164}),t(Z,[2,45]),t(Z,[2,46]),t($,[2,53],{52:wo}),{26:q,52:R,66:A,67:H,91:C,97:166,102:[1,167],105:ft,106:x,109:Qt,111:G,112:Nt,115:100,117:98,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{95:[1,168],103:169,105:[1,170]},{26:q,52:R,66:A,67:H,91:C,95:[1,171],97:172,105:ft,106:x,109:Qt,111:G,112:Nt,115:100,117:98,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{26:q,52:R,66:A,67:H,91:C,97:173,105:ft,106:x,109:Qt,111:G,112:Nt,115:100,117:98,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},t(ee,[2,101],{22:[1,174],99:[1,175]}),t(ee,[2,105],{22:[1,176]}),t(ee,[2,109],{115:100,117:178,22:[1,177],26:q,52:R,66:A,67:H,91:C,105:ft,106:x,109:Qt,111:G,112:Nt,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct}),t(ee,[2,111],{22:[1,179]}),t(gi,[2,152]),t(gi,[2,154]),t(gi,[2,155]),t(gi,[2,156]),t(gi,[2,157]),t(xe,[2,162]),t(xe,[2,163]),t(xe,[2,164]),t(xe,[2,165]),t(xe,[2,166]),t(xe,[2,167]),t(xe,[2,168]),t(xe,[2,169]),t(xe,[2,170]),t(xe,[2,171]),t(xe,[2,172]),t(xe,[2,173]),t(xe,[2,174]),{52:_,54:180,66:T,67:S,91:Y,95:O,105:v,106:L,109:w,111:m,112:B,116:47,122:wt,123:nt,124:rt,125:st,126:et,127:tt},{22:he,24:Zt,26:St,38:Et,39:181,42:It,52:R,66:A,67:H,73:dt,81:qt,83:140,84:it,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Zt,26:St,38:Et,39:182,42:It,52:R,66:A,67:H,73:dt,81:qt,83:140,84:it,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Zt,26:St,38:Et,39:184,42:It,52:R,57:[1,183],66:A,67:H,73:dt,81:qt,83:140,84:it,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Zt,26:St,38:Et,39:185,42:It,52:R,66:A,67:H,73:dt,81:qt,83:140,84:it,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Zt,26:St,38:Et,39:186,42:It,52:R,66:A,67:H,73:dt,81:qt,83:140,84:it,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Zt,26:St,38:Et,39:187,42:It,52:R,66:A,67:H,73:dt,81:qt,83:140,84:it,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{66:[1,188]},{22:he,24:Zt,26:St,38:Et,39:189,42:It,52:R,66:A,67:H,73:dt,81:qt,83:140,84:it,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Zt,26:St,38:Et,39:190,42:It,52:R,66:A,67:H,71:[1,191],73:dt,81:qt,83:140,84:it,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Zt,26:St,38:Et,39:192,42:It,52:R,66:A,67:H,73:dt,81:qt,83:140,84:it,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Zt,26:St,38:Et,39:193,42:It,52:R,66:A,67:H,73:dt,81:qt,83:140,84:it,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Zt,26:St,38:Et,39:194,42:It,52:R,66:A,67:H,73:dt,81:qt,83:140,84:it,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},t(se,[2,151]),t(Qi,[2,3]),{8:195,15:Tt},{15:[2,7]},t(n,[2,28]),t(we,[2,33]),t($,[2,51],{30:196,22:xt}),t(Ye,[2,75],{22:[1,197]}),{22:[1,198]},{22:he,24:Zt,26:St,38:Et,39:199,42:It,52:R,66:A,67:H,73:dt,81:qt,83:140,84:it,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Zt,26:St,38:Et,42:It,52:R,66:A,67:H,73:dt,81:qt,82:[1,200],83:201,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},t(xe,[2,82]),t(xe,[2,84]),t(xe,[2,140]),t(xe,[2,141]),t(xe,[2,142]),t(xe,[2,143]),t(xe,[2,144]),t(xe,[2,145]),t(xe,[2,146]),t(xe,[2,147]),t(xe,[2,148]),t(xe,[2,149]),t(xe,[2,85]),t(xe,[2,86]),t(xe,[2,87]),t(xe,[2,88]),t(xe,[2,89]),t(xe,[2,90]),t(xe,[2,91]),t(xe,[2,92]),t(xe,[2,93]),t(xe,[2,94]),t(xe,[2,95]),{9:203,20:jt,21:U,22:he,23:gt,24:Zt,26:St,38:Et,40:[1,202],42:It,52:R,66:A,67:H,73:dt,81:qt,83:201,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,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:f,42:[1,204],43:31,44:d,46:p,48:k,50:35,51:45,52:_,54:46,66:T,67:S,86:E,87:I,88:z,89:Q,90:ot,91:Y,95:O,105:v,106:L,109:w,111:m,112:B,116:47,118:g,119:N,120:y,121:V,122:wt,123:nt,124:rt,125:st,126:et,127:tt},{22:xt,30:205},{22:[1,206],26:q,52:R,66:A,67:H,91:C,105:ft,106:x,109:Qt,111:G,112:Nt,115:100,117:178,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:[1,207]},{22:[1,208]},{22:[1,209],106:[1,210]},t(wn,[2,123]),{22:[1,211]},{22:[1,212],26:q,52:R,66:A,67:H,91:C,105:ft,106:x,109:Qt,111:G,112:Nt,115:100,117:178,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:[1,213],26:q,52:R,66:A,67:H,91:C,105:ft,106:x,109:Qt,111:G,112:Nt,115:100,117:178,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{84:[1,214]},t(ee,[2,103],{22:[1,215]}),{84:[1,216],101:[1,217]},{84:[1,218]},t(gi,[2,153]),{84:[1,219],101:[1,220]},t(Ge,[2,57],{116:129,52:_,66:T,67:S,91:Y,95:O,105:v,106:L,109:w,111:m,112:B,122:wt,123:nt,124:rt,125:st,126:et,127:tt}),{22:he,24:Zt,26:St,38:Et,41:[1,221],42:It,52:R,66:A,67:H,73:dt,81:qt,83:201,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Zt,26:St,38:Et,42:It,52:R,56:[1,222],66:A,67:H,73:dt,81:qt,83:201,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Zt,26:St,38:Et,39:223,42:It,52:R,66:A,67:H,73:dt,81:qt,83:140,84:it,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Zt,26:St,38:Et,42:It,52:R,58:[1,224],66:A,67:H,73:dt,81:qt,83:201,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Zt,26:St,38:Et,42:It,52:R,60:[1,225],66:A,67:H,73:dt,81:qt,83:201,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Zt,26:St,38:Et,42:It,52:R,62:[1,226],66:A,67:H,73:dt,81:qt,83:201,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Zt,26:St,38:Et,42:It,52:R,64:[1,227],66:A,67:H,73:dt,81:qt,83:201,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{67:[1,228]},{22:he,24:Zt,26:St,38:Et,42:It,52:R,66:A,67:H,70:[1,229],73:dt,81:qt,83:201,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Zt,26:St,38:Et,42:It,52:R,66:A,67:H,72:[1,230],73:dt,81:qt,83:201,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Zt,26:St,38:Et,39:231,42:It,52:R,66:A,67:H,73:dt,81:qt,83:140,84:it,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Zt,26:St,38:Et,41:[1,232],42:It,52:R,66:A,67:H,73:dt,81:qt,83:201,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Zt,26:St,38:Et,42:It,52:R,66:A,67:H,73:dt,75:[1,233],77:[1,234],81:qt,83:201,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{22:he,24:Zt,26:St,38:Et,42:It,52:R,66:A,67:H,73:dt,75:[1,236],77:[1,235],81:qt,83:201,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{9:237,20:jt,21:U,23:gt},t($,[2,52],{52:wo}),t(Ye,[2,77]),t(Ye,[2,76]),{22:he,24:Zt,26:St,38:Et,42:It,52:R,66:A,67:H,68:[1,238],73:dt,81:qt,83:201,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},t(Ye,[2,79]),t(xe,[2,83]),{22:he,24:Zt,26:St,38:Et,39:239,42:It,52:R,66:A,67:H,73:dt,81:qt,83:140,84:it,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},t(ba,a,{17:240}),t(Z,[2,43]),{51:241,52:_,54:46,66:T,67:S,91:Y,95:O,105:v,106:L,109:w,111:m,112:B,116:47,122:wt,123:nt,124:rt,125:st,126:et,127:tt},{22:Ni,66:Ui,67:yi,86:cr,96:242,102:Zi,105:Ji,107:243,108:244,109:mi,110:Pr,111:Vr,112:Yr,113:zr},{22:Ni,66:Ui,67:yi,86:cr,96:256,102:Zi,105:Ji,107:243,108:244,109:mi,110:Pr,111:Vr,112:Yr,113:zr},{22:Ni,66:Ui,67:yi,86:cr,96:257,102:Zi,104:[1,258],105:Ji,107:243,108:244,109:mi,110:Pr,111:Vr,112:Yr,113:zr},{22:Ni,66:Ui,67:yi,86:cr,96:259,102:Zi,104:[1,260],105:Ji,107:243,108:244,109:mi,110:Pr,111:Vr,112:Yr,113:zr},{105:[1,261]},{22:Ni,66:Ui,67:yi,86:cr,96:262,102:Zi,105:Ji,107:243,108:244,109:mi,110:Pr,111:Vr,112:Yr,113:zr},{22:Ni,66:Ui,67:yi,86:cr,96:263,102:Zi,105:Ji,107:243,108:244,109:mi,110:Pr,111:Vr,112:Yr,113:zr},{26:q,52:R,66:A,67:H,91:C,97:264,105:ft,106:x,109:Qt,111:G,112:Nt,115:100,117:98,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},t(ee,[2,102]),{84:[1,265]},t(ee,[2,106],{22:[1,266]}),t(ee,[2,107]),t(ee,[2,110]),t(ee,[2,112],{22:[1,267]}),t(ee,[2,113]),t(De,[2,58]),t(De,[2,59]),{22:he,24:Zt,26:St,38:Et,42:It,52:R,58:[1,268],66:A,67:H,73:dt,81:qt,83:201,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},t(De,[2,66]),t(De,[2,61]),t(De,[2,62]),t(De,[2,63]),{66:[1,269]},t(De,[2,65]),t(De,[2,67]),{22:he,24:Zt,26:St,38:Et,42:It,52:R,66:A,67:H,72:[1,270],73:dt,81:qt,83:201,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},t(De,[2,69]),t(De,[2,70]),t(De,[2,72]),t(De,[2,71]),t(De,[2,73]),t(Qi,[2,4]),t([22,52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,81]),{22:he,24:Zt,26:St,38:Et,41:[1,271],42:It,52:R,66:A,67:H,73:dt,81:qt,83:201,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,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:f,42:[1,272],43:31,44:d,46:p,48:k,50:35,51:45,52:_,54:46,66:T,67:S,86:E,87:I,88:z,89:Q,90:ot,91:Y,95:O,105:v,106:L,109:w,111:m,112:B,116:47,118:g,119:N,120:y,121:V,122:wt,123:nt,124:rt,125:st,126:et,127:tt},t(Ge,[2,56]),t(ee,[2,115],{106:Fs}),t(Yu,[2,125],{108:274,22:Ni,66:Ui,67:yi,86:cr,102:Zi,105:Ji,109:mi,110:Pr,111:Vr,112:Yr,113:zr}),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(ee,[2,116],{106:Fs}),t(ee,[2,117],{106:Fs}),{22:[1,275]},t(ee,[2,118],{106:Fs}),{22:[1,276]},t(wn,[2,124]),t(ee,[2,98],{106:Fs}),t(ee,[2,99],{106:Fs}),t(ee,[2,100],{115:100,117:178,26:q,52:R,66:A,67:H,91:C,105:ft,106:x,109:Qt,111:G,112:Nt,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct}),t(ee,[2,104]),{101:[1,277]},{101:[1,278]},{58:[1,279]},{68:[1,280]},{72:[1,281]},{9:282,20:jt,21:U,23:gt},t(Z,[2,42]),{22:Ni,66:Ui,67:yi,86:cr,102:Zi,105:Ji,107:283,108:244,109:mi,110:Pr,111:Vr,112:Yr,113:zr},t(br,[2,128]),{26:q,52:R,66:A,67:H,91:C,97:284,105:ft,106:x,109:Qt,111:G,112:Nt,115:100,117:98,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},{26:q,52:R,66:A,67:H,91:C,97:285,105:ft,106:x,109:Qt,111:G,112:Nt,115:100,117:98,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},t(ee,[2,108]),t(ee,[2,114]),t(De,[2,60]),{22:he,24:Zt,26:St,38:Et,39:286,42:It,52:R,66:A,67:H,73:dt,81:qt,83:140,84:it,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct},t(De,[2,68]),t(ba,a,{17:287}),t(Yu,[2,126],{108:274,22:Ni,66:Ui,67:yi,86:cr,102:Zi,105:Ji,109:mi,110:Pr,111:Vr,112:Yr,113:zr}),t(ee,[2,121],{115:100,117:178,22:[1,288],26:q,52:R,66:A,67:H,91:C,105:ft,106:x,109:Qt,111:G,112:Nt,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct}),t(ee,[2,122],{115:100,117:178,22:[1,289],26:q,52:R,66:A,67:H,91:C,105:ft,106:x,109:Qt,111:G,112:Nt,122:At,123:kt,124:yt,125:_t,126:mt,127:Ct}),{22:he,24:Zt,26:St,38:Et,41:[1,290],42:It,52:R,66:A,67:H,73:dt,81:qt,83:201,85:151,86:Ce,87:lt,88:ke,89:Re,90:Fe,91:Ne,92:Me,94:142,95:oe,105:ft,106:x,109:_e,111:G,112:Nt,113:Le,114:Be,115:148,122:At,123:kt,124:yt,125:_t,126:mt,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:f,42:[1,291],43:31,44:d,46:p,48:k,50:35,51:45,52:_,54:46,66:T,67:S,86:E,87:I,88:z,89:Q,90:ot,91:Y,95:O,105:v,106:L,109:w,111:m,112:B,116:47,118:g,119:N,120:y,121:V,122:wt,123:nt,124:rt,125:st,126:et,127:tt},{22:Ni,66:Ui,67:yi,86:cr,96:292,102:Zi,105:Ji,107:243,108:244,109:mi,110:Pr,111:Vr,112:Yr,113:zr},{22:Ni,66:Ui,67:yi,86:cr,96:293,102:Zi,105:Ji,107:243,108:244,109:mi,110:Pr,111:Vr,112:Yr,113:zr},t(De,[2,64]),t(Z,[2,41]),t(ee,[2,119],{106:Fs}),t(ee,[2,120],{106:Fs})],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 Ie=new Error(ne);throw Ie.hash=de,Ie}},parse:function(ne){var de=this,Ie=[0],Ft=[],ai=[null],F=[],xa=this.table,W="",Sr=0,zu=0,cm=2,Wu=1,hm=F.slice.call(arguments,1),Oi=Object.create(this.lexer),rn={yy:{}};for(var gc in this.yy)Object.prototype.hasOwnProperty.call(this.yy,gc)&&(rn.yy[gc]=this.yy[gc]);Oi.setInput(ne,rn.yy),rn.yy.lexer=Oi,rn.yy.parser=this,typeof Oi.yylloc>"u"&&(Oi.yylloc={});var yc=Oi.yylloc;F.push(yc);var um=Oi.options&&Oi.options.ranges;typeof rn.yy.parseError=="function"?this.parseError=rn.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function dm(){var bs;return bs=Ft.pop()||Oi.lex()||Wu,typeof bs!="number"&&(bs instanceof Array&&(Ft=bs,bs=Ft.pop()),bs=de.symbols_[bs]||bs),bs}for(var hr,sn,wr,mc,An={},Ao,ms,Uu,Lo;;){if(sn=Ie[Ie.length-1],this.defaultActions[sn]?wr=this.defaultActions[sn]:((hr===null||typeof hr>"u")&&(hr=dm()),wr=xa[sn]&&xa[sn][hr]),typeof wr>"u"||!wr.length||!wr[0]){var bc="";Lo=[];for(Ao in xa[sn])this.terminals_[Ao]&&Ao>cm&&Lo.push("'"+this.terminals_[Ao]+"'");Oi.showPosition?bc="Parse error on line "+(Sr+1)+`:
1324
+ `+Oi.showPosition()+`
1325
+ Expecting `+Lo.join(", ")+", got '"+(this.terminals_[hr]||hr)+"'":bc="Parse error on line "+(Sr+1)+": Unexpected "+(hr==Wu?"end of input":"'"+(this.terminals_[hr]||hr)+"'"),this.parseError(bc,{text:Oi.match,token:this.terminals_[hr]||hr,line:Oi.yylineno,loc:yc,expected:Lo})}if(wr[0]instanceof Array&&wr.length>1)throw new Error("Parse Error: multiple actions possible at state: "+sn+", token: "+hr);switch(wr[0]){case 1:Ie.push(hr),ai.push(Oi.yytext),F.push(Oi.yylloc),Ie.push(wr[1]),hr=null,zu=Oi.yyleng,W=Oi.yytext,Sr=Oi.yylineno,yc=Oi.yylloc;break;case 2:if(ms=this.productions_[wr[1]][1],An.$=ai[ai.length-ms],An._$={first_line:F[F.length-(ms||1)].first_line,last_line:F[F.length-1].last_line,first_column:F[F.length-(ms||1)].first_column,last_column:F[F.length-1].last_column},um&&(An._$.range=[F[F.length-(ms||1)].range[0],F[F.length-1].range[1]]),mc=this.performAction.apply(An,[W,zu,Sr,rn.yy,wr[1],ai,F].concat(hm)),typeof mc<"u")return mc;ms&&(Ie=Ie.slice(0,-1*ms*2),ai=ai.slice(0,-1*ms),F=F.slice(0,-1*ms)),Ie.push(this.productions_[wr[1]][0]),ai.push(An.$),F.push(An._$),Uu=xa[Ie[Ie.length-2]][Ie[Ie.length-1]],Ie.push(Uu);break;case 3:return!0}}return!0}},lm=function(){var Ms={EOF:1,parseError:function(de,Ie){if(this.yy.parser)this.yy.parser.parseError(de,Ie);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,Ie=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),Ie.length-1&&(this.yylineno-=Ie.length-1);var ai=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===Ft.length?this.yylloc.first_column:0)+Ft[Ft.length-Ie.length].length-Ie[0].length:this.yylloc.first_column-de},this.options.ranges&&(this.yylloc.range=[ai[0],ai[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 Ie,Ft,ai;if(this.options.backtrack_lexer&&(ai={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&&(ai.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],Ie=this.performAction.call(this,this.yy,this,de,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Ie)return Ie;if(this._backtrack){for(var F in ai)this[F]=ai[F];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ne,de,Ie,Ft;this._more||(this.yytext="",this.match="");for(var ai=this._currentRules(),F=0;F<ai.length;F++)if(Ie=this._input.match(this.rules[ai[F]]),Ie&&(!de||Ie[0].length>de[0].length)){if(de=Ie,Ft=F,this.options.backtrack_lexer){if(ne=this.test_match(Ie,ai[F]),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,ai[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,Ie,Ft,ai){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 Ms}();fc.lexer=lm;function pc(){this.yy={}}return pc.prototype=fc,fc.Parser=pc,new pc}();ul.parser=ul;const dl=ul,Gg=(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},jg=(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},qg="flowchart-";let nh=0,fl=M(),ei={},Qs=[],mn={},cs=[],$a={},pl={},to=0,gl=!0,vr,eo,io=[];const ro=t=>Jt.sanitizeText(t,fl),ah=function(t,e,i){ii.parseDirective(this,t,e,i)},Jn=function(t){const e=Object.keys(ei);for(const i of e)if(ei[i].id===t)return ei[i].domId;return t},oh=function(t,e,i,r,s,n,a={}){let o,l=t;l!==void 0&&l.trim().length!==0&&(ei[l]===void 0&&(ei[l]={id:l,domId:qg+l+"-"+nh,styles:[],classes:[]}),nh++,e!==void 0?(fl=M(),o=ro(e.trim()),o[0]==='"'&&o[o.length-1]==='"'&&(o=o.substring(1,o.length-1)),ei[l].text=o):ei[l].text===void 0&&(ei[l].text=t),i!==void 0&&(ei[l].type=i),r!=null&&r.forEach(function(h){ei[l].styles.push(h)}),s!=null&&s.forEach(function(h){ei[l].classes.push(h)}),n!==void 0&&(ei[l].dir=n),ei[l].props===void 0?ei[l].props=a:a!==void 0&&Object.assign(ei[l].props,a))},lh=function(t,e,i,r){const a={start:t,end:e,type:void 0,text:""};r=i.text,r!==void 0&&(a.text=ro(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),Qs.push(a)},ch=function(t,e,i,r){let s,n;for(s=0;s<t.length;s++)for(n=0;n<e.length;n++)lh(t[s],e[n],i,r)},hh=function(t,e){t.forEach(function(i){i==="default"?Qs.defaultInterpolate=e:Qs[i].interpolate=e})},uh=function(t,e){t.forEach(function(i){i==="default"?Qs.defaultStyle=e:(me.isSubstringInArray("fill",e)===-1&&e.push("fill:none"),Qs[i].style=e)})},dh=function(t,e){mn[t]===void 0&&(mn[t]={id:t,styles:[],textStyles:[]}),e!=null&&e.forEach(function(i){if(i.match("color")){const s=i.replace("fill","bgFill").replace("color","fill");mn[t].textStyles.push(s)}mn[t].styles.push(i)})},fh=function(t){vr=t,vr.match(/.*</)&&(vr="RL"),vr.match(/.*\^/)&&(vr="BT"),vr.match(/.*>/)&&(vr="LR"),vr.match(/.*v/)&&(vr="TB"),vr==="TD"&&(vr="TB")},so=function(t,e){t.split(",").forEach(function(i){let r=i;ei[r]!==void 0&&ei[r].classes.push(e),$a[r]!==void 0&&$a[r].classes.push(e)})},Xg=function(t,e){t.split(",").forEach(function(i){e!==void 0&&(pl[eo==="gen-1"?Jn(i):i]=ro(e))})},Kg=function(t,e,i){let r=Jn(t);if(M().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),ei[t]!==void 0&&(ei[t].haveCallback=!0,io.push(function(){const n=document.querySelector(`[id="${r}"]`);n!==null&&n.addEventListener("click",function(){me.runFunc(e,...s)},!1)}))},ph=function(t,e,i){t.split(",").forEach(function(r){ei[r]!==void 0&&(ei[r].link=me.formatUrl(e,fl),ei[r].linkTarget=i)}),so(t,"clickable")},gh=function(t){return pl[t]},yh=function(t,e,i){t.split(",").forEach(function(r){Kg(r,e,i)}),so(t,"clickable")},mh=function(t){io.forEach(function(e){e(t)})},bh=function(){return vr.trim()},xh=function(){return ei},kh=function(){return Qs},_h=function(){return mn},Eh=function(t){let e=(0,J.Ys)(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=(0,J.Ys)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),(0,J.Ys)(t).select("svg").selectAll("g.node").on("mouseover",function(){const s=(0,J.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(/&lt;br\/&gt;/g,"<br/>")),s.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),(0,J.Ys)(this).classed("hover",!1)})};io.push(Eh);const vh=function(t="gen-1"){ei={},mn={},Qs=[],io=[Eh],cs=[],$a={},to=0,pl=[],gl=!0,eo=t,sr()},Ch=t=>{eo=t||"gen-2"},Th=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},Sh=function(t,e,i){let r=t.trim(),s=i;t===i&&i.match(/\s/)&&(r=void 0);function n(u){const f={boolean:{},number:{},string:{}},d=[];let p;return{nodeList:u.filter(function(_){const T=typeof _;return _.stmt&&_.stmt==="dir"?(p=_.value,!1):_.trim()===""?!1:T in f?f[T].hasOwnProperty(_)?!1:f[T][_]=!0:d.includes(_)?!1:d.push(_)}),dir:p}}let a=[];const{nodeList:o,dir:l}=n(a.concat.apply(a,e));if(a=o,eo==="gen-1")for(let u=0;u<a.length;u++)a[u]=Jn(a[u]);r=r||"subGraph"+to,s=s||"",s=ro(s),to=to+1;const h={id:r,nodes:a,title:s.trim(),classes:[],dir:l};return b.info("Adding",h.id,h.nodes,h.dir),h.nodes=Oh(h,cs).nodes,cs.push(h),$a[r]=h,r},Qg=function(t){for(const[e,i]of cs.entries())if(i.id===t)return e;return-1};let $n=-1;const wh=[],Ah=function(t,e){const i=cs[e].nodes;if($n=$n+1,$n>2e3)return;if(wh[$n]=e,cs[e].id===t)return{result:!0,count:0};let r=0,s=1;for(;r<i.length;){const n=Qg(i[r]);if(n>=0){const a=Ah(t,n);if(a.result)return{result:!0,count:s+a.count};s=s+a.count}r=r+1}return{result:!1,count:s}},Lh=function(t){return wh[t]},Bh=function(){$n=-1,cs.length>0&&Ah("none",cs.length-1)},Ih=function(){return cs},Dh=()=>gl?(gl=!1,!0):!1,Jg=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}},$g=(t,e)=>{const i=e.length;let r=0;for(let s=0;s<i;++s)e[s]===t&&++r;return r},ty=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=$g(".",i);return a&&(s="dotted",n=a),{type:r,stroke:s,length:n}},Rh=(t,e)=>{const i=ty(t);let r;if(e){if(r=Jg(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},Nh=(t,e)=>{let i=!1;return t.forEach(r=>{r.nodes.indexOf(e)>=0&&(i=!0)}),i},Oh=(t,e)=>{const i=[];return t.nodes.forEach((r,s)=>{Nh(e,r)||i.push(t.nodes[s])}),{nodes:i}},Fh={firstGraph:Dh},Xr={parseDirective:ah,defaultConfig:()=>fn.flowchart,setAccTitle:nr,getAccTitle:fr,getAccDescription:gr,setAccDescription:pr,addVertex:oh,lookUpDomId:Jn,addLink:ch,updateLinkInterpolate:hh,updateLink:uh,addClass:dh,setDirection:fh,setClass:so,setTooltip:Xg,getTooltip:gh,setClickEvent:yh,setLink:ph,bindFunctions:mh,getDirection:bh,getVertices:xh,getEdges:kh,getClasses:_h,clear:vh,setGen:Ch,defaultStyle:Th,addSubGraph:Sh,getDepthFirstPos:Lh,indexNodes:Bh,getSubGraphs:Ih,destructLink:Rh,lex:Fh,exists:Nh,makeUniq:Oh,setDiagramTitle:Ir,getDiagramTitle:Dr},ey=Object.freeze(Object.defineProperty({__proto__:null,addClass:dh,addLink:ch,addSingleLink:lh,addSubGraph:Sh,addVertex:oh,bindFunctions:mh,clear:vh,default:Xr,defaultStyle:Th,destructLink:Rh,firstGraph:Dh,getClasses:_h,getDepthFirstPos:Lh,getDirection:bh,getEdges:kh,getSubGraphs:Ih,getTooltip:gh,getVertices:xh,indexNodes:Bh,lex:Fh,lookUpDomId:Jn,parseDirective:ah,setClass:so,setClickEvent:yh,setDirection:fh,setGen:Ch,setLink:ph,updateLink:uh,updateLinkInterpolate:hh},Symbol.toStringTag,{value:"Module"}));function Mh(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=hs(t,n,n,a);return i.intersect=function(l){return(0,Mi.A)(i,a,l)},o}function Ph(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=hs(t,a,s,o);return i.intersect=function(h){return(0,Mi.A)(i,o,h)},l}function Vh(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=hs(t,r,s,n);return i.intersect=function(o){return(0,Mi.A)(i,n,o)},a}function Yh(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=hs(t,r,s,n);return i.intersect=function(o){return(0,Mi.A)(i,n,o)},a}function zh(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=hs(t,r,s,n);return i.intersect=function(o){return(0,Mi.A)(i,n,o)},a}function Wh(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=hs(t,r,s,n);return i.intersect=function(o){return(0,Mi.A)(i,n,o)},a}function Uh(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=hs(t,r,s,n);return i.intersect=function(o){return(0,Mi.A)(i,n,o)},a}function Zh(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=hs(t,r,s,n);return i.intersect=function(o){return(0,Mi.A)(i,n,o)},a}function Hh(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,Ts.q)(i,a)},n}function Gh(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=hs(t,r,s,n);return i.intersect=function(o){return(0,Mi.A)(i,n,o)},a}function jh(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,Ts.q)(i,h),f=u.x-i.x;if(s!=0&&(Math.abs(f)<i.width/2||Math.abs(f)==i.width/2&&Math.abs(u.y-i.y)>i.height/2-n)){let d=n*n*(1-f*f/(s*s));d!=0&&(d=Math.sqrt(d)),d=n-d,h.y-i.y>0&&(d=-d),u.y+=d}return u},l}function iy(t){t.shapes().question=Mh,t.shapes().hexagon=Ph,t.shapes().stadium=Hh,t.shapes().subroutine=Gh,t.shapes().cylinder=jh,t.shapes().rect_left_inv_arrow=Vh,t.shapes().lean_right=Yh,t.shapes().lean_left=zh,t.shapes().trapezoid=Wh,t.shapes().inv_trapezoid=Uh,t.shapes().rect_right_inv_arrow=Zh}function ry(t){t({question:Mh}),t({hexagon:Ph}),t({stadium:Hh}),t({subroutine:Gh}),t({cylinder:jh}),t({rect_left_inv_arrow:Vh}),t({lean_right:Yh}),t({lean_left:zh}),t({trapezoid:Wh}),t({inv_trapezoid:Uh}),t({rect_right_inv_arrow:Zh})}function hs(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 sy={addToRender:iy,addToRenderV2:ry},qh={},ny=function(t){const e=Object.keys(t);for(const i of e)qh[i]=t[i]},Xh=function(t,e,i,r,s,n){const a=r?r.select(`[id="${i}"]`):(0,J.Ys)(`[id="${i}"]`),o=s||document;Object.keys(t).forEach(function(h){const u=t[h];let f="default";u.classes.length>0&&(f=u.classes.join(" "));const d=ss(u.styles);let p=u.text!==void 0?u.text:u.id,k;if(Je(M().flowchart.htmlLabels)){const S={label:p.replace(/fa[blrs]?:fa-[\w-]+/g,E=>`<i class='${E.replace(":"," ")}'></i>`)};k=(0,is.a)(a,S).node(),k.parentNode.removeChild(k)}else{const S=o.createElementNS("http://www.w3.org/2000/svg","text");S.setAttribute("style",d.labelStyle.replace("color:","fill:"));const E=p.split(Jt.lineBreakRegex);for(const I of E){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=I,S.appendChild(z)}k=S}let _=0,T="";switch(u.type){case"round":_=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"}b.warn("Adding node",u.id,u.domId),e.setNode(n.db.lookUpDomId(u.id),{labelType:"svg",labelStyle:d.labelStyle,shape:T,label:k,rx:_,ry:_,class:f,style:d.style,id:n.db.lookUpDomId(u.id)})})},Kh=function(t,e,i){let r=0,s,n;if(t.defaultStyle!==void 0){const a=ss(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 f="",d="";if(a.style!==void 0){const p=ss(a.style);f=p.style,d=p.labelStyle}else switch(a.stroke){case"normal":f="fill:none",s!==void 0&&(f=s),n!==void 0&&(d=n);break;case"dotted":f="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":f=" stroke-width: 3.5px;fill:none";break}u.style=f,u.labelStyle=d,a.interpolate!==void 0?u.curve=_r(a.interpolate,J.c_6):t.defaultInterpolate!==void 0?u.curve=_r(t.defaultInterpolate,J.c_6):u.curve=_r(qh.curve,J.c_6),a.text===void 0?a.style!==void 0&&(u.arrowheadStyle="fill: #333"):(u.arrowheadStyle="fill: #333",u.labelpos="c",Je(M().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(Jt.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)})},ay={setConf:ny,addVertices:Xh,addEdges:Kh,getClasses:function(t,e){b.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch(i){return b.error(i),{}}},draw:function(t,e,i,r){b.info("Drawing flowchart"),r.db.clear();const{securityLevel:s,flowchart:n}=M();let a;s==="sandbox"&&(a=(0,J.Ys)("#i"+e));const o=s==="sandbox"?(0,J.Ys)(a.nodes()[0].contentDocument.body):(0,J.Ys)("body"),l=s==="sandbox"?a.nodes()[0].contentDocument:document;try{r.parser.parse(t)}catch{b.debug("Parsing failed")}let h=r.db.getDirection();h===void 0&&(h="TD");const u=n.nodeSpacing||50,f=n.rankSpacing||50,d=new Gi.k({multigraph:!0,compound:!0}).setGraph({rankdir:h,nodesep:u,ranksep:f,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});let p;const k=r.db.getSubGraphs();for(let ot=k.length-1;ot>=0;ot--)p=k[ot],r.db.addVertex(p.id,p.title,"group",void 0,p.classes);const _=r.db.getVertices();b.warn("Get vertices",_);const T=r.db.getEdges();let S=0;for(S=k.length-1;S>=0;S--){p=k[S],(0,J.td_)("cluster").append("text");for(let ot=0;ot<p.nodes.length;ot++)b.warn("Setting subgraph",p.nodes[ot],r.db.lookUpDomId(p.nodes[ot]),r.db.lookUpDomId(p.id)),d.setParent(r.db.lookUpDomId(p.nodes[ot]),r.db.lookUpDomId(p.id))}Xh(_,d,e,o,l,r),Kh(T,d,r);const E=new Us.sY;sy.addToRender(E),E.arrows().none=function(Y,O,v,L){const m=Y.append("marker").attr("id",O).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,ur.bg)(m,v[L+"Style"])},E.arrows().normal=function(Y,O){Y.append("marker").attr("id",O).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 I=o.select(`[id="${e}"]`),z=o.select("#"+e+" g");for(E(z,d),z.selectAll("g.node").attr("title",function(){return r.db.getTooltip(this.id)}),r.db.indexNodes("subGraph"+S),S=0;S<k.length;S++)if(p=k[S],p.title!=="undefined"){const ot=l.querySelectorAll("#"+e+' [id="'+r.db.lookUpDomId(p.id)+'"] rect'),Y=l.querySelectorAll("#"+e+' [id="'+r.db.lookUpDomId(p.id)+'"]'),O=ot[0].x.baseVal.value,v=ot[0].y.baseVal.value,L=ot[0].width.baseVal.value,m=(0,J.Ys)(Y[0]).select(".label");m.attr("transform",`translate(${O+L/2}, ${v+14})`),m.attr("id",e+"Text");for(let B=0;B<p.classes.length;B++)Y[0].classList.add(p.classes[B])}if(!n.htmlLabels){const ot=l.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const Y of ot){const O=Y.getBBox(),v=l.createElementNS("http://www.w3.org/2000/svg","rect");v.setAttribute("rx",0),v.setAttribute("ry",0),v.setAttribute("width",O.width),v.setAttribute("height",O.height),Y.insertBefore(v,Y.firstChild)}}Fn(d,I,n.diagramPadding,n.useMaxWidth),Object.keys(_).forEach(function(ot){const Y=_[ot];if(Y.link){const O=o.select("#"+e+' [id="'+r.db.lookUpDomId(ot)+'"]');if(O){const v=l.createElementNS("http://www.w3.org/2000/svg","a");v.setAttributeNS("http://www.w3.org/2000/svg","class",Y.classes.join(" ")),v.setAttributeNS("http://www.w3.org/2000/svg","href",Y.link),v.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),s==="sandbox"?v.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):Y.linkTarget&&v.setAttributeNS("http://www.w3.org/2000/svg","target",Y.linkTarget);const L=O.insert(function(){return v},":first-child"),w=O.select(".label-container");w&&L.append(function(){return w.node()});const m=O.select(".label");m&&L.append(function(){return m.node()})}}})}},Qh={},oy=function(t){const e=Object.keys(t);for(const i of e)Qh[i]=t[i]},Jh=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 f=ss(h.styles);let d=h.text!==void 0?h.text:h.id,p;if(Je(M().flowchart.htmlLabels)){const T={label:d.replace(/fa[blrs]?:fa-[\w-]+/g,S=>`<i class='${S.replace(":"," ")}'></i>`)};p=(0,is.a)(a,T).node(),p.parentNode.removeChild(p)}else{const T=s.createElementNS("http://www.w3.org/2000/svg","text");T.setAttribute("style",f.labelStyle.replace("color:","fill:"));const S=d.split(Jt.lineBreakRegex);for(const E of S){const I=s.createElementNS("http://www.w3.org/2000/svg","tspan");I.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),I.setAttribute("dy","1em"),I.setAttribute("x","1"),I.textContent=E,T.appendChild(I)}p=T}let k=0,_="";switch(h.type){case"round":k=5,_="rect";break;case"square":_="rect";break;case"diamond":_="question";break;case"hexagon":_="hexagon";break;case"odd":_="rect_left_inv_arrow";break;case"lean_right":_="lean_right";break;case"lean_left":_="lean_left";break;case"trapezoid":_="trapezoid";break;case"inv_trapezoid":_="inv_trapezoid";break;case"odd_right":_="rect_left_inv_arrow";break;case"circle":_="circle";break;case"ellipse":_="ellipse";break;case"stadium":_="stadium";break;case"subroutine":_="subroutine";break;case"cylinder":_="cylinder";break;case"group":_="rect";break;case"doublecircle":_="doublecircle";break;default:_="rect"}e.setNode(h.id,{labelStyle:f.labelStyle,shape:_,labelText:d,rx:k,ry:k,class:u,style:f.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:M().flowchart.padding}),b.info("setNode",{labelStyle:f.labelStyle,shape:_,labelText:d,rx:k,ry:k,class:u,style:f.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:M().flowchart.padding})})},$h=function(t,e,i){b.info("abc78 edges = ",t);let r=0,s={},n,a;if(t.defaultStyle!==void 0){const o=ss(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,b.info("abc78 new entry",l,s[l])):(s[l]++,b.info("abc78 new entry",l,s[l]));let h=l+"-"+s[l];b.info("abc78 new link id to be used is",l,h,s[l]);var u="LS-"+o.start,f="LE-"+o.end;const d={style:"",labelStyle:""};switch(d.minlen=o.length||1,o.type==="arrow_open"?d.arrowhead="none":d.arrowhead="normal",d.arrowTypeStart="arrow_open",d.arrowTypeEnd="arrow_open",o.type){case"double_arrow_cross":d.arrowTypeStart="arrow_cross";case"arrow_cross":d.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":d.arrowTypeStart="arrow_point";case"arrow_point":d.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":d.arrowTypeStart="arrow_circle";case"arrow_circle":d.arrowTypeEnd="arrow_circle";break}let p="",k="";switch(o.stroke){case"normal":p="fill:none;",n!==void 0&&(p=n),a!==void 0&&(k=a),d.thickness="normal",d.pattern="solid";break;case"dotted":d.thickness="normal",d.pattern="dotted",d.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":d.thickness="thick",d.pattern="solid",d.style="stroke-width: 3.5px;fill:none;";break}if(o.style!==void 0){const _=ss(o.style);p=_.style,k=_.labelStyle}d.style=d.style+=p,d.labelStyle=d.labelStyle+=k,o.interpolate!==void 0?d.curve=_r(o.interpolate,J.c_6):t.defaultInterpolate!==void 0?d.curve=_r(t.defaultInterpolate,J.c_6):d.curve=_r(Qh.curve,J.c_6),o.text===void 0?o.style!==void 0&&(d.arrowheadStyle="fill: #333"):(d.arrowheadStyle="fill: #333",d.labelpos="c"),d.labelType="text",d.label=o.text.replace(Jt.lineBreakRegex,`
1330
+ `),o.style===void 0&&(d.style=d.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),d.labelStyle=d.labelStyle.replace("color:","fill:"),d.id=h,d.classes="flowchart-link "+u+" "+f,e.setEdge(o.start,o.end,d,r)})},yl={setConf:oy,addVertices:Jh,addEdges:$h,getClasses:function(t,e){b.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch{return}},draw:function(t,e,i,r){b.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}=M(),o=a.nodeSpacing||50,l=a.rankSpacing||50;let h;n==="sandbox"&&(h=(0,J.Ys)("#i"+e));const u=n==="sandbox"?(0,J.Ys)(h.nodes()[0].contentDocument.body):(0,J.Ys)("body"),f=n==="sandbox"?h.nodes()[0].contentDocument:document,d=new Gi.k({multigraph:!0,compound:!0}).setGraph({rankdir:s,nodesep:o,ranksep:l,marginx:0,marginy:0}).setDefaultEdgeLabel(function(){return{}});let p;const k=r.db.getSubGraphs();b.info("Subgraphs - ",k);for(let Q=k.length-1;Q>=0;Q--)p=k[Q],b.info("Subgraph - ",p),r.db.addVertex(p.id,p.title,"group",void 0,p.classes,p.dir);const _=r.db.getVertices(),T=r.db.getEdges();b.info("Edges",T);let S=0;for(S=k.length-1;S>=0;S--){p=k[S],(0,J.td_)("cluster").append("text");for(let Q=0;Q<p.nodes.length;Q++)b.info("Setting up subgraphs",p.nodes[Q],p.id),d.setParent(p.nodes[Q],p.id)}Jh(_,d,e,u,f,r),$h(T,d);const E=u.select(`[id="${e}"]`),I=u.select("#"+e+" g");if(ll(I,d,["point","circle","cross"],"flowchart",e),me.insertTitle(E,"flowchartTitleText",a.titleTopMargin,r.db.getDiagramTitle()),Fn(d,E,a.diagramPadding,a.useMaxWidth),r.db.indexNodes("subGraph"+S),!a.htmlLabels){const Q=f.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const ot of Q){const Y=ot.getBBox(),O=f.createElementNS("http://www.w3.org/2000/svg","rect");O.setAttribute("rx",0),O.setAttribute("ry",0),O.setAttribute("width",Y.width),O.setAttribute("height",Y.height),ot.insertBefore(O,ot.firstChild)}}Object.keys(_).forEach(function(Q){const ot=_[Q];if(ot.link){const Y=(0,J.Ys)("#"+e+' [id="'+Q+'"]');if(Y){const O=f.createElementNS("http://www.w3.org/2000/svg","a");O.setAttributeNS("http://www.w3.org/2000/svg","class",ot.classes.join(" ")),O.setAttributeNS("http://www.w3.org/2000/svg","href",ot.link),O.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),n==="sandbox"?O.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):ot.linkTarget&&O.setAttributeNS("http://www.w3.org/2000/svg","target",ot.linkTarget);const v=Y.insert(function(){return O},":first-child"),L=Y.select(".label-container");L&&v.append(function(){return L.node()});const w=Y.select(".label");w&&v.append(function(){return w.node()})}}})}};var ml=function(){var t=function(O,v,L,w){for(L=L||{},w=O.length;w--;L[O[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],f=[1,22],d=[1,23],p=[1,24],k=[1,25],_=[1,26],T=[1,27],S=[1,29],E=[1,31],I=[1,34],z=[5,7,9,11,12,13,14,15,16,17,18,19,20,21,23,25,26,28,35,40],Q={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,N){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:f,20:d,21:p,23:k,25:_,26:T,27:28,28:S,30:4,35:E,40:i},{32:32,33:[1,33],43:I},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:f,20:d,21:p,23:k,25:_,26:T,27:28,28:S,30:4,35:E,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:I},{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=[],N=this.table,y="",V=0,wt=0,nt=2,rt=1,st=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 xt=et.yylloc;g.push(xt);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 Qt;return Qt=m.pop()||et.lex()||rt,typeof Qt!="number"&&(Qt instanceof Array&&(m=Qt,Qt=m.pop()),Qt=L.symbols_[Qt]||Qt),Qt}for(var U,gt,$,q,R={},A,H,C,ft;;){if(gt=w[w.length-1],this.defaultActions[gt]?$=this.defaultActions[gt]:((U===null||typeof U>"u")&&(U=jt()),$=N[gt]&&N[gt][U]),typeof $>"u"||!$.length||!$[0]){var x="";ft=[];for(A in N[gt])this.terminals_[A]&&A>nt&&ft.push("'"+this.terminals_[A]+"'");et.showPosition?x="Parse error on line "+(V+1)+`:
1331
+ `+et.showPosition()+`
1332
+ Expecting `+ft.join(", ")+", got '"+(this.terminals_[U]||U)+"'":x="Parse error on line "+(V+1)+": Unexpected "+(U==rt?"end of input":"'"+(this.terminals_[U]||U)+"'"),this.parseError(x,{text:et.match,token:this.terminals_[U]||U,line:et.yylineno,loc:xt,expected:ft})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+gt+", 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,V=et.yylineno,xt=et.yylloc;break;case 2:if(H=this.productions_[$[1]][1],R.$=B[B.length-H],R._$={first_line:g[g.length-(H||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(H||1)].first_column,last_column:g[g.length-1].last_column},Z&&(R._$.range=[g[g.length-(H||1)].range[0],g[g.length-1].range[1]]),q=this.performAction.apply(R,[y,wt,V,tt.yy,$[1],B,g].concat(st)),typeof q<"u")return q;H&&(w=w.slice(0,-1*H*2),B=B.slice(0,-1*H),g=g.slice(0,-1*H)),w.push(this.productions_[$[1]][0]),B.push(R.$),g.push(R._$),C=N[w[w.length-2]][w[w.length-1]],w.push(C);break;case 3:return!0}}return!0}},ot=function(){var O={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 O}();Q.lexer=ot;function Y(){this.yy={}}return Y.prototype=Q,Q.Parser=Y,new Y}();ml.parser=ml;const ly=ml,cy=t=>t.match(/^\s*gantt/)!==null;bi().extend(vt()),bi().extend(Vt()),bi().extend(ie());let Kr="",bl="",xl,kl="",ta=[],ea=[],_l={},El=[],no=[],bn="";const t0=["active","done","crit","milestone"];let vl=[],ia=!1,Cl=!1,Tl=0;const hy=function(t,e,i){ii.parseDirective(this,t,e,i)},uy=function(){El=[],no=[],bn="",vl=[],ao=0,wl=void 0,oo=void 0,Li=[],Kr="",bl="",xl=void 0,kl="",ta=[],ea=[],ia=!1,Cl=!1,Tl=0,_l={},sr()},dy=function(t){bl=t},fy=function(){return bl},py=function(t){xl=t},gy=function(){return xl},yy=function(t){kl=t},my=function(){return kl},by=function(t){Kr=t},xy=function(){ia=!0},ky=function(){return ia},_y=function(){Cl=!0},Ey=function(){return Cl},vy=function(){return Kr},Cy=function(t){ta=t.toLowerCase().split(/[\s,]+/)},Ty=function(){return ta},Sy=function(t){ea=t.toLowerCase().split(/[\s,]+/)},wy=function(){return ea},Ay=function(){return _l},Ly=function(t){bn=t,El.push(t)},By=function(){return El},Iy=function(){let t=a0();const e=10;let i=0;for(;!t&&i<e;)t=a0(),i++;return no=Li,no},e0=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()))},i0=function(t,e,i,r){if(!i.length||t.manualEndTime)return;let s;t.startTime instanceof Date?s=bi()(t.startTime):s=bi()(t.startTime,e,!0),s=s.add(1,"d");let n;t.endTime instanceof Date?n=bi()(t.endTime):n=bi()(t.endTime,e,!0);const[a,o]=Dy(s,n,e,i,r);t.endTime=a.toDate(),t.renderEndTime=o},Dy=function(t,e,i,r,s){let n=!1,a=null;for(;t<=e;)n||(a=e.toDate()),n=e0(t,i,r,s),n&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,a]},Sl=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=kn(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=bi()(i,e.trim(),!0);if(n.isValid())return n.toDate();{b.debug("Invalid date:"+i),b.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}},r0=function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},s0=function(t,e,i,r=!1){i=i.trim();let s=bi()(i,e.trim(),!0);if(s.isValid())return r&&(s=s.add(1,"d")),s.toDate();let n=bi()(t);const[a,o]=r0(i);if(!Number.isNaN(a)){const l=n.add(a,o);l.isValid()&&(n=l)}return n.toDate()};let ao=0;const xn=function(t){return t===void 0?(ao=ao+1,"task"+ao):t},Ry=function(t,e){let i;e.substr(0,1)===":"?i=e.substr(1,e.length):i=e;const r=i.split(","),s={};c0(r,s,t0);for(let a=0;a<r.length;a++)r[a]=r[a].trim();let n="";switch(r.length){case 1:s.id=xn(),s.startTime=t.endTime,n=r[0];break;case 2:s.id=xn(),s.startTime=Sl(void 0,Kr,r[0]),n=r[1];break;case 3:s.id=xn(r[0]),s.startTime=Sl(void 0,Kr,r[1]),n=r[2];break}return n&&(s.endTime=s0(s.startTime,Kr,n,ia),s.manualEndTime=bi()(n,"YYYY-MM-DD",!0).isValid(),i0(s,Kr,ea,ta)),s},Ny=function(t,e){let i;e.substr(0,1)===":"?i=e.substr(1,e.length):i=e;const r=i.split(","),s={};c0(r,s,t0);for(let n=0;n<r.length;n++)r[n]=r[n].trim();switch(r.length){case 1:s.id=xn(),s.startTime={type:"prevTaskEnd",id:t},s.endTime={data:r[0]};break;case 2:s.id=xn(),s.startTime={type:"getStartDate",startData:r[0]},s.endTime={data:r[1]};break;case 3:s.id=xn(r[0]),s.startTime={type:"getStartDate",startData:r[1]},s.endTime={data:r[2]};break}return s};let wl,oo,Li=[];const n0={},Oy=function(t,e){const i={section:bn,type:bn,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},r=Ny(oo,e);i.raw.startTime=r.startTime,i.raw.endTime=r.endTime,i.id=r.id,i.prevTaskId=oo,i.active=r.active,i.done=r.done,i.crit=r.crit,i.milestone=r.milestone,i.order=Tl,Tl++;const s=Li.push(i);oo=i.id,n0[i.id]=s-1},kn=function(t){const e=n0[t];return Li[e]},Fy=function(t,e){const i={section:bn,type:bn,description:t,task:t,classes:[]},r=Ry(wl,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,wl=i,no.push(i)},a0=function(){const t=function(i){const r=Li[i];let s="";switch(Li[i].raw.startTime.type){case"prevTaskEnd":{const n=kn(r.prevTaskId);r.startTime=n.endTime;break}case"getStartDate":s=Sl(void 0,Kr,Li[i].raw.startTime.startData),s&&(Li[i].startTime=s);break}return Li[i].startTime&&(Li[i].endTime=s0(Li[i].startTime,Kr,Li[i].raw.endTime.data,ia),Li[i].endTime&&(Li[i].processed=!0,Li[i].manualEndTime=bi()(Li[i].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),i0(Li[i],Kr,ea,ta))),Li[i].processed};let e=!0;for(const[i,r]of Li.entries())t(i),e=e&&r.processed;return e},My=function(t,e){let i=e;M().securityLevel!=="loose"&&(i=(0,Hi.Nm)(e)),t.split(",").forEach(function(r){kn(r)!==void 0&&(l0(r,()=>{window.open(i,"_self")}),_l[r]=i)}),o0(t,"clickable")},o0=function(t,e){t.split(",").forEach(function(i){let r=kn(i);r!==void 0&&r.classes.push(e)})},Py=function(t,e,i){if(M().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),kn(t)!==void 0&&l0(t,()=>{me.runFunc(e,...r)})},l0=function(t,e){vl.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()})})},Al={parseDirective:hy,getConfig:()=>M().gantt,clear:uy,setDateFormat:by,getDateFormat:vy,enableInclusiveEndDates:xy,endDatesAreInclusive:ky,enableTopAxis:_y,topAxisEnabled:Ey,setAxisFormat:dy,getAxisFormat:fy,setTickInterval:py,getTickInterval:gy,setTodayMarker:yy,getTodayMarker:my,setAccTitle:nr,getAccTitle:fr,setDiagramTitle:Ir,getDiagramTitle:Dr,setAccDescription:pr,getAccDescription:gr,addSection:Ly,getSections:By,getTasks:Iy,addTask:Oy,findTaskById:kn,addTaskOrg:Fy,setIncludes:Cy,getIncludes:Ty,setExcludes:Sy,getExcludes:wy,setClickEvent:function(t,e,i){t.split(",").forEach(function(r){Py(r,e,i)}),o0(t,"clickable")},setLink:My,getLinks:Ay,bindFunctions:function(t){vl.forEach(function(e){e(t)})},parseDuration:r0,isInvalidDate:e0};function c0(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 Vy=function(){b.debug("Something is calling, setConf, remove the call")};let us;const Yy={setConf:Vy,draw:function(t,e,i,r){const s=M().gantt,n=M().securityLevel;let a;n==="sandbox"&&(a=(0,J.Ys)("#i"+e));const o=n==="sandbox"?(0,J.Ys)(a.nodes()[0].contentDocument.body):(0,J.Ys)("body"),l=n==="sandbox"?a.nodes()[0].contentDocument:document,h=l.getElementById(e);us=h.parentElement.offsetWidth,us===void 0&&(us=1200),s.useWidth!==void 0&&(us=s.useWidth);const u=r.db.getTasks(),f=u.length*(s.barHeight+s.barGap)+2*s.topPadding;h.setAttribute("viewBox","0 0 "+us+" "+f);const d=o.select(`[id="${e}"]`),p=(0,J.Xf)().domain([(0,J.VV$)(u,function(L){return L.startTime}),(0,J.Fp7)(u,function(L){return L.endTime})]).rangeRound([0,us-s.leftPadding-s.rightPadding]);let k=[];for(const L of u)k.push(L.type);const _=k;k=Y(k);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,us,f),Br(d,f,us,s.useMaxWidth),d.append("text").text(r.db.getDiagramTitle()).attr("x",us/2).attr("y",s.titleTopMargin).attr("class","titleText");function S(L,w,m){const B=s.barHeight,g=B+s.barGap,N=s.topPadding,y=s.leftPadding,V=(0,J.BYU)().domain([0,k.length]).range(["#00B9FA","#F95002"]).interpolate(J.JHv);I(g,N,y,w,m,L,r.db.getExcludes(),r.db.getIncludes()),z(y,N,w,m),E(L,g,N,y,B,V,w),Q(g,N),ot(y,N,w,m)}function E(L,w,m,B,g,N,y){d.append("g").selectAll("rect").data(L).enter().append("rect").attr("x",0).attr("y",function(rt,st){return st=rt.order,st*w+m-2}).attr("width",function(){return y-s.rightPadding/2}).attr("height",w).attr("class",function(rt){for(const[st,et]of k.entries())if(rt.type===et)return"section section"+st%s.numberSectionStyles;return"section section0"});const V=d.append("g").selectAll("rect").data(L).enter(),wt=r.db.getLinks();if(V.append("rect").attr("id",function(rt){return rt.id}).attr("rx",3).attr("ry",3).attr("x",function(rt){return rt.milestone?p(rt.startTime)+B+.5*(p(rt.endTime)-p(rt.startTime))-.5*g:p(rt.startTime)+B}).attr("y",function(rt,st){return st=rt.order,st*w+m}).attr("width",function(rt){return rt.milestone?g:p(rt.renderEndTime||rt.endTime)-p(rt.startTime)}).attr("height",g).attr("transform-origin",function(rt,st){return st=rt.order,(p(rt.startTime)+B+.5*(p(rt.endTime)-p(rt.startTime))).toString()+"px "+(st*w+m+.5*g).toString()+"px"}).attr("class",function(rt){const st="task";let et="";rt.classes.length>0&&(et=rt.classes.join(" "));let tt=0;for(const[xt,Z]of k.entries())rt.type===Z&&(tt=xt%s.numberSectionStyles);let Tt="";return rt.active?rt.crit?Tt+=" activeCrit":Tt=" active":rt.done?rt.crit?Tt=" doneCrit":Tt=" done":rt.crit&&(Tt+=" crit"),Tt.length===0&&(Tt=" task"),rt.milestone&&(Tt=" milestone "+Tt),Tt+=tt,Tt+=" "+et,st+Tt}),V.append("text").attr("id",function(rt){return rt.id+"-text"}).text(function(rt){return rt.task}).attr("font-size",s.fontSize).attr("x",function(rt){let st=p(rt.startTime),et=p(rt.renderEndTime||rt.endTime);rt.milestone&&(st+=.5*(p(rt.endTime)-p(rt.startTime))-.5*g),rt.milestone&&(et=st+g);const tt=this.getBBox().width;return tt>et-st?et+tt+1.5*s.leftPadding>y?st+B-5:et+B+5:(et-st)/2+st+B}).attr("y",function(rt,st){return st=rt.order,st*w+s.barHeight/2+(s.fontSize/2-2)+m}).attr("text-height",g).attr("class",function(rt){const st=p(rt.startTime);let et=p(rt.endTime);rt.milestone&&(et=st+g);const tt=this.getBBox().width;let Tt="";rt.classes.length>0&&(Tt=rt.classes.join(" "));let xt=0;for(const[jt,U]of k.entries())rt.type===U&&(xt=jt%s.numberSectionStyles);let Z="";return rt.active&&(rt.crit?Z="activeCritText"+xt:Z="activeText"+xt),rt.done?rt.crit?Z=Z+" doneCritText"+xt:Z=Z+" doneText"+xt:rt.crit&&(Z=Z+" critText"+xt),rt.milestone&&(Z+=" milestoneText"),tt>et-st?et+tt+1.5*s.leftPadding>y?Tt+" taskTextOutsideLeft taskTextOutside"+xt+" "+Z:Tt+" taskTextOutsideRight taskTextOutside"+xt+" "+Z+" width-"+tt:Tt+" taskText taskText"+xt+" "+Z+" width-"+tt}),M().securityLevel==="sandbox"){let rt;rt=(0,J.Ys)("#i"+e);const st=rt.nodes()[0].contentDocument;V.filter(function(et){return wt[et.id]!==void 0}).each(function(et){var tt=st.querySelector("#"+et.id),Tt=st.querySelector("#"+et.id+"-text");const xt=tt.parentNode;var Z=st.createElement("a");Z.setAttribute("xlink:href",wt[et.id]),Z.setAttribute("target","_top"),xt.appendChild(Z),Z.appendChild(tt),Z.appendChild(Tt)})}}function I(L,w,m,B,g,N,y,V){const wt=N.reduce((xt,{startTime:Z})=>xt?Math.min(xt,Z):Z,0),nt=N.reduce((xt,{endTime:Z})=>xt?Math.max(xt,Z):Z,0),rt=r.db.getDateFormat();if(!wt||!nt)return;const st=[];let et=null,tt=bi()(wt);for(;tt.valueOf()<=nt;)r.db.isInvalidDate(tt,rt,y,V)?et?et.end=tt:et={start:tt,end:tt}:et&&(st.push(et),et=null),tt=tt.add(1,"d");d.append("g").selectAll("rect").data(st).enter().append("rect").attr("id",function(xt){return"exclude-"+xt.start.format("YYYY-MM-DD")}).attr("x",function(xt){return p(xt.start)+m}).attr("y",s.gridLineStartPadding).attr("width",function(xt){const Z=xt.end.add(1,"day");return p(Z)-p(xt.start)}).attr("height",g-w-s.gridLineStartPadding).attr("transform-origin",function(xt,Z){return(p(xt.start)+m+.5*(p(xt.end)-p(xt.start))).toString()+"px "+(Z*L+.5*g).toString()+"px"}).attr("class","exclude-range")}function z(L,w,m,B){let g=(0,J.LLu)(p).tickSize(-B+w+s.gridLineStartPadding).tickFormat((0,J.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 V=y[1];switch(y[2]){case"minute":g.ticks(J.Z_i.every(V));break;case"hour":g.ticks(J.WQD.every(V));break;case"day":g.ticks(J.rr1.every(V));break;case"week":g.ticks(J.NGh.every(V));break;case"month":g.ticks(J.F0B.every(V));break}}if(d.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 V=(0,J.F5q)(p).tickSize(-B+w+s.gridLineStartPadding).tickFormat((0,J.i$Z)(r.db.getAxisFormat()||s.axisFormat||"%Y-%m-%d"));if(y!==null){const wt=y[1];switch(y[2]){case"minute":V.ticks(J.Z_i.every(wt));break;case"hour":V.ticks(J.WQD.every(wt));break;case"day":V.ticks(J.rr1.every(wt));break;case"week":V.ticks(J.NGh.every(wt));break;case"month":V.ticks(J.F0B.every(wt));break}}d.append("g").attr("class","grid").attr("transform","translate("+L+", "+w+")").call(V).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function Q(L,w){const m=[];let B=0;for(const[g,N]of k.entries())m[g]=[N,v(N,_)];d.append("g").selectAll("text").data(m).enter().append(function(g){const N=g[0].split(Jt.lineBreakRegex),y=-(N.length-1)/2,V=l.createElementNS("http://www.w3.org/2000/svg","text");V.setAttribute("dy",y+"em");for(const[wt,nt]of N.entries()){const rt=l.createElementNS("http://www.w3.org/2000/svg","tspan");rt.setAttribute("alignment-baseline","central"),rt.setAttribute("x","10"),wt>0&&rt.setAttribute("dy","1em"),rt.textContent=nt,V.appendChild(rt)}return V}).attr("x",10).attr("y",function(g,N){if(N>0)for(let y=0;y<N;y++)return B+=m[N-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[N,y]of k.entries())if(g[0]===y)return"sectionTitle sectionTitle"+N%s.numberSectionStyles;return"sectionTitle"})}function ot(L,w,m,B){const g=r.db.getTodayMarker();if(g==="off")return;const N=d.append("g").attr("class","today"),y=new Date,V=N.append("line");V.attr("x1",p(y)+L).attr("x2",p(y)+L).attr("y1",s.titleTopMargin).attr("y2",B-s.titleTopMargin).attr("class","today"),g!==""&&V.attr("style",g.replace(/,/g,";"))}function Y(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 O(L){let w=L.length;const m={};for(;w;)m[L[--w]]=(m[L[w]]||0)+1;return m}function v(L,w){return O(w)[L]||0}}};var Ll=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,f,d){switch(f.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],f=[],d=this.table,p="",k=0,_=0,T=2,S=1,E=f.slice.call(arguments,1),I=Object.create(this.lexer),z={yy:{}};for(var Q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Q)&&(z.yy[Q]=this.yy[Q]);I.setInput(a,z.yy),z.yy.lexer=I,z.yy.parser=this,typeof I.yylloc>"u"&&(I.yylloc={});var ot=I.yylloc;f.push(ot);var Y=I.options&&I.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(){var nt;return nt=h.pop()||I.lex()||S,typeof nt!="number"&&(nt instanceof Array&&(h=nt,nt=h.pop()),nt=o.symbols_[nt]||nt),nt}for(var v,L,w,m,B={},g,N,y,V;;){if(L=l[l.length-1],this.defaultActions[L]?w=this.defaultActions[L]:((v===null||typeof v>"u")&&(v=O()),w=d[L]&&d[L][v]),typeof w>"u"||!w.length||!w[0]){var wt="";V=[];for(g in d[L])this.terminals_[g]&&g>T&&V.push("'"+this.terminals_[g]+"'");I.showPosition?wt="Parse error on line "+(k+1)+`:
1336
+ `+I.showPosition()+`
1337
+ Expecting `+V.join(", ")+", got '"+(this.terminals_[v]||v)+"'":wt="Parse error on line "+(k+1)+": Unexpected "+(v==S?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(wt,{text:I.match,token:this.terminals_[v]||v,line:I.yylineno,loc:ot,expected:V})}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(I.yytext),f.push(I.yylloc),l.push(w[1]),v=null,_=I.yyleng,p=I.yytext,k=I.yylineno,ot=I.yylloc;break;case 2:if(N=this.productions_[w[1]][1],B.$=u[u.length-N],B._$={first_line:f[f.length-(N||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(N||1)].first_column,last_column:f[f.length-1].last_column},Y&&(B._$.range=[f[f.length-(N||1)].range[0],f[f.length-1].range[1]]),m=this.performAction.apply(B,[p,_,k,z.yy,w[1],u,f].concat(E)),typeof m<"u")return m;N&&(l=l.slice(0,-1*N*2),u=u.slice(0,-1*N),f=f.slice(0,-1*N)),l.push(this.productions_[w[1]][0]),u.push(B.$),f.push(B._$),y=d[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 f in u)this[f]=u[f];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(),f=0;f<u.length;f++)if(l=this._input.match(this.rules[u[f]]),l&&(!o||l[0].length>o[0].length)){if(o=l,h=f,this.options.backtrack_lexer){if(a=this.test_match(l,u[f]),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}();Ll.parser=Ll;const zy=Ll;var h0="",u0=!1;const Wy={setMessage:t=>{b.debug("Setting message to: "+t),h0=t},getMessage:()=>h0,setInfo:t=>{u0=t},getInfo:()=>u0,clear:sr},Uy={draw:(t,e,i)=>{try{b.debug(`Rendering info diagram
1341
+ `+t);const r=M().securityLevel;let s;r==="sandbox"&&(s=(0,J.Ys)("#i"+e));const a=(r==="sandbox"?(0,J.Ys)(s.nodes()[0].contentDocument.body):(0,J.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){b.error("Error while rendering info diagram"),b.error(r.message)}}},Zy=t=>t.match(/^\s*info/)!==null;var Bl=function(){var t=function(ot,Y,O,v){for(O=O||{},v=ot.length;v--;O[ot[v]]=Y);return O},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],f=[1,18],d=[1,19],p=[1,20],k=[1,21],_=[1,22],T=[1,23],S=[1,28],E=[6,26,27,28,29],I={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(Y,O,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:f,13:d,15:p,17:k,19:_,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:f,13:d,15:p,17:k,19:_,20:T,29:n}),t(E,[2,16]),{25:34,31:[1,35]},t(E,[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(E,[2,17])],defaultActions:{9:[2,21],10:[2,1],11:[2,2],35:[2,23]},parseError:function(Y,O){if(O.recoverable)this.trace(Y);else{var v=new Error(Y);throw v.hash=O,v}},parse:function(Y){var O=this,v=[0],L=[],w=[null],m=[],B=this.table,g="",N=0,y=0,V=2,wt=1,nt=m.slice.call(arguments,1),rt=Object.create(this.lexer),st={yy:{}};for(var et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,et)&&(st.yy[et]=this.yy[et]);rt.setInput(Y,st.yy),st.yy.lexer=rt,st.yy.parser=this,typeof rt.yylloc>"u"&&(rt.yylloc={});var tt=rt.yylloc;m.push(tt);var Tt=rt.options&&rt.options.ranges;typeof st.yy.parseError=="function"?this.parseError=st.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function xt(){var ft;return ft=L.pop()||rt.lex()||wt,typeof ft!="number"&&(ft instanceof Array&&(L=ft,ft=L.pop()),ft=O.symbols_[ft]||ft),ft}for(var Z,jt,U,gt,$={},q,R,A,H;;){if(jt=v[v.length-1],this.defaultActions[jt]?U=this.defaultActions[jt]:((Z===null||typeof Z>"u")&&(Z=xt()),U=B[jt]&&B[jt][Z]),typeof U>"u"||!U.length||!U[0]){var C="";H=[];for(q in B[jt])this.terminals_[q]&&q>V&&H.push("'"+this.terminals_[q]+"'");rt.showPosition?C="Parse error on line "+(N+1)+`:
1342
+ `+rt.showPosition()+`
1343
+ Expecting `+H.join(", ")+", got '"+(this.terminals_[Z]||Z)+"'":C="Parse error on line "+(N+1)+": Unexpected "+(Z==wt?"end of input":"'"+(this.terminals_[Z]||Z)+"'"),this.parseError(C,{text:rt.match,token:this.terminals_[Z]||Z,line:rt.yylineno,loc:tt,expected:H})}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(rt.yytext),m.push(rt.yylloc),v.push(U[1]),Z=null,y=rt.yyleng,g=rt.yytext,N=rt.yylineno,tt=rt.yylloc;break;case 2:if(R=this.productions_[U[1]][1],$.$=w[w.length-R],$._$={first_line:m[m.length-(R||1)].first_line,last_line:m[m.length-1].last_line,first_column:m[m.length-(R||1)].first_column,last_column:m[m.length-1].last_column},Tt&&($._$.range=[m[m.length-(R||1)].range[0],m[m.length-1].range[1]]),gt=this.performAction.apply($,[g,y,N,st.yy,U[1],w,m].concat(nt)),typeof gt<"u")return gt;R&&(v=v.slice(0,-1*R*2),w=w.slice(0,-1*R),m=m.slice(0,-1*R)),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 ot={EOF:1,parseError:function(O,v){if(this.yy.parser)this.yy.parser.parseError(O,v);else throw new Error(O)},setInput:function(Y,O){return this.yy=O||this.yy||{},this._input=Y,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 Y=this._input[0];this.yytext+=Y,this.yyleng++,this.offset++,this.match+=Y,this.matched+=Y;var O=Y.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),Y},unput:function(Y){var O=Y.length,v=Y.split(/(?:\r\n?|\n)/g);this._input=Y+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-O),this.offset-=O;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-O},this.options.ranges&&(this.yylloc.range=[w[0],w[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).
1344
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(Y){this.unput(this.match.slice(Y))},pastInput:function(){var Y=this.matched.substr(0,this.matched.length-this.match.length);return(Y.length>20?"...":"")+Y.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var Y=this.match;return Y.length<20&&(Y+=this._input.substr(0,20-Y.length)),(Y.substr(0,20)+(Y.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var Y=this.pastInput(),O=new Array(Y.length+1).join("-");return Y+this.upcomingInput()+`
1345
+ `+O+"^"},test_match:function(Y,O){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=Y[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+Y[0].length},this.yytext+=Y[0],this.match+=Y[0],this.matches=Y,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(Y[0].length),this.matched+=Y[0],v=this.performAction.call(this,this.yy,this,O,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 Y,O,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&&(!O||v[0].length>O[0].length)){if(O=v,L=m,this.options.backtrack_lexer){if(Y=this.test_match(v,w[m]),Y!==!1)return Y;if(this._backtrack){O=!1;continue}else return!1}else if(!this.options.flex)break}return O?(Y=this.test_match(O,w[L]),Y!==!1?Y:!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 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,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 ot}();I.lexer=z;function Q(){this.yy={}}return Q.prototype=I,I.Parser=Q,new Q}();Bl.parser=Bl;const Hy=Bl,Gy=t=>t.match(/^\s*pie/)!==null||t.match(/^\s*bar/)!==null;let lo={},Il=!1;const jy={parseDirective:function(t,e,i){ii.parseDirective(this,t,e,i)},getConfig:()=>M().pie,addSection:function(t,e){t=Jt.sanitizeText(t,M()),lo[t]===void 0&&(lo[t]=e,b.debug("Added new section :",t))},getSections:()=>lo,cleanupValue:function(t){return t.substring(0,1)===":"&&(t=t.substring(1).trim()),Number(t.trim())},clear:function(){lo={},Il=!1,sr()},setAccTitle:nr,getAccTitle:fr,setDiagramTitle:Ir,getDiagramTitle:Dr,setShowData:function(t){Il=t},getShowData:function(){return Il},getAccDescription:gr,setAccDescription:pr};let ds=M(),fs;const ra=450,qy={draw:(t,e,i,r)=>{try{ds=M(),b.debug(`Rendering info diagram
1347
+ `+t);const E=M().securityLevel;let I;E==="sandbox"&&(I=(0,J.Ys)("#i"+e));const z=E==="sandbox"?(0,J.Ys)(I.nodes()[0].contentDocument.body):(0,J.Ys)("body"),Q=E==="sandbox"?I.nodes()[0].contentDocument:document;r.db.clear(),r.parser.parse(t),b.debug("Parsed info diagram");const ot=Q.getElementById(e);fs=ot.parentElement.offsetWidth,fs===void 0&&(fs=1200),ds.useWidth!==void 0&&(fs=ds.useWidth),ds.pie.useWidth!==void 0&&(fs=ds.pie.useWidth);const Y=z.select("#"+e);Br(Y,ra,fs,ds.pie.useMaxWidth),ot.setAttribute("viewBox","0 0 "+fs+" "+ra);var s=40,n=18,a=4,o=Math.min(fs,ra)/2-s,l=Y.append("g").attr("transform","translate("+fs/2+","+ra/2+")"),h=r.db.getSections(),u=0;Object.keys(h).forEach(function(v){u+=h[v]});const O=ds.themeVariables;var f=[O.pie1,O.pie2,O.pie3,O.pie4,O.pie5,O.pie6,O.pie7,O.pie8,O.pie9,O.pie10,O.pie11,O.pie12],d=(0,J.PKp)().range(f),p=Object.entries(h).map(function(v,L){return{order:L,name:v[0],value:v[1]}}),k=(0,J.ve8)().value(function(v){return v.value}).sort(function(v,L){return v.order-L.order}),_=k(p),T=(0,J.Nb1)().innerRadius(0).outerRadius(o);l.selectAll("mySlices").data(_).enter().append("path").attr("d",T).attr("fill",function(v){return d(v.data.name)}).attr("class","pieCircle"),l.selectAll("mySlices").data(_).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",-(ra-50)/2).attr("class","pieTitleText");var S=l.selectAll(".legend").data(d.domain()).enter().append("g").attr("class","legend").attr("transform",function(v,L){const w=n+a,m=w*d.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",d).style("stroke",d),S.data(_).append("text").attr("x",n+a).attr("y",n-a).text(function(v){return r.db.getShowData()||ds.showData||ds.pie.showData?v.data.name+" ["+v.data.value+"]":v.data.name})}catch(E){b.error("Error while rendering info diagram"),b.error(E)}}};var Dl=function(){var t=function(jt,U,gt,$){for(gt=gt||{},$=jt.length;$--;gt[jt[$]]=U);return gt},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],f=[1,28],d=[1,29],p=[1,30],k=[1,31],_=[1,24],T=[1,32],S=[1,33],E=[1,36],I=[71,72],z=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],Q=[1,56],ot=[1,57],Y=[1,58],O=[1,59],v=[1,60],L=[1,61],w=[1,62],m=[62,63],B=[1,74],g=[1,70],N=[1,71],y=[1,72],V=[1,73],wt=[1,75],nt=[1,79],rt=[1,80],st=[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,gt,$,q,R,A,H){var C=A.length-1;switch(R){case 6:this.$=A[C].trim(),q.setAccTitle(this.$);break;case 7:case 8:this.$=A[C].trim(),q.setAccDescription(this.$);break;case 9:q.parseDirective("%%{","open_directive");break;case 10:q.parseDirective(A[C],"type_directive");break;case 11:A[C]=A[C].trim().replace(/'/g,'"'),q.parseDirective(A[C],"arg_directive");break;case 12:q.parseDirective("}%%","close_directive","pie");break;case 13:this.$=[];break;case 19:q.addRequirement(A[C-3],A[C-4]);break;case 20:q.setNewReqId(A[C-2]);break;case 21:q.setNewReqText(A[C-2]);break;case 22:q.setNewReqRisk(A[C-2]);break;case 23:q.setNewReqVerifyMethod(A[C-2]);break;case 26:this.$=q.RequirementType.REQUIREMENT;break;case 27:this.$=q.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 28:this.$=q.RequirementType.INTERFACE_REQUIREMENT;break;case 29:this.$=q.RequirementType.PERFORMANCE_REQUIREMENT;break;case 30:this.$=q.RequirementType.PHYSICAL_REQUIREMENT;break;case 31:this.$=q.RequirementType.DESIGN_CONSTRAINT;break;case 32:this.$=q.RiskLevel.LOW_RISK;break;case 33:this.$=q.RiskLevel.MED_RISK;break;case 34:this.$=q.RiskLevel.HIGH_RISK;break;case 35:this.$=q.VerifyType.VERIFY_ANALYSIS;break;case 36:this.$=q.VerifyType.VERIFY_DEMONSTRATION;break;case 37:this.$=q.VerifyType.VERIFY_INSPECTION;break;case 38:this.$=q.VerifyType.VERIFY_TEST;break;case 39:q.addElement(A[C-3]);break;case 40:q.setNewElementType(A[C-2]);break;case 41:q.setNewElementDocRef(A[C-2]);break;case 44:q.addRelationship(A[C-2],A[C],A[C-4]);break;case 45:q.addRelationship(A[C-2],A[C-4],A[C]);break;case 46:this.$=q.Relationships.CONTAINS;break;case 47:this.$=q.Relationships.COPIES;break;case 48:this.$=q.Relationships.DERIVES;break;case 49:this.$=q.Relationships.SATISFIES;break;case 50:this.$=q.Relationships.VERIFIES;break;case 51:this.$=q.Relationships.REFINES;break;case 52:this.$=q.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:f,43:d,44:p,45:k,53:_,71:T,72:S},{11:34,12:[1,35],22:E},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:f,43:d,44:p,45:k,53:_,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:f,43:d,44:p,45:k,53:_,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:f,43:d,44:p,45:k,53:_,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:f,43:d,44:p,45:k,53:_,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:f,43:d,44:p,45:k,53:_,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(I,[2,26]),t(I,[2,27]),t(I,[2,28]),t(I,[2,29]),t(I,[2,30]),t(I,[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:Q,65:ot,66:Y,67:O,68:v,69:L,70:w},{61:63,64:Q,65:ot,66:Y,67:O,68:v,69:L,70:w},{11:64,22:E},{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:N,35:y,37:V,39:wt},{5:nt,39:rt,55:76,56:st,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:N,35:y,37:V,39:wt},t(tt,[2,25]),t(tt,[2,39]),{31:[1,88]},{31:[1,89]},{5:nt,39:rt,55:90,56:st,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:N,35:y,37:V,39:wt},{5:B,29:117,30:g,33:N,35:y,37:V,39:wt},{5:B,29:118,30:g,33:N,35:y,37:V,39:wt},{5:B,29:119,30:g,33:N,35:y,37:V,39:wt},{5:nt,39:rt,55:120,56:st,58:et},{5:nt,39:rt,55:121,56:st,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,gt){if(gt.recoverable)this.trace(U);else{var $=new Error(U);throw $.hash=gt,$}},parse:function(U){var gt=this,$=[0],q=[],R=[null],A=[],H=this.table,C="",ft=0,x=0,Qt=2,G=1,Nt=A.slice.call(arguments,1),At=Object.create(this.lexer),kt={yy:{}};for(var yt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,yt)&&(kt.yy[yt]=this.yy[yt]);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 mt=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=q.pop()||At.lex()||G,typeof Et!="number"&&(Et instanceof Array&&(q=Et,Et=q.pop()),Et=gt.symbols_[Et]||Et),Et}for(var Ge,De,se,ee,we={},ri,Ye,he,Zt;;){if(De=$[$.length-1],this.defaultActions[De]?se=this.defaultActions[De]:((Ge===null||typeof Ge>"u")&&(Ge=Ct()),se=H[De]&&H[De][Ge]),typeof se>"u"||!se.length||!se[0]){var St="";Zt=[];for(ri in H[De])this.terminals_[ri]&&ri>Qt&&Zt.push("'"+this.terminals_[ri]+"'");At.showPosition?St="Parse error on line "+(ft+1)+`:
1348
+ `+At.showPosition()+`
1349
+ Expecting `+Zt.join(", ")+", got '"+(this.terminals_[Ge]||Ge)+"'":St="Parse error on line "+(ft+1)+": Unexpected "+(Ge==G?"end of input":"'"+(this.terminals_[Ge]||Ge)+"'"),this.parseError(St,{text:At.match,token:this.terminals_[Ge]||Ge,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: "+De+", token: "+Ge);switch(se[0]){case 1:$.push(Ge),R.push(At.yytext),A.push(At.yylloc),$.push(se[1]),Ge=null,x=At.yyleng,C=At.yytext,ft=At.yylineno,_t=At.yylloc;break;case 2:if(Ye=this.productions_[se[1]][1],we.$=R[R.length-Ye],we._$={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},mt&&(we._$.range=[A[A.length-(Ye||1)].range[0],A[A.length-1].range[1]]),ee=this.performAction.apply(we,[C,x,ft,kt.yy,se[1],R,A].concat(Nt)),typeof ee<"u")return ee;Ye&&($=$.slice(0,-1*Ye*2),R=R.slice(0,-1*Ye),A=A.slice(0,-1*Ye)),$.push(this.productions_[se[1]][0]),R.push(we.$),A.push(we._$),he=H[$[$.length-2]][$[$.length-1]],$.push(he);break;case 3:return!0}}return!0}},xt=function(){var jt={EOF:1,parseError:function(gt,$){if(this.yy.parser)this.yy.parser.parseError(gt,$);else throw new Error(gt)},setInput:function(U,gt){return this.yy=gt||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 gt=U.match(/(?:\r\n?|\n).*/g);return gt?(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 gt=U.length,$=U.split(/(?:\r\n?|\n)/g);this._input=U+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-gt),this.offset-=gt;var q=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 R=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:$?($.length===q.length?this.yylloc.first_column:0)+q[q.length-$.length].length-$[0].length:this.yylloc.first_column-gt},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-gt]),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(),gt=new Array(U.length+1).join("-");return U+this.upcomingInput()+`
1351
+ `+gt+"^"},test_match:function(U,gt){var $,q,R;if(this.options.backtrack_lexer&&(R={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(R.yylloc.range=this.yylloc.range.slice(0))),q=U[0].match(/(?:\r\n?|\n).*/g),q&&(this.yylineno+=q.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:q?q[q.length-1].length-q[q.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,gt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),$)return $;if(this._backtrack){for(var A in R)this[A]=R[A];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var U,gt,$,q;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),A=0;A<R.length;A++)if($=this._input.match(this.rules[R[A]]),$&&(!gt||$[0].length>gt[0].length)){if(gt=$,q=A,this.options.backtrack_lexer){if(U=this.test_match($,R[A]),U!==!1)return U;if(this._backtrack){gt=!1;continue}else return!1}else if(!this.options.flex)break}return gt?(U=this.test_match(gt,R[q]),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 gt=this.next();return gt||this.lex()},begin:function(gt){this.conditionStack.push(gt)},popState:function(){var gt=this.conditionStack.length-1;return gt>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(gt){return gt=this.conditionStack.length-1-Math.abs(gt||0),gt>=0?this.conditionStack[gt]:"INITIAL"},pushState:function(gt){this.begin(gt)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(gt,$,q,R){switch(q){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=xt;function Z(){this.yy={}}return Z.prototype=Tt,Tt.Parser=Z,new Z}();Dl.parser=Dl;const Xy=Dl,Ky=t=>t.match(/^\s*requirement(Diagram)?/)!==null;let Rl=[],lr={},sa={},Rs={},na={};const Qy={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){ii.parseDirective(this,t,e,i)},getConfig:()=>M().req,addRequirement:(t,e)=>(sa[t]===void 0&&(sa[t]={name:t,type:e,id:lr.id,text:lr.text,risk:lr.risk,verifyMethod:lr.verifyMethod}),lr={},sa[t]),getRequirements:()=>sa,setNewReqId:t=>{lr!==void 0&&(lr.id=t)},setNewReqText:t=>{lr!==void 0&&(lr.text=t)},setNewReqRisk:t=>{lr!==void 0&&(lr.risk=t)},setNewReqVerifyMethod:t=>{lr!==void 0&&(lr.verifyMethod=t)},setAccTitle:nr,getAccTitle:fr,setAccDescription:pr,getAccDescription:gr,addElement:t=>(na[t]===void 0&&(na[t]={name:t,type:Rs.type,docRef:Rs.docRef},b.info("Added new requirement: ",t)),Rs={},na[t]),getElements:()=>na,setNewElementType:t=>{Rs!==void 0&&(Rs.type=t)},setNewElementDocRef:t=>{Rs!==void 0&&(Rs.docRef=t)},addRelationship:(t,e,i)=>{Rl.push({type:t,src:e,dst:i})},getRelationships:()=>Rl,clear:()=>{Rl=[],lr={},sa={},Rs={},na={},sr()}},Nl={CONTAINS:"contains",ARROW:"arrow"},d0={ReqMarkers:Nl,insertLineEndings:(t,e)=>{let i=t.append("defs").append("marker").attr("id",Nl.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",Nl.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={},f0=0;const p0=(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"),g0=(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}},y0=(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},Jy=(t,e,i,r)=>{const s=e.node().getTotalLength(),n=e.node().getPointAtLength(s*.5),a="rel"+f0;f0++;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%")},$y=function(t,e,i,r,s){const n=i.edge(_n(e.src),_n(e.dst)),a=(0,J.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("+Jt.getUrl(ui.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(o.attr("stroke-dasharray","10,7"),o.attr("marker-end","url("+Jt.getUrl(ui.arrowMarkerAbsolute)+"#"+d0.ReqMarkers.ARROW+"_line_ending)")),Jy(t,o,ui,`<<${e.type}>>`)},t3=(t,e,i)=>{Object.keys(t).forEach(r=>{let s=t[r];r=_n(r),b.info("Added new requirement: ",r);const n=i.append("g").attr("id",r),a="req-"+r,o=p0(n,a);let l=g0(n,r+"_title",[`<<${s.type}>>`,`${s.name}`]);y0(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})})},e3=(t,e,i)=>{Object.keys(t).forEach(r=>{let s=t[r];const n=_n(r),a=i.append("g").attr("id",n),o="element-"+n,l=p0(a,o);let h=g0(a,o+"_title",["<<Element>>",`${r}`]);y0(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})})},i3=(t,e)=>(t.forEach(function(i){let r=_n(i.src),s=_n(i.dst);e.setEdge(r,s,{relationship:i})}),t),r3=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)+" )"))})},_n=t=>t.replace(/\s/g,"").replace(/\./g,"_"),s3={draw:(t,e,i,r)=>{ui=M().requirement,r.db.clear(),r.parser.parse(t);const s=ui.securityLevel;let n;s==="sandbox"&&(n=(0,J.Ys)("#i"+e));const o=(s==="sandbox"?(0,J.Ys)(n.nodes()[0].contentDocument.body):(0,J.Ys)("body")).select(`[id='${e}']`);d0.insertLineEndings(o,ui);const l=new Gi.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(),f=r.db.getRelationships();t3(h,l,o),e3(u,l,o),i3(f,l),(0,xs.bK)(l),r3(o,l),f.forEach(function(T){$y(o,T,l,e,r)});const d=ui.rect_padding,p=o.node().getBBox(),k=p.width+d*2,_=p.height+d*2;Br(o,_,k,ui.useMaxWidth),o.attr("viewBox",`${p.x-d} ${p.y-d} ${k} ${_}`)}};var Ol=function(){var t=function(gt,$,q,R){for(q=q||{},R=gt.length;R--;q[gt[R]]=$);return q},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],f=[1,23],d=[1,29],p=[1,30],k=[1,31],_=[1,32],T=[1,33],S=[1,34],E=[1,35],I=[1,36],z=[1,37],Q=[1,38],ot=[1,39],Y=[1,40],O=[1,42],v=[1,43],L=[1,45],w=[1,46],m=[1,47],B=[1,48],g=[1,49],N=[1,50],y=[1,53],V=[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],nt=[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],rt=[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],st=[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],xt=[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($,q,R,A,H,C,ft){var x=C.length-1;switch(H){case 4:return A.apply(C[x]),C[x];case 5:case 10:this.$=[];break;case 6:case 11:C[x-1].push(C[x]),this.$=C[x-1];break;case 7:case 8:case 12:case 13:this.$=C[x];break;case 9:case 14:this.$=[];break;case 18:C[x-1].unshift({type:"boxStart",boxData:A.parseBoxData(C[x-2])}),C[x-1].push({type:"boxEnd",boxText:C[x-2]}),this.$=C[x-1];break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(C[x-2]),sequenceIndexStep:Number(C[x-1]),sequenceVisible:!0,signalType:A.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceIndex:Number(C[x-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[x-1]};break;case 25:this.$={type:"activeEnd",signalType:A.LINETYPE.ACTIVE_END,actor:C[x-1]};break;case 31:A.setDiagramTitle(C[x].substring(6)),this.$=C[x].substring(6);break;case 32:A.setDiagramTitle(C[x].substring(7)),this.$=C[x].substring(7);break;case 33:this.$=C[x].trim(),A.setAccTitle(this.$);break;case 34:case 35:this.$=C[x].trim(),A.setAccDescription(this.$);break;case 36:C[x-1].unshift({type:"loopStart",loopText:A.parseMessage(C[x-2]),signalType:A.LINETYPE.LOOP_START}),C[x-1].push({type:"loopEnd",loopText:C[x-2],signalType:A.LINETYPE.LOOP_END}),this.$=C[x-1];break;case 37:C[x-1].unshift({type:"rectStart",color:A.parseMessage(C[x-2]),signalType:A.LINETYPE.RECT_START}),C[x-1].push({type:"rectEnd",color:A.parseMessage(C[x-2]),signalType:A.LINETYPE.RECT_END}),this.$=C[x-1];break;case 38:C[x-1].unshift({type:"optStart",optText:A.parseMessage(C[x-2]),signalType:A.LINETYPE.OPT_START}),C[x-1].push({type:"optEnd",optText:A.parseMessage(C[x-2]),signalType:A.LINETYPE.OPT_END}),this.$=C[x-1];break;case 39:C[x-1].unshift({type:"altStart",altText:A.parseMessage(C[x-2]),signalType:A.LINETYPE.ALT_START}),C[x-1].push({type:"altEnd",signalType:A.LINETYPE.ALT_END}),this.$=C[x-1];break;case 40:C[x-1].unshift({type:"parStart",parText:A.parseMessage(C[x-2]),signalType:A.LINETYPE.PAR_START}),C[x-1].push({type:"parEnd",signalType:A.LINETYPE.PAR_END}),this.$=C[x-1];break;case 41:C[x-1].unshift({type:"criticalStart",criticalText:A.parseMessage(C[x-2]),signalType:A.LINETYPE.CRITICAL_START}),C[x-1].push({type:"criticalEnd",signalType:A.LINETYPE.CRITICAL_END}),this.$=C[x-1];break;case 42:C[x-1].unshift({type:"breakStart",breakText:A.parseMessage(C[x-2]),signalType:A.LINETYPE.BREAK_START}),C[x-1].push({type:"breakEnd",optText:A.parseMessage(C[x-2]),signalType:A.LINETYPE.BREAK_END}),this.$=C[x-1];break;case 45:this.$=C[x-3].concat([{type:"option",optionText:A.parseMessage(C[x-1]),signalType:A.LINETYPE.CRITICAL_OPTION},C[x]]);break;case 47:this.$=C[x-3].concat([{type:"and",parText:A.parseMessage(C[x-1]),signalType:A.LINETYPE.PAR_AND},C[x]]);break;case 49:this.$=C[x-3].concat([{type:"else",altText:A.parseMessage(C[x-1]),signalType:A.LINETYPE.ALT_ELSE},C[x]]);break;case 50:C[x-3].type="addParticipant",C[x-3].description=A.parseMessage(C[x-1]),this.$=C[x-3];break;case 51:C[x-1].type="addParticipant",this.$=C[x-1];break;case 52:C[x-3].type="addActor",C[x-3].description=A.parseMessage(C[x-1]),this.$=C[x-3];break;case 53:C[x-1].type="addActor",this.$=C[x-1];break;case 54:this.$=[C[x-1],{type:"addNote",placement:C[x-2],actor:C[x-1].actor,text:C[x]}];break;case 55:C[x-2]=[].concat(C[x-1],C[x-1]).slice(0,2),C[x-2][0]=C[x-2][0].actor,C[x-2][1]=C[x-2][1].actor,this.$=[C[x-1],{type:"addNote",placement:A.PLACEMENT.OVER,actor:C[x-2].slice(0,2),text:C[x]}];break;case 56:this.$=[C[x-1],{type:"addLinks",actor:C[x-1].actor,text:C[x]}];break;case 57:this.$=[C[x-1],{type:"addALink",actor:C[x-1].actor,text:C[x]}];break;case 58:this.$=[C[x-1],{type:"addProperties",actor:C[x-1].actor,text:C[x]}];break;case 59:this.$=[C[x-1],{type:"addDetails",actor:C[x-1].actor,text:C[x]}];break;case 62:this.$=[C[x-2],C[x]];break;case 63:this.$=C[x];break;case 64:this.$=A.PLACEMENT.LEFTOF;break;case 65:this.$=A.PLACEMENT.RIGHTOF;break;case 66:this.$=[C[x-4],C[x-1],{type:"addMessage",from:C[x-4].actor,to:C[x-1].actor,signalType:C[x-3],msg:C[x]},{type:"activeStart",signalType:A.LINETYPE.ACTIVE_START,actor:C[x-1]}];break;case 67:this.$=[C[x-4],C[x-1],{type:"addMessage",from:C[x-4].actor,to:C[x-1].actor,signalType:C[x-3],msg:C[x]},{type:"activeEnd",signalType:A.LINETYPE.ACTIVE_END,actor:C[x-4]}];break;case 68:this.$=[C[x-3],C[x-1],{type:"addMessage",from:C[x-3].actor,to:C[x-1].actor,signalType:C[x-2],msg:C[x]}];break;case 69:this.$={type:"addParticipant",actor:C[x]};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[x].trim().substring(1));break;case 79:A.parseDirective("%%{","open_directive");break;case 80:A.parseDirective(C[x],"type_directive");break;case 81:C[x]=C[x].trim().replace(/'/g,'"'),A.parseDirective(C[x],"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:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:k,38:_,40:T,41:S,42:E,43:I,44:z,46:Q,48:ot,50:Y,54:O,56:v,57:L,62:w,63:m,64:B,65:g,73:N,83:s},{16:51,17:[1,52],86:y},t([17,86],[2,80]),t(V,[2,6]),{6:41,10:54,13:18,14:6,19:l,22:20,23:h,26:u,27:44,28:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:k,38:_,40:T,41:S,42:E,43:I,44:z,46:Q,48:ot,50:Y,54:O,56:v,57:L,62:w,63:m,64:B,65:g,73:N,83:s},t(V,[2,8]),t(V,[2,9]),t(V,[2,17]),{20:[1,55]},{5:[1,56]},{5:[1,59],24:[1,57],25:[1,58]},{27:60,73:N},{27:61,73:N},{5:[1,62]},{5:[1,63]},{5:[1,64]},{5:[1,65]},{5:[1,66]},t(V,[2,31]),t(V,[2,32]),{37:[1,67]},{39:[1,68]},t(V,[2,35]),{20:[1,69]},{20:[1,70]},{20:[1,71]},{20:[1,72]},{20:[1,73]},{20:[1,74]},{20:[1,75]},t(V,[2,43]),{27:76,73:N},{27:77,73:N},{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:N},{27:92,73:N},{27:93,73:N},{27:94,73:N},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(V,[2,7]),t(wt,[2,10],{11:98}),t(V,[2,19]),{5:[1,100],24:[1,99]},{5:[1,101]},t(V,[2,23]),{5:[1,102]},{5:[1,103]},t(V,[2,26]),t(V,[2,27]),t(V,[2,28]),t(V,[2,29]),t(V,[2,30]),t(V,[2,33]),t(V,[2,34]),t(nt,n,{8:104}),t(nt,n,{8:105}),t(nt,n,{8:106}),t(rt,n,{45:107,8:108}),t(st,n,{47:109,8:110}),t(et,n,{49:111,8:112}),t(nt,n,{8:113}),{5:[1,115],55:[1,114]},{5:[1,117],55:[1,116]},{27:120,71:[1,118],72:[1,119],73:N},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:N},{27:123,61:122,73:N},{73:[2,64]},{73:[2,65]},{59:124,82:Tt},{59:126,82:Tt},{59:127,82:Tt},{59:128,82:Tt},t(xt,[2,15]),{16:129,86:y},{86:[2,81]},{4:[1,132],5:[1,134],12:131,13:133,21:[1,130],54:O,56:v},{5:[1,135]},t(V,[2,21]),t(V,[2,22]),t(V,[2,24]),t(V,[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:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:k,38:_,40:T,41:S,42:E,43:I,44:z,46:Q,48:ot,50:Y,54:O,56:v,57:L,62:w,63:m,64:B,65:g,73:N,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:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:k,38:_,40:T,41:S,42:E,43:I,44:z,46:Q,48:ot,50:Y,54:O,56:v,57:L,62:w,63:m,64:B,65:g,73:N,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:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:k,38:_,40:T,41:S,42:E,43:I,44:z,46:Q,48:ot,50:Y,54:O,56:v,57:L,62:w,63:m,64:B,65:g,73:N,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:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:k,38:_,40:T,41:S,42:E,43:I,44:z,46:Q,48:ot,50:Y,53:[1,140],54:O,56:v,57:L,62:w,63:m,64:B,65:g,73:N,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:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:k,38:_,40:T,41:S,42:E,43:I,44:z,46:Q,48:ot,50:Y,52:[1,142],54:O,56:v,57:L,62:w,63:m,64:B,65:g,73:N,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:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:k,38:_,40:T,41:S,42:E,43:I,44:z,46:Q,48:ot,50:Y,51:[1,144],54:O,56:v,57:L,62:w,63:m,64:B,65:g,73:N,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:f,29:24,30:25,31:26,32:27,33:28,34:d,35:p,36:k,38:_,40:T,41:S,42:E,43:I,44:z,46:Q,48:ot,50:Y,54:O,56:v,57:L,62:w,63:m,64:B,65:g,73:N,83:s},{20:[1,146]},t(V,[2,51]),{20:[1,147]},t(V,[2,53]),{27:148,73:N},{27:149,73:N},{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(V,[2,18]),t(wt,[2,11]),{13:155,54:O,56:v},t(wt,[2,13]),t(wt,[2,14]),t(V,[2,20]),t(V,[2,36]),t(V,[2,37]),t(V,[2,38]),t(V,[2,39]),{20:[1,156]},t(V,[2,40]),{20:[1,157]},t(V,[2,41]),{20:[1,158]},t(V,[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:N},t(xt,[2,16]),t(wt,[2,12]),t(rt,n,{8:108,45:164}),t(st,n,{8:110,47:165}),t(et,n,{8:112,49:166}),t(V,[2,50]),t(V,[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($,q){if(q.recoverable)this.trace($);else{var R=new Error($);throw R.hash=q,R}},parse:function($){var q=this,R=[0],A=[],H=[null],C=[],ft=this.table,x="",Qt=0,G=0,Nt=2,At=1,kt=C.slice.call(arguments,1),yt=Object.create(this.lexer),_t={yy:{}};for(var mt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,mt)&&(_t.yy[mt]=this.yy[mt]);yt.setInput($,_t.yy),_t.yy.lexer=yt,_t.yy.parser=this,typeof yt.yylloc>"u"&&(yt.yylloc={});var Ct=yt.yylloc;C.push(Ct);var Ge=yt.options&&yt.options.ranges;typeof _t.yy.parseError=="function"?this.parseError=_t.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function De(){var dt;return dt=A.pop()||yt.lex()||At,typeof dt!="number"&&(dt instanceof Array&&(A=dt,dt=A.pop()),dt=q.symbols_[dt]||dt),dt}for(var se,ee,we,ri,Ye={},he,Zt,St,Et;;){if(ee=R[R.length-1],this.defaultActions[ee]?we=this.defaultActions[ee]:((se===null||typeof se>"u")&&(se=De()),we=ft[ee]&&ft[ee][se]),typeof we>"u"||!we.length||!we[0]){var It="";Et=[];for(he in ft[ee])this.terminals_[he]&&he>Nt&&Et.push("'"+this.terminals_[he]+"'");yt.showPosition?It="Parse error on line "+(Qt+1)+`:
1356
+ `+yt.showPosition()+`
1357
+ Expecting `+Et.join(", ")+", got '"+(this.terminals_[se]||se)+"'":It="Parse error on line "+(Qt+1)+": Unexpected "+(se==At?"end of input":"'"+(this.terminals_[se]||se)+"'"),this.parseError(It,{text:yt.match,token:this.terminals_[se]||se,line:yt.yylineno,loc:Ct,expected:Et})}if(we[0]instanceof Array&&we.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ee+", token: "+se);switch(we[0]){case 1:R.push(se),H.push(yt.yytext),C.push(yt.yylloc),R.push(we[1]),se=null,G=yt.yyleng,x=yt.yytext,Qt=yt.yylineno,Ct=yt.yylloc;break;case 2:if(Zt=this.productions_[we[1]][1],Ye.$=H[H.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},Ge&&(Ye._$.range=[C[C.length-(Zt||1)].range[0],C[C.length-1].range[1]]),ri=this.performAction.apply(Ye,[x,G,Qt,_t.yy,we[1],H,C].concat(kt)),typeof ri<"u")return ri;Zt&&(R=R.slice(0,-1*Zt*2),H=H.slice(0,-1*Zt),C=C.slice(0,-1*Zt)),R.push(this.productions_[we[1]][0]),H.push(Ye.$),C.push(Ye._$),St=ft[R[R.length-2]][R[R.length-1]],R.push(St);break;case 3:return!0}}return!0}},jt=function(){var gt={EOF:1,parseError:function(q,R){if(this.yy.parser)this.yy.parser.parseError(q,R);else throw new Error(q)},setInput:function($,q){return this.yy=q||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 q=$.match(/(?:\r\n?|\n).*/g);return q?(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 q=$.length,R=$.split(/(?:\r\n?|\n)/g);this._input=$+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-q),this.offset-=q;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),R.length-1&&(this.yylineno-=R.length-1);var H=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:R?(R.length===A.length?this.yylloc.first_column:0)+A[A.length-R.length].length-R[0].length:this.yylloc.first_column-q},this.options.ranges&&(this.yylloc.range=[H[0],H[0]+this.yyleng-q]),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(),q=new Array($.length+1).join("-");return $+this.upcomingInput()+`
1359
+ `+q+"^"},test_match:function($,q){var R,A,H;if(this.options.backtrack_lexer&&(H={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&&(H.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],R=this.performAction.call(this,this.yy,this,q,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),R)return R;if(this._backtrack){for(var C in H)this[C]=H[C];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var $,q,R,A;this._more||(this.yytext="",this.match="");for(var H=this._currentRules(),C=0;C<H.length;C++)if(R=this._input.match(this.rules[H[C]]),R&&(!q||R[0].length>q[0].length)){if(q=R,A=C,this.options.backtrack_lexer){if($=this.test_match(R,H[C]),$!==!1)return $;if(this._backtrack){q=!1;continue}else return!1}else if(!this.options.flex)break}return q?($=this.test_match(q,H[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 q=this.next();return q||this.lex()},begin:function(q){this.conditionStack.push(q)},popState:function(){var q=this.conditionStack.length-1;return q>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(q){return q=this.conditionStack.length-1-Math.abs(q||0),q>=0?this.conditionStack[q]:"INITIAL"},pushState:function(q){this.begin(q)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(q,R,A,H){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 R.yytext=R.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 R.yytext=R.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 gt}();Z.lexer=jt;function U(){this.yy={}}return U.prototype=Z,Z.Parser=U,new U}();Ol.parser=Ol;const n3=Ol,a3=t=>t.match(/^\s*sequenceDiagram/)!==null;let aa,Ns={},En=[],Mr=[],co=!1,Fl,ps;const o3=function(t,e,i){ii.parseDirective(this,t,e,i)},l3=function(t){En.push({name:t.text,wrap:t.wrap===void 0&&Js()||!!t.wrap,fill:t.color,actorKeys:[]}),ps=En.slice(-1)[0]},Ml=function(t,e,i,r){let s=ps;const n=Ns[t];if(n){if(ps&&n.box&&ps!==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 '"+ps.name+"' at the same time.");if(s=n.box?n.box:ps,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}),Ns[t]={box:s,name:e,description:i.text,wrap:i.wrap===void 0&&Js()||!!i.wrap,prevActor:aa,links:{},properties:{},actorCnt:null,rectData:null,type:r||"participant"},aa&&Ns[aa]&&(Ns[aa].nextActor=t),ps&&ps.actorKeys.push(t),aa=t},c3=t=>{let e,i=0;for(e=0;e<Mr.length;e++)Mr[e].type===la.ACTIVE_START&&Mr[e].from.actor===t&&i++,Mr[e].type===la.ACTIVE_END&&Mr[e].from.actor===t&&i--;return i},h3=function(t,e,i,r){Mr.push({from:t,to:e,message:i.text,wrap:i.wrap===void 0&&Js()||!!i.wrap,answer:r})},pi=function(t,e,i={text:void 0,wrap:void 0},r){if(r===la.ACTIVE_END&&c3(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 Mr.push({from:t,to:e,message:i.text,wrap:i.wrap===void 0&&Js()||!!i.wrap,type:r}),!0},u3=function(){return En.length>0},d3=function(){return En.some(t=>t.name)},f3=function(){return Mr},p3=function(){return En},g3=function(){return Ns},oa=function(t){return Ns[t]},y3=function(){return Object.keys(Ns)},m3=function(){co=!0},b3=function(){co=!1},x3=()=>co,k3=function(t){Fl=t},Js=()=>Fl!==void 0?Fl:M().sequence.wrap,_3=function(){Ns={},En=[],Mr=[],co=!1,sr()},E3=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 b.debug("parseMessage:",i),i},v3=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?Ze(r.replace(/^:?(?:no)?wrap:/,""),M()):void 0,wrap:r!==void 0?r.match(/^:?wrap:/)!==null?!0:r.match(/^:?nowrap:/)!==null?!1:void 0:void 0}},la={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},C3={FILLED:0,OPEN:1},T3={LEFTOF:0,RIGHTOF:1,OVER:2},m0=function(t,e,i){i.text,i.wrap===void 0&&Js()||i.wrap;const r=[].concat(t,t);Mr.push({from:r[0],to:r[1],message:i.text,wrap:i.wrap===void 0&&Js()||!!i.wrap,type:la.NOTE,placement:e})},b0=function(t,e){const i=oa(t);try{let r=Ze(e.text,M());r=r.replace(/&amp;/g,"&"),r=r.replace(/&equals;/g,"=");const s=JSON.parse(r);Pl(i,s)}catch(r){b.error("error while parsing actor link text",r)}},S3=function(t,e){const i=oa(t);try{const a={};let o=Ze(e.text,M());var r=o.indexOf("@");o=o.replace(/&amp;/g,"&"),o=o.replace(/&equals;/g,"=");var s=o.slice(0,r-1).trim(),n=o.slice(r+1).trim();a[s]=n,Pl(i,a)}catch(a){b.error("error while parsing actor link text",a)}};function Pl(t,e){if(t.links==null)t.links=e;else for(let i in e)t.links[i]=e[i]}const x0=function(t,e){const i=oa(t);try{let r=Ze(e.text,M());const s=JSON.parse(r);k0(i,s)}catch(r){b.error("error while parsing actor properties text",r)}};function k0(t,e){if(t.properties==null)t.properties=e;else for(let i in e)t.properties[i]=e[i]}function w3(){ps=void 0}const _0=function(t,e){const i=oa(t),r=document.getElementById(e.text);try{const s=r.innerHTML,n=JSON.parse(s);n.properties&&k0(i,n.properties),n.links&&Pl(i,n.links)}catch(s){b.error("error while parsing actor details text",s)}},A3=function(t,e){if(t!==void 0&&t.properties!==void 0)return t.properties[e]},E0=function(t){if(Array.isArray(t))t.forEach(function(e){E0(e)});else switch(t.type){case"sequenceIndex":Mr.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":Ml(t.actor,t.actor,t.description,"participant");break;case"addActor":Ml(t.actor,t.actor,t.description,"actor");break;case"activeStart":pi(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":pi(t.actor,void 0,void 0,t.signalType);break;case"addNote":m0(t.actor,t.placement,t.text);break;case"addLinks":b0(t.actor,t.text);break;case"addALink":S3(t.actor,t.text);break;case"addProperties":x0(t.actor,t.text);break;case"addDetails":_0(t.actor,t.text);break;case"addMessage":pi(t.from,t.to,t.msg,t.signalType);break;case"boxStart":l3(t.boxData);break;case"boxEnd":w3();break;case"loopStart":pi(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":pi(void 0,void 0,void 0,t.signalType);break;case"rectStart":pi(void 0,void 0,t.color,t.signalType);break;case"rectEnd":pi(void 0,void 0,void 0,t.signalType);break;case"optStart":pi(void 0,void 0,t.optText,t.signalType);break;case"optEnd":pi(void 0,void 0,void 0,t.signalType);break;case"altStart":pi(void 0,void 0,t.altText,t.signalType);break;case"else":pi(void 0,void 0,t.altText,t.signalType);break;case"altEnd":pi(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":nr(t.text);break;case"parStart":pi(void 0,void 0,t.parText,t.signalType);break;case"and":pi(void 0,void 0,t.parText,t.signalType);break;case"parEnd":pi(void 0,void 0,void 0,t.signalType);break;case"criticalStart":pi(void 0,void 0,t.criticalText,t.signalType);break;case"option":pi(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":pi(void 0,void 0,void 0,t.signalType);break;case"breakStart":pi(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":pi(void 0,void 0,void 0,t.signalType);break}},v0={addActor:Ml,addMessage:h3,addSignal:pi,addLinks:b0,addDetails:_0,addProperties:x0,autoWrap:Js,setWrap:k3,enableSequenceNumbers:m3,disableSequenceNumbers:b3,showSequenceNumbers:x3,getMessages:f3,getActors:g3,getActor:oa,getActorKeys:y3,getActorProperty:A3,getAccTitle:fr,getBoxes:p3,getDiagramTitle:Dr,setDiagramTitle:Ir,parseDirective:o3,getConfig:()=>M().sequence,clear:_3,parseMessage:E3,parseBoxData:v3,LINETYPE:la,ARROWTYPE:C3,PLACEMENT:T3,addNote:m0,setAccTitle:nr,apply:E0,setAccDescription:pr,getAccDescription:gr,hasAtLeastOneBox:u3,hasAtLeastOneBoxWithTitle:d3};let Vl=[];const L3=t=>{Vl.push(t)},C0=()=>{Vl.forEach(t=>{t()}),Vl=[]},ho=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},T0=(t,e)=>{L3(()=>{const i=document.querySelectorAll(t);i.length!==0&&(i[0].addEventListener("mouseover",function(){R3("actor"+e+"_popup")}),i[0].addEventListener("mouseout",function(){N3("actor"+e+"_popup")}))})},B3=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),T0("#actor"+a+"_popup",a);var u="";o.class!==void 0&&(u=" "+o.class);let f=o.width>i?o.width:i;const d=h.append("rect");if(d.attr("class","actorPopupMenuPanel"+u),d.attr("x",o.x),d.attr("y",o.height),d.attr("fill",o.fill),d.attr("stroke",o.stroke),d.attr("width",f),d.attr("height",o.height),d.attr("rx",o.rx),d.attr("ry",o.ry),n!=null){var p=20;for(let T in n){var k=h.append("a"),_=(0,Hi.Nm)(n[T]);k.attr("xlink:href",_),k.attr("target","_blank"),X3(r)(T,k,o.x+10,o.height+p,f,20,{class:"actor"},r),p+=30}}return d.attr("height",p),{height:o.height+p,width:f}},S0=function(t,e,i,r){const s=t.append("image");s.attr("x",e),s.attr("y",i);var n=(0,Hi.Nm)(r);s.attr("xlink:href",n)},w0=function(t,e,i,r){const s=t.append("use");s.attr("x",e),s.attr("y",i);var n=(0,Hi.Nm)(r);s.attr("xlink:href","#"+n)},I3=function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'block'; }"},D3=function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'none'; }"},R3=function(t){var e=document.getElementById(t);e!=null&&(e.style.display="block")},N3=function(t){var e=document.getElementById(t);e!=null&&(e.style.display="none")},vn=function(t,e){let i=0,r=0;const s=e.text.split(Jt.lineBreakRegex),[n,a]=Rn(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,f]of s.entries()){e.textMargin!==void 0&&e.textMargin===0&&n!==void 0&&(l=u*n);const d=t.append("text");if(d.attr("x",e.x),d.attr("y",h()),e.anchor!==void 0&&d.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&d.style("font-family",e.fontFamily),a!==void 0&&d.style("font-size",a),e.fontWeight!==void 0&&d.style("font-weight",e.fontWeight),e.fill!==void 0&&d.attr("fill",e.fill),e.class!==void 0&&d.attr("class",e.class),e.dy!==void 0?d.attr("dy",e.dy):l!==0&&d.attr("dy",l),e.tspan){const p=d.append("tspan");p.attr("x",e.x),e.fill!==void 0&&p.attr("fill",e.fill),p.text(f)}else d.text(f);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(r+=(d._groups||d)[0][0].getBBox().height,i=r),o.push(d)}return o},A0=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,vn(t,e),r};let Qr=-1;const L0=(t,e)=>{t.selectAll&&t.selectAll(".actor-line").attr("class","200").attr("y2",e-55)},O3=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),T0("#root-"+Qr,Qr)));const l=uo();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=ho(o,l);if(e.rectData=l,e.properties!=null&&e.properties.icon){const d=e.properties.icon.trim();d.charAt(0)==="@"?w0(o,l.x+l.width-20,l.y+10,d.substr(1)):S0(o,l.x+l.width-20,l.y+10,d)}zl(i)(e.description,o,l.x,l.y,l.width,l.height,{class:"actor"},i);let f=e.height;if(u.node){const d=u.node().getBBox();e.height=d.height,f=d.height}return f},F3=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=uo();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,zl(i)(e.description,a,o.x,o.y+35,o.width,o.height,{class:"actor"},i),e.height},M3=function(t,e,i,r){switch(e.type){case"actor":return F3(t,e,i,r);case"participant":return O3(t,e,i,r)}},P3=function(t,e,i){const s=t.append("g");B0(s,e),e.name&&zl(i)(e.name,s,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},i),s.lower()},V3=function(t){return t.append("g")},Y3=function(t,e,i,r,s){const n=uo(),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,ho(a,n)},z3=function(t,e,i,r){const{boxMargin:s,boxTextMargin:n,labelBoxHeight:a,labelBoxWidth:o,messageFontFamily:l,messageFontSize:h,messageFontWeight:u}=r,f=t.append("g"),d=function(_,T,S,E){return f.append("line").attr("x1",_).attr("y1",T).attr("x2",S).attr("y2",E).attr("class","loopLine")};d(e.startx,e.starty,e.stopx,e.starty),d(e.stopx,e.starty,e.stopx,e.stopy),d(e.startx,e.stopy,e.stopx,e.stopy),d(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0&&e.sections.forEach(function(_){d(e.startx,_.y,e.stopx,_.y).style("stroke-dasharray","3, 3")});let p=Yl();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",A0(f,p),p=Yl(),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 k=vn(f,p);return e.sectionTitles!==void 0&&e.sectionTitles.forEach(function(_,T){if(_.message){p.text=_.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,k=vn(f,p);let S=Math.round(k.map(E=>(E._groups||E)[0][0].getBBox().height).reduce((E,I)=>E+I));e.sections[T].height+=S-(s+n)}}),e.height=Math.round(e.stopy-e.starty),f},B0=function(t,e){ho(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()},W3=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")},U3=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")},Z3=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")},H3=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")},G3=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")},j3=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)},q3=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")},Yl=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}},uo=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},zl=function(){function t(s,n,a,o,l,h,u){const f=n.append("text").attr("x",a+l/2).attr("y",o+h/2+5).style("text-anchor","middle").text(s);r(f,u)}function e(s,n,a,o,l,h,u,f){const{actorFontSize:d,actorFontFamily:p,actorFontWeight:k}=f,[_,T]=Rn(d),S=s.split(Jt.lineBreakRegex);for(let E=0;E<S.length;E++){const I=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",k).style("font-family",p);z.append("tspan").attr("x",a+l/2).attr("dy",I).text(S[E]),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,f){const d=n.append("switch"),k=d.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%");k.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(s),e(s,d,a,o,l,h,u,f),r(k,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}}(),X3=function(){function t(s,n,a,o,l,h,u){const f=n.append("text").attr("x",a).attr("y",o).style("text-anchor","start").text(s);r(f,u)}function e(s,n,a,o,l,h,u,f){const{actorFontSize:d,actorFontFamily:p,actorFontWeight:k}=f,_=s.split(Jt.lineBreakRegex);for(let T=0;T<_.length;T++){const S=T*d-d*(_.length-1)/2,E=n.append("text").attr("x",a).attr("y",o).style("text-anchor","start").style("font-size",d).style("font-weight",k).style("font-family",p);E.append("tspan").attr("x",a).attr("dy",S).text(_[T]),E.attr("y",o+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(E,u)}}function i(s,n,a,o,l,h,u,f){const d=n.append("switch"),k=d.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%");k.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(s),e(s,d,a,o,l,h,u,f),r(k,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}}(),ni={drawRect:ho,drawText:vn,drawLabel:A0,drawActor:M3,drawBox:P3,drawPopup:B3,drawImage:S0,drawEmbeddedImage:w0,anchorElement:V3,drawActivation:Y3,drawLoop:z3,drawBackgroundRect:B0,insertArrowHead:H3,insertArrowFilledHead:G3,insertSequenceNumber:j3,insertArrowCrossHead:q3,insertDatabaseIcon:W3,insertComputerIcon:U3,insertClockIcon:Z3,getTextObj:Yl,getNoteRect:uo,popupMenu:I3,popdownMenu:D3,fixLifeLineHeights:L0,sanitizeUrl:Hi.Nm};let j={};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,D0(M())},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*j.boxMargin,Math.min),s.updateVal(h,"stopy",r+u*j.boxMargin,Math.max),s.updateVal(Lt.data,"startx",t-u*j.boxMargin,Math.min),s.updateVal(Lt.data,"stopx",i+u*j.boxMargin,Math.max),o!=="activation"&&(s.updateVal(h,"startx",t-u*j.boxMargin,Math.min),s.updateVal(h,"stopx",i+u*j.boxMargin,Math.max),s.updateVal(Lt.data,"starty",e-u*j.boxMargin,Math.min),s.updateVal(Lt.data,"stopy",r+u*j.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=fo(t.from.actor).length||0,n=r.x+r.width/2+(s-1)*j.activationWidth/2;this.activations.push({startx:n,starty:this.verticalPos+2,stopx:n+j.activationWidth,stopy:void 0,actor:t.from.actor,anchored:ni.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}}},K3=function(t,e){Lt.bumpVerticalPos(j.boxMargin),e.height=j.boxMargin,e.starty=Lt.getVerticalPos();const i=ni.getNoteRect();i.x=e.startx,i.y=e.starty,i.width=e.width||j.width,i.class="note";const r=t.append("g"),s=ni.drawRect(r,i),n=ni.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=j.noteFontFamily,n.fontSize=j.noteFontSize,n.fontWeight=j.noteFontWeight,n.anchor=j.noteAlign,n.textMargin=j.noteMargin,n.valign="center";const a=vn(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*j.noteMargin),e.height+=o+2*j.noteMargin,Lt.bumpVerticalPos(o+2*j.noteMargin),e.stopy=e.starty+o+2*j.noteMargin,e.stopx=e.startx+i.width,Lt.insert(e.startx,e.starty,e.stopx,e.stopy),Lt.models.addNote(e)},$s=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),Cn=t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),Wl=t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight});function Q3(t,e){Lt.bumpVerticalPos(10);const{startx:i,stopx:r,message:s}=e,n=Jt.splitBreaks(s).length,a=me.calculateTextDimensions(s,$s(j)),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,j.rightAngles||(h+=j.boxMargin,l=Lt.getVerticalPos()+h),h+=30;const f=Math.max(u/2,j.width/2);Lt.insert(i-f,Lt.getVerticalPos()-10+h,r+f,Lt.getVerticalPos()+30+h)}else h+=j.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 J3=function(t,e,i,r){const{startx:s,stopx:n,starty:a,message:o,type:l,sequenceIndex:h,sequenceVisible:u}=e,f=me.calculateTextDimensions(o,$s(j)),d=ni.getTextObj();d.x=s,d.y=a+10,d.width=n-s,d.class="messageText",d.dy="1em",d.text=o,d.fontFamily=j.messageFontFamily,d.fontSize=j.messageFontSize,d.fontWeight=j.messageFontWeight,d.anchor=j.messageAlign,d.valign="center",d.textMargin=j.wrapPadding,d.tspan=!1,vn(t,d);const p=f.width;let k;s===n?j.rightAngles?k=t.append("path").attr("d",`M ${s},${i} H ${s+Math.max(j.width/2,p/2)} V ${i+25} H ${s}`):k=t.append("path").attr("d","M "+s+","+i+" C "+(s+60)+","+(i-10)+" "+(s+60)+","+(i+30)+" "+s+","+(i+20)):(k=t.append("line"),k.attr("x1",s),k.attr("y1",i),k.attr("x2",n),k.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?(k.style("stroke-dasharray","3, 3"),k.attr("class","messageLine1")):k.attr("class","messageLine0");let _="";j.arrowMarkerAbsolute&&(_=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,_=_.replace(/\(/g,"\\("),_=_.replace(/\)/g,"\\)")),k.attr("stroke-width",2),k.attr("stroke","none"),k.style("fill","none"),(l===r.db.LINETYPE.SOLID||l===r.db.LINETYPE.DOTTED)&&k.attr("marker-end","url("+_+"#arrowhead)"),(l===r.db.LINETYPE.SOLID_POINT||l===r.db.LINETYPE.DOTTED_POINT)&&k.attr("marker-end","url("+_+"#filled-head)"),(l===r.db.LINETYPE.SOLID_CROSS||l===r.db.LINETYPE.DOTTED_CROSS)&&k.attr("marker-end","url("+_+"#crosshead)"),(u||j.showSequenceNumbers)&&(k.attr("marker-start","url("+_+"#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))},Ul=function(t,e,i,r,s,n,a){if(s.hideUnusedParticipants===!0){const f=new Set;n.forEach(d=>{f.add(d.from),f.add(d.to)}),i=i.filter(d=>f.has(d))}let o=0,l=0,h=0,u;for(const f of i){const d=e[f],p=d.box;u&&u!=p&&(a||Lt.models.addBox(u),l+=j.boxMargin+u.margin),p&&p!=u&&(a||(p.x=o+l,p.y=r),l+=p.margin),d.width=d.width||j.width,d.height=Math.max(d.height||j.height,j.height),d.margin=d.margin||j.actorMargin,d.x=o+l,d.y=Lt.getVerticalPos();const k=ni.drawActor(t,d,j,a);h=Math.max(h,k),Lt.insert(d.x,r,d.x+d.width,d.height),o+=d.width+l,d.box&&(d.box.width=o+p.margin-d.box.x),l=d.margin,u=d.box,Lt.models.addActor(d)}u&&!a&&Lt.models.addBox(u),Lt.bumpVerticalPos(h)},I0=function(t,e,i,r){let s=0,n=0;for(const a of i){const o=e[a],l=e4(o),h=ni.drawPopup(t,o,l,j,j.forceMenus,r);h.height>s&&(s=h.height),h.width+o.x>n&&(n=h.width+o.x)}return{maxHeight:s,maxWidth:n}},D0=function(t){Di(j,t),t.fontFamily&&(j.actorFontFamily=j.noteFontFamily=j.messageFontFamily=t.fontFamily),t.fontSize&&(j.actorFontSize=j.noteFontSize=j.messageFontSize=t.fontSize),t.fontWeight&&(j.actorFontWeight=j.noteFontWeight=j.messageFontWeight=t.fontWeight)},fo=function(t){return Lt.activations.filter(function(e){return e.actor===t})},R0=function(t,e){const i=e[t],r=fo(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=$s(j);e.message=me.wrapLabel(`[${e.message}]`,a-2*j.wrapPadding,o),e.width=a,e.wrap=!0;const l=me.calculateTextDimensions(e.message,o),h=Math.max(l.height,j.labelBoxHeight);n=r+h,b.debug(`${h} - ${e.message}`)}s(e),Lt.bumpVerticalPos(n)}const $3=function(t,e,i,r){const{securityLevel:s,sequence:n}=M();j=n,r.db.clear(),r.parser.parse(t);let a;s==="sandbox"&&(a=(0,J.Ys)("#i"+e));const o=s==="sandbox"?(0,J.Ys)(a.nodes()[0].contentDocument.body):(0,J.Ys)("body"),l=s==="sandbox"?a.nodes()[0].contentDocument:document;Lt.init(),b.debug(r.db);const h=s==="sandbox"?o.select(`[id="${e}"]`):(0,J.Ys)(`[id="${e}"]`),u=r.db.getActors(),f=r.db.getBoxes(),d=r.db.getActorKeys(),p=r.db.getMessages(),k=r.db.getDiagramTitle(),_=r.db.hasAtLeastOneBox(),T=r.db.hasAtLeastOneBoxWithTitle(),S=t4(u,p,r);j.height=i4(u,S,f),ni.insertComputerIcon(h),ni.insertDatabaseIcon(h),ni.insertClockIcon(h),_&&(Lt.bumpVerticalPos(j.boxMargin),T&&Lt.bumpVerticalPos(f[0].textMaxHeight)),Ul(h,u,d,0,j,p,!1);const E=n4(p,u,S,r);ni.insertArrowHead(h),ni.insertArrowCrossHead(h),ni.insertArrowFilledHead(h),ni.insertSequenceNumber(h);function I(N,y){const V=Lt.endActivation(N);V.starty+18>y&&(V.starty=y-6,y+=12),ni.drawActivation(h,V,y,j,fo(N.from.actor).length),Lt.insert(V.startx,y-10,V.stopx,y)}let z=1,Q=1;const ot=[];p.forEach(function(N){let y,V,wt;switch(N.type){case r.db.LINETYPE.NOTE:V=N.noteModel,K3(h,V);break;case r.db.LINETYPE.ACTIVE_START:Lt.newActivation(N,h,u);break;case r.db.LINETYPE.ACTIVE_END:I(N,Lt.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:Jr(E,N,j.boxMargin,j.boxMargin+j.boxTextMargin,nt=>Lt.newLoop(nt));break;case r.db.LINETYPE.LOOP_END:y=Lt.endLoop(),ni.drawLoop(h,y,"loop",j),Lt.bumpVerticalPos(y.stopy-Lt.getVerticalPos()),Lt.models.addLoop(y);break;case r.db.LINETYPE.RECT_START:Jr(E,N,j.boxMargin,j.boxMargin,nt=>Lt.newLoop(void 0,nt.message));break;case r.db.LINETYPE.RECT_END:y=Lt.endLoop(),ni.drawBackgroundRect(h,y),Lt.models.addLoop(y),Lt.bumpVerticalPos(y.stopy-Lt.getVerticalPos());break;case r.db.LINETYPE.OPT_START:Jr(E,N,j.boxMargin,j.boxMargin+j.boxTextMargin,nt=>Lt.newLoop(nt));break;case r.db.LINETYPE.OPT_END:y=Lt.endLoop(),ni.drawLoop(h,y,"opt",j),Lt.bumpVerticalPos(y.stopy-Lt.getVerticalPos()),Lt.models.addLoop(y);break;case r.db.LINETYPE.ALT_START:Jr(E,N,j.boxMargin,j.boxMargin+j.boxTextMargin,nt=>Lt.newLoop(nt));break;case r.db.LINETYPE.ALT_ELSE:Jr(E,N,j.boxMargin+j.boxTextMargin,j.boxMargin,nt=>Lt.addSectionToLoop(nt));break;case r.db.LINETYPE.ALT_END:y=Lt.endLoop(),ni.drawLoop(h,y,"alt",j),Lt.bumpVerticalPos(y.stopy-Lt.getVerticalPos()),Lt.models.addLoop(y);break;case r.db.LINETYPE.PAR_START:Jr(E,N,j.boxMargin,j.boxMargin+j.boxTextMargin,nt=>Lt.newLoop(nt));break;case r.db.LINETYPE.PAR_AND:Jr(E,N,j.boxMargin+j.boxTextMargin,j.boxMargin,nt=>Lt.addSectionToLoop(nt));break;case r.db.LINETYPE.PAR_END:y=Lt.endLoop(),ni.drawLoop(h,y,"par",j),Lt.bumpVerticalPos(y.stopy-Lt.getVerticalPos()),Lt.models.addLoop(y);break;case r.db.LINETYPE.AUTONUMBER:z=N.message.start||z,Q=N.message.step||Q,N.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:Jr(E,N,j.boxMargin,j.boxMargin+j.boxTextMargin,nt=>Lt.newLoop(nt));break;case r.db.LINETYPE.CRITICAL_OPTION:Jr(E,N,j.boxMargin+j.boxTextMargin,j.boxMargin,nt=>Lt.addSectionToLoop(nt));break;case r.db.LINETYPE.CRITICAL_END:y=Lt.endLoop(),ni.drawLoop(h,y,"critical",j),Lt.bumpVerticalPos(y.stopy-Lt.getVerticalPos()),Lt.models.addLoop(y);break;case r.db.LINETYPE.BREAK_START:Jr(E,N,j.boxMargin,j.boxMargin+j.boxTextMargin,nt=>Lt.newLoop(nt));break;case r.db.LINETYPE.BREAK_END:y=Lt.endLoop(),ni.drawLoop(h,y,"break",j),Lt.bumpVerticalPos(y.stopy-Lt.getVerticalPos()),Lt.models.addLoop(y);break;default:try{wt=N.msgModel,wt.starty=Lt.getVerticalPos(),wt.sequenceIndex=z,wt.sequenceVisible=r.db.showSequenceNumbers();const nt=Q3(h,wt);ot.push({messageModel:wt,lineStartY:nt}),Lt.models.addMessage(wt)}catch(nt){b.error("error while drawing message",nt)}}[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(N.type)&&(z=z+Q)}),ot.forEach(N=>J3(h,N.messageModel,N.lineStartY,r)),j.mirrorActors&&(Lt.bumpVerticalPos(j.boxMargin*2),Ul(h,u,d,Lt.getVerticalPos(),j,p,!0),Lt.bumpVerticalPos(j.boxMargin),L0(h,Lt.getVerticalPos())),Lt.models.boxes.forEach(function(N){N.height=Lt.getVerticalPos()-N.y,Lt.insert(N.x,N.y,N.x+N.width,N.height),N.startx=N.x,N.starty=N.y,N.stopx=N.startx+N.width,N.stopy=N.starty+N.height,N.stroke="rgb(0,0,0, 0.5)",ni.drawBox(h,N,j)}),_&&Lt.bumpVerticalPos(j.boxMargin);const Y=I0(h,u,d,l),{bounds:O}=Lt.getBounds();b.debug("For line height fix Querying: #"+e+" .actor-line"),(0,J.td_)("#"+e+" .actor-line").attr("y2",O.stopy);let L=O.stopy-O.starty;L<Y.maxHeight&&(L=Y.maxHeight);let w=L+2*j.diagramMarginY;j.mirrorActors&&(w=w-j.boxMargin+j.bottomMarginAdj);let m=O.stopx-O.startx;m<Y.maxWidth&&(m=Y.maxWidth);const B=m+2*j.diagramMarginX;k&&h.append("text").text(k).attr("x",(O.stopx-O.startx)/2-2*j.diagramMarginX).attr("y",-25),Br(h,w,B,j.useMaxWidth);const g=k?40:0;h.attr("viewBox",O.startx-j.diagramMarginX+" -"+(j.diagramMarginY+g)+" "+B+" "+(w+g)),b.debug("models:",Lt.models)};function t4(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?Cn(j):$s(j),h=s.wrap?me.wrapLabel(s.message,j.width-2*j.wrapPadding,l):s.message,f=me.calculateTextDimensions(h,l).width+2*j.wrapPadding;o&&s.from===n.nextActor?r[s.to]=Math.max(r[s.to]||0,f):o&&s.from===n.prevActor?r[s.from]=Math.max(r[s.from]||0,f):o&&s.from===s.to?(r[s.from]=Math.max(r[s.from]||0,f/2),r[s.to]=Math.max(r[s.to]||0,f/2)):s.placement===i.db.PLACEMENT.RIGHTOF?r[s.from]=Math.max(r[s.from]||0,f):s.placement===i.db.PLACEMENT.LEFTOF?r[n.prevActor]=Math.max(r[n.prevActor]||0,f):s.placement===i.db.PLACEMENT.OVER&&(n.prevActor&&(r[n.prevActor]=Math.max(r[n.prevActor]||0,f/2)),n.nextActor&&(r[s.from]=Math.max(r[s.from]||0,f/2)))}}),b.debug("maxMessageWidthPerActor:",r),r}const e4=function(t){let e=0;const i=Wl(j);for(const r in t.links){const n=me.calculateTextDimensions(r,i).width+2*j.wrapPadding+2*j.boxMargin;e<n&&(e=n)}return e};function i4(t,e,i){let r=0;Object.keys(t).forEach(n=>{const a=t[n];a.wrap&&(a.description=me.wrapLabel(a.description,j.width-2*j.wrapPadding,Wl(j)));const o=me.calculateTextDimensions(a.description,Wl(j));a.width=a.wrap?j.width:Math.max(j.width,o.width+2*j.wrapPadding),a.height=a.wrap?Math.max(o.height,j.height):j.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 f=e[n]+j.actorMargin-a.width/2;a.margin=Math.max(f,j.actorMargin);continue}const h=e[n]+j.actorMargin-a.width/2-o.width/2;a.margin=Math.max(h,j.actorMargin)}let s=0;return i.forEach(n=>{const a=$s(j);let o=n.actorKeys.reduce((u,f)=>u+=t[f].width+(t[f].margin||0),0);o-=2*j.boxTextMargin,n.wrap&&(n.name=me.wrapLabel(n.name,o-2*j.wrapPadding,a));const l=me.calculateTextDimensions(n.name,a);s=Math.max(l.height,s);const h=Math.max(o,l.width+2*j.wrapPadding);if(n.margin=j.boxTextMargin,o<h){const u=(h-o)/2;n.margin+=u}}),i.forEach(n=>n.textMaxHeight=s),Math.max(r,j.height)}const r4=function(t,e,i){const r=e[t.from].x,s=e[t.to].x,n=t.wrap&&t.message;let a=me.calculateTextDimensions(n?me.wrapLabel(t.message,j.width,Cn(j)):t.message,Cn(j));const o={width:n?j.width:Math.max(j.width,a.width+2*j.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(j.width,a.width):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*j.noteMargin),o.startx=r+(e[t.from].width+j.actorMargin)/2):t.placement===i.db.PLACEMENT.LEFTOF?(o.width=Math.max(n?j.width:e[t.from].width/2+e[t.to].width/2,a.width+2*j.noteMargin),o.startx=r-o.width+(e[t.from].width-j.actorMargin)/2):t.to===t.from?(a=me.calculateTextDimensions(n?me.wrapLabel(t.message,Math.max(j.width,e[t.from].width),Cn(j)):t.message,Cn(j)),o.width=n?Math.max(j.width,e[t.from].width):Math.max(e[t.from].width,j.width,a.width+2*j.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))+j.actorMargin,o.startx=r<s?r+e[t.from].width/2-j.actorMargin/2:s+e[t.to].width/2-j.actorMargin/2),n&&(o.message=me.wrapLabel(t.message,o.width-2*j.wrapPadding,Cn(j))),b.debug(`NM:[${o.startx},${o.stopx},${o.starty},${o.stopy}:${o.width},${o.height}=${t.message}]`),o},s4=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=R0(t.from,e),n=R0(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=me.wrapLabel(t.message,Math.max(h+2*j.wrapPadding,j.width),$s(j)));const u=me.calculateTextDimensions(t.message,$s(j));return{width:Math.max(t.wrap?0:u.width+2*j.wrapPadding,h+2*j.wrapPadding,j.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)}},n4=function(t,e,i,r){const s={},n=[];let a,o,l;return t.forEach(function(h){switch(h.id=me.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 f=e[h.from?h.from.actor:h.to.actor],d=fo(h.from?h.from.actor:h.to.actor).length,p=f.x+f.width/2+(d-1)*j.activationWidth/2,k={startx:p,stopx:p+j.activationWidth,actor:h.from.actor,enabled:!0};Lt.activations.push(k)}break;case r.db.LINETYPE.ACTIVE_END:{const f=Lt.activations.map(d=>d.actor).lastIndexOf(h.from.actor);delete Lt.activations.splice(f,1)[0]}break}h.placement!==void 0?(o=r4(h,e,r),h.noteModel=o,n.forEach(f=>{a=f,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))-j.labelBoxWidth})):(l=s4(h,e,r),h.msgModel=l,l.startx&&l.stopx&&n.length>0&&n.forEach(f=>{if(a=f,l.startx===l.stopx){const d=e[h.from],p=e[h.to];a.from=Math.min(d.x-l.width/2,d.x-d.width/2,a.from),a.to=Math.max(p.x+l.width/2,p.x+d.width/2,a.to),a.width=Math.max(a.width,Math.abs(a.to-a.from))-j.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)-j.labelBoxWidth}))}),Lt.activations=[],b.debug("Loop type widths:",s),s},N0={bounds:Lt,drawActors:Ul,drawActorsPopup:I0,setConf:D0,draw:$3};var Zl=function(){var t=function(rt,st,et,tt){for(et=et||{},tt=rt.length;tt--;et[rt[tt]]=st);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],f=[1,24],d=[1,37],p=[1,25],k=[1,26],_=[1,27],T=[1,28],S=[1,29],E=[1,32],I=[1,33],z=[1,34],Q=[1,35],ot=[1,36],Y=[1,39],O=[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],N=[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],V={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(st,et,tt,Tt,xt,Z,jt){var U=Z.length-1;switch(xt){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 R=Z[U-1];R.description=Tt.trimColon(Z[U]),this.$=R;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 gt=Z[U],$=Z[U-2].trim();if(Z[U].match(":")){var q=Z[U].split(":");gt=q[0],$=[$,q[1]]}this.$={stmt:"state",id:gt,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:f,24:d,25:p,26:k,27:_,28:T,29:S,32:31,33:E,35:I,37:z,38:Q,42:ot,45:6,50:Y,51:O,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:f,24:d,25:p,26:k,27:_,28:T,29:S,32:31,33:E,35:I,37:z,38:Q,42:ot,45:6,50:Y,51:O,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(N,[2,36]),{49:63,62:[1,64]},t(N,[2,53]),t(B,[2,7]),t(B,[2,13]),{13:65,24:d,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:f,24:d,25:p,26:k,27:_,28:T,29:S,32:31,33:E,35:I,37:z,38:Q,42:ot,45:6,50:Y,51:O,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(N,[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:f,24:d,25:p,26:k,27:_,28:T,29:S,32:31,33:E,35:I,37:z,38:Q,42:ot,45:6,50:Y,51:O,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(st,et){if(et.recoverable)this.trace(st);else{var tt=new Error(st);throw tt.hash=et,tt}},parse:function(st){var et=this,tt=[0],Tt=[],xt=[null],Z=[],jt=this.table,U="",gt=0,$=0,q=2,R=1,A=Z.slice.call(arguments,1),H=Object.create(this.lexer),C={yy:{}};for(var ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ft)&&(C.yy[ft]=this.yy[ft]);H.setInput(st,C.yy),C.yy.lexer=H,C.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var x=H.yylloc;Z.push(x);var Qt=H.options&&H.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function G(){var ee;return ee=Tt.pop()||H.lex()||R,typeof ee!="number"&&(ee instanceof Array&&(Tt=ee,ee=Tt.pop()),ee=et.symbols_[ee]||ee),ee}for(var Nt,At,kt,yt,_t={},mt,Ct,Ge,De;;){if(At=tt[tt.length-1],this.defaultActions[At]?kt=this.defaultActions[At]:((Nt===null||typeof Nt>"u")&&(Nt=G()),kt=jt[At]&&jt[At][Nt]),typeof kt>"u"||!kt.length||!kt[0]){var se="";De=[];for(mt in jt[At])this.terminals_[mt]&&mt>q&&De.push("'"+this.terminals_[mt]+"'");H.showPosition?se="Parse error on line "+(gt+1)+`:
1361
+ `+H.showPosition()+`
1362
+ Expecting `+De.join(", ")+", got '"+(this.terminals_[Nt]||Nt)+"'":se="Parse error on line "+(gt+1)+": Unexpected "+(Nt==R?"end of input":"'"+(this.terminals_[Nt]||Nt)+"'"),this.parseError(se,{text:H.match,token:this.terminals_[Nt]||Nt,line:H.yylineno,loc:x,expected:De})}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),xt.push(H.yytext),Z.push(H.yylloc),tt.push(kt[1]),Nt=null,$=H.yyleng,U=H.yytext,gt=H.yylineno,x=H.yylloc;break;case 2:if(Ct=this.productions_[kt[1]][1],_t.$=xt[xt.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},Qt&&(_t._$.range=[Z[Z.length-(Ct||1)].range[0],Z[Z.length-1].range[1]]),yt=this.performAction.apply(_t,[U,$,gt,C.yy,kt[1],xt,Z].concat(A)),typeof yt<"u")return yt;Ct&&(tt=tt.slice(0,-1*Ct*2),xt=xt.slice(0,-1*Ct),Z=Z.slice(0,-1*Ct)),tt.push(this.productions_[kt[1]][0]),xt.push(_t.$),Z.push(_t._$),Ge=jt[tt[tt.length-2]][tt[tt.length-1]],tt.push(Ge);break;case 3:return!0}}return!0}},wt=function(){var rt={EOF:1,parseError:function(et,tt){if(this.yy.parser)this.yy.parser.parseError(et,tt);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,tt=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 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 xt=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=[xt[0],xt[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(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()+`
1364
+ `+et+"^"},test_match:function(st,et){var tt,Tt,xt;if(this.options.backtrack_lexer&&(xt={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&&(xt.yylloc.range=this.yylloc.range.slice(0))),Tt=st[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+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],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 xt)this[Z]=xt[Z];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var st,et,tt,Tt;this._more||(this.yytext="",this.match="");for(var xt=this._currentRules(),Z=0;Z<xt.length;Z++)if(tt=this._input.match(this.rules[xt[Z]]),tt&&(!et||tt[0].length>et[0].length)){if(et=tt,Tt=Z,this.options.backtrack_lexer){if(st=this.test_match(tt,xt[Z]),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,xt[Tt]),st!==!1?st:!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,xt){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 rt}();V.lexer=wt;function nt(){this.yy={}}return nt.prototype=V,V.Parser=nt,new nt}();Zl.parser=Zl;const O0=Zl,a4=(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},o4=(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")},F0="LR",l4="TB",po="state",Hl="relation",c4="classDef",h4="applyClass",ca="default",M0="divider",Gl="[*]",P0="start",V0=Gl,Y0="end",z0="color",W0="fill",u4="bgFill",d4=",";function U0(){return{}}let Z0=F0,go=[],ha=U0();const H0=()=>({relations:[],states:{},documents:{}});let yo={root:H0()},Wi=yo.root,ua=0,G0=0;const f4={LINE:0,DOTTED_LINE:1},p4={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},mo=t=>JSON.parse(JSON.stringify(t)),g4=function(t,e,i){ii.parseDirective(this,t,e,i)},y4=t=>{b.info("Setting root doc",t),go=t},m4=()=>go,bo=(t,e,i)=>{if(e.stmt===Hl)bo(t,e.state1,!0),bo(t,e.state2,!1);else if(e.stmt===po&&(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===M0){const a=mo(e.doc[n]);a.doc=mo(s),r.push(a),s=[]}else s.push(e.doc[n]);if(r.length>0&&s.length>0){const a={stmt:po,id:Yc(),type:"divider",doc:mo(s)};r.push(mo(a)),e.doc=r}e.doc.forEach(a=>bo(e,a,!0))}},b4=()=>(bo({id:"root"},{id:"root",doc:go},!0),{id:"root",doc:go}),x4=t=>{let e;t.doc?e=t.doc:e=t,b.info(e),j0(!0),b.info("Extract",e),e.forEach(i=>{switch(i.stmt){case po:tn(i.id.trim(),i.type,i.doc,i.description,i.note,i.classes,i.styles,i.textStyles);break;case Hl:q0(i.state1,i.state2,i.description);break;case c4:X0(i.id.trim(),i.classes);break;case h4:Kl(i.id.trim(),i.styleClass);break}})},tn=function(t,e=ca,i=null,r=null,s=null,n=null,a=null,o=null){const l=t==null?void 0:t.trim();Wi.states[l]===void 0?(b.info("Adding state ",l,r),Wi.states[l]={id:l,descriptions:[],type:e,doc:i,note:s,classes:[],styles:[],textStyles:[]}):(Wi.states[l].doc||(Wi.states[l].doc=i),Wi.states[l].type||(Wi.states[l].type=e)),r&&(b.info("Setting state description",l,r),typeof r=="string"&&Xl(l,r.trim()),typeof r=="object"&&r.forEach(h=>Xl(l,h.trim()))),s&&(Wi.states[l].note=s,Wi.states[l].note.text=Jt.sanitizeText(Wi.states[l].note.text,M())),n&&(b.info("Setting state classes",l,n),(typeof n=="string"?[n]:n).forEach(u=>Kl(l,u.trim()))),a&&(b.info("Setting state styles",l,a),(typeof a=="string"?[a]:a).forEach(u=>L4(l,u.trim()))),o&&(b.info("Setting state styles",l,a),(typeof o=="string"?[o]:o).forEach(u=>B4(l,u.trim())))},j0=function(t){yo={root:H0()},Wi=yo.root,ua=0,ha=U0(),t||sr()},da=function(t){return Wi.states[t]},k4=function(){return Wi.states},_4=function(){b.info("Documents = ",yo)},E4=function(){return Wi.relations};function jl(t=""){let e=t;return t===Gl&&(ua++,e=`${P0}${ua}`),e}function ql(t="",e=ca){return t===Gl?P0:e}function v4(t=""){let e=t;return t===V0&&(ua++,e=`${Y0}${ua}`),e}function C4(t="",e=ca){return t===V0?Y0:e}function T4(t,e,i){let r=jl(t.id.trim()),s=ql(t.id.trim(),t.type),n=jl(e.id.trim()),a=ql(e.id.trim(),e.type);tn(r,s,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),tn(n,a,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),Wi.relations.push({id1:r,id2:n,relationTitle:Jt.sanitizeText(i,M())})}const q0=function(t,e,i){if(typeof t=="object")T4(t,e,i);else{const r=jl(t.trim()),s=ql(t),n=v4(e.trim()),a=C4(e);tn(r,s),tn(n,a),Wi.relations.push({id1:r,id2:n,title:Jt.sanitizeText(i,M())})}},Xl=function(t,e){const i=Wi.states[t],r=e.startsWith(":")?e.replace(":","").trim():e;i.descriptions.push(Jt.sanitizeText(r,M()))},S4=function(t){return t.substring(0,1)===":"?t.substr(2).trim():t.trim()},w4=()=>(G0++,"divider-id-"+G0),X0=function(t,e=""){ha[t]===void 0&&(ha[t]={id:t,styles:[],textStyles:[]});const i=ha[t];e!=null&&e.split(d4).forEach(r=>{const s=r.replace(/([^;]*);/,"$1").trim();if(r.match(z0)){const a=s.replace(W0,u4).replace(z0,W0);i.textStyles.push(a)}i.styles.push(s)})},A4=function(){return ha},Kl=function(t,e){t.split(",").forEach(function(i){let r=da(i);if(r===void 0){const s=i.trim();tn(s),r=da(s)}r.classes.push(e)})},L4=function(t,e){const i=da(t);i!==void 0&&i.textStyles.push(e)},B4=function(t,e){const i=da(t);i!==void 0&&i.textStyles.push(e)},gs={parseDirective:g4,getConfig:()=>M().state,addState:tn,clear:j0,getState:da,getStates:k4,getRelations:E4,getClasses:A4,getDirection:()=>Z0,addRelation:q0,getDividerId:w4,setDirection:t=>{Z0=t},cleanupLabel:S4,lineType:f4,relationType:p4,logDocuments:_4,getRootDoc:m4,setRootDoc:y4,getRootDocV2:b4,extract:x4,trimColon:t=>t&&t[0]===":"?t.substr(1).trim():t.trim(),getAccTitle:fr,setAccTitle:nr,getAccDescription:gr,setAccDescription:pr,addStyleClass:X0,setCssClass:Kl,addDescription:Xl,setDiagramTitle:Ir,getDiagramTitle:Dr},Ql={},I4=(t,e)=>{Ql[t]=e},D4=t=>Ql[t],K0=()=>Object.keys(Ql),R4={get:D4,set:I4,keys:K0,size:()=>K0().length},N4=t=>t.append("circle").attr("class","start-state").attr("r",M().state.sizeUnit).attr("cx",M().state.padding+M().state.sizeUnit).attr("cy",M().state.padding+M().state.sizeUnit),O4=t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",M().state.textHeight).attr("class","divider").attr("x2",M().state.textHeight*2).attr("y1",0).attr("y2",0),F4=(t,e)=>{const i=t.append("text").attr("x",2*M().state.padding).attr("y",M().state.textHeight+2*M().state.padding).attr("font-size",M().state.fontSize).attr("class","state-title").text(e.id),r=i.node().getBBox();return t.insert("rect",":first-child").attr("x",M().state.padding).attr("y",M().state.padding).attr("width",r.width+2*M().state.padding).attr("height",r.height+2*M().state.padding).attr("rx",M().state.radius),i},M4=(t,e)=>{const i=function(d,p,k){const _=d.append("tspan").attr("x",2*M().state.padding).text(p);k||_.attr("dy",M().state.textHeight)},s=t.append("text").attr("x",2*M().state.padding).attr("y",M().state.textHeight+1.3*M().state.padding).attr("font-size",M().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),n=s.height,a=t.append("text").attr("x",M().state.padding).attr("y",n+M().state.padding*.4+M().state.dividerMargin+M().state.textHeight).attr("class","state-description");let o=!0,l=!0;e.descriptions.forEach(function(d){o||(i(a,d,l),l=!1),o=!1});const h=t.append("line").attr("x1",M().state.padding).attr("y1",M().state.padding+n+M().state.dividerMargin/2).attr("y2",M().state.padding+n+M().state.dividerMargin/2).attr("class","descr-divider"),u=a.node().getBBox(),f=Math.max(u.width,s.width);return h.attr("x2",f+3*M().state.padding),t.insert("rect",":first-child").attr("x",M().state.padding).attr("y",M().state.padding).attr("width",f+2*M().state.padding).attr("height",u.height+n+2*M().state.padding).attr("rx",M().state.radius),t},P4=(t,e,i)=>{const r=M().state.padding,s=2*M().state.padding,n=t.node().getBBox(),a=n.width,o=n.x,l=t.append("text").attr("x",0).attr("y",M().state.titleShift).attr("font-size",M().state.fontSize).attr("class","state-title").text(e.id),u=l.node().getBBox().width+s;let f=Math.max(u,a);f===a&&(f=f+s);let d;const p=t.node().getBBox();e.doc,d=o-r,u>a&&(d=(a-f)/2+r),Math.abs(o-p.x)<r&&u>a&&(d=o-(u-a)/2);const k=1-M().state.textHeight;return t.insert("rect",":first-child").attr("x",d).attr("y",k).attr("class",i?"alt-composit":"composit").attr("width",f).attr("height",p.height+M().state.textHeight+M().state.titleShift+1).attr("rx","0"),l.attr("x",d+r),u<=a&&l.attr("x",o+(f-s)/2-u/2+r),t.insert("rect",":first-child").attr("x",d).attr("y",M().state.titleShift-M().state.textHeight-M().state.padding).attr("width",f).attr("height",M().state.textHeight*3).attr("rx",M().state.radius),t.insert("rect",":first-child").attr("x",d).attr("y",M().state.titleShift-M().state.textHeight-M().state.padding).attr("width",f).attr("height",p.height+3+2*M().state.textHeight).attr("rx",M().state.radius),t},V4=t=>(t.append("circle").attr("class","end-state-outer").attr("r",M().state.sizeUnit+M().state.miniPadding).attr("cx",M().state.padding+M().state.sizeUnit+M().state.miniPadding).attr("cy",M().state.padding+M().state.sizeUnit+M().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",M().state.sizeUnit).attr("cx",M().state.padding+M().state.sizeUnit+2).attr("cy",M().state.padding+M().state.sizeUnit+2)),Y4=(t,e)=>{let i=M().state.forkWidth,r=M().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",M().state.padding).attr("y",M().state.padding)},z4=(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(Jt.lineBreakRegex);let l=1.25*M().state.noteMargin;for(const h of o){const u=h.trim();if(u.length>0){const f=n.append("tspan");if(f.text(u),l===0){const d=f.node().getBBox();l+=d.height}s+=l,f.attr("x",e+M().state.noteMargin),f.attr("y",i+s+1.25*M().state.noteMargin)}}return{textWidth:n.node().getBBox().width,textHeight:s}},W4=(t,e)=>{e.attr("class","state-note");const i=e.append("rect").attr("x",0).attr("y",M().state.padding),r=e.append("g"),{textWidth:s,textHeight:n}=z4(t,0,0,r);return i.attr("height",n+2*M().state.noteMargin),i.attr("width",s+M().state.noteMargin*2),i},Q0=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"&&N4(s),e.type==="end"&&V4(s),(e.type==="fork"||e.type==="join")&&Y4(s,e),e.type==="note"&&W4(e.note.text,s),e.type==="divider"&&O4(s),e.type==="default"&&e.descriptions.length===0&&F4(s,e),e.type==="default"&&e.descriptions.length>0&&M4(s,e);const n=s.node().getBBox();return r.width=n.width+2*M().state.padding,r.height=n.height+2*M().state.padding,R4.set(i,r),r};let J0=0;const U4=function(t,e,i){const r=function(l){switch(l){case gs.relationType.AGGREGATION:return"aggregation";case gs.relationType.EXTENSION:return"extension";case gs.relationType.COMPOSITION:return"composition";case gs.relationType.DEPENDENCY:return"dependency"}};e.points=e.points.filter(l=>!Number.isNaN(l.y));const s=e.points,n=(0,J.jvg)().x(function(l){return l.x}).y(function(l){return l.y}).curve(J.$0Z),a=t.append("path").attr("d",n(s)).attr("id","edge"+J0).attr("class","transition");let o="";if(M().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(gs.relationType.DEPENDENCY)+"End)"),i.title!==void 0){const l=t.append("g").attr("class","stateLabel"),{x:h,y:u}=me.calcLabelPosition(e.points),f=Jt.getRows(i.title);let d=0;const p=[];let k=0,_=0;for(let E=0;E<=f.length;E++){const I=l.append("text").attr("text-anchor","middle").text(f[E]).attr("x",h).attr("y",u+d),z=I.node().getBBox();k=Math.max(k,z.width),_=Math.min(_,z.x),b.info(z.x,h,u+d),d===0&&(d=I.node().getBBox().height,b.info("Title height",d,u)),p.push(I)}let T=d*f.length;if(f.length>1){const E=(f.length-1)*d*.5;p.forEach((I,z)=>I.attr("y",u+z*d-E)),T=d*f.length}const S=l.node().getBBox();l.insert("rect",":first-child").attr("class","box").attr("x",h-k/2-M().state.padding/2).attr("y",u-T/2-M().state.padding/2-3.5).attr("width",k+M().state.padding).attr("height",T+M().state.padding),b.info(S)}J0++};let mr;const Jl={},Z4=function(){},H4=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")},G4=function(t,e,i,r){mr=M().state;const s=M().securityLevel;let n;s==="sandbox"&&(n=(0,J.Ys)("#i"+e));const a=s==="sandbox"?(0,J.Ys)(n.nodes()[0].contentDocument.body):(0,J.Ys)("body"),o=s==="sandbox"?n.nodes()[0].contentDocument:document;b.debug("Rendering diagram "+t);const l=a.select(`[id='${e}']`);H4(l),new Gi.k({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel(function(){return{}});const u=r.db.getRootDoc();$0(u,l,void 0,!1,a,o,r);const f=mr.padding,d=l.node().getBBox(),p=d.width+f*2,k=d.height+f*2,_=p*1.75;Br(l,k,_,mr.useMaxWidth),l.attr("viewBox",`${d.x-mr.padding} ${d.y-mr.padding} `+p+" "+k)},j4=t=>t?t.length*mr.fontSizeFactor:1,$0=(t,e,i,r,s,n,a)=>{const o=new Gi.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(),f=a.db.getRelations(),d=Object.keys(u);for(const S of d){const E=u[S];i&&(E.parentId=i);let I;if(E.doc){let z=e.append("g").attr("id",E.id).attr("class","stateGroup");I=$0(E.doc,z,E.id,!r,s,n,a);{z=P4(z,E,r);let Q=z.node().getBBox();I.width=Q.width,I.height=Q.height+mr.padding/2,Jl[E.id]={y:mr.compositTitleSize}}}else I=Q0(e,E);if(E.note){const z={descriptions:[],id:E.id+"-note",note:E.note,type:"note"},Q=Q0(e,z);E.note.position==="left of"?(o.setNode(I.id+"-note",Q),o.setNode(I.id,I)):(o.setNode(I.id,I),o.setNode(I.id+"-note",Q)),o.setParent(I.id,I.id+"-group"),o.setParent(I.id+"-note",I.id+"-group")}else o.setNode(I.id,I)}b.debug("Count=",o.nodeCount(),o);let p=0;f.forEach(function(S){p++,b.debug("Setting edge",S),o.setEdge(S.id1,S.id2,{relation:S,width:j4(S.title),height:mr.labelHeight*Jt.getRows(S.title).length,labelpos:"c"},"id"+p)}),(0,xs.bK)(o),b.debug("Graph after layout",o.nodes());const k=e.node();o.nodes().forEach(function(S){S!==void 0&&o.node(S)!==void 0?(b.warn("Node "+S+": "+JSON.stringify(o.node(S))),s.select("#"+k.id+" #"+S).attr("transform","translate("+(o.node(S).x-o.node(S).width/2)+","+(o.node(S).y+(Jl[S]?Jl[S].y:0)-o.node(S).height/2)+" )"),s.select("#"+k.id+" #"+S).attr("data-x-shift",o.node(S).x-o.node(S).width/2),n.querySelectorAll("#"+k.id+" #"+S+" .divider").forEach(I=>{const z=I.parentElement;let Q=0,ot=0;z&&(z.parentElement&&(Q=z.parentElement.getBBox().width),ot=parseInt(z.getAttribute("data-x-shift"),10),Number.isNaN(ot)&&(ot=0)),I.setAttribute("x1",0-ot+8),I.setAttribute("x2",Q-ot-8)})):b.debug("No Node "+S+": "+JSON.stringify(o.node(S)))});let _=k.getBBox();o.edges().forEach(function(S){S!==void 0&&o.edge(S)!==void 0&&(b.debug("Edge "+S.v+" -> "+S.w+": "+JSON.stringify(o.edge(S))),U4(e,o.edge(S),o.edge(S).relation))}),_=k.getBBox();const T={id:i||"root",label:i||"root",width:0,height:0};return T.width=_.width+2*mr.padding,T.height=_.height+2*mr.padding,b.debug("Doc rendered",T,o),T},q4={setConf:Z4,draw:G4},xo="rect",$l="rectWithTitle",X4="start",K4="end",Q4="divider",J4="roundedWithTitle",$4="note",t5="noteGroup",Tn="statediagram",e5=`${Tn}-state`,tu="transition",i5="note",r5=`${tu} note-edge`,s5=`${Tn}-${i5}`,n5=`${Tn}-cluster`,a5=`${Tn}-cluster-alt`,eu="parent",iu="note",o5="state",tc="----",l5=`${tc}${iu}`,ru=`${tc}${eu}`,su="fill:none",nu="fill: #333",au="c",ou="text",lu="normal";let ko={},Os=0;const c5=function(t){const e=Object.keys(t);for(const i of e)t[i]},h5=function(t,e){b.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 u5(t){return t==null?"":t.classes?t.classes.join(" "):""}function ec(t="",e=0,i="",r=tc){const s=i!==null&&i.length>0?`${r}${i}`:"";return`${o5}-${t}${s}-${e}`}const fa=(t,e,i,r,s,n)=>{const a=i.id,o=u5(r[a]);if(a!=="root"){let l=xo;i.start===!0&&(l=X4),i.start===!1&&(l=K4),i.type!==ca&&(l=i.type),ko[a]||(ko[a]={id:a,shape:l,description:Jt.sanitizeText(a,M()),classes:`${o} ${e5}`});const h=ko[a];i.description&&(Array.isArray(h.description)?(h.shape=$l,h.description.push(i.description)):h.description.length>0?(h.shape=$l,h.description===a?h.description=[i.description]:h.description=[h.description,i.description]):(h.shape=xo,h.description=i.description),h.description=Jt.sanitizeTextOrArray(h.description,M())),h.description.length===1&&h.shape===$l&&(h.shape=xo),!h.type&&i.doc&&(b.info("Setting cluster for ",a,ic(i)),h.type="group",h.dir=ic(i),h.shape=i.type===M0?Q4:J4,h.classes=h.classes+" "+n5+" "+(n?a5:""));const u={labelStyle:"",shape:h.shape,labelText:h.description,classes:h.classes,style:"",id:a,dir:h.dir,domId:ec(a,Os),type:h.type,padding:15};if(i.note){const f={labelStyle:"",shape:$4,labelText:i.note.text,classes:s5,style:"",id:a+l5+"-"+Os,domId:ec(a,Os,iu),type:h.type,padding:15},d={labelStyle:"",shape:t5,labelText:i.note.text,classes:h.classes,style:"",id:a+ru,domId:ec(a,Os,eu),type:"group",padding:0};Os++;const p=a+ru;t.setNode(p,d),t.setNode(f.id,f),t.setNode(a,u),t.setParent(a,p),t.setParent(f.id,p);let k=a,_=f.id;i.note.position==="left of"&&(k=f.id,_=a),t.setEdge(k,_,{arrowhead:"none",arrowType:"",style:su,labelStyle:"",classes:r5,arrowheadStyle:nu,labelpos:au,labelType:ou,thickness:lu})}else t.setNode(a,u)}e&&e.id!=="root"&&(b.trace("Setting node ",a," to be child of its parent ",e.id),t.setParent(a,e.id)),i.doc&&(b.trace("Adding nodes children "),d5(t,i,i.doc,r,s,!n))},d5=(t,e,i,r,s,n)=>{b.trace("items",i),i.forEach(a=>{switch(a.stmt){case po:fa(t,e,a,r,s,n);break;case ca:fa(t,e,a,r,s,n);break;case Hl:{fa(t,e,a.state1,r,s,n),fa(t,e,a.state2,r,s,n);const o={id:"edge"+Os,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:su,labelStyle:"",label:Jt.sanitizeText(a.description,M()),arrowheadStyle:nu,labelpos:au,labelType:ou,thickness:lu,classes:tu};t.setEdge(a.state1.id,a.state2.id,o,Os),Os++}break}})},ic=(t,e=l4)=>{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},f5={setConf:c5,getClasses:h5,draw:function(t,e,i,r){b.info("Drawing state diagram (v2)",e),ko={};let s=r.db.getDirection();s===void 0&&(s=F0);const{securityLevel:n,state:a}=M(),o=a.nodeSpacing||50,l=a.rankSpacing||50;b.info(r.db.getRootDocV2()),r.db.extract(r.db.getRootDocV2()),b.info(r.db.getRootDocV2());const h=r.db.getStates(),u=new Gi.k({multigraph:!0,compound:!0}).setGraph({rankdir:ic(r.db.getRootDocV2()),nodesep:o,ranksep:l,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});fa(u,void 0,r.db.getRootDocV2(),h,r.db,!0);let f;n==="sandbox"&&(f=(0,J.Ys)("#i"+e));const d=n==="sandbox"?(0,J.Ys)(f.nodes()[0].contentDocument.body):(0,J.Ys)("body"),p=d.select(`[id="${e}"]`),k=d.select("#"+e+" g");ll(k,u,["barb"],Tn,e);const _=8;me.insertTitle(p,"statediagramTitleText",a.titleTopMargin,r.db.getDiagramTitle());const T=p.node().getBBox(),S=T.width+_*2,E=T.height+_*2;p.attr("class",Tn);const I=p.node().getBBox();Br(p,E,S,a.useMaxWidth);const z=`${I.x-_} ${I.y-_} ${S} ${E}`;b.debug(`viewBox ${z}`),p.attr("viewBox",z);const Q=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const ot of Q){const Y=ot.getBBox(),O=document.createElementNS("http://www.w3.org/2000/svg",xo);O.setAttribute("rx",0),O.setAttribute("ry",0),O.setAttribute("width",Y.width),O.setAttribute("height",Y.height),ot.insertBefore(O,ot.firstChild)}}};var rc=function(){var t=function(_,T,S,E){for(S=S||{},E=_.length;E--;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],f=[4,6,9,11,17,18,20,22,23,24,26],d={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,E,I,z,Q,ot){var Y=Q.length-1;switch(z){case 1:return Q[Y-1];case 3:this.$=[];break;case 4:Q[Y-1].push(Q[Y]),this.$=Q[Y-1];break;case 5:case 6:this.$=Q[Y];break;case 7:case 8:this.$=[];break;case 11:I.setDiagramTitle(Q[Y].substr(6)),this.$=Q[Y].substr(6);break;case 12:this.$=Q[Y].trim(),I.setAccTitle(this.$);break;case 13:case 14:this.$=Q[Y].trim(),I.setAccDescription(this.$);break;case 15:I.addSection(Q[Y].substr(8)),this.$=Q[Y].substr(8);break;case 16:I.addTask(Q[Y-1],Q[Y]),this.$="task";break;case 18:I.parseDirective("%%{","open_directive");break;case 19:I.parseDirective(Q[Y],"type_directive");break;case 20:Q[Y]=Q[Y].trim().replace(/'/g,'"'),I.parseDirective(Q[Y],"arg_directive");break;case 21:I.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(f,[2,9]),{14:32,29:u},{29:[2,20]},{11:[1,33]},t(f,[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 E=new Error(T);throw E.hash=S,E}},parse:function(T){var S=this,E=[0],I=[],z=[null],Q=[],ot=this.table,Y="",O=0,v=0,L=2,w=1,m=Q.slice.call(arguments,1),B=Object.create(this.lexer),g={yy:{}};for(var N in this.yy)Object.prototype.hasOwnProperty.call(this.yy,N)&&(g.yy[N]=this.yy[N]);B.setInput(T,g.yy),g.yy.lexer=B,g.yy.parser=this,typeof B.yylloc>"u"&&(B.yylloc={});var y=B.yylloc;Q.push(y);var V=B.options&&B.options.ranges;typeof g.yy.parseError=="function"?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function wt(){var gt;return gt=I.pop()||B.lex()||w,typeof gt!="number"&&(gt instanceof Array&&(I=gt,gt=I.pop()),gt=S.symbols_[gt]||gt),gt}for(var nt,rt,st,et,tt={},Tt,xt,Z,jt;;){if(rt=E[E.length-1],this.defaultActions[rt]?st=this.defaultActions[rt]:((nt===null||typeof nt>"u")&&(nt=wt()),st=ot[rt]&&ot[rt][nt]),typeof st>"u"||!st.length||!st[0]){var U="";jt=[];for(Tt in ot[rt])this.terminals_[Tt]&&Tt>L&&jt.push("'"+this.terminals_[Tt]+"'");B.showPosition?U="Parse error on line "+(O+1)+`:
1366
+ `+B.showPosition()+`
1367
+ Expecting `+jt.join(", ")+", got '"+(this.terminals_[nt]||nt)+"'":U="Parse error on line "+(O+1)+": Unexpected "+(nt==w?"end of input":"'"+(this.terminals_[nt]||nt)+"'"),this.parseError(U,{text:B.match,token:this.terminals_[nt]||nt,line:B.yylineno,loc:y,expected:jt})}if(st[0]instanceof Array&&st.length>1)throw new Error("Parse Error: multiple actions possible at state: "+rt+", token: "+nt);switch(st[0]){case 1:E.push(nt),z.push(B.yytext),Q.push(B.yylloc),E.push(st[1]),nt=null,v=B.yyleng,Y=B.yytext,O=B.yylineno,y=B.yylloc;break;case 2:if(xt=this.productions_[st[1]][1],tt.$=z[z.length-xt],tt._$={first_line:Q[Q.length-(xt||1)].first_line,last_line:Q[Q.length-1].last_line,first_column:Q[Q.length-(xt||1)].first_column,last_column:Q[Q.length-1].last_column},V&&(tt._$.range=[Q[Q.length-(xt||1)].range[0],Q[Q.length-1].range[1]]),et=this.performAction.apply(tt,[Y,v,O,g.yy,st[1],z,Q].concat(m)),typeof et<"u")return et;xt&&(E=E.slice(0,-1*xt*2),z=z.slice(0,-1*xt),Q=Q.slice(0,-1*xt)),E.push(this.productions_[st[1]][0]),z.push(tt.$),Q.push(tt._$),Z=ot[E[E.length-2]][E[E.length-1]],E.push(Z);break;case 3:return!0}}return!0}},p=function(){var _={EOF:1,parseError:function(S,E){if(this.yy.parser)this.yy.parser.parseError(S,E);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,E=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 I=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),E.length-1&&(this.yylineno-=E.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:E?(E.length===I.length?this.yylloc.first_column:0)+I[I.length-E.length].length-E[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 E,I,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))),I=T[0].match(/(?:\r\n?|\n).*/g),I&&(this.yylineno+=I.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:I?I[I.length-1].length-I[I.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],E=this.performAction.call(this,this.yy,this,S,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),E)return E;if(this._backtrack){for(var Q in z)this[Q]=z[Q];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var T,S,E,I;this._more||(this.yytext="",this.match="");for(var z=this._currentRules(),Q=0;Q<z.length;Q++)if(E=this._input.match(this.rules[z[Q]]),E&&(!S||E[0].length>S[0].length)){if(S=E,I=Q,this.options.backtrack_lexer){if(T=this.test_match(E,z[Q]),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[I]),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,E,I,z){switch(I){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 _}();d.lexer=p;function k(){this.yy={}}return k.prototype=d,d.Parser=k,new k}();rc.parser=rc;const p5=rc,g5=t=>t.match(/^\s*journey/)!==null;let Sn="";const sc=[],pa=[],ga=[],y5=function(t,e,i){ii.parseDirective(this,t,e,i)},m5=function(){sc.length=0,pa.length=0,Sn="",ga.length=0,sr()},b5=function(t){Sn=t,sc.push(t)},x5=function(){return sc},k5=function(){let t=cu();const e=100;let i=0;for(;!t&&i<e;)t=cu(),i++;return pa.push(...ga),pa},_5=function(){const t=[];return pa.forEach(i=>{i.people&&t.push(...i.people)}),[...new Set(t)].sort()},E5=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:Sn,type:Sn,people:n,task:t,score:r};ga.push(a)},v5=function(t){const e={section:Sn,type:Sn,description:t,task:t,classes:[]};pa.push(e)},cu=function(){const t=function(i){return ga[i].processed};let e=!0;for(const[i,r]of ga.entries())t(i),e=e&&r.processed;return e},hu={parseDirective:y5,getConfig:()=>M().journey,clear:m5,setDiagramTitle:Ir,getDiagramTitle:Dr,setAccTitle:nr,getAccTitle:fr,setAccDescription:pr,getAccDescription:gr,addSection:b5,getSections:x5,getTasks:k5,addTask:E5,addTaskOrg:v5,getActors:function(){return _5()}},_o=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},C5=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,J.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,J.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},uu=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},du=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},T5=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,du(t,e)},S5=function(t,e,i){const r=t.append("g"),s=nc();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,_o(r,s),pu(i)(e.text,r,s.x,s.y,s.width,s.height,{class:"journey-section section-type-"+e.num},i,e.colour)};let fu=-1;const w5=function(t,e,i){const r=e.x+i.width/2,s=t.append("g");fu++;const n=300+5*30;s.append("line").attr("id","task"+fu).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"),C5(s,{cx:r,cy:300+(5-e.score)*30,score:e.score});const a=nc();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,_o(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};uu(s,u),o+=10}),pu(i)(e.task,s,a.x,a.y,a.width,a.height,{class:"task"},i,e.colour)},A5=function(t,e){_o(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},L5=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},nc=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},pu=function(){function t(s,n,a,o,l,h,u,f){const d=n.append("text").attr("x",a+l/2).attr("y",o+h/2+5).style("font-color",f).style("text-anchor","middle").text(s);r(d,u)}function e(s,n,a,o,l,h,u,f,d){const{taskFontSize:p,taskFontFamily:k}=f,_=s.split(/<br\s*\/?>/gi);for(let T=0;T<_.length;T++){const S=T*p-p*(_.length-1)/2,E=n.append("text").attr("x",a+l/2).attr("y",o).attr("fill",d).style("text-anchor","middle").style("font-size",p).style("font-family",k);E.append("tspan").attr("x",a+l/2).attr("dy",S).text(_[T]),E.attr("y",o+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(E,u)}}function i(s,n,a,o,l,h,u,f){const d=n.append("switch"),k=d.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%");k.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(s),e(s,d,a,o,l,h,u,f),r(k,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}}(),ya={drawRect:_o,drawCircle:uu,drawSection:S5,drawText:du,drawLabel:T5,drawTask:w5,drawBackgroundRect:A5,getTextObj:L5,getNoteRect:nc,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")}},B5=function(t){Object.keys(t).forEach(function(i){Eo[i]=t[i]})},ys={};function I5(t){const e=M().journey;let i=60;Object.keys(ys).forEach(r=>{const s=ys[r].color,n={cx:20,cy:i,r:7,fill:s,stroke:"#000",pos:ys[r].position};ya.drawCircle(t,n);const a={x:40,y:i+7,fill:"#666",text:r,textMargin:e.boxTextMargin|5};ya.drawText(t,a),i+=20})}const Eo=M().journey,en=Eo.leftMargin,D5=function(t,e,i,r){const s=M().journey;r.db.clear(),r.parser.parse(t+`
1371
+ `);const n=M().securityLevel;let a;n==="sandbox"&&(a=(0,J.Ys)("#i"+e));const o=n==="sandbox"?(0,J.Ys)(a.nodes()[0].contentDocument.body):(0,J.Ys)("body");Cr.init();const l=o.select("#"+e);ya.initGraphics(l);const h=r.db.getTasks(),u=r.db.getDiagramTitle(),f=r.db.getActors();for(const S in ys)delete ys[S];let d=0;f.forEach(S=>{ys[S]={color:s.actorColours[d%s.actorColours.length],position:d},d++}),I5(l),Cr.insert(0,0,en,Object.keys(ys).length*50),R5(l,h,0);const p=Cr.getBounds();u&&l.append("text").text(u).attr("x",en).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const k=p.stopy-p.starty+2*s.diagramMarginY,_=en+p.stopx+2*s.diagramMarginX;Br(l,k,_,s.useMaxWidth),l.append("line").attr("x1",en).attr("y1",s.height*4).attr("x2",_-en-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 ${_} ${k+T}`),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",k+T+25)},Cr={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=M().journey,n=this;let a=0;function o(l){return function(u){a++;const f=n.sequenceItems.length-a+1;n.updateVal(u,"starty",e-f*s.boxMargin,Math.min),n.updateVal(u,"stopy",r+f*s.boxMargin,Math.max),n.updateVal(Cr.data,"startx",t-f*s.boxMargin,Math.min),n.updateVal(Cr.data,"stopx",i+f*s.boxMargin,Math.max),l!=="activation"&&(n.updateVal(u,"startx",t-f*s.boxMargin,Math.min),n.updateVal(u,"stopx",i+f*s.boxMargin,Math.max),n.updateVal(Cr.data,"starty",e-f*s.boxMargin,Math.min),n.updateVal(Cr.data,"stopy",r+f*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(Cr.data,"startx",s,Math.min),this.updateVal(Cr.data,"starty",a,Math.min),this.updateVal(Cr.data,"stopx",n,Math.max),this.updateVal(Cr.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}},ac=Eo.sectionFills,gu=Eo.sectionColours,R5=function(t,e,i){const r=M().journey;let s="";const n=r.height*2+r.diagramMarginY,a=i+n;let o=0,l="#CCC",h="black",u=0;for(const[f,d]of e.entries()){if(s!==d.section){l=ac[o%ac.length],u=o%ac.length,h=gu[o%gu.length];const k={x:f*r.taskMargin+f*r.width+en,y:50,text:d.section,fill:l,num:u,colour:h};ya.drawSection(t,k,r),s=d.section,o++}const p=d.people.reduce((k,_)=>(ys[_]&&(k[_]=ys[_]),k),{});d.x=f*r.taskMargin+f*r.width+en,d.y=a,d.width=r.diagramMarginX,d.height=r.diagramMarginY,d.colour=h,d.fill=l,d.num=u,d.actors=p,ya.drawTask(t,d,r),Cr.insert(d.x,d.y,d.x+d.width+r.taskMargin,300+5*30)}},yu={setConf:B5,draw:D5};let mu={};const vo={setConf:function(t){mu={...mu,...t}},draw:(t,e,i)=>{try{b.debug(`Renering svg for syntax error
1372
+ `);const r=(0,J.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){b.error("Error while rendering info diagram"),b.error(A2(r))}}},bu="flowchart-elk",N5={id:bu,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([bt.e(9517),bt.e(1160)]).then(bt.bind(bt,19487));return{id:bu,diagram:t}}},xu="timeline",O5={id:xu,detector:t=>t.match(/^\s*timeline/)!==null,loader:async()=>{const{diagram:t}=await Promise.all([bt.e(9517),bt.e(5493)]).then(bt.bind(bt,96316));return{id:xu,diagram:t}}},ku="mindmap",F5={id:ku,detector:t=>t.match(/^\s*mindmap/)!==null,loader:async()=>{const{diagram:t}=await Promise.all([bt.e(9517),bt.e(5493),bt.e(8359),bt.e(8329),bt.e(4607)]).then(bt.bind(bt,47724));return{id:ku,diagram:t}}};let _u=!1;const ma=()=>{_u||(_u=!0,Fc(N5,O5,F5),Si("error",{db:{clear:()=>{}},styles:Wo,renderer:vo,parser:{parser:{yy:{}},parse:()=>{}},init:()=>{}},t=>t.toLowerCase().trim()==="error"),Si("---",{db:{clear:()=>{}},styles:Wo,renderer:vo,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("---")),Si("c4",{parser:_f,db:y1,renderer:T1,styles:r1,init:t=>{T1.setConf(t.c4)}},Ef),Si("class",{parser:S1,db:gn,renderer:Fp,styles:Mn,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,gn.clear()}},lp),Si("classDiagram",{parser:S1,db:gn,renderer:Ag,styles:Mn,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,gn.clear()}},cp),Si("er",{parser:Lg,db:Ng,renderer:Hg,styles:Kc},Bg),Si("gantt",{parser:ly,db:Al,renderer:Yy,styles:Qc},cy),Si("info",{parser:zy,db:Wy,renderer:Uy,styles:Jc},Zy),Si("pie",{parser:Hy,db:jy,renderer:qy,styles:$c},Gy),Si("requirement",{parser:Xy,db:Qy,renderer:s3,styles:t1},Ky),Si("sequence",{parser:n3,db:v0,renderer:N0,styles:e1,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.");v0.setWrap(t.wrap),N0.setConf(t.sequence)}},a3),Si("state",{parser:O0,db:gs,renderer:q4,styles:Ia,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,gs.clear()}},a4),Si("stateDiagram",{parser:O0,db:gs,renderer:f5,styles:Ia,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,gs.clear()}},o4),Si("journey",{parser:p5,db:hu,renderer:yu,styles:i1,init:t=>{yu.setConf(t.journey),hu.clear()}},g5),Si("flowchart",{parser:dl,db:Xr,renderer:yl,styles:Ba,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,ay.setConf(t.flowchart),Xr.clear(),Xr.setGen("gen-1")}},Gg),Si("flowchart-v2",{parser:dl,db:Xr,renderer:yl,styles:Ba,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Hc({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),yl.setConf(t.flowchart),Xr.clear(),Xr.setGen("gen-2")}},jg),Si("gitGraph",{parser:H2,db:df,renderer:xf,styles:kf},G2))};class oc{constructor(e,i){var r,s;this.txt=e,this.type="graph",this.detectTypeFailed=!1;const n=M();this.txt=e;try{this.type=Oo(e,n)}catch(l){this.handleError(l,i),this.type="error",this.detectTypeFailed=!0}const a=a1(this.type);b.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(l2(l,this.db)),this.parser.parser.yy=this.db,a.init&&(a.init(n),b.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(Yo(e)){i(e.str,e.hash);return}i(e)}getParser(){return this.parser}getType(){return this.type}}const lc=(t,e)=>{const i=Oo(t,M());try{a1(i)}catch{const s=u2(i);if(!s)throw new Error(`Diagram ${i} not found.`);return s().then(({diagram:n})=>(Si(i,n,void 0),new oc(t,e)))}return new oc(t,e)},cc=oc,M5="graphics-document document";function P5(t,e){t.attr("role",M5),(0,ye.Z)(e)||t.attr("aria-roledescription",e)}function V5(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 hc=["graph","flowchart","flowchart-v2","stateDiagram","stateDiagram-v2"],Eu="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",vu="sandbox",Cu="loose",Y5="http://www.w3.org/2000/svg",Tu="http://www.w3.org/1999/xlink",Su="http://www.w3.org/1999/xhtml",z5="100%",W5="100%",U5="border:0;margin:0;",Z5="margin:0",H5="allow-top-navigation-by-user-activation allow-popups",G5='The "iframe" tag is not supported by your browser.',wu=["foreignobject"],Au=["dominant-baseline"];function j5(t,e){return ma(),new cc(t,e).parse(t,e)}async function q5(t,e){return ma(),(await lc(t,e)).parse(t,e)}const Lu=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},uc=function(t){let e=t;return e=e.replace(/fl°°/g,"&#"),e=e.replace(/fl°/g,"&"),e=e.replace(/¶ß/g,";"),e},Bu=(t,e,i=[])=>`
1375
+ .${t} ${e} { ${i.join(" !important; ")} !important; }`,X5=(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,ye.Z)(i)&&hc.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,ye.Z)(u.styles)||l.forEach(f=>{s+=Bu(u.id,f,u.styles)}),(0,ye.Z)(u.textStyles)||(s+=Bu(u.id,"tspan",u.textStyles))}}return s},Iu=(t,e,i,r)=>{const s=X5(t,e,i),n=P2(e,s,t.themeVariables);return(0,Ln.q)((0,nn.MY)(`${r}{${n}}`),Ln.P)},Du=(t="",e,i)=>{let r=t;return!i&&!e&&(r=r.replace(/marker-end="url\(.*?#/g,'marker-end="url(#')),r=uc(r),r=r.replace(/<br>/g,"<br/>"),r},Ru=(t="",e)=>{const i=e?e.viewBox.baseVal.height+"px":W5,r=btoa('<body style="'+Z5+'">'+t+"</body>");return`<iframe style="width:${z5};height:${i};${U5}" src="data:text/html;base64,${r}" sandbox="${H5}">
1379
+ ${G5}
1380
+ </iframe>`},Co=(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",Y5);return s&&a.attr("xmlns:xlink",s),a.append("g"),t};function To(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const Nu=(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()},K5=function(t,e,i,r){var s,n,a,o;ma(),On();const l=me.detectInit(e);l&&(js(l),zo(l));const h=M();b.debug(h),e.length>((h==null?void 0:h.maxTextSize)??5e4)&&(e=Eu),e=e.replace(/\r\n?/g,`
1381
+ `);const u="#"+t,f="i"+t,d="#"+f,p="d"+t,k="#"+p;let _=(0,J.Ys)("body");const T=h.securityLevel===vu,S=h.securityLevel===Cu,E=h.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),T){const wt=To((0,J.Ys)(r),f);_=(0,J.Ys)(wt.nodes()[0].contentDocument.body),_.node().style.margin=0}else _=(0,J.Ys)(r);Co(_,t,p,`font-family: ${E}`,Tu)}else{if(Nu(document,t,p,f),T){const wt=To((0,J.Ys)("body"),f);_=(0,J.Ys)(wt.nodes()[0].contentDocument.body),_.node().style.margin=0}else _=(0,J.Ys)("body");Co(_,t,p)}e=Lu(e);let I,z;try{if(I=lc(e),"then"in I)throw new Error("Diagram is a promise. Use renderAsync.")}catch(wt){I=new cc("error"),z=wt}const Q=_.select(k).node(),ot=I.type,Y=Q.firstChild,O=Y.firstChild,v=hc.includes(ot)?I.renderer.getClasses(e,I):{},L=Iu(h,ot,v,u),w=document.createElement("style");w.innerHTML=L,Y.insertBefore(w,O);try{I.renderer.draw(e,t,Aa,I)}catch(wt){throw vo.draw(e,t,Aa),wt}const m=_.select(`${k} svg`),B=(n=(s=I.db).getAccTitle)==null?void 0:n.call(s),g=(o=(a=I.db).getAccDescription)==null?void 0:o.call(a);Ou(ot,m,B,g),_.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",Su);let N=_.select(k).node().innerHTML;if(b.debug("config.arrowMarkerAbsolute",h.arrowMarkerAbsolute),N=Du(N,T,Je(h.arrowMarkerAbsolute)),T){const wt=_.select(k+" svg").node();N=Ru(N,wt)}else S||(N=$r().sanitize(N,{ADD_TAGS:wu,ADD_ATTR:Au}));if(i!==void 0)switch(ot){case"flowchart":case"flowchart-v2":i(N,Xr.bindFunctions);break;case"gantt":i(N,Al.bindFunctions);break;case"class":case"classDiagram":i(N,gn.bindFunctions);break;default:i(N)}else b.debug("CB = undefined!");C0();const y=T?d:k,V=(0,J.Ys)(y).node();if(V&&"remove"in V&&V.remove(),z)throw z;return N},Q5=async function(t,e,i,r){var s,n,a,o;ma(),On();const l=me.detectInit(e);l&&(js(l),zo(l));const h=M();b.debug(h),e.length>((h==null?void 0:h.maxTextSize)??5e4)&&(e=Eu),e=e.replace(/\r\n?/g,`
1382
+ `);const u="#"+t,f="i"+t,d="#"+f,p="d"+t,k="#"+p;let _=(0,J.Ys)("body");const T=h.securityLevel===vu,S=h.securityLevel===Cu,E=h.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),T){const wt=To((0,J.Ys)(r),f);_=(0,J.Ys)(wt.nodes()[0].contentDocument.body),_.node().style.margin=0}else _=(0,J.Ys)(r);Co(_,t,p,`font-family: ${E}`,Tu)}else{if(Nu(document,t,p,f),T){const wt=To((0,J.Ys)("body"),f);_=(0,J.Ys)(wt.nodes()[0].contentDocument.body),_.node().style.margin=0}else _=(0,J.Ys)("body");Co(_,t,p)}e=Lu(e);let I,z;try{I=await lc(e)}catch(wt){I=new cc("error"),z=wt}const Q=_.select(k).node(),ot=I.type,Y=Q.firstChild,O=Y.firstChild,v=hc.includes(ot)?I.renderer.getClasses(e,I):{},L=Iu(h,ot,v,u),w=document.createElement("style");w.innerHTML=L,Y.insertBefore(w,O);try{await I.renderer.draw(e,t,Aa,I)}catch(wt){throw vo.draw(e,t,Aa),wt}const m=_.select(`${k} svg`),B=(n=(s=I.db).getAccTitle)==null?void 0:n.call(s),g=(o=(a=I.db).getAccDescription)==null?void 0:o.call(a);Ou(ot,m,B,g),_.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",Su);let N=_.select(k).node().innerHTML;if(b.debug("config.arrowMarkerAbsolute",h.arrowMarkerAbsolute),N=Du(N,T,Je(h.arrowMarkerAbsolute)),T){const wt=_.select(k+" svg").node();N=Ru(N,wt)}else S||(N=$r().sanitize(N,{ADD_TAGS:wu,ADD_ATTR:Au}));if(i!==void 0)switch(ot){case"flowchart":case"flowchart-v2":i(N,Xr.bindFunctions);break;case"gantt":i(N,Al.bindFunctions);break;case"class":case"classDiagram":i(N,gn.bindFunctions);break;default:i(N)}else b.debug("CB = undefined!");C0();const y=T?d:k,V=(0,J.Ys)(y).node();if(V&&"remove"in V&&V.remove(),z)throw z;return N};function J5(t={}){var e;t!=null&&t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables={fontFamily:t.fontFamily}),I2(t),t!=null&&t.theme&&t.theme in ue?t.themeVariables=ue[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ue.default.getThemeVariables(t.themeVariables));const i=typeof t=="object"?B2(t):Zc();li(i.logLevel),ma()}function Ou(t,e,i,r){P5(e,t),V5(e,i,r,e.attr("id"))}const ii=Object.freeze({render:K5,renderAsync:Q5,parse:j5,parseAsync:q5,parseDirective:Go,initialize:J5,getConfig:M,setConfig:Hc,getSiteConfig:Zc,updateSiteConfig:D2,reset:()=>{On()},globalReset:()=>{On(fn)},defaultConfig:fn});li(M().logLevel),On(M());const $5=async function(t,e,i){try{await Mu(t,e,i)}catch(r){b.warn("Syntax Error rendering"),Yo(r)&&b.warn(r.str),Tr.parseError&&Tr.parseError(r)}},Fu=(t,e,i)=>{b.warn(t),Yo(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}))},tm=function(t,e,i){const r=ii.getConfig();t&&(Tr.sequenceConfig=t),b.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");b.debug(`Found ${s.length} diagrams`),(t==null?void 0:t.startOnLoad)!==void 0&&(b.debug("Start On Load: "+(t==null?void 0:t.startOnLoad)),ii.updateSiteConfig({startOnLoad:t==null?void 0:t.startOnLoad}));const n=new me.initIdGenerator(r.deterministicIds,r.deterministicIDSeed);let a;const o=[];for(const l of Array.from(s)){b.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,Pt.C)(me.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const u=me.detectInit(a);u&&b.debug("Detected early reinit: ",u);try{ii.render(h,a,(f,d)=>{l.innerHTML=f,i!==void 0&&i(h),d&&d(l)},l)}catch(f){Fu(f,o,Tr.parseError)}}if(o.length>0)throw o[0]},em=async(...t)=>{b.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();Si(r,a,s)}))).filter(r=>r.status==="rejected");if(i.length>0){b.error(`Failed to load ${i.length} external diagrams`);for(const r of i)b.error(r);throw new Error(`Failed to load ${i.length} external diagrams`)}},Mu=async function(t,e,i){const r=ii.getConfig();t&&(Tr.sequenceConfig=t),b.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");b.debug(`Found ${s.length} diagrams`),(t==null?void 0:t.startOnLoad)!==void 0&&(b.debug("Start On Load: "+(t==null?void 0:t.startOnLoad)),ii.updateSiteConfig({startOnLoad:t==null?void 0:t.startOnLoad}));const n=new me.initIdGenerator(r.deterministicIds,r.deterministicIDSeed);let a;const o=[];for(const l of Array.from(s)){b.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,Pt.C)(me.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const u=me.detectInit(a);u&&b.debug("Detected early reinit: ",u);try{await ii.renderAsync(h,a,(f,d)=>{l.innerHTML=f,i!==void 0&&i(h),d&&d(l)},l)}catch(f){Fu(f,o,Tr.parseError)}}if(o.length>0)throw o[0]},im=function(t){ii.initialize(t)},rm=async(t,{lazyLoad:e=!0}={})=>{e?Fc(...t):await em(...t)},Pu=function(){if(Tr.startOnLoad){const{startOnLoad:t}=ii.getConfig();t&&Tr.init().catch(e=>b.error("Mermaid failed to initialize",e))}};if(typeof document<"u"){window.addEventListener("load",Pu,!1)}const sm=function(t){Tr.parseError=t},nm=t=>ii.parse(t,Tr.parseError),So=[];let dc=!1;const Vu=async()=>{if(!dc){for(dc=!0;So.length>0;){const t=So.shift();if(t)try{await t()}catch(e){b.error("Error executing queue",e)}}dc=!1}},am=t=>new Promise((e,i)=>{const r=()=>new Promise((s,n)=>{ii.parseAsync(t,Tr.parseError).then(a=>{s(a),e(a)},a=>{b.error("Error parsing",a),n(a),i(a)})});So.push(r),Vu().catch(i)}),om=(t,e,i,r)=>new Promise((s,n)=>{const a=()=>new Promise((o,l)=>{ii.renderAsync(t,e,i,r).then(h=>{o(h),s(h)},h=>{b.error("Error parsing",h),l(h),n(h)})});So.push(a),Vu().catch(n)}),Tr={startOnLoad:!0,diagrams:{},mermaidAPI:ii,parse:nm,parseAsync:am,render:ii.render,renderAsync:om,init:$5,initThrowsErrors:tm,initThrowsErrorsAsync:Mu,registerExternalDiagrams:rm,initialize:im,parseError:void 0,contentLoaded:Pu,setParseErrorHandler:sm}},47724:function(Bo,Ps,bt){bt.d(Ps,{diagram:function(){return ct}});var Pt=bt(54311),ti=bt(23198),bi=bt(71377),Hi=bt.n(bi),J=bt(14607),Vs=bt.n(J),$r=bt(91619),at=bt(12281),Ot=bt(7201),fe=bt(27484),le=bt.n(fe),Ys=bt(17967),zs=bt(77482),Ln=bt.n(zs),nn=bt(99791),xs=bt(45625),Gi=bt(46060),xr=bt(91518),si=bt(59542),Bn=bt.n(si),ks=bt(10285),an=bt.n(ks),oi=bt(28734),Ws=bt.n(oi),Ti=function(){var P=function(ki,Dt,Rt,Kt){for(Rt=Rt||{},Kt=ki.length;Kt--;Rt[ki[Kt]]=Dt);return Rt},D=[1,4],X=[1,13],pt=[1,12],ut=[1,15],Bt=[1,16],zt=[1,20],Yt=[1,19],ge=[6,7,8],Te=[1,26],ue=[1,24],Oe=[1,25],Ee=[6,7,11],je=[1,6,13,15,16,19,22],Mt=[1,33],Xt=[1,34],re=[1,6,7,11,13,15,16,19,22],Se={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(Dt,Rt,Kt,ce,Ue,Gt,be){var Ae=Gt.length-1;switch(Ue){case 6:case 7:return ce;case 8:ce.getLogger().trace("Stop NL ");break;case 9:ce.getLogger().trace("Stop EOF ");break;case 11:ce.getLogger().trace("Stop NL2 ");break;case 12:ce.getLogger().trace("Stop EOF2 ");break;case 15:ce.getLogger().info("Node: ",Gt[Ae].id),ce.addNode(Gt[Ae-1].length,Gt[Ae].id,Gt[Ae].descr,Gt[Ae].type);break;case 16:ce.getLogger().trace("Icon: ",Gt[Ae]),ce.decorateNode({icon:Gt[Ae]});break;case 17:case 21:ce.decorateNode({class:Gt[Ae]});break;case 18:ce.getLogger().trace("SPACELIST");break;case 19:ce.getLogger().trace("Node: ",Gt[Ae].id),ce.addNode(0,Gt[Ae].id,Gt[Ae].descr,Gt[Ae].type);break;case 20:ce.decorateNode({icon:Gt[Ae]});break;case 25:ce.getLogger().trace("node found ..",Gt[Ae-2]),this.$={id:Gt[Ae-1],descr:Gt[Ae-1],type:ce.getType(Gt[Ae-2],Gt[Ae])};break;case 26:this.$={id:Gt[Ae],descr:Gt[Ae],type:ce.nodeType.DEFAULT};break;case 27:ce.getLogger().trace("node found ..",Gt[Ae-3]),this.$={id:Gt[Ae-3],descr:Gt[Ae-1],type:ce.getType(Gt[Ae-2],Gt[Ae])};break}},table:[{3:1,4:2,5:3,6:[1,5],8:D},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:D},{6:X,7:[1,10],9:9,12:11,13:pt,14:14,15:ut,16:Bt,17:17,18:18,19:zt,22:Yt},P(ge,[2,3]),{1:[2,2]},P(ge,[2,4]),P(ge,[2,5]),{1:[2,6],6:X,12:21,13:pt,14:14,15:ut,16:Bt,17:17,18:18,19:zt,22:Yt},{6:X,9:22,12:11,13:pt,14:14,15:ut,16:Bt,17:17,18:18,19:zt,22:Yt},{6:Te,7:ue,10:23,11:Oe},P(Ee,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:zt,22:Yt}),P(Ee,[2,18]),P(Ee,[2,19]),P(Ee,[2,20]),P(Ee,[2,21]),P(Ee,[2,23]),P(Ee,[2,24]),P(Ee,[2,26],{19:[1,30]}),{20:[1,31]},{6:Te,7:ue,10:32,11:Oe},{1:[2,7],6:X,12:21,13:pt,14:14,15:ut,16:Bt,17:17,18:18,19:zt,22:Yt},P(je,[2,14],{7:Mt,11:Xt}),P(re,[2,8]),P(re,[2,9]),P(re,[2,10]),P(Ee,[2,15]),P(Ee,[2,16]),P(Ee,[2,17]),{20:[1,35]},{21:[1,36]},P(je,[2,13],{7:Mt,11:Xt}),P(re,[2,11]),P(re,[2,12]),{21:[1,37]},P(Ee,[2,25]),P(Ee,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:function(Dt,Rt){if(Rt.recoverable)this.trace(Dt);else{var Kt=new Error(Dt);throw Kt.hash=Rt,Kt}},parse:function(Dt){var Rt=this,Kt=[0],ce=[],Ue=[null],Gt=[],be=this.table,Ae="",Vi=0,Yi=0,Hs=2,Ss=1,Ii=Gt.slice.call(arguments,1),Xe=Object.create(this.lexer),ci={yy:{}};for(var rs in this.yy)Object.prototype.hasOwnProperty.call(this.yy,rs)&&(ci.yy[rs]=this.yy[rs]);Xe.setInput(Dt,ci.yy),ci.yy.lexer=Xe,ci.yy.parser=this,typeof Xe.yylloc>"u"&&(Xe.yylloc={});var kr=Xe.yylloc;Gt.push(kr);var ws=Xe.options&&Xe.options.ranges;typeof ci.yy.parseError=="function"?this.parseError=ci.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ke(){var Lr;return Lr=ce.pop()||Xe.lex()||Ss,typeof Lr!="number"&&(Lr instanceof Array&&(ce=Lr,Lr=ce.pop()),Lr=Rt.symbols_[Lr]||Lr),Lr}for(var _i,er,Ei,qi,As={},on,Ar,In,ln;;){if(er=Kt[Kt.length-1],this.defaultActions[er]?Ei=this.defaultActions[er]:((_i===null||typeof _i>"u")&&(_i=Ke()),Ei=be[er]&&be[er][_i]),typeof Ei>"u"||!Ei.length||!Ei[0]){var Dn="";ln=[];for(on in be[er])this.terminals_[on]&&on>Hs&&ln.push("'"+this.terminals_[on]+"'");Xe.showPosition?Dn="Parse error on line "+(Vi+1)+`:
1383
+ `+Xe.showPosition()+`
1384
+ Expecting `+ln.join(", ")+", got '"+(this.terminals_[_i]||_i)+"'":Dn="Parse error on line "+(Vi+1)+": Unexpected "+(_i==Ss?"end of input":"'"+(this.terminals_[_i]||_i)+"'"),this.parseError(Dn,{text:Xe.match,token:this.terminals_[_i]||_i,line:Xe.yylineno,loc:kr,expected:ln})}if(Ei[0]instanceof Array&&Ei.length>1)throw new Error("Parse Error: multiple actions possible at state: "+er+", token: "+_i);switch(Ei[0]){case 1:Kt.push(_i),Ue.push(Xe.yytext),Gt.push(Xe.yylloc),Kt.push(Ei[1]),_i=null,Yi=Xe.yyleng,Ae=Xe.yytext,Vi=Xe.yylineno,kr=Xe.yylloc;break;case 2:if(Ar=this.productions_[Ei[1]][1],As.$=Ue[Ue.length-Ar],As._$={first_line:Gt[Gt.length-(Ar||1)].first_line,last_line:Gt[Gt.length-1].last_line,first_column:Gt[Gt.length-(Ar||1)].first_column,last_column:Gt[Gt.length-1].last_column},ws&&(As._$.range=[Gt[Gt.length-(Ar||1)].range[0],Gt[Gt.length-1].range[1]]),qi=this.performAction.apply(As,[Ae,Yi,Vi,ci.yy,Ei[1],Ue,Gt].concat(Ii)),typeof qi<"u")return qi;Ar&&(Kt=Kt.slice(0,-1*Ar*2),Ue=Ue.slice(0,-1*Ar),Gt=Gt.slice(0,-1*Ar)),Kt.push(this.productions_[Ei[1]][0]),Ue.push(As.$),Gt.push(As._$),In=be[Kt[Kt.length-2]][Kt[Kt.length-1]],Kt.push(In);break;case 3:return!0}}return!0}},He=function(){var ki={EOF:1,parseError:function(Rt,Kt){if(this.yy.parser)this.yy.parser.parseError(Rt,Kt);else throw new Error(Rt)},setInput:function(Dt,Rt){return this.yy=Rt||this.yy||{},this._input=Dt,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 Dt=this._input[0];this.yytext+=Dt,this.yyleng++,this.offset++,this.match+=Dt,this.matched+=Dt;var Rt=Dt.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),Dt},unput:function(Dt){var Rt=Dt.length,Kt=Dt.split(/(?:\r\n?|\n)/g);this._input=Dt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Rt),this.offset-=Rt;var ce=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),Kt.length-1&&(this.yylineno-=Kt.length-1);var Ue=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:Kt?(Kt.length===ce.length?this.yylloc.first_column:0)+ce[ce.length-Kt.length].length-Kt[0].length:this.yylloc.first_column-Rt},this.options.ranges&&(this.yylloc.range=[Ue[0],Ue[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(Dt){this.unput(this.match.slice(Dt))},pastInput:function(){var Dt=this.matched.substr(0,this.matched.length-this.match.length);return(Dt.length>20?"...":"")+Dt.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var Dt=this.match;return Dt.length<20&&(Dt+=this._input.substr(0,20-Dt.length)),(Dt.substr(0,20)+(Dt.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var Dt=this.pastInput(),Rt=new Array(Dt.length+1).join("-");return Dt+this.upcomingInput()+`
1386
+ `+Rt+"^"},test_match:function(Dt,Rt){var Kt,ce,Ue;if(this.options.backtrack_lexer&&(Ue={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&&(Ue.yylloc.range=this.yylloc.range.slice(0))),ce=Dt[0].match(/(?:\r\n?|\n).*/g),ce&&(this.yylineno+=ce.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ce?ce[ce.length-1].length-ce[ce.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Dt[0].length},this.yytext+=Dt[0],this.match+=Dt[0],this.matches=Dt,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(Dt[0].length),this.matched+=Dt[0],Kt=this.performAction.call(this,this.yy,this,Rt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Kt)return Kt;if(this._backtrack){for(var Gt in Ue)this[Gt]=Ue[Gt];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Dt,Rt,Kt,ce;this._more||(this.yytext="",this.match="");for(var Ue=this._currentRules(),Gt=0;Gt<Ue.length;Gt++)if(Kt=this._input.match(this.rules[Ue[Gt]]),Kt&&(!Rt||Kt[0].length>Rt[0].length)){if(Rt=Kt,ce=Gt,this.options.backtrack_lexer){if(Dt=this.test_match(Kt,Ue[Gt]),Dt!==!1)return Dt;if(this._backtrack){Rt=!1;continue}else return!1}else if(!this.options.flex)break}return Rt?(Dt=this.test_match(Rt,Ue[ce]),Dt!==!1?Dt:!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,Kt,ce,Ue){switch(ce){case 0:Rt.getLogger().trace("Found comment",Kt.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:",Kt.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 ...",Kt.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:",Kt.yytext),20;case 33:return Rt.getLogger().trace("Long description:",Kt.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 ki}();Se.lexer=He;function $t(){this.yy={}}return $t.prototype=Se,Se.Parser=$t,new $t}();Ti.parser=Ti;const Wr=Ti,Fi=P=>(0,Pt.n)(P,(0,Pt.g)());let xi=[],ts=0,Ur={};const _s=()=>{xi=[],ts=0,Ur={}},Es=function(P){for(let D=xi.length-1;D>=0;D--)if(xi[D].level<P)return xi[D];return null},Zr=()=>xi.length>0?xi[0]:null,vs=(P,D,X,pt)=>{Pt.l.info("addNode",P,D,X,pt);const ut=(0,Pt.g)(),Bt={id:ts++,nodeId:Fi(D),level:P,descr:Fi(X),type:pt,children:[],width:(0,Pt.g)().mindmap.maxNodeWidth};switch(Bt.type){case ze.ROUNDED_RECT:Bt.padding=2*ut.mindmap.padding;break;case ze.RECT:Bt.padding=2*ut.mindmap.padding;break;case ze.HEXAGON:Bt.padding=2*ut.mindmap.padding;break;default:Bt.padding=ut.mindmap.padding}const zt=Es(P);if(zt)zt.children.push(Bt),xi.push(Bt);else if(xi.length===0)xi.push(Bt);else{let Yt=new Error('There can be only one root. No parent could be found for ("'+Bt.descr+'")');throw Yt.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+'"']},Yt}},ze={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Cs=(P,D)=>{switch(Pt.l.debug("In get type",P,D),P){case"[":return ze.RECT;case"(":return D===")"?ze.ROUNDED_RECT:ze.CLOUD;case"((":return ze.CIRCLE;case")":return ze.CLOUD;case"))":return ze.BANG;case"{{":return ze.HEXAGON;default:return ze.DEFAULT}},es=(P,D)=>{Ur[P]=D},Us=P=>{const D=xi[xi.length-1];P&&P.icon&&(D.icon=Fi(P.icon)),P&&P.class&&(D.class=Fi(P.class))},ur=P=>{switch(P){case ze.DEFAULT:return"no-border";case ze.RECT:return"rect";case ze.ROUNDED_RECT:return"rounded-rect";case ze.CIRCLE:return"circle";case ze.CLOUD:return"cloud";case ze.BANG:return"bang";case ze.HEXAGON:return"hexgon";default:return"no-border"}};let is;const Mi=P=>{is=P},Ts=()=>Pt.l,Zs=P=>xi[P],vt=P=>Ur[P],Wt=Object.freeze(Object.defineProperty({__proto__:null,addNode:vs,clear:_s,decorateNode:Us,getElementById:vt,getLogger:Ts,getMindmap:Zr,getNodeById:Zs,getType:Cs,nodeType:ze,get parseError(){return is},sanitizeText:Fi,setElementForId:es,setErrorHandler:Mi,type2Str:ur},Symbol.toStringTag,{value:"Module"})),Vt=12;function Ut(P,D){P.each(function(){var X=(0,ti.Ys)(this),pt=X.text().split(/(\s+|<br>)/).reverse(),ut,Bt=[],zt=1.1,Yt=X.attr("y"),ge=parseFloat(X.attr("dy")),Te=X.text(null).append("tspan").attr("x",0).attr("y",Yt).attr("dy",ge+"em");for(let ue=0;ue<pt.length;ue++)ut=pt[pt.length-1-ue],Bt.push(ut),Te.text(Bt.join(" ").trim()),(Te.node().getComputedTextLength()>D||ut==="<br>")&&(Bt.pop(),Te.text(Bt.join(" ").trim()),ut==="<br>"?Bt=[""]:Bt=[ut],Te=X.append("tspan").attr("x",0).attr("y",Yt).attr("dy",zt+"em").text(ut))})}const ie=function(P,D,X){P.append("path").attr("id","node-"+D.id).attr("class","node-bkg node-"+ur(D.type)).attr("d",`M0 ${D.height-5} v${-D.height+2*5} q0,-5 5,-5 h${D.width-2*5} q5,0 5,5 v${D.height-5} H0 Z`),P.append("line").attr("class","node-line-"+X).attr("x1",0).attr("y1",D.height).attr("x2",D.width).attr("y2",D.height)},ye=function(P,D){P.append("rect").attr("id","node-"+D.id).attr("class","node-bkg node-"+ur(D.type)).attr("height",D.height).attr("width",D.width)},Pe=function(P,D){const X=D.width,pt=D.height,ut=.15*X,Bt=.25*X,zt=.35*X,Yt=.2*X;P.append("path").attr("id","node-"+D.id).attr("class","node-bkg node-"+ur(D.type)).attr("d",`M0 0 a${ut},${ut} 0 0,1 ${X*.25},${-1*X*.1}
1388
+ a${zt},${zt} 1 0,1 ${X*.4},${-1*X*.1}
1389
+ a${Bt},${Bt} 1 0,1 ${X*.35},${1*X*.2}
1390
+
1391
+ a${ut},${ut} 1 0,1 ${X*.15},${1*pt*.35}
1392
+ a${Yt},${Yt} 1 0,1 ${-1*X*.15},${1*pt*.65}
1393
+
1394
+ a${Bt},${ut} 1 0,1 ${-1*X*.25},${X*.15}
1395
+ a${zt},${zt} 1 0,1 ${-1*X*.5},0
1396
+ a${ut},${ut} 1 0,1 ${-1*X*.25},${-1*X*.15}
1397
+
1398
+ a${ut},${ut} 1 0,1 ${-1*X*.1},${-1*pt*.35}
1399
+ a${Yt},${Yt} 1 0,1 ${X*.1},${-1*pt*.65}
1400
+
1401
+ H0 V0 Z`)},b=function(P,D){const X=D.width,pt=D.height,ut=.15*X;P.append("path").attr("id","node-"+D.id).attr("class","node-bkg node-"+ur(D.type)).attr("d",`M0 0 a${ut},${ut} 1 0,0 ${X*.25},${-1*pt*.1}
1402
+ a${ut},${ut} 1 0,0 ${X*.25},0
1403
+ a${ut},${ut} 1 0,0 ${X*.25},0
1404
+ a${ut},${ut} 1 0,0 ${X*.25},${1*pt*.1}
1405
+
1406
+ a${ut},${ut} 1 0,0 ${X*.15},${1*pt*.33}
1407
+ a${ut*.8},${ut*.8} 1 0,0 0,${1*pt*.34}
1408
+ a${ut},${ut} 1 0,0 ${-1*X*.15},${1*pt*.33}
1409
+
1410
+ a${ut},${ut} 1 0,0 ${-1*X*.25},${pt*.15}
1411
+ a${ut},${ut} 1 0,0 ${-1*X*.25},0
1412
+ a${ut},${ut} 1 0,0 ${-1*X*.25},0
1413
+ a${ut},${ut} 1 0,0 ${-1*X*.25},${-1*pt*.15}
1414
+
1415
+ a${ut},${ut} 1 0,0 ${-1*X*.1},${-1*pt*.33}
1416
+ a${ut*.8},${ut*.8} 1 0,0 0,${-1*pt*.34}
1417
+ a${ut},${ut} 1 0,0 ${X*.1},${-1*pt*.33}
1418
+
1419
+ H0 V0 Z`)},li=function(P,D){P.append("circle").attr("id","node-"+D.id).attr("class","node-bkg node-"+ur(D.type)).attr("r",D.width/2)};function pe(P,D,X,pt,ut){return P.insert("polygon",":first-child").attr("points",pt.map(function(Bt){return Bt.x+","+Bt.y}).join(" ")).attr("transform","translate("+(ut.width-D)/2+", "+X+")")}const $e=function(P,D){const X=D.height,ut=X/4,Bt=D.width-D.padding+2*ut,zt=[{x:ut,y:0},{x:Bt-ut,y:0},{x:Bt,y:-X/2},{x:Bt-ut,y:-X},{x:ut,y:-X},{x:0,y:-X/2}];pe(P,Bt,X,zt,D)},ve=function(P,D){P.append("rect").attr("id","node-"+D.id).attr("class","node-bkg node-"+ur(D.type)).attr("height",D.height).attr("rx",D.padding).attr("ry",D.padding).attr("width",D.width)},qe={drawNode:function(P,D,X,pt){const ut=X%(Vt-1),Bt=P.append("g");D.section=ut;let zt="section-"+ut;ut<0&&(zt+=" section-root"),Bt.attr("class",(D.class?D.class+" ":"")+"mindmap-node "+zt);const Yt=Bt.append("g"),ge=Bt.append("g"),ue=ge.append("text").text(D.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(Ut,D.width).node().getBBox(),Oe=pt.fontSize.replace?pt.fontSize.replace("px",""):pt.fontSize;if(D.height=ue.height+Oe*1.1*.5+D.padding,D.width=ue.width+2*D.padding,D.icon)if(D.type===ze.CIRCLE)D.height+=50,D.width+=50,Bt.append("foreignObject").attr("height","50px").attr("width",D.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+ut+" "+D.icon),ge.attr("transform","translate("+D.width/2+", "+(D.height/2-1.5*D.padding)+")");else{D.width+=50;const Ee=D.height;D.height=Math.max(Ee,60);const je=Math.abs(D.height-Ee);Bt.append("foreignObject").attr("width","60px").attr("height",D.height).attr("style","text-align: center;margin-top:"+je/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+ut+" "+D.icon),ge.attr("transform","translate("+(25+D.width/2)+", "+(je/2+D.padding/2)+")")}else ge.attr("transform","translate("+D.width/2+", "+D.padding/2+")");switch(D.type){case ze.DEFAULT:ie(Yt,D,ut);break;case ze.ROUNDED_RECT:ve(Yt,D);break;case ze.RECT:ye(Yt,D);break;case ze.CIRCLE:Yt.attr("transform","translate("+D.width/2+", "+ +D.height/2+")"),li(Yt,D);break;case ze.CLOUD:Pe(Yt,D);break;case ze.BANG:b(Yt,D);break;case ze.HEXAGON:$e(Yt,D);break}return es(D.id,Bt),D.height},positionNode:function(P){const D=vt(P.id),X=P.x||0,pt=P.y||0;D.attr("transform","translate("+X+","+pt+")")},drawEdge:function(D,X,pt,ut,Bt){const zt=Bt%(Vt-1),Yt=pt.x+pt.width/2,ge=pt.y+pt.height/2,Te=X.x+X.width/2,ue=X.y+X.height/2,Oe=Te>Yt?Yt+Math.abs(Yt-Te)/2:Yt-Math.abs(Yt-Te)/2,Ee=ue>ge?ge+Math.abs(ge-ue)/2:ge-Math.abs(ge-ue)/2,je=Te>Yt?Math.abs(Yt-Oe)/2+Yt:-Math.abs(Yt-Oe)/2+Yt,Mt=ue>ge?Math.abs(ge-Ee)/2+ge:-Math.abs(ge-Ee)/2+ge;D.append("path").attr("d",pt.direction==="TB"||pt.direction==="BT"?`M${Yt},${ge} Q${Yt},${Mt} ${Oe},${Ee} T${Te},${ue}`:`M${Yt},${ge} Q${je},${ge} ${Oe},${Ee} T${Te},${ue}`).attr("class","edge section-edge-"+zt+" edge-depth-"+ut)}};Hi().use(Vs());function Qe(P,D,X,pt){qe.drawNode(P,D,X,pt),D.children&&D.children.forEach((ut,Bt)=>{Qe(P,ut,X<0?Bt:X,pt)})}function tr(P,D){D.edges().map((X,pt)=>{const ut=X.data();if(X[0]._private.bodyBounds){const Bt=X[0]._private.rscratch;Pt.l.trace("Edge: ",pt,ut),P.insert("path").attr("d",`M ${Bt.startX},${Bt.startY} L ${Bt.midX},${Bt.midY} L${Bt.endX},${Bt.endY} `).attr("class","edge section-edge-"+ut.section+" edge-depth-"+ut.depth)}})}function ji(P,D,X,pt){D.add({group:"nodes",data:{id:P.id,labelText:P.descr,height:P.height,width:P.width,level:pt,nodeId:P.id,padding:P.padding,type:P.type},position:{x:P.x,y:P.y}}),P.children&&P.children.forEach(ut=>{ji(ut,D,X,pt+1),D.add({group:"edges",data:{id:`${P.id}_${ut.id}`,source:P.id,target:ut.id,depth:pt,section:ut.section}})})}function We(P,D){return new Promise(X=>{const pt=(0,ti.Ys)("body").append("div").attr("id","cy").attr("style","display:none"),ut=Hi()({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});pt.remove(),ji(P,ut,D,0),ut.nodes().forEach(function(Bt){Bt.layoutDimensions=()=>{const zt=Bt.data();return{w:zt.width,h:zt.height}}}),ut.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),ut.ready(Bt=>{Pt.l.info("Ready",Bt),X(ut)})})}function dr(P){P.nodes().map((D,X)=>{const pt=D.data();pt.x=D.position().x,pt.y=D.position().y,qe.positionNode(pt);const ut=vt(pt.nodeId);Pt.l.info("Id:",X,"Position: (",D.position().x,", ",D.position().y,")",pt),ut.attr("transform",`translate(${D.position().x-pt.width/2}, ${D.position().y-pt.height/2})`),ut.attr("attr",`apa-${X})`)})}const Bi={draw:async(P,D,X,pt)=>{const ut=(0,Pt.g)();pt.db.clear(),pt.parser.parse(P),Pt.l.debug(`Renering info diagram
1420
+ `+P);const Bt=(0,Pt.g)().securityLevel;let zt;Bt==="sandbox"&&(zt=(0,ti.Ys)("#i"+D));const ge=(Bt==="sandbox"?(0,ti.Ys)(zt.nodes()[0].contentDocument.body):(0,ti.Ys)("body")).select("#"+D);ge.append("g");const Te=pt.db.getMindmap(),ue=ge.append("g");ue.attr("class","mindmap-edges");const Oe=ge.append("g");Oe.attr("class","mindmap-nodes"),Qe(Oe,Te,-1,ut);const Ee=await We(Te,ut);tr(ue,Ee),dr(Ee),(0,Pt.s)(void 0,ge,ut.mindmap.padding,ut.mindmap.useMaxWidth)}},Jt=P=>{let D="";for(let X=0;X<P.THEME_COLOR_LIMIT;X++)P["lineColor"+X]=P["lineColor"+X]||P["cScaleInv"+X],(0,$r.Z)(P["lineColor"+X])?P["lineColor"+X]=(0,at.Z)(P["lineColor"+X],20):P["lineColor"+X]=(0,Ot.Z)(P["lineColor"+X],20);for(let X=0;X<P.THEME_COLOR_LIMIT;X++){const pt=""+(17-3*X);D+=`
1421
+ .section-${X-1} rect, .section-${X-1} path, .section-${X-1} circle, .section-${X-1} polygon, .section-${X-1} path {
1422
+ fill: ${P["cScale"+X]};
1423
+ }
1424
+ .section-${X-1} text {
1425
+ fill: ${P["cScaleLabel"+X]};
1426
+ }
1427
+ .node-icon-${X-1} {
1428
+ font-size: 40px;
1429
+ color: ${P["cScaleLabel"+X]};
1430
+ }
1431
+ .section-edge-${X-1}{
1432
+ stroke: ${P["cScale"+X]};
1433
+ }
1434
+ .edge-depth-${X-1}{
1435
+ stroke-width: ${pt};
1436
+ }
1437
+ .section-${X-1} line {
1438
+ stroke: ${P["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 D},ct={db:Wt,renderer:Bi,parser:Wr,styles:P=>`
1449
+ .edge {
1450
+ stroke-width: 3;
1451
+ }
1452
+ ${Jt(P)}
1453
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
1454
+ fill: ${P.git0};
1455
+ }
1456
+ .section-root text {
1457
+ fill: ${P.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(Bo,Ps,bt){bt.d(Ps,{diagram:function(){return Jt}});var Pt=bt(54311),ti=bt(23198),bi=bt(91619),Hi=bt(12281),J=bt(7201),Vs=bt(27484),$r=bt.n(Vs),at=bt(17967),Ot=bt(77482),fe=bt.n(Ot),le=bt(99791),Ys=bt(45625),zs=bt(46060),Ln=bt(91518),nn=bt(59542),xs=bt.n(nn),Gi=bt(10285),xr=bt.n(Gi),si=bt(28734),Bn=bt.n(si),ks=function(){var ht=function(je,Mt,Xt,re){for(Xt=Xt||{},re=je.length;re--;Xt[je[re]]=Mt);return Xt},K=[1,2],ct=[1,5],P=[6,9,11,17,18,20,22,23,26,27,28],D=[1,15],X=[1,16],pt=[1,17],ut=[1,18],Bt=[1,19],zt=[1,23],Yt=[1,24],ge=[1,27],Te=[4,6,9,11,17,18,20,22,23,26,27,28],ue={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,Xt,re,Se,He,$t,ki){var Dt=$t.length-1;switch(He){case 1:return $t[Dt-1];case 3:this.$=[];break;case 4:$t[Dt-1].push($t[Dt]),this.$=$t[Dt-1];break;case 5:case 6:this.$=$t[Dt];break;case 7:case 8:this.$=[];break;case 11:Se.getCommonDb().setDiagramTitle($t[Dt].substr(6)),this.$=$t[Dt].substr(6);break;case 12:this.$=$t[Dt].trim(),Se.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=$t[Dt].trim(),Se.getCommonDb().setAccDescription(this.$);break;case 15:Se.addSection($t[Dt].substr(8)),this.$=$t[Dt].substr(8);break;case 19:Se.addTask($t[Dt],0,""),this.$=$t[Dt];break;case 20:Se.addEvent($t[Dt].substr(2)),this.$=$t[Dt];break;case 21:Se.parseDirective("%%{","open_directive");break;case 22:Se.parseDirective($t[Dt],"type_directive");break;case 23:$t[Dt]=$t[Dt].trim().replace(/'/g,'"'),Se.parseDirective($t[Dt],"arg_directive");break;case 24:Se.parseDirective("}%%","close_directive","timeline");break}},table:[{3:1,4:K,7:3,12:4,28:ct},{1:[3]},ht(P,[2,3],{5:6}),{3:7,4:K,7:3,12:4,28:ct},{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:D,18:X,20:pt,22:ut,23:Bt,24:20,25:21,26:zt,27:Yt,28:ct},{1:[2,2]},{14:25,15:[1,26],31:ge},ht([15,31],[2,22]),ht(P,[2,8],{1:[2,1]}),ht(P,[2,4]),{7:22,10:28,12:4,17:D,18:X,20:pt,22:ut,23:Bt,24:20,25:21,26:zt,27:Yt,28:ct},ht(P,[2,6]),ht(P,[2,7]),ht(P,[2,11]),{19:[1,29]},{21:[1,30]},ht(P,[2,14]),ht(P,[2,15]),ht(P,[2,16]),ht(P,[2,17]),ht(P,[2,18]),ht(P,[2,19]),ht(P,[2,20]),{11:[1,31]},{16:32,30:[1,33]},{11:[2,24]},ht(P,[2,5]),ht(P,[2,12]),ht(P,[2,13]),ht(Te,[2,9]),{14:34,31:ge},{31:[2,23]},{11:[1,35]},ht(Te,[2,10])],defaultActions:{5:[2,21],7:[2,2],27:[2,24],33:[2,23]},parseError:function(Mt,Xt){if(Xt.recoverable)this.trace(Mt);else{var re=new Error(Mt);throw re.hash=Xt,re}},parse:function(Mt){var Xt=this,re=[0],Se=[],He=[null],$t=[],ki=this.table,Dt="",Rt=0,Kt=0,ce=2,Ue=1,Gt=$t.slice.call(arguments,1),be=Object.create(this.lexer),Ae={yy:{}};for(var Vi in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Vi)&&(Ae.yy[Vi]=this.yy[Vi]);be.setInput(Mt,Ae.yy),Ae.yy.lexer=be,Ae.yy.parser=this,typeof be.yylloc>"u"&&(be.yylloc={});var Yi=be.yylloc;$t.push(Yi);var Hs=be.options&&be.options.ranges;typeof Ae.yy.parseError=="function"?this.parseError=Ae.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ss(){var qi;return qi=Se.pop()||be.lex()||Ue,typeof qi!="number"&&(qi instanceof Array&&(Se=qi,qi=Se.pop()),qi=Xt.symbols_[qi]||qi),qi}for(var Ii,Xe,ci,rs,kr={},ws,Ke,_i,er;;){if(Xe=re[re.length-1],this.defaultActions[Xe]?ci=this.defaultActions[Xe]:((Ii===null||typeof Ii>"u")&&(Ii=Ss()),ci=ki[Xe]&&ki[Xe][Ii]),typeof ci>"u"||!ci.length||!ci[0]){var Ei="";er=[];for(ws in ki[Xe])this.terminals_[ws]&&ws>ce&&er.push("'"+this.terminals_[ws]+"'");be.showPosition?Ei="Parse error on line "+(Rt+1)+`:
1469
+ `+be.showPosition()+`
1470
+ Expecting `+er.join(", ")+", got '"+(this.terminals_[Ii]||Ii)+"'":Ei="Parse error on line "+(Rt+1)+": Unexpected "+(Ii==Ue?"end of input":"'"+(this.terminals_[Ii]||Ii)+"'"),this.parseError(Ei,{text:be.match,token:this.terminals_[Ii]||Ii,line:be.yylineno,loc:Yi,expected:er})}if(ci[0]instanceof Array&&ci.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Xe+", token: "+Ii);switch(ci[0]){case 1:re.push(Ii),He.push(be.yytext),$t.push(be.yylloc),re.push(ci[1]),Ii=null,Kt=be.yyleng,Dt=be.yytext,Rt=be.yylineno,Yi=be.yylloc;break;case 2:if(Ke=this.productions_[ci[1]][1],kr.$=He[He.length-Ke],kr._$={first_line:$t[$t.length-(Ke||1)].first_line,last_line:$t[$t.length-1].last_line,first_column:$t[$t.length-(Ke||1)].first_column,last_column:$t[$t.length-1].last_column},Hs&&(kr._$.range=[$t[$t.length-(Ke||1)].range[0],$t[$t.length-1].range[1]]),rs=this.performAction.apply(kr,[Dt,Kt,Rt,Ae.yy,ci[1],He,$t].concat(Gt)),typeof rs<"u")return rs;Ke&&(re=re.slice(0,-1*Ke*2),He=He.slice(0,-1*Ke),$t=$t.slice(0,-1*Ke)),re.push(this.productions_[ci[1]][0]),He.push(kr.$),$t.push(kr._$),_i=ki[re[re.length-2]][re[re.length-1]],re.push(_i);break;case 3:return!0}}return!0}},Oe=function(){var je={EOF:1,parseError:function(Xt,re){if(this.yy.parser)this.yy.parser.parseError(Xt,re);else throw new Error(Xt)},setInput:function(Mt,Xt){return this.yy=Xt||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 Xt=Mt.match(/(?:\r\n?|\n).*/g);return Xt?(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 Xt=Mt.length,re=Mt.split(/(?:\r\n?|\n)/g);this._input=Mt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Xt),this.offset-=Xt;var Se=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 He=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===Se.length?this.yylloc.first_column:0)+Se[Se.length-re.length].length-re[0].length:this.yylloc.first_column-Xt},this.options.ranges&&(this.yylloc.range=[He[0],He[0]+this.yyleng-Xt]),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(),Xt=new Array(Mt.length+1).join("-");return Mt+this.upcomingInput()+`
1472
+ `+Xt+"^"},test_match:function(Mt,Xt){var re,Se,He;if(this.options.backtrack_lexer&&(He={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&&(He.yylloc.range=this.yylloc.range.slice(0))),Se=Mt[0].match(/(?:\r\n?|\n).*/g),Se&&(this.yylineno+=Se.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Se?Se[Se.length-1].length-Se[Se.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],re=this.performAction.call(this,this.yy,this,Xt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),re)return re;if(this._backtrack){for(var $t in He)this[$t]=He[$t];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Mt,Xt,re,Se;this._more||(this.yytext="",this.match="");for(var He=this._currentRules(),$t=0;$t<He.length;$t++)if(re=this._input.match(this.rules[He[$t]]),re&&(!Xt||re[0].length>Xt[0].length)){if(Xt=re,Se=$t,this.options.backtrack_lexer){if(Mt=this.test_match(re,He[$t]),Mt!==!1)return Mt;if(this._backtrack){Xt=!1;continue}else return!1}else if(!this.options.flex)break}return Xt?(Mt=this.test_match(Xt,He[Se]),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 Xt=this.next();return Xt||this.lex()},begin:function(Xt){this.conditionStack.push(Xt)},popState:function(){var Xt=this.conditionStack.length-1;return Xt>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(Xt){return Xt=this.conditionStack.length-1-Math.abs(Xt||0),Xt>=0?this.conditionStack[Xt]:"INITIAL"},pushState:function(Xt){this.begin(Xt)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(Xt,re,Se,He){switch(Se){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 je}();ue.lexer=Oe;function Ee(){this.yy={}}return Ee.prototype=ue,ue.Parser=Ee,new Ee}();ks.parser=ks;const an=ks;let oi="",Ws=0;const Ti=[],Wr=[],Fi=[],xi=()=>Pt.j,ts=(ht,K,ct)=>{(0,Pt.k)(globalThis,ht,K,ct)},Ur=function(){Ti.length=0,Wr.length=0,oi="",Fi.length=0,(0,Pt.m)()},_s=function(ht){oi=ht,Ti.push(ht)},Es=function(){return Ti},Zr=function(){let ht=es();const K=100;let ct=0;for(;!ht&&ct<K;)ht=es(),ct++;return Wr.push(...Fi),Wr},vs=function(ht,K,ct){const P={id:Ws++,section:oi,type:oi,task:ht,score:K||0,events:ct?[ct]:[]};Fi.push(P)},ze=function(ht){Fi.find(ct=>ct.id===Ws-1).events.push(ht)},Cs=function(ht){const K={section:oi,type:oi,description:ht,task:ht,classes:[]};Wr.push(K)},es=function(){const ht=function(ct){return Fi[ct].processed};let K=!0;for(const[ct,P]of Fi.entries())ht(ct),K=K&&P.processed;return K},ur=Object.freeze(Object.defineProperty({__proto__:null,addEvent:ze,addSection:_s,addTask:vs,addTaskOrg:Cs,clear:Ur,default:{clear:Ur,getCommonDb:xi,addSection:_s,getSections:Es,getTasks:Zr,addTask:vs,addTaskOrg:Cs,addEvent:ze,parseDirective:ts},getCommonDb:xi,getSections:Es,getTasks:Zr,parseDirective:ts},Symbol.toStringTag,{value:"Module"})),is=12,Mi=function(ht,K){const ct=ht.append("rect");return ct.attr("x",K.x),ct.attr("y",K.y),ct.attr("fill",K.fill),ct.attr("stroke",K.stroke),ct.attr("width",K.width),ct.attr("height",K.height),ct.attr("rx",K.rx),ct.attr("ry",K.ry),K.class!==void 0&&ct.attr("class",K.class),ct},Ts=function(ht,K){const P=ht.append("circle").attr("cx",K.cx).attr("cy",K.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),D=ht.append("g");D.append("circle").attr("cx",K.cx-15/3).attr("cy",K.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),D.append("circle").attr("cx",K.cx+15/3).attr("cy",K.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function X(Bt){const zt=(0,ti.Nb1)().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);Bt.append("path").attr("class","mouth").attr("d",zt).attr("transform","translate("+K.cx+","+(K.cy+2)+")")}function pt(Bt){const zt=(0,ti.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",zt).attr("transform","translate("+K.cx+","+(K.cy+7)+")")}function ut(Bt){Bt.append("line").attr("class","mouth").attr("stroke",2).attr("x1",K.cx-5).attr("y1",K.cy+7).attr("x2",K.cx+5).attr("y2",K.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return K.score>3?X(D):K.score<3?pt(D):ut(D),P},Zs=function(ht,K){const ct=ht.append("circle");return ct.attr("cx",K.cx),ct.attr("cy",K.cy),ct.attr("class","actor-"+K.pos),ct.attr("fill",K.fill),ct.attr("stroke",K.stroke),ct.attr("r",K.r),ct.class!==void 0&&ct.attr("class",ct.class),K.title!==void 0&&ct.append("title").text(K.title),ct},vt=function(ht,K){const ct=K.text.replace(/<br\s*\/?>/gi," "),P=ht.append("text");P.attr("x",K.x),P.attr("y",K.y),P.attr("class","legend"),P.style("text-anchor",K.anchor),K.class!==void 0&&P.attr("class",K.class);const D=P.append("tspan");return D.attr("x",K.x+K.textMargin*2),D.text(ct),P},Wt=function(ht,K){function ct(D,X,pt,ut,Bt){return D+","+X+" "+(D+pt)+","+X+" "+(D+pt)+","+(X+ut-Bt)+" "+(D+pt-Bt*1.2)+","+(X+ut)+" "+D+","+(X+ut)}const P=ht.append("polygon");P.attr("points",ct(K.x,K.y,50,20,7)),P.attr("class","labelBox"),K.y=K.y+K.labelMargin,K.x=K.x+.5*K.labelMargin,vt(ht,K)},Vt=function(ht,K,ct){const P=ht.append("g"),D=b();D.x=K.x,D.y=K.y,D.fill=K.fill,D.width=ct.width,D.height=ct.height,D.class="journey-section section-type-"+K.num,D.rx=3,D.ry=3,Mi(P,D),li(ct)(K.text,P,D.x,D.y,D.width,D.height,{class:"journey-section section-type-"+K.num},ct,K.colour)};let Ut=-1;const ie=function(ht,K,ct){const P=K.x+ct.width/2,D=ht.append("g");Ut++;const X=300+5*30;D.append("line").attr("id","task"+Ut).attr("x1",P).attr("y1",K.y).attr("x2",P).attr("y2",X).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Ts(D,{cx:P,cy:300+(5-K.score)*30,score:K.score});const pt=b();pt.x=K.x,pt.y=K.y,pt.fill=K.fill,pt.width=ct.width,pt.height=ct.height,pt.class="task task-type-"+K.num,pt.rx=3,pt.ry=3,Mi(D,pt),K.x+14,li(ct)(K.task,D,pt.x,pt.y,pt.width,pt.height,{class:"task"},ct,K.colour)},ye=function(ht,K){Mi(ht,{x:K.startx,y:K.starty,width:K.stopx-K.startx,height:K.stopy-K.starty,fill:K.fill,class:"rect"}).lower()},Pe=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},b=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},li=function(){function ht(D,X,pt,ut,Bt,zt,Yt,ge){const Te=X.append("text").attr("x",pt+Bt/2).attr("y",ut+zt/2+5).style("font-color",ge).style("text-anchor","middle").text(D);P(Te,Yt)}function K(D,X,pt,ut,Bt,zt,Yt,ge,Te){const{taskFontSize:ue,taskFontFamily:Oe}=ge,Ee=D.split(/<br\s*\/?>/gi);for(let je=0;je<Ee.length;je++){const Mt=je*ue-ue*(Ee.length-1)/2,Xt=X.append("text").attr("x",pt+Bt/2).attr("y",ut).attr("fill",Te).style("text-anchor","middle").style("font-size",ue).style("font-family",Oe);Xt.append("tspan").attr("x",pt+Bt/2).attr("dy",Mt).text(Ee[je]),Xt.attr("y",ut+zt/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),P(Xt,Yt)}}function ct(D,X,pt,ut,Bt,zt,Yt,ge){const Te=X.append("switch"),Oe=Te.append("foreignObject").attr("x",pt).attr("y",ut).attr("width",Bt).attr("height",zt).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");Oe.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(D),K(D,Te,pt,ut,Bt,zt,Yt,ge),P(Oe,Yt)}function P(D,X){for(const pt in X)pt in X&&D.attr(pt,X[pt])}return function(D){return D.textPlacement==="fo"?ct:D.textPlacement==="old"?ht:K}}(),pe=function(ht){ht.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 $e(ht,K){ht.each(function(){var ct=(0,ti.Ys)(this),P=ct.text().split(/(\s+|<br>)/).reverse(),D,X=[],pt=1.1,ut=ct.attr("y"),Bt=parseFloat(ct.attr("dy")),zt=ct.text(null).append("tspan").attr("x",0).attr("y",ut).attr("dy",Bt+"em");for(let Yt=0;Yt<P.length;Yt++)D=P[P.length-1-Yt],X.push(D),zt.text(X.join(" ").trim()),(zt.node().getComputedTextLength()>K||D==="<br>")&&(X.pop(),zt.text(X.join(" ").trim()),D==="<br>"?X=[""]:X=[D],zt=ct.append("tspan").attr("x",0).attr("y",ut).attr("dy",pt+"em").text(D))})}const ve=function(ht,K,ct,P){const D=ct%is-1,X=ht.append("g");K.section=D,X.attr("class",(K.class?K.class+" ":"")+"timeline-node "+("section-"+D));const pt=X.append("g"),ut=X.append("g"),zt=ut.append("text").text(K.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call($e,K.width).node().getBBox(),Yt=P.fontSize&&P.fontSize.replace?P.fontSize.replace("px",""):P.fontSize;return K.height=zt.height+Yt*1.1*.5+K.padding,K.height=Math.max(K.height,K.maxHeight),K.width=K.width+2*K.padding,ut.attr("transform","translate("+K.width/2+", "+K.padding/2+")"),Ze(pt,K,D),K},$i=function(ht,K,ct){const P=ht.append("g"),X=P.append("text").text(K.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call($e,K.width).node().getBBox(),pt=ct.fontSize&&ct.fontSize.replace?ct.fontSize.replace("px",""):ct.fontSize;return P.remove(),X.height+pt*1.1*.5+K.padding},Ze=function(ht,K,ct){ht.append("path").attr("id","node-"+K.id).attr("class","node-bkg node-"+K.type).attr("d",`M0 ${K.height-5} v${-K.height+2*5} q0,-5 5,-5 h${K.width-2*5} q5,0 5,5 v${K.height-5} H0 Z`),ht.append("line").attr("class","node-line-"+ct).attr("x1",0).attr("y1",K.height).attr("x2",K.width).attr("y2",K.height)},Ht={drawRect:Mi,drawCircle:Zs,drawSection:Vt,drawText:vt,drawLabel:Wt,drawTask:ie,drawBackgroundRect:ye,getTextObj:Pe,getNoteRect:b,initGraphics:pe,drawNode:ve,getVirtualNodeHeight:$i},qe=function(ht){Object.keys(ht).forEach(function(ct){conf[ct]=ht[ct]})},Qe=function(ht,K,ct,P){const D=(0,Pt.g)(),X=D.leftMargin?D.leftMargin:50;P.db.clear(),P.parser.parse(ht+`
1474
+ `),Pt.l.debug("timeline",P.db);const pt=D.securityLevel;let ut;pt==="sandbox"&&(ut=(0,ti.Ys)("#i"+K));const zt=(pt==="sandbox"?(0,ti.Ys)(ut.nodes()[0].contentDocument.body):(0,ti.Ys)("body")).select("#"+K);zt.append("g");const Yt=P.db.getTasks(),ge=P.db.getCommonDb().getDiagramTitle();Pt.l.debug("task",Yt),Ht.initGraphics(zt);const Te=P.db.getSections();Pt.l.debug("sections",Te);let ue=0,Oe=0,Ee=0,je=0,Mt=50+X,Xt=50;je=50;let re=0,Se=!0;Te.forEach(function(Rt){const Kt={number:re,descr:Rt,section:re,width:150,padding:20,maxHeight:ue},ce=Ht.getVirtualNodeHeight(zt,Kt,D);Pt.l.debug("sectionHeight before draw",ce),ue=Math.max(ue,ce+20)});let He=0,$t=0;Pt.l.debug("tasks.length",Yt.length);for(const[Rt,Kt]of Yt.entries()){const ce={number:Rt,descr:Kt,section:Kt.section,width:150,padding:20,maxHeight:Oe},Ue=Ht.getVirtualNodeHeight(zt,ce,D);Pt.l.debug("taskHeight before draw",Ue),Oe=Math.max(Oe,Ue+20),He=Math.max(He,Kt.events.length);let Gt=0;for(let be=0;be<Kt.events.length;be++){const Vi={descr:Kt.events[be],section:Kt.section,number:Kt.section,width:150,padding:20,maxHeight:50};Gt+=Ht.getVirtualNodeHeight(zt,Vi,D)}$t=Math.max($t,Gt)}Pt.l.debug("maxSectionHeight before draw",ue),Pt.l.debug("maxTaskHeight before draw",Oe),Te&&Te.length>0?Te.forEach(Rt=>{const Kt={number:re,descr:Rt,section:re,width:150,padding:20,maxHeight:ue};Pt.l.debug("sectionNode",Kt);const ce=zt.append("g"),Ue=Ht.drawNode(ce,Kt,re,D);Pt.l.debug("sectionNode output",Ue),ce.attr("transform",`translate(${Mt}, ${je})`),Xt+=ue+50;const Gt=Yt.filter(be=>be.section===Rt);Gt.length>0&&tr(zt,Gt,re,Mt,Xt,Oe,D,He,$t,ue,!1),Mt+=200*Math.max(Gt.length,1),Xt=je,re++}):(Se=!1,tr(zt,Yt,re,Mt,Xt,Oe,D,He,$t,ue,!0));const ki=zt.node().getBBox();Pt.l.debug("bounds",ki),ge&&zt.append("text").text(ge).attr("x",ki.width/2-X).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),Ee=Se?ue+Oe+150:Oe+100,zt.append("g").attr("class","lineWrapper").append("line").attr("x1",X).attr("y1",Ee).attr("x2",ki.width+3*X).attr("y2",Ee).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),(0,Pt.s)(void 0,zt,D.timeline.padding?D.timeline.padding:50,D.timeline.useMaxWidth?D.timeline.useMaxWidth:!1)},tr=function(ht,K,ct,P,D,X,pt,ut,Bt,zt,Yt){for(const ge of K){const Te={descr:ge.task,section:ct,number:ct,width:150,padding:20,maxHeight:X};Pt.l.debug("taskNode",Te);const ue=ht.append("g").attr("class","taskWrapper"),Ee=Ht.drawNode(ue,Te,ct,pt).height;if(Pt.l.debug("taskHeight after draw",Ee),ue.attr("transform",`translate(${P}, ${D})`),X=Math.max(X,Ee),ge.events){const je=ht.append("g").attr("class","lineWrapper");let Mt=X;D+=100,Mt=Mt+ji(ht,ge.events,ct,P,D,pt),D-=100,je.append("line").attr("x1",P+190/2).attr("y1",D+X).attr("x2",P+190/2).attr("y2",D+X+(Yt?X:zt)+Bt+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}P=P+200,Yt&&!(0,Pt.g)().timeline.disableMulticolor&&ct++}D=D-10},ji=function(ht,K,ct,P,D,X){let pt=0;const ut=D;D=D+100;for(const Bt of K){const zt={descr:Bt,section:ct,number:ct,width:150,padding:20,maxHeight:50};Pt.l.debug("eventNode",zt);const Yt=ht.append("g").attr("class","eventWrapper"),Te=Ht.drawNode(Yt,zt,ct,X).height;pt=pt+Te,Yt.attr("transform",`translate(${P}, ${D})`),D=D+10+Te}return D=ut,pt},We={setConf:qe,draw:Qe},dr=ht=>{let K="";for(let ct=0;ct<ht.THEME_COLOR_LIMIT;ct++)ht["lineColor"+ct]=ht["lineColor"+ct]||ht["cScaleInv"+ct],(0,bi.Z)(ht["lineColor"+ct])?ht["lineColor"+ct]=(0,Hi.Z)(ht["lineColor"+ct],20):ht["lineColor"+ct]=(0,J.Z)(ht["lineColor"+ct],20);for(let ct=0;ct<ht.THEME_COLOR_LIMIT;ct++){const P=""+(17-3*ct);K+=`
1475
+ .section-${ct-1} rect, .section-${ct-1} path, .section-${ct-1} circle, .section-${ct-1} path {
1476
+ fill: ${ht["cScale"+ct]};
1477
+ }
1478
+ .section-${ct-1} text {
1479
+ fill: ${ht["cScaleLabel"+ct]};
1480
+ }
1481
+ .node-icon-${ct-1} {
1482
+ font-size: 40px;
1483
+ color: ${ht["cScaleLabel"+ct]};
1484
+ }
1485
+ .section-edge-${ct-1}{
1486
+ stroke: ${ht["cScale"+ct]};
1487
+ }
1488
+ .edge-depth-${ct-1}{
1489
+ stroke-width: ${P};
1490
+ }
1491
+ .section-${ct-1} line {
1492
+ stroke: ${ht["cScaleInv"+ct]} ;
1493
+ stroke-width: 3;
1494
+ }
1495
+
1496
+ .lineWrapper line{
1497
+ stroke: ${ht["cScaleLabel"+ct]} ;
1498
+ }
1499
+
1500
+ .disabled, .disabled circle, .disabled text {
1501
+ fill: lightgray;
1502
+ }
1503
+ .disabled text {
1504
+ fill: #efefef;
1505
+ }
1506
+ `}return K},Jt={db:ur,renderer:We,parser:an,styles:ht=>`
1507
+ .edge {
1508
+ stroke-width: 3;
1509
+ }
1510
+ ${dr(ht)}
1511
+ .section-root rect, .section-root path, .section-root circle {
1512
+ fill: ${ht.git0};
1513
+ }
1514
+ .section-root text {
1515
+ fill: ${ht.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
+ `}}}]);