cc-viewer 1.6.183 → 1.6.192

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 (135) hide show
  1. package/dist/assets/App-DuGHwadX.js +31 -0
  2. package/dist/assets/{AppHeader-Dc7WvorH.css → AppHeader-D8MCV07q.css} +3 -3
  3. package/dist/assets/AppHeader.module-CozRDKfP.js +573 -0
  4. package/dist/assets/Mobile-Bab634xx.js +10 -0
  5. package/dist/assets/_baseUniq-DJPPdHyT.js +1 -0
  6. package/dist/assets/arc-DZ3Bjq-l.js +1 -0
  7. package/dist/assets/architectureDiagram-Q4EWVU46-xy0J2lr0.js +36 -0
  8. package/dist/assets/blockDiagram-DXYQGD6D-CoUm8UC5.js +132 -0
  9. package/dist/assets/c4Diagram-AHTNJAMY-CFHX4Dfx.js +10 -0
  10. package/dist/assets/channel-G3S1FOvm.js +1 -0
  11. package/dist/assets/chunk-4BX2VUAB-CiktxOyY.js +1 -0
  12. package/dist/assets/chunk-4TB4RGXK-DHl7ZlQV.js +206 -0
  13. package/dist/assets/chunk-55IACEB6-DcgWxDD5.js +1 -0
  14. package/dist/assets/chunk-EDXVE4YY-DeUzWpQx.js +1 -0
  15. package/dist/assets/{chunk-FMBD7UC4-Bb0LARSp.js → chunk-FMBD7UC4-BCaKpugk.js} +2 -2
  16. package/dist/assets/chunk-OYMX7WX6-DKMEMbG9.js +231 -0
  17. package/dist/assets/chunk-QZHKN3VN-BREApeQ-.js +1 -0
  18. package/dist/assets/chunk-YZCP3GAM-BYW1PNda.js +1 -0
  19. package/dist/assets/classDiagram-6PBFFD2Q-B0-7EUsz.js +1 -0
  20. package/dist/assets/classDiagram-v2-HSJHXN6E-B0-7EUsz.js +1 -0
  21. package/dist/assets/clone-CX_D5SrR.js +1 -0
  22. package/dist/assets/cose-bilkent-S5V4N54A-DpwiMCiq.js +1 -0
  23. package/dist/assets/cytoscape.esm-BMgRe88L.js +331 -0
  24. package/dist/assets/dagre-KV5264BT-Dc7qbya2.js +4 -0
  25. package/dist/assets/defaultLocale-CcTwRAjA.js +1 -0
  26. package/dist/assets/diagram-5BDNPKRD-v7FsHeLQ.js +10 -0
  27. package/dist/assets/diagram-G4DWMVQ6-BhKNBlcE.js +24 -0
  28. package/dist/assets/diagram-MMDJMWI5-C-3cRdzG.js +43 -0
  29. package/dist/assets/diagram-TYMM5635-HfNcJIfT.js +24 -0
  30. package/dist/assets/erDiagram-SMLLAGMA-Ckj0dkk7.js +85 -0
  31. package/dist/assets/flowDiagram-DWJPFMVM-yf315tJr.js +162 -0
  32. package/dist/assets/ganttDiagram-T4ZO3ILL-Ch2bINVC.js +292 -0
  33. package/dist/assets/gitGraphDiagram-UUTBAWPF-CesdgsJi.js +106 -0
  34. package/dist/assets/graph-CRpmapJV.js +1 -0
  35. package/dist/assets/html2canvas.esm-B8c0f9Wq.js +22 -0
  36. package/dist/assets/index-DJ0iGKLy.js +2 -0
  37. package/dist/assets/infoDiagram-42DDH7IO-CuD16P9Y.js +2 -0
  38. package/dist/assets/init-C7FSzFHJ.js +1 -0
  39. package/dist/assets/ishikawaDiagram-UXIWVN3A-4y8aG54G.js +70 -0
  40. package/dist/assets/journeyDiagram-VCZTEJTY-B6TtR2Zk.js +139 -0
  41. package/dist/assets/kanban-definition-6JOO6SKY-DTcNHYUS.js +89 -0
  42. package/dist/assets/katex-CJRKSY_b.js +257 -0
  43. package/dist/assets/layout-CX5hpkD2.js +1 -0
  44. package/dist/assets/linear-tWlC-NXc.js +1 -0
  45. package/dist/assets/mermaid.core-DNvsWVDx.js +308 -0
  46. package/dist/assets/min-CDExe3RN.js +1 -0
  47. package/dist/assets/mindmap-definition-QFDTVHPH-CW0yNQcb.js +96 -0
  48. package/dist/assets/ordinal-aRyHI6gl.js +1 -0
  49. package/dist/assets/pieDiagram-DEJITSTG-DNrnOqmz.js +30 -0
  50. package/dist/assets/quadrantDiagram-34T5L4WZ-Cl176vnh.js +7 -0
  51. package/dist/assets/requirementDiagram-MS252O5E-DKp3A5f_.js +84 -0
  52. package/dist/assets/sankeyDiagram-XADWPNL6-BMV0lAz8.js +10 -0
  53. package/dist/assets/sequenceDiagram-FGHM5R23-CQ4preep.js +157 -0
  54. package/dist/assets/stateDiagram-FHFEXIEX-BKqYYN8H.js +1 -0
  55. package/dist/assets/stateDiagram-v2-QKLJ7IA2-C1W1ECmZ.js +1 -0
  56. package/dist/assets/timeline-definition-GMOUNBTQ-4kgeuumv.js +120 -0
  57. package/dist/assets/vendor-antd-Dk5s46Ag.js +406 -0
  58. package/dist/assets/vendor-codemirror-DxvDOrio.js +46 -0
  59. package/dist/assets/vendor-highlight-DVwgAdJY.js +3 -0
  60. package/dist/assets/vendor-markdown-DO-Ppp4f.js +60 -0
  61. package/dist/assets/vendor-qrcode-hI5wlAgK.js +9 -0
  62. package/dist/assets/vendor-virtuoso-HW77kTCh.js +1 -0
  63. package/dist/assets/vendor-xterm-D2cUrYEx.js +140 -0
  64. package/dist/assets/vennDiagram-DHZGUBPP-CqBcUIdK.js +34 -0
  65. package/dist/assets/wardley-RL74JXVD-CbEnkKx8.js +162 -0
  66. package/dist/assets/wardleyDiagram-NUSXRM2D-BJrjkZMg.js +20 -0
  67. package/dist/assets/xychartDiagram-5P7HB3ND-D8aBEz8e.js +7 -0
  68. package/dist/index.html +3 -3
  69. package/package.json +1 -1
  70. package/server.js +13 -4
  71. package/dist/assets/App-BHfyP8-J.js +0 -31
  72. package/dist/assets/AppHeader.module-W_78JZt9.js +0 -573
  73. package/dist/assets/Mobile-ca5EOMpN.js +0 -10
  74. package/dist/assets/_baseUniq-DYSZB4Xx.js +0 -1
  75. package/dist/assets/arc-BChSP8hM.js +0 -1
  76. package/dist/assets/architectureDiagram-Q4EWVU46-vlr5Q6DQ.js +0 -36
  77. package/dist/assets/blockDiagram-DXYQGD6D-4C3Amh2i.js +0 -132
  78. package/dist/assets/c4Diagram-AHTNJAMY-wI0efLSs.js +0 -10
  79. package/dist/assets/channel-d8DITadq.js +0 -1
  80. package/dist/assets/chunk-4BX2VUAB-BX9brpDB.js +0 -1
  81. package/dist/assets/chunk-4TB4RGXK-DvFQ-X9V.js +0 -206
  82. package/dist/assets/chunk-55IACEB6-BNmYjPNf.js +0 -1
  83. package/dist/assets/chunk-EDXVE4YY-BNvDPqBE.js +0 -1
  84. package/dist/assets/chunk-OYMX7WX6-BwlvIpeD.js +0 -231
  85. package/dist/assets/chunk-QZHKN3VN-BS6RK8_X.js +0 -1
  86. package/dist/assets/chunk-YZCP3GAM-oOqmydQz.js +0 -1
  87. package/dist/assets/classDiagram-6PBFFD2Q-B1oRrMCc.js +0 -1
  88. package/dist/assets/classDiagram-v2-HSJHXN6E-B1oRrMCc.js +0 -1
  89. package/dist/assets/clone-BrNOd7Lq.js +0 -1
  90. package/dist/assets/cose-bilkent-S5V4N54A-CamsIqkY.js +0 -1
  91. package/dist/assets/cytoscape.esm-DxGcaOPV.js +0 -331
  92. package/dist/assets/dagre-KV5264BT-CPAWWiBh.js +0 -4
  93. package/dist/assets/defaultLocale-DX6XiGOO.js +0 -1
  94. package/dist/assets/diagram-5BDNPKRD-D6TmzGhl.js +0 -10
  95. package/dist/assets/diagram-G4DWMVQ6-DDuJnMCL.js +0 -24
  96. package/dist/assets/diagram-MMDJMWI5-CQWhvrpz.js +0 -43
  97. package/dist/assets/diagram-TYMM5635-CEDj3w_h.js +0 -24
  98. package/dist/assets/erDiagram-SMLLAGMA-B_eQqha6.js +0 -85
  99. package/dist/assets/flowDiagram-DWJPFMVM-B985i3uQ.js +0 -162
  100. package/dist/assets/ganttDiagram-T4ZO3ILL-DKp62vr3.js +0 -292
  101. package/dist/assets/gitGraphDiagram-UUTBAWPF-Cc1gyz1Q.js +0 -106
  102. package/dist/assets/graph-C-1-3bsA.js +0 -1
  103. package/dist/assets/html2canvas.esm-QH1iLAAe.js +0 -22
  104. package/dist/assets/index-LH2WLu05.js +0 -2
  105. package/dist/assets/infoDiagram-42DDH7IO-DqXaAHZz.js +0 -2
  106. package/dist/assets/init-Gi6I4Gst.js +0 -1
  107. package/dist/assets/ishikawaDiagram-UXIWVN3A-zdUdDJX2.js +0 -70
  108. package/dist/assets/journeyDiagram-VCZTEJTY-ip5SzODy.js +0 -139
  109. package/dist/assets/kanban-definition-6JOO6SKY-D5EYh6AP.js +0 -89
  110. package/dist/assets/katex-DkKDou_j.js +0 -257
  111. package/dist/assets/layout-Cjq8AL8G.js +0 -1
  112. package/dist/assets/linear-U0KsEJ2u.js +0 -1
  113. package/dist/assets/mermaid.core-CT-5crLN.js +0 -308
  114. package/dist/assets/min-C7G6pq26.js +0 -1
  115. package/dist/assets/mindmap-definition-QFDTVHPH-CIzhFOw1.js +0 -96
  116. package/dist/assets/ordinal-Cboi1Yqb.js +0 -1
  117. package/dist/assets/pieDiagram-DEJITSTG-Cp1Zd1MQ.js +0 -30
  118. package/dist/assets/quadrantDiagram-34T5L4WZ-Cp31xM90.js +0 -7
  119. package/dist/assets/requirementDiagram-MS252O5E-Dbg_eQqB.js +0 -84
  120. package/dist/assets/sankeyDiagram-XADWPNL6-CMrzwpwC.js +0 -10
  121. package/dist/assets/sequenceDiagram-FGHM5R23-KJegoBnN.js +0 -157
  122. package/dist/assets/stateDiagram-FHFEXIEX-BDWprYzE.js +0 -1
  123. package/dist/assets/stateDiagram-v2-QKLJ7IA2-CCUmB0qI.js +0 -1
  124. package/dist/assets/timeline-definition-GMOUNBTQ-BOWeG5LY.js +0 -120
  125. package/dist/assets/vendor-antd-CtdKd5xs.js +0 -406
  126. package/dist/assets/vendor-codemirror-CdXaVX4e.js +0 -46
  127. package/dist/assets/vendor-highlight-D4ATuRwX.js +0 -3
  128. package/dist/assets/vendor-markdown-CO-jRjTB.js +0 -60
  129. package/dist/assets/vendor-qrcode-D05RfzwB.js +0 -9
  130. package/dist/assets/vendor-virtuoso-BhnFrbmh.js +0 -1
  131. package/dist/assets/vendor-xterm-DWMOrwSy.js +0 -140
  132. package/dist/assets/vennDiagram-DHZGUBPP-B6mLodPk.js +0 -34
  133. package/dist/assets/wardley-RL74JXVD-CovHs24Z.js +0 -162
  134. package/dist/assets/wardleyDiagram-NUSXRM2D-CBg_VXF7.js +0 -20
  135. package/dist/assets/xychartDiagram-5P7HB3ND-BRxgk_oX.js +0 -7
@@ -0,0 +1,120 @@
1
+ import{_ as __name,C as getConfig,U as isDark,V as lighten,W as darken,c as getConfig2,l as log,H as selectSvgElement,M as parseFontSize,X as setupGraphViewbox,d as select,B as __export,Y as commonDb_exports,y as clear}from"./mermaid.core-DNvsWVDx.js";import{d as d3arc}from"./arc-DZ3Bjq-l.js";import"./index-DJ0iGKLy.js";import"./vendor-codemirror-DxvDOrio.js";import"./vendor-antd-Dk5s46Ag.js";import"./vendor-markdown-DO-Ppp4f.js";var parser=(function(){var o=__name(function(k,v,o2,l){for(o2=o2||{},l=k.length;l--;o2[k[l]]=v);return o2},"o"),$V0=[6,11,13,14,15,17,19,20,23,24],$V1=[1,12],$V2=[1,13],$V3=[1,14],$V4=[1,15],$V5=[1,16],$V6=[1,19],$V7=[1,20],parser2={trace:__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:__name(function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 1:return $$[$0-1];case 3:yy.setDirection("LR");break;case 4:yy.setDirection("TD");break;case 5:this.$=[];break;case 6:$$[$0-1].push($$[$0]),this.$=$$[$0-1];break;case 7:case 8:this.$=$$[$0];break;case 9:case 10:this.$=[];break;case 11:yy.getCommonDb().setDiagramTitle($$[$0].substr(6)),this.$=$$[$0].substr(6);break;case 12:this.$=$$[$0].trim(),yy.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=$$[$0].trim(),yy.getCommonDb().setAccDescription(this.$);break;case 15:yy.addSection($$[$0].substr(8)),this.$=$$[$0].substr(8);break;case 18:yy.addTask($$[$0],0,""),this.$=$$[$0];break;case 19:yy.addEvent($$[$0].substr(2)),this.$=$$[$0];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},o($V0,[2,5],{5:6}),o($V0,[2,2]),o($V0,[2,3]),o($V0,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:$V1,15:$V2,17:$V3,19:$V4,20:$V5,21:17,22:18,23:$V6,24:$V7},o($V0,[2,10],{1:[2,1]}),o($V0,[2,6]),{12:21,14:$V1,15:$V2,17:$V3,19:$V4,20:$V5,21:17,22:18,23:$V6,24:$V7},o($V0,[2,8]),o($V0,[2,9]),o($V0,[2,11]),{16:[1,22]},{18:[1,23]},o($V0,[2,14]),o($V0,[2,15]),o($V0,[2,16]),o($V0,[2,17]),o($V0,[2,18]),o($V0,[2,19]),o($V0,[2,7]),o($V0,[2,12]),o($V0,[2,13])],defaultActions:{},parseError:__name(function(str,hash){if(hash.recoverable)this.trace(str);else{var error=new Error(str);throw error.hash=hash,error}},"parseError"),parse:__name(function(input){var self=this,stack=[0],tstack=[],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,TERROR=2,EOF=1,args=lstack.slice.call(arguments,1),lexer2=Object.create(this.lexer),sharedState={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(sharedState.yy[k]=this.yy[k]);lexer2.setInput(input,sharedState.yy),sharedState.yy.lexer=lexer2,sharedState.yy.parser=this,typeof lexer2.yylloc>"u"&&(lexer2.yylloc={});var yyloc=lexer2.yylloc;lstack.push(yyloc);var ranges=lexer2.options&&lexer2.options.ranges;typeof sharedState.yy.parseError=="function"?this.parseError=sharedState.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function popStack(n){stack.length=stack.length-2*n,vstack.length=vstack.length-n,lstack.length=lstack.length-n}__name(popStack,"popStack");function lex(){var token;return token=tstack.pop()||lexer2.lex()||EOF,typeof token!="number"&&(token instanceof Array&&(tstack=token,token=tstack.pop()),token=self.symbols_[token]||token),token}__name(lex,"lex");for(var symbol,state,action,r,yyval={},p,len,newState,expected;;){if(state=stack[stack.length-1],this.defaultActions[state]?action=this.defaultActions[state]:((symbol===null||typeof symbol>"u")&&(symbol=lex()),action=table[state]&&table[state][symbol]),typeof action>"u"||!action.length||!action[0]){var errStr="";expected=[];for(p in table[state])this.terminals_[p]&&p>TERROR&&expected.push("'"+this.terminals_[p]+"'");lexer2.showPosition?errStr="Parse error on line "+(yylineno+1)+`:
2
+ `+lexer2.showPosition()+`
3
+ Expecting `+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'":errStr="Parse error on line "+(yylineno+1)+": Unexpected "+(symbol==EOF?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'"),this.parseError(errStr,{text:lexer2.match,token:this.terminals_[symbol]||symbol,line:lexer2.yylineno,loc:yyloc,expected})}if(action[0]instanceof Array&&action.length>1)throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol);switch(action[0]){case 1:stack.push(symbol),vstack.push(lexer2.yytext),lstack.push(lexer2.yylloc),stack.push(action[1]),symbol=null,yyleng=lexer2.yyleng,yytext=lexer2.yytext,yylineno=lexer2.yylineno,yyloc=lexer2.yylloc;break;case 2:if(len=this.productions_[action[1]][1],yyval.$=vstack[vstack.length-len],yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column},ranges&&(yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]),r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,sharedState.yy,action[1],vstack,lstack].concat(args)),typeof r<"u")return r;len&&(stack=stack.slice(0,-1*len*2),vstack=vstack.slice(0,-1*len),lstack=lstack.slice(0,-1*len)),stack.push(this.productions_[action[1]][0]),vstack.push(yyval.$),lstack.push(yyval._$),newState=table[stack[stack.length-2]][stack[stack.length-1]],stack.push(newState);break;case 3:return!0}}return!0},"parse")},lexer=(function(){var lexer2={EOF:1,parseError:__name(function(str,hash){if(this.yy.parser)this.yy.parser.parseError(str,hash);else throw new Error(str)},"parseError"),setInput:__name(function(input,yy){return this.yy=yy||this.yy||{},this._input=input,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:__name(function(){var ch=this._input[0];this.yytext+=ch,this.yyleng++,this.offset++,this.match+=ch,this.matched+=ch;var lines=ch.match(/(?:\r\n?|\n).*/g);return lines?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ch},"input"),unput:__name(function(ch){var len=ch.length,lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-len),this.offset-=len;var oldLines=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),lines.length-1&&(this.yylineno-=lines.length-1);var r=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:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-len]),this.yyleng=this.yytext.length,this},"unput"),more:__name(function(){return this._more=!0,this},"more"),reject:__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:__name(function(n){this.unput(this.match.slice(n))},"less"),pastInput:__name(function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:__name(function(){var next=this.match;return next.length<20&&(next+=this._input.substr(0,20-next.length)),(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:__name(function(){var pre=this.pastInput(),c=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+`
5
+ `+c+"^"},"showPosition"),test_match:__name(function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer&&(backup={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&&(backup.yylloc.range=this.yylloc.range.slice(0))),lines=match[0].match(/(?:\r\n?|\n).*/g),lines&&(this.yylineno+=lines.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length},this.yytext+=match[0],this.match+=match[0],this.matches=match,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(match[0].length),this.matched+=match[0],token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),token)return token;if(this._backtrack){for(var k in backup)this[k]=backup[k];return!1}return!1},"test_match"),next:__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var token,match,tempMatch,index;this._more||(this.yytext="",this.match="");for(var rules=this._currentRules(),i=0;i<rules.length;i++)if(tempMatch=this._input.match(this.rules[rules[i]]),tempMatch&&(!match||tempMatch[0].length>match[0].length)){if(match=tempMatch,index=i,this.options.backtrack_lexer){if(token=this.test_match(tempMatch,rules[i]),token!==!1)return token;if(this._backtrack){match=!1;continue}else return!1}else if(!this.options.flex)break}return match?(token=this.test_match(match,rules[index]),token!==!1?token:!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:__name(function(){var r=this.next();return r||this.lex()},"lex"),begin:__name(function(condition){this.conditionStack.push(condition)},"begin"),popState:__name(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:__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:__name(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:__name(function(condition){this.begin(condition)},"pushState"),stateStackSize:__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:__name(function(yy,yy_,$avoiding_name_collisions,YY_START){switch($avoiding_name_collisions){case 0:break;case 1:break;case 2:return 13;case 3:break;case 4:break;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;case 10:return this.popState(),"acc_title_value";case 11:return this.begin("acc_descr"),17;case 12:return this.popState(),"acc_descr_value";case 13:this.begin("acc_descr_multiline");break;case 14:this.popState();break;case 15:return"acc_descr_multiline_value";case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/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:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}};return lexer2})();parser2.lexer=lexer;function Parser(){this.yy={}}return __name(Parser,"Parser"),Parser.prototype=parser2,parser2.Parser=Parser,new Parser})();parser.parser=parser;var timeline_default=parser,timelineDb_exports={};__export(timelineDb_exports,{addEvent:()=>addEvent,addSection:()=>addSection,addTask:()=>addTask,addTaskOrg:()=>addTaskOrg,clear:()=>clear2,default:()=>timelineDb_default,getCommonDb:()=>getCommonDb,getDirection:()=>getDirection,getSections:()=>getSections,getTasks:()=>getTasks,setDirection:()=>setDirection});var currentSection="",currentTaskId=0,direction="LR",sections=[],tasks=[],rawTasks=[],getCommonDb=__name(()=>commonDb_exports,"getCommonDb"),clear2=__name(function(){sections.length=0,tasks.length=0,currentSection="",rawTasks.length=0,direction="LR",clear()},"clear"),setDirection=__name(function(dir){direction=dir},"setDirection"),getDirection=__name(function(){return direction},"getDirection"),addSection=__name(function(txt){currentSection=txt,sections.push(txt)},"addSection"),getSections=__name(function(){return sections},"getSections"),getTasks=__name(function(){let allItemsProcessed=compileTasks();const maxDepth=100;let iterationCount=0;for(;!allItemsProcessed&&iterationCount<maxDepth;)allItemsProcessed=compileTasks(),iterationCount++;return tasks.push(...rawTasks),tasks},"getTasks"),addTask=__name(function(period,length,event){const rawTask={id:currentTaskId++,section:currentSection,type:currentSection,task:period,score:length||0,events:event?[event]:[]};rawTasks.push(rawTask)},"addTask"),addEvent=__name(function(event){rawTasks.find(task=>task.id===currentTaskId-1).events.push(event)},"addEvent"),addTaskOrg=__name(function(descr){const newTask={section:currentSection,type:currentSection,description:descr,task:descr,classes:[]};tasks.push(newTask)},"addTaskOrg"),compileTasks=__name(function(){const compileTask=__name(function(pos){return rawTasks[pos].processed},"compileTask");let allProcessed=!0;for(const[i,rawTask]of rawTasks.entries())compileTask(i),allProcessed=allProcessed&&rawTask.processed;return allProcessed},"compileTasks"),timelineDb_default={clear:clear2,getCommonDb,getDirection,setDirection,addSection,getSections,getTasks,addTask,addTaskOrg,addEvent},nodeCount=0,drawRect=__name(function(elem,rectData){const rectElem=elem.append("rect");return rectElem.attr("x",rectData.x),rectElem.attr("y",rectData.y),rectElem.attr("fill",rectData.fill),rectElem.attr("stroke",rectData.stroke),rectElem.attr("width",rectData.width),rectElem.attr("height",rectData.height),rectElem.attr("rx",rectData.rx),rectElem.attr("ry",rectData.ry),rectData.class!==void 0&&rectElem.attr("class",rectData.class),rectElem},"drawRect"),drawFace=__name(function(element,faceData){const circleElement=element.append("circle").attr("cx",faceData.cx).attr("cy",faceData.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),face=element.append("g");face.append("circle").attr("cx",faceData.cx-15/3).attr("cy",faceData.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),face.append("circle").attr("cx",faceData.cx+15/3).attr("cy",faceData.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function smile(face2){const arc=d3arc().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);face2.append("path").attr("class","mouth").attr("d",arc).attr("transform","translate("+faceData.cx+","+(faceData.cy+2)+")")}__name(smile,"smile");function sad(face2){const arc=d3arc().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);face2.append("path").attr("class","mouth").attr("d",arc).attr("transform","translate("+faceData.cx+","+(faceData.cy+7)+")")}__name(sad,"sad");function ambivalent(face2){face2.append("line").attr("class","mouth").attr("stroke",2).attr("x1",faceData.cx-5).attr("y1",faceData.cy+7).attr("x2",faceData.cx+5).attr("y2",faceData.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return __name(ambivalent,"ambivalent"),faceData.score>3?smile(face):faceData.score<3?sad(face):ambivalent(face),circleElement},"drawFace"),drawCircle=__name(function(element,circleData){const circleElement=element.append("circle");return circleElement.attr("cx",circleData.cx),circleElement.attr("cy",circleData.cy),circleElement.attr("class","actor-"+circleData.pos),circleElement.attr("fill",circleData.fill),circleElement.attr("stroke",circleData.stroke),circleElement.attr("r",circleData.r),circleElement.class!==void 0&&circleElement.attr("class",circleElement.class),circleData.title!==void 0&&circleElement.append("title").text(circleData.title),circleElement},"drawCircle"),drawText=__name(function(elem,textData){const nText=textData.text.replace(/<br\s*\/?>/gi," "),textElem=elem.append("text");textElem.attr("x",textData.x),textElem.attr("y",textData.y),textElem.attr("class","legend"),textElem.style("text-anchor",textData.anchor),textData.class!==void 0&&textElem.attr("class",textData.class);const span=textElem.append("tspan");return span.attr("x",textData.x+textData.textMargin*2),span.text(nText),textElem},"drawText"),drawLabel=__name(function(elem,txtObject){function genPoints(x,y,width,height,cut){return x+","+y+" "+(x+width)+","+y+" "+(x+width)+","+(y+height-cut)+" "+(x+width-cut*1.2)+","+(y+height)+" "+x+","+(y+height)}__name(genPoints,"genPoints");const polygon=elem.append("polygon");polygon.attr("points",genPoints(txtObject.x,txtObject.y,50,20,7)),polygon.attr("class","labelBox"),txtObject.y=txtObject.y+txtObject.labelMargin,txtObject.x=txtObject.x+.5*txtObject.labelMargin,drawText(elem,txtObject)},"drawLabel"),drawSection=__name(function(elem,section,conf){const g=elem.append("g"),rect=getNoteRect();rect.x=section.x,rect.y=section.y,rect.fill=section.fill,rect.width=conf.width,rect.height=conf.height,rect.class="journey-section section-type-"+section.num,rect.rx=3,rect.ry=3,drawRect(g,rect),_drawTextCandidateFunc(conf)(section.text,g,rect.x,rect.y,rect.width,rect.height,{class:"journey-section section-type-"+section.num},conf,section.colour)},"drawSection"),taskCount=-1,drawTask=__name(function(elem,task,conf,diagramId){const center=task.x+conf.width/2,g=elem.append("g");taskCount++,g.append("line").attr("id",diagramId+"-task"+taskCount).attr("x1",center).attr("y1",task.y).attr("x2",center).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),drawFace(g,{cx:center,cy:300+(5-task.score)*30,score:task.score});const rect=getNoteRect();rect.x=task.x,rect.y=task.y,rect.fill=task.fill,rect.width=conf.width,rect.height=conf.height,rect.class="task task-type-"+task.num,rect.rx=3,rect.ry=3,drawRect(g,rect),_drawTextCandidateFunc(conf)(task.task,g,rect.x,rect.y,rect.width,rect.height,{class:"task"},conf,task.colour)},"drawTask"),drawBackgroundRect=__name(function(elem,bounds){drawRect(elem,{x:bounds.startx,y:bounds.starty,width:bounds.stopx-bounds.startx,height:bounds.stopy-bounds.starty,fill:bounds.fill,class:"rect"}).lower()},"drawBackgroundRect"),getTextObj=__name(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),getNoteRect=__name(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),_drawTextCandidateFunc=(function(){function byText(content,g,x,y,width,height,textAttrs,colour){const text=g.append("text").attr("x",x+width/2).attr("y",y+height/2+5).style("font-color",colour).style("text-anchor","middle").text(content);_setTextAttrs(text,textAttrs)}__name(byText,"byText");function byTspan(content,g,x,y,width,height,textAttrs,conf,colour){const{taskFontSize,taskFontFamily}=conf,lines=content.split(/<br\s*\/?>/gi);for(let i=0;i<lines.length;i++){const dy=i*taskFontSize-taskFontSize*(lines.length-1)/2,text=g.append("text").attr("x",x+width/2).attr("y",y).attr("fill",colour).style("text-anchor","middle").style("font-size",taskFontSize).style("font-family",taskFontFamily);text.append("tspan").attr("x",x+width/2).attr("dy",dy).text(lines[i]),text.attr("y",y+height/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),_setTextAttrs(text,textAttrs)}}__name(byTspan,"byTspan");function byFo(content,g,x,y,width,height,textAttrs,conf){const body=g.append("switch"),text=body.append("foreignObject").attr("x",x).attr("y",y).attr("width",width).attr("height",height).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");text.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(content),byTspan(content,body,x,y,width,height,textAttrs,conf),_setTextAttrs(text,textAttrs)}__name(byFo,"byFo");function _setTextAttrs(toText,fromTextAttrsDict){for(const key in fromTextAttrsDict)key in fromTextAttrsDict&&toText.attr(key,fromTextAttrsDict[key])}return __name(_setTextAttrs,"_setTextAttrs"),function(conf){return conf.textPlacement==="fo"?byFo:conf.textPlacement==="old"?byText:byTspan}})(),initGraphics=__name(function(graphics,id){nodeCount=0,taskCount=-1,graphics.append("defs").append("marker").attr("id",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 wrap(text,width){text.each(function(){var text2=select(this),words=text2.text().split(/(\s+|<br>)/).reverse(),word,line=[],lineHeight=1.1,y=text2.attr("y"),dy=parseFloat(text2.attr("dy")),tspan=text2.text(null).append("tspan").attr("x",0).attr("y",y).attr("dy",dy+"em");for(let j=0;j<words.length;j++)word=words[words.length-1-j],line.push(word),tspan.text(line.join(" ").trim()),(tspan.node().getComputedTextLength()>width||word==="<br>")&&(line.pop(),tspan.text(line.join(" ").trim()),word==="<br>"?line=[""]:line=[word],tspan=text2.append("tspan").attr("x",0).attr("y",y).attr("dy",lineHeight+"em").text(word))})}__name(wrap,"wrap");var drawNode=__name(function(elem,node,fullSection,conf,diagramId,isEvent=!1){var _a,_b,_c;const{theme,look}=conf,isReduxTheme=theme==null?void 0:theme.includes("redux"),maxSections=((_a=conf==null?void 0:conf.themeVariables)==null?void 0:_a.THEME_COLOR_LIMIT)??12,section=fullSection%maxSections-1,nodeElem=elem.append("g");node.section=section,nodeElem.attr("class",(node.class?node.class+" ":"")+"timeline-node "+("section-"+section));const bkgElem=nodeElem.append("g"),textElem=nodeElem.append("g"),bbox=textElem.append("text").text(node.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(wrap,node.width).node().getBBox(),fontSize=(_b=conf.fontSize)!=null&&_b.replace?conf.fontSize.replace("px",""):conf.fontSize;if(node.height=bbox.height+fontSize*1.1*.5+node.padding,node.height=Math.max(node.height,node.maxHeight),node.width=node.width+2*node.padding,textElem.attr("transform","translate("+node.width/2+", "+node.padding/2+")"),isReduxTheme&&textElem.attr("transform",`translate(${node.width/2}, ${isEvent?node.padding/2+3:node.padding})`),defaultBkg(bkgElem,node,section,diagramId,conf),look==="neo"&&(nodeElem.attr("data-look","neo"),isReduxTheme)){const isDark2=theme.includes("dark"),rootSvgNode=((_c=elem.node())==null?void 0:_c.ownerSVGElement)??elem.node(),rootSvg=select(rootSvgNode),svgId=rootSvg.attr("id")??"",dropShadowId=svgId?`${svgId}-drop-shadow`:"drop-shadow";if(rootSvg.select(`#${dropShadowId}`).empty()){const existingDefs=rootSvg.select("defs");(existingDefs.empty()?rootSvg.append("defs"):existingDefs).append("filter").attr("id",dropShadowId).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity",isDark2?"0.2":"0.06").attr("flood-color",isDark2?"#FFFFFF":"#000000")}}return node},"drawNode"),getVirtualNodeHeight=__name(function(elem,node,conf){var _a;const textElem=elem.append("g"),bbox=textElem.append("text").text(node.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(wrap,node.width).node().getBBox(),fontSize=(_a=conf.fontSize)!=null&&_a.replace?conf.fontSize.replace("px",""):conf.fontSize;return textElem.remove(),bbox.height+fontSize*1.1*.5+node.padding},"getVirtualNodeHeight"),defaultBkg=__name(function(elem,node,section,diagramId,config){const{theme}=config,r=theme!=null&&theme.includes("redux")?0:5,rd=5,d=r>0?`M0 ${node.height-rd} v${-node.height+2*rd} q0,-${r},${r},-${r} h${node.width-2*rd} q${r},0,${r},${r} v${node.height-rd} H0 Z`:`M0 ${node.height-rd} v${-(node.height-rd)} h${node.width} v${node.height} H0 Z`;elem.append("path").attr("id",diagramId+"-node-"+nodeCount++).attr("class","node-bkg node-"+node.type).attr("d",d),theme!=null&&theme.includes("redux")||elem.append("line").attr("class","node-line-"+section).attr("x1",0).attr("y1",node.height).attr("x2",node.width).attr("y2",node.height)},"defaultBkg"),svgDraw_default={drawRect,drawCircle,drawSection,drawText,drawLabel,drawTask,drawBackgroundRect,getTextObj,getNoteRect,initGraphics,drawNode,getVirtualNodeHeight},draw=__name(function(text,id,version,diagObj){var _a,_b,_c;const conf=getConfig2(),{look,theme,themeVariables}=conf,{useGradient,gradientStart,gradientStop}=themeVariables,LEFT_MARGIN=((_a=conf.timeline)==null?void 0:_a.leftMargin)??50;log.debug("timeline",diagObj.db);const securityLevel=conf.securityLevel;let sandboxElement;securityLevel==="sandbox"&&(sandboxElement=select("#i"+id));const svg=(securityLevel==="sandbox"?select(sandboxElement.nodes()[0].contentDocument.body):select("body")).select("#"+id);svg.append("g");const tasks2=diagObj.db.getTasks(),title=diagObj.db.getCommonDb().getDiagramTitle();log.debug("task",tasks2),svgDraw_default.initGraphics(svg,id);const sections2=diagObj.db.getSections();log.debug("sections",sections2);let maxSectionHeight=0,maxTaskHeight=0,depthY=0,sectionBeginY=0,masterX=50+LEFT_MARGIN,masterY=50;sectionBeginY=50;let sectionNumber=0,hasSections=!0;sections2.forEach(function(section){const sectionNode={number:sectionNumber,descr:section,section:sectionNumber,width:150,padding:20,maxHeight:maxSectionHeight},sectionHeight=svgDraw_default.getVirtualNodeHeight(svg,sectionNode,conf);log.debug("sectionHeight before draw",sectionHeight),maxSectionHeight=Math.max(maxSectionHeight,sectionHeight+20)});let maxEventCount=0,maxEventLineLength=0;log.debug("tasks.length",tasks2.length);for(const[i,task]of tasks2.entries()){const taskNode={number:i,descr:task,section:task.section,width:150,padding:20,maxHeight:maxTaskHeight},taskHeight=svgDraw_default.getVirtualNodeHeight(svg,taskNode,conf);log.debug("taskHeight before draw",taskHeight),maxTaskHeight=Math.max(maxTaskHeight,taskHeight+20),maxEventCount=Math.max(maxEventCount,task.events.length);let maxEventLineLengthTemp=0;for(const event of task.events){const eventNode={descr:event,section:task.section,number:task.section,width:150,padding:20,maxHeight:50};maxEventLineLengthTemp+=svgDraw_default.getVirtualNodeHeight(svg,eventNode,conf)}task.events.length>0&&(maxEventLineLengthTemp+=(task.events.length-1)*10),maxEventLineLength=Math.max(maxEventLineLength,maxEventLineLengthTemp)}log.debug("maxSectionHeight before draw",maxSectionHeight),log.debug("maxTaskHeight before draw",maxTaskHeight),sections2&&sections2.length>0?sections2.forEach(section=>{const tasksForSection=tasks2.filter(task=>task.section===section),sectionNode={number:sectionNumber,descr:section,section:sectionNumber,width:200*Math.max(tasksForSection.length,1)-50,padding:20,maxHeight:maxSectionHeight};log.debug("sectionNode",sectionNode);const sectionNodeWrapper=svg.append("g"),node=svgDraw_default.drawNode(sectionNodeWrapper,sectionNode,sectionNumber,conf,id);log.debug("sectionNode output",node),sectionNodeWrapper.attr("transform",`translate(${masterX}, ${sectionBeginY})`),masterY+=maxSectionHeight+50,tasksForSection.length>0&&drawTasks(svg,tasksForSection,sectionNumber,masterX,masterY,maxTaskHeight,conf,maxEventCount,maxEventLineLength,maxSectionHeight,!1,id),masterX+=200*Math.max(tasksForSection.length,1),masterY=sectionBeginY,sectionNumber++}):(hasSections=!1,drawTasks(svg,tasks2,sectionNumber,masterX,masterY,maxTaskHeight,conf,maxEventCount,maxEventLineLength,maxSectionHeight,!0,id));const box=svg.node().getBBox();if(log.debug("bounds",box),title&&svg.append("text").text(title).attr("x",look==="neo"?box.x*2+LEFT_MARGIN:box.width/2-LEFT_MARGIN).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),depthY=hasSections?maxSectionHeight+maxTaskHeight+150:maxTaskHeight+100,svg.append("g").attr("class","lineWrapper").append("line").attr("x1",LEFT_MARGIN).attr("y1",depthY).attr("x2",box.width+3*LEFT_MARGIN).attr("y2",depthY).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${id}-arrowhead)`),look==="neo"&&useGradient&&theme!=="neutral"){const existingDefs=svg.select("defs"),gradient=(existingDefs.empty()?svg.append("defs"):existingDefs).append("linearGradient").attr("id",svg.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");gradient.append("stop").attr("offset","0%").attr("stop-color",gradientStart).attr("stop-opacity",1),gradient.append("stop").attr("offset","100%").attr("stop-color",gradientStop).attr("stop-opacity",1)}setupGraphViewbox(void 0,svg,((_b=conf.timeline)==null?void 0:_b.padding)??50,((_c=conf.timeline)==null?void 0:_c.useMaxWidth)??!1)},"draw"),drawTasks=__name(function(diagram2,tasks2,sectionColor,masterX,masterY,maxTaskHeight,conf,maxEventCount,maxEventLineLength,maxSectionHeight,isWithoutSections,diagramId){var _a;for(const task of tasks2){const taskNode={descr:task.task,section:sectionColor,number:sectionColor,width:150,padding:20,maxHeight:maxTaskHeight};log.debug("taskNode",taskNode);const taskWrapper=diagram2.append("g").attr("class","taskWrapper"),taskHeight=svgDraw_default.drawNode(taskWrapper,taskNode,sectionColor,conf,diagramId).height;if(log.debug("taskHeight after draw",taskHeight),taskWrapper.attr("transform",`translate(${masterX}, ${masterY})`),maxTaskHeight=Math.max(maxTaskHeight,taskHeight),task.events){const lineWrapper=diagram2.append("g").attr("class","lineWrapper");let lineLength=maxTaskHeight;masterY+=100,lineLength=lineLength+drawEvents(diagram2,task.events,sectionColor,masterX,masterY,conf,diagramId),masterY-=100,lineWrapper.append("line").attr("x1",masterX+190/2).attr("y1",masterY+maxTaskHeight).attr("x2",masterX+190/2).attr("y2",masterY+maxTaskHeight+100+maxEventLineLength+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${diagramId}-arrowhead)`).attr("stroke-dasharray","5,5")}masterX=masterX+200,isWithoutSections&&!((_a=conf.timeline)!=null&&_a.disableMulticolor)&&sectionColor++}masterY=masterY-10},"drawTasks"),drawEvents=__name(function(diagram2,events,sectionColor,masterX,masterY,conf,diagramId){let maxEventHeight=0;const eventBeginY=masterY;masterY=masterY+100;for(const event of events){const eventNode={descr:event,section:sectionColor,number:sectionColor,width:150,padding:20,maxHeight:50};log.debug("eventNode",eventNode);const eventWrapper=diagram2.append("g").attr("class","eventWrapper"),eventHeight=svgDraw_default.drawNode(eventWrapper,eventNode,sectionColor,conf,diagramId,!0).height;maxEventHeight=maxEventHeight+eventHeight,eventWrapper.attr("transform",`translate(${masterX}, ${masterY})`),masterY=masterY+10+eventHeight}return masterY=eventBeginY,maxEventHeight},"drawEvents"),timelineRenderer_default={setConf:__name(()=>{},"setConf"),draw},NODE_WIDTH=200,NODE_PADDING=5,NODE_TOTAL_WIDTH=NODE_WIDTH+NODE_PADDING*2,EVENT_WIDTH=NODE_WIDTH+100,EVENT_TOTAL_WIDTH=EVENT_WIDTH+NODE_PADDING*2,EVENT_SPACING=10,EVENT_VERTICAL_GAP=0,SECTION_TASK_GAP=20,TASK_AXIS_GAP=20,TASK_VERTICAL_GAP=30,EVENT_AXIS_GAP=50,draw2=__name(function(text,id,version,diagObj){var _a,_b,_c,_d,_e;const conf=getConfig2(),LEFT_MARGIN=((_a=conf.timeline)==null?void 0:_a.leftMargin)??50;log.debug("timeline",diagObj.db);const svg=selectSvgElement(id);svg.append("g");const tasks2=diagObj.db.getTasks(),title=diagObj.db.getCommonDb().getDiagramTitle();log.debug("task",tasks2),svgDraw_default.initGraphics(svg);const sections2=diagObj.db.getSections();log.debug("sections",sections2);let maxSectionHeight=0,maxTaskHeight=0;const masterX=50+LEFT_MARGIN;let masterY=50;const contentTopY=masterY,sectionBeginX=masterX,leftWidth=NODE_TOTAL_WIDTH+TASK_AXIS_GAP,rightWidth=EVENT_TOTAL_WIDTH+EVENT_AXIS_GAP,axisX=sectionBeginX+leftWidth;let sectionNumber=0;const hasSections=sections2&&sections2.length>0,timelineX=hasSections?axisX:masterX+leftWidth,sectionWidth=Math.max(50,leftWidth+rightWidth-NODE_PADDING*2);sections2.forEach(function(section){const sectionNode={number:sectionNumber,descr:section,section:sectionNumber,width:sectionWidth,padding:NODE_PADDING,maxHeight:maxSectionHeight},sectionHeight=svgDraw_default.getVirtualNodeHeight(svg,sectionNode,conf);log.debug("sectionHeight before draw",sectionHeight),maxSectionHeight=Math.max(maxSectionHeight,sectionHeight)});let maxEventStackHeight=0;log.debug("tasks.length",tasks2.length);for(const[i,task]of tasks2.entries()){const taskNode={number:i,descr:task,section:task.section,width:NODE_WIDTH,padding:NODE_PADDING,maxHeight:maxTaskHeight},taskHeight=svgDraw_default.getVirtualNodeHeight(svg,taskNode,conf);log.debug("taskHeight before draw",taskHeight),maxTaskHeight=Math.max(maxTaskHeight,taskHeight);let maxEventStackHeightTemp=0;for(const event of task.events){const eventNode={descr:event,section:task.section,number:task.section,width:EVENT_WIDTH,padding:NODE_PADDING,maxHeight:50};maxEventStackHeightTemp+=svgDraw_default.getVirtualNodeHeight(svg,eventNode,conf)}task.events.length>0&&(maxEventStackHeightTemp+=(task.events.length-1)*EVENT_SPACING),maxEventStackHeight=Math.max(maxEventStackHeight,maxEventStackHeightTemp)+EVENT_VERTICAL_GAP}log.debug("maxSectionHeight before draw",maxSectionHeight),log.debug("maxTaskHeight before draw",maxTaskHeight);const taskSpacing=Math.max(maxTaskHeight,maxEventStackHeight)+TASK_VERTICAL_GAP;hasSections?sections2.forEach(section=>{const tasksForSection=tasks2.filter(task=>task.section===section),sectionNode={number:sectionNumber,descr:section,section:sectionNumber,width:sectionWidth,padding:NODE_PADDING,maxHeight:maxSectionHeight};log.debug("sectionNode",sectionNode);const sectionNodeWrapper=svg.append("g"),node=svgDraw_default.drawNode(sectionNodeWrapper,sectionNode,sectionNumber,conf);log.debug("sectionNode output",node);const sectionX=timelineX-leftWidth;sectionNodeWrapper.attr("transform",`translate(${sectionX}, ${masterY})`);const taskStartY=masterY+node.height+SECTION_TASK_GAP;tasksForSection.length>0&&drawTasks2(svg,tasksForSection,sectionNumber,timelineX,taskStartY,maxTaskHeight,conf,taskSpacing,!1);const taskCount2=tasksForSection.length,sectionHeight=node.height+SECTION_TASK_GAP+taskSpacing*Math.max(taskCount2,1)-(taskCount2>0?TASK_VERTICAL_GAP*2:0);masterY+=sectionHeight,sectionNumber++}):drawTasks2(svg,tasks2,sectionNumber,timelineX,masterY,maxTaskHeight,conf,taskSpacing,!0);let box=(_b=svg.node())==null?void 0:_b.getBBox();if(!box)throw new Error("bbox not found");if(log.debug("bounds",box),title){if(svg.append("text").text(title).attr("x",box.width/2-LEFT_MARGIN).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),box=(_c=svg.node())==null?void 0:_c.getBBox(),!box)throw new Error("bbox not found");log.debug("bounds after title",box)}const[fontSize]=parseFontSize(conf.fontSize),arrowTopOffset=(fontSize??16)*2,arrowBottomPadding=(fontSize??16)*.5+20,lineWrapper=svg.append("g").attr("class","lineWrapper");lineWrapper.append("line").attr("x1",timelineX).attr("y1",contentTopY-arrowTopOffset).attr("x2",timelineX).attr("y2",box.y+box.height+arrowBottomPadding).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),lineWrapper.lower(),setupGraphViewbox(void 0,svg,((_d=conf.timeline)==null?void 0:_d.padding)??50,((_e=conf.timeline)==null?void 0:_e.useMaxWidth)??!1)},"draw"),drawTasks2=__name(function(diagram2,tasks2,sectionColor,timelineX,masterY,maxTaskHeight,conf,taskSpacing,isWithoutSections){var _a;for(const task of tasks2){const taskNode={descr:task.task,section:sectionColor,number:sectionColor,width:NODE_WIDTH,padding:NODE_PADDING,maxHeight:maxTaskHeight};log.debug("taskNode",taskNode);const taskWrapper=diagram2.append("g").attr("class","taskWrapper"),node=svgDraw_default.drawNode(taskWrapper,taskNode,sectionColor,conf),taskHeight=node.height;log.debug("taskHeight after draw",taskHeight);const taskX=timelineX-TASK_AXIS_GAP-node.width;if(taskWrapper.attr("transform",`translate(${taskX}, ${masterY})`),maxTaskHeight=Math.max(maxTaskHeight,taskHeight),task.events&&task.events.length>0){const eventsStartY=masterY,eventsX=timelineX+EVENT_AXIS_GAP;drawEvents2(diagram2,task.events,sectionColor,timelineX,eventsX,eventsStartY,conf)}masterY=masterY+taskSpacing,isWithoutSections&&!((_a=conf.timeline)!=null&&_a.disableMulticolor)&&sectionColor++}},"drawTasks"),drawEvents2=__name(function(diagram2,events,sectionColor,axisX,eventsX,startY,conf){let currentY=startY;for(const event of events){const eventNode={descr:event,section:sectionColor,number:sectionColor,width:EVENT_WIDTH,padding:NODE_PADDING,maxHeight:0};log.debug("eventNode",eventNode);const eventWrapper=diagram2.append("g").attr("class","eventWrapper"),eventHeight=svgDraw_default.drawNode(eventWrapper,eventNode,sectionColor,conf).height;eventWrapper.attr("transform",`translate(${eventsX}, ${currentY})`);const lineWrapper=diagram2.append("g").attr("class","lineWrapper"),lineY=currentY+eventHeight/2;lineWrapper.append("line").attr("x1",axisX).attr("y1",lineY).attr("x2",eventsX).attr("y2",lineY).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),currentY=currentY+eventHeight+EVENT_SPACING}return currentY-startY},"drawEvents"),timelineRendererVertical_default={setConf:__name(()=>{},"setConf"),draw:draw2},genReduxSections=__name(options=>{var _a;const{theme}=getConfig(),isDarkTheme=theme==null?void 0:theme.includes("dark"),isColorTheme=theme==null?void 0:theme.includes("color"),rawSvgId=((_a=options.svgId)==null?void 0:_a.replace(/^#/,""))??"",scopedDropShadow=rawSvgId?`url(#${rawSvgId}-drop-shadow)`:options.dropShadow??"none";let sections2="";for(let i=0;i<options.THEME_COLOR_LIMIT;i++){const sw=`${17-3*i}`,color=isColorTheme?options.borderColorArray[i]:options.mainBkg,stroke=isColorTheme?options.borderColorArray[i]:options.nodeBorder;sections2+=`
7
+ .section-${i-1} rect,
8
+ .section-${i-1} path,
9
+ .section-${i-1} circle {
10
+ fill: ${isDarkTheme&&isColorTheme?options.mainBkg:color};
11
+ stroke: ${stroke};
12
+ stroke-width: ${options.strokeWidth};
13
+ filter: ${scopedDropShadow};
14
+ }
15
+
16
+ .section-${i-1} text {
17
+ fill: ${options.nodeBorder};
18
+ font-weight: ${options.fontWeight}
19
+ }
20
+
21
+ .node-icon-${i-1} {
22
+ font-size: 40px;
23
+ color: ${options["cScaleLabel"+i]};
24
+ }
25
+
26
+ .section-edge-${i-1} {
27
+ stroke: ${options["cScale"+i]};
28
+ }
29
+
30
+ .edge-depth-${i-1} {
31
+ stroke-width: ${sw};
32
+ }
33
+
34
+ .section-${i-1} line {
35
+ stroke: ${options["cScaleInv"+i]};
36
+ stroke-width: 3;
37
+ }
38
+
39
+ .lineWrapper line {
40
+ stroke: ${options.nodeBorder};
41
+ stroke-width:${options.strokeWidth}
42
+ }
43
+
44
+ .disabled,
45
+ .disabled circle,
46
+ .disabled text {
47
+ fill: ${options.tertiaryColor??"lightgray"};
48
+ }
49
+
50
+ .disabled text {
51
+ fill: ${options.clusterBorder??"#efefef"};
52
+ }
53
+ `}return sections2},"genReduxSections"),genSections=__name(options=>{let sections2="";for(let i=0;i<options.THEME_COLOR_LIMIT;i++)options["lineColor"+i]=options["lineColor"+i]||options["cScaleInv"+i],isDark(options["lineColor"+i])?options["lineColor"+i]=lighten(options["lineColor"+i],20):options["lineColor"+i]=darken(options["lineColor"+i],20);for(let i=0;i<options.THEME_COLOR_LIMIT;i++){const sw=""+(17-3*i);sections2+=`
54
+ .section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} path {
55
+ fill: ${options["cScale"+i]};
56
+ }
57
+ .section-${i-1} text {
58
+ fill: ${options["cScaleLabel"+i]};
59
+ }
60
+ .node-icon-${i-1} {
61
+ font-size: 40px;
62
+ color: ${options["cScaleLabel"+i]};
63
+ }
64
+ .section-edge-${i-1}{
65
+ stroke: ${options["cScale"+i]};
66
+ }
67
+ .edge-depth-${i-1}{
68
+ stroke-width: ${sw};
69
+ }
70
+ .section-${i-1} line {
71
+ stroke: ${options["cScaleInv"+i]} ;
72
+ stroke-width: 3;
73
+ }
74
+
75
+ .lineWrapper line{
76
+ stroke: ${options["cScaleLabel"+i]} ;
77
+ }
78
+
79
+ .disabled, .disabled circle, .disabled text {
80
+ fill: ${options.tertiaryColor??"lightgray"};
81
+ }
82
+ .disabled text {
83
+ fill: ${options.clusterBorder??"#efefef"};
84
+ }
85
+ `}return sections2},"genSections"),getStyles=__name(options=>{var _a;const{theme}=getConfig(),isReduxTheme=theme==null?void 0:theme.includes("redux"),isNeutralTheme=theme==="neutral",rawSvgId=((_a=options.svgId)==null?void 0:_a.replace(/^#/,""))??"";let gradientSections="";if(options.useGradient&&rawSvgId&&options.THEME_COLOR_LIMIT&&!isNeutralTheme)for(let i=0;i<options.THEME_COLOR_LIMIT;i++)gradientSections+=`
86
+ .section-${i-1}[data-look="neo"] rect,
87
+ .section-${i-1}[data-look="neo"] path,
88
+ .section-${i-1}[data-look="neo"] circle {
89
+ fill: ${options.mainBkg};
90
+ stroke: url(#${rawSvgId}-gradient);
91
+ stroke-width: 2;
92
+ }
93
+ .section-${i-1}[data-look="neo"] line {
94
+ stroke: url(#${rawSvgId}-gradient);
95
+ stroke-width: 2;
96
+ }`;return`
97
+ .edge {
98
+ stroke-width: 3;
99
+ }
100
+ ${isReduxTheme?genReduxSections(options):genSections(options)}
101
+ ${gradientSections}
102
+ .section-root rect, .section-root path, .section-root circle {
103
+ fill: ${options.git0};
104
+ }
105
+ .section-root text {
106
+ fill: ${options.gitBranchLabel0};
107
+ }
108
+ .icon-container {
109
+ height:100%;
110
+ display: flex;
111
+ justify-content: center;
112
+ align-items: center;
113
+ }
114
+ .edge {
115
+ fill: none;
116
+ }
117
+ .eventWrapper {
118
+ filter: brightness(120%);
119
+ }
120
+ `},"getStyles"),styles_default=getStyles,rendererSelector={setConf:__name(()=>{},"setConf"),draw:__name((text,id,version,diagObj)=>{var _a,_b;return(((_b=(_a=diagObj==null?void 0:diagObj.db)==null?void 0:_a.getDirection)==null?void 0:_b.call(_a))??"LR")==="TD"?timelineRendererVertical_default.draw(text,id,version,diagObj):timelineRenderer_default.draw(text,id,version,diagObj)},"draw")},diagram={db:timelineDb_exports,renderer:rendererSelector,parser:timeline_default,styles:styles_default};export{diagram};