@yushih/agent-symposium 0.0.0-stage → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/api/contract.js +39 -0
- package/package.json +15 -4
- package/package.json~ +17 -0
- package/public/assets/abnfDiagram-VCTEODGH-Js6Rrzgw.js +1 -0
- package/public/assets/architectureDiagram-5GKGNRK7-D1XJWPp5.js +36 -0
- package/public/assets/blockDiagram-I7D4REHJ-C0IusX6s.js +129 -0
- package/public/assets/c4Diagram-7LVT6UL2-VqSRyhiL.js +38 -0
- package/public/assets/channel-BBLi4I4y.js +1 -0
- package/public/assets/chunk-2Q5K7J3B-gW5WXQ_L.js +1 -0
- package/public/assets/chunk-5VM5RSS4-JpZyZpNy.js +15 -0
- package/public/assets/chunk-F27PBJKO-i24AbnCS.js +1 -0
- package/public/assets/chunk-IMKFNOWR-CZPfsfvy.js +231 -0
- package/public/assets/chunk-JWPE2WC7-4m0OBNzR.js +1 -0
- package/public/assets/chunk-POPQ4Y6H-DRAyn2gm.js +1 -0
- package/public/assets/chunk-SVP7TREG-Clh6ApHO.js +88 -0
- package/public/assets/chunk-TICWLB2K-NdBF09L-.js +206 -0
- package/public/assets/chunk-XXDRQBXY-GOkNmdCR.js +1 -0
- package/public/assets/classDiagram-ZZMXUADV-oVrpdu5B.js +1 -0
- package/public/assets/classDiagram-v2-VYDZK3BY-BN7Y2lnx.js +1 -0
- package/public/assets/cose-bilkent-JH36ORCC-v1dSRzjh.js +1 -0
- package/public/assets/cynefin-OW5HDTMX-DF5PyYiH.js +166 -0
- package/public/assets/cynefinDiagram-5FMLGOSQ-BT_Y-cAy.js +62 -0
- package/public/assets/cytoscape.esm-BHa1VTXv.js +321 -0
- package/public/assets/d3-scale-4DPf7zan.js +1 -0
- package/public/assets/dagre-GXQ25YYZ-BdIw5lbe.js +4 -0
- package/public/assets/diagram-S7CK7UJ4-C7FBKTZS.js +30 -0
- package/public/assets/diagram-UQ7AKVKN-lKdG7lqX.js +41 -0
- package/public/assets/diagram-VSXAHHWV-D_3F9ILF.js +3 -0
- package/public/assets/diagram-VX7I27RA-CDlQWNIj.js +24 -0
- package/public/assets/diagram-Z3DM3KII-DwScjNa6.js +24 -0
- package/public/assets/ebnfDiagram-PWID7BFC-CvYgSJJ8.js +1 -0
- package/public/assets/erDiagram-RLTQ6QDP-BTvcZ95I.js +99 -0
- package/public/assets/flowDiagram-HODETNUW-yqFIam_I.js +168 -0
- package/public/assets/ganttDiagram-EL5Y4UJY-CmO3baEZ.js +292 -0
- package/public/assets/gitGraphDiagram-WWUBYQGX-D9BBCVBd.js +106 -0
- package/public/assets/index-C7iS8lCk.css +1 -0
- package/public/assets/index-_OdfRxhK.js +68 -0
- package/public/assets/infoDiagram-27XIBGKW-l4ZAb9bV.js +2 -0
- package/public/assets/ishikawaDiagram-5VMMS53U-DCWxeMY-.js +70 -0
- package/public/assets/journeyDiagram-3NMN7TZE-DyFpfxWW.js +139 -0
- package/public/assets/kanban-definition-UXKFOSKX-D8ymfQnB.js +89 -0
- package/public/assets/katex-HP8lGamR.js +257 -0
- package/public/assets/layout-cA8VY5f7.js +1 -0
- package/public/assets/mermaid.core-DPkPce7p.js +308 -0
- package/public/assets/mindmap-definition-YA3MSWOX-Dlp2rW3e.js +96 -0
- package/public/assets/pegDiagram-XKGWAZYB-DodDrWUK.js +1 -0
- package/public/assets/pieDiagram-E7YTZNPT-OEEepLsx.js +39 -0
- package/public/assets/quadrantDiagram-AXDQQJYC-D28ZmzWs.js +7 -0
- package/public/assets/railroadDiagram-O6MQD6OU-CWmn2qRn.js +1 -0
- package/public/assets/requirementDiagram-BXWQKSXE-BFcRQnk_.js +84 -0
- package/public/assets/sankeyDiagram-P5KCCOFB-A0R7BzAD.js +40 -0
- package/public/assets/sequenceDiagram-WJ2MYXX4-DvHW0_gb.js +162 -0
- package/public/assets/sizeCapture-INFHLROL-DXG_91Jv.js +1 -0
- package/public/assets/stateDiagram-D77RDMKH-Cmt-TYLs.js +1 -0
- package/public/assets/stateDiagram-v2-MP3YSRHH-D_3rt-M8.js +1 -0
- package/public/assets/swimlanes-42K2YHIH-DMxcvovR.js +1 -0
- package/public/assets/swimlanesDiagram-VR7AAH4N-DZpV22EG.js +8 -0
- package/public/assets/timeline-definition-24CTP7MA-DNOeH402.js +120 -0
- package/public/assets/vennDiagram-4TSXK5OY-DoeDdhSY.js +34 -0
- package/public/assets/wardleyDiagram-VM6X3IG4-D8kM2WC_.js +78 -0
- package/public/assets/xychartDiagram-S5SC5T6Z-BF_OH43h.js +7 -0
- package/public/index.html +3 -0
- package/server/app.js +107 -0
- package/server/chat.js +70 -0
- package/server/main.js +50 -0
- package/server/presentation.js +34 -0
- package/server/repository.js +42 -0
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
import{g as Te,s as be,o as we,n as _e,a as De,b as Se,_ as l,c as dt,j as vt,d as Ce,aX as U,l as ot,k as Me,L as Ee,p as Ie,x as Ye}from"./mermaid.core-DPkPce7p.js";import{g as It}from"./index-_OdfRxhK.js";import{t as $e,m as Ae,a as Fe,l as Le,h as Oe,c as Zt,d as Qt,e as We,g as Pe,i as Ve,j as Re,k as ze,n as Ne,p as He,q as Kt,r as Jt,s as te,u as ee,v as re}from"./d3-scale-4DPf7zan.js";function Be(t){return t}var Tt=1,$t=2,Ft=3,xt=4,se=1e-6;function qe(t){return"translate("+t+",0)"}function Ge(t){return"translate(0,"+t+")"}function Xe(t){return e=>+t(e)}function je(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),s=>+t(s)+e}function Ue(){return!this.__axis}function de(t,e){var s=[],r=null,n=null,g=6,y=6,b=3,C=typeof window<"u"&&window.devicePixelRatio>1?0:.5,L=t===Tt||t===xt?-1:1,w=t===xt||t===$t?"x":"y",P=t===Tt||t===Ft?qe:Ge;function _(D){var G=r??(e.ticks?e.ticks.apply(e,s):e.domain()),N=n??(e.tickFormat?e.tickFormat.apply(e,s):Be),k=Math.max(g,0)+b,M=e.range(),W=+M[0]+C,O=+M[M.length-1]+C,H=(e.bandwidth?je:Xe)(e.copy(),C),z=D.selection?D.selection():D,I=z.selectAll(".domain").data([null]),x=z.selectAll(".tick").data(G,e).order(),h=x.exit(),E=x.enter().append("g").attr("class","tick"),f=x.select("line"),T=x.select("text");I=I.merge(I.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(E),f=f.merge(E.append("line").attr("stroke","currentColor").attr(w+"2",L*g)),T=T.merge(E.append("text").attr("fill","currentColor").attr(w,L*k).attr("dy",t===Tt?"0em":t===Ft?"0.71em":"0.32em")),D!==z&&(I=I.transition(D),x=x.transition(D),f=f.transition(D),T=T.transition(D),h=h.transition(D).attr("opacity",se).attr("transform",function(v){return isFinite(v=H(v))?P(v+C):this.getAttribute("transform")}),E.attr("opacity",se).attr("transform",function(v){var p=this.parentNode.__axis;return P((p&&isFinite(p=p(v))?p:H(v))+C)})),h.remove(),I.attr("d",t===xt||t===$t?y?"M"+L*y+","+W+"H"+C+"V"+O+"H"+L*y:"M"+C+","+W+"V"+O:y?"M"+W+","+L*y+"V"+C+"H"+O+"V"+L*y:"M"+W+","+C+"H"+O),x.attr("opacity",1).attr("transform",function(v){return P(H(v)+C)}),f.attr(w+"2",L*g),T.attr(w,L*k).text(N),z.filter(Ue).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===$t?"start":t===xt?"end":"middle"),z.each(function(){this.__axis=H})}return _.scale=function(D){return arguments.length?(e=D,_):e},_.ticks=function(){return s=Array.from(arguments),_},_.tickArguments=function(D){return arguments.length?(s=D==null?[]:Array.from(D),_):s.slice()},_.tickValues=function(D){return arguments.length?(r=D==null?null:Array.from(D),_):r&&r.slice()},_.tickFormat=function(D){return arguments.length?(n=D,_):n},_.tickSize=function(D){return arguments.length?(g=y=+D,_):g},_.tickSizeInner=function(D){return arguments.length?(g=+D,_):g},_.tickSizeOuter=function(D){return arguments.length?(y=+D,_):y},_.tickPadding=function(D){return arguments.length?(b=+D,_):b},_.offset=function(D){return arguments.length?(C=+D,_):C},_}function Ze(t){return de(Tt,t)}function Qe(t){return de(Ft,t)}var bt={exports:{}},Ke=bt.exports,ie;function Je(){return ie||(ie=1,(function(t,e){(function(s,r){t.exports=r()})(Ke,(function(){var s="day";return function(r,n,g){var y=function(L){return L.add(4-L.isoWeekday(),s)},b=n.prototype;b.isoWeekYear=function(){return y(this).year()},b.isoWeek=function(L){if(!this.$utils().u(L))return this.add(7*(L-this.isoWeek()),s);var w,P,_,D,G=y(this),N=(w=this.isoWeekYear(),P=this.$u,_=(P?g.utc:g)().year(w).startOf("year"),D=4-_.isoWeekday(),_.isoWeekday()>4&&(D+=7),_.add(D,s));return G.diff(N,"week")+1},b.isoWeekday=function(L){return this.$utils().u(L)?this.day()||7:this.day(this.day()%7?L:L-7)};var C=b.startOf;b.startOf=function(L,w){var P=this.$utils(),_=!!P.u(w)||w;return P.p(L)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):C.bind(this)(L,w)}}}))})(bt)),bt.exports}var tr=Je();const er=It(tr);var wt={exports:{}},rr=wt.exports,ne;function sr(){return ne||(ne=1,(function(t,e){(function(s,r){t.exports=r()})(rr,(function(){var s={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,g=/\d\d/,y=/\d\d?/,b=/\d*[^-_:/,()\s\d]+/,C={},L=function(k){return(k=+k)+(k>68?1900:2e3)},w=function(k){return function(M){this[k]=+M}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(k){(this.zone||(this.zone={})).offset=(function(M){if(!M||M==="Z")return 0;var W=M.match(/([+-]|\d\d)/g),O=60*W[1]+(+W[2]||0);return O===0?0:W[0]==="+"?-O:O})(k)}],_=function(k){var M=C[k];return M&&(M.indexOf?M:M.s.concat(M.f))},D=function(k,M){var W,O=C.meridiem;if(O){for(var H=1;H<=24;H+=1)if(k.indexOf(O(H,0,M))>-1){W=H>12;break}}else W=k===(M?"pm":"PM");return W},G={A:[b,function(k){this.afternoon=D(k,!1)}],a:[b,function(k){this.afternoon=D(k,!0)}],Q:[n,function(k){this.month=3*(k-1)+1}],S:[n,function(k){this.milliseconds=100*+k}],SS:[g,function(k){this.milliseconds=10*+k}],SSS:[/\d{3}/,function(k){this.milliseconds=+k}],s:[y,w("seconds")],ss:[y,w("seconds")],m:[y,w("minutes")],mm:[y,w("minutes")],H:[y,w("hours")],h:[y,w("hours")],HH:[y,w("hours")],hh:[y,w("hours")],D:[y,w("day")],DD:[g,w("day")],Do:[b,function(k){var M=C.ordinal,W=k.match(/\d+/);if(this.day=W[0],M)for(var O=1;O<=31;O+=1)M(O).replace(/\[|\]/g,"")===k&&(this.day=O)}],w:[y,w("week")],ww:[g,w("week")],M:[y,w("month")],MM:[g,w("month")],MMM:[b,function(k){var M=_("months"),W=(_("monthsShort")||M.map((function(O){return O.slice(0,3)}))).indexOf(k)+1;if(W<1)throw new Error;this.month=W%12||W}],MMMM:[b,function(k){var M=_("months").indexOf(k)+1;if(M<1)throw new Error;this.month=M%12||M}],Y:[/[+-]?\d+/,w("year")],YY:[g,function(k){this.year=L(k)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function N(k){var M,W;M=k,W=C&&C.formats;for(var O=(k=M.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(f,T,v){var p=v&&v.toUpperCase();return T||W[v]||s[v]||W[p].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(a,d,m){return d||m.slice(1)}))}))).match(r),H=O.length,z=0;z<H;z+=1){var I=O[z],x=G[I],h=x&&x[0],E=x&&x[1];O[z]=E?{regex:h,parser:E}:I.replace(/^\[|\]$/g,"")}return function(f){for(var T={},v=0,p=0;v<H;v+=1){var a=O[v];if(typeof a=="string")p+=a.length;else{var d=a.regex,m=a.parser,u=f.slice(p),S=d.exec(u)[0];m.call(T,S),f=f.replace(S,"")}}return(function(i){var Y=i.afternoon;if(Y!==void 0){var o=i.hours;Y?o<12&&(i.hours+=12):o===12&&(i.hours=0),delete i.afternoon}})(T),T}}return function(k,M,W){W.p.customParseFormat=!0,k&&k.parseTwoDigitYear&&(L=k.parseTwoDigitYear);var O=M.prototype,H=O.parse;O.parse=function(z){var I=z.date,x=z.utc,h=z.args;this.$u=x;var E=h[1];if(typeof E=="string"){var f=h[2]===!0,T=h[3]===!0,v=f||T,p=h[2];T&&(p=h[2]),C=this.$locale(),!f&&p&&(C=W.Ls[p]),this.$d=(function(u,S,i,Y){try{if(["x","X"].indexOf(S)>-1)return new Date((S==="X"?1e3:1)*u);var o=N(S)(u),q=o.year,c=o.month,$=o.day,A=o.hours,R=o.minutes,F=o.seconds,B=o.milliseconds,V=o.zone,st=o.week,nt=new Date,yt=$||(q||c?1:nt.getDate()),lt=q||nt.getFullYear(),X=0;q&&!c||(X=c>0?c-1:nt.getMonth());var K,Z=A||0,at=R||0,J=F||0,it=B||0;return V?new Date(Date.UTC(lt,X,yt,Z,at,J,it+60*V.offset*1e3)):i?new Date(Date.UTC(lt,X,yt,Z,at,J,it)):(K=new Date(lt,X,yt,Z,at,J,it),st&&(K=Y(K).week(st).toDate()),K)}catch{return new Date("")}})(I,E,x,W),this.init(),p&&p!==!0&&(this.$L=this.locale(p).$L),v&&I!=this.format(E)&&(this.$d=new Date("")),C={}}else if(E instanceof Array)for(var a=E.length,d=1;d<=a;d+=1){h[1]=E[d-1];var m=W.apply(this,h);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}d===a&&(this.$d=new Date(""))}else H.call(this,z)}}}))})(wt)),wt.exports}var ir=sr();const nr=It(ir);var _t={exports:{}},ar=_t.exports,ae;function or(){return ae||(ae=1,(function(t,e){(function(s,r){t.exports=r()})(ar,(function(){return function(s,r){var n=r.prototype,g=n.format;n.format=function(y){var b=this,C=this.$locale();if(!this.isValid())return g.bind(this)(y);var L=this.$utils(),w=(y||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(P){switch(P){case"Q":return Math.ceil((b.$M+1)/3);case"Do":return C.ordinal(b.$D);case"gggg":return b.weekYear();case"GGGG":return b.isoWeekYear();case"wo":return C.ordinal(b.week(),"W");case"w":case"ww":return L.s(b.week(),P==="w"?1:2,"0");case"W":case"WW":return L.s(b.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return L.s(String(b.$H===0?24:b.$H),P==="k"?1:2,"0");case"X":return Math.floor(b.$d.getTime()/1e3);case"x":return b.$d.getTime();case"z":return"["+b.offsetName()+"]";case"zzz":return"["+b.offsetName("long")+"]";default:return P}}));return g.bind(this)(w)}}}))})(_t)),_t.exports}var cr=or();const lr=It(cr);var Dt={exports:{}},ur=Dt.exports,oe;function dr(){return oe||(oe=1,(function(t,e){(function(s,r){t.exports=r()})(ur,(function(){var s,r,n=1e3,g=6e4,y=36e5,b=864e5,C=31536e6,L=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:C,months:L,days:b,hours:y,minutes:g,seconds:n,milliseconds:1,weeks:6048e5},D=function(I){return I instanceof H},G=function(I,x,h){return new H(I,h,x.$l)},N=function(I){return r.p(I)+"s"},k=function(I){return I<0},M=function(I){return k(I)?Math.ceil(I):Math.floor(I)},W=function(I){return Math.abs(I)},O=function(I,x){return I?k(I)?{negative:!0,format:""+W(I)+x}:{negative:!1,format:""+I+x}:{negative:!1,format:""}},H=(function(){function I(h,E,f){var T=this;if(this.$d={},this.$l=f,h===void 0&&(this.$ms=0,this.parseFromMilliseconds()),E)return G(h*_[N(E)],this);if(typeof h=="number")return this.$ms=h,this.parseFromMilliseconds(),this;if(typeof h=="object")return Object.keys(h).forEach((function(a){T.$d[N(a)]=h[a]})),this.calMilliseconds(),this;if(typeof h=="string"){var v=h.match(w);if(v){var p=v.slice(2).map((function(a){return a!=null?Number(a):0}));return this.$d.years=p[0],this.$d.months=p[1],this.$d.weeks=p[2],this.$d.days=p[3],this.$d.hours=p[4],this.$d.minutes=p[5],this.$d.seconds=p[6],this.calMilliseconds(),this}}return this}var x=I.prototype;return x.calMilliseconds=function(){var h=this;this.$ms=Object.keys(this.$d).reduce((function(E,f){return E+(h.$d[f]||0)*_[f]}),0)},x.parseFromMilliseconds=function(){var h=this.$ms;this.$d.years=M(h/C),h%=C,this.$d.months=M(h/L),h%=L,this.$d.days=M(h/b),h%=b,this.$d.hours=M(h/y),h%=y,this.$d.minutes=M(h/g),h%=g,this.$d.seconds=M(h/n),h%=n,this.$d.milliseconds=h},x.toISOString=function(){var h=O(this.$d.years,"Y"),E=O(this.$d.months,"M"),f=+this.$d.days||0;this.$d.weeks&&(f+=7*this.$d.weeks);var T=O(f,"D"),v=O(this.$d.hours,"H"),p=O(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3,a=Math.round(1e3*a)/1e3);var d=O(a,"S"),m=h.negative||E.negative||T.negative||v.negative||p.negative||d.negative,u=v.format||p.format||d.format?"T":"",S=(m?"-":"")+"P"+h.format+E.format+T.format+u+v.format+p.format+d.format;return S==="P"||S==="-P"?"P0D":S},x.toJSON=function(){return this.toISOString()},x.format=function(h){var E=h||"YYYY-MM-DDTHH:mm:ss",f={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return E.replace(P,(function(T,v){return v||String(f[T])}))},x.as=function(h){return this.$ms/_[N(h)]},x.get=function(h){var E=this.$ms,f=N(h);return f==="milliseconds"?E%=1e3:E=f==="weeks"?M(E/_[f]):this.$d[f],E||0},x.add=function(h,E,f){var T;return T=E?h*_[N(E)]:D(h)?h.$ms:G(h,this).$ms,G(this.$ms+T*(f?-1:1),this)},x.subtract=function(h,E){return this.add(h,E,!0)},x.locale=function(h){var E=this.clone();return E.$l=h,E},x.clone=function(){return G(this.$ms,this)},x.humanize=function(h){return s().add(this.$ms,"ms").locale(this.$l).fromNow(!h)},x.valueOf=function(){return this.asMilliseconds()},x.milliseconds=function(){return this.get("milliseconds")},x.asMilliseconds=function(){return this.as("milliseconds")},x.seconds=function(){return this.get("seconds")},x.asSeconds=function(){return this.as("seconds")},x.minutes=function(){return this.get("minutes")},x.asMinutes=function(){return this.as("minutes")},x.hours=function(){return this.get("hours")},x.asHours=function(){return this.as("hours")},x.days=function(){return this.get("days")},x.asDays=function(){return this.as("days")},x.weeks=function(){return this.get("weeks")},x.asWeeks=function(){return this.as("weeks")},x.months=function(){return this.get("months")},x.asMonths=function(){return this.as("months")},x.years=function(){return this.get("years")},x.asYears=function(){return this.as("years")},I})(),z=function(I,x,h){return I.add(x.years()*h,"y").add(x.months()*h,"M").add(x.days()*h,"d").add(x.hours()*h,"h").add(x.minutes()*h,"m").add(x.seconds()*h,"s").add(x.milliseconds()*h,"ms")};return function(I,x,h){s=h,r=h().$utils(),h.duration=function(T,v){var p=h.locale();return G(T,{$l:p},v)},h.isDuration=D;var E=x.prototype.add,f=x.prototype.subtract;x.prototype.add=function(T,v){return D(T)?z(this,T,1):E.bind(this)(T,v)},x.prototype.subtract=function(T,v){return D(T)?z(this,T,-1):f.bind(this)(T,v)}}}))})(Dt)),Dt.exports}var fr=dr();const hr=It(fr);var Lt=(function(){var t=l(function(p,a,d,m){for(d=d||{},m=p.length;m--;d[p[m]]=a);return d},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],s=[1,26],r=[1,27],n=[1,28],g=[1,29],y=[1,30],b=[1,31],C=[1,32],L=[1,33],w=[1,34],P=[1,9],_=[1,10],D=[1,11],G=[1,12],N=[1,13],k=[1,14],M=[1,15],W=[1,16],O=[1,19],H=[1,20],z=[1,21],I=[1,22],x=[1,23],h=[1,25],E=[1,35],f={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:l(function(a,d,m,u,S,i,Y){var o=i.length-1;switch(S){case 1:return i[o-1];case 2:this.$=[];break;case 3:i[o-1].push(i[o]),this.$=i[o-1];break;case 4:case 5:this.$=i[o];break;case 6:case 7:this.$=[];break;case 8:u.setWeekday("monday");break;case 9:u.setWeekday("tuesday");break;case 10:u.setWeekday("wednesday");break;case 11:u.setWeekday("thursday");break;case 12:u.setWeekday("friday");break;case 13:u.setWeekday("saturday");break;case 14:u.setWeekday("sunday");break;case 15:u.setWeekend("friday");break;case 16:u.setWeekend("saturday");break;case 17:u.setDateFormat(i[o].substr(11)),this.$=i[o].substr(11);break;case 18:u.enableInclusiveEndDates(),this.$=i[o].substr(18);break;case 19:u.TopAxis(),this.$=i[o].substr(8);break;case 20:u.setAxisFormat(i[o].substr(11)),this.$=i[o].substr(11);break;case 21:u.setTickInterval(i[o].substr(13)),this.$=i[o].substr(13);break;case 22:u.setExcludes(i[o].substr(9)),this.$=i[o].substr(9);break;case 23:u.setIncludes(i[o].substr(9)),this.$=i[o].substr(9);break;case 24:u.setTodayMarker(i[o].substr(12)),this.$=i[o].substr(12);break;case 27:u.setDiagramTitle(i[o].substr(6)),this.$=i[o].substr(6);break;case 28:this.$=i[o].trim(),u.setAccTitle(this.$);break;case 29:case 30:this.$=i[o].trim(),u.setAccDescription(this.$);break;case 31:u.addSection(i[o].substr(8)),this.$=i[o].substr(8);break;case 33:u.addTask(i[o-1],i[o]),this.$="task";break;case 34:this.$=i[o-1],u.setClickEvent(i[o-1],i[o],null);break;case 35:this.$=i[o-2],u.setClickEvent(i[o-2],i[o-1],i[o]);break;case 36:this.$=i[o-2],u.setClickEvent(i[o-2],i[o-1],null),u.setLink(i[o-2],i[o]);break;case 37:this.$=i[o-3],u.setClickEvent(i[o-3],i[o-2],i[o-1]),u.setLink(i[o-3],i[o]);break;case 38:this.$=i[o-2],u.setClickEvent(i[o-2],i[o],null),u.setLink(i[o-2],i[o-1]);break;case 39:this.$=i[o-3],u.setClickEvent(i[o-3],i[o-1],i[o]),u.setLink(i[o-3],i[o-2]);break;case 40:this.$=i[o-1],u.setLink(i[o-1],i[o]);break;case 41:case 47:this.$=i[o-1]+" "+i[o];break;case 42:case 43:case 45:this.$=i[o-2]+" "+i[o-1]+" "+i[o];break;case 44:case 46:this.$=i[o-3]+" "+i[o-2]+" "+i[o-1]+" "+i[o];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:s,13:r,14:n,15:g,16:y,17:b,18:C,19:18,20:L,21:w,22:P,23:_,24:D,25:G,26:N,27:k,28:M,29:W,30:O,31:H,33:z,35:I,36:x,37:24,38:h,40:E},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:s,13:r,14:n,15:g,16:y,17:b,18:C,19:18,20:L,21:w,22:P,23:_,24:D,25:G,26:N,27:k,28:M,29:W,30:O,31:H,33:z,35:I,36:x,37:24,38:h,40:E},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:l(function(a,d){if(d.recoverable)this.trace(a);else{var m=new Error(a);throw m.hash=d,m}},"parseError"),parse:l(function(a){var d=this,m=[0],u=[],S=[null],i=[],Y=this.table,o="",q=0,c=0,$=2,A=1,R=i.slice.call(arguments,1),F=Object.create(this.lexer),B={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(B.yy[V]=this.yy[V]);F.setInput(a,B.yy),B.yy.lexer=F,B.yy.parser=this,typeof F.yylloc>"u"&&(F.yylloc={});var st=F.yylloc;i.push(st);var nt=F.options&&F.options.ranges;typeof B.yy.parseError=="function"?this.parseError=B.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function yt(Q){m.length=m.length-2*Q,S.length=S.length-Q,i.length=i.length-Q}l(yt,"popStack");function lt(){var Q;return Q=u.pop()||F.lex()||A,typeof Q!="number"&&(Q instanceof Array&&(u=Q,Q=u.pop()),Q=d.symbols_[Q]||Q),Q}l(lt,"lex");for(var X,K,Z,at,J={},it,tt,Ut,pt;;){if(K=m[m.length-1],this.defaultActions[K]?Z=this.defaultActions[K]:((X===null||typeof X>"u")&&(X=lt()),Z=Y[K]&&Y[K][X]),typeof Z>"u"||!Z.length||!Z[0]){var Yt="";pt=[];for(it in Y[K])this.terminals_[it]&&it>$&&pt.push("'"+this.terminals_[it]+"'");F.showPosition?Yt="Parse error on line "+(q+1)+`:
|
|
2
|
+
`+F.showPosition()+`
|
|
3
|
+
Expecting `+pt.join(", ")+", got '"+(this.terminals_[X]||X)+"'":Yt="Parse error on line "+(q+1)+": Unexpected "+(X==A?"end of input":"'"+(this.terminals_[X]||X)+"'"),this.parseError(Yt,{text:F.match,token:this.terminals_[X]||X,line:F.yylineno,loc:st,expected:pt})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+K+", token: "+X);switch(Z[0]){case 1:m.push(X),S.push(F.yytext),i.push(F.yylloc),m.push(Z[1]),X=null,c=F.yyleng,o=F.yytext,q=F.yylineno,st=F.yylloc;break;case 2:if(tt=this.productions_[Z[1]][1],J.$=S[S.length-tt],J._$={first_line:i[i.length-(tt||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(tt||1)].first_column,last_column:i[i.length-1].last_column},nt&&(J._$.range=[i[i.length-(tt||1)].range[0],i[i.length-1].range[1]]),at=this.performAction.apply(J,[o,c,q,B.yy,Z[1],S,i].concat(R)),typeof at<"u")return at;tt&&(m=m.slice(0,-1*tt*2),S=S.slice(0,-1*tt),i=i.slice(0,-1*tt)),m.push(this.productions_[Z[1]][0]),S.push(J.$),i.push(J._$),Ut=Y[m[m.length-2]][m[m.length-1]],m.push(Ut);break;case 3:return!0}}return!0},"parse")},T=(function(){var p={EOF:1,parseError:l(function(d,m){if(this.yy.parser)this.yy.parser.parseError(d,m);else throw new Error(d)},"parseError"),setInput:l(function(a,d){return this.yy=d||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:l(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var d=a.match(/(?:\r\n?|\n).*/g);return d?(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:l(function(a){var d=a.length,m=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),m.length-1&&(this.yylineno-=m.length-1);var S=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:m?(m.length===u.length?this.yylloc.first_column:0)+u[u.length-m.length].length-m[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(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:l(function(a){this.unput(this.match.slice(a))},"less"),pastInput:l(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:l(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:l(function(){var a=this.pastInput(),d=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
|
|
5
|
+
`+d+"^"},"showPosition"),test_match:l(function(a,d){var m,u,S;if(this.options.backtrack_lexer&&(S={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&&(S.yylloc.range=this.yylloc.range.slice(0))),u=a[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],m=this.performAction.call(this,this.yy,this,d,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),m)return m;if(this._backtrack){for(var i in S)this[i]=S[i];return!1}return!1},"test_match"),next:l(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,d,m,u;this._more||(this.yytext="",this.match="");for(var S=this._currentRules(),i=0;i<S.length;i++)if(m=this._input.match(this.rules[S[i]]),m&&(!d||m[0].length>d[0].length)){if(d=m,u=i,this.options.backtrack_lexer){if(a=this.test_match(m,S[i]),a!==!1)return a;if(this._backtrack){d=!1;continue}else return!1}else if(!this.options.flex)break}return d?(a=this.test_match(d,S[u]),a!==!1?a:!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:l(function(){var d=this.next();return d||this.lex()},"lex"),begin:l(function(d){this.conditionStack.push(d)},"begin"),popState:l(function(){var d=this.conditionStack.length-1;return d>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:l(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:l(function(d){return d=this.conditionStack.length-1-Math.abs(d||0),d>=0?this.conditionStack[d]:"INITIAL"},"topState"),pushState:l(function(d){this.begin(d)},"pushState"),stateStackSize:l(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:l(function(d,m,u,S){switch(u){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return p})();f.lexer=T;function v(){this.yy={}}return l(v,"Parser"),v.prototype=f,f.Parser=v,new v})();Lt.parser=Lt;var mr=Lt;U.extend(er);U.extend(nr);U.extend(lr);var ce={friday:5,saturday:6},et="",Vt="",Rt=void 0,zt="",ht=[],mt=[],Nt=new Map,Ht=[],Mt=[],kt="",Bt="",fe=["active","done","crit","milestone","vert"],qt=[],ut="",gt=!1,Gt=!1,Xt="sunday",Et="saturday",Ot=0,kr=l(function(){Ht=[],Mt=[],kt="",qt=[],St=0,Pt=void 0,Ct=void 0,j=[],et="",Vt="",Bt="",Rt=void 0,zt="",ht=[],mt=[],gt=!1,Gt=!1,Ot=0,Nt=new Map,ut="",Ie(),Xt="sunday",Et="saturday"},"clear"),yr=l(function(t){ut=t},"setDiagramId"),gr=l(function(t){Vt=t},"setAxisFormat"),pr=l(function(){return Vt},"getAxisFormat"),vr=l(function(t){Rt=t},"setTickInterval"),xr=l(function(){return Rt},"getTickInterval"),Tr=l(function(t){zt=t},"setTodayMarker"),br=l(function(){return zt},"getTodayMarker"),wr=l(function(t){et=t},"setDateFormat"),_r=l(function(){gt=!0},"enableInclusiveEndDates"),Dr=l(function(){return gt},"endDatesAreInclusive"),Sr=l(function(){Gt=!0},"enableTopAxis"),Cr=l(function(){return Gt},"topAxisEnabled"),Mr=l(function(t){Bt=t},"setDisplayMode"),Er=l(function(){return Bt},"getDisplayMode"),Ir=l(function(){return et},"getDateFormat"),he=l((t,e)=>{const s=e.toLowerCase().split(/[\s,]+/).filter(r=>r!=="");return[...new Set([...t,...s])]},"mergeTokens"),Yr=l(function(t){ht=he(ht,t)},"setIncludes"),$r=l(function(){return ht},"getIncludes"),Ar=l(function(t){mt=he(mt,t)},"setExcludes"),Fr=l(function(){return mt},"getExcludes"),Lr=l(function(){return Nt},"getLinks"),Or=l(function(t){kt=t,Ht.push(t)},"addSection"),Wr=l(function(){return Ht},"getSections"),Pr=l(function(){let t=le();const e=10;let s=0;for(;!t&&s<e;)t=le(),s++;return Mt=j,Mt},"getTasks"),me=l(function(t,e,s,r){const n=t.format(e.trim()),g=t.format("YYYY-MM-DD");return r.includes(n)||r.includes(g)?!1:s.includes("weekends")&&(t.isoWeekday()===ce[Et]||t.isoWeekday()===ce[Et]+1)||s.includes(t.format("dddd").toLowerCase())?!0:s.includes(n)||s.includes(g)},"isInvalidDate"),Vr=l(function(t){Xt=t},"setWeekday"),Rr=l(function(){return Xt},"getWeekday"),zr=l(function(t){Et=t},"setWeekend"),ke=l(function(t,e,s,r){if(!s.length||t.manualEndTime)return;let n;t.startTime instanceof Date?n=U(t.startTime):n=U(t.startTime,e,!0),n=n.add(1,"d");let g;t.endTime instanceof Date?g=U(t.endTime):g=U(t.endTime,e,!0);const[y,b]=Nr(n,g,e,s,r);t.endTime=y.toDate(),t.renderEndTime=b},"checkTaskDates"),Nr=l(function(t,e,s,r,n){let g=!1,y=null;const b=e.add(1e4,"d");for(;t<=e;){if(g||(y=e.toDate()),g=me(t,s,r,n),g&&(e=e.add(1,"d"),e>b))throw new Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.");t=t.add(1,"d")}return[e,y]},"fixTaskDates"),Wt=l(function(t,e,s){if(s=s.trim(),l(b=>{const C=b.trim();return C==="x"||C==="X"},"isTimestampFormat")(e)&&/^\d+$/.test(s))return new Date(Number(s));const g=/^after\s+(?<ids>[\d\w- ]+)/.exec(s);if(g!==null){let b=null;for(const L of g.groups.ids.split(" ")){let w=ct(L);w!==void 0&&(!b||w.endTime>b.endTime)&&(b=w)}if(b)return b.endTime;const C=new Date;return C.setHours(0,0,0,0),C}let y=U(s,e.trim(),!0);if(y.isValid())return y.toDate();{ot.debug("Invalid date:"+s),ot.debug("With date format:"+e.trim());const b=new Date(s);if(b===void 0||isNaN(b.getTime())||b.getFullYear()<-1e4||b.getFullYear()>1e4)throw new Error("Invalid date:"+s);return b}},"getStartDate"),ye=l(function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),ge=l(function(t,e,s,r=!1){s=s.trim();const g=/^until\s+(?<ids>[\d\w- ]+)/.exec(s);if(g!==null){let w=null;for(const _ of g.groups.ids.split(" ")){let D=ct(_);D!==void 0&&(!w||D.startTime<w.startTime)&&(w=D)}if(w)return w.startTime;const P=new Date;return P.setHours(0,0,0,0),P}let y=U(s,e.trim(),!0);if(y.isValid())return r&&(y=y.add(1,"d")),y.toDate();let b=U(t);const[C,L]=ye(s);if(!Number.isNaN(C)){const w=b.add(C,L);w.isValid()&&(b=w)}return b.toDate()},"getEndDate"),St=0,ft=l(function(t){return t===void 0?(St=St+1,"task"+St):t},"parseId"),Hr=l(function(t,e){let s;e.substr(0,1)===":"?s=e.substr(1,e.length):s=e;const r=s.split(","),n={};jt(r,n,fe);for(let y=0;y<r.length;y++)r[y]=r[y].trim();let g="";switch(r.length){case 1:n.id=ft(),n.startTime=t.endTime,g=r[0];break;case 2:n.id=ft(),n.startTime=Wt(void 0,et,r[0]),g=r[1];break;case 3:n.id=ft(r[0]),n.startTime=Wt(void 0,et,r[1]),g=r[2];break}return g&&(n.endTime=ge(n.startTime,et,g,gt),n.manualEndTime=U(g,"YYYY-MM-DD",!0).isValid(),ke(n,et,mt,ht)),n},"compileData"),Br=l(function(t,e){let s;e.substr(0,1)===":"?s=e.substr(1,e.length):s=e;const r=s.split(","),n={};jt(r,n,fe);for(let g=0;g<r.length;g++)r[g]=r[g].trim();switch(r.length){case 1:n.id=ft(),n.startTime={type:"prevTaskEnd",id:t},n.endTime={data:r[0]};break;case 2:n.id=ft(),n.startTime={type:"getStartDate",startData:r[0]},n.endTime={data:r[1]};break;case 3:n.id=ft(r[0]),n.startTime={type:"getStartDate",startData:r[1]},n.endTime={data:r[2]};break}return n},"parseData"),Pt,Ct,j=[],pe={},qr=l(function(t,e){const s={section:kt,type:kt,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},r=Br(Ct,e);s.raw.startTime=r.startTime,s.raw.endTime=r.endTime,s.id=r.id,s.prevTaskId=Ct,s.active=r.active,s.done=r.done,s.crit=r.crit,s.milestone=r.milestone,s.vert=r.vert,s.vert?s.order=-1:(s.order=Ot,Ot++);const n=j.push(s);Ct=s.id,pe[s.id]=n-1},"addTask"),ct=l(function(t){const e=pe[t];return j[e]},"findTaskById"),Gr=l(function(t,e){const s={section:kt,type:kt,description:t,task:t,classes:[]},r=Hr(Pt,e);s.startTime=r.startTime,s.endTime=r.endTime,s.id=r.id,s.active=r.active,s.done=r.done,s.crit=r.crit,s.milestone=r.milestone,s.vert=r.vert,Pt=s,Mt.push(s)},"addTaskOrg"),le=l(function(){const t=l(function(s){const r=j[s];let n="";switch(j[s].raw.startTime.type){case"prevTaskEnd":{const g=ct(r.prevTaskId);r.startTime=g.endTime;break}case"getStartDate":n=Wt(void 0,et,j[s].raw.startTime.startData),n&&(j[s].startTime=n);break}return j[s].startTime&&(j[s].endTime=ge(j[s].startTime,et,j[s].raw.endTime.data,gt),j[s].endTime&&(j[s].processed=!0,j[s].manualEndTime=U(j[s].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),ke(j[s],et,mt,ht))),j[s].processed},"compileTask");let e=!0;for(const[s,r]of j.entries())t(s),e=e&&r.processed;return e},"compileTasks"),Xr=l(function(t,e){let s=e;dt().securityLevel!=="loose"&&(s=Ee.sanitizeUrl(e)),t.split(",").forEach(function(r){ct(r)!==void 0&&(xe(r,()=>{window.open(s,"_self")}),Nt.set(r,s))}),ve(t,"clickable")},"setLink"),ve=l(function(t,e){t.split(",").forEach(function(s){let r=ct(s);r!==void 0&&r.classes.push(e)})},"setClass"),jr=l(function(t,e,s){if(dt().securityLevel!=="loose"||e===void 0)return;let r=[];if(typeof s=="string"){r=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let g=0;g<r.length;g++){let y=r[g].trim();y.startsWith('"')&&y.endsWith('"')&&(y=y.substr(1,y.length-2)),r[g]=y}}r.length===0&&r.push(t),ct(t)!==void 0&&xe(t,()=>{Ye.runFunc(e,...r)})},"setClickFun"),xe=l(function(t,e){qt.push(function(){const s=ut?`${ut}-${t}`:t,r=document.querySelector(`[id="${s}"]`);r!==null&&r.addEventListener("click",function(){e()})},function(){const s=ut?`${ut}-${t}`:t,r=document.querySelector(`[id="${s}-text"]`);r!==null&&r.addEventListener("click",function(){e()})})},"pushFun"),Ur=l(function(t,e,s){t.split(",").forEach(function(r){jr(r,e,s)}),ve(t,"clickable")},"setClickEvent"),Zr=l(function(t){qt.forEach(function(e){e(t)})},"bindFunctions"),Qr={getConfig:l(()=>dt().gantt,"getConfig"),clear:kr,setDateFormat:wr,getDateFormat:Ir,enableInclusiveEndDates:_r,endDatesAreInclusive:Dr,enableTopAxis:Sr,topAxisEnabled:Cr,setAxisFormat:gr,getAxisFormat:pr,setTickInterval:vr,getTickInterval:xr,setTodayMarker:Tr,getTodayMarker:br,setAccTitle:Se,getAccTitle:De,setDiagramTitle:_e,getDiagramTitle:we,setDiagramId:yr,setDisplayMode:Mr,getDisplayMode:Er,setAccDescription:be,getAccDescription:Te,addSection:Or,getSections:Wr,getTasks:Pr,addTask:qr,findTaskById:ct,addTaskOrg:Gr,setIncludes:Yr,getIncludes:$r,setExcludes:Ar,getExcludes:Fr,setClickEvent:Ur,setLink:Xr,getLinks:Lr,bindFunctions:Zr,parseDuration:ye,isInvalidDate:me,setWeekday:Vr,getWeekday:Rr,setWeekend:zr};function jt(t,e,s){let r=!0;for(;r;)r=!1,s.forEach(function(n){const g="^\\s*"+n+"\\s*$",y=new RegExp(g);t[0].match(y)&&(e[n]=!0,t.shift(1),r=!0)})}l(jt,"getTaskTags");U.extend(hr);var Kr=l(function(){ot.debug("Something is calling, setConf, remove the call")},"setConf"),ue={monday:He,tuesday:Ne,wednesday:ze,thursday:Re,friday:Ve,saturday:Pe,sunday:We},Jr=l((t,e)=>{let s=[...t].map(()=>-1/0),r=[...t].sort((g,y)=>g.startTime-y.startTime||g.order-y.order),n=0;for(const g of r)for(let y=0;y<s.length;y++)if(g.startTime>=s[y]){s[y]=g.endTime,g.order=y+e,y>n&&(n=y);break}return n},"getMaxIntersections"),rt,At=1e4,ts=l(function(t,e,s,r){const n=dt().gantt;r.db.setDiagramId(e);const g=dt().securityLevel;let y;g==="sandbox"&&(y=vt("#i"+e));const b=g==="sandbox"?vt(y.nodes()[0].contentDocument.body):vt("body"),C=g==="sandbox"?y.nodes()[0].contentDocument:document,L=C.getElementById(e);rt=L.parentElement.offsetWidth,rt===void 0&&(rt=1200),n.useWidth!==void 0&&(rt=n.useWidth);const w=r.db.getTasks(),P=w.filter(f=>!f.vert);let _=[];for(const f of P)_.push(f.type);_=E(_);const D={};let G=2*n.topPadding;if(r.db.getDisplayMode()==="compact"||n.displayMode==="compact"){const f={};for(const v of P)f[v.section]===void 0?f[v.section]=[v]:f[v.section].push(v);let T=0;for(const v of Object.keys(f)){const p=Jr(f[v],T)+1;T+=p,G+=p*(n.barHeight+n.barGap),D[v]=p}}else{G+=P.length*(n.barHeight+n.barGap);for(const f of _)D[f]=P.filter(T=>T.type===f).length}L.setAttribute("viewBox","0 0 "+rt+" "+G);const N=b.select(`[id="${e}"]`),k=$e().domain([Ae(w,function(f){return f.startTime}),Fe(w,function(f){return f.endTime})]).rangeRound([0,rt-n.leftPadding-n.rightPadding]);function M(f,T){const v=f.startTime,p=T.startTime;let a=0;return v>p?a=1:v<p&&(a=-1),a}l(M,"taskCompare"),w.sort(M),W(w,rt,G),Ce(N,G,rt,n.useMaxWidth),N.append("text").text(r.db.getDiagramTitle()).attr("x",rt/2).attr("y",n.titleTopMargin).attr("class","titleText");function W(f,T,v){const p=n.barHeight,a=p+n.barGap,d=n.topPadding,m=n.leftPadding,u=Le().domain([0,_.length]).range(["#00B9FA","#F95002"]).interpolate(Oe);H(a,d,m,T,v,f,r.db.getExcludes(),r.db.getIncludes()),I(m,d,T,v),O(f,a,d,m,p,u,T),x(a,d),h(m,d,T,v)}l(W,"makeGantt");function O(f,T,v,p,a,d,m){f.sort((c,$)=>c.vert===$.vert?0:c.vert?1:-1);const u=f.filter(c=>!c.vert),i=[...new Set(u.map(c=>c.order))].map(c=>u.find($=>$.order===c));N.append("g").selectAll("rect").data(i).enter().append("rect").attr("x",0).attr("y",function(c,$){return $=c.order,$*T+v-2}).attr("width",function(){return m-n.rightPadding/2}).attr("height",T).attr("class",function(c){for(const[$,A]of _.entries())if(c.type===A)return"section section"+$%n.numberSectionStyles;return"section section0"}).enter();const Y=N.append("g").selectAll("rect").data(f).enter(),o=r.db.getLinks();if(Y.append("rect").attr("id",function(c){return e+"-"+c.id}).attr("rx",3).attr("ry",3).attr("x",function(c){return c.milestone?k(c.startTime)+p+.5*(k(c.endTime)-k(c.startTime))-.5*a:k(c.startTime)+p}).attr("y",function(c,$){return $=c.order,c.vert?n.gridLineStartPadding:$*T+v}).attr("width",function(c){return c.milestone?a:c.vert?.08*a:k(c.renderEndTime||c.endTime)-k(c.startTime)}).attr("height",function(c){return c.vert?u.length*(n.barHeight+n.barGap)+n.barHeight*2:a}).attr("transform-origin",function(c,$){return $=c.order,(k(c.startTime)+p+.5*(k(c.endTime)-k(c.startTime))).toString()+"px "+($*T+v+.5*a).toString()+"px"}).attr("class",function(c){const $="task";let A="";c.classes.length>0&&(A=c.classes.join(" "));let R=0;for(const[B,V]of _.entries())c.type===V&&(R=B%n.numberSectionStyles);let F="";return c.active?c.crit?F+=" activeCrit":F=" active":c.done?c.crit?F=" doneCrit":F=" done":c.crit&&(F+=" crit"),F.length===0&&(F=" task"),c.milestone&&(F=" milestone "+F),c.vert&&(F=" vert "+F),F+=R,F+=" "+A,$+F}),Y.append("text").attr("id",function(c){return e+"-"+c.id+"-text"}).text(function(c){return c.task}).attr("font-size",n.fontSize).attr("x",function(c){let $=k(c.startTime),A=k(c.renderEndTime||c.endTime);if(c.milestone&&($+=.5*(k(c.endTime)-k(c.startTime))-.5*a,A=$+a),c.vert)return k(c.startTime)+p;const R=this.getBBox().width;return R>A-$?A+R+1.5*n.leftPadding>m?$+p-5:A+p+5:(A-$)/2+$+p}).attr("y",function(c,$){return c.vert?n.gridLineStartPadding+u.length*(n.barHeight+n.barGap)+60:($=c.order,$*T+n.barHeight/2+(n.fontSize/2-2)+v)}).attr("text-height",a).attr("class",function(c){const $=k(c.startTime);let A=k(c.endTime);c.milestone&&(A=$+a);const R=this.getBBox().width;let F="";c.classes.length>0&&(F=c.classes.join(" "));let B=0;for(const[st,nt]of _.entries())c.type===nt&&(B=st%n.numberSectionStyles);let V="";return c.active&&(c.crit?V="activeCritText"+B:V="activeText"+B),c.done?c.crit?V=V+" doneCritText"+B:V=V+" doneText"+B:c.crit&&(V=V+" critText"+B),c.milestone&&(V+=" milestoneText"),c.vert&&(V+=" vertText"),R>A-$?A+R+1.5*n.leftPadding>m?F+" taskTextOutsideLeft taskTextOutside"+B+" "+V:F+" taskTextOutsideRight taskTextOutside"+B+" "+V+" width-"+R:F+" taskText taskText"+B+" "+V+" width-"+R}),dt().securityLevel==="sandbox"){let c;c=vt("#i"+e);const $=c.nodes()[0].contentDocument;Y.filter(function(A){return o.has(A.id)}).each(function(A){var R=$.querySelector("#"+CSS.escape(e+"-"+A.id)),F=$.querySelector("#"+CSS.escape(e+"-"+A.id+"-text"));const B=R.parentNode;var V=$.createElement("a");V.setAttribute("xlink:href",o.get(A.id)),V.setAttribute("target","_top"),B.appendChild(V),V.appendChild(R),V.appendChild(F)})}}l(O,"drawRects");function H(f,T,v,p,a,d,m,u){if(m.length===0&&u.length===0)return;let S,i;for(const{startTime:A,endTime:R}of d)(S===void 0||A<S)&&(S=A),(i===void 0||R>i)&&(i=R);if(!S||!i)return;if(U(i).diff(U(S),"year")>5){ot.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}const Y=r.db.getDateFormat(),o=[];let q=null,c=U(S);for(;c.valueOf()<=i;)r.db.isInvalidDate(c,Y,m,u)?q?q.end=c:q={start:c,end:c}:q&&(o.push(q),q=null),c=c.add(1,"d");N.append("g").selectAll("rect").data(o).enter().append("rect").attr("id",A=>e+"-exclude-"+A.start.format("YYYY-MM-DD")).attr("x",A=>k(A.start.startOf("day"))+v).attr("y",n.gridLineStartPadding).attr("width",A=>k(A.end.endOf("day"))-k(A.start.startOf("day"))).attr("height",a-T-n.gridLineStartPadding).attr("transform-origin",function(A,R){return(k(A.start)+v+.5*(k(A.end)-k(A.start))).toString()+"px "+(R*f+.5*a).toString()+"px"}).attr("class","exclude-range")}l(H,"drawExcludeDays");function z(f,T,v,p){if(v<=0||f>T)return 1/0;const a=T-f,d=U.duration({[p??"day"]:v}).asMilliseconds();return d<=0?1/0:Math.ceil(a/d)}l(z,"getEstimatedTickCount");function I(f,T,v,p){const a=r.db.getDateFormat(),d=r.db.getAxisFormat();let m;d?m=d:a==="D"?m="%d":m=n.axisFormat??"%Y-%m-%d";let u=Qe(k).tickSize(-p+T+n.gridLineStartPadding).tickFormat(Zt(m));const i=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||n.tickInterval);if(i!==null){const Y=parseInt(i[1],10);if(isNaN(Y)||Y<=0)ot.warn(`Invalid tick interval value: "${i[1]}". Skipping custom tick interval.`);else{const o=i[2],q=r.db.getWeekday()||n.weekday,c=k.domain(),$=c[0],A=c[1],R=z($,A,Y,o);if(R>At)ot.warn(`The tick interval "${Y}${o}" would generate ${R} ticks, which exceeds the maximum allowed (${At}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(o){case"millisecond":u.ticks(re.every(Y));break;case"second":u.ticks(ee.every(Y));break;case"minute":u.ticks(te.every(Y));break;case"hour":u.ticks(Jt.every(Y));break;case"day":u.ticks(Kt.every(Y));break;case"week":u.ticks(ue[q].every(Y));break;case"month":u.ticks(Qt.every(Y));break}}}if(N.append("g").attr("class","grid").attr("transform","translate("+f+", "+(p-50)+")").call(u).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),r.db.topAxisEnabled()||n.topAxis){let Y=Ze(k).tickSize(-p+T+n.gridLineStartPadding).tickFormat(Zt(m));if(i!==null){const o=parseInt(i[1],10);if(isNaN(o)||o<=0)ot.warn(`Invalid tick interval value: "${i[1]}". Skipping custom tick interval.`);else{const q=i[2],c=r.db.getWeekday()||n.weekday,$=k.domain(),A=$[0],R=$[1];if(z(A,R,o,q)<=At)switch(q){case"millisecond":Y.ticks(re.every(o));break;case"second":Y.ticks(ee.every(o));break;case"minute":Y.ticks(te.every(o));break;case"hour":Y.ticks(Jt.every(o));break;case"day":Y.ticks(Kt.every(o));break;case"week":Y.ticks(ue[c].every(o));break;case"month":Y.ticks(Qt.every(o));break}}}N.append("g").attr("class","grid").attr("transform","translate("+f+", "+T+")").call(Y).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}l(I,"makeGrid");function x(f,T){let v=0;const p=Object.keys(D).map(a=>[a,D[a]]);N.append("g").selectAll("text").data(p).enter().append(function(a){const d=a[0].split(Me.lineBreakRegex),m=-(d.length-1)/2,u=C.createElementNS("http://www.w3.org/2000/svg","text");u.setAttribute("dy",m+"em");for(const[S,i]of d.entries()){const Y=C.createElementNS("http://www.w3.org/2000/svg","tspan");Y.setAttribute("alignment-baseline","central"),Y.setAttribute("x","10"),S>0&&Y.setAttribute("dy","1em"),Y.textContent=i,u.appendChild(Y)}return u}).attr("x",10).attr("y",function(a,d){if(d>0)for(let m=0;m<d;m++)return v+=p[d-1][1],a[1]*f/2+v*f+T;else return a[1]*f/2+T}).attr("font-size",n.sectionFontSize).attr("class",function(a){for(const[d,m]of _.entries())if(a[0]===m)return"sectionTitle sectionTitle"+d%n.numberSectionStyles;return"sectionTitle"})}l(x,"vertLabels");function h(f,T,v,p){const a=r.db.getTodayMarker();if(a==="off")return;const d=N.append("g").attr("class","today"),m=new Date,u=d.append("line");u.attr("x1",k(m)+f).attr("x2",k(m)+f).attr("y1",n.titleTopMargin).attr("y2",p-n.titleTopMargin).attr("class","today"),a!==""&&u.attr("style",a.replace(/,/g,";"))}l(h,"drawToday");function E(f){const T={},v=[];for(let p=0,a=f.length;p<a;++p)Object.prototype.hasOwnProperty.call(T,f[p])||(T[f[p]]=!0,v.push(f[p]));return v}l(E,"checkUnique")},"draw"),es={setConf:Kr,draw:ts},rs=l(t=>`
|
|
7
|
+
.mermaid-main-font {
|
|
8
|
+
font-family: ${t.fontFamily};
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.exclude-range {
|
|
12
|
+
fill: ${t.excludeBkgColor};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.section {
|
|
16
|
+
stroke: none;
|
|
17
|
+
opacity: 0.2;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.section0 {
|
|
21
|
+
fill: ${t.sectionBkgColor};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.section2 {
|
|
25
|
+
fill: ${t.sectionBkgColor2};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.section1,
|
|
29
|
+
.section3 {
|
|
30
|
+
fill: ${t.altSectionBkgColor};
|
|
31
|
+
opacity: 0.2;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.sectionTitle0 {
|
|
35
|
+
fill: ${t.titleColor};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.sectionTitle1 {
|
|
39
|
+
fill: ${t.titleColor};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.sectionTitle2 {
|
|
43
|
+
fill: ${t.titleColor};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.sectionTitle3 {
|
|
47
|
+
fill: ${t.titleColor};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.sectionTitle {
|
|
51
|
+
text-anchor: start;
|
|
52
|
+
font-family: ${t.fontFamily};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
/* Grid and axis */
|
|
57
|
+
|
|
58
|
+
.grid .tick {
|
|
59
|
+
stroke: ${t.gridColor};
|
|
60
|
+
opacity: 0.8;
|
|
61
|
+
shape-rendering: crispEdges;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.grid .tick text {
|
|
65
|
+
font-family: ${t.fontFamily};
|
|
66
|
+
fill: ${t.textColor};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.grid path {
|
|
70
|
+
stroke-width: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
/* Today line */
|
|
75
|
+
|
|
76
|
+
.today {
|
|
77
|
+
fill: none;
|
|
78
|
+
stroke: ${t.todayLineColor};
|
|
79
|
+
stroke-width: 2px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
/* Task styling */
|
|
84
|
+
|
|
85
|
+
/* Default task */
|
|
86
|
+
|
|
87
|
+
.task {
|
|
88
|
+
stroke-width: 2;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.taskText {
|
|
92
|
+
text-anchor: middle;
|
|
93
|
+
font-family: ${t.fontFamily};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.taskTextOutsideRight {
|
|
97
|
+
fill: ${t.taskTextDarkColor};
|
|
98
|
+
text-anchor: start;
|
|
99
|
+
font-family: ${t.fontFamily};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.taskTextOutsideLeft {
|
|
103
|
+
fill: ${t.taskTextDarkColor};
|
|
104
|
+
text-anchor: end;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
/* Special case clickable */
|
|
109
|
+
|
|
110
|
+
.task.clickable {
|
|
111
|
+
cursor: pointer;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.taskText.clickable {
|
|
115
|
+
cursor: pointer;
|
|
116
|
+
fill: ${t.taskTextClickableColor} !important;
|
|
117
|
+
font-weight: bold;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.taskTextOutsideLeft.clickable {
|
|
121
|
+
cursor: pointer;
|
|
122
|
+
fill: ${t.taskTextClickableColor} !important;
|
|
123
|
+
font-weight: bold;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.taskTextOutsideRight.clickable {
|
|
127
|
+
cursor: pointer;
|
|
128
|
+
fill: ${t.taskTextClickableColor} !important;
|
|
129
|
+
font-weight: bold;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
/* Specific task settings for the sections*/
|
|
134
|
+
|
|
135
|
+
.taskText0,
|
|
136
|
+
.taskText1,
|
|
137
|
+
.taskText2,
|
|
138
|
+
.taskText3 {
|
|
139
|
+
fill: ${t.taskTextColor};
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.task0,
|
|
143
|
+
.task1,
|
|
144
|
+
.task2,
|
|
145
|
+
.task3 {
|
|
146
|
+
fill: ${t.taskBkgColor};
|
|
147
|
+
stroke: ${t.taskBorderColor};
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.taskTextOutside0,
|
|
151
|
+
.taskTextOutside2
|
|
152
|
+
{
|
|
153
|
+
fill: ${t.taskTextOutsideColor};
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.taskTextOutside1,
|
|
157
|
+
.taskTextOutside3 {
|
|
158
|
+
fill: ${t.taskTextOutsideColor};
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
/* Active task */
|
|
163
|
+
|
|
164
|
+
.active0,
|
|
165
|
+
.active1,
|
|
166
|
+
.active2,
|
|
167
|
+
.active3 {
|
|
168
|
+
fill: ${t.activeTaskBkgColor};
|
|
169
|
+
stroke: ${t.activeTaskBorderColor};
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.activeText0,
|
|
173
|
+
.activeText1,
|
|
174
|
+
.activeText2,
|
|
175
|
+
.activeText3 {
|
|
176
|
+
fill: ${t.taskTextDarkColor} !important;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
/* Completed task */
|
|
181
|
+
|
|
182
|
+
.done0,
|
|
183
|
+
.done1,
|
|
184
|
+
.done2,
|
|
185
|
+
.done3 {
|
|
186
|
+
stroke: ${t.doneTaskBorderColor};
|
|
187
|
+
fill: ${t.doneTaskBkgColor};
|
|
188
|
+
stroke-width: 2;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.doneText0,
|
|
192
|
+
.doneText1,
|
|
193
|
+
.doneText2,
|
|
194
|
+
.doneText3 {
|
|
195
|
+
fill: ${t.taskTextDarkColor} !important;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/* Done task text displayed outside the bar sits against the diagram background,
|
|
199
|
+
not against the done-task bar, so it must use the outside/contrast color. */
|
|
200
|
+
.doneText0.taskTextOutsideLeft,
|
|
201
|
+
.doneText0.taskTextOutsideRight,
|
|
202
|
+
.doneText1.taskTextOutsideLeft,
|
|
203
|
+
.doneText1.taskTextOutsideRight,
|
|
204
|
+
.doneText2.taskTextOutsideLeft,
|
|
205
|
+
.doneText2.taskTextOutsideRight,
|
|
206
|
+
.doneText3.taskTextOutsideLeft,
|
|
207
|
+
.doneText3.taskTextOutsideRight {
|
|
208
|
+
fill: ${t.taskTextOutsideColor} !important;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
/* Tasks on the critical line */
|
|
213
|
+
|
|
214
|
+
.crit0,
|
|
215
|
+
.crit1,
|
|
216
|
+
.crit2,
|
|
217
|
+
.crit3 {
|
|
218
|
+
stroke: ${t.critBorderColor};
|
|
219
|
+
fill: ${t.critBkgColor};
|
|
220
|
+
stroke-width: 2;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.activeCrit0,
|
|
224
|
+
.activeCrit1,
|
|
225
|
+
.activeCrit2,
|
|
226
|
+
.activeCrit3 {
|
|
227
|
+
stroke: ${t.critBorderColor};
|
|
228
|
+
fill: ${t.activeTaskBkgColor};
|
|
229
|
+
stroke-width: 2;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.doneCrit0,
|
|
233
|
+
.doneCrit1,
|
|
234
|
+
.doneCrit2,
|
|
235
|
+
.doneCrit3 {
|
|
236
|
+
stroke: ${t.critBorderColor};
|
|
237
|
+
fill: ${t.doneTaskBkgColor};
|
|
238
|
+
stroke-width: 2;
|
|
239
|
+
cursor: pointer;
|
|
240
|
+
shape-rendering: crispEdges;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.milestone {
|
|
244
|
+
transform: rotate(45deg) scale(0.8,0.8);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.milestoneText {
|
|
248
|
+
font-style: italic;
|
|
249
|
+
}
|
|
250
|
+
.doneCritText0,
|
|
251
|
+
.doneCritText1,
|
|
252
|
+
.doneCritText2,
|
|
253
|
+
.doneCritText3 {
|
|
254
|
+
fill: ${t.taskTextDarkColor} !important;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/* Done-crit task text outside the bar — same reasoning as doneText above. */
|
|
258
|
+
.doneCritText0.taskTextOutsideLeft,
|
|
259
|
+
.doneCritText0.taskTextOutsideRight,
|
|
260
|
+
.doneCritText1.taskTextOutsideLeft,
|
|
261
|
+
.doneCritText1.taskTextOutsideRight,
|
|
262
|
+
.doneCritText2.taskTextOutsideLeft,
|
|
263
|
+
.doneCritText2.taskTextOutsideRight,
|
|
264
|
+
.doneCritText3.taskTextOutsideLeft,
|
|
265
|
+
.doneCritText3.taskTextOutsideRight {
|
|
266
|
+
fill: ${t.taskTextOutsideColor} !important;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.vert {
|
|
270
|
+
stroke: ${t.vertLineColor};
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.vertText {
|
|
274
|
+
font-size: 15px;
|
|
275
|
+
text-anchor: middle;
|
|
276
|
+
fill: ${t.vertLineColor} !important;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.activeCritText0,
|
|
280
|
+
.activeCritText1,
|
|
281
|
+
.activeCritText2,
|
|
282
|
+
.activeCritText3 {
|
|
283
|
+
fill: ${t.taskTextDarkColor} !important;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.titleText {
|
|
287
|
+
text-anchor: middle;
|
|
288
|
+
font-size: 18px;
|
|
289
|
+
fill: ${t.titleColor||t.textColor};
|
|
290
|
+
font-family: ${t.fontFamily};
|
|
291
|
+
}
|
|
292
|
+
`,"getStyles"),ss=rs,os={parser:mr,db:Qr,renderer:es,styles:ss};export{os as diagram};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import{I as le}from"./chunk-2Q5K7J3B-gW5WXQ_L.js";import{p as he}from"./chunk-JWPE2WC7-4m0OBNzR.js";import{o as $e,n as fe,s as ge,g as ue,a as ye,b as xe,_ as h,y as J,l as w,j as me,c as q,x as pe,z as be,p as we,k as B,A as ke,B as ve,C as Ce}from"./mermaid.core-DPkPce7p.js";import{p as Ee}from"./cynefin-OW5HDTMX-DF5PyYiH.js";import"./index-_OdfRxhK.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),De=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),Pe=h(function(){return d.records.currBranch},"getCurrentBranch"),We=h(function(){return d.records.direction},"getDirection"),qe=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:De,getCommitsArray:ne,getCurrentBranch:Pe,getDirection:We,getHead:qe,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,P=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),P.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=q(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",`
|
|
2
|
+
${s-i/2-L/2},${x+R}
|
|
3
|
+
${s-i/2-L/2},${x-R}
|
|
4
|
+
${t.posWithOffset-i/2-L},${x-c-R}
|
|
5
|
+
${t.posWithOffset+i/2+L},${x-c-R}
|
|
6
|
+
${t.posWithOffset+i/2+L},${x+c+R}
|
|
7
|
+
${t.posWithOffset-i/2-L},${x+c+R}`),f.attr("cy",x).attr("cx",s-i/2+L/2).attr("r",1.5).attr("class","tag-hole"),y==="TB"||y==="BT"){const u=s+$;g.attr("class","tag-label-bkg").attr("points",`
|
|
8
|
+
${t.x},${u+2}
|
|
9
|
+
${t.x},${u-2}
|
|
10
|
+
${t.x+O},${u-c-2}
|
|
11
|
+
${t.x+O+i+4},${u-c-2}
|
|
12
|
+
${t.x+O+i+4},${u+c+2}
|
|
13
|
+
${t.x+O},${u+c+2}`).attr("transform","translate(12,12) rotate(45, "+t.x+","+s+")"),f.attr("cx",t.x+L/2).attr("cy",u).attr("transform","translate(12,12) rotate(45, "+t.x+","+s+")"),l.attr("x",t.x+5).attr("y",u+3).attr("transform","translate(14,14) rotate(45, "+t.x+","+s+")")}}}},"drawCommitTags"),cr=h(e=>{switch(e.customType??e.type){case m.NORMAL:return"commit-normal";case m.REVERSE:return"commit-reverse";case m.HIGHLIGHT:return"commit-highlight";case m.MERGE:return"commit-merge";case m.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),ir=h((e,r,t,s)=>{const o={x:0,y:0};if(e.parents.length>0){const i=ce(e.parents);if(i){const n=s.get(i)??o;return r==="TB"?n.y+_:r==="BT"?(s.get(e.id)??o).y-_:n.x+_}}else return r==="TB"?F:r==="BT"?(s.get(e.id)??o).y-_:0;return 0},"calculatePosition"),dr=h((e,r,t)=>{const s=y==="BT"&&t?r:r+O,o=C.get(e.branch)?.pos,i=y==="TB"||y==="BT"?C.get(e.branch)?.pos:s;if(i===void 0||o===void 0)throw new Error(`Position were undefined for commit ${e.id}`);const n=j.has(q().theme??""),a=y==="TB"||y==="BT"?s:o+(n?X/2+1:-2);return{x:i,y:a,posWithOffset:s}},"getCommitPosition"),re=h((e,r,t,s)=>{const o=e.append("g").attr("class","commit-bullets"),i=e.append("g").attr("class","commit-labels");let n=y==="TB"||y==="BT"?F:0;const a=[...r.keys()],l=s.parallelCommits??!1,f=h(($,c)=>{const x=r.get($)?.seq,u=r.get(c)?.seq;return x!==void 0&&u!==void 0?x-u:0},"sortKeys");let g=a.sort(f);y==="BT"&&(l&&Ze(g,r,n),g=g.reverse()),g.forEach($=>{const c=r.get($);if(!c)throw new Error(`Commit not found for key ${$}`);l&&(n=ir(c,y,n,E));const x=dr(c,n,l);if(t){const u=cr(c),p=c.customType??c.type,b=C.get(c.branch)?.index??0;nr(o,c,x,u,b,p),sr(i,c,x,n,s),or(i,c,x,n)}y==="TB"||y==="BT"?E.set(c.id,{x:x.x,y:x.posWithOffset}):E.set(c.id,{x:x.posWithOffset,y:x.y}),n=y==="BT"&&l?n+_:n+_+O,n>I&&(I=n)})},"drawCommits"),lr=h((e,r,t,s,o)=>{const n=(y==="TB"||y==="BT"?t.x<s.x:t.y<s.y)?r.branch:e.branch,a=h(f=>f.branch===n,"isOnBranchToGetCurve"),l=h(f=>f.seq>e.seq&&f.seq<r.seq,"isBetweenCommits");return[...o.values()].some(f=>l(f)&&a(f))},"shouldRerouteArrow"),W=h((e,r,t=0)=>{const s=e+Math.abs(e-r)/2;if(t>5)return s;if(z.every(n=>Math.abs(n-s)>=10))return z.push(s),s;const i=Math.abs(e-r);return W(e,r-i/5,t+1)},"findLane"),hr=h((e,r,t,s)=>{const{theme:o}=q(),i=Z.has(o??""),n=E.get(r.id),a=E.get(t.id);if(n===void 0||a===void 0)throw new Error(`Commit positions not found for commits ${r.id} and ${t.id}`);const l=lr(r,t,n,a,s);let f="",g="",$=0,c=0,x=C.get(t.branch)?.index;t.type===m.MERGE&&r.id!==t.parents[0]&&(x=C.get(r.branch)?.index);let u;if(l){f="A 10 10, 0, 0, 0,",g="A 10 10, 0, 0, 1,",$=10,c=10;const p=n.y<a.y?W(n.y,a.y):W(a.y,n.y),b=n.x<a.x?W(n.x,a.x):W(a.x,n.x);y==="TB"?n.x<a.x?u=`M ${n.x} ${n.y} L ${b-$} ${n.y} ${g} ${b} ${n.y+c} L ${b} ${a.y-$} ${f} ${b+c} ${a.y} L ${a.x} ${a.y}`:(x=C.get(r.branch)?.index,u=`M ${n.x} ${n.y} L ${b+$} ${n.y} ${f} ${b} ${n.y+c} L ${b} ${a.y-$} ${g} ${b-c} ${a.y} L ${a.x} ${a.y}`):y==="BT"?n.x<a.x?u=`M ${n.x} ${n.y} L ${b-$} ${n.y} ${f} ${b} ${n.y-c} L ${b} ${a.y+$} ${g} ${b+c} ${a.y} L ${a.x} ${a.y}`:(x=C.get(r.branch)?.index,u=`M ${n.x} ${n.y} L ${b+$} ${n.y} ${g} ${b} ${n.y-c} L ${b} ${a.y+$} ${f} ${b-c} ${a.y} L ${a.x} ${a.y}`):n.y<a.y?u=`M ${n.x} ${n.y} L ${n.x} ${p-$} ${f} ${n.x+c} ${p} L ${a.x-$} ${p} ${g} ${a.x} ${p+c} L ${a.x} ${a.y}`:(x=C.get(r.branch)?.index,u=`M ${n.x} ${n.y} L ${n.x} ${p+$} ${g} ${n.x+c} ${p} L ${a.x-$} ${p} ${f} ${a.x} ${p-c} L ${a.x} ${a.y}`)}else f="A 20 20, 0, 0, 0,",g="A 20 20, 0, 0, 1,",$=20,c=20,y==="TB"?(n.x<a.x&&(t.type===m.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${n.x} ${a.y-$} ${f} ${n.x+c} ${a.y} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${a.x-$} ${n.y} ${g} ${a.x} ${n.y+c} L ${a.x} ${a.y}`),n.x>a.x&&(f="A 20 20, 0, 0, 0,",g="A 20 20, 0, 0, 1,",$=20,c=20,t.type===m.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${n.x} ${a.y-$} ${g} ${n.x-c} ${a.y} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${a.x+$} ${n.y} ${f} ${a.x} ${n.y+c} L ${a.x} ${a.y}`),n.x===a.x&&(u=`M ${n.x} ${n.y} L ${a.x} ${a.y}`)):y==="BT"?(n.x<a.x&&(t.type===m.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${n.x} ${a.y+$} ${g} ${n.x+c} ${a.y} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${a.x-$} ${n.y} ${f} ${a.x} ${n.y-c} L ${a.x} ${a.y}`),n.x>a.x&&(f="A 20 20, 0, 0, 0,",g="A 20 20, 0, 0, 1,",$=20,c=20,t.type===m.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${n.x} ${a.y+$} ${f} ${n.x-c} ${a.y} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${a.x+$} ${n.y} ${g} ${a.x} ${n.y-c} L ${a.x} ${a.y}`),n.x===a.x&&(u=`M ${n.x} ${n.y} L ${a.x} ${a.y}`)):(n.y<a.y&&(t.type===m.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${a.x-$} ${n.y} ${g} ${a.x} ${n.y+c} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${n.x} ${a.y-$} ${f} ${n.x+c} ${a.y} L ${a.x} ${a.y}`),n.y>a.y&&(t.type===m.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${a.x-$} ${n.y} ${f} ${a.x} ${n.y-c} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${n.x} ${a.y+$} ${g} ${n.x+c} ${a.y} L ${a.x} ${a.y}`),n.y===a.y&&(u=`M ${n.x} ${n.y} L ${a.x} ${a.y}`));if(u===void 0)throw new Error("Line definition not found");e.append("path").attr("d",u).attr("class","arrow arrow"+H(x,G,i))},"drawArrow"),$r=h((e,r)=>{const t=e.append("g").attr("class","commit-arrows");[...r.keys()].forEach(s=>{const o=r.get(s);o.parents&&o.parents.length>0&&o.parents.forEach(i=>{hr(t,r.get(i),o,r)})})},"drawArrows"),fr=h((e,r,t,s)=>{const{look:o,theme:i,themeVariables:n}=q(),{dropShadow:a,THEME_COLOR_LIMIT:l}=n,f=j.has(i??""),g=Z.has(i??""),$=e.append("g");r.forEach((c,x)=>{const u=H(x,f?l:G,g),p=C.get(c.name)?.pos;if(p===void 0)throw new Error(`Position not found for branch ${c.name}`);const b=y==="TB"||y==="BT"?p:f?p+X/2+1:p-2,k=$.append("line");k.attr("x1",0),k.attr("y1",b),k.attr("x2",I),k.attr("y2",b),k.attr("class","branch branch"+u),y==="TB"?(k.attr("y1",F),k.attr("x1",p),k.attr("y2",I),k.attr("x2",p)):y==="BT"&&(k.attr("y1",I),k.attr("x1",p),k.attr("y2",F),k.attr("x2",p)),z.push(b);const U=c.name,D=oe(U),T=$.insert("rect"),M=$.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+u);M.node().appendChild(D);const v=D.getBBox(),ee=f?0:4,N=f?16:0,A=f?X:0;o==="neo"&&T.attr("data-look","neo"),T.attr("class","branchLabelBkg label"+u).attr("style",o==="neo"?`filter:${f?`url(#${s}-drop-shadow)`:a}`:"").attr("rx",ee).attr("ry",ee).attr("x",-v.width-4-(t.rotateCommitLabel===!0?30:0)).attr("y",-v.height/2+10).attr("width",v.width+18+N).attr("height",v.height+4+A),M.attr("transform","translate("+(-v.width-14-(t.rotateCommitLabel===!0?30:0)+N/2)+", "+(b-v.height/2-2)+")"),y==="TB"?(T.attr("x",p-v.width/2-10).attr("y",0),M.attr("transform","translate("+(p-v.width/2-5)+", 0)"),f&&(T.attr("transform",`translate(${-N/2-3}, ${-A-10})`),M.attr("transform","translate("+(p-v.width/2-5)+", "+(-A*2+7)+")"))):y==="BT"?(T.attr("x",p-v.width/2-10).attr("y",I),M.attr("transform","translate("+(p-v.width/2-5)+", "+I+")"),f&&(T.attr("transform",`translate(${-N/2-3}, ${A+10})`),M.attr("transform","translate("+(p-v.width/2-5)+", "+(I+A*2+4)+")"))):T.attr("transform","translate(-19, "+(b-12-A/2)+")")})},"drawBranches"),gr=h(function(e,r,t,s,o){return C.set(e,{pos:r,index:t}),r+=50+(o?40:0)+(y==="TB"||y==="BT"?s.width/2:0),r},"setBranchPosition"),ur=h(function(e,r,t,s){Je(),w.debug("in gitgraph renderer",e+`
|
|
14
|
+
`,"id:",r,t);const o=s.db;if(!o.getConfig){w.error("getConfig method is not available on db");return}const i=o.getConfig(),n=i.rotateCommitLabel??!1;P=o.getCommits();const a=o.getBranchesAsObjArray();y=o.getDirection();const l=me(`[id="${r}"]`),{look:f,theme:g,themeVariables:$}=q(),{useGradient:c,gradientStart:x,gradientStop:u,filterColor:p}=$;if(c){const k=l.append("defs").append("linearGradient").attr("id",r+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");k.append("stop").attr("offset","0%").attr("stop-color",x).attr("stop-opacity",1),k.append("stop").attr("offset","100%").attr("stop-color",u).attr("stop-opacity",1)}f==="neo"&&j.has(g??"")&&l.append("defs").append("filter").attr("id",r+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",p);let b=0;a.forEach((k,U)=>{const D=oe(k.name),T=l.append("g"),K=T.insert("g").attr("class","branchLabel"),M=K.insert("g").attr("class","label branch-label");M.node()?.appendChild(D);const v=D.getBBox();b=gr(k.name,b,U,v,n),M.remove(),K.remove(),T.remove()}),re(l,P,!1,i),i.showBranches&&fr(l,a,i,r),$r(l,P),re(l,P,!0,i),pe.insertTitle(l,"gitTitleText",i.titleTopMargin??0,o.getDiagramTitle()),be(void 0,l,i.diagramPadding,i.useMaxWidth)},"draw"),yr={draw:ur},ie=8,de=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),xr=new Set(["redux-color","redux-dark-color"]),mr=new Set(["neo","neo-dark"]),pr=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),br=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),wr=h(e=>{const{svgId:r}=e;let t="";if(e.useGradient&&r)for(let s=0;s<e.THEME_COLOR_LIMIT;s++)t+=`
|
|
15
|
+
.label${s} { fill: ${e.mainBkg}; stroke: url(${r}-gradient); stroke-width: ${e.strokeWidth};}
|
|
16
|
+
`;return t},"genGitGraphGradient"),kr=h(e=>{const r=J(),{theme:t,themeVariables:s}=r,{borderColorArray:o}=s,i=de.has(t);if(mr.has(t)){let n="";for(let a=0;a<e.THEME_COLOR_LIMIT;a++)if(a===0)n+=`
|
|
17
|
+
.branch-label${a} { fill: ${e.nodeBorder};}
|
|
18
|
+
.commit${a} { stroke: ${e.nodeBorder}; }
|
|
19
|
+
.commit-highlight${a} { stroke: ${e.nodeBorder}; fill: ${e.nodeBorder}; }
|
|
20
|
+
.arrow${a} { stroke: ${e.nodeBorder}; }
|
|
21
|
+
.commit-bullets { fill: ${e.nodeBorder}; }
|
|
22
|
+
.commit-cherry-pick${a} { stroke: ${e.nodeBorder}; }
|
|
23
|
+
${wr(e)}`;else{const l=a%ie;n+=`
|
|
24
|
+
.branch-label${a} { fill: ${e["gitBranchLabel"+l]}; }
|
|
25
|
+
.commit${a} { stroke: ${e["git"+l]}; fill: ${e["git"+l]}; }
|
|
26
|
+
.commit-highlight${a} { stroke: ${e["gitInv"+l]}; fill: ${e["gitInv"+l]}; }
|
|
27
|
+
.arrow${a} { stroke: ${e["git"+l]}; }
|
|
28
|
+
`}return n}else if(xr.has(t)){let n="";for(let a=0;a<e.THEME_COLOR_LIMIT;a++)if(a===0)n+=`
|
|
29
|
+
.branch-label${a} { fill: ${e.nodeBorder}; ${i?`font-weight:${e.noteFontWeight}`:""} }
|
|
30
|
+
.commit${a} { stroke: ${e.nodeBorder}; }
|
|
31
|
+
.commit-highlight${a} { stroke: ${e.nodeBorder}; fill: ${e.mainBkg}; }
|
|
32
|
+
.label${a} { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${e.strokeWidth}; ${i?`font-weight:${e.noteFontWeight}`:""} }
|
|
33
|
+
.arrow${a} { stroke: ${e.nodeBorder}; }
|
|
34
|
+
.commit-bullets { fill: ${e.nodeBorder}; }
|
|
35
|
+
`;else{const l=a%o.length;n+=`
|
|
36
|
+
.branch-label${a} { fill: ${e.nodeBorder}; ${i?`font-weight:${e.noteFontWeight}`:""} }
|
|
37
|
+
.commit${a} { stroke: ${o[l]}; fill: ${o[l]}; }
|
|
38
|
+
.commit-highlight${a} { stroke: ${o[l]}; fill: ${o[l]}; }
|
|
39
|
+
.label${a} { fill: ${pr.has(t)?e.mainBkg:o[l]}; stroke: ${o[l]}; stroke-width: ${e.strokeWidth}; }
|
|
40
|
+
.arrow${a} { stroke: ${o[l]}; }
|
|
41
|
+
`}return n}else{let n="";for(let a=0;a<e.THEME_COLOR_LIMIT;a++)n+=`
|
|
42
|
+
.branch-label${a} { fill: ${e.nodeBorder}; ${i?`font-weight:${e.noteFontWeight}`:""} }
|
|
43
|
+
.commit${a} { stroke: ${e.nodeBorder}; }
|
|
44
|
+
.commit-highlight${a} { stroke: ${e.nodeBorder}; fill: ${e.nodeBorder}; }
|
|
45
|
+
.label${a} { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${e.strokeWidth}; ${i?`font-weight:${e.noteFontWeight}`:""}}
|
|
46
|
+
.arrow${a} { stroke: ${e.nodeBorder}; }
|
|
47
|
+
.commit-bullets { fill: ${e.nodeBorder}; }
|
|
48
|
+
.commit-cherry-pick${a} { stroke: ${e.nodeBorder}; }
|
|
49
|
+
`;return n}},"genColor"),vr=h(e=>`${Array.from({length:e.THEME_COLOR_LIMIT},(r,t)=>t).map(r=>{const t=r%ie;return`
|
|
50
|
+
.branch-label${r} { fill: ${e["gitBranchLabel"+t]}; }
|
|
51
|
+
.commit${r} { stroke: ${e["git"+t]}; fill: ${e["git"+t]}; }
|
|
52
|
+
.commit-highlight${r} { stroke: ${e["gitInv"+t]}; fill: ${e["gitInv"+t]}; }
|
|
53
|
+
.label${r} { fill: ${e["git"+t]}; }
|
|
54
|
+
.arrow${r} { stroke: ${e["git"+t]}; }
|
|
55
|
+
`}).join(`
|
|
56
|
+
`)}`,"normalTheme"),Cr=h(e=>{const r=J(),{theme:t}=r,s=br.has(t);return`
|
|
57
|
+
.commit-id,
|
|
58
|
+
.commit-msg,
|
|
59
|
+
.branch-label {
|
|
60
|
+
fill: lightgrey;
|
|
61
|
+
color: lightgrey;
|
|
62
|
+
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
63
|
+
font-family: var(--mermaid-font-family);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
${s?kr(e):vr(e)}
|
|
67
|
+
|
|
68
|
+
.branch {
|
|
69
|
+
stroke-width: ${e.strokeWidth};
|
|
70
|
+
stroke: ${e.commitLineColor??e.lineColor};
|
|
71
|
+
stroke-dasharray: ${s?"4 2":"2"};
|
|
72
|
+
}
|
|
73
|
+
.commit-label { font-size: ${e.commitLabelFontSize}; fill: ${s?e.nodeBorder:e.commitLabelColor}; ${s?`font-weight:${e.noteFontWeight};`:""}}
|
|
74
|
+
.commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${s?"transparent":e.commitLabelBackground}; opacity: ${s?"":.5}; }
|
|
75
|
+
.tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};}
|
|
76
|
+
.tag-label-bkg { fill: ${s?e.mainBkg:e.tagLabelBackground}; stroke: ${s?e.nodeBorder:e.tagLabelBorder}; ${s?`filter:${e.dropShadow}`:""} }
|
|
77
|
+
.tag-hole { fill: ${e.textColor}; }
|
|
78
|
+
|
|
79
|
+
.commit-merge {
|
|
80
|
+
stroke: ${s?e.mainBkg:e.primaryColor};
|
|
81
|
+
fill: ${s?e.mainBkg:e.primaryColor};
|
|
82
|
+
}
|
|
83
|
+
.commit-reverse {
|
|
84
|
+
stroke: ${s?e.mainBkg:e.primaryColor};
|
|
85
|
+
fill: ${s?e.mainBkg:e.primaryColor};
|
|
86
|
+
stroke-width: ${s?e.strokeWidth:3};
|
|
87
|
+
}
|
|
88
|
+
.commit-highlight-outer {
|
|
89
|
+
}
|
|
90
|
+
.commit-highlight-inner {
|
|
91
|
+
stroke: ${s?e.mainBkg:e.primaryColor};
|
|
92
|
+
fill: ${s?e.mainBkg:e.primaryColor};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.arrow {
|
|
96
|
+
/* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */
|
|
97
|
+
stroke-width: ${de.has(t)?e.strokeWidth:8};
|
|
98
|
+
stroke-linecap: round;
|
|
99
|
+
fill: none
|
|
100
|
+
}
|
|
101
|
+
.gitTitleText {
|
|
102
|
+
text-anchor: middle;
|
|
103
|
+
font-size: 18px;
|
|
104
|
+
fill: ${e.textColor};
|
|
105
|
+
}
|
|
106
|
+
`},"getStyles"),Er=Cr,Ir={parser:Ve,db:se,renderer:yr,styles:Er};export{Ir as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*{box-sizing:border-box}body{font:15px/1.5 Inter,system-ui,sans-serif;color:#1c302c;background:#fafbf9}header{height:56px;background:#173b33;color:#fff;display:flex;align-items:center;gap:24px;padding:0 22px}header em{margin-left:auto;font-size:12px;color:#d0e7df;font-style:normal}.layout{display:flex;height:calc(100dvh - 56px)}aside{width:clamp(210px,22vw,380px);flex:none;background:#edf1ed;border-right:1px solid #c8d2cd;padding:16px;overflow:auto}h2{font-size:16px;margin:0 0 14px}summary{cursor:pointer;padding:3px}.branch{border-left:1px solid #ccd5d1;margin-left:6px;padding-left:10px}.file{display:flex;width:100%;justify-content:space-between;text-align:left;background:transparent;border:0;padding:4px 6px;gap:6px}.file span{overflow:hidden;text-overflow:ellipsis}.file[aria-current=true]{background:#d4e4dc}.added{color:#216542}.deleted,.conflict{color:#9a3639}.modified{color:#885808}.renamed{color:#574094}button{font:inherit;color:inherit;cursor:pointer;background:#fff;border:1px solid #c7d2cc;border-radius:5px;padding:5px 10px}button:disabled{opacity:.45;cursor:default}button:focus-visible,summary:focus-visible{outline:2px solid #138165;outline-offset:-2px}main{min-width:0;flex:1;display:flex;flex-direction:column}nav{display:flex;flex-wrap:wrap;gap:6px;align-items:center;background:#fff;border-bottom:1px solid #d5ded8;padding:10px 16px}.switch{margin-right:auto}.switch button[aria-pressed=true]{background:#285245;color:#fff}section{overflow:auto;padding:18px;flex:1;min-height:0}h1{font-size:22px;margin:0;overflow-wrap:anywhere}p{margin:3px 0 18px;color:#52655d}article{border:1px solid #d5ded8;border-radius:6px;overflow:hidden;margin-bottom:16px;background:#fff}h3,.labels{font:12px/1.5 monospace;background:#eaf0ee;padding:7px 10px;margin:0;overflow-wrap:anywhere}.pair{display:grid;grid-template-columns:1fr 1fr}.pair>*:first-child{border-right:1px solid #cfd8d3}.line{display:flex;width:100%;min-width:0;align-items:baseline;text-align:left;border:0;border-radius:0;padding:0;font:13px/1.65 monospace}.line:hover{box-shadow:inset 3px 0 #287859}.line small{min-width:4ch;text-align:right;color:#586b64}.line i{font-style:normal;text-align:center;min-width:3ch}.line code{white-space:pre-wrap;overflow-wrap:anywhere;tab-size:4}.plus{background:#e1f4e6}.minus{background:#f9e5e2}.blank{background:#f4f6f4}form,output{background:#fff;padding:12px 18px;border-top:1px solid #cad6cf}textarea{display:block;width:100%;margin:6px 0}pre{white-space:pre-wrap;overflow-wrap:anywhere}@media(max-width:759px){aside{position:absolute;z-index:1;top:110px;bottom:0;width:min(85vw,340px);box-shadow:4px 4px 16px #0002}section{padding:10px}header{gap:12px;padding:0 12px}nav{padding:8px;gap:3px}nav button{font-size:12px;padding:6px}.line small{min-width:3ch}}.line{cursor:pointer;background-color:#fff}.line.plus{background-color:#e1f4e6}.line.minus{background-color:#f9e5e2}.line small,.line i{-webkit-user-select:none;user-select:none}.line code{-webkit-user-select:text;user-select:text;cursor:text;min-width:0}.line.selected-line,.line mark{background:#ffe29a;color:#30250e}.line.selected-line{box-shadow:inset 3px 0 #9b6900}.line:focus-visible{outline:2px solid #138165;outline-offset:-2px}.page-number{display:flex;align-items:center;gap:8px;margin:16px 0 8px;color:#50665b;font:12px monospace}.page-number:after{content:"";height:1px;background:#c8d2cd;flex:1}.page-content{background:#fff;padding:12px;overflow-wrap:anywhere;overflow:auto}.page-content :first-child{margin-top:0}.page-content :last-child{margin-bottom:0}.page-content img,.page-content svg{max-width:100%;height:auto}.page-content a{color:#175c49;text-decoration:underline}#review-drawer{display:flex;flex-direction:column;width:clamp(256px,27vw,510px);padding:0;overflow:hidden}#review-drawer[hidden]{display:none}.drawer-tabs{display:flex;border-bottom:1px solid #c8d2cd;padding:4px;gap:2px}.drawer-tabs button{flex:auto;background:transparent;border:0}.drawer-tabs button[aria-selected=true]{background:#285245;color:#fff}.drawer-panel{min-height:0;overflow:auto;padding:12px;overscroll-behavior:contain}.drawer-toggle{color:#173b33;white-space:nowrap}@media(max-width:759px){#review-drawer{top:56px;width:min(85vw,340px)}header{gap:6px}header span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}.drawer-panel:has(.chat){flex:1;padding:0;overflow:hidden}.chat{height:100%;display:flex;flex-direction:column}.chat-log{flex:1;min-height:0;overflow:auto;padding:12px}.chat-turn{margin-bottom:16px;overflow-wrap:anywhere}.chat-turn pre{margin:4px 0 10px}.chat form{flex:none;padding:10px}.chat textarea{resize:vertical;max-height:25vh}.comment-replies{max-height:30dvh;overflow:auto}.comment-replies pre{white-space:pre-wrap;overflow-wrap:anywhere}
|