markview-vue 0.1.9 → 0.1.13
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.
- package/dist/assets/_basePickBy-CHITUj4p.cjs +1 -0
- package/dist/assets/_basePickBy-ybeSkJfi.js +151 -0
- package/dist/assets/_baseUniq-BGLq8QRh.cjs +1 -0
- package/dist/assets/_baseUniq-xGqTUv6g.js +614 -0
- package/dist/assets/arc-Ba_uALHe.cjs +1 -0
- package/dist/assets/arc-CbsfC7zA.js +83 -0
- package/dist/assets/architecture-7HQA4BMR-B6phKgs-.js +6 -0
- package/dist/assets/architecture-7HQA4BMR-BdQzdD9-.cjs +1 -0
- package/dist/assets/architectureDiagram-VXUJARFQ-CIAXg-eb.js +4669 -0
- package/dist/assets/architectureDiagram-VXUJARFQ-DDSvQNjx.cjs +36 -0
- package/dist/assets/blockDiagram-VD42YOAC-CWR8l5l2.cjs +122 -0
- package/dist/assets/blockDiagram-VD42YOAC-wQlEggOh.js +2265 -0
- package/dist/assets/c4Diagram-YG6GDRKO-CrrMmY-D.cjs +10 -0
- package/dist/assets/c4Diagram-YG6GDRKO-FBfLZqNW.js +1581 -0
- package/dist/assets/channel-BRGQuuVl.js +5 -0
- package/dist/assets/channel-CZ4XWtuo.cjs +1 -0
- package/dist/assets/chunk-4BX2VUAB-BMbuSe4x.js +9 -0
- package/dist/assets/chunk-4BX2VUAB-FPWk2Aj8.cjs +1 -0
- package/dist/assets/chunk-55IACEB6-Cjgh_--n.cjs +1 -0
- package/dist/assets/chunk-55IACEB6-DiVv8R-7.js +8 -0
- package/dist/assets/chunk-B4BG7PRW-B_CFJmuC.cjs +165 -0
- package/dist/assets/chunk-B4BG7PRW-CObtScCP.js +1376 -0
- package/dist/assets/chunk-DI55MBZ5-BFm-KDUn.js +1382 -0
- package/dist/assets/chunk-DI55MBZ5-BZpMjriS.cjs +220 -0
- package/dist/assets/chunk-FMBD7UC4-Bo7IX0Tg.js +19 -0
- package/dist/assets/chunk-FMBD7UC4-Cd9Z8061.cjs +15 -0
- package/dist/assets/chunk-QN33PNHL-CaS89Uk_.js +20 -0
- package/dist/assets/chunk-QN33PNHL-KOmxd_kK.cjs +1 -0
- package/dist/assets/chunk-QZHKN3VN-Czbci--E.js +15 -0
- package/dist/assets/chunk-QZHKN3VN-D0_TUemW.cjs +1 -0
- package/dist/assets/chunk-TZMSLE5B-DPTrW-NE.js +64 -0
- package/dist/assets/chunk-TZMSLE5B-tWWaxsin.cjs +1 -0
- package/dist/assets/classDiagram-2ON5EDUG-BwYE0avN.js +16 -0
- package/dist/assets/classDiagram-2ON5EDUG-D6CGN0lK.cjs +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-BwYE0avN.js +16 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-D6CGN0lK.cjs +1 -0
- package/dist/assets/clone-BfRhdNm4.cjs +1 -0
- package/dist/assets/clone-CIEijpnt.js +8 -0
- package/dist/assets/cose-bilkent-S5V4N54A-CGYbjcpr.cjs +1 -0
- package/dist/assets/cose-bilkent-S5V4N54A-D8qsMnvS.js +2609 -0
- package/dist/assets/cytoscape.esm-CjI2IsL8.js +18735 -0
- package/dist/assets/cytoscape.esm-o9WRfNPd.cjs +331 -0
- package/dist/assets/dagre-6UL2VRFP-BzWnLxya.cjs +4 -0
- package/dist/assets/dagre-6UL2VRFP-C4Q40rgn.js +447 -0
- package/dist/assets/defaultLocale-BgPVtth8.js +171 -0
- package/dist/assets/defaultLocale-C4wbwF1n.cjs +1 -0
- package/dist/assets/diagram-PSM6KHXK-Cb5u6c6h.js +533 -0
- package/dist/assets/diagram-PSM6KHXK-CwWgRjfE.cjs +24 -0
- package/dist/assets/diagram-QEK2KX5R-Bi2NJFR_.js +221 -0
- package/dist/assets/diagram-QEK2KX5R-CLiJ34Ww.cjs +43 -0
- package/dist/assets/diagram-S2PKOQOG-C3UiRU3w.js +143 -0
- package/dist/assets/diagram-S2PKOQOG-OPuGn1kE.cjs +24 -0
- package/dist/assets/erDiagram-Q2GNP2WA-DVhIup4P.js +842 -0
- package/dist/assets/erDiagram-Q2GNP2WA-mrezvRlN.cjs +60 -0
- package/dist/assets/flowDiagram-NV44I4VS-BI2afYbF.js +1627 -0
- package/dist/assets/flowDiagram-NV44I4VS-uldiRJtW.cjs +162 -0
- package/dist/assets/ganttDiagram-JELNMOA3-B8_pSkSq.js +2671 -0
- package/dist/assets/ganttDiagram-JELNMOA3-XTesuTLx.cjs +267 -0
- package/dist/assets/gitGraph-G5XIXVHT-C3nHpXwk.js +6 -0
- package/dist/assets/gitGraph-G5XIXVHT-DEcLAdEU.cjs +1 -0
- package/dist/assets/gitGraphDiagram-V2S2FVAM-CTOC3DiT.cjs +65 -0
- package/dist/assets/gitGraphDiagram-V2S2FVAM-Cnf8w3oC.js +712 -0
- package/dist/assets/graph-BuIO7SSf.js +247 -0
- package/dist/assets/graph-p9DI0XAm.cjs +1 -0
- package/dist/assets/index-C69mIz56.js +44761 -0
- package/dist/assets/index-C9QevtQd.cjs +547 -0
- package/dist/assets/info-VBDWY6EO-BsNozlXs.cjs +1 -0
- package/dist/assets/info-VBDWY6EO-C_OL8dwF.js +6 -0
- package/dist/assets/infoDiagram-HS3SLOUP-BiRaPpy-.cjs +2 -0
- package/dist/assets/infoDiagram-HS3SLOUP-DguMzWUX.js +24 -0
- package/dist/assets/init-CHZsXQcr.cjs +1 -0
- package/dist/assets/init-DjUOC4st.js +16 -0
- package/dist/assets/journeyDiagram-XKPGCS4Q-DrmZKsPZ.cjs +139 -0
- package/dist/assets/journeyDiagram-XKPGCS4Q-SAJGgxHv.js +834 -0
- package/dist/assets/kanban-definition-3W4ZIXB7-CACD_qKY.cjs +89 -0
- package/dist/assets/kanban-definition-3W4ZIXB7-Dqllh40x.js +721 -0
- package/dist/assets/layout-BfkZhPei.js +1335 -0
- package/dist/assets/layout-DJMp8xuD.cjs +1 -0
- package/dist/assets/linear-B9X-K1ie.js +259 -0
- package/dist/assets/linear-qhmmwiXh.cjs +1 -0
- package/dist/assets/mermaid-parser.core-9igjpGWA.js +17976 -0
- package/dist/assets/mermaid-parser.core-CdI_2l2U.cjs +160 -0
- package/dist/assets/mermaid.core-C0ptc8Ci.js +15357 -0
- package/dist/assets/mermaid.core-D53Nknii.cjs +255 -0
- package/dist/assets/mindmap-definition-VGOIOE7T-C5GlPlyz.cjs +68 -0
- package/dist/assets/mindmap-definition-VGOIOE7T-D9ynDOFV.js +787 -0
- package/dist/assets/ordinal-CagbB1m8.cjs +1 -0
- package/dist/assets/ordinal-DfAQgscy.js +61 -0
- package/dist/assets/packet-DYOGHKS2-1rlG7uoS.js +6 -0
- package/dist/assets/packet-DYOGHKS2-DZgqFf8l.cjs +1 -0
- package/dist/assets/pie-VRWISCQL-BuCxcsRA.cjs +1 -0
- package/dist/assets/pie-VRWISCQL-CSl0KPjm.js +6 -0
- package/dist/assets/pieDiagram-ADFJNKIX-DJy51I_a.cjs +30 -0
- package/dist/assets/pieDiagram-ADFJNKIX-beKcRjnx.js +161 -0
- package/dist/assets/quadrantDiagram-AYHSOK5B-CHvt8eYr.js +1024 -0
- package/dist/assets/quadrantDiagram-AYHSOK5B-DW0ytD6Y.cjs +7 -0
- package/dist/assets/radar-ZZBFDIW7-CTFB0BiB.cjs +1 -0
- package/dist/assets/radar-ZZBFDIW7-rwWCZwIk.js +6 -0
- package/dist/assets/requirementDiagram-UZGBJVZJ-BRAtpmw9.js +852 -0
- package/dist/assets/requirementDiagram-UZGBJVZJ-BaBtXpY5.cjs +64 -0
- package/dist/assets/sankeyDiagram-TZEHDZUN-CC-AD2xc.cjs +10 -0
- package/dist/assets/sankeyDiagram-TZEHDZUN-jQduv77E.js +810 -0
- package/dist/assets/sequenceDiagram-WL72ISMW-CMJL0tZT.cjs +145 -0
- package/dist/assets/sequenceDiagram-WL72ISMW-DeVW1A54.js +2518 -0
- package/dist/assets/stateDiagram-FKZM4ZOC-BlHSDL2f.js +263 -0
- package/dist/assets/stateDiagram-FKZM4ZOC-D8dN0qMe.cjs +1 -0
- package/dist/assets/stateDiagram-v2-4FDKWEC3-B5KcJcLk.cjs +1 -0
- package/dist/assets/stateDiagram-v2-4FDKWEC3-D6MOxCaK.js +16 -0
- package/dist/assets/timeline-definition-IT6M3QCI-CQQMX29d.js +799 -0
- package/dist/assets/timeline-definition-IT6M3QCI-DPNrBMbj.cjs +61 -0
- package/dist/assets/treemap-GDKQZRPO-BRkjlMcy.js +6 -0
- package/dist/assets/treemap-GDKQZRPO-DXgt6YFC.cjs +1 -0
- package/dist/assets/xychartDiagram-PRI3JC2R-BymhHCL4.cjs +7 -0
- package/dist/assets/xychartDiagram-PRI3JC2R-ZD4dLllP.js +1340 -0
- package/dist/index.cjs +1 -537
- package/dist/index.d.ts +182 -35
- package/dist/index.js +68 -44394
- package/dist/style.css +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./mermaid.core-D53Nknii.cjs"),tt=require("./arc-Ba_uALHe.cjs");var K=(function(){var r=n.__name(function(_,s,a,h){for(a=a||{},h=_.length;h--;a[_[h]]=s);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],i=[1,11],d=[1,12],c=[1,13],y=[1,16],f=[1,17],p={trace:n.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:n.__name(function(s,a,h,u,g,o,S){var x=o.length-1;switch(g){case 1:return o[x-1];case 2:this.$=[];break;case 3:o[x-1].push(o[x]),this.$=o[x-1];break;case 4:case 5:this.$=o[x];break;case 6:case 7:this.$=[];break;case 8:u.getCommonDb().setDiagramTitle(o[x].substr(6)),this.$=o[x].substr(6);break;case 9:this.$=o[x].trim(),u.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[x].trim(),u.getCommonDb().setAccDescription(this.$);break;case 12:u.addSection(o[x].substr(8)),this.$=o[x].substr(8);break;case 15:u.addTask(o[x],0,""),this.$=o[x];break;case 16:u.addEvent(o[x].substr(2)),this.$=o[x];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},r(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:i,16:d,17:c,18:14,19:15,20:y,21:f},r(t,[2,7],{1:[2,1]}),r(t,[2,3]),{9:18,11:e,12:l,14:i,16:d,17:c,18:14,19:15,20:y,21:f},r(t,[2,5]),r(t,[2,6]),r(t,[2,8]),{13:[1,19]},{15:[1,20]},r(t,[2,11]),r(t,[2,12]),r(t,[2,13]),r(t,[2,14]),r(t,[2,15]),r(t,[2,16]),r(t,[2,4]),r(t,[2,9]),r(t,[2,10])],defaultActions:{},parseError:n.__name(function(s,a){if(a.recoverable)this.trace(s);else{var h=new Error(s);throw h.hash=a,h}},"parseError"),parse:n.__name(function(s){var a=this,h=[0],u=[],g=[null],o=[],S=this.table,x="",$=0,A=0,W=2,U=1,B=o.slice.call(arguments,1),k=Object.create(this.lexer),I={yy:{}};for(var N in this.yy)Object.prototype.hasOwnProperty.call(this.yy,N)&&(I.yy[N]=this.yy[N]);k.setInput(s,I.yy),I.yy.lexer=k,I.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var b=k.yylloc;o.push(b);var L=k.options&&k.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function C(E){h.length=h.length-2*E,g.length=g.length-E,o.length=o.length-E}n.__name(C,"popStack");function P(){var E;return E=u.pop()||k.lex()||U,typeof E!="number"&&(E instanceof Array&&(u=E,E=u.pop()),E=a.symbols_[E]||E),E}n.__name(P,"lex");for(var w,M,T,Z,F={},O,H,D,j;;){if(M=h[h.length-1],this.defaultActions[M]?T=this.defaultActions[M]:((w===null||typeof w>"u")&&(w=P()),T=S[M]&&S[M][w]),typeof T>"u"||!T.length||!T[0]){var J="";j=[];for(O in S[M])this.terminals_[O]&&O>W&&j.push("'"+this.terminals_[O]+"'");k.showPosition?J="Parse error on line "+($+1)+`:
|
|
2
|
+
`+k.showPosition()+`
|
|
3
|
+
Expecting `+j.join(", ")+", got '"+(this.terminals_[w]||w)+"'":J="Parse error on line "+($+1)+": Unexpected "+(w==U?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(J,{text:k.match,token:this.terminals_[w]||w,line:k.yylineno,loc:b,expected:j})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+M+", token: "+w);switch(T[0]){case 1:h.push(w),g.push(k.yytext),o.push(k.yylloc),h.push(T[1]),w=null,A=k.yyleng,x=k.yytext,$=k.yylineno,b=k.yylloc;break;case 2:if(H=this.productions_[T[1]][1],F.$=g[g.length-H],F._$={first_line:o[o.length-(H||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(H||1)].first_column,last_column:o[o.length-1].last_column},L&&(F._$.range=[o[o.length-(H||1)].range[0],o[o.length-1].range[1]]),Z=this.performAction.apply(F,[x,A,$,I.yy,T[1],g,o].concat(B)),typeof Z<"u")return Z;H&&(h=h.slice(0,-1*H*2),g=g.slice(0,-1*H),o=o.slice(0,-1*H)),h.push(this.productions_[T[1]][0]),g.push(F.$),o.push(F._$),D=S[h[h.length-2]][h[h.length-1]],h.push(D);break;case 3:return!0}}return!0},"parse")},m=(function(){var _={EOF:1,parseError:n.__name(function(a,h){if(this.yy.parser)this.yy.parser.parseError(a,h);else throw new Error(a)},"parseError"),setInput:n.__name(function(s,a){return this.yy=a||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:n.__name(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var a=s.match(/(?:\r\n?|\n).*/g);return a?(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:n.__name(function(s){var a=s.length,h=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var u=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),h.length-1&&(this.yylineno-=h.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:h?(h.length===u.length?this.yylloc.first_column:0)+u[u.length-h.length].length-h[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[g[0],g[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:n.__name(function(){return this._more=!0,this},"more"),reject:n.__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:n.__name(function(s){this.unput(this.match.slice(s))},"less"),pastInput:n.__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:n.__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:n.__name(function(){var s=this.pastInput(),a=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
5
|
+
`+a+"^"},"showPosition"),test_match:n.__name(function(s,a){var h,u,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))),u=s[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.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],h=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var o in g)this[o]=g[o];return!1}return!1},"test_match"),next:n.__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,a,h,u;this._more||(this.yytext="",this.match="");for(var g=this._currentRules(),o=0;o<g.length;o++)if(h=this._input.match(this.rules[g[o]]),h&&(!a||h[0].length>a[0].length)){if(a=h,u=o,this.options.backtrack_lexer){if(s=this.test_match(h,g[o]),s!==!1)return s;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(s=this.test_match(a,g[u]),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:n.__name(function(){var a=this.next();return a||this.lex()},"lex"),begin:n.__name(function(a){this.conditionStack.push(a)},"begin"),popState:n.__name(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:n.__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:n.__name(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:n.__name(function(a){this.begin(a)},"pushState"),stateStackSize:n.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:n.__name(function(a,h,u,g){switch(u){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};return _})();p.lexer=m;function v(){this.yy={}}return n.__name(v,"Parser"),v.prototype=p,p.Parser=v,new v})();K.parser=K;var _t=K,it={};n.__export(it,{addEvent:()=>ut,addSection:()=>ot,addTask:()=>dt,addTaskOrg:()=>pt,clear:()=>lt,default:()=>ft,getCommonDb:()=>at,getSections:()=>ct,getTasks:()=>ht});var z="",st=0,Q=[],G=[],V=[],at=n.__name(()=>n.commonDb_exports,"getCommonDb"),lt=n.__name(function(){Q.length=0,G.length=0,z="",V.length=0,n.clear()},"clear"),ot=n.__name(function(r){z=r,Q.push(r)},"addSection"),ct=n.__name(function(){return Q},"getSections"),ht=n.__name(function(){let r=et();const t=100;let e=0;for(;!r&&e<t;)r=et(),e++;return G.push(...V),G},"getTasks"),dt=n.__name(function(r,t,e){const l={id:st++,section:z,type:z,task:r,score:t||0,events:e?[e]:[]};V.push(l)},"addTask"),ut=n.__name(function(r){V.find(e=>e.id===st-1).events.push(r)},"addEvent"),pt=n.__name(function(r){const t={section:z,type:z,description:r,task:r,classes:[]};G.push(t)},"addTaskOrg"),et=n.__name(function(){const r=n.__name(function(e){return V[e].processed},"compileTask");let t=!0;for(const[e,l]of V.entries())r(e),t=t&&l.processed;return t},"compileTasks"),ft={clear:lt,getCommonDb:at,addSection:ot,getSections:ct,getTasks:ht,addTask:dt,addTaskOrg:pt,addEvent:ut},mt=12,q=n.__name(function(r,t){const e=r.append("rect");return e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),e.attr("rx",t.rx),e.attr("ry",t.ry),t.class!==void 0&&e.attr("class",t.class),e},"drawRect"),xt=n.__name(function(r,t){const l=r.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=r.append("g");i.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function d(f){const p=tt.d3arc().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);f.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}n.__name(d,"smile");function c(f){const p=tt.d3arc().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);f.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}n.__name(c,"sad");function y(f){f.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return n.__name(y,"ambivalent"),t.score>3?d(i):t.score<3?c(i):y(i),l},"drawFace"),kt=n.__name(function(r,t){const e=r.append("circle");return e.attr("cx",t.cx),e.attr("cy",t.cy),e.attr("class","actor-"+t.pos),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("r",t.r),e.class!==void 0&&e.attr("class",e.class),t.title!==void 0&&e.append("title").text(t.title),e},"drawCircle"),gt=n.__name(function(r,t){const e=t.text.replace(/<br\s*\/?>/gi," "),l=r.append("text");l.attr("x",t.x),l.attr("y",t.y),l.attr("class","legend"),l.style("text-anchor",t.anchor),t.class!==void 0&&l.attr("class",t.class);const i=l.append("tspan");return i.attr("x",t.x+t.textMargin*2),i.text(e),l},"drawText"),vt=n.__name(function(r,t){function e(i,d,c,y,f){return i+","+d+" "+(i+c)+","+d+" "+(i+c)+","+(d+y-f)+" "+(i+c-f*1.2)+","+(d+y)+" "+i+","+(d+y)}n.__name(e,"genPoints");const l=r.append("polygon");l.attr("points",e(t.x,t.y,50,20,7)),l.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,gt(r,t)},"drawLabel"),bt=n.__name(function(r,t,e){const l=r.append("g"),i=X();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=e.width,i.height=e.height,i.class="journey-section section-type-"+t.num,i.rx=3,i.ry=3,q(l,i),yt(e)(t.text,l,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},e,t.colour)},"drawSection"),nt=-1,wt=n.__name(function(r,t,e){const l=t.x+e.width/2,i=r.append("g");nt++,i.append("line").attr("id","task"+nt).attr("x1",l).attr("y1",t.y).attr("x2",l).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),xt(i,{cx:l,cy:300+(5-t.score)*30,score:t.score});const c=X();c.x=t.x,c.y=t.y,c.fill=t.fill,c.width=e.width,c.height=e.height,c.class="task task-type-"+t.num,c.rx=3,c.ry=3,q(i,c),yt(e)(t.task,i,c.x,c.y,c.width,c.height,{class:"task"},e,t.colour)},"drawTask"),St=n.__name(function(r,t){q(r,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),Et=n.__name(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),X=n.__name(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),yt=(function(){function r(i,d,c,y,f,p,m,v){const _=d.append("text").attr("x",c+f/2).attr("y",y+p/2+5).style("font-color",v).style("text-anchor","middle").text(i);l(_,m)}n.__name(r,"byText");function t(i,d,c,y,f,p,m,v,_){const{taskFontSize:s,taskFontFamily:a}=v,h=i.split(/<br\s*\/?>/gi);for(let u=0;u<h.length;u++){const g=u*s-s*(h.length-1)/2,o=d.append("text").attr("x",c+f/2).attr("y",y).attr("fill",_).style("text-anchor","middle").style("font-size",s).style("font-family",a);o.append("tspan").attr("x",c+f/2).attr("dy",g).text(h[u]),o.attr("y",y+p/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),l(o,m)}}n.__name(t,"byTspan");function e(i,d,c,y,f,p,m,v){const _=d.append("switch"),a=_.append("foreignObject").attr("x",c).attr("y",y).attr("width",f).attr("height",p).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");a.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),t(i,_,c,y,f,p,m,v),l(a,m)}n.__name(e,"byFo");function l(i,d){for(const c in d)c in d&&i.attr(c,d[c])}return n.__name(l,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?e:i.textPlacement==="old"?r:t}})(),Tt=n.__name(function(r){r.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics");function Y(r,t){r.each(function(){var e=n.select(this),l=e.text().split(/(\s+|<br>)/).reverse(),i,d=[],c=1.1,y=e.attr("y"),f=parseFloat(e.attr("dy")),p=e.text(null).append("tspan").attr("x",0).attr("y",y).attr("dy",f+"em");for(let m=0;m<l.length;m++)i=l[l.length-1-m],d.push(i),p.text(d.join(" ").trim()),(p.node().getComputedTextLength()>t||i==="<br>")&&(d.pop(),p.text(d.join(" ").trim()),i==="<br>"?d=[""]:d=[i],p=e.append("tspan").attr("x",0).attr("y",y).attr("dy",c+"em").text(i))})}n.__name(Y,"wrap");var It=n.__name(function(r,t,e,l){var v;const i=e%mt-1,d=r.append("g");t.section=i,d.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+i));const c=d.append("g"),y=d.append("g"),p=y.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(Y,t.width).node().getBBox(),m=(v=l.fontSize)!=null&&v.replace?l.fontSize.replace("px",""):l.fontSize;return t.height=p.height+m*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,y.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),$t(c,t,i,l),t},"drawNode"),Nt=n.__name(function(r,t,e){var y;const l=r.append("g"),d=l.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(Y,t.width).node().getBBox(),c=(y=e.fontSize)!=null&&y.replace?e.fontSize.replace("px",""):e.fontSize;return l.remove(),d.height+c*1.1*.5+t.padding},"getVirtualNodeHeight"),$t=n.__name(function(r,t,e){r.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d",`M0 ${t.height-5} v${-t.height+10} q0,-5 5,-5 h${t.width-10} q5,0 5,5 v${t.height-5} H0 Z`),r.append("line").attr("class","node-line-"+e).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),R={drawRect:q,drawCircle:kt,drawSection:bt,drawText:gt,drawLabel:vt,drawTask:wt,drawBackgroundRect:St,getTextObj:Et,getNoteRect:X,initGraphics:Tt,drawNode:It,getVirtualNodeHeight:Nt},Lt=n.__name(function(r,t,e,l){var B,k,I;const i=n.getConfig2(),d=((B=i.timeline)==null?void 0:B.leftMargin)??50;n.log.debug("timeline",l.db);const c=i.securityLevel;let y;c==="sandbox"&&(y=n.select("#i"+t));const p=(c==="sandbox"?n.select(y.nodes()[0].contentDocument.body):n.select("body")).select("#"+t);p.append("g");const m=l.db.getTasks(),v=l.db.getCommonDb().getDiagramTitle();n.log.debug("task",m),R.initGraphics(p);const _=l.db.getSections();n.log.debug("sections",_);let s=0,a=0,h=0,u=0,g=50+d,o=50;u=50;let S=0,x=!0;_.forEach(function(N){const b={number:S,descr:N,section:S,width:150,padding:20,maxHeight:s},L=R.getVirtualNodeHeight(p,b,i);n.log.debug("sectionHeight before draw",L),s=Math.max(s,L+20)});let $=0,A=0;n.log.debug("tasks.length",m.length);for(const[N,b]of m.entries()){const L={number:N,descr:b,section:b.section,width:150,padding:20,maxHeight:a},C=R.getVirtualNodeHeight(p,L,i);n.log.debug("taskHeight before draw",C),a=Math.max(a,C+20),$=Math.max($,b.events.length);let P=0;for(const w of b.events){const M={descr:w,section:b.section,number:b.section,width:150,padding:20,maxHeight:50};P+=R.getVirtualNodeHeight(p,M,i)}b.events.length>0&&(P+=(b.events.length-1)*10),A=Math.max(A,P)}n.log.debug("maxSectionHeight before draw",s),n.log.debug("maxTaskHeight before draw",a),_&&_.length>0?_.forEach(N=>{const b=m.filter(w=>w.section===N),L={number:S,descr:N,section:S,width:200*Math.max(b.length,1)-50,padding:20,maxHeight:s};n.log.debug("sectionNode",L);const C=p.append("g"),P=R.drawNode(C,L,S,i);n.log.debug("sectionNode output",P),C.attr("transform",`translate(${g}, ${u})`),o+=s+50,b.length>0&&rt(p,b,S,g,o,a,i,$,A,s,!1),g+=200*Math.max(b.length,1),o=u,S++}):(x=!1,rt(p,m,S,g,o,a,i,$,A,s,!0));const W=p.node().getBBox();n.log.debug("bounds",W),v&&p.append("text").text(v).attr("x",W.width/2-d).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),h=x?s+a+150:a+100,p.append("g").attr("class","lineWrapper").append("line").attr("x1",d).attr("y1",h).attr("x2",W.width+3*d).attr("y2",h).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),n.setupGraphViewbox(void 0,p,((k=i.timeline)==null?void 0:k.padding)??50,((I=i.timeline)==null?void 0:I.useMaxWidth)??!1)},"draw"),rt=n.__name(function(r,t,e,l,i,d,c,y,f,p,m){var v;for(const _ of t){const s={descr:_.task,section:e,number:e,width:150,padding:20,maxHeight:d};n.log.debug("taskNode",s);const a=r.append("g").attr("class","taskWrapper"),u=R.drawNode(a,s,e,c).height;if(n.log.debug("taskHeight after draw",u),a.attr("transform",`translate(${l}, ${i})`),d=Math.max(d,u),_.events){const g=r.append("g").attr("class","lineWrapper");let o=d;i+=100,o=o+Mt(r,_.events,e,l,i,c),i-=100,g.append("line").attr("x1",l+190/2).attr("y1",i+d).attr("x2",l+190/2).attr("y2",i+d+100+f+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}l=l+200,m&&!((v=c.timeline)!=null&&v.disableMulticolor)&&e++}i=i-10},"drawTasks"),Mt=n.__name(function(r,t,e,l,i,d){let c=0;const y=i;i=i+100;for(const f of t){const p={descr:f,section:e,number:e,width:150,padding:20,maxHeight:50};n.log.debug("eventNode",p);const m=r.append("g").attr("class","eventWrapper"),_=R.drawNode(m,p,e,d).height;c=c+_,m.attr("transform",`translate(${l}, ${i})`),i=i+10+_}return i=y,c},"drawEvents"),Ht={setConf:n.__name(()=>{},"setConf"),draw:Lt},Pt=n.__name(r=>{let t="";for(let e=0;e<r.THEME_COLOR_LIMIT;e++)r["lineColor"+e]=r["lineColor"+e]||r["cScaleInv"+e],n.isDark(r["lineColor"+e])?r["lineColor"+e]=n.lighten(r["lineColor"+e],20):r["lineColor"+e]=n.darken(r["lineColor"+e],20);for(let e=0;e<r.THEME_COLOR_LIMIT;e++){const l=""+(17-3*e);t+=`
|
|
7
|
+
.section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} path {
|
|
8
|
+
fill: ${r["cScale"+e]};
|
|
9
|
+
}
|
|
10
|
+
.section-${e-1} text {
|
|
11
|
+
fill: ${r["cScaleLabel"+e]};
|
|
12
|
+
}
|
|
13
|
+
.node-icon-${e-1} {
|
|
14
|
+
font-size: 40px;
|
|
15
|
+
color: ${r["cScaleLabel"+e]};
|
|
16
|
+
}
|
|
17
|
+
.section-edge-${e-1}{
|
|
18
|
+
stroke: ${r["cScale"+e]};
|
|
19
|
+
}
|
|
20
|
+
.edge-depth-${e-1}{
|
|
21
|
+
stroke-width: ${l};
|
|
22
|
+
}
|
|
23
|
+
.section-${e-1} line {
|
|
24
|
+
stroke: ${r["cScaleInv"+e]} ;
|
|
25
|
+
stroke-width: 3;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.lineWrapper line{
|
|
29
|
+
stroke: ${r["cScaleLabel"+e]} ;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.disabled, .disabled circle, .disabled text {
|
|
33
|
+
fill: lightgray;
|
|
34
|
+
}
|
|
35
|
+
.disabled text {
|
|
36
|
+
fill: #efefef;
|
|
37
|
+
}
|
|
38
|
+
`}return t},"genSections"),At=n.__name(r=>`
|
|
39
|
+
.edge {
|
|
40
|
+
stroke-width: 3;
|
|
41
|
+
}
|
|
42
|
+
${Pt(r)}
|
|
43
|
+
.section-root rect, .section-root path, .section-root circle {
|
|
44
|
+
fill: ${r.git0};
|
|
45
|
+
}
|
|
46
|
+
.section-root text {
|
|
47
|
+
fill: ${r.gitBranchLabel0};
|
|
48
|
+
}
|
|
49
|
+
.icon-container {
|
|
50
|
+
height:100%;
|
|
51
|
+
display: flex;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
align-items: center;
|
|
54
|
+
}
|
|
55
|
+
.edge {
|
|
56
|
+
fill: none;
|
|
57
|
+
}
|
|
58
|
+
.eventWrapper {
|
|
59
|
+
filter: brightness(120%);
|
|
60
|
+
}
|
|
61
|
+
`,"getStyles"),Ct=At,Rt={db:it,renderer:Ht,parser:_t,styles:Ct};exports.diagram=Rt;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./mermaid-parser.core-CdI_2l2U.cjs");exports.TreemapModule=e.TreemapModule;exports.createTreemapServices=e.createTreemapServices;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./mermaid.core-D53Nknii.cjs"),oe=require("./init-CHZsXQcr.cjs"),he=require("./ordinal-CagbB1m8.cjs"),Bt=require("./linear-qhmmwiXh.cjs");function le(i,t,e){i=+i,t=+t,e=(a=arguments.length)<2?(t=i,i=0,1):a<3?1:+e;for(var s=-1,a=Math.max(0,Math.ceil((t-i)/e))|0,o=new Array(a);++s<a;)o[s]=i+s*e;return o}function yt(){var i=he.ordinal().unknown(void 0),t=i.domain,e=i.range,s=0,a=1,o,g,m=!1,p=0,k=0,v=.5;delete i.unknown;function w(){var _=t().length,E=a<s,D=E?a:s,P=E?s:a;o=(P-D)/Math.max(1,_-p+k*2),m&&(o=Math.floor(o)),D+=(P-D-o*(_-p))*v,g=o*(1-p),m&&(D=Math.round(D),g=Math.round(g));var M=le(_).map(function(y){return D+o*y});return e(E?M.reverse():M)}return i.domain=function(_){return arguments.length?(t(_),w()):t()},i.range=function(_){return arguments.length?([s,a]=_,s=+s,a=+a,w()):[s,a]},i.rangeRound=function(_){return[s,a]=_,s=+s,a=+a,m=!0,w()},i.bandwidth=function(){return g},i.step=function(){return o},i.round=function(_){return arguments.length?(m=!!_,w()):m},i.padding=function(_){return arguments.length?(p=Math.min(1,k=+_),w()):p},i.paddingInner=function(_){return arguments.length?(p=Math.min(1,_),w()):p},i.paddingOuter=function(_){return arguments.length?(k=+_,w()):k},i.align=function(_){return arguments.length?(v=Math.max(0,Math.min(1,_)),w()):v},i.copy=function(){return yt(t(),[s,a]).round(m).paddingInner(p).paddingOuter(k).align(v)},oe.initRange.apply(w(),arguments)}var _t=(function(){var i=n.__name(function(O,h,u,x){for(u=u||{},x=O.length;x--;u[O[x]]=h);return u},"o"),t=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],a=[1,5],o=[1,6],g=[1,7],m=[1,5,10,12,14,16,18,19,21,23,34,35,36],p=[1,25],k=[1,26],v=[1,28],w=[1,29],_=[1,30],E=[1,31],D=[1,32],P=[1,33],M=[1,34],y=[1,35],S=[1,36],c=[1,37],W=[1,43],z=[1,42],U=[1,47],X=[1,50],l=[1,10,12,14,16,18,19,21,23,34,35,36],L=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],C=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],T=[1,64],$={trace:n.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n.__name(function(h,u,x,d,A,r,at){var f=r.length-1;switch(A){case 5:d.setOrientation(r[f]);break;case 9:d.setDiagramTitle(r[f].text.trim());break;case 12:d.setLineData({text:"",type:"text"},r[f]);break;case 13:d.setLineData(r[f-1],r[f]);break;case 14:d.setBarData({text:"",type:"text"},r[f]);break;case 15:d.setBarData(r[f-1],r[f]);break;case 16:this.$=r[f].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=r[f].trim(),d.setAccDescription(this.$);break;case 19:this.$=r[f-1];break;case 20:this.$=[Number(r[f-2]),...r[f]];break;case 21:this.$=[Number(r[f])];break;case 22:d.setXAxisTitle(r[f]);break;case 23:d.setXAxisTitle(r[f-1]);break;case 24:d.setXAxisTitle({type:"text",text:""});break;case 25:d.setXAxisBand(r[f]);break;case 26:d.setXAxisRangeData(Number(r[f-2]),Number(r[f]));break;case 27:this.$=r[f-1];break;case 28:this.$=[r[f-2],...r[f]];break;case 29:this.$=[r[f]];break;case 30:d.setYAxisTitle(r[f]);break;case 31:d.setYAxisTitle(r[f-1]);break;case 32:d.setYAxisTitle({type:"text",text:""});break;case 33:d.setYAxisRangeData(Number(r[f-2]),Number(r[f]));break;case 37:this.$={text:r[f],type:"text"};break;case 38:this.$={text:r[f],type:"text"};break;case 39:this.$={text:r[f],type:"markdown"};break;case 40:this.$=r[f];break;case 41:this.$=r[f-1]+""+r[f];break}},"anonymous"),table:[i(t,e,{3:1,4:2,7:4,5:s,34:a,35:o,36:g}),{1:[3]},i(t,e,{4:2,7:4,3:8,5:s,34:a,35:o,36:g}),i(t,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:a,35:o,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},i(m,[2,34]),i(m,[2,35]),i(m,[2,36]),{1:[2,1]},i(t,e,{4:2,7:4,3:21,5:s,34:a,35:o,36:g}),{1:[2,3]},i(m,[2,5]),i(t,[2,7],{4:22,34:a,35:o,36:g}),{11:23,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},{11:39,13:38,24:W,27:z,29:40,30:41,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},{11:45,15:44,27:U,33:46,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},{11:49,17:48,24:X,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},{11:52,17:51,24:X,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},{20:[1,53]},{22:[1,54]},i(l,[2,18]),{1:[2,2]},i(l,[2,8]),i(l,[2,9]),i(L,[2,37],{40:55,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c}),i(L,[2,38]),i(L,[2,39]),i(C,[2,40]),i(C,[2,42]),i(C,[2,43]),i(C,[2,44]),i(C,[2,45]),i(C,[2,46]),i(C,[2,47]),i(C,[2,48]),i(C,[2,49]),i(C,[2,50]),i(C,[2,51]),i(l,[2,10]),i(l,[2,22],{30:41,29:56,24:W,27:z}),i(l,[2,24]),i(l,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},i(l,[2,11]),i(l,[2,30],{33:60,27:U}),i(l,[2,32]),{31:[1,61]},i(l,[2,12]),{17:62,24:X},{25:63,27:T},i(l,[2,14]),{17:65,24:X},i(l,[2,16]),i(l,[2,17]),i(C,[2,41]),i(l,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},i(l,[2,31]),{27:[1,69]},i(l,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},i(l,[2,15]),i(l,[2,26]),i(l,[2,27]),{11:59,32:72,37:24,38:p,39:k,40:27,41:v,42:w,43:_,44:E,45:D,46:P,47:M,48:y,49:S,50:c},i(l,[2,33]),i(l,[2,19]),{25:73,27:T},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n.__name(function(h,u){if(u.recoverable)this.trace(h);else{var x=new Error(h);throw x.hash=u,x}},"parseError"),parse:n.__name(function(h){var u=this,x=[0],d=[],A=[null],r=[],at=this.table,f="",lt=0,Et=0,se=2,Mt=1,ne=r.slice.call(arguments,1),R=Object.create(this.lexer),Y={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(Y.yy[dt]=this.yy[dt]);R.setInput(h,Y.yy),Y.yy.lexer=R,Y.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var ft=R.yylloc;r.push(ft);var ae=R.options&&R.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re(V){x.length=x.length-2*V,A.length=A.length-V,r.length=r.length-V}n.__name(re,"popStack");function It(){var V;return V=d.pop()||R.lex()||Mt,typeof V!="number"&&(V instanceof Array&&(d=V,V=d.pop()),V=u.symbols_[V]||V),V}n.__name(It,"lex");for(var I,H,B,pt,q={},ct,F,Vt,ut;;){if(H=x[x.length-1],this.defaultActions[H]?B=this.defaultActions[H]:((I===null||typeof I>"u")&&(I=It()),B=at[H]&&at[H][I]),typeof B>"u"||!B.length||!B[0]){var mt="";ut=[];for(ct in at[H])this.terminals_[ct]&&ct>se&&ut.push("'"+this.terminals_[ct]+"'");R.showPosition?mt="Parse error on line "+(lt+1)+`:
|
|
2
|
+
`+R.showPosition()+`
|
|
3
|
+
Expecting `+ut.join(", ")+", got '"+(this.terminals_[I]||I)+"'":mt="Parse error on line "+(lt+1)+": Unexpected "+(I==Mt?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(mt,{text:R.match,token:this.terminals_[I]||I,line:R.yylineno,loc:ft,expected:ut})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+I);switch(B[0]){case 1:x.push(I),A.push(R.yytext),r.push(R.yylloc),x.push(B[1]),I=null,Et=R.yyleng,f=R.yytext,lt=R.yylineno,ft=R.yylloc;break;case 2:if(F=this.productions_[B[1]][1],q.$=A[A.length-F],q._$={first_line:r[r.length-(F||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(F||1)].first_column,last_column:r[r.length-1].last_column},ae&&(q._$.range=[r[r.length-(F||1)].range[0],r[r.length-1].range[1]]),pt=this.performAction.apply(q,[f,Et,lt,Y.yy,B[1],A,r].concat(ne)),typeof pt<"u")return pt;F&&(x=x.slice(0,-1*F*2),A=A.slice(0,-1*F),r=r.slice(0,-1*F)),x.push(this.productions_[B[1]][0]),A.push(q.$),r.push(q._$),Vt=at[x[x.length-2]][x[x.length-1]],x.push(Vt);break;case 3:return!0}}return!0},"parse")},Lt=(function(){var O={EOF:1,parseError:n.__name(function(u,x){if(this.yy.parser)this.yy.parser.parseError(u,x);else throw new Error(u)},"parseError"),setInput:n.__name(function(h,u){return this.yy=u||this.yy||{},this._input=h,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:n.__name(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var u=h.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:n.__name(function(h){var u=h.length,x=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),x.length-1&&(this.yylineno-=x.length-1);var A=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:x?(x.length===d.length?this.yylloc.first_column:0)+d[d.length-x.length].length-x[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:n.__name(function(){return this._more=!0,this},"more"),reject:n.__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:n.__name(function(h){this.unput(this.match.slice(h))},"less"),pastInput:n.__name(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n.__name(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n.__name(function(){var h=this.pastInput(),u=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
|
5
|
+
`+u+"^"},"showPosition"),test_match:n.__name(function(h,u){var x,d,A;if(this.options.backtrack_lexer&&(A={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(A.yylloc.range=this.yylloc.range.slice(0))),d=h[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,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(h[0].length),this.matched+=h[0],x=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),x)return x;if(this._backtrack){for(var r in A)this[r]=A[r];return!1}return!1},"test_match"),next:n.__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,u,x,d;this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),r=0;r<A.length;r++)if(x=this._input.match(this.rules[A[r]]),x&&(!u||x[0].length>u[0].length)){if(u=x,d=r,this.options.backtrack_lexer){if(h=this.test_match(x,A[r]),h!==!1)return h;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(h=this.test_match(u,A[d]),h!==!1?h:!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:n.__name(function(){var u=this.next();return u||this.lex()},"lex"),begin:n.__name(function(u){this.conditionStack.push(u)},"begin"),popState:n.__name(function(){var u=this.conditionStack.length-1;return u>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:n.__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:n.__name(function(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:n.__name(function(u){this.begin(u)},"pushState"),stateStackSize:n.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:n.__name(function(u,x,d,A){switch(d){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return O})();$.lexer=Lt;function N(){this.yy={}}return n.__name(N,"Parser"),N.prototype=$,$.Parser=N,new N})();_t.parser=_t;var ce=_t;function bt(i){return i.type==="bar"}n.__name(bt,"isBarPlot");function Ct(i){return i.type==="band"}n.__name(Ct,"isBandAxisData");function j(i){return i.type==="linear"}n.__name(j,"isLinearAxisData");var G,Ot=(G=class{constructor(t){this.parentGroup=t}getMaxDimension(t,e){if(!this.parentGroup)return{width:t.reduce((o,g)=>Math.max(g.length,o),0)*e,height:e};const s={width:0,height:0},a=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",e);for(const o of t){const g=n.computeDimensionOfText(a,1,o),m=g?g.width:o.length*e,p=g?g.height:e;s.width=Math.max(s.width,m),s.height=Math.max(s.height,p)}return a.remove(),s}},n.__name(G,"TextDimensionCalculatorWithFont"),G),Wt=.7,zt=.2,Q,Ft=(Q=class{constructor(t,e,s,a){this.axisConfig=t,this.title=e,this.textDimensionCalculator=s,this.axisThemeConfig=a,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){Wt*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(Wt*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let e=t.height;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),a=zt*t.width;this.outerPadding=Math.min(s.width/2,a);const o=s.height+this.axisConfig.labelPadding*2;this.labelTextHeight=s.height,o<=e&&(e-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,a<=e&&(e-=a,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-e}calculateSpaceIfDrawnVertical(t){let e=t.width;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),a=zt*t.height;this.outerPadding=Math.min(s.height/2,a);const o=s.width+this.axisConfig.labelPadding*2;o<=e&&(e-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,a<=e&&(e-=a,this.showTitle=!0)}this.boundingRect.width=t.width-e,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const e=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${e},${this.boundingRect.y} L ${e},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const e=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${e},${this.getScaleValue(s)} L ${e-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const e=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const e=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${e} L ${this.getScaleValue(s)},${e+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const e=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const e=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${e+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${e+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},n.__name(Q,"BaseAxis"),Q),K,ue=(K=class extends Ft{constructor(t,e,s,a,o){super(t,a,o,e),this.categories=s,this.scale=yt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=yt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),n.log.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},n.__name(K,"BandAxis"),K),Z,ge=(Z=class extends Ft{constructor(t,e,s,a,o){super(t,a,o,e),this.domain=s,this.scale=Bt.linear().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=Bt.linear().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},n.__name(Z,"LinearAxis"),Z);function At(i,t,e,s){const a=new Ot(s);return Ct(i)?new ue(t,e,i.categories,i.title,a):new ge(t,e,[i.min,i.max],i.title,a)}n.__name(At,"getAxis");var J,xe=(J=class{constructor(t,e,s,a){this.textDimensionCalculator=t,this.chartConfig=e,this.chartData=s,this.chartThemeConfig=a,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const e=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(e.width,t.width),a=e.height+2*this.chartConfig.titlePadding;return e.width<=s&&e.height<=a&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=s,this.boundingRect.height=a,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},n.__name(J,"ChartTitle"),J);function Xt(i,t,e,s){const a=new Ot(s);return new xe(a,i,t,e)}n.__name(Xt,"getChartTitleComponent");var tt,de=(tt=class{constructor(t,e,s,a,o){this.plotData=t,this.xAxis=e,this.yAxis=s,this.orientation=a,this.plotIndex=o}getDrawableElement(){const t=this.plotData.data.map(s=>[this.xAxis.getScaleValue(s[0]),this.yAxis.getScaleValue(s[1])]);let e;return this.orientation==="horizontal"?e=n.line().y(s=>s[0]).x(s=>s[1])(t):e=n.line().x(s=>s[0]).y(s=>s[1])(t),e?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:e,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},n.__name(tt,"LinePlot"),tt),et,fe=(et=class{constructor(t,e,s,a,o,g){this.barData=t,this.boundingRect=e,this.xAxis=s,this.yAxis=a,this.orientation=o,this.plotIndex=g}getDrawableElement(){const t=this.barData.data.map(o=>[this.xAxis.getScaleValue(o[0]),this.yAxis.getScaleValue(o[1])]),s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),a=s/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:this.boundingRect.x,y:o[0]-a,height:s,width:o[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:o[0]-a,y:o[1],width:s,height:this.boundingRect.y+this.boundingRect.height-o[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},n.__name(et,"BarPlot"),et),it,pe=(it=class{constructor(t,e,s){this.chartConfig=t,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,e){this.xAxis=t,this.yAxis=e}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");const t=[];for(const[e,s]of this.chartData.plots.entries())switch(s.type){case"line":{const a=new de(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...a.getDrawableElement())}break;case"bar":{const a=new fe(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...a.getDrawableElement())}break}return t}},n.__name(it,"BasePlot"),it);function Nt(i,t,e){return new pe(i,t,e)}n.__name(Nt,"getPlotComponent");var st,me=(st=class{constructor(t,e,s,a){this.chartConfig=t,this.chartData=e,this.componentStore={title:Xt(t,e,s,a),plot:Nt(t,e,s),xAxis:At(e.xAxis,t.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},a),yAxis:At(e.yAxis,t.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},a)}}calculateVerticalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,s=0,a=0,o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),g=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),m=this.componentStore.plot.calculateSpace({width:o,height:g});t-=m.width,e-=m.height,m=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),a=m.height,e-=m.height,this.componentStore.xAxis.setAxisPosition("bottom"),m=this.componentStore.xAxis.calculateSpace({width:t,height:e}),e-=m.height,this.componentStore.yAxis.setAxisPosition("left"),m=this.componentStore.yAxis.calculateSpace({width:t,height:e}),s=m.width,t-=m.width,t>0&&(o+=t,t=0),e>0&&(g+=e,e=0),this.componentStore.plot.calculateSpace({width:o,height:g}),this.componentStore.plot.setBoundingBoxXY({x:s,y:a}),this.componentStore.xAxis.setRange([s,s+o]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:a+g}),this.componentStore.yAxis.setRange([a,a+g]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(p=>bt(p))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,s=0,a=0,o=0,g=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),m=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),p=this.componentStore.plot.calculateSpace({width:g,height:m});t-=p.width,e-=p.height,p=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),s=p.height,e-=p.height,this.componentStore.xAxis.setAxisPosition("left"),p=this.componentStore.xAxis.calculateSpace({width:t,height:e}),t-=p.width,a=p.width,this.componentStore.yAxis.setAxisPosition("top"),p=this.componentStore.yAxis.calculateSpace({width:t,height:e}),e-=p.height,o=s+p.height,t>0&&(g+=t,t=0),e>0&&(m+=e,e=0),this.componentStore.plot.calculateSpace({width:g,height:m}),this.componentStore.plot.setBoundingBoxXY({x:a,y:o}),this.componentStore.yAxis.setRange([a,a+g]),this.componentStore.yAxis.setBoundingBoxXY({x:a,y:s}),this.componentStore.xAxis.setRange([o,o+m]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:o}),this.chartData.plots.some(k=>bt(k))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const e of Object.values(this.componentStore))t.push(...e.getDrawableElements());return t}},n.__name(st,"Orchestrator"),st),nt,ye=(nt=class{static build(t,e,s,a){return new me(t,e,s,a).getDrawableElement()}},n.__name(nt,"XYChartBuilder"),nt),rt=0,Yt,ot=Tt(),ht=kt(),b=Rt(),wt=ht.plotColorPalette.split(",").map(i=>i.trim()),gt=!1,St=!1;function kt(){const i=n.getThemeVariables3(),t=n.getConfig();return n.cleanAndMerge(i.xyChart,t.themeVariables.xyChart)}n.__name(kt,"getChartDefaultThemeConfig");function Tt(){const i=n.getConfig();return n.cleanAndMerge(n.defaultConfig_default.xyChart,i.xyChart)}n.__name(Tt,"getChartDefaultConfig");function Rt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}n.__name(Rt,"getChartDefaultData");function xt(i){const t=n.getConfig();return n.sanitizeText(i.trim(),t)}n.__name(xt,"textSanitizer");function Ht(i){Yt=i}n.__name(Ht,"setTmpSVGG");function Ut(i){i==="horizontal"?ot.chartOrientation="horizontal":ot.chartOrientation="vertical"}n.__name(Ut,"setOrientation");function $t(i){b.xAxis.title=xt(i.text)}n.__name($t,"setXAxisTitle");function Dt(i,t){b.xAxis={type:"linear",title:b.xAxis.title,min:i,max:t},gt=!0}n.__name(Dt,"setXAxisRangeData");function qt(i){b.xAxis={type:"band",title:b.xAxis.title,categories:i.map(t=>xt(t.text))},gt=!0}n.__name(qt,"setXAxisBand");function jt(i){b.yAxis.title=xt(i.text)}n.__name(jt,"setYAxisTitle");function Gt(i,t){b.yAxis={type:"linear",title:b.yAxis.title,min:i,max:t},St=!0}n.__name(Gt,"setYAxisRangeData");function Qt(i){const t=Math.min(...i),e=Math.max(...i),s=j(b.yAxis)?b.yAxis.min:1/0,a=j(b.yAxis)?b.yAxis.max:-1/0;b.yAxis={type:"linear",title:b.yAxis.title,min:Math.min(s,t),max:Math.max(a,e)}}n.__name(Qt,"setYAxisRangeFromPlotData");function vt(i){let t=[];if(i.length===0)return t;if(!gt){const e=j(b.xAxis)?b.xAxis.min:1/0,s=j(b.xAxis)?b.xAxis.max:-1/0;Dt(Math.min(e,1),Math.max(s,i.length))}if(St||Qt(i),Ct(b.xAxis)&&(t=b.xAxis.categories.map((e,s)=>[e,i[s]])),j(b.xAxis)){const e=b.xAxis.min,s=b.xAxis.max,a=(s-e)/(i.length-1),o=[];for(let g=e;g<=s;g+=a)o.push(`${g}`);t=o.map((g,m)=>[g,i[m]])}return t}n.__name(vt,"transformDataWithoutCategory");function Pt(i){return wt[i===0?0:i%wt.length]}n.__name(Pt,"getPlotColorFromPalette");function Kt(i,t){const e=vt(t);b.plots.push({type:"line",strokeFill:Pt(rt),strokeWidth:2,data:e}),rt++}n.__name(Kt,"setLineData");function Zt(i,t){const e=vt(t);b.plots.push({type:"bar",fill:Pt(rt),data:e}),rt++}n.__name(Zt,"setBarData");function Jt(){if(b.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return b.title=n.getDiagramTitle(),ye.build(ot,b,ht,Yt)}n.__name(Jt,"getDrawableElem");function te(){return ht}n.__name(te,"getChartThemeConfig");function ee(){return ot}n.__name(ee,"getChartConfig");function ie(){return b}n.__name(ie,"getXYChartData");var _e=n.__name(function(){n.clear(),rt=0,ot=Tt(),b=Rt(),ht=kt(),wt=ht.plotColorPalette.split(",").map(i=>i.trim()),gt=!1,St=!1},"clear"),be={getDrawableElem:Jt,clear:_e,setAccTitle:n.setAccTitle,getAccTitle:n.getAccTitle,setDiagramTitle:n.setDiagramTitle,getDiagramTitle:n.getDiagramTitle,getAccDescription:n.getAccDescription,setAccDescription:n.setAccDescription,setOrientation:Ut,setXAxisTitle:$t,setXAxisRangeData:Dt,setXAxisBand:qt,setYAxisTitle:jt,setYAxisRangeData:Gt,setLineData:Kt,setBarData:Zt,setTmpSVGG:Ht,getChartThemeConfig:te,getChartConfig:ee,getXYChartData:ie},Ae=n.__name((i,t,e,s)=>{const a=s.db,o=a.getChartThemeConfig(),g=a.getChartConfig(),m=a.getXYChartData().plots[0].data.map(y=>y[1]);function p(y){return y==="top"?"text-before-edge":"middle"}n.__name(p,"getDominantBaseLine");function k(y){return y==="left"?"start":y==="right"?"end":"middle"}n.__name(k,"getTextAnchor");function v(y){return`translate(${y.x}, ${y.y}) rotate(${y.rotation||0})`}n.__name(v,"getTextTransformation"),n.log.debug(`Rendering xychart chart
|
|
7
|
+
`+i);const w=n.selectSvgElement(t),_=w.append("g").attr("class","main"),E=_.append("rect").attr("width",g.width).attr("height",g.height).attr("class","background");n.configureSvgSize(w,g.height,g.width,!0),w.attr("viewBox",`0 0 ${g.width} ${g.height}`),E.attr("fill",o.backgroundColor),a.setTmpSVGG(w.append("g").attr("class","mermaid-tmp-group"));const D=a.getDrawableElem(),P={};function M(y){let S=_,c="";for(const[W]of y.entries()){let z=_;W>0&&P[c]&&(z=P[c]),c+=y[W],S=P[c],S||(S=P[c]=z.append("g").attr("class",y[W]))}return S}n.__name(M,"getGroup");for(const y of D){if(y.data.length===0)continue;const S=M(y.groupTexts);switch(y.type){case"rect":if(S.selectAll("rect").data(y.data).enter().append("rect").attr("x",c=>c.x).attr("y",c=>c.y).attr("width",c=>c.width).attr("height",c=>c.height).attr("fill",c=>c.fill).attr("stroke",c=>c.strokeFill).attr("stroke-width",c=>c.strokeWidth),g.showDataLabel)if(g.chartOrientation==="horizontal"){let c=function(l,L){const{data:C,label:T}=l;return L*T.length*W<=C.width-10};n.__name(c,"fitsHorizontally");const W=.7,z=y.data.map((l,L)=>({data:l,label:m[L].toString()})).filter(l=>l.data.width>0&&l.data.height>0),U=z.map(l=>{const{data:L}=l;let C=L.height*.7;for(;!c(l,C)&&C>0;)C-=1;return C}),X=Math.floor(Math.min(...U));S.selectAll("text").data(z).enter().append("text").attr("x",l=>l.data.x+l.data.width-10).attr("y",l=>l.data.y+l.data.height/2).attr("text-anchor","end").attr("dominant-baseline","middle").attr("fill","black").attr("font-size",`${X}px`).text(l=>l.label)}else{let c=function(l,L,C){const{data:T,label:$}=l,N=L*$.length*.7,O=T.x+T.width/2,h=O-N/2,u=O+N/2,x=h>=T.x&&u<=T.x+T.width,d=T.y+C+L<=T.y+T.height;return x&&d};n.__name(c,"fitsInBar");const W=10,z=y.data.map((l,L)=>({data:l,label:m[L].toString()})).filter(l=>l.data.width>0&&l.data.height>0),U=z.map(l=>{const{data:L,label:C}=l;let T=L.width/(C.length*.7);for(;!c(l,T,W)&&T>0;)T-=1;return T}),X=Math.floor(Math.min(...U));S.selectAll("text").data(z).enter().append("text").attr("x",l=>l.data.x+l.data.width/2).attr("y",l=>l.data.y+W).attr("text-anchor","middle").attr("dominant-baseline","hanging").attr("fill","black").attr("font-size",`${X}px`).text(l=>l.label)}break;case"text":S.selectAll("text").data(y.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",c=>c.fill).attr("font-size",c=>c.fontSize).attr("dominant-baseline",c=>p(c.verticalPos)).attr("text-anchor",c=>k(c.horizontalPos)).attr("transform",c=>v(c)).text(c=>c.text);break;case"path":S.selectAll("path").data(y.data).enter().append("path").attr("d",c=>c.path).attr("fill",c=>c.fill?c.fill:"none").attr("stroke",c=>c.strokeFill).attr("stroke-width",c=>c.strokeWidth);break}}},"draw"),we={draw:Ae},Ce={parser:ce,db:be,renderer:we};exports.diagram=Ce;
|