@ootc/markdown 0.0.9 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/README.md +96 -4
  2. package/dist/CodeBlock-BquZ4WRk.cjs +2 -0
  3. package/dist/CodeBlock-DSwq2gw5.js +74 -0
  4. package/dist/MarkdownPreview-CMvzqhTd.js +7592 -0
  5. package/dist/MarkdownPreview-DfDx-wep.cjs +29 -0
  6. package/dist/code.cjs +1 -1
  7. package/dist/code.css +1 -0
  8. package/dist/code.d.ts +3 -1
  9. package/dist/code.js +3 -2
  10. package/dist/components/code-block/CodeBlock.d.ts +7 -1
  11. package/dist/components/markdown/MarkdownPreview.d.ts +8 -2
  12. package/dist/components/markdown-editor/MarkdownEditor.d.ts +4 -1
  13. package/dist/css/CodeBlock.css +1 -0
  14. package/dist/css/MarkdownPreview.css +1 -0
  15. package/dist/css/editor.css +1 -0
  16. package/dist/css/plugin-mermaid.css +1 -0
  17. package/dist/editor.cjs +1 -1
  18. package/dist/editor.css +3 -0
  19. package/dist/editor.d.ts +3 -1
  20. package/dist/editor.js +28 -25
  21. package/dist/index-BJZhyxD_.cjs +9 -0
  22. package/dist/index-DWVMYNE4.js +800 -0
  23. package/dist/index-HmBYTPyZ.js +1179 -0
  24. package/dist/index-jsnhzgIQ.cjs +1 -0
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.css +1 -0
  27. package/dist/index.d.ts +3 -1
  28. package/dist/index.js +3 -2
  29. package/dist/jsx-runtime-DXgJBoQh.js +264 -0
  30. package/dist/jsx-runtime-nZSsnGb7.cjs +6 -0
  31. package/dist/plugin-highlight.cjs +1 -0
  32. package/dist/plugin-highlight.js +20 -0
  33. package/dist/plugin-katex.cjs +1 -0
  34. package/dist/plugin-katex.js +12 -0
  35. package/dist/plugin-mermaid.cjs +1 -0
  36. package/dist/plugin-mermaid.css +1 -0
  37. package/dist/plugin-mermaid.js +266 -0
  38. package/dist/plugins/types.d.ts +38 -0
  39. package/dist/preview.cjs +1 -1
  40. package/dist/preview.css +2 -0
  41. package/dist/preview.d.ts +3 -1
  42. package/dist/preview.js +4 -3
  43. package/dist/style.css +4 -1
  44. package/package.json +76 -21
  45. package/dist/CodeBlock-BYxQBfWO.js +0 -40827
  46. package/dist/CodeBlock-CJ6j8Wkl.cjs +0 -3934
  47. package/dist/MarkdownPreview-DcWMewhy.cjs +0 -295
  48. package/dist/MarkdownPreview-lqJAnu4B.js +0 -20424
  49. package/dist/_baseUniq-BfVwFITD.js +0 -477
  50. package/dist/_baseUniq-D-3LoSZp.cjs +0 -1
  51. package/dist/arc-CyzqoBTV.js +0 -83
  52. package/dist/arc-DrpGAtaq.cjs +0 -1
  53. package/dist/architecture-U656AL7Q-C8Bj_Ouy.cjs +0 -1
  54. package/dist/architecture-U656AL7Q-DTKdLHLe.js +0 -5
  55. package/dist/architectureDiagram-VXUJARFQ-B8EG6DIA.js +0 -4662
  56. package/dist/architectureDiagram-VXUJARFQ-DJ1ub7X0.cjs +0 -36
  57. package/dist/blockDiagram-VD42YOAC-CKNTgeZ8.js +0 -2256
  58. package/dist/blockDiagram-VD42YOAC-G-1iOwuq.cjs +0 -122
  59. package/dist/c4Diagram-YG6GDRKO-BJ1Ka924.cjs +0 -10
  60. package/dist/c4Diagram-YG6GDRKO-Bokkq4pO.js +0 -1580
  61. package/dist/channel-C4noxv-h.js +0 -5
  62. package/dist/channel-DvIIEA3u.cjs +0 -1
  63. package/dist/chunk-4BX2VUAB-B5M-5e_l.cjs +0 -1
  64. package/dist/chunk-4BX2VUAB-ByoAwp1j.js +0 -8
  65. package/dist/chunk-55IACEB6-BpG-_f0h.cjs +0 -1
  66. package/dist/chunk-55IACEB6-DRnx6y7F.js +0 -8
  67. package/dist/chunk-B4BG7PRW-0toVGVN-.js +0 -1375
  68. package/dist/chunk-B4BG7PRW-evUM3dip.cjs +0 -165
  69. package/dist/chunk-DI55MBZ5-CyInK_-M.js +0 -1370
  70. package/dist/chunk-DI55MBZ5-DKs4p2E0.cjs +0 -220
  71. package/dist/chunk-FMBD7UC4-BwUpmqhP.js +0 -19
  72. package/dist/chunk-FMBD7UC4-cpOVGF_2.cjs +0 -15
  73. package/dist/chunk-QN33PNHL-C7XXEbKU.js +0 -19
  74. package/dist/chunk-QN33PNHL-CEdYSNej.cjs +0 -1
  75. package/dist/chunk-QZHKN3VN-hppYv0Iu.cjs +0 -1
  76. package/dist/chunk-QZHKN3VN-qqHBDA_I.js +0 -15
  77. package/dist/chunk-TZMSLE5B-B9QqMSFM.js +0 -64
  78. package/dist/chunk-TZMSLE5B-Bklau4qu.cjs +0 -1
  79. package/dist/classDiagram-2ON5EDUG-CYKX_y1c.js +0 -16
  80. package/dist/classDiagram-2ON5EDUG-TgiEUsUn.cjs +0 -1
  81. package/dist/classDiagram-v2-WZHVMYZB-CYKX_y1c.js +0 -16
  82. package/dist/classDiagram-v2-WZHVMYZB-TgiEUsUn.cjs +0 -1
  83. package/dist/clone-CE64n2kf.js +0 -8
  84. package/dist/clone-jaW02xOC.cjs +0 -1
  85. package/dist/cose-bilkent-S5V4N54A-B_XAF1ZT.js +0 -2609
  86. package/dist/cose-bilkent-S5V4N54A-DSZx3rxe.cjs +0 -1
  87. package/dist/cytoscape.esm-CNUX3VTg.cjs +0 -321
  88. package/dist/cytoscape.esm-Cvf3sx9F.js +0 -18704
  89. package/dist/dagre-6UL2VRFP-Biy3Qm3K.js +0 -443
  90. package/dist/dagre-6UL2VRFP-C8MiPDEQ.cjs +0 -4
  91. package/dist/defaultLocale-D7EN2tov.js +0 -171
  92. package/dist/defaultLocale-DIVzfLaQ.cjs +0 -1
  93. package/dist/diagram-PSM6KHXK-B1y0Lt7Z.cjs +0 -24
  94. package/dist/diagram-PSM6KHXK-CIfbagcO.js +0 -531
  95. package/dist/diagram-QEK2KX5R-BJNTbg0b.cjs +0 -43
  96. package/dist/diagram-QEK2KX5R-BQz0yqem.js +0 -217
  97. package/dist/diagram-S2PKOQOG-BGsratMZ.js +0 -142
  98. package/dist/diagram-S2PKOQOG-BK_tj5Pz.cjs +0 -24
  99. package/dist/erDiagram-Q2GNP2WA-CJbuwIgY.cjs +0 -60
  100. package/dist/erDiagram-Q2GNP2WA-CurkAz8N.js +0 -841
  101. package/dist/flowDiagram-NV44I4VS-DAMyok8X.js +0 -1620
  102. package/dist/flowDiagram-NV44I4VS-DnmHUmh1.cjs +0 -162
  103. package/dist/ganttDiagram-JELNMOA3-DxXvW49B.cjs +0 -267
  104. package/dist/ganttDiagram-JELNMOA3-oVlSmAjl.js +0 -2671
  105. package/dist/gitGraph-F6HP7TQM-DUSMetNW.js +0 -5
  106. package/dist/gitGraph-F6HP7TQM-DveZcMpA.cjs +0 -1
  107. package/dist/gitGraphDiagram-NY62KEGX-CFdtd4Gb.js +0 -699
  108. package/dist/gitGraphDiagram-NY62KEGX-CspGhCdP.cjs +0 -65
  109. package/dist/graph-Bza-HyX6.js +0 -381
  110. package/dist/graph-CE_Z8OkL.cjs +0 -1
  111. package/dist/info-NVLQJR56-3ayytpiF.js +0 -5
  112. package/dist/info-NVLQJR56-D-IKjb_E.cjs +0 -1
  113. package/dist/infoDiagram-WHAUD3N6--LngDYSE.cjs +0 -2
  114. package/dist/infoDiagram-WHAUD3N6-BtO0qT6g.js +0 -24
  115. package/dist/init-CHZsXQcr.cjs +0 -1
  116. package/dist/init-DjUOC4st.js +0 -16
  117. package/dist/journeyDiagram-XKPGCS4Q-DCvKw6yJ.cjs +0 -139
  118. package/dist/journeyDiagram-XKPGCS4Q-Unrh_bjo.js +0 -834
  119. package/dist/kanban-definition-3W4ZIXB7-CRa6bR24.cjs +0 -89
  120. package/dist/kanban-definition-3W4ZIXB7-Vpm6gG9R.js +0 -719
  121. package/dist/layout-BJzrWbaG.cjs +0 -1
  122. package/dist/layout-D6Pf3Nys.js +0 -1441
  123. package/dist/linear-C0E_OSxf.js +0 -259
  124. package/dist/linear-TSwNFrBs.cjs +0 -1
  125. package/dist/mermaid-parser.core-B9wV8XMP.js +0 -14177
  126. package/dist/mermaid-parser.core-Ba9EAFlD.cjs +0 -128
  127. package/dist/mermaid.core-B1lFjYb9.js +0 -15269
  128. package/dist/mermaid.core-C8vi9eg6.cjs +0 -249
  129. package/dist/min-BC6TlZcq.cjs +0 -1
  130. package/dist/min-DT5Wu4V1.js +0 -38
  131. package/dist/mindmap-definition-VGOIOE7T-COA86V4i.js +0 -784
  132. package/dist/mindmap-definition-VGOIOE7T-D9oMyZ2M.cjs +0 -68
  133. package/dist/ordinal-B6-f3MAq.js +0 -61
  134. package/dist/ordinal-CagbB1m8.cjs +0 -1
  135. package/dist/packet-BFZMPI3H-BZI0_bZt.js +0 -5
  136. package/dist/packet-BFZMPI3H-D4pnK0Ol.cjs +0 -1
  137. package/dist/pie-7BOR55EZ-DS6huTOL.cjs +0 -1
  138. package/dist/pie-7BOR55EZ-DgzTX76e.js +0 -5
  139. package/dist/pieDiagram-ADFJNKIX-CYW3Diea.js +0 -161
  140. package/dist/pieDiagram-ADFJNKIX-CxPAjreR.cjs +0 -30
  141. package/dist/quadrantDiagram-AYHSOK5B-BT94kssD.js +0 -1022
  142. package/dist/quadrantDiagram-AYHSOK5B-ehLphI_D.cjs +0 -7
  143. package/dist/radar-NHE76QYJ-CKcVnf1I.cjs +0 -1
  144. package/dist/radar-NHE76QYJ-D8cZitaQ.js +0 -5
  145. package/dist/requirementDiagram-UZGBJVZJ-B4UYGl6e.js +0 -850
  146. package/dist/requirementDiagram-UZGBJVZJ-BDLj6-Do.cjs +0 -64
  147. package/dist/sankeyDiagram-TZEHDZUN-CAWsWdn8.js +0 -810
  148. package/dist/sankeyDiagram-TZEHDZUN-DUb360Ep.cjs +0 -10
  149. package/dist/sequenceDiagram-WL72ISMW-Bb4Tkhf2.cjs +0 -145
  150. package/dist/sequenceDiagram-WL72ISMW-DsmW0gAI.js +0 -2511
  151. package/dist/stateDiagram-FKZM4ZOC-Da-8DKdP.js +0 -263
  152. package/dist/stateDiagram-FKZM4ZOC-jOvG1Jmy.cjs +0 -1
  153. package/dist/stateDiagram-v2-4FDKWEC3-GMZ8nH4e.js +0 -16
  154. package/dist/stateDiagram-v2-4FDKWEC3-mWKIMY-b.cjs +0 -1
  155. package/dist/timeline-definition-IT6M3QCI-BdnDlTsf.cjs +0 -61
  156. package/dist/timeline-definition-IT6M3QCI-CvJDgHLW.js +0 -795
  157. package/dist/treemap-KMMF4GRG-BVy_kMp3.js +0 -5
  158. package/dist/treemap-KMMF4GRG-BsA9nu7r.cjs +0 -1
  159. package/dist/xychartDiagram-PRI3JC2R-CYXNZ7B0.cjs +0 -7
  160. package/dist/xychartDiagram-PRI3JC2R-wG1xpI1S.js +0 -1340
@@ -1,68 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const re=require("./chunk-55IACEB6-BpG-_f0h.cjs"),ae=require("./chunk-QN33PNHL-CEdYSNej.cjs"),a=require("./mermaid.core-C8vi9eg6.cjs"),_=[];for(let t=0;t<256;++t)_.push((t+256).toString(16).slice(1));function oe(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()}let G;const ce=new Uint8Array(16);function le(){if(!G){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");G=crypto.getRandomValues.bind(crypto)}return G(ce)}const he=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Z={randomUUID:he};function de(t,e,i){if(Z.randomUUID&&!t)return Z.randomUUID();t=t||{};const l=t.random??t.rng?.()??le();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,oe(l)}var z=(function(){var t=a.__name(function(x,s,n,o){for(n=n||{},o=x.length;o--;n[x[o]]=s);return n},"o"),e=[1,4],i=[1,13],l=[1,12],f=[1,15],h=[1,16],p=[1,20],y=[1,19],u=[6,7,8],D=[1,26],H=[1,24],$=[1,25],b=[6,7,11],W=[1,6,13,15,16,19,22],X=[1,33],q=[1,34],I=[1,6,7,11,13,15,16,19,22],M={trace:a.__name(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:a.__name(function(s,n,o,c,g,r,R){var d=r.length-1;switch(g){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[d].id),c.addNode(r[d-1].length,r[d].id,r[d].descr,r[d].type);break;case 16:c.getLogger().trace("Icon: ",r[d]),c.decorateNode({icon:r[d]});break;case 17:case 21:c.decorateNode({class:r[d]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[d].id),c.addNode(0,r[d].id,r[d].descr,r[d].type);break;case 20:c.decorateNode({icon:r[d]});break;case 25:c.getLogger().trace("node found ..",r[d-2]),this.$={id:r[d-1],descr:r[d-1],type:c.getType(r[d-2],r[d])};break;case 26:this.$={id:r[d],descr:r[d],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",r[d-3]),this.$={id:r[d-3],descr:r[d-1],type:c.getType(r[d-2],r[d])};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:i,7:[1,10],9:9,12:11,13:l,14:14,15:f,16:h,17:17,18:18,19:p,22:y},t(u,[2,3]),{1:[2,2]},t(u,[2,4]),t(u,[2,5]),{1:[2,6],6:i,12:21,13:l,14:14,15:f,16:h,17:17,18:18,19:p,22:y},{6:i,9:22,12:11,13:l,14:14,15:f,16:h,17:17,18:18,19:p,22:y},{6:D,7:H,10:23,11:$},t(b,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:p,22:y}),t(b,[2,18]),t(b,[2,19]),t(b,[2,20]),t(b,[2,21]),t(b,[2,23]),t(b,[2,24]),t(b,[2,26],{19:[1,30]}),{20:[1,31]},{6:D,7:H,10:32,11:$},{1:[2,7],6:i,12:21,13:l,14:14,15:f,16:h,17:17,18:18,19:p,22:y},t(W,[2,14],{7:X,11:q}),t(I,[2,8]),t(I,[2,9]),t(I,[2,10]),t(b,[2,15]),t(b,[2,16]),t(b,[2,17]),{20:[1,35]},{21:[1,36]},t(W,[2,13],{7:X,11:q}),t(I,[2,11]),t(I,[2,12]),{21:[1,37]},t(b,[2,25]),t(b,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:a.__name(function(s,n){if(n.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=n,o}},"parseError"),parse:a.__name(function(s){var n=this,o=[0],c=[],g=[null],r=[],R=this.table,d="",A=0,Y=0,te=2,Q=1,ne=r.slice.call(arguments,1),m=Object.create(this.lexer),v={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(v.yy[V]=this.yy[V]);m.setInput(s,v.yy),v.yy.lexer=m,v.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var B=m.yylloc;r.push(B);var ie=m.options&&m.options.ranges;typeof v.yy.parseError=="function"?this.parseError=v.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function se(S){o.length=o.length-2*S,g.length=g.length-S,r.length=r.length-S}a.__name(se,"popStack");function J(){var S;return S=c.pop()||m.lex()||Q,typeof S!="number"&&(S instanceof Array&&(c=S,S=c.pop()),S=n.symbols_[S]||S),S}a.__name(J,"lex");for(var E,T,N,F,C={},U,k,K,P;;){if(T=o[o.length-1],this.defaultActions[T]?N=this.defaultActions[T]:((E===null||typeof E>"u")&&(E=J()),N=R[T]&&R[T][E]),typeof N>"u"||!N.length||!N[0]){var j="";P=[];for(U in R[T])this.terminals_[U]&&U>te&&P.push("'"+this.terminals_[U]+"'");m.showPosition?j="Parse error on line "+(A+1)+`:
2
- `+m.showPosition()+`
3
- Expecting `+P.join(", ")+", got '"+(this.terminals_[E]||E)+"'":j="Parse error on line "+(A+1)+": Unexpected "+(E==Q?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(j,{text:m.match,token:this.terminals_[E]||E,line:m.yylineno,loc:B,expected:P})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+E);switch(N[0]){case 1:o.push(E),g.push(m.yytext),r.push(m.yylloc),o.push(N[1]),E=null,Y=m.yyleng,d=m.yytext,A=m.yylineno,B=m.yylloc;break;case 2:if(k=this.productions_[N[1]][1],C.$=g[g.length-k],C._$={first_line:r[r.length-(k||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(k||1)].first_column,last_column:r[r.length-1].last_column},ie&&(C._$.range=[r[r.length-(k||1)].range[0],r[r.length-1].range[1]]),F=this.performAction.apply(C,[d,Y,A,v.yy,N[1],g,r].concat(ne)),typeof F<"u")return F;k&&(o=o.slice(0,-1*k*2),g=g.slice(0,-1*k),r=r.slice(0,-1*k)),o.push(this.productions_[N[1]][0]),g.push(C.$),r.push(C._$),K=R[o[o.length-2]][o[o.length-1]],o.push(K);break;case 3:return!0}}return!0},"parse")},ee=(function(){var x={EOF:1,parseError:a.__name(function(n,o){if(this.yy.parser)this.yy.parser.parseError(n,o);else throw new Error(n)},"parseError"),setInput:a.__name(function(s,n){return this.yy=n||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:a.__name(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(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:a.__name(function(s){var n=s.length,o=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;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 g=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-n},this.options.ranges&&(this.yylloc.range=[g[0],g[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:a.__name(function(){return this._more=!0,this},"more"),reject:a.__name(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
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a.__name(function(s){this.unput(this.match.slice(s))},"less"),pastInput:a.__name(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:a.__name(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:a.__name(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
5
- `+n+"^"},"showPosition"),test_match:a.__name(function(s,n){var o,c,g;if(this.options.backtrack_lexer&&(g={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&&(g.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,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var r in g)this[r]=g[r];return!1}return!1},"test_match"),next:a.__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,n,o,c;this._more||(this.yytext="",this.match="");for(var g=this._currentRules(),r=0;r<g.length;r++)if(o=this._input.match(this.rules[g[r]]),o&&(!n||o[0].length>n[0].length)){if(n=o,c=r,this.options.backtrack_lexer){if(s=this.test_match(o,g[r]),s!==!1)return s;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(s=this.test_match(n,g[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:a.__name(function(){var n=this.next();return n||this.lex()},"lex"),begin:a.__name(function(n){this.conditionStack.push(n)},"begin"),popState:a.__name(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a.__name(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:a.__name(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:a.__name(function(n){this.begin(n)},"pushState"),stateStackSize:a.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a.__name(function(n,o,c,g){switch(c){case 0:return n.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:n.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return n.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:n.getLogger().trace("end icon"),this.popState();break;case 10:return n.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return n.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return n.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return n.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:n.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return n.getLogger().trace("description:",o.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),n.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),n.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),n.getLogger().trace("node end ...",o.yytext),"NODE_DEND";case 30:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 35:return n.getLogger().trace("Long description:",o.yytext),20;case 36:return n.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 x})();M.lexer=ee;function w(){this.yy={}}return a.__name(w,"Parser"),w.prototype=M,M.Parser=w,new w})();z.parser=z;var ge=z,L={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},O,ue=(O=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 i=this.nodes.length-1;i>=0;i--)if(this.nodes[i].level<e)return this.nodes[i];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,i,l,f){a.log.info("addNode",e,i,l,f);let h=!1;this.nodes.length===0?(this.baseLevel=e,e=0,h=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,h=!1);const p=a.getConfig2();let y=p.mindmap?.padding??a.defaultConfig_default.mindmap.padding;switch(f){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:y*=2;break}const u={id:this.count++,nodeId:a.sanitizeText(i,p),level:e,descr:a.sanitizeText(l,p),type:f,children:[],width:p.mindmap?.maxNodeWidth??a.defaultConfig_default.mindmap.maxNodeWidth,padding:y,isRoot:h},D=this.getParent(e);if(D)D.children.push(u),this.nodes.push(u);else if(h)this.nodes.push(u);else throw new Error(`There can be only one root. No parent could be found for ("${u.descr}")`)}getType(e,i){switch(a.log.debug("In get type",e,i),e){case"[":return this.nodeType.RECT;case"(":return i===")"?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,i){this.elements[e]=i}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;const i=a.getConfig2(),l=this.nodes[this.nodes.length-1];e.icon&&(l.icon=a.sanitizeText(e.icon,i)),e.class&&(l.class=a.sanitizeText(e.class,i))}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,i){if(e.level===0?e.section=void 0:e.section=i,e.children)for(const[l,f]of e.children.entries()){const h=e.level===0?l:i;this.assignSections(f,h)}}flattenNodes(e,i){const l=["mindmap-node"];e.isRoot===!0?l.push("section-root","section--1"):e.section!==void 0&&l.push(`section-${e.section}`),e.class&&l.push(e.class);const f=l.join(" "),h=a.__name(y=>{switch(y){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"defaultMindmapNode";case L.NO_BORDER:default:return"rect"}},"getShapeFromType"),p={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,isGroup:!1,shape:h(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:f,cssStyles:[],look:"default",icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(i.push(p),e.children)for(const y of e.children)this.flattenNodes(y,i)}generateEdges(e,i){if(e.children)for(const l of e.children){let f="edge";l.section!==void 0&&(f+=` section-edge-${l.section}`);const h=e.level+1;f+=` edge-depth-${h}`;const p={id:`edge_${e.id}_${l.id}`,start:e.id.toString(),end:l.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:"default",classes:f,depth:e.level,section:l.section};i.push(p),this.generateEdges(l,i)}}getData(){const e=this.getMindmap(),i=a.getConfig2(),f=a.getUserDefinedConfig().layout!==void 0,h=i;if(f||(h.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:h};a.log.debug("getData: mindmapRoot",e,i),this.assignSections(e);const p=[],y=[];this.flattenNodes(e,p),this.generateEdges(e,y),a.log.debug(`getData: processed ${p.length} nodes and ${y.length} edges`);const u=new Map;for(const D of p)u.set(D.id,{shape:D.shape,width:D.width,height:D.height,padding:D.padding});return{nodes:p,edges:y,config:h,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(u),type:"mindmap",diagramId:"mindmap-"+de()}}getLogger(){return a.log}},a.__name(O,"MindmapDB"),O),pe=a.__name(async(t,e,i,l)=>{a.log.debug(`Rendering mindmap diagram
7
- `+t);const f=l.db,h=f.getData(),p=re.getDiagramElement(e,h.config.securityLevel);h.type=l.type,h.layoutAlgorithm=a.getRegisteredLayoutAlgorithm(h.config.layout,{fallback:"cose-bilkent"}),h.diagramId=e,f.getMindmap()&&(h.nodes.forEach(u=>{u.shape==="rounded"?(u.radius=15,u.taper=15,u.stroke="none",u.width=0,u.padding=15):u.shape==="circle"?u.padding=10:u.shape==="rect"&&(u.width=0,u.padding=10)}),await a.render(h,p),ae.setupViewPortForSVG(p,h.config.mindmap?.padding??a.defaultConfig_default.mindmap.padding,"mindmapDiagram",h.config.mindmap?.useMaxWidth??a.defaultConfig_default.mindmap.useMaxWidth))},"draw"),fe={draw:pe},me=a.__name(t=>{let e="";for(let i=0;i<t.THEME_COLOR_LIMIT;i++)t["lineColor"+i]=t["lineColor"+i]||t["cScaleInv"+i],a.isDark(t["lineColor"+i])?t["lineColor"+i]=a.lighten(t["lineColor"+i],20):t["lineColor"+i]=a.darken(t["lineColor"+i],20);for(let i=0;i<t.THEME_COLOR_LIMIT;i++){const l=""+(17-3*i);e+=`
8
- .section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} polygon, .section-${i-1} path {
9
- fill: ${t["cScale"+i]};
10
- }
11
- .section-${i-1} text {
12
- fill: ${t["cScaleLabel"+i]};
13
- }
14
- .node-icon-${i-1} {
15
- font-size: 40px;
16
- color: ${t["cScaleLabel"+i]};
17
- }
18
- .section-edge-${i-1}{
19
- stroke: ${t["cScale"+i]};
20
- }
21
- .edge-depth-${i-1}{
22
- stroke-width: ${l};
23
- }
24
- .section-${i-1} line {
25
- stroke: ${t["cScaleInv"+i]} ;
26
- stroke-width: 3;
27
- }
28
-
29
- .disabled, .disabled circle, .disabled text {
30
- fill: lightgray;
31
- }
32
- .disabled text {
33
- fill: #efefef;
34
- }
35
- `}return e},"genSections"),ye=a.__name(t=>`
36
- .edge {
37
- stroke-width: 3;
38
- }
39
- ${me(t)}
40
- .section-root rect, .section-root path, .section-root circle, .section-root polygon {
41
- fill: ${t.git0};
42
- }
43
- .section-root text {
44
- fill: ${t.gitBranchLabel0};
45
- }
46
- .section-root span {
47
- color: ${t.gitBranchLabel0};
48
- }
49
- .section-2 span {
50
- color: ${t.gitBranchLabel0};
51
- }
52
- .icon-container {
53
- height:100%;
54
- display: flex;
55
- justify-content: center;
56
- align-items: center;
57
- }
58
- .edge {
59
- fill: none;
60
- }
61
- .mindmap-node-label {
62
- dy: 1em;
63
- alignment-baseline: middle;
64
- text-anchor: middle;
65
- dominant-baseline: middle;
66
- text-align: center;
67
- }
68
- `,"getStyles"),_e=ye,Ee={get db(){return new ue},renderer:fe,parser:ge,styles:_e};exports.diagram=Ee;
@@ -1,61 +0,0 @@
1
- import { i as a } from "./init-DjUOC4st.js";
2
- class o extends Map {
3
- constructor(n, t = g) {
4
- if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: t } }), n != null) for (const [r, s] of n) this.set(r, s);
5
- }
6
- get(n) {
7
- return super.get(c(this, n));
8
- }
9
- has(n) {
10
- return super.has(c(this, n));
11
- }
12
- set(n, t) {
13
- return super.set(l(this, n), t);
14
- }
15
- delete(n) {
16
- return super.delete(p(this, n));
17
- }
18
- }
19
- function c({ _intern: e, _key: n }, t) {
20
- const r = n(t);
21
- return e.has(r) ? e.get(r) : t;
22
- }
23
- function l({ _intern: e, _key: n }, t) {
24
- const r = n(t);
25
- return e.has(r) ? e.get(r) : (e.set(r, t), t);
26
- }
27
- function p({ _intern: e, _key: n }, t) {
28
- const r = n(t);
29
- return e.has(r) && (t = e.get(r), e.delete(r)), t;
30
- }
31
- function g(e) {
32
- return e !== null && typeof e == "object" ? e.valueOf() : e;
33
- }
34
- const f = /* @__PURE__ */ Symbol("implicit");
35
- function h() {
36
- var e = new o(), n = [], t = [], r = f;
37
- function s(u) {
38
- let i = e.get(u);
39
- if (i === void 0) {
40
- if (r !== f) return r;
41
- e.set(u, i = n.push(u) - 1);
42
- }
43
- return t[i % t.length];
44
- }
45
- return s.domain = function(u) {
46
- if (!arguments.length) return n.slice();
47
- n = [], e = new o();
48
- for (const i of u)
49
- e.has(i) || e.set(i, n.push(i) - 1);
50
- return s;
51
- }, s.range = function(u) {
52
- return arguments.length ? (t = Array.from(u), s) : t.slice();
53
- }, s.unknown = function(u) {
54
- return arguments.length ? (r = u, s) : r;
55
- }, s.copy = function() {
56
- return h(n, t).unknown(r);
57
- }, a.apply(s, arguments), s;
58
- }
59
- export {
60
- h as o
61
- };
@@ -1 +0,0 @@
1
- "use strict";const l=require("./init-CHZsXQcr.cjs");class o extends Map{constructor(n,t=p){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),n!=null)for(const[r,s]of n)this.set(r,s)}get(n){return super.get(c(this,n))}has(n){return super.has(c(this,n))}set(n,t){return super.set(g(this,n),t)}delete(n){return super.delete(h(this,n))}}function c({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):t}function g({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):(e.set(r,t),t)}function h({_intern:e,_key:n},t){const r=n(t);return e.has(r)&&(t=e.get(r),e.delete(r)),t}function p(e){return e!==null&&typeof e=="object"?e.valueOf():e}const f=Symbol("implicit");function a(){var e=new o,n=[],t=[],r=f;function s(i){let u=e.get(i);if(u===void 0){if(r!==f)return r;e.set(i,u=n.push(i)-1)}return t[u%t.length]}return s.domain=function(i){if(!arguments.length)return n.slice();n=[],e=new o;for(const u of i)e.has(u)||e.set(u,n.push(u)-1);return s},s.range=function(i){return arguments.length?(t=Array.from(i),s):t.slice()},s.unknown=function(i){return arguments.length?(r=i,s):r},s.copy=function(){return a(n,t).unknown(r)},l.initRange.apply(s,arguments),s}exports.ordinal=a;
@@ -1,5 +0,0 @@
1
- import { P as c, a as r } from "./mermaid-parser.core-B9wV8XMP.js";
2
- export {
3
- c as PacketModule,
4
- r as createPacketServices
5
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./mermaid-parser.core-Ba9EAFlD.cjs");exports.PacketModule=e.PacketModule;exports.createPacketServices=e.createPacketServices;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./mermaid-parser.core-Ba9EAFlD.cjs");exports.PieModule=e.PieModule;exports.createPieServices=e.createPieServices;
@@ -1,5 +0,0 @@
1
- import { b as a, d as i } from "./mermaid-parser.core-B9wV8XMP.js";
2
- export {
3
- a as PieModule,
4
- i as createPieServices
5
- };
@@ -1,161 +0,0 @@
1
- import { a4 as S, a7 as F, aB as j, _ as p, g as q, s as H, a as Z, b as J, q as K, p as Q, l as z, c as X, D as Y, H as ee, N as te, e as ae, y as re, F as ne } from "./mermaid.core-B1lFjYb9.js";
2
- import { p as ie } from "./chunk-4BX2VUAB-ByoAwp1j.js";
3
- import { p as se } from "./mermaid-parser.core-B9wV8XMP.js";
4
- import { d as I } from "./arc-CyzqoBTV.js";
5
- import { o as le } from "./ordinal-B6-f3MAq.js";
6
- function oe(e, a) {
7
- return a < e ? -1 : a > e ? 1 : a >= e ? 0 : NaN;
8
- }
9
- function ce(e) {
10
- return e;
11
- }
12
- function ue() {
13
- var e = ce, a = oe, f = null, y = S(0), s = S(F), o = S(0);
14
- function l(t) {
15
- var n, c = (t = j(t)).length, d, x, m = 0, u = new Array(c), i = new Array(c), v = +y.apply(this, arguments), w = Math.min(F, Math.max(-F, s.apply(this, arguments) - v)), h, C = Math.min(Math.abs(w) / c, o.apply(this, arguments)), $ = C * (w < 0 ? -1 : 1), g;
16
- for (n = 0; n < c; ++n)
17
- (g = i[u[n] = n] = +e(t[n], n, t)) > 0 && (m += g);
18
- for (a != null ? u.sort(function(A, D) {
19
- return a(i[A], i[D]);
20
- }) : f != null && u.sort(function(A, D) {
21
- return f(t[A], t[D]);
22
- }), n = 0, x = m ? (w - c * $) / m : 0; n < c; ++n, v = h)
23
- d = u[n], g = i[d], h = v + (g > 0 ? g * x : 0) + $, i[d] = {
24
- data: t[d],
25
- index: n,
26
- value: g,
27
- startAngle: v,
28
- endAngle: h,
29
- padAngle: C
30
- };
31
- return i;
32
- }
33
- return l.value = function(t) {
34
- return arguments.length ? (e = typeof t == "function" ? t : S(+t), l) : e;
35
- }, l.sortValues = function(t) {
36
- return arguments.length ? (a = t, f = null, l) : a;
37
- }, l.sort = function(t) {
38
- return arguments.length ? (f = t, a = null, l) : f;
39
- }, l.startAngle = function(t) {
40
- return arguments.length ? (y = typeof t == "function" ? t : S(+t), l) : y;
41
- }, l.endAngle = function(t) {
42
- return arguments.length ? (s = typeof t == "function" ? t : S(+t), l) : s;
43
- }, l.padAngle = function(t) {
44
- return arguments.length ? (o = typeof t == "function" ? t : S(+t), l) : o;
45
- }, l;
46
- }
47
- var pe = ne.pie, N = {
48
- sections: /* @__PURE__ */ new Map(),
49
- showData: !1
50
- }, T = N.sections, G = N.showData, de = structuredClone(pe), ge = /* @__PURE__ */ p(() => structuredClone(de), "getConfig"), fe = /* @__PURE__ */ p(() => {
51
- T = /* @__PURE__ */ new Map(), G = N.showData, re();
52
- }, "clear"), he = /* @__PURE__ */ p(({ label: e, value: a }) => {
53
- if (a < 0)
54
- throw new Error(
55
- `"${e}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`
56
- );
57
- T.has(e) || (T.set(e, a), z.debug(`added new section: ${e}, with value: ${a}`));
58
- }, "addSection"), me = /* @__PURE__ */ p(() => T, "getSections"), ve = /* @__PURE__ */ p((e) => {
59
- G = e;
60
- }, "setShowData"), Se = /* @__PURE__ */ p(() => G, "getShowData"), L = {
61
- getConfig: ge,
62
- clear: fe,
63
- setDiagramTitle: Q,
64
- getDiagramTitle: K,
65
- setAccTitle: J,
66
- getAccTitle: Z,
67
- setAccDescription: H,
68
- getAccDescription: q,
69
- addSection: he,
70
- getSections: me,
71
- setShowData: ve,
72
- getShowData: Se
73
- }, ye = /* @__PURE__ */ p((e, a) => {
74
- ie(e, a), a.setShowData(e.showData), e.sections.map(a.addSection);
75
- }, "populateDb"), xe = {
76
- parse: /* @__PURE__ */ p(async (e) => {
77
- const a = await se("pie", e);
78
- z.debug(a), ye(a, L);
79
- }, "parse")
80
- }, we = /* @__PURE__ */ p((e) => `
81
- .pieCircle{
82
- stroke: ${e.pieStrokeColor};
83
- stroke-width : ${e.pieStrokeWidth};
84
- opacity : ${e.pieOpacity};
85
- }
86
- .pieOuterCircle{
87
- stroke: ${e.pieOuterStrokeColor};
88
- stroke-width: ${e.pieOuterStrokeWidth};
89
- fill: none;
90
- }
91
- .pieTitleText {
92
- text-anchor: middle;
93
- font-size: ${e.pieTitleTextSize};
94
- fill: ${e.pieTitleTextColor};
95
- font-family: ${e.fontFamily};
96
- }
97
- .slice {
98
- font-family: ${e.fontFamily};
99
- fill: ${e.pieSectionTextColor};
100
- font-size:${e.pieSectionTextSize};
101
- // fill: white;
102
- }
103
- .legend text {
104
- fill: ${e.pieLegendTextColor};
105
- font-family: ${e.fontFamily};
106
- font-size: ${e.pieLegendTextSize};
107
- }
108
- `, "getStyles"), Ae = we, De = /* @__PURE__ */ p((e) => {
109
- const a = [...e.values()].reduce((s, o) => s + o, 0), f = [...e.entries()].map(([s, o]) => ({ label: s, value: o })).filter((s) => s.value / a * 100 >= 1).sort((s, o) => o.value - s.value);
110
- return ue().value((s) => s.value)(f);
111
- }, "createPieArcs"), Ce = /* @__PURE__ */ p((e, a, f, y) => {
112
- z.debug(`rendering pie chart
113
- ` + e);
114
- const s = y.db, o = X(), l = Y(s.getConfig(), o.pie), t = 40, n = 18, c = 4, d = 450, x = d, m = ee(a), u = m.append("g");
115
- u.attr("transform", "translate(" + x / 2 + "," + d / 2 + ")");
116
- const { themeVariables: i } = o;
117
- let [v] = te(i.pieOuterStrokeWidth);
118
- v ??= 2;
119
- const w = l.textPosition, h = Math.min(x, d) / 2 - t, C = I().innerRadius(0).outerRadius(h), $ = I().innerRadius(h * w).outerRadius(h * w);
120
- u.append("circle").attr("cx", 0).attr("cy", 0).attr("r", h + v / 2).attr("class", "pieOuterCircle");
121
- const g = s.getSections(), A = De(g), D = [
122
- i.pie1,
123
- i.pie2,
124
- i.pie3,
125
- i.pie4,
126
- i.pie5,
127
- i.pie6,
128
- i.pie7,
129
- i.pie8,
130
- i.pie9,
131
- i.pie10,
132
- i.pie11,
133
- i.pie12
134
- ];
135
- let b = 0;
136
- g.forEach((r) => {
137
- b += r;
138
- });
139
- const W = A.filter((r) => (r.data.value / b * 100).toFixed(0) !== "0"), E = le(D);
140
- u.selectAll("mySlices").data(W).enter().append("path").attr("d", C).attr("fill", (r) => E(r.data.label)).attr("class", "pieCircle"), u.selectAll("mySlices").data(W).enter().append("text").text((r) => (r.data.value / b * 100).toFixed(0) + "%").attr("transform", (r) => "translate(" + $.centroid(r) + ")").style("text-anchor", "middle").attr("class", "slice"), u.append("text").text(s.getDiagramTitle()).attr("x", 0).attr("y", -400 / 2).attr("class", "pieTitleText");
141
- const O = [...g.entries()].map(([r, M]) => ({
142
- label: r,
143
- value: M
144
- })), k = u.selectAll(".legend").data(O).enter().append("g").attr("class", "legend").attr("transform", (r, M) => {
145
- const R = n + c, B = R * O.length / 2, V = 12 * n, U = M * R - B;
146
- return "translate(" + V + "," + U + ")";
147
- });
148
- k.append("rect").attr("width", n).attr("height", n).style("fill", (r) => E(r.label)).style("stroke", (r) => E(r.label)), k.append("text").attr("x", n + c).attr("y", n - c).text((r) => s.getShowData() ? `${r.label} [${r.value}]` : r.label);
149
- const _ = Math.max(
150
- ...k.selectAll("text").nodes().map((r) => r?.getBoundingClientRect().width ?? 0)
151
- ), P = x + t + n + c + _;
152
- m.attr("viewBox", `0 0 ${P} ${d}`), ae(m, d, P, l.useMaxWidth);
153
- }, "draw"), $e = { draw: Ce }, Fe = {
154
- parser: xe,
155
- db: L,
156
- renderer: $e,
157
- styles: Ae
158
- };
159
- export {
160
- Fe as diagram
161
- };
@@ -1,30 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./mermaid.core-C8vi9eg6.cjs"),q=require("./chunk-4BX2VUAB-B5M-5e_l.cjs"),B=require("./mermaid-parser.core-Ba9EAFlD.cjs"),N=require("./arc-DrpGAtaq.cjs"),V=require("./ordinal-CagbB1m8.cjs");function U(e,n){return n<e?-1:n>e?1:n>=e?0:NaN}function j(e){return e}function X(){var e=j,n=U,f=null,S=t.constant(0),o=t.constant(t.tau),c=t.constant(0);function s(a){var i,u=(a=t.array(a)).length,d,y,h=0,g=new Array(u),l=new Array(u),v=+S.apply(this,arguments),A=Math.min(t.tau,Math.max(-t.tau,o.apply(this,arguments)-v)),m,w=Math.min(Math.abs(A)/u,c.apply(this,arguments)),_=w*(A<0?-1:1),p;for(i=0;i<u;++i)(p=l[g[i]=i]=+e(a[i],i,a))>0&&(h+=p);for(n!=null?g.sort(function(x,D){return n(l[x],l[D])}):f!=null&&g.sort(function(x,D){return f(a[x],a[D])}),i=0,y=h?(A-u*_)/h:0;i<u;++i,v=m)d=g[i],p=l[d],m=v+(p>0?p*y:0)+_,l[d]={data:a[d],index:i,value:p,startAngle:v,endAngle:m,padAngle:w};return l}return s.value=function(a){return arguments.length?(e=typeof a=="function"?a:t.constant(+a),s):e},s.sortValues=function(a){return arguments.length?(n=a,f=null,s):n},s.sort=function(a){return arguments.length?(f=a,n=null,s):f},s.startAngle=function(a){return arguments.length?(S=typeof a=="function"?a:t.constant(+a),s):S},s.endAngle=function(a){return arguments.length?(o=typeof a=="function"?a:t.constant(+a),s):o},s.padAngle=function(a){return arguments.length?(c=typeof a=="function"?a:t.constant(+a),s):c},s}var Z=t.defaultConfig_default.pie,E={sections:new Map,showData:!1},T=E.sections,M=E.showData,H=structuredClone(Z),J=t.__name(()=>structuredClone(H),"getConfig"),K=t.__name(()=>{T=new Map,M=E.showData,t.clear()},"clear"),Q=t.__name(({label:e,value:n})=>{if(n<0)throw new Error(`"${e}" has invalid value: ${n}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);T.has(e)||(T.set(e,n),t.log.debug(`added new section: ${e}, with value: ${n}`))},"addSection"),Y=t.__name(()=>T,"getSections"),ee=t.__name(e=>{M=e},"setShowData"),te=t.__name(()=>M,"getShowData"),O={getConfig:J,clear:K,setDiagramTitle:t.setDiagramTitle,getDiagramTitle:t.getDiagramTitle,setAccTitle:t.setAccTitle,getAccTitle:t.getAccTitle,setAccDescription:t.setAccDescription,getAccDescription:t.getAccDescription,addSection:Q,getSections:Y,setShowData:ee,getShowData:te},ae=t.__name((e,n)=>{q.populateCommonDb(e,n),n.setShowData(e.showData),e.sections.map(n.addSection)},"populateDb"),ne={parse:t.__name(async e=>{const n=await B.parse("pie",e);t.log.debug(n),ae(n,O)},"parse")},re=t.__name(e=>`
2
- .pieCircle{
3
- stroke: ${e.pieStrokeColor};
4
- stroke-width : ${e.pieStrokeWidth};
5
- opacity : ${e.pieOpacity};
6
- }
7
- .pieOuterCircle{
8
- stroke: ${e.pieOuterStrokeColor};
9
- stroke-width: ${e.pieOuterStrokeWidth};
10
- fill: none;
11
- }
12
- .pieTitleText {
13
- text-anchor: middle;
14
- font-size: ${e.pieTitleTextSize};
15
- fill: ${e.pieTitleTextColor};
16
- font-family: ${e.fontFamily};
17
- }
18
- .slice {
19
- font-family: ${e.fontFamily};
20
- fill: ${e.pieSectionTextColor};
21
- font-size:${e.pieSectionTextSize};
22
- // fill: white;
23
- }
24
- .legend text {
25
- fill: ${e.pieLegendTextColor};
26
- font-family: ${e.fontFamily};
27
- font-size: ${e.pieLegendTextSize};
28
- }
29
- `,"getStyles"),ie=re,le=t.__name(e=>{const n=[...e.values()].reduce((o,c)=>o+c,0),f=[...e.entries()].map(([o,c])=>({label:o,value:c})).filter(o=>o.value/n*100>=1).sort((o,c)=>c.value-o.value);return X().value(o=>o.value)(f)},"createPieArcs"),oe=t.__name((e,n,f,S)=>{t.log.debug(`rendering pie chart
30
- `+e);const o=S.db,c=t.getConfig2(),s=t.cleanAndMerge(o.getConfig(),c.pie),a=40,i=18,u=4,d=450,y=d,h=t.selectSvgElement(n),g=h.append("g");g.attr("transform","translate("+y/2+","+d/2+")");const{themeVariables:l}=c;let[v]=t.parseFontSize(l.pieOuterStrokeWidth);v??=2;const A=s.textPosition,m=Math.min(y,d)/2-a,w=N.d3arc().innerRadius(0).outerRadius(m),_=N.d3arc().innerRadius(m*A).outerRadius(m*A);g.append("circle").attr("cx",0).attr("cy",0).attr("r",m+v/2).attr("class","pieOuterCircle");const p=o.getSections(),x=le(p),D=[l.pie1,l.pie2,l.pie3,l.pie4,l.pie5,l.pie6,l.pie7,l.pie8,l.pie9,l.pie10,l.pie11,l.pie12];let C=0;p.forEach(r=>{C+=r});const z=x.filter(r=>(r.data.value/C*100).toFixed(0)!=="0"),$=V.ordinal(D);g.selectAll("mySlices").data(z).enter().append("path").attr("d",w).attr("fill",r=>$(r.data.label)).attr("class","pieCircle"),g.selectAll("mySlices").data(z).enter().append("text").text(r=>(r.data.value/C*100).toFixed(0)+"%").attr("transform",r=>"translate("+_.centroid(r)+")").style("text-anchor","middle").attr("class","slice"),g.append("text").text(o.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText");const F=[...p.entries()].map(([r,k])=>({label:r,value:k})),b=g.selectAll(".legend").data(F).enter().append("g").attr("class","legend").attr("transform",(r,k)=>{const G=i+u,R=G*F.length/2,I=12*i,L=k*G-R;return"translate("+I+","+L+")"});b.append("rect").attr("width",i).attr("height",i).style("fill",r=>$(r.label)).style("stroke",r=>$(r.label)),b.append("text").attr("x",i+u).attr("y",i-u).text(r=>o.getShowData()?`${r.label} [${r.value}]`:r.label);const W=Math.max(...b.selectAll("text").nodes().map(r=>r?.getBoundingClientRect().width??0)),P=y+a+i+u+W;h.attr("viewBox",`0 0 ${P} ${d}`),t.configureSvgSize(h,d,P,s.useMaxWidth)},"draw"),se={draw:oe},ce={parser:ne,db:O,renderer:se,styles:ie};exports.diagram=ce;