1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3013],{67221:function(t,e,r){r.d(e,{diagram:function(){return eg}});var a,i,n,s=r(71603),l=r(16535),o=r(1565),c=r(6045),d=r(42877),h=r(66764),g=r(99573),u=r(69619),y=r(25764),p=r(5712),x=r(53082),b=r(77832),f=function(){var t=(0,g.eW)(function(t,e,r,a){for(r=r||{},a=t.length;a--;r[t[a]]=e);return r},"o"),e=[1,15],r=[1,7],a=[1,13],i=[1,14],n=[1,19],s=[1,16],l=[1,17],o=[1,18],c=[8,30],d=[8,10,21,28,29,30,31,39,43,46],h=[1,23],u=[1,24],y=[8,10,15,16,21,28,29,30,31,39,43,46],p=[8,10,15,16,21,27,28,29,30,31,39,43,46],x=[1,49],b={trace:(0,g.eW)(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:(0,g.eW)(function(t,e,r,a,i,n,s){var l=n.length-1;switch(i){case 4:a.getLogger().debug("Rule: separator (NL) ");break;case 5:a.getLogger().debug("Rule: separator (Space) ");break;case 6:a.getLogger().debug("Rule: separator (EOF) ");break;case 7:a.getLogger().debug("Rule: hierarchy: ",n[l-1]),a.setHierarchy(n[l-1]);break;case 8:a.getLogger().debug("Stop NL ");break;case 9:a.getLogger().debug("Stop EOF ");break;case 10:a.getLogger().debug("Stop NL2 ");break;case 11:a.getLogger().debug("Stop EOF2 ");break;case 12:a.getLogger().debug("Rule: statement: ",n[l]),"number"==typeof n[l].length?this.$=n[l]:this.$=[n[l]];break;case 13:a.getLogger().debug("Rule: statement #2: ",n[l-1]),this.$=[n[l-1]].concat(n[l]);break;case 14:a.getLogger().debug("Rule: link: ",n[l],t),this.$={edgeTypeStr:n[l],label:""};break;case 15:a.getLogger().debug("Rule: LABEL link: ",n[l-3],n[l-1],n[l]),this.$={edgeTypeStr:n[l],label:n[l-1]};break;case 18:let o=parseInt(n[l]),c=a.generateId();this.$={id:c,type:"space",label:"",width:o,children:[]};break;case 23:a.getLogger().debug("Rule: (nodeStatement link node) ",n[l-2],n[l-1],n[l]," typestr: ",n[l-1].edgeTypeStr);let d=a.edgeStrToEdgeData(n[l-1].edgeTypeStr);this.$=[{id:n[l-2].id,label:n[l-2].label,type:n[l-2].type,directions:n[l-2].directions},{id:n[l-2].id+"-"+n[l].id,start:n[l-2].id,end:n[l].id,label:n[l-1].label,type:"edge",directions:n[l].directions,arrowTypeEnd:d,arrowTypeStart:"arrow_open"},{id:n[l].id,label:n[l].label,type:a.typeStr2Type(n[l].typeStr),directions:n[l].directions}];break;case 24:a.getLogger().debug("Rule: nodeStatement (abc88 node size) ",n[l-1],n[l]),this.$={id:n[l-1].id,label:n[l-1].label,type:a.typeStr2Type(n[l-1].typeStr),directions:n[l-1].directions,widthInColumns:parseInt(n[l],10)};break;case 25:a.getLogger().debug("Rule: nodeStatement (node) ",n[l]),this.$={id:n[l].id,label:n[l].label,type:a.typeStr2Type(n[l].typeStr),directions:n[l].directions,widthInColumns:1};break;case 26:a.getLogger().debug("APA123",this?this:"na"),a.getLogger().debug("COLUMNS: ",n[l]),this.$={type:"column-setting",columns:"auto"===n[l]?-1:parseInt(n[l])};break;case 27:a.getLogger().debug("Rule: id-block statement : ",n[l-2],n[l-1]),a.generateId(),this.$={...n[l-2],type:"composite",children:n[l-1]};break;case 28:a.getLogger().debug("Rule: blockStatement : ",n[l-2],n[l-1],n[l]);let h=a.generateId();this.$={id:h,type:"composite",label:"",children:n[l-1]};break;case 29:a.getLogger().debug("Rule: node (NODE_ID separator): ",n[l]),this.$={id:n[l]};break;case 30:a.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",n[l-1],n[l]),this.$={id:n[l-1],label:n[l].label,typeStr:n[l].typeStr,directions:n[l].directions};break;case 31:a.getLogger().debug("Rule: dirList: ",n[l]),this.$=[n[l]];break;case 32:a.getLogger().debug("Rule: dirList: ",n[l-1],n[l]),this.$=[n[l-1]].concat(n[l]);break;case 33:a.getLogger().debug("Rule: nodeShapeNLabel: ",n[l-2],n[l-1],n[l]),this.$={typeStr:n[l-2]+n[l],label:n[l-1]};break;case 34:a.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",n[l-3],n[l-2]," #3:",n[l-1],n[l]),this.$={typeStr:n[l-3]+n[l],label:n[l-2],directions:n[l-1]};break;case 35:case 36:this.$={type:"classDef",id:n[l-1].trim(),css:n[l].trim()};break;case 37:this.$={type:"applyClass",id:n[l-1].trim(),styleClass:n[l].trim()};break;case 38:this.$={type:"applyStyles",id:n[l-1].trim(),stylesStr:n[l].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:e,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:n,39:s,43:l,46:o},{8:[1,20]},t(c,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:e,21:r,28:a,29:i,31:n,39:s,43:l,46:o}),t(d,[2,16],{14:22,15:h,16:u}),t(d,[2,17]),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,22]),t(y,[2,25],{27:[1,25]}),t(d,[2,26]),{19:26,26:12,31:n},{10:e,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:n,39:s,43:l,46:o},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(p,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(c,[2,13]),{26:35,31:n},{31:[2,14]},{17:[1,36]},t(y,[2,24]),{10:e,11:37,13:4,14:22,15:h,16:u,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:n,39:s,43:l,46:o},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(p,[2,30]),{18:[1,43]},{18:[1,44]},t(y,[2,23]),{18:[1,45]},{30:[1,46]},t(d,[2,28]),t(d,[2,35]),t(d,[2,36]),t(d,[2,37]),t(d,[2,38]),{36:[1,47]},{33:48,34:x},{15:[1,50]},t(d,[2,27]),t(p,[2,33]),{38:[1,51]},{33:52,34:x,38:[2,31]},{31:[2,15]},t(p,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,g.eW)(function(t,e){if(e.recoverable)this.trace(t);else{var r=Error(t);throw r.hash=e,r}},"parseError"),parse:(0,g.eW)(function(t){var e=this,r=[0],a=[],i=[null],n=[],s=this.table,l="",o=0,c=0,d=0,h=n.slice.call(arguments,1
1),u=Object.create(this.lexer),y={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(y.yy[p]=this.yy[p]);u.setInput(t,y.yy),y.yy.lexer=u,y.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var x=u.yylloc;n.push(x);var b=u.options&&u.options.ranges;function f(){var t;return"number"!=typeof(t=a.pop()||u.lex()||1)&&(t instanceof Array&&(t=(a=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,g.eW)(function(t){r.length=r.length-2*t,i.length=i.length-t,n.length=n.length-t},"popStack"),(0,g.eW)(f,"lex");for(var w,m,k,L,S,v,_,E,W,D={};;){if(k=r[r.length-1],this.defaultActions[k]?L=this.defaultActions[k]:(null==w&&(w=f()),L=s[k]&&s[k][w]),void 0===L||!L.length||!L[0]){var T="";for(v in W=[],s[k])this.terminals_[v]&&v>2&&W.push("'"+this.terminals_[v]+"'");T=u.showPosition?"Parse error on line "+(o+1)+":\n"+u.showPosition()+"\nExpecting "+W.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==w?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(T,{text:u.match,token:this.terminals_[w]||w,line:u.yylineno,loc:x,expected:W})}if(L[0]instanceof Array&&L.length>1)throw Error("Parse Error: multiple actions possible at state: "+k+", token: "+w);switch(L[0]){case 1:r.push(w),i.push(u.yytext),n.push(u.yylloc),r.push(L[1]),w=null,m?(w=m,m=null):(c=u.yyleng,l=u.yytext,o=u.yylineno,x=u.yylloc,d>0&&d--);break;case 2:if(_=this.productions_[L[1]][1],D.$=i[i.length-_],D._$={first_line:n[n.length-(_||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(_||1)].first_column,last_column:n[n.length-1].last_column},b&&(D._$.range=[n[n.length-(_||1)].range[0],n[n.length-1].range[1]]),void 0!==(S=this.performAction.apply(D,[l,c,o,y.yy,L[1],i,n].concat(h))))return S;_&&(r=r.slice(0,-1*_*2),i=i.slice(0,-1*_),n=n.slice(0,-1*_)),r.push(this.productions_[L[1]][0]),i.push(D.$),n.push(D._$),E=s[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0},"parse")},f={EOF:1,parseError:(0,g.eW)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,g.eW)(function(t,e){return this.yy=e||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},"setInput"),input:(0,g.eW)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,g.eW)(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;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 i=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-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,g.eW)(function(){return this._more=!0,this},"more"),reject:(0,g.eW)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,g.eW)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,g.eW)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,g.eW)(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,"")},"upcomingInput"),showPosition:(0,g.eW)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,g.eW)(function(t,e){var r,a,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(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+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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var n in i)this[n]=i[n];return!1},"test_match"),next:(0,g.eW)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,r,a,i=this._currentRules(),n=0;n<i.length;n++)if((r=this._input.match(this.rules[i[n]]))&&(!e||r[0].length>e[0].length)){if(e=r,a=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[n])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,g.eW)(function(){return this.next()||this.lex()},"lex"),begin:(0,g.eW)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,g.eW)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,g.eW)(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:(0,g.eW)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,g.eW)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,g.eW)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,g.eW)(function(t,e,r,a){switch(r){case 0:return t.getLogger().debug("Found block-beta"),
110;case 1:return t.getLogger().debug("Found id-block"),29;case 2:return t.getLogger().debug("Found block"),10;case 3:t.getLogger().debug(".",e.yytext);break;case 4:t.getLogger().debug("_",e.yytext);break;case 5:return 5;case 6:return e.yytext=-1,28;case 7:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.yytext),28;case 8:case 76:case 77:case 99:this.pushState("md_string");break;case 9:return"MD_STR";case 10:case 34:case 79:this.popState();break;case 11:this.pushState("string");break;case 12:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 13:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 14:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 15:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.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 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:case 40:case 41:case 44:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),t.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),t.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),t.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),t.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return t.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;
1case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return t.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),37;case 74:return t.getLogger().debug("Lex: NODE_ID",e.yytext),31;case 75:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 78:return"NODE_DESCR";case 80:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 83:t.getLogger().debug("LEX POPPING"),this.popState();break;case 84:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 91:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 93:case 94:case 95:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 96:case 97:case 98:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 100:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 102:case 103:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 104:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.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*)/,/^(?:[\}])/,/^(?:[^\}
1]*)/,/^(?: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}}};function w(){this.yy={}}return b.lexer=f,(0,g.eW)(w,"Parser"),w.prototype=b,b.Parser=w,new w}();f.parser=f;var w=new Map,m=[],k=new Map,L="color",S="fill",v=(0,h.nV)(),_=new Map,E="",W=(0,g.eW)(t=>h.SY.sanitizeText(t,v),"sanitizeText"),D=(0,g.eW)(function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=_.get(t);r||(r={id:t,styles:[],textStyles:[]},_.set(t,r)),null!=e&&e.split(",").forEach(t=>{let e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(L).exec(t)){let t=e.replace(S,"bgFill").replace(L,S);r.textStyles.push(t)}r.styles.push(e)})},"addStyleClass"),T=(0,g.eW)(function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=w.get(t);null!=e&&(r.styles=e.split(","))},"addStyle2Node"),I=(0,g.eW)(function(t,e){t.split(",").forEach(function(t){let r=w.get(t);if(void 0===r){let e=t.trim();r={id:e,type:"na",children:[]},w.set(e,r)}r.classes||(r.classes=[]),r.classes.push(e)})},"setCssClass"),M=(0,g.eW)((t,e)=>{var r,a,i,n,s;let l=t.flat(),o=[],c=l.find(t=>(null==t?void 0:t.type)==="column-setting"),d=null!==(r=null==c?void 0:c.columns)&&void 0!==r?r:-1;for(let t of l){if("number"==typeof d&&d>0&&"column-setting"!==t.type&&"number"==typeof t.widthInColumns&&t.widthInColumns>d&&g.cM.warn("Block ".concat(t.id," width ").concat(t.widthInColumns," exceeds configured column width ").concat(d)),t.label&&(t.label=W(t.label)),"classDef"===t.type){D(t.id,t.css);continue}if("applyClass"===t.type){I(t.id,null!==(a=null==t?void 0:t.styleClass)&&void 0!==a?a:"");continue}if("applyStyles"===t.type){(null==t?void 0:t.stylesStr)&&T(t.id,null==t?void 0:t.stylesStr);continue}if("column-setting"===t.type)e.columns=null!==(i=t.columns)&&void 0!==i?i:-1;else if("edge"===t.type){let e=(null!==(n=k.get(t.id))&&void 0!==n?n:0)+1;k.set(t.id,e),t.id=e+"-"+t.id,m.push(t)}else{t.label||("composite"===t.type?t.label="":t.label=t.id);let e=w.get(t.id);if(void 0===e?w.set(t.id,t):("na"!==t.type&&(e.type=t.type),t.label!==t.id&&(e.label=t.label)),t.children&&M(t.children,t),"space"===t.type){let e=null!==(s=t.width)&&void 0!==s?s:1;for(let r=0;r<e;r++){let e=(0,u.Z)(t);e.id=e.id+"-"+r,w.set(e.id,e),o.push(e)}}else void 0===e&&o.push(t)}}e.children=o},"populateBlockDatabase"),N=[],C={id:"root",type:"composite",children:[],columns:-1},B=(0,g.eW)(()=>{g.cM.debug("Clear called"),(0,h.ZH)(),C={id:"root",type:"composite",children:[],columns:-1},w=new Map([["root",C]]),N=[],_=new Map,m=[],k=new Map,E=""},"clear");function R(t){switch(g.cM.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return g.cM.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"}}function O(t){return(g.cM.debug("typeStr2Type",t),"=="===t)?"thick":"normal"}function z(t){switch(t.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}(0,g.eW)(R,"typeStr2Type"),(0,g.eW)(O,"edgeTypeStr2Type"),(0,g.eW)(z,"edgeStrToEdgeData");var A=0,P=(0,g.eW)(()=>(A++,"id-"+Math.random().toString(36).substr(2,12)+"-"+A),"generateId"),Y=(0,g.eW)(t=>{C.children=t,M(t,C),N=C.children},"setHierarchy"),X=(0,g.eW)(t=>{let e=w.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),F=(0,g.eW)(()=>[...w.values()],"getBlocksFlat"),$=(0,g.eW)(()=>N||[],"getBlocks"),H=(0,g.eW)(()=>m,"getEdges"),U=(0,g.eW)(t=>w.get(t),"getBlock"),K=(0,g.eW)(t=>{w.set(t.id,t)},"setBlock"),V=(0,g.eW)(t=>{E=t},"setDiagramId"),j=(0,g.eW)(()=>E,"getDiagramId"),Z=(0,g.eW)(()=>g.cM,"getLogger"),q=(0,g.eW)(function(){return _},"getClasses"),G={getConfig:(0,g.eW)(()=>(0,h.iE)().block,"getConfig"),typeStr2Type:R,edgeTypeStr2Type:O,edgeStrToEdgeData:z,getLogger:Z,getBlocksFlat:F,getBlocks:$,getEdges:H,setHierarchy:Y,getBlock:U,setBlock:K,getColumns:X,getClasses:q,clear:B,generateId:P,setDiagramId:V,getDiagramId:j},J=(0,g.eW)((t,e)=>{let r=y.Z,a=r(t,"r"),i=r(t,"g"),n=r(t,"b");return p.Z(a,i,n,e)},"fade"),Q=(0,g.eW)(t=>".label {\n font-family: ".concat(t.fontFamily,";
1\n color: ").concat(t.nodeTextColor||t.textColor,";\n }\n .cluster-label text {\n fill: ").concat(t.titleColor,";\n }\n .cluster-label span,p {\n color: ").concat(t.titleColor,";\n }\n\n\n\n .label text,span,p {\n fill: ").concat(t.nodeTextColor||t.textColor,";\n color: ").concat(t.nodeTextColor||t.textColor,";\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(t.arrowheadColor,";\n }\n\n .edgePath .path {\n stroke: ").concat(t.lineColor,";\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ").concat(t.lineColor,";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(t.edgeLabelBackground,";\n /*\n * This is for backward compatibility with existing code that didn't\n * add a `<p>` around edge labels.\n *\n * TODO: We should probably remove this in a future release.\n */\n p {\n margin: 0;\n padding: 0;\n display: inline;\n }\n rect {\n opacity: 0.5;\n background-color: ").concat(t.edgeLabelBackground,";\n fill: ").concat(t.edgeLabelBackground,";\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ").concat(t.edgeLabelBackground,";\n }\n\n .node .cluster {\n // fill: ").concat(J(t.mainBkg,.5),";\n fill: ").concat(J(t.clusterBkg,.5),";\n stroke: ").concat(J(t.clusterBorder,.2),";\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ").concat(t.titleColor,";\n }\n\n .cluster span,p {\n color: ").concat(t.titleColor,";\n }\n /* .cluster div {\n color: ").concat(t.titleColor,";\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ").concat(t.fontFamily,";\n font-size: 12px;\n background: ").concat(t.tertiaryColor,";\n border: 1px solid ").concat(t.border2,";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ").concat(t.textColor,";\n }\n ").concat((0,s.G)(),"\n"),"getStyles"),tt=(0,g.eW)((t,e,r,a)=>{e.forEach(e=>{ts[e](t,r,a)})},"insertMarkers"),te=(0,g.eW)((t,e,r)=>{g.cM.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).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",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),tr=(0,g.eW)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).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",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).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")},"composition"),ta=(0,g.eW)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).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",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).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"),ti=(0,g.eW)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).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",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).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")},"dependency"),tn=(0,g.eW)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),ts={extension:te,composition:tr,aggregation:ta,dependency:ti,lollipop:tn,point:(0,g.eW)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).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",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).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")},"point"),circle:(0,g.eW)((t,e,r)=>{t.append("marker").attr("id",r+"_"+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",r+"_"+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")},"circle"),cross:(0,g.eW)((t,e,r)=>{t.append("marker").attr("id",r+"_"+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",r+"_"+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")},"cross"),barb:(0,g.eW)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+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")},"barb")},tl=null!==(n=null===(i=(0,h.nV)())||void 0===i?void 0:null===(a=i.block)||void 0===a?void 0:a.padding)&&void 0!==n?n:8;function to(t,e){if(0===t||!Number.isInteger(t))throw Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw Error("Position must be a non-negative integer."+e);return t<0?{px:e,py:0}:1===t?{px:0,py:e}:{px:e%t,py:Math.floor(e/t)}}(0,g.eW)(to,"calculateBlockPosition");var tc=(0,g.eW)(t=>{let e=0,r=0;for(let n of t.children){var a,i;let{width:t,height:s,x:l,y:o}=null!==(a=n.size)&&void 0!==a?a:{width:0,height:0,x:0,y:0};g.cM.debug("getMaxChildSize abc95 child:",n.id,"width:",t,"height:",s,"x:",l,"y:",o,n.type),"space"!==n.type&&(t>e&&(e=t/(null!==(i=n.widthInColumns)&&void 0!==i?i:1)),s>r&&(r=s))}return{width:e,height:r}},"getMaxChildSize");function td(t,e){var r,a,i,n,s,l,o,c,d,h,u,y,p,x,b;let f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,w=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;g.cM.debug("setBlockSizes abc95 (start)",t.id,null==t?void 0:null===(r=t.size)||void 0===r?void 0:r.x,"block width =",null==t?void 0:t.size,"siblingWidth",f),(null==t?void 0:null===(a=t.size)||void 0===a?void 0:a.width)||(t.size={width:f,height:w,x:0,y:0});let m=0,k=0;if((null===(i=t.children)||void 0===i?void 0:i.length)>0){for(let r of t.children)td(r,e);let r=tc(t);for(let e of(m=r.width,k=r.height,g.cM.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",m,k),t.children))e.size&&(g.cM.debug("abc95 Setting size of children of ".concat(t.id," id=").concat(e.id," ").concat(m," ").concat(k," ").concat(JSON.stringify(e.size))),e.size.width=m*(null!==(h=e.widthInColumns)&&void 0!==h?h:1)+tl*((null!==(u=e.widthInColumns)&&void 0!==u?u:1)-1),e.size.height=k,e.size.x=0,e.size.y=0,g.cM.debug("abc95 updating size of ".concat(t.id," children child:").concat(e.id," maxWidth:").concat(m," maxHeight:").concat(k)));for(let r of t.children)td(r,e,m,k);let a=null!==(y=t.columns)&&void 0!==y?y:-1,i=0;for(let e of t.children)i+=null!==(p=e.widthInColumns)&&void 0!==p?p:1;let n=t.children.length;a>0&&a<i&&(n=a);let s=Math.ceil(i/n),l=n*(m+tl)+tl,o=s*(k+tl)+tl;if(l<f){g.cM.debug("Detected to small sibling: abc95 ".concat(t.id," siblingWidth ").concat(f," siblingHeight ").concat(w," width ").concat(l)),l=f,o=w;let e=(f-n*tl-tl)/n,r=(w-s*tl-tl)/s;for(let a of(g.cM.debug("Size indata abc88",t.id,"childWidth",e,"maxWidth",m),g.cM.debug("Size indata abc88",t.id,"childHeight",r,"maxHeight",k),g.cM.debug("Size indata abc88 xSize",n,"padding",tl),t.children))a.size&&(a.size.width=e,a.size.height=r,a.size.x=0,a.size.y=0)}if(g.cM.debug("abc95 (finale calc) ".concat(t.id," xSize ").concat(n," ySize ").concat(s," columns ").concat(a).concat(t.children.length," width=").concat(Math.max(l,(null===(c=t.size)||void 0===c?void 0:c.width)||0))),l<((null==t?void 0:null===(d=t.size)||void 0===d?void 0:d.width)||0)){l=(null==t?void 0:null===(x=t.size)||void 0===x?void 0:x.width)||0;let e=a>0?Math.min(t.children.length,a):t.children.length;if(e>0){let r=(l-e*tl-tl)/e;for(let e of(g.cM.debug("abc95 (growing to fit) width",t.id,l,null===(b=t.size)||void 0===b?void 0:b.width,r),t.children))e.size&&(e.size.width=r)}}t.size={width:l,height:o,x:0,y:0}}g.cM.debug("setBlockSizes abc94 (done)",t.id,null==t?void 0:null===(n=t.size)||void 0===n?void 0:n.x,null==t?void 0:null===(s=t.size)||void 0===s?void 0:s.width,null==t?void 0:null===(l=t.size)||void 0===l?void 0:l.y,null==t?void 0:null===(o=t.size)||void 0===o?void 0:o.height)}function th(t,e){var r,a,i,n,s,l,o,c,d,h,u,y,p,x,b,f,w,m,k,L,S,v,_,E,W,D,T;g.cM.debug("abc85 layout blocks (=>layoutBlocks) ".concat(t.id," x: ").concat(null==t?void 0:null===(r=t.size)||void 0===r?void 0:r.x," y: ").concat(null==t?void 0:null===(a=t.size)||void 0===a?void 0:a.y," width: ").concat(null==t?void 0:null===(i=t.size)||void 0===i?void 0:i.width));let I=null!==(o=t.columns)&&void 0!==o?o:-1;if(g.cM.debug("layoutBlocks columns abc95",t.id,"=>",I,t),t.children&&t.children.length>0){let r=null!==(x=null==t?void 0:null===(d=t.children[0])||void 0===d?void 0:null===(c=d.size)||void 0===c?void 0:c.width)&&void 0!==x?x:0,a=t.children.length*r+(t.children.length-1)*tl;g.cM.debug("widthOfChildren 88",a,"posX");let i=new Map;{let e=0;for(let r of t.children){if(!r.size)continue;let{py:t}=to(I,e),a=null!==(b=i.get(t))&&void 0!==b?b:0;r.size.height>a&&i.set(t,r.size.height);let n=null!==(f=null==r?void 0:r.widthInColumns)&&void 0!==f?f:1;I>0&&(n=Math.min(n,I-e%I)),e+=n}}let n=new Map;{let t=0;for(let e of[...i.keys()].sort((t,e)=>t-e))n.set(e,t),t+=(null!==(w=i.get(e))&&void 0!==w?w:0)+tl}let s=0;g.cM.debug("abc91 block?.size?.x",t.id,null==t?void 0:null===(h=t.size)||void 0===h?void 0:h.x);let l=(null==t?void 0:null===(u=t.size)||void 0===u?void 0:u.x)?(null==t?void 0:null===(y=t.size)||void 0===y?void 0:y.x)+(-(null==t?void 0:null===(p=t.size)||void 0===p?void 0:p.width)/2||0):-tl,o=0;for(let r of t.children){if(!r.size)continue;let{width:a,height:c}=r.size,{px:d,py:h}=to(I,s);if(h!=o&&(o=h,l=(null==t?void 0:null===(L=t.size)||void 0===L?void 0:L.x)?(null==t?void 0:null===(S=t.size)||void 0===S?void 0:S.x)+(-(null==t?void 0:null===(v=t.size)||void 0===v?void 0:v.width)/2||0):-tl,g.cM.debug("New row in layout for block",t.id," and child ",r.id,o)),g.cM.debug("abc89 layout blocks (child) id: ".concat(r.id," Pos: ").concat(s," (px, py) ").concat(d,",").concat(h," (").concat(null==t?void 0:null===(m=t.size)||void 0===m?void 0:m.x,",").concat(null==t?void 0:null===(k=t.size)||void 0===k?void 0:k.y,") parent: ").concat(t.id," width: ").concat(a).concat(tl)),t.size){let e=a/2;r.size.x=l+tl+e,g.cM.debug("abc91 layout blocks (calc) px, pyid:".concat(r.id," startingPos=X").concat(l," new startingPosX").concat(r.size.x," ").concat(e," padding=").concat(tl," width=").concat(a," halfWidth=").concat(e," => x:").concat(r.size.x," y:").concat(r.size.y," ").concat(r.widthInColumns," (width * (child?.w || 1)) / 2 ").concat(a*(null!==(_=null==r?void 0:r.widthInColumns)&&void 0!==_?_:1)/2)),l=r.size.x+e;let s=null!==(E=n.get(h))&&void 0!==E?E:0,o=null!==(W=i.get(h))&&void 0!==W?W:c;r.size.y=t.size.y-t.size.height/2+s+o/2+tl,g.cM.debug("abc88 layout blocks (calc) px, pyid:".concat(r.id,"startingPosX").concat(l).concat(tl).concat(e,"=>x:").concat(r.size.x,"y:").concat(r.size.y).concat(r.widthInColumns,"(width * (child?.w || 1)) / 2").concat(a*(null!==(D=null==r?void 0:r.widthInColumns)&&void 0!==D?D:1)/2))}r.children&&th(r,e);let u=null!==(T=null==r?void 0:r.widthInColumns)&&void 0!==T?T:1;I>
10&&(u=Math.min(u,I-s%I)),s+=u,g.cM.debug("abc88 columnsPos",r,s)}}g.cM.debug("layout blocks (<==layoutBlocks) ".concat(t.id," x: ").concat(null==t?void 0:null===(n=t.size)||void 0===n?void 0:n.x," y: ").concat(null==t?void 0:null===(s=t.size)||void 0===s?void 0:s.y," width: ").concat(null==t?void 0:null===(l=t.size)||void 0===l?void 0:l.width))}function tg(t){let{minX:e,minY:r,maxX:a,maxY:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{minX:0,minY:0,maxX:0,maxY:0};if(t.size&&"root"!==t.id){let{x:n,y:s,width:l,height:o}=t.size;n-l/2<e&&(e=n-l/2),s-o/2<r&&(r=s-o/2),n+l/2>a&&(a=n+l/2),s+o/2>i&&(i=s+o/2)}if(t.children)for(let n of t.children)({minX:e,minY:r,maxX:a,maxY:i}=tg(n,{minX:e,minY:r,maxX:a,maxY:i}));return{minX:e,minY:r,maxX:a,maxY:i}}function tu(t){let e=t.getBlock("root");if(!e)return;td(e,t,0,0),th(e,t),g.cM.debug("getBlocks",JSON.stringify(e,null,2));let{minX:r,minY:a,maxX:i,maxY:n}=tg(e);return{x:r,y:a,width:i-r,height:n-a}}(0,g.eW)(td,"setBlockSizes"),(0,g.eW)(th,"layoutBlocks"),(0,g.eW)(tg,"findBounds"),(0,g.eW)(tu,"layout");var ty=(0,g.eW)(async function(t,e,r){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],n=e||"";"object"==typeof n&&(n=n[0]);let s=(0,h.nV)(),l=(0,h._X)(s);return await (0,c.rw)(t,n,{style:r,isTitle:a,useHtmlLabels:l,markdown:!1,isNode:i,width:Number.POSITIVE_INFINITY},s)},"createLabel"),tp=(0,g.eW)((t,e,r,a,i)=>{e.arrowTypeStart&&tb(t,"start",e.arrowTypeStart,r,a,i),e.arrowTypeEnd&&tb(t,"end",e.arrowTypeEnd,r,a,i)},"addEdgeMarkers"),tx={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},tb=(0,g.eW)((t,e,r,a,i,n)=>{let s=tx[r];if(!s){g.cM.warn("Unknown arrow type: ".concat(r));return}t.attr("marker-".concat(e),"url(".concat(a,"#").concat(i,"_").concat(n,"-").concat(s).concat("start"===e?"Start":"End",")"))},"addEdgeMarker"),tf={},tw={},tm=(0,g.eW)(async(t,e)=>{let r;let a=(0,h.nV)(),i=(0,h._X)(a),n=t.insert("g").attr("class","edgeLabel"),s=n.insert("g").attr("class","label"),o="markdown"===e.labelType,d=await (0,c.rw)(t,e.label,{style:e.labelStyle,useHtmlLabels:i,addSvgBackground:o,isNode:!1,markdown:o,width:o?void 0:Number.POSITIVE_INFINITY},a);s.node().appendChild(d);let g=d.getBBox(),u=g;if(i){let t=d.children[0],e=(0,x.Ys)(d);u=g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}else{let t=(0,x.Ys)(d).select("text").node();t&&"function"==typeof t.getBBox&&(u=t.getBBox())}if(s.attr("transform",(0,l.eR)(u,i)),tf[e.id]=n,e.width=g.width,e.height=g.height,e.startLabelLeft){let a=t.insert("g").attr("class","edgeTerminals"),n=a.insert("g").attr("class","inner"),s=await ty(n,e.startLabelLeft,e.labelStyle);r=s;let o=s.getBBox();if(i){let t=s.children[0],e=(0,x.Ys)(s);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}n.attr("transform",(0,l.eR)(o,i)),tw[e.id]||(tw[e.id]={}),tw[e.id].startLeft=a,tk(r,e.startLabelLeft)}if(e.startLabelRight){let a=t.insert("g").attr("class","edgeTerminals"),n=a.insert("g").attr("class","inner"),s=await ty(a,e.startLabelRight,e.labelStyle);r=s,n.node().appendChild(s);let o=s.getBBox();if(i){let t=s.children[0],e=(0,x.Ys)(s);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}n.attr("transform",(0,l.eR)(o,i)),tw[e.id]||(tw[e.id]={}),tw[e.id].startRight=a,tk(r,e.startLabelRight)}if(e.endLabelLeft){let a=t.insert("g").attr("class","edgeTerminals"),n=a.insert("g").attr("class","inner"),s=await ty(n,e.endLabelLeft,e.labelStyle);r=s;let o=s.getBBox();if(i){let t=s.children[0],e=(0,x.Ys)(s);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}n.attr("transform",(0,l.eR)(o,i)),a.node().appendChild(s),tw[e.id]||(tw[e.id]={}),tw[e.id].endLeft=a,tk(r,e.endLabelLeft)}if(e.endLabelRight){let a=t.insert("g").attr("class","edgeTerminals"),n=a.insert("g").attr("class","inner"),s=await ty(n,e.endLabelRight,e.labelStyle);r=s;let o=s.getBBox();if(i){let t=s.children[0],e=(0,x.Ys)(s);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}n.attr("transform",(0,l.eR)(o,i)),a.node().appendChild(s),tw[e.id]||(tw[e.id]={}),tw[e.id].endRight=a,tk(r,e.endLabelRight)}return d},"insertEdgeLabel");function tk(t,e){(0,h._X)((0,h.nV)())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,g.eW)(tk,"setTerminalWidth");var tL=(0,g.eW)((t,e)=>{g.cM.debug("Moving label abc88 ",t.id,t.label,tf[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath,a=(0,h.nV)(),{subGraphTitleTotalMargin:i}=(0,o.L)(a);if(t.label){let a=tf[t.id],n=t.x,s=t.y;if(r){let a=d.w8.calcLabelPosition(r);g.cM.debug("Moving label "+t.label+" from (",n,",",s,") to (",a.x,",",a.y,") abc88"),e.updatedPath&&(n=a.x,s=a.y)}a.attr("transform","translate(".concat(n,", ").concat(s+i/2,")"))}if(t.startLabelLeft){let e=tw[t.id].startLeft,a=t.x,i=t.y;if(r){let e=d.w8.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);a=e.x,i=e.y}e.attr("transform","translate(".concat(a,", ").concat(i,")"))}if(t.startLabelRight){let e=tw[t.id].startRight,a=t.x,i=t.y;if(r){let e=d.w8.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);a=e.x,i=e.y}e.attr("transform","translate(".concat(a,", ").concat(i,")"))}if(t.endLabelLeft){let e=tw[t.id].endLeft,a=t.x,i=t.y;if(r){let e=d.w8.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);a=e.x,i=e.y}e.attr("transform","translate(".concat(a,", ").concat(i,")"))}if(t.endLabelRight){let e=tw[t.id].endRight,a=t.x,i=t.y;if(r){let e=d.w8.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);a=e.x,i=e.y}e.attr("transform","translate(".concat(a,", ").concat(i,")"))}},"positionEdgeLabel"),tS=(0,g.eW)((t,e)=>{let r=t.x,a=t.y,i=Math.abs(e.x-r),n=Math.abs(e.y-a),s=t.width/2,l=t.height/2;return i>=s||n>=l},"outsideNode"),tv=(0,g.eW)((t,e,r)=>{g.cM.debug("intersection calc abc89:\n outsidePoint: ".concat(JSON.stringify(e),"\n insidePoint : ").concat(JSON.stringify(r),"\n node : x:").concat(t.x," y:").concat(t.y," w:").concat(t.width," h:").concat(t.height));let a=t.x,i=t.y,n=Math.abs(a-r.x),s=t.width/2,l=r.x<e.x?s-n:s+n,o=t.height/2,c=Math.abs(e.y-r.y),d=Math.abs(e.x-r.x);
1if(Math.abs(i-e.y)*s>Math.abs(a-e.x)*o){let t=r.y<e.y?e.y-o-i:i-o-e.y;l=d*t/c;let a={x:r.x<e.x?r.x+l:r.x-d+l,y:r.y<e.y?r.y+c-t:r.y-c+t};return 0===l&&(a.x=e.x,a.y=e.y),0===d&&(a.x=e.x),0===c&&(a.y=e.y),g.cM.debug("abc89 topp/bott calc, Q ".concat(c,", q ").concat(t,", R ").concat(d,", r ").concat(l),a),a}{let t=c*(l=r.x<e.x?e.x-s-a:a-s-e.x)/d,i=r.x<e.x?r.x+d-l:r.x-d+l,n=r.y<e.y?r.y+t:r.y-t;return g.cM.debug("sides calc abc89, Q ".concat(c,", q ").concat(t,", R ").concat(d,", r ").concat(l),{_x:i,_y:n}),0===l&&(i=e.x,n=e.y),0===d&&(i=e.x),0===c&&(n=e.y),{x:i,y:n}}},"intersection"),t_=(0,g.eW)((t,e)=>{g.cM.debug("abc88 cutPathAtIntersect",t,e);let r=[],a=t[0],i=!1;return t.forEach(t=>{if(tS(e,t)||i)a=t,i||r.push(t);else{let n=tv(e,a,t),s=!1;r.forEach(t=>{s=s||t.x===n.x&&t.y===n.y}),r.some(t=>t.x===n.x&&t.y===n.y)||r.push(n),i=!0}}),r},"cutPathAtIntersect"),tE=(0,g.eW)(function(t,e,r,a,i,n,s){let o,c=r.points;g.cM.debug("abc88 InsertEdge: edge=",r,"e=",e);let d=!1,u=n.node(e.v);var y=n.node(e.w);(null==y?void 0:y.intersect)&&(null==u?void 0:u.intersect)&&((c=c.slice(1,r.points.length-1)).unshift(u.intersect(c[0])),c.push(y.intersect(c[c.length-1]))),r.toCluster&&(g.cM.debug("to cluster abc88",a[r.toCluster]),c=t_(r.points,a[r.toCluster].node),d=!0),r.fromCluster&&(g.cM.debug("from cluster abc88",a[r.fromCluster]),c=t_(c.reverse(),a[r.fromCluster].node).reverse(),d=!0);let p=c.filter(t=>!Number.isNaN(t.y)),b=x.$0Z;r.curve&&("graph"===i||"flowchart"===i)&&(b=r.curve);let{x:f,y:w}=(0,l.om)(r),m=(0,x.jvg)().x(f).y(w).curve(b);switch(r.thickness){case"normal":o="edge-thickness-normal";break;case"thick":case"invisible":o="edge-thickness-thick";break;default:o=""}switch(r.pattern){case"solid":o+=" edge-pattern-solid";break;case"dotted":o+=" edge-pattern-dotted";break;case"dashed":o+=" edge-pattern-dashed"}let k=t.append("path").attr("d",m(p)).attr("id",r.id).attr("class"," "+o+(r.classes?" "+r.classes:"")).attr("style",r.style),L="";((0,h.nV)().flowchart.arrowMarkerAbsolute||(0,h.nV)().state.arrowMarkerAbsolute)&&(L=(0,h.Gr)(!0)),tp(k,r,L,s,i);let S={};return d&&(S.updatedPath=c),S.originalPath=r.points,S},"insertEdge"),tW=(0,g.eW)(t=>{let e=new Set;for(let r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r)}return e},"expandAndDeduplicateDirections"),tD=(0,g.eW)((t,e,r)=>{let a=tW(t),i=e.height+2*r.padding,n=i/2,s=e.width+2*n+r.padding,l=r.padding/2;return a.has("right")&&a.has("left")&&a.has("up")&&a.has("down")?[{x:0,y:0},{x:n,y:0},{x:s/2,y:2*l},{x:s-n,y:0},{x:s,y:0},{x:s,y:-i/3},{x:s+2*l,y:-i/2},{x:s,y:-2*i/3},{x:s,y:-i},{x:s-n,y:-i},{x:s/2,y:-i-2*l},{x:n,y:-i},{x:0,y:-i},{x:0,y:-2*i/3},{x:-2*l,y:-i/2},{x:0,y:-i/3}]:a.has("right")&&a.has("left")&&a.has("up")?[{x:n,y:0},{x:s-n,y:0},{x:s,y:-i/2},{x:s-n,y:-i},{x:n,y:-i},{x:0,y:-i/2}]:a.has("right")&&a.has("left")&&a.has("down")?[{x:0,y:0},{x:n,y:-i},{x:s-n,y:-i},{x:s,y:0}]:a.has("right")&&a.has("up")&&a.has("down")?[{x:0,y:0},{x:s,y:-n},{x:s,y:-i+n},{x:0,y:-i}]:a.has("left")&&a.has("up")&&a.has("down")?[{x:s,y:0},{x:0,y:-n},{x:0,y:-i+n},{x:s,y:-i}]:a.has("right")&&a.has("left")?[{x:n,y:0},{x:n,y:-l},{x:s-n,y:-l},{x:s-n,y:0},{x:s,y:-i/2},{x:s-n,y:-i},{x:s-n,y:-i+l},{x:n,y:-i+l},{x:n,y:-i},{x:0,y:-i/2}]:a.has("up")&&a.has("down")?[{x:s/2,y:0},{x:0,y:-l},{x:n,y:-l},{x:n,y:-i+l},{x:0,y:-i+l},{x:s/2,y:-i},{x:s,y:-i+l},{x:s-n,y:-i+l},{x:s-n,y:-l},{x:s,y:-l}]:a.has("right")&&a.has("up")?[{x:0,y:0},{x:s,y:-n},{x:0,y:-i}]:a.has("right")&&a.has("down")?[{x:0,y:0},{x:s,y:0},{x:0,y:-i}]:a.has("left")&&a.has("up")?[{x:s,y:0},{x:0,y:-n},{x:s,y:-i}]:a.has("left")&&a.has("down")?[{x:s,y:0},{x:0,y:0},{x:s,y:-i}]:a.has("right")?[{x:n,y:-l},{x:n,y:-l},{x:s-n,y:-l},{x:s-n,y:0},{x:s,y:-i/2},{x:s-n,y:-i},{x:s-n,y:-i+l},{x:n,y:-i+l},{x:n,y:-i+l}]:a.has("left")?[{x:n,y:0},{x:n,y:-l},{x:s-n,y:-l},{x:s-n,y:-i+l},{x:n,y:-i+l},{x:n,y:-i},{x:0,y:-i/2}]:a.has("up")?[{x:n,y:-l},{x:n,y:-i+l},{x:0,y:-i+l},{x:s/2,y:-i},{x:s,y:-i+l},{x:s-n,y:-i+l},{x:s-n,y:-l}]:a.has("down")?[{x:s/2,y:0},{x:0,y:-l},{x:n,y:-l},{x:n,y:-i+l},{x:s-n,y:-i+l},{x:s-n,y:-l},{x:s,y:-l}]:[{x:0,y:0}]},"getArrowPoints");function tT(t,e){return t.intersect(e)}function tI(t,e,r,a){var i=t.x,n=t.y,s=i-a.x,l=n-a.y,o=Math.sqrt(e*e*l*l+r*r*s*s),c=Math.abs(e*r*s/o);a.x<i&&(c=-c);var d=Math.abs(e*r*l/o);return a.y<n&&(d=-d),{x:i+c,y:n+d}}function tM(t,e,r){return tI(t,e,e,r)}function tN(t,e,r,a){var i,n,s,l,o,c,d,h,g,u,y,p,x;
1if(i=e.y-t.y,s=t.x-e.x,o=e.x*t.y-t.x*e.y,g=i*r.x+s*r.y+o,u=i*a.x+s*a.y+o,!(0!==g&&0!==u&&tC(g,u))&&(n=a.y-r.y,l=r.x-a.x,c=a.x*r.y-r.x*a.y,d=n*t.x+l*t.y+c,h=n*e.x+l*e.y+c,!(0!==d&&0!==h&&tC(d,h))&&0!=(y=i*l-n*s)))return p=Math.abs(y/2),{x:(x=s*c-l*o)<0?(x-p)/y:(x+p)/y,y:(x=n*o-i*c)<0?(x-p)/y:(x+p)/y}}function tC(t,e){return t*e>0}function tB(t,e,r){var a=t.x,i=t.y,n=[],s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){s=Math.min(s,t.x),l=Math.min(l,t.y)}):(s=Math.min(s,e.x),l=Math.min(l,e.y));for(var o=a-t.width/2-s,c=i-t.height/2-l,d=0;d<e.length;d++){var h=e[d],g=e[d<e.length-1?d+1:0],u=tN(t,r,{x:o+h.x,y:c+h.y},{x:o+g.x,y:c+g.y});u&&n.push(u)}return n.length?(n.length>1&&n.sort(function(t,e){var a=t.x-r.x,i=t.y-r.y,n=Math.sqrt(a*a+i*i),s=e.x-r.x,l=e.y-r.y,o=Math.sqrt(s*s+l*l);return n<o?-1:n===o?0:1}),n[0]):t}(0,g.eW)(tT,"intersectNode"),(0,g.eW)(tI,"intersectEllipse"),(0,g.eW)(tM,"intersectCircle"),(0,g.eW)(tN,"intersectLine"),(0,g.eW)(tC,"sameSign"),(0,g.eW)(tB,"intersectPolygon");var tR={node:tT,circle:tM,ellipse:tI,polygon:tB,rect:(0,g.eW)((t,e)=>{var r,a,i=t.x,n=t.y,s=e.x-i,l=e.y-n,o=t.width/2,c=t.height/2;return Math.abs(l)*o>Math.abs(s)*c?(l<0&&(c=-c),r=0===l?0:c*s/l,a=c):(s<0&&(o=-o),r=o,a=0===s?0:o*l/s),{x:i+r,y:n+a}},"intersectRect")},tO=(0,g.eW)(async(t,e,r,a)=>{let i,n;let s=(0,h.nV)(),l=e.useHtmlLabels||(0,h._X)(s),g=t.insert("g").attr("class",r||"node default").attr("id",e.domId||e.id),u=g.insert("g").attr("class","label").attr("style",e.labelStyle);i=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0];let y=(n="markdown"===e.labelType?(0,c.rw)(u,(0,h.oO)((0,d.SH)(i),s),{useHtmlLabels:l,width:e.width||s.flowchart.wrappingWidth,classes:"markdown-node-label"},s):await ty(u,(0,h.oO)((0,d.SH)(i),s),e.labelStyle,!1,a)).getBBox(),p=e.padding/2;if((0,h._X)(s)){let t=n.children[0],e=(0,x.Ys)(n);await (0,o.i)(t,i),y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}return l?u.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"):u.attr("transform","translate(0, "+-y.height/2+")"),e.centerLabel&&u.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),u.insert("rect",":first-child"),{shapeSvg:g,bbox:y,halfPadding:p,label:u}},"labelHelper"),tz=(0,g.eW)((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds");function tA(t,e,r,a){return t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}(0,g.eW)(tA,"insertPolygonShape");var tP=(0,g.eW)(async(t,e)=>{e.useHtmlLabels||(0,h._X)((0,h.nV)())||(e.centerLabel=!0);let{shapeSvg:r,bbox:a,halfPadding:i}=await tO(t,e,"node "+e.classes,!0);g.cM.info("Classes = ",e.classes);let n=r.insert("rect",":first-child");return n.attr("rx",e.rx).attr("ry",e.ry).attr("x",-a.width/2-i).attr("y",-a.height/2-i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),tz(e,n),e.intersect=function(t){return tR.rect(e,t)},r},"note"),tY=(0,g.eW)(t=>t?" "+t:"","formatClass"),tX=(0,g.eW)((t,e)=>"".concat(e||"node default").concat(tY(t.classes)," ").concat(tY(t.class)),"getClassesFromNode"),tF=(0,g.eW)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tO(t,e,tX(e,void 0),!0),i=a.width+e.padding+(a.height+e.padding),n=[{x:i/2,y:0},{x:i,y:-i/2},{x:i/2,y:-i},{x:0,y:-i/2}];g.cM.info("Question main (Circle)");let s=tA(r,i,i,n);return s.attr("style",e.style),tz(e,s),e.intersect=function(t){return g.cM.warn("Intersect called"),tR.polygon(e,n,t)},r},"question"),t$=(0,g.eW)((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);return r.insert("polygon",":first-child").attr("points",[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map(function(t){return t.x+","+t.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return tR.circle(e,14,t)},r},"choice"),tH=(0,g.eW)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tO(t,e,tX(e,void 0),!0),i=a.height+e.padding,n=i/4,s=a.width+2*n+e.padding,l=[{x:n,y:0},{x:s-n,y:0},{x:s,y:-i/2},{x:s-n,y:-i},{x:n,y:-i},{x:0,y:-i/2}],o=tA(r,s,i,l);return o.attr("style",e.style),tz(e,o),e.intersect=function(t){return tR.polygon(e,l,t)},r},"hexagon"),tU=(0,g.eW)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tO(t,e,void 0,!0),i=a.height+2*e.padding,n=i/2,s=a.width+2*n+e.padding,l=tD(e.directions,a,e),o=tA(r,s,i,l);return o.attr("style",e.style),tz(e,o),e.intersect=function(t){return tR.polygon(e,l,t)},r},"block_arrow"),tK=(0,g.eW)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tO(t,e,tX(e,void 0),!0),i=a.width+e.padding,n=a.height+e.padding,s=[{x:-n/2,y:0},{x:i,y:0},{x:i,y:-n},{x:-n/2,y:-n},{x:0,y:-n/2}];return tA(r,i,n,s).attr("style",e.style),e.width=i+n,e.height=n,e.intersect=function(t){return tR.polygon(e,s,t)},r},"rect_left_inv_arrow"),tV=(0,g.eW)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tO(t,e,tX(e),!0),i=a.width+e.padding,n=a.height+e.padding,s=[{x:-2*n/6,y:0},{x:i-n/6,y:0},{x:i+2*n/6,y:-n},{x:n/6,y:-n}],l=tA(r,i,n,s);return l.attr("style",e.style),tz(e,l),e.intersect=function(t){return tR.polygon(e,s,t)},r},"lean_right"),tj=(0,g.eW)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tO(t,e,tX(e,void 0),!0),i=a.width+e.padding,n=a.height+e.padding,s=[{x:2*n/6,y:0},{x:i+n/6,y:0},{x:i-2*n/6,y:-n},{x:-n/6,y:-n}],l=tA(r,i,n,s);return l.attr("style",e.style),tz(e,l),e.intersect=function(t){return tR.polygon(e,s,t)},r},"lean_left"),tZ=(0,g.eW)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tO(t,e,tX(e,void 0),!0),i=a.width+e.padding,n=a.height+e.padding,s=[{x:-2*n/6,y:0},{x:i+2*n/6,y:0},{x:i-n/6,y:-n},{x:n/6,y:-n}],l=tA(r,i,n,s);return l.attr("style",e.style),tz(e,l),e.intersect=function(t){return tR.polygon(e,s,t)},r},"trapezoid"),tq=(0,g.eW)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tO(t,e,tX(e,void 0),!0),i=a.width+e.padding,n=a.height+e.padding,s=[{x:n/6,y:0},{x:i-n/6,y:0},{x:i+2*n/6,y:-n},{x:-2*n/6,y:-n}],l=tA(r,i,n,s);return l.attr("style",e.style),tz(e,l),e.intersect=function(t){return tR.polygon(e,s,t)},r},"inv_trapezoid"),tG=(0,g.eW)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tO(t,e,tX(e,void 0),!0),i=a.width+e.padding,n=a.height+e.padding,s=[{x:0,y:0},{x:i+n/2,y:0},{x:i,y:-n/2},{x:i+n/2,y:-n},{x:0,y:-n}],l=tA(r,i,n,s);return l.attr("style",e.style),tz(e,l),e.intersect=function(t){return tR.polygon(e,s,t)},r},"rect_right_inv_arrow"),tJ=(0,g.eW)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tO(t,e,tX(e,void 0),!0),i=a.width+e.padding,n=i/2,s=n/(2.5+i/50),l=a.height+s+e.padding,o=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d","M 0,"+s+" a "+n+","+s+" 0,0,0 "+i+" 0 a "+n+","+s+" 0,0,0 "+-i+" 0 l 0,"+l+" a "+n+","+s+" 0,0,0 "+i+" 0 l 0,"+-l).attr("transform","translate("+-i/2+","+-(l/2+s)+")");return tz(e,o),e.intersect=function(t){let r=tR.rect(e,t),a=r.x-e.x;if(0!=n&&(Math.abs(a)<e.width/2||Math.abs(a)==e.width/2&&Math.abs(r.y-e.y)>e.height/2-s)){let i=s*s*(1-a*a/(n*n));0!=i&&(i=Math.sqrt(i)),i=s-i,t.y-e.y>
10&&(i=-i),r.y+=i}return r},r},"cylinder"),tQ=(0,g.eW)(async(t,e)=>{let{shapeSvg:r,bbox:a,halfPadding:i}=await tO(t,e,"node "+e.classes+" "+e.class,!0),n=r.insert("rect",":first-child"),s=e.positioned?e.width:a.width+e.padding,l=e.positioned?e.height:a.height+e.padding,o=e.positioned?-s/2:-a.width/2-i,c=e.positioned?-l/2:-a.height/2-i;if(n.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",c).attr("width",s).attr("height",l),e.props){let t=new Set(Object.keys(e.props));e.props.borders&&(t2(n,e.props.borders,s,l),t.delete("borders")),t.forEach(t=>{g.cM.warn("Unknown node property ".concat(t))})}return tz(e,n),e.intersect=function(t){return tR.rect(e,t)},r},"rect"),t0=(0,g.eW)(async(t,e)=>{let{shapeSvg:r,bbox:a,halfPadding:i}=await tO(t,e,"node "+e.classes,!0),n=r.insert("rect",":first-child"),s=e.positioned?e.width:a.width+e.padding,l=e.positioned?e.height:a.height+e.padding,o=e.positioned?-s/2:-a.width/2-i,c=e.positioned?-l/2:-a.height/2-i;if(n.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",c).attr("width",s).attr("height",l),e.props){let t=new Set(Object.keys(e.props));e.props.borders&&(t2(n,e.props.borders,s,l),t.delete("borders")),t.forEach(t=>{g.cM.warn("Unknown node property ".concat(t))})}return tz(e,n),e.intersect=function(t){return tR.rect(e,t)},r},"composite"),t1=(0,g.eW)(async(t,e)=>{let{shapeSvg:r}=await tO(t,e,"label",!0);g.cM.trace("Classes = ",e.class);let a=r.insert("rect",":first-child");if(a.attr("width",0).attr("height",0),r.attr("class","label edgeLabel"),e.props){let t=new Set(Object.keys(e.props));e.props.borders&&(t2(a,e.props.borders,0,0),t.delete("borders")),t.forEach(t=>{g.cM.warn("Unknown node property ".concat(t))})}return tz(e,a),e.intersect=function(t){return tR.rect(e,t)},r},"labelRect");function t2(t,e,r,a){let i=[],n=(0,g.eW)(t=>{i.push(t,0)},"addBorder"),s=(0,g.eW)(t=>{i.push(0,t)},"skipBorder");e.includes("t")?(g.cM.debug("add top border"),n(r)):s(r),e.includes("r")?(g.cM.debug("add right border"),n(a)):s(a),e.includes("b")?(g.cM.debug("add bottom border"),n(r)):s(r),e.includes("l")?(g.cM.debug("add left border"),n(a)):s(a),t.attr("stroke-dasharray",i.join(" "))}(0,g.eW)(t2,"applyNodePropertyBorders");var t3=(0,g.eW)(async(t,e)=>{let r;r=e.classes?"node "+e.classes:"node default";let a=t.insert("g").attr("class",r).attr("id",e.domId||e.id),i=a.insert("rect",":first-child"),n=a.insert("line"),s=a.insert("g").attr("class","label"),l=e.labelText.flat?e.labelText.flat():e.labelText,o="";o="object"==typeof l?l[0]:l,g.cM.info("Label text abc79",o,l,"object"==typeof l);let c=await ty(s,o,e.labelStyle,!0,!0),d={width:0,height:0};if((0,h._X)((0,h.nV)())){let t=c.children[0],e=(0,x.Ys)(c);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}g.cM.info("Text 2",l);let u=l.slice(1,l.length),y=c.getBBox(),p=await ty(s,u.join?u.join("<br/>"):u,e.labelStyle,!0,!0);if((0,h._X)((0,h.nV)())){let t=p.children[0],e=(0,x.Ys)(p);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}let b=e.padding/2;return(0,x.Ys)(p).attr("transform","translate( "+(d.width>y.width?0:(y.width-d.width)/2)+", "+(y.height+b+5)+")"),(0,x.Ys)(c).attr("transform","translate( "+(d.width<y.width?0:-(y.width-d.width)/2)+", 0)"),d=s.node().getBBox(),s.attr("transform","translate("+-d.width/2+", "+(-d.height/2-b+3)+")"),i.attr("class","outer title-state").attr("x",-d.width/2-b).attr("y",-d.height/2-b).attr("width",d.width+e.padding).attr("height",d.height+e.padding),n.attr("class","divider").attr("x1",-d.width/2-b).attr("x2",d.width/2+b).attr("y1",-d.height/2-b+y.height+b).attr("y2",-d.height/2-b+y.height+b),tz(e,i),e.intersect=function(t){return tR.rect(e,t)},a},"rectWithTitle"),t4=(0,g.eW)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tO(t,e,tX(e,void 0),!0),i=a.height+e.padding,n=a.width+i/4+e.padding,s=r.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-n/2).attr("y",-i/2).attr("width",n).attr("height",i);return tz(e,s),e.intersect=function(t){return tR.rect(e,t)},r},"stadium"),t8=(0,g.eW)(async(t,e)=>{let{shapeSvg:r,bbox:a,halfPadding:i}=await tO(t,e,tX(e,void 0),!0),n=r.insert("circle",":first-child");return n.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),g.cM.info("Circle main"),tz(e,n),e.intersect=function(t){return g.cM.info("Circle intersect",e,a.width/2+i,t),tR.circle(e,a.width/2+i,t)},r},"circle"),t5=(0,g.eW)(async(t,e)=>{let{shapeSvg:r,bbox:a,halfPadding:i}=await tO(t,e,tX(e,void 0),!0),n=r.insert("g",":first-child"),s=n.insert("circle"),l=n.insert("circle");return n.attr("class",e.class),s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i+5).attr("width",a.width+e.padding+10).attr("height",a.height+e.padding+10),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),g.cM.info("DoubleCircle main"),tz(e,s),e.intersect=function(t){return g.cM.info("DoubleCircle intersect",e,a.width/2+i+5,t),tR.circle(e,a.width/2+i+5,t)},r},"doublecircle"),t9=(0,g.eW)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tO(t,e,tX(e,void 0),!0),i=a.width+e.padding,n=a.height+e.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-n},{x:0,y:-n},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-n},{x:-8,y:-n},{x:-8,y:0}],l=tA(r,i,n,s);return l.attr("style",e.style),tz(e,l),e.intersect=function(t){return tR.polygon(e,s,t)},r}
1,"subroutine"),t7=(0,g.eW)((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),tz(e,a),e.intersect=function(t){return tR.circle(e,7,t)},r},"start"),t6=(0,g.eW)((t,e,r)=>{let a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,n=10;return"LR"===r&&(i=10,n=70),tz(e,a.append("rect").attr("x",-1*i/2).attr("y",-1*n/2).attr("width",i).attr("height",n).attr("class","fork-join")),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return tR.rect(e,t)},a},"forkJoin"),et={rhombus:tF,composite:t0,question:tF,rect:tQ,labelRect:t1,rectWithTitle:t3,choice:t$,circle:t8,doublecircle:t5,stadium:t4,hexagon:tH,block_arrow:tU,rect_left_inv_arrow:tK,lean_right:tV,lean_left:tj,trapezoid:tZ,inv_trapezoid:tq,rect_right_inv_arrow:tG,cylinder:tJ,start:t7,end:(0,g.eW)((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),a.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),tz(e,i
1),e.intersect=function(t){return tR.circle(e,7,t)},r},"end"),note:tP,subroutine:t9,fork:t6,join:t6,class_box:(0,g.eW)(async(t,e)=>{var r;let a;let i=e.padding/2;a=e.classes?"node "+e.classes:"node default";let n=t.insert("g").attr("class",a).attr("id",e.domId||e.id),s=n.insert("rect",":first-child"),l=n.insert("line"),o=n.insert("line"),c=0,d=4,g=n.insert("g").attr("class","label"),u=0,y=null===(r=e.classData.annotations)||void 0===r?void 0:r[0],p=e.classData.annotations[0]?"\xab"+e.classData.annotations[0]+"\xbb":"",b=await ty(g,p,e.labelStyle,!0,!0),f=b.getBBox();if((0,h._X)((0,h.nV)())){let t=b.children[0],e=(0,x.Ys)(b);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}e.classData.annotations[0]&&(d+=f.height+4,c+=f.width);let w=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&((0,h._X)((0,h.nV)())?w+="<"+e.classData.type+">":w+="<"+e.classData.type+">");let m=await ty(g,w,e.labelStyle,!0,!0);(0,x.Ys)(m).attr("class","classTitle");let k=m.getBBox();if((0,h._X)((0,h.nV)())){let t=m.children[0],e=(0,x.Ys)(m);k=t.getBoundingClientRect(),e.attr("width",k.width),e.attr("height",k.height)}d+=k.height+4,k.width>c&&(c=k.width);let L=[];e.classData.members.forEach(async t=>{let r=t.getDisplayDetails(),a=r.displayText;(0,h._X)((0,h.nV)())&&(a=a.replace(/</g,"<").replace(/>/g,">"));let i=await ty(g,a,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0),n=i.getBBox();if((0,h._X)((0,h.nV)())){let t=i.children[0],e=(0,x.Ys)(i);n=t.getBoundingClientRect(),e.attr("width",n.width),e.attr("height",n.height)}n.width>c&&(c=n.width),d+=n.height+4,L.push(i)}),d+=8;let S=[];if(e.classData.methods.forEach(async t=>{let r=t.getDisplayDetails(),a=r.displayText;(0,h._X)((0,h.nV)())&&(a=a.replace(/</g,"<").replace(/>/g,">"));let i=await ty(g,a,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0),n=i.getBBox();if((0,h._X)((0,h.nV)())){let t=i.children[0],e=(0,x.Ys)(i);n=t.getBoundingClientRect(),e.attr("width",n.width),e.attr("height",n.height)}n.width>c&&(c=n.width),d+=n.height+4,S.push(i)}),d+=8,y){let t=(c-f.width)/2;(0,x.Ys)(b).attr("transform","translate( "+(-1*c/2+t)+", "+-1*d/2+")"),u=f.height+4}let v=(c-k.width)/2;return(0,x.Ys)(m).attr("transform","translate( "+(-1*c/2+v)+", "+(-1*d/2+u)+")"),u+=k.height+4,l.attr("class","divider").attr("x1",-c/2-i).attr("x2",c/2+i).attr("y1",-d/2-i+8+u).attr("y2",-d/2-i+8+u),u+=8,L.forEach(t=>{var e;(0,x.Ys)(t).attr("transform","translate( "+-c/2+", "+(-1*d/2+u+4)+")");let r=null==t?void 0:t.getBBox();u+=(null!==(e=null==r?void 0:r.height)&&void 0!==e?e:0)+4}),u+=8,o.attr("class","divider").attr("x1",-c/2-i).attr("x2",c/2+i).attr("y1",-d/2-i+8+u).attr("y2",-d/2-i+8+u),u+=8,S.forEach(t=>{var e;(0,x.Ys)(t).attr("transform","translate( "+-c/2+", "+(-1*d/2+u)+")");let r=null==t?void 0:t.getBBox();u+=(null!==(e=null==r?void 0:r.height)&&void 0!==e?e:0)+4}),s.attr("style",e.style).attr("class","outer title-state").attr("x",-c/2-i).attr("y",-(d/2)-i).attr("width",c+e.padding).attr("height",d+e.padding),tz(e,s),e.intersect=function(t){return tR.rect(e,t)},n},"class_box")},ee={},er=(0,g.eW)(async(t,e,r)=>{let a,i;if(e.link){let n;"sandbox"===(0,h.nV)().securityLevel?n="_top":e.linkTarget&&(n=e.linkTarget||"_blank"),a=t.insert("svg:a").attr("xlink:href",e.link).attr("target",n),i=await et[e.shape](a,e,r)}else a=i=await et[e.shape](t,e,r);return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),ee[e.id]=a,e.haveCallback&&ee[e.id].attr("class",ee[e.id].attr("class")+" clickable"),a},"insertNode"),ea=(0,g.eW)(t=>{let e=ee[t.id];g.cM.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode");function ei(t,e){var r,a,i,n,s,l,o;let c,g=arguments.length>2&&void 0!==arguments[2]&&arguments[2],u="default";((null==t?void 0:null===(r=t.classes)||void 0===r?void 0:r.length)||0)>0&&(u=(null!==(n=null==t?void 0:t.classes)&&void 0!==n?n:[]).join(" ")),u+=" flowchart-label";let y=0,p="";switch(t.type){case"round":y=5,p="rect";break;case"composite":y=0,p="composite",c=0;break;case"square":case"group":default:p="rect";break;case"diamond":p="question";break;case"hexagon":p="hexagon";break;case"block_arrow":p="block_arrow";break;case"odd":case"rect_left_inv_arrow":p="rect_left_inv_arrow";break;case"lean_right":p="lean_right";break;case"lean_left":p="lean_left";break;case"trapezoid":p="trapezoid";break;case"inv_trapezoid":p="inv_trapezoid";break;case"circle":p="circle";break;case"ellipse":p="ellipse";break;case"stadium":p="stadium";break;
1case"subroutine":p="subroutine";break;case"cylinder":p="cylinder";break;case"doublecircle":p="doublecircle"}let x=(0,d.be)(null!==(s=null==t?void 0:t.styles)&&void 0!==s?s:[]),b=t.label,f=null!==(l=t.size)&&void 0!==l?l:{width:0,height:0,x:0,y:0},w=e.getDiagramId();return{labelStyle:x.labelStyle,shape:p,labelText:b,rx:y,ry:y,class:u,style:x.style,id:t.id,domId:w?"".concat(w,"-").concat(t.id):t.id,directions:t.directions,width:f.width,height:f.height,x:f.x,y:f.y,positioned:g,intersect:void 0,type:t.type,padding:null!==(o=null!=c?c:null===(i=(0,h.iE)())||void 0===i?void 0:null===(a=i.block)||void 0===a?void 0:a.padding)&&void 0!==o?o:0}}async function en(t,e,r){let a=ei(e,r,!1);if("group"===a.type)return;let i=(0,h.iE)(),n=await er(t,a,{config:i}),s=n.node().getBBox(),l=r.getBlock(a.id);l.size={width:s.width,height:s.height,x:0,y:0,node:n},r.setBlock(l),n.remove()}async function es(t,e,r){let a=ei(e,r,!0);if("space"!==r.getBlock(a.id).type){let r=(0,h.iE)();await er(t,a,{config:r}),e.intersect=null==a?void 0:a.intersect,ea(a)}}async function el(t,e,r,a){for(let i of e)await a(t,i,r),i.children&&await el(t,i.children,r,a)}async function eo(t,e,r){await el(t,e,r,en)}async function ec(t,e,r){await el(t,e,r,es)}async function ed(t,e,r,a,i){let n=new b.k({multigraph:!0,compound:!0});for(let t of(n.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8}),r))t.size&&n.setNode(t.id,{width:t.size.width,height:t.size.height,intersect:t.intersect});for(let r of e)if(r.start&&r.end){let e=a.getBlock(r.start),s=a.getBlock(r.end);if((null==e?void 0:e.size)&&(null==s?void 0:s.size)){let a=e.size,l=s.size,o=[{x:a.x,y:a.y},{x:a.x+(l.x-a.x)/2,y:a.y+(l.y-a.y)/2},{x:l.x,y:l.y}],c=i?"".concat(i,"-").concat(r.id):r.id;tE(t,{v:r.start,w:r.end,name:c},{...r,id:c,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:o,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",n,i),r.label&&(await tm(t,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:o,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),tL({...r,x:o[1].x,y:o[1].y},{originalPath:o}))}}}(0,g.eW)(ei,"getNodeFromBlock"),(0,g.eW)(en,"calculateBlockSize"),(0,g.eW)(es,"insertBlockPositioned"),(0,g.eW)(el,"performOperations"),(0,g.eW)(eo,"calculateBlockSizes"),(0,g.eW)(ec,"insertBlocks"),(0,g.eW)(ed,"insertEdges");var eh=(0,g.eW)(function(t,e){return e.db.getClasses()},"getClasses"),eg={parser:f,db:G,renderer:{draw:(0,g.eW)(async function(t,e,r,a){let i;let{securityLevel:n,block:s}=(0,h.iE)(),l=a.db;l.setDiagramId(e),"sandbox"===n&&(i=(0,x.Ys)("#i"+e));let o="sandbox"===n?(0,x.Ys)(i.nodes()[0].contentDocument.body):(0,x.Ys)("body"),c="sandbox"===n?o.select('[id="'.concat(e,'"]')):(0,x.Ys)('[id="'.concat(e,'"]'));tt(c,["point","circle","cross"],a.type,e);let d=l.getBlocks(),u=l.getBlocksFlat(),y=l.getEdges(),p=c.insert("g").attr("class","block");await eo(p,d,l);let b=tu(l);if(await ec(p,d,l),await ed(p,y,u,l,e),b){let t=Math.max(1,Math.round(b.width/b.height*.125)),e=b.height+t+10,r=b.width+10,{useMaxWidth:a}=s;(0,h.v2)(c,e,r,!!a),g.cM.debug("Here Bounds",b,b),c.attr("viewBox","".concat(b.x-5," ").concat(b.y-5," ").concat(b.width+10," ").concat(b.height+10))}},"draw"),getClasses:eh},styles:Q}}}]);
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.