2025-01-23 01:28:53 +00:00
import { g as gt , s as At } from "./md-chunk-5HRBRIJM-N75anMcB.js" ; import { d as U1 , _ as l , n as Ze , o as bt , s as kt , g as mt , b as Et , c as St , p as Dt , q as xt , r as Ct , J as Tt , t as yt , l as e1 , u as ge , v as Ft , x as _t , j as C1 , y as Bt , z as vt , e as Vt , A as Lt } from "./md-index-DzLM0flJ.js" ; import { c as wt } from "./md-channel-Pv3UdyCl.js" ; var It = "flowchart-" , $e = 0 , M1 = U1 ( ) , b1 = new Map , K = [ ] , K1 = new Map , f1 = [ ] , Ae = new Map , be = new Map , ee = 0 , fe = ! 0 , J , se , re = [ ] , ne = l ( e => Vt . sanitizeText ( e , M1 ) , "sanitizeText" ) , ie = l ( function ( e ) { for ( const r of b1 . values ( ) ) if ( r . id === e ) return r . domId ; return e } , "lookUpDomId" ) , Rt = l ( function ( e , r , n , i , u , d , g = { } , D ) { var _ , z ; if ( ! e || e . trim ( ) . length === 0 ) return ; let c , o = b1 . get ( e ) ; if ( o === void 0 && ( o = { id : e , labelType : "text" , domId : It + e + "-" + $e , styles : [ ] , classes : [ ] } , b1 . set ( e , o ) ) , $e ++ , r !== void 0 ? ( M1 = U1 ( ) , c = ne ( r . text . trim ( ) ) , o . labelType = r . type , c . startsWith ( '"' ) && c . endsWith ( '"' ) && ( c = c . substring ( 1 , c . length - 1 ) ) , o . text = c ) : o . text === void 0 && ( o . text = e ) , n !== void 0 && ( o . type = n ) , i != null && i . forEach ( function ( B ) { o . styles . push ( B ) } ) , u != null && u . forEach ( function ( B ) { o . classes . push ( B ) } ) , d !== void 0 && ( o . dir = d ) , o . props === void 0 ? o . props = g : g !== void 0 && Object . assign ( o . props , g ) , D !== void 0 ) { let B ; D . includes ( `
` )?B=D+ `
` :B= ` {
2024-11-27 03:30:55 +00:00
` +D+ `
2025-01-23 01:28:53 +00:00
} ` ;const h=Ct(B,{schema:Tt});if(h.shape){if(h.shape!==h.shape.toLowerCase()||h.shape.includes("_"))throw new Error( ` No such shape : $ { h . shape } . Shape names should be lowercase . ` );if(!yt(h.shape))throw new Error( ` No such shape : $ { h . shape } . ` );o.type=h==null?void 0:h.shape}h!=null&&h.label&&(o.text=h==null?void 0:h.label),h!=null&&h.icon&&(o.icon=h==null?void 0:h.icon,!((_=h.label)!=null&&_.trim())&&o.text===e&&(o.text="")),h!=null&&h.form&&(o.form=h==null?void 0:h.form),h!=null&&h.pos&&(o.pos=h==null?void 0:h.pos),h!=null&&h.img&&(o.img=h==null?void 0:h.img,!((z=h.label)!=null&&z.trim())&&o.text===e&&(o.text="")),h!=null&&h.constraint&&(o.constraint=h.constraint),h.w&&(o.assetWidth=Number(h.w)),h.h&&(o.assetHeight=Number(h.h))}},"addVertex"),Nt=l(function(e,r,n){const d={start:e,end:r,type:void 0,text:"",labelType:"text"};e1.info("abc78 Got edge...",d);const g=n.text;if(g!==void 0&&(d.text=ne(g.text.trim()),d.text.startsWith('"')&&d.text.endsWith('"')&&(d.text=d.text.substring(1,d.text.length-1)),d.labelType=g.type),n!==void 0&&(d.type=n.type,d.stroke=n.stroke,d.length=n.length>10?10:n.length),K.length<(M1.maxEdges??500))e1.info("Pushing edge..."),K.push(d);else throw new Error( ` Edge limit exceeded . $ { K . length } edges found , but the limit is $ { M1 . maxEdges } .
2024-11-27 03:30:55 +00:00
Initialize mermaid with maxEdges set to a higher number to allow more edges .
You cannot set this config via configuration inside the diagram as it is a secure config .
2025-01-23 01:28:53 +00:00
You have to call mermaid . initialize . ` )},"addSingleLink"),Pt=l(function(e,r,n){e1.info("addLink",e,r,n);for(const i of e)for(const u of r)Nt(i,u,n)},"addLink"),Ot=l(function(e,r){e.forEach(function(n){n==="default"?K.defaultInterpolate=r:K[n].interpolate=r})},"updateLinkInterpolate"),Gt=l(function(e,r){e.forEach(function(n){var i,u,d,g,D,c;if(typeof n=="number"&&n>=K.length)throw new Error( ` The index $ { n } for linkStyle is out of bounds . Valid indices for linkStyle are between 0 and $ { K . length - 1 } . ( Help : Ensure that the index is within the range of existing edges . ) ` );n==="default"?K.defaultStyle=r:(K[n].style=r,(((u=(i=K[n])==null?void 0:i.style)==null?void 0:u.length)??0)>0&&!((g=(d=K[n])==null?void 0:d.style)!=null&&g.some(o=>o==null?void 0:o.startsWith("fill")))&&((c=(D=K[n])==null?void 0:D.style)==null||c.push("fill:none")))})},"updateLink"),Mt=l(function(e,r){e.split(",").forEach(function(n){let i=K1.get(n);i===void 0&&(i={id:n,styles:[],textStyles:[]},K1.set(n,i)),r!=null&&r.forEach(function(u){if(/color/.exec(u)){const d=u.replace("fill","bgFill");i.textStyles.push(d)}i.styles.push(u)})})},"addClass"),Ut=l(function(e){J=e,/.*</.exec(J)&&(J="RL"),/.* \^ /.exec(J)&&(J="BT"),/.*>/.exec(J)&&(J="LR"),/.*v/.exec(J)&&(J="TB"),J==="TD"&&(J="TB")},"setDirection"),ke=l(function(e,r){for(const n of e.split(",")){const i=b1.get(n);i&&i.classes.push(r);const u=Ae.get(n);u&&u.classes.push(r)}},"setClass"),Wt=l(function(e,r){if(r!==void 0){r=ne(r);for(const n of e.split(","))be.set(se==="gen-1"?ie(n):n,r)}},"setTooltip"),zt=l(function(e,r,n){const i=ie(e);if(U1().securityLevel!=="loose"||r===void 0)return;let u=[];if(typeof n=="string"){u=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]* $ )/);for(let g=0;g<u.length;g++){let D=u[g].trim();D.startsWith('"')&&D.endsWith('"')&&(D=D.substr(1,D.length-2)),u[g]=D}}u.length===0&&u.push(e);const d=b1.get(e);d&&(d.haveCallback=!0,re.push(function(){const g=document.querySelector( ` [ id = "${i}" ] ` );g!==null&&g.addEventListener("click",function(){ge.runFunc(r,...u)},!1)}))},"setClickFun"),jt=l(function(e,r,n){e.split(",").forEach(function(i){const u=b1.get(i);u!==void 0&&(u.link=ge.formatUrl(r,M1),u.linkTarget=n)}),ke(e,"clickable")},"setLink"),et=l(function(e){return be.get(e)},"getTooltip"),Kt=l(function(e,r,n){e.split(",").forEach(function(i){zt(i,r,n)}),ke(e,"clickable")},"setClickEvent"),Yt=l(function(e){re.forEach(function(r){r(e)})},"bindFunctions"),tt=l(function(){return J.trim()},"getDirection"),st=l(function(){return b1},"getVertices"),rt=l(function(){return K},"getEdges"),qt=l(function(){return K1},"getClasses"),nt=l(function(e){let r=C1(".mermaidTooltip");(r._groups||r)[0][0]===null&&(r=C1("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),C1(e).select("svg").selectAll("g.node").on("mouseover",function(){const u=C1(this);if(u.attr("title")===null)return;const g=this==null?void 0:this.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(u.attr("title")).style("left",window.scrollX+g.left+(g.right-g.left)/2+"px").style("top",window.scrollY+g.bottom+"px"),r.html(r.html().replace(/<br \/ >/g,"<br/>")),u.classed("hover",!0)}).on("mouseout",function(){r.transition().duration(500).style("opacity",0),C1(this).classed("hover",!1)})},"setupToolTips");re.push(nt);var Ht=l(function(e="gen-1"){b1=new Map,K1=new Map,K=[],re=[nt],f1=[],Ae=new Map,ee=0,be=new Map,fe=!0,se=e,M1=U1(),Ft()},"clear"),Xt=l(e=>{se=e||"gen-2"},"setGen"),Qt=l(function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},"defaultStyle"),Jt=l(function(e,r,n){let i=e.text.trim(),u=n.text;e===n&&/ \s /.exec(n.text)&&(i=void 0);function d(o){const _={boolean:{},number:{},string:{}},z=[];let B;return{nodeList:o.filter(function(b){const x=typeof b;return b.stmt&&b.stmt==="dir"?(B=b.value,!1):b.trim()===""?!1:x in _?_[x].hasOwnProperty(b)?!1:_[x][b]=!0:z.includes(b)?!1:z.push(b)}),dir:B}}l(d,"uniq");const{nodeList:g,dir:D}=d(r.flat());if(se==="gen-1")for(let o=0;o<g.length;o++)g[o]=ie(g[o]);i=i??"subGraph"+ee,u=u||"",u=ne(u),ee=ee+1;const c={id:i,n
2024-11-27 03:30:55 +00:00
` +G.showPosition()+ `
2025-01-23 01:28:53 +00:00
Expecting ` + $ 1.join(", ")+", got '"+(this.terminals_[j]||j)+"'":he="Parse error on line "+(X+1)+": Unexpected "+(j==Xe?"end of input":"'"+(this.terminals_[j]||j)+"'"),this.parseError(he,{text:G.match,token:this.terminals_[j]||j,line:G.yylineno,loc:oe,expected: $ 1})}if(Q[0]instanceof Array&&Q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x1+", token: "+j);switch(Q[0]){case 1:A.push(j),y.push(G.yytext),t.push(G.yylloc),A.push(Q[1]),j=null,He=G.yyleng,s=G.yytext,X=G.yylineno,oe=G.yylloc;break;case 2:if(d1=this.productions_[Q[1]][1],G1. $ =y[y.length-d1],G1._ $ ={first_line:t[t.length-(d1||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(d1||1)].first_column,last_column:t[t.length-1].last_column},ft&&(G1._ $ .range=[t[t.length-(d1||1)].range[0],t[t.length-1].range[1]]),ce=this.performAction.apply(G1,[s,He,X,D1.yy,Q[1],y,t].concat(dt)),typeof ce<"u")return ce;d1&&(A=A.slice(0,-1*d1*2),y=y.slice(0,-1*d1),t=t.slice(0,-1*d1)),A.push(this.productions_[Q[1]][0]),y.push(G1. $ ),t.push(G1._ $ ),Je=z1[A[A.length-2]][A[A.length-1]],A.push(Je);break;case 3:return!0}}return!0},"parse")},ct=function(){var A1={EOF:1,parseError:l(function(p,A){if(this.yy.parser)this.yy.parser.parseError(p,A);else throw new Error(p)},"parseError"),setInput:l(function(f,p){return this.yy=p||this.yy||{},this._input=f,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var f=this._input[0];this.yytext+=f,this.yyleng++,this.offset++,this.match+=f,this.matched+=f;var p=f.match(/(?: \r \n ?| \n ).*/g);return p?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),f},"input"),unput:l(function(f){var p=f.length,A=f.split(/(?: \r \n ?| \n )/g);this._input=f+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p),this.offset-=p;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),A.length-1&&(this.yylineno-=A.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:A?(A.length===a.length?this.yylloc.first_column:0)+a[a.length-A.length].length-A[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-p]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+ ` . You can only invoke reject ( ) in the lexer when the lexer is of the backtracking persuasion ( options . backtrack _lexer = true ) .
` +this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(f){this.unput(this.match.slice(f))},"less"),pastInput:l(function(){var f=this.matched.substr(0,this.matched.length-this.match.length);return(f.length>20?"...":"")+f.substr(-20).replace(/ \n /g,"")},"pastInput"),upcomingInput:l(function(){var f=this.match;return f.length<20&&(f+=this._input.substr(0,20-f.length)),(f.substr(0,20)+(f.length>20?"...":"")).replace(/ \n /g,"")},"upcomingInput"),showPosition:l(function(){var f=this.pastInput(),p=new Array(f.length+1).join("-");return f+this.upcomingInput()+ `
` +p+"^"},"showPosition"),test_match:l(function(f,p){var A,a,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))),a=f[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+f[0].length},this.yytext+=f[0],this.match+=f[0],this.matches=f,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(f[0].length),this.matched+=f[0],A=this.performAction.call(this,this.yy,this,p,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),A)return A;if(this._backtrack){for(var t in y)this[t]=y[t];return!1}return!1},"test_match"),next:l(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var f,p,A,a;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),t=0;t<y.length;t++)if(A=this._input.match(this.rules[y[t]]),A&&(!p||A[0].length>p[0].length)){if(p=A,a=t,this.options.backtrack_lexer){if(f=this.test_match(A,y[t]),f!==!1)return f;if(this._backtrack){p=!1;continue}else return!1}else if(!this.options.flex)break}return p?(f=this.test_match(p,y[a]),f!==!1?f:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+ ` . Unrecognized text .
` +this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:l(function(){var p=this.next();return p||this.lex()},"lex"),begin:l(function(p){this.conditionStack.push(p)},"begin"),popState:l(function(){var p=this.conditionStack.length-1;return p>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:l(function(p){return p=this.conditionStack.length-1-Math.abs(p||0),p>=0?this.conditionStack[p]:"INITIAL"},"topState"),pushState:l(function(p){this.begin(p)},"pushState"),stateStackSize:l(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:l(function(p,A,a,y){switch(a){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;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.pushState("shapeData"),A.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:const t=/ \n \s */g;return A.yytext=A.yytext.replace(t,"<br/>"),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 94;case 17:this.popState();break;case 18:return 95;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 83;case 26:return 101;case 27:return 84;case 28:return 103;case 29:return 85;case 30:return 86;case 31:return 96;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 87;case 35:return p.lex.firstGraph()&&this.begin("dir"),12;case 36:return p.lex.firstGraph()&&this.begin("dir"),12;case 37:return p.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:return 97;case 41:return 97;case 42:return 97;case 43:return 97;case 44:return this.popState(),13;case 45:return this.popState(),14;case 46:return this.popState(),14;case 47:return this.popState(),14;case 48:return this.popState(),14;case 49:return this.popState(),14;case 50:return this.popState(),14;case 51:return this.popState(),14;case 52:return this.popState(),14;case 53:return this.popState(),14;case 54:return this.popState(),14;case 55:return 120;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 104;case 60:return 110;case 61:return 46;case 62:return 60;case 63:return 44;case 64:return 8;case 65:return 105;case 66:return 114;case 67:return this.popState(),77;case 68:return this.pushState("edgeText"),75;case 69:return 118;case 70:return this.popState(),77;case 71:return this.pushState("thickEdgeText"),75;case 72:return 118;case 73:return this.popState(),77;case 74:return this.pushState("dottedEdgeText"),75;case 75:return 118;case 76:return 77;case 77:return this.popState(),53;case 78:return"TEXT";case 79:return this.pushState("ellipseText"),52;case 80:return this.popState(),55;case 81:return this.pushState("text"),54;case 82:return this.popState(),57;case 83:return this.pushState("text"),56;case 84:return 58;case 85:return this.pushState("text"),67;case 86:return this.popState(),64;case 87:return this.pushState("text"),63;case 88:return this.popState(),49;case 89:return this.pushState("text"),48;case 90:return this.popState(),69;case 91:return this.popState(),71;case 92:return 116;case 93:return this.pushState("trapText"),68;case 94:return this.pushState("trapText"),70;case 95:return 117;case 96:return 67;case 97:return 89;case 98:return"SEP";case 99:return 88;case 100:return 114;case 101:return 110;case 102:return 44;case 103:return 108;case 104:return 113;case 105:return 115;case 106:return this.popState(),62;case
2024-11-27 03:30:55 +00:00
font - family : $ { e . fontFamily } ;
color : $ { e . nodeTextColor || e . textColor } ;
}
. cluster - label text {
fill : $ { e . titleColor } ;
}
. cluster - label span {
color : $ { e . titleColor } ;
}
. cluster - label span p {
background - color : transparent ;
}
. label text , span {
fill : $ { e . nodeTextColor || e . textColor } ;
color : $ { e . nodeTextColor || e . textColor } ;
}
. node rect ,
. node circle ,
. node ellipse ,
. node polygon ,
. node path {
fill : $ { e . mainBkg } ;
stroke : $ { e . nodeBorder } ;
stroke - width : 1 px ;
}
. rough - node . label text , . node . label text , . image - shape . label , . icon - shape . label {
text - anchor : middle ;
}
// .flowchart-label .text-outer-tspan {
// text-anchor: middle;
// }
// .flowchart-label .text-inner-tspan {
// text-anchor: start;
// }
. node . katex path {
fill : # 000 ;
stroke : # 000 ;
stroke - width : 1 px ;
}
. rough - node . label , . node . label , . image - shape . label , . icon - shape . label {
text - align : center ;
}
. node . clickable {
cursor : pointer ;
}
. root . anchor path {
fill : $ { e . lineColor } ! important ;
stroke - width : 0 ;
stroke : $ { e . lineColor } ;
}
. arrowheadPath {
fill : $ { e . arrowheadColor } ;
}
. edgePath . path {
stroke : $ { e . lineColor } ;
stroke - width : 2.0 px ;
}
. flowchart - link {
stroke : $ { e . lineColor } ;
fill : none ;
}
. edgeLabel {
background - color : $ { e . edgeLabelBackground } ;
p {
background - color : $ { e . edgeLabelBackground } ;
}
rect {
opacity : 0.5 ;
background - color : $ { e . edgeLabelBackground } ;
fill : $ { e . edgeLabelBackground } ;
}
text - align : center ;
}
/* For html labels only */
. labelBkg {
background - color : $ { As ( e . edgeLabelBackground , . 5 ) } ;
// background-color:
}
. cluster rect {
fill : $ { e . clusterBkg } ;
stroke : $ { e . clusterBorder } ;
stroke - width : 1 px ;
}
. cluster text {
fill : $ { e . titleColor } ;
}
. cluster span {
color : $ { e . titleColor } ;
}
/ * . c l u s t e r d i v {
color : $ { e . titleColor } ;
} * /
div . mermaidTooltip {
position : absolute ;
text - align : center ;
max - width : 200 px ;
padding : 2 px ;
font - family : $ { e . fontFamily } ;
font - size : 12 px ;
background : $ { e . tertiaryColor } ;
border : 1 px solid $ { e . border2 } ;
border - radius : 2 px ;
pointer - events : none ;
z - index : 100 ;
}
. flowchartTitleText {
text - anchor : middle ;
font - size : 18 px ;
fill : $ { e . textColor } ;
}
rect . text {
fill : none ;
stroke - width : 0 ;
}
. icon - shape , . image - shape {
background - color : $ { e . edgeLabelBackground } ;
p {
background - color : $ { e . edgeLabelBackground } ;
padding : 2 px ;
}
rect {
opacity : 0.5 ;
background - color : $ { e . edgeLabelBackground } ;
fill : $ { e . edgeLabelBackground } ;
}
text - align : center ;
}
2025-01-23 01:28:53 +00:00
` ,"getStyles"),ks=bs,Ds={parser:gs,db:de,renderer:ps,styles:ks,init:l(e=>{e.flowchart||(e.flowchart={}),e.layout&&Ze({layout:e.layout}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,Ze({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}}),de.clear(),de.setGen("gen-2")},"init")};export{Ds as diagram};