fika-editor 3.0.3 → 3.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/dist/embed/3276.js +138 -0
  2. package/dist/embed/agentic-manifest.json +2 -2
  3. package/dist/embed/chunks/{9121.js → 1091.js} +1 -1
  4. package/dist/embed/chunks/112.js +64 -0
  5. package/dist/embed/chunks/1131.css +1 -1
  6. package/dist/embed/chunks/1131.js +1 -1
  7. package/dist/embed/chunks/{7854.js → 1483.js} +1 -1
  8. package/dist/embed/chunks/1488.js +93 -0
  9. package/dist/embed/chunks/1742.js +90 -0
  10. package/dist/embed/chunks/190.js +1 -0
  11. package/dist/embed/chunks/2062.js +94 -0
  12. package/dist/embed/chunks/{1904.js → 2214.js} +1 -1
  13. package/dist/embed/chunks/2395.js +1 -0
  14. package/dist/embed/chunks/{7594.js → 2619.js} +1 -1
  15. package/dist/embed/chunks/2638.js +1 -0
  16. package/dist/embed/chunks/2853.js +1 -0
  17. package/dist/embed/chunks/2982.js +24 -0
  18. package/dist/embed/chunks/3009.js +1 -0
  19. package/dist/embed/chunks/3017.js +1 -0
  20. package/dist/embed/chunks/3084.js +27 -0
  21. package/dist/embed/chunks/3270.js +62 -0
  22. package/dist/embed/chunks/3275.js +226 -0
  23. package/dist/embed/chunks/3312.js +1 -0
  24. package/dist/embed/chunks/3671.js +1 -0
  25. package/dist/embed/chunks/4000.js +23 -0
  26. package/dist/embed/chunks/4392.js +41 -0
  27. package/dist/embed/chunks/451.js +32 -0
  28. package/dist/embed/chunks/4630.js +148 -0
  29. package/dist/embed/chunks/4764.js +1 -0
  30. package/dist/embed/chunks/{4552.js → 4779.js} +1 -1
  31. package/dist/embed/chunks/4929.js +215 -0
  32. package/dist/embed/chunks/4936.js +12 -12
  33. package/dist/embed/chunks/4975.js +98 -97
  34. package/dist/embed/chunks/5250.js +153 -1
  35. package/dist/embed/chunks/529.js +36 -0
  36. package/dist/embed/chunks/5428.js +1 -0
  37. package/dist/embed/chunks/{4619.js → 549.js} +2 -2
  38. package/dist/embed/chunks/5493.js +1 -0
  39. package/dist/embed/chunks/5681.js +1 -0
  40. package/dist/embed/chunks/5863.js +1 -0
  41. package/dist/embed/chunks/612.js +1 -0
  42. package/dist/embed/chunks/6520.js +1 -0
  43. package/dist/embed/chunks/6762.js +1 -0
  44. package/dist/embed/chunks/6771.js +1 -0
  45. package/dist/embed/chunks/7029.js +1 -0
  46. package/dist/embed/chunks/7057.js +1 -0
  47. package/dist/embed/chunks/7091.js +1 -0
  48. package/dist/embed/chunks/718.js +1 -0
  49. package/dist/embed/chunks/7276.js +79 -0
  50. package/dist/embed/chunks/7305.js +115 -0
  51. package/dist/embed/chunks/7463.js +1 -1
  52. package/dist/embed/chunks/7471.js +1 -0
  53. package/dist/embed/chunks/7798.js +1 -0
  54. package/dist/embed/chunks/788.js +29 -19
  55. package/dist/embed/chunks/7946.js +1 -0
  56. package/dist/embed/chunks/{3729.js → 8407.js} +16 -4
  57. package/dist/embed/chunks/8628.js +1 -0
  58. package/dist/embed/chunks/8665.js +1 -0
  59. package/dist/embed/chunks/9009.js +1 -0
  60. package/dist/embed/chunks/9010.js +1 -0
  61. package/dist/embed/chunks/9256.js +8 -0
  62. package/dist/embed/chunks/9464.js +77 -0
  63. package/dist/embed/chunks/9678.js +1 -0
  64. package/dist/embed/chunks/{273.js → 9686.js} +1 -1
  65. package/dist/embed/chunks/9918.js +138 -0
  66. package/dist/embed/fika-embed.css +2 -1
  67. package/dist/embed/fika-embed.js +3 -3
  68. package/dist/types/configs/starterPresentation.d.ts +2 -2
  69. package/dist/types/i18n/i18n-types.d.ts +32 -16
  70. package/dist/types/paint/slidePainter.d.ts +2 -0
  71. package/dist/types/store/index.d.ts +2 -2
  72. package/dist/types/store/slides.d.ts +2 -0
  73. package/dist/types/utils/latexToOmml.d.ts +1 -1
  74. package/dist/types/utils/placeholderPaint.d.ts +11 -0
  75. package/dist/types/views/components/ThumbnailSlide/CanvasSlideThumb.d.ts +2 -1
  76. package/package.json +10 -10
  77. package/dist/embed/183.css +0 -1
  78. package/dist/embed/183.js +0 -144
  79. package/dist/embed/chunks/1169.js +0 -1
  80. package/dist/embed/chunks/1605.js +0 -1
  81. package/dist/embed/chunks/1804.js +0 -8
  82. package/dist/embed/chunks/1916.js +0 -1
  83. package/dist/embed/chunks/2143.js +0 -62
  84. package/dist/embed/chunks/2246.js +0 -1
  85. package/dist/embed/chunks/2289.js +0 -80
  86. package/dist/embed/chunks/2632.js +0 -1
  87. package/dist/embed/chunks/2796.js +0 -34
  88. package/dist/embed/chunks/3088.js +0 -1
  89. package/dist/embed/chunks/3443.js +0 -1
  90. package/dist/embed/chunks/3581.js +0 -77
  91. package/dist/embed/chunks/397.js +0 -1
  92. package/dist/embed/chunks/4335.js +0 -1
  93. package/dist/embed/chunks/435.js +0 -1
  94. package/dist/embed/chunks/4354.js +0 -27
  95. package/dist/embed/chunks/4359.js +0 -1
  96. package/dist/embed/chunks/4515.js +0 -1
  97. package/dist/embed/chunks/4607.js +0 -1
  98. package/dist/embed/chunks/4625.js +0 -153
  99. package/dist/embed/chunks/4794.js +0 -1
  100. package/dist/embed/chunks/4891.js +0 -226
  101. package/dist/embed/chunks/5026.js +0 -1
  102. package/dist/embed/chunks/5480.js +0 -1
  103. package/dist/embed/chunks/5659.js +0 -64
  104. package/dist/embed/chunks/5792.js +0 -141
  105. package/dist/embed/chunks/5889.js +0 -1
  106. package/dist/embed/chunks/6014.js +0 -1
  107. package/dist/embed/chunks/627.js +0 -115
  108. package/dist/embed/chunks/6522.js +0 -1
  109. package/dist/embed/chunks/6567.js +0 -1
  110. package/dist/embed/chunks/6778.js +0 -1
  111. package/dist/embed/chunks/6999.js +0 -93
  112. package/dist/embed/chunks/7048.js +0 -1
  113. package/dist/embed/chunks/7101.js +0 -1
  114. package/dist/embed/chunks/717.js +0 -148
  115. package/dist/embed/chunks/7175.js +0 -90
  116. package/dist/embed/chunks/7311.js +0 -23
  117. package/dist/embed/chunks/7376.js +0 -1
  118. package/dist/embed/chunks/7588.js +0 -41
  119. package/dist/embed/chunks/7916.js +0 -79
  120. package/dist/embed/chunks/809.js +0 -1
  121. package/dist/embed/chunks/810.js +0 -1
  122. package/dist/embed/chunks/8212.js +0 -36
  123. package/dist/embed/chunks/8239.js +0 -1
  124. package/dist/embed/chunks/8620.js +0 -1
  125. package/dist/embed/chunks/8716.js +0 -215
  126. package/dist/embed/chunks/8941.js +0 -1
  127. package/dist/embed/chunks/9465.js +0 -5
  128. package/dist/embed/chunks/9761.js +0 -1
  129. package/dist/embed/chunks/9976.js +0 -1
@@ -0,0 +1 @@
1
+ export const __rspack_esm_id=9678;export const __rspack_esm_ids=[9678];export const __webpack_modules__={34061(t,i,e){var s,a=e(5637),n=e(83081);e(72346);var h=e(24768),o=e(70736),r=e(31293),l=e(86827),c=e(74045),g=function(){var t=(0,l.K)(function(t,i,e,s){for(e=e||{},s=t.length;s--;e[t[s]]=i);return e},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],a=[1,5],n=[1,6],h=[1,7],o=[1,5,10,12,14,16,18,19,21,23,36,37,38],r=[1,25],c=[1,26],g=[1,28],u=[1,29],x=[1,30],d=[1,31],p=[1,32],f=[1,33],m=[1,34],y=[1,35],b=[1,36],w=[1,37],A=[1,43],C=[1,42],S=[1,47],k=[1,50],_=[1,10,12,14,16,18,19,21,23,36,37,38],R=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],T=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],D=[1,65],L=[26,28],P={trace:(0,l.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:(0,l.K)(function(t,i,e,s,a,n,h){var o=n.length-1;switch(a){case 5:s.setOrientation(n[o]);break;case 9:s.setDiagramTitle(n[o].text.trim());break;case 12:s.setLineData({text:"",type:"text"},n[o]);break;case 13:s.setLineData(n[o-1],n[o]);break;case 14:s.setBarData({text:"",type:"text"},n[o]);break;case 15:s.setBarData(n[o-1],n[o]);break;case 16:this.$=n[o].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=n[o].trim(),s.setAccDescription(this.$);break;case 19:case 29:this.$=n[o-1];break;case 20:case 30:this.$=[n[o-2],...n[o]];break;case 21:case 31:this.$=[n[o]];break;case 22:this.$={value:Number(n[o-1]),label:n[o]};break;case 23:this.$={value:Number(n[o]),label:""};break;case 24:s.setXAxisTitle(n[o]);break;case 25:s.setXAxisTitle(n[o-1]);break;case 26:s.setXAxisTitle({type:"text",text:""});break;case 27:s.setXAxisBand(n[o]);break;case 28:s.setXAxisRangeData(Number(n[o-2]),Number(n[o]));break;case 32:s.setYAxisTitle(n[o]);break;case 33:s.setYAxisTitle(n[o-1]);break;case 34:s.setYAxisTitle({type:"text",text:""});break;case 35:s.setYAxisRangeData(Number(n[o-2]),Number(n[o]));break;case 39:case 40:this.$={text:n[o],type:"text"};break;case 41:this.$={text:n[o],type:"markdown"};break;case 42:this.$=n[o];break;case 43:this.$=n[o-1]+""+n[o]}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,36:a,37:n,38:h}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,36:a,37:n,38:h}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:n,38:h}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(o,[2,36]),t(o,[2,37]),t(o,[2,38]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,36:a,37:n,38:h}),{1:[2,3]},t(o,[2,5]),t(i,[2,7],{4:22,36:a,37:n,38:h}),{11:23,30:r,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},{11:39,13:38,24:A,29:C,30:r,31:40,32:41,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},{11:45,15:44,29:S,30:r,35:46,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},{11:49,17:48,24:k,30:r,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},{11:52,17:51,24:k,30:r,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},{20:[1,53]},{22:[1,54]},t(_,[2,18]),{1:[2,2]},t(_,[2,8]),t(_,[2,9]),t(R,[2,39],{41:55,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w}),t(R,[2,40]),t(R,[2,41]),t(T,[2,42]),t(T,[2,44]),t(T,[2,45]),t(T,[2,46]),t(T,[2,47]),t(T,[2,48]),t(T,[2,49]),t(T,[2,50]),t(T,[2,51]),t(T,[2,52]),t(T,[2,53]),t(_,[2,10]),t(_,[2,24],{32:41,31:56,24:A,29:C}),t(_,[2,26]),t(_,[2,27]),{33:[1,57]},{11:59,30:r,34:58,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},t(_,[2,11]),t(_,[2,32],{35:60,29:S}),t(_,[2,34]),{33:[1,61]},t(_,[2,12]),{17:62,24:k},{25:63,27:64,29:D},t(_,[2,14]),{17:66,24:k},t(_,[2,16]),t(_,[2,17]),t(T,[2,43]),t(_,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},t(_,[2,33]),{29:[1,70]},t(_,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},t(L,[2,23],{30:[1,73]}),t(_,[2,15]),t(_,[2,28]),t(_,[2,29]),{11:59,30:r,34:74,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:m,49:y,50:b,51:w},t(_,[2,35]),t(_,[2,19]),{25:75,27:64,29:D},t(L,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:(0,l.K)(function(t,i){if(i.recoverable)this.trace(t);else{var e=Error(t);throw e.hash=i,e}},"parseError"),parse:(0,l.K)(function(t){var i=this,e=[0],s=[],a=[null],n=[],h=this.table,o="",r=0,c=0,g=0,u=n.slice.call(arguments,1),x=Object.create(this.lexer),d={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d[p]=this.yy[p]);x.setInput(t,d),d.lexer=x,d.parser=this,void 0===x.yylloc&&(x.yylloc={});var f=x.yylloc;n.push(f);var m=x.options&&x.options.ranges;function y(){var t;return"number"!=typeof(t=s.pop()||x.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof d.parseError?this.parseError=d.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K)(function(t){e.length=e.length-2*t,a.length=a.length-t,n.length=n.length-t},"popStack"),(0,l.K)(y,"lex");for(var b,w,A,C,S,k,_,R,T,D={};;){if(A=e[e.length-1],this.defaultActions[A]?C=this.defaultActions[A]:(null==b&&(b=y()),C=h[A]&&h[A][b]),void 0===C||!C.length||!C[0]){var L="";for(k in T=[],h[A])this.terminals_[k]&&k>2&&T.push("'"+this.terminals_[k]+"'");L=x.showPosition?"Parse error on line "+(r+1)+":\n"+x.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(r+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(L,{text:x.match,token:this.terminals_[b]||b,line:x.yylineno,loc:f,expected:T})}if(C[0]instanceof Array&&C.length>1)throw Error("Parse Error: multiple actions possible at state: "+A+", token: "+b);switch(C[0]){case 1:e.push(b),a.push(x.yytext),n.push(x.yylloc),e.push(C[1]),b=null,w?(b=w,w=null):(c=x.yyleng,o=x.yytext,r=x.yylineno,f=x.yylloc,g>0&&g--);break;case 2:if(_=this.productions_[C[1]][1],D.$=a[a.length-_],D._$={first_line:n[n.length-(_||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(_||1)].first_column,last_column:n[n.length-1].last_column},m&&(D._$.range=[n[n.length-(_||1)].range[0],n[n.length-1].range[1]]),void 0!==(S=this.performAction.apply(D,[o,c,r,d,C[1],a,n].concat(u))))return S;_&&(e=e.slice(0,-1*_*2),a=a.slice(0,-1*_),n=n.slice(0,-1*_)),e.push(this.productions_[C[1]][0]),a.push(D.$),n.push(D._$),R=h[e[e.length-2]][e[e.length-1]],e.push(R);break;case 3:return!0}}return!0},"parse")};function v(){this.yy={}}return P.lexer={EOF:1,parseError:(0,l.K)(function(t,i){if(this.yy.parser)this.yy.parser.parseError(t,i);else throw Error(t)},"parseError"),setInput:(0,l.K)(function(t,i){return this.yy=i||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,l.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,l.K)(function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=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),e.length-1&&(this.yylineno-=e.length-1);var a=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:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K)(function(){return this._more=!0,this},"more"),reject:(0,l.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,l.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.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,l.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,l.K)(function(){var t=this.pastInput(),i=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},"showPosition"),test_match:(0,l.K)(function(t,i){var e,s,a;if(this.options.backtrack_lexer&&(a={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&&(a.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.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],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack)for(var n in a)this[n]=a[n];return!1},"test_match"),next:(0,l.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,i,e,s,a=this._currentRules(),n=0;n<a.length;n++)if((e=this._input.match(this.rules[a[n]]))&&(!i||e[0].length>i[0].length)){if(i=e,s=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,a[n])))return t;if(!this._backtrack)return!1;i=!1;continue}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,a[s]))&&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,l.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,l.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.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,l.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,l.K)(function(t,i,e,s){switch(e){case 0:case 1:case 5:case 44:break;case 2:case 3:return this.popState(),36;case 4:return 36;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 26:case 28:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 33;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 29;case 25:return this.popState(),26;case 27:this.pushState("string");break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 45:return 37;case 46:return 38}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}},(0,l.K)(v,"Parser"),v.prototype=P,P.Parser=v,new v}();function u(t){return"bar"===t.type}function x(t){return"band"===t.type}function d(t){return"linear"===t.type}g.parser=g,(0,l.K)(u,"isBarPlot"),(0,l.K)(x,"isBandAxisData"),(0,l.K)(d,"isLinearAxisData");var p=class{constructor(t){this.parentGroup=t}static{(0,l.K)(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((t,i)=>Math.max(i.length,t),0)*i,height:i};let e={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(let a of t){let t=(0,n.W6)(s,1,a),h=t?t.width:a.length*i,o=t?t.height:i;e.width=Math.max(e.width,h),e.height=Math.max(e.height,o)}return s.remove(),e}},f=class{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{(0,l.K)(this,"BaseAxis")}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){let t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let e=this.getLabelDimension(),s=.2*t.width;this.outerPadding=Math.min(e.width/2,s);let a=e.height;"bottom"===this.axisPosition&&0!==this.normalizedLabelRotationInRad&&(a=Math.max(a,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*e.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*e.height))),a+=2*this.axisConfig.labelPadding,this.labelTextHeight=e.height,a<=i&&(i-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let e=this.getLabelDimension(),s=.2*t.height;this.outerPadding=Math.min(e.height/2,s);let a=e.width+2*this.axisConfig.labelPadding;a<=i&&(i-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateOffsetByRotation(t){let i=this.normalizedLabelRotationInRad;return 0===i?0:Math.sin(i)*this.getLabelDimension()[t]/2}getDrawableElementsForLeftAxis(){let t=[];if(this.showAxisLine){let i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${i},${this.getScaleValue(t)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(t)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){let t=[];if(this.showAxisLine){let i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:180*this.normalizedLabelRotationInRad/Math.PI,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${i} L ${this.getScaleValue(t)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){let t=[];if(this.showAxisLine){let i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}},m=class extends f{static{(0,l.K)(this,"BandAxis")}constructor(t,i,e,s,a){super(t,s,a,i),this.categories=e,this.scale=(0,c.WH)().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=(0,c.WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),r.R.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},y=class extends f{static{(0,l.K)(this,"LinearAxis")}constructor(t,i,e,s,a){super(t,s,a,i),this.domain=e,this.scale=(0,c.m4Y)().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=(0,c.m4Y)().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function b(t,i,e,s){let a=new p(s);return x(t)?new m(i,e,t.categories,t.title,a):new y(i,e,[t.min,t.max],t.title,a)}(0,l.K)(b,"getAxis");var w=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{(0,l.K)(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){let i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=s&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}};function A(t,i,e,s){return new w(new p(s),t,i,e)}function C(t){return{fontSize:t,markerSize:.75*t,markerSpacing:.35*t,itemSpacing:.5*t}}(0,l.K)(A,"getChartTitleComponent"),(0,l.K)(C,"getLegendLayout");var S=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{(0,l.K)(this,"ChartLegend")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter(t=>t.title):[],0===this.visiblePlots.length)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};let{fontSize:i,markerSize:e,markerSpacing:s,itemSpacing:a}=C(this.chartConfig.legendFontSize),n=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map(t=>t.title),i),h=2*this.chartConfig.legendPadding+e+s+n.width,o=2*this.chartConfig.legendPadding+this.visiblePlots.length*i+(this.visiblePlots.length-1)*a;return h<=t.width&&o<=t.height?(this.boundingRect.width=h,this.boundingRect.height=o):(this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(0===this.visiblePlots.length)return[];let{fontSize:t,markerSize:i,markerSpacing:e,itemSpacing:s}=C(this.chartConfig.legendFontSize),a=t+s,n=this.boundingRect.x+this.chartConfig.legendPadding,h=this.boundingRect.y+this.chartConfig.legendPadding,o=[],r=[];for(let[t,e]of this.visiblePlots.entries())if(u(e))o.push({x:n,y:h+t*a,width:i,height:i,fill:e.fill,strokeFill:e.fill,strokeWidth:0});else{let s=h+t*a+i/2;r.push({path:`M ${n},${s} L ${n+i},${s}`,strokeFill:e.strokeFill,strokeWidth:e.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:o},{groupTexts:["legend","markers"],type:"path",data:r},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((s,o)=>({text:s.title,x:n+i+e,y:h+o*a+i/2,fill:this.chartThemeConfig.legendTextColor,fontSize:t,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};function k(t,i,e,s){return new S(new p(s),t,i,e)}(0,l.K)(k,"getChartLegendComponent");var _=class{constructor(t,i,e,s,a){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=a}static{(0,l.K)(this,"LinePlot")}getDrawableElement(){let t,i=this.plotData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]);if(!(t="horizontal"===this.orientation?(0,c.n8j)().y(t=>t[0]).x(t=>t[1])(i):(0,c.n8j)().x(t=>t[0]).y(t=>t[1])(i)))return[];let e=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:t,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let t=[];for(let[e,[s,a]]of i.entries()){let i=this.plotData.pointLabels[e];i&&("horizontal"===this.orientation?t.push({x:a+10,y:s,text:i,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0}):t.push({x:s,y:a-10,text:i,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0}))}t.length>0&&e.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:t})}return e}},R=class{constructor(t,i,e,s,a,n){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=a,this.plotIndex=n}static{(0,l.K)(this,"BarPlot")}getDrawableElement(){let t=this.barData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]),i=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),e=i/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:this.boundingRect.x,y:t[0]-e,height:i,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:t[0]-e,y:t[1],width:i,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},T=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}static{(0,l.K)(this,"BasePlot")}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let t=[];for(let[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{let s=new _(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{let s=new R(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}}return t}};function D(t,i,e){return new T(t,i,e)}(0,l.K)(D,"getPlotComponent");var L=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:A(t,i,e,s),plot:D(t,i,e),legend:k(t,i,e,s),xAxis:b(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:b(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}static{(0,l.K)(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a={width:0,height:0},n=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),h=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:n,height:h});t-=o.width,i-=o.height,s=(o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i})).height,i-=o.height,this.componentStore.xAxis.setAxisPosition("bottom"),o=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=o.height,this.componentStore.yAxis.setAxisPosition("left"),e=(o=this.componentStore.yAxis.calculateSpace({width:t,height:i})).width,t-=o.width,a=this.componentStore.legend.calculateSpace({width:t,height:h}),(t-=a.width)>0&&(n+=t,t=0),i>0&&(h+=i,i=0),this.componentStore.plot.calculateSpace({width:n,height:h}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.legend.setBoundingBoxXY({x:e+n,y:s+Math.max((h-a.height)/2,0)}),this.componentStore.xAxis.setRange([e,e+n]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+h}),this.componentStore.yAxis.setRange([s,s+h]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some(t=>u(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a=0,n={width:0,height:0},h=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),r=this.componentStore.plot.calculateSpace({width:h,height:o});t-=r.width,i-=r.height,e=(r=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i})).height,i-=r.height,this.componentStore.xAxis.setAxisPosition("left"),r=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=r.width,s=r.width,this.componentStore.yAxis.setAxisPosition("top"),r=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=r.height,a=e+r.height,n=this.componentStore.legend.calculateSpace({width:t,height:o}),(t-=n.width)>0&&(h+=t,t=0),i>0&&(o+=i,i=0),this.componentStore.plot.calculateSpace({width:h,height:o}),this.componentStore.plot.setBoundingBoxXY({x:s,y:a}),this.componentStore.legend.setBoundingBoxXY({x:s+h,y:a+Math.max((o-n.height)/2,0)}),this.componentStore.yAxis.setRange([s,s+h]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([a,a+o]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(t=>u(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let t=[];for(let i of(this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis),Object.values(this.componentStore)))t.push(...i.getDrawableElements());return t}},P=class{static{(0,l.K)(this,"XYChartBuilder")}static build(t,i,e,s){return new L(t,i,e,s).getDrawableElement()}},v=0,E=W(),K=B(),I=F(),M=K.plotColorPalette.split(",").map(t=>t.trim()),z=!1,$=!1;function B(){let t=(0,o.P$)(),i=(0,o.zj)();return(0,h.$t)(t.xyChart,i.themeVariables.xyChart)}function W(){let t=(0,o.zj)();return(0,h.$t)(o.UI.xyChart,t.xyChart)}function F(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function O(t){let i=(0,o.zj)();return(0,o.jZ)(t.trim(),i)}function X(t){s=t}function N(t){"horizontal"===t?E.chartOrientation="horizontal":E.chartOrientation="vertical"}function V(t){I.xAxis.title=O(t.text)}function Y(t,i){I.xAxis={type:"linear",title:I.xAxis.title,min:t,max:i},z=!0}function H(t){I.xAxis={type:"band",title:I.xAxis.title,categories:t.map(t=>O(t.text))},z=!0}function U(t){I.yAxis.title=O(t.text)}function j(t,i){I.yAxis={type:"linear",title:I.yAxis.title,min:t,max:i},$=!0}function G(t){let i=Math.min(...t),e=Math.max(...t),s=d(I.yAxis)?I.yAxis.min:1/0,a=d(I.yAxis)?I.yAxis.max:-1/0;I.yAxis={type:"linear",title:I.yAxis.title,min:Math.min(s,i),max:Math.max(a,e)}}function Q(t){let i=[];if(0===t.length)return i;if(z||Y(Math.min(d(I.xAxis)?I.xAxis.min:1/0,1),Math.max(d(I.xAxis)?I.xAxis.max:-1/0,t.length)),x(I.xAxis)&&t.length>I.xAxis.categories.length&&(t=t.slice(0,I.xAxis.categories.length)),$||G(t),x(I.xAxis)&&(i=I.xAxis.categories.map((i,e)=>[i,t[e]])),d(I.xAxis)){let e=I.xAxis.min,s=I.xAxis.max;if(1===t.length)i=[[`${e}`,t[0]]];else{let a=(s-e)/(t.length-1);i=t.map((t,i)=>[`${e+i*a}`,t])}}return i}function Z(t){return M[0===t?0:t%M.length]}function q(t,i){let e=i.map(t=>t.value),s=i.map(t=>t.label?O(t.label):""),a=Q(e),n=s.some(t=>""!==t);I.plots.push({type:"line",title:O(t.text),strokeFill:Z(v),strokeWidth:2,data:a,...n?{pointLabels:s}:{}}),v++}function J(t,i){let e=Q(i.map(t=>t.value));I.plots.push({type:"bar",title:O(t.text),fill:Z(v),data:e}),v++}function tt(){if(0===I.plots.length)throw Error("No Plot to render, please provide a plot with some data");return I.title=(0,o.ab)(),P.build(E,I,K,s)}function ti(){return K}function te(){return E}function ts(){return I}(0,l.K)(B,"getChartDefaultThemeConfig"),(0,l.K)(W,"getChartDefaultConfig"),(0,l.K)(F,"getChartDefaultData"),(0,l.K)(O,"textSanitizer"),(0,l.K)(X,"setTmpSVGG"),(0,l.K)(N,"setOrientation"),(0,l.K)(V,"setXAxisTitle"),(0,l.K)(Y,"setXAxisRangeData"),(0,l.K)(H,"setXAxisBand"),(0,l.K)(U,"setYAxisTitle"),(0,l.K)(j,"setYAxisRangeData"),(0,l.K)(G,"setYAxisRangeFromPlotData"),(0,l.K)(Q,"transformDataWithoutCategory"),(0,l.K)(Z,"getPlotColorFromPalette"),(0,l.K)(q,"setLineData"),(0,l.K)(J,"setBarData"),(0,l.K)(tt,"getDrawableElem"),(0,l.K)(ti,"getChartThemeConfig"),(0,l.K)(te,"getChartConfig"),(0,l.K)(ts,"getXYChartData");var ta={getDrawableElem:tt,clear:(0,l.K)(function(){(0,o.IU)(),v=0,E=W(),I=F(),M=(K=B()).plotColorPalette.split(",").map(t=>t.trim()),z=!1,$=!1},"clear"),setAccTitle:o.SV,getAccTitle:o.iN,setDiagramTitle:o.ke,getDiagramTitle:o.ab,getAccDescription:o.m7,setAccDescription:o.EI,setOrientation:N,setXAxisTitle:V,setXAxisRangeData:Y,setXAxisBand:H,setYAxisTitle:U,setYAxisRangeData:j,setLineData:q,setBarData:J,setTmpSVGG:X,getChartThemeConfig:ti,getChartConfig:te,getXYChartData:ts},tn={parser:g,db:ta,renderer:{draw:(0,l.K)((t,i,e,s)=>{let n=s.db,h=n.getChartThemeConfig(),c=n.getChartConfig(),g=n.getXYChartData().plots[0].data.map(t=>t[1]);function u(t){return"top"===t?"text-before-edge":"middle"}function x(t){return"left"===t?"start":"right"===t?"end":"middle"}function d(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}(0,l.K)(u,"getDominantBaseLine"),(0,l.K)(x,"getTextAnchor"),(0,l.K)(d,"getTextTransformation"),r.R.debug("Rendering xychart chart\n"+t);let p=(0,a.D)(i),f=p.append("g").attr("class","main"),m=f.append("rect").attr("width",c.width).attr("height",c.height).attr("class","background");(0,o.a$)(p,c.height,c.width,!0),p.attr("viewBox",`0 0 ${c.width} ${c.height}`),m.attr("fill",h.backgroundColor),n.setTmpSVGG(p.append("g").attr("class","mermaid-tmp-group"));let y=n.getDrawableElem(),b={};function w(t){let i=f,e="";for(let[s]of t.entries()){let a=f;s>0&&b[e]&&(a=b[e]),e+=t[s],(i=b[e])||(i=b[e]=a.append("g").attr("class",t[s]))}return i}for(let t of((0,l.K)(w,"getGroup"),y)){if(0===t.data.length)continue;let i=w(t.groupTexts);switch(t.type){case"rect":if(i.selectAll("rect").data(t.data).enter().append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth),c.showDataLabel){let e=c.showDataLabelOutsideBar;if("horizontal"===c.chartOrientation){let s=function(t,i){let{data:e,label:s}=t;return i*s.length*a<=e.width-n};(0,l.K)(s,"fitsHorizontally");let a=.7,n=10,o=t.data.map((t,i)=>({data:t,label:g[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),r=Math.floor(Math.min(...o.map(t=>{let{data:i}=t,e=.7*i.height;for(;!s(t,e)&&e>0;)e-=1;return e}))),c=(0,l.K)(t=>e?t.data.x+t.data.width+n:t.data.x+t.data.width-n,"determineLabelXPosition");i.selectAll("text").data(o).enter().append("text").attr("x",c).attr("y",t=>t.data.y+t.data.height/2).attr("text-anchor",e?"start":"end").attr("dominant-baseline","middle").attr("fill",h.dataLabelColor).attr("font-size",`${r}px`).text(t=>t.label)}else{let s=function(t,i,e){let{data:s,label:a}=t,n=i*a.length*.7,h=s.x+s.width/2,o=h-n/2,r=h+n/2,l=o>=s.x&&r<=s.x+s.width,c=s.y+e+i<=s.y+s.height;return l&&c};(0,l.K)(s,"fitsInBar");let a=t.data.map((t,i)=>({data:t,label:g[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),n=Math.floor(Math.min(...a.map(t=>{let{data:i,label:e}=t,a=i.width/(.7*e.length);for(;!s(t,a,10)&&a>0;)a-=1;return a}))),o=(0,l.K)(t=>e?t.data.y-10:t.data.y+10,"determineLabelYPosition");i.selectAll("text").data(a).enter().append("text").attr("x",t=>t.data.x+t.data.width/2).attr("y",o).attr("text-anchor","middle").attr("dominant-baseline",e?"auto":"hanging").attr("fill",h.dataLabelColor).attr("font-size",`${n}px`).text(t=>t.label)}}break;case"text":i.selectAll("text").data(t.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>u(t.verticalPos)).attr("text-anchor",t=>x(t.horizontalPos)).attr("transform",t=>d(t)).text(t=>t.text);break;case"path":i.selectAll("path").data(t.data).enter().append("path").attr("d",t=>t.path).attr("fill",t=>t.fill?t.fill:"none").attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth)}}},"draw")}};e.d(i,{diagram:()=>tn})}};
@@ -1,4 +1,4 @@
1
- export const __rspack_esm_id=273;export const __rspack_esm_ids=[273];export const __webpack_modules__={77454(t,e,a){function r(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}(0,a(86827).K)(r,"populateCommonDb"),a.d(e,{S:()=>r})},28136(t,e,a){var r=a(77454),i=a(22422),o=a(24692),l=a(64183),s=a(31293),c=a(86827),n=a(78731),d=l.UI.packet,p=class{constructor(){this.packet=[],this.setAccTitle=l.SV,this.getAccTitle=l.iN,this.setDiagramTitle=l.ke,this.getDiagramTitle=l.ab,this.getAccDescription=l.m7,this.setAccDescription=l.EI}static{(0,c.K)(this,"PacketDB")}getConfig(){let t=(0,o.$t)({...d,...(0,l.zj)().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){(0,l.IU)(),this.packet=[]}},k=(0,c.K)((t,e)=>{(0,r.S)(t,e);let a=-1,i=[],o=1,{bitsPerRow:l}=e.getConfig();for(let{start:r,end:c,bits:n,label:d}of t.blocks){if(void 0!==r&&void 0!==c&&c<r)throw Error(`Packet block ${r} - ${c} is invalid. End must be greater than start.`);if((r??=a+1)!==a+1)throw Error(`Packet block ${r} - ${c??r} is not contiguous. It should start from ${a+1}.`);if(0===n)throw Error(`Packet block ${r} is invalid. Cannot have a zero bit field.`);for(c??=r+(n??1)-1,n??=c-r+1,a=c,s.R.debug(`Packet block ${r} - ${a} with label ${d}`);i.length<=l+1&&e.getPacket().length<1e4;){let[t,a]=h({start:r,end:c,bits:n,label:d},o,l);if(i.push(t),t.end+1===o*l&&(e.pushWord(i),i=[],o++),!a)break;({start:r,end:c,bits:n,label:d}=a)}}e.pushWord(i)},"populate"),h=(0,c.K)((t,e,a)=>{if(void 0===t.start)throw Error("start should have been set during first phase");if(void 0===t.end)throw Error("end should have been set during first phase");if(t.start>t.end)throw Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*a)return[t,void 0];let r=e*a-1,i=e*a;return[{start:t.start,end:r,label:t.label,bits:r-t.start},{start:i,end:t.end,label:t.label,bits:t.end-i}]},"getNextFittingBlock"),b={parser:{yy:void 0},parse:(0,c.K)(async t=>{let e=await (0,n.qg)("packet",t),a=b.parser?.yy;if(!(a instanceof p))throw Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");s.R.debug(e),k(e,a)},"parse")},g=(0,c.K)((t,e,a,r)=>{let o=r.db,s=o.getConfig(),{rowHeight:c,paddingY:n,bitWidth:d,bitsPerRow:p}=s,k=o.getPacket(),h=o.getDiagramTitle(),b=c+n,g=b*(k.length+1)-(h?0:c),u=d*p+2,m=(0,i.D)(e);for(let[t,e]of(m.attr("viewBox",`0 0 ${u} ${g}`),(0,l.a$)(m,g,u,s.useMaxWidth),k.entries()))f(m,e,t,s);m.append("text").text(h).attr("x",u/2).attr("y",g-b/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),f=(0,c.K)((t,e,a,{rowHeight:r,paddingX:i,paddingY:o,bitWidth:l,bitsPerRow:s,showBits:c})=>{let n=t.append("g"),d=a*(r+o)+o;for(let t of e){let e=t.start%s*l+1,a=(t.end-t.start+1)*l-i;if(n.append("rect").attr("x",e).attr("y",d).attr("width",a).attr("height",r).attr("class","packetBlock"),n.append("text").attr("x",e+a/2).attr("y",d+r/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(t.label),!c)continue;let o=t.end===t.start,p=d-2;n.append("text").attr("x",e+(o?a/2:0)).attr("y",p).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",o?"middle":"start").text(t.start),o||n.append("text").attr("x",e+a).attr("y",p).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(t.end)}},"drawWord"),u={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},m={parser:b,get db(){return new p},renderer:{draw:g},styles:(0,c.K)(({packet:t}={})=>{let e=(0,o.$t)(u,t);return`
1
+ export const __rspack_esm_id=9686;export const __rspack_esm_ids=[9686];export const __webpack_modules__={77454(t,e,a){function r(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}(0,a(86827).K)(r,"populateCommonDb"),a.d(e,{S:()=>r})},5890(t,e,a){var r=a(77454),i=a(5637),o=a(24768),l=a(70736),s=a(31293),c=a(86827),n=a(78731),d=l.UI.packet,p=class{constructor(){this.packet=[],this.setAccTitle=l.SV,this.getAccTitle=l.iN,this.setDiagramTitle=l.ke,this.getDiagramTitle=l.ab,this.getAccDescription=l.m7,this.setAccDescription=l.EI}static{(0,c.K)(this,"PacketDB")}getConfig(){let t=(0,o.$t)({...d,...(0,l.zj)().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){(0,l.IU)(),this.packet=[]}},k=(0,c.K)((t,e)=>{(0,r.S)(t,e);let a=-1,i=[],o=1,{bitsPerRow:l}=e.getConfig();for(let{start:r,end:c,bits:n,label:d}of t.blocks){if(void 0!==r&&void 0!==c&&c<r)throw Error(`Packet block ${r} - ${c} is invalid. End must be greater than start.`);if((r??=a+1)!==a+1)throw Error(`Packet block ${r} - ${c??r} is not contiguous. It should start from ${a+1}.`);if(0===n)throw Error(`Packet block ${r} is invalid. Cannot have a zero bit field.`);for(c??=r+(n??1)-1,n??=c-r+1,a=c,s.R.debug(`Packet block ${r} - ${a} with label ${d}`);i.length<=l+1&&e.getPacket().length<1e4;){let[t,a]=h({start:r,end:c,bits:n,label:d},o,l);if(i.push(t),t.end+1===o*l&&(e.pushWord(i),i=[],o++),!a)break;({start:r,end:c,bits:n,label:d}=a)}}e.pushWord(i)},"populate"),h=(0,c.K)((t,e,a)=>{if(void 0===t.start)throw Error("start should have been set during first phase");if(void 0===t.end)throw Error("end should have been set during first phase");if(t.start>t.end)throw Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*a)return[t,void 0];let r=e*a-1,i=e*a;return[{start:t.start,end:r,label:t.label,bits:r-t.start},{start:i,end:t.end,label:t.label,bits:t.end-i}]},"getNextFittingBlock"),b={parser:{yy:void 0},parse:(0,c.K)(async t=>{let e=await (0,n.qg)("packet",t),a=b.parser?.yy;if(!(a instanceof p))throw Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");s.R.debug(e),k(e,a)},"parse")},g=(0,c.K)((t,e,a,r)=>{let o=r.db,s=o.getConfig(),{rowHeight:c,paddingY:n,bitWidth:d,bitsPerRow:p}=s,k=o.getPacket(),h=o.getDiagramTitle(),b=c+n,g=b*(k.length+1)-(h?0:c),u=d*p+2,m=(0,i.D)(e);for(let[t,e]of(m.attr("viewBox",`0 0 ${u} ${g}`),(0,l.a$)(m,g,u,s.useMaxWidth),k.entries()))f(m,e,t,s);m.append("text").text(h).attr("x",u/2).attr("y",g-b/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),f=(0,c.K)((t,e,a,{rowHeight:r,paddingX:i,paddingY:o,bitWidth:l,bitsPerRow:s,showBits:c})=>{let n=t.append("g"),d=a*(r+o)+o;for(let t of e){let e=t.start%s*l+1,a=(t.end-t.start+1)*l-i;if(n.append("rect").attr("x",e).attr("y",d).attr("width",a).attr("height",r).attr("class","packetBlock"),n.append("text").attr("x",e+a/2).attr("y",d+r/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(t.label),!c)continue;let o=t.end===t.start,p=d-2;n.append("text").attr("x",e+(o?a/2:0)).attr("y",p).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",o?"middle":"start").text(t.start),o||n.append("text").attr("x",e+a).attr("y",p).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(t.end)}},"drawWord"),u={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},m={parser:b,get db(){return new p},renderer:{draw:g},styles:(0,c.K)(({packet:t}={})=>{let e=(0,o.$t)(u,t);return`
2
2
  .packetByte {
3
3
  font-size: ${e.byteFontSize};
4
4
  }
@@ -0,0 +1,138 @@
1
+ export const __rspack_esm_id=9918;export const __rspack_esm_ids=[9918];export const __webpack_modules__={75937(e,t,s){var i=s(9601),r=s(71005);t.A=(e,t)=>i.A.lang.round(r.A.parse(e)[t])},3421(e,t,s){s.d(t,{diagram:()=>ef});var i=s(64918),r=s(46853),n=s(717);s(79515),s(44505),s(83081),s(72346);var a=s(24768),l=s(70736),o=s(31293),c=s(86827),h=s(37110),u=s(99125),g=s(89826),d=s(19663);function y(e,t){for(let s in t)Object.hasOwn(t,s)&&(e[s]=t[s])}var p=s(75937),b=s(25582),f=s(74045),S=s(697),x=function(){var e=(0,c.K)(function(e,t,s,i){for(s=s||{},i=e.length;i--;s[e[i]]=t);return s},"o"),t=[1,15],s=[1,7],i=[1,13],r=[1,14],n=[1,19],a=[1,16],l=[1,17],o=[1,18],h=[8,30],u=[8,10,21,28,29,30,31,39,43,46],g=[1,23],d=[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],b=[1,49],f={trace:(0,c.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,c.K)(function(e,t,s,i,r,n,a){var l=n.length-1;switch(r){case 4:i.getLogger().debug("Rule: separator (NL) ");break;case 5:i.getLogger().debug("Rule: separator (Space) ");break;case 6:i.getLogger().debug("Rule: separator (EOF) ");break;case 7:i.getLogger().debug("Rule: hierarchy: ",n[l-1]),i.setHierarchy(n[l-1]);break;case 8:i.getLogger().debug("Stop NL ");break;case 9:i.getLogger().debug("Stop EOF ");break;case 10:i.getLogger().debug("Stop NL2 ");break;case 11:i.getLogger().debug("Stop EOF2 ");break;case 12:i.getLogger().debug("Rule: statement: ",n[l]),"number"==typeof n[l].length?this.$=n[l]:this.$=[n[l]];break;case 13:i.getLogger().debug("Rule: statement #2: ",n[l-1]),this.$=[n[l-1]].concat(n[l]);break;case 14:i.getLogger().debug("Rule: link: ",n[l],e),this.$={edgeTypeStr:n[l],label:""};break;case 15:i.getLogger().debug("Rule: LABEL link: ",n[l-3],n[l-1],n[l]),this.$={edgeTypeStr:n[l],label:n[l-1]};break;case 18:let o=parseInt(n[l]),c=i.generateId();this.$={id:c,type:"space",label:"",width:o,children:[]};break;case 23:i.getLogger().debug("Rule: (nodeStatement link node) ",n[l-2],n[l-1],n[l]," typestr: ",n[l-1].edgeTypeStr);let h=i.edgeStrToEdgeData(n[l-1].edgeTypeStr),u=i.edgeStrToEdgeStartData(n[l-1].edgeTypeStr),g=i.edgeStrToThickness(n[l-1].edgeTypeStr),d=i.edgeStrToPattern(n[l-1].edgeTypeStr);this.$=[{id:n[l-2].id,label:n[l-2].label,type:n[l-2].type,directions:n[l-2].directions},{id:n[l-2].id+"-"+n[l].id,start:n[l-2].id,end:n[l].id,label:n[l-1].label,type:"edge",thickness:g,pattern:d,directions:n[l].directions,arrowTypeEnd:h,arrowTypeStart:u},{id:n[l].id,label:n[l].label,type:i.typeStr2Type(n[l].typeStr),directions:n[l].directions}];break;case 24:i.getLogger().debug("Rule: nodeStatement (abc88 node size) ",n[l-1],n[l]),this.$={id:n[l-1].id,label:n[l-1].label,type:i.typeStr2Type(n[l-1].typeStr),directions:n[l-1].directions,widthInColumns:parseInt(n[l],10)};break;case 25:i.getLogger().debug("Rule: nodeStatement (node) ",n[l]),this.$={id:n[l].id,label:n[l].label,type:i.typeStr2Type(n[l].typeStr),directions:n[l].directions,widthInColumns:1};break;case 26:i.getLogger().debug("APA123",this?this:"na"),i.getLogger().debug("COLUMNS: ",n[l]),this.$={type:"column-setting",columns:"auto"===n[l]?-1:parseInt(n[l])};break;case 27:i.getLogger().debug("Rule: id-block statement : ",n[l-2],n[l-1]),i.generateId(),this.$={...n[l-2],type:"composite",children:n[l-1]};break;case 28:i.getLogger().debug("Rule: blockStatement : ",n[l-2],n[l-1],n[l]);let y=i.generateId();this.$={id:y,type:"composite",label:"",children:n[l-1]};break;case 29:i.getLogger().debug("Rule: node (NODE_ID separator): ",n[l]),this.$={id:n[l]};break;case 30:i.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",n[l-1],n[l]),this.$={id:n[l-1],label:n[l].label,typeStr:n[l].typeStr,directions:n[l].directions};break;case 31:i.getLogger().debug("Rule: dirList: ",n[l]),this.$=[n[l]];break;case 32:i.getLogger().debug("Rule: dirList: ",n[l-1],n[l]),this.$=[n[l-1]].concat(n[l]);break;case 33:i.getLogger().debug("Rule: nodeShapeNLabel: ",n[l-2],n[l-1],n[l]),this.$={typeStr:n[l-2]+n[l],label:n[l-1]};break;case 34:i.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",n[l-3],n[l-2]," #3:",n[l-1],n[l]),this.$={typeStr:n[l-3]+n[l],label:n[l-2],directions:n[l-1]};break;case 35:case 36:this.$={type:"classDef",id:n[l-1].trim(),css:n[l].trim()};break;case 37:this.$={type:"applyClass",id:n[l-1].trim(),styleClass:n[l].trim()};break;case 38:this.$={type:"applyStyles",id:n[l-1].trim(),stylesStr:n[l].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:s,22:8,23:9,24:10,25:11,26:12,28:i,29:r,31:n,39:a,43:l,46:o},{8:[1,20]},e(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:s,28:i,29:r,31:n,39:a,43:l,46:o}),e(u,[2,16],{14:22,15:g,16:d}),e(u,[2,17]),e(u,[2,18]),e(u,[2,19]),e(u,[2,20]),e(u,[2,21]),e(u,[2,22]),e(y,[2,25],{27:[1,25]}),e(u,[2,26]),{19:26,26:12,31:n},{10:t,11:27,13:4,19:5,20:6,21:s,22:8,23:9,24:10,25:11,26:12,28:i,29:r,31:n,39:a,43:l,46:o},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(p,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(h,[2,13]),{26:35,31:n},{31:[2,14]},{17:[1,36]},e(y,[2,24]),{10:t,11:37,13:4,14:22,15:g,16:d,19:5,20:6,21:s,22:8,23:9,24:10,25:11,26:12,28:i,29:r,31:n,39:a,43:l,46:o},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(p,[2,30]),{18:[1,43]},{18:[1,44]},e(y,[2,23]),{18:[1,45]},{30:[1,46]},e(u,[2,28]),e(u,[2,35]),e(u,[2,36]),e(u,[2,37]),e(u,[2,38]),{36:[1,47]},{33:48,34:b},{15:[1,50]},e(u,[2,27]),e(p,[2,33]),{38:[1,51]},{33:52,34:b,38:[2,31]},{31:[2,15]},e(p,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,c.K)(function(e,t){if(t.recoverable)this.trace(e);else{var s=Error(e);throw s.hash=t,s}},"parseError"),parse:(0,c.K)(function(e){var t=this,s=[0],i=[],r=[null],n=[],a=this.table,l="",o=0,h=0,u=0,g=n.slice.call(arguments,1),d=Object.create(this.lexer),y={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(y[p]=this.yy[p]);d.setInput(e,y),y.lexer=d,y.parser=this,void 0===d.yylloc&&(d.yylloc={});var b=d.yylloc;n.push(b);var f=d.options&&d.options.ranges;function S(){var e;return"number"!=typeof(e=i.pop()||d.lex()||1)&&(e instanceof Array&&(e=(i=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof y.parseError?this.parseError=y.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K)(function(e){s.length=s.length-2*e,r.length=r.length-e,n.length=n.length-e},"popStack"),(0,c.K)(S,"lex");for(var x,L,m,_,k,w,E,D,$,I={};;){if(m=s[s.length-1],this.defaultActions[m]?_=this.defaultActions[m]:(null==x&&(x=S()),_=a[m]&&a[m][x]),void 0===_||!_.length||!_[0]){var N="";for(w in $=[],a[m])this.terminals_[w]&&w>2&&$.push("'"+this.terminals_[w]+"'");N=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(N,{text:d.match,token:this.terminals_[x]||x,line:d.yylineno,loc:b,expected:$})}if(_[0]instanceof Array&&_.length>1)throw Error("Parse Error: multiple actions possible at state: "+m+", token: "+x);switch(_[0]){case 1:s.push(x),r.push(d.yytext),n.push(d.yylloc),s.push(_[1]),x=null,L?(x=L,L=null):(h=d.yyleng,l=d.yytext,o=d.yylineno,b=d.yylloc,u>0&&u--);break;case 2:if(E=this.productions_[_[1]][1],I.$=r[r.length-E],I._$={first_line:n[n.length-(E||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(E||1)].first_column,last_column:n[n.length-1].last_column},f&&(I._$.range=[n[n.length-(E||1)].range[0],n[n.length-1].range[1]]),void 0!==(k=this.performAction.apply(I,[l,h,o,y,_[1],r,n].concat(g))))return k;E&&(s=s.slice(0,-1*E*2),r=r.slice(0,-1*E),n=n.slice(0,-1*E)),s.push(this.productions_[_[1]][0]),r.push(I.$),n.push(I._$),D=a[s[s.length-2]][s[s.length-1]],s.push(D);break;case 3:return!0}}return!0},"parse")};function S(){this.yy={}}return f.lexer={EOF:1,parseError:(0,c.K)(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},"parseError"),setInput:(0,c.K)(function(e,t){return this.yy=t||this.yy||{},this._input=e,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,c.K)(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.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),e},"input"),unput:(0,c.K)(function(e){var t=e.length,s=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var i=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),s.length-1&&(this.yylineno-=s.length-1);var r=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:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K)(function(){return this._more=!0,this},"more"),reject:(0,c.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,c.K)(function(e){this.unput(this.match.slice(e))},"less"),pastInput:(0,c.K)(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K)(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.K)(function(){var e=this.pastInput(),t=Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},"showPosition"),test_match:(0,c.K)(function(e,t){var s,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],s=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack)for(var n in r)this[n]=r[n];return!1},"test_match"),next:(0,c.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var e,t,s,i,r=this._currentRules(),n=0;n<r.length;n++)if((s=this._input.match(this.rules[r[n]]))&&(!t||s[0].length>t[0].length)){if(t=s,i=n,this.options.backtrack_lexer){if(!1!==(e=this.test_match(s,r[n])))return e;if(!this._backtrack)return!1;t=!1;continue}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,r[i]))&&e:""===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,c.K)(function(){var e=this.next();return e||this.lex()},"lex"),begin:(0,c.K)(function(e){this.conditionStack.push(e)},"begin"),popState:(0,c.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.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,c.K)(function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:(0,c.K)(function(e){this.begin(e)},"pushState"),stateStackSize:(0,c.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,c.K)(function(e,t,s,i){switch(s){case 0:return e.getLogger().debug("Found block-beta"),10;case 1:return e.getLogger().debug("Found id-block"),29;case 2:return e.getLogger().debug("Found block"),10;case 3:e.getLogger().debug(".",t.yytext);break;case 4:e.getLogger().debug("_",t.yytext);break;case 5:return 5;case 6:return t.yytext=-1,28;case 7:return t.yytext=t.yytext.replace(/columns\s+/,""),e.getLogger().debug("COLUMNS (LEX)",t.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:e.getLogger().debug("LEX: POPPING STR:",t.yytext),this.popState();break;case 13:return e.getLogger().debug("LEX: STR end:",t.yytext),"STR";case 14:return t.yytext=t.yytext.replace(/space\:/,""),e.getLogger().debug("SPACE NUM (LEX)",t.yytext),21;case 15:return t.yytext="1",e.getLogger().debug("COLUMNS (LEX)",t.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(),e.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),e.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),e.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),e.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),e.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),e.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),e.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),e.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),e.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),e.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),e.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),e.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return e.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return e.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return e.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return e.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return e.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return e.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return e.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),e.getLogger().debug("LEX ARR START"),37;case 74:return e.getLogger().debug("Lex: NODE_ID",t.yytext),31;case 75:return e.getLogger().debug("Lex: EOF",t.yytext),8;case 78:return"NODE_DESCR";case 80:e.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:e.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return e.getLogger().debug("LEX: NODE_DESCR:",t.yytext),"NODE_DESCR";case 83:e.getLogger().debug("LEX POPPING"),this.popState();break;case 84:e.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (right): dir:",t.yytext),"DIR";case 86:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (left):",t.yytext),"DIR";case 87:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (x):",t.yytext),"DIR";case 88:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (y):",t.yytext),"DIR";case 89:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (up):",t.yytext),"DIR";case 90:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (down):",t.yytext),"DIR";case 91:return t.yytext="]>",e.getLogger().debug("Lex (ARROW_DIR end):",t.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 93:case 94:case 95:return e.getLogger().debug("Lex: LINK",t.yytext),15;case 96:case 97:case 98:return e.getLogger().debug("Lex: START_LINK",t.yytext),this.pushState("LLABEL"),16;case 100:return e.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 102:case 103:return this.popState(),e.getLogger().debug("Lex: LINK",t.yytext),15;case 104:return e.getLogger().debug("Lex: COLON",t.yytext),t.yytext=t.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}}},(0,c.K)(S,"Parser"),S.prototype=f,f.Parser=S,new S}();x.parser=x;var L=new Map,m=[],_=new Map,k="color",w="fill",E=new Map,D="",$=(0,c.K)(e=>l.Y2.sanitizeText(e,(0,l.D7)()),"sanitizeText"),I=(0,c.K)(function(e,t=""){let s=E.get(e);s||(s={id:e,styles:[],textStyles:[]},E.set(e,s)),null!=t&&t.split(",").forEach(e=>{let t=e.replace(/([^;]*);/,"$1").trim();if(RegExp(k).exec(e)){let e=t.replace(w,"bgFill").replace(k,w);s.textStyles.push(e)}s.styles.push(t)})},"addStyleClass"),N=(0,c.K)(function(e,t=""){let s=L.get(e);null!=t&&(s.styles=t.split(","))},"addStyle2Node"),T=(0,c.K)(function(e,t){e.split(",").forEach(function(e){let s=L.get(e);if(void 0===s){let t=e.trim();s={id:t,type:"na",children:[]},L.set(t,s)}s.classes||(s.classes=[]),s.classes.push(t)})},"setCssClass"),R=(0,c.K)((e,t)=>{let s=e.flat(),i=[],r=s.find(e=>e?.type==="column-setting"),n=r?.columns??-1;for(let e of s){if("number"==typeof n&&n>0&&"column-setting"!==e.type&&"number"==typeof e.widthInColumns&&e.widthInColumns>n&&o.R.warn(`Block ${e.id} width ${e.widthInColumns} exceeds configured column width ${n}`),e.label&&(e.label=$(e.label)),"classDef"===e.type){I(e.id,e.css);continue}if("applyClass"===e.type){T(e.id,e?.styleClass??"");continue}if("applyStyles"===e.type){e?.stylesStr&&N(e.id,e?.stylesStr);continue}if("column-setting"===e.type)t.columns=e.columns??-1;else if("edge"===e.type){let t=(_.get(e.id)??0)+1;_.set(e.id,t),e.id=t+"-"+e.id,m.push(e)}else{e.label||("composite"===e.type?e.label="":e.label=e.id);let t=L.get(e.id);if(void 0===t?L.set(e.id,e):("na"!==e.type&&(t.type=e.type),e.label!==e.id&&(t.label=e.label)),e.children&&R(e.children,e),"space"===e.type){let t=e.width??1;for(let s=0;s<t;s++){let t=function(e){if((0,h.s)(e))return e;let t=(0,u.b)(e);if(!function(e){switch((0,u.b)(e)){case g.R_:case g.Uw:case g.cT:case g.iq:case g.$V:case g.vC:case g.ri:case g.ML:case g.XZ:case g.i1:case g._u:case g.pj:case g.kj:case g.GX:case g.Av:case g.NA:case g.OG:case g.VP:case g.Qb:case g.q:case g.x6:case g.ZR:return!0;default:return!1}}(e))return{};if(Array.isArray(e)){let t=Array.from(e);return e.length>0&&"string"==typeof e[0]&&Object.hasOwn(e,"index")&&(t.index=e.index,t.input=e.input),t}if((0,d.i)(e))return new e.constructor(e.buffer,e.byteOffset,e.length);if("[object ArrayBuffer]"===t)return new ArrayBuffer(e.byteLength);if("[object DataView]"===t){let t=e.buffer,s=e.byteOffset,i=e.byteLength,r=new ArrayBuffer(i),n=new Uint8Array(t,s,i);return new Uint8Array(r).set(n),new DataView(r)}if("[object Boolean]"===t||"[object Number]"===t||"[object String]"===t){let s=new e.constructor(e.valueOf());return"[object String]"===t?function(e,t){let s=t.valueOf().length;for(let i in t)Object.hasOwn(t,i)&&(Number.isNaN(Number(i))||Number(i)>=s)&&(e[i]=t[i])}(s,e):y(s,e),s}if("[object Date]"===t)return new Date(Number(e));if("[object RegExp]"===t){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if("[object Symbol]"===t)return Object(Symbol.prototype.valueOf.call(e));if("[object Map]"===t){let t=new Map;return e.forEach((e,s)=>{t.set(s,e)}),t}if("[object Set]"===t){let t=new Set;return e.forEach(e=>{t.add(e)}),t}if("[object Arguments]"===t){let t={};return y(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}let s={};return function(e,t){let s=Object.getPrototypeOf(t);null!==s&&"function"==typeof t.constructor&&Object.setPrototypeOf(e,s)}(s,e),y(s,e),function(e,t){let s=Object.getOwnPropertySymbols(t);for(let i=0;i<s.length;i++){let r=s[i];Object.prototype.propertyIsEnumerable.call(t,r)&&(e[r]=t[r])}}(s,e),s}(e);t.id=t.id+"-"+s,L.set(t.id,t),i.push(t)}}else void 0===t&&i.push(e)}}t.children=i},"populateBlockDatabase"),O=[],z={id:"root",type:"composite",children:[],columns:-1},C=(0,c.K)(()=>{o.R.debug("Clear called"),(0,l.IU)(),L=new Map([["root",z={id:"root",type:"composite",children:[],columns:-1}]]),O=[],E=new Map,m=[],_=new Map,D=""},"clear");function A(e){switch(o.R.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return o.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 K(e){return(o.R.debug("typeStr2Type",e),"=="===e)?"thick":"normal"}function v(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function B(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}function P(e){return e.includes("==")?"thick":"normal"}function F(e){return e.includes(".-")?"dotted":"solid"}(0,c.K)(A,"typeStr2Type"),(0,c.K)(K,"edgeTypeStr2Type"),(0,c.K)(v,"edgeStrToEdgeData"),(0,c.K)(B,"edgeStrToEdgeStartData"),(0,c.K)(P,"edgeStrToThickness"),(0,c.K)(F,"edgeStrToPattern");var j=0,M=(0,c.K)(()=>(j++,"id-"+Math.random().toString(36).substr(2,12)+"-"+j),"generateId"),Y=(0,c.K)(e=>{z.children=e,R(e,z),O=z.children},"setHierarchy"),W=(0,c.K)(e=>{let t=L.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),U=(0,c.K)(()=>[...L.values()],"getBlocksFlat"),X=(0,c.K)(()=>O||[],"getBlocks"),G=(0,c.K)(()=>m,"getEdges"),H=(0,c.K)(e=>L.get(e),"getBlock"),q=(0,c.K)(e=>{L.set(e.id,e)},"setBlock"),V=(0,c.K)(e=>{D=e},"setDiagramId"),Z=(0,c.K)(()=>D,"getDiagramId"),J=(0,c.K)(()=>o.R,"getLogger"),Q=(0,c.K)(function(){return E},"getClasses"),ee={getConfig:(0,c.K)(()=>(0,l.zj)().block,"getConfig"),typeStr2Type:A,edgeTypeStr2Type:K,edgeStrToEdgeData:v,edgeStrToEdgeStartData:B,edgeStrToThickness:P,edgeStrToPattern:F,getLogger:J,getBlocksFlat:U,getBlocks:X,getEdges:G,setHierarchy:Y,getBlock:H,setBlock:q,getColumns:W,getClasses:Q,clear:C,generateId:M,setDiagramId:V,getDiagramId:Z},et=(0,c.K)((e,t)=>{let s=p.A,i=s(e,"r"),r=s(e,"g"),n=s(e,"b");return b.A(i,r,n,t)},"fade"),es=(0,c.K)(e=>`.label {
2
+ font-family: ${e.fontFamily};
3
+ color: ${e.nodeTextColor||e.textColor};
4
+ }
5
+ .cluster-label text {
6
+ fill: ${e.titleColor};
7
+ }
8
+ .cluster-label span {
9
+ color: ${e.titleColor};
10
+ }
11
+
12
+
13
+
14
+ .label text,span {
15
+ fill: ${e.nodeTextColor||e.textColor};
16
+ color: ${e.nodeTextColor||e.textColor};
17
+ }
18
+
19
+ .node rect,
20
+ .node circle,
21
+ .node ellipse,
22
+ .node polygon,
23
+ .node path {
24
+ fill: ${e.mainBkg};
25
+ stroke: ${e.nodeBorder};
26
+ stroke-width: 1px;
27
+ }
28
+ .flowchart-label text {
29
+ text-anchor: middle;
30
+ }
31
+ // .flowchart-label .text-outer-tspan {
32
+ // text-anchor: middle;
33
+ // }
34
+ // .flowchart-label .text-inner-tspan {
35
+ // text-anchor: start;
36
+ // }
37
+
38
+ .node .label {
39
+ text-align: center;
40
+ }
41
+ .node.clickable {
42
+ cursor: pointer;
43
+ }
44
+
45
+ .arrowheadPath {
46
+ fill: ${e.arrowheadColor};
47
+ }
48
+
49
+ .edgePath .path {
50
+ stroke: ${e.lineColor};
51
+ stroke-width: 2.0px;
52
+ }
53
+
54
+ .flowchart-link {
55
+ stroke: ${e.lineColor};
56
+ fill: none;
57
+ }
58
+
59
+ .edgeLabel {
60
+ background-color: ${e.edgeLabelBackground};
61
+ /*
62
+ * This is for backward compatibility with existing code that didn't
63
+ * add a \`<p>\` around edge labels.
64
+ *
65
+ * TODO: We should probably remove this in a future release.
66
+ */
67
+ p {
68
+ margin: 0;
69
+ padding: 0;
70
+ display: inline;
71
+ }
72
+ rect {
73
+ opacity: 0.5;
74
+ background-color: ${e.edgeLabelBackground};
75
+ fill: ${e.edgeLabelBackground};
76
+ }
77
+ text-align: center;
78
+ }
79
+
80
+ /* For html labels only */
81
+ .labelBkg {
82
+ background-color: ${e.edgeLabelBackground};
83
+ }
84
+
85
+ .node .cluster {
86
+ // fill: ${et(e.mainBkg,.5)};
87
+ fill: ${et(e.clusterBkg,.5)};
88
+ stroke: ${et(e.clusterBorder,.2)};
89
+ box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
90
+ stroke-width: 1px;
91
+ }
92
+
93
+ .cluster text {
94
+ fill: ${e.titleColor};
95
+ }
96
+
97
+ .cluster span {
98
+ color: ${e.titleColor};
99
+ }
100
+ /* .cluster div {
101
+ color: ${e.titleColor};
102
+ } */
103
+
104
+ div.mermaidTooltip {
105
+ position: absolute;
106
+ text-align: center;
107
+ max-width: 200px;
108
+ padding: 2px;
109
+ font-family: ${e.fontFamily};
110
+ font-size: 12px;
111
+ background: ${e.tertiaryColor};
112
+ border: 1px solid ${e.border2};
113
+ border-radius: 2px;
114
+ pointer-events: none;
115
+ z-index: 100;
116
+ }
117
+
118
+ .flowchartTitleText {
119
+ text-anchor: middle;
120
+ font-size: 18px;
121
+ fill: ${e.textColor};
122
+ }
123
+ ${(0,i.o)()}
124
+ `,"getStyles");function ei(e,t){if(0===e||!Number.isInteger(e))throw Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(1===e)return{px:0,py:t};let s=Math.floor(t/e);return{px:t%e,py:s}}(0,c.K)(ei,"calculateBlockPosition");var er=(0,c.K)(e=>{let t=0,s=0;for(let i of e.children){let{width:e,height:r,x:n,y:a}=i.size??{width:0,height:0,x:0,y:0};if(o.R.debug("getMaxChildSize abc95 child:",i.id,"width:",e,"height:",r,"x:",n,"y:",a,i.type),"space"===i.type)continue;let l=e/(i.widthInColumns??1);l>t&&(t=l),r>s&&(s=r)}return{width:t,height:s}},"getMaxChildSize");function en(e,t,s=0,i=0,r=8){o.R.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",s),e?.size?.width||(e.size={width:s,height:i,x:0,y:0});let n=0,a=0;if(e.children?.length>0){for(let s of e.children)en(s,t,0,0,r);let l=er(e);for(let t of(n=l.width,a=l.height,o.R.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",n,a),e.children))t.size&&(o.R.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${n} ${a} ${JSON.stringify(t.size)}`),t.size.width=n*(t.widthInColumns??1)+r*((t.widthInColumns??1)-1),t.size.height=a,t.size.x=0,t.size.y=0,o.R.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${n} maxHeight:${a}`));for(let s of e.children)en(s,t,n,a,r);let c=e.columns??-1,h=0;for(let t of e.children)h+=t.widthInColumns??1;let u=e.children.length;c>0&&c<h&&(u=c);let g=Math.ceil(h/u),d=u*(n+r)+r,y=g*(a+r)+r;if(d<s){o.R.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${s} siblingHeight ${i} width ${d}`),d=s,y=i;let t=(s-u*r-r)/u,l=(i-g*r-r)/g;for(let s of(o.R.debug("Size indata abc88",e.id,"childWidth",t,"maxWidth",n),o.R.debug("Size indata abc88",e.id,"childHeight",l,"maxHeight",a),o.R.debug("Size indata abc88 xSize",u,"padding",r),e.children))s.size&&(s.size.width=t,s.size.height=l,s.size.x=0,s.size.y=0)}if(o.R.debug(`abc95 (finale calc) ${e.id} xSize ${u} ySize ${g} columns ${c}${e.children.length} width=${Math.max(d,e.size?.width||0)}`),d<(e?.size?.width||0)){d=e?.size?.width||0;let t=c>0?Math.min(e.children.length,c):e.children.length;if(t>0){let s=(d-t*r-r)/t;for(let t of(o.R.debug("abc95 (growing to fit) width",e.id,d,e.size?.width,s),e.children))t.size&&(t.size.width=s)}}e.size={width:d,height:y,x:0,y:0}}o.R.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}function ea(e,t,s=8){o.R.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let i=e.columns??-1;if(o.R.debug("layoutBlocks columns abc95",e.id,"=>",i,e),e.children&&e.children.length>0){let r=e?.children[0]?.size?.width??0,n=e.children.length*r+(e.children.length-1)*s;o.R.debug("widthOfChildren 88",n,"posX");let a=new Map;{let t=0;for(let s of e.children){if(!s.size)continue;let{py:e}=ei(i,t),r=a.get(e)??0;s.size.height>r&&a.set(e,s.size.height);let n=s?.widthInColumns??1;i>0&&(n=Math.min(n,i-t%i)),t+=n}}let l=new Map;{let e=0;for(let t of[...a.keys()].sort((e,t)=>e-t))l.set(t,e),e+=(a.get(t)??0)+s}let c=0;o.R.debug("abc91 block?.size?.x",e.id,e?.size?.x);let h=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-s,u=0;for(let r of e.children){if(!r.size)continue;let{width:n,height:g}=r.size,{px:d,py:y}=ei(i,c);if(y!=u&&(u=y,h=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-s,o.R.debug("New row in layout for block",e.id," and child ",r.id,u)),o.R.debug(`abc89 layout blocks (child) id: ${r.id} Pos: ${c} (px, py) ${d},${y} (${e?.size?.x},${e?.size?.y}) parent: ${e.id} width: ${n}${s}`),e.size){let t=n/2;r.size.x=h+s+t,o.R.debug(`abc91 layout blocks (calc) px, pyid:${r.id} startingPos=X${h} new startingPosX${r.size.x} ${t} padding=${s} width=${n} halfWidth=${t} => x:${r.size.x} y:${r.size.y} ${r.widthInColumns} (width * (child?.w || 1)) / 2 ${n*(r?.widthInColumns??1)/2}`),h=r.size.x+t;let i=l.get(y)??0,c=a.get(y)??g;r.size.y=e.size.y-e.size.height/2+i+c/2+s,o.R.debug(`abc88 layout blocks (calc) px, pyid:${r.id}startingPosX${h}${s}${t}=>x:${r.size.x}y:${r.size.y}${r.widthInColumns}(width * (child?.w || 1)) / 2${n*(r?.widthInColumns??1)/2}`)}r.children&&ea(r,t,s);let p=r?.widthInColumns??1;i>0&&(p=Math.min(p,i-c%i)),c+=p,o.R.debug("abc88 columnsPos",r,c)}}o.R.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}function el(e,{minX:t,minY:s,maxX:i,maxY:r}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&"root"!==e.id){let{x:n,y:a,width:l,height:o}=e.size;n-l/2<t&&(t=n-l/2),a-o/2<s&&(s=a-o/2),n+l/2>i&&(i=n+l/2),a+o/2>r&&(r=a+o/2)}if(e.children)for(let n of e.children)({minX:t,minY:s,maxX:i,maxY:r}=el(n,{minX:t,minY:s,maxX:i,maxY:r}));return{minX:t,minY:s,maxX:i,maxY:r}}function eo(e){let t=e.getBlock("root");if(!t)return;let s=(0,l.D7)()?.block?.padding??8;en(t,e,0,0,s),ea(t,e,s),o.R.debug("getBlocks",JSON.stringify(t,null,2));let{minX:i,minY:r,maxX:n,maxY:a}=el(t);return{x:i,y:r,width:n-i,height:a-r}}function ec(e,t,s=!1){let i,r="default";(e?.classes?.length||0)>0&&(r=(e?.classes??[]).join(" ")),r+=" flowchart-label";let n=(e?.classes??[]).flatMap(e=>t.getClasses().get(e)?.styles??[]),o=0,c="rect";switch(e.type){case"round":o=5,c="rect";break;case"composite":o=0,c="composite",i=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"}let h=(0,a.sM)(e?.styles??[]),u=e.label,g=e.size??{width:0,height:0,x:0,y:0},d=t.getDiagramId();return{labelStyle:h.labelStyle,shape:c,label:u,labelText:u,rx:o,ry:o,class:r,cssClasses:r,cssStyles:e?.styles??[],cssCompiledStyles:n,style:h.style,id:e.id,domId:d?`${d}-${e.id}`:e.id,isGroup:!1,directions:e.directions,width:g.width||void 0,height:g.height||void 0,wrappingWidth:g.width||1/0,x:g.x,y:g.y,positioned:s,intersect:void 0,padding:i??(0,l.zj)()?.block?.padding??0,widthInColumns:e.widthInColumns??1}}async function eh(e,t,s){let i=ec(t,s,!1);if("group"===t.type)return;let r=(0,l.zj)(),a=await (0,n.on)(e,i,{config:r}),o=a.node()?.getBBox()??{width:0,height:0},c=s.getBlock(i.id);c.size={width:o.width,height:o.height,x:0,y:0,node:a},s.setBlock(c),a.remove()}async function eu(e,t,s){let i=ec(t,s,!0);if("space"!==s.getBlock(i.id).type){let s=(0,l.zj)();await (0,n.on)(e,i,{config:s}),t.intersect=i?.intersect,(0,n.U_)(i)}}async function eg(e,t,s,i){for(let r of t)await i(e,r,s),r.children&&await eg(e,r.children,s,i)}async function ed(e,t,s){await eg(e,t,s,eh)}async function ey(e,t,s){await eg(e,t,s,eu)}async function ep(e,t,s,i,n){let a=new S.T({multigraph:!0,compound:!0});for(let e of(a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8}),s))e.size&&a.setNode(e.id,{width:e.size.width,height:e.size.height,intersect:e.intersect});for(let s of t)if(s.start&&s.end){let t=i.getBlock(s.start),l=i.getBlock(s.end);if(t?.size&&l?.size){let i=t.size,o=l.size,c=[{x:i.x,y:i.y},{x:i.x+(o.x-i.x)/2,y:i.y+(o.y-i.y)/2},{x:o.x,y:o.y}],h=n?`${n}-${s.id}`:s.id,u="thick"===s.thickness?"edge-thickness-thick":"edge-thickness-normal",g="dotted"===s.pattern?"edge-pattern-dotted":"edge-pattern-solid",d=`${u} ${g} flowchart-link LS-a1 LE-b1`;(0,r.Jo)(e,{...s,id:h,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:c,classes:d},{},"block",a.node(s.start),a.node(s.end),n),s.label&&(await (0,r.jP)(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:c,classes:d}),(0,r.T_)({...s,x:c[1].x,y:c[1].y},{originalPath:c}))}}}(0,c.K)(en,"setBlockSizes"),(0,c.K)(ea,"layoutBlocks"),(0,c.K)(el,"findBounds"),(0,c.K)(eo,"layout"),(0,c.K)(ec,"getNodeFromBlock"),(0,c.K)(eh,"calculateBlockSize"),(0,c.K)(eu,"insertBlockPositioned"),(0,c.K)(eg,"performOperations"),(0,c.K)(ed,"calculateBlockSizes"),(0,c.K)(ey,"insertBlocks"),(0,c.K)(ep,"insertEdges");var eb=(0,c.K)(function(e,t){return t.db.getClasses()},"getClasses"),ef={parser:x,db:ee,renderer:{draw:(0,c.K)(async function(e,t,s,i){let n,{securityLevel:a,block:c}=(0,l.zj)(),h=i.db;h.setDiagramId(t),"sandbox"===a&&(n=(0,f.Ltv)("#i"+t));let u="sandbox"===a?(0,f.Ltv)(n.nodes()[0].contentDocument.body):(0,f.Ltv)("body"),g="sandbox"===a?u.select(`[id="${t}"]`):(0,f.Ltv)(`[id="${t}"]`);(0,r.g0)(g,["point","circle","cross"],i.type,t);let d=h.getBlocks(),y=h.getBlocksFlat(),p=h.getEdges(),b=g.insert("g").attr("class","block");await ed(b,d,h);let S=eo(h);await ey(b,d,h),await ep(b,p,y,h,t);let x=b.node()?.getBBox(),L=x&&Number.isFinite(x.width)&&Number.isFinite(x.height)?x:S;if(L){let e=Math.max(1,Math.round(.125*(L.width/L.height))),t=L.height+e+10,s=L.width+10,{useMaxWidth:i}=c;(0,l.a$)(g,t,s,!!i),o.R.debug("Here Bounds",S,L),g.attr("viewBox",`${L.x-5} ${L.y-5} ${L.width+10} ${L.height+10}`)}},"draw"),getClasses:eb},styles:es}},64918(e,t,s){var i=(0,s(86827).K)(()=>`
125
+ /* Font Awesome icon styling - consolidated */
126
+ .label-icon {
127
+ display: inline-block;
128
+ height: 1em;
129
+ overflow: visible;
130
+ vertical-align: -0.125em;
131
+ }
132
+
133
+ .node .label-icon path {
134
+ fill: currentColor;
135
+ stroke: revert;
136
+ stroke-width: revert;
137
+ }
138
+ `,"getIconStyles");s.d(t,{o:()=>i})}};