UNPKG

@eventcatalogtest/studio

Version:

A drag and drop UI for distributed systems that keeps your diagrams where they belong – in your repo

56 lines (54 loc) 21.8 kB
"use strict";exports.id=1935,exports.ids=[1935],exports.modules={31935:(a,b,c)=>{c.d(b,{diagram:()=>Q});var d=c(32892),e=c(38073),f=c(52206),g=c(97102),h=c(43739),i=function(){var a=(0,d.K2)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[6,8,10,11,12,14,16,17,20,21],c=[1,9],e=[1,10],f=[1,11],g=[1,12],h=[1,13],i=[1,16],j=[1,17],k={trace:(0,d.K2)(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:(0,d.K2)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:return f[h-1];case 2:case 6:case 7:this.$=[];break;case 3:f[h-1].push(f[h]),this.$=f[h-1];break;case 4:case 5:this.$=f[h];break;case 8:d.getCommonDb().setDiagramTitle(f[h].substr(6)),this.$=f[h].substr(6);break;case 9:this.$=f[h].trim(),d.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=f[h].trim(),d.getCommonDb().setAccDescription(this.$);break;case 12:d.addSection(f[h].substr(8)),this.$=f[h].substr(8);break;case 15:d.addTask(f[h],0,""),this.$=f[h];break;case 16:d.addEvent(f[h].substr(2)),this.$=f[h]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},a(b,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:c,12:e,14:f,16:g,17:h,18:14,19:15,20:i,21:j},a(b,[2,7],{1:[2,1]}),a(b,[2,3]),{9:18,11:c,12:e,14:f,16:g,17:h,18:14,19:15,20:i,21:j},a(b,[2,5]),a(b,[2,6]),a(b,[2,8]),{13:[1,19]},{15:[1,20]},a(b,[2,11]),a(b,[2,12]),a(b,[2,13]),a(b,[2,14]),a(b,[2,15]),a(b,[2,16]),a(b,[2,4]),a(b,[2,9]),a(b,[2,10])],defaultActions:{},parseError:(0,d.K2)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,d.K2)(function(a){var b=this,c=[0],e=[],f=[null],g=[],h=this.table,i="",j=0,k=0,l=0,m=g.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;g.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=e.pop()||n.lex()||1)&&(a instanceof Array&&(a=(e=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,d.K2)(function(a){c.length=c.length-2*a,f.length=f.length-a,g.length=g.length-a},"popStack"),(0,d.K2)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=h[v]&&h[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],h[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(j+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(j+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),f.push(n.yytext),g.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(k=n.yyleng,i=n.yytext,j=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=f[f.length-z],C._$={first_line:g[g.length-(z||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(z||1)].first_column,last_column:g[g.length-1].last_column},r&&(C._$.range=[g[g.length-(z||1)].range[0],g[g.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[i,k,j,o,w[1],f,g].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),f=f.slice(0,-1*z),g=g.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),f.push(C.$),g.push(C._$),A=h[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function l(){this.yy={}}return k.lexer={EOF:1,parseError:(0,d.K2)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,d.K2)(function(a,b){return this.yy=b||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,d.K2)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:(0,d.K2)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,d.K2)(function(){return this._more=!0,this},"more"),reject:(0,d.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,d.K2)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,d.K2)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,d.K2)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,d.K2)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,d.K2)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,d.K2)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,d.K2)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,d.K2)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,d.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,d.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,d.K2)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,d.K2)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,d.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,d.K2)(function(a,b,c,d){switch(c){case 0:case 1:case 3:case 4:break;case 2:return 10;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}}},(0,d.K2)(l,"Parser"),l.prototype=k,k.Parser=l,new l}();i.parser=i;var j={};(0,d.VA)(j,{addEvent:()=>v,addSection:()=>r,addTask:()=>u,addTaskOrg:()=>w,clear:()=>q,default:()=>y,getCommonDb:()=>p,getSections:()=>s,getTasks:()=>t});var k="",l=0,m=[],n=[],o=[],p=(0,d.K2)(()=>d.Wt,"getCommonDb"),q=(0,d.K2)(function(){m.length=0,n.length=0,k="",o.length=0,(0,d.IU)()},"clear"),r=(0,d.K2)(function(a){k=a,m.push(a)},"addSection"),s=(0,d.K2)(function(){return m},"getSections"),t=(0,d.K2)(function(){let a=x(),b=0;for(;!a&&b<100;)a=x(),b++;return n.push(...o),n},"getTasks"),u=(0,d.K2)(function(a,b,c){let d={id:l++,section:k,type:k,task:a,score:b||0,events:c?[c]:[]};o.push(d)},"addTask"),v=(0,d.K2)(function(a){o.find(a=>a.id===l-1).events.push(a)},"addEvent"),w=(0,d.K2)(function(a){let b={section:k,type:k,description:a,task:a,classes:[]};n.push(b)},"addTaskOrg"),x=(0,d.K2)(function(){let a=(0,d.K2)(function(a){return o[a].processed},"compileTask"),b=!0;for(let[c,d]of o.entries())a(c),b=b&&d.processed;return b},"compileTasks"),y={clear:q,getCommonDb:p,addSection:r,getSections:s,getTasks:t,addTask:u,addTaskOrg:w,addEvent:v},z=(0,d.K2)(function(a,b){let c=a.append("rect");return c.attr("x",b.x),c.attr("y",b.y),c.attr("fill",b.fill),c.attr("stroke",b.stroke),c.attr("width",b.width),c.attr("height",b.height),c.attr("rx",b.rx),c.attr("ry",b.ry),void 0!==b.class&&c.attr("class",b.class),c},"drawRect"),A=(0,d.K2)(function(a,b){let c=a.append("circle").attr("cx",b.cx).attr("cy",b.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),f=a.append("g");function g(a){let c=(0,e.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);a.append("path").attr("class","mouth").attr("d",c).attr("transform","translate("+b.cx+","+(b.cy+2)+")")}function h(a){let c=(0,e.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);a.append("path").attr("class","mouth").attr("d",c).attr("transform","translate("+b.cx+","+(b.cy+7)+")")}function i(a){a.append("line").attr("class","mouth").attr("stroke",2).attr("x1",b.cx-5).attr("y1",b.cy+7).attr("x2",b.cx+5).attr("y2",b.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return f.append("circle").attr("cx",b.cx-5).attr("cy",b.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),f.append("circle").attr("cx",b.cx+5).attr("cy",b.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,d.K2)(g,"smile"),(0,d.K2)(h,"sad"),(0,d.K2)(i,"ambivalent"),b.score>3?g(f):b.score<3?h(f):i(f),c},"drawFace"),B=(0,d.K2)(function(a,b){let c=b.text.replace(/<br\s*\/?>/gi," "),d=a.append("text");d.attr("x",b.x),d.attr("y",b.y),d.attr("class","legend"),d.style("text-anchor",b.anchor),void 0!==b.class&&d.attr("class",b.class);let e=d.append("tspan");return e.attr("x",b.x+2*b.textMargin),e.text(c),d},"drawText"),C=-1,D=(0,d.K2)(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),E=function(){function a(a,b,c,d,f,g,h,i){e(b.append("text").attr("x",c+f/2).attr("y",d+g/2+5).style("font-color",i).style("text-anchor","middle").text(a),h)}function b(a,b,c,d,f,g,h,i,j){let{taskFontSize:k,taskFontFamily:l}=i,m=a.split(/<br\s*\/?>/gi);for(let a=0;a<m.length;a++){let i=a*k-k*(m.length-1)/2,n=b.append("text").attr("x",c+f/2).attr("y",d).attr("fill",j).style("text-anchor","middle").style("font-size",k).style("font-family",l);n.append("tspan").attr("x",c+f/2).attr("dy",i).text(m[a]),n.attr("y",d+g/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),e(n,h)}}function c(a,c,d,f,g,h,i,j){let k=c.append("switch"),l=k.append("foreignObject").attr("x",d).attr("y",f).attr("width",g).attr("height",h).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");l.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(a),b(a,k,d,f,g,h,i,j),e(l,i)}function e(a,b){for(let c in b)c in b&&a.attr(c,b[c])}return(0,d.K2)(a,"byText"),(0,d.K2)(b,"byTspan"),(0,d.K2)(c,"byFo"),(0,d.K2)(e,"_setTextAttrs"),function(d){return"fo"===d.textPlacement?c:"old"===d.textPlacement?a:b}}(),F=(0,d.K2)(function(a){a.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 G(a,b){a.each(function(){var a,c=(0,e.Ltv)(this),d=c.text().split(/(\s+|<br>)/).reverse(),f=[],g=c.attr("y"),h=parseFloat(c.attr("dy")),i=c.text(null).append("tspan").attr("x",0).attr("y",g).attr("dy",h+"em");for(let e=0;e<d.length;e++)a=d[d.length-1-e],f.push(a),i.text(f.join(" ").trim()),(i.node().getComputedTextLength()>b||"<br>"===a)&&(f.pop(),i.text(f.join(" ").trim()),f="<br>"===a?[""]:[a],i=c.append("tspan").attr("x",0).attr("y",g).attr("dy","1.1em").text(a))})}(0,d.K2)(G,"wrap");var H=(0,d.K2)(function(a,b,c,d){let e=c%12-1,f=a.append("g");b.section=e,f.attr("class",(b.class?b.class+" ":"")+"timeline-node section-"+e);let g=f.append("g"),h=f.append("g"),i=h.append("text").text(b.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(G,b.width).node().getBBox(),j=d.fontSize?.replace?d.fontSize.replace("px",""):d.fontSize;return b.height=i.height+1.1*j*.5+b.padding,b.height=Math.max(b.height,b.maxHeight),b.width=b.width+2*b.padding,h.attr("transform","translate("+b.width/2+", "+b.padding/2+")"),J(g,b,e,d),b},"drawNode"),I=(0,d.K2)(function(a,b,c){let d=a.append("g"),e=d.append("text").text(b.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(G,b.width).node().getBBox(),f=c.fontSize?.replace?c.fontSize.replace("px",""):c.fontSize;return d.remove(),e.height+1.1*f*.5+b.padding},"getVirtualNodeHeight"),J=(0,d.K2)(function(a,b,c){a.append("path").attr("id","node-"+b.id).attr("class","node-bkg node-"+b.type).attr("d",`M0 ${b.height-5} v${-b.height+10} q0,-5 5,-5 h${b.width-10} q5,0 5,5 v${b.height-5} H0 Z`),a.append("line").attr("class","node-line-"+c).attr("x1",0).attr("y1",b.height).attr("x2",b.width).attr("y2",b.height)},"defaultBkg"),K={initGraphics:F,drawNode:H,getVirtualNodeHeight:I},L=(0,d.K2)(function(a,b,c,f){let g,h=(0,d.D7)(),i=h.timeline?.leftMargin??50;d.Rm.debug("timeline",f.db);let j=h.securityLevel;"sandbox"===j&&(g=(0,e.Ltv)("#i"+b));let k=("sandbox"===j?(0,e.Ltv)(g.nodes()[0].contentDocument.body):(0,e.Ltv)("body")).select("#"+b);k.append("g");let l=f.db.getTasks(),m=f.db.getCommonDb().getDiagramTitle();d.Rm.debug("task",l),K.initGraphics(k);let n=f.db.getSections();d.Rm.debug("sections",n);let o=0,p=0,q=0,r=0,s=50+i,t=50;r=50;let u=0,v=!0;n.forEach(function(a){let b={number:u,descr:a,section:u,width:150,padding:20,maxHeight:o},c=K.getVirtualNodeHeight(k,b,h);d.Rm.debug("sectionHeight before draw",c),o=Math.max(o,c+20)});let w=0,x=0;for(let[a,b]of(d.Rm.debug("tasks.length",l.length),l.entries())){let c={number:a,descr:b,section:b.section,width:150,padding:20,maxHeight:p},e=K.getVirtualNodeHeight(k,c,h);d.Rm.debug("taskHeight before draw",e),p=Math.max(p,e+20),w=Math.max(w,b.events.length);let f=0;for(let a of b.events){let c={descr:a,section:b.section,number:b.section,width:150,padding:20,maxHeight:50};f+=K.getVirtualNodeHeight(k,c,h)}b.events.length>0&&(f+=(b.events.length-1)*10),x=Math.max(x,f)}d.Rm.debug("maxSectionHeight before draw",o),d.Rm.debug("maxTaskHeight before draw",p),n&&n.length>0?n.forEach(a=>{let b=l.filter(b=>b.section===a),c={number:u,descr:a,section:u,width:200*Math.max(b.length,1)-50,padding:20,maxHeight:o};d.Rm.debug("sectionNode",c);let e=k.append("g"),f=K.drawNode(e,c,u,h);d.Rm.debug("sectionNode output",f),e.attr("transform",`translate(${s}, ${r})`),t+=o+50,b.length>0&&M(k,b,u,s,t,p,h,w,x,o,!1),s+=200*Math.max(b.length,1),t=r,u++}):(v=!1,M(k,l,u,s,t,p,h,w,x,o,!0));let y=k.node().getBBox();d.Rm.debug("bounds",y),m&&k.append("text").text(m).attr("x",y.width/2-i).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),q=v?o+p+150:p+100,k.append("g").attr("class","lineWrapper").append("line").attr("x1",i).attr("y1",q).attr("x2",y.width+3*i).attr("y2",q).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),(0,d.ot)(void 0,k,h.timeline?.padding??50,h.timeline?.useMaxWidth??!1)},"draw"),M=(0,d.K2)(function(a,b,c,e,f,g,h,i,j,k,l){for(let i of b){let b={descr:i.task,section:c,number:c,width:150,padding:20,maxHeight:g};d.Rm.debug("taskNode",b);let k=a.append("g").attr("class","taskWrapper"),m=K.drawNode(k,b,c,h).height;if(d.Rm.debug("taskHeight after draw",m),k.attr("transform",`translate(${e}, ${f})`),g=Math.max(g,m),i.events){let b=a.append("g").attr("class","lineWrapper");f+=100,N(a,i.events,c,e,f,h),f-=100,b.append("line").attr("x1",e+95).attr("y1",f+g).attr("x2",e+95).attr("y2",f+g+100+j+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}e+=200,l&&!h.timeline?.disableMulticolor&&c++}},"drawTasks"),N=(0,d.K2)(function(a,b,c,e,f,g){let h=0,i=f;for(let i of(f+=100,b)){let b={descr:i,section:c,number:c,width:150,padding:20,maxHeight:50};d.Rm.debug("eventNode",b);let j=a.append("g").attr("class","eventWrapper"),k=K.drawNode(j,b,c,g).height;h+=k,j.attr("transform",`translate(${e}, ${f})`),f=f+10+k}return f=i,h},"drawEvents"),O={setConf:(0,d.K2)(()=>{},"setConf"),draw:L},P=(0,d.K2)(a=>{let b="";for(let b=0;b<a.THEME_COLOR_LIMIT;b++)a["lineColor"+b]=a["lineColor"+b]||a["cScaleInv"+b],(0,f.A)(a["lineColor"+b])?a["lineColor"+b]=(0,g.A)(a["lineColor"+b],20):a["lineColor"+b]=(0,h.A)(a["lineColor"+b],20);for(let c=0;c<a.THEME_COLOR_LIMIT;c++){let d=""+(17-3*c);b+=` .section-${c-1} rect, .section-${c-1} path, .section-${c-1} circle, .section-${c-1} path { fill: ${a["cScale"+c]}; } .section-${c-1} text { fill: ${a["cScaleLabel"+c]}; } .node-icon-${c-1} { font-size: 40px; color: ${a["cScaleLabel"+c]}; } .section-edge-${c-1}{ stroke: ${a["cScale"+c]}; } .edge-depth-${c-1}{ stroke-width: ${d}; } .section-${c-1} line { stroke: ${a["cScaleInv"+c]} ; stroke-width: 3; } .lineWrapper line{ stroke: ${a["cScaleLabel"+c]} ; } .disabled, .disabled circle, .disabled text { fill: lightgray; } .disabled text { fill: #efefef; } `}return b},"genSections"),Q={db:j,renderer:O,parser:i,styles:(0,d.K2)(a=>` .edge { stroke-width: 3; } ${P(a)} .section-root rect, .section-root path, .section-root circle { fill: ${a.git0}; } .section-root text { fill: ${a.gitBranchLabel0}; } .icon-container { height:100%; display: flex; justify-content: center; align-items: center; } .edge { fill: none; } .eventWrapper { filter: brightness(120%); } `,"getStyles")}}};