Buckets:

HuggingFaceDocBuilder's picture
download
raw
73.7 kB
import{g as de}from"./_OSjph_d.js";import{aK as fe,aL as Kt,aM as pe,aN as xe,aO as ye,aP as be,aQ as we,aR as me,aS as Se,aT as Le,aU as ke,aV as ve,aW as Ee,aX as _e,aY as Te,aZ as De,a_ as Be,a$ as Ne,b0 as Ie,b1 as Ce,b2 as Oe,b3 as Re,b4 as Ae,b5 as ze,b6 as Me,_ as g,B as rt,e as D,f as Pe,l as k,t as Fe,v as We,d as R,b7 as Ye,W as He,X as Ke,S as Ue,b8 as M,b9 as kt,ba as Q,az as Xe,A as $,o as Ve,bb as je,m as Ct,bc as Ot,bd as Ze}from"./D6n3-7pR.js";import{G as Ge}from"./DOmOIIwC.js";import{c as qe}from"./yzCCi7rO.js";function Je(e){return Array.isArray(e)}function Qe(e){if(fe(e))return e;const t=Kt(e);if(!$e(e))return{};if(Je(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(pe(e)){const s=e,i=s.constructor;return new i(s.buffer,s.byteOffset,s.length)}if(t==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(t==="[object DataView]"){const s=e,i=s.buffer,c=s.byteOffset,r=s.byteLength,n=new ArrayBuffer(r),l=new Uint8Array(i,c,r);return new Uint8Array(n).set(l),new DataView(n)}if(t==="[object Boolean]"||t==="[object Number]"||t==="[object String]"){const s=e.constructor,i=new s(e.valueOf());return t==="[object String]"?er(i,e):xt(i,e),i}if(t==="[object Date]")return new Date(Number(e));if(t==="[object RegExp]"){const s=e,i=new RegExp(s.source,s.flags);return i.lastIndex=s.lastIndex,i}if(t==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(t==="[object Map]"){const s=e,i=new Map;return s.forEach((c,r)=>{i.set(r,c)}),i}if(t==="[object Set]"){const s=e,i=new Set;return s.forEach(c=>{i.add(c)}),i}if(t==="[object Arguments]"){const s=e,i={};return xt(i,s),i.length=s.length,i[Symbol.iterator]=s[Symbol.iterator],i}const a={};return rr(a,e),xt(a,e),tr(a,e),a}function $e(e){switch(Kt(e)){case Me:case ze:case Ae:case Re:case Oe:case Ce:case Ie:case Ne:case Be:case De:case Te:case _e:case Ee:case ve:case ke:case Le:case Se:case me:case we:case be:case ye:case xe:return!0;default:return!1}}function xt(e,t){for(const a in t)Object.hasOwn(t,a)&&(e[a]=t[a])}function tr(e,t){const a=Object.getOwnPropertySymbols(t);for(let s=0;s<a.length;s++){const i=a[s];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}function er(e,t){const a=t.valueOf().length;for(const s in t)Object.hasOwn(t,s)&&(Number.isNaN(Number(s))||Number(s)>=a)&&(e[s]=t[s])}function rr(e,t){const a=Object.getPrototypeOf(t);a!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,a)}var bt=(function(){var e=g(function(T,m,f,x){for(f=f||{},x=T.length;x--;f[T[x]]=m);return f},"o"),t=[1,15],a=[1,7],s=[1,13],i=[1,14],c=[1,19],r=[1,16],n=[1,17],l=[1,18],u=[8,30],h=[8,10,21,28,29,30,31,39,43,46],d=[1,23],b=[1,24],w=[8,10,15,16,21,28,29,30,31,39,43,46],y=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],S={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(m,f,x,L,E,o,F){var p=o.length-1;switch(E){case 4:L.getLogger().debug("Rule: separator (NL) ");break;case 5:L.getLogger().debug("Rule: separator (Space) ");break;case 6:L.getLogger().debug("Rule: separator (EOF) ");break;case 7:L.getLogger().debug("Rule: hierarchy: ",o[p-1]),L.setHierarchy(o[p-1]);break;case 8:L.getLogger().debug("Stop NL ");break;case 9:L.getLogger().debug("Stop EOF ");break;case 10:L.getLogger().debug("Stop NL2 ");break;case 11:L.getLogger().debug("Stop EOF2 ");break;case 12:L.getLogger().debug("Rule: statement: ",o[p]),typeof o[p].length=="number"?this.$=o[p]:this.$=[o[p]];break;case 13:L.getLogger().debug("Rule: statement #2: ",o[p-1]),this.$=[o[p-1]].concat(o[p]);break;case 14:L.getLogger().debug("Rule: link: ",o[p],m),this.$={edgeTypeStr:o[p],label:""};break;case 15:L.getLogger().debug("Rule: LABEL link: ",o[p-3],o[p-1],o[p]),this.$={edgeTypeStr:o[p],label:o[p-1]};break;case 18:const C=parseInt(o[p]),G=L.generateId();this.$={id:G,type:"space",label:"",width:C,children:[]};break;case 23:L.getLogger().debug("Rule: (nodeStatement link node) ",o[p-2],o[p-1],o[p]," typestr: ",o[p-1].edgeTypeStr);const V=L.edgeStrToEdgeData(o[p-1].edgeTypeStr),at=L.edgeStrToEdgeStartData(o[p-1].edgeTypeStr),gt=L.edgeStrToThickness(o[p-1].edgeTypeStr),O=L.edgeStrToPattern(o[p-1].edgeTypeStr);this.$=[{id:o[p-2].id,label:o[p-2].label,type:o[p-2].type,directions:o[p-2].directions},{id:o[p-2].id+"-"+o[p].id,start:o[p-2].id,end:o[p].id,label:o[p-1].label,type:"edge",thickness:gt,pattern:O,directions:o[p].directions,arrowTypeEnd:V,arrowTypeStart:at},{id:o[p].id,label:o[p].label,type:L.typeStr2Type(o[p].typeStr),directions:o[p].directions}];break;case 24:L.getLogger().debug("Rule: nodeStatement (abc88 node size) ",o[p-1],o[p]),this.$={id:o[p-1].id,label:o[p-1].label,type:L.typeStr2Type(o[p-1].typeStr),directions:o[p-1].directions,widthInColumns:parseInt(o[p],10)};break;case 25:L.getLogger().debug("Rule: nodeStatement (node) ",o[p]),this.$={id:o[p].id,label:o[p].label,type:L.typeStr2Type(o[p].typeStr),directions:o[p].directions,widthInColumns:1};break;case 26:L.getLogger().debug("APA123",this?this:"na"),L.getLogger().debug("COLUMNS: ",o[p]),this.$={type:"column-setting",columns:o[p]==="auto"?-1:parseInt(o[p])};break;case 27:L.getLogger().debug("Rule: id-block statement : ",o[p-2],o[p-1]),L.generateId(),this.$={...o[p-2],type:"composite",children:o[p-1]};break;case 28:L.getLogger().debug("Rule: blockStatement : ",o[p-2],o[p-1],o[p]);const j=L.generateId();this.$={id:j,type:"composite",label:"",children:o[p-1]};break;case 29:L.getLogger().debug("Rule: node (NODE_ID separator): ",o[p]),this.$={id:o[p]};break;case 30:L.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",o[p-1],o[p]),this.$={id:o[p-1],label:o[p].label,typeStr:o[p].typeStr,directions:o[p].directions};break;case 31:L.getLogger().debug("Rule: dirList: ",o[p]),this.$=[o[p]];break;case 32:L.getLogger().debug("Rule: dirList: ",o[p-1],o[p]),this.$=[o[p-1]].concat(o[p]);break;case 33:L.getLogger().debug("Rule: nodeShapeNLabel: ",o[p-2],o[p-1],o[p]),this.$={typeStr:o[p-2]+o[p],label:o[p-1]};break;case 34:L.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",o[p-3],o[p-2]," #3:",o[p-1],o[p]),this.$={typeStr:o[p-3]+o[p],label:o[p-2],directions:o[p-1]};break;case 35:case 36:this.$={type:"classDef",id:o[p-1].trim(),css:o[p].trim()};break;case 37:this.$={type:"applyClass",id:o[p-1].trim(),styleClass:o[p].trim()};break;case 38:this.$={type:"applyStyles",id:o[p-1].trim(),stylesStr:o[p].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:s,29:i,31:c,39:r,43:n,46:l}),e(h,[2,16],{14:22,15:d,16:b}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(w,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,31:c},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(y,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:c},{31:[2,14]},{17:[1,36]},e(w,[2,24]),{10:t,11:37,13:4,14:22,15:d,16:b,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(y,[2,30]),{18:[1,43]},{18:[1,44]},e(w,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(h,[2,27]),e(y,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(y,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:g(function(m,f){if(f.recoverable)this.trace(m);else{var x=new Error(m);throw x.hash=f,x}},"parseError"),parse:g(function(m){var f=this,x=[0],L=[],E=[null],o=[],F=this.table,p="",C=0,G=0,V=2,at=1,gt=o.slice.call(arguments,1),O=Object.create(this.lexer),j={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(j.yy[ut]=this.yy[ut]);O.setInput(m,j.yy),j.yy.lexer=O,j.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var dt=O.yylloc;o.push(dt);var ge=O.options&&O.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ue(W){x.length=x.length-2*W,E.length=E.length-W,o.length=o.length-W}g(ue,"popStack");function Nt(){var W;return W=L.pop()||O.lex()||at,typeof W!="number"&&(W instanceof Array&&(L=W,W=L.pop()),W=f.symbols_[W]||W),W}g(Nt,"lex");for(var P,q,H,ft,J={},st,Z,It,it;;){if(q=x[x.length-1],this.defaultActions[q]?H=this.defaultActions[q]:((P===null||typeof P>"u")&&(P=Nt()),H=F[q]&&F[q][P]),typeof H>"u"||!H.length||!H[0]){var pt="";it=[];for(st in F[q])this.terminals_[st]&&st>V&&it.push("'"+this.terminals_[st]+"'");O.showPosition?pt="Parse error on line "+(C+1)+`:
`+O.showPosition()+`
Expecting `+it.join(", ")+", got '"+(this.terminals_[P]||P)+"'":pt="Parse error on line "+(C+1)+": Unexpected "+(P==at?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(pt,{text:O.match,token:this.terminals_[P]||P,line:O.yylineno,loc:dt,expected:it})}if(H[0]instanceof Array&&H.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+P);switch(H[0]){case 1:x.push(P),E.push(O.yytext),o.push(O.yylloc),x.push(H[1]),P=null,G=O.yyleng,p=O.yytext,C=O.yylineno,dt=O.yylloc;break;case 2:if(Z=this.productions_[H[1]][1],J.$=E[E.length-Z],J._$={first_line:o[o.length-(Z||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(Z||1)].first_column,last_column:o[o.length-1].last_column},ge&&(J._$.range=[o[o.length-(Z||1)].range[0],o[o.length-1].range[1]]),ft=this.performAction.apply(J,[p,G,C,j.yy,H[1],E,o].concat(gt)),typeof ft<"u")return ft;Z&&(x=x.slice(0,-1*Z*2),E=E.slice(0,-1*Z),o=o.slice(0,-1*Z)),x.push(this.productions_[H[1]][0]),E.push(J.$),o.push(J._$),It=F[x[x.length-2]][x[x.length-1]],x.push(It);break;case 3:return!0}}return!0},"parse")},N=(function(){var T={EOF:1,parseError:g(function(f,x){if(this.yy.parser)this.yy.parser.parseError(f,x);else throw new Error(f)},"parseError"),setInput:g(function(m,f){return this.yy=f||this.yy||{},this._input=m,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:g(function(){var m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var f=m.match(/(?:\r\n?|\n).*/g);return f?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),m},"input"),unput:g(function(m){var f=m.length,x=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var L=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),x.length-1&&(this.yylineno-=x.length-1);var E=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:x?(x.length===L.length?this.yylloc.first_column:0)+L[L.length-x.length].length-x[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-f]),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).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(m){this.unput(this.match.slice(m))},"less"),pastInput:g(function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var m=this.pastInput(),f=new Array(m.length+1).join("-");return m+this.upcomingInput()+`
`+f+"^"},"showPosition"),test_match:g(function(m,f){var x,L,E;if(this.options.backtrack_lexer&&(E={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&&(E.yylloc.range=this.yylloc.range.slice(0))),L=m[0].match(/(?:\r\n?|\n).*/g),L&&(this.yylineno+=L.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:L?L[L.length-1].length-L[L.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+m[0].length},this.yytext+=m[0],this.match+=m[0],this.matches=m,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(m[0].length),this.matched+=m[0],x=this.performAction.call(this,this.yy,this,f,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),x)return x;if(this._backtrack){for(var o in E)this[o]=E[o];return!1}return!1},"test_match"),next:g(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var m,f,x,L;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),o=0;o<E.length;o++)if(x=this._input.match(this.rules[E[o]]),x&&(!f||x[0].length>f[0].length)){if(f=x,L=o,this.options.backtrack_lexer){if(m=this.test_match(x,E[o]),m!==!1)return m;if(this._backtrack){f=!1;continue}else return!1}else if(!this.options.flex)break}return f?(m=this.test_match(f,E[L]),m!==!1?m:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:g(function(){var f=this.next();return f||this.lex()},"lex"),begin:g(function(f){this.conditionStack.push(f)},"begin"),popState:g(function(){var f=this.conditionStack.length-1;return f>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(f){return f=this.conditionStack.length-1-Math.abs(f||0),f>=0?this.conditionStack[f]:"INITIAL"},"topState"),pushState:g(function(f){this.begin(f)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:g(function(f,x,L,E){switch(L){case 0:return f.getLogger().debug("Found block-beta"),10;case 1:return f.getLogger().debug("Found id-block"),29;case 2:return f.getLogger().debug("Found block"),10;case 3:f.getLogger().debug(".",x.yytext);break;case 4:f.getLogger().debug("_",x.yytext);break;case 5:return 5;case 6:return x.yytext=-1,28;case 7:return x.yytext=x.yytext.replace(/columns\s+/,""),f.getLogger().debug("COLUMNS (LEX)",x.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:f.getLogger().debug("LEX: POPPING STR:",x.yytext),this.popState();break;case 13:return f.getLogger().debug("LEX: STR end:",x.yytext),"STR";case 14:return x.yytext=x.yytext.replace(/space\:/,""),f.getLogger().debug("SPACE NUM (LEX)",x.yytext),21;case 15:return x.yytext="1",f.getLogger().debug("COLUMNS (LEX)",x.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(),f.getLogger().debug("Lex: (("),"NODE_DEND";case 38:return this.popState(),f.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),f.getLogger().debug("Lex: ))"),"NODE_DEND";case 40:return this.popState(),f.getLogger().debug("Lex: (("),"NODE_DEND";case 41:return this.popState(),f.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),f.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),f.getLogger().debug("Lex: -)"),"NODE_DEND";case 44:return this.popState(),f.getLogger().debug("Lex: (("),"NODE_DEND";case 45:return this.popState(),f.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),f.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),f.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:return this.popState(),f.getLogger().debug("Lex: /]"),"NODE_DEND";case 49:return this.popState(),f.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),f.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),f.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),f.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),f.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return f.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return f.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return f.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:return f.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return f.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 59:return f.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 60:return f.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 61:return f.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 62:return f.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return f.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 64:return f.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 f.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),f.getLogger().debug("LEX ARR START"),37;case 74:return f.getLogger().debug("Lex: NODE_ID",x.yytext),31;case 75:return f.getLogger().debug("Lex: EOF",x.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:f.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:f.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return f.getLogger().debug("LEX: NODE_DESCR:",x.yytext),"NODE_DESCR";case 83:f.getLogger().debug("LEX POPPING"),this.popState();break;case 84:f.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return x.yytext=x.yytext.replace(/^,\s*/,""),f.getLogger().debug("Lex (right): dir:",x.yytext),"DIR";case 86:return x.yytext=x.yytext.replace(/^,\s*/,""),f.getLogger().debug("Lex (left):",x.yytext),"DIR";case 87:return x.yytext=x.yytext.replace(/^,\s*/,""),f.getLogger().debug("Lex (x):",x.yytext),"DIR";case 88:return x.yytext=x.yytext.replace(/^,\s*/,""),f.getLogger().debug("Lex (y):",x.yytext),"DIR";case 89:return x.yytext=x.yytext.replace(/^,\s*/,""),f.getLogger().debug("Lex (up):",x.yytext),"DIR";case 90:return x.yytext=x.yytext.replace(/^,\s*/,""),f.getLogger().debug("Lex (down):",x.yytext),"DIR";case 91:return x.yytext="]>",f.getLogger().debug("Lex (ARROW_DIR end):",x.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return f.getLogger().debug("Lex: LINK","#"+x.yytext+"#"),15;case 93:return f.getLogger().debug("Lex: LINK",x.yytext),15;case 94:return f.getLogger().debug("Lex: LINK",x.yytext),15;case 95:return f.getLogger().debug("Lex: LINK",x.yytext),15;case 96:return f.getLogger().debug("Lex: START_LINK",x.yytext),this.pushState("LLABEL"),16;case 97:return f.getLogger().debug("Lex: START_LINK",x.yytext),this.pushState("LLABEL"),16;case 98:return f.getLogger().debug("Lex: START_LINK",x.yytext),this.pushState("LLABEL"),16;case 99:this.pushState("md_string");break;case 100:return f.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),f.getLogger().debug("Lex: LINK","#"+x.yytext+"#"),15;case 102:return this.popState(),f.getLogger().debug("Lex: LINK",x.yytext),15;case 103:return this.popState(),f.getLogger().debug("Lex: LINK",x.yytext),15;case 104:return f.getLogger().debug("Lex: COLON",x.yytext),x.yytext=x.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*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?: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})();S.lexer=N;function _(){this.yy={}}return g(_,"Parser"),_.prototype=S,S.Parser=_,new _})();bt.parser=bt;var ar=bt,U=new Map,vt=[],wt=new Map,Rt="color",At="fill",sr="bgFill",Ut=",",ct=new Map,Et="",ir=g(e=>Ve.sanitizeText(e,R()),"sanitizeText"),nr=g(function(e,t=""){let a=ct.get(e);a||(a={id:e,styles:[],textStyles:[]},ct.set(e,a)),t?.split(Ut).forEach(s=>{const i=s.replace(/([^;]*);/,"$1").trim();if(RegExp(Rt).exec(s)){const r=i.replace(At,sr).replace(Rt,At);a.textStyles.push(r)}a.styles.push(i)})},"addStyleClass"),cr=g(function(e,t=""){const a=U.get(e);t!=null&&(a.styles=t.split(Ut))},"addStyle2Node"),lr=g(function(e,t){e.split(",").forEach(function(a){let s=U.get(a);if(s===void 0){const i=a.trim();s={id:i,type:"na",children:[]},U.set(i,s)}s.classes||(s.classes=[]),s.classes.push(t)})},"setCssClass"),Xt=g((e,t)=>{const a=e.flat(),s=[],c=a.find(r=>r?.type==="column-setting")?.columns??-1;for(const r of a){if(typeof c=="number"&&c>0&&r.type!=="column-setting"&&typeof r.widthInColumns=="number"&&r.widthInColumns>c&&k.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${c}`),r.label&&(r.label=ir(r.label)),r.type==="classDef"){nr(r.id,r.css);continue}if(r.type==="applyClass"){lr(r.id,r?.styleClass??"");continue}if(r.type==="applyStyles"){r?.stylesStr&&cr(r.id,r?.stylesStr);continue}if(r.type==="column-setting")t.columns=r.columns??-1;else if(r.type==="edge"){const n=(wt.get(r.id)??0)+1;wt.set(r.id,n),r.id=n+"-"+r.id,vt.push(r)}else{r.label||(r.type==="composite"?r.label="":r.label=r.id);const n=U.get(r.id);if(n===void 0?U.set(r.id,r):(r.type!=="na"&&(n.type=r.type),r.label!==r.id&&(n.label=r.label)),r.children&&Xt(r.children,r),r.type==="space"){const l=r.width??1;for(let u=0;u<l;u++){const h=Qe(r);h.id=h.id+"-"+u,U.set(h.id,h),s.push(h)}}else n===void 0&&s.push(r)}}t.children=s},"populateBlockDatabase"),_t=[],et={id:"root",type:"composite",children:[],columns:-1},or=g(()=>{k.debug("Clear called"),Fe(),et={id:"root",type:"composite",children:[],columns:-1},U=new Map([["root",et]]),_t=[],ct=new Map,vt=[],wt=new Map,Et=""},"clear");function Vt(e){switch(k.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return k.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(Vt,"typeStr2Type");function jt(e){return k.debug("typeStr2Type",e),e==="=="?"thick":"normal"}g(jt,"edgeTypeStr2Type");function Zt(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}g(Zt,"edgeStrToEdgeData");function Gt(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(Gt,"edgeStrToEdgeStartData");function qt(e){return e.includes("==")?"thick":"normal"}g(qt,"edgeStrToThickness");function Jt(e){return e.includes(".-")?"dotted":"solid"}g(Jt,"edgeStrToPattern");var zt=0,hr=g(()=>(zt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+zt),"generateId"),gr=g(e=>{et.children=e,Xt(e,et),_t=et.children},"setHierarchy"),ur=g(e=>{const t=U.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),dr=g(()=>[...U.values()],"getBlocksFlat"),fr=g(()=>_t||[],"getBlocks"),pr=g(()=>vt,"getEdges"),xr=g(e=>U.get(e),"getBlock"),yr=g(e=>{U.set(e.id,e)},"setBlock"),br=g(e=>{Et=e},"setDiagramId"),wr=g(()=>Et,"getDiagramId"),mr=g(()=>k,"getLogger"),Sr=g(function(){return ct},"getClasses"),Lr={getConfig:g(()=>rt().block,"getConfig"),typeStr2Type:Vt,edgeTypeStr2Type:jt,edgeStrToEdgeData:Zt,edgeStrToEdgeStartData:Gt,edgeStrToThickness:qt,edgeStrToPattern:Jt,getLogger:mr,getBlocksFlat:dr,getBlocks:fr,getEdges:pr,setHierarchy:gr,getBlock:xr,setBlock:yr,getColumns:ur,getClasses:Sr,clear:or,generateId:hr,setDiagramId:br,getDiagramId:wr},kr=Lr,yt=g((e,t)=>{const a=qe,s=a(e,"r"),i=a(e,"g"),c=a(e,"b");return We(s,i,c,t)},"fade"),vr=g(e=>`.label {
font-family: ${e.fontFamily};
color: ${e.nodeTextColor||e.textColor};
}
.cluster-label text {
fill: ${e.titleColor};
}
.cluster-label span,p {
color: ${e.titleColor};
}
.label text,span,p {
fill: ${e.nodeTextColor||e.textColor};
color: ${e.nodeTextColor||e.textColor};
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${e.mainBkg};
stroke: ${e.nodeBorder};
stroke-width: 1px;
}
.flowchart-label text {
text-anchor: middle;
}
// .flowchart-label .text-outer-tspan {
// text-anchor: middle;
// }
// .flowchart-label .text-inner-tspan {
// text-anchor: start;
// }
.node .label {
text-align: center;
}
.node.clickable {
cursor: pointer;
}
.arrowheadPath {
fill: ${e.arrowheadColor};
}
.edgePath .path {
stroke: ${e.lineColor};
stroke-width: 2.0px;
}
.flowchart-link {
stroke: ${e.lineColor};
fill: none;
}
.edgeLabel {
background-color: ${e.edgeLabelBackground};
/*
* This is for backward compatibility with existing code that didn't
* add a \`<p>\` around edge labels.
*
* TODO: We should probably remove this in a future release.
*/
p {
margin: 0;
padding: 0;
display: inline;
}
rect {
opacity: 0.5;
background-color: ${e.edgeLabelBackground};
fill: ${e.edgeLabelBackground};
}
text-align: center;
}
/* For html labels only */
.labelBkg {
background-color: ${e.edgeLabelBackground};
}
.node .cluster {
// fill: ${yt(e.mainBkg,.5)};
fill: ${yt(e.clusterBkg,.5)};
stroke: ${yt(e.clusterBorder,.2)};
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
stroke-width: 1px;
}
.cluster text {
fill: ${e.titleColor};
}
.cluster span,p {
color: ${e.titleColor};
}
/* .cluster div {
color: ${e.titleColor};
} */
div.mermaidTooltip {
position: absolute;
text-align: center;
max-width: 200px;
padding: 2px;
font-family: ${e.fontFamily};
font-size: 12px;
background: ${e.tertiaryColor};
border: 1px solid ${e.border2};
border-radius: 2px;
pointer-events: none;
z-index: 100;
}
.flowchartTitleText {
text-anchor: middle;
font-size: 18px;
fill: ${e.textColor};
}
${de()}
`,"getStyles"),Er=vr,_r=g((e,t,a,s)=>{t.forEach(i=>{zr[i](e,a,s)})},"insertMarkers"),Tr=g((e,t,a)=>{k.trace("Making markers for ",a),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionStart").attr("class","marker extension "+t).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"),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionEnd").attr("class","marker extension "+t).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"),Dr=g((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-compositionStart").attr("class","marker composition "+t).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"),e.append("defs").append("marker").attr("id",a+"_"+t+"-compositionEnd").attr("class","marker composition "+t).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"),Br=g((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).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"),e.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).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"),Nr=g((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).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"),e.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).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"),Ir=g((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).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),e.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).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"),Cr=g((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-pointEnd").attr("class","marker "+t).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"),e.append("marker").attr("id",a+"_"+t+"-pointStart").attr("class","marker "+t).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"),Or=g((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-circleEnd").attr("class","marker "+t).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"),e.append("marker").attr("id",a+"_"+t+"-circleStart").attr("class","marker "+t).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"),Rr=g((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-crossEnd").attr("class","marker cross "+t).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"),e.append("marker").attr("id",a+"_"+t+"-crossStart").attr("class","marker cross "+t).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"),Ar=g((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-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"),zr={extension:Tr,composition:Dr,aggregation:Br,dependency:Nr,lollipop:Ir,point:Cr,circle:Or,cross:Rr,barb:Ar},Mr=_r;function mt(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(e===1)return{px:0,py:t};const a=t%e,s=Math.floor(t/e);return{px:a,py:s}}g(mt,"calculateBlockPosition");var Pr=g(e=>{let t=0,a=0;for(const s of e.children){const{width:i,height:c,x:r,y:n}=s.size??{width:0,height:0,x:0,y:0};if(k.debug("getMaxChildSize abc95 child:",s.id,"width:",i,"height:",c,"x:",r,"y:",n,s.type),s.type==="space")continue;const l=i/(s.widthInColumns??1);l>t&&(t=l),c>a&&(a=c)}return{width:t,height:a}},"getMaxChildSize");function lt(e,t,a=0,s=0,i=8){k.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",a),e?.size?.width||(e.size={width:a,height:s,x:0,y:0});let c=0,r=0;if(e.children?.length>0){for(const y of e.children)lt(y,t,0,0,i);const n=Pr(e);c=n.width,r=n.height,k.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",c,r);for(const y of e.children)y.size&&(k.debug(`abc95 Setting size of children of ${e.id} id=${y.id} ${c} ${r} ${JSON.stringify(y.size)}`),y.size.width=c*(y.widthInColumns??1)+i*((y.widthInColumns??1)-1),y.size.height=r,y.size.x=0,y.size.y=0,k.debug(`abc95 updating size of ${e.id} children child:${y.id} maxWidth:${c} maxHeight:${r}`));for(const y of e.children)lt(y,t,c,r,i);const l=e.columns??-1;let u=0;for(const y of e.children)u+=y.widthInColumns??1;let h=e.children.length;l>0&&l<u&&(h=l);const d=Math.ceil(u/h);let b=h*(c+i)+i,w=d*(r+i)+i;if(b<a){k.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${a} siblingHeight ${s} width ${b}`),b=a,w=s;const y=(a-h*i-i)/h,v=(s-d*i-i)/d;k.debug("Size indata abc88",e.id,"childWidth",y,"maxWidth",c),k.debug("Size indata abc88",e.id,"childHeight",v,"maxHeight",r),k.debug("Size indata abc88 xSize",h,"padding",i);for(const S of e.children)S.size&&(S.size.width=y,S.size.height=v,S.size.x=0,S.size.y=0)}if(k.debug(`abc95 (finale calc) ${e.id} xSize ${h} ySize ${d} columns ${l}${e.children.length} width=${Math.max(b,e.size?.width||0)}`),b<(e?.size?.width||0)){b=e?.size?.width||0;const y=l>0?Math.min(e.children.length,l):e.children.length;if(y>0){const v=(b-y*i-i)/y;k.debug("abc95 (growing to fit) width",e.id,b,e.size?.width,v);for(const S of e.children)S.size&&(S.size.width=v)}}e.size={width:b,height:w,x:0,y:0}}k.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}g(lt,"setBlockSizes");function Tt(e,t,a=8){k.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);const s=e.columns??-1;if(k.debug("layoutBlocks columns abc95",e.id,"=>",s,e),e.children&&e.children.length>0){const i=e?.children[0]?.size?.width??0,c=e.children.length*i+(e.children.length-1)*a;k.debug("widthOfChildren 88",c,"posX");const r=new Map;{let d=0;for(const b of e.children){if(!b.size)continue;const{py:w}=mt(s,d),y=r.get(w)??0;b.size.height>y&&r.set(w,b.size.height);let v=b?.widthInColumns??1;s>0&&(v=Math.min(v,s-d%s)),d+=v}}const n=new Map;{let d=0;const b=[...r.keys()].sort((w,y)=>w-y);for(const w of b)n.set(w,d),d+=(r.get(w)??0)+a}let l=0;k.debug("abc91 block?.size?.x",e.id,e?.size?.x);let u=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-a,h=0;for(const d of e.children){const b=e;if(!d.size)continue;const{width:w,height:y}=d.size,{px:v,py:S}=mt(s,l);if(S!=h&&(h=S,u=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-a,k.debug("New row in layout for block",e.id," and child ",d.id,h)),k.debug(`abc89 layout blocks (child) id: ${d.id} Pos: ${l} (px, py) ${v},${S} (${b?.size?.x},${b?.size?.y}) parent: ${b.id} width: ${w}${a}`),b.size){const _=w/2;d.size.x=u+a+_,k.debug(`abc91 layout blocks (calc) px, pyid:${d.id} startingPos=X${u} new startingPosX${d.size.x} ${_} padding=${a} width=${w} halfWidth=${_} => x:${d.size.x} y:${d.size.y} ${d.widthInColumns} (width * (child?.w || 1)) / 2 ${w*(d?.widthInColumns??1)/2}`),u=d.size.x+_;const T=n.get(S)??0,m=r.get(S)??y;d.size.y=b.size.y-b.size.height/2+T+m/2+a,k.debug(`abc88 layout blocks (calc) px, pyid:${d.id}startingPosX${u}${a}${_}=>x:${d.size.x}y:${d.size.y}${d.widthInColumns}(width * (child?.w || 1)) / 2${w*(d?.widthInColumns??1)/2}`)}d.children&&Tt(d,t,a);let N=d?.widthInColumns??1;s>0&&(N=Math.min(N,s-l%s)),l+=N,k.debug("abc88 columnsPos",d,l)}}k.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}g(Tt,"layoutBlocks");function Dt(e,{minX:t,minY:a,maxX:s,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:c,y:r,width:n,height:l}=e.size;c-n/2<t&&(t=c-n/2),r-l/2<a&&(a=r-l/2),c+n/2>s&&(s=c+n/2),r+l/2>i&&(i=r+l/2)}if(e.children)for(const c of e.children)({minX:t,minY:a,maxX:s,maxY:i}=Dt(c,{minX:t,minY:a,maxX:s,maxY:i}));return{minX:t,minY:a,maxX:s,maxY:i}}g(Dt,"findBounds");function Qt(e){const t=e.getBlock("root");if(!t)return;const a=R()?.block?.padding??8;lt(t,e,0,0,a),Tt(t,e,a),k.debug("getBlocks",JSON.stringify(t,null,2));const{minX:s,minY:i,maxX:c,maxY:r}=Dt(t),n=r-i,l=c-s;return{x:s,y:i,width:l,height:n}}g(Qt,"layout");var Fr=g(async(e,t,a,s=!1,i=!1)=>{let c=t||"";typeof c=="object"&&(c=c[0]);const r=R(),n=M(r);return await kt(e,c,{style:a,isTitle:s,useHtmlLabels:n,markdown:!1,isNode:i,width:Number.POSITIVE_INFINITY},r)},"createLabel"),K=Fr,Wr=g((e,t,a,s,i)=>{t.arrowTypeStart&&Mt(e,"start",t.arrowTypeStart,a,s,i),t.arrowTypeEnd&&Mt(e,"end",t.arrowTypeEnd,a,s,i)},"addEdgeMarkers"),Yr={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Mt=g((e,t,a,s,i,c)=>{const r=Yr[a];if(!r){k.warn(`Unknown arrow type: ${a}`);return}const n=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${s}#${i}_${c}-${r}${n})`)},"addEdgeMarker"),St={},z={},Hr=g(async(e,t)=>{const a=R(),s=M(a),i=e.insert("g").attr("class","edgeLabel"),c=i.insert("g").attr("class","label"),r=t.labelType==="markdown",n=await kt(e,t.label,{style:t.labelStyle,useHtmlLabels:s,addSvgBackground:r,isNode:!1,markdown:r,width:r?void 0:Number.POSITIVE_INFINITY},a);c.node().appendChild(n);let l=n.getBBox(),u=l;if(s){const d=n.children[0],b=D(n);l=d.getBoundingClientRect(),u=l,b.attr("width",l.width),b.attr("height",l.height)}else{const d=D(n).select("text").node();d&&typeof d.getBBox=="function"&&(u=d.getBBox())}c.attr("transform",Q(u,s)),St[t.id]=i,t.width=l.width,t.height=l.height;let h;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),b=d.insert("g").attr("class","inner"),w=await K(b,t.startLabelLeft,t.labelStyle);h=w;let y=w.getBBox();if(s){const v=w.children[0],S=D(w);y=v.getBoundingClientRect(),S.attr("width",y.width),S.attr("height",y.height)}b.attr("transform",Q(y,s)),z[t.id]||(z[t.id]={}),z[t.id].startLeft=d,tt(h,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),b=d.insert("g").attr("class","inner"),w=await K(b,t.startLabelRight,t.labelStyle);h=w;let y=w.getBBox();if(s){const v=w.children[0],S=D(w);y=v.getBoundingClientRect(),S.attr("width",y.width),S.attr("height",y.height)}b.attr("transform",Q(y,s)),z[t.id]||(z[t.id]={}),z[t.id].startRight=d,tt(h,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),b=d.insert("g").attr("class","inner"),w=await K(d,t.endLabelLeft,t.labelStyle);h=w;let y=w.getBBox();if(s){const v=w.children[0],S=D(w);y=v.getBoundingClientRect(),S.attr("width",y.width),S.attr("height",y.height)}b.attr("transform",Q(y,s)),z[t.id]||(z[t.id]={}),z[t.id].endLeft=d,tt(h,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),b=d.insert("g").attr("class","inner"),w=await K(d,t.endLabelRight,t.labelStyle);h=w;let y=w.getBBox();if(s){const v=w.children[0],S=D(w);y=v.getBoundingClientRect(),S.attr("width",y.width),S.attr("height",y.height)}b.attr("transform",Q(y,s)),z[t.id]||(z[t.id]={}),z[t.id].endRight=d,tt(h,t.endLabelRight)}return n},"insertEdgeLabel");function tt(e,t){M(R())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}g(tt,"setTerminalWidth");var Kr=g((e,t)=>{k.debug("Moving label abc88 ",e.id,e.label,St[e.id],t);let a=t.updatedPath?t.updatedPath:t.originalPath;const s=R(),{subGraphTitleTotalMargin:i}=Xe(s);if(e.label){const c=St[e.id];let r=e.x,n=e.y;if(a){const l=$.calcLabelPosition(a);k.debug("Moving label "+e.label+" from (",r,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(r=l.x,n=l.y)}c.attr("transform",`translate(${r}, ${n+i/2})`)}if(e.startLabelLeft){const c=z[e.id].startLeft;let r=e.x,n=e.y;if(a){const l=$.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",a);r=l.x,n=l.y}c.attr("transform",`translate(${r}, ${n})`)}if(e.startLabelRight){const c=z[e.id].startRight;let r=e.x,n=e.y;if(a){const l=$.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",a);r=l.x,n=l.y}c.attr("transform",`translate(${r}, ${n})`)}if(e.endLabelLeft){const c=z[e.id].endLeft;let r=e.x,n=e.y;if(a){const l=$.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",a);r=l.x,n=l.y}c.attr("transform",`translate(${r}, ${n})`)}if(e.endLabelRight){const c=z[e.id].endRight;let r=e.x,n=e.y;if(a){const l=$.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",a);r=l.x,n=l.y}c.attr("transform",`translate(${r}, ${n})`)}},"positionEdgeLabel"),Ur=g((e,t)=>{const a=e.x,s=e.y,i=Math.abs(t.x-a),c=Math.abs(t.y-s),r=e.width/2,n=e.height/2;return i>=r||c>=n},"outsideNode"),Xr=g((e,t,a)=>{k.debug(`intersection calc abc89:
outsidePoint: ${JSON.stringify(t)}
insidePoint : ${JSON.stringify(a)}
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const s=e.x,i=e.y,c=Math.abs(s-a.x),r=e.width/2;let n=a.x<t.x?r-c:r+c;const l=e.height/2,u=Math.abs(t.y-a.y),h=Math.abs(t.x-a.x);if(Math.abs(i-t.y)*r>Math.abs(s-t.x)*l){let d=a.y<t.y?t.y-l-i:i-l-t.y;n=h*d/u;const b={x:a.x<t.x?a.x+n:a.x-h+n,y:a.y<t.y?a.y+u-d:a.y-u+d};return n===0&&(b.x=t.x,b.y=t.y),h===0&&(b.x=t.x),u===0&&(b.y=t.y),k.debug(`abc89 topp/bott calc, Q ${u}, q ${d}, R ${h}, r ${n}`,b),b}else{a.x<t.x?n=t.x-r-s:n=s-r-t.x;let d=u*n/h,b=a.x<t.x?a.x+h-n:a.x-h+n,w=a.y<t.y?a.y+d:a.y-d;return k.debug(`sides calc abc89, Q ${u}, q ${d}, R ${h}, r ${n}`,{_x:b,_y:w}),n===0&&(b=t.x,w=t.y),h===0&&(b=t.x),u===0&&(w=t.y),{x:b,y:w}}},"intersection"),Pt=g((e,t)=>{k.debug("abc88 cutPathAtIntersect",e,t);let a=[],s=e[0],i=!1;return e.forEach(c=>{if(!Ur(t,c)&&!i){const r=Xr(t,s,c);let n=!1;a.forEach(l=>{n=n||l.x===r.x&&l.y===r.y}),a.some(l=>l.x===r.x&&l.y===r.y)||a.push(r),i=!0}else s=c,i||a.push(c)}),a},"cutPathAtIntersect"),Vr=g(function(e,t,a,s,i,c,r){let n=a.points;k.debug("abc88 InsertEdge: edge=",a,"e=",t);let l=!1;const u=c.node(t.v);var h=c.node(t.w);h?.intersect&&u?.intersect&&(n=n.slice(1,a.points.length-1),n.unshift(u.intersect(n[0])),n.push(h.intersect(n[n.length-1]))),a.toCluster&&(k.debug("to cluster abc88",s[a.toCluster]),n=Pt(a.points,s[a.toCluster].node),l=!0),a.fromCluster&&(k.debug("from cluster abc88",s[a.fromCluster]),n=Pt(n.reverse(),s[a.fromCluster].node).reverse(),l=!0);const d=n.filter(m=>!Number.isNaN(m.y));let b=Ke;a.curve&&(i==="graph"||i==="flowchart")&&(b=a.curve);const{x:w,y}=Ye(a),v=He().x(w).y(y).curve(b);let S;switch(a.thickness){case"normal":S="edge-thickness-normal";break;case"thick":S="edge-thickness-thick";break;case"invisible":S="edge-thickness-thick";break;default:S=""}switch(a.pattern){case"solid":S+=" edge-pattern-solid";break;case"dotted":S+=" edge-pattern-dotted";break;case"dashed":S+=" edge-pattern-dashed";break}const N=e.append("path").attr("d",v(d)).attr("id",a.id).attr("class"," "+S+(a.classes?" "+a.classes:"")).attr("style",a.style);let _="";(R().flowchart.arrowMarkerAbsolute||R().state.arrowMarkerAbsolute)&&(_=Ue(!0)),Wr(N,a,_,r,i);let T={};return l&&(T.updatedPath=n),T.originalPath=a.points,T},"insertEdge"),jr=g(e=>{const t=new Set;for(const a of e)switch(a){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(a);break}return t},"expandAndDeduplicateDirections"),Zr=g((e,t,a,s)=>{const i=jr(e),c=2,r=t.height+2*a.padding,n=r/c,l=s??t.width+2*n+a.padding,u=a.padding/2;return i.has("right")&&i.has("left")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:n,y:0},{x:l/2,y:2*u},{x:l-n,y:0},{x:l,y:0},{x:l,y:-r/3},{x:l+2*u,y:-r/2},{x:l,y:-2*r/3},{x:l,y:-r},{x:l-n,y:-r},{x:l/2,y:-r-2*u},{x:n,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*u,y:-r/2},{x:0,y:-r/3}]:i.has("right")&&i.has("left")&&i.has("up")?[{x:n,y:0},{x:l-n,y:0},{x:l,y:-r/2},{x:l-n,y:-r},{x:n,y:-r},{x:0,y:-r/2}]:i.has("right")&&i.has("left")&&i.has("down")?[{x:0,y:0},{x:n,y:-r},{x:l-n,y:-r},{x:l,y:0}]:i.has("right")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:l,y:-n},{x:l,y:-r+n},{x:0,y:-r}]:i.has("left")&&i.has("up")&&i.has("down")?[{x:l,y:0},{x:0,y:-n},{x:0,y:-r+n},{x:l,y:-r}]:i.has("right")&&i.has("left")?[{x:n,y:0},{x:n,y:-u},{x:l-n,y:-u},{x:l-n,y:0},{x:l,y:-r/2},{x:l-n,y:-r},{x:l-n,y:-r+u},{x:n,y:-r+u},{x:n,y:-r},{x:0,y:-r/2}]:i.has("up")&&i.has("down")?[{x:l/2,y:0},{x:0,y:-u},{x:n,y:-u},{x:n,y:-r+u},{x:0,y:-r+u},{x:l/2,y:-r},{x:l,y:-r+u},{x:l-n,y:-r+u},{x:l-n,y:-u},{x:l,y:-u}]:i.has("right")&&i.has("up")?[{x:0,y:0},{x:l,y:-n},{x:0,y:-r}]:i.has("right")&&i.has("down")?[{x:0,y:0},{x:l,y:0},{x:0,y:-r}]:i.has("left")&&i.has("up")?[{x:l,y:0},{x:0,y:-n},{x:l,y:-r}]:i.has("left")&&i.has("down")?[{x:l,y:0},{x:0,y:0},{x:l,y:-r}]:i.has("right")?[{x:n,y:-u},{x:n,y:-u},{x:l-n,y:-u},{x:l-n,y:0},{x:l,y:-r/2},{x:l-n,y:-r},{x:l-n,y:-r+u},{x:n,y:-r+u},{x:n,y:-r+u}]:i.has("left")?[{x:n,y:0},{x:n,y:-u},{x:l-n,y:-u},{x:l-n,y:-r+u},{x:n,y:-r+u},{x:n,y:-r},{x:0,y:-r/2}]:i.has("up")?[{x:n,y:-u},{x:n,y:-r+u},{x:0,y:-r+u},{x:l/2,y:-r},{x:l,y:-r+u},{x:l-n,y:-r+u},{x:l-n,y:-u}]:i.has("down")?[{x:l/2,y:0},{x:0,y:-u},{x:n,y:-u},{x:n,y:-r+u},{x:l-n,y:-r+u},{x:l-n,y:-u},{x:l,y:-u}]:[{x:0,y:0}]},"getArrowPoints");function $t(e,t){return e.intersect(t)}g($t,"intersectNode");var Gr=$t;function te(e,t,a,s){var i=e.x,c=e.y,r=i-s.x,n=c-s.y,l=Math.sqrt(t*t*n*n+a*a*r*r),u=Math.abs(t*a*r/l);s.x<i&&(u=-u);var h=Math.abs(t*a*n/l);return s.y<c&&(h=-h),{x:i+u,y:c+h}}g(te,"intersectEllipse");var ee=te;function re(e,t,a){return ee(e,t,t,a)}g(re,"intersectCircle");var qr=re;function ae(e,t,a,s){var i,c,r,n,l,u,h,d,b,w,y,v,S,N,_;if(i=t.y-e.y,r=e.x-t.x,l=t.x*e.y-e.x*t.y,b=i*a.x+r*a.y+l,w=i*s.x+r*s.y+l,!(b!==0&&w!==0&&Lt(b,w))&&(c=s.y-a.y,n=a.x-s.x,u=s.x*a.y-a.x*s.y,h=c*e.x+n*e.y+u,d=c*t.x+n*t.y+u,!(h!==0&&d!==0&&Lt(h,d))&&(y=i*n-c*r,y!==0)))return v=Math.abs(y/2),S=r*u-n*l,N=S<0?(S-v)/y:(S+v)/y,S=c*l-i*u,_=S<0?(S-v)/y:(S+v)/y,{x:N,y:_}}g(ae,"intersectLine");function Lt(e,t){return e*t>0}g(Lt,"sameSign");var Jr=ae,Qr=se;function se(e,t,a){var s=e.x,i=e.y,c=[],r=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(y){r=Math.min(r,y.x),n=Math.min(n,y.y)}):(r=Math.min(r,t.x),n=Math.min(n,t.y));for(var l=s-e.width/2-r,u=i-e.height/2-n,h=0;h<t.length;h++){var d=t[h],b=t[h<t.length-1?h+1:0],w=Jr(e,a,{x:l+d.x,y:u+d.y},{x:l+b.x,y:u+b.y});w&&c.push(w)}return c.length?(c.length>1&&c.sort(function(y,v){var S=y.x-a.x,N=y.y-a.y,_=Math.sqrt(S*S+N*N),T=v.x-a.x,m=v.y-a.y,f=Math.sqrt(T*T+m*m);return _<f?-1:_===f?0:1}),c[0]):e}g(se,"intersectPolygon");var $r=g((e,t)=>{var a=e.x,s=e.y,i=t.x-a,c=t.y-s,r=e.width/2,n=e.height/2,l,u;return Math.abs(c)*r>Math.abs(i)*n?(c<0&&(n=-n),l=c===0?0:n*i/c,u=n):(i<0&&(r=-r),l=r,u=i===0?0:r*c/i),{x:a+l,y:s+u}},"intersectRect"),ta=$r,B={node:Gr,circle:qr,ellipse:ee,polygon:Qr,rect:ta},A=g(async(e,t,a,s)=>{const i=R();let c;const r=t.useHtmlLabels||M(i);a?c=a:c="node default";const n=e.insert("g").attr("class",c).attr("id",t.domId||t.id),l=n.insert("g").attr("class","label").attr("style",t.labelStyle);let u;t.labelText===void 0?u="":u=typeof t.labelText=="string"?t.labelText:t.labelText[0];let h;t.labelType==="markdown"?h=kt(l,Ct(Ot(u),i),{useHtmlLabels:r,width:t.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):h=await K(l,Ct(Ot(u),i),t.labelStyle,!1,s);let d=h.getBBox();const b=t.padding/2;if(M(i)){const w=h.children[0],y=D(h);await Ze(w,u),d=w.getBoundingClientRect(),y.attr("width",d.width),y.attr("height",d.height)}return r?l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):l.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:n,bbox:d,halfPadding:b,label:l}},"labelHelper"),I=g((e,t)=>{const a=t.node().getBBox();e.width=a.width,e.height=a.height},"updateNodeBounds");function X(e,t,a,s){return e.insert("polygon",":first-child").attr("points",s.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+a/2+")")}g(X,"insertPolygonShape");var ea=g(async(e,t)=>{t.useHtmlLabels||M(R())||(t.centerLabel=!0);const{shapeSvg:s,bbox:i,halfPadding:c}=await A(e,t,"node "+t.classes,!0);k.info("Classes = ",t.classes);const r=s.insert("rect",":first-child");return r.attr("rx",t.rx).attr("ry",t.ry).attr("x",-i.width/2-c).attr("y",-i.height/2-c).attr("width",i.width+t.padding).attr("height",i.height+t.padding),I(t,r),t.intersect=function(n){return B.rect(t,n)},s},"note"),ra=ea,Ft=g(e=>e?" "+e:"","formatClass"),Y=g((e,t)=>`${t||"node default"}${Ft(e.classes)} ${Ft(e.class)}`,"getClassesFromNode"),Wt=g(async(e,t)=>{const{shapeSvg:a,bbox:s}=await A(e,t,Y(t,void 0),!0),i=s.width+t.padding,c=s.height+t.padding,r=i+c,n=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}];k.info("Question main (Circle)");const l=X(a,r,r,n);return l.attr("style",t.style),I(t,l),t.intersect=function(u){return k.warn("Intersect called"),B.polygon(t,n,u)},a},"question"),aa=g((e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),s=28,i=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}];return a.insert("polygon",":first-child").attr("points",i.map(function(r){return r.x+","+r.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(r){return B.circle(t,14,r)},a},"choice"),sa=g(async(e,t)=>{const{shapeSvg:a,bbox:s}=await A(e,t,Y(t,void 0),!0),i=4,c=t.positioned?t.height:s.height+t.padding,r=c/i,n=t.positioned?t.width:s.width+2*r+t.padding,l=[{x:r,y:0},{x:n-r,y:0},{x:n,y:-c/2},{x:n-r,y:-c},{x:r,y:-c},{x:0,y:-c/2}],u=X(a,n,c,l);return u.attr("style",t.style),I(t,u),t.intersect=function(h){return B.polygon(t,l,h)},a},"hexagon"),ia=g(async(e,t)=>{const{shapeSvg:a,bbox:s}=await A(e,t,void 0,!0),i=2,c=s.height+2*t.padding,r=c/i,n=s.width+2*r+t.padding,u=t.positioned&&(t.widthInColumns??1)>1&&t.width>n?t.width:n,h=Zr(t.directions,s,t,u),d=X(a,u,c,h);return d.attr("style",t.style),I(t,d),t.intersect=function(b){return B.polygon(t,h,b)},a},"block_arrow"),na=g(async(e,t)=>{const{shapeSvg:a,bbox:s}=await A(e,t,Y(t,void 0),!0),i=s.width+t.padding,c=s.height+t.padding,r=[{x:-c/2,y:0},{x:i,y:0},{x:i,y:-c},{x:-c/2,y:-c},{x:0,y:-c/2}];return X(a,i,c,r).attr("style",t.style),t.width=i+c,t.height=c,t.intersect=function(l){return B.polygon(t,r,l)},a},"rect_left_inv_arrow"),ca=g(async(e,t)=>{const{shapeSvg:a,bbox:s}=await A(e,t,Y(t),!0),i=s.width+t.padding,c=s.height+t.padding,r=[{x:-2*c/6,y:0},{x:i-c/6,y:0},{x:i+2*c/6,y:-c},{x:c/6,y:-c}],n=X(a,i,c,r);return n.attr("style",t.style),I(t,n),t.intersect=function(l){return B.polygon(t,r,l)},a},"lean_right"),la=g(async(e,t)=>{const{shapeSvg:a,bbox:s}=await A(e,t,Y(t,void 0),!0),i=s.width+t.padding,c=s.height+t.padding,r=[{x:2*c/6,y:0},{x:i+c/6,y:0},{x:i-2*c/6,y:-c},{x:-c/6,y:-c}],n=X(a,i,c,r);return n.attr("style",t.style),I(t,n),t.intersect=function(l){return B.polygon(t,r,l)},a},"lean_left"),oa=g(async(e,t)=>{const{shapeSvg:a,bbox:s}=await A(e,t,Y(t,void 0),!0),i=s.width+t.padding,c=s.height+t.padding,r=[{x:-2*c/6,y:0},{x:i+2*c/6,y:0},{x:i-c/6,y:-c},{x:c/6,y:-c}],n=X(a,i,c,r);return n.attr("style",t.style),I(t,n),t.intersect=function(l){return B.polygon(t,r,l)},a},"trapezoid"),ha=g(async(e,t)=>{const{shapeSvg:a,bbox:s}=await A(e,t,Y(t,void 0),!0),i=s.width+t.padding,c=s.height+t.padding,r=[{x:c/6,y:0},{x:i-c/6,y:0},{x:i+2*c/6,y:-c},{x:-2*c/6,y:-c}],n=X(a,i,c,r);return n.attr("style",t.style),I(t,n),t.intersect=function(l){return B.polygon(t,r,l)},a},"inv_trapezoid"),ga=g(async(e,t)=>{const{shapeSvg:a,bbox:s}=await A(e,t,Y(t,void 0),!0),i=s.width+t.padding,c=s.height+t.padding,r=[{x:0,y:0},{x:i+c/2,y:0},{x:i,y:-c/2},{x:i+c/2,y:-c},{x:0,y:-c}],n=X(a,i,c,r);return n.attr("style",t.style),I(t,n),t.intersect=function(l){return B.polygon(t,r,l)},a},"rect_right_inv_arrow"),ua=g(async(e,t)=>{const{shapeSvg:a,bbox:s}=await A(e,t,Y(t,void 0),!0),i=s.width+t.padding,c=i/2,r=c/(2.5+i/50),n=s.height+r+t.padding,l="M 0,"+r+" a "+c+","+r+" 0,0,0 "+i+" 0 a "+c+","+r+" 0,0,0 "+-i+" 0 l 0,"+n+" a "+c+","+r+" 0,0,0 "+i+" 0 l 0,"+-n,u=a.attr("label-offset-y",r).insert("path",":first-child").attr("style",t.style).attr("d",l).attr("transform","translate("+-i/2+","+-(n/2+r)+")");return I(t,u),t.intersect=function(h){const d=B.rect(t,h),b=d.x-t.x;if(c!=0&&(Math.abs(b)<t.width/2||Math.abs(b)==t.width/2&&Math.abs(d.y-t.y)>t.height/2-r)){let w=r*r*(1-b*b/(c*c));w!=0&&(w=Math.sqrt(w)),w=r-w,h.y-t.y>0&&(w=-w),d.y+=w}return d},a},"cylinder"),da=g(async(e,t)=>{const{shapeSvg:a,bbox:s,halfPadding:i}=await A(e,t,"node "+t.classes+" "+t.class,!0),c=a.insert("rect",":first-child"),r=t.positioned?t.width:s.width+t.padding,n=t.positioned?t.height:s.height+t.padding,l=t.positioned?-r/2:-s.width/2-i,u=t.positioned?-n/2:-s.height/2-i;if(c.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",l).attr("y",u).attr("width",r).attr("height",n),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(ot(c,t.props.borders,r,n),h.delete("borders")),h.forEach(d=>{k.warn(`Unknown node property ${d}`)})}return I(t,c),t.intersect=function(h){return B.rect(t,h)},a},"rect"),fa=g(async(e,t)=>{const{shapeSvg:a,bbox:s,halfPadding:i}=await A(e,t,"node "+t.classes,!0),c=a.insert("rect",":first-child"),r=t.positioned?t.width:s.width+t.padding,n=t.positioned?t.height:s.height+t.padding,l=t.positioned?-r/2:-s.width/2-i,u=t.positioned?-n/2:-s.height/2-i;if(c.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",l).attr("y",u).attr("width",r).attr("height",n),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(ot(c,t.props.borders,r,n),h.delete("borders")),h.forEach(d=>{k.warn(`Unknown node property ${d}`)})}return I(t,c),t.intersect=function(h){return B.rect(t,h)},a},"composite"),pa=g(async(e,t)=>{const{shapeSvg:a}=await A(e,t,"label",!0);k.trace("Classes = ",t.class);const s=a.insert("rect",":first-child"),i=0,c=0;if(s.attr("width",i).attr("height",c),a.attr("class","label edgeLabel"),t.props){const r=new Set(Object.keys(t.props));t.props.borders&&(ot(s,t.props.borders,i,c),r.delete("borders")),r.forEach(n=>{k.warn(`Unknown node property ${n}`)})}return I(t,s),t.intersect=function(r){return B.rect(t,r)},a},"labelRect");function ot(e,t,a,s){const i=[],c=g(n=>{i.push(n,0)},"addBorder"),r=g(n=>{i.push(0,n)},"skipBorder");t.includes("t")?(k.debug("add top border"),c(a)):r(a),t.includes("r")?(k.debug("add right border"),c(s)):r(s),t.includes("b")?(k.debug("add bottom border"),c(a)):r(a),t.includes("l")?(k.debug("add left border"),c(s)):r(s),e.attr("stroke-dasharray",i.join(" "))}g(ot,"applyNodePropertyBorders");var xa=g(async(e,t)=>{let a;t.classes?a="node "+t.classes:a="node default";const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),i=s.insert("rect",":first-child"),c=s.insert("line"),r=s.insert("g").attr("class","label"),n=t.labelText.flat?t.labelText.flat():t.labelText;let l="";typeof n=="object"?l=n[0]:l=n,k.info("Label text abc79",l,n,typeof n=="object");const u=await K(r,l,t.labelStyle,!0,!0);let h={width:0,height:0};if(M(R())){const v=u.children[0],S=D(u);h=v.getBoundingClientRect(),S.attr("width",h.width),S.attr("height",h.height)}k.info("Text 2",n);const d=n.slice(1,n.length);let b=u.getBBox();const w=await K(r,d.join?d.join("<br/>"):d,t.labelStyle,!0,!0);if(M(R())){const v=w.children[0],S=D(w);h=v.getBoundingClientRect(),S.attr("width",h.width),S.attr("height",h.height)}const y=t.padding/2;return D(w).attr("transform","translate( "+(h.width>b.width?0:(b.width-h.width)/2)+", "+(b.height+y+5)+")"),D(u).attr("transform","translate( "+(h.width<b.width?0:-(b.width-h.width)/2)+", 0)"),h=r.node().getBBox(),r.attr("transform","translate("+-h.width/2+", "+(-h.height/2-y+3)+")"),i.attr("class","outer title-state").attr("x",-h.width/2-y).attr("y",-h.height/2-y).attr("width",h.width+t.padding).attr("height",h.height+t.padding),c.attr("class","divider").attr("x1",-h.width/2-y).attr("x2",h.width/2+y).attr("y1",-h.height/2-y+b.height+y).attr("y2",-h.height/2-y+b.height+y),I(t,i),t.intersect=function(v){return B.rect(t,v)},s},"rectWithTitle"),ya=g(async(e,t)=>{const{shapeSvg:a,bbox:s}=await A(e,t,Y(t,void 0),!0),i=s.height+t.padding,c=s.width+i/4+t.padding,r=a.insert("rect",":first-child").attr("style",t.style).attr("rx",i/2).attr("ry",i/2).attr("x",-c/2).attr("y",-i/2).attr("width",c).attr("height",i);return I(t,r),t.intersect=function(n){return B.rect(t,n)},a},"stadium"),ba=g(async(e,t)=>{const{shapeSvg:a,bbox:s,halfPadding:i}=await A(e,t,Y(t,void 0),!0),c=a.insert("circle",":first-child");return c.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",s.width/2+i).attr("width",s.width+t.padding).attr("height",s.height+t.padding),k.info("Circle main"),I(t,c),t.intersect=function(r){return k.info("Circle intersect",t,s.width/2+i,r),B.circle(t,s.width/2+i,r)},a},"circle"),wa=g(async(e,t)=>{const{shapeSvg:a,bbox:s,halfPadding:i}=await A(e,t,Y(t,void 0),!0),c=5,r=a.insert("g",":first-child"),n=r.insert("circle"),l=r.insert("circle");return r.attr("class",t.class),n.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",s.width/2+i+c).attr("width",s.width+t.padding+c*2).attr("height",s.height+t.padding+c*2),l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",s.width/2+i).attr("width",s.width+t.padding).attr("height",s.height+t.padding),k.info("DoubleCircle main"),I(t,n),t.intersect=function(u){return k.info("DoubleCircle intersect",t,s.width/2+i+c,u),B.circle(t,s.width/2+i+c,u)},a},"doublecircle"),ma=g(async(e,t)=>{const{shapeSvg:a,bbox:s}=await A(e,t,Y(t,void 0),!0),i=s.width+t.padding,c=s.height+t.padding,r=[{x:0,y:0},{x:i,y:0},{x:i,y:-c},{x:0,y:-c},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-c},{x:-8,y:-c},{x:-8,y:0}],n=X(a,i,c,r);return n.attr("style",t.style),I(t,n),t.intersect=function(l){return B.polygon(t,r,l)},a},"subroutine"),Sa=g((e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),s=a.insert("circle",":first-child");return s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),I(t,s),t.intersect=function(i){return B.circle(t,7,i)},a},"start"),Yt=g((e,t,a)=>{const s=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let i=70,c=10;a==="LR"&&(i=10,c=70);const r=s.append("rect").attr("x",-1*i/2).attr("y",-1*c/2).attr("width",i).attr("height",c).attr("class","fork-join");return I(t,r),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(n){return B.rect(t,n)},s},"forkJoin"),La=g((e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),s=a.insert("circle",":first-child"),i=a.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),s.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),I(t,i),t.intersect=function(c){return B.circle(t,7,c)},a},"end"),ka=g(async(e,t)=>{const a=t.padding/2,s=4,i=8;let c;t.classes?c="node "+t.classes:c="node default";const r=e.insert("g").attr("class",c).attr("id",t.domId||t.id),n=r.insert("rect",":first-child"),l=r.insert("line"),u=r.insert("line");let h=0,d=s;const b=r.insert("g").attr("class","label");let w=0;const y=t.classData.annotations?.[0],v=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",S=await K(b,v,t.labelStyle,!0,!0);let N=S.getBBox();if(M(R())){const E=S.children[0],o=D(S);N=E.getBoundingClientRect(),o.attr("width",N.width),o.attr("height",N.height)}t.classData.annotations[0]&&(d+=N.height+s,h+=N.width);let _=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(M(R())?_+="&lt;"+t.classData.type+"&gt;":_+="<"+t.classData.type+">");const T=await K(b,_,t.labelStyle,!0,!0);D(T).attr("class","classTitle");let m=T.getBBox();if(M(R())){const E=T.children[0],o=D(T);m=E.getBoundingClientRect(),o.attr("width",m.width),o.attr("height",m.height)}d+=m.height+s,m.width>h&&(h=m.width);const f=[];t.classData.members.forEach(async E=>{const o=E.getDisplayDetails();let F=o.displayText;M(R())&&(F=F.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const p=await K(b,F,o.cssStyle?o.cssStyle:t.labelStyle,!0,!0);let C=p.getBBox();if(M(R())){const G=p.children[0],V=D(p);C=G.getBoundingClientRect(),V.attr("width",C.width),V.attr("height",C.height)}C.width>h&&(h=C.width),d+=C.height+s,f.push(p)}),d+=i;const x=[];if(t.classData.methods.forEach(async E=>{const o=E.getDisplayDetails();let F=o.displayText;M(R())&&(F=F.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const p=await K(b,F,o.cssStyle?o.cssStyle:t.labelStyle,!0,!0);let C=p.getBBox();if(M(R())){const G=p.children[0],V=D(p);C=G.getBoundingClientRect(),V.attr("width",C.width),V.attr("height",C.height)}C.width>h&&(h=C.width),d+=C.height+s,x.push(p)}),d+=i,y){let E=(h-N.width)/2;D(S).attr("transform","translate( "+(-1*h/2+E)+", "+-1*d/2+")"),w=N.height+s}let L=(h-m.width)/2;return D(T).attr("transform","translate( "+(-1*h/2+L)+", "+(-1*d/2+w)+")"),w+=m.height+s,l.attr("class","divider").attr("x1",-h/2-a).attr("x2",h/2+a).attr("y1",-d/2-a+i+w).attr("y2",-d/2-a+i+w),w+=i,f.forEach(E=>{D(E).attr("transform","translate( "+-h/2+", "+(-1*d/2+w+i/2)+")");const o=E?.getBBox();w+=(o?.height??0)+s}),w+=i,u.attr("class","divider").attr("x1",-h/2-a).attr("x2",h/2+a).attr("y1",-d/2-a+i+w).attr("y2",-d/2-a+i+w),w+=i,x.forEach(E=>{D(E).attr("transform","translate( "+-h/2+", "+(-1*d/2+w)+")");const o=E?.getBBox();w+=(o?.height??0)+s}),n.attr("style",t.style).attr("class","outer title-state").attr("x",-h/2-a).attr("y",-(d/2)-a).attr("width",h+t.padding).attr("height",d+t.padding),I(t,n),t.intersect=function(E){return B.rect(t,E)},r},"class_box"),Ht={rhombus:Wt,composite:fa,question:Wt,rect:da,labelRect:pa,rectWithTitle:xa,choice:aa,circle:ba,doublecircle:wa,stadium:ya,hexagon:sa,block_arrow:ia,rect_left_inv_arrow:na,lean_right:ca,lean_left:la,trapezoid:oa,inv_trapezoid:ha,rect_right_inv_arrow:ga,cylinder:ua,start:Sa,end:La,note:ra,subroutine:ma,fork:Yt,join:Yt,class_box:ka},nt={},ie=g(async(e,t,a)=>{let s,i;if(t.link){let c;R().securityLevel==="sandbox"?c="_top":t.linkTarget&&(c=t.linkTarget||"_blank"),s=e.insert("svg:a").attr("xlink:href",t.link).attr("target",c),i=await Ht[t.shape](s,t,a)}else i=await Ht[t.shape](e,t,a),s=i;return t.tooltip&&i.attr("title",t.tooltip),t.class&&i.attr("class","node default "+t.class),nt[t.id]=s,t.haveCallback&&nt[t.id].attr("class",nt[t.id].attr("class")+" clickable"),s},"insertNode"),va=g(e=>{const t=nt[e.id];k.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const a=8,s=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+s-e.width/2)+", "+(e.y-e.height/2-a)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),s},"positionNode");function Bt(e,t,a=!1){const s=e;let i="default";(s?.classes?.length||0)>0&&(i=(s?.classes??[]).join(" ")),i=i+" flowchart-label";let c=0,r="",n;switch(s.type){case"round":c=5,r="rect";break;case"composite":c=0,r="composite",n=0;break;case"square":r="rect";break;case"diamond":r="question";break;case"hexagon":r="hexagon";break;case"block_arrow":r="block_arrow";break;case"odd":r="rect_left_inv_arrow";break;case"lean_right":r="lean_right";break;case"lean_left":r="lean_left";break;case"trapezoid":r="trapezoid";break;case"inv_trapezoid":r="inv_trapezoid";break;case"rect_left_inv_arrow":r="rect_left_inv_arrow";break;case"circle":r="circle";break;case"ellipse":r="ellipse";break;case"stadium":r="stadium";break;case"subroutine":r="subroutine";break;case"cylinder":r="cylinder";break;case"group":r="rect";break;case"doublecircle":r="doublecircle";break;default:r="rect"}const l=je(s?.styles??[]),u=s.label,h=s.size??{width:0,height:0,x:0,y:0},d=t.getDiagramId();return{labelStyle:l.labelStyle,shape:r,labelText:u,rx:c,ry:c,class:i,style:l.style,id:s.id,domId:d?`${d}-${s.id}`:s.id,directions:s.directions,width:h.width,height:h.height,x:h.x,y:h.y,positioned:a,intersect:void 0,type:s.type,padding:n??rt()?.block?.padding??0,widthInColumns:s.widthInColumns??1}}g(Bt,"getNodeFromBlock");async function ne(e,t,a){const s=Bt(t,a,!1);if(s.type==="group")return;const i=rt(),c=await ie(e,s,{config:i}),r=c.node().getBBox(),n=a.getBlock(s.id);n.size={width:r.width,height:r.height,x:0,y:0,node:c},a.setBlock(n),c.remove()}g(ne,"calculateBlockSize");async function ce(e,t,a){const s=Bt(t,a,!0);if(a.getBlock(s.id).type!=="space"){const c=rt();await ie(e,s,{config:c}),t.intersect=s?.intersect,va(s)}}g(ce,"insertBlockPositioned");async function ht(e,t,a,s){for(const i of t)await s(e,i,a),i.children&&await ht(e,i.children,a,s)}g(ht,"performOperations");async function le(e,t,a){await ht(e,t,a,ne)}g(le,"calculateBlockSizes");async function oe(e,t,a){await ht(e,t,a,ce)}g(oe,"insertBlocks");async function he(e,t,a,s,i){const c=new Ge({multigraph:!0,compound:!0});c.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const r of a)r.size&&c.setNode(r.id,{width:r.size.width,height:r.size.height,intersect:r.intersect});for(const r of t)if(r.start&&r.end){const n=s.getBlock(r.start),l=s.getBlock(r.end);if(n?.size&&l?.size){const u=n.size,h=l.size,d=[{x:u.x,y:u.y},{x:u.x+(h.x-u.x)/2,y:u.y+(h.y-u.y)/2},{x:h.x,y:h.y}],b=i?`${i}-${r.id}`:r.id,w=r.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",y=r.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",v=`${w} ${y} flowchart-link LS-a1 LE-b1`;Vr(e,{v:r.start,w:r.end,name:b},{...r,id:b,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:d,classes:v},void 0,"block",c,i),r.label&&(await Hr(e,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:d,classes:v}),Kr({...r,x:d[1].x,y:d[1].y},{originalPath:d}))}}}g(he,"insertEdges");var Ea=g(function(e,t){return t.db.getClasses()},"getClasses"),_a=g(async function(e,t,a,s){const{securityLevel:i,block:c}=rt(),r=s.db;r.setDiagramId(t);let n;i==="sandbox"&&(n=D("#i"+t));const l=i==="sandbox"?D(n.nodes()[0].contentDocument.body):D("body"),u=i==="sandbox"?l.select(`[id="${t}"]`):D(`[id="${t}"]`);Mr(u,["point","circle","cross"],s.type,t);const d=r.getBlocks(),b=r.getBlocksFlat(),w=r.getEdges(),y=u.insert("g").attr("class","block");await le(y,d,r);const v=Qt(r);if(await oe(y,d,r),await he(y,w,b,r,t),v){const S=v,N=Math.max(1,Math.round(.125*(S.width/S.height))),_=S.height+N+10,T=S.width+10,{useMaxWidth:m}=c;Pe(u,_,T,!!m),k.debug("Here Bounds",v,S),u.attr("viewBox",`${S.x-5} ${S.y-5} ${S.width+10} ${S.height+10}`)}},"draw"),Ta={draw:_a,getClasses:Ea},Ca={parser:ar,db:kr,renderer:Ta,styles:Er};export{Ca as diagram};

Xet Storage Details

Size:
73.7 kB
·
Xet hash:
a5306c947c22b743c85b7e13f45537bbd41b0988f118fd823aa234af135a9e71

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.