1import{g as Pe}from"./chunk-5VM5RSS4.BUEqlsvJ.js";import{aD as Fe,aE as ye,aF as Me,aG as Ke,aH as Ye,aI as We,aJ as Ve,aK as Ue,aL as He,aM as Xe,aN as je,aO as Ge,aP as qe,aQ as Je,aR as Ze,aS as Qe,aT as $e,aU as et,aV as tt,aW as st,aX as rt,aY as it,aZ as at,a_ as nt,a$ as ot,_ as g,A as j,j as J,b0 as ct,d as lt,l as m,r as ut,u as gt,c as me,a8 as ht,az as dt,ay as pt,aA as ft,k as St,b1 as xt,ai as be,aj as Lt}from"../app.CysKzyO0.js";import{c as yt}from"./channel.B3ev0H7d.js";import"./framework.CH5N37qj.js";import"./commonjsHelpers.NT8qMgGI.js";import"./theme.CHNhpPT9.js";function mt(e){return Array.isArray(e)}function bt(e){if(Fe(e))return e;const n=ye(e);if(!wt(e))return{};if(mt(e)){const s=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(s.index=e.index,s.input=e.input),s}if(Me(e)){const s=e,c=s.constructor;return new c(s.buffer,s.byteOffset,s.length)}if(n==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(n==="[object DataView]"){const s=e,c=s.buffer,p=s.byteOffset,r=s.byteLength,d=new ArrayBuffer(r),x=new Uint8Array(c,p,r);return new Uint8Array(d).set(x),new DataView(d)}if(n==="[object Boolean]"||n==="[object Number]"||n==="[object String]"){const s=e.constructor,c=new s(e.valueOf());return n==="[object String]"?_t(c,e):re(c,e),c}if(n==="[object Date]")return new Date(Number(e));if(n==="[object RegExp]"){const s=e,c=new RegExp(s.source,s.flags);return c.lastIndex=s.lastIndex,c}if(n==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(n==="[object Map]"){const s=e,c=new Map;return s.forEach((p,r)=>{c.set(r,p)}),c}if(n==="[object Set]"){const s=e,c=new Set;return s.forEach(p=>{c.add(p)}),c}if(n==="[object Arguments]"){const s=e,c={};return re(c,s),c.length=s.length,c[Symbol.iterator]=s[Symbol.iterator],c}const l={};return Dt(l,e),re(l,e),Et(l,e),l}function wt(e){switch(ye(e)){case ot:case nt:case at:case it:case rt:case st:case tt:case et:case $e:case Qe:case Ze:case Je:case qe:case Ge:case je:case Xe:case He:case Ue:case Ve:case We:case Ye:case Ke:return!0;default:return!1}}function re(e,n){for(const l in n)Object.hasOwn(n,l)&&(e[l]=n[l])}function Et(e,n){const l=Object.getOwnPropertySymbols(n);for(let s=0;s<l.length;s++){const c=l[s];Object.prototype.propertyIsEnumerable.call(n,c)&&(e[c]=n[c])}}function _t(e,n){const l=n.valueOf().length;for(const s in n)Object.hasOwn(n,s)&&(Number.isNaN(Number(s))||Number(s)>=l)&&(e[s]=n[s])}function Dt(e,n){const l=Object.getPrototypeOf(n);l!==null&&typeof n.constructor=="function"&&Object.setPrototypeOf(e,l)}var ae=function(){var e=g(function(T,h,i,o){for(i=i||{},o=T.length;o--;i[T[o]]=h);return i},"o"),n=[1,15],l=[1,7],s=[1,13],c=[1,14],p=[1,19],r=[1,16],d=[1,17],x=[1,18],y=[8,30],S=[8,10,21,28,29,30,31,39,43,46],E=[1,23],A=[1,24],z=[8,10,15,16,21,28,29,30,31,39,43,46],_=[8,10,15,16,21,27,28,29,30,31,39,43,46],N=[1,49],I={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:g(function(h,i,o,u,L,t,O){var a=t.length-1;switch(L){case 4:u.getLogger().debug("Rule: separator (NL) ");break;case 5:u.getLogger().debug("Rule: separator (Space) ");break;case 6:u.getLogger().debug("Rule: separator (EOF) ");break;case 7:u.getLogger().debug("Rule: hierarchy: ",t[a-1]),u.setHierarchy(t[a-1]);break;case 8:u.getLogger().debug("Stop NL ");break;case 9:u.getLogger().debug("Stop EOF ");break;case 10:u.getLogger().debug("Stop NL2 ");break;case 11:u.getLogger().debug("Stop EOF2 ");break;case 12:u.getLogger().debug("Rule: statement: ",t[a]),typeof t[a].length=="number"?this.$=t[a]:this.$=[t[a]];break;case 13:u.getLogger().debug("Rule: statement #2: ",t[a-1]),this.$=[t[a-1]].concat(t[a]);break;case 14:u.getLogger().debug("Rule: link: ",t[a],h),this.$={edgeTypeStr:t[a],label:""};break;case 15:u.getLogger().debug("Rule: LABEL link: ",t[a-3],t[a-1],t[a]),this.$={edgeTypeStr:t[a],label:t[a-1]};break;case 18:const f=parseInt(t[a]),w=u.generateId();this.$={id:w,type:"space",label:"",width:f,children:[]};break;case 23:u.getLogger().debug("Rule: (nodeStatement link node) ",t[a-2],t[a-1],t[a]," typestr: ",t[a-1].edgeTypeStr);const C=u.edgeStrToEdgeData(t[a-1].edgeTypeStr),M=u.edgeStrToEdgeStartData(t[a-1].edgeTypeStr),K=u.edgeStrToThickness(t[a-1].edgeTypeStr),b=u.edgeStrToPattern(t[a-1].edgeTypeStr);this.$=[{id:t[a-2].id,label:t[a-2].label,type:t[a-2].type,directions:t[a-2].directions},{id:t[a-2].id+"-"+t[a].id,start:t[a-2].id,end:t[a].id,label:t[a-1].label,type:"edge",thickness:K,pattern:b,directions:t[a
vendor: 4,838 bytes, lines 1-3
1].directions,arrowTypeEnd:C,arrowTypeStart:M},{id:t[a].id,label:t[a].label,type:u.typeStr2Type(t[a].typeStr),directions:t[a].directions}];break;case 24:u.getLogger().debug("Rule: nodeStatement (abc88 node size) ",t[a-1],t[a]),this.$={id:t[a-1].id,label:t[a-1].label,type:u.typeStr2Type(t[a-1].typeStr),directions:t[a-1].directions,widthInColumns:parseInt(t[a],10)};break;case 25:u.getLogger().debug("Rule: nodeStatement (node) ",t[a]),this.$={id:t[a].id,label:t[a].label,type:u.typeStr2Type(t[a].typeStr),directions:t[a].directions,widthInColumns:1};break;case 26:u.getLogger().debug("APA123",this?this:"na"),u.getLogger().debug("COLUMNS: ",t[a]),this.$={type:"column-setting",columns:t[a]==="auto"?-1:parseInt(t[a])};break;case 27:u.getLogger().debug("Rule: id-block statement : ",t[a-2],t[a-1]),u.generateId(),this.$={...t[a-2],type:"composite",children:t[a-1]};break;case 28:u.getLogger().debug("Rule: blockStatement : ",t[a-2],t[a-1],t[a]);const R=u.generateId();this.$={id:R,type:"composite",label:"",children:t[a-1]};break;case 29:u.getLogger().debug("Rule: node (NODE_ID separator): ",t[a]),this.$={id:t[a]};break;case 30:u.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",t[a-1],t[a]),this.$={id:t[a-1],label:t[a].label,typeStr:t[a].typeStr,directions:t[a].directions};break;case 31:u.getLogger().debug("Rule: dirList: ",t[a]),this.$=[t[a]];break;case 32:u.getLogger().debug("Rule: dirList: ",t[a-1],t[a]),this.$=[t[a-1]].concat(t[a]);break;case 33:u.getLogger().debug("Rule: nodeShapeNLabel: ",t[a-2],t[a-1],t[a]),this.$={typeStr:t[a-2]+t[a],label:t[a-1]};break;case 34:u.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",t[a-3],t[a-2]," #3:",t[a-1],t[a]),this.$={typeStr:t[a-3]+t[a],label:t[a-2],directions:t[a-1]};break;case 35:case 36:this.$={type:"classDef",id:t[a-1].trim(),css:t[a].trim()};break;case 37:this.$={type:"applyClass",id:t[a-1].trim(),styleClass:t[a].trim()};break;case 38:this.$={type:"applyStyles",id:t[a-1].trim(),stylesStr:t[a].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:n,11:3,13:4,19:5,20:6,21:l,22:8,23:9,24:10,25:11,26:12,28:s,29:c,31:p,39:r,43:d,46:x},{8:[1,20]},e(y,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:n,21:l,28:s,29:c,31:p,39:r,43:d,46:x}),e(S,[2,16],{14:22,15:E,16:A}),e(S,[2,17]),e(S,[2,18]),e(S,[2,19]),e(S,[2,20]),e(S,[2,21]),e(S,[2,22]),e(z,[2,25],{27:[1,25]}),e(S,[2,26]),{19:26,26:12,31:p},{10:n,11:27,13:4,19:5,20:6,21:l,22:8,23:9,24:10,25:11,26:12,28:s,29:c,31:p,39:r,43:d,46:x},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(_,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(y,[2,13]),{26:35,31:p},{31:[2,14]},{17:[1,36]},e(z,[2,24]),{10:n,11:37,13:4,14:22,15:E,16:A,19:5,20:6,21:l,22:8,23:9,24:10,25:11,26:12,28:s,29:c,31:p,39:r,43:d,46:x},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(_,[2,30]),{18:[1,43]},{18:[1,44]},e(z,[2,23]),{18:[1,45]},{30:[1,46]},e(S,[2,28]),e(S,[2,35]),e(S,[2,36]),e(S,[2,37]),e(S,[2,38]),{36:[1,47]},{33:48,34:N},{15:[1,50]},e(S,[2,27]),e(_,[2,33]),{38:[1,51]},{33:52,34:N,38:[2,31]},{31:[2,15]},e(_,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:g(function(h,i){if(i.recoverable)this.trace(h);else{var o=new Error(h);throw o.hash=i,o}},"parseError"),parse:g(function(h){var i=this,o=[0],u=[],L=[null],t=[],O=this.table,a="",f=0,w=0,C=2,M=1,K=t.slice.call(arguments,1),b=Object.create(this.lexer),R={yy:{}};for(var Y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Y)&&(R.yy[Y]=this.yy[Y]);b.setInput(h,R.yy),R.yy.lexer=b,R.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var H=b.yylloc;t.push(H);var ee=b.options&&b.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ke(k){o.length=o.length-2*k,L.length=L.length-k,t.length=t.length-k}g(ke,"popStack");function pe(){var k;return k=u.pop()||b.lex()||M,typeof k!="number"&&(k instanceof Array&&(u=k,k=u.pop()),k=i.symbols_[k]||k),k}g(pe,"lex");for(var B,V,P,te,U={},G,W,fe,q;;){if(V=o[o.length-1],this.defaultActions[V]?P=this.defaultActions[V]:((B===null||typeof B>"u")&&(B=pe()),P=O[V]&&O[V][B]),typeof P>"u"||!P.length||!P[0]){var se="";q=[];for(G in O[V])this.terminals_[G]&&G>C&&q.push("'"+this.terminals_[G]+"'");b.showPosition?se="Parse error on line "+(f+1)+`: 2`+b.showPosition()+` 3Expecting `+q.join(", ")+", got '"+(this.terminals_[B]||B)+"'":se="Parse error on line "+(f+1)+": Unexpected "+(B==M?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(se,{text:b.match,token:this.terminals_[B]||B,line:b.yylineno,loc:H,expected:q})}if(P[0]instanceof Array&&P.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+B);switch(P[0]){case 1:o.push(B),L.push(b.yytext),t.push(b.yylloc),o.push(P[1]),B=null,w=b.yyleng,a=b.yytext,f
vendor: 4,583 bytes, lines 3-5
3=b.yylineno,H=b.yylloc;break;case 2:if(W=this.productions_[P[1]][1],U.$=L[L.length-W],U._$={first_line:t[t.length-(W||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(W||1)].first_column,last_column:t[t.length-1].last_column},ee&&(U._$.range=[t[t.length-(W||1)].range[0],t[t.length-1].range[1]]),te=this.performAction.apply(U,[a,w,f,R.yy,P[1],L,t].concat(K)),typeof te<"u")return te;W&&(o=o.slice(0,-1*W*2),L=L.slice(0,-1*W),t=t.slice(0,-1*W)),o.push(this.productions_[P[1]][0]),L.push(U.$),t.push(U._$),fe=O[o[o.length-2]][o[o.length-1]],o.push(fe);break;case 3:return!0}}return!0},"parse")},D=function(){var T={EOF:1,parseError:g(function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw new Error(i)},"parseError"),setInput:g(function(h,i){return this.yy=i||this.yy||{},this._input=h,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:g(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var i=h.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:g(function(h){var i=h.length,o=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var u=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),o.length-1&&(this.yylineno-=o.length-1);var L=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:o?(o.length===u.length?this.yylloc.first_column:0)+u[u.length-o.length].length-o[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[L[0],L[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(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). 4`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(h){this.unput(this.match.slice(h))},"less"),pastInput:g(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var h=this.pastInput(),i=new Array(h.length+1).join("-");return h+this.upcomingInput()+` 5`+i+"^"},"showPosition"),test_match:g(function(h,i){var o,u,L;if(this.options.backtrack_lexer&&(L={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&&(L.yylloc.range=this.yylloc.range.slice(0))),u=h[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,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(h[0].length),this.matched+=h[0],o=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var t in L)this[t]=L[t];return!1}return!1},"test_match"),next:g(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,i,o,u;this._more||(this.yytext="",this.match="");for(var L=this._currentRules(),t=0;t<L.length;
vendor: 6,075 bytes, lines 5-6
5t++)if(o=this._input.match(this.rules[L[t]]),o&&(!i||o[0].length>i[0].length)){if(i=o,u=t,this.options.backtrack_lexer){if(h=this.test_match(o,L[t]),h!==!1)return h;if(this._backtrack){i=!1;continue}else return!1}else if(!this.options.flex)break}return i?(h=this.test_match(i,L[u]),h!==!1?h:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. 6`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:g(function(){var i=this.next();return i||this.lex()},"lex"),begin:g(function(i){this.conditionStack.push(i)},"begin"),popState:g(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(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:g(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:g(function(i){this.begin(i)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:g(function(i,o,u,L){switch(u){case 0:return i.getLogger().debug("Found block-beta"),10;case 1:return i.getLogger().debug("Found id-block"),29;case 2:return i.getLogger().debug("Found block"),10;case 3:i.getLogger().debug(".",o.yytext);break;case 4:i.getLogger().debug("_",o.yytext);break;case 5:return 5;case 6:return o.yytext=-1,28;case 7:return o.yytext=o.yytext.replace(/columns\s+/,""),i.getLogger().debug("COLUMNS (LEX)",o.yytext),28;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:i.getLogger().debug("LEX: POPPING STR:",o.yytext),this.popState();break;case 13:return i.getLogger().debug("LEX: STR end:",o.yytext),"STR";case 14:return o.yytext=o.yytext.replace(/space\:/,""),i.getLogger().debug("SPACE NUM (LEX)",o.yytext),21;case 15:return o.yytext="1",i.getLogger().debug("COLUMNS (LEX)",o.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),i.getLogger().debug("Lex: (("),"NODE_DEND";case 38:return this.popState(),i.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),i.getLogger().debug("Lex: ))"),"NODE_DEND";case 40:return this.popState(),i.getLogger().debug("Lex: (("),"NODE_DEND";case 41:return this.popState(),i.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),i.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),i.getLogger().debug("Lex: -)"),"NODE_DEND";case 44:return this.popState(),i.getLogger().debug("Lex: (("),"NODE_DEND";case 45:return this.popState(),i.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),i.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),i.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:return this.popState(),i.getLogger().debug("Lex: /]"),"NODE_DEND";case 49:return this.popState(),i.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),i.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),i.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),i.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),i.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return i.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return i.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return i.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:return i.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return i.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 59:return i.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 60:return i.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 61:return i.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 62:return i.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return i.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 64:return i.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 65:return this.pushState("NODE"),35;case 66:return this.pushState("NODE"),35;case 67:return this.pushState("NODE"),35;case 68:return this.pushState("NODE"),35;case 69:return this.pushState("NODE"),35;case 70:return this.pushState("NODE"),35;case 71:return this.pushState("NODE"),35;case 72:return i.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),i.getLogger().debug("LEX ARR START"),37;case 74:return i.getLogger().debug("Lex: NODE_ID",o.yytext),31;case 75:return i.getLogger().debug("Lex: EOF",o.yytext),8;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:i.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:i.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return i.getLogger().debug("LEX: NODE_DESCR:",o.yytext),"
6NODE_DESCR";case 83:i.getLogger().debug("LEX POPPING"),this.popState();break;case 84:i.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return o.yytext=o.yytext.replace(/^,\s*/,""),i.getLogger().debug("Lex (right): dir:",o.yytext),"DIR";case 86:return o.yytext=o.yytext.replace(/^,\s*/,""),i.getLogger().debug("Lex (left):",o.yytext),"DIR";case 87:return o.yytext=o.yytext.replace(/^,\s*/,""),i.getLogger().debug("Lex (x):",o.yytext),"DIR";case 88:return o.yytext=o.yytext.replace(/^,\s*/,""),i.getLogger().debug("Lex (y):",o.yytext),"DIR";case 89:return o.yytext=o.yytext.replace(/^,\s*/,""),i.getLogger().debug("Lex (up):",o.yytext),"DIR";case 90:return o.yytext=o.yytext.replace(/^,\s*/,""),i.getLogger().debug("Lex (down):",o.yytext),"DIR";case 91:return o.yytext="]>",i.getLogger().debug("Lex (ARROW_DIR end):",o.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return i.getLogger().debug("Lex: LINK","#"+o.yytext+"#"),15;case 93:return i.getLogger().debug("Lex: LINK",o.yytext),15;case 94:return i.getLogger().debug("Lex: LINK",o.yytext),15;case 95:return i.getLogger().debug("Lex: LINK",o.yytext),15;case 96:return i.getLogger().debug("Lex: START_LINK",o.yytext),this.pushState("LLABEL"),16;case 97:return i.getLogger().debug("Lex: START_LINK",o.yytext),this.pushState("LLABEL"),16;case 98:return i.getLogger().debug("Lex: START_LINK",o.yytext),this.pushState("LLABEL"),16;case 99:this.pushState("md_string");break;case 100:return i.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),i.getLogger().debug("Lex: LINK","#"+o.yytext+"#"),15;case 102:return this.popState(),i.getLogger().debug("Lex: LINK",o.yytext),15;case 103:return this.popState(),i.getLogger().debug("Lex: LINK",o.yytext),15;case 104:return i.getLogger().debug("Lex: COLON",o.yytext),o.yytext=o.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}
vendor: 4,935 bytes, line 6
6]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return T}();I.lexer=D;function v(){this.yy={}}return g(v,"Parser"),v.prototype=I,I.Parser=v,new v}();ae.parser=ae;var Tt=ae,F=new Map,ce=[],ne=new Map,Se="color",xe="fill",Nt="bgFill",we=",",Z=new Map,le="",It=g(e=>St.sanitizeText(e,me()),"sanitizeText"),Ot=g(function(e,n=""){let l=Z.get(e);l||(l={id:e,styles:[],textStyles:[]},Z.set(e,l)),n!=null&&n.split(we).forEach(s=>{const c=s.replace(/([^;]*);/,"$1").trim();if(RegExp(Se).exec(s)){const r=c.replace(xe,Nt).replace(Se,xe);l.textStyles.push(r)}l.styles.push(c)})},"addStyleClass"),Ct=g(function(e,n=""){const l=F.get(e);n!=null&&(l.styles=n.split(we))},"addStyle2Node"),vt=g(function(e,n){e.split(",").forEach(function(l){let s=F.get(l);if(s===void 0){const c=l.trim();s={id:c,type:"na",children:[]},F.set(c,s)}s.classes||(s.classes=[]),s.classes.push(n)})},"setCssClass"),Ee=g((e,n)=>{const l=e.flat(),s=[],c=l.find(r=>(r==null?void 0:r.type)==="column-setting"),p=(c==null?void 0:c.columns)??-1;for(const r of l){if(typeof p=="number"&&p>0&&r.type!=="column-setting"&&typeof r.widthInColumns=="number"&&r.widthInColumns>p&&m.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${p}`),r.label&&(r.label=It(r.label)),r.type==="classDef"){Ot(r.id,r.css);continue}if(r.type==="applyClass"){vt(r.id,(r==null?void 0:r.styleClass)??"");continue}if(r.type==="applyStyles"){r!=null&&r.stylesStr&&Ct(r.id,r==null?void 0:r.stylesStr);continue}if(r.type==="column-setting")n.columns=r.columns??-1;else if(r.type==="edge"){const d=(ne.get(r.id)??0)+1;ne.set(r.id,d),r.id=d+"-"+r.id,ce.push(r)}else{r.label||(r.type==="composite"?r.label="":r.label=r.id);const d=F.get(r.id);if(d===void 0?F.set(r.id,r):(r.type!=="na"&&(d.type=r.type),r.label!==r.id&&(d.label=r.label)),r.children&&Ee(r.children,r),r.type==="space"){const x=r.width??1;for(let y=0;y<x;y++){const S=bt(r);S.id=S.id+"-"+y,F.set(S.id,S),s.push(S)}}else d===void 0&&s.push(r)}}n.children=s},"populateBlockDatabase"),ue=[],X={id:"root",type:"composite",children:[],columns:-1},At=g(()=>{m.debug("Clear called"),ut(),X={id:"root",type:"composite",children:[],columns:-1},F=new Map([["root",X]]),ue=[],Z=new Map,ce=[],ne=new Map,le=""},"clear");function _e(e){switch(m.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return m.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}g(_e,"typeStr2Type");function De(e){switch(m.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}g(De,"edgeTypeStr2Type");function Te(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}
6g(Te,"edgeStrToEdgeData");function Ne(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}g(Ne,"edgeStrToEdgeStartData");function Ie(e){return e.includes("==")?"thick":"normal"}g(Ie,"edgeStrToThickness");function Oe(e){return e.includes(".-")?"dotted":"solid"}g(Oe,"edgeStrToPattern");var Le=0,zt=g(()=>(Le++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Le),"generateId"),Bt=g(e=>{X.children=e,Ee(e,X),ue=X.children},"setHierarchy"),Rt=g(e=>{const n=F.get(e);return n?n.columns?n.columns:n.children?n.children.length:-1:-1},"getColumns"),kt=g(()=>[...F.values()],"getBlocksFlat"),Pt=g(()=>ue||[],"getBlocks"),Ft=g(()=>ce,"getEdges"),Mt=g(e=>F.get(e),"getBlock"),Kt=g(e=>{F.set(e.id,e)},"setBlock"),Yt=g(e=>{le=e},"setDiagramId"),Wt=g(()=>le,"getDiagramId"),Vt=g(()=>m,"getLogger"),Ut=g(function(){return Z},"getClasses"),Ht={getConfig:g(()=>j().block,"getConfig"),typeStr2Type:_e,edgeTypeStr2Type:De,edgeStrToEdgeData:Te,edgeStrToEdgeStartData:Ne,edgeStrToThickness:Ie,edgeStrToPattern:Oe,getLogger:Vt,getBlocksFlat:kt,getBlocks:Pt,getEdges:Ft,setHierarchy:Bt,getBlock:Mt,setBlock:Kt,getColumns:Rt,getClasses:Ut,clear:At,generateId:zt,setDiagramId:Yt,getDiagramId:Wt},Xt=Ht,ie=g((e,n)=>{const l=yt,s=l(e,"r"),c=l(e,"g"),p=l(e,"b");return gt(s,c,p,n)},"fade"),jt=g(e=>`.label { 7 font-family: ${e.fontFamily}; 8 color: ${e.nodeTextColor||e.textColor}; 9 } 10 .cluster-label text { 11 fill: ${e.titleColor}; 12 } 13 .cluster-label span { 14 color: ${e.titleColor}; 15 } 16 17 18 19 .label text,span { 20 fill: ${e.nodeTextColor||e.textColor}; 21 color: ${e.nodeTextColor||e.textColor}; 22 } 23 24 .node rect, 25 .node circle, 26 .node ellipse, 27 .node polygon, 28 .node path { 29 fill: ${e.mainBkg}; 30 stroke: ${e.nodeBorder}; 31 stroke-width: 1px; 32 } 33 .flowchart-label text { 34 text-anchor: middle; 35 } 36 // .flowchart-label .text-outer-tspan { 37 // text-anchor: middle; 38 // } 39 // .flowchart-label .text-inner-tspan { 40 // text-anchor: start; 41 // } 42 43 .node .label { 44 text-align: center; 45 } 46 .node.clickable { 47 cursor: pointer; 48 } 49 50 .arrowheadPath { 51 fill: ${e.arrowheadColor}; 52 } 53 54 .edgePaths .path { 55 stroke: ${e.lineColor}; 56 stroke-width: 2.0px; 57 } 58 59 .flowchart-link { 60 stroke: ${e.lineColor}; 61 fill: none; 62 } 63 64 .edgeLabel { 65 background-color: ${e.edgeLabelBackground}; 66 /* 67 * This is for backward compatibility with existing code that didn't 68 * add a \`<p>\` around edge labels. 69 * 70 * TODO: We should probably remove this in a future release. 71 */ 72 p { 73 margin: 0; 74 padding: 0; 75 display: inline; 76 } 77 rect { 78 opacity: 0.5; 79 background-color: ${e.edgeLabelBackground}; 80 fill: ${e.edgeLabelBackground}; 81 } 82 text-align: center; 83 } 84 85 /* For html labels only */ 86 .labelBkg { 87 background-color: ${e.edgeLabelBackground}; 88 } 89 90 .node .cluster { 91 // fill: ${ie(e.mainBkg,.5)}; 92 fill: ${ie(e.clusterBkg,.5)}; 93 stroke: ${ie(e.clusterBorder,.2)}; 94 box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; 95 stroke-width: 1px; 96 } 97 98 .cluster text { 99 fill: ${e.titleColor}; 100 } 101 102 .cluster span { 103 color: ${e.titleColor}; 104 } 105 /* .cluster div { 106 color: ${e.titleColor}; 107 } */ 108 109 div.mermaidTooltip { 110 position: absolute; 111 text-align: center; 112 max-width: 200px; 113 padding: 2px; 114 font-family: ${e.fontFamily}; 115 font-size: 12px; 116 background: ${e.tertiaryColor}; 117 border: 1px solid ${e.border2}; 118 border-radius: 2px; 119 pointer-events: none; 120 z-index: 100; 121 } 122 123 .flowchartTitleText { 124 text-anchor: middle; 125 font-size: 18px; 126 fill: ${e.textColor}; 127 } 128 ${Pe()} 129`,"getStyles"),Gt=jt;function oe(e,n){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(n<0||!Number.isInteger(n))throw new Error("Position must be a non-negative integer."+n);if(e<0)return{px:n,py:0};if(e===1)return{px:0,py:n};const l=n%e,s=Math.floor(n/e);return{px:l,py:s}}g(oe,"calculateBlockPosition");var qt=g(e=>{let n=0,l=0;for(const s of e.children){const{width:c,height:p,x:r,y:d}=s.size??{width:0,height:0,x:0,y:0};if(m.debug("getMaxChildSize abc95 child:",s.id,"width:",c,"height:",p,"x:",r,"y:",d,s.type),s.type==="space")continue;const x=c/(s.widthInColumns??1);x>n&&(n=x),p>l&&(l=p)}return{width:n,height:l}},"getMaxChildSize");function Q(e,n,l=0,s=0,c=8){var d,x,y,S,E,A,z,_,N,I,D;m.debug("setBlockSizes abc95 (start)",e.id,(d=e==null?void 0:e.size)==null?void 0:d.x,"block width =",e==null?void 0:e.size,"siblingWidth",l),(x=e==null?void 0:e.size)!=null&&x.width||(e.size={width:l,height:s,x:0,y:0});let p=0,r=0;if(((y=e.children)==null?void 0:y.length)>
vendor: 4,201 bytes, line 129
1290){for(const t of e.children)Q(t,n,0,0,c);const v=qt(e);p=v.width,r=v.height,m.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",p,r);for(const t of e.children)t.size&&(m.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${p} ${r} ${JSON.stringify(t.size)}`),t.size.width=p*(t.widthInColumns??1)+c*((t.widthInColumns??1)-1),t.size.height=r,t.size.x=0,t.size.y=0,m.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${p} maxHeight:${r}`));for(const t of e.children)Q(t,n,p,r,c);const T=e.columns??-1;let h=0;for(const t of e.children)h+=t.widthInColumns??1;let i=e.children.length;T>0&&T<h&&(i=T);const o=Math.ceil(h/i);let u=i*(p+c)+c,L=o*(r+c)+c;if(u<l){m.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${l} siblingHeight ${s} width ${u}`),u=l,L=s;const t=(l-i*c-c)/i,O=(s-o*c-c)/o;m.debug("Size indata abc88",e.id,"childWidth",t,"maxWidth",p),m.debug("Size indata abc88",e.id,"childHeight",O,"maxHeight",r),m.debug("Size indata abc88 xSize",i,"padding",c);for(const a of e.children)a.size&&(a.size.width=t,a.size.height=O,a.size.x=0,a.size.y=0)}if(m.debug(`abc95 (finale calc) ${e.id} xSize ${i} ySize ${o} columns ${T}${e.children.length} width=${Math.max(u,((S=e.size)==null?void 0:S.width)||0)}`),u<(((E=e==null?void 0:e.size)==null?void 0:E.width)||0)){u=((A=e==null?void 0:e.size)==null?void 0:A.width)||0;const t=T>0?Math.min(e.children.length,T):e.children.length;if(t>0){const O=(u-t*c-c)/t;m.debug("abc95 (growing to fit) width",e.id,u,(z=e.size)==null?void 0:z.width,O);for(const a of e.children)a.size&&(a.size.width=O)}}e.size={width:u,height:L,x:0,y:0}}m.debug("setBlockSizes abc94 (done)",e.id,(_=e==null?void 0:e.size)==null?void 0:_.x,(N=e==null?void 0:e.size)==null?void 0:N.width,(I=e==null?void 0:e.size)==null?void 0:I.y,(D=e==null?void 0:e.size)==null?void 0:D.height)}g(Q,"setBlockSizes");function ge(e,n,l=8){var c,p,r,d,x,y,S,E,A,z,_,N,I,D,v,T,h;m.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(c=e==null?void 0:e.size)==null?void 0:c.x} y: ${(p=e==null?void 0:e.size)==null?void 0:p.y} width: ${(r=e==null?void 0:e.size)==null?void 0:r.width}`);const s=e.columns??-1;if(m.debug("layoutBlocks columns abc95",e.id,"=>",s,e),e.children&&e.children.length>0){const i=((x=(d=e==null?void 0:e.children[0])==null?void 0:d.size)==null?void 0:x.width)??0,o=e.children.length*i+(e.children.length-1)*l;m.debug("widthOfChildren 88",o,"posX");const u=new Map;{let f=0;for(const w of e.children){if(!w.size)continue;const{py:C}=oe(s,f),M=u.get(C)??0;w.size.height>M&&u.set(C,w.size.height);let K=(w==null?void 0:w.widthInColumns)??1;s>0&&(K=Math.min(K,s-f%s)),f+=K}}const L=new Map;{let f=0;const w=[...u.keys()].sort((C,M)=>C-M);for(const C of w)L.set(C,f),f+=(u.get(C)??0)+l}let t=0;m.debug("abc91 block?.size?.x",e.id,(y=e==null?void 0:e.size)==null?void 0:y.x);let O=(S=e==null?void 0:e.size)!=null&&S.x?((E=e==null?void 0:e.size)==null?void 0:E.x)+(-((A=e==null?void 0:e.size)==null?void 0:A.width)/2||0):-l,a=0;for(const f of e.children){const w=e;if(!f.size)continue;const{width:C,height:M}=f.size,{px:K,py:b}=oe(s,t);if(b!=a&&(a=b,O=(z=e==null?void 0:e.size)!=null&&z.x?((_=e==null?void 0:e.size)==null?void 0:_.x)+(-((N=e==null?void 0:e.size)==null?void 0:N.width)/2||0):-l,m.debug("New row in layout for block",e.id," and child ",f.id,a)),m.debug(`abc89 layout blocks (child) id: ${f.id} Pos: ${t} (px, py) ${K},${b} (${(I=w==null?void 0:w.size)==null?void 0:I.x},${(D=w==null?void 0:w.size)==null?void 0:D.y}) parent: ${w.id} width: ${C}${l}`),w.size){const Y=C/2;f.size.x=O+l+Y,m.debug(`abc91 layout blocks (calc) px, pyid:${f.id} startingPos=X${O} new startingPosX${f.size.x} ${Y} padding=${l} width=${C} halfWidth=${Y} => x:${f.size.x} y:${f.size.y} ${f.widthInColumns} (width * (child?.w || 1)) / 2 ${C*((f==null?void 0:f.widthInColumns)??1)/2}`),O=f.size.x+Y;const H=L.get(b)??0,ee=u.get(b)??M;f.size.y=w.size.y-w.size.height/2+H+ee/2+l,m.debug(`abc88 layout blocks (calc) px, pyid:${f.id}startingPosX${O}${l}${Y}=>x:${f.size.x}y:${f.size.y}${f.widthInColumns}(width * (child?.w || 1)) / 2${C*((f==null?void 0:f.widthInColumns)??1)/2}`)}f.children&&ge(f,n,l);let R=(f==null?void 0:f.widthInColumns)??1;s>
1290&&(R=Math.min(R,s-t%s)),t+=R,m.debug("abc88 columnsPos",f,t)}}m.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${(v=e==null?void 0:e.size)==null?void 0:v.x} y: ${(T=e==null?void 0:e.size)==null?void 0:T.y} width: ${(h=e==null?void 0:e.size)==null?void 0:h.width}`)}g(ge,"layoutBlocks");function he(e,{minX:n,minY:l,maxX:s,maxY:c}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:p,y:r,width:d,height:x}=e.size;p-d/2<n&&(n=p-d/2),r-x/2<l&&(l=r-x/2),p+d/2>s&&(s=p+d/2),r+x/2>c&&(c=r+x/2)}if(e.children)for(const p of e.children)({minX:n,minY:l,maxX:s,maxY:c}=he(p,{minX:n,minY:l,maxX:s,maxY:c}));return{minX:n,minY:l,maxX:s,maxY:c}}g(he,"findBounds");function Ce(e){var y,S;const n=e.getBlock("root");if(!n)return;const l=((S=(y=me())==null?void 0:y.block)==null?void 0:S.padding)??8;Q(n,e,0,0,l),ge(n,e,l),m.debug("getBlocks",JSON.stringify(n,null,2));const{minX:s,minY:c,maxX:p,maxY:r}=he(n),d=r-c,x=p-s;return{x:s,y:c,width:x,height:d}}g(Ce,"layout");function de(e,n,l=!1){var _,N,I;const s=e;let c="default";(((_=s==null?void 0:s.classes)==null?void 0:_.length)||0)>0&&(c=((s==null?void 0:s.classes)??[]).join(" ")),c=c+" flowchart-label";const p=((s==null?void 0:s.classes)??[]).flatMap(D=>{var v;return((v=n.getClasses().get(D))==null?void 0:v.styles)??[]});let r=0,d="rect",x;switch(s.type){case"round":r=5,d="rect";break;case"composite":r=0,d="composite",x=0;break;case"square":d="rect";break;case"diamond":d="question";break;case"hexagon":d="hexagon";break;case"block_arrow":d="block_arrow";break;case"odd":d="rect_left_inv_arrow";break;case"lean_right":d="lean_right";break;case"lean_left":d="lean_left";break;case"trapezoid":d="trapezoid";break;case"inv_trapezoid":d="inv_trapezoid";break;case"rect_left_inv_arrow":d="rect_left_inv_arrow";break;case"circle":d="circle";break;case"ellipse":d="ellipse";break;case"stadium":d="stadium";break;case"subroutine":d="subroutine";break;case"cylinder":d="cylinder";break;case"group":d="rect";break;case"doublecircle":d="doublecircle";break;default:d="rect"}const y=xt((s==null?void 0:s.styles)??[]),S=s.label,E=s.size??{width:0,height:0,x:0,y:0},A=n.getDiagramId();return{labelStyle:y.labelStyle,shape:d,label:S,labelText:S,rx:r,ry:r,class:c,cssClasses:c,cssStyles:(s==null?void 0:s.styles)??[],cssCompiledStyles:p,style:y.style,id:s.id,domId:A?`${A}-${s.id}`:s.id,isGroup:!1,directions:s.directions,width:E.width||void 0,height:E.height||void 0,wrappingWidth:E.width||Number.POSITIVE_INFINITY,x:E.x,y:E.y,positioned:l,intersect:void 0,padding:x??((I=(N=j())==null?void 0:N.block)==null?void 0:I.padding)??0,widthInColumns:s.widthInColumns??1}}g(de,"getNodeFromBlock");async function ve(e,n,l){var x;const s=de(n,l,!1);if(n.type==="group")return;const c=j(),p=await be(e,s,{config:c}),r=((x=p.node())==null?void 0:x.getBBox())??{width:0,height:0},d=l.getBlock(s.id);d.size={width:r.width,height:r.height,x:0,y:0,node:p},l.setBlock(d),p.remove()}g(ve,"calculateBlockSize");async function Ae(e,n,l){const s=de(n,l,!0);if(l.getBlock(s.id).type!=="space"){const p=j();await be(e,s,{config:p}),n.intersect=s==null?void 0:s.intersect,Lt(s)}}g(Ae,"insertBlockPositioned");async function $(e,n,l,s){for(const c of n)await s(e,c,l),c.children&&await $(e,c.children,l,s)}g($,"performOperations");async function ze(e,n,l){await $(e,n,l,ve)}g(ze,"calculateBlockSizes");async function Be(e,n,l){await $(e,n,l,Ae)}g(Be,"insertBlocks");async function Re(e,n,l,s,c){const p=new ht({multigraph:!0,compound:!0});p.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const r of l)r.size&&p.setNode(r.id,{width:r.size.width,height:r.size.height,intersect:r.intersect});for(const r of n)if(r.start&&r.end){const d=s.getBlock(r.start),x=s.getBlock(r.end);if(d!=null&&d.size&&(x!=null&&x.size)){const y=d.size,S=x.size,E=[{x:y.x,y:y.y},{x:y.x+(S.x-y.x)/2,y:y.y+(S.y-y.y)/2},{x:S.x,y:S.y}],A=c?`${c}-${r.id}`:r.id,z=r.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",_=r.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",N=`${z} ${_} flowchart-link LS-a1 LE-b1`;dt(e,{...r,id:A,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:E,classes:N},{},"block",p.node(r.start),p.node(r.end),c),r.label&&(await pt(e,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:E,classes:N}),ft({...r,x:E[1].x,y:E[1].y},{originalPath:E}))}}}g(Re,"insertEdges");var Jt=g(function(e,n){return n.db.getClasses()},"getClasses"),Zt=g(async function(e,n,l,s){var v;const{securityLevel:c,block:p}=j(),r=s.db;r.setDiagramId(n);let d;c==="sandbox"&&(d=J("#i"+n));const x=c==="sandbox"?J(d.nodes()[0].contentDocument.body):J("body"),y=c==="sandbox"?x.select(`[id="${n}"]`):J(`[id="${n}"]`);ct(y,["point","circle","cross"],s.type,n);
129const E=r.getBlocks(),A=r.getBlocksFlat(),z=r.getEdges(),_=y.insert("g").attr("class","block");await ze(_,E,r);const N=Ce(r);await Be(_,E,r),await Re(_,z,A,r,n);const I=(v=_.node())==null?void 0:v.getBBox(),D=I&&Number.isFinite(I.width)&&Number.isFinite(I.height)?I:N;if(D){const T=Math.max(1,Math.round(.125*(D.width/D.height))),h=D.height+T+10,i=D.width+10,{useMaxWidth:o}=p;lt(y,h,i,!!o),m.debug("Here Bounds",N,D),y.attr("viewBox",`${D.x-5} ${D.y-5} ${D.width+10} ${D.height+10}`)}},"draw"),Qt={draw:Zt,getClasses:Jt},as={parser:Tt,db:Xt,renderer:Qt,styles:Gt};export{as as diagram};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.