PageSourceSearch

https://kysely.dev/assets/js/2207.04ccc2f4.js

js kysely.dev collected 2026-10-02 02:59:48 UTC 73,674 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkkysely_site=globalThis.webpackChunkkysely_site||[]).push([[2207],{2207(t,e,r){r.d(e,{diagram:()=>Re});var a=r(7961),i=r(5374),s=r(1494),n=r(9574),o=(r(4634),r(8822)),l=r(3399),c=r(7694),d=r(1248),h=r(8453),g=r(7701),u=r(3781);var y=r(5500);function p(t){if((0,h.s)(t))return t;const e=(0,g.b)(t);if(!function(t){switch((0,g.b)(t)){case u.R_:case u.Uw:case u.cT:case u.iq:case u.$V:case u.vC:case u.ri:case u.ML:case u.XZ:case u.i1:case u._u:case u.pj:case u.kj:case u.GX:case u.Av:case u.NA:case u.OG:case u.VP:case u.Qb:case u.q:case u.x6:case u.ZR:return!0;default:return!1}}(t))return{};if(r=t,Array.isArray(r)){const e=Array.from(t);return t.length>0&&"string"==typeof t[0]&&Object.hasOwn(t,"index")&&(e.index=t.index,e.input=t.input),e}var r;if((0,y.i)(t)){const e=t;return new(0,e.constructor)(e.buffer,e.byteOffset,e.length)}if(e===u.cT)return new ArrayBuffer(t.byteLength);if(e===u.iq){const e=t,r=e.buffer,a=e.byteOffset,i=e.byteLength,s=new ArrayBuffer(i),n=new Uint8Array(r,a,i);return new Uint8Array(s).set(n),new DataView(s)}if(e===u.$V||e===u.kj||e===u.OG){const r=new(0,t.constructor)(t.valueOf());return e===u.OG?function(t,e){const r=e.valueOf().length;for(const a in e)Object.hasOwn(e,a)&&(Number.isNaN(Number(a))||Number(a)>=r)&&(t[a]=e[a])}(r,t):x(r,t),r}if(e===u.vC)return new Date(Number(t));if(e===u.Av){const e=t,r=new RegExp(e.source,e.flags);return r.lastIndex=e.lastIndex,r}if(e===u.VP)return Object(Symbol.prototype.valueOf.call(t));if(e===u.pj){const e=t,r=new Map;return e.forEach((t,e)=>{r.set(e,t)}),r}if(e===u.NA){const e=t,r=new Set;return e.forEach(t=>{r.add(t)}),r}if(e===u.R_){const e=t,r={};return x(r,e),r.length=e.length,r[Symbol.iterator]=e[Symbol.iterator],r}const a={};return function(t,e){const r=Object.getPrototypeOf(e);if(null!==r){"function"==typeof e.constructor&&Object.setPrototypeOf(t,r)}}(a,t),x(a,t),function(t,e){const r=Object.getOwnPropertySymbols(e);for(let a=0;a<r.length;a++){const i=r[a];Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}}(a,t),a}function x(t,e){for(const r in e)Object.hasOwn(e,r)&&(t[r]=e[r])}var b=r(7802),f=r(407),m=r(8882),w=r(781),k=function(){var t=(0,d.K)(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],s=[1,19],n=[1,16],o=[1,17],l=[1,18],c=[8,30],h=[8,10,21,28,29,30,31,39,43,46],g=[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,d.K)(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,d.K)(function(t,e,r,a,i,s,n){var o=s.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: ",s[o-1]),a.setHierarchy(s[o-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: ",s[o]),"number"==typeof s[o].length?this.$=s[o]:this.$=[s[o]];break;case 13:a.getLogger().debug("Rule: statement #2: ",s[o-1]),this.$=[s[o-1]].concat(s[o]);break;case 14:a.getLogger().debug("Rule: link: ",s[o],t),this.$={edgeTypeStr:s[o],label:""};break;case 15:a.getLogger().debug("Rule: LABEL link: ",s[o-3],s[o-1],s[o]),this.$={edgeTypeStr:s[o],label:s[o-1]};break;case 18:const e=parseInt(s[o]),r=a.generateId();this.$={id:r,type:"space",label:"",width:e,children:[]};break;case 23:a.getLogger().debug("Rule: (nodeStatement link node) ",s[o-2],s[o-1],s[o]," typestr: ",s[o-1].edgeTypeStr);const i=a.edgeStrToEdgeData(s[o-1].edgeTypeStr),n=a.edgeStrToEdgeStartData(s[o-1].edgeTypeStr),l=a.edgeStrToThickness(s[o-1].edgeTypeStr),c=a.edgeStrToPattern(s[o-1].edgeTypeStr);
1this.$=[{id:s[o-2].id,label:s[o-2].label,type:s[o-2].type,directions:s[o-2].directions},{id:s[o-2].id+"-"+s[o].id,start:s[o-2].id,end:s[o].id,label:s[o-1].label,type:"edge",thickness:l,pattern:c,directions:s[o].directions,arrowTypeEnd:i,arrowTypeStart:n},{id:s[o].id,label:s[o].label,type:a.typeStr2Type(s[o].typeStr),directions:s[o].directions}];break;case 24:a.getLogger().debug("Rule: nodeStatement (abc88 node size) ",s[o-1],s[o]),this.$={id:s[o-1].id,label:s[o-1].label,type:a.typeStr2Type(s[o-1].typeStr),directions:s[o-1].directions,widthInColumns:parseInt(s[o],10)};break;case 25:a.getLogger().debug("Rule: nodeStatement (node) ",s[o]),this.$={id:s[o].id,label:s[o].label,type:a.typeStr2Type(s[o].typeStr),directions:s[o].directions,widthInColumns:1};break;case 26:a.getLogger().debug("APA123",this?this:"na"),a.getLogger().debug("COLUMNS: ",s[o]),this.$={type:"column-setting",columns:"auto"===s[o]?-1:parseInt(s[o])};break;case 27:a.getLogger().debug("Rule: id-block statement : ",s[o-2],s[o-1]);a.generateId();this.$={...s[o-2],type:"composite",children:s[o-1]};break;case 28:a.getLogger().debug("Rule: blockStatement : ",s[o-2],s[o-1],s[o]);const d=a.generateId();this.$={id:d,type:"composite",label:"",children:s[o-1]};break;case 29:a.getLogger().debug("Rule: node (NODE_ID separator): ",s[o]),this.$={id:s[o]};break;case 30:a.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",s[o-1],s[o]),this.$={id:s[o-1],label:s[o].label,typeStr:s[o].typeStr,directions:s[o].directions};break;case 31:a.getLogger().debug("Rule: dirList: ",s[o]),this.$=[s[o]];break;case 32:a.getLogger().debug("Rule: dirList: ",s[o-1],s[o]),this.$=[s[o-1]].concat(s[o]);break;case 33:a.getLogger().debug("Rule: nodeShapeNLabel: ",s[o-2],s[o-1],s[o]),this.$={typeStr:s[o-2]+s[o],label:s[o-1]};break;case 34:a.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",s[o-3],s[o-2]," #3:",s[o-1],s[o]),this.$={typeStr:s[o-3]+s[o],label:s[o-2],directions:s[o-1]};break;case 35:case 36:this.$={type:"classDef",id:s[o-1].trim(),css:s[o].trim()};break;case 37:this.$={type:"applyClass",id:s[o-1].trim(),styleClass:s[o].trim()};break;case 38:this.$={type:"applyStyles",id:s[o-1].trim(),stylesStr:s[o].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:s,39:n,43:o,46:l},{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:s,39:n,43:o,46:l}),t(h,[2,16],{14:22,15:g,16:u}),t(h,[2,17]),t(h,[2,18]),t(h,[2,19]),t(h,[2,20]),t(h,[2,21]),t(h,[2,22]),t(y,[2,25],{27:[1,25]}),t(h,[2,26]),{19:26,26:12,31:s},{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:s,39:n,43:o,46:l},{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:s},{31:[2,14]},{17:[1,36]},t(y,[2,24]),{10:e,11:37,13:4,14:22,15:g,16:u,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:s,39:n,43:o,46:l},{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(h,[2,28]),t(h,[2,35]),t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),{36:[1,47]},{33:48,34:x},{15:[1,50]},t(h,[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,d.K)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,d.K)(function(t){var e=this,r=[0],a=[],i=[null],s=[],n=this.table,o="",l=0,c=0,h=0,g=s.slice.call(arguments,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;s.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,d.K)(function(t){r.length=r.length-2*t,i.length=i.length-t,s.length=s.length-t},"popStack"),(0,d.K)(f,"lex");for(var m,w,k,S,L,_,E,v,D,R={};;){if(k=r[r.length-1],this.defaultActions[k]?S=this.defaultActions[k]:(null==m&&(m=f()),S=n[k]&&n[k][m]),void 0===S||!S.length||!S[0]){var T="";for(_ in D=[],n[k])this.terminals_[_]&&_>2&&D.push("'"+this.terminals_[_]+"'");T=u.showPosition?"Parse error on line "+(l+1)+":\n"+u.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(T,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:x,expected:D})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+m);switch(S[0]){case 1:r.push(m),i.push(u.yytext),s.push(u.yylloc),r.push(S[1]),m=null,w?(m=w,w=null):(c=u.yyleng,o=u.yytext,l=u.yylineno,x=u.yylloc,h>0&&h--);break;case 2:if(E=this.productions_[S[1]][1],R.$=i[i.length-E],R._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},b&&(R._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),void 0!==(L=this.performAction.apply(R,[o,c,l,y.yy,S[1],i,s].concat(g))))return L;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),s=s.slice(0,-1*E)),r.push(this.productions_[S[1]][0]),i.push(R.$),s.push(R._$),v=n[r[r.length-2]][r[r.length-1]],r.push(v);break;case 3:return!0}}return!0},"parse")},f=function(){return{EOF:1,parseError:(0,d.K)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,d.K)(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,d.K)(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,d.K)(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,d.K)(function(){return this._more=!0,this},"more"),reject:(0,d.K)(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,d.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,d.K)(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,d.K)(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,d.K)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,d.K)(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 s in i)this[s]=i[s];return!1}return!1},"test_match"),next:(0,d.K)(function(){if(this.done)return this.EOF;var t,e,r,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),s=0;s<i.length;s++)if((r=this._input.match(this.rules[i[s]]))&&(!e||r[0].length>e[0].length)){if(e=r,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[s])))return t;if(this._backtrack){e=!1;continue}return!1}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,d.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,d.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,d.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,d.K)(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,d.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,d.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,d.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,d.K)(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 m(){this.yy={}}return b.lexer=f,(0,d.K)(m,"Parser"),m.prototype=b,b.Parser=m,new m}();k.parser=k;var S=k,L=new Map,_=[],E=new Map,v="color",D="fill",R=new Map,T="",K=(0,d.K)(t=>l.Y2.sanitizeText(t,(0,l.D7)()),"sanitizeText"),$=(0,d.K)(function(t,e=""){let r=R.get(t);r||(r={id:t,styles:[],textStyles:[]},R.set(t,r)),null!=e&&e.split(",").forEach(t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(v).exec(t)){const t=e.replace(D,"bgFill").replace(v,D);r.textStyles.push(t)}r.styles.push(e)})},"addStyleClass"),I=(0,d.K)(function(t,e=""){const r=L.get(t);null!=e&&(r.styles=e.split(","))},"addStyle2Node"),N=(0,d.K)(function(t,e){t.split(",").forEach(function(t){let r=L.get(t);if(void 0===r){const e=t.trim();r={id:e,type:"na",children:[]},L.set(e,r)}r.classes||(r.classes=[]),r.classes.push(e)})},"setCssClass"),C=(0,d.K)((t,e)=>{const r=t.flat(),a=[],i=r.find(t=>"column-setting"===t?.type),s=i?.columns??-1;for(const n of r)if("number"==typeof s&&s>0&&"column-setting"!==n.type&&"number"==typeof n.widthInColumns&&n.widthInColumns>s&&c.R.warn(`Block ${n.id} width ${n.widthInColumns} exceeds configured column width ${s}`),n.label&&(n.label=K(n.label)),"classDef"!==n.type)if("applyClass"!==n.type)if("applyStyles"!==n.type)if("column-setting"===n.type)e.columns=n.columns??-1;else if("edge"===n.type){const t=(E.get(n.id)??0)+1;E.set(n.id,t),n.id=t+"-"+n.id,_.push(n)}else{n.label||("composite"===n.type?n.label="":n.label=n.id);const t=L.get(n.id);if(void 0===t?L.set(n.id,n):("na"!==n.type&&(t.type=n.type),n.label!==n.id&&(t.label=n.label)),n.children&&C(n.children,n),"space"===n.type){const t=n.width??1;for(let e=0;e<t;e++){const t=p(n);t.id=t.id+"-"+e,L.set(t.id,t),a.push(t)}}else void 0===t&&a.push(n)}else n?.stylesStr&&I(n.id,n?.stylesStr);else N(n.id,n?.styleClass??"");else $(n.id,n.css);e.children=a},"populateBlockDatabase"),O=[],B={id:"root",type:"composite",children:[],columns:-1},z=(0,d.K)(()=>{c.R.debug("Clear called"),(0,l.IU)(),B={id:"root",type:"composite",children:[],columns:-1},L=new Map([["root",B]]),O=[],R=new Map,_=[],E=new Map,T=""},"clear");function A(t){switch(c.R.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return c.R.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 M(t){return c.R.debug("typeStr2Type",t),"=="===t?"thick":"normal"}function P(t){switch(t.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function Y(t){switch(t.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}function W(t){return t.includes("==")?"thick":"normal"}function X(t){return t.includes(".-")?"dotted":"solid"}(0,d.K)(A,"typeStr2Type"),(0,d.K)(M,"edgeTypeStr2Type"),(0,d.K)(P,"edgeStrToEdgeData"),(0,d.K)(Y,"edgeStrToEdgeStartData"),(0,d.K)(W,"edgeStrToThickness"),(0,d.K)(X,"edgeStrToPattern");var F=0,j=(0,d.K)(()=>(F++,"id-"+Math.random().toString(36).substr(2,12)+"-"+F),"generateId"),U=(0,d.K)(t=>{B.children=t,C(t,B),O=B.children},"setHierarchy"),H=(0,d.K)(t=>{const e=L.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),q=(0,d.K)(()=>[...L.values()],"getBlocksFlat"),Z=(0,d.K)(()=>O||[],"getBlocks"),G=(0,d.K)(()=>_,"getEdges"),V=(0,d.K)(t=>L.get(t),"getBlock"),J=(0,d.K)(t=>{L.set(t.id,t)},"setBlock"),Q=(0,d.K)(t=>{T=t}
1,"setDiagramId"),tt=(0,d.K)(()=>T,"getDiagramId"),et=(0,d.K)(()=>c.R,"getLogger"),rt=(0,d.K)(function(){return R},"getClasses"),at={getConfig:(0,d.K)(()=>(0,l.zj)().block,"getConfig"),typeStr2Type:A,edgeTypeStr2Type:M,edgeStrToEdgeData:P,edgeStrToEdgeStartData:Y,edgeStrToThickness:W,edgeStrToPattern:X,getLogger:et,getBlocksFlat:q,getBlocks:Z,getEdges:G,setHierarchy:U,getBlock:V,setBlock:J,getColumns:H,getClasses:rt,clear:z,generateId:j,setDiagramId:Q,getDiagramId:tt},it=(0,d.K)((t,e)=>{const r=b.A,a=r(t,"r"),i=r(t,"g"),s=r(t,"b");return f.A(a,i,s,e)},"fade"),st=(0,d.K)(t=>`.label {\n    font-family: ${t.fontFamily};\n    color: ${t.nodeTextColor||t.textColor};\n  }\n  .cluster-label text {\n    fill: ${t.titleColor};\n  }\n  .cluster-label span,p {\n    color: ${t.titleColor};\n  }\n\n\n\n  .label text,span,p {\n    fill: ${t.nodeTextColor||t.textColor};\n    color: ${t.nodeTextColor||t.textColor};\n  }\n\n  .node rect,\n  .node circle,\n  .node ellipse,\n  .node polygon,\n  .node path {\n    fill: ${t.mainBkg};\n    stroke: ${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: ${t.arrowheadColor};\n  }\n\n  .edgePath .path {\n    stroke: ${t.lineColor};\n    stroke-width: 2.0px;\n  }\n\n  .flowchart-link {\n    stroke: ${t.lineColor};\n    fill: none;\n  }\n\n  .edgeLabel {\n    background-color: ${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: ${t.edgeLabelBackground};\n      fill: ${t.edgeLabelBackground};\n    }\n    text-align: center;\n  }\n\n  /* For html labels only */\n  .labelBkg {\n    background-color: ${t.edgeLabelBackground};\n  }\n\n  .node .cluster {\n    // fill: ${it(t.mainBkg,.5)};\n    fill: ${it(t.clusterBkg,.5)};\n    stroke: ${it(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: ${t.titleColor};\n  }\n\n  .cluster span,p {\n    color: ${t.titleColor};\n  }\n  /* .cluster div {\n    color: ${t.titleColor};\n  } */\n\n  div.mermaidTooltip {\n    position: absolute;\n    text-align: center;\n    max-width: 200px;\n    padding: 2px;\n    font-family: ${t.fontFamily};\n    font-size: 12px;\n    background: ${t.tertiaryColor};\n    border: 1px solid ${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: ${t.textColor};\n  }\n  ${(0,a.o)()}\n`,"getStyles"),nt=(0,d.K)((t,e,r,a)=>{e.forEach(e=>{ot[e](t,r,a)})},"insertMarkers"),ot={extension:(0,d.K)((t,e,r)=>{c.R.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"),composition:(0,d.K)((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"),aggregation:(0,d.K)((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"),dependency:(0,d.K)((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"),lollipop:(0,d.K)((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"),point:(0,d.K)((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,d.K)((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,d.K)((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,d.K)((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")},lt=nt;function ct(t,e){if(0===t||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);if(t<0)return{px:e,py:0};if(1===t)return{px:0,py:e};return{px:e%t,py:Math.floor(e/t)}}(0,d.K)(ct,"calculateBlockPosition");var dt=(0,d.K)(t=>{let e=0,r=0;for(const a of t.children){const{width:t,height:i,x:s,y:n}=a.size??{width:0,height:0,x:0,y:0};if(c.R.debug("getMaxChildSize abc95 child:",a.id,"width:",t,"height:",i,"x:",s,"y:",n,a.type),"space"===a.type)continue;const o=t/(a.widthInColumns??1);o>e&&(e=o),i>r&&(r=i)}return{width:e,height:r}},"getMaxChildSize");function ht(t,e,r=0,a=0,i=8){c.R.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"siblingWidth",r),t?.size?.width||(t.size={width:r,height:a,x:0,y:0});let s=0,n=0;if(t.children?.length>0){for(const r of t.children)ht(r,e,0,0,i);const o=dt(t);s=o.width,n=o.height,c.R.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",s,n);for(const e of t.children)e.size&&(c.R.debug(`abc95 Setting size of children of ${t.id} id=${e.id} ${s} ${n} ${JSON.stringify(e.size)}`),e.size.width=s*(e.widthInColumns??1)+i*((e.widthInColumns??1)-1),e.size.height=n,e.size.x=0,e.size.y=0,c.R.debug(`abc95 updating size of ${t.id} children child:${e.id} maxWidth:${s} maxHeight:${n}`));for(const r of t.children)ht(r,e,s,n,i);const l=t.columns??-1;let d=0;for(const e of t.children)d+=e.widthInColumns??1;let h=t.children.length;l>0&&l<d&&(h=l);const g=Math.ceil(d/h);let u=h*(s+i)+i,y=g*(n+i)+i;if(u<r){c.R.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${r} siblingHeight ${a} width ${u}`),u=r,y=a;const e=(r-h*i-i)/h,o=(a-g*i-i)/g;c.R.debug("Size indata abc88",t.id,"childWidth",e,"maxWidth",s),c.R.debug("Size indata abc88",t.id,"childHeight",o,"maxHeight",n),c.R.debug("Size indata abc88 xSize",h,"padding",i
1);for(const r of t.children)r.size&&(r.size.width=e,r.size.height=o,r.size.x=0,r.size.y=0)}if(c.R.debug(`abc95 (finale calc) ${t.id} xSize ${h} ySize ${g} columns ${l}${t.children.length} width=${Math.max(u,t.size?.width||0)}`),u<(t?.size?.width||0)){u=t?.size?.width||0;const e=l>0?Math.min(t.children.length,l):t.children.length;if(e>0){const r=(u-e*i-i)/e;c.R.debug("abc95 (growing to fit) width",t.id,u,t.size?.width,r);for(const e of t.children)e.size&&(e.size.width=r)}}t.size={width:u,height:y,x:0,y:0}}c.R.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function gt(t,e,r=8){c.R.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);const a=t.columns??-1;if(c.R.debug("layoutBlocks columns abc95",t.id,"=>",a,t),t.children&&t.children.length>0){const i=t?.children[0]?.size?.width??0,s=t.children.length*i+(t.children.length-1)*r;c.R.debug("widthOfChildren 88",s,"posX");const n=new Map;{let e=0;for(const r of t.children){if(!r.size)continue;const{py:t}=ct(a,e),i=n.get(t)??0;r.size.height>i&&n.set(t,r.size.height);let s=r?.widthInColumns??1;a>0&&(s=Math.min(s,a-e%a)),e+=s}}const o=new Map;{let t=0;const e=[...n.keys()].sort((t,e)=>t-e);for(const a of e)o.set(a,t),t+=(n.get(a)??0)+r}let l=0;c.R.debug("abc91 block?.size?.x",t.id,t?.size?.x);let d=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-r,h=0;for(const g of t.children){const i=t;if(!g.size)continue;const{width:s,height:u}=g.size,{px:y,py:p}=ct(a,l);if(p!=h&&(h=p,d=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-r,c.R.debug("New row in layout for block",t.id," and child ",g.id,h)),c.R.debug(`abc89 layout blocks (child) id: ${g.id} Pos: ${l} (px, py) ${y},${p} (${i?.size?.x},${i?.size?.y}) parent: ${i.id} width: ${s}${r}`),i.size){const t=s/2;g.size.x=d+r+t,c.R.debug(`abc91 layout blocks (calc) px, pyid:${g.id} startingPos=X${d} new startingPosX${g.size.x} ${t} padding=${r} width=${s} halfWidth=${t} => x:${g.size.x} y:${g.size.y} ${g.widthInColumns} (width * (child?.w || 1)) / 2 ${s*(g?.widthInColumns??1)/2}`),d=g.size.x+t;const e=o.get(p)??0,a=n.get(p)??u;g.size.y=i.size.y-i.size.height/2+e+a/2+r,c.R.debug(`abc88 layout blocks (calc) px, pyid:${g.id}startingPosX${d}${r}${t}=>x:${g.size.x}y:${g.size.y}${g.widthInColumns}(width * (child?.w || 1)) / 2${s*(g?.widthInColumns??1)/2}`)}g.children&&gt(g,e,r);let x=g?.widthInColumns??1;a>0&&(x=Math.min(x,a-l%a)),l+=x,c.R.debug("abc88 columnsPos",g,l)}}c.R.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}function ut(t,{minX:e,minY:r,maxX:a,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&"root"!==t.id){const{x:s,y:n,width:o,height:l}=t.size;s-o/2<e&&(e=s-o/2),n-l/2<r&&(r=n-l/2),s+o/2>a&&(a=s+o/2),n+l/2>i&&(i=n+l/2)}if(t.children)for(const s of t.children)({minX:e,minY:r,maxX:a,maxY:i}=ut(s,{minX:e,minY:r,maxX:a,maxY:i}));return{minX:e,minY:r,maxX:a,maxY:i}}function yt(t){const e=t.getBlock("root");if(!e)return;const r=(0,l.D7)()?.block?.padding??8;ht(e,t,0,0,r),gt(e,t,r),c.R.debug("getBlocks",JSON.stringify(e,null,2));const{minX:a,minY:i,maxX:s,maxY:n}=ut(e);return{x:a,y:i,width:s-a,height:n-i}}(0,d.K)(ht,"setBlockSizes"),(0,d.K)(gt,"layoutBlocks"),(0,d.K)(ut,"findBounds"),(0,d.K)(yt,"layout");var pt=(0,d.K)(async(t,e,r,a=!1,i=!1)=>{let s=e||"";"object"==typeof s&&(s=s[0]);const o=(0,l.D7)(),c=(0,l.E)(o);return await(0,n.G)(t,s,{style:r,isTitle:a,useHtmlLabels:c,markdown:!1,isNode:i,width:Number.POSITIVE_INFINITY},o)},"createLabel"),xt=(0,d.K)((t,e,r,a,i)=>{e.arrowTypeStart&&ft(t,"start",e.arrowTypeStart,r,a,i),e.arrowTypeEnd&&ft(t,"end",e.arrowTypeEnd,r,a,i)},"addEdgeMarkers"),bt={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},ft=(0,d.K)((t,e,r,a,i,s)=>{const n=bt[r];if(!n)return void c.R.warn(`Unknown arrow type: ${r}`);const o="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${a}#${i}_${s}-${n}${o})`)},"addEdgeMarker"),mt={},wt={},kt=(0,d.K)(async(t,e)=>{const r=(0,l.D7)(),a=(0,l.E)(r),s=t.insert("g").attr("class","edgeLabel"),o=s.insert("g").attr("class","label"),c="markdown"===e.labelType,d=await(0,n.G)(t,e.label,{style:e.labelStyle,useHtmlLabels:a,addSvgBackgroun
1d:c,isNode:!1,markdown:c,width:c?void 0:Number.POSITIVE_INFINITY},r);o.node().appendChild(d);let h,g=d.getBBox(),u=g;if(a){const t=d.children[0],e=(0,m.Ltv)(d);g=t.getBoundingClientRect(),u=g,e.attr("width",g.width),e.attr("height",g.height)}else{const t=(0,m.Ltv)(d).select("text").node();t&&"function"==typeof t.getBBox&&(u=t.getBBox())}if(o.attr("transform",(0,i.Wg)(u,a)),mt[e.id]=s,e.width=g.width,e.height=g.height,e.startLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),s=r.insert("g").attr("class","inner"),n=await pt(s,e.startLabelLeft,e.labelStyle);h=n;let o=n.getBBox();if(a){const t=n.children[0],e=(0,m.Ltv)(n);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}s.attr("transform",(0,i.Wg)(o,a)),wt[e.id]||(wt[e.id]={}),wt[e.id].startLeft=r,St(h,e.startLabelLeft)}if(e.startLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),s=r.insert("g").attr("class","inner"),n=await pt(s,e.startLabelRight,e.labelStyle);h=n;let o=n.getBBox();if(a){const t=n.children[0],e=(0,m.Ltv)(n);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}s.attr("transform",(0,i.Wg)(o,a)),wt[e.id]||(wt[e.id]={}),wt[e.id].startRight=r,St(h,e.startLabelRight)}if(e.endLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),s=r.insert("g").attr("class","inner"),n=await pt(r,e.endLabelLeft,e.labelStyle);h=n;let o=n.getBBox();if(a){const t=n.children[0],e=(0,m.Ltv)(n);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}s.attr("transform",(0,i.Wg)(o,a)),wt[e.id]||(wt[e.id]={}),wt[e.id].endLeft=r,St(h,e.endLabelLeft)}if(e.endLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),s=r.insert("g").attr("class","inner"),n=await pt(r,e.endLabelRight,e.labelStyle);h=n;let o=n.getBBox();if(a){const t=n.children[0],e=(0,m.Ltv)(n);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}s.attr("transform",(0,i.Wg)(o,a)),wt[e.id]||(wt[e.id]={}),wt[e.id].endRight=r,St(h,e.endLabelRight)}return d},"insertEdgeLabel");function St(t,e){(0,l.E)((0,l.D7)())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,d.K)(St,"setTerminalWidth");var Lt=(0,d.K)((t,e)=>{c.R.debug("Moving label abc88 ",t.id,t.label,mt[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath;const a=(0,l.D7)(),{subGraphTitleTotalMargin:i}=(0,s.O)(a);if(t.label){const a=mt[t.id];let s=t.x,n=t.y;if(r){const a=o._K.calcLabelPosition(r);c.R.debug("Moving label "+t.label+" from (",s,",",n,") to (",a.x,",",a.y,") abc88"),e.updatedPath&&(s=a.x,n=a.y)}a.attr("transform",`translate(${s}, ${n+i/2})`)}if(t.startLabelLeft){const e=wt[t.id].startLeft;let a=t.x,i=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.startLabelRight){const e=wt[t.id].startRight;let a=t.x,i=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.endLabelLeft){const e=wt[t.id].endLeft;let a=t.x,i=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.endLabelRight){const e=wt[t.id].endRight;let a=t.x,i=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}},"positionEdgeLabel"),_t=(0,d.K)((t,e)=>{const r=t.x,a=t.y,i=Math.abs(e.x-r),s=Math.abs(e.y-a),n=t.width/2,o=t.height/2;return i>=n||s>=o},"outsideNode"),Et=(0,d.K)((t,e,r)=>{c.R.debug(`intersection calc abc89:\n  outsidePoint: ${JSON.stringify(e)}\n  insidePoint : ${JSON.stringify(r)}\n  node        : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const a=t.x,i=t.y,s=Math.abs(a-r.x),n=t.width/2;let o=r.x<e.x?n-s:n+s;const l=t.height/2,d=Math.abs(e.y-r.y),h=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*n>Math.abs(a-e.x)*l){let t=r.y<e.y?e.y-l-i:i-l-e.y;o=h*t/d;const a={x:r.x<e.x?r.x+o:r.x-h+o,y:r.y<e.y?r.y+d-t:r.y-d+t};return 0===o&&(a.x=e.x,a.y=e.y),0===h&&(a.x=e.x),0===d&&(a.y=e.y),c.R.debug(`abc89 topp/bott calc, Q ${d}, q ${t}, R ${h}, r ${o}`,a),a}{o=r.x<e.x?e.x-n-a:a-n-e.x;let t=d*o/h,i=r.x<e.x?r.x+h-o:r.x-h+o,s=r.y<e.y?r.y+t:r.y-t;return c.R.debug(`sides calc abc89, Q ${d}, q ${t}, R ${h}, r ${o}`,{_x:i,_y:s}),0===o&&(i=e.x,s=e.y),0===h&&(i=e.x),0===d&&(s=e.y),{x:i,y:s}}},"intersection"),vt=(0,d.K)((t,e)=>{c.R.debug("abc88 cutPathAtIntersect",t,e);let r=[],a=t[0],i=!1;return t.forEach(t=>{if(_t(e,t)||i)a=t,i||r.push(t);else{const s=Et(e,a,t);let n=!1;r.forEach(t=>{n=n||t.x===s.x&&t.y===s.y}
1),r.some(t=>t.x===s.x&&t.y===s.y)||r.push(s),i=!0}}),r},"cutPathAtIntersect"),Dt=(0,d.K)(function(t,e,r,a,s,n,o){let d=r.points;c.R.debug("abc88 InsertEdge: edge=",r,"e=",e);let h=!1;const g=n.node(e.v);var u=n.node(e.w);u?.intersect&&g?.intersect&&(d=d.slice(1,r.points.length-1),d.unshift(g.intersect(d[0])),d.push(u.intersect(d[d.length-1]))),r.toCluster&&(c.R.debug("to cluster abc88",a[r.toCluster]),d=vt(r.points,a[r.toCluster].node),h=!0),r.fromCluster&&(c.R.debug("from cluster abc88",a[r.fromCluster]),d=vt(d.reverse(),a[r.fromCluster].node).reverse(),h=!0);const y=d.filter(t=>!Number.isNaN(t.y));let p=m.qrM;!r.curve||"graph"!==s&&"flowchart"!==s||(p=r.curve);const{x:x,y:b}=(0,i.RI)(r),f=(0,m.n8j)().x(x).y(b).curve(p);let w;switch(r.thickness){case"normal":w="edge-thickness-normal";break;case"thick":case"invisible":w="edge-thickness-thick";break;default:w=""}switch(r.pattern){case"solid":w+=" edge-pattern-solid";break;case"dotted":w+=" edge-pattern-dotted";break;case"dashed":w+=" edge-pattern-dashed"}const k=t.append("path").attr("d",f(y)).attr("id",r.id).attr("class"," "+w+(r.classes?" "+r.classes:"")).attr("style",r.style);let S="";((0,l.D7)().flowchart.arrowMarkerAbsolute||(0,l.D7)().state.arrowMarkerAbsolute)&&(S=(0,l.ID)(!0)),xt(k,r,S,o,s);let L={};return h&&(L.updatedPath=d),L.originalPath=r.points,L},"insertEdge"),Rt=(0,d.K)(t=>{const e=new Set;for(const 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"),Tt=(0,d.K)((t,e,r,a)=>{const i=Rt(t),s=e.height+2*r.padding,n=s/2,o=a??e.width+2*n+r.padding,l=r.padding/2;return i.has("right")&&i.has("left")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:n,y:0},{x:o/2,y:2*l},{x:o-n,y:0},{x:o,y:0},{x:o,y:-s/3},{x:o+2*l,y:-s/2},{x:o,y:-2*s/3},{x:o,y:-s},{x:o-n,y:-s},{x:o/2,y:-s-2*l},{x:n,y:-s},{x:0,y:-s},{x:0,y:-2*s/3},{x:-2*l,y:-s/2},{x:0,y:-s/3}]:i.has("right")&&i.has("left")&&i.has("up")?[{x:n,y:0},{x:o-n,y:0},{x:o,y:-s/2},{x:o-n,y:-s},{x:n,y:-s},{x:0,y:-s/2}]:i.has("right")&&i.has("left")&&i.has("down")?[{x:0,y:0},{x:n,y:-s},{x:o-n,y:-s},{x:o,y:0}]:i.has("right")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:o,y:-n},{x:o,y:-s+n},{x:0,y:-s}]:i.has("left")&&i.has("up")&&i.has("down")?[{x:o,y:0},{x:0,y:-n},{x:0,y:-s+n},{x:o,y:-s}]:i.has("right")&&i.has("left")?[{x:n,y:0},{x:n,y:-l},{x:o-n,y:-l},{x:o-n,y:0},{x:o,y:-s/2},{x:o-n,y:-s},{x:o-n,y:-s+l},{x:n,y:-s+l},{x:n,y:-s},{x:0,y:-s/2}]:i.has("up")&&i.has("down")?[{x:o/2,y:0},{x:0,y:-l},{x:n,y:-l},{x:n,y:-s+l},{x:0,y:-s+l},{x:o/2,y:-s},{x:o,y:-s+l},{x:o-n,y:-s+l},{x:o-n,y:-l},{x:o,y:-l}]:i.has("right")&&i.has("up")?[{x:0,y:0},{x:o,y:-n},{x:0,y:-s}]:i.has("right")&&i.has("down")?[{x:0,y:0},{x:o,y:0},{x:0,y:-s}]:i.has("left")&&i.has("up")?[{x:o,y:0},{x:0,y:-n},{x:o,y:-s}]:i.has("left")&&i.has("down")?[{x:o,y:0},{x:0,y:0},{x:o,y:-s}]:i.has("right")?[{x:n,y:-l},{x:n,y:-l},{x:o-n,y:-l},{x:o-n,y:0},{x:o,y:-s/2},{x:o-n,y:-s},{x:o-n,y:-s+l},{x:n,y:-s+l},{x:n,y:-s+l}]:i.has("left")?[{x:n,y:0},{x:n,y:-l},{x:o-n,y:-l},{x:o-n,y:-s+l},{x:n,y:-s+l},{x:n,y:-s},{x:0,y:-s/2}]:i.has("up")?[{x:n,y:-l},{x:n,y:-s+l},{x:0,y:-s+l},{x:o/2,y:-s},{x:o,y:-s+l},{x:o-n,y:-s+l},{x:o-n,y:-l}]:i.has("down")?[{x:o/2,y:0},{x:0,y:-l},{x:n,y:-l},{x:n,y:-s+l},{x:o-n,y:-s+l},{x:o-n,y:-l},{x:o,y:-l}]:[{x:0,y:0}]},"getArrowPoints");function Kt(t,e){return t.intersect(e)}(0,d.K)(Kt,"intersectNode");var $t=Kt;function It(t,e,r,a){var i=t.x,s=t.y,n=i-a.x,o=s-a.y,l=Math.sqrt(e*e*o*o+r*r*n*n),c=Math.abs(e*r*n/l);a.x<i&&(c=-c);var d=Math.abs(e*r*o/l);return a.y<s&&(d=-d),{x:i+c,y:s+d}}(0,d.K)(It,"intersectEllipse");var Nt=It;function Ct(t,e,r){return Nt(t,e,e,r)}(0,d.K)(Ct,"intersectCircle");var Ot=Ct;function Bt(t,e,r,a){var i,s,n,o,l,c,d,h,g,u,y,p,x;if(i=e.y-t.y,n=t.x-e.x,l=e.x*t.y-t.x*e.y,g=i*r.x+n*r.y+l,u=i*a.x+n*a.y+l,!(0!==g&&0!==u&&zt(g,u)||(s=a.y-r.y,o=r.x-a.x,c=a.x*r.y-r.x*a.y,d=s*t.x+o*t.y+c,h=s*e.x+o*e.y+c,0!==d&&0!==h&&zt(d,h)||0===(y=i*o-s*n))))return p=Math.abs(y/2),{x:(x=n*c-o*l)<0?(x-p)/y:(x+p)/y,y:(x=s*l-i*c)<0?(x-p)/y:(x+p)/y}}function zt(t,e){return t*e>0}(0,d.K)(Bt,"intersectLine"),(0,d.K)(zt,"sameSign");var At=Bt,Mt=Pt;function Pt(t,e,r){var a=t.x,i=t.y,s=[],n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){n=Math.min(n,t.x),o=Math.min(o,t.y)}):(n=Math.min(n,e.x),o=Math.min(o,e.y));for(var l=a-t.width/2-n,c=i-t.height/2-o,d=0;d<e.length;d++){var h=e[d],g=e[d<e.length-1?d+1:0],u=At(t,r,{x:l+h.x,y:c+h.y},{x:l+g.x,y:c+g.y});u&&s.push(u)}return s.length?(s.length>1&&s.sort(function(t,e){var a=t.x-r.x,i=t.y-r.y,s=Math.sqrt(a*a+i*i),n=e.x-r.x,o=e.
1y-r.y,l=Math.sqrt(n*n+o*o);return s<l?-1:s===l?0:1}),s[0]):t}(0,d.K)(Pt,"intersectPolygon");var Yt={node:$t,circle:Ot,ellipse:Nt,polygon:Mt,rect:(0,d.K)((t,e)=>{var r,a,i=t.x,s=t.y,n=e.x-i,o=e.y-s,l=t.width/2,c=t.height/2;return Math.abs(o)*l>Math.abs(n)*c?(o<0&&(c=-c),r=0===o?0:c*n/o,a=c):(n<0&&(l=-l),r=l,a=0===n?0:l*o/n),{x:i+r,y:s+a}},"intersectRect")},Wt=(0,d.K)(async(t,e,r,a)=>{const i=(0,l.D7)();let c;const d=e.useHtmlLabels||(0,l.E)(i);c=r||"node default";const h=t.insert("g").attr("class",c).attr("id",e.domId||e.id),g=h.insert("g").attr("class","label").attr("style",e.labelStyle);let u,y;u=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0],y="markdown"===e.labelType?(0,n.G)(g,(0,l.jZ)((0,o.Sm)(u),i),{useHtmlLabels:d,width:e.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):await pt(g,(0,l.jZ)((0,o.Sm)(u),i),e.labelStyle,!1,a);let p=y.getBBox();const x=e.padding/2;if((0,l.E)(i)){const t=y.children[0],e=(0,m.Ltv)(y);await(0,s.X)(t,u),p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return d?g.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):g.attr("transform","translate(0, "+-p.height/2+")"),e.centerLabel&&g.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),g.insert("rect",":first-child"),{shapeSvg:h,bbox:p,halfPadding:x,label:g}},"labelHelper"),Xt=(0,d.K)((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds");function Ft(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,d.K)(Ft,"insertPolygonShape");var jt=(0,d.K)(async(t,e)=>{e.useHtmlLabels||(0,l.E)((0,l.D7)())||(e.centerLabel=!0);const{shapeSvg:r,bbox:a,halfPadding:i}=await Wt(t,e,"node "+e.classes,!0);c.R.info("Classes = ",e.classes);const s=r.insert("rect",":first-child");return s.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),Xt(e,s),e.intersect=function(t){return Yt.rect(e,t)},r},"note"),Ut=(0,d.K)(t=>t?" "+t:"","formatClass"),Ht=(0,d.K)((t,e)=>`${e||"node default"}${Ut(t.classes)} ${Ut(t.class)}`,"getClassesFromNode"),qt=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Wt(t,e,Ht(e,void 0),!0),i=a.width+e.padding+(a.height+e.padding),s=[{x:i/2,y:0},{x:i,y:-i/2},{x:i/2,y:-i},{x:0,y:-i/2}];c.R.info("Question main (Circle)");const n=Ft(r,i,i,s);return n.attr("style",e.style),Xt(e,n),e.intersect=function(t){return c.R.warn("Intersect called"),Yt.polygon(e,s,t)},r},"question"),Zt=(0,d.K)((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return r.insert("polygon",":first-child").attr("points",a.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 Yt.circle(e,14,t)},r},"choice"),Gt=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Wt(t,e,Ht(e,void 0),!0),i=e.positioned?e.height:a.height+e.padding,s=i/4,n=e.positioned?e.width:a.width+2*s+e.padding,o=[{x:s,y:0},{x:n-s,y:0},{x:n,y:-i/2},{x:n-s,y:-i},{x:s,y:-i},{x:0,y:-i/2}],l=Ft(r,n,i,o);return l.attr("style",e.style),Xt(e,l),e.intersect=function(t){return Yt.polygon(e,o,t)},r},"hexagon"),Vt=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Wt(t,e,void 0,!0),i=a.height+2*e.padding,s=i/2,n=a.width+2*s+e.padding,o=e.positioned&&(e.widthInColumns??1)>1&&e.width>n?e.width:n,l=Tt(e.directions,a,e,o),c=Ft(r,o,i,l);return c.attr("style",e.style),Xt(e,c),e.intersect=function(t){return Yt.polygon(e,l,t)},r},"block_arrow"),Jt=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Wt(t,e,Ht(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:-s/2,y:0},{x:i,y:0},{x:i,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}];return Ft(r,i,s,n).attr("style",e.style),e.width=i+s,e.height=s,e.intersect=function(t){return Yt.polygon(e,n,t)},r},"rect_left_inv_arrow"),Qt=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Wt(t,e,Ht(e),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:-2*s/6,y:0},{x:i-s/6,y:0},{x:i+2*s/6,y:-s},{x:s/6,y:-s}],o=Ft(r,i,s,n);return o.attr("style",e.style),Xt(e,o),e.intersect=function(t){return Yt.polygon(e,n,t)},r},"lean_right"),te=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Wt(t,e,Ht(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:2*s/6,y:0},{x:i+s/6,y:0},{x:i-2*s/6,y:-s},{x:-s/6,y:-s}],o=Ft(r,i,s,n);return o.attr("style",e.style),Xt(e,o),e.intersect=function(t){return Yt.polygon(e,n,t)},r},"lean_left"),ee=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Wt(t,e,Ht(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:-2*s/6,y:0},{x:i+2*s/6,y:0},{x:i-s/6,y:-s},{x:s/6,y:-s}],o=Ft(r,i,s,n);return o.attr("style",e.style),Xt(e,o),e.intersect=function(t){return Yt.polygon(e,n,t)},r},"trapezoid"),re=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Wt(t,e,Ht(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:s/6,y:0},{x:i-s/6,y:0},{x:i+2*s/6,y:-s},{x:-2*s/6,y:-s}],o=Ft(r,i,s,n);return o.attr("style",e.style),Xt(e,o),e.intersect=function(t){return Yt.polygon(e,n,t)},r},"inv_trapezoid"),ae=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Wt(t,e,Ht(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:0,y:0},{x:i+s/2,y:0},{x:i,y:-s/2},{x:i+s/2,y:-s},{x:0,y:-s}],o=Ft(r,i,s,n);return o.attr("style",e.style),Xt(e,o),e.intersect=function(t){return Yt.polygon(e,n,t)},r},"rect_right_inv_arrow"),ie=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Wt(t,e,Ht(e,void 0),!0),i=a.width+e.padding,s=i/2,n=s/(2.5+i/50),o=a.height+n+e.padding,l="M 0,"+n+" a "+s+","+n+" 0,0,0 "+i+" 0 a "+s+","+n+" 0,0,0 "+-i+" 0 l 0,"+o+" a "+s+","+n+" 0,0,0 "+i+" 0 l 0,"+-o,c=r.attr("label-offset-y",n).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-i/2+","+-(o/2+n)+")");return Xt(e,c),e.intersect=function(t){const r=Yt.rect(e,t),a=r.x-e.x;if(0!=s&&(Math.abs(a)<e.width/2||Math.abs(a)==e.width/2&&Math.abs(r.y-e.y)>e.height/2-n)){let i=n*n*(1-a*a/(s*s));0!=i&&(i=Math.sqrt(i)),i=n-i,t.y-e.y>
10&&(i=-i),r.y+=i}return r},r},"cylinder"),se=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await Wt(t,e,"node "+e.classes+" "+e.class,!0),s=r.insert("rect",":first-child"),n=e.positioned?e.width:a.width+e.padding,o=e.positioned?e.height:a.height+e.padding,l=e.positioned?-n/2:-a.width/2-i,d=e.positioned?-o/2:-a.height/2-i;if(s.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",d).attr("width",n).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(le(s,e.props.borders,n,o),t.delete("borders")),t.forEach(t=>{c.R.warn(`Unknown node property ${t}`)})}return Xt(e,s),e.intersect=function(t){return Yt.rect(e,t)},r},"rect"),ne=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await Wt(t,e,"node "+e.classes,!0),s=r.insert("rect",":first-child"),n=e.positioned?e.width:a.width+e.padding,o=e.positioned?e.height:a.height+e.padding,l=e.positioned?-n/2:-a.width/2-i,d=e.positioned?-o/2:-a.height/2-i;if(s.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",d).attr("width",n).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(le(s,e.props.borders,n,o),t.delete("borders")),t.forEach(t=>{c.R.warn(`Unknown node property ${t}`)})}return Xt(e,s),e.intersect=function(t){return Yt.rect(e,t)},r},"composite"),oe=(0,d.K)(async(t,e)=>{const{shapeSvg:r}=await Wt(t,e,"label",!0);c.R.trace("Classes = ",e.class);const a=r.insert("rect",":first-child");if(a.attr("width",0).attr("height",0),r.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(le(a,e.props.borders,0,0),t.delete("borders")),t.forEach(t=>{c.R.warn(`Unknown node property ${t}`)})}return Xt(e,a),e.intersect=function(t){return Yt.rect(e,t)},r},"labelRect");function le(t,e,r,a){const i=[],s=(0,d.K)(t=>{i.push(t,0)},"addBorder"),n=(0,d.K)(t=>{i.push(0,t)},"skipBorder");e.includes("t")?(c.R.debug("add top border"),s(r)):n(r),e.includes("r")?(c.R.debug("add right border"),s(a)):n(a),e.includes("b")?(c.R.debug("add bottom border"),s(r)):n(r),e.includes("l")?(c.R.debug("add left border"),s(a)):n(a),t.attr("stroke-dasharray",i.join(" "))}(0,d.K)(le,"applyNodePropertyBorders");var ce=(0,d.K)(async(t,e)=>{let r;r=e.classes?"node "+e.classes:"node default";const a=t.insert("g").attr("class",r).attr("id",e.domId||e.id),i=a.insert("rect",":first-child"),s=a.insert("line"),n=a.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText;let d="";d="object"==typeof o?o[0]:o,c.R.info("Label text abc79",d,o,"object"==typeof o);const h=await pt(n,d,e.labelStyle,!0,!0);let g={width:0,height:0};if((0,l.E)((0,l.D7)())){const t=h.children[0],e=(0,m.Ltv)(h);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}c.R.info("Text 2",o);const u=o.slice(1,o.length);let y=h.getBBox();const p=await pt(n,u.join?u.join("<br/>"):u,e.labelStyle,!0,!0);if((0,l.E)((0,l.D7)())){const t=p.children[0],e=(0,m.Ltv)(p);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}const x=e.padding/2;return(0,m.Ltv)(p).attr("transform","translate( "+(g.width>y.width?0:(y.width-g.width)/2)+", "+(y.height+x+5)+")"),(0,m.Ltv)(h).attr("transform","translate( "+(g.width<y.width?0:-(y.width-g.width)/2)+", 0)"),g=n.node().getBBox(),n.attr("transform","translate("+-g.width/2+", "+(-g.height/2-x+3)+")"),i.attr("class","outer title-state").attr("x",-g.width/2-x).attr("y",-g.height/2-x).attr("width",g.width+e.padding).attr("height",g.height+e.padding),s.attr("class","divider").attr("x1",-g.width/2-x).attr("x2",g.width/2+x).attr("y1",-g.height/2-x+y.height+x).attr("y2",-g.height/2-x+y.height+x),Xt(e,i),e.intersect=function(t){return Yt.rect(e,t)},a},"rectWithTitle"),de=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Wt(t,e,Ht(e,void 0),!0),i=a.height+e.padding,s=a.width+i/4+e.padding,n=r.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-s/2).attr("y",-i/2).attr("width",s).attr("height",i);return Xt(e,n),e.intersect=function(t){return Yt.rect(e,t)},r},"stadium"),he=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await Wt(t,e,Ht(e,void 0),!0),s=r.insert("circle",":first-child");return s.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),c.R.info("Circle main"),Xt(e,s),e.intersect=function(t){return c.R.info("Circle intersect",e,a.width/2+i,t),Yt.circle(e,a.width/2+i,t)},r},"circle"),ge=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await Wt(t,e,Ht(e,void 0),!0),s=r.insert("g",":first-child"),n=s.insert("circle"),o=s.insert("circle");return s.attr("class",e.class),n.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),o.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),c.R.info("DoubleCircle main"),Xt(e,n),e.intersect=function(t){return c.R.info("DoubleCircle intersect",e,a.width/2+i+5,t),Yt.circle(e,a.width/2+i+5,t)},r},"doublecircle"),ue=(0,d.K)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Wt(t,e,Ht(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:0,y:0},{x:i,y:0},{x:i,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-s},{x:-8,y:-s},{x:-8,y:0}],o=Ft(r,i,s,n);return o.attr("style",e.style),Xt(e,o),e.intersect=function(t){return Yt.polygon(e,n,t)},r}
1,"subroutine"),ye=(0,d.K)((t,e)=>{const 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),Xt(e,a),e.intersect=function(t){return Yt.circle(e,7,t)},r},"start"),pe=(0,d.K)((t,e,r)=>{const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let i=70,s=10;"LR"===r&&(i=10,s=70);const n=a.append("rect").attr("x",-1*i/2).attr("y",-1*s/2).attr("width",i).attr("height",s).attr("class","fork-join");return Xt(e,n),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return Yt.rect(e,t)},a},"forkJoin"),xe={rhombus:qt,composite:ne,question:qt,rect:se,labelRect:oe,rectWithTitle:ce,choice:Zt,circle:he,doublecircle:ge,stadium:de,hexagon:Gt,block_arrow:Vt,rect_left_inv_arrow:Jt,lean_right:Qt,lean_left:te,trapezoid:ee,inv_trapezoid:re,rect_right_inv_arrow:ae,cylinder:ie,start:ye,end:(0,d.K)((t,e)=>{const 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),Xt(e,i),e.intersect=function(t){return Yt.circle(e,7,t)},r},"end"),note:jt,subroutine:ue,fork:pe,join:pe,class_box:(0,d.K)(async(t,e)=>{const r=e.padding/2;let a;a=e.classes?"node "+e.classes:"node default";const i=t.insert("g").attr("class",a).attr("id",e.domId||e.id),s=i.insert("rect",":first-child"),n=i.insert("line"),o=i.insert("line");let c=0,d=4;const h=i.insert("g").attr("class","label");let g=0;const u=e.classData.annotations?.[0],y=e.classData.annotations[0]?"\xab"+e.classData.annotations[0]+"\xbb":"",p=await pt(h,y,e.labelStyle,!0,!0);let x=p.getBBox();if((0,l.E)((0,l.D7)())){const t=p.children[0],e=(0,m.Ltv)(p);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}e.classData.annotations[0]&&(d+=x.height+4,c+=x.width);let b=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&((0,l.E)((0,l.D7)())?b+="&lt;"+e.classData.type+"&gt;":b+="<"+e.classData.type+">");const f=await pt(h,b,e.labelStyle,!0,!0);(0,m.Ltv)(f).attr("class","classTitle");let w=f.getBBox();if((0,l.E)((0,l.D7)())){const t=f.children[0],e=(0,m.Ltv)(f);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}d+=w.height+4,w.width>c&&(c=w.width);const k=[];e.classData.members.forEach(async t=>{const r=t.getDisplayDetails();let a=r.displayText;(0,l.E)((0,l.D7)())&&(a=a.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const i=await pt(h,a,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0);let s=i.getBBox();if((0,l.E)((0,l.D7)())){const t=i.children[0],e=(0,m.Ltv)(i);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}s.width>c&&(c=s.width),d+=s.height+4,k.push(i)}),d+=8;const S=[];if(e.classData.methods.forEach(async t=>{const r=t.getDisplayDetails();let a=r.displayText;(0,l.E)((0,l.D7)())&&(a=a.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const i=await pt(h,a,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0);let s=i.getBBox();if((0,l.E)((0,l.D7)())){const t=i.children[0],e=(0,m.Ltv)(i);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}s.width>c&&(c=s.width),d+=s.height+4,S.push(i)}),d+=8,u){let t=(c-x.width)/2;
1(0,m.Ltv)(p).attr("transform","translate( "+(-1*c/2+t)+", "+-1*d/2+")"),g=x.height+4}let L=(c-w.width)/2;return(0,m.Ltv)(f).attr("transform","translate( "+(-1*c/2+L)+", "+(-1*d/2+g)+")"),g+=w.height+4,n.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-d/2-r+8+g).attr("y2",-d/2-r+8+g),g+=8,k.forEach(t=>{(0,m.Ltv)(t).attr("transform","translate( "+-c/2+", "+(-1*d/2+g+4)+")");const e=t?.getBBox();g+=(e?.height??0)+4}),g+=8,o.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-d/2-r+8+g).attr("y2",-d/2-r+8+g),g+=8,S.forEach(t=>{(0,m.Ltv)(t).attr("transform","translate( "+-c/2+", "+(-1*d/2+g)+")");const e=t?.getBBox();g+=(e?.height??0)+4}),s.attr("style",e.style).attr("class","outer title-state").attr("x",-c/2-r).attr("y",-d/2-r).attr("width",c+e.padding).attr("height",d+e.padding),Xt(e,s),e.intersect=function(t){return Yt.rect(e,t)},i},"class_box")},be={},fe=(0,d.K)(async(t,e,r)=>{let a,i;if(e.link){let s;"sandbox"===(0,l.D7)().securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),a=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s),i=await xe[e.shape](a,e,r)}else i=await xe[e.shape](t,e,r),a=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),be[e.id]=a,e.haveCallback&&be[e.id].attr("class",be[e.id].attr("class")+" clickable"),a},"insertNode"),me=(0,d.K)(t=>{const e=be[t.id];c.R.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const 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 we(t,e,r=!1){const a=t;let i="default";(a?.classes?.length||0)>0&&(i=(a?.classes??[]).join(" ")),i+=" flowchart-label";let s,n=0,c="";switch(a.type){case"round":n=5,c="rect";break;case"composite":n=0,c="composite",s=0;break;case"square":case"group":default:c="rect";break;case"diamond":c="question";break;case"hexagon":c="hexagon";break;case"block_arrow":c="block_arrow";break;case"odd":case"rect_left_inv_arrow":c="rect_left_inv_arrow";break;case"lean_right":c="lean_right";break;case"lean_left":c="lean_left";break;case"trapezoid":c="trapezoid";break;case"inv_trapezoid":c="inv_trapezoid";break;case"circle":c="circle";break;case"ellipse":c="ellipse";break;case"stadium":c="stadium";break;case"subroutine":c="subroutine";break;case"cylinder":c="cylinder";break;case"doublecircle":c="doublecircle"}const d=(0,o.sM)(a?.styles??[]),h=a.label,g=a.size??{width:0,height:0,x:0,y:0},u=e.getDiagramId();return{labelStyle:d.labelStyle,shape:c,labelText:h,rx:n,ry:n,class:i,style:d.style,id:a.id,domId:u?`${u}-${a.id}`:a.id,directions:a.directions,width:g.width,height:g.height,x:g.x,y:g.y,positioned:r,intersect:void 0,type:a.type,padding:s??(0,l.zj)()?.block?.padding??0,widthInColumns:a.widthInColumns??1}}async function ke(t,e,r){const a=we(e,r,!1);if("group"===a.type)return;const i=(0,l.zj)(),s=await fe(t,a,{config:i}),n=s.node().getBBox(),o=r.getBlock(a.id);o.size={width:n.width,height:n.height,x:0,y:0,node:s},r.setBlock(o),s.remove()}async function Se(t,e,r){const a=we(e,r,!0);if("space"!==r.getBlock(a.id).type){const r=(0,l.zj)();await fe(t,a,{config:r}),e.intersect=a?.intersect,me(a)}}async function Le(t,e,r,a){for(const i of e)await a(t,i,r),i.children&&await Le(t,i.children,r,a)}async function _e(t,e,r){await Le(t,e,r,ke)}async function Ee(t,e,r){await Le(t,e,r,Se)}async function ve(t,e,r,a,i){const s=new w.T({multigraph:!0,compound:!0});s.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const n of r)n.size&&s.setNode(n.id,{width:n.size.width,height:n.size.height,intersect:n.intersect});for(const n of e)if(n.start&&n.end){const e=a.getBlock(n.start),r=a.getBlock(n.end);if(e?.size&&r?.size){const a=e.size,o=r.size,l=[{x:a.x,y:a.y},{x:a.x+(o.x-a.x)/2,y:a.y+(o.y-a.y)/2},{x:o.x,y:o.y}],c=i?`${i}-${n.id}`:n.id,d=`${"thick"===n.thickness?"edge-thickness-thick":"edge-thickness-normal"} ${"dotted"===n.pattern?"edge-pattern-dotted":"edge-pattern-solid"} flowchart-link LS-a1 LE-b1`;Dt(t,{v:n.start,w:n.end,name:c},{...n,id:c,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:l,classes:d},void 0,"block",s,i),n.label&&(await kt(t,{...n,label:n.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:l,classes:d}),Lt({...n,x:l[1].x,y:l[1].y},{originalPath:l}))}}}(0,d.K)(we,"getNodeFromBlock"),(0,d.K)(ke,"calculateBlockSize"),(0,d.K)(Se,"insertBlockPositioned"),(0,d.K)(Le,"performOperations"),(0,d.K)(_e,"calculateBlockSizes"),(0,d.K)(Ee,"insertBlocks"),(0,d.K)(ve,"insertEdges");var De=(0,d.K)(function(t,e){return e.db.getClasses()},"getClasses"),Re={parser:S,db:at,renderer:{draw:(0,d.K)(async function(t,e,r,a){const{securityLevel:i,block:s}=(0,l.zj)(),n=a.db;let o;n.setDiagramId(e),"sandbox"===i&&(o=(0,m.Ltv)("#i"+e));const d="sandbox"===i?(0,m.Ltv)(o.nodes()[0].contentDocument.body):(0,m.Ltv)("body"),h="sandbox"===i?d.select(`[id="${e}"]`):(0,m.Ltv)(`[id="${e}"]`);lt(h,["point","circle","cross"],a.type,e);
1const g=n.getBlocks(),u=n.getBlocksFlat(),y=n.getEdges(),p=h.insert("g").attr("class","block");await _e(p,g,n);const x=yt(n);if(await Ee(p,g,n),await ve(p,y,u,n,e),x){const t=x,e=Math.max(1,Math.round(t.width/t.height*.125)),r=t.height+e+10,a=t.width+10,{useMaxWidth:i}=s;(0,l.a$)(h,r,a,!!i),c.R.debug("Here Bounds",x,t),h.attr("viewBox",`${t.x-5} ${t.y-5} ${t.width+10} ${t.height+10}`)}},"draw"),getClasses:De},styles:st}},7802(t,e,r){r.d(e,{A:()=>s});var a=r(8256),i=r(4747);const s=(t,e)=>a.A.lang.round(i.A.parse(t)[e])},7961(t,e,r){r.d(e,{o:()=>a});var a=(0,r(1248).K)(()=>"\n  /* Font Awesome icon styling - consolidated */\n  .label-icon {\n    display: inline-block;\n    height: 1em;\n    overflow: visible;\n    vertical-align: -0.125em;\n  }\n  \n  .node .label-icon path {\n    fill: currentColor;\n    stroke: revert;\n    stroke-width: revert;\n  }\n","getIconStyles")}}]);

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.