filecat 6.45.3 → 6.47.0

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 (74) hide show
  1. package/build/dist/124.23fa0d2699d9618dda9b.js +1 -0
  2. package/build/dist/{9725.c0f5fe759b3f29ad5989.js → 1240.8141c3584667c9b102c5.js} +1 -1
  3. package/build/dist/125.46b0b0838cec5442fdf6.js +1 -0
  4. package/build/dist/{1472.f10cd19f1ebc66d06ca5.js → 1472.822ac655d838f1a02b9a.js} +1 -1
  5. package/build/dist/{6202.f1c6599d8628dfe0f47d.js → 1715.b6871d580981169bbdc4.js} +1 -1
  6. package/build/dist/{8888.c714553db9ff11c9da25.js → 1730.f999109734b2ec283532.js} +1 -1
  7. package/build/dist/{4892.2bcb6c2d911a8d6049e6.js → 1750.36c146cd44049aaf79bc.js} +1 -1
  8. package/build/dist/{1218.bb8814412156c1a05a8c.js → 1772.7868dde9477de83bca1b.js} +1 -1
  9. package/build/dist/2449.0a762cd0483921adb91b.js +1 -0
  10. package/build/dist/2535.15ea6ba73588f47dc278.js +1 -0
  11. package/build/dist/{3813.6430f39e6bcabeb141ba.js → 2549.d0b9ca007ebae4995c22.js} +1 -1
  12. package/build/dist/2862.b1506f9eda52fa4f64cd.js +1 -0
  13. package/build/dist/2979.a1aa1f822cfc6c15f4a7.js +1 -0
  14. package/build/dist/{9499.bd13c877be5faa569e76.js → 3386.cc4b0d13967d3d1ac1ac.js} +1 -1
  15. package/build/dist/{6317.0929fcd5463e5e8e67d1.js → 3743.847ccbdcf5b607eec417.js} +1 -1
  16. package/build/dist/{8814.5157a8490dc97bab58c8.js → 3822.7e8ba22abbc6a60e6e20.js} +1 -1
  17. package/build/dist/{9786.cd9c2e2e7602e4310054.js → 3975.fde79b562d1f76f82274.js} +1 -1
  18. package/build/dist/{2018.8ee7ad4c73b038c713c5.js → 4619.1f7d8bf06c69e2ce9de7.js} +1 -1
  19. package/build/dist/{2640.6877d2665aa4ee6a1a85.js → 4625.a6a593542f4f2ebdae0f.js} +1 -1
  20. package/build/dist/{1082.e5badad25358d9fb3079.js → 4877.c31b8c8ee069225abc0d.js} +1 -1
  21. package/build/dist/5014.ff2b55369c42ab3cdda2.js +1 -0
  22. package/build/dist/{2726.52ceb81411f86822798f.js → 5135.9c0adbfd935bc46dd00d.js} +1 -1
  23. package/build/dist/5222.540853902e9c52d28220.js +1 -0
  24. package/build/dist/{7551.fd0ef76160cc344a6cfc.js → 5708.d62ffec88d557ee68f7b.js} +1 -1
  25. package/build/dist/5877.4e8f34819a3ae8da88b7.js +1 -0
  26. package/build/dist/5919.8a2c39a0e1623d795ee5.js +1 -0
  27. package/build/dist/5976.67aa23f2625209b8003b.js +1 -0
  28. package/build/dist/6002.1c2ff6a9c94ee343dded.js +1 -0
  29. package/build/dist/6110.a21be9c843a97bad11d5.js +1 -0
  30. package/build/dist/6402.dc70cc4e1530b8f1519d.js +1 -0
  31. package/build/dist/648.ca43171884d81b27c3a3.js +1 -0
  32. package/build/dist/{5061.5a9a6052bb6d3c895bc0.js → 6794.2fe35b73c565a07ec864.js} +1 -1
  33. package/build/dist/7017.274f83a8995232a6a9a0.js +1 -0
  34. package/build/dist/736.086cd9a8f1598c9f0ac7.js +1 -0
  35. package/build/dist/764.7c29eaf9d7edbee8467e.js +1 -0
  36. package/build/dist/{5181.1493235f192ed0e34fa8.js → 7887.2edcfdeb215d33478936.js} +1 -1
  37. package/build/dist/{4775.2e9cd58436b05580eb1c.js → 8018.02ea29dc6f59bbfaaee0.js} +1 -1
  38. package/build/dist/{5460.d692ffc021e7b872705d.js → 8136.dc1403b91767ca089293.js} +1 -1
  39. package/build/dist/{8256.0e3d9a5222004414b053.js → 8220.3ddda498d174349e189c.js} +1 -1
  40. package/build/dist/8233.6f5cd229953db8462d7d.js +1 -0
  41. package/build/dist/8535.9d68b1a6589a813c5bf1.js +1 -0
  42. package/build/dist/8947.55d1c2f1238de7f51549.js +2 -0
  43. package/build/dist/{4371.773ef273063e38ac1fd1.js → 9256.5d9a03011b69d1504ae4.js} +1 -1
  44. package/build/dist/9307.2c9d7f6089fef297b1c1.js +1 -0
  45. package/build/dist/{2703.e711df3217f7b4dfc978.js → 9352.6ebe66d0487686642ec9.js} +1 -1
  46. package/build/dist/index.html +1 -1
  47. package/build/dist/main.5bc1e6b78e3174e3fe27.js +2 -0
  48. package/build/main.js +1 -1
  49. package/package.json +2 -2
  50. package/build/dist/1012.1ffc2b5f439b4dbd31ab.js +0 -1
  51. package/build/dist/135.f248a925d34a798480d7.js +0 -1
  52. package/build/dist/1727.69b721002e5c4cee43f5.js +0 -1
  53. package/build/dist/2227.630510781f59cc4c4fb2.js +0 -1
  54. package/build/dist/2579.7a313dc04e7bd13abef5.js +0 -1
  55. package/build/dist/3084.52a9fb540f9a2f20e2a4.js +0 -1
  56. package/build/dist/3106.7d69822609a6d0ddd7af.js +0 -1
  57. package/build/dist/4204.e82ad99dea01b22eb25d.js +0 -1
  58. package/build/dist/4754.cd598f047ff6236c61c9.js +0 -1
  59. package/build/dist/5088.0caefbc5a430ba64afa1.js +0 -1
  60. package/build/dist/5945.244b607c26ac99161fe1.js +0 -1
  61. package/build/dist/6084.2417b84c3833e9b05951.js +0 -1
  62. package/build/dist/6085.1dc5c0e79932b5f9e52c.js +0 -1
  63. package/build/dist/636.d61ff5465a8d2326514b.js +0 -1
  64. package/build/dist/6383.b333496d85f9b04daf1f.js +0 -1
  65. package/build/dist/7111.b2007509a9bf0683c90a.js +0 -1
  66. package/build/dist/7209.3b487c37072aadaed4ca.js +0 -1
  67. package/build/dist/7632.43249289310a589f1b1e.js +0 -1
  68. package/build/dist/7911.89b6408e7daaccc1d8af.js +0 -1
  69. package/build/dist/893.0160359067e299f9a4f2.js +0 -1
  70. package/build/dist/8947.f1f29db3485b2287da46.js +0 -2
  71. package/build/dist/9756.eb8e5cd0c35395fdf573.js +0 -1
  72. package/build/dist/main.360cfb58341f1f91aefe.js +0 -2
  73. /package/build/dist/{8947.f1f29db3485b2287da46.js.LICENSE.txt → 8947.55d1c2f1238de7f51549.js.LICENSE.txt} +0 -0
  74. /package/build/dist/{main.360cfb58341f1f91aefe.js.LICENSE.txt → main.5bc1e6b78e3174e3fe27.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[3813],{59337(t,e,n){n.d(e,{P:()=>r});var i=n(68861),s=n(31293),o=n(86827),r=(0,o.K)((t,e,n,o)=>{t.attr("class",n);const{width:r,height:l,x:h,y:d}=a(t,e);(0,i.a$)(t,l,r,o);const g=c(h,d,r,l,e);t.attr("viewBox",g),s.R.debug(`viewBox configured: ${g} with padding: ${e}`)},"setupViewPortForSVG"),a=(0,o.K)((t,e)=>{const n=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:n.width+2*e,height:n.height+2*e,x:n.x,y:n.y}},"calculateDimensionsWithPadding"),c=(0,o.K)((t,e,n,i,s)=>`${t-s} ${e-s} ${n} ${i}`,"createViewBox")},96755(t,e,n){n.d(e,{A:()=>o});var i=n(86827),s=n(51444),o=(0,i.K)((t,e)=>{let n;"sandbox"===e&&(n=(0,s.Ltv)("#i"+t));return("sandbox"===e?(0,s.Ltv)(n.nodes()[0].contentDocument.body):(0,s.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")},93813(t,e,n){n.d(e,{diagram:()=>L});var i=n(96755),s=n(59337),o=n(6923),r=(n(1778),n(75999),n(23665),n(91865),n(3868),n(8969),n(24731),n(28342),n(68861)),a=n(31293),c=n(86827);const l=new Uint8Array(16);const h=[];for(let t=0;t<256;++t)h.push((t+256).toString(16).slice(1));function d(t,e=0){return(h[t[e+0]]+h[t[e+1]]+h[t[e+2]]+h[t[e+3]]+"-"+h[t[e+4]]+h[t[e+5]]+"-"+h[t[e+6]]+h[t[e+7]]+"-"+h[t[e+8]]+h[t[e+9]]+"-"+h[t[e+10]]+h[t[e+11]]+h[t[e+12]]+h[t[e+13]]+h[t[e+14]]+h[t[e+15]]).toLowerCase()}const g=function(t,e,n){return e||t||!crypto.randomUUID?function(t,e,n){t=t||{};const i=t.random??t.rng?.()??crypto.getRandomValues(l);if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){if((n=n||0)<0||n+16>e.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let t=0;t<16;++t)e[n+t]=i[t];return e}return d(i)}(t,e,n):crypto.randomUUID()};var u=n(5097),p=n(78041),y=n(75263),m=function(){var t=(0,c.K)(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[1,4],n=[1,13],i=[1,12],s=[1,15],o=[1,16],r=[1,20],a=[1,19],l=[6,7,8],h=[1,26],d=[1,24],g=[1,25],u=[6,7,11],p=[1,6,13,15,16,19,22],y=[1,33],m=[1,34],f=[1,6,7,11,13,15,16,19,22],b={trace:(0,c.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:(0,c.K)(function(t,e,n,i,s,o,r){var a=o.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",o[a].id),i.addNode(o[a-1].length,o[a].id,o[a].descr,o[a].type);break;case 16:i.getLogger().trace("Icon: ",o[a]),i.decorateNode({icon:o[a]});break;case 17:case 21:i.decorateNode({class:o[a]});break;case 18:i.getLogger().trace("SPACELIST");break;case 19:i.getLogger().trace("Node: ",o[a].id),i.addNode(0,o[a].id,o[a].descr,o[a].type);break;case 20:i.decorateNode({icon:o[a]});break;case 25:i.getLogger().trace("node found ..",o[a-2]),this.$={id:o[a-1],descr:o[a-1],type:i.getType(o[a-2],o[a])};break;case 26:this.$={id:o[a],descr:o[a],type:i.nodeType.DEFAULT};break;case 27:i.getLogger().trace("node found ..",o[a-3]),this.$={id:o[a-3],descr:o[a-1],type:i.getType(o[a-2],o[a])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:n,7:[1,10],9:9,12:11,13:i,14:14,15:s,16:o,17:17,18:18,19:r,22:a},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,15:s,16:o,17:17,18:18,19:r,22:a},{6:n,9:22,12:11,13:i,14:14,15:s,16:o,17:17,18:18,19:r,22:a},{6:h,7:d,10:23,11:g},t(u,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:r,22:a}),t(u,[2,18]),t(u,[2,19]),t(u,[2,20]),t(u,[2,21]),t(u,[2,23]),t(u,[2,24]),t(u,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:d,10:32,11:g},{1:[2,7],6:n,12:21,13:i,14:14,15:s,16:o,17:17,18:18,19:r,22:a},t(p,[2,14],{7:y,11:m}),t(f,[2,8]),t(f,[2,9]),t(f,[2,10]),t(u,[2,15]),t(u,[2,16]),t(u,[2,17]),{20:[1,35]},{21:[1,36]},t(p,[2,13],{7:y,11:m}),t(f,[2,11]),t(f,[2,12]),{21:[1,37]},t(u,[2,25]),t(u,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,c.K)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,c.K)(function(t){var e=this,n=[0],i=[],s=[null],o=[],r=this.table,a="",l=0,h=0,d=0,g=o.slice.call(arguments,1),u=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);u.setInput(t,p.yy),p.yy.lexer=u,p.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var m=u.yylloc;o.push(m);var f=u.options&&u.options.ranges;function b(){var t;return"number"!=typeof(t=i.pop()||u.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K)(function(t){n.length=n.length-2*t,s.length=s.length-t,o.length=o.length-t},"popStack"),(0,c.K)(b,"lex");for(var k,_,E,S,x,L,N,D,$,I={};;){if(E=n[n.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(null==k&&(k=b()),S=r[E]&&r[E][k]),void 0===S||!S.length||!S[0]){var v="";for(L in $=[],r[E])this.terminals_[L]&&L>2&&$.push("'"+this.terminals_[L]+"'");v=u.showPosition?"Parse error on line "+(l+1)+":\n"+u.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(v,{text:u.match,token:this.terminals_[k]||k,line:u.yylineno,loc:m,expected:$})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+k);switch(S[0]){case 1:n.push(k),s.push(u.yytext),o.push(u.yylloc),n.push(S[1]),k=null,_?(k=_,_=null):(h=u.yyleng,a=u.yytext,l=u.yylineno,m=u.yylloc,d>0&&d--);break;case 2:if(N=this.productions_[S[1]][1],I.$=s[s.length-N],I._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},f&&(I._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),void 0!==(x=this.performAction.apply(I,[a,h,l,p.yy,S[1],s,o].concat(g))))return x;N&&(n=n.slice(0,-1*N*2),s=s.slice(0,-1*N),o=o.slice(0,-1*N)),n.push(this.productions_[S[1]][0]),s.push(I.$),o.push(I._$),D=r[n[n.length-2]][n[n.length-1]],n.push(D);break;case 3:return!0}}return!0},"parse")},k=function(){return{EOF:1,parseError:(0,c.K)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,c.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,c.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,c.K)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var 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),n.length-1&&(this.yylineno-=n.length-1);var s=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),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(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.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,c.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,c.K)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.K)(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={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&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[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+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],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in s)this[o]=s[o];return!1}return!1},"test_match"),next:(0,c.K)(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),o=0;o<s.length;o++)if((n=this._input.match(this.rules[s[o]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&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,c.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,c.K)(function(t){this.conditionStack.push(t)},"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(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,c.K)(function(t,e,n,i){switch(n){case 0:return t.getLogger().trace("Found comment",e.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return t.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:t.getLogger().trace("end icon"),this.popState();break;case 10:return t.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return t.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 27:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return t.getLogger().trace("Long description:",e.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}}();function _(){this.yy={}}return b.lexer=k,(0,c.K)(_,"Parser"),_.prototype=b,b.Parser=_,new _}();m.parser=m;var f=m,b={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},k=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=b,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{(0,c.K)(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(t){for(let e=this.nodes.length-1;e>=0;e--)if(this.nodes[e].level<t)return this.nodes[e];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(t,e,n,i){a.R.info("addNode",t,e,n,i);let s=!1;0===this.nodes.length?(this.baseLevel=t,t=0,s=!0):void 0!==this.baseLevel&&(t-=this.baseLevel,s=!1);const o=(0,r.D7)();let c=o.mindmap?.padding??r.UI.mindmap.padding;switch(i){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:c*=2}const l={id:this.count++,nodeId:(0,r.jZ)(e,o),level:t,descr:(0,r.jZ)(n,o),type:i,children:[],width:o.mindmap?.maxNodeWidth??r.UI.mindmap.maxNodeWidth,padding:c,isRoot:s},h=this.getParent(t);if(h)h.children.push(l),this.nodes.push(l);else{if(!s)throw new Error(`There can be only one root. No parent could be found for ("${l.descr}")`);this.nodes.push(l)}}getType(t,e){switch(a.R.debug("In get type",t,e),t){case"[":return this.nodeType.RECT;case"(":return")"===e?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(t,e){this.elements[t]=e}getElementById(t){return this.elements[t]}decorateNode(t){if(!t)return;const e=(0,r.D7)(),n=this.nodes[this.nodes.length-1];t.icon&&(n.icon=(0,r.jZ)(t.icon,e)),t.class&&(n.class=(0,r.jZ)(t.class,e))}type2Str(t){switch(t){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(t,e){if(0===t.level?t.section=void 0:t.section=e,t.children)for(const[n,i]of t.children.entries()){const s=0===t.level?n%11:e;this.assignSections(i,s)}}flattenNodes(t,e){const n=(0,r.D7)(),i=["mindmap-node"];!0===t.isRoot?i.push("section-root","section--1"):void 0!==t.section&&i.push(`section-${t.section}`),t.class&&i.push(t.class);const s=i.join(" "),o=(0,c.K)(t=>{const e=(n.theme?.toLowerCase()??"").includes("redux");switch(t){case b.CIRCLE:return"mindmapCircle";case b.RECT:return"rect";case b.ROUNDED_RECT:return"rounded";case b.CLOUD:return"cloud";case b.BANG:return"bang";case b.HEXAGON:return"hexagon";case b.DEFAULT:return e?"rounded":"defaultMindmapNode";default:return"rect"}},"getShapeFromType"),a={id:t.id.toString(),domId:"node_"+t.id.toString(),label:t.descr,labelType:"markdown",isGroup:!1,shape:o(t.type),width:t.width,height:t.height??0,padding:t.padding,cssClasses:s,cssStyles:[],look:n.look,icon:t.icon,x:t.x,y:t.y,level:t.level,nodeId:t.nodeId,type:t.type,section:t.section};if(e.push(a),t.children)for(const n of t.children)this.flattenNodes(n,e)}generateEdges(t,e){if(!t.children)return;const n=(0,r.D7)();for(const i of t.children){let s="edge";void 0!==i.section&&(s+=` section-edge-${i.section}`);s+=` edge-depth-${t.level+1}`;const o={id:`edge_${t.id}_${i.id}`,start:t.id.toString(),end:i.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:n.look,classes:s,depth:t.level,section:i.section};e.push(o),this.generateEdges(i,e)}}getData(){const t=this.getMindmap(),e=(0,r.D7)(),n=e;if(void 0!==(0,r.TM)().layout||(n.layout="cose-bilkent"),!t)return{nodes:[],edges:[],config:n};a.R.debug("getData: mindmapRoot",t,e),this.assignSections(t);const i=[],s=[];this.flattenNodes(t,i),this.generateEdges(t,s),a.R.debug(`getData: processed ${i.length} nodes and ${s.length} edges`);const o=new Map;for(const t of i)o.set(t.id,{shape:t.shape,width:t.width,height:t.height,padding:t.padding});return{nodes:i,edges:s,config:n,rootNode:t,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(o),type:"mindmap",diagramId:"mindmap-"+g()}}getLogger(){return a.R}},_={draw:(0,c.K)(async(t,e,n,c)=>{a.R.debug("Rendering mindmap diagram\n"+t);const l=c.db,h=l.getData(),d=(0,i.A)(e,h.config.securityLevel);h.type=c.type,h.layoutAlgorithm=(0,o.q7)(h.config.layout,{fallback:"cose-bilkent"}),h.diagramId=e;if(!l.getMindmap())return;h.nodes.forEach(t=>{"rounded"===t.shape?(t.radius=15,t.taper=15,t.stroke="none",t.width=0,t.padding=15):"circle"===t.shape?t.padding=10:"rect"===t.shape?(t.width=0,t.padding=10):"hexagon"===t.shape&&(t.width=0,t.height=0)}),await(0,o.XX)(h,d);const{themeVariables:g}=(0,r.zj)(),{useGradient:u,gradientStart:p,gradientStop:y}=g;if(u&&p&&y){const t=d.attr("id"),e=d.append("defs").append("linearGradient").attr("id",`${t}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");e.append("stop").attr("offset","0%").attr("stop-color",p).attr("stop-opacity",1),e.append("stop").attr("offset","100%").attr("stop-color",y).attr("stop-opacity",1)}(0,s.P)(d,h.config.mindmap?.padding??r.UI.mindmap.padding,"mindmapDiagram",h.config.mindmap?.useMaxWidth??r.UI.mindmap.useMaxWidth)},"draw")},E=(0,c.K)(t=>{const{theme:e,look:n}=t;let i="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t["lineColor"+e]=t["lineColor"+e]||t["cScaleInv"+e],(0,u.A)(t["lineColor"+e])?t["lineColor"+e]=(0,p.A)(t["lineColor"+e],20):t["lineColor"+e]=(0,y.A)(t["lineColor"+e],20);for(let s=0;s<t.THEME_COLOR_LIMIT;s++){const o=""+("neo"===n?Math.max(10-2*(s-1),2):17-3*s);i+=`\n .section-${s-1} rect, .section-${s-1} path, .section-${s-1} circle, .section-${s-1} polygon, .section-${s-1} path {\n fill: ${t["cScale"+s]};\n }\n .section-${s-1} text {\n fill: ${t["cScaleLabel"+s]};\n }\n .section-${s-1} span {\n color: ${t["cScaleLabel"+s]};\n }\n .node-icon-${s-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+s]};\n }\n .section-edge-${s-1}{\n stroke: ${t["cScale"+s]};\n }\n .edge-depth-${s-1}{\n stroke-width: ${o};\n }\n .section-${s-1} line {\n stroke: ${t["cScaleInv"+s]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n [data-look="neo"].mindmap-node.section-${s-1} rect, [data-look="neo"].mindmap-node.section-${s-1} path, [data-look="neo"].mindmap-node.section-${s-1} circle, [data-look="neo"].mindmap-node.section-${s-1} polygon {\n fill: ${"redux"===e||"redux-dark"===e||"neutral"===e?t.mainBkg:t["cScale"+s]};\n stroke: ${"redux"===e||"redux-dark"===e?t.nodeBorder:t["cScale"+s]};\n stroke-width: ${t.strokeWidth??2}px;\n }\n [data-look="neo"].section-edge-${s-1}{\n stroke: ${e?.includes("redux")||"neo-dark"===e?t.nodeBorder:t["cScale"+s]};\n }\n [data-look="neo"].mindmap-node.section-${s-1} text {\n fill: ${"redux"===e||"redux-dark"===e?t.nodeBorder:t["cScaleLabel"+("neutral"===e?1:s)]};\n }\n `}return i},"genSections"),S=(0,c.K)((t,e,n)=>{let i="";for(let s=0;s<t;s++)i+=`\n [data-look="neo"].mindmap-node.section-${s-1} rect, [data-look="neo"].mindmap-node.section-${s-1} path, [data-look="neo"].mindmap-node.section-${s-1} circle, [data-look="neo"].mindmap-node.section-${s-1} polygon {\n stroke: url(${e}-gradient);\n fill: ${n};\n }\n .section-${s-1} line {\n stroke-width: 0;\n }`;return i},"genGradient"),x=(0,c.K)(t=>{const{theme:e}=t,n=t.svgId,i=t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none";return`\n .edge {\n stroke-width: 3;\n }\n ${E(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .section-root span {\n color: ${e?.includes("redux")?t.nodeBorder:t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n [data-look="neo"].mindmap-node {\n filter: ${i};\n }\n [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon {\n fill: ${e?.includes("redux")?t.mainBkg:t.git0};\n }\n [data-look="neo"].mindmap-node.section-root .text-inner-tspan {\n fill: ${e?.includes("redux")?t.nodeBorder:t["cScaleLabel"+("neutral"===e?1:0)]};\n }\n ${t.useGradient&&n&&t.mainBkg?S(t.THEME_COLOR_LIMIT,n,t.mainBkg):""}\n`},"getStyles"),L={get db(){return new k},renderer:_,parser:f,styles:x}}}]);
1
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[2549],{78257(t,e,n){n.d(e,{P:()=>r});var i=n(32178),s=n(31293),o=n(86827),r=(0,o.K)((t,e,n,o)=>{t.attr("class",n);const{width:r,height:l,x:h,y:d}=a(t,e);(0,i.a$)(t,l,r,o);const g=c(h,d,r,l,e);t.attr("viewBox",g),s.R.debug(`viewBox configured: ${g} with padding: ${e}`)},"setupViewPortForSVG"),a=(0,o.K)((t,e)=>{const n=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:n.width+2*e,height:n.height+2*e,x:n.x,y:n.y}},"calculateDimensionsWithPadding"),c=(0,o.K)((t,e,n,i,s)=>`${t-s} ${e-s} ${n} ${i}`,"createViewBox")},96755(t,e,n){n.d(e,{A:()=>o});var i=n(86827),s=n(51444),o=(0,i.K)((t,e)=>{let n;"sandbox"===e&&(n=(0,s.Ltv)("#i"+t));return("sandbox"===e?(0,s.Ltv)(n.nodes()[0].contentDocument.body):(0,s.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")},92549(t,e,n){n.d(e,{diagram:()=>L});var i=n(96755),s=n(78257),o=n(21570),r=(n(9290),n(9636),n(14782),n(91865),n(6129),n(62979),n(5494),n(99087),n(32178)),a=n(31293),c=n(86827);const l=new Uint8Array(16);const h=[];for(let t=0;t<256;++t)h.push((t+256).toString(16).slice(1));function d(t,e=0){return(h[t[e+0]]+h[t[e+1]]+h[t[e+2]]+h[t[e+3]]+"-"+h[t[e+4]]+h[t[e+5]]+"-"+h[t[e+6]]+h[t[e+7]]+"-"+h[t[e+8]]+h[t[e+9]]+"-"+h[t[e+10]]+h[t[e+11]]+h[t[e+12]]+h[t[e+13]]+h[t[e+14]]+h[t[e+15]]).toLowerCase()}const g=function(t,e,n){return e||t||!crypto.randomUUID?function(t,e,n){t=t||{};const i=t.random??t.rng?.()??crypto.getRandomValues(l);if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){if((n=n||0)<0||n+16>e.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let t=0;t<16;++t)e[n+t]=i[t];return e}return d(i)}(t,e,n):crypto.randomUUID()};var u=n(5097),p=n(78041),y=n(75263),m=function(){var t=(0,c.K)(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[1,4],n=[1,13],i=[1,12],s=[1,15],o=[1,16],r=[1,20],a=[1,19],l=[6,7,8],h=[1,26],d=[1,24],g=[1,25],u=[6,7,11],p=[1,6,13,15,16,19,22],y=[1,33],m=[1,34],f=[1,6,7,11,13,15,16,19,22],b={trace:(0,c.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:(0,c.K)(function(t,e,n,i,s,o,r){var a=o.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",o[a].id),i.addNode(o[a-1].length,o[a].id,o[a].descr,o[a].type);break;case 16:i.getLogger().trace("Icon: ",o[a]),i.decorateNode({icon:o[a]});break;case 17:case 21:i.decorateNode({class:o[a]});break;case 18:i.getLogger().trace("SPACELIST");break;case 19:i.getLogger().trace("Node: ",o[a].id),i.addNode(0,o[a].id,o[a].descr,o[a].type);break;case 20:i.decorateNode({icon:o[a]});break;case 25:i.getLogger().trace("node found ..",o[a-2]),this.$={id:o[a-1],descr:o[a-1],type:i.getType(o[a-2],o[a])};break;case 26:this.$={id:o[a],descr:o[a],type:i.nodeType.DEFAULT};break;case 27:i.getLogger().trace("node found ..",o[a-3]),this.$={id:o[a-3],descr:o[a-1],type:i.getType(o[a-2],o[a])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:n,7:[1,10],9:9,12:11,13:i,14:14,15:s,16:o,17:17,18:18,19:r,22:a},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,15:s,16:o,17:17,18:18,19:r,22:a},{6:n,9:22,12:11,13:i,14:14,15:s,16:o,17:17,18:18,19:r,22:a},{6:h,7:d,10:23,11:g},t(u,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:r,22:a}),t(u,[2,18]),t(u,[2,19]),t(u,[2,20]),t(u,[2,21]),t(u,[2,23]),t(u,[2,24]),t(u,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:d,10:32,11:g},{1:[2,7],6:n,12:21,13:i,14:14,15:s,16:o,17:17,18:18,19:r,22:a},t(p,[2,14],{7:y,11:m}),t(f,[2,8]),t(f,[2,9]),t(f,[2,10]),t(u,[2,15]),t(u,[2,16]),t(u,[2,17]),{20:[1,35]},{21:[1,36]},t(p,[2,13],{7:y,11:m}),t(f,[2,11]),t(f,[2,12]),{21:[1,37]},t(u,[2,25]),t(u,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,c.K)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,c.K)(function(t){var e=this,n=[0],i=[],s=[null],o=[],r=this.table,a="",l=0,h=0,d=0,g=o.slice.call(arguments,1),u=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);u.setInput(t,p.yy),p.yy.lexer=u,p.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var m=u.yylloc;o.push(m);var f=u.options&&u.options.ranges;function b(){var t;return"number"!=typeof(t=i.pop()||u.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K)(function(t){n.length=n.length-2*t,s.length=s.length-t,o.length=o.length-t},"popStack"),(0,c.K)(b,"lex");for(var k,_,E,S,x,L,N,D,$,I={};;){if(E=n[n.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(null==k&&(k=b()),S=r[E]&&r[E][k]),void 0===S||!S.length||!S[0]){var v="";for(L in $=[],r[E])this.terminals_[L]&&L>2&&$.push("'"+this.terminals_[L]+"'");v=u.showPosition?"Parse error on line "+(l+1)+":\n"+u.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(v,{text:u.match,token:this.terminals_[k]||k,line:u.yylineno,loc:m,expected:$})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+k);switch(S[0]){case 1:n.push(k),s.push(u.yytext),o.push(u.yylloc),n.push(S[1]),k=null,_?(k=_,_=null):(h=u.yyleng,a=u.yytext,l=u.yylineno,m=u.yylloc,d>0&&d--);break;case 2:if(N=this.productions_[S[1]][1],I.$=s[s.length-N],I._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},f&&(I._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),void 0!==(x=this.performAction.apply(I,[a,h,l,p.yy,S[1],s,o].concat(g))))return x;N&&(n=n.slice(0,-1*N*2),s=s.slice(0,-1*N),o=o.slice(0,-1*N)),n.push(this.productions_[S[1]][0]),s.push(I.$),o.push(I._$),D=r[n[n.length-2]][n[n.length-1]],n.push(D);break;case 3:return!0}}return!0},"parse")},k=function(){return{EOF:1,parseError:(0,c.K)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,c.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,c.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,c.K)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var 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),n.length-1&&(this.yylineno-=n.length-1);var s=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),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(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.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,c.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,c.K)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.K)(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={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&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[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+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],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in s)this[o]=s[o];return!1}return!1},"test_match"),next:(0,c.K)(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),o=0;o<s.length;o++)if((n=this._input.match(this.rules[s[o]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&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,c.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,c.K)(function(t){this.conditionStack.push(t)},"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(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,c.K)(function(t,e,n,i){switch(n){case 0:return t.getLogger().trace("Found comment",e.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return t.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:t.getLogger().trace("end icon"),this.popState();break;case 10:return t.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return t.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 27:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return t.getLogger().trace("Long description:",e.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}}();function _(){this.yy={}}return b.lexer=k,(0,c.K)(_,"Parser"),_.prototype=b,b.Parser=_,new _}();m.parser=m;var f=m,b={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},k=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=b,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{(0,c.K)(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(t){for(let e=this.nodes.length-1;e>=0;e--)if(this.nodes[e].level<t)return this.nodes[e];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(t,e,n,i){a.R.info("addNode",t,e,n,i);let s=!1;0===this.nodes.length?(this.baseLevel=t,t=0,s=!0):void 0!==this.baseLevel&&(t-=this.baseLevel,s=!1);const o=(0,r.D7)();let c=o.mindmap?.padding??r.UI.mindmap.padding;switch(i){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:c*=2}const l={id:this.count++,nodeId:(0,r.jZ)(e,o),level:t,descr:(0,r.jZ)(n,o),type:i,children:[],width:o.mindmap?.maxNodeWidth??r.UI.mindmap.maxNodeWidth,padding:c,isRoot:s},h=this.getParent(t);if(h)h.children.push(l),this.nodes.push(l);else{if(!s)throw new Error(`There can be only one root. No parent could be found for ("${l.descr}")`);this.nodes.push(l)}}getType(t,e){switch(a.R.debug("In get type",t,e),t){case"[":return this.nodeType.RECT;case"(":return")"===e?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(t,e){this.elements[t]=e}getElementById(t){return this.elements[t]}decorateNode(t){if(!t)return;const e=(0,r.D7)(),n=this.nodes[this.nodes.length-1];t.icon&&(n.icon=(0,r.jZ)(t.icon,e)),t.class&&(n.class=(0,r.jZ)(t.class,e))}type2Str(t){switch(t){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(t,e){if(0===t.level?t.section=void 0:t.section=e,t.children)for(const[n,i]of t.children.entries()){const s=0===t.level?n%11:e;this.assignSections(i,s)}}flattenNodes(t,e){const n=(0,r.D7)(),i=["mindmap-node"];!0===t.isRoot?i.push("section-root","section--1"):void 0!==t.section&&i.push(`section-${t.section}`),t.class&&i.push(t.class);const s=i.join(" "),o=(0,c.K)(t=>{const e=(n.theme?.toLowerCase()??"").includes("redux");switch(t){case b.CIRCLE:return"mindmapCircle";case b.RECT:return"rect";case b.ROUNDED_RECT:return"rounded";case b.CLOUD:return"cloud";case b.BANG:return"bang";case b.HEXAGON:return"hexagon";case b.DEFAULT:return e?"rounded":"defaultMindmapNode";default:return"rect"}},"getShapeFromType"),a={id:t.id.toString(),domId:"node_"+t.id.toString(),label:t.descr,labelType:"markdown",isGroup:!1,shape:o(t.type),width:t.width,height:t.height??0,padding:t.padding,cssClasses:s,cssStyles:[],look:n.look,icon:t.icon,x:t.x,y:t.y,level:t.level,nodeId:t.nodeId,type:t.type,section:t.section};if(e.push(a),t.children)for(const n of t.children)this.flattenNodes(n,e)}generateEdges(t,e){if(!t.children)return;const n=(0,r.D7)();for(const i of t.children){let s="edge";void 0!==i.section&&(s+=` section-edge-${i.section}`);s+=` edge-depth-${t.level+1}`;const o={id:`edge_${t.id}_${i.id}`,start:t.id.toString(),end:i.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:n.look,classes:s,depth:t.level,section:i.section};e.push(o),this.generateEdges(i,e)}}getData(){const t=this.getMindmap(),e=(0,r.D7)(),n=e;if(void 0!==(0,r.TM)().layout||(n.layout="cose-bilkent"),!t)return{nodes:[],edges:[],config:n};a.R.debug("getData: mindmapRoot",t,e),this.assignSections(t);const i=[],s=[];this.flattenNodes(t,i),this.generateEdges(t,s),a.R.debug(`getData: processed ${i.length} nodes and ${s.length} edges`);const o=new Map;for(const t of i)o.set(t.id,{shape:t.shape,width:t.width,height:t.height,padding:t.padding});return{nodes:i,edges:s,config:n,rootNode:t,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(o),type:"mindmap",diagramId:"mindmap-"+g()}}getLogger(){return a.R}},_={draw:(0,c.K)(async(t,e,n,c)=>{a.R.debug("Rendering mindmap diagram\n"+t);const l=c.db,h=l.getData(),d=(0,i.A)(e,h.config.securityLevel);h.type=c.type,h.layoutAlgorithm=(0,o.q7)(h.config.layout,{fallback:"cose-bilkent"}),h.diagramId=e;if(!l.getMindmap())return;h.nodes.forEach(t=>{"rounded"===t.shape?(t.radius=15,t.taper=15,t.stroke="none",t.width=0,t.padding=15):"circle"===t.shape?t.padding=10:"rect"===t.shape?(t.width=0,t.padding=10):"hexagon"===t.shape&&(t.width=0,t.height=0)}),await(0,o.XX)(h,d);const{themeVariables:g}=(0,r.zj)(),{useGradient:u,gradientStart:p,gradientStop:y}=g;if(u&&p&&y){const t=d.attr("id"),e=d.append("defs").append("linearGradient").attr("id",`${t}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");e.append("stop").attr("offset","0%").attr("stop-color",p).attr("stop-opacity",1),e.append("stop").attr("offset","100%").attr("stop-color",y).attr("stop-opacity",1)}(0,s.P)(d,h.config.mindmap?.padding??r.UI.mindmap.padding,"mindmapDiagram",h.config.mindmap?.useMaxWidth??r.UI.mindmap.useMaxWidth)},"draw")},E=(0,c.K)(t=>{const{theme:e,look:n}=t;let i="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t["lineColor"+e]=t["lineColor"+e]||t["cScaleInv"+e],(0,u.A)(t["lineColor"+e])?t["lineColor"+e]=(0,p.A)(t["lineColor"+e],20):t["lineColor"+e]=(0,y.A)(t["lineColor"+e],20);for(let s=0;s<t.THEME_COLOR_LIMIT;s++){const o=""+("neo"===n?Math.max(10-2*(s-1),2):17-3*s);i+=`\n .section-${s-1} rect, .section-${s-1} path, .section-${s-1} circle, .section-${s-1} polygon, .section-${s-1} path {\n fill: ${t["cScale"+s]};\n }\n .section-${s-1} text {\n fill: ${t["cScaleLabel"+s]};\n }\n .section-${s-1} span {\n color: ${t["cScaleLabel"+s]};\n }\n .node-icon-${s-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+s]};\n }\n .section-edge-${s-1}{\n stroke: ${t["cScale"+s]};\n }\n .edge-depth-${s-1}{\n stroke-width: ${o};\n }\n .section-${s-1} line {\n stroke: ${t["cScaleInv"+s]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n [data-look="neo"].mindmap-node.section-${s-1} rect, [data-look="neo"].mindmap-node.section-${s-1} path, [data-look="neo"].mindmap-node.section-${s-1} circle, [data-look="neo"].mindmap-node.section-${s-1} polygon {\n fill: ${"redux"===e||"redux-dark"===e||"neutral"===e?t.mainBkg:t["cScale"+s]};\n stroke: ${"redux"===e||"redux-dark"===e?t.nodeBorder:t["cScale"+s]};\n stroke-width: ${t.strokeWidth??2}px;\n }\n [data-look="neo"].section-edge-${s-1}{\n stroke: ${e?.includes("redux")||"neo-dark"===e?t.nodeBorder:t["cScale"+s]};\n }\n [data-look="neo"].mindmap-node.section-${s-1} text {\n fill: ${"redux"===e||"redux-dark"===e?t.nodeBorder:t["cScaleLabel"+("neutral"===e?1:s)]};\n }\n `}return i},"genSections"),S=(0,c.K)((t,e,n)=>{let i="";for(let s=0;s<t;s++)i+=`\n [data-look="neo"].mindmap-node.section-${s-1} rect, [data-look="neo"].mindmap-node.section-${s-1} path, [data-look="neo"].mindmap-node.section-${s-1} circle, [data-look="neo"].mindmap-node.section-${s-1} polygon {\n stroke: url(${e}-gradient);\n fill: ${n};\n }\n .section-${s-1} line {\n stroke-width: 0;\n }`;return i},"genGradient"),x=(0,c.K)(t=>{const{theme:e}=t,n=t.svgId,i=t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none";return`\n .edge {\n stroke-width: 3;\n }\n ${E(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .section-root span {\n color: ${e?.includes("redux")?t.nodeBorder:t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n [data-look="neo"].mindmap-node {\n filter: ${i};\n }\n [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon {\n fill: ${e?.includes("redux")?t.mainBkg:t.git0};\n }\n [data-look="neo"].mindmap-node.section-root .text-inner-tspan {\n fill: ${e?.includes("redux")?t.nodeBorder:t["cScaleLabel"+("neutral"===e?1:0)]};\n }\n ${t.useGradient&&n&&t.mainBkg?S(t.THEME_COLOR_LIMIT,n,t.mainBkg):""}\n`},"getStyles"),L={get db(){return new k},renderer:_,parser:f,styles:x}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[2862],{2862(e,r,s){s.d(r,{diagram:()=>l});var a=s(3975),t=(s(64918),s(96755),s(78257),s(21570),s(91730),s(9290),s(9636),s(14782),s(91865),s(6129),s(62979),s(5494),s(99087),s(32178),s(31293),s(86827)),l={parser:a._$,get db(){return new a.NM},renderer:a.Lh,styles:a.tM,init:(0,t.K)(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[2979],{18217(e,r,t){t.d(r,{diagram:()=>g});var a=t(67977),n=t(77454),s=(t(22422),t(32178),t(31293)),i=t(86827),o=t(34376),l=(0,o.Pz)().RailroadPeg.parser.LangiumParser,p=(0,i.K)(e=>{const r=e.alternatives.map(u);return 1===r.length?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),u=(0,i.K)(e=>{const r=e.elements.map(m);return 1===r.length?r[0]:{type:"sequence",elements:r}},"transformSequence"),m=(0,i.K)(e=>{const r=d(e.suffix);if(!e.operator)return r;return{type:"special",text:"&"===e.operator?`&${c(r)}`:`!${c(r)}`}},"transformPrefix"),c=(0,i.K)(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),d=(0,i.K)(e=>{const r=f(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),f=(0,i.K)(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return p(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),y=(0,i.K)(e=>({name:e.name,definition:p(e.definition)}),"transformRule"),P=(0,i.K)(e=>{(0,n.S)(e,a.db),e.title&&a.db.setTitle(e.title),e.rules.map(e=>a.db.addRule(y(e)))},"populateDb"),g={parser:{parse:(0,i.K)(e=>{a.db.clear(),s.R.debug("[PEG Parser] Starting Langium parse");const r=l.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new o.zg(r);const t=r.value;s.R.debug("[PEG Parser] Parsed rules:",t.rules.length),P(t),s.R.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a.db}},db:a.db,renderer:a.U,styles:a.$}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[9499],{89499(t,i,e){e.d(i,{diagram:()=>et});var s=e(37851),a=e(8969),n=(e(24731),e(28342)),o=e(68861),h=e(31293),r=e(86827),l=e(51444),c=function(){var t=(0,r.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],o=[1,7],h=[1,5,10,12,14,16,18,19,21,23,36,37,38],l=[1,25],c=[1,26],g=[1,28],u=[1,29],x=[1,30],d=[1,31],p=[1,32],f=[1,33],y=[1,34],m=[1,35],b=[1,36],A=[1,37],w=[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,r.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,r.K)(function(t,i,e,s,a,n,o){var h=n.length-1;switch(a){case 5:s.setOrientation(n[h]);break;case 9:s.setDiagramTitle(n[h].text.trim());break;case 12:s.setLineData({text:"",type:"text"},n[h]);break;case 13:s.setLineData(n[h-1],n[h]);break;case 14:s.setBarData({text:"",type:"text"},n[h]);break;case 15:s.setBarData(n[h-1],n[h]);break;case 16:this.$=n[h].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=n[h].trim(),s.setAccDescription(this.$);break;case 19:case 29:this.$=n[h-1];break;case 20:case 30:this.$=[n[h-2],...n[h]];break;case 21:case 31:this.$=[n[h]];break;case 22:this.$={value:Number(n[h-1]),label:n[h]};break;case 23:this.$={value:Number(n[h]),label:""};break;case 24:s.setXAxisTitle(n[h]);break;case 25:s.setXAxisTitle(n[h-1]);break;case 26:s.setXAxisTitle({type:"text",text:""});break;case 27:s.setXAxisBand(n[h]);break;case 28:s.setXAxisRangeData(Number(n[h-2]),Number(n[h]));break;case 32:s.setYAxisTitle(n[h]);break;case 33:s.setYAxisTitle(n[h-1]);break;case 34:s.setYAxisTitle({type:"text",text:""});break;case 35:s.setYAxisRangeData(Number(n[h-2]),Number(n[h]));break;case 39:case 40:this.$={text:n[h],type:"text"};break;case 41:this.$={text:n[h],type:"markdown"};break;case 42:this.$=n[h];break;case 43:this.$=n[h-1]+""+n[h]}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,36:a,37:n,38:o}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,36:a,37:n,38:o}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:n,38:o}),{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(h,[2,36]),t(h,[2,37]),t(h,[2,38]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,36:a,37:n,38:o}),{1:[2,3]},t(h,[2,5]),t(i,[2,7],{4:22,36:a,37:n,38:o}),{11:23,30:l,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b,51:A},{11:39,13:38,24:w,29:C,30:l,31:40,32:41,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b,51:A},{11:45,15:44,29:S,30:l,35:46,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b,51:A},{11:49,17:48,24:k,30:l,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b,51:A},{11:52,17:51,24:k,30:l,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b,51:A},{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:y,49:m,50:b,51:A}),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:w,29:C}),t(_,[2,26]),t(_,[2,27]),{33:[1,57]},{11:59,30:l,34:58,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b,51:A},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:l,34:74,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b,51:A},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,r.K)(function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)},"parseError"),parse:(0,r.K)(function(t){var i=this,e=[0],s=[],a=[null],n=[],o=this.table,h="",l=0,c=0,g=0,u=n.slice.call(arguments,1),x=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);x.setInput(t,d.yy),d.yy.lexer=x,d.yy.parser=this,void 0===x.yylloc&&(x.yylloc={});var f=x.yylloc;n.push(f);var y=x.options&&x.options.ranges;function m(){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.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,r.K)(function(t){e.length=e.length-2*t,a.length=a.length-t,n.length=n.length-t},"popStack"),(0,r.K)(m,"lex");for(var b,A,w,C,S,k,_,R,T,D={};;){if(w=e[e.length-1],this.defaultActions[w]?C=this.defaultActions[w]:(null==b&&(b=m()),C=o[w]&&o[w][b]),void 0===C||!C.length||!C[0]){var L="";for(k in T=[],o[w])this.terminals_[k]&&k>2&&T.push("'"+this.terminals_[k]+"'");L=x.showPosition?"Parse error on line "+(l+1)+":\n"+x.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+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 new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(C[0]){case 1:e.push(b),a.push(x.yytext),n.push(x.yylloc),e.push(C[1]),b=null,A?(b=A,A=null):(c=x.yyleng,h=x.yytext,l=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},y&&(D._$.range=[n[n.length-(_||1)].range[0],n[n.length-1].range[1]]),void 0!==(S=this.performAction.apply(D,[h,c,l,d.yy,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=o[e[e.length-2]][e[e.length-1]],e.push(R);break;case 3:return!0}}return!0},"parse")},v=function(){return{EOF:1,parseError:(0,r.K)(function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},"parseError"),setInput:(0,r.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,r.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,r.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,r.K)(function(){return this._more=!0,this},"more"),reject:(0,r.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,r.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,r.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,r.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,r.K)(function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},"showPosition"),test_match:(0,r.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}return!1},"test_match"),next:(0,r.K)(function(){if(this.done)return this.EOF;var t,i,e,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var 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){i=!1;continue}return!1}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,r.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,r.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,r.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,r.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,r.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,r.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,r.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,r.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}}}}();function E(){this.yy={}}return P.lexer=v,(0,r.K)(E,"Parser"),E.prototype=P,P.Parser=E,new E}();c.parser=c;var g=c;function u(t){return"bar"===t.type}function x(t){return"band"===t.type}function d(t){return"linear"===t.type}(0,r.K)(u,"isBarPlot"),(0,r.K)(x,"isBandAxisData"),(0,r.K)(d,"isLinearAxisData");var p=class{constructor(t){this.parentGroup=t}static{(0,r.K)(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((t,i)=>Math.max(i.length,t),0)*i,height:i};const e={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const n of t){const t=(0,a.W)(s,1,n),o=t?t.width:n.length*i,h=t?t.height:i;e.width=Math.max(e.width,o),e.height=Math.max(e.height,h)}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,r.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(){const 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){const 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){const 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){const e=this.getLabelDimension(),s=.2*t.height;this.outerPadding=Math.min(e.height/2,s);const 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){const 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){const i=this.normalizedLabelRotationInRad;return 0===i?0:Math.sin(i)*this.getLabelDimension()[t]/2}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const 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){const 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(){const t=[];if(this.showAxisLine){const 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){const 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(){const t=[];if(this.showAxisLine){const 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){const 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():[]}},y=class extends f{static{(0,r.K)(this,"BandAxis")}constructor(t,i,e,s,a){super(t,s,a,i),this.categories=e,this.scale=(0,l.WH)().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=(0,l.WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),h.R.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},m=class extends f{static{(0,r.K)(this,"LinearAxis")}constructor(t,i,e,s,a){super(t,s,a,i),this.domain=e,this.scale=(0,l.m4Y)().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=(0,l.m4Y)().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function b(t,i,e,s){const a=new p(s);return x(t)?new y(i,e,t.categories,t.title,a):new m(i,e,[t.min,t.max],t.title,a)}(0,r.K)(b,"getAxis");var A=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,r.K)(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const 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(){const 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 w(t,i,e,s){const a=new p(s);return new A(a,t,i,e)}(0,r.K)(w,"getChartTitleComponent");var C=class{constructor(t,i,e,s,a){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=a}static{(0,r.K)(this,"LinePlot")}getDrawableElement(){const t=this.plotData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]);let i;if(i="horizontal"===this.orientation?(0,l.n8j)().y(t=>t[0]).x(t=>t[1])(t):(0,l.n8j)().x(t=>t[0]).y(t=>t[1])(t),!i)return[];const e=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){const i=10,s=12,a=[];for(const[e,[n,o]]of t.entries()){const t=this.plotData.pointLabels[e];t&&("horizontal"===this.orientation?a.push({x:o+i,y:n,text:t,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:s,rotation:0}):a.push({x:n,y:o-i,text:t,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:s,rotation:0}))}a.length>0&&e.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:a})}return e}},S=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,r.K)(this,"BarPlot")}getDrawableElement(){const 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}))}]}},k=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,r.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");const t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new C(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new S(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}}return t}};function _(t,i,e){return new k(t,i,e)}(0,r.K)(_,"getPlotComponent");var R,T=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:w(t,i,e,s),plot:_(t,i,e),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,r.K)(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),n=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:n});t-=o.width,i-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=o.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"),o=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=o.width,t-=o.width,t>0&&(a+=t,t=0),i>0&&(n+=i,i=0),this.componentStore.plot.calculateSpace({width:a,height:n}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.xAxis.setRange([e,e+a]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+n}),this.componentStore.yAxis.setRange([s,s+n]),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=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:n,height:o});t-=h.width,i-=h.height,h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=h.height,i-=h.height,this.componentStore.xAxis.setAxisPosition("left"),h=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=h.width,s=h.width,this.componentStore.yAxis.setAxisPosition("top"),h=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=h.height,a=e+h.height,t>0&&(n+=t,t=0),i>0&&(o+=i,i=0),this.componentStore.plot.calculateSpace({width:n,height:o}),this.componentStore.plot.setBoundingBoxXY({x:s,y:a}),this.componentStore.yAxis.setRange([s,s+n]),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();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},D=class{static{(0,r.K)(this,"XYChartBuilder")}static build(t,i,e,s){return new T(t,i,e,s).getDrawableElement()}},L=0,P=$(),v=z(),E=B(),K=v.plotColorPalette.split(",").map(t=>t.trim()),I=!1,M=!1;function z(){const t=(0,o.P$)(),i=(0,o.zj)();return(0,n.$t)(t.xyChart,i.themeVariables.xyChart)}function $(){const t=(0,o.zj)();return(0,n.$t)(o.UI.xyChart,t.xyChart)}function B(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function O(t){const i=(0,o.zj)();return(0,o.jZ)(t.trim(),i)}function W(t){R=t}function F(t){P.chartOrientation="horizontal"===t?"horizontal":"vertical"}function X(t){E.xAxis.title=O(t.text)}function N(t,i){E.xAxis={type:"linear",title:E.xAxis.title,min:t,max:i},I=!0}function V(t){E.xAxis={type:"band",title:E.xAxis.title,categories:t.map(t=>O(t.text))},I=!0}function Y(t){E.yAxis.title=O(t.text)}function H(t,i){E.yAxis={type:"linear",title:E.yAxis.title,min:t,max:i},M=!0}function U(t){const i=Math.min(...t),e=Math.max(...t),s=d(E.yAxis)?E.yAxis.min:1/0,a=d(E.yAxis)?E.yAxis.max:-1/0;E.yAxis={type:"linear",title:E.yAxis.title,min:Math.min(s,i),max:Math.max(a,e)}}function j(t){let i=[];if(0===t.length)return i;if(!I){const i=d(E.xAxis)?E.xAxis.min:1/0,e=d(E.xAxis)?E.xAxis.max:-1/0;N(Math.min(i,1),Math.max(e,t.length))}if(x(E.xAxis)&&t.length>E.xAxis.categories.length&&(t=t.slice(0,E.xAxis.categories.length)),M||U(t),x(E.xAxis)&&(i=E.xAxis.categories.map((i,e)=>[i,t[e]])),d(E.xAxis)){const e=E.xAxis.min,s=E.xAxis.max,a=(s-e)/(t.length-1),n=[];for(let t=e;t<=s;t+=a)n.push(`${t}`);i=n.map((i,e)=>[i,t[e]])}return i}function G(t){return K[0===t?0:t%K.length]}function Q(t,i){const e=i.map(t=>t.value),s=i.map(t=>t.label?O(t.label):""),a=j(e),n=s.some(t=>""!==t);E.plots.push({type:"line",strokeFill:G(L),strokeWidth:2,data:a,...n?{pointLabels:s}:{}}),L++}function Z(t,i){const e=j(i.map(t=>t.value));E.plots.push({type:"bar",fill:G(L),data:e}),L++}function q(){if(0===E.plots.length)throw Error("No Plot to render, please provide a plot with some data");return E.title=(0,o.ab)(),D.build(P,E,v,R)}function J(){return v}function tt(){return P}function it(){return E}(0,r.K)(z,"getChartDefaultThemeConfig"),(0,r.K)($,"getChartDefaultConfig"),(0,r.K)(B,"getChartDefaultData"),(0,r.K)(O,"textSanitizer"),(0,r.K)(W,"setTmpSVGG"),(0,r.K)(F,"setOrientation"),(0,r.K)(X,"setXAxisTitle"),(0,r.K)(N,"setXAxisRangeData"),(0,r.K)(V,"setXAxisBand"),(0,r.K)(Y,"setYAxisTitle"),(0,r.K)(H,"setYAxisRangeData"),(0,r.K)(U,"setYAxisRangeFromPlotData"),(0,r.K)(j,"transformDataWithoutCategory"),(0,r.K)(G,"getPlotColorFromPalette"),(0,r.K)(Q,"setLineData"),(0,r.K)(Z,"setBarData"),(0,r.K)(q,"getDrawableElem"),(0,r.K)(J,"getChartThemeConfig"),(0,r.K)(tt,"getChartConfig"),(0,r.K)(it,"getXYChartData");var et={parser:g,db:{getDrawableElem:q,clear:(0,r.K)(function(){(0,o.IU)(),L=0,P=$(),E={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},v=z(),K=v.plotColorPalette.split(",").map(t=>t.trim()),I=!1,M=!1},"clear"),setAccTitle:o.SV,getAccTitle:o.iN,setDiagramTitle:o.ke,getDiagramTitle:o.ab,getAccDescription:o.m7,setAccDescription:o.EI,setOrientation:F,setXAxisTitle:X,setXAxisRangeData:N,setXAxisBand:V,setYAxisTitle:Y,setYAxisRangeData:H,setLineData:Q,setBarData:Z,setTmpSVGG:W,getChartThemeConfig:J,getChartConfig:tt,getXYChartData:it},renderer:{draw:(0,r.K)((t,i,e,a)=>{const n=a.db,l=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,r.K)(u,"getDominantBaseLine"),(0,r.K)(x,"getTextAnchor"),(0,r.K)(d,"getTextTransformation"),h.R.debug("Rendering xychart chart\n"+t);const p=(0,s.D)(i),f=p.append("g").attr("class","main"),y=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}`),y.attr("fill",l.backgroundColor),n.setTmpSVGG(p.append("g").attr("class","mermaid-tmp-group"));const m=n.getDrawableElem(),b={};function A(t){let i=f,e="";for(const[s]of t.entries()){let a=f;s>0&&b[e]&&(a=b[e]),e+=t[s],i=b[e],i||(i=b[e]=a.append("g").attr("class",t[s]))}return i}(0,r.K)(A,"getGroup");for(const t of m){if(0===t.data.length)continue;const i=A(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){const e=c.showDataLabelOutsideBar;if("horizontal"===c.chartOrientation){let s=function(t,i){const{data:e,label:s}=t;return i*s.length*a<=e.width-n};(0,r.K)(s,"fitsHorizontally");const 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),h=o.map(t=>{const{data:i}=t;let e=.7*i.height;for(;!s(t,e)&&e>0;)e-=1;return e}),c=Math.floor(Math.min(...h)),u=(0,r.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",u).attr("y",t=>t.data.y+t.data.height/2).attr("text-anchor",e?"start":"end").attr("dominant-baseline","middle").attr("fill",l.dataLabelColor).attr("font-size",`${c}px`).text(t=>t.label)}else{let s=function(t,i,e){const{data:s,label:a}=t,n=i*a.length*.7,o=s.x+s.width/2,h=o+n/2,r=o-n/2>=s.x&&h<=s.x+s.width,l=s.y+e+i<=s.y+s.height;return r&&l};(0,r.K)(s,"fitsInBar");const a=10,n=t.data.map((t,i)=>({data:t,label:g[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),o=n.map(t=>{const{data:i,label:e}=t;let n=i.width/(.7*e.length);for(;!s(t,n,a)&&n>0;)n-=1;return n}),h=Math.floor(Math.min(...o)),c=(0,r.K)(t=>e?t.data.y-a:t.data.y+a,"determineLabelYPosition");i.selectAll("text").data(n).enter().append("text").attr("x",t=>t.data.x+t.data.width/2).attr("y",c).attr("text-anchor","middle").attr("dominant-baseline",e?"auto":"hanging").attr("fill",l.dataLabelColor).attr("font-size",`${h}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")}}}}]);
1
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[3386],{93386(t,i,e){e.d(i,{diagram:()=>et});var s=e(22422),a=e(62979),n=(e(5494),e(99087)),o=e(32178),h=e(31293),r=e(86827),l=e(51444),c=function(){var t=(0,r.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],o=[1,7],h=[1,5,10,12,14,16,18,19,21,23,36,37,38],l=[1,25],c=[1,26],g=[1,28],u=[1,29],x=[1,30],d=[1,31],p=[1,32],f=[1,33],y=[1,34],m=[1,35],b=[1,36],A=[1,37],w=[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,r.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,r.K)(function(t,i,e,s,a,n,o){var h=n.length-1;switch(a){case 5:s.setOrientation(n[h]);break;case 9:s.setDiagramTitle(n[h].text.trim());break;case 12:s.setLineData({text:"",type:"text"},n[h]);break;case 13:s.setLineData(n[h-1],n[h]);break;case 14:s.setBarData({text:"",type:"text"},n[h]);break;case 15:s.setBarData(n[h-1],n[h]);break;case 16:this.$=n[h].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=n[h].trim(),s.setAccDescription(this.$);break;case 19:case 29:this.$=n[h-1];break;case 20:case 30:this.$=[n[h-2],...n[h]];break;case 21:case 31:this.$=[n[h]];break;case 22:this.$={value:Number(n[h-1]),label:n[h]};break;case 23:this.$={value:Number(n[h]),label:""};break;case 24:s.setXAxisTitle(n[h]);break;case 25:s.setXAxisTitle(n[h-1]);break;case 26:s.setXAxisTitle({type:"text",text:""});break;case 27:s.setXAxisBand(n[h]);break;case 28:s.setXAxisRangeData(Number(n[h-2]),Number(n[h]));break;case 32:s.setYAxisTitle(n[h]);break;case 33:s.setYAxisTitle(n[h-1]);break;case 34:s.setYAxisTitle({type:"text",text:""});break;case 35:s.setYAxisRangeData(Number(n[h-2]),Number(n[h]));break;case 39:case 40:this.$={text:n[h],type:"text"};break;case 41:this.$={text:n[h],type:"markdown"};break;case 42:this.$=n[h];break;case 43:this.$=n[h-1]+""+n[h]}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,36:a,37:n,38:o}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,36:a,37:n,38:o}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:n,38:o}),{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(h,[2,36]),t(h,[2,37]),t(h,[2,38]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,36:a,37:n,38:o}),{1:[2,3]},t(h,[2,5]),t(i,[2,7],{4:22,36:a,37:n,38:o}),{11:23,30:l,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b,51:A},{11:39,13:38,24:w,29:C,30:l,31:40,32:41,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b,51:A},{11:45,15:44,29:S,30:l,35:46,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b,51:A},{11:49,17:48,24:k,30:l,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b,51:A},{11:52,17:51,24:k,30:l,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b,51:A},{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:y,49:m,50:b,51:A}),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:w,29:C}),t(_,[2,26]),t(_,[2,27]),{33:[1,57]},{11:59,30:l,34:58,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b,51:A},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:l,34:74,39:24,40:c,41:27,42:g,43:u,44:x,45:d,46:p,47:f,48:y,49:m,50:b,51:A},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,r.K)(function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)},"parseError"),parse:(0,r.K)(function(t){var i=this,e=[0],s=[],a=[null],n=[],o=this.table,h="",l=0,c=0,g=0,u=n.slice.call(arguments,1),x=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);x.setInput(t,d.yy),d.yy.lexer=x,d.yy.parser=this,void 0===x.yylloc&&(x.yylloc={});var f=x.yylloc;n.push(f);var y=x.options&&x.options.ranges;function m(){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.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,r.K)(function(t){e.length=e.length-2*t,a.length=a.length-t,n.length=n.length-t},"popStack"),(0,r.K)(m,"lex");for(var b,A,w,C,S,k,_,R,T,D={};;){if(w=e[e.length-1],this.defaultActions[w]?C=this.defaultActions[w]:(null==b&&(b=m()),C=o[w]&&o[w][b]),void 0===C||!C.length||!C[0]){var L="";for(k in T=[],o[w])this.terminals_[k]&&k>2&&T.push("'"+this.terminals_[k]+"'");L=x.showPosition?"Parse error on line "+(l+1)+":\n"+x.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+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 new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(C[0]){case 1:e.push(b),a.push(x.yytext),n.push(x.yylloc),e.push(C[1]),b=null,A?(b=A,A=null):(c=x.yyleng,h=x.yytext,l=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},y&&(D._$.range=[n[n.length-(_||1)].range[0],n[n.length-1].range[1]]),void 0!==(S=this.performAction.apply(D,[h,c,l,d.yy,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=o[e[e.length-2]][e[e.length-1]],e.push(R);break;case 3:return!0}}return!0},"parse")},v=function(){return{EOF:1,parseError:(0,r.K)(function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},"parseError"),setInput:(0,r.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,r.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,r.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,r.K)(function(){return this._more=!0,this},"more"),reject:(0,r.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,r.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,r.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,r.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,r.K)(function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},"showPosition"),test_match:(0,r.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}return!1},"test_match"),next:(0,r.K)(function(){if(this.done)return this.EOF;var t,i,e,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var 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){i=!1;continue}return!1}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,r.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,r.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,r.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,r.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,r.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,r.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,r.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,r.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}}}}();function E(){this.yy={}}return P.lexer=v,(0,r.K)(E,"Parser"),E.prototype=P,P.Parser=E,new E}();c.parser=c;var g=c;function u(t){return"bar"===t.type}function x(t){return"band"===t.type}function d(t){return"linear"===t.type}(0,r.K)(u,"isBarPlot"),(0,r.K)(x,"isBandAxisData"),(0,r.K)(d,"isLinearAxisData");var p=class{constructor(t){this.parentGroup=t}static{(0,r.K)(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((t,i)=>Math.max(i.length,t),0)*i,height:i};const e={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const n of t){const t=(0,a.W)(s,1,n),o=t?t.width:n.length*i,h=t?t.height:i;e.width=Math.max(e.width,o),e.height=Math.max(e.height,h)}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,r.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(){const 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){const 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){const 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){const e=this.getLabelDimension(),s=.2*t.height;this.outerPadding=Math.min(e.height/2,s);const 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){const 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){const i=this.normalizedLabelRotationInRad;return 0===i?0:Math.sin(i)*this.getLabelDimension()[t]/2}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const 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){const 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(){const t=[];if(this.showAxisLine){const 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){const 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(){const t=[];if(this.showAxisLine){const 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){const 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():[]}},y=class extends f{static{(0,r.K)(this,"BandAxis")}constructor(t,i,e,s,a){super(t,s,a,i),this.categories=e,this.scale=(0,l.WH)().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=(0,l.WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),h.R.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},m=class extends f{static{(0,r.K)(this,"LinearAxis")}constructor(t,i,e,s,a){super(t,s,a,i),this.domain=e,this.scale=(0,l.m4Y)().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=(0,l.m4Y)().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function b(t,i,e,s){const a=new p(s);return x(t)?new y(i,e,t.categories,t.title,a):new m(i,e,[t.min,t.max],t.title,a)}(0,r.K)(b,"getAxis");var A=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,r.K)(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const 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(){const 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 w(t,i,e,s){const a=new p(s);return new A(a,t,i,e)}(0,r.K)(w,"getChartTitleComponent");var C=class{constructor(t,i,e,s,a){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=a}static{(0,r.K)(this,"LinePlot")}getDrawableElement(){const t=this.plotData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]);let i;if(i="horizontal"===this.orientation?(0,l.n8j)().y(t=>t[0]).x(t=>t[1])(t):(0,l.n8j)().x(t=>t[0]).y(t=>t[1])(t),!i)return[];const e=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){const i=10,s=12,a=[];for(const[e,[n,o]]of t.entries()){const t=this.plotData.pointLabels[e];t&&("horizontal"===this.orientation?a.push({x:o+i,y:n,text:t,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:s,rotation:0}):a.push({x:n,y:o-i,text:t,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:s,rotation:0}))}a.length>0&&e.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:a})}return e}},S=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,r.K)(this,"BarPlot")}getDrawableElement(){const 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}))}]}},k=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,r.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");const t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new C(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new S(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}}return t}};function _(t,i,e){return new k(t,i,e)}(0,r.K)(_,"getPlotComponent");var R,T=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:w(t,i,e,s),plot:_(t,i,e),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,r.K)(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),n=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:n});t-=o.width,i-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=o.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"),o=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=o.width,t-=o.width,t>0&&(a+=t,t=0),i>0&&(n+=i,i=0),this.componentStore.plot.calculateSpace({width:a,height:n}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.xAxis.setRange([e,e+a]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+n}),this.componentStore.yAxis.setRange([s,s+n]),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=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:n,height:o});t-=h.width,i-=h.height,h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=h.height,i-=h.height,this.componentStore.xAxis.setAxisPosition("left"),h=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=h.width,s=h.width,this.componentStore.yAxis.setAxisPosition("top"),h=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=h.height,a=e+h.height,t>0&&(n+=t,t=0),i>0&&(o+=i,i=0),this.componentStore.plot.calculateSpace({width:n,height:o}),this.componentStore.plot.setBoundingBoxXY({x:s,y:a}),this.componentStore.yAxis.setRange([s,s+n]),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();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},D=class{static{(0,r.K)(this,"XYChartBuilder")}static build(t,i,e,s){return new T(t,i,e,s).getDrawableElement()}},L=0,P=$(),v=z(),E=B(),K=v.plotColorPalette.split(",").map(t=>t.trim()),I=!1,M=!1;function z(){const t=(0,o.P$)(),i=(0,o.zj)();return(0,n.$t)(t.xyChart,i.themeVariables.xyChart)}function $(){const t=(0,o.zj)();return(0,n.$t)(o.UI.xyChart,t.xyChart)}function B(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function O(t){const i=(0,o.zj)();return(0,o.jZ)(t.trim(),i)}function W(t){R=t}function F(t){P.chartOrientation="horizontal"===t?"horizontal":"vertical"}function X(t){E.xAxis.title=O(t.text)}function N(t,i){E.xAxis={type:"linear",title:E.xAxis.title,min:t,max:i},I=!0}function V(t){E.xAxis={type:"band",title:E.xAxis.title,categories:t.map(t=>O(t.text))},I=!0}function Y(t){E.yAxis.title=O(t.text)}function H(t,i){E.yAxis={type:"linear",title:E.yAxis.title,min:t,max:i},M=!0}function U(t){const i=Math.min(...t),e=Math.max(...t),s=d(E.yAxis)?E.yAxis.min:1/0,a=d(E.yAxis)?E.yAxis.max:-1/0;E.yAxis={type:"linear",title:E.yAxis.title,min:Math.min(s,i),max:Math.max(a,e)}}function j(t){let i=[];if(0===t.length)return i;if(!I){const i=d(E.xAxis)?E.xAxis.min:1/0,e=d(E.xAxis)?E.xAxis.max:-1/0;N(Math.min(i,1),Math.max(e,t.length))}if(x(E.xAxis)&&t.length>E.xAxis.categories.length&&(t=t.slice(0,E.xAxis.categories.length)),M||U(t),x(E.xAxis)&&(i=E.xAxis.categories.map((i,e)=>[i,t[e]])),d(E.xAxis)){const e=E.xAxis.min,s=E.xAxis.max;if(1===t.length)i=[[`${e}`,t[0]]];else{const a=(s-e)/(t.length-1);i=t.map((t,i)=>[`${e+i*a}`,t])}}return i}function G(t){return K[0===t?0:t%K.length]}function Q(t,i){const e=i.map(t=>t.value),s=i.map(t=>t.label?O(t.label):""),a=j(e),n=s.some(t=>""!==t);E.plots.push({type:"line",strokeFill:G(L),strokeWidth:2,data:a,...n?{pointLabels:s}:{}}),L++}function Z(t,i){const e=j(i.map(t=>t.value));E.plots.push({type:"bar",fill:G(L),data:e}),L++}function q(){if(0===E.plots.length)throw Error("No Plot to render, please provide a plot with some data");return E.title=(0,o.ab)(),D.build(P,E,v,R)}function J(){return v}function tt(){return P}function it(){return E}(0,r.K)(z,"getChartDefaultThemeConfig"),(0,r.K)($,"getChartDefaultConfig"),(0,r.K)(B,"getChartDefaultData"),(0,r.K)(O,"textSanitizer"),(0,r.K)(W,"setTmpSVGG"),(0,r.K)(F,"setOrientation"),(0,r.K)(X,"setXAxisTitle"),(0,r.K)(N,"setXAxisRangeData"),(0,r.K)(V,"setXAxisBand"),(0,r.K)(Y,"setYAxisTitle"),(0,r.K)(H,"setYAxisRangeData"),(0,r.K)(U,"setYAxisRangeFromPlotData"),(0,r.K)(j,"transformDataWithoutCategory"),(0,r.K)(G,"getPlotColorFromPalette"),(0,r.K)(Q,"setLineData"),(0,r.K)(Z,"setBarData"),(0,r.K)(q,"getDrawableElem"),(0,r.K)(J,"getChartThemeConfig"),(0,r.K)(tt,"getChartConfig"),(0,r.K)(it,"getXYChartData");var et={parser:g,db:{getDrawableElem:q,clear:(0,r.K)(function(){(0,o.IU)(),L=0,P=$(),E={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},v=z(),K=v.plotColorPalette.split(",").map(t=>t.trim()),I=!1,M=!1},"clear"),setAccTitle:o.SV,getAccTitle:o.iN,setDiagramTitle:o.ke,getDiagramTitle:o.ab,getAccDescription:o.m7,setAccDescription:o.EI,setOrientation:F,setXAxisTitle:X,setXAxisRangeData:N,setXAxisBand:V,setYAxisTitle:Y,setYAxisRangeData:H,setLineData:Q,setBarData:Z,setTmpSVGG:W,getChartThemeConfig:J,getChartConfig:tt,getXYChartData:it},renderer:{draw:(0,r.K)((t,i,e,a)=>{const n=a.db,l=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,r.K)(u,"getDominantBaseLine"),(0,r.K)(x,"getTextAnchor"),(0,r.K)(d,"getTextTransformation"),h.R.debug("Rendering xychart chart\n"+t);const p=(0,s.D)(i),f=p.append("g").attr("class","main"),y=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}`),y.attr("fill",l.backgroundColor),n.setTmpSVGG(p.append("g").attr("class","mermaid-tmp-group"));const m=n.getDrawableElem(),b={};function A(t){let i=f,e="";for(const[s]of t.entries()){let a=f;s>0&&b[e]&&(a=b[e]),e+=t[s],i=b[e],i||(i=b[e]=a.append("g").attr("class",t[s]))}return i}(0,r.K)(A,"getGroup");for(const t of m){if(0===t.data.length)continue;const i=A(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){const e=c.showDataLabelOutsideBar;if("horizontal"===c.chartOrientation){let s=function(t,i){const{data:e,label:s}=t;return i*s.length*a<=e.width-n};(0,r.K)(s,"fitsHorizontally");const 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),h=o.map(t=>{const{data:i}=t;let e=.7*i.height;for(;!s(t,e)&&e>0;)e-=1;return e}),c=Math.floor(Math.min(...h)),u=(0,r.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",u).attr("y",t=>t.data.y+t.data.height/2).attr("text-anchor",e?"start":"end").attr("dominant-baseline","middle").attr("fill",l.dataLabelColor).attr("font-size",`${c}px`).text(t=>t.label)}else{let s=function(t,i,e){const{data:s,label:a}=t,n=i*a.length*.7,o=s.x+s.width/2,h=o+n/2,r=o-n/2>=s.x&&h<=s.x+s.width,l=s.y+e+i<=s.y+s.height;return r&&l};(0,r.K)(s,"fitsInBar");const a=10,n=t.data.map((t,i)=>({data:t,label:g[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),o=n.map(t=>{const{data:i,label:e}=t;let n=i.width/(.7*e.length);for(;!s(t,n,a)&&n>0;)n-=1;return n}),h=Math.floor(Math.min(...o)),c=(0,r.K)(t=>e?t.data.y-a:t.data.y+a,"determineLabelYPosition");i.selectAll("text").data(n).enter().append("text").attr("x",t=>t.data.x+t.data.width/2).attr("y",c).attr("text-anchor","middle").attr("dominant-baseline",e?"auto":"hanging").attr("fill",l.dataLabelColor).attr("font-size",`${h}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")}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[6317],{77454(e,t,a){function l(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}a.d(t,{S:()=>l}),(0,a(86827).K)(l,"populateCommonDb")},59337(e,t,a){a.d(t,{P:()=>n});var l=a(68861),s=a(31293),r=a(86827),n=(0,r.K)((e,t,a,r)=>{e.attr("class",a);const{width:n,height:c,x:d,y:p}=i(e,t);(0,l.a$)(e,c,n,r);const h=o(d,p,n,c,t);e.attr("viewBox",h),s.R.debug(`viewBox configured: ${h} with padding: ${t}`)},"setupViewPortForSVG"),i=(0,r.K)((e,t)=>{const a=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:a.width+2*t,height:a.height+2*t,x:a.x,y:a.y}},"calculateDimensionsWithPadding"),o=(0,r.K)((e,t,a,l,s)=>`${e-s} ${t-s} ${a} ${l}`,"createViewBox")},76317(e,t,a){a.d(t,{diagram:()=>v});var l=a(77454),s=a(37851),r=a(59337),n=a(23665),i=a(28342),o=a(68861),c=a(31293),d=a(86827),p=a(34376),h=a(51444),m=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=o.SV,this.getAccTitle=o.iN,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.getAccDescription=o.m7,this.setAccDescription=o.EI}static{(0,d.K)(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const e=o.UI,t=(0,o.zj)();return(0,i.$t)({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),0===t&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,t){const a=this.classes.get(e)??{id:e,styles:[],textStyles:[]},l=t.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");l&&l.forEach(e=>{(0,n.KX)(e)&&(a?.textStyles?a.textStyles.push(e):a.textStyles=[e]),a?.styles?a.styles.push(e):a.styles=[e]}),this.classes.set(e,a)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){(0,o.IU)(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function y(e){if(!e.length)return[];const t=[],a=[];return e.forEach(e=>{const l={name:e.name,children:"Leaf"===e.type?void 0:[]};for(l.classSelector=e?.classSelector,e?.cssCompiledStyles&&(l.cssCompiledStyles=e.cssCompiledStyles),"Leaf"===e.type&&void 0!==e.value&&(l.value=e.value);a.length>0&&a[a.length-1].level>=e.level;)a.pop();if(0===a.length)t.push(l);else{const e=a[a.length-1].node;e.children?e.children.push(l):e.children=[l]}"Leaf"!==e.type&&a.push({node:l,level:e.level})}),t}(0,d.K)(y,"buildHierarchy");var f=(0,d.K)((e,t)=>{(0,l.S)(e,t);const a=[];for(const a of e.TreemapRows??[])"ClassDefStatement"===a.$type&&t.addClass(a.className??"",a.styleText??"");for(const l of e.TreemapRows??[]){const e=l.item;if(!e)continue;const s=l.indent?parseInt(l.indent):0,r=u(e),n=e.classSelector?t.getStylesForClass(e.classSelector):[],i=n.length>0?n:void 0,o={level:s,name:r,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:i};a.push(o)}const s=y(a),r=(0,d.K)((e,a)=>{for(const l of e)t.addNode(l,a),l.children&&l.children.length>0&&r(l.children,a+1)},"addNodesRecursively");r(s,0)},"populate"),u=(0,d.K)(e=>e.name?String(e.name):"","getItemName"),S={parser:{yy:void 0},parse:(0,d.K)(async e=>{try{const t=p.qg,a=await t("treemap",e);c.R.debug("Treemap AST:",a);const l=S.parser?.yy;if(!(l instanceof m))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");f(a,l)}catch(e){throw c.R.error("Error parsing treemap:",e),e}},"parse")},g=10,x={draw:(0,d.K)((e,t,a,l)=>{const i=l.db,p=i.getConfig(),m=p.padding??10,y=i.getDiagramTitle(),f=i.getRoot(),{themeVariables:u}=(0,o.zj)();if(!f)return;const S=y?30:0,x=(0,s.D)(t),$=p.nodeWidth?p.nodeWidth*g:960,b=p.nodeHeight?p.nodeHeight*g:500,v=$,C=b+S;let w;x.attr("viewBox",`0 0 ${v} ${C}`),(0,o.a$)(x,C,v,p.useMaxWidth);try{const e=p.valueFormat||",";if("$0,0"===e)w=(0,d.K)(e=>"$"+(0,h.GPZ)(",")(e),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const t=/\.\d+/.exec(e),a=t?t[0]:"";w=(0,d.K)(e=>"$"+(0,h.GPZ)(","+a)(e),"valueFormat")}else if(e.startsWith("$")){const t=e.substring(1);w=(0,d.K)(e=>"$"+(0,h.GPZ)(t||"")(e),"valueFormat")}else w=(0,h.GPZ)(e)}catch(e){c.R.error("Error creating format function:",e),w=(0,h.GPZ)(",")}const L=(0,h.UMr)().range(["transparent",u.cScale0,u.cScale1,u.cScale2,u.cScale3,u.cScale4,u.cScale5,u.cScale6,u.cScale7,u.cScale8,u.cScale9,u.cScale10,u.cScale11]),k=(0,h.UMr)().range(["transparent",u.cScalePeer0,u.cScalePeer1,u.cScalePeer2,u.cScalePeer3,u.cScalePeer4,u.cScalePeer5,u.cScalePeer6,u.cScalePeer7,u.cScalePeer8,u.cScalePeer9,u.cScalePeer10,u.cScalePeer11]),T=(0,h.UMr)().range([u.cScaleLabel0,u.cScaleLabel1,u.cScaleLabel2,u.cScaleLabel3,u.cScaleLabel4,u.cScaleLabel5,u.cScaleLabel6,u.cScaleLabel7,u.cScaleLabel8,u.cScaleLabel9,u.cScaleLabel10,u.cScaleLabel11]);y&&x.append("text").attr("x",v/2).attr("y",S/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(y);const P=x.append("g").attr("transform",`translate(0, ${S})`).attr("class","treemapContainer"),M=(0,h.Sk5)(f).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),z=(0,h.hkb)().size([$,b]).paddingTop(e=>e.children&&e.children.length>0?35:0).paddingInner(m).paddingLeft(e=>e.children&&e.children.length>0?g:0).paddingRight(e=>e.children&&e.children.length>0?g:0).paddingBottom(e=>e.children&&e.children.length>0?g:0).round(!0)(M),F=z.descendants().filter(e=>e.children&&e.children.length>0),K=P.selectAll(".treemapSection").data(F).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);K.append("rect").attr("width",e=>e.x1-e.x0).attr("height",25).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>0===e.depth?"display: none;":""),K.append("clipPath").attr("id",(e,a)=>`clip-section-${t}-${a}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",25),K.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>L(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>k(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(0===e.depth)return"display: none;";const t=(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),K.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",12.5).attr("dominant-baseline","middle").text(e=>0===e.depth?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,a)=>`url(#clip-section-${t}-${a})`).attr("style",e=>{if(0===e.depth)return"display: none;";return"dominant-baseline: middle; font-size: 12px; fill:"+T(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")}).each(function(e){if(0===e.depth)return;const t=(0,h.Ltv)(this),a=e.data.name;t.text(a);const l=e.x1-e.x0;let s;if(!1!==p.showValues&&e.value){s=l-10-30-10-6}else{s=l-6-6}const r=Math.max(15,s),n=t.node();if(n.getComputedTextLength()>r){const e="...";let l=a;for(;l.length>0;){if(l=a.substring(0,l.length-1),0===l.length){t.text(e),n.getComputedTextLength()>r&&t.text("");break}if(t.text(l+e),n.getComputedTextLength()<=r)break}}}),!1!==p.showValues&&K.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",12.5).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?w(e.value):"").attr("font-style","italic").attr("style",e=>{if(0===e.depth)return"display: none;";return"text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+T(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")});const D=z.leaves(),N=D.length>20,G=N?16:38,V=N?14:28,W=N?4:8,R=N?4:6,A=N?2:4,B=N?8:10,I=N?1:2,X=P.selectAll(".treemapLeafGroup").data(D).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);X.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?L(e.parent.data.name):L(e.data.name)).attr("style",e=>(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?L(e.parent.data.name):L(e.data.name)).attr("stroke-width",3),X.append("clipPath").attr("id",(e,a)=>`clip-${t}-${a}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4));if(X.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>`text-anchor: middle; dominant-baseline: middle; font-size: ${G}px;fill:`+T(e.data.name)+";"+(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,a)=>`url(#clip-${t}-${a})`).text(e=>e.data.name).each(function(e){const t=(0,h.Ltv)(this),a=e.x1-e.x0,l=e.y1-e.y0,s=t.node(),r=a-2*A,n=l-2*A;if(r<B||n<B)return void t.style("display","none");let i=parseInt(t.style("font-size"),10);for(;s.getComputedTextLength()>r&&i>W;)i--,t.style("font-size",`${i}px`);let o=Math.max(R,Math.min(V,Math.round(.6*i))),c=i+I+o;for(;c>n&&i>W&&(i--,o=Math.max(R,Math.min(V,Math.round(.6*i))),!(o<R&&i===W));)t.style("font-size",`${i}px`),c=i+I+o;t.style("font-size",`${i}px`),N?(i<W||n<W)&&t.style("display","none"):(s.getComputedTextLength()>r||i<W||n<i)&&t.style("display","none")}),!1!==p.showValues){X.append("text").attr("class","treemapValue").attr("x",e=>(e.x1-e.x0)/2).attr("y",function(e){return(e.y1-e.y0)/2}).attr("style",e=>`text-anchor: middle; dominant-baseline: hanging; font-size: ${V}px;fill:`+T(e.data.name)+";"+(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,a)=>`url(#clip-${t}-${a})`).text(e=>e.value?w(e.value):"").each(function(e){const t=(0,h.Ltv)(this),a=this.parentNode;if(!a)return void t.style("display","none");const l=(0,h.Ltv)(a).select(".treemapLabel");if(l.empty()||"none"===l.style("display"))return void t.style("display","none");const s=parseFloat(l.style("font-size")),r=Math.max(R,Math.min(V,Math.round(.6*s)));t.style("font-size",`${r}px`);const n=(e.y1-e.y0)/2+s/2+I;t.attr("y",n);const i=e.x1-e.x0,o=e.y1-e.y0-4,c=i-2*A;t.node().getComputedTextLength()>c||n+r>o||r<R?t.style("display","none"):t.style("display",null)})}const E=p.diagramPadding??8;(0,r.P)(x,E,"flowchart",p?.useMaxWidth||!1)},"draw"),getClasses:(0,d.K)(function(e,t){return t.db.getClasses()},"getClasses")},$={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},b=(0,d.K)(({treemap:e}={})=>{const t=(0,o.P$)(),a=(0,o.zj)(),l=(0,i.$t)(t,a.themeVariables),s=(0,i.$t)($,e),r=s.titleColor??l.titleColor,n=s.labelColor??l.textColor,c=s.valueColor??l.textColor;return`\n .treemapNode.section {\n stroke: ${s.sectionStrokeColor};\n stroke-width: ${s.sectionStrokeWidth};\n fill: ${s.sectionFillColor};\n }\n .treemapNode.leaf {\n stroke: ${s.leafStrokeColor};\n stroke-width: ${s.leafStrokeWidth};\n fill: ${s.leafFillColor};\n }\n .treemapLabel {\n fill: ${n};\n font-size: ${s.labelFontSize};\n }\n .treemapValue {\n fill: ${c};\n font-size: ${s.valueFontSize};\n }\n .treemapTitle {\n fill: ${r};\n font-size: ${s.titleFontSize};\n }\n `},"getStyles"),v={parser:S,get db(){return new m},renderer:x,styles:b}}}]);
1
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[3743],{77454(e,t,a){function l(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}a.d(t,{S:()=>l}),(0,a(86827).K)(l,"populateCommonDb")},78257(e,t,a){a.d(t,{P:()=>n});var l=a(32178),s=a(31293),r=a(86827),n=(0,r.K)((e,t,a,r)=>{e.attr("class",a);const{width:n,height:c,x:d,y:p}=i(e,t);(0,l.a$)(e,c,n,r);const h=o(d,p,n,c,t);e.attr("viewBox",h),s.R.debug(`viewBox configured: ${h} with padding: ${t}`)},"setupViewPortForSVG"),i=(0,r.K)((e,t)=>{const a=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:a.width+2*t,height:a.height+2*t,x:a.x,y:a.y}},"calculateDimensionsWithPadding"),o=(0,r.K)((e,t,a,l,s)=>`${e-s} ${t-s} ${a} ${l}`,"createViewBox")},83743(e,t,a){a.d(t,{diagram:()=>v});var l=a(77454),s=a(22422),r=a(78257),n=a(14782),i=a(99087),o=a(32178),c=a(31293),d=a(86827),p=a(34376),h=a(51444),m=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=o.SV,this.getAccTitle=o.iN,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.getAccDescription=o.m7,this.setAccDescription=o.EI}static{(0,d.K)(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const e=o.UI,t=(0,o.zj)();return(0,i.$t)({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),0===t&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,t){const a=this.classes.get(e)??{id:e,styles:[],textStyles:[]},l=t.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");l&&l.forEach(e=>{(0,n.KX)(e)&&(a?.textStyles?a.textStyles.push(e):a.textStyles=[e]),a?.styles?a.styles.push(e):a.styles=[e]}),this.classes.set(e,a)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){(0,o.IU)(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function y(e){if(!e.length)return[];const t=[],a=[];return e.forEach(e=>{const l={name:e.name,children:"Leaf"===e.type?void 0:[]};for(l.classSelector=e?.classSelector,e?.cssCompiledStyles&&(l.cssCompiledStyles=e.cssCompiledStyles),"Leaf"===e.type&&void 0!==e.value&&(l.value=e.value);a.length>0&&a[a.length-1].level>=e.level;)a.pop();if(0===a.length)t.push(l);else{const e=a[a.length-1].node;e.children?e.children.push(l):e.children=[l]}"Leaf"!==e.type&&a.push({node:l,level:e.level})}),t}(0,d.K)(y,"buildHierarchy");var f=(0,d.K)((e,t)=>{(0,l.S)(e,t);const a=[];for(const a of e.TreemapRows??[])"ClassDefStatement"===a.$type&&t.addClass(a.className??"",a.styleText??"");for(const l of e.TreemapRows??[]){const e=l.item;if(!e)continue;const s=l.indent?parseInt(l.indent):0,r=u(e),n=e.classSelector?t.getStylesForClass(e.classSelector):[],i=n.length>0?n:void 0,o={level:s,name:r,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:i};a.push(o)}const s=y(a),r=(0,d.K)((e,a)=>{for(const l of e)t.addNode(l,a),l.children&&l.children.length>0&&r(l.children,a+1)},"addNodesRecursively");r(s,0)},"populate"),u=(0,d.K)(e=>e.name?String(e.name):"","getItemName"),S={parser:{yy:void 0},parse:(0,d.K)(async e=>{try{const t=p.qg,a=await t("treemap",e);c.R.debug("Treemap AST:",a);const l=S.parser?.yy;if(!(l instanceof m))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");f(a,l)}catch(e){throw c.R.error("Error parsing treemap:",e),e}},"parse")},g=10,x={draw:(0,d.K)((e,t,a,l)=>{const i=l.db,p=i.getConfig(),m=p.padding??10,y=i.getDiagramTitle(),f=i.getRoot(),{themeVariables:u}=(0,o.zj)();if(!f)return;const S=y?30:0,x=(0,s.D)(t),$=p.nodeWidth?p.nodeWidth*g:960,b=p.nodeHeight?p.nodeHeight*g:500,v=$,C=b+S;let w;x.attr("viewBox",`0 0 ${v} ${C}`),(0,o.a$)(x,C,v,p.useMaxWidth);try{const e=p.valueFormat||",";if("$0,0"===e)w=(0,d.K)(e=>"$"+(0,h.GPZ)(",")(e),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const t=/\.\d+/.exec(e),a=t?t[0]:"";w=(0,d.K)(e=>"$"+(0,h.GPZ)(","+a)(e),"valueFormat")}else if(e.startsWith("$")){const t=e.substring(1);w=(0,d.K)(e=>"$"+(0,h.GPZ)(t||"")(e),"valueFormat")}else w=(0,h.GPZ)(e)}catch(e){c.R.error("Error creating format function:",e),w=(0,h.GPZ)(",")}const L=(0,h.UMr)().range(["transparent",u.cScale0,u.cScale1,u.cScale2,u.cScale3,u.cScale4,u.cScale5,u.cScale6,u.cScale7,u.cScale8,u.cScale9,u.cScale10,u.cScale11]),k=(0,h.UMr)().range(["transparent",u.cScalePeer0,u.cScalePeer1,u.cScalePeer2,u.cScalePeer3,u.cScalePeer4,u.cScalePeer5,u.cScalePeer6,u.cScalePeer7,u.cScalePeer8,u.cScalePeer9,u.cScalePeer10,u.cScalePeer11]),T=(0,h.UMr)().range([u.cScaleLabel0,u.cScaleLabel1,u.cScaleLabel2,u.cScaleLabel3,u.cScaleLabel4,u.cScaleLabel5,u.cScaleLabel6,u.cScaleLabel7,u.cScaleLabel8,u.cScaleLabel9,u.cScaleLabel10,u.cScaleLabel11]);y&&x.append("text").attr("x",v/2).attr("y",S/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(y);const P=x.append("g").attr("transform",`translate(0, ${S})`).attr("class","treemapContainer"),M=(0,h.Sk5)(f).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),z=(0,h.hkb)().size([$,b]).paddingTop(e=>e.children&&e.children.length>0?35:0).paddingInner(m).paddingLeft(e=>e.children&&e.children.length>0?g:0).paddingRight(e=>e.children&&e.children.length>0?g:0).paddingBottom(e=>e.children&&e.children.length>0?g:0).round(!0)(M),F=z.descendants().filter(e=>e.children&&e.children.length>0),K=P.selectAll(".treemapSection").data(F).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);K.append("rect").attr("width",e=>e.x1-e.x0).attr("height",25).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>0===e.depth?"display: none;":""),K.append("clipPath").attr("id",(e,a)=>`clip-section-${t}-${a}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",25),K.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>L(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>k(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(0===e.depth)return"display: none;";const t=(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),K.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",12.5).attr("dominant-baseline","middle").text(e=>0===e.depth?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,a)=>`url(#clip-section-${t}-${a})`).attr("style",e=>{if(0===e.depth)return"display: none;";return"dominant-baseline: middle; font-size: 12px; fill:"+T(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")}).each(function(e){if(0===e.depth)return;const t=(0,h.Ltv)(this),a=e.data.name;t.text(a);const l=e.x1-e.x0;let s;if(!1!==p.showValues&&e.value){s=l-10-30-10-6}else{s=l-6-6}const r=Math.max(15,s),n=t.node();if(n.getComputedTextLength()>r){const e="...";let l=a;for(;l.length>0;){if(l=a.substring(0,l.length-1),0===l.length){t.text(e),n.getComputedTextLength()>r&&t.text("");break}if(t.text(l+e),n.getComputedTextLength()<=r)break}}}),!1!==p.showValues&&K.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",12.5).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?w(e.value):"").attr("font-style","italic").attr("style",e=>{if(0===e.depth)return"display: none;";return"text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+T(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")});const D=z.leaves(),N=D.length>20,G=N?16:38,V=N?14:28,W=N?4:8,R=N?4:6,A=N?2:4,B=N?8:10,I=N?1:2,X=P.selectAll(".treemapLeafGroup").data(D).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);X.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?L(e.parent.data.name):L(e.data.name)).attr("style",e=>(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?L(e.parent.data.name):L(e.data.name)).attr("stroke-width",3),X.append("clipPath").attr("id",(e,a)=>`clip-${t}-${a}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4));if(X.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>`text-anchor: middle; dominant-baseline: middle; font-size: ${G}px;fill:`+T(e.data.name)+";"+(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,a)=>`url(#clip-${t}-${a})`).text(e=>e.data.name).each(function(e){const t=(0,h.Ltv)(this),a=e.x1-e.x0,l=e.y1-e.y0,s=t.node(),r=a-2*A,n=l-2*A;if(r<B||n<B)return void t.style("display","none");let i=parseInt(t.style("font-size"),10);for(;s.getComputedTextLength()>r&&i>W;)i--,t.style("font-size",`${i}px`);let o=Math.max(R,Math.min(V,Math.round(.6*i))),c=i+I+o;for(;c>n&&i>W&&(i--,o=Math.max(R,Math.min(V,Math.round(.6*i))),!(o<R&&i===W));)t.style("font-size",`${i}px`),c=i+I+o;t.style("font-size",`${i}px`),N?(i<W||n<W)&&t.style("display","none"):(s.getComputedTextLength()>r||i<W||n<i)&&t.style("display","none")}),!1!==p.showValues){X.append("text").attr("class","treemapValue").attr("x",e=>(e.x1-e.x0)/2).attr("y",function(e){return(e.y1-e.y0)/2}).attr("style",e=>`text-anchor: middle; dominant-baseline: hanging; font-size: ${V}px;fill:`+T(e.data.name)+";"+(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,a)=>`url(#clip-${t}-${a})`).text(e=>e.value?w(e.value):"").each(function(e){const t=(0,h.Ltv)(this),a=this.parentNode;if(!a)return void t.style("display","none");const l=(0,h.Ltv)(a).select(".treemapLabel");if(l.empty()||"none"===l.style("display"))return void t.style("display","none");const s=parseFloat(l.style("font-size")),r=Math.max(R,Math.min(V,Math.round(.6*s)));t.style("font-size",`${r}px`);const n=(e.y1-e.y0)/2+s/2+I;t.attr("y",n);const i=e.x1-e.x0,o=e.y1-e.y0-4,c=i-2*A;t.node().getComputedTextLength()>c||n+r>o||r<R?t.style("display","none"):t.style("display",null)})}const E=p.diagramPadding??8;(0,r.P)(x,E,"flowchart",p?.useMaxWidth||!1)},"draw"),getClasses:(0,d.K)(function(e,t){return t.db.getClasses()},"getClasses")},$={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},b=(0,d.K)(({treemap:e}={})=>{const t=(0,o.P$)(),a=(0,o.zj)(),l=(0,i.$t)(t,a.themeVariables),s=(0,i.$t)($,e),r=s.titleColor??l.titleColor,n=s.labelColor??l.textColor,c=s.valueColor??l.textColor;return`\n .treemapNode.section {\n stroke: ${s.sectionStrokeColor};\n stroke-width: ${s.sectionStrokeWidth};\n fill: ${s.sectionFillColor};\n }\n .treemapNode.leaf {\n stroke: ${s.leafStrokeColor};\n stroke-width: ${s.leafStrokeWidth};\n fill: ${s.leafFillColor};\n }\n .treemapLabel {\n fill: ${n};\n font-size: ${s.labelFontSize};\n }\n .treemapValue {\n fill: ${c};\n font-size: ${s.valueFontSize};\n }\n .treemapTitle {\n fill: ${r};\n font-size: ${s.titleFontSize};\n }\n `},"getStyles"),v={parser:S,get db(){return new m},renderer:x,styles:b}}}]);