You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
venv/PyCharm 2025.2.1.1/plugins/python/jupyter-web/5886.js

1 line
23 KiB

"use strict";(self.webpackChunkjupyter_web=self.webpackChunkjupyter_web||[]).push([[5886],{55886:(Ut,tt,P)=>{P.r(tt),P.d(tt,{diagram:()=>Vt});var s=P(3685),H=P(31083),kt=P(39603),bt=P(46803),vt=P(69965),K=function(){var n=(0,s.eW)(function(m,i,a,c){for(a=a||{},c=m.length;c--;a[m[c]]=i);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],r=[1,11],d=[1,12],h=[1,13],g=[1,16],f=[1,17],u={trace:(0,s.eW)(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,s.eW)(function(i,a,c,p,y,o,W){var b=o.length-1;switch(y){case 1:return o[b-1];case 2:case 6:case 7:this.$=[];break;case 3:o[b-1].push(o[b]),this.$=o[b-1];break;case 4:case 5:this.$=o[b];break;case 8:p.getCommonDb().setDiagramTitle(o[b].substr(6)),this.$=o[b].substr(6);break;case 9:this.$=o[b].trim(),p.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[b].trim(),p.getCommonDb().setAccDescription(this.$);break;case 12:p.addSection(o[b].substr(8)),this.$=o[b].substr(8);break;case 15:p.addTask(o[b],0,""),this.$=o[b];break;case 16:p.addEvent(o[b].substr(2)),this.$=o[b]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:r,16:d,17:h,18:14,19:15,20:g,21:f},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:l,14:r,16:d,17:h,18:14,19:15,20:g,21:f},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:(0,s.eW)(function(i,a){if(!a.recoverable){var c=new Error(i);throw c.hash=a,c}this.trace(i)},"parseError"),parse:(0,s.eW)(function(i){var a=this,c=[0],p=[],y=[null],o=[],W=this.table,b="",M=0,C=0,F=0,ft=2,I=1,_=o.slice.call(arguments,1),k=Object.create(this.lexer),E={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(E.yy[L]=this.yy[L]);k.setInput(i,E.yy),E.yy.lexer=k,E.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var $=k.yylloc;o.push($);var Y=k.options&&k.options.ranges;function jt(S){c.length=c.length-2*S,y.length=y.length-S,o.length=o.length-S}function mt(){var S;return"number"!=typeof(S=p.pop()||k.lex()||I)&&(S instanceof Array&&(S=(p=S).pop()),S=a.symbols_[S]||S),S}"function"==typeof E.yy.parseError?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.eW)(jt,"popStack"),(0,s.eW)(mt,"lex");for(var w,X,R,T,q,U,N,xt,Z,z={};;){if(R=c[c.length-1],this.defaultActions[R]?T=this.defaultActions[R]:((null===w||typeof w>"u")&&(w=mt()),T=W[R]&&W[R][w]),typeof T>"u"||!T.length||!T[0]){var D="";for(U in Z=[],W[R])this.terminals_[U]&&U>ft&&Z.push("'"+this.terminals_[U]+"'");D=k.showPosition?"Parse error on line "+(M+1)+":\n"+k.showPosition()+"\nExpecting "+Z.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(M+1)+": Unexpected "+(w==I?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(D,{text:k.match,token:this.terminals_[w]||w,line:k.yylineno,loc:$,expected:Z})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+w);switch(T[0]){case 1:c.push(w),y.push(k.yytext),o.push(k.yylloc),c.push(T[1]),w=null,X?(w=X,X=null):(C=k.yyleng,b=k.yytext,M=k.yylineno,$=k.yylloc,F>0&&F--);break;case 2:if(N=this.productions_[T[1]][1],z.$=y[y.length-N],z._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},Y&&(z._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),typeof(q=this.performAction.apply(z,[b,C,M,E.yy,T[1],y,o].concat(_)))<"u")return q;N&&(c=c.slice(0,-1*N*2),y=y.slice(0,-1*N),o=o.slice(0,-1*N)),c.push(this.productions_[T[1]][0]),y.push(z.$),o.push(z._$),xt=W[c[c.length-2]][c[c.length-1]],c.push(xt);break;case 3:return!0}}return!0},"parse")},x=function(){return{EOF:1,parseError:(0,s.eW)(function(a,c){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,c)},"parseError"),setInput:(0,s.eW)(function(i,a){return this.yy=a||this.yy||{},this._input=i,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,s.eW)(function(){var i=this._input[0];return this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i,i.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),i},"input"),unput:(0,s.eW)(function(i){var a=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var p=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 y=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===p.length?this.yylloc.first_column:0)+p[p.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:(0,s.eW)(function(){return this._more=!0,this},"more"),reject:(0,s.eW)(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,s.eW)(function(i){this.unput(this.match.slice(i))},"less"),pastInput:(0,s.eW)(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,s.eW)(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,s.eW)(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+"\n"+a+"^"},"showPosition"),test_match:(0,s.eW)(function(i,a){var c,p,y;if(this.options.backtrack_lexer&&(y={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&&(y.yylloc.range=this.yylloc.range.slice(0))),(p=i[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,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(i[0].length),this.matched+=i[0],c=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var o in y)this[o]=y[o];return!1}return!1},"test_match"),next:(0,s.eW)(function(){if(this.done)return this.EOF;var i,a,c,p;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),o=0;o<y.length;o++)if((c=this._input.match(this.rules[y[o]]))&&(!a||c[0].length>a[0].length)){if(a=c,p=o,this.options.backtrack_lexer){if(!1!==(i=this.test_match(c,y[o])))return i;if(this._backtrack){a=!1;continue}return!1}if(!this.options.flex)break}return a?!1!==(i=this.test_match(a,y[p]))&&i:""===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,s.eW)(function(){return this.next()||this.lex()},"lex"),begin:(0,s.eW)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,s.eW)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,s.eW)(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,s.eW)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,s.eW)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,s.eW)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.eW)(function(a,c,p,y){switch(p){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]+)/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}}}}();function v(){this.yy={}}return u.lexer=x,(0,s.eW)(v,"Parser"),v.prototype=u,u.Parser=v,new v}();K.parser=K;var _t=K,et={};(0,s.r2)(et,{addEvent:()=>ct,addSection:()=>it,addTask:()=>ot,addTaskOrg:()=>ht,clear:()=>st,default:()=>wt,getCommonDb:()=>rt,getSections:()=>at,getTasks:()=>lt});var O="",nt=0,G=[],V=[],B=[],rt=(0,s.eW)(()=>s.LJ,"getCommonDb"),st=(0,s.eW)(function(){G.length=0,V.length=0,O="",B.length=0,(0,s.ZH)()},"clear"),it=(0,s.eW)(function(n){O=n,G.push(n)},"addSection"),at=(0,s.eW)(function(){return G},"getSections"),lt=(0,s.eW)(function(){let n=dt();let e=0;for(;!n&&e<100;)n=dt(),e++;return V.push(...B),V},"getTasks"),ot=(0,s.eW)(function(n,t,e){const l={id:nt++,section:O,type:O,task:n,score:t||0,events:e?[e]:[]};B.push(l)},"addTask"),ct=(0,s.eW)(function(n){B.find(e=>e.id===nt-1).events.push(n)},"addEvent"),ht=(0,s.eW)(function(n){const t={section:O,type:O,description:n,task:n,classes:[]};V.push(t)},"addTaskOrg"),dt=(0,s.eW)(function(){const n=(0,s.eW)(function(e){return B[e].processed},"compileTask");let t=!0;for(const[e,l]of B.entries())n(e),t=t&&l.processed;return t},"compileTasks"),wt={clear:st,getCommonDb:rt,addSection:it,getSections:at,getTasks:lt,addTask:ot,addTaskOrg:ht,addEvent:ct},j=(0,s.eW)(function(n,t){const e=n.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),void 0!==t.class&&e.attr("class",t.class),e},"drawRect"),Et=(0,s.eW)(function(n,t){const l=n.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),r=n.append("g");function d(f){const u=(0,H.Nb1)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(6.8181818181818175);f.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}function h(f){const u=(0,H.Nb1)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(6.8181818181818175);f.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}function g(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 r.append("circle").attr("cx",t.cx-5).attr("cy",t.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",t.cx+5).attr("cy",t.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,s.eW)(d,"smile"),(0,s.eW)(h,"sad"),(0,s.eW)(g,"ambivalent"),t.score>3?d(r):t.score<3?h(r):g(r),l},"drawFace"),St=(0,s.eW)(function(n,t){const e=n.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),void 0!==e.class&&e.attr("class",e.class),void 0!==t.title&&e.append("title").text(t.title),e},"drawCircle"),ut=(0,s.eW)(function(n,t){const e=t.text.replace(/<br\s*\/?>/gi," "),l=n.append("text");l.attr("x",t.x),l.attr("y",t.y),l.attr("class","legend"),l.style("text-anchor",t.anchor),void 0!==t.class&&l.attr("class",t.class);const r=l.append("tspan");return r.attr("x",t.x+2*t.textMargin),r.text(e),l},"drawText"),Tt=(0,s.eW)(function(n,t){function e(r,d,h,g,f){return r+","+d+" "+(r+h)+","+d+" "+(r+h)+","+(d+g-f)+" "+(r+h-1.2*f)+","+(d+g)+" "+r+","+(d+g)}(0,s.eW)(e,"genPoints");const l=n.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,ut(n,t)},"drawLabel"),Mt=(0,s.eW)(function(n,t,e){const l=n.append("g"),r=J();r.x=t.x,r.y=t.y,r.fill=t.fill,r.width=e.width,r.height=e.height,r.class="journey-section section-type-"+t.num,r.rx=3,r.ry=3,j(l,r),yt(e)(t.text,l,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+t.num},e,t.colour)},"drawSection"),pt=-1,It=(0,s.eW)(function(n,t,e){const l=t.x+e.width/2,r=n.append("g");pt++;r.append("line").attr("id","task"+pt).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"),Et(r,{cx:l,cy:300+30*(5-t.score),score:t.score});const h=J();h.x=t.x,h.y=t.y,h.fill=t.fill,h.width=e.width,h.height=e.height,h.class="task task-type-"+t.num,h.rx=3,h.ry=3,j(r,h),yt(e)(t.task,r,h.x,h.y,h.width,h.height,{class:"task"},e,t.colour)},"drawTask"),Nt=(0,s.eW)(function(n,t){j(n,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),Lt=(0,s.eW)(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),J=(0,s.eW)(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),yt=function(){function n(r,d,h,g,f,u,x,v){l(d.append("text").attr("x",h+f/2).attr("y",g+u/2+5).style("font-color",v).style("text-anchor","middle").text(r),x)}function t(r,d,h,g,f,u,x,v,m){const{taskFontSize:i,taskFontFamily:a}=v,c=r.split(/<br\s*\/?>/gi);for(let p=0;p<c.length;p++){const y=p*i-i*(c.length-1)/2,o=d.append("text").attr("x",h+f/2).attr("y",g).attr("fill",m).style("text-anchor","middle").style("font-size",i).style("font-family",a);o.append("tspan").attr("x",h+f/2).attr("dy",y).text(c[p]),o.attr("y",g+u/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),l(o,x)}}function e(r,d,h,g,f,u,x,v){const m=d.append("switch"),a=m.append("foreignObject").attr("x",h).attr("y",g).attr("width",f).attr("height",u).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(r),t(r,m,h,g,f,u,x,v),l(a,x)}function l(r,d){for(const h in d)h in d&&r.attr(h,d[h])}return(0,s.eW)(n,"byText"),(0,s.eW)(t,"byTspan"),(0,s.eW)(e,"byFo"),(0,s.eW)(l,"_setTextAttrs"),function(r){return"fo"===r.textPlacement?e:"old"===r.textPlacement?n:t}}(),Pt=(0,s.eW)(function(n){n.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 Q(n,t){n.each(function(){var r,e=(0,H.Ys)(this),l=e.text().split(/(\s+|<br>)/).reverse(),d=[],g=e.attr("y"),f=parseFloat(e.attr("dy")),u=e.text(null).append("tspan").attr("x",0).attr("y",g).attr("dy",f+"em");for(let x=0;x<l.length;x++)r=l[l.length-1-x],d.push(r),u.text(d.join(" ").trim()),(u.node().getComputedTextLength()>t||"<br>"===r)&&(d.pop(),u.text(d.join(" ").trim()),d="<br>"===r?[""]:[r],u=e.append("tspan").attr("x",0).attr("y",g).attr("dy","1.1em").text(r))})}(0,s.eW)(Q,"wrap");var At=(0,s.eW)(function(n,t,e,l){const r=e%12-1,d=n.append("g");t.section=r,d.attr("class",(t.class?t.class+" ":"")+"timeline-node section-"+r);const h=d.append("g"),g=d.append("g"),u=g.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(Q,t.width).node().getBBox(),x=l.fontSize?.replace?l.fontSize.replace("px",""):l.fontSize;return t.height=u.height+1.1*x*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,g.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),$t(h,t,r,l),t},"drawNode"),Ct=(0,s.eW)(function(n,t,e){const l=n.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(Q,t.width).node().getBBox(),h=e.fontSize?.replace?e.fontSize.replace("px",""):e.fontSize;return l.remove(),d.height+1.1*h*.5+t.padding},"getVirtualNodeHeight"),$t=(0,s.eW)(function(n,t,e){n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d",`M0 ${t.height-5} v${10-t.height} q0,-5 5,-5 h${t.width-10} q5,0 5,5 v${t.height-5} H0 Z`),n.append("line").attr("class","node-line-"+e).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),A={drawRect:j,drawCircle:St,drawSection:Mt,drawText:ut,drawLabel:Tt,drawTask:It,drawBackgroundRect:Nt,getTextObj:Lt,getNoteRect:J,initGraphics:Pt,drawNode:At,getVirtualNodeHeight:Ct},Rt=(0,s.eW)(function(n,t,e,l){const r=(0,s.nV)(),d=r.leftMargin??50;s.cM.debug("timeline",l.db);const h=r.securityLevel;let g;"sandbox"===h&&(g=(0,H.Ys)("#i"+t));const u=("sandbox"===h?(0,H.Ys)(g.nodes()[0].contentDocument.body):(0,H.Ys)("body")).select("#"+t);u.append("g");const x=l.db.getTasks(),v=l.db.getCommonDb().getDiagramTitle();s.cM.debug("task",x),A.initGraphics(u);const m=l.db.getSections();s.cM.debug("sections",m);let i=0,a=0,c=0,p=0,y=50+d,o=50;p=50;let W=0,b=!0;m.forEach(function(I){const _={number:W,descr:I,section:W,width:150,padding:20,maxHeight:i},k=A.getVirtualNodeHeight(u,_,r);s.cM.debug("sectionHeight before draw",k),i=Math.max(i,k+20)});let M=0,C=0;s.cM.debug("tasks.length",x.length);for(const[I,_]of x.entries()){const k={number:I,descr:_,section:_.section,width:150,padding:20,maxHeight:a},E=A.getVirtualNodeHeight(u,k,r);s.cM.debug("taskHeight before draw",E),a=Math.max(a,E+20),M=Math.max(M,_.events.length);let L=0;for(const $ of _.events){const Y={descr:$,section:_.section,number:_.section,width:150,padding:20,maxHeight:50};L+=A.getVirtualNodeHeight(u,Y,r)}C=Math.max(C,L)}s.cM.debug("maxSectionHeight before draw",i),s.cM.debug("maxTaskHeight before draw",a),m&&m.length>0?m.forEach(I=>{const _=x.filter($=>$.section===I),k={number:W,descr:I,section:W,width:200*Math.max(_.length,1)-50,padding:20,maxHeight:i};s.cM.debug("sectionNode",k);const E=u.append("g"),L=A.drawNode(E,k,W,r);s.cM.debug("sectionNode output",L),E.attr("transform",`translate(${y}, 50)`),o+=i+50,_.length>0&&gt(u,_,W,y,o,a,r,M,C,i,!1),y+=200*Math.max(_.length,1),o=50,W++}):(b=!1,gt(u,x,W,y,o,a,r,M,C,i,!0));const F=u.node().getBBox();s.cM.debug("bounds",F),v&&u.append("text").text(v).attr("x",F.width/2-d).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),c=b?i+a+150:a+100,u.append("g").attr("class","lineWrapper").append("line").attr("x1",d).attr("y1",c).attr("x2",F.width+3*d).attr("y2",c).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),(0,s.j7)(void 0,u,r.timeline?.padding??50,r.timeline?.useMaxWidth??!1)},"draw"),gt=(0,s.eW)(function(n,t,e,l,r,d,h,g,f,u,x){for(const v of t){const m={descr:v.task,section:e,number:e,width:150,padding:20,maxHeight:d};s.cM.debug("taskNode",m);const i=n.append("g").attr("class","taskWrapper"),c=A.drawNode(i,m,e,h).height;if(s.cM.debug("taskHeight after draw",c),i.attr("transform",`translate(${l}, ${r})`),d=Math.max(d,c),v.events){const p=n.append("g").attr("class","lineWrapper");let y=d;r+=100,y+=Ht(n,v.events,e,l,r,h),r-=100,p.append("line").attr("x1",l+95).attr("y1",r+d).attr("x2",l+95).attr("y2",r+d+(x?d:u)+f+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}l+=200,x&&!h.timeline?.disableMulticolor&&e++}r-=10},"drawTasks"),Ht=(0,s.eW)(function(n,t,e,l,r,d){let h=0;const g=r;r+=100;for(const f of t){const u={descr:f,section:e,number:e,width:150,padding:20,maxHeight:50};s.cM.debug("eventNode",u);const x=n.append("g").attr("class","eventWrapper"),m=A.drawNode(x,u,e,d).height;h+=m,x.attr("transform",`translate(${l}, ${r})`),r=r+10+m}return r=g,h},"drawEvents"),Ot={setConf:(0,s.eW)(()=>{},"setConf"),draw:Rt},Bt=(0,s.eW)(n=>{let t="";for(let e=0;e<n.THEME_COLOR_LIMIT;e++)n["lineColor"+e]=n["lineColor"+e]||n["cScaleInv"+e],(0,kt.Z)(n["lineColor"+e])?n["lineColor"+e]=(0,bt.Z)(n["lineColor"+e],20):n["lineColor"+e]=(0,vt.Z)(n["lineColor"+e],20);for(let e=0;e<n.THEME_COLOR_LIMIT;e++){const l=""+(17-3*e);t+=`\n .section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} path {\n fill: ${n["cScale"+e]};\n }\n .section-${e-1} text {\n fill: ${n["cScaleLabel"+e]};\n }\n .node-icon-${e-1} {\n font-size: 40px;\n color: ${n["cScaleLabel"+e]};\n }\n .section-edge-${e-1}{\n stroke: ${n["cScale"+e]};\n }\n .edge-depth-${e-1}{\n stroke-width: ${l};\n }\n .section-${e-1} line {\n stroke: ${n["cScaleInv"+e]} ;\n stroke-width: 3;\n }\n\n .lineWrapper line{\n stroke: ${n["cScaleLabel"+e]} ;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n `}return t},"genSections"),Vt={db:et,renderer:Ot,parser:_t,styles:(0,s.eW)(n=>`\n .edge {\n stroke-width: 3;\n }\n ${Bt(n)}\n .section-root rect, .section-root path, .section-root circle {\n fill: ${n.git0};\n }\n .section-root text {\n fill: ${n.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .eventWrapper {\n filter: brightness(120%);\n }\n`,"getStyles")}}}]);