@imenam/mcp-documentor 1.0.97 → 1.0.100

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 (105) hide show
  1. package/README.md +3 -1
  2. package/dist/src/core/comment-store.d.ts +13 -2
  3. package/dist/src/core/comment-store.js +44 -6
  4. package/dist/src/gui-worker.js +16 -7
  5. package/dist/src/index.js +17 -4
  6. package/dist/src/tools/comments.d.ts +1 -1
  7. package/dist/src/tools/comments.js +51 -8
  8. package/gui/dist/assets/DocContent-D5CLsUKq.js +356 -0
  9. package/gui/dist/assets/abnfDiagram-WEYOIA3C-BqeAt-Gs.js +1 -0
  10. package/gui/dist/assets/arc-Btzq4ujL.js +1 -0
  11. package/gui/dist/assets/architectureDiagram-ZHVYKT53-64qym6UB.js +36 -0
  12. package/gui/dist/assets/blockDiagram-RJAE7QA3-WAx3357U.js +140 -0
  13. package/gui/dist/assets/c4Diagram-XDPPPE54-JfnC4lFj.js +38 -0
  14. package/gui/dist/assets/channel-CAKB_FDX.js +1 -0
  15. package/gui/dist/assets/chunk-2E7WHVMD-ChRTmoE5.js +88 -0
  16. package/gui/dist/assets/{chunk-QZHKN3VN-DkH1yV4X.js → chunk-2Q5K7J3B-BLmYMU05.js} +1 -1
  17. package/gui/dist/assets/chunk-4EMNKR2T-ByrvV5eh.js +1 -0
  18. package/gui/dist/assets/chunk-55XCU76K-CR5a5uPD.js +1 -0
  19. package/gui/dist/assets/{chunk-FMBD7UC4-Bo_Fdtx8.js → chunk-5VM5RSS4-Pitn_Zvk.js} +1 -1
  20. package/gui/dist/assets/{chunk-4BX2VUAB-vdls_rRS.js → chunk-JWPE2WC7-DGhyzwFs.js} +1 -1
  21. package/gui/dist/assets/{chunk-2J33WTMH-D9g9Td5K.js → chunk-VQ5W62QI-DgcZxhBM.js} +1 -1
  22. package/gui/dist/assets/{chunk-55IACEB6-C967M7hc.js → chunk-XXDRQBXY-CZUV9J1S.js} +1 -1
  23. package/gui/dist/assets/chunk-ZCHMQSOR-CNNcMwIE.js +2 -0
  24. package/gui/dist/assets/classDiagram-v2-4MYWR3UA-CqjmyUA_.js +217 -0
  25. package/gui/dist/assets/{cose-bilkent-S5V4N54A-Xmteg-jy.js → cose-bilkent-JH36ORCC-CEo1fweo.js} +1 -1
  26. package/gui/dist/assets/cynefin-EF2NZ3EQ-DJXHpx7E.js +141 -0
  27. package/gui/dist/assets/cynefinDiagram-WF24UDRP-DV_NDSud.js +62 -0
  28. package/gui/dist/assets/cytoscape.esm-BDkkwuE4.js +321 -0
  29. package/gui/dist/assets/dagre-NK4GIZVX-DQqk6wyz.js +4 -0
  30. package/gui/dist/assets/diagram-CBK3MWTC-jqLTDlwa.js +24 -0
  31. package/gui/dist/assets/diagram-I5XIIV2D-DX8lfXfI.js +24 -0
  32. package/gui/dist/assets/diagram-ODIL2UCW-DeXMUnn8.js +30 -0
  33. package/gui/dist/assets/diagram-PFBEJUXE-BmNTodoc.js +3 -0
  34. package/gui/dist/assets/diagram-RJA3I4VV-Cy6P24cC.js +41 -0
  35. package/gui/dist/assets/diagram-TYUNFSNR-DHzYjDGy.js +200 -0
  36. package/gui/dist/assets/ebnfDiagram-V4P3TTPT-B4zOXNTZ.js +1 -0
  37. package/gui/dist/assets/elk-QONTBCTQ-C4QICnsH.js +27 -0
  38. package/gui/dist/assets/erDiagram-KYQIGQAA-p2xJfOWB.js +99 -0
  39. package/gui/dist/assets/flowDiagram-IUGLLWBU-DFghgvui.js +213 -0
  40. package/gui/dist/assets/ganttDiagram-R7GPNTJY-HV4LZlu4.js +292 -0
  41. package/gui/dist/assets/{gitGraphDiagram-PVQCEYII-c7WsVVMK.js → gitGraphDiagram-PDYL7XHY-DXtnta89.js} +3 -3
  42. package/gui/dist/assets/{graph--OzhPTMs.js → graph-D8UmR1vK.js} +1 -1
  43. package/gui/dist/assets/infoDiagram-MVDRKAX5-D0VueLNb.js +2 -0
  44. package/gui/dist/assets/{ishikawaDiagram-YF4QCWOH-IVsvy5UJ.js → ishikawaDiagram-HPEHV2GE-D7K9eBsu.js} +5 -5
  45. package/gui/dist/assets/{journeyDiagram-JHISSGLW-DBtC2yNa.js → journeyDiagram-BOSHW7O7-B4bvZn8i.js} +2 -2
  46. package/gui/dist/assets/{kanban-definition-UN3LZRKU-BLOwBMYs.js → kanban-definition-FNSA4HC5-DFUTIwXB.js} +22 -22
  47. package/gui/dist/assets/katex-DLSO0Xi6.js +257 -0
  48. package/gui/dist/assets/{linear-BdCinjhz.js → linear-DNC-wMVK.js} +1 -1
  49. package/gui/dist/assets/main-BTLYod5c.js +10 -0
  50. package/gui/dist/assets/{mindmap-definition-RKZ34NQL-cWP0zFCd.js → mindmap-definition-6OY57UG3-DoOaHbpM.js} +16 -14
  51. package/gui/dist/assets/pegDiagram-ECIUJNBX-ryLSl0Ah.js +1 -0
  52. package/gui/dist/assets/pieDiagram-GNMPY74T-Bq8sW6iW.js +39 -0
  53. package/gui/dist/assets/{public-Rx7tih5F.js → public-3iVzlO1l.js} +1 -1
  54. package/gui/dist/assets/{quadrantDiagram-W4KKPZXB-qthzhc_J.js → quadrantDiagram-D57K4MC3-DgbEH3GR.js} +4 -4
  55. package/gui/dist/assets/railroadDiagram-Y72NRBL7-CPohPlF3.js +1 -0
  56. package/gui/dist/assets/requirementDiagram-EQYSW5RA-DWFB0c6H.js +84 -0
  57. package/gui/dist/assets/sankeyDiagram-SY24JHO5-Dy_Tjcb0.js +40 -0
  58. package/gui/dist/assets/sequenceDiagram-BLEHNHQU-CrojUX5d.js +169 -0
  59. package/gui/dist/assets/sizeCapture-INFHLROL-CgsMV-GT.js +1 -0
  60. package/gui/dist/assets/stateDiagram-v2-A6IESKWZ-CrIqIMW1.js +291 -0
  61. package/gui/dist/assets/swimlanes-B3ENRKFQ-B4GJZt_W.js +1 -0
  62. package/gui/dist/assets/swimlanesDiagram-AYQRV4AK-Da3hBJCE.js +8 -0
  63. package/gui/dist/assets/timeline-definition-JXYKGLGB-CEGP9Rfk.js +120 -0
  64. package/gui/dist/assets/usecaseDiagram-WPOLBNNX-DVDVukRl.js +370 -0
  65. package/gui/dist/assets/vennDiagram-Q3Y3IDCW-CEr2cVXx.js +34 -0
  66. package/gui/dist/assets/{wardleyDiagram-YWT4CUSO-C6NLdoVc.js → wardleyDiagram-IVAIDKWA-C1f76sDQ.js} +4 -4
  67. package/gui/dist/assets/xychartDiagram-4URNHDU4-DdnVSssZ.js +7 -0
  68. package/gui/dist/index.html +2 -2
  69. package/gui/dist/public.html +2 -2
  70. package/package.json +2 -2
  71. package/gui/dist/assets/DocContent-BrY-Iro8.js +0 -346
  72. package/gui/dist/assets/arc-CLqLXjll.js +0 -1
  73. package/gui/dist/assets/architectureDiagram-3BPJPVTR-CwUYiEaN.js +0 -36
  74. package/gui/dist/assets/blockDiagram-GPEHLZMM-BxRWQefj.js +0 -132
  75. package/gui/dist/assets/c4Diagram-AAUBKEIU-e81sS5Fy.js +0 -10
  76. package/gui/dist/assets/channel-BqHd7P2N.js +0 -1
  77. package/gui/dist/assets/chunk-727SXJPM-BiL6X0Dp.js +0 -206
  78. package/gui/dist/assets/chunk-AQP2D5EJ-O8ZrPkmV.js +0 -231
  79. package/gui/dist/assets/chunk-ND2GUHAM-qAxaTLnA.js +0 -1
  80. package/gui/dist/assets/classDiagram-4FO5ZUOK-DdpQgAaY.js +0 -1
  81. package/gui/dist/assets/classDiagram-v2-Q7XG4LA2-DdpQgAaY.js +0 -1
  82. package/gui/dist/assets/cytoscape.esm-DkOyvmE4.js +0 -321
  83. package/gui/dist/assets/dagre-BM42HDAG-CPTKkffA.js +0 -4
  84. package/gui/dist/assets/diagram-2AECGRRQ-ePp2BMJx.js +0 -43
  85. package/gui/dist/assets/diagram-5GNKFQAL-B-tQSnv6.js +0 -10
  86. package/gui/dist/assets/diagram-KO2AKTUF-D1qAsvsW.js +0 -3
  87. package/gui/dist/assets/diagram-LMA3HP47-CjxtEAWy.js +0 -24
  88. package/gui/dist/assets/diagram-OG6HWLK6-DnTm8uNX.js +0 -24
  89. package/gui/dist/assets/erDiagram-TEJ5UH35-C1mIx5Ug.js +0 -85
  90. package/gui/dist/assets/flowDiagram-I6XJVG4X-Dtkxk7lh.js +0 -162
  91. package/gui/dist/assets/ganttDiagram-6RSMTGT7-IQCn_kg9.js +0 -292
  92. package/gui/dist/assets/infoDiagram-5YYISTIA-a1ZpVZFh.js +0 -2
  93. package/gui/dist/assets/katex-DHMw6HUq.js +0 -257
  94. package/gui/dist/assets/layout-SsrduOYp.js +0 -1
  95. package/gui/dist/assets/main-BgzMoT-j.js +0 -10
  96. package/gui/dist/assets/pieDiagram-4H26LBE5-CxR8eVFE.js +0 -30
  97. package/gui/dist/assets/requirementDiagram-4Y6WPE33-6WAQZRGx.js +0 -84
  98. package/gui/dist/assets/sankeyDiagram-5OEKKPKP-90Qi-qRN.js +0 -40
  99. package/gui/dist/assets/sequenceDiagram-3UESZ5HK-DaxEPyZi.js +0 -162
  100. package/gui/dist/assets/stateDiagram-AJRCARHV-C0GP43Ox.js +0 -1
  101. package/gui/dist/assets/stateDiagram-v2-BHNVJYJU-DUBbX7tH.js +0 -1
  102. package/gui/dist/assets/timeline-definition-PNZ67QCA-Cd9IggR8.js +0 -120
  103. package/gui/dist/assets/vennDiagram-CIIHVFJN-BEk3ZM8f.js +0 -34
  104. package/gui/dist/assets/wardley-L42UT6IY-F-EGU8Ai.js +0 -161
  105. package/gui/dist/assets/xychartDiagram-2RQKCTM6-D67ZFrs7.js +0 -7
@@ -1,10 +1,10 @@
1
- import{g as ae}from"./chunk-55IACEB6-C967M7hc.js";import{s as ce}from"./chunk-2J33WTMH-D9g9Td5K.js";import{_ as h,l as I,o as le,r as he,D as de,G as j,c as P,i as G,b3 as ge,V as ue,W as pe,X as fe}from"./DocContent-BrY-Iro8.js";const _=[];for(let t=0;t<256;++t)_.push((t+256).toString(16).slice(1));function me(t,e=0){return(_[t[e+0]]+_[t[e+1]]+_[t[e+2]]+_[t[e+3]]+"-"+_[t[e+4]]+_[t[e+5]]+"-"+_[t[e+6]]+_[t[e+7]]+"-"+_[t[e+8]]+_[t[e+9]]+"-"+_[t[e+10]]+_[t[e+11]]+_[t[e+12]]+_[t[e+13]]+_[t[e+14]]+_[t[e+15]]).toLowerCase()}const ye=new Uint8Array(16);function Ee(){return crypto.getRandomValues(ye)}function _e(t,e,a){return crypto.randomUUID?crypto.randomUUID():be(t)}function be(t,e,a){t=t||{};const l=t.random??t.rng?.()??Ee();if(l.length<16)throw new Error("Random bytes length must be >= 16");return l[6]=l[6]&15|64,l[8]=l[8]&63|128,me(l)}var q=(function(){var t=h(function(L,s,i,o){for(i=i||{},o=L.length;o--;i[L[o]]=s);return i},"o"),e=[1,4],a=[1,13],l=[1,12],n=[1,15],d=[1,16],f=[1,20],y=[1,19],E=[6,7,8],b=[1,26],v=[1,24],R=[1,25],g=[6,7,11],A=[1,6,13,15,16,19,22],J=[1,33],K=[1,34],$=[1,6,7,11,13,15,16,19,22],H={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:h(function(s,i,o,c,p,r,B){var u=r.length-1;switch(p){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",r[u].id),c.addNode(r[u-1].length,r[u].id,r[u].descr,r[u].type);break;case 16:c.getLogger().trace("Icon: ",r[u]),c.decorateNode({icon:r[u]});break;case 17:case 21:c.decorateNode({class:r[u]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[u].id),c.addNode(0,r[u].id,r[u].descr,r[u].type);break;case 20:c.decorateNode({icon:r[u]});break;case 25:c.getLogger().trace("node found ..",r[u-2]),this.$={id:r[u-1],descr:r[u-1],type:c.getType(r[u-2],r[u])};break;case 26:this.$={id:r[u],descr:r[u],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",r[u-3]),this.$={id:r[u-3],descr:r[u-1],type:c.getType(r[u-2],r[u])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:a,7:[1,10],9:9,12:11,13:l,14:14,15:n,16:d,17:17,18:18,19:f,22:y},t(E,[2,3]),{1:[2,2]},t(E,[2,4]),t(E,[2,5]),{1:[2,6],6:a,12:21,13:l,14:14,15:n,16:d,17:17,18:18,19:f,22:y},{6:a,9:22,12:11,13:l,14:14,15:n,16:d,17:17,18:18,19:f,22:y},{6:b,7:v,10:23,11:R},t(g,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:f,22:y}),t(g,[2,18]),t(g,[2,19]),t(g,[2,20]),t(g,[2,21]),t(g,[2,23]),t(g,[2,24]),t(g,[2,26],{19:[1,30]}),{20:[1,31]},{6:b,7:v,10:32,11:R},{1:[2,7],6:a,12:21,13:l,14:14,15:n,16:d,17:17,18:18,19:f,22:y},t(A,[2,14],{7:J,11:K}),t($,[2,8]),t($,[2,9]),t($,[2,10]),t(g,[2,15]),t(g,[2,16]),t(g,[2,17]),{20:[1,35]},{21:[1,36]},t(A,[2,13],{7:J,11:K}),t($,[2,11]),t($,[2,12]),{21:[1,37]},t(g,[2,25]),t(g,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:h(function(s,i){if(i.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=i,o}},"parseError"),parse:h(function(s){var i=this,o=[0],c=[],p=[null],r=[],B=this.table,u="",U=0,Q=0,ie=2,Z=1,se=r.slice.call(arguments,1),m=Object.create(this.lexer),T={yy:{}};for(var W in this.yy)Object.prototype.hasOwnProperty.call(this.yy,W)&&(T.yy[W]=this.yy[W]);m.setInput(s,T.yy),T.yy.lexer=m,T.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var X=m.yylloc;r.push(X);var re=m.options&&m.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function oe(S){o.length=o.length-2*S,p.length=p.length-S,r.length=r.length-S}h(oe,"popStack");function ee(){var S;return S=c.pop()||m.lex()||Z,typeof S!="number"&&(S instanceof Array&&(c=S,S=c.pop()),S=i.symbols_[S]||S),S}h(ee,"lex");for(var k,O,x,z,C={},V,N,te,F;;){if(O=o[o.length-1],this.defaultActions[O]?x=this.defaultActions[O]:((k===null||typeof k>"u")&&(k=ee()),x=B[O]&&B[O][k]),typeof x>"u"||!x.length||!x[0]){var Y="";F=[];for(V in B[O])this.terminals_[V]&&V>ie&&F.push("'"+this.terminals_[V]+"'");m.showPosition?Y="Parse error on line "+(U+1)+`:
2
- `+m.showPosition()+`
3
- Expecting `+F.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Y="Parse error on line "+(U+1)+": Unexpected "+(k==Z?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(Y,{text:m.match,token:this.terminals_[k]||k,line:m.yylineno,loc:X,expected:F})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+k);switch(x[0]){case 1:o.push(k),p.push(m.yytext),r.push(m.yylloc),o.push(x[1]),k=null,Q=m.yyleng,u=m.yytext,U=m.yylineno,X=m.yylloc;break;case 2:if(N=this.productions_[x[1]][1],C.$=p[p.length-N],C._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},re&&(C._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),z=this.performAction.apply(C,[u,Q,U,T.yy,x[1],p,r].concat(se)),typeof z<"u")return z;N&&(o=o.slice(0,-1*N*2),p=p.slice(0,-1*N),r=r.slice(0,-1*N)),o.push(this.productions_[x[1]][0]),p.push(C.$),r.push(C._$),te=B[o[o.length-2]][o[o.length-1]],o.push(te);break;case 3:return!0}}return!0},"parse")},ne=(function(){var L={EOF:1,parseError:h(function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw new Error(i)},"parseError"),setInput:h(function(s,i){return this.yy=i||this.yy||{},this._input=s,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:h(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var i=s.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:h(function(s){var i=s.length,o=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var c=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),o.length-1&&(this.yylineno-=o.length-1);var p=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:o?(o.length===c.length?this.yylloc.first_column:0)+c[c.length-o.length].length-o[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
1
+ import{g as ce}from"./chunk-XXDRQBXY-CZUV9J1S.js";import{s as le}from"./chunk-VQ5W62QI-DgcZxhBM.js";import{_ as h,l as I,p as he,r as de,L as ge,O as j,c as P,j as G,bd as ue,a1 as pe,a2 as fe,a3 as me}from"./DocContent-D5CLsUKq.js";const _=[];for(let t=0;t<256;++t)_.push((t+256).toString(16).slice(1));function ye(t,e=0){return(_[t[e+0]]+_[t[e+1]]+_[t[e+2]]+_[t[e+3]]+"-"+_[t[e+4]]+_[t[e+5]]+"-"+_[t[e+6]]+_[t[e+7]]+"-"+_[t[e+8]]+_[t[e+9]]+"-"+_[t[e+10]]+_[t[e+11]]+_[t[e+12]]+_[t[e+13]]+_[t[e+14]]+_[t[e+15]]).toLowerCase()}const Ee=new Uint8Array(16);function _e(){return crypto.getRandomValues(Ee)}function be(t,e,a){return crypto.randomUUID?crypto.randomUUID():ke(t)}function ke(t,e,a){t=t||{};const l=t.random??t.rng?.()??_e();if(l.length<16)throw new Error("Random bytes length must be >= 16");return l[6]=l[6]&15|64,l[8]=l[8]&63|128,ye(l)}var q=(function(){var t=h(function(D,s,i,o){for(i=i||{},o=D.length;o--;i[D[o]]=s);return i},"o"),e=[1,4],a=[1,13],l=[1,12],n=[1,15],d=[1,16],u=[1,20],m=[1,19],E=[6,7,8],b=[1,26],v=[1,24],R=[1,25],g=[6,7,11],A=[1,6,13,15,16,19,22],J=[1,33],K=[1,34],$=[1,6,7,11,13,15,16,19,22],H={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:h(function(s,i,o,c,f,r,B){var p=r.length-1;switch(f){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",r[p].id),c.addNode(r[p-1].length,r[p].id,r[p].descr,r[p].type);break;case 16:c.getLogger().trace("Icon: ",r[p]),c.decorateNode({icon:r[p]});break;case 17:case 21:c.decorateNode({class:r[p]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[p].id),c.addNode(0,r[p].id,r[p].descr,r[p].type);break;case 20:c.decorateNode({icon:r[p]});break;case 25:c.getLogger().trace("node found ..",r[p-2]),this.$={id:r[p-1],descr:r[p-1],type:c.getType(r[p-2],r[p])};break;case 26:this.$={id:r[p],descr:r[p],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",r[p-3]),this.$={id:r[p-3],descr:r[p-1],type:c.getType(r[p-2],r[p])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:a,7:[1,10],9:9,12:11,13:l,14:14,15:n,16:d,17:17,18:18,19:u,22:m},t(E,[2,3]),{1:[2,2]},t(E,[2,4]),t(E,[2,5]),{1:[2,6],6:a,12:21,13:l,14:14,15:n,16:d,17:17,18:18,19:u,22:m},{6:a,9:22,12:11,13:l,14:14,15:n,16:d,17:17,18:18,19:u,22:m},{6:b,7:v,10:23,11:R},t(g,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:u,22:m}),t(g,[2,18]),t(g,[2,19]),t(g,[2,20]),t(g,[2,21]),t(g,[2,23]),t(g,[2,24]),t(g,[2,26],{19:[1,30]}),{20:[1,31]},{6:b,7:v,10:32,11:R},{1:[2,7],6:a,12:21,13:l,14:14,15:n,16:d,17:17,18:18,19:u,22:m},t(A,[2,14],{7:J,11:K}),t($,[2,8]),t($,[2,9]),t($,[2,10]),t(g,[2,15]),t(g,[2,16]),t(g,[2,17]),{20:[1,35]},{21:[1,36]},t(A,[2,13],{7:J,11:K}),t($,[2,11]),t($,[2,12]),{21:[1,37]},t(g,[2,25]),t(g,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:h(function(s,i){if(i.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=i,o}},"parseError"),parse:h(function(s){var i=this,o=[0],c=[],f=[null],r=[],B=this.table,p="",U=0,Q=0,se=2,Z=1,re=r.slice.call(arguments,1),y=Object.create(this.lexer),T={yy:{}};for(var W in this.yy)Object.prototype.hasOwnProperty.call(this.yy,W)&&(T.yy[W]=this.yy[W]);y.setInput(s,T.yy),T.yy.lexer=y,T.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var z=y.yylloc;r.push(z);var oe=y.options&&y.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ae(S){o.length=o.length-2*S,f.length=f.length-S,r.length=r.length-S}h(ae,"popStack");function ee(){var S;return S=c.pop()||y.lex()||Z,typeof S!="number"&&(S instanceof Array&&(c=S,S=c.pop()),S=i.symbols_[S]||S),S}h(ee,"lex");for(var k,O,x,X,C={},V,N,te,F;;){if(O=o[o.length-1],this.defaultActions[O]?x=this.defaultActions[O]:((k===null||typeof k>"u")&&(k=ee()),x=B[O]&&B[O][k]),typeof x>"u"||!x.length||!x[0]){var Y="";F=[];for(V in B[O])this.terminals_[V]&&V>se&&F.push("'"+this.terminals_[V]+"'");y.showPosition?Y="Parse error on line "+(U+1)+`:
2
+ `+y.showPosition()+`
3
+ Expecting `+F.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Y="Parse error on line "+(U+1)+": Unexpected "+(k==Z?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(Y,{text:y.match,token:this.terminals_[k]||k,line:y.yylineno,loc:z,expected:F})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+k);switch(x[0]){case 1:o.push(k),f.push(y.yytext),r.push(y.yylloc),o.push(x[1]),k=null,Q=y.yyleng,p=y.yytext,U=y.yylineno,z=y.yylloc;break;case 2:if(N=this.productions_[x[1]][1],C.$=f[f.length-N],C._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},oe&&(C._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),X=this.performAction.apply(C,[p,Q,U,T.yy,x[1],f,r].concat(re)),typeof X<"u")return X;N&&(o=o.slice(0,-1*N*2),f=f.slice(0,-1*N),r=r.slice(0,-1*N)),o.push(this.productions_[x[1]][0]),f.push(C.$),r.push(C._$),te=B[o[o.length-2]][o[o.length-1]],o.push(te);break;case 3:return!0}}return!0},"parse")},ie=(function(){var D={EOF:1,parseError:h(function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw new Error(i)},"parseError"),setInput:h(function(s,i){return this.yy=i||this.yy||{},this._input=s,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:h(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var i=s.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:h(function(s){var i=s.length,o=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var c=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),o.length-1&&(this.yylineno-=o.length-1);var f=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:o?(o.length===c.length?this.yylloc.first_column:0)+c[c.length-o.length].length-o[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:h(function(s){this.unput(this.match.slice(s))},"less"),pastInput:h(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var s=this.pastInput(),i=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
5
- `+i+"^"},"showPosition"),test_match:h(function(s,i){var o,c,p;if(this.options.backtrack_lexer&&(p={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&&(p.yylloc.range=this.yylloc.range.slice(0))),c=s[0].match(/(?:\r\n?|\n).*/g),c&&(this.yylineno+=c.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,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(s[0].length),this.matched+=s[0],o=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var r in p)this[r]=p[r];return!1}return!1},"test_match"),next:h(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,i,o,c;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),r=0;r<p.length;r++)if(o=this._input.match(this.rules[p[r]]),o&&(!i||o[0].length>i[0].length)){if(i=o,c=r,this.options.backtrack_lexer){if(s=this.test_match(o,p[r]),s!==!1)return s;if(this._backtrack){i=!1;continue}else return!1}else if(!this.options.flex)break}return i?(s=this.test_match(i,p[c]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:h(function(){var i=this.next();return i||this.lex()},"lex"),begin:h(function(i){this.conditionStack.push(i)},"begin"),popState:h(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:h(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:h(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:h(function(i){this.begin(i)},"pushState"),stateStackSize:h(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:h(function(i,o,c,p){switch(c){case 0:return i.getLogger().trace("Found comment",o.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:i.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return i.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:i.getLogger().trace("end icon"),this.popState();break;case 10:return i.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return i.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return i.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return i.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:i.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return i.getLogger().trace("description:",o.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),i.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),i.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),i.getLogger().trace("node end ...",o.yytext),"NODE_DEND";case 30:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 35:return i.getLogger().trace("Long description:",o.yytext),20;case 36:return i.getLogger().trace("Long description:",o.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return L})();H.lexer=ne;function M(){this.yy={}}return h(M,"Parser"),M.prototype=H,H.Parser=M,new M})();q.parser=q;var ke=q,Se=12,D={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},w,xe=(w=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=D,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let a=this.nodes.length-1;a>=0;a--)if(this.nodes[a].level<e)return this.nodes[a];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,a,l,n){I.info("addNode",e,a,l,n);let d=!1;this.nodes.length===0?(this.baseLevel=e,e=0,d=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,d=!1);const f=P();let y=f.mindmap?.padding??j.mindmap.padding;switch(n){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:y*=2;break}const E={id:this.count++,nodeId:G(a,f),level:e,descr:G(l,f),type:n,children:[],width:f.mindmap?.maxNodeWidth??j.mindmap.maxNodeWidth,padding:y,isRoot:d},b=this.getParent(e);if(b)b.children.push(E),this.nodes.push(E);else if(d)this.nodes.push(E);else throw new Error(`There can be only one root. No parent could be found for ("${E.descr}")`)}getType(e,a){switch(I.debug("In get type",e,a),e){case"[":return this.nodeType.RECT;case"(":return a===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,a){this.elements[e]=a}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;const a=P(),l=this.nodes[this.nodes.length-1];e.icon&&(l.icon=G(e.icon,a)),e.class&&(l.class=G(e.class,a))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,a){if(e.level===0?e.section=void 0:e.section=a,e.children)for(const[l,n]of e.children.entries()){const d=e.level===0?l%(Se-1):a;this.assignSections(n,d)}}flattenNodes(e,a){const l=P(),n=["mindmap-node"];e.isRoot===!0?n.push("section-root","section--1"):e.section!==void 0&&n.push(`section-${e.section}`),e.class&&n.push(e.class);const d=n.join(" "),f=h(E=>{const v=(l.theme?.toLowerCase()??"").includes("redux");switch(E){case D.CIRCLE:return"mindmapCircle";case D.RECT:return"rect";case D.ROUNDED_RECT:return"rounded";case D.CLOUD:return"cloud";case D.BANG:return"bang";case D.HEXAGON:return"hexagon";case D.DEFAULT:return v?"rounded":"defaultMindmapNode";case D.NO_BORDER:default:return"rect"}},"getShapeFromType"),y={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:f(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:d,cssStyles:[],look:l.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(a.push(y),e.children)for(const E of e.children)this.flattenNodes(E,a)}generateEdges(e,a){if(!e.children)return;const l=P();for(const n of e.children){let d="edge";n.section!==void 0&&(d+=` section-edge-${n.section}`);const f=e.level+1;d+=` edge-depth-${f}`;const y={id:`edge_${e.id}_${n.id}`,start:e.id.toString(),end:n.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:l.look,classes:d,depth:e.level,section:n.section};a.push(y),this.generateEdges(n,a)}}getData(){const e=this.getMindmap(),a=P(),n=ge().layout!==void 0,d=a;if(n||(d.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:d};I.debug("getData: mindmapRoot",e,a),this.assignSections(e);const f=[],y=[];this.flattenNodes(e,f),this.generateEdges(e,y),I.debug(`getData: processed ${f.length} nodes and ${y.length} edges`);const E=new Map;for(const b of f)E.set(b.id,{shape:b.shape,width:b.width,height:b.height,padding:b.padding});return{nodes:f,edges:y,config:d,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(E),type:"mindmap",diagramId:"mindmap-"+_e()}}getLogger(){return I}},h(w,"MindmapDB"),w),Ne=h(async(t,e,a,l)=>{I.debug(`Rendering mindmap diagram
7
- `+t);const n=l.db,d=n.getData(),f=ae(e,d.config.securityLevel);if(d.type=l.type,d.layoutAlgorithm=le(d.config.layout,{fallback:"cose-bilkent"}),d.diagramId=e,!n.getMindmap())return;d.nodes.forEach(g=>{g.shape==="rounded"?(g.radius=15,g.taper=15,g.stroke="none",g.width=0,g.padding=15):g.shape==="circle"?g.padding=10:g.shape==="rect"?(g.width=0,g.padding=10):g.shape==="hexagon"&&(g.width=0,g.height=0)}),await he(d,f);const{themeVariables:E}=de(),{useGradient:b,gradientStart:v,gradientStop:R}=E;if(b&&v&&R){const g=f.attr("id"),A=f.append("defs").append("linearGradient").attr("id",`${g}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");A.append("stop").attr("offset","0%").attr("stop-color",v).attr("stop-opacity",1),A.append("stop").attr("offset","100%").attr("stop-color",R).attr("stop-opacity",1)}ce(f,d.config.mindmap?.padding??j.mindmap.padding,"mindmapDiagram",d.config.mindmap?.useMaxWidth??j.mindmap.useMaxWidth)},"draw"),De={draw:Ne},Le=h(t=>{const{theme:e,look:a}=t;let l="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++)t["lineColor"+n]=t["lineColor"+n]||t["cScaleInv"+n],ue(t["lineColor"+n])?t["lineColor"+n]=pe(t["lineColor"+n],20):t["lineColor"+n]=fe(t["lineColor"+n],20);for(let n=0;n<t.THEME_COLOR_LIMIT;n++){const d=""+(a==="neo"?Math.max(10-(n-1)*2,2):17-3*n);l+=`
5
+ `+i+"^"},"showPosition"),test_match:h(function(s,i){var o,c,f;if(this.options.backtrack_lexer&&(f={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&&(f.yylloc.range=this.yylloc.range.slice(0))),c=s[0].match(/(?:\r\n?|\n).*/g),c&&(this.yylineno+=c.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,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(s[0].length),this.matched+=s[0],o=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var r in f)this[r]=f[r];return!1}return!1},"test_match"),next:h(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,i,o,c;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),r=0;r<f.length;r++)if(o=this._input.match(this.rules[f[r]]),o&&(!i||o[0].length>i[0].length)){if(i=o,c=r,this.options.backtrack_lexer){if(s=this.test_match(o,f[r]),s!==!1)return s;if(this._backtrack){i=!1;continue}else return!1}else if(!this.options.flex)break}return i?(s=this.test_match(i,f[c]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:h(function(){var i=this.next();return i||this.lex()},"lex"),begin:h(function(i){this.conditionStack.push(i)},"begin"),popState:h(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:h(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:h(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:h(function(i){this.begin(i)},"pushState"),stateStackSize:h(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:h(function(i,o,c,f){switch(c){case 0:return i.getLogger().trace("Found comment",o.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:i.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return i.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:i.getLogger().trace("end icon"),this.popState();break;case 10:return i.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return i.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return i.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return i.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:i.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return i.getLogger().trace("description:",o.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),i.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),i.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),i.getLogger().trace("node end ...",o.yytext),"NODE_DEND";case 30:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 35:return i.getLogger().trace("Long description:",o.yytext),20;case 36:return i.getLogger().trace("Long description:",o.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return D})();H.lexer=ie;function M(){this.yy={}}return h(M,"Parser"),M.prototype=H,H.Parser=M,new M})();q.parser=q;var Se=q,ne=12,L={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},w,xe=(w=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=L,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let a=this.nodes.length-1;a>=0;a--)if(this.nodes[a].level<e)return this.nodes[a];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,a,l,n){I.info("addNode",e,a,l,n);let d=!1;this.nodes.length===0?(this.baseLevel=e,e=0,d=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,d=!1);const u=P();let m=u.mindmap?.padding??j.mindmap.padding;switch(n){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:m*=2;break}const E={id:this.count++,nodeId:G(a,u),level:e,descr:G(l,u),type:n,children:[],width:u.mindmap?.maxNodeWidth??j.mindmap.maxNodeWidth,padding:m,isRoot:d},b=this.getParent(e);if(b)b.children.push(E),this.nodes.push(E);else if(d)this.nodes.push(E);else throw new Error(`There can be only one root. No parent could be found for ("${E.descr}")`)}getType(e,a){switch(I.debug("In get type",e,a),e){case"[":return this.nodeType.RECT;case"(":return a===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,a){this.elements[e]=a}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;const a=P(),l=this.nodes[this.nodes.length-1];e.icon&&(l.icon=G(e.icon,a)),e.class&&(l.class=G(e.class,a))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,a,l=0,n=!1){if(e.level===0?e.section=void 0:e.section=n?(l-1)%(ne-1):a,e.children)for(const[d,u]of e.children.entries()){const m=e.level===0?d%(ne-1):a;this.assignSections(u,m,l+1,n)}}flattenNodes(e,a){const l=P(),n=["mindmap-node"];e.isRoot===!0?n.push("section-root","section--1"):e.section!==void 0&&n.push(`section-${e.section}`),e.class&&n.push(e.class);const d=n.join(" "),u=h(E=>{const v=(l.theme?.toLowerCase()??"").includes("redux");switch(E){case L.CIRCLE:return"mindmapCircle";case L.RECT:return"rect";case L.ROUNDED_RECT:return"rounded";case L.CLOUD:return"cloud";case L.BANG:return"bang";case L.HEXAGON:return"hexagon";case L.DEFAULT:return v?"rounded":"defaultMindmapNode";case L.NO_BORDER:default:return"rect"}},"getShapeFromType"),m={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:u(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:d,cssStyles:[],centerLabel:!0,look:l.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(a.push(m),e.children)for(const E of e.children)this.flattenNodes(E,a)}generateEdges(e,a){if(!e.children)return;const l=P();for(const n of e.children){let d="edge";n.section!==void 0&&(d+=` section-edge-${n.section}`);const u=e.level+1;d+=` edge-depth-${u}`;const m={id:`edge_${e.id}_${n.id}`,start:e.id.toString(),end:n.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:l.look,classes:d,depth:e.level,section:n.section};a.push(m),this.generateEdges(n,a)}}getData(){const e=this.getMindmap(),a=P(),n=ue().layout!==void 0,d=a;if(n||(d.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:d};I.debug("getData: mindmapRoot",e,a),this.assignSections(e,void 0,0,a.mindmap?.colorBy==="depth");const u=[],m=[];this.flattenNodes(e,u),this.generateEdges(e,m),I.debug(`getData: processed ${u.length} nodes and ${m.length} edges`);const E=new Map;for(const b of u)E.set(b.id,{shape:b.shape,width:b.width,height:b.height,padding:b.padding});return{nodes:u,edges:m,config:d,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(E),type:"mindmap",diagramId:"mindmap-"+be()}}getLogger(){return I}},h(w,"MindmapDB"),w),Ne=h(async(t,e,a,l)=>{I.debug(`Rendering mindmap diagram
7
+ `+t);const n=l.db,d=n.getData(),u=ce(e,d.config.securityLevel);if(d.type=l.type,d.layoutAlgorithm=he(d.config.layout,{fallback:"cose-bilkent"}),d.diagramId=e,!n.getMindmap())return;d.nodes.forEach(g=>{g.shape==="rounded"?(g.radius=15,g.taper=15,g.stroke="none",g.width=0,g.padding=15):g.shape==="circle"?g.padding=10:g.shape==="rect"?(g.width=0,g.padding=10):g.shape==="hexagon"&&(g.width=0,g.height=0)}),await de(d,u);const{themeVariables:E}=ge(),{useGradient:b,gradientStart:v,gradientStop:R}=E;if(b&&v&&R){const g=u.attr("id"),A=u.append("defs").append("linearGradient").attr("id",`${g}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");A.append("stop").attr("offset","0%").attr("stop-color",v).attr("stop-opacity",1),A.append("stop").attr("offset","100%").attr("stop-color",R).attr("stop-opacity",1)}le(u,d.config.mindmap?.padding??j.mindmap.padding,"mindmapDiagram",d.config.mindmap?.useMaxWidth??j.mindmap.useMaxWidth)},"draw"),Le={draw:Ne},De=h(t=>{const{theme:e,look:a}=t;let l="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++)t["lineColor"+n]=t["lineColor"+n]||t["cScaleInv"+n],pe(t["lineColor"+n])?t["lineColor"+n]=fe(t["lineColor"+n],20):t["lineColor"+n]=me(t["lineColor"+n],20);for(let n=0;n<t.THEME_COLOR_LIMIT;n++){const d=""+(a==="neo"?Math.max(10-(n-1)*2,2):17-3*n),u=e==="redux"||e==="redux-dark"?t.nodeBorder:t["cScaleLabel"+(e==="neutral"?1:n)];l+=`
8
8
  .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {
9
9
  fill: ${t["cScale"+n]};
10
10
  }
@@ -43,8 +43,9 @@ Expecting `+F.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Y="Parse error on
43
43
  [data-look="neo"].section-edge-${n-1}{
44
44
  stroke: ${e?.includes("redux")||e==="neo-dark"?t.nodeBorder:t["cScale"+n]};
45
45
  }
46
- [data-look="neo"].mindmap-node.section-${n-1} text {
47
- fill: ${e==="redux"||e==="redux-dark"?t.nodeBorder:t["cScaleLabel"+(e==="neutral"?1:n)]};
46
+ [data-look="neo"].mindmap-node.section-${n-1} text, [data-look="neo"].mindmap-node.section-${n-1} span {
47
+ fill: ${u};
48
+ color: ${u};
48
49
  }
49
50
  `}return l},"genSections"),ve=h((t,e,a)=>{let l="";for(let n=0;n<t;n++)l+=`
50
51
  [data-look="neo"].mindmap-node.section-${n-1} rect, [data-look="neo"].mindmap-node.section-${n-1} path, [data-look="neo"].mindmap-node.section-${n-1} circle, [data-look="neo"].mindmap-node.section-${n-1} polygon {
@@ -53,11 +54,11 @@ Expecting `+F.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Y="Parse error on
53
54
  }
54
55
  .section-${n-1} line {
55
56
  stroke-width: 0;
56
- }`;return l},"genGradient"),Te=h(t=>{const{theme:e}=t,a=t.svgId,l=t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none";return`
57
+ }`;return l},"genGradient"),Te=h(t=>{const{theme:e}=t,a=t.svgId,l=e?.includes("redux")?t.nodeBorder:t["cScaleLabel"+(e==="neutral"?1:0)],n=t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${a}-drop-shadow)`):"none";return`
57
58
  .edge {
58
59
  stroke-width: 3;
59
60
  }
60
- ${Le(t)}
61
+ ${De(t)}
61
62
  .section-root rect, .section-root path, .section-root circle, .section-root polygon {
62
63
  fill: ${t.git0};
63
64
  }
@@ -84,13 +85,14 @@ Expecting `+F.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Y="Parse error on
84
85
  text-align: center;
85
86
  }
86
87
  [data-look="neo"].mindmap-node {
87
- filter: ${l};
88
+ filter: ${n};
88
89
  }
89
90
  [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon {
90
91
  fill: ${e?.includes("redux")?t.mainBkg:t.git0};
91
92
  }
92
- [data-look="neo"].mindmap-node.section-root .text-inner-tspan {
93
- fill: ${e?.includes("redux")?t.nodeBorder:t["cScaleLabel"+(e==="neutral"?1:0)]};
93
+ [data-look="neo"].mindmap-node.section-root .text-inner-tspan, [data-look="neo"].mindmap-node.section-root span {
94
+ fill: ${l};
95
+ color: ${l};
94
96
  }
95
97
  ${t.useGradient&&a&&t.mainBkg?ve(t.THEME_COLOR_LIMIT,a,t.mainBkg):""}
96
- `},"getStyles"),Oe=Te,Re={get db(){return new xe},renderer:De,parser:ke,styles:Oe};export{Re as diagram};
98
+ `},"getStyles"),Oe=Te,Re={get db(){return new xe},renderer:Le,parser:Se,styles:Oe};export{Re as diagram};
@@ -0,0 +1 @@
1
+ import{g as l,r as m,d as a}from"./chunk-2E7WHVMD-ChRTmoE5.js";import{p}from"./chunk-JWPE2WC7-DGhyzwFs.js";import{_ as t,l as o}from"./DocContent-D5CLsUKq.js";import{M as u,d as c}from"./cynefin-EF2NZ3EQ-DJXHpx7E.js";var f=c().RailroadPeg.parser.LangiumParser,i=t(e=>{const r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{const r=e.elements.map(P);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),P=t(e=>{const r=g(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${s(r)}`:`!${s(r)}`}:r},"transformPrefix"),s=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),g=t(e=>{const r=v(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),v=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return i(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),y=t(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=t(e=>{p(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(y(r)))},"populateDb"),b={parse:t(e=>{a.clear(),o.debug("[PEG Parser] Starting Langium parse");const r=f.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const n=r.value;o.debug("[PEG Parser] Parsed rules:",n.rules.length),h(n),o.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}},$={parser:b,db:a,renderer:m,styles:l};export{$ as diagram};
@@ -0,0 +1,39 @@
1
+ import{p as at}from"./chunk-JWPE2WC7-DGhyzwFs.js";import{ah as T,a9 as G,bc as rt,g as nt,s as it,a as ot,b as st,t as lt,q as ct,_ as g,l as B,c as ut,N as dt,Q as gt,V as pt,d as ht,A as ft,O as mt}from"./DocContent-D5CLsUKq.js";import{p as vt}from"./cynefin-EF2NZ3EQ-DJXHpx7E.js";import{d as X}from"./arc-Btzq4ujL.js";import{o as xt}from"./ordinal-Cboi1Yqb.js";import"./init-Gi6I4Gst.js";function St(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function yt(t){return t}function wt(){var t=yt,n=St,y=null,b=T(0),l=T(G),p=T(0);function i(e){var r,s=(e=rt(e)).length,h,w,$=0,f=new Array(s),o=new Array(s),D=+b.apply(this,arguments),E=Math.min(G,Math.max(-G,l.apply(this,arguments)-D)),k,L=Math.min(Math.abs(E)/s,p.apply(this,arguments)),u=L*(E<0?-1:1),A;for(r=0;r<s;++r)(A=o[f[r]=r]=+t(e[r],r,e))>0&&($+=A);for(n!=null?f.sort(function(M,m){return n(o[M],o[m])}):y!=null&&f.sort(function(M,m){return y(e[M],e[m])}),r=0,w=$?(E-s*u)/$:0;r<s;++r,D=k)h=f[r],A=o[h],k=D+(A>0?A*w:0)+u,o[h]={data:e[h],index:r,value:A,startAngle:D,endAngle:k,padAngle:L};return o}return i.value=function(e){return arguments.length?(t=typeof e=="function"?e:T(+e),i):t},i.sortValues=function(e){return arguments.length?(n=e,y=null,i):n},i.sort=function(e){return arguments.length?(y=e,n=null,i):y},i.startAngle=function(e){return arguments.length?(b=typeof e=="function"?e:T(+e),i):b},i.endAngle=function(e){return arguments.length?(l=typeof e=="function"?e:T(+e),i):l},i.padAngle=function(e){return arguments.length?(p=typeof e=="function"?e:T(+e),i):p},i}var At=mt.pie,I={sections:new Map,showData:!1},W=I.sections,V=I.showData,Ct=structuredClone(At),$t=g(()=>structuredClone(Ct),"getConfig"),Dt=g(()=>{W=new Map,V=I.showData,ft()},"clear"),Tt=g(({label:t,value:n})=>{if(n<0)throw new Error(`"${t}" has invalid value: ${n}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);W.has(t)||(W.set(t,n),B.debug(`added new section: ${t}, with value: ${n}`))},"addSection"),bt=g(()=>W,"getSections"),kt=g(t=>{V=t},"setShowData"),zt=g(()=>V,"getShowData"),Z={getConfig:$t,clear:Dt,setDiagramTitle:ct,getDiagramTitle:lt,setAccTitle:st,getAccTitle:ot,setAccDescription:it,getAccDescription:nt,addSection:Tt,getSections:bt,setShowData:kt,getShowData:zt},Et=g((t,n)=>{at(t,n),n.setShowData(t.showData),t.sections.map(n.addSection)},"populateDb"),Mt={parse:g(async t=>{const n=await vt("pie",t);B.debug(n),Et(n,Z)},"parse")},Rt=g(t=>`
2
+ .pieCircle{
3
+ stroke: ${t.pieStrokeColor};
4
+ stroke-width : ${t.pieStrokeWidth};
5
+ opacity : ${t.pieOpacity};
6
+ }
7
+ .pieCircle.highlighted{
8
+ scale: 1.05;
9
+ opacity: 1;
10
+ }
11
+ .pieCircle.highlightedOnHover:hover{
12
+ transition-duration: 250ms;
13
+ scale: 1.05;
14
+ opacity: 1;
15
+ }
16
+ .pieOuterCircle{
17
+ stroke: ${t.pieOuterStrokeColor};
18
+ stroke-width: ${t.pieOuterStrokeWidth};
19
+ fill: none;
20
+ }
21
+ .pieTitleText {
22
+ text-anchor: middle;
23
+ font-size: ${t.pieTitleTextSize};
24
+ fill: ${t.pieTitleTextColor};
25
+ font-family: ${t.fontFamily};
26
+ }
27
+ .slice {
28
+ font-family: ${t.fontFamily};
29
+ fill: ${t.pieSectionTextColor};
30
+ font-size:${t.pieSectionTextSize};
31
+ // fill: white;
32
+ }
33
+ .legend text {
34
+ fill: ${t.pieLegendTextColor};
35
+ font-family: ${t.fontFamily};
36
+ font-size: ${t.pieLegendTextSize};
37
+ }
38
+ `,"getStyles"),Lt=Rt,Nt=g(t=>{const n=[...t.values()].reduce((l,p)=>l+p,0),y=[...t.entries()].map(([l,p])=>({label:l,value:p})).filter(l=>l.value/n*100>=1);return wt().value(l=>l.value).sort(null)(y)},"createPieArcs"),Ot=g((t,n,y,b)=>{B.debug(`rendering pie chart
39
+ `+t);const l=b.db,p=ut(),i=dt(l.getConfig(),p.pie),e=40,r=18,s=4,h=450,w=h,$=gt(n),f=$.append("g");f.attr("transform","translate("+w/2+","+h/2+")");const{themeVariables:o}=p;let[D]=pt(o.pieOuterStrokeWidth);D??=2;const E=i.legendPosition,k=i.textPosition,L=i.donutHole>0&&i.donutHole<=.9?i.donutHole:0,u=Math.min(w,h)/2-e,A=X().innerRadius(L*u).outerRadius(u),M=X().innerRadius(u*k).outerRadius(u*k),m=f.append("g");m.append("circle").attr("cx",0).attr("cy",0).attr("r",u+D/2).attr("class","pieOuterCircle");const N=l.getSections(),J=Nt(N),K=[o.pie1,o.pie2,o.pie3,o.pie4,o.pie5,o.pie6,o.pie7,o.pie8,o.pie9,o.pie10,o.pie11,o.pie12];let _=0;N.forEach(a=>{_+=a});const U=J.filter(a=>(a.data.value/_*100).toFixed(0)!=="0"),F=xt(K).domain([...N.keys()]);m.selectAll("mySlices").data(U).enter().append("path").attr("d",A).attr("fill",a=>F(a.data.label)).attr("class",a=>{let c="pieCircle";return i.highlightSlice==="hover"?c+=" highlightedOnHover":i.highlightSlice===a.data.label&&(c+=" highlighted"),c}),m.selectAll("mySlices").data(U).enter().append("text").text(a=>(a.data.value/_*100).toFixed(0)+"%").attr("transform",a=>"translate("+M.centroid(a)+")").style("text-anchor","middle").attr("class","slice");const Y=f.append("text").text(l.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText"),R=[...N.entries()].map(([a,c])=>({label:a,value:c})),C=f.selectAll(".legend").data(R).enter().append("g").attr("class","legend");C.append("rect").attr("width",r).attr("height",r).style("fill",a=>F(a.label)).style("stroke",a=>F(a.label)),C.append("text").attr("x",r+s).attr("y",r-s).text(a=>l.getShowData()?`${a.label} [${a.value}]`:a.label);const z=Math.max(...C.selectAll("text").nodes().map(a=>a?.getBoundingClientRect().width??0));let O=h,H=w+e;const d=r+s,P=R.length*d;switch(E){case"center":C.attr("transform",(a,c)=>{const v=d*R.length/2,x=-z/2-(r+s),S=c*d-v;return"translate("+x+","+S+")"});break;case"top":O+=P,C.attr("transform",(a,c)=>{const v=u,x=-z/2-(r+s),S=c*d-v;return`translate(${x}, ${S})`}),m.attr("transform",()=>`translate(0, ${P+d})`);break;case"bottom":O+=P,C.attr("transform",(a,c)=>{const v=-u-d,x=-z/2-(r+s),S=c*d-v;return"translate("+x+","+S+")"});break;case"left":H+=r+s+z,C.attr("transform",(a,c)=>{const v=d*R.length/2,x=-u-(r+s),S=c*d-v;return"translate("+x+","+S+")"}),m.attr("transform",()=>`translate(${z+r+s}, 0)`);break;default:H+=r+s+z,C.attr("transform",(a,c)=>{const v=d*R.length/2,x=12*r,S=c*d-v;return"translate("+x+","+S+")"});break}const j=Y.node()?.getBoundingClientRect().width??0,tt=w/2-j/2,et=w/2+j/2,q=Math.min(0,tt),Q=Math.max(H,et)-q;$.attr("viewBox",`${q} 0 ${Q} ${O}`),ht($,O,Q,i.useMaxWidth)},"draw"),Wt={draw:Ot},Vt={parser:Mt,db:Z,renderer:Wt,styles:Lt};export{Vt as diagram};
@@ -1 +1 @@
1
- import{b8 as _,b9 as s,ba as qe,bb as e,bc as Be,bd as We,be as Ve,bf as Ue,bg as Ge,bh as Ke,bi as Xe,bj as Ze,bk as Je,bl as D,bm as ge,bn as Qe,bo as je,bp as xe,bq as et,br as tt,bs as nt,bt as st,bu as ot,bv as at,bw as ct,bx as rt,by as lt,bz as it,bA as ut}from"./DocContent-BrY-Iro8.js";const ke={name:"calendar-days",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M8 13h.01",key:"1sbv64"}],["path",{d:"M12 13h.01",key:"y0uutt"}],["path",{d:"M16 13h.01",key:"wip0gl"}],["path",{d:"M8 17h.01",key:"p3bg7i"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M16 17h.01",key:"ql8jdd"}]]};ke.node;const dt=_(ke);const we={name:"eye-off",size:24,node:[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};we.node;const mt=_(we);const Ce={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};Ce.node;const ht=_(Ce);const Ne={name:"list",size:24,node:[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]};Ne.node;const ft=_(Ne);const Me={name:"maximize-2",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]};Me.node;const pt=_(Me);const Ee={name:"message-square-plus",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]]};Ee.node;const gt=_(Ee);const Se={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};Se.node;const xt=_(Se);function Le({limits:t,heading:r,submitLabel:o,blockedReason:i,autoFocus:j,compact:b,onSubmit:f,onCancel:g}){const[k,N]=s.useState(qe),[E,l]=s.useState(""),[u,C]=s.useState(!1),[d,M]=s.useState(null),I=s.useRef(null);s.useEffect(()=>{j&&I.current?.focus({preventScroll:!0})},[j]);const F=!u&&!i&&E.trim()!=="",h=async()=>{if(F){C(!0),M(null);try{const m=k.trim();await f(m,E),Be(m)}catch(m){M(m instanceof Error?m.message:"The comment could not be sent"),C(!1)}}},H=t.body-E.length;return e.jsxs("div",{className:`cm-composer${b?" cm-composer--compact":""}`,onKeyDown:m=>{m.key==="Escape"?(m.stopPropagation(),g()):m.key==="Enter"&&(m.ctrlKey||m.metaKey)&&(m.preventDefault(),h())},children:[r,e.jsx("input",{className:"cm-input",type:"text",value:k,maxLength:t.author,placeholder:"Your name (optional, shown unverified)",onChange:m=>N(m.target.value)}),e.jsx("textarea",{ref:I,className:"cm-input cm-textarea",value:E,maxLength:t.body,rows:b?2:3,placeholder:"Write a comment…",onChange:m=>l(m.target.value)}),(i||d)&&e.jsx("div",{className:"cm-error",children:i??d}),e.jsxs("div",{className:"cm-composer-actions",children:[e.jsx("span",{className:"cm-hint",children:H<200?`${H} characters left`:"Ctrl + Enter"}),e.jsx("button",{type:"button",className:"cm-btn cm-btn--ghost",onClick:g,disabled:u,children:"Cancel"}),e.jsx("button",{type:"button",className:"cm-btn cm-btn--primary",onClick:()=>{h()},disabled:!F,children:u?"Sending…":o})]})]})}function bt({text:t}){const r=s.useRef(null),[o,i]=s.useState(!1),[j,b]=s.useState(!1);return s.useLayoutEffect(()=>{const f=r.current;f&&!o&&b(f.scrollHeight>f.clientHeight+1)},[t,o]),e.jsxs(e.Fragment,{children:[e.jsx("div",{ref:r,className:`cm-body${o?"":" cm-body--folded"}`,children:t}),(j||o)&&e.jsx("button",{type:"button",className:"cm-link",onClick:f=>{f.stopPropagation(),i(g=>!g)},children:o?"Show less":"Read more"})]})}function be({comment:t,small:r,quote:o,treated:i}){return e.jsxs("div",{className:`cm-message${r?" cm-message--reply":""}`,children:[e.jsxs("div",{className:"cm-message-head",children:[e.jsx("span",{className:"cm-avatar","aria-hidden":!0,children:We(t.author)}),e.jsx("span",{className:"cm-author",title:Ve,children:Ue(t.author)}),i&&e.jsxs("span",{className:"cm-treated",title:"The author of the documentation has processed this comment",children:[e.jsx(Ge,{size:11}),"Treated"]}),e.jsx("span",{className:"cm-time",title:new Date(t.createdAt).toLocaleString(),children:Ke(t.createdAt)})]}),o&&e.jsxs("div",{className:"cm-quote",children:["« ",o," »"]}),e.jsx(bt,{text:t.body})]})}function yt({thread:t,limits:r,replyBlocked:o,active:i,hovered:j,onActivate:b,onHover:f,onReply:g}){const[k,N]=s.useState(!1),E=t.root.read&&t.replies.every(l=>l.read);return e.jsxs("div",{className:`cm-card${i?" cm-card--active":""}${j?" cm-card--hovered":""}${E?" cm-card--treated":""}`,onClick:b,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),children:[e.jsx(be,{comment:t.root,quote:t.root.anchor?.exact,treated:E}),t.replies.length>0&&e.jsx("div",{className:"cm-replies",children:t.replies.map(l=>e.jsx(be,{comment:l,small:!0},l.id))}),k?e.jsx("div",{onClick:l=>l.stopPropagation(),children:e.jsx(Le,{compact:!0,autoFocus:!0,limits:r,submitLabel:"Reply",blockedReason:o,onCancel:()=>N(!1),onSubmit:async(l,u)=>{await g(l,u),N(!1)}})}):o?e.jsx("div",{className:"cm-hint",children:o}):e.jsx("button",{type:"button",className:"cm-link",onClick:l=>{l.stopPropagation(),N(!0)},children:"Reply"})]})}const vt=1400,jt=1080;function ye(t){return t>=vt?"two":t>=jt?"one":"none"}const L=40,Re=20,kt=12,wt=140,ze="mcp-documentor.commentsVisible",G="__new";function Ct(){try{return localStorage.getItem(ze)!=="false"}catch{return!0}}function Nt(t){try{localStorage.setItem(ze,String(t))}catch{}}function Mt(t,r){const o=new Map;for(const i of["left","right"]){const j=[...t].filter(([,f])=>f.side===i).sort((f,g)=>f[1].anchorY-g[1].anchorY);let b=-1/0;for(const[f,g]of j){const k=Math.max(g.anchorY-Re,b);b=k+(r.get(f)??wt)+kt,o.set(f,{...g,top:k})}}return o}function Et({placed:t,marginWidth:r,tone:o}){const i=t.top+Re,j=t.side==="right"?-L:r+L/2,b=t.side==="right"?-L/2:r,f=t.side==="right"?-L/2:r+L/2,g=Math.min(t.anchorY,i);return e.jsxs(e.Fragment,{children:[e.jsx("span",{className:`cm-wire ${o}`,style:{left:j,top:t.anchorY,width:L/2}}),i!==t.anchorY&&e.jsx("span",{className:`cm-wire cm-wire--v ${o}`,style:{left:f,top:g,height:Math.abs(i-t.anchorY)}}),e.jsx("span",{className:`cm-wire ${o}`,style:{left:b,top:i,width:L/2}}),e.jsx("span",{className:`cm-wire-dot ${o}`,style:{left:t.side==="right"?-L-3:r+L-3,top:t.anchorY-3}})]})}function St({header:t,content:r,initialComments:o,initialUsed:i,closed:j,limits:b,onSelectHeading:f}){const g=o===null,[k,N]=s.useState(o??[]),[E,l]=s.useState(i),[u,C]=s.useState(Ct),[d,M]=s.useState(()=>ye(window.innerWidth)),[I,F]=s.useState(null),[h,H]=s.useState(null),[m,R]=s.useState(null),[w,T]=s.useState(null),[z,S]=s.useState(null),[Y,X]=s.useState(null),[te,ne]=s.useState(new Map),[se,Ae]=s.useState(new Map),[oe,ae]=s.useState(null),[ce,_e]=s.useState([]),[re,q]=s.useState(!1),le=s.useRef(null),x=Xe(h),Z=s.useMemo(()=>Ze(k),[k]),Ie=s.useMemo(()=>Z.map(n=>n.root),[Z]),A=Je(x,Ie),B=g?{short:"Comments unavailable",reason:"The comments of this document are unavailable."}:j?{short:"Comments are closed",reason:"Comments are closed on this document."}:E>=b.comments?{short:"Comment limit reached",reason:"This document accepts no more comments."}:null,$e=B?.reason??null;s.useEffect(()=>{const n=()=>M(ye(window.innerWidth));return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),s.useEffect(()=>{if(!h)return;const n=[...h.querySelectorAll("h1, h2, h3")];_e(n.filter(c=>c.id).map(c=>({id:c.id,text:c.textContent??"",level:Number(c.tagName.slice(1))})))},[h,x]);const W=s.useCallback(()=>{if(!h||d==="none"){ne(new Map);return}const n=h.getBoundingClientRect(),c=p=>d==="two"&&p.left+p.width/2<n.left+n.width/2?"left":"right",a=new Map,y=(p,v)=>{const $=v.getClientRects()[0]??v.getBoundingClientRect();a.set(p,{anchorY:$.top+$.height/2-n.top,side:c($)})};if(u)for(const[p,v]of A)y(p,v.range);w&&x&&y(G,x.rangeOf(w.start,w.end)),ne(a)},[h,d,u,A,w,x]);s.useLayoutEffect(W,[W]),s.useEffect(()=>{if(!h)return;const n=new ResizeObserver(()=>W());return n.observe(h),()=>n.disconnect()},[h,W]);const V=s.useMemo(()=>new ResizeObserver(n=>{Ae(c=>{let a=null;for(const y of n){const p=y.target.dataset.cardId,v=y.target.offsetHeight;c.get(p)!==v&&(a??=new Map(c),a.set(p,v))}return a??c})}),[]);s.useEffect(()=>()=>V.disconnect(),[V]);const De=s.useCallback(n=>{n&&V.observe(n)},[V]),Oe=s.useMemo(()=>Mt(te,se),[te,se]);s.useEffect(()=>{D("cm-passage",u?[...A.values()].map(a=>a.range):[]);const n=u?Y??z:null,c=n?A.get(n):void 0;D("cm-focus",c?[c.range]:[]),D("cm-pending",w&&x?[x.rangeOf(w.start,w.end)]:[])},[u,A,Y,z,w,x]),s.useEffect(()=>()=>{D("cm-passage",[]),D("cm-focus",[]),D("cm-pending",[])},[]),s.useLayoutEffect(()=>{if(!m||!x||!I){ae(null);return}const n=x.rangeOf(m.start,m.end).getBoundingClientRect(),c=I.getBoundingClientRect();ae({top:n.top-c.top-40,left:Math.max(0,n.left-c.left+n.width/2-70)})},[m,x,I,d]);const J=s.useCallback((n,c)=>{if(!x)return null;const a=ge(n,c),y=a?x.indexAt(a.node,a.offset):null;if(y===null)return null;for(const[p,v]of A)if(y>=v.start&&y<v.end)return p;return null},[x,A]);s.useEffect(()=>{if(!h||!x)return;const n=p=>{if(!u||p.target.closest("a, button, input, textarea, [data-comment-skip]"))return;const v=window.getSelection();if(v&&!v.isCollapsed&&v.rangeCount>0){const pe=v.getRangeAt(0);if(!h.contains(pe.commonAncestorContainer))return;const U=x.indicesOf(pe);R(U?{start:U[0],end:U[1]}:null),U&&S(null);return}const $=J(p.clientX,p.clientY);if($){S($),R(null);return}const Q=ge(p.clientX,p.clientY),P=Q?x.wordAt(Q.node,Q.offset):null;if(!P){R(null);return}v?.removeAllRanges(),v?.addRange(x.rangeOf(P[0],P[1])),R({start:P[0],end:P[1]}),S(null)};let c=0;const a=p=>{cancelAnimationFrame(c),c=requestAnimationFrame(()=>X(u?J(p.clientX,p.clientY):null))},y=()=>{cancelAnimationFrame(c),X(null)};return h.addEventListener("mouseup",n),h.addEventListener("mousemove",a),h.addEventListener("mouseleave",y),()=>{cancelAnimationFrame(c),h.removeEventListener("mouseup",n),h.removeEventListener("mousemove",a),h.removeEventListener("mouseleave",y)}},[h,x,u,J]),s.useEffect(()=>{const n=a=>{const y=a.target;h?.contains(y)||y.closest("[data-cm-ui]")||(R(null),S(null),q(!1))},c=a=>{a.key==="Escape"&&(R(null),S(null),q(!1))};return document.addEventListener("mousedown",n),document.addEventListener("keydown",c),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("keydown",c)}},[h]);const Te=()=>{!m||!x||B||(T({...m,anchor:x.anchorOf(m.start,m.end)}),window.getSelection()?.removeAllRanges(),R(null),S(null))},ie=n=>{const c=new Set(k.map(a=>a.id));return N(n.comments),l(n.used),n.comments.find(a=>!c.has(a.id))??null},Pe=async(n,c)=>{if(!w)return;const a=ie(await xe({anchor:w.anchor,author:n,body:c}));T(null),S(a?.id??null)},Fe=n=>async(c,a)=>{ie(await xe({parentId:n,author:c,body:a})),S(n)},He=()=>{C(n=>(Nt(!n),!n)),R(null),T(null),S(null)},Ye=w&&w.anchor.exact.length>b.quote?`The selected passage is too long (${b.quote} characters at most).`:null,ue=w&&e.jsx("div",{className:"cm-card cm-card--new",children:e.jsx(Le,{autoFocus:!0,limits:b,submitLabel:"Comment",blockedReason:Ye,heading:e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"cm-new-title",children:"New comment"}),e.jsxs("div",{className:"cm-quote",children:["« ",w.anchor.exact," »"]})]}),onCancel:()=>T(null),onSubmit:Pe})}),de=n=>{const c=Z.find(a=>a.root.id===n);return c?e.jsx(yt,{thread:c,limits:b,replyBlocked:$e,active:z===n,hovered:Y===n,onActivate:()=>S(n),onHover:a=>X(a?n:null),onReply:Fe(n)}):null},me=n=>{const c=le.current?.offsetWidth??280;return[...Oe].filter(([,a])=>a.side===n).map(([a,y])=>{const p=a===G?"cm-tone--new":Y===a||z===a?"cm-tone--focus":"";return e.jsxs("div",{"data-cm-ui":!0,children:[e.jsx(Et,{placed:y,marginWidth:c,tone:p}),e.jsx("div",{className:"cm-slot","data-card-id":a,ref:De,style:{top:y.top},children:a===G?ue:de(a)})]},a)})},he=d==="none"&&(w?ue:z?de(z):null),fe=k.length;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{ref:F,className:`cm-shell cm-shell--${d}`,children:[e.jsx("div",{className:"cm-head",children:t}),e.jsxs("div",{className:"cm-tools","data-cm-ui":!0,children:[ce.length>0&&e.jsxs("div",{className:"cm-menu",children:[e.jsxs("button",{type:"button",className:"cm-tool",onClick:()=>q(n=>!n),"aria-expanded":re,children:[e.jsx(ft,{size:14}),"Contents"]}),re&&e.jsx("nav",{className:"cm-menu-pop","aria-label":"Contents",children:ce.map(n=>e.jsx("a",{href:`#${n.id}`,className:`cm-menu-item cm-menu-item--h${n.level}`,onClick:c=>{c.preventDefault(),q(!1),f(n.id)},children:n.text},n.id))})]}),e.jsxs("button",{type:"button",className:"cm-tool",onClick:He,title:u?"Hide comments":"Show comments",children:[e.jsx(Qe,{size:14}),g?"Comments unavailable":fe===1?"1 comment":`${fe} comments`,u?e.jsx(ht,{size:14,className:"cm-tool-eye"}):e.jsx(mt,{size:14,className:"cm-tool-eye"})]})]}),d==="two"&&e.jsx("aside",{className:"cm-margin cm-margin--left",children:me("left")}),e.jsx("div",{ref:H,className:"cm-content",children:r}),d!=="none"&&e.jsx("aside",{ref:le,className:"cm-margin cm-margin--right",children:me("right")}),oe&&u&&e.jsx("div",{className:"cm-float",style:oe,"data-cm-ui":!0,children:B?e.jsx("span",{className:"cm-float-full",children:B.short}):e.jsxs("button",{type:"button",className:"cm-btn cm-btn--primary cm-float-btn",onMouseDown:n=>n.preventDefault(),onClick:Te,children:[e.jsx(gt,{size:14}),"Comment"]})})]}),he&&e.jsxs("div",{className:"cm-sheet","data-cm-ui":!0,children:[e.jsx("button",{type:"button",className:"cm-sheet-close","aria-label":"Close",onClick:()=>{T(null),S(null)},children:e.jsx(je,{size:16})}),e.jsx("div",{"data-card-id":w?G:z??"",children:he})]})]})}const ve=4,O=1.25;function Lt({src:t,alt:r,onClose:o}){const[i,j]=s.useState(1),[b,f]=s.useState(null),g=s.useRef(null),k=s.useRef(null),N=(l,u)=>{const C=g.current,d=u??{x:(C?.clientWidth??0)/2,y:(C?.clientHeight??0)/2};C&&(k.current={...d,fx:(C.scrollLeft+d.x)/C.scrollWidth,fy:(C.scrollTop+d.y)/C.scrollHeight}),j(M=>Math.min(ve,Math.max(1,l===0?1:M*l)))};s.useLayoutEffect(()=>{const l=g.current,u=k.current;!l||!u||(l.scrollLeft=u.fx*l.scrollWidth-u.x,l.scrollTop=u.fy*l.scrollHeight-u.y,k.current=null)},[i]),s.useEffect(()=>{const l=g.current;if(!l)return;const u=d=>{if(!d.ctrlKey)return;d.preventDefault();const M=l.getBoundingClientRect();N(d.deltaY<0?O:1/O,{x:d.clientX-M.left,y:d.clientY-M.top})},C=d=>{if(d.key==="Escape")return o();const M=d.key==="+"||d.key==="="?O:d.key==="-"?1/O:d.key==="0"?0:null;M!==null&&(d.preventDefault(),N(M))};return l.addEventListener("wheel",u,{passive:!1}),document.addEventListener("keydown",C),()=>{l.removeEventListener("wheel",u),document.removeEventListener("keydown",C)}},[o]);const E=b?{"--natural-width":`${b}px`,"--zoom":i}:void 0;return e.jsxs("div",{ref:g,className:"public-lightbox","data-cm-ui":!0,role:"dialog","aria-label":r||"Image",onClick:o,children:[e.jsx("img",{src:t,alt:r,style:E,onLoad:l=>f(l.currentTarget.naturalWidth)}),e.jsxs("div",{className:"public-lightbox-tools",onClick:l=>l.stopPropagation(),children:[e.jsx("button",{type:"button","aria-label":"Zoom out",disabled:i<=1,onClick:()=>N(1/O),children:e.jsx(xt,{size:16})}),e.jsxs("button",{type:"button",className:"public-lightbox-level","aria-label":"Reset zoom",onClick:()=>N(0),children:[Math.round(i*100),"%"]}),e.jsx("button",{type:"button","aria-label":"Zoom in",disabled:i>=ve,onClick:()=>N(O),children:e.jsx(tt,{size:16})}),e.jsx("button",{type:"button","aria-label":"Close",onClick:o,children:e.jsx(je,{size:16})})]})]})}function Rt({src:t,alt:r}){const[o,i]=s.useState(!1);return e.jsxs("span",{className:"public-image",children:[e.jsx("img",{src:t,alt:r,className:"doc-image"}),e.jsx("button",{type:"button",className:"public-image-zoom","aria-label":"Enlarge image",onClick:()=>i(!0),children:e.jsx(pt,{size:14})}),o&&et.createPortal(e.jsx(Lt,{src:t,alt:r,onClose:()=>i(!1)}),document.body)]})}const zt=/^\/?api\/images\/([^/?#]+)\/([^/?#]+)$/;function At(t){const r=t?zt.exec(t):null;return r?`img/${r[1]}/${r[2]}`:t}function ee(t){document.getElementById(t)?.scrollIntoView({behavior:"smooth",block:"start"})}function K(t){return function({id:o,children:i}){return e.jsxs(t,{id:o,className:"public-heading",children:[i,o&&e.jsx("a",{className:"public-anchor",href:`#${o}`,"aria-label":"Link to this section",onClick:j=>{j.preventDefault(),history.replaceState(null,"",`#${o}`),ee(o)},children:e.jsx(it,{size:14})})]})}}const _t={code:t=>e.jsx(lt,{...t,fixedLanguage:!0}),h1:K("h1"),h2:K("h2"),h3:K("h3"),h4:K("h4"),a({href:t,children:r}){return!t||t.startsWith("doc://")?e.jsx("span",{className:"public-doc-ref",children:r}):t.startsWith("#")?e.jsx("a",{href:t,onClick:o=>{o.preventDefault(),ee(decodeURIComponent(t.slice(1)))},children:r}):e.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:r})},img({src:t,alt:r}){return e.jsx(Rt,{src:At(typeof t=="string"?t:void 0),alt:r??""})}};function It({publication:t}){s.useEffect(()=>{const o=decodeURIComponent(window.location.hash.slice(1));o&&requestAnimationFrame(()=>document.getElementById(o)?.scrollIntoView({block:"start"}))},[]);const r=s.useMemo(()=>e.jsx("div",{className:"doc-content public-content",children:e.jsx(nt,{remarkPlugins:[ot],rehypePlugins:[st],components:_t,urlTransform:o=>o.startsWith("doc://")?o:at(o),children:t.content})}),[t.content]);return e.jsx("div",{className:"public-page",children:e.jsx(St,{header:e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"public-title",children:t.title}),e.jsxs("div",{className:"public-meta",children:[e.jsx(dt,{size:14}),"Published ",ct(t.publishedAt),t.version!==null&&e.jsxs(e.Fragment,{children:[" · version ",rt(t.version)]})]}),t.note&&e.jsx("div",{className:"public-note",children:t.note})]}),content:r,initialComments:t.comments,initialUsed:t.commentsUsed,closed:t.commentsClosed,limits:t.commentLimits,onSelectHeading:o=>{history.replaceState(null,"",`#${o}`),ee(o)}})})}function $t(){const t=document.getElementById("publication-data");if(!t?.textContent)throw new Error("This page carries no published document.");return JSON.parse(t.textContent)}ut.createRoot(document.getElementById("root")).render(e.jsx(s.StrictMode,{children:e.jsx(It,{publication:$t()})}));
1
+ import{bl as _,bm as s,bn as Be,bo as e,bp as qe,bq as We,br as Ve,bs as Ge,bt as Ue,bu as Ke,bv as Xe,bw as Ze,bx as Je,by as $,bz as ge,bA as Qe,bB as je,bC as xe,bD as et,bE as tt,bF as nt,bG as st,bH as ot,bI as at,bJ as ct,bK as rt,bL as lt,bM as it,bN as ut}from"./DocContent-D5CLsUKq.js";const ke={name:"calendar-days",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M8 13h.01",key:"1sbv64"}],["path",{d:"M12 13h.01",key:"y0uutt"}],["path",{d:"M16 13h.01",key:"wip0gl"}],["path",{d:"M8 17h.01",key:"p3bg7i"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M16 17h.01",key:"ql8jdd"}]]};ke.node;const dt=_(ke);const we={name:"eye-off",size:24,node:[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};we.node;const mt=_(we);const Ce={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};Ce.node;const ht=_(Ce);const Ne={name:"list",size:24,node:[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]};Ne.node;const ft=_(Ne);const Me={name:"maximize-2",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]};Me.node;const pt=_(Me);const Ee={name:"message-square-plus",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]]};Ee.node;const gt=_(Ee);const Se={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};Se.node;const xt=_(Se);function Le({limits:t,heading:r,submitLabel:o,blockedReason:i,autoFocus:j,compact:b,onSubmit:f,onCancel:g}){const[k,N]=s.useState(Be),[E,l]=s.useState(""),[u,C]=s.useState(!1),[d,M]=s.useState(null),I=s.useRef(null);s.useEffect(()=>{j&&I.current?.focus({preventScroll:!0})},[j]);const F=!u&&!i&&E.trim()!=="",h=async()=>{if(F){C(!0),M(null);try{const m=k.trim();await f(m,E),qe(m)}catch(m){M(m instanceof Error?m.message:"The comment could not be sent"),C(!1)}}},H=t.body-E.length;return e.jsxs("div",{className:`cm-composer${b?" cm-composer--compact":""}`,onKeyDown:m=>{m.key==="Escape"?(m.stopPropagation(),g()):m.key==="Enter"&&(m.ctrlKey||m.metaKey)&&(m.preventDefault(),h())},children:[r,e.jsx("input",{className:"cm-input",type:"text",value:k,maxLength:t.author,placeholder:"Your name (optional, shown unverified)",onChange:m=>N(m.target.value)}),e.jsx("textarea",{ref:I,className:"cm-input cm-textarea",value:E,maxLength:t.body,rows:b?2:3,placeholder:"Write a comment…",onChange:m=>l(m.target.value)}),(i||d)&&e.jsx("div",{className:"cm-error",children:i??d}),e.jsxs("div",{className:"cm-composer-actions",children:[e.jsx("span",{className:"cm-hint",children:H<200?`${H} characters left`:"Ctrl + Enter"}),e.jsx("button",{type:"button",className:"cm-btn cm-btn--ghost",onClick:g,disabled:u,children:"Cancel"}),e.jsx("button",{type:"button",className:"cm-btn cm-btn--primary",onClick:()=>{h()},disabled:!F,children:u?"Sending…":o})]})]})}function bt({text:t}){const r=s.useRef(null),[o,i]=s.useState(!1),[j,b]=s.useState(!1);return s.useLayoutEffect(()=>{const f=r.current;f&&!o&&b(f.scrollHeight>f.clientHeight+1)},[t,o]),e.jsxs(e.Fragment,{children:[e.jsx("div",{ref:r,className:`cm-body${o?"":" cm-body--folded"}`,children:t}),(j||o)&&e.jsx("button",{type:"button",className:"cm-link",onClick:f=>{f.stopPropagation(),i(g=>!g)},children:o?"Show less":"Read more"})]})}function be({comment:t,small:r,quote:o,treated:i}){return e.jsxs("div",{className:`cm-message${r?" cm-message--reply":""}`,children:[e.jsxs("div",{className:"cm-message-head",children:[e.jsx("span",{className:"cm-avatar","aria-hidden":!0,children:We(t.author)}),e.jsx("span",{className:"cm-author",title:Ve,children:Ge(t.author)}),i&&e.jsxs("span",{className:"cm-treated",title:"The author of the documentation has processed this comment",children:[e.jsx(Ue,{size:11}),"Treated"]}),e.jsx("span",{className:"cm-time",title:new Date(t.createdAt).toLocaleString(),children:Ke(t.createdAt)})]}),o&&e.jsxs("div",{className:"cm-quote",children:["« ",o," »"]}),e.jsx(bt,{text:t.body})]})}function yt({thread:t,limits:r,replyBlocked:o,active:i,hovered:j,onActivate:b,onHover:f,onReply:g}){const[k,N]=s.useState(!1),E=t.root.read&&t.replies.every(l=>l.read);return e.jsxs("div",{className:`cm-card${i?" cm-card--active":""}${j?" cm-card--hovered":""}${E?" cm-card--treated":""}`,onClick:b,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),children:[e.jsx(be,{comment:t.root,quote:t.root.anchor?.exact,treated:E}),t.replies.length>0&&e.jsx("div",{className:"cm-replies",children:t.replies.map(l=>e.jsx(be,{comment:l,small:!0},l.id))}),k?e.jsx("div",{onClick:l=>l.stopPropagation(),children:e.jsx(Le,{compact:!0,autoFocus:!0,limits:r,submitLabel:"Reply",blockedReason:o,onCancel:()=>N(!1),onSubmit:async(l,u)=>{await g(l,u),N(!1)}})}):o?e.jsx("div",{className:"cm-hint",children:o}):e.jsx("button",{type:"button",className:"cm-link",onClick:l=>{l.stopPropagation(),N(!0)},children:"Reply"})]})}const vt=1400,jt=1080;function ye(t){return t>=vt?"two":t>=jt?"one":"none"}const L=40,Re=20,kt=12,wt=140,ze="mcp-documentor.commentsVisible",U="__new";function Ct(){try{return localStorage.getItem(ze)!=="false"}catch{return!0}}function Nt(t){try{localStorage.setItem(ze,String(t))}catch{}}function Mt(t,r){const o=new Map;for(const i of["left","right"]){const j=[...t].filter(([,f])=>f.side===i).sort((f,g)=>f[1].anchorY-g[1].anchorY);let b=-1/0;for(const[f,g]of j){const k=Math.max(g.anchorY-Re,b);b=k+(r.get(f)??wt)+kt,o.set(f,{...g,top:k})}}return o}function Et({placed:t,marginWidth:r,tone:o}){const i=t.top+Re,j=t.side==="right"?-L:r+L/2,b=t.side==="right"?-L/2:r,f=t.side==="right"?-L/2:r+L/2,g=Math.min(t.anchorY,i);return e.jsxs(e.Fragment,{children:[e.jsx("span",{className:`cm-wire ${o}`,style:{left:j,top:t.anchorY,width:L/2}}),i!==t.anchorY&&e.jsx("span",{className:`cm-wire cm-wire--v ${o}`,style:{left:f,top:g,height:Math.abs(i-t.anchorY)}}),e.jsx("span",{className:`cm-wire ${o}`,style:{left:b,top:i,width:L/2}}),e.jsx("span",{className:`cm-wire-dot ${o}`,style:{left:t.side==="right"?-L-3:r+L-3,top:t.anchorY-3}})]})}function St({header:t,content:r,initialComments:o,initialUsed:i,closed:j,limits:b,onSelectHeading:f}){const g=o===null,[k,N]=s.useState(o??[]),[E,l]=s.useState(i),[u,C]=s.useState(Ct),[d,M]=s.useState(()=>ye(window.innerWidth)),[I,F]=s.useState(null),[h,H]=s.useState(null),[m,R]=s.useState(null),[w,T]=s.useState(null),[z,S]=s.useState(null),[Y,X]=s.useState(null),[te,ne]=s.useState(new Map),[se,Ae]=s.useState(new Map),[oe,ae]=s.useState(null),[ce,_e]=s.useState([]),[re,B]=s.useState(!1),le=s.useRef(null),x=Xe(h),Z=s.useMemo(()=>Ze(k),[k]),Ie=s.useMemo(()=>Z.map(n=>n.root),[Z]),A=Je(x,Ie),q=g?{short:"Comments unavailable",reason:"The comments of this document are unavailable."}:j?{short:"Comments are closed",reason:"Comments are closed on this document."}:E>=b.comments?{short:"Comment limit reached",reason:"This document accepts no more comments."}:null,De=q?.reason??null;s.useEffect(()=>{const n=()=>M(ye(window.innerWidth));return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),s.useEffect(()=>{if(!h)return;const n=[...h.querySelectorAll("h1, h2, h3")];_e(n.filter(c=>c.id).map(c=>({id:c.id,text:c.textContent??"",level:Number(c.tagName.slice(1))})))},[h,x]);const W=s.useCallback(()=>{if(!h||d==="none"){ne(new Map);return}const n=h.getBoundingClientRect(),c=p=>d==="two"&&p.left+p.width/2<n.left+n.width/2?"left":"right",a=new Map,y=(p,v)=>{const D=v.getClientRects()[0]??v.getBoundingClientRect();a.set(p,{anchorY:D.top+D.height/2-n.top,side:c(D)})};if(u)for(const[p,v]of A)y(p,v.range);w&&x&&y(U,x.rangeOf(w.start,w.end)),ne(a)},[h,d,u,A,w,x]);s.useLayoutEffect(W,[W]),s.useEffect(()=>{if(!h)return;const n=new ResizeObserver(()=>W());return n.observe(h),()=>n.disconnect()},[h,W]);const V=s.useMemo(()=>new ResizeObserver(n=>{Ae(c=>{let a=null;for(const y of n){const p=y.target.dataset.cardId,v=y.target.offsetHeight;c.get(p)!==v&&(a??=new Map(c),a.set(p,v))}return a??c})}),[]);s.useEffect(()=>()=>V.disconnect(),[V]);const $e=s.useCallback(n=>{n&&V.observe(n)},[V]),Oe=s.useMemo(()=>Mt(te,se),[te,se]);s.useEffect(()=>{$("cm-passage",u?[...A.values()].map(a=>a.range):[]);const n=u?Y??z:null,c=n?A.get(n):void 0;$("cm-focus",c?[c.range]:[]),$("cm-pending",w&&x?[x.rangeOf(w.start,w.end)]:[])},[u,A,Y,z,w,x]),s.useEffect(()=>()=>{$("cm-passage",[]),$("cm-focus",[]),$("cm-pending",[])},[]),s.useLayoutEffect(()=>{if(!m||!x||!I){ae(null);return}const n=x.rangeOf(m.start,m.end).getBoundingClientRect(),c=I.getBoundingClientRect();ae({top:n.top-c.top-40,left:Math.max(0,n.left-c.left+n.width/2-70)})},[m,x,I,d]);const J=s.useCallback((n,c)=>{if(!x)return null;const a=ge(n,c),y=a?x.indexAt(a.node,a.offset):null;if(y===null)return null;for(const[p,v]of A)if(y>=v.start&&y<v.end)return p;return null},[x,A]);s.useEffect(()=>{if(!h||!x)return;const n=p=>{if(!u||p.target.closest("a, button, input, textarea, [data-comment-skip]"))return;const v=window.getSelection();if(v&&!v.isCollapsed&&v.rangeCount>0){const pe=v.getRangeAt(0);if(!h.contains(pe.commonAncestorContainer))return;const G=x.indicesOf(pe);R(G?{start:G[0],end:G[1]}:null),G&&S(null);return}const D=J(p.clientX,p.clientY);if(D){S(D),R(null);return}const Q=ge(p.clientX,p.clientY),P=Q?x.wordAt(Q.node,Q.offset):null;if(!P){R(null);return}v?.removeAllRanges(),v?.addRange(x.rangeOf(P[0],P[1])),R({start:P[0],end:P[1]}),S(null)};let c=0;const a=p=>{cancelAnimationFrame(c),c=requestAnimationFrame(()=>X(u?J(p.clientX,p.clientY):null))},y=()=>{cancelAnimationFrame(c),X(null)};return h.addEventListener("mouseup",n),h.addEventListener("mousemove",a),h.addEventListener("mouseleave",y),()=>{cancelAnimationFrame(c),h.removeEventListener("mouseup",n),h.removeEventListener("mousemove",a),h.removeEventListener("mouseleave",y)}},[h,x,u,J]),s.useEffect(()=>{const n=a=>{const y=a.target;h?.contains(y)||y.closest("[data-cm-ui]")||(R(null),S(null),B(!1))},c=a=>{a.key==="Escape"&&(R(null),S(null),B(!1))};return document.addEventListener("mousedown",n),document.addEventListener("keydown",c),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("keydown",c)}},[h]);const Te=()=>{!m||!x||q||(T({...m,anchor:x.anchorOf(m.start,m.end)}),window.getSelection()?.removeAllRanges(),R(null),S(null))},ie=n=>{const c=new Set(k.map(a=>a.id));return N(n.comments),l(n.used),n.comments.find(a=>!c.has(a.id))??null},Pe=async(n,c)=>{if(!w)return;const a=ie(await xe({anchor:w.anchor,author:n,body:c}));T(null),S(a?.id??null)},Fe=n=>async(c,a)=>{ie(await xe({parentId:n,author:c,body:a})),S(n)},He=()=>{C(n=>(Nt(!n),!n)),R(null),T(null),S(null)},Ye=w&&w.anchor.exact.length>b.quote?`The selected passage is too long (${b.quote} characters at most).`:null,ue=w&&e.jsx("div",{className:"cm-card cm-card--new",children:e.jsx(Le,{autoFocus:!0,limits:b,submitLabel:"Comment",blockedReason:Ye,heading:e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"cm-new-title",children:"New comment"}),e.jsxs("div",{className:"cm-quote",children:["« ",w.anchor.exact," »"]})]}),onCancel:()=>T(null),onSubmit:Pe})}),de=n=>{const c=Z.find(a=>a.root.id===n);return c?e.jsx(yt,{thread:c,limits:b,replyBlocked:De,active:z===n,hovered:Y===n,onActivate:()=>S(n),onHover:a=>X(a?n:null),onReply:Fe(n)}):null},me=n=>{const c=le.current?.offsetWidth??280;return[...Oe].filter(([,a])=>a.side===n).map(([a,y])=>{const p=a===U?"cm-tone--new":Y===a||z===a?"cm-tone--focus":"";return e.jsxs("div",{"data-cm-ui":!0,children:[e.jsx(Et,{placed:y,marginWidth:c,tone:p}),e.jsx("div",{className:"cm-slot","data-card-id":a,ref:$e,style:{top:y.top},children:a===U?ue:de(a)})]},a)})},he=d==="none"&&(w?ue:z?de(z):null),fe=k.length;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{ref:F,className:`cm-shell cm-shell--${d}`,children:[e.jsx("div",{className:"cm-head",children:t}),e.jsxs("div",{className:"cm-tools","data-cm-ui":!0,children:[ce.length>0&&e.jsxs("div",{className:"cm-menu",children:[e.jsxs("button",{type:"button",className:"cm-tool",onClick:()=>B(n=>!n),"aria-expanded":re,children:[e.jsx(ft,{size:14}),"Contents"]}),re&&e.jsx("nav",{className:"cm-menu-pop","aria-label":"Contents",children:ce.map(n=>e.jsx("a",{href:`#${n.id}`,className:`cm-menu-item cm-menu-item--h${n.level}`,onClick:c=>{c.preventDefault(),B(!1),f(n.id)},children:n.text},n.id))})]}),e.jsxs("button",{type:"button",className:"cm-tool",onClick:He,title:u?"Hide comments":"Show comments",children:[e.jsx(Qe,{size:14}),g?"Comments unavailable":fe===1?"1 comment":`${fe} comments`,u?e.jsx(ht,{size:14,className:"cm-tool-eye"}):e.jsx(mt,{size:14,className:"cm-tool-eye"})]})]}),d==="two"&&e.jsx("aside",{className:"cm-margin cm-margin--left",children:me("left")}),e.jsx("div",{ref:H,className:"cm-content",children:r}),d!=="none"&&e.jsx("aside",{ref:le,className:"cm-margin cm-margin--right",children:me("right")}),oe&&u&&e.jsx("div",{className:"cm-float",style:oe,"data-cm-ui":!0,children:q?e.jsx("span",{className:"cm-float-full",children:q.short}):e.jsxs("button",{type:"button",className:"cm-btn cm-btn--primary cm-float-btn",onMouseDown:n=>n.preventDefault(),onClick:Te,children:[e.jsx(gt,{size:14}),"Comment"]})})]}),he&&e.jsxs("div",{className:"cm-sheet","data-cm-ui":!0,children:[e.jsx("button",{type:"button",className:"cm-sheet-close","aria-label":"Close",onClick:()=>{T(null),S(null)},children:e.jsx(je,{size:16})}),e.jsx("div",{"data-card-id":w?U:z??"",children:he})]})]})}const ve=4,O=1.25;function Lt({src:t,alt:r,onClose:o}){const[i,j]=s.useState(1),[b,f]=s.useState(null),g=s.useRef(null),k=s.useRef(null),N=(l,u)=>{const C=g.current,d=u??{x:(C?.clientWidth??0)/2,y:(C?.clientHeight??0)/2};C&&(k.current={...d,fx:(C.scrollLeft+d.x)/C.scrollWidth,fy:(C.scrollTop+d.y)/C.scrollHeight}),j(M=>Math.min(ve,Math.max(1,l===0?1:M*l)))};s.useLayoutEffect(()=>{const l=g.current,u=k.current;!l||!u||(l.scrollLeft=u.fx*l.scrollWidth-u.x,l.scrollTop=u.fy*l.scrollHeight-u.y,k.current=null)},[i]),s.useEffect(()=>{const l=g.current;if(!l)return;const u=d=>{if(!d.ctrlKey)return;d.preventDefault();const M=l.getBoundingClientRect();N(d.deltaY<0?O:1/O,{x:d.clientX-M.left,y:d.clientY-M.top})},C=d=>{if(d.key==="Escape")return o();const M=d.key==="+"||d.key==="="?O:d.key==="-"?1/O:d.key==="0"?0:null;M!==null&&(d.preventDefault(),N(M))};return l.addEventListener("wheel",u,{passive:!1}),document.addEventListener("keydown",C),()=>{l.removeEventListener("wheel",u),document.removeEventListener("keydown",C)}},[o]);const E=b?{"--natural-width":`${b}px`,"--zoom":i}:void 0;return e.jsxs("div",{ref:g,className:"public-lightbox","data-cm-ui":!0,role:"dialog","aria-label":r||"Image",onClick:o,children:[e.jsx("img",{src:t,alt:r,style:E,onLoad:l=>f(l.currentTarget.naturalWidth)}),e.jsxs("div",{className:"public-lightbox-tools",onClick:l=>l.stopPropagation(),children:[e.jsx("button",{type:"button","aria-label":"Zoom out",disabled:i<=1,onClick:()=>N(1/O),children:e.jsx(xt,{size:16})}),e.jsxs("button",{type:"button",className:"public-lightbox-level","aria-label":"Reset zoom",onClick:()=>N(0),children:[Math.round(i*100),"%"]}),e.jsx("button",{type:"button","aria-label":"Zoom in",disabled:i>=ve,onClick:()=>N(O),children:e.jsx(tt,{size:16})}),e.jsx("button",{type:"button","aria-label":"Close",onClick:o,children:e.jsx(je,{size:16})})]})]})}function Rt({src:t,alt:r}){const[o,i]=s.useState(!1);return e.jsxs("span",{className:"public-image",children:[e.jsx("img",{src:t,alt:r,className:"doc-image"}),e.jsx("button",{type:"button",className:"public-image-zoom","aria-label":"Enlarge image",onClick:()=>i(!0),children:e.jsx(pt,{size:14})}),o&&et.createPortal(e.jsx(Lt,{src:t,alt:r,onClose:()=>i(!1)}),document.body)]})}const zt=/^\/?api\/images\/([^/?#]+)\/([^/?#]+)$/;function At(t){const r=t?zt.exec(t):null;return r?`img/${r[1]}/${r[2]}`:t}function ee(t){document.getElementById(t)?.scrollIntoView({behavior:"smooth",block:"start"})}function K(t){return function({id:o,children:i}){return e.jsxs(t,{id:o,className:"public-heading",children:[i,o&&e.jsx("a",{className:"public-anchor",href:`#${o}`,"aria-label":"Link to this section",onClick:j=>{j.preventDefault(),history.replaceState(null,"",`#${o}`),ee(o)},children:e.jsx(it,{size:14})})]})}}const _t={code:t=>e.jsx(lt,{...t,fixedLanguage:!0}),h1:K("h1"),h2:K("h2"),h3:K("h3"),h4:K("h4"),a({href:t,children:r}){return!t||t.startsWith("doc://")?e.jsx("span",{className:"public-doc-ref",children:r}):t.startsWith("#")?e.jsx("a",{href:t,onClick:o=>{o.preventDefault(),ee(decodeURIComponent(t.slice(1)))},children:r}):e.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:r})},img({src:t,alt:r}){return e.jsx(Rt,{src:At(typeof t=="string"?t:void 0),alt:r??""})}};function It({publication:t}){s.useEffect(()=>{const o=decodeURIComponent(window.location.hash.slice(1));o&&requestAnimationFrame(()=>document.getElementById(o)?.scrollIntoView({block:"start"}))},[]);const r=s.useMemo(()=>e.jsx("div",{className:"doc-content public-content",children:e.jsx(nt,{remarkPlugins:[ot],rehypePlugins:[st],components:_t,urlTransform:o=>o.startsWith("doc://")?o:at(o),children:t.content})}),[t.content]);return e.jsx("div",{className:"public-page",children:e.jsx(St,{header:e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"public-title",children:t.title}),e.jsxs("div",{className:"public-meta",children:[e.jsx(dt,{size:14}),"Published ",ct(t.publishedAt),t.version!==null&&e.jsxs(e.Fragment,{children:[" · version ",rt(t.version)]})]}),t.note&&e.jsx("div",{className:"public-note",children:t.note})]}),content:r,initialComments:t.comments,initialUsed:t.commentsUsed,closed:t.commentsClosed,limits:t.commentLimits,onSelectHeading:o=>{history.replaceState(null,"",`#${o}`),ee(o)}})})}function Dt(){const t=document.getElementById("publication-data");if(!t?.textContent)throw new Error("This page carries no published document.");return JSON.parse(t.textContent)}ut.createRoot(document.getElementById("root")).render(e.jsx(s.StrictMode,{children:e.jsx(It,{publication:Dt()})}));
@@ -1,7 +1,7 @@
1
- import{s as Ae,g as ke,q as ae,p as Fe,a as Pe,b as ve,_ as o,c as zt,l as bt,d as Lt,e as Ce,z as Le,G as z,i as Ee,K as De}from"./DocContent-BrY-Iro8.js";import{l as ie}from"./linear-BdCinjhz.js";import"./init-Gi6I4Gst.js";import"./defaultLocale-DX6XiGOO.js";var Et=(function(){var t=o(function(Y,r,l,x){for(l=l||{},x=Y.length;x--;l[Y[x]]=r);return l},"o"),n=[1,3],f=[1,4],d=[1,5],h=[1,6],p=[1,7],y=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],_=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],a=[55,56,57],k=[2,36],u=[1,37],T=[1,36],q=[1,38],m=[1,35],b=[1,43],g=[1,41],A=[1,45],ht=[1,14],xt=[1,23],ft=[1,18],gt=[1,19],ct=[1,20],_t=[1,21],dt=[1,22],i=[1,24],Vt=[1,25],It=[1,26],wt=[1,27],Bt=[1,28],Rt=[1,29],U=[1,32],Q=[1,33],F=[1,34],P=[1,39],v=[1,40],C=[1,42],L=[1,44],H=[1,63],X=[1,62],E=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Nt=[1,66],Wt=[1,67],Ut=[1,68],Qt=[1,69],Ot=[1,70],Ht=[1,71],Xt=[1,72],Mt=[1,73],Yt=[1,74],jt=[1,75],Gt=[1,76],Kt=[1,77],w=[4,5,6,7,8,9,10,11,12,13,14,15,18],K=[1,91],Z=[1,92],J=[1,93],$=[1,100],tt=[1,94],et=[1,97],it=[1,95],at=[1,96],nt=[1,98],st=[1,99],At=[1,103],Zt=[10,55,56,57],N=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],kt={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:o(function(r,l,x,c,S,e,ut){var s=e.length-1;switch(S){case 23:this.$=e[s];break;case 24:this.$=e[s-1]+""+e[s];break;case 26:this.$=e[s-1]+e[s];break;case 27:this.$=[e[s].trim()];break;case 28:e[s-2].push(e[s].trim()),this.$=e[s-2];break;case 29:this.$=e[s-4],c.addClass(e[s-2],e[s]);break;case 37:this.$=[];break;case 42:this.$=e[s].trim(),c.setDiagramTitle(this.$);break;case 43:this.$=e[s].trim(),c.setAccTitle(this.$);break;case 44:case 45:this.$=e[s].trim(),c.setAccDescription(this.$);break;case 46:c.addSection(e[s].substr(8)),this.$=e[s].substr(8);break;case 47:c.addPoint(e[s-3],"",e[s-1],e[s],[]);break;case 48:c.addPoint(e[s-4],e[s-3],e[s-1],e[s],[]);break;case 49:c.addPoint(e[s-4],"",e[s-2],e[s-1],e[s]);break;case 50:c.addPoint(e[s-5],e[s-4],e[s-2],e[s-1],e[s]);break;case 51:c.setXAxisLeftText(e[s-2]),c.setXAxisRightText(e[s]);break;case 52:e[s-1].text+=" ⟶ ",c.setXAxisLeftText(e[s-1]);break;case 53:c.setXAxisLeftText(e[s]);break;case 54:c.setYAxisBottomText(e[s-2]),c.setYAxisTopText(e[s]);break;case 55:e[s-1].text+=" ⟶ ",c.setYAxisBottomText(e[s-1]);break;case 56:c.setYAxisBottomText(e[s]);break;case 57:c.setQuadrant1Text(e[s]);break;case 58:c.setQuadrant2Text(e[s]);break;case 59:c.setQuadrant3Text(e[s]);break;case 60:c.setQuadrant4Text(e[s]);break;case 64:this.$={text:e[s],type:"text"};break;case 65:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 66:this.$={text:e[s],type:"text"};break;case 67:this.$={text:e[s],type:"markdown"};break;case 68:this.$=e[s];break;case 69:this.$=e[s-1]+""+e[s];break}},"anonymous"),table:[{18:n,26:1,27:2,28:f,55:d,56:h,57:p},{1:[3]},{18:n,26:8,27:2,28:f,55:d,56:h,57:p},{18:n,26:9,27:2,28:f,55:d,56:h,57:p},t(y,[2,33],{29:10}),t(_,[2,61]),t(_,[2,62]),t(_,[2,63]),{1:[2,30]},{1:[2,31]},t(a,k,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:u,5:T,10:q,12:m,13:b,14:g,15:A,18:ht,25:xt,35:ft,37:gt,39:ct,41:_t,42:dt,48:i,50:Vt,51:It,52:wt,53:Bt,54:Rt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(y,[2,34]),{27:46,55:d,56:h,57:p},t(a,[2,37]),t(a,k,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:u,5:T,10:q,12:m,13:b,14:g,15:A,18:ht,25:xt,35:ft,37:gt,39:ct,41:_t,42:dt,48:i,50:Vt,51:It,52:wt,53:Bt,54:Rt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(a,[2,39]),t(a,[2,40]),t(a,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(a,[2,45]),t(a,[2,46]),{18:[1,51]},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:52,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:53,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:54,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:55,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:56,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:57,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,8:H,10:q,12:m,13:b,14:g,15:A,18:X,44:[1,58],47:[1,59],58:61,59:60,63:F,64:P,65:v,66:C,67:L},t(E,[2,64]),t(E,[2,66]),t(E,[2,67]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(E,[2,74]),t(E,[2,75]),t(E,[2,76]),t(E,[2,77]),t(E,[2,78]),t(E,[2,79]),t(E,[2,80]),t(E,[2,81]),t(y,[2,35]),t(a,[2,38]),t(a,[2,42]),t(a,[2,43]),t(a,[2,44]),{3:65,4:Nt,5:Wt,6:Ut,7:Qt,8:Ot,9:Ht,10:Xt,11:Mt,12:Yt,13:jt,14:Gt,15:Kt,21:64},t(a,[2,53],{59:60,58:61,4:u,5:T,8:H,10:q,12:m,13:b,14:g,15:A,18:X,49:[1,78],63:F,64:P,65:v,66:C,67:L}),t(a,[2,56],{59:60,58:61,4:u,5:T,8:H,10:q,12:m,13:b,14:g,15:A,18:X,49:[1,79],63:F,64:P,65:v,66:C,67:L}),t(a,[2,57],{59:60,58:61,4:u,5:T,8:H,10:q,12:m,13:b,14:g,15:A,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,58],{59:60,58:61,4:u,5:T,8:H,10:q,12:m,13:b,14:g,15:A,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,59],{59:60,58:61,4:u,5:T,8:H,10:q,12:m,13:b,14:g,15:A,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,60],{59:60,58:61,4:u,5:T,8:H,10:q,12:m,13:b,14:g,15:A,18:X,63:F,64:P,65:v,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(E,[2,65]),t(E,[2,82]),t(E,[2,83]),t(E,[2,84]),{3:83,4:Nt,5:Wt,6:Ut,7:Qt,8:Ot,9:Ht,10:Xt,11:Mt,12:Yt,13:jt,14:Gt,15:Kt,18:[1,82]},t(w,[2,23]),t(w,[2,1]),t(w,[2,2]),t(w,[2,3]),t(w,[2,4]),t(w,[2,5]),t(w,[2,6]),t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12]),t(a,[2,52],{58:31,43:84,4:u,5:T,10:q,12:m,13:b,14:g,15:A,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(a,[2,55],{58:31,43:85,4:u,5:T,10:q,12:m,13:b,14:g,15:A,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:89,23:88},t(w,[2,24]),t(a,[2,51],{59:60,58:61,4:u,5:T,8:H,10:q,12:m,13:b,14:g,15:A,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,54],{59:60,58:61,4:u,5:T,8:H,10:q,12:m,13:b,14:g,15:A,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,47],{22:89,16:90,23:101,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{46:[1,102]},t(a,[2,29],{10:At}),t(Zt,[2,27],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),t(N,[2,25]),t(N,[2,13]),t(N,[2,14]),t(N,[2,15]),t(N,[2,16]),t(N,[2,17]),t(N,[2,18]),t(N,[2,19]),t(N,[2,20]),t(N,[2,21]),t(N,[2,22]),t(a,[2,49],{10:At}),t(a,[2,48],{22:89,16:90,23:105,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:106},t(N,[2,26]),t(a,[2,50],{10:At}),t(Zt,[2,28],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st})],defaultActions:{8:[2,30],9:[2,31]},parseError:o(function(r,l){if(l.recoverable)this.trace(r);else{var x=new Error(r);throw x.hash=l,x}},"parseError"),parse:o(function(r){var l=this,x=[0],c=[],S=[null],e=[],ut=this.table,s="",yt=0,Jt=0,me=2,$t=1,be=e.slice.call(arguments,1),D=Object.create(this.lexer),j={yy:{}};for(var Ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ft)&&(j.yy[Ft]=this.yy[Ft]);D.setInput(r,j.yy),j.yy.lexer=D,j.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Pt=D.yylloc;e.push(Pt);var Se=D.options&&D.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _e(R){x.length=x.length-2*R,S.length=S.length-R,e.length=e.length-R}o(_e,"popStack");function te(){var R;return R=c.pop()||D.lex()||$t,typeof R!="number"&&(R instanceof Array&&(c=R,R=c.pop()),R=l.symbols_[R]||R),R}o(te,"lex");for(var B,G,W,vt,rt={},Tt,M,ee,qt;;){if(G=x[x.length-1],this.defaultActions[G]?W=this.defaultActions[G]:((B===null||typeof B>"u")&&(B=te()),W=ut[G]&&ut[G][B]),typeof W>"u"||!W.length||!W[0]){var Ct="";qt=[];for(Tt in ut[G])this.terminals_[Tt]&&Tt>me&&qt.push("'"+this.terminals_[Tt]+"'");D.showPosition?Ct="Parse error on line "+(yt+1)+`:
1
+ import{s as Ae,g as ke,t as ae,q as Fe,a as Pe,b as ve,_ as o,c as zt,l as bt,k as Lt,d as Ce,A as Le,O as z,j as Ee,R as De}from"./DocContent-D5CLsUKq.js";import{l as ie}from"./linear-DNC-wMVK.js";import"./init-Gi6I4Gst.js";import"./defaultLocale-DX6XiGOO.js";var Et=(function(){var t=o(function(Y,r,l,x){for(l=l||{},x=Y.length;x--;l[Y[x]]=r);return l},"o"),n=[1,3],f=[1,4],d=[1,5],h=[1,6],p=[1,7],y=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],_=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],a=[55,56,57],k=[2,36],u=[1,37],T=[1,36],q=[1,38],m=[1,35],b=[1,43],g=[1,41],A=[1,45],ht=[1,14],xt=[1,23],ft=[1,18],gt=[1,19],ct=[1,20],_t=[1,21],dt=[1,22],i=[1,24],Vt=[1,25],It=[1,26],wt=[1,27],Rt=[1,28],Bt=[1,29],U=[1,32],Q=[1,33],F=[1,34],P=[1,39],v=[1,40],C=[1,42],L=[1,44],H=[1,63],X=[1,62],E=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Nt=[1,66],Wt=[1,67],Ut=[1,68],Qt=[1,69],Ot=[1,70],Ht=[1,71],Xt=[1,72],Mt=[1,73],Yt=[1,74],jt=[1,75],Gt=[1,76],Kt=[1,77],w=[4,5,6,7,8,9,10,11,12,13,14,15,18],K=[1,91],Z=[1,92],J=[1,93],$=[1,100],tt=[1,94],et=[1,97],it=[1,95],at=[1,96],nt=[1,98],st=[1,99],At=[1,103],Zt=[10,55,56,57],N=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],kt={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:o(function(r,l,x,c,S,e,ut){var s=e.length-1;switch(S){case 23:this.$=e[s];break;case 24:this.$=e[s-1]+""+e[s];break;case 26:this.$=e[s-1]+e[s];break;case 27:this.$=[e[s].trim()];break;case 28:e[s-2].push(e[s].trim()),this.$=e[s-2];break;case 29:this.$=e[s-4],c.addClass(e[s-2],e[s]);break;case 37:this.$=[];break;case 42:this.$=e[s].trim(),c.setDiagramTitle(this.$);break;case 43:this.$=e[s].trim(),c.setAccTitle(this.$);break;case 44:case 45:this.$=e[s].trim(),c.setAccDescription(this.$);break;case 46:c.addSection(e[s].substr(8)),this.$=e[s].substr(8);break;case 47:c.addPoint(e[s-3],"",e[s-1],e[s],[]);break;case 48:c.addPoint(e[s-4],e[s-3],e[s-1],e[s],[]);break;case 49:c.addPoint(e[s-4],"",e[s-2],e[s-1],e[s]);break;case 50:c.addPoint(e[s-5],e[s-4],e[s-2],e[s-1],e[s]);break;case 51:c.setXAxisLeftText(e[s-2]),c.setXAxisRightText(e[s]);break;case 52:e[s-1].text+=" ⟶ ",c.setXAxisLeftText(e[s-1]);break;case 53:c.setXAxisLeftText(e[s]);break;case 54:c.setYAxisBottomText(e[s-2]),c.setYAxisTopText(e[s]);break;case 55:e[s-1].text+=" ⟶ ",c.setYAxisBottomText(e[s-1]);break;case 56:c.setYAxisBottomText(e[s]);break;case 57:c.setQuadrant1Text(e[s]);break;case 58:c.setQuadrant2Text(e[s]);break;case 59:c.setQuadrant3Text(e[s]);break;case 60:c.setQuadrant4Text(e[s]);break;case 64:this.$={text:e[s],type:"text"};break;case 65:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 66:this.$={text:e[s],type:"text"};break;case 67:this.$={text:e[s],type:"markdown"};break;case 68:this.$=e[s];break;case 69:this.$=e[s-1]+""+e[s];break}},"anonymous"),table:[{18:n,26:1,27:2,28:f,55:d,56:h,57:p},{1:[3]},{18:n,26:8,27:2,28:f,55:d,56:h,57:p},{18:n,26:9,27:2,28:f,55:d,56:h,57:p},t(y,[2,33],{29:10}),t(_,[2,61]),t(_,[2,62]),t(_,[2,63]),{1:[2,30]},{1:[2,31]},t(a,k,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:u,5:T,10:q,12:m,13:b,14:g,15:A,18:ht,25:xt,35:ft,37:gt,39:ct,41:_t,42:dt,48:i,50:Vt,51:It,52:wt,53:Rt,54:Bt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(y,[2,34]),{27:46,55:d,56:h,57:p},t(a,[2,37]),t(a,k,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:u,5:T,10:q,12:m,13:b,14:g,15:A,18:ht,25:xt,35:ft,37:gt,39:ct,41:_t,42:dt,48:i,50:Vt,51:It,52:wt,53:Rt,54:Bt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(a,[2,39]),t(a,[2,40]),t(a,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(a,[2,45]),t(a,[2,46]),{18:[1,51]},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:52,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:53,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:54,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:55,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:56,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,10:q,12:m,13:b,14:g,15:A,43:57,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:u,5:T,8:H,10:q,12:m,13:b,14:g,15:A,18:X,44:[1,58],47:[1,59],58:61,59:60,63:F,64:P,65:v,66:C,67:L},t(E,[2,64]),t(E,[2,66]),t(E,[2,67]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(E,[2,74]),t(E,[2,75]),t(E,[2,76]),t(E,[2,77]),t(E,[2,78]),t(E,[2,79]),t(E,[2,80]),t(E,[2,81]),t(y,[2,35]),t(a,[2,38]),t(a,[2,42]),t(a,[2,43]),t(a,[2,44]),{3:65,4:Nt,5:Wt,6:Ut,7:Qt,8:Ot,9:Ht,10:Xt,11:Mt,12:Yt,13:jt,14:Gt,15:Kt,21:64},t(a,[2,53],{59:60,58:61,4:u,5:T,8:H,10:q,12:m,13:b,14:g,15:A,18:X,49:[1,78],63:F,64:P,65:v,66:C,67:L}),t(a,[2,56],{59:60,58:61,4:u,5:T,8:H,10:q,12:m,13:b,14:g,15:A,18:X,49:[1,79],63:F,64:P,65:v,66:C,67:L}),t(a,[2,57],{59:60,58:61,4:u,5:T,8:H,10:q,12:m,13:b,14:g,15:A,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,58],{59:60,58:61,4:u,5:T,8:H,10:q,12:m,13:b,14:g,15:A,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,59],{59:60,58:61,4:u,5:T,8:H,10:q,12:m,13:b,14:g,15:A,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,60],{59:60,58:61,4:u,5:T,8:H,10:q,12:m,13:b,14:g,15:A,18:X,63:F,64:P,65:v,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(E,[2,65]),t(E,[2,82]),t(E,[2,83]),t(E,[2,84]),{3:83,4:Nt,5:Wt,6:Ut,7:Qt,8:Ot,9:Ht,10:Xt,11:Mt,12:Yt,13:jt,14:Gt,15:Kt,18:[1,82]},t(w,[2,23]),t(w,[2,1]),t(w,[2,2]),t(w,[2,3]),t(w,[2,4]),t(w,[2,5]),t(w,[2,6]),t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12]),t(a,[2,52],{58:31,43:84,4:u,5:T,10:q,12:m,13:b,14:g,15:A,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(a,[2,55],{58:31,43:85,4:u,5:T,10:q,12:m,13:b,14:g,15:A,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:89,23:88},t(w,[2,24]),t(a,[2,51],{59:60,58:61,4:u,5:T,8:H,10:q,12:m,13:b,14:g,15:A,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,54],{59:60,58:61,4:u,5:T,8:H,10:q,12:m,13:b,14:g,15:A,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,47],{22:89,16:90,23:101,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{46:[1,102]},t(a,[2,29],{10:At}),t(Zt,[2,27],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),t(N,[2,25]),t(N,[2,13]),t(N,[2,14]),t(N,[2,15]),t(N,[2,16]),t(N,[2,17]),t(N,[2,18]),t(N,[2,19]),t(N,[2,20]),t(N,[2,21]),t(N,[2,22]),t(a,[2,49],{10:At}),t(a,[2,48],{22:89,16:90,23:105,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:106},t(N,[2,26]),t(a,[2,50],{10:At}),t(Zt,[2,28],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st})],defaultActions:{8:[2,30],9:[2,31]},parseError:o(function(r,l){if(l.recoverable)this.trace(r);else{var x=new Error(r);throw x.hash=l,x}},"parseError"),parse:o(function(r){var l=this,x=[0],c=[],S=[null],e=[],ut=this.table,s="",yt=0,Jt=0,me=2,$t=1,be=e.slice.call(arguments,1),D=Object.create(this.lexer),j={yy:{}};for(var Ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ft)&&(j.yy[Ft]=this.yy[Ft]);D.setInput(r,j.yy),j.yy.lexer=D,j.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Pt=D.yylloc;e.push(Pt);var Se=D.options&&D.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _e(B){x.length=x.length-2*B,S.length=S.length-B,e.length=e.length-B}o(_e,"popStack");function te(){var B;return B=c.pop()||D.lex()||$t,typeof B!="number"&&(B instanceof Array&&(c=B,B=c.pop()),B=l.symbols_[B]||B),B}o(te,"lex");for(var R,G,W,vt,rt={},Tt,M,ee,qt;;){if(G=x[x.length-1],this.defaultActions[G]?W=this.defaultActions[G]:((R===null||typeof R>"u")&&(R=te()),W=ut[G]&&ut[G][R]),typeof W>"u"||!W.length||!W[0]){var Ct="";qt=[];for(Tt in ut[G])this.terminals_[Tt]&&Tt>me&&qt.push("'"+this.terminals_[Tt]+"'");D.showPosition?Ct="Parse error on line "+(yt+1)+`:
2
2
  `+D.showPosition()+`
3
- Expecting `+qt.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Ct="Parse error on line "+(yt+1)+": Unexpected "+(B==$t?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Ct,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:Pt,expected:qt})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+B);switch(W[0]){case 1:x.push(B),S.push(D.yytext),e.push(D.yylloc),x.push(W[1]),B=null,Jt=D.yyleng,s=D.yytext,yt=D.yylineno,Pt=D.yylloc;break;case 2:if(M=this.productions_[W[1]][1],rt.$=S[S.length-M],rt._$={first_line:e[e.length-(M||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(M||1)].first_column,last_column:e[e.length-1].last_column},Se&&(rt._$.range=[e[e.length-(M||1)].range[0],e[e.length-1].range[1]]),vt=this.performAction.apply(rt,[s,Jt,yt,j.yy,W[1],S,e].concat(be)),typeof vt<"u")return vt;M&&(x=x.slice(0,-1*M*2),S=S.slice(0,-1*M),e=e.slice(0,-1*M)),x.push(this.productions_[W[1]][0]),S.push(rt.$),e.push(rt._$),ee=ut[x[x.length-2]][x[x.length-1]],x.push(ee);break;case 3:return!0}}return!0},"parse")},qe=(function(){var Y={EOF:1,parseError:o(function(l,x){if(this.yy.parser)this.yy.parser.parseError(l,x);else throw new Error(l)},"parseError"),setInput:o(function(r,l){return this.yy=l||this.yy||{},this._input=r,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:o(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var l=r.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:o(function(r){var l=r.length,x=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),x.length-1&&(this.yylineno-=x.length-1);var S=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:x?(x.length===c.length?this.yylloc.first_column:0)+c[c.length-x.length].length-x[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
3
+ Expecting `+qt.join(", ")+", got '"+(this.terminals_[R]||R)+"'":Ct="Parse error on line "+(yt+1)+": Unexpected "+(R==$t?"end of input":"'"+(this.terminals_[R]||R)+"'"),this.parseError(Ct,{text:D.match,token:this.terminals_[R]||R,line:D.yylineno,loc:Pt,expected:qt})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+R);switch(W[0]){case 1:x.push(R),S.push(D.yytext),e.push(D.yylloc),x.push(W[1]),R=null,Jt=D.yyleng,s=D.yytext,yt=D.yylineno,Pt=D.yylloc;break;case 2:if(M=this.productions_[W[1]][1],rt.$=S[S.length-M],rt._$={first_line:e[e.length-(M||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(M||1)].first_column,last_column:e[e.length-1].last_column},Se&&(rt._$.range=[e[e.length-(M||1)].range[0],e[e.length-1].range[1]]),vt=this.performAction.apply(rt,[s,Jt,yt,j.yy,W[1],S,e].concat(be)),typeof vt<"u")return vt;M&&(x=x.slice(0,-1*M*2),S=S.slice(0,-1*M),e=e.slice(0,-1*M)),x.push(this.productions_[W[1]][0]),S.push(rt.$),e.push(rt._$),ee=ut[x[x.length-2]][x[x.length-1]],x.push(ee);break;case 3:return!0}}return!0},"parse")},qe=(function(){var Y={EOF:1,parseError:o(function(l,x){if(this.yy.parser)this.yy.parser.parseError(l,x);else throw new Error(l)},"parseError"),setInput:o(function(r,l){return this.yy=l||this.yy||{},this._input=r,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:o(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var l=r.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:o(function(r){var l=r.length,x=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),x.length-1&&(this.yylineno-=x.length-1);var S=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:x?(x.length===c.length?this.yylloc.first_column:0)+c[c.length-x.length].length-x[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(r){this.unput(this.match.slice(r))},"less"),pastInput:o(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var r=this.pastInput(),l=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
5
5
  `+l+"^"},"showPosition"),test_match:o(function(r,l){var x,c,S;if(this.options.backtrack_lexer&&(S={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(S.yylloc.range=this.yylloc.range.slice(0))),c=r[0].match(/(?:\r\n?|\n).*/g),c&&(this.yylineno+=c.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],x=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),x)return x;if(this._backtrack){for(var e in S)this[e]=S[e];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,l,x,c;this._more||(this.yytext="",this.match="");for(var S=this._currentRules(),e=0;e<S.length;e++)if(x=this._input.match(this.rules[S[e]]),x&&(!l||x[0].length>l[0].length)){if(l=x,c=e,this.options.backtrack_lexer){if(r=this.test_match(x,S[e]),r!==!1)return r;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(r=this.test_match(l,S[c]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var l=this.next();return l||this.lex()},"lex"),begin:o(function(l){this.conditionStack.push(l)},"begin"),popState:o(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(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:o(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:o(function(l){this.begin(l)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(l,x,c,S){switch(c){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 15;case 37:return 11;case 38:return 64;case 39:return 10;case 40:return 65;case 41:return 65;case 42:return 14;case 43:return 13;case 44:return 67;case 45:return 66;case 46:return 12;case 47:return 8;case 48:return 5;case 49:return 18;case 50:return 56;case 51:return 63;case 52:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?:[^\x00-\x7F]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return Y})();kt.lexer=qe;function pt(){this.yy={}}return o(pt,"Parser"),pt.prototype=kt,kt.Parser=pt,new pt})();Et.parser=Et;var ze=Et,I=De(),ot,Ve=(ot=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:z.quadrantChart?.chartWidth||500,chartWidth:z.quadrantChart?.chartHeight||500,titlePadding:z.quadrantChart?.titlePadding||10,titleFontSize:z.quadrantChart?.titleFontSize||20,quadrantPadding:z.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:z.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:z.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:z.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:z.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:z.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:z.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:z.quadrantChart?.pointTextPadding||5,pointLabelFontSize:z.quadrantChart?.pointLabelFontSize||12,pointRadius:z.quadrantChart?.pointRadius||5,xAxisPosition:z.quadrantChart?.xAxisPosition||"top",yAxisPosition:z.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:z.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:z.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:I.quadrant1Fill,quadrant2Fill:I.quadrant2Fill,quadrant3Fill:I.quadrant3Fill,quadrant4Fill:I.quadrant4Fill,quadrant1TextFill:I.quadrant1TextFill,quadrant2TextFill:I.quadrant2TextFill,quadrant3TextFill:I.quadrant3TextFill,quadrant4TextFill:I.quadrant4TextFill,quadrantPointFill:I.quadrantPointFill,quadrantPointTextFill:I.quadrantPointTextFill,quadrantXAxisTextFill:I.quadrantXAxisTextFill,quadrantYAxisTextFill:I.quadrantYAxisTextFill,quadrantTitleFill:I.quadrantTitleFill,quadrantInternalBorderStrokeFill:I.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:I.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,bt.info("clear called")}setData(n){this.data={...this.data,...n}}addPoints(n){this.data.points=[...n,...this.data.points]}addClass(n,f){this.classes.set(n,f)}setConfig(n){bt.trace("setConfig called with: ",n),this.config={...this.config,...n}}setThemeConfig(n){bt.trace("setThemeConfig called with: ",n),this.themeConfig={...this.themeConfig,...n}}calculateSpace(n,f,d,h){const p=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,y={top:n==="top"&&f?p:0,bottom:n==="bottom"&&f?p:0},_=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,a={left:this.config.yAxisPosition==="left"&&d?_:0,right:this.config.yAxisPosition==="right"&&d?_:0},k=this.config.titleFontSize+this.config.titlePadding*2,u={top:h?k:0},T=this.config.quadrantPadding+a.left,q=this.config.quadrantPadding+y.top+u.top,m=this.config.chartWidth-this.config.quadrantPadding*2-a.left-a.right,b=this.config.chartHeight-this.config.quadrantPadding*2-y.top-y.bottom-u.top,g=m/2,A=b/2;return{xAxisSpace:y,yAxisSpace:a,titleSpace:u,quadrantSpace:{quadrantLeft:T,quadrantTop:q,quadrantWidth:m,quadrantHalfWidth:g,quadrantHeight:b,quadrantHalfHeight:A}}}getAxisLabels(n,f,d,h){const{quadrantSpace:p,titleSpace:y}=h,{quadrantHalfHeight:_,quadrantHeight:a,quadrantLeft:k,quadrantHalfWidth:u,quadrantTop:T,quadrantWidth:q}=p,m=!!this.data.xAxisRightText,b=!!this.data.yAxisTopText,g=[];return this.data.xAxisLeftText&&f&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:k+(m?u/2:0),y:n==="top"?this.config.xAxisLabelPadding+y.top:this.config.xAxisLabelPadding+T+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&f&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:k+u+(m?u/2:0),y:n==="top"?this.config.xAxisLabelPadding+y.top:this.config.xAxisLabelPadding+T+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&d&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+k+q+this.config.quadrantPadding,y:T+a-(b?_/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:b?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&d&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+k+q+this.config.quadrantPadding,y:T+_-(b?_/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:b?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(n){const{quadrantSpace:f}=n,{quadrantHalfHeight:d,quadrantLeft:h,quadrantHalfWidth:p,quadrantTop:y}=f,_=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h+p,y,width:p,height:d,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h,y,width:p,height:d,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h,y:y+d,width:p,height:d,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h+p,y:y+d,width:p,height:d,fill:this.themeConfig.quadrant4Fill}];for(const a of _)a.text.x=a.x+a.width/2,this.data.points.length===0?(a.text.y=a.y+a.height/2,a.text.horizontalPos="middle"):(a.text.y=a.y+this.config.quadrantTextTopPadding,a.text.horizontalPos="top");return _}getQuadrantPoints(n){const{quadrantSpace:f}=n,{quadrantHeight:d,quadrantLeft:h,quadrantTop:p,quadrantWidth:y}=f,_=ie().domain([0,1]).range([h,y+h]),a=ie().domain([0,1]).range([d+p,p]);return this.data.points.map(u=>{const T=this.classes.get(u.className);return T&&(u={...T,...u}),{x:_(u.x),y:a(u.y),fill:u.color??this.themeConfig.quadrantPointFill,radius:u.radius??this.config.pointRadius,text:{text:u.text,fill:this.themeConfig.quadrantPointTextFill,x:_(u.x),y:a(u.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:u.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:u.strokeWidth??"0px"}})}getBorders(n){const f=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:d}=n,{quadrantHalfHeight:h,quadrantHeight:p,quadrantLeft:y,quadrantHalfWidth:_,quadrantTop:a,quadrantWidth:k}=d;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y-f,y1:a,x2:y+k+f,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y+k,y1:a+f,x2:y+k,y2:a+p-f},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y-f,y1:a+p,x2:y+k+f,y2:a+p},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y,y1:a+f,x2:y,y2:a+p-f},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:y+_,y1:a+f,x2:y+_,y2:a+p-f},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:y+f,y1:a+h,x2:y+k-f,y2:a+h}]}getTitle(n){if(n)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const n=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),f=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),d=this.config.showTitle&&!!this.data.titleText,h=this.data.points.length>0?"bottom":this.config.xAxisPosition,p=this.calculateSpace(h,n,f,d);return{points:this.getQuadrantPoints(p),quadrants:this.getQuadrants(p),axisLabels:this.getAxisLabels(h,n,f,p),borderLines:this.getBorders(p),title:this.getTitle(d)}}},o(ot,"QuadrantBuilder"),ot),lt,mt=(lt=class extends Error{constructor(n,f,d){super(`value for ${n} ${f} is invalid, please use a valid ${d}`),this.name="InvalidStyleError"}},o(lt,"InvalidStyleError"),lt);function Dt(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}o(Dt,"validateHexCode");function ne(t){return!/^\d+$/.test(t)}o(ne,"validateNumber");function se(t){return!/^\d+px$/.test(t)}o(se,"validateSizeInPixels");var Ie=zt();function O(t){return Ee(t.trim(),Ie)}o(O,"textSanitizer");var V=new Ve;function re(t){V.setData({quadrant1Text:O(t.text)})}o(re,"setQuadrant1Text");function oe(t){V.setData({quadrant2Text:O(t.text)})}o(oe,"setQuadrant2Text");function le(t){V.setData({quadrant3Text:O(t.text)})}o(le,"setQuadrant3Text");function he(t){V.setData({quadrant4Text:O(t.text)})}o(he,"setQuadrant4Text");function ce(t){V.setData({xAxisLeftText:O(t.text)})}o(ce,"setXAxisLeftText");function de(t){V.setData({xAxisRightText:O(t.text)})}o(de,"setXAxisRightText");function ue(t){V.setData({yAxisTopText:O(t.text)})}o(ue,"setYAxisTopText");function xe(t){V.setData({yAxisBottomText:O(t.text)})}o(xe,"setYAxisBottomText");function St(t){const n={};for(const f of t){const[d,h]=f.trim().split(/\s*:\s*/);if(d==="radius"){if(ne(h))throw new mt(d,h,"number");n.radius=parseInt(h)}else if(d==="color"){if(Dt(h))throw new mt(d,h,"hex code");n.color=h}else if(d==="stroke-color"){if(Dt(h))throw new mt(d,h,"hex code");n.strokeColor=h}else if(d==="stroke-width"){if(se(h))throw new mt(d,h,"number of pixels (eg. 10px)");n.strokeWidth=h}else throw new Error(`style named ${d} is not supported.`)}return n}o(St,"parseStyles");function fe(t,n,f,d,h){const p=St(h);V.addPoints([{x:f,y:d,text:O(t.text),className:n,...p}])}o(fe,"addPoint");function ge(t,n){V.addClass(t,St(n))}o(ge,"addClass");function pe(t){V.setConfig({chartWidth:t})}o(pe,"setWidth");function ye(t){V.setConfig({chartHeight:t})}o(ye,"setHeight");function Te(){const t=zt(),{themeVariables:n,quadrantChart:f}=t;return f&&V.setConfig(f),V.setThemeConfig({quadrant1Fill:n.quadrant1Fill,quadrant2Fill:n.quadrant2Fill,quadrant3Fill:n.quadrant3Fill,quadrant4Fill:n.quadrant4Fill,quadrant1TextFill:n.quadrant1TextFill,quadrant2TextFill:n.quadrant2TextFill,quadrant3TextFill:n.quadrant3TextFill,quadrant4TextFill:n.quadrant4TextFill,quadrantPointFill:n.quadrantPointFill,quadrantPointTextFill:n.quadrantPointTextFill,quadrantXAxisTextFill:n.quadrantXAxisTextFill,quadrantYAxisTextFill:n.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:n.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:n.quadrantInternalBorderStrokeFill,quadrantTitleFill:n.quadrantTitleFill}),V.setData({titleText:ae()}),V.build()}o(Te,"getQuadrantData");var we=o(function(){V.clear(),Le()},"clear"),Be={setWidth:pe,setHeight:ye,setQuadrant1Text:re,setQuadrant2Text:oe,setQuadrant3Text:le,setQuadrant4Text:he,setXAxisLeftText:ce,setXAxisRightText:de,setYAxisTopText:ue,setYAxisBottomText:xe,parseStyles:St,addPoint:fe,addClass:ge,getQuadrantData:Te,clear:we,setAccTitle:ve,getAccTitle:Pe,setDiagramTitle:Fe,getDiagramTitle:ae,getAccDescription:ke,setAccDescription:Ae},Re=o((t,n,f,d)=>{function h(i){return i==="top"?"hanging":"middle"}o(h,"getDominantBaseLine");function p(i){return i==="left"?"start":"middle"}o(p,"getTextAnchor");function y(i){return`translate(${i.x}, ${i.y}) rotate(${i.rotation||0})`}o(y,"getTransformation");const _=zt();bt.debug(`Rendering quadrant chart
7
- `+t);const a=_.securityLevel;let k;a==="sandbox"&&(k=Lt("#i"+n));const T=(a==="sandbox"?Lt(k.nodes()[0].contentDocument.body):Lt("body")).select(`[id="${n}"]`),q=T.append("g").attr("class","main"),m=_.quadrantChart?.chartWidth??500,b=_.quadrantChart?.chartHeight??500;Ce(T,b,m,_.quadrantChart?.useMaxWidth??!0),T.attr("viewBox","0 0 "+m+" "+b),d.db.setHeight(b),d.db.setWidth(m);const g=d.db.getQuadrantData(),A=q.append("g").attr("class","quadrants"),ht=q.append("g").attr("class","border"),xt=q.append("g").attr("class","data-points"),ft=q.append("g").attr("class","labels"),gt=q.append("g").attr("class","title");g.title&&gt.append("text").attr("x",0).attr("y",0).attr("fill",g.title.fill).attr("font-size",g.title.fontSize).attr("dominant-baseline",h(g.title.horizontalPos)).attr("text-anchor",p(g.title.verticalPos)).attr("transform",y(g.title)).text(g.title.text),g.borderLines&&ht.selectAll("line").data(g.borderLines).enter().append("line").attr("x1",i=>i.x1).attr("y1",i=>i.y1).attr("x2",i=>i.x2).attr("y2",i=>i.y2).style("stroke",i=>i.strokeFill).style("stroke-width",i=>i.strokeWidth);const ct=A.selectAll("g.quadrant").data(g.quadrants).enter().append("g").attr("class","quadrant");ct.append("rect").attr("x",i=>i.x).attr("y",i=>i.y).attr("width",i=>i.width).attr("height",i=>i.height).attr("fill",i=>i.fill),ct.append("text").attr("x",0).attr("y",0).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>h(i.text.horizontalPos)).attr("text-anchor",i=>p(i.text.verticalPos)).attr("transform",i=>y(i.text)).text(i=>i.text.text),ft.selectAll("g.label").data(g.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(i=>i.text).attr("fill",i=>i.fill).attr("font-size",i=>i.fontSize).attr("dominant-baseline",i=>h(i.horizontalPos)).attr("text-anchor",i=>p(i.verticalPos)).attr("transform",i=>y(i));const dt=xt.selectAll("g.data-point").data(g.points).enter().append("g").attr("class","data-point");dt.append("circle").attr("cx",i=>i.x).attr("cy",i=>i.y).attr("r",i=>i.radius).attr("fill",i=>i.fill).attr("stroke",i=>i.strokeColor).attr("stroke-width",i=>i.strokeWidth),dt.append("text").attr("x",0).attr("y",0).text(i=>i.text.text).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>h(i.text.horizontalPos)).attr("text-anchor",i=>p(i.text.verticalPos)).attr("transform",i=>y(i.text))},"draw"),Ne={draw:Re},He={parser:ze,db:Be,renderer:Ne,styles:o(()=>"","styles")};export{He as diagram};
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var l=this.next();return l||this.lex()},"lex"),begin:o(function(l){this.conditionStack.push(l)},"begin"),popState:o(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(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:o(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:o(function(l){this.begin(l)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(l,x,c,S){switch(c){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 15;case 37:return 11;case 38:return 64;case 39:return 10;case 40:return 65;case 41:return 65;case 42:return 14;case 43:return 13;case 44:return 67;case 45:return 66;case 46:return 12;case 47:return 8;case 48:return 5;case 49:return 18;case 50:return 56;case 51:return 63;case 52:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?:[^\x00-\x7F]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return Y})();kt.lexer=qe;function pt(){this.yy={}}return o(pt,"Parser"),pt.prototype=kt,kt.Parser=pt,new pt})();Et.parser=Et;var ze=Et,I=De(),ot,Ve=(ot=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:z.quadrantChart?.chartWidth||500,chartWidth:z.quadrantChart?.chartHeight||500,titlePadding:z.quadrantChart?.titlePadding||10,titleFontSize:z.quadrantChart?.titleFontSize||20,quadrantPadding:z.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:z.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:z.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:z.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:z.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:z.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:z.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:z.quadrantChart?.pointTextPadding||5,pointLabelFontSize:z.quadrantChart?.pointLabelFontSize||12,pointRadius:z.quadrantChart?.pointRadius||5,xAxisPosition:z.quadrantChart?.xAxisPosition||"top",yAxisPosition:z.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:z.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:z.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:I.quadrant1Fill,quadrant2Fill:I.quadrant2Fill,quadrant3Fill:I.quadrant3Fill,quadrant4Fill:I.quadrant4Fill,quadrant1TextFill:I.quadrant1TextFill,quadrant2TextFill:I.quadrant2TextFill,quadrant3TextFill:I.quadrant3TextFill,quadrant4TextFill:I.quadrant4TextFill,quadrantPointFill:I.quadrantPointFill,quadrantPointTextFill:I.quadrantPointTextFill,quadrantXAxisTextFill:I.quadrantXAxisTextFill,quadrantYAxisTextFill:I.quadrantYAxisTextFill,quadrantTitleFill:I.quadrantTitleFill,quadrantInternalBorderStrokeFill:I.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:I.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,bt.info("clear called")}setData(n){this.data={...this.data,...n}}addPoints(n){this.data.points=[...n,...this.data.points]}addClass(n,f){this.classes.set(n,f)}setConfig(n){bt.trace("setConfig called with: ",n),this.config={...this.config,...n}}setThemeConfig(n){bt.trace("setThemeConfig called with: ",n),this.themeConfig={...this.themeConfig,...n}}calculateSpace(n,f,d,h){const p=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,y={top:n==="top"&&f?p:0,bottom:n==="bottom"&&f?p:0},_=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,a={left:this.config.yAxisPosition==="left"&&d?_:0,right:this.config.yAxisPosition==="right"&&d?_:0},k=this.config.titleFontSize+this.config.titlePadding*2,u={top:h?k:0},T=this.config.quadrantPadding+a.left,q=this.config.quadrantPadding+y.top+u.top,m=this.config.chartWidth-this.config.quadrantPadding*2-a.left-a.right,b=this.config.chartHeight-this.config.quadrantPadding*2-y.top-y.bottom-u.top,g=m/2,A=b/2;return{xAxisSpace:y,yAxisSpace:a,titleSpace:u,quadrantSpace:{quadrantLeft:T,quadrantTop:q,quadrantWidth:m,quadrantHalfWidth:g,quadrantHeight:b,quadrantHalfHeight:A}}}getAxisLabels(n,f,d,h){const{quadrantSpace:p,titleSpace:y}=h,{quadrantHalfHeight:_,quadrantHeight:a,quadrantLeft:k,quadrantHalfWidth:u,quadrantTop:T,quadrantWidth:q}=p,m=!!this.data.xAxisRightText,b=!!this.data.yAxisTopText,g=[];return this.data.xAxisLeftText&&f&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:k+(m?u/2:0),y:n==="top"?this.config.xAxisLabelPadding+y.top:this.config.xAxisLabelPadding+T+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&f&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:k+u+(m?u/2:0),y:n==="top"?this.config.xAxisLabelPadding+y.top:this.config.xAxisLabelPadding+T+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&d&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+k+q+this.config.quadrantPadding,y:T+a-(b?_/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:b?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&d&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+k+q+this.config.quadrantPadding,y:T+_-(b?_/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:b?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(n){const{quadrantSpace:f}=n,{quadrantHalfHeight:d,quadrantLeft:h,quadrantHalfWidth:p,quadrantTop:y}=f,_=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h+p,y,width:p,height:d,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h,y,width:p,height:d,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h,y:y+d,width:p,height:d,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h+p,y:y+d,width:p,height:d,fill:this.themeConfig.quadrant4Fill}];for(const a of _)a.text.x=a.x+a.width/2,this.data.points.length===0?(a.text.y=a.y+a.height/2,a.text.horizontalPos="middle"):(a.text.y=a.y+this.config.quadrantTextTopPadding,a.text.horizontalPos="top");return _}getQuadrantPoints(n){const{quadrantSpace:f}=n,{quadrantHeight:d,quadrantLeft:h,quadrantTop:p,quadrantWidth:y}=f,_=ie().domain([0,1]).range([h,y+h]),a=ie().domain([0,1]).range([d+p,p]);return this.data.points.map(u=>{const T=this.classes.get(u.className);return T&&(u={...T,...u}),{x:_(u.x),y:a(u.y),fill:u.color??this.themeConfig.quadrantPointFill,radius:u.radius??this.config.pointRadius,text:{text:u.text,fill:this.themeConfig.quadrantPointTextFill,x:_(u.x),y:a(u.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:u.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:u.strokeWidth??"0px"}})}getBorders(n){const f=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:d}=n,{quadrantHalfHeight:h,quadrantHeight:p,quadrantLeft:y,quadrantHalfWidth:_,quadrantTop:a,quadrantWidth:k}=d;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y-f,y1:a,x2:y+k+f,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y+k,y1:a+f,x2:y+k,y2:a+p-f},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y-f,y1:a+p,x2:y+k+f,y2:a+p},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y,y1:a+f,x2:y,y2:a+p-f},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:y+_,y1:a+f,x2:y+_,y2:a+p-f},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:y+f,y1:a+h,x2:y+k-f,y2:a+h}]}getTitle(n){if(n)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const n=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),f=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),d=this.config.showTitle&&!!this.data.titleText,h=this.data.points.length>0?"bottom":this.config.xAxisPosition,p=this.calculateSpace(h,n,f,d);return{points:this.getQuadrantPoints(p),quadrants:this.getQuadrants(p),axisLabels:this.getAxisLabels(h,n,f,p),borderLines:this.getBorders(p),title:this.getTitle(d)}}},o(ot,"QuadrantBuilder"),ot),lt,mt=(lt=class extends Error{constructor(n,f,d){super(`value for ${n} ${f} is invalid, please use a valid ${d}`),this.name="InvalidStyleError"}},o(lt,"InvalidStyleError"),lt);function Dt(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}o(Dt,"validateHexCode");function ne(t){return!/^\d+$/.test(t)}o(ne,"validateNumber");function se(t){return!/^\d+px$/.test(t)}o(se,"validateSizeInPixels");function O(t){return Ee(t.trim(),zt())}o(O,"textSanitizer");var V=new Ve;function re(t){V.setData({quadrant1Text:O(t.text)})}o(re,"setQuadrant1Text");function oe(t){V.setData({quadrant2Text:O(t.text)})}o(oe,"setQuadrant2Text");function le(t){V.setData({quadrant3Text:O(t.text)})}o(le,"setQuadrant3Text");function he(t){V.setData({quadrant4Text:O(t.text)})}o(he,"setQuadrant4Text");function ce(t){V.setData({xAxisLeftText:O(t.text)})}o(ce,"setXAxisLeftText");function de(t){V.setData({xAxisRightText:O(t.text)})}o(de,"setXAxisRightText");function ue(t){V.setData({yAxisTopText:O(t.text)})}o(ue,"setYAxisTopText");function xe(t){V.setData({yAxisBottomText:O(t.text)})}o(xe,"setYAxisBottomText");function St(t){const n={};for(const f of t){const[d,h]=f.trim().split(/\s*:\s*/);if(d==="radius"){if(ne(h))throw new mt(d,h,"number");n.radius=parseInt(h)}else if(d==="color"){if(Dt(h))throw new mt(d,h,"hex code");n.color=h}else if(d==="stroke-color"){if(Dt(h))throw new mt(d,h,"hex code");n.strokeColor=h}else if(d==="stroke-width"){if(se(h))throw new mt(d,h,"number of pixels (eg. 10px)");n.strokeWidth=h}else throw new Error(`style named ${d} is not supported.`)}return n}o(St,"parseStyles");function fe(t,n,f,d,h){const p=St(h);V.addPoints([{x:f,y:d,text:O(t.text),className:n,...p}])}o(fe,"addPoint");function ge(t,n){V.addClass(t,St(n))}o(ge,"addClass");function pe(t){V.setConfig({chartWidth:t})}o(pe,"setWidth");function ye(t){V.setConfig({chartHeight:t})}o(ye,"setHeight");function Te(){const t=zt(),{themeVariables:n,quadrantChart:f}=t;return f&&V.setConfig(f),V.setThemeConfig({quadrant1Fill:n.quadrant1Fill,quadrant2Fill:n.quadrant2Fill,quadrant3Fill:n.quadrant3Fill,quadrant4Fill:n.quadrant4Fill,quadrant1TextFill:n.quadrant1TextFill,quadrant2TextFill:n.quadrant2TextFill,quadrant3TextFill:n.quadrant3TextFill,quadrant4TextFill:n.quadrant4TextFill,quadrantPointFill:n.quadrantPointFill,quadrantPointTextFill:n.quadrantPointTextFill,quadrantXAxisTextFill:n.quadrantXAxisTextFill,quadrantYAxisTextFill:n.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:n.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:n.quadrantInternalBorderStrokeFill,quadrantTitleFill:n.quadrantTitleFill}),V.setData({titleText:ae()}),V.build()}o(Te,"getQuadrantData");var Ie=o(function(){V.clear(),Le()},"clear"),we={setWidth:pe,setHeight:ye,setQuadrant1Text:re,setQuadrant2Text:oe,setQuadrant3Text:le,setQuadrant4Text:he,setXAxisLeftText:ce,setXAxisRightText:de,setYAxisTopText:ue,setYAxisBottomText:xe,parseStyles:St,addPoint:fe,addClass:ge,getQuadrantData:Te,clear:Ie,setAccTitle:ve,getAccTitle:Pe,setDiagramTitle:Fe,getDiagramTitle:ae,getAccDescription:ke,setAccDescription:Ae},Re=o((t,n,f,d)=>{function h(i){return i==="top"?"hanging":"middle"}o(h,"getDominantBaseLine");function p(i){return i==="left"?"start":"middle"}o(p,"getTextAnchor");function y(i){return`translate(${i.x}, ${i.y}) rotate(${i.rotation||0})`}o(y,"getTransformation");const _=zt();bt.debug(`Rendering quadrant chart
7
+ `+t);const a=_.securityLevel;let k;a==="sandbox"&&(k=Lt("#i"+n));const T=(a==="sandbox"?Lt(k.nodes()[0].contentDocument.body):Lt("body")).select(`[id="${n}"]`),q=T.append("g").attr("class","main"),m=_.quadrantChart?.chartWidth??500,b=_.quadrantChart?.chartHeight??500;Ce(T,b,m,_.quadrantChart?.useMaxWidth??!0),T.attr("viewBox","0 0 "+m+" "+b),d.db.setHeight(b),d.db.setWidth(m);const g=d.db.getQuadrantData(),A=q.append("g").attr("class","quadrants"),ht=q.append("g").attr("class","border"),xt=q.append("g").attr("class","data-points"),ft=q.append("g").attr("class","labels"),gt=q.append("g").attr("class","title");g.title&&gt.append("text").attr("x",0).attr("y",0).attr("fill",g.title.fill).attr("font-size",g.title.fontSize).attr("dominant-baseline",h(g.title.horizontalPos)).attr("text-anchor",p(g.title.verticalPos)).attr("transform",y(g.title)).text(g.title.text),g.borderLines&&ht.selectAll("line").data(g.borderLines).enter().append("line").attr("x1",i=>i.x1).attr("y1",i=>i.y1).attr("x2",i=>i.x2).attr("y2",i=>i.y2).style("stroke",i=>i.strokeFill).style("stroke-width",i=>i.strokeWidth);const ct=A.selectAll("g.quadrant").data(g.quadrants).enter().append("g").attr("class","quadrant");ct.append("rect").attr("x",i=>i.x).attr("y",i=>i.y).attr("width",i=>i.width).attr("height",i=>i.height).attr("fill",i=>i.fill),ct.append("text").attr("x",0).attr("y",0).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>h(i.text.horizontalPos)).attr("text-anchor",i=>p(i.text.verticalPos)).attr("transform",i=>y(i.text)).text(i=>i.text.text),ft.selectAll("g.label").data(g.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(i=>i.text).attr("fill",i=>i.fill).attr("font-size",i=>i.fontSize).attr("dominant-baseline",i=>h(i.horizontalPos)).attr("text-anchor",i=>p(i.verticalPos)).attr("transform",i=>y(i));const dt=xt.selectAll("g.data-point").data(g.points).enter().append("g").attr("class","data-point");dt.append("circle").attr("cx",i=>i.x).attr("cy",i=>i.y).attr("r",i=>i.radius).attr("fill",i=>i.fill).attr("stroke",i=>i.strokeColor).attr("stroke-width",i=>i.strokeWidth),dt.append("text").attr("x",0).attr("y",0).text(i=>i.text.text).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>h(i.text.horizontalPos)).attr("text-anchor",i=>p(i.text.verticalPos)).attr("transform",i=>y(i.text))},"draw"),Be={draw:Re},Oe={parser:ze,db:we,renderer:Be,styles:o(()=>"","styles")};export{Oe as diagram};
@@ -0,0 +1 @@
1
+ import{g as o,r as l,d as t}from"./chunk-2E7WHVMD-ChRTmoE5.js";import{p as m}from"./chunk-JWPE2WC7-DGhyzwFs.js";import{_ as n,l as s}from"./DocContent-D5CLsUKq.js";import{M as p,c as u}from"./cynefin-EF2NZ3EQ-DJXHpx7E.js";var d=u().Railroad.parser.LangiumParser,a=n(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{const r=e.elements.map(a);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(a);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:a(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:a(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:a(e.definition)}),"transformRule"),g=n(e=>{m(e,t),e.title&&t.setTitle(e.title),e.rules.map(r=>t.addRule(c(r)))},"populateDb"),y={parse:n(e=>{t.clear(),s.debug("[Railroad Parser] Starting Langium parse");const r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p(r);const i=r.value;s.debug("[Railroad Parser] Parsed rules:",i.rules.length),g(i),s.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t}},h={parser:y,db:t,renderer:l,styles:o};export{h as diagram};