pi-app 0.7.4 → 0.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +5 -5
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/next-server.js.nft.json +1 -1
  5. package/.next/prerender-manifest.json +3 -3
  6. package/.next/react-loadable-manifest.json +16 -16
  7. package/.next/required-server-files.js +1 -1
  8. package/.next/required-server-files.json +1 -1
  9. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  10. package/.next/server/app/_global-error.html +1 -1
  11. package/.next/server/app/_global-error.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  16. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  17. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  18. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  19. package/.next/server/app/_not-found.html +1 -1
  20. package/.next/server/app/_not-found.rsc +1 -1
  21. package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  22. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  23. package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  24. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  25. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  26. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  27. package/.next/server/app/index.html +1 -1
  28. package/.next/server/app/index.rsc +2 -2
  29. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  30. package/.next/server/app/index.segments/_full.segment.rsc +2 -2
  31. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  32. package/.next/server/app/index.segments/_index.segment.rsc +1 -1
  33. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  34. package/.next/server/app/page.js +2 -2
  35. package/.next/server/app/page.js.nft.json +1 -1
  36. package/.next/server/app/page_client-reference-manifest.js +1 -1
  37. package/.next/server/app/share/[token]/page.js +1 -1
  38. package/.next/server/app/share/[token]/page.js.nft.json +1 -1
  39. package/.next/server/app/share/[token]/page_client-reference-manifest.js +1 -1
  40. package/.next/server/app-paths-manifest.json +5 -5
  41. package/.next/server/chunks/1381.js +1 -1
  42. package/.next/server/chunks/1703.js +1 -1
  43. package/.next/server/chunks/3493.js +1 -1
  44. package/.next/server/chunks/4035.js +1 -1
  45. package/.next/server/chunks/4325.js +90 -0
  46. package/.next/server/chunks/4406.js +1 -1
  47. package/.next/server/chunks/5293.js +1 -1
  48. package/.next/server/chunks/5797.js +1 -1
  49. package/.next/server/chunks/5851.js +1 -1
  50. package/.next/server/chunks/6206.js +1 -1
  51. package/.next/server/chunks/8916.js +1 -1
  52. package/.next/server/chunks/9280.js +62 -62
  53. package/.next/server/chunks/9315.js +1 -1
  54. package/.next/server/chunks/966.js +1 -1
  55. package/.next/server/middleware-build-manifest.js +1 -1
  56. package/.next/server/middleware-manifest.json +5 -5
  57. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  58. package/.next/server/pages/404.html +1 -1
  59. package/.next/server/pages/500.html +1 -1
  60. package/.next/server/server-reference-manifest.json +1 -1
  61. package/.next/static/chunks/{0b9a0da7.9075af772487e743.js → 0b9a0da7.915b07ceecd18755.js} +2 -2
  62. package/.next/static/chunks/{1852.5543122f11aa7fed.js → 1852.4afb7f7ef17737c1.js} +1 -1
  63. package/.next/static/chunks/{2419.347fdfe3c170854d.js → 2419.fb50b8bb1874d556.js} +1 -1
  64. package/.next/static/chunks/{3079.4c511fa1144e3adf.js → 3079.90c6008a4bba4ee1.js} +1 -1
  65. package/.next/static/chunks/{3308.1964a3fa76cba02f.js → 3308.2b36b86159a97cbc.js} +15 -15
  66. package/.next/static/chunks/{3325.e4bfe1ca657f3b5b.js → 3325.01cdecedf0fb6d62.js} +1 -1
  67. package/.next/static/chunks/{394.91597771688df6d0.js → 394.2860c5a408dc8801.js} +1 -1
  68. package/.next/static/chunks/{3997.1009c06025691712.js → 3997.42e942ad02cc6f4b.js} +1 -1
  69. package/.next/static/chunks/{5034.8f16c3fa3ce75411.js → 5034.cbaaf32db6d2086d.js} +1 -1
  70. package/.next/static/chunks/5035.3755dbc45ec0eb8d.js +90 -0
  71. package/.next/static/chunks/{5074.d16651da01ec4e02.js → 5074.fc63ed48a3b1a61f.js} +1 -1
  72. package/.next/static/chunks/{6696.a41aec266e657d54.js → 6696.c05e02f280b8186b.js} +2 -2
  73. package/.next/static/chunks/{7343.9fbb58204d8ac681.js → 7343.9574ac32b87d5050.js} +1 -1
  74. package/.next/static/chunks/{7547.58bda8a2aabba0d4.js → 7547.8caf31f3b18ded65.js} +1 -1
  75. package/.next/static/chunks/{8489.45f22859734f514f.js → 8489.fd81b5e4de9f8431.js} +1 -1
  76. package/.next/static/chunks/app/{page-b144359583256e77.js → page-324f7a4b622be980.js} +2 -2
  77. package/.next/static/chunks/webpack-78ee61786e5bff39.js +1 -0
  78. package/.next/trace +82 -82
  79. package/.next/trace-build +1 -1
  80. package/package.json +1 -1
  81. package/.next/server/chunks/9537.js +0 -90
  82. package/.next/static/chunks/3506.2a7eaa08b9f55337.js +0 -90
  83. package/.next/static/chunks/webpack-3c29a7a6de61bd6b.js +0 -1
  84. /package/.next/static/{cVfF4ztJkZOpz7oxLivsl → aOBsmjgWZdKfL7VQcCnTe}/_buildManifest.js +0 -0
  85. /package/.next/static/{cVfF4ztJkZOpz7oxLivsl → aOBsmjgWZdKfL7VQcCnTe}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- "use strict";exports.id=5293,exports.ids=[5293],exports.modules={21661:(a,b,c)=>{c.d(b,{CP:()=>l,Ck:()=>o,HT:()=>n,PB:()=>m,aC:()=>k,lC:()=>i,m:()=>j,tk:()=>h});var d=c(65246),e=c(21143),f=c(65207),g=c(69085),h=(0,e.K2)((a,b)=>{let c=a.append("rect");if(c.attr("x",b.x),c.attr("y",b.y),c.attr("fill",b.fill),c.attr("stroke",b.stroke),c.attr("width",b.width),c.attr("height",b.height),b.name&&c.attr("name",b.name),b.rx&&c.attr("rx",b.rx),b.ry&&c.attr("ry",b.ry),void 0!==b.attrs)for(let a in b.attrs)c.attr(a,b.attrs[a]);return b.class&&c.attr("class",b.class),c},"drawRect"),i=(0,e.K2)((a,b)=>{h(a,{x:b.startx,y:b.starty,width:b.stopx-b.startx,height:b.stopy-b.starty,fill:b.fill,stroke:b.stroke,class:"rect"}).lower()},"drawBackgroundRect"),j=(0,e.K2)((a,b)=>{let c=b.text.replace(d.H1," "),e=a.append("text");e.attr("x",b.x),e.attr("y",b.y),e.attr("class","legend"),e.style("text-anchor",b.anchor),b.class&&e.attr("class",b.class);let f=e.append("tspan");return f.attr("x",b.x+2*b.textMargin),f.text(c),e},"drawText"),k=(0,e.K2)((a,b,c,d)=>{let e=a.append("image");e.attr("x",b),e.attr("y",c);let g=(0,f.J)(d);e.attr("xlink:href",g)},"drawImage"),l=(0,e.K2)((a,b,c,d)=>{let e=a.append("use");e.attr("x",b),e.attr("y",c);let g=(0,f.J)(d);e.attr("xlink:href",`#${g}`)},"drawEmbeddedImage"),m=(0,e.K2)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),n=(0,e.K2)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),o=(0,e.K2)(()=>{let a=(0,g.Ltv)(".mermaidTooltip");return a.empty()&&(a=(0,g.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),a},"createTooltip")},34091:(a,b,c)=>{c.d(b,{P:()=>f});var d=c(65246),e=c(21143),f=(0,e.K2)((a,b,c,f)=>{a.attr("class",c);let{width:i,height:j,x:k,y:l}=g(a,b);(0,d.a$)(a,j,i,f);let m=h(k,l,i,j,b);a.attr("viewBox",m),e.Rm.debug(`viewBox configured: ${m} with padding: ${b}`)},"setupViewPortForSVG"),g=(0,e.K2)((a,b)=>{let c=a.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:c.width+2*b,height:c.height+2*b,x:c.x,y:c.y}},"calculateDimensionsWithPadding"),h=(0,e.K2)((a,b,c,d,e)=>`${a-e} ${b-e} ${c} ${d}`,"createViewBox")},35293:(a,b,c)=>{c.d(b,{diagram:()=>x});var d=c(61827),e=c(30193),f=c(21661),g=c(80339),h=c(34091),i=c(44906);c(73865),c(65144);var j=c(30800);c(90355),c(19203),c(31792);var k=c(70400),l=c(65246),m=c(21143),n=c(69085),o=c(11656),p=c(75899),q=c(14120),r=class{constructor(){this.vertexCounter=0,this.config=(0,l.D7)(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=l.SV,this.setAccDescription=l.EI,this.setDiagramTitle=l.ke,this.getAccTitle=l.iN,this.getAccDescription=l.m7,this.getDiagramTitle=l.ab,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{(0,m.K2)(this,"FlowDB")}sanitizeText(a){return l.Y2.sanitizeText(a,this.config)}sanitizeNodeLabelType(a){switch(a){case"markdown":case"string":case"text":return a;default:return"markdown"}}setDiagramId(a){this.diagramId=a}lookUpDomId(a){for(let b of this.vertices.values())if(b.id===a)return this.diagramId?`${this.diagramId}-${b.domId}`:b.domId;return this.diagramId?`${this.diagramId}-${a}`:a}addVertex(a,b,c,d,f,g,h={},i){let k,n;if(!a||0===a.trim().length)return;if(void 0!==i){let a;a=i.includes("\n")?i+"\n":"{\n"+i+"\n}",k=(0,e.H)(a,{schema:e.r})}let o=this.edges.find(b=>b.id===a);if(o){let a=k;a?.animate!==void 0&&(o.animate=a.animate),a?.animation!==void 0&&(o.animation=a.animation),a?.curve!==void 0&&(o.interpolate=a.curve);return}let p=this.vertices.get(a);if(void 0===p&&(void 0===b&&void 0===c&&null!=d&&m.Rm.warn(`Style applied to unknown node "${a}". This may indicate a typo. The node will be created automatically.`),p={id:a,labelType:"text",domId:"flowchart-"+a+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(a,p)),this.vertexCounter++,void 0!==b?(this.config=(0,l.D7)(),n=this.sanitizeText(b.text.trim()),p.labelType=b.type,n.startsWith('"')&&n.endsWith('"')&&(n=n.substring(1,n.length-1)),p.text=n):void 0===p.text&&(p.text=a),void 0!==c&&(p.type=c),null!=d&&d.forEach(a=>{p.styles.push(a)}),null!=f&&f.forEach(a=>{p.classes.push(a)}),void 0!==g&&(p.dir=g),void 0===p.props?p.props=h:void 0!==h&&Object.assign(p.props,h),void 0!==k){if(k.shape){if(k.shape!==k.shape.toLowerCase()||k.shape.includes("_"))throw Error(`No such shape: ${k.shape}. Shape names should be lowercase.`);if(!(0,j.aP)(k.shape))throw Error(`No such shape: ${k.shape}.`);p.type=k?.shape}k?.label&&(p.text=k?.label,p.labelType=this.sanitizeNodeLabelType(k?.labelType)),k?.icon&&(p.icon=k?.icon,k.label?.trim()||p.text!==a||(p.text="")),k?.form&&(p.form=k?.form),k?.pos&&(p.pos=k?.pos),k?.img&&(p.img=k?.img,k.label?.trim()||p.text!==a||(p.text="")),k?.constraint&&(p.constraint=k.constraint),k.w&&(p.assetWidth=Number(k.w)),k.h&&(p.assetHeight=Number(k.h))}}addSingleLink(a,b,c,d){let e={start:a,end:b,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};m.Rm.info("abc78 Got edge...",e);let f=c.text;if(void 0!==f&&(e.text=this.sanitizeText(f.text.trim()),e.text.startsWith('"')&&e.text.endsWith('"')&&(e.text=e.text.substring(1,e.text.length-1)),e.labelType=this.sanitizeNodeLabelType(f.type)),void 0!==c&&(e.type=c.type,e.stroke=c.stroke,e.length=c.length>10?10:c.length),d&&!this.edges.some(a=>a.id===d))e.id=d,e.isUserDefinedId=!0;else{let a=this.edges.filter(a=>a.start===e.start&&a.end===e.end);0===a.length?e.id=(0,k.rY)(e.start,e.end,{counter:0,prefix:"L"}):e.id=(0,k.rY)(e.start,e.end,{counter:a.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))m.Rm.info("Pushing edge..."),this.edges.push(e);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
1
+ "use strict";exports.id=5293,exports.ids=[5293],exports.modules={21661:(a,b,c)=>{c.d(b,{CP:()=>l,Ck:()=>o,HT:()=>n,PB:()=>m,aC:()=>k,lC:()=>i,m:()=>j,tk:()=>h});var d=c(65246),e=c(21143),f=c(65207),g=c(69085),h=(0,e.K2)((a,b)=>{let c=a.append("rect");if(c.attr("x",b.x),c.attr("y",b.y),c.attr("fill",b.fill),c.attr("stroke",b.stroke),c.attr("width",b.width),c.attr("height",b.height),b.name&&c.attr("name",b.name),b.rx&&c.attr("rx",b.rx),b.ry&&c.attr("ry",b.ry),void 0!==b.attrs)for(let a in b.attrs)c.attr(a,b.attrs[a]);return b.class&&c.attr("class",b.class),c},"drawRect"),i=(0,e.K2)((a,b)=>{h(a,{x:b.startx,y:b.starty,width:b.stopx-b.startx,height:b.stopy-b.starty,fill:b.fill,stroke:b.stroke,class:"rect"}).lower()},"drawBackgroundRect"),j=(0,e.K2)((a,b)=>{let c=b.text.replace(d.H1," "),e=a.append("text");e.attr("x",b.x),e.attr("y",b.y),e.attr("class","legend"),e.style("text-anchor",b.anchor),b.class&&e.attr("class",b.class);let f=e.append("tspan");return f.attr("x",b.x+2*b.textMargin),f.text(c),e},"drawText"),k=(0,e.K2)((a,b,c,d)=>{let e=a.append("image");e.attr("x",b),e.attr("y",c);let g=(0,f.J)(d);e.attr("xlink:href",g)},"drawImage"),l=(0,e.K2)((a,b,c,d)=>{let e=a.append("use");e.attr("x",b),e.attr("y",c);let g=(0,f.J)(d);e.attr("xlink:href",`#${g}`)},"drawEmbeddedImage"),m=(0,e.K2)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),n=(0,e.K2)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),o=(0,e.K2)(()=>{let a=(0,g.Ltv)(".mermaidTooltip");return a.empty()&&(a=(0,g.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),a},"createTooltip")},34091:(a,b,c)=>{c.d(b,{P:()=>f});var d=c(65246),e=c(21143),f=(0,e.K2)((a,b,c,f)=>{a.attr("class",c);let{width:i,height:j,x:k,y:l}=g(a,b);(0,d.a$)(a,j,i,f);let m=h(k,l,i,j,b);a.attr("viewBox",m),e.Rm.debug(`viewBox configured: ${m} with padding: ${b}`)},"setupViewPortForSVG"),g=(0,e.K2)((a,b)=>{let c=a.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:c.width+2*b,height:c.height+2*b,x:c.x,y:c.y}},"calculateDimensionsWithPadding"),h=(0,e.K2)((a,b,c,d,e)=>`${a-e} ${b-e} ${c} ${d}`,"createViewBox")},35293:(a,b,c)=>{c.d(b,{diagram:()=>x});var d=c(61827),e=c(30193),f=c(21661),g=c(80339),h=c(34091),i=c(44906);c(73865),c(65144);var j=c(30800);c(90355),c(19203),c(551);var k=c(70400),l=c(65246),m=c(21143),n=c(69085),o=c(11656),p=c(75899),q=c(14120),r=class{constructor(){this.vertexCounter=0,this.config=(0,l.D7)(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=l.SV,this.setAccDescription=l.EI,this.setDiagramTitle=l.ke,this.getAccTitle=l.iN,this.getAccDescription=l.m7,this.getDiagramTitle=l.ab,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{(0,m.K2)(this,"FlowDB")}sanitizeText(a){return l.Y2.sanitizeText(a,this.config)}sanitizeNodeLabelType(a){switch(a){case"markdown":case"string":case"text":return a;default:return"markdown"}}setDiagramId(a){this.diagramId=a}lookUpDomId(a){for(let b of this.vertices.values())if(b.id===a)return this.diagramId?`${this.diagramId}-${b.domId}`:b.domId;return this.diagramId?`${this.diagramId}-${a}`:a}addVertex(a,b,c,d,f,g,h={},i){let k,n;if(!a||0===a.trim().length)return;if(void 0!==i){let a;a=i.includes("\n")?i+"\n":"{\n"+i+"\n}",k=(0,e.H)(a,{schema:e.r})}let o=this.edges.find(b=>b.id===a);if(o){let a=k;a?.animate!==void 0&&(o.animate=a.animate),a?.animation!==void 0&&(o.animation=a.animation),a?.curve!==void 0&&(o.interpolate=a.curve);return}let p=this.vertices.get(a);if(void 0===p&&(void 0===b&&void 0===c&&null!=d&&m.Rm.warn(`Style applied to unknown node "${a}". This may indicate a typo. The node will be created automatically.`),p={id:a,labelType:"text",domId:"flowchart-"+a+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(a,p)),this.vertexCounter++,void 0!==b?(this.config=(0,l.D7)(),n=this.sanitizeText(b.text.trim()),p.labelType=b.type,n.startsWith('"')&&n.endsWith('"')&&(n=n.substring(1,n.length-1)),p.text=n):void 0===p.text&&(p.text=a),void 0!==c&&(p.type=c),null!=d&&d.forEach(a=>{p.styles.push(a)}),null!=f&&f.forEach(a=>{p.classes.push(a)}),void 0!==g&&(p.dir=g),void 0===p.props?p.props=h:void 0!==h&&Object.assign(p.props,h),void 0!==k){if(k.shape){if(k.shape!==k.shape.toLowerCase()||k.shape.includes("_"))throw Error(`No such shape: ${k.shape}. Shape names should be lowercase.`);if(!(0,j.aP)(k.shape))throw Error(`No such shape: ${k.shape}.`);p.type=k?.shape}k?.label&&(p.text=k?.label,p.labelType=this.sanitizeNodeLabelType(k?.labelType)),k?.icon&&(p.icon=k?.icon,k.label?.trim()||p.text!==a||(p.text="")),k?.form&&(p.form=k?.form),k?.pos&&(p.pos=k?.pos),k?.img&&(p.img=k?.img,k.label?.trim()||p.text!==a||(p.text="")),k?.constraint&&(p.constraint=k.constraint),k.w&&(p.assetWidth=Number(k.w)),k.h&&(p.assetHeight=Number(k.h))}}addSingleLink(a,b,c,d){let e={start:a,end:b,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};m.Rm.info("abc78 Got edge...",e);let f=c.text;if(void 0!==f&&(e.text=this.sanitizeText(f.text.trim()),e.text.startsWith('"')&&e.text.endsWith('"')&&(e.text=e.text.substring(1,e.text.length-1)),e.labelType=this.sanitizeNodeLabelType(f.type)),void 0!==c&&(e.type=c.type,e.stroke=c.stroke,e.length=c.length>10?10:c.length),d&&!this.edges.some(a=>a.id===d))e.id=d,e.isUserDefinedId=!0;else{let a=this.edges.filter(a=>a.start===e.start&&a.end===e.end);0===a.length?e.id=(0,k.rY)(e.start,e.end,{counter:0,prefix:"L"}):e.id=(0,k.rY)(e.start,e.end,{counter:a.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))m.Rm.info("Pushing edge..."),this.edges.push(e);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
2
2
 
3
3
  Initialize mermaid with maxEdges set to a higher number to allow more edges.
4
4
  You cannot set this config via configuration inside the diagram as it is a secure config.
@@ -1,4 +1,4 @@
1
- "use strict";exports.id=5797,exports.ids=[5797],exports.modules={25797:(a,b,c)=>{c.d(b,{diagram:()=>F});var d=c(39636),e=c(61827),f=c(30193),g=c(30800);c(90355),c(19203),c(31792),c(70400);var h=c(65246),i=c(21143),j=c(67821),k=c(61255),l=c(30089),m=function(){var a=(0,i.K2)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[1,4],c=[1,13],d=[1,12],e=[1,15],f=[1,16],g=[1,20],h=[1,19],j=[6,7,8],k=[1,26],l=[1,24],m=[1,25],n=[6,7,11],o=[1,31],p=[6,7,11,24],q=[1,6,13,16,17,20,23],r=[1,35],s=[1,36],t=[1,6,7,11,13,16,17,20,23],u=[1,38],v={trace:(0,i.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},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,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:(0,i.K2)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 6:case 7:return d;case 8:d.getLogger().trace("Stop NL ");break;case 9:d.getLogger().trace("Stop EOF ");break;case 11:d.getLogger().trace("Stop NL2 ");break;case 12:d.getLogger().trace("Stop EOF2 ");break;case 15:d.getLogger().info("Node: ",f[h-1].id),d.addNode(f[h-2].length,f[h-1].id,f[h-1].descr,f[h-1].type,f[h]);break;case 16:d.getLogger().info("Node: ",f[h].id),d.addNode(f[h-1].length,f[h].id,f[h].descr,f[h].type);break;case 17:d.getLogger().trace("Icon: ",f[h]),d.decorateNode({icon:f[h]});break;case 18:case 23:d.decorateNode({class:f[h]});break;case 19:d.getLogger().trace("SPACELIST");break;case 20:d.getLogger().trace("Node: ",f[h-1].id),d.addNode(0,f[h-1].id,f[h-1].descr,f[h-1].type,f[h]);break;case 21:d.getLogger().trace("Node: ",f[h].id),d.addNode(0,f[h].id,f[h].descr,f[h].type);break;case 22:d.decorateNode({icon:f[h]});break;case 27:d.getLogger().trace("node found ..",f[h-2]),this.$={id:f[h-1],descr:f[h-1],type:d.getType(f[h-2],f[h])};break;case 28:this.$={id:f[h],descr:f[h],type:0};break;case 29:d.getLogger().trace("node found ..",f[h-3]),this.$={id:f[h-3],descr:f[h-1],type:d.getType(f[h-2],f[h])};break;case 30:this.$=f[h-1]+f[h];break;case 31:this.$=f[h]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:b},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:b},{6:c,7:[1,10],9:9,12:11,13:d,14:14,16:e,17:f,18:17,19:18,20:g,23:h},a(j,[2,3]),{1:[2,2]},a(j,[2,4]),a(j,[2,5]),{1:[2,6],6:c,12:21,13:d,14:14,16:e,17:f,18:17,19:18,20:g,23:h},{6:c,9:22,12:11,13:d,14:14,16:e,17:f,18:17,19:18,20:g,23:h},{6:k,7:l,10:23,11:m},a(n,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:g,23:h}),a(n,[2,19]),a(n,[2,21],{15:30,24:o}),a(n,[2,22]),a(n,[2,23]),a(p,[2,25]),a(p,[2,26]),a(p,[2,28],{20:[1,32]}),{21:[1,33]},{6:k,7:l,10:34,11:m},{1:[2,7],6:c,12:21,13:d,14:14,16:e,17:f,18:17,19:18,20:g,23:h},a(q,[2,14],{7:r,11:s}),a(t,[2,8]),a(t,[2,9]),a(t,[2,10]),a(n,[2,16],{15:37,24:o}),a(n,[2,17]),a(n,[2,18]),a(n,[2,20],{24:u}),a(p,[2,31]),{21:[1,39]},{22:[1,40]},a(q,[2,13],{7:r,11:s}),a(t,[2,11]),a(t,[2,12]),a(n,[2,15],{24:u}),a(p,[2,30]),{22:[1,41]},a(p,[2,27]),a(p,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,i.K2)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,i.K2)(function(a){var b=this,c=[0],d=[],e=[null],f=[],g=this.table,h="",j=0,k=0,l=0,m=f.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;f.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)(function(a){c.length=c.length-2*a,e.length=e.length-a,f.length=f.length-a},"popStack"),(0,i.K2)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=g[v]&&g[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],g[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(j+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(j+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),f.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(k=n.yyleng,h=n.yytext,j=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:f[f.length-(z||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(z||1)].first_column,last_column:f[f.length-1].last_column},r&&(C._$.range=[f[f.length-(z||1)].range[0],f[f.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[h,k,j,o,w[1],e,f].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),f=f.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),f.push(C._$),A=g[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function w(){this.yy={}}return v.lexer={EOF:1,parseError:(0,i.K2)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,i.K2)(function(a,b){return this.yy=b||this.yy||{},this._input=a,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,i.K2)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.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),a},"input"),unput:(0,i.K2)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=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),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,i.K2)(function(){return this._more=!0,this},"more"),reject:(0,i.K2)(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,i.K2)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,i.K2)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,i.K2)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,i.K2)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,i.K2)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,i.K2)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===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,i.K2)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,i.K2)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,i.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,i.K2)(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,i.K2)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,i.K2)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,i.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)(function(a,b,c,d){switch(c){case 0:return this.pushState("shapeData"),b.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:return b.yytext=b.yytext.replace(/\n\s*/g,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return a.getLogger().trace("Found comment",b.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:a.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return a.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:a.getLogger().trace("end icon"),this.popState();break;case 16:return a.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return a.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return a.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return a.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:a.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return a.getLogger().trace("description:",b.yytext),"NODE_DESCR";case 33:return this.popState(),a.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),a.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),a.getLogger().trace("node end ...",b.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),a.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),a.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return a.getLogger().trace("Long description:",b.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\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:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}},(0,i.K2)(w,"Parser"),w.prototype=v,v.Parser=w,new w}();m.parser=m;var n=[],o=[],p=0,q={},r=(0,i.K2)(()=>{n=[],o=[],p=0,q={}},"clear"),s=(0,i.K2)(a=>{if(0===n.length)return null;let b=n[0].level,c=null;for(let a=n.length-1;a>=0;a--)if(n[a].level!==b||c||(c=n[a]),n[a].level<b)throw Error('Items without section detected, found section ("'+n[a].label+'")');return a===c?.level?null:c},"getSection"),t=(0,i.K2)(function(){return o},"getSections"),u=(0,i.K2)(function(){let a=[],b=t(),c=(0,h.D7)();for(let d of b){let b={id:d.id,label:(0,h.jZ)(d.label??"",c),labelType:"markdown",isGroup:!0,ticket:d.ticket,shape:"kanbanSection",level:d.level,look:c.look};for(let e of(a.push(b),n.filter(a=>a.parentId===d.id))){let b={id:e.id,parentId:d.id,label:(0,h.jZ)(e.label??"",c),labelType:"markdown",isGroup:!1,ticket:e?.ticket,priority:e?.priority,assigned:e?.assigned,icon:e?.icon,shape:"kanbanItem",level:e.level,rx:5,ry:5,cssStyles:["text-align: left"]};a.push(b)}}return{nodes:a,edges:[],other:{},config:(0,h.D7)()}},"getData"),v=(0,i.K2)((a,b,c,d,e)=>{let g=(0,h.D7)(),i=g.mindmap?.padding??h.UI.mindmap.padding;switch(d){case w.ROUNDED_RECT:case w.RECT:case w.HEXAGON:i*=2}let j={id:(0,h.jZ)(b,g)||"kbn"+p++,level:a,label:(0,h.jZ)(c,g),width:g.mindmap?.maxNodeWidth??h.UI.mindmap.maxNodeWidth,padding:i,isGroup:!1};if(void 0!==e){let a;a=e.includes("\n")?e+"\n":"{\n"+e+"\n}";let b=(0,f.H)(a,{schema:f.r});if(b.shape&&(b.shape!==b.shape.toLowerCase()||b.shape.includes("_")))throw Error(`No such shape: ${b.shape}. Shape names should be lowercase.`);b?.shape&&"kanbanItem"===b.shape&&(j.shape=b?.shape),b?.label&&(j.label=b?.label),b?.icon&&(j.icon=b?.icon.toString()),b?.assigned&&(j.assigned=b?.assigned.toString()),b?.ticket&&(j.ticket=b?.ticket.toString()),b?.priority&&(j.priority=b?.priority)}let k=s(a);k?j.parentId=k.id||"kbn"+p++:o.push(j),n.push(j)},"addNode"),w={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},x=(0,i.K2)((a,b)=>{switch(i.Rm.debug("In get type",a,b),a){case"[":return w.RECT;case"(":return")"===b?w.ROUNDED_RECT:w.CLOUD;case"((":return w.CIRCLE;case")":return w.CLOUD;case"))":return w.BANG;case"{{":return w.HEXAGON;default:return w.DEFAULT}},"getType"),y=(0,i.K2)((a,b)=>{q[a]=b},"setElementForId"),z=(0,i.K2)(a=>{if(!a)return;let b=(0,h.D7)(),c=n[n.length-1];a.icon&&(c.icon=(0,h.jZ)(a.icon,b)),a.class&&(c.cssClasses=(0,h.jZ)(a.class,b))},"decorateNode"),A=(0,i.K2)(a=>{switch(a){case w.DEFAULT:return"no-border";case w.RECT:return"rect";case w.ROUNDED_RECT:return"rounded-rect";case w.CIRCLE:return"circle";case w.CLOUD:return"cloud";case w.BANG:return"bang";case w.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),B=(0,i.K2)(()=>i.Rm,"getLogger"),C=(0,i.K2)(a=>q[a],"getElementById"),D=(0,i.K2)(async(a,b,c,e)=>{i.Rm.debug("Rendering kanban diagram\n"+a);let f=e.db.getData(),j=(0,h.D7)();j.htmlLabels=!1;let k=(0,d.D)(b);for(let a of f.nodes)a.domId=`${b}-${a.id}`;let l=k.append("g");l.attr("class","sections");let m=k.append("g");m.attr("class","items");let n=f.nodes.filter(a=>a.isGroup),o=0,p=[],q=25;for(let a of n){let b=j?.kanban?.sectionWidth||200;a.x=b*(o+=1)+(o-1)*10/2,a.width=b,a.y=0,a.height=3*b,a.rx=5,a.ry=5,a.cssClasses=a.cssClasses+" section-"+o;let c=await (0,g.U)(l,a);q=Math.max(q,c?.labelBBox?.height),p.push(c)}let r=0;for(let a of n){let b=p[r];r+=1;let c=j?.kanban?.sectionWidth||200,d=-(3*c)/2+q,e=d;for(let b of f.nodes.filter(b=>b.parentId===a.id)){if(b.isGroup)throw Error("Groups within groups are not allowed in Kanban diagrams");b.x=a.x,b.width=c-15;let d=(await (0,g.on)(m,b,{config:j})).node().getBBox();b.y=e+d.height/2,await (0,g.U_)(b),e=b.y+d.height/2+5}let h=b.cluster.select("rect"),i=Math.max(e-d+30,50)+(q-25);h.attr("height",i)}(0,h.ot)(void 0,k,j.mindmap?.padding??h.UI.kanban.padding,j.mindmap?.useMaxWidth??h.UI.kanban.useMaxWidth)},"draw"),E=(0,i.K2)(a=>{let b="";for(let b=0;b<a.THEME_COLOR_LIMIT;b++)a["lineColor"+b]=a["lineColor"+b]||a["cScaleInv"+b],(0,j.A)(a["lineColor"+b])?a["lineColor"+b]=(0,k.A)(a["lineColor"+b],20):a["lineColor"+b]=(0,l.A)(a["lineColor"+b],20);let c=(0,i.K2)((b,c)=>a.darkMode?(0,l.A)(b,c):(0,k.A)(b,c),"adjuster");for(let d=0;d<a.THEME_COLOR_LIMIT;d++){let e=""+(17-3*d);b+=`
1
+ "use strict";exports.id=5797,exports.ids=[5797],exports.modules={25797:(a,b,c)=>{c.d(b,{diagram:()=>F});var d=c(39636),e=c(61827),f=c(30193),g=c(30800);c(90355),c(19203),c(551),c(70400);var h=c(65246),i=c(21143),j=c(67821),k=c(61255),l=c(30089),m=function(){var a=(0,i.K2)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[1,4],c=[1,13],d=[1,12],e=[1,15],f=[1,16],g=[1,20],h=[1,19],j=[6,7,8],k=[1,26],l=[1,24],m=[1,25],n=[6,7,11],o=[1,31],p=[6,7,11,24],q=[1,6,13,16,17,20,23],r=[1,35],s=[1,36],t=[1,6,7,11,13,16,17,20,23],u=[1,38],v={trace:(0,i.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},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,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:(0,i.K2)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 6:case 7:return d;case 8:d.getLogger().trace("Stop NL ");break;case 9:d.getLogger().trace("Stop EOF ");break;case 11:d.getLogger().trace("Stop NL2 ");break;case 12:d.getLogger().trace("Stop EOF2 ");break;case 15:d.getLogger().info("Node: ",f[h-1].id),d.addNode(f[h-2].length,f[h-1].id,f[h-1].descr,f[h-1].type,f[h]);break;case 16:d.getLogger().info("Node: ",f[h].id),d.addNode(f[h-1].length,f[h].id,f[h].descr,f[h].type);break;case 17:d.getLogger().trace("Icon: ",f[h]),d.decorateNode({icon:f[h]});break;case 18:case 23:d.decorateNode({class:f[h]});break;case 19:d.getLogger().trace("SPACELIST");break;case 20:d.getLogger().trace("Node: ",f[h-1].id),d.addNode(0,f[h-1].id,f[h-1].descr,f[h-1].type,f[h]);break;case 21:d.getLogger().trace("Node: ",f[h].id),d.addNode(0,f[h].id,f[h].descr,f[h].type);break;case 22:d.decorateNode({icon:f[h]});break;case 27:d.getLogger().trace("node found ..",f[h-2]),this.$={id:f[h-1],descr:f[h-1],type:d.getType(f[h-2],f[h])};break;case 28:this.$={id:f[h],descr:f[h],type:0};break;case 29:d.getLogger().trace("node found ..",f[h-3]),this.$={id:f[h-3],descr:f[h-1],type:d.getType(f[h-2],f[h])};break;case 30:this.$=f[h-1]+f[h];break;case 31:this.$=f[h]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:b},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:b},{6:c,7:[1,10],9:9,12:11,13:d,14:14,16:e,17:f,18:17,19:18,20:g,23:h},a(j,[2,3]),{1:[2,2]},a(j,[2,4]),a(j,[2,5]),{1:[2,6],6:c,12:21,13:d,14:14,16:e,17:f,18:17,19:18,20:g,23:h},{6:c,9:22,12:11,13:d,14:14,16:e,17:f,18:17,19:18,20:g,23:h},{6:k,7:l,10:23,11:m},a(n,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:g,23:h}),a(n,[2,19]),a(n,[2,21],{15:30,24:o}),a(n,[2,22]),a(n,[2,23]),a(p,[2,25]),a(p,[2,26]),a(p,[2,28],{20:[1,32]}),{21:[1,33]},{6:k,7:l,10:34,11:m},{1:[2,7],6:c,12:21,13:d,14:14,16:e,17:f,18:17,19:18,20:g,23:h},a(q,[2,14],{7:r,11:s}),a(t,[2,8]),a(t,[2,9]),a(t,[2,10]),a(n,[2,16],{15:37,24:o}),a(n,[2,17]),a(n,[2,18]),a(n,[2,20],{24:u}),a(p,[2,31]),{21:[1,39]},{22:[1,40]},a(q,[2,13],{7:r,11:s}),a(t,[2,11]),a(t,[2,12]),a(n,[2,15],{24:u}),a(p,[2,30]),{22:[1,41]},a(p,[2,27]),a(p,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,i.K2)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,i.K2)(function(a){var b=this,c=[0],d=[],e=[null],f=[],g=this.table,h="",j=0,k=0,l=0,m=f.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;f.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)(function(a){c.length=c.length-2*a,e.length=e.length-a,f.length=f.length-a},"popStack"),(0,i.K2)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=g[v]&&g[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],g[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(j+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(j+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),f.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(k=n.yyleng,h=n.yytext,j=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:f[f.length-(z||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(z||1)].first_column,last_column:f[f.length-1].last_column},r&&(C._$.range=[f[f.length-(z||1)].range[0],f[f.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[h,k,j,o,w[1],e,f].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),f=f.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),f.push(C._$),A=g[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function w(){this.yy={}}return v.lexer={EOF:1,parseError:(0,i.K2)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,i.K2)(function(a,b){return this.yy=b||this.yy||{},this._input=a,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,i.K2)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.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),a},"input"),unput:(0,i.K2)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=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),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,i.K2)(function(){return this._more=!0,this},"more"),reject:(0,i.K2)(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,i.K2)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,i.K2)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,i.K2)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,i.K2)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,i.K2)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,i.K2)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===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,i.K2)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,i.K2)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,i.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,i.K2)(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,i.K2)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,i.K2)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,i.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)(function(a,b,c,d){switch(c){case 0:return this.pushState("shapeData"),b.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:return b.yytext=b.yytext.replace(/\n\s*/g,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return a.getLogger().trace("Found comment",b.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:a.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return a.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:a.getLogger().trace("end icon"),this.popState();break;case 16:return a.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return a.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return a.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return a.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:a.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return a.getLogger().trace("description:",b.yytext),"NODE_DESCR";case 33:return this.popState(),a.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),a.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),a.getLogger().trace("node end ...",b.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),a.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),a.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return a.getLogger().trace("Long description:",b.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\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:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}},(0,i.K2)(w,"Parser"),w.prototype=v,v.Parser=w,new w}();m.parser=m;var n=[],o=[],p=0,q={},r=(0,i.K2)(()=>{n=[],o=[],p=0,q={}},"clear"),s=(0,i.K2)(a=>{if(0===n.length)return null;let b=n[0].level,c=null;for(let a=n.length-1;a>=0;a--)if(n[a].level!==b||c||(c=n[a]),n[a].level<b)throw Error('Items without section detected, found section ("'+n[a].label+'")');return a===c?.level?null:c},"getSection"),t=(0,i.K2)(function(){return o},"getSections"),u=(0,i.K2)(function(){let a=[],b=t(),c=(0,h.D7)();for(let d of b){let b={id:d.id,label:(0,h.jZ)(d.label??"",c),labelType:"markdown",isGroup:!0,ticket:d.ticket,shape:"kanbanSection",level:d.level,look:c.look};for(let e of(a.push(b),n.filter(a=>a.parentId===d.id))){let b={id:e.id,parentId:d.id,label:(0,h.jZ)(e.label??"",c),labelType:"markdown",isGroup:!1,ticket:e?.ticket,priority:e?.priority,assigned:e?.assigned,icon:e?.icon,shape:"kanbanItem",level:e.level,rx:5,ry:5,cssStyles:["text-align: left"]};a.push(b)}}return{nodes:a,edges:[],other:{},config:(0,h.D7)()}},"getData"),v=(0,i.K2)((a,b,c,d,e)=>{let g=(0,h.D7)(),i=g.mindmap?.padding??h.UI.mindmap.padding;switch(d){case w.ROUNDED_RECT:case w.RECT:case w.HEXAGON:i*=2}let j={id:(0,h.jZ)(b,g)||"kbn"+p++,level:a,label:(0,h.jZ)(c,g),width:g.mindmap?.maxNodeWidth??h.UI.mindmap.maxNodeWidth,padding:i,isGroup:!1};if(void 0!==e){let a;a=e.includes("\n")?e+"\n":"{\n"+e+"\n}";let b=(0,f.H)(a,{schema:f.r});if(b.shape&&(b.shape!==b.shape.toLowerCase()||b.shape.includes("_")))throw Error(`No such shape: ${b.shape}. Shape names should be lowercase.`);b?.shape&&"kanbanItem"===b.shape&&(j.shape=b?.shape),b?.label&&(j.label=b?.label),b?.icon&&(j.icon=b?.icon.toString()),b?.assigned&&(j.assigned=b?.assigned.toString()),b?.ticket&&(j.ticket=b?.ticket.toString()),b?.priority&&(j.priority=b?.priority)}let k=s(a);k?j.parentId=k.id||"kbn"+p++:o.push(j),n.push(j)},"addNode"),w={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},x=(0,i.K2)((a,b)=>{switch(i.Rm.debug("In get type",a,b),a){case"[":return w.RECT;case"(":return")"===b?w.ROUNDED_RECT:w.CLOUD;case"((":return w.CIRCLE;case")":return w.CLOUD;case"))":return w.BANG;case"{{":return w.HEXAGON;default:return w.DEFAULT}},"getType"),y=(0,i.K2)((a,b)=>{q[a]=b},"setElementForId"),z=(0,i.K2)(a=>{if(!a)return;let b=(0,h.D7)(),c=n[n.length-1];a.icon&&(c.icon=(0,h.jZ)(a.icon,b)),a.class&&(c.cssClasses=(0,h.jZ)(a.class,b))},"decorateNode"),A=(0,i.K2)(a=>{switch(a){case w.DEFAULT:return"no-border";case w.RECT:return"rect";case w.ROUNDED_RECT:return"rounded-rect";case w.CIRCLE:return"circle";case w.CLOUD:return"cloud";case w.BANG:return"bang";case w.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),B=(0,i.K2)(()=>i.Rm,"getLogger"),C=(0,i.K2)(a=>q[a],"getElementById"),D=(0,i.K2)(async(a,b,c,e)=>{i.Rm.debug("Rendering kanban diagram\n"+a);let f=e.db.getData(),j=(0,h.D7)();j.htmlLabels=!1;let k=(0,d.D)(b);for(let a of f.nodes)a.domId=`${b}-${a.id}`;let l=k.append("g");l.attr("class","sections");let m=k.append("g");m.attr("class","items");let n=f.nodes.filter(a=>a.isGroup),o=0,p=[],q=25;for(let a of n){let b=j?.kanban?.sectionWidth||200;a.x=b*(o+=1)+(o-1)*10/2,a.width=b,a.y=0,a.height=3*b,a.rx=5,a.ry=5,a.cssClasses=a.cssClasses+" section-"+o;let c=await (0,g.U)(l,a);q=Math.max(q,c?.labelBBox?.height),p.push(c)}let r=0;for(let a of n){let b=p[r];r+=1;let c=j?.kanban?.sectionWidth||200,d=-(3*c)/2+q,e=d;for(let b of f.nodes.filter(b=>b.parentId===a.id)){if(b.isGroup)throw Error("Groups within groups are not allowed in Kanban diagrams");b.x=a.x,b.width=c-15;let d=(await (0,g.on)(m,b,{config:j})).node().getBBox();b.y=e+d.height/2,await (0,g.U_)(b),e=b.y+d.height/2+5}let h=b.cluster.select("rect"),i=Math.max(e-d+30,50)+(q-25);h.attr("height",i)}(0,h.ot)(void 0,k,j.mindmap?.padding??h.UI.kanban.padding,j.mindmap?.useMaxWidth??h.UI.kanban.useMaxWidth)},"draw"),E=(0,i.K2)(a=>{let b="";for(let b=0;b<a.THEME_COLOR_LIMIT;b++)a["lineColor"+b]=a["lineColor"+b]||a["cScaleInv"+b],(0,j.A)(a["lineColor"+b])?a["lineColor"+b]=(0,k.A)(a["lineColor"+b],20):a["lineColor"+b]=(0,l.A)(a["lineColor"+b],20);let c=(0,i.K2)((b,c)=>a.darkMode?(0,l.A)(b,c):(0,k.A)(b,c),"adjuster");for(let d=0;d<a.THEME_COLOR_LIMIT;d++){let e=""+(17-3*d);b+=`
2
2
  .section-${d-1} rect, .section-${d-1} path, .section-${d-1} circle, .section-${d-1} polygon, .section-${d-1} path {
3
3
  fill: ${c(a["cScale"+d],10)};
4
4
  stroke: ${c(a["cScale"+d],10)};
@@ -1,4 +1,4 @@
1
- exports.id=5851,exports.ids=[5851],exports.modules={5851:(a,b,c)=>{"use strict";c.d(b,{diagram:()=>Y});var d=c(39636),e=c(31792),f=c(93273),g=c(70400),h=c(65246),i=c(21143),j=c(92325),k=c(17307),l=c(18980),m=c(69085),n={L:"left",R:"right",T:"top",B:"bottom"},o={L:(0,i.K2)(a=>`${a},${a/2} 0,${a} 0,0`,"L"),R:(0,i.K2)(a=>`0,${a/2} ${a},0 ${a},${a}`,"R"),T:(0,i.K2)(a=>`0,0 ${a},0 ${a/2},${a}`,"T"),B:(0,i.K2)(a=>`${a/2},0 ${a},${a} 0,${a}`,"B")},p={L:(0,i.K2)((a,b)=>a-b+2,"L"),R:(0,i.K2)((a,b)=>a-2,"R"),T:(0,i.K2)((a,b)=>a-b+2,"T"),B:(0,i.K2)((a,b)=>a-2,"B")},q=(0,i.K2)(function(a){return s(a)?"L"===a?"R":"L":"T"===a?"B":"T"},"getOppositeArchitectureDirection"),r=(0,i.K2)(function(a){return"L"===a||"R"===a||"T"===a||"B"===a},"isArchitectureDirection"),s=(0,i.K2)(function(a){return"L"===a||"R"===a},"isArchitectureDirectionX"),t=(0,i.K2)(function(a){return"T"===a||"B"===a},"isArchitectureDirectionY"),u=(0,i.K2)(function(a,b){let c=s(a)&&t(b),d=t(a)&&s(b);return c||d},"isArchitectureDirectionXY"),v=(0,i.K2)(function(a){let b=a[0],c=a[1],d=s(b)&&t(c),e=t(b)&&s(c);return d||e},"isArchitecturePairXY"),w=(0,i.K2)(function(a){return"LL"!==a&&"RR"!==a&&"TT"!==a&&"BB"!==a},"isValidArchitectureDirectionPair"),x=(0,i.K2)(function(a,b){let c=`${a}${b}`;return w(c)?c:void 0},"getArchitectureDirectionPair"),y=(0,i.K2)(function([a,b],c){let d=c[0],e=c[1];if(s(d))if(t(e))return[a+("L"===d?-1:1),b+("T"===e?1:-1)];else return[a+("L"===d?-1:1),b];return s(e)?[a+("L"===e?1:-1),b+("T"===d?1:-1)]:[a,b+("T"===d?1:-1)]},"shiftPositionByArchitectureDirectionPair"),z=(0,i.K2)(function(a){return"LT"===a||"TL"===a?[1,1]:"BL"===a||"LB"===a?[1,-1]:"BR"===a||"RB"===a?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),A=(0,i.K2)(function(a,b){return u(a,b)?"bend":s(a)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),B=(0,i.K2)(function(a){return"service"===a.type},"isArchitectureService"),C=(0,i.K2)(function(a){return"junction"===a.type},"isArchitectureJunction"),D=(0,i.K2)(a=>a.data(),"edgeData"),E=(0,i.K2)(a=>a.data(),"nodeData"),F=h.UI.architecture,G=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=h.SV,this.getAccTitle=h.iN,this.setDiagramTitle=h.ke,this.getDiagramTitle=h.ab,this.getAccDescription=h.m7,this.setAccDescription=h.EI,this.clear()}static{(0,i.K2)(this,"ArchitectureDB")}setDiagramId(a){this.diagramId=a}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",(0,h.IU)()}addService({id:a,icon:b,in:c,title:d,iconText:e}){if(void 0!==this.registeredIds[a])throw Error(`The service id [${a}] is already in use by another ${this.registeredIds[a]}`);if(void 0!==c){if(a===c)throw Error(`The service [${a}] cannot be placed within itself`);if(void 0===this.registeredIds[c])throw Error(`The service [${a}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===this.registeredIds[c])throw Error(`The service [${a}]'s parent is not a group`)}this.registeredIds[a]="node",this.nodes[a]={id:a,type:"service",icon:b,iconText:e,title:d,edges:[],in:c}}getServices(){return Object.values(this.nodes).filter(B)}addJunction({id:a,in:b}){if(void 0!==this.registeredIds[a])throw Error(`The junction id [${a}] is already in use by another ${this.registeredIds[a]}`);if(void 0!==b){if(a===b)throw Error(`The junction [${a}] cannot be placed within itself`);if(void 0===this.registeredIds[b])throw Error(`The junction [${a}]'s parent does not exist. Please make sure the parent is created before this junction`);if("node"===this.registeredIds[b])throw Error(`The junction [${a}]'s parent is not a group`)}this.registeredIds[a]="node",this.nodes[a]={id:a,type:"junction",edges:[],in:b}}getJunctions(){return Object.values(this.nodes).filter(C)}getNodes(){return Object.values(this.nodes)}getNode(a){return this.nodes[a]??null}addGroup({id:a,icon:b,in:c,title:d}){if(this.registeredIds?.[a]!==void 0)throw Error(`The group id [${a}] is already in use by another ${this.registeredIds[a]}`);if(void 0!==c){if(a===c)throw Error(`The group [${a}] cannot be placed within itself`);if(this.registeredIds?.[c]===void 0)throw Error(`The group [${a}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[c]==="node")throw Error(`The group [${a}]'s parent is not a group`)}this.registeredIds[a]="group",this.groups[a]={id:a,icon:b,title:d,in:c}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:a,rhsId:b,lhsDir:c,rhsDir:d,lhsInto:e,rhsInto:f,lhsGroup:g,rhsGroup:h,title:i}){if(!r(c))throw Error(`Invalid direction given for left hand side of edge ${a}--${b}. Expected (L,R,T,B) got ${String(c)}`);if(!r(d))throw Error(`Invalid direction given for right hand side of edge ${a}--${b}. Expected (L,R,T,B) got ${String(d)}`);if(void 0===this.nodes[a]&&void 0===this.groups[a])throw Error(`The left-hand id [${a}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===this.nodes[b]&&void 0===this.groups[b])throw Error(`The right-hand id [${b}] does not yet exist. Please create the service/group before declaring an edge to it.`);let j=this.nodes[a].in,k=this.nodes[b].in;if(g&&j&&k&&j==k)throw Error(`The left-hand id [${a}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(h&&j&&k&&j==k)throw Error(`The right-hand id [${b}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);this.edges.push({lhsId:a,lhsDir:c,lhsInto:e,lhsGroup:g,rhsId:b,rhsDir:d,rhsInto:f,rhsGroup:h,title:i}),this.nodes[a]&&this.nodes[b]&&(this.nodes[a].edges.push(this.edges[this.edges.length-1]),this.nodes[b].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(void 0===this.dataStructures){let a={},b=Object.entries(this.nodes).reduce((b,[c,d])=>(b[c]=d.edges.reduce((b,d)=>{let e=this.getNode(d.lhsId)?.in,f=this.getNode(d.rhsId)?.in;if(e&&f&&e!==f){let b=A(d.lhsDir,d.rhsDir);"bend"!==b&&(a[e]??={},a[e][f]=b,a[f]??={},a[f][e]=b)}if(d.lhsId===c){let a=x(d.lhsDir,d.rhsDir);a&&(b[a]=d.rhsId)}else{let a=x(d.rhsDir,d.lhsDir);a&&(b[a]=d.lhsId)}return b},{}),b),{}),c=Object.keys(b)[0],d={[c]:1},e=Object.keys(b).reduce((a,b)=>b===c?a:{...a,[b]:1},{}),f=(0,i.K2)(a=>{let c={[a]:[0,0]},f=[a];for(;f.length>0;){let a=f.shift();if(a){d[a]=1,delete e[a];let g=b[a],[h,i]=c[a];Object.entries(g).forEach(([a,b])=>{d[b]||(c[b]=y([h,i],a),f.push(b))})}}return c},"BFS"),g=[f(c)];for(;Object.keys(e).length>0;)g.push(f(Object.keys(e)[0]));this.dataStructures={adjList:b,spatialMaps:g,groupAlignments:a}}return this.dataStructures}setElementForId(a,b){this.elements[a]=b}getElementById(a){return this.elements[a]}getConfig(){return(0,g.$t)({...F,...(0,h.zj)().architecture})}getConfigField(a){return this.getConfig()[a]}},H=(0,i.K2)((a,b)=>{(0,f.S)(a,b),a.groups.map(a=>b.addGroup(a)),a.services.map(a=>b.addService({...a,type:"service"})),a.junctions.map(a=>b.addJunction({...a,type:"junction"})),a.edges.map(a=>b.addEdge(a))},"populateDb"),I={parser:{yy:void 0},parse:(0,i.K2)(async a=>{let b=await (0,j.qg)("architecture",a);i.Rm.debug(b);let c=I.parser?.yy;if(!(c instanceof G))throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");H(b,c)},"parse")},J=(0,i.K2)(a=>`
1
+ exports.id=5851,exports.ids=[5851],exports.modules={5851:(a,b,c)=>{"use strict";c.d(b,{diagram:()=>Y});var d=c(39636),e=c(551),f=c(93273),g=c(70400),h=c(65246),i=c(21143),j=c(92325),k=c(17307),l=c(18980),m=c(69085),n={L:"left",R:"right",T:"top",B:"bottom"},o={L:(0,i.K2)(a=>`${a},${a/2} 0,${a} 0,0`,"L"),R:(0,i.K2)(a=>`0,${a/2} ${a},0 ${a},${a}`,"R"),T:(0,i.K2)(a=>`0,0 ${a},0 ${a/2},${a}`,"T"),B:(0,i.K2)(a=>`${a/2},0 ${a},${a} 0,${a}`,"B")},p={L:(0,i.K2)((a,b)=>a-b+2,"L"),R:(0,i.K2)((a,b)=>a-2,"R"),T:(0,i.K2)((a,b)=>a-b+2,"T"),B:(0,i.K2)((a,b)=>a-2,"B")},q=(0,i.K2)(function(a){return s(a)?"L"===a?"R":"L":"T"===a?"B":"T"},"getOppositeArchitectureDirection"),r=(0,i.K2)(function(a){return"L"===a||"R"===a||"T"===a||"B"===a},"isArchitectureDirection"),s=(0,i.K2)(function(a){return"L"===a||"R"===a},"isArchitectureDirectionX"),t=(0,i.K2)(function(a){return"T"===a||"B"===a},"isArchitectureDirectionY"),u=(0,i.K2)(function(a,b){let c=s(a)&&t(b),d=t(a)&&s(b);return c||d},"isArchitectureDirectionXY"),v=(0,i.K2)(function(a){let b=a[0],c=a[1],d=s(b)&&t(c),e=t(b)&&s(c);return d||e},"isArchitecturePairXY"),w=(0,i.K2)(function(a){return"LL"!==a&&"RR"!==a&&"TT"!==a&&"BB"!==a},"isValidArchitectureDirectionPair"),x=(0,i.K2)(function(a,b){let c=`${a}${b}`;return w(c)?c:void 0},"getArchitectureDirectionPair"),y=(0,i.K2)(function([a,b],c){let d=c[0],e=c[1];if(s(d))if(t(e))return[a+("L"===d?-1:1),b+("T"===e?1:-1)];else return[a+("L"===d?-1:1),b];return s(e)?[a+("L"===e?1:-1),b+("T"===d?1:-1)]:[a,b+("T"===d?1:-1)]},"shiftPositionByArchitectureDirectionPair"),z=(0,i.K2)(function(a){return"LT"===a||"TL"===a?[1,1]:"BL"===a||"LB"===a?[1,-1]:"BR"===a||"RB"===a?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),A=(0,i.K2)(function(a,b){return u(a,b)?"bend":s(a)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),B=(0,i.K2)(function(a){return"service"===a.type},"isArchitectureService"),C=(0,i.K2)(function(a){return"junction"===a.type},"isArchitectureJunction"),D=(0,i.K2)(a=>a.data(),"edgeData"),E=(0,i.K2)(a=>a.data(),"nodeData"),F=h.UI.architecture,G=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=h.SV,this.getAccTitle=h.iN,this.setDiagramTitle=h.ke,this.getDiagramTitle=h.ab,this.getAccDescription=h.m7,this.setAccDescription=h.EI,this.clear()}static{(0,i.K2)(this,"ArchitectureDB")}setDiagramId(a){this.diagramId=a}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",(0,h.IU)()}addService({id:a,icon:b,in:c,title:d,iconText:e}){if(void 0!==this.registeredIds[a])throw Error(`The service id [${a}] is already in use by another ${this.registeredIds[a]}`);if(void 0!==c){if(a===c)throw Error(`The service [${a}] cannot be placed within itself`);if(void 0===this.registeredIds[c])throw Error(`The service [${a}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===this.registeredIds[c])throw Error(`The service [${a}]'s parent is not a group`)}this.registeredIds[a]="node",this.nodes[a]={id:a,type:"service",icon:b,iconText:e,title:d,edges:[],in:c}}getServices(){return Object.values(this.nodes).filter(B)}addJunction({id:a,in:b}){if(void 0!==this.registeredIds[a])throw Error(`The junction id [${a}] is already in use by another ${this.registeredIds[a]}`);if(void 0!==b){if(a===b)throw Error(`The junction [${a}] cannot be placed within itself`);if(void 0===this.registeredIds[b])throw Error(`The junction [${a}]'s parent does not exist. Please make sure the parent is created before this junction`);if("node"===this.registeredIds[b])throw Error(`The junction [${a}]'s parent is not a group`)}this.registeredIds[a]="node",this.nodes[a]={id:a,type:"junction",edges:[],in:b}}getJunctions(){return Object.values(this.nodes).filter(C)}getNodes(){return Object.values(this.nodes)}getNode(a){return this.nodes[a]??null}addGroup({id:a,icon:b,in:c,title:d}){if(this.registeredIds?.[a]!==void 0)throw Error(`The group id [${a}] is already in use by another ${this.registeredIds[a]}`);if(void 0!==c){if(a===c)throw Error(`The group [${a}] cannot be placed within itself`);if(this.registeredIds?.[c]===void 0)throw Error(`The group [${a}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[c]==="node")throw Error(`The group [${a}]'s parent is not a group`)}this.registeredIds[a]="group",this.groups[a]={id:a,icon:b,title:d,in:c}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:a,rhsId:b,lhsDir:c,rhsDir:d,lhsInto:e,rhsInto:f,lhsGroup:g,rhsGroup:h,title:i}){if(!r(c))throw Error(`Invalid direction given for left hand side of edge ${a}--${b}. Expected (L,R,T,B) got ${String(c)}`);if(!r(d))throw Error(`Invalid direction given for right hand side of edge ${a}--${b}. Expected (L,R,T,B) got ${String(d)}`);if(void 0===this.nodes[a]&&void 0===this.groups[a])throw Error(`The left-hand id [${a}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===this.nodes[b]&&void 0===this.groups[b])throw Error(`The right-hand id [${b}] does not yet exist. Please create the service/group before declaring an edge to it.`);let j=this.nodes[a].in,k=this.nodes[b].in;if(g&&j&&k&&j==k)throw Error(`The left-hand id [${a}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(h&&j&&k&&j==k)throw Error(`The right-hand id [${b}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);this.edges.push({lhsId:a,lhsDir:c,lhsInto:e,lhsGroup:g,rhsId:b,rhsDir:d,rhsInto:f,rhsGroup:h,title:i}),this.nodes[a]&&this.nodes[b]&&(this.nodes[a].edges.push(this.edges[this.edges.length-1]),this.nodes[b].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(void 0===this.dataStructures){let a={},b=Object.entries(this.nodes).reduce((b,[c,d])=>(b[c]=d.edges.reduce((b,d)=>{let e=this.getNode(d.lhsId)?.in,f=this.getNode(d.rhsId)?.in;if(e&&f&&e!==f){let b=A(d.lhsDir,d.rhsDir);"bend"!==b&&(a[e]??={},a[e][f]=b,a[f]??={},a[f][e]=b)}if(d.lhsId===c){let a=x(d.lhsDir,d.rhsDir);a&&(b[a]=d.rhsId)}else{let a=x(d.rhsDir,d.lhsDir);a&&(b[a]=d.lhsId)}return b},{}),b),{}),c=Object.keys(b)[0],d={[c]:1},e=Object.keys(b).reduce((a,b)=>b===c?a:{...a,[b]:1},{}),f=(0,i.K2)(a=>{let c={[a]:[0,0]},f=[a];for(;f.length>0;){let a=f.shift();if(a){d[a]=1,delete e[a];let g=b[a],[h,i]=c[a];Object.entries(g).forEach(([a,b])=>{d[b]||(c[b]=y([h,i],a),f.push(b))})}}return c},"BFS"),g=[f(c)];for(;Object.keys(e).length>0;)g.push(f(Object.keys(e)[0]));this.dataStructures={adjList:b,spatialMaps:g,groupAlignments:a}}return this.dataStructures}setElementForId(a,b){this.elements[a]=b}getElementById(a){return this.elements[a]}getConfig(){return(0,g.$t)({...F,...(0,h.zj)().architecture})}getConfigField(a){return this.getConfig()[a]}},H=(0,i.K2)((a,b)=>{(0,f.S)(a,b),a.groups.map(a=>b.addGroup(a)),a.services.map(a=>b.addService({...a,type:"service"})),a.junctions.map(a=>b.addJunction({...a,type:"junction"})),a.edges.map(a=>b.addEdge(a))},"populateDb"),I={parser:{yy:void 0},parse:(0,i.K2)(async a=>{let b=await (0,j.qg)("architecture",a);i.Rm.debug(b);let c=I.parser?.yy;if(!(c instanceof G))throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");H(b,c)},"parse")},J=(0,i.K2)(a=>`
2
2
  .edge {
3
3
  stroke-width: ${a.archEdgeWidth};
4
4
  stroke: ${a.archEdgeColor};
@@ -1 +1 @@
1
- "use strict";exports.id=6206,exports.ids=[6206],exports.modules={6206:(a,b,c)=>{c.d(b,{diagram:()=>ab});var d,e=c(39636),f=c(31792),g=c(70400),h=c(65246),i=c(21143),j=c(69085),k=function(){var a=(0,i.K2)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[1,10,12,14,16,18,19,21,23],c=[2,6],d=[1,3],e=[1,5],f=[1,6],g=[1,7],h=[1,5,10,12,14,16,18,19,21,23,34,35,36],j=[1,25],k=[1,26],l=[1,28],m=[1,29],n=[1,30],o=[1,31],p=[1,32],q=[1,33],r=[1,34],s=[1,35],t=[1,36],u=[1,37],v=[1,43],w=[1,42],x=[1,47],y=[1,50],z=[1,10,12,14,16,18,19,21,23,34,35,36],A=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],B=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],C=[1,64],D={trace:(0,i.K2)(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,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$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",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"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],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:(0,i.K2)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 5:d.setOrientation(f[h]);break;case 9:d.setDiagramTitle(f[h].text.trim());break;case 12:d.setLineData({text:"",type:"text"},f[h]);break;case 13:d.setLineData(f[h-1],f[h]);break;case 14:d.setBarData({text:"",type:"text"},f[h]);break;case 15:d.setBarData(f[h-1],f[h]);break;case 16:this.$=f[h].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=f[h].trim(),d.setAccDescription(this.$);break;case 19:case 27:this.$=f[h-1];break;case 20:this.$=[Number(f[h-2]),...f[h]];break;case 21:this.$=[Number(f[h])];break;case 22:d.setXAxisTitle(f[h]);break;case 23:d.setXAxisTitle(f[h-1]);break;case 24:d.setXAxisTitle({type:"text",text:""});break;case 25:d.setXAxisBand(f[h]);break;case 26:d.setXAxisRangeData(Number(f[h-2]),Number(f[h]));break;case 28:this.$=[f[h-2],...f[h]];break;case 29:this.$=[f[h]];break;case 30:d.setYAxisTitle(f[h]);break;case 31:d.setYAxisTitle(f[h-1]);break;case 32:d.setYAxisTitle({type:"text",text:""});break;case 33:d.setYAxisRangeData(Number(f[h-2]),Number(f[h]));break;case 37:case 38:this.$={text:f[h],type:"text"};break;case 39:this.$={text:f[h],type:"markdown"};break;case 40:this.$=f[h];break;case 41:this.$=f[h-1]+""+f[h]}},"anonymous"),table:[a(b,c,{3:1,4:2,7:4,5:d,34:e,35:f,36:g}),{1:[3]},a(b,c,{4:2,7:4,3:8,5:d,34:e,35:f,36:g}),a(b,c,{4:2,7:4,6:9,3:10,5:d,8:[1,11],34:e,35:f,36:g}),{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]},a(h,[2,34]),a(h,[2,35]),a(h,[2,36]),{1:[2,1]},a(b,c,{4:2,7:4,3:21,5:d,34:e,35:f,36:g}),{1:[2,3]},a(h,[2,5]),a(b,[2,7],{4:22,34:e,35:f,36:g}),{11:23,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{11:39,13:38,24:v,27:w,29:40,30:41,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{11:45,15:44,27:x,33:46,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{11:49,17:48,24:y,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{11:52,17:51,24:y,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{20:[1,53]},{22:[1,54]},a(z,[2,18]),{1:[2,2]},a(z,[2,8]),a(z,[2,9]),a(A,[2,37],{40:55,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u}),a(A,[2,38]),a(A,[2,39]),a(B,[2,40]),a(B,[2,42]),a(B,[2,43]),a(B,[2,44]),a(B,[2,45]),a(B,[2,46]),a(B,[2,47]),a(B,[2,48]),a(B,[2,49]),a(B,[2,50]),a(B,[2,51]),a(z,[2,10]),a(z,[2,22],{30:41,29:56,24:v,27:w}),a(z,[2,24]),a(z,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},a(z,[2,11]),a(z,[2,30],{33:60,27:x}),a(z,[2,32]),{31:[1,61]},a(z,[2,12]),{17:62,24:y},{25:63,27:C},a(z,[2,14]),{17:65,24:y},a(z,[2,16]),a(z,[2,17]),a(B,[2,41]),a(z,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},a(z,[2,31]),{27:[1,69]},a(z,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},a(z,[2,15]),a(z,[2,26]),a(z,[2,27]),{11:59,32:72,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},a(z,[2,33]),a(z,[2,19]),{25:73,27:C},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:(0,i.K2)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,i.K2)(function(a){var b=this,c=[0],d=[],e=[null],f=[],g=this.table,h="",j=0,k=0,l=0,m=f.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;f.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)(function(a){c.length=c.length-2*a,e.length=e.length-a,f.length=f.length-a},"popStack"),(0,i.K2)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=g[v]&&g[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],g[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(j+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(j+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),f.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(k=n.yyleng,h=n.yytext,j=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:f[f.length-(z||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(z||1)].first_column,last_column:f[f.length-1].last_column},r&&(C._$.range=[f[f.length-(z||1)].range[0],f[f.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[h,k,j,o,w[1],e,f].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),f=f.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),f.push(C._$),A=g[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function E(){this.yy={}}return D.lexer={EOF:1,parseError:(0,i.K2)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,i.K2)(function(a,b){return this.yy=b||this.yy||{},this._input=a,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,i.K2)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.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),a},"input"),unput:(0,i.K2)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=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),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,i.K2)(function(){return this._more=!0,this},"more"),reject:(0,i.K2)(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,i.K2)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,i.K2)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,i.K2)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,i.K2)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,i.K2)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,i.K2)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===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,i.K2)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,i.K2)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,i.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,i.K2)(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,i.K2)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,i.K2)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,i.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)(function(a,b,c,d){switch(c){case 0:case 1:case 5:case 44:break;case 2:case 3:return this.popState(),34;case 4:return 34;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 31;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 27;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 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}},(0,i.K2)(E,"Parser"),E.prototype=D,D.Parser=E,new E}();function l(a){return"bar"===a.type}function m(a){return"band"===a.type}function n(a){return"linear"===a.type}k.parser=k,(0,i.K2)(l,"isBarPlot"),(0,i.K2)(m,"isBandAxisData"),(0,i.K2)(n,"isLinearAxisData");var o=class{constructor(a){this.parentGroup=a}static{(0,i.K2)(this,"TextDimensionCalculatorWithFont")}getMaxDimension(a,b){if(!this.parentGroup)return{width:a.reduce((a,b)=>Math.max(b.length,a),0)*b,height:b};let c={width:0,height:0},d=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",b);for(let e of a){let a=(0,f.W6)(d,1,e),g=a?a.width:e.length*b,h=a?a.height:b;c.width=Math.max(c.width,g),c.height=Math.max(c.height,h)}return d.remove(),c}},p=class{constructor(a,b,c,d){this.axisConfig=a,this.title=b,this.textDimensionCalculator=c,this.axisThemeConfig=d,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.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{(0,i.K2)(this,"BaseAxis")}setRange(a){this.range=a,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=a[1]-a[0]:this.boundingRect.width=a[1]-a[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(a){this.axisPosition=a,this.setRange(this.range)}getTickDistance(){let a=this.getRange();return Math.abs(a[0]-a[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(a=>a.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(a){let b=a.height;if(this.axisConfig.showAxisLine&&b>this.axisConfig.axisLineWidth&&(b-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let c=this.getLabelDimension(),d=.2*a.width;this.outerPadding=Math.min(c.width/2,d);let e=c.height+2*this.axisConfig.labelPadding;this.labelTextHeight=c.height,e<=b&&(b-=e,this.showLabel=!0)}if(this.axisConfig.showTick&&b>=this.axisConfig.tickLength&&(this.showTick=!0,b-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let a=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),c=a.height+2*this.axisConfig.titlePadding;this.titleTextHeight=a.height,c<=b&&(b-=c,this.showTitle=!0)}this.boundingRect.width=a.width,this.boundingRect.height=a.height-b}calculateSpaceIfDrawnVertical(a){let b=a.width;if(this.axisConfig.showAxisLine&&b>this.axisConfig.axisLineWidth&&(b-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let c=this.getLabelDimension(),d=.2*a.height;this.outerPadding=Math.min(c.height/2,d);let e=c.width+2*this.axisConfig.labelPadding;e<=b&&(b-=e,this.showLabel=!0)}if(this.axisConfig.showTick&&b>=this.axisConfig.tickLength&&(this.showTick=!0,b-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let a=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),c=a.height+2*this.axisConfig.titlePadding;this.titleTextHeight=a.height,c<=b&&(b-=c,this.showTitle=!0)}this.boundingRect.width=a.width-b,this.boundingRect.height=a.height}calculateSpace(a){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(a):this.calculateSpaceIfDrawnHorizontally(a),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(a){this.boundingRect.x=a.x,this.boundingRect.y=a.y}getDrawableElementsForLeftAxis(){let a=[];if(this.showAxisLine){let b=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;a.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${b},${this.boundingRect.y} L ${b},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&a.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(a=>({text:a.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(a),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let b=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);a.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${b},${this.getScaleValue(a)} L ${b-this.axisConfig.tickLength},${this.getScaleValue(a)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&a.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"}]}),a}getDrawableElementsForBottomAxis(){let a=[];if(this.showAxisLine){let b=this.boundingRect.y+this.axisConfig.axisLineWidth/2;a.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${b} L ${this.boundingRect.x+this.boundingRect.width},${b}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&a.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(a=>({text:a.toString(),x:this.getScaleValue(a),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let b=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);a.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${this.getScaleValue(a)},${b} L ${this.getScaleValue(a)},${b+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&a.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"}]}),a}getDrawableElementsForTopAxis(){let a=[];if(this.showAxisLine){let b=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;a.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${b} L ${this.boundingRect.x+this.boundingRect.width},${b}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&a.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(a=>({text:a.toString(),x:this.getScaleValue(a),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let b=this.boundingRect.y;a.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${this.getScaleValue(a)},${b+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(a)},${b+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&a.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"}]}),a}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():[]}},q=class extends p{static{(0,i.K2)(this,"BandAxis")}constructor(a,b,c,d,e){super(a,d,e,b),this.categories=c,this.scale=(0,j.WH)().domain(this.categories).range(this.getRange())}setRange(a){super.setRange(a)}recalculateScale(){this.scale=(0,j.WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),i.Rm.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(a){return this.scale(a)??this.getRange()[0]}},r=class extends p{static{(0,i.K2)(this,"LinearAxis")}constructor(a,b,c,d,e){super(a,d,e,b),this.domain=c,this.scale=(0,j.m4Y)().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let a=[...this.domain];"left"===this.axisPosition&&a.reverse(),this.scale=(0,j.m4Y)().domain(a).range(this.getRange())}getScaleValue(a){return this.scale(a)}};function s(a,b,c,d){let e=new o(d);return m(a)?new q(b,c,a.categories,a.title,e):new r(b,c,[a.min,a.max],a.title,e)}(0,i.K2)(s,"getAxis");var t=class{constructor(a,b,c,d){this.textDimensionCalculator=a,this.chartConfig=b,this.chartData=c,this.chartThemeConfig=d,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{(0,i.K2)(this,"ChartTitle")}setBoundingBoxXY(a){this.boundingRect.x=a.x,this.boundingRect.y=a.y}calculateSpace(a){let b=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),c=Math.max(b.width,a.width),d=b.height+2*this.chartConfig.titlePadding;return b.width<=c&&b.height<=d&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=c,this.boundingRect.height=d,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let a=[];return this.showChartTitle&&a.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}]}),a}};function u(a,b,c,d){return new t(new o(d),a,b,c)}(0,i.K2)(u,"getChartTitleComponent");var v=class{constructor(a,b,c,d,e){this.plotData=a,this.xAxis=b,this.yAxis=c,this.orientation=d,this.plotIndex=e}static{(0,i.K2)(this,"LinePlot")}getDrawableElement(){let a,b=this.plotData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]);return(a="horizontal"===this.orientation?(0,j.n8j)().y(a=>a[0]).x(a=>a[1])(b):(0,j.n8j)().x(a=>a[0]).y(a=>a[1])(b))?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:a,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},w=class{constructor(a,b,c,d,e,f){this.barData=a,this.boundingRect=b,this.xAxis=c,this.yAxis=d,this.orientation=e,this.plotIndex=f}static{(0,i.K2)(this,"BarPlot")}getDrawableElement(){let a=this.barData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),b=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),c=b/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:a.map(a=>({x:this.boundingRect.x,y:a[0]-c,height:b,width:a[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:a.map(a=>({x:a[0]-c,y:a[1],width:b,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},x=class{constructor(a,b,c){this.chartConfig=a,this.chartData=b,this.chartThemeConfig=c,this.boundingRect={x:0,y:0,width:0,height:0}}static{(0,i.K2)(this,"BasePlot")}setAxes(a,b){this.xAxis=a,this.yAxis=b}setBoundingBoxXY(a){this.boundingRect.x=a.x,this.boundingRect.y=a.y}calculateSpace(a){return this.boundingRect.width=a.width,this.boundingRect.height=a.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let a=[];for(let[b,c]of this.chartData.plots.entries())switch(c.type){case"line":{let d=new v(c,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,b);a.push(...d.getDrawableElement())}break;case"bar":{let d=new w(c,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,b);a.push(...d.getDrawableElement())}}return a}};function y(a,b,c){return new x(a,b,c)}(0,i.K2)(y,"getPlotComponent");var z=class{constructor(a,b,c,d){this.chartConfig=a,this.chartData=b,this.componentStore={title:u(a,b,c,d),plot:y(a,b,c),xAxis:s(b.xAxis,a.xAxis,{titleColor:c.xAxisTitleColor,labelColor:c.xAxisLabelColor,tickColor:c.xAxisTickColor,axisLineColor:c.xAxisLineColor},d),yAxis:s(b.yAxis,a.yAxis,{titleColor:c.yAxisTitleColor,labelColor:c.yAxisLabelColor,tickColor:c.yAxisTickColor,axisLineColor:c.yAxisLineColor},d)}}static{(0,i.K2)(this,"Orchestrator")}calculateVerticalSpace(){let a=this.chartConfig.width,b=this.chartConfig.height,c=0,d=0,e=Math.floor(a*this.chartConfig.plotReservedSpacePercent/100),f=Math.floor(b*this.chartConfig.plotReservedSpacePercent/100),g=this.componentStore.plot.calculateSpace({width:e,height:f});a-=g.width,b-=g.height,d=(g=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:b})).height,b-=g.height,this.componentStore.xAxis.setAxisPosition("bottom"),g=this.componentStore.xAxis.calculateSpace({width:a,height:b}),b-=g.height,this.componentStore.yAxis.setAxisPosition("left"),c=(g=this.componentStore.yAxis.calculateSpace({width:a,height:b})).width,(a-=g.width)>0&&(e+=a,a=0),b>0&&(f+=b,b=0),this.componentStore.plot.calculateSpace({width:e,height:f}),this.componentStore.plot.setBoundingBoxXY({x:c,y:d}),this.componentStore.xAxis.setRange([c,c+e]),this.componentStore.xAxis.setBoundingBoxXY({x:c,y:d+f}),this.componentStore.yAxis.setRange([d,d+f]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:d}),this.chartData.plots.some(a=>l(a))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let a=this.chartConfig.width,b=this.chartConfig.height,c=0,d=0,e=0,f=Math.floor(a*this.chartConfig.plotReservedSpacePercent/100),g=Math.floor(b*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:f,height:g});a-=h.width,b-=h.height,c=(h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:b})).height,b-=h.height,this.componentStore.xAxis.setAxisPosition("left"),h=this.componentStore.xAxis.calculateSpace({width:a,height:b}),a-=h.width,d=h.width,this.componentStore.yAxis.setAxisPosition("top"),h=this.componentStore.yAxis.calculateSpace({width:a,height:b}),b-=h.height,e=c+h.height,a>0&&(f+=a,a=0),b>0&&(g+=b,b=0),this.componentStore.plot.calculateSpace({width:f,height:g}),this.componentStore.plot.setBoundingBoxXY({x:d,y:e}),this.componentStore.yAxis.setRange([d,d+f]),this.componentStore.yAxis.setBoundingBoxXY({x:d,y:c}),this.componentStore.xAxis.setRange([e,e+g]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:e}),this.chartData.plots.some(a=>l(a))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let a=[];for(let b of(this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis),Object.values(this.componentStore)))a.push(...b.getDrawableElements());return a}},A=class{static{(0,i.K2)(this,"XYChartBuilder")}static build(a,b,c,d){return new z(a,b,c,d).getDrawableElement()}},B=0,C=J(),D=I(),E=K(),F=D.plotColorPalette.split(",").map(a=>a.trim()),G=!1,H=!1;function I(){let a=(0,h.P$)(),b=(0,h.zj)();return(0,g.$t)(a.xyChart,b.themeVariables.xyChart)}function J(){let a=(0,h.zj)();return(0,g.$t)(h.UI.xyChart,a.xyChart)}function K(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function L(a){let b=(0,h.zj)();return(0,h.jZ)(a.trim(),b)}function M(a){d=a}function N(a){"horizontal"===a?C.chartOrientation="horizontal":C.chartOrientation="vertical"}function O(a){E.xAxis.title=L(a.text)}function P(a,b){E.xAxis={type:"linear",title:E.xAxis.title,min:a,max:b},G=!0}function Q(a){E.xAxis={type:"band",title:E.xAxis.title,categories:a.map(a=>L(a.text))},G=!0}function R(a){E.yAxis.title=L(a.text)}function S(a,b){E.yAxis={type:"linear",title:E.yAxis.title,min:a,max:b},H=!0}function T(a){let b=Math.min(...a),c=Math.max(...a),d=n(E.yAxis)?E.yAxis.min:1/0,e=n(E.yAxis)?E.yAxis.max:-1/0;E.yAxis={type:"linear",title:E.yAxis.title,min:Math.min(d,b),max:Math.max(e,c)}}function U(a){let b=[];if(0===a.length)return b;if(G||P(Math.min(n(E.xAxis)?E.xAxis.min:1/0,1),Math.max(n(E.xAxis)?E.xAxis.max:-1/0,a.length)),H||T(a),m(E.xAxis)&&(b=E.xAxis.categories.map((b,c)=>[b,a[c]])),n(E.xAxis)){let c=E.xAxis.min,d=E.xAxis.max,e=(d-c)/(a.length-1),f=[];for(let a=c;a<=d;a+=e)f.push(`${a}`);b=f.map((b,c)=>[b,a[c]])}return b}function V(a){return F[0===a?0:a%F.length]}function W(a,b){let c=U(b);E.plots.push({type:"line",strokeFill:V(B),strokeWidth:2,data:c}),B++}function X(a,b){let c=U(b);E.plots.push({type:"bar",fill:V(B),data:c}),B++}function Y(){if(0===E.plots.length)throw Error("No Plot to render, please provide a plot with some data");return E.title=(0,h.ab)(),A.build(C,E,D,d)}function Z(){return D}function $(){return C}function _(){return E}(0,i.K2)(I,"getChartDefaultThemeConfig"),(0,i.K2)(J,"getChartDefaultConfig"),(0,i.K2)(K,"getChartDefaultData"),(0,i.K2)(L,"textSanitizer"),(0,i.K2)(M,"setTmpSVGG"),(0,i.K2)(N,"setOrientation"),(0,i.K2)(O,"setXAxisTitle"),(0,i.K2)(P,"setXAxisRangeData"),(0,i.K2)(Q,"setXAxisBand"),(0,i.K2)(R,"setYAxisTitle"),(0,i.K2)(S,"setYAxisRangeData"),(0,i.K2)(T,"setYAxisRangeFromPlotData"),(0,i.K2)(U,"transformDataWithoutCategory"),(0,i.K2)(V,"getPlotColorFromPalette"),(0,i.K2)(W,"setLineData"),(0,i.K2)(X,"setBarData"),(0,i.K2)(Y,"getDrawableElem"),(0,i.K2)(Z,"getChartThemeConfig"),(0,i.K2)($,"getChartConfig"),(0,i.K2)(_,"getXYChartData");var aa={getDrawableElem:Y,clear:(0,i.K2)(function(){(0,h.IU)(),B=0,C=J(),E=K(),F=(D=I()).plotColorPalette.split(",").map(a=>a.trim()),G=!1,H=!1},"clear"),setAccTitle:h.SV,getAccTitle:h.iN,setDiagramTitle:h.ke,getDiagramTitle:h.ab,getAccDescription:h.m7,setAccDescription:h.EI,setOrientation:N,setXAxisTitle:O,setXAxisRangeData:P,setXAxisBand:Q,setYAxisTitle:R,setYAxisRangeData:S,setLineData:W,setBarData:X,setTmpSVGG:M,getChartThemeConfig:Z,getChartConfig:$,getXYChartData:_},ab={parser:k,db:aa,renderer:{draw:(0,i.K2)((a,b,c,d)=>{let f=d.db,g=f.getChartThemeConfig(),j=f.getChartConfig(),k=f.getXYChartData().plots[0].data.map(a=>a[1]);function l(a){return"top"===a?"text-before-edge":"middle"}function m(a){return"left"===a?"start":"right"===a?"end":"middle"}function n(a){return`translate(${a.x}, ${a.y}) rotate(${a.rotation||0})`}(0,i.K2)(l,"getDominantBaseLine"),(0,i.K2)(m,"getTextAnchor"),(0,i.K2)(n,"getTextTransformation"),i.Rm.debug("Rendering xychart chart\n"+a);let o=(0,e.D)(b),p=o.append("g").attr("class","main"),q=p.append("rect").attr("width",j.width).attr("height",j.height).attr("class","background");(0,h.a$)(o,j.height,j.width,!0),o.attr("viewBox",`0 0 ${j.width} ${j.height}`),q.attr("fill",g.backgroundColor),f.setTmpSVGG(o.append("g").attr("class","mermaid-tmp-group"));let r=f.getDrawableElem(),s={};function t(a){let b=p,c="";for(let[d]of a.entries()){let e=p;d>0&&s[c]&&(e=s[c]),c+=a[d],(b=s[c])||(b=s[c]=e.append("g").attr("class",a[d]))}return b}for(let a of((0,i.K2)(t,"getGroup"),r)){if(0===a.data.length)continue;let b=t(a.groupTexts);switch(a.type){case"rect":if(b.selectAll("rect").data(a.data).enter().append("rect").attr("x",a=>a.x).attr("y",a=>a.y).attr("width",a=>a.width).attr("height",a=>a.height).attr("fill",a=>a.fill).attr("stroke",a=>a.strokeFill).attr("stroke-width",a=>a.strokeWidth),j.showDataLabel){let c=j.showDataLabelOutsideBar;if("horizontal"===j.chartOrientation){let d=function(a,b){let{data:c,label:d}=a;return b*d.length*e<=c.width-f};(0,i.K2)(d,"fitsHorizontally");let e=.7,f=10,h=a.data.map((a,b)=>({data:a,label:k[b].toString()})).filter(a=>a.data.width>0&&a.data.height>0),j=Math.floor(Math.min(...h.map(a=>{let{data:b}=a,c=.7*b.height;for(;!d(a,c)&&c>0;)c-=1;return c}))),l=(0,i.K2)(a=>c?a.data.x+a.data.width+f:a.data.x+a.data.width-f,"determineLabelXPosition");b.selectAll("text").data(h).enter().append("text").attr("x",l).attr("y",a=>a.data.y+a.data.height/2).attr("text-anchor",c?"start":"end").attr("dominant-baseline","middle").attr("fill",g.dataLabelColor).attr("font-size",`${j}px`).text(a=>a.label)}else{let d=function(a,b,c){let{data:d,label:e}=a,f=b*e.length*.7,g=d.x+d.width/2,h=g-f/2,i=g+f/2,j=h>=d.x&&i<=d.x+d.width,k=d.y+c+b<=d.y+d.height;return j&&k};(0,i.K2)(d,"fitsInBar");let e=a.data.map((a,b)=>({data:a,label:k[b].toString()})).filter(a=>a.data.width>0&&a.data.height>0),f=Math.floor(Math.min(...e.map(a=>{let{data:b,label:c}=a,e=b.width/(.7*c.length);for(;!d(a,e,10)&&e>0;)e-=1;return e}))),h=(0,i.K2)(a=>c?a.data.y-10:a.data.y+10,"determineLabelYPosition");b.selectAll("text").data(e).enter().append("text").attr("x",a=>a.data.x+a.data.width/2).attr("y",h).attr("text-anchor","middle").attr("dominant-baseline",c?"auto":"hanging").attr("fill",g.dataLabelColor).attr("font-size",`${f}px`).text(a=>a.label)}}break;case"text":b.selectAll("text").data(a.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",a=>a.fill).attr("font-size",a=>a.fontSize).attr("dominant-baseline",a=>l(a.verticalPos)).attr("text-anchor",a=>m(a.horizontalPos)).attr("transform",a=>n(a)).text(a=>a.text);break;case"path":b.selectAll("path").data(a.data).enter().append("path").attr("d",a=>a.path).attr("fill",a=>a.fill?a.fill:"none").attr("stroke",a=>a.strokeFill).attr("stroke-width",a=>a.strokeWidth)}}},"draw")}}}};
1
+ "use strict";exports.id=6206,exports.ids=[6206],exports.modules={6206:(a,b,c)=>{c.d(b,{diagram:()=>ab});var d,e=c(39636),f=c(551),g=c(70400),h=c(65246),i=c(21143),j=c(69085),k=function(){var a=(0,i.K2)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[1,10,12,14,16,18,19,21,23],c=[2,6],d=[1,3],e=[1,5],f=[1,6],g=[1,7],h=[1,5,10,12,14,16,18,19,21,23,34,35,36],j=[1,25],k=[1,26],l=[1,28],m=[1,29],n=[1,30],o=[1,31],p=[1,32],q=[1,33],r=[1,34],s=[1,35],t=[1,36],u=[1,37],v=[1,43],w=[1,42],x=[1,47],y=[1,50],z=[1,10,12,14,16,18,19,21,23,34,35,36],A=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],B=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],C=[1,64],D={trace:(0,i.K2)(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,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$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",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"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],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:(0,i.K2)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 5:d.setOrientation(f[h]);break;case 9:d.setDiagramTitle(f[h].text.trim());break;case 12:d.setLineData({text:"",type:"text"},f[h]);break;case 13:d.setLineData(f[h-1],f[h]);break;case 14:d.setBarData({text:"",type:"text"},f[h]);break;case 15:d.setBarData(f[h-1],f[h]);break;case 16:this.$=f[h].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=f[h].trim(),d.setAccDescription(this.$);break;case 19:case 27:this.$=f[h-1];break;case 20:this.$=[Number(f[h-2]),...f[h]];break;case 21:this.$=[Number(f[h])];break;case 22:d.setXAxisTitle(f[h]);break;case 23:d.setXAxisTitle(f[h-1]);break;case 24:d.setXAxisTitle({type:"text",text:""});break;case 25:d.setXAxisBand(f[h]);break;case 26:d.setXAxisRangeData(Number(f[h-2]),Number(f[h]));break;case 28:this.$=[f[h-2],...f[h]];break;case 29:this.$=[f[h]];break;case 30:d.setYAxisTitle(f[h]);break;case 31:d.setYAxisTitle(f[h-1]);break;case 32:d.setYAxisTitle({type:"text",text:""});break;case 33:d.setYAxisRangeData(Number(f[h-2]),Number(f[h]));break;case 37:case 38:this.$={text:f[h],type:"text"};break;case 39:this.$={text:f[h],type:"markdown"};break;case 40:this.$=f[h];break;case 41:this.$=f[h-1]+""+f[h]}},"anonymous"),table:[a(b,c,{3:1,4:2,7:4,5:d,34:e,35:f,36:g}),{1:[3]},a(b,c,{4:2,7:4,3:8,5:d,34:e,35:f,36:g}),a(b,c,{4:2,7:4,6:9,3:10,5:d,8:[1,11],34:e,35:f,36:g}),{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]},a(h,[2,34]),a(h,[2,35]),a(h,[2,36]),{1:[2,1]},a(b,c,{4:2,7:4,3:21,5:d,34:e,35:f,36:g}),{1:[2,3]},a(h,[2,5]),a(b,[2,7],{4:22,34:e,35:f,36:g}),{11:23,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{11:39,13:38,24:v,27:w,29:40,30:41,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{11:45,15:44,27:x,33:46,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{11:49,17:48,24:y,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{11:52,17:51,24:y,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},{20:[1,53]},{22:[1,54]},a(z,[2,18]),{1:[2,2]},a(z,[2,8]),a(z,[2,9]),a(A,[2,37],{40:55,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u}),a(A,[2,38]),a(A,[2,39]),a(B,[2,40]),a(B,[2,42]),a(B,[2,43]),a(B,[2,44]),a(B,[2,45]),a(B,[2,46]),a(B,[2,47]),a(B,[2,48]),a(B,[2,49]),a(B,[2,50]),a(B,[2,51]),a(z,[2,10]),a(z,[2,22],{30:41,29:56,24:v,27:w}),a(z,[2,24]),a(z,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},a(z,[2,11]),a(z,[2,30],{33:60,27:x}),a(z,[2,32]),{31:[1,61]},a(z,[2,12]),{17:62,24:y},{25:63,27:C},a(z,[2,14]),{17:65,24:y},a(z,[2,16]),a(z,[2,17]),a(B,[2,41]),a(z,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},a(z,[2,31]),{27:[1,69]},a(z,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},a(z,[2,15]),a(z,[2,26]),a(z,[2,27]),{11:59,32:72,37:24,38:j,39:k,40:27,41:l,42:m,43:n,44:o,45:p,46:q,47:r,48:s,49:t,50:u},a(z,[2,33]),a(z,[2,19]),{25:73,27:C},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:(0,i.K2)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,i.K2)(function(a){var b=this,c=[0],d=[],e=[null],f=[],g=this.table,h="",j=0,k=0,l=0,m=f.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;f.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)(function(a){c.length=c.length-2*a,e.length=e.length-a,f.length=f.length-a},"popStack"),(0,i.K2)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=g[v]&&g[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],g[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(j+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(j+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),f.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(k=n.yyleng,h=n.yytext,j=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:f[f.length-(z||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(z||1)].first_column,last_column:f[f.length-1].last_column},r&&(C._$.range=[f[f.length-(z||1)].range[0],f[f.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[h,k,j,o,w[1],e,f].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),f=f.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),f.push(C._$),A=g[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function E(){this.yy={}}return D.lexer={EOF:1,parseError:(0,i.K2)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,i.K2)(function(a,b){return this.yy=b||this.yy||{},this._input=a,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,i.K2)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.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),a},"input"),unput:(0,i.K2)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=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),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,i.K2)(function(){return this._more=!0,this},"more"),reject:(0,i.K2)(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,i.K2)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,i.K2)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,i.K2)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,i.K2)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,i.K2)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,i.K2)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===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,i.K2)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,i.K2)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,i.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,i.K2)(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,i.K2)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,i.K2)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,i.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)(function(a,b,c,d){switch(c){case 0:case 1:case 5:case 44:break;case 2:case 3:return this.popState(),34;case 4:return 34;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 31;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 27;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 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}},(0,i.K2)(E,"Parser"),E.prototype=D,D.Parser=E,new E}();function l(a){return"bar"===a.type}function m(a){return"band"===a.type}function n(a){return"linear"===a.type}k.parser=k,(0,i.K2)(l,"isBarPlot"),(0,i.K2)(m,"isBandAxisData"),(0,i.K2)(n,"isLinearAxisData");var o=class{constructor(a){this.parentGroup=a}static{(0,i.K2)(this,"TextDimensionCalculatorWithFont")}getMaxDimension(a,b){if(!this.parentGroup)return{width:a.reduce((a,b)=>Math.max(b.length,a),0)*b,height:b};let c={width:0,height:0},d=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",b);for(let e of a){let a=(0,f.W6)(d,1,e),g=a?a.width:e.length*b,h=a?a.height:b;c.width=Math.max(c.width,g),c.height=Math.max(c.height,h)}return d.remove(),c}},p=class{constructor(a,b,c,d){this.axisConfig=a,this.title=b,this.textDimensionCalculator=c,this.axisThemeConfig=d,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.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{(0,i.K2)(this,"BaseAxis")}setRange(a){this.range=a,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=a[1]-a[0]:this.boundingRect.width=a[1]-a[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(a){this.axisPosition=a,this.setRange(this.range)}getTickDistance(){let a=this.getRange();return Math.abs(a[0]-a[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(a=>a.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(a){let b=a.height;if(this.axisConfig.showAxisLine&&b>this.axisConfig.axisLineWidth&&(b-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let c=this.getLabelDimension(),d=.2*a.width;this.outerPadding=Math.min(c.width/2,d);let e=c.height+2*this.axisConfig.labelPadding;this.labelTextHeight=c.height,e<=b&&(b-=e,this.showLabel=!0)}if(this.axisConfig.showTick&&b>=this.axisConfig.tickLength&&(this.showTick=!0,b-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let a=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),c=a.height+2*this.axisConfig.titlePadding;this.titleTextHeight=a.height,c<=b&&(b-=c,this.showTitle=!0)}this.boundingRect.width=a.width,this.boundingRect.height=a.height-b}calculateSpaceIfDrawnVertical(a){let b=a.width;if(this.axisConfig.showAxisLine&&b>this.axisConfig.axisLineWidth&&(b-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let c=this.getLabelDimension(),d=.2*a.height;this.outerPadding=Math.min(c.height/2,d);let e=c.width+2*this.axisConfig.labelPadding;e<=b&&(b-=e,this.showLabel=!0)}if(this.axisConfig.showTick&&b>=this.axisConfig.tickLength&&(this.showTick=!0,b-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let a=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),c=a.height+2*this.axisConfig.titlePadding;this.titleTextHeight=a.height,c<=b&&(b-=c,this.showTitle=!0)}this.boundingRect.width=a.width-b,this.boundingRect.height=a.height}calculateSpace(a){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(a):this.calculateSpaceIfDrawnHorizontally(a),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(a){this.boundingRect.x=a.x,this.boundingRect.y=a.y}getDrawableElementsForLeftAxis(){let a=[];if(this.showAxisLine){let b=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;a.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${b},${this.boundingRect.y} L ${b},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&a.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(a=>({text:a.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(a),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let b=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);a.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${b},${this.getScaleValue(a)} L ${b-this.axisConfig.tickLength},${this.getScaleValue(a)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&a.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"}]}),a}getDrawableElementsForBottomAxis(){let a=[];if(this.showAxisLine){let b=this.boundingRect.y+this.axisConfig.axisLineWidth/2;a.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${b} L ${this.boundingRect.x+this.boundingRect.width},${b}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&a.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(a=>({text:a.toString(),x:this.getScaleValue(a),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let b=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);a.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${this.getScaleValue(a)},${b} L ${this.getScaleValue(a)},${b+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&a.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"}]}),a}getDrawableElementsForTopAxis(){let a=[];if(this.showAxisLine){let b=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;a.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${b} L ${this.boundingRect.x+this.boundingRect.width},${b}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&a.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(a=>({text:a.toString(),x:this.getScaleValue(a),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let b=this.boundingRect.y;a.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${this.getScaleValue(a)},${b+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(a)},${b+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&a.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"}]}),a}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():[]}},q=class extends p{static{(0,i.K2)(this,"BandAxis")}constructor(a,b,c,d,e){super(a,d,e,b),this.categories=c,this.scale=(0,j.WH)().domain(this.categories).range(this.getRange())}setRange(a){super.setRange(a)}recalculateScale(){this.scale=(0,j.WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),i.Rm.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(a){return this.scale(a)??this.getRange()[0]}},r=class extends p{static{(0,i.K2)(this,"LinearAxis")}constructor(a,b,c,d,e){super(a,d,e,b),this.domain=c,this.scale=(0,j.m4Y)().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let a=[...this.domain];"left"===this.axisPosition&&a.reverse(),this.scale=(0,j.m4Y)().domain(a).range(this.getRange())}getScaleValue(a){return this.scale(a)}};function s(a,b,c,d){let e=new o(d);return m(a)?new q(b,c,a.categories,a.title,e):new r(b,c,[a.min,a.max],a.title,e)}(0,i.K2)(s,"getAxis");var t=class{constructor(a,b,c,d){this.textDimensionCalculator=a,this.chartConfig=b,this.chartData=c,this.chartThemeConfig=d,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{(0,i.K2)(this,"ChartTitle")}setBoundingBoxXY(a){this.boundingRect.x=a.x,this.boundingRect.y=a.y}calculateSpace(a){let b=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),c=Math.max(b.width,a.width),d=b.height+2*this.chartConfig.titlePadding;return b.width<=c&&b.height<=d&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=c,this.boundingRect.height=d,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let a=[];return this.showChartTitle&&a.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}]}),a}};function u(a,b,c,d){return new t(new o(d),a,b,c)}(0,i.K2)(u,"getChartTitleComponent");var v=class{constructor(a,b,c,d,e){this.plotData=a,this.xAxis=b,this.yAxis=c,this.orientation=d,this.plotIndex=e}static{(0,i.K2)(this,"LinePlot")}getDrawableElement(){let a,b=this.plotData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]);return(a="horizontal"===this.orientation?(0,j.n8j)().y(a=>a[0]).x(a=>a[1])(b):(0,j.n8j)().x(a=>a[0]).y(a=>a[1])(b))?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:a,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},w=class{constructor(a,b,c,d,e,f){this.barData=a,this.boundingRect=b,this.xAxis=c,this.yAxis=d,this.orientation=e,this.plotIndex=f}static{(0,i.K2)(this,"BarPlot")}getDrawableElement(){let a=this.barData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),b=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),c=b/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:a.map(a=>({x:this.boundingRect.x,y:a[0]-c,height:b,width:a[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:a.map(a=>({x:a[0]-c,y:a[1],width:b,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},x=class{constructor(a,b,c){this.chartConfig=a,this.chartData=b,this.chartThemeConfig=c,this.boundingRect={x:0,y:0,width:0,height:0}}static{(0,i.K2)(this,"BasePlot")}setAxes(a,b){this.xAxis=a,this.yAxis=b}setBoundingBoxXY(a){this.boundingRect.x=a.x,this.boundingRect.y=a.y}calculateSpace(a){return this.boundingRect.width=a.width,this.boundingRect.height=a.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let a=[];for(let[b,c]of this.chartData.plots.entries())switch(c.type){case"line":{let d=new v(c,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,b);a.push(...d.getDrawableElement())}break;case"bar":{let d=new w(c,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,b);a.push(...d.getDrawableElement())}}return a}};function y(a,b,c){return new x(a,b,c)}(0,i.K2)(y,"getPlotComponent");var z=class{constructor(a,b,c,d){this.chartConfig=a,this.chartData=b,this.componentStore={title:u(a,b,c,d),plot:y(a,b,c),xAxis:s(b.xAxis,a.xAxis,{titleColor:c.xAxisTitleColor,labelColor:c.xAxisLabelColor,tickColor:c.xAxisTickColor,axisLineColor:c.xAxisLineColor},d),yAxis:s(b.yAxis,a.yAxis,{titleColor:c.yAxisTitleColor,labelColor:c.yAxisLabelColor,tickColor:c.yAxisTickColor,axisLineColor:c.yAxisLineColor},d)}}static{(0,i.K2)(this,"Orchestrator")}calculateVerticalSpace(){let a=this.chartConfig.width,b=this.chartConfig.height,c=0,d=0,e=Math.floor(a*this.chartConfig.plotReservedSpacePercent/100),f=Math.floor(b*this.chartConfig.plotReservedSpacePercent/100),g=this.componentStore.plot.calculateSpace({width:e,height:f});a-=g.width,b-=g.height,d=(g=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:b})).height,b-=g.height,this.componentStore.xAxis.setAxisPosition("bottom"),g=this.componentStore.xAxis.calculateSpace({width:a,height:b}),b-=g.height,this.componentStore.yAxis.setAxisPosition("left"),c=(g=this.componentStore.yAxis.calculateSpace({width:a,height:b})).width,(a-=g.width)>0&&(e+=a,a=0),b>0&&(f+=b,b=0),this.componentStore.plot.calculateSpace({width:e,height:f}),this.componentStore.plot.setBoundingBoxXY({x:c,y:d}),this.componentStore.xAxis.setRange([c,c+e]),this.componentStore.xAxis.setBoundingBoxXY({x:c,y:d+f}),this.componentStore.yAxis.setRange([d,d+f]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:d}),this.chartData.plots.some(a=>l(a))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let a=this.chartConfig.width,b=this.chartConfig.height,c=0,d=0,e=0,f=Math.floor(a*this.chartConfig.plotReservedSpacePercent/100),g=Math.floor(b*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:f,height:g});a-=h.width,b-=h.height,c=(h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:b})).height,b-=h.height,this.componentStore.xAxis.setAxisPosition("left"),h=this.componentStore.xAxis.calculateSpace({width:a,height:b}),a-=h.width,d=h.width,this.componentStore.yAxis.setAxisPosition("top"),h=this.componentStore.yAxis.calculateSpace({width:a,height:b}),b-=h.height,e=c+h.height,a>0&&(f+=a,a=0),b>0&&(g+=b,b=0),this.componentStore.plot.calculateSpace({width:f,height:g}),this.componentStore.plot.setBoundingBoxXY({x:d,y:e}),this.componentStore.yAxis.setRange([d,d+f]),this.componentStore.yAxis.setBoundingBoxXY({x:d,y:c}),this.componentStore.xAxis.setRange([e,e+g]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:e}),this.chartData.plots.some(a=>l(a))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let a=[];for(let b of(this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis),Object.values(this.componentStore)))a.push(...b.getDrawableElements());return a}},A=class{static{(0,i.K2)(this,"XYChartBuilder")}static build(a,b,c,d){return new z(a,b,c,d).getDrawableElement()}},B=0,C=J(),D=I(),E=K(),F=D.plotColorPalette.split(",").map(a=>a.trim()),G=!1,H=!1;function I(){let a=(0,h.P$)(),b=(0,h.zj)();return(0,g.$t)(a.xyChart,b.themeVariables.xyChart)}function J(){let a=(0,h.zj)();return(0,g.$t)(h.UI.xyChart,a.xyChart)}function K(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function L(a){let b=(0,h.zj)();return(0,h.jZ)(a.trim(),b)}function M(a){d=a}function N(a){"horizontal"===a?C.chartOrientation="horizontal":C.chartOrientation="vertical"}function O(a){E.xAxis.title=L(a.text)}function P(a,b){E.xAxis={type:"linear",title:E.xAxis.title,min:a,max:b},G=!0}function Q(a){E.xAxis={type:"band",title:E.xAxis.title,categories:a.map(a=>L(a.text))},G=!0}function R(a){E.yAxis.title=L(a.text)}function S(a,b){E.yAxis={type:"linear",title:E.yAxis.title,min:a,max:b},H=!0}function T(a){let b=Math.min(...a),c=Math.max(...a),d=n(E.yAxis)?E.yAxis.min:1/0,e=n(E.yAxis)?E.yAxis.max:-1/0;E.yAxis={type:"linear",title:E.yAxis.title,min:Math.min(d,b),max:Math.max(e,c)}}function U(a){let b=[];if(0===a.length)return b;if(G||P(Math.min(n(E.xAxis)?E.xAxis.min:1/0,1),Math.max(n(E.xAxis)?E.xAxis.max:-1/0,a.length)),H||T(a),m(E.xAxis)&&(b=E.xAxis.categories.map((b,c)=>[b,a[c]])),n(E.xAxis)){let c=E.xAxis.min,d=E.xAxis.max,e=(d-c)/(a.length-1),f=[];for(let a=c;a<=d;a+=e)f.push(`${a}`);b=f.map((b,c)=>[b,a[c]])}return b}function V(a){return F[0===a?0:a%F.length]}function W(a,b){let c=U(b);E.plots.push({type:"line",strokeFill:V(B),strokeWidth:2,data:c}),B++}function X(a,b){let c=U(b);E.plots.push({type:"bar",fill:V(B),data:c}),B++}function Y(){if(0===E.plots.length)throw Error("No Plot to render, please provide a plot with some data");return E.title=(0,h.ab)(),A.build(C,E,D,d)}function Z(){return D}function $(){return C}function _(){return E}(0,i.K2)(I,"getChartDefaultThemeConfig"),(0,i.K2)(J,"getChartDefaultConfig"),(0,i.K2)(K,"getChartDefaultData"),(0,i.K2)(L,"textSanitizer"),(0,i.K2)(M,"setTmpSVGG"),(0,i.K2)(N,"setOrientation"),(0,i.K2)(O,"setXAxisTitle"),(0,i.K2)(P,"setXAxisRangeData"),(0,i.K2)(Q,"setXAxisBand"),(0,i.K2)(R,"setYAxisTitle"),(0,i.K2)(S,"setYAxisRangeData"),(0,i.K2)(T,"setYAxisRangeFromPlotData"),(0,i.K2)(U,"transformDataWithoutCategory"),(0,i.K2)(V,"getPlotColorFromPalette"),(0,i.K2)(W,"setLineData"),(0,i.K2)(X,"setBarData"),(0,i.K2)(Y,"getDrawableElem"),(0,i.K2)(Z,"getChartThemeConfig"),(0,i.K2)($,"getChartConfig"),(0,i.K2)(_,"getXYChartData");var aa={getDrawableElem:Y,clear:(0,i.K2)(function(){(0,h.IU)(),B=0,C=J(),E=K(),F=(D=I()).plotColorPalette.split(",").map(a=>a.trim()),G=!1,H=!1},"clear"),setAccTitle:h.SV,getAccTitle:h.iN,setDiagramTitle:h.ke,getDiagramTitle:h.ab,getAccDescription:h.m7,setAccDescription:h.EI,setOrientation:N,setXAxisTitle:O,setXAxisRangeData:P,setXAxisBand:Q,setYAxisTitle:R,setYAxisRangeData:S,setLineData:W,setBarData:X,setTmpSVGG:M,getChartThemeConfig:Z,getChartConfig:$,getXYChartData:_},ab={parser:k,db:aa,renderer:{draw:(0,i.K2)((a,b,c,d)=>{let f=d.db,g=f.getChartThemeConfig(),j=f.getChartConfig(),k=f.getXYChartData().plots[0].data.map(a=>a[1]);function l(a){return"top"===a?"text-before-edge":"middle"}function m(a){return"left"===a?"start":"right"===a?"end":"middle"}function n(a){return`translate(${a.x}, ${a.y}) rotate(${a.rotation||0})`}(0,i.K2)(l,"getDominantBaseLine"),(0,i.K2)(m,"getTextAnchor"),(0,i.K2)(n,"getTextTransformation"),i.Rm.debug("Rendering xychart chart\n"+a);let o=(0,e.D)(b),p=o.append("g").attr("class","main"),q=p.append("rect").attr("width",j.width).attr("height",j.height).attr("class","background");(0,h.a$)(o,j.height,j.width,!0),o.attr("viewBox",`0 0 ${j.width} ${j.height}`),q.attr("fill",g.backgroundColor),f.setTmpSVGG(o.append("g").attr("class","mermaid-tmp-group"));let r=f.getDrawableElem(),s={};function t(a){let b=p,c="";for(let[d]of a.entries()){let e=p;d>0&&s[c]&&(e=s[c]),c+=a[d],(b=s[c])||(b=s[c]=e.append("g").attr("class",a[d]))}return b}for(let a of((0,i.K2)(t,"getGroup"),r)){if(0===a.data.length)continue;let b=t(a.groupTexts);switch(a.type){case"rect":if(b.selectAll("rect").data(a.data).enter().append("rect").attr("x",a=>a.x).attr("y",a=>a.y).attr("width",a=>a.width).attr("height",a=>a.height).attr("fill",a=>a.fill).attr("stroke",a=>a.strokeFill).attr("stroke-width",a=>a.strokeWidth),j.showDataLabel){let c=j.showDataLabelOutsideBar;if("horizontal"===j.chartOrientation){let d=function(a,b){let{data:c,label:d}=a;return b*d.length*e<=c.width-f};(0,i.K2)(d,"fitsHorizontally");let e=.7,f=10,h=a.data.map((a,b)=>({data:a,label:k[b].toString()})).filter(a=>a.data.width>0&&a.data.height>0),j=Math.floor(Math.min(...h.map(a=>{let{data:b}=a,c=.7*b.height;for(;!d(a,c)&&c>0;)c-=1;return c}))),l=(0,i.K2)(a=>c?a.data.x+a.data.width+f:a.data.x+a.data.width-f,"determineLabelXPosition");b.selectAll("text").data(h).enter().append("text").attr("x",l).attr("y",a=>a.data.y+a.data.height/2).attr("text-anchor",c?"start":"end").attr("dominant-baseline","middle").attr("fill",g.dataLabelColor).attr("font-size",`${j}px`).text(a=>a.label)}else{let d=function(a,b,c){let{data:d,label:e}=a,f=b*e.length*.7,g=d.x+d.width/2,h=g-f/2,i=g+f/2,j=h>=d.x&&i<=d.x+d.width,k=d.y+c+b<=d.y+d.height;return j&&k};(0,i.K2)(d,"fitsInBar");let e=a.data.map((a,b)=>({data:a,label:k[b].toString()})).filter(a=>a.data.width>0&&a.data.height>0),f=Math.floor(Math.min(...e.map(a=>{let{data:b,label:c}=a,e=b.width/(.7*c.length);for(;!d(a,e,10)&&e>0;)e-=1;return e}))),h=(0,i.K2)(a=>c?a.data.y-10:a.data.y+10,"determineLabelYPosition");b.selectAll("text").data(e).enter().append("text").attr("x",a=>a.data.x+a.data.width/2).attr("y",h).attr("text-anchor","middle").attr("dominant-baseline",c?"auto":"hanging").attr("fill",g.dataLabelColor).attr("font-size",`${f}px`).text(a=>a.label)}}break;case"text":b.selectAll("text").data(a.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",a=>a.fill).attr("font-size",a=>a.fontSize).attr("dominant-baseline",a=>l(a.verticalPos)).attr("text-anchor",a=>m(a.horizontalPos)).attr("transform",a=>n(a)).text(a=>a.text);break;case"path":b.selectAll("path").data(a.data).enter().append("path").attr("d",a=>a.path).attr("fill",a=>a.fill?a.fill:"none").attr("stroke",a=>a.strokeFill).attr("stroke-width",a=>a.strokeWidth)}}},"draw")}}}};
@@ -1 +1 @@
1
- "use strict";exports.id=8916,exports.ids=[8916],exports.modules={18916:(a,b,c)=>{c.d(b,{diagram:()=>f});var d=c(21681);c(61827),c(21661),c(80339),c(34091),c(44906),c(73865),c(65144),c(30800),c(90355),c(19203),c(31792),c(70400),c(65246);var e=c(21143),f={parser:d._$,get db(){return new d.NM},renderer:d.Lh,styles:d.tM,init:(0,e.K2)(a=>{a.class||(a.class={}),a.class.arrowMarkerAbsolute=a.arrowMarkerAbsolute},"init")}}};
1
+ "use strict";exports.id=8916,exports.ids=[8916],exports.modules={18916:(a,b,c)=>{c.d(b,{diagram:()=>f});var d=c(21681);c(61827),c(21661),c(80339),c(34091),c(44906),c(73865),c(65144),c(30800),c(90355),c(19203),c(551),c(70400),c(65246);var e=c(21143),f={parser:d._$,get db(){return new d.NM},renderer:d.Lh,styles:d.tM,init:(0,e.K2)(a=>{a.class||(a.class={}),a.class.arrowMarkerAbsolute=a.arrowMarkerAbsolute},"init")}}};