vitepress-mermaid-preview
Version:
Mermaid preview for vitepress
268 lines • 63.5 kB
JavaScript
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./component-Dha7mB0E.cjs"),De=require("./linear-BmQLvM8u.cjs"),bn=require("./init-CHZsXQcr.cjs");function wn(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let a of e)(a=t(a,++r,e))!=null&&(n<a||n===void 0&&a>=a)&&(n=a)}return n}function Cn(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let a of e)(a=t(a,++r,e))!=null&&(n>a||n===void 0&&a>=a)&&(n=a)}return n}function Dn(e){return e}var qe=1,rt=2,ht=3,je=4,Et=1e-6;function Mn(e){return"translate("+e+",0)"}function Sn(e){return"translate(0,"+e+")"}function Fn(e){return t=>+e(t)}function Yn(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function Un(){return!this.__axis}function $t(e,t){var n=[],r=null,a=null,s=6,o=6,p=3,D=typeof window<"u"&&window.devicePixelRatio>1?0:.5,T=e===qe||e===je?-1:1,g=e===je||e===rt?"x":"y",U=e===qe||e===ht?Mn:Sn;function w(_){var Z=r??(t.ticks?t.ticks.apply(t,n):t.domain()),O=a??(t.tickFormat?t.tickFormat.apply(t,n):Dn),C=Math.max(s,0)+p,I=t.range(),P=+I[0]+D,W=+I[I.length-1]+D,q=(t.bandwidth?Yn:Fn)(t.copy(),D),$=_.selection?_.selection():_,b=$.selectAll(".domain").data([null]),H=$.selectAll(".tick").data(Z,t).order(),x=H.exit(),F=H.enter().append("g").attr("class","tick"),S=H.select("line"),M=H.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),H=H.merge(F),S=S.merge(F.append("line").attr("stroke","currentColor").attr(g+"2",T*s)),M=M.merge(F.append("text").attr("fill","currentColor").attr(g,T*C).attr("dy",e===qe?"0em":e===ht?"0.71em":"0.32em")),_!==$&&(b=b.transition(_),H=H.transition(_),S=S.transition(_),M=M.transition(_),x=x.transition(_).attr("opacity",Et).attr("transform",function(k){return isFinite(k=q(k))?U(k+D):this.getAttribute("transform")}),F.attr("opacity",Et).attr("transform",function(k){var Y=this.parentNode.__axis;return U((Y&&isFinite(Y=Y(k))?Y:q(k))+D)})),x.remove(),b.attr("d",e===je||e===rt?o?"M"+T*o+","+P+"H"+D+"V"+W+"H"+T*o:"M"+D+","+P+"V"+W:o?"M"+P+","+T*o+"V"+D+"H"+W+"V"+T*o:"M"+P+","+D+"H"+W),H.attr("opacity",1).attr("transform",function(k){return U(q(k)+D)}),S.attr(g+"2",T*s),M.attr(g,T*C).text(O),$.filter(Un).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===rt?"start":e===je?"end":"middle"),$.each(function(){this.__axis=q})}return w.scale=function(_){return arguments.length?(t=_,w):t},w.ticks=function(){return n=Array.from(arguments),w},w.tickArguments=function(_){return arguments.length?(n=_==null?[]:Array.from(_),w):n.slice()},w.tickValues=function(_){return arguments.length?(r=_==null?null:Array.from(_),w):r&&r.slice()},w.tickFormat=function(_){return arguments.length?(a=_,w):a},w.tickSize=function(_){return arguments.length?(s=o=+_,w):s},w.tickSizeInner=function(_){return arguments.length?(s=+_,w):s},w.tickSizeOuter=function(_){return arguments.length?(o=+_,w):o},w.tickPadding=function(_){return arguments.length?(p=+_,w):p},w.offset=function(_){return arguments.length?(D=+_,w):D},w}function En(e){return $t(qe,e)}function An(e){return $t(ht,e)}const Ln=Math.PI/180,In=180/Math.PI,Qe=18,Qt=.96422,Jt=1,Kt=.82521,en=4/29,Me=6/29,tn=3*Me*Me,Wn=Me*Me*Me;function nn(e){if(e instanceof le)return new le(e.l,e.a,e.b,e.opacity);if(e instanceof de)return rn(e);e instanceof i.Rgb||(e=i.rgbConvert(e));var t=ot(e.r),n=ot(e.g),r=ot(e.b),a=at((.2225045*t+.7168786*n+.0606169*r)/Jt),s,o;return t===n&&n===r?s=o=a:(s=at((.4360747*t+.3850649*n+.1430804*r)/Qt),o=at((.0139322*t+.0971045*n+.7141733*r)/Kt)),new le(116*a-16,500*(s-a),200*(a-o),e.opacity)}function On(e,t,n,r){return arguments.length===1?nn(e):new le(e,t,n,r??1)}function le(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}i.define(le,On,i.extend(i.Color$1,{brighter(e){return new le(this.l+Qe*(e??1),this.a,this.b,this.opacity)},darker(e){return new le(this.l-Qe*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=Qt*it(t),e=Jt*it(e),n=Kt*it(n),new i.Rgb(st(3.1338561*t-1.6168667*e-.4906146*n),st(-.9787684*t+1.9161415*e+.033454*n),st(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function at(e){return e>Wn?Math.pow(e,1/3):e/tn+en}function it(e){return e>Me?e*e*e:tn*(e-en)}function st(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function ot(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Hn(e){if(e instanceof de)return new de(e.h,e.c,e.l,e.opacity);if(e instanceof le||(e=nn(e)),e.a===0&&e.b===0)return new de(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*In;return new de(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function mt(e,t,n,r){return arguments.length===1?Hn(e):new de(e,t,n,r??1)}function de(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function rn(e){if(isNaN(e.h))return new le(e.l,0,0,e.opacity);var t=e.h*Ln;return new le(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}i.define(de,mt,i.extend(i.Color$1,{brighter(e){return new de(this.h,this.c,this.l+Qe*(e??1),this.opacity)},darker(e){return new de(this.h,this.c,this.l-Qe*(e??1),this.opacity)},rgb(){return rn(this).rgb()}}));function Nn(e){return function(t,n){var r=e((t=mt(t)).h,(n=mt(n)).h),a=i.nogamma(t.c,n.c),s=i.nogamma(t.l,n.l),o=i.nogamma(t.opacity,n.opacity);return function(p){return t.h=r(p),t.c=a(p),t.l=s(p),t.opacity=o(p),t+""}}}const Pn=Nn(i.hue);function Vn(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],s=e[r],o;return s<a&&(o=n,n=r,r=o,o=a,a=s,s=o),e[n]=t.floor(a),e[r]=t.ceil(s),e}const ct=new Date,ut=new Date;function te(e,t,n,r){function a(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return a.floor=s=>(e(s=new Date(+s)),s),a.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),a.round=s=>{const o=a(s),p=a.ceil(s);return s-o<p-s?o:p},a.offset=(s,o)=>(t(s=new Date(+s),o==null?1:Math.floor(o)),s),a.range=(s,o,p)=>{const D=[];if(s=a.ceil(s),p=p==null?1:Math.floor(p),!(s<o)||!(p>0))return D;let T;do D.push(T=new Date(+s)),t(s,p),e(s);while(T<s&&s<o);return D},a.filter=s=>te(o=>{if(o>=o)for(;e(o),!s(o);)o.setTime(o-1)},(o,p)=>{if(o>=o)if(p<0)for(;++p<=0;)for(;t(o,-1),!s(o););else for(;--p>=0;)for(;t(o,1),!s(o););}),n&&(a.count=(s,o)=>(ct.setTime(+s),ut.setTime(+o),e(ct),e(ut),Math.floor(n(ct,ut))),a.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?a.filter(r?o=>r(o)%s===0:o=>a.count(0,o)%s===0):a)),a}const Fe=te(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Fe.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?te(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Fe);Fe.range;const he=1e3,oe=he*60,me=oe*60,ge=me*24,vt=ge*7,At=ge*30,lt=ge*365,pe=te(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*he)},(e,t)=>(t-e)/he,e=>e.getUTCSeconds());pe.range;const Ie=te(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*he)},(e,t)=>{e.setTime(+e+t*oe)},(e,t)=>(t-e)/oe,e=>e.getMinutes());Ie.range;const zn=te(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*oe)},(e,t)=>(t-e)/oe,e=>e.getUTCMinutes());zn.range;const We=te(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*he-e.getMinutes()*oe)},(e,t)=>{e.setTime(+e+t*me)},(e,t)=>(t-e)/me,e=>e.getHours());We.range;const Rn=te(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*me)},(e,t)=>(t-e)/me,e=>e.getUTCHours());Rn.range;const ve=te(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*oe)/ge,e=>e.getDate()-1);ve.range;const Tt=te(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ge,e=>e.getUTCDate()-1);Tt.range;const jn=te(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ge,e=>Math.floor(e/ge));jn.range;function xe(e){return te(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*oe)/vt)}const Ne=xe(0),Oe=xe(1),an=xe(2),sn=xe(3),Te=xe(4),on=xe(5),cn=xe(6);Ne.range;Oe.range;an.range;sn.range;Te.range;on.range;cn.range;function be(e){return te(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/vt)}const un=be(0),Je=be(1),qn=be(2),Bn=be(3),Ye=be(4),Zn=be(5),Xn=be(6);un.range;Je.range;qn.range;Bn.range;Ye.range;Zn.range;Xn.range;const He=te(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());He.range;const Gn=te(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Gn.range;const ye=te(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());ye.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:te(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});ye.range;const _e=te(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());_e.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:te(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});_e.range;function $n(e,t,n,r,a,s){const o=[[pe,1,he],[pe,5,5*he],[pe,15,15*he],[pe,30,30*he],[s,1,oe],[s,5,5*oe],[s,15,15*oe],[s,30,30*oe],[a,1,me],[a,3,3*me],[a,6,6*me],[a,12,12*me],[r,1,ge],[r,2,2*ge],[n,1,vt],[t,1,At],[t,3,3*At],[e,1,lt]];function p(T,g,U){const w=g<T;w&&([T,g]=[g,T]);const _=U&&typeof U.range=="function"?U:D(T,g,U),Z=_?_.range(T,+g+1):[];return w?Z.reverse():Z}function D(T,g,U){const w=Math.abs(g-T)/U,_=De.bisector(([,,C])=>C).right(o,w);if(_===o.length)return e.every(De.tickStep(T/lt,g/lt,U));if(_===0)return Fe.every(Math.max(De.tickStep(T,g,U),1));const[Z,O]=o[w/o[_-1][2]<o[_][2]/w?_-1:_];return Z.every(O)}return[p,D]}const[Qn,Jn]=$n(ye,He,Ne,ve,We,Ie);function ft(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function dt(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Ee(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Kn(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,s=e.days,o=e.shortDays,p=e.months,D=e.shortMonths,T=Ae(a),g=Le(a),U=Ae(s),w=Le(s),_=Ae(o),Z=Le(o),O=Ae(p),C=Le(p),I=Ae(D),P=Le(D),W={a:m,A:E,b:u,B:l,c:null,d:Nt,e:Nt,f:xr,g:Er,G:Lr,H:vr,I:Tr,j:_r,L:ln,m:br,M:wr,p:c,q:R,Q:zt,s:Rt,S:Cr,u:Dr,U:Mr,V:Sr,w:Fr,W:Yr,x:null,X:null,y:Ur,Y:Ar,Z:Ir,"%":Vt},q={a:V,A:z,b:K,B:X,c:null,d:Pt,e:Pt,f:Nr,g:Gr,G:Qr,H:Wr,I:Or,j:Hr,L:dn,m:Pr,M:Vr,p:Q,q:ae,Q:zt,s:Rt,S:zr,u:Rr,U:jr,V:qr,w:Br,W:Zr,x:null,X:null,y:Xr,Y:$r,Z:Jr,"%":Vt},$={a:S,A:M,b:k,B:Y,c:f,d:Ot,e:Ot,f:gr,g:Wt,G:It,H:Ht,I:Ht,j:fr,L:mr,m:lr,M:dr,p:F,q:ur,Q:kr,s:pr,S:hr,u:ar,U:ir,V:sr,w:rr,W:or,x:h,X:y,y:Wt,Y:It,Z:cr,"%":yr};W.x=b(n,W),W.X=b(r,W),W.c=b(t,W),q.x=b(n,q),q.X=b(r,q),q.c=b(t,q);function b(v,L){return function(N){var d=[],J=-1,A=0,G=v.length,B,re,ie;for(N instanceof Date||(N=new Date(+N));++J<G;)v.charCodeAt(J)===37&&(d.push(v.slice(A,J)),(re=Lt[B=v.charAt(++J)])!=null?B=v.charAt(++J):re=B==="e"?" ":"0",(ie=L[B])&&(B=ie(N,re)),d.push(B),A=J+1);return d.push(v.slice(A,J)),d.join("")}}function H(v,L){return function(N){var d=Ee(1900,void 0,1),J=x(d,v,N+="",0),A,G;if(J!=N.length)return null;if("Q"in d)return new Date(d.Q);if("s"in d)return new Date(d.s*1e3+("L"in d?d.L:0));if(L&&!("Z"in d)&&(d.Z=0),"p"in d&&(d.H=d.H%12+d.p*12),d.m===void 0&&(d.m="q"in d?d.q:0),"V"in d){if(d.V<1||d.V>53)return null;"w"in d||(d.w=1),"Z"in d?(A=dt(Ee(d.y,0,1)),G=A.getUTCDay(),A=G>4||G===0?Je.ceil(A):Je(A),A=Tt.offset(A,(d.V-1)*7),d.y=A.getUTCFullYear(),d.m=A.getUTCMonth(),d.d=A.getUTCDate()+(d.w+6)%7):(A=ft(Ee(d.y,0,1)),G=A.getDay(),A=G>4||G===0?Oe.ceil(A):Oe(A),A=ve.offset(A,(d.V-1)*7),d.y=A.getFullYear(),d.m=A.getMonth(),d.d=A.getDate()+(d.w+6)%7)}else("W"in d||"U"in d)&&("w"in d||(d.w="u"in d?d.u%7:"W"in d?1:0),G="Z"in d?dt(Ee(d.y,0,1)).getUTCDay():ft(Ee(d.y,0,1)).getDay(),d.m=0,d.d="W"in d?(d.w+6)%7+d.W*7-(G+5)%7:d.w+d.U*7-(G+6)%7);return"Z"in d?(d.H+=d.Z/100|0,d.M+=d.Z%100,dt(d)):ft(d)}}function x(v,L,N,d){for(var J=0,A=L.length,G=N.length,B,re;J<A;){if(d>=G)return-1;if(B=L.charCodeAt(J++),B===37){if(B=L.charAt(J++),re=$[B in Lt?L.charAt(J++):B],!re||(d=re(v,N,d))<0)return-1}else if(B!=N.charCodeAt(d++))return-1}return d}function F(v,L,N){var d=T.exec(L.slice(N));return d?(v.p=g.get(d[0].toLowerCase()),N+d[0].length):-1}function S(v,L,N){var d=_.exec(L.slice(N));return d?(v.w=Z.get(d[0].toLowerCase()),N+d[0].length):-1}function M(v,L,N){var d=U.exec(L.slice(N));return d?(v.w=w.get(d[0].toLowerCase()),N+d[0].length):-1}function k(v,L,N){var d=I.exec(L.slice(N));return d?(v.m=P.get(d[0].toLowerCase()),N+d[0].length):-1}function Y(v,L,N){var d=O.exec(L.slice(N));return d?(v.m=C.get(d[0].toLowerCase()),N+d[0].length):-1}function f(v,L,N){return x(v,t,L,N)}function h(v,L,N){return x(v,n,L,N)}function y(v,L,N){return x(v,r,L,N)}function m(v){return o[v.getDay()]}function E(v){return s[v.getDay()]}function u(v){return D[v.getMonth()]}function l(v){return p[v.getMonth()]}function c(v){return a[+(v.getHours()>=12)]}function R(v){return 1+~~(v.getMonth()/3)}function V(v){return o[v.getUTCDay()]}function z(v){return s[v.getUTCDay()]}function K(v){return D[v.getUTCMonth()]}function X(v){return p[v.getUTCMonth()]}function Q(v){return a[+(v.getUTCHours()>=12)]}function ae(v){return 1+~~(v.getUTCMonth()/3)}return{format:function(v){var L=b(v+="",W);return L.toString=function(){return v},L},parse:function(v){var L=H(v+="",!1);return L.toString=function(){return v},L},utcFormat:function(v){var L=b(v+="",q);return L.toString=function(){return v},L},utcParse:function(v){var L=H(v+="",!0);return L.toString=function(){return v},L}}}var Lt={"-":"",_:" ",0:"0"},ne=/^\s*\d+/,er=/^%/,tr=/[\\^$*+?|[\]().{}]/g;function j(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",s=a.length;return r+(s<n?new Array(n-s+1).join(t)+a:a)}function nr(e){return e.replace(tr,"\\$&")}function Ae(e){return new RegExp("^(?:"+e.map(nr).join("|")+")","i")}function Le(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function rr(e,t,n){var r=ne.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function ar(e,t,n){var r=ne.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function ir(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function sr(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function or(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function It(e,t,n){var r=ne.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Wt(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function cr(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function ur(e,t,n){var r=ne.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function lr(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Ot(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function fr(e,t,n){var r=ne.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Ht(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function dr(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function hr(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function mr(e,t,n){var r=ne.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function gr(e,t,n){var r=ne.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function yr(e,t,n){var r=er.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function kr(e,t,n){var r=ne.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function pr(e,t,n){var r=ne.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Nt(e,t){return j(e.getDate(),t,2)}function vr(e,t){return j(e.getHours(),t,2)}function Tr(e,t){return j(e.getHours()%12||12,t,2)}function _r(e,t){return j(1+ve.count(ye(e),e),t,3)}function ln(e,t){return j(e.getMilliseconds(),t,3)}function xr(e,t){return ln(e,t)+"000"}function br(e,t){return j(e.getMonth()+1,t,2)}function wr(e,t){return j(e.getMinutes(),t,2)}function Cr(e,t){return j(e.getSeconds(),t,2)}function Dr(e){var t=e.getDay();return t===0?7:t}function Mr(e,t){return j(Ne.count(ye(e)-1,e),t,2)}function fn(e){var t=e.getDay();return t>=4||t===0?Te(e):Te.ceil(e)}function Sr(e,t){return e=fn(e),j(Te.count(ye(e),e)+(ye(e).getDay()===4),t,2)}function Fr(e){return e.getDay()}function Yr(e,t){return j(Oe.count(ye(e)-1,e),t,2)}function Ur(e,t){return j(e.getFullYear()%100,t,2)}function Er(e,t){return e=fn(e),j(e.getFullYear()%100,t,2)}function Ar(e,t){return j(e.getFullYear()%1e4,t,4)}function Lr(e,t){var n=e.getDay();return e=n>=4||n===0?Te(e):Te.ceil(e),j(e.getFullYear()%1e4,t,4)}function Ir(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+j(t/60|0,"0",2)+j(t%60,"0",2)}function Pt(e,t){return j(e.getUTCDate(),t,2)}function Wr(e,t){return j(e.getUTCHours(),t,2)}function Or(e,t){return j(e.getUTCHours()%12||12,t,2)}function Hr(e,t){return j(1+Tt.count(_e(e),e),t,3)}function dn(e,t){return j(e.getUTCMilliseconds(),t,3)}function Nr(e,t){return dn(e,t)+"000"}function Pr(e,t){return j(e.getUTCMonth()+1,t,2)}function Vr(e,t){return j(e.getUTCMinutes(),t,2)}function zr(e,t){return j(e.getUTCSeconds(),t,2)}function Rr(e){var t=e.getUTCDay();return t===0?7:t}function jr(e,t){return j(un.count(_e(e)-1,e),t,2)}function hn(e){var t=e.getUTCDay();return t>=4||t===0?Ye(e):Ye.ceil(e)}function qr(e,t){return e=hn(e),j(Ye.count(_e(e),e)+(_e(e).getUTCDay()===4),t,2)}function Br(e){return e.getUTCDay()}function Zr(e,t){return j(Je.count(_e(e)-1,e),t,2)}function Xr(e,t){return j(e.getUTCFullYear()%100,t,2)}function Gr(e,t){return e=hn(e),j(e.getUTCFullYear()%100,t,2)}function $r(e,t){return j(e.getUTCFullYear()%1e4,t,4)}function Qr(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Ye(e):Ye.ceil(e),j(e.getUTCFullYear()%1e4,t,4)}function Jr(){return"+0000"}function Vt(){return"%"}function zt(e){return+e}function Rt(e){return Math.floor(+e/1e3)}var Ce,Ke;Kr({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Kr(e){return Ce=Kn(e),Ke=Ce.format,Ce.parse,Ce.utcFormat,Ce.utcParse,Ce}function ea(e){return new Date(e)}function ta(e){return e instanceof Date?+e:+new Date(+e)}function mn(e,t,n,r,a,s,o,p,D,T){var g=De.continuous(),U=g.invert,w=g.domain,_=T(".%L"),Z=T(":%S"),O=T("%I:%M"),C=T("%I %p"),I=T("%a %d"),P=T("%b %d"),W=T("%B"),q=T("%Y");function $(b){return(D(b)<b?_:p(b)<b?Z:o(b)<b?O:s(b)<b?C:r(b)<b?a(b)<b?I:P:n(b)<b?W:q)(b)}return g.invert=function(b){return new Date(U(b))},g.domain=function(b){return arguments.length?w(Array.from(b,ta)):w().map(ea)},g.ticks=function(b){var H=w();return e(H[0],H[H.length-1],b??10)},g.tickFormat=function(b,H){return H==null?$:T(H)},g.nice=function(b){var H=w();return(!b||typeof b.range!="function")&&(b=t(H[0],H[H.length-1],b??10)),b?w(Vn(H,b)):g},g.copy=function(){return De.copy(g,mn(e,t,n,r,a,s,o,p,D,T))},g}function na(){return bn.initRange.apply(mn(Qn,Jn,ye,He,Ne,ve,We,Ie,pe,Ke).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var Be={exports:{}},ra=Be.exports,jt;function aa(){return jt||(jt=1,function(e,t){(function(n,r){e.exports=r()})(ra,function(){var n="day";return function(r,a,s){var o=function(T){return T.add(4-T.isoWeekday(),n)},p=a.prototype;p.isoWeekYear=function(){return o(this).year()},p.isoWeek=function(T){if(!this.$utils().u(T))return this.add(7*(T-this.isoWeek()),n);var g,U,w,_,Z=o(this),O=(g=this.isoWeekYear(),U=this.$u,w=(U?s.utc:s)().year(g).startOf("year"),_=4-w.isoWeekday(),w.isoWeekday()>4&&(_+=7),w.add(_,n));return Z.diff(O,"week")+1},p.isoWeekday=function(T){return this.$utils().u(T)?this.day()||7:this.day(this.day()%7?T:T-7)};var D=p.startOf;p.startOf=function(T,g){var U=this.$utils(),w=!!U.u(g)||g;return U.p(T)==="isoweek"?w?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):D.bind(this)(T,g)}}})}(Be)),Be.exports}var ia=aa();const sa=i.getDefaultExportFromCjs(ia);var Ze={exports:{}},oa=Ze.exports,qt;function ca(){return qt||(qt=1,function(e,t){(function(n,r){e.exports=r()})(oa,function(){var n={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,a=/\d/,s=/\d\d/,o=/\d\d?/,p=/\d*[^-_:/,()\s\d]+/,D={},T=function(C){return(C=+C)+(C>68?1900:2e3)},g=function(C){return function(I){this[C]=+I}},U=[/[+-]\d\d:?(\d\d)?|Z/,function(C){(this.zone||(this.zone={})).offset=function(I){if(!I||I==="Z")return 0;var P=I.match(/([+-]|\d\d)/g),W=60*P[1]+(+P[2]||0);return W===0?0:P[0]==="+"?-W:W}(C)}],w=function(C){var I=D[C];return I&&(I.indexOf?I:I.s.concat(I.f))},_=function(C,I){var P,W=D.meridiem;if(W){for(var q=1;q<=24;q+=1)if(C.indexOf(W(q,0,I))>-1){P=q>12;break}}else P=C===(I?"pm":"PM");return P},Z={A:[p,function(C){this.afternoon=_(C,!1)}],a:[p,function(C){this.afternoon=_(C,!0)}],Q:[a,function(C){this.month=3*(C-1)+1}],S:[a,function(C){this.milliseconds=100*+C}],SS:[s,function(C){this.milliseconds=10*+C}],SSS:[/\d{3}/,function(C){this.milliseconds=+C}],s:[o,g("seconds")],ss:[o,g("seconds")],m:[o,g("minutes")],mm:[o,g("minutes")],H:[o,g("hours")],h:[o,g("hours")],HH:[o,g("hours")],hh:[o,g("hours")],D:[o,g("day")],DD:[s,g("day")],Do:[p,function(C){var I=D.ordinal,P=C.match(/\d+/);if(this.day=P[0],I)for(var W=1;W<=31;W+=1)I(W).replace(/\[|\]/g,"")===C&&(this.day=W)}],w:[o,g("week")],ww:[s,g("week")],M:[o,g("month")],MM:[s,g("month")],MMM:[p,function(C){var I=w("months"),P=(w("monthsShort")||I.map(function(W){return W.slice(0,3)})).indexOf(C)+1;if(P<1)throw new Error;this.month=P%12||P}],MMMM:[p,function(C){var I=w("months").indexOf(C)+1;if(I<1)throw new Error;this.month=I%12||I}],Y:[/[+-]?\d+/,g("year")],YY:[s,function(C){this.year=T(C)}],YYYY:[/\d{4}/,g("year")],Z:U,ZZ:U};function O(C){var I,P;I=C,P=D&&D.formats;for(var W=(C=I.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(S,M,k){var Y=k&&k.toUpperCase();return M||P[k]||n[k]||P[Y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(f,h,y){return h||y.slice(1)})})).match(r),q=W.length,$=0;$<q;$+=1){var b=W[$],H=Z[b],x=H&&H[0],F=H&&H[1];W[$]=F?{regex:x,parser:F}:b.replace(/^\[|\]$/g,"")}return function(S){for(var M={},k=0,Y=0;k<q;k+=1){var f=W[k];if(typeof f=="string")Y+=f.length;else{var h=f.regex,y=f.parser,m=S.slice(Y),E=h.exec(m)[0];y.call(M,E),S=S.replace(E,"")}}return function(u){var l=u.afternoon;if(l!==void 0){var c=u.hours;l?c<12&&(u.hours+=12):c===12&&(u.hours=0),delete u.afternoon}}(M),M}}return function(C,I,P){P.p.customParseFormat=!0,C&&C.parseTwoDigitYear&&(T=C.parseTwoDigitYear);var W=I.prototype,q=W.parse;W.parse=function($){var b=$.date,H=$.utc,x=$.args;this.$u=H;var F=x[1];if(typeof F=="string"){var S=x[2]===!0,M=x[3]===!0,k=S||M,Y=x[2];M&&(Y=x[2]),D=this.$locale(),!S&&Y&&(D=P.Ls[Y]),this.$d=function(m,E,u,l){try{if(["x","X"].indexOf(E)>-1)return new Date((E==="X"?1e3:1)*m);var c=O(E)(m),R=c.year,V=c.month,z=c.day,K=c.hours,X=c.minutes,Q=c.seconds,ae=c.milliseconds,v=c.zone,L=c.week,N=new Date,d=z||(R||V?1:N.getDate()),J=R||N.getFullYear(),A=0;R&&!V||(A=V>0?V-1:N.getMonth());var G,B=K||0,re=X||0,ie=Q||0,ke=ae||0;return v?new Date(Date.UTC(J,A,d,B,re,ie,ke+60*v.offset*1e3)):u?new Date(Date.UTC(J,A,d,B,re,ie,ke)):(G=new Date(J,A,d,B,re,ie,ke),L&&(G=l(G).week(L).toDate()),G)}catch{return new Date("")}}(b,F,H,P),this.init(),Y&&Y!==!0&&(this.$L=this.locale(Y).$L),k&&b!=this.format(F)&&(this.$d=new Date("")),D={}}else if(F instanceof Array)for(var f=F.length,h=1;h<=f;h+=1){x[1]=F[h-1];var y=P.apply(this,x);if(y.isValid()){this.$d=y.$d,this.$L=y.$L,this.init();break}h===f&&(this.$d=new Date(""))}else q.call(this,$)}}})}(Ze)),Ze.exports}var ua=ca();const la=i.getDefaultExportFromCjs(ua);var Xe={exports:{}},fa=Xe.exports,Bt;function da(){return Bt||(Bt=1,function(e,t){(function(n,r){e.exports=r()})(fa,function(){return function(n,r){var a=r.prototype,s=a.format;a.format=function(o){var p=this,D=this.$locale();if(!this.isValid())return s.bind(this)(o);var T=this.$utils(),g=(o||"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(U){switch(U){case"Q":return Math.ceil((p.$M+1)/3);case"Do":return D.ordinal(p.$D);case"gggg":return p.weekYear();case"GGGG":return p.isoWeekYear();case"wo":return D.ordinal(p.week(),"W");case"w":case"ww":return T.s(p.week(),U==="w"?1:2,"0");case"W":case"WW":return T.s(p.isoWeek(),U==="W"?1:2,"0");case"k":case"kk":return T.s(String(p.$H===0?24:p.$H),U==="k"?1:2,"0");case"X":return Math.floor(p.$d.getTime()/1e3);case"x":return p.$d.getTime();case"z":return"["+p.offsetName()+"]";case"zzz":return"["+p.offsetName("long")+"]";default:return U}});return s.bind(this)(g)}}})}(Xe)),Xe.exports}var ha=da();const ma=i.getDefaultExportFromCjs(ha);var gt=function(){var e=i.__name(function(Y,f,h,y){for(h=h||{},y=Y.length;y--;h[Y[y]]=f);return h},"o"),t=[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],n=[1,26],r=[1,27],a=[1,28],s=[1,29],o=[1,30],p=[1,31],D=[1,32],T=[1,33],g=[1,34],U=[1,9],w=[1,10],_=[1,11],Z=[1,12],O=[1,13],C=[1,14],I=[1,15],P=[1,16],W=[1,19],q=[1,20],$=[1,21],b=[1,22],H=[1,23],x=[1,25],F=[1,35],S={trace:i.__name(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:i.__name(function(f,h,y,m,E,u,l){var c=u.length-1;switch(E){case 1:return u[c-1];case 2:this.$=[];break;case 3:u[c-1].push(u[c]),this.$=u[c-1];break;case 4:case 5:this.$=u[c];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(u[c].substr(11)),this.$=u[c].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=u[c].substr(18);break;case 19:m.TopAxis(),this.$=u[c].substr(8);break;case 20:m.setAxisFormat(u[c].substr(11)),this.$=u[c].substr(11);break;case 21:m.setTickInterval(u[c].substr(13)),this.$=u[c].substr(13);break;case 22:m.setExcludes(u[c].substr(9)),this.$=u[c].substr(9);break;case 23:m.setIncludes(u[c].substr(9)),this.$=u[c].substr(9);break;case 24:m.setTodayMarker(u[c].substr(12)),this.$=u[c].substr(12);break;case 27:m.setDiagramTitle(u[c].substr(6)),this.$=u[c].substr(6);break;case 28:this.$=u[c].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=u[c].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(u[c].substr(8)),this.$=u[c].substr(8);break;case 33:m.addTask(u[c-1],u[c]),this.$="task";break;case 34:this.$=u[c-1],m.setClickEvent(u[c-1],u[c],null);break;case 35:this.$=u[c-2],m.setClickEvent(u[c-2],u[c-1],u[c]);break;case 36:this.$=u[c-2],m.setClickEvent(u[c-2],u[c-1],null),m.setLink(u[c-2],u[c]);break;case 37:this.$=u[c-3],m.setClickEvent(u[c-3],u[c-2],u[c-1]),m.setLink(u[c-3],u[c]);break;case 38:this.$=u[c-2],m.setClickEvent(u[c-2],u[c],null),m.setLink(u[c-2],u[c-1]);break;case 39:this.$=u[c-3],m.setClickEvent(u[c-3],u[c-1],u[c]),m.setLink(u[c-3],u[c-2]);break;case 40:this.$=u[c-1],m.setLink(u[c-1],u[c]);break;case 41:case 47:this.$=u[c-1]+" "+u[c];break;case 42:case 43:case 45:this.$=u[c-2]+" "+u[c-1]+" "+u[c];break;case 44:case 46:this.$=u[c-3]+" "+u[c-2]+" "+u[c-1]+" "+u[c];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:a,15:s,16:o,17:p,18:D,19:18,20:T,21:g,22:U,23:w,24:_,25:Z,26:O,27:C,28:I,29:P,30:W,31:q,33:$,35:b,36:H,37:24,38:x,40:F},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:36,11:17,12:n,13:r,14:a,15:s,16:o,17:p,18:D,19:18,20:T,21:g,22:U,23:w,24:_,25:Z,26:O,27:C,28:I,29:P,30:W,31:q,33:$,35:b,36:H,37:24,38:x,40:F},e(t,[2,5]),e(t,[2,6]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,20]),e(t,[2,21]),e(t,[2,22]),e(t,[2,23]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),e(t,[2,27]),{32:[1,37]},{34:[1,38]},e(t,[2,30]),e(t,[2,31]),e(t,[2,32]),{39:[1,39]},e(t,[2,8]),e(t,[2,9]),e(t,[2,10]),e(t,[2,11]),e(t,[2,12]),e(t,[2,13]),e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),{41:[1,40],43:[1,41]},e(t,[2,4]),e(t,[2,28]),e(t,[2,29]),e(t,[2,33]),e(t,[2,34],{42:[1,42],43:[1,43]}),e(t,[2,40],{41:[1,44]}),e(t,[2,35],{43:[1,45]}),e(t,[2,36]),e(t,[2,38],{42:[1,46]}),e(t,[2,37]),e(t,[2,39])],defaultActions:{},parseError:i.__name(function(f,h){if(h.recoverable)this.trace(f);else{var y=new Error(f);throw y.hash=h,y}},"parseError"),parse:i.__name(function(f){var h=this,y=[0],m=[],E=[null],u=[],l=this.table,c="",R=0,V=0,z=2,K=1,X=u.slice.call(arguments,1),Q=Object.create(this.lexer),ae={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(ae.yy[v]=this.yy[v]);Q.setInput(f,ae.yy),ae.yy.lexer=Q,ae.yy.parser=this,typeof Q.yylloc>"u"&&(Q.yylloc={});var L=Q.yylloc;u.push(L);var N=Q.options&&Q.options.ranges;typeof ae.yy.parseError=="function"?this.parseError=ae.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function d(se){y.length=y.length-2*se,E.length=E.length-se,u.length=u.length-se}i.__name(d,"popStack");function J(){var se;return se=m.pop()||Q.lex()||K,typeof se!="number"&&(se instanceof Array&&(m=se,se=m.pop()),se=h.symbols_[se]||se),se}i.__name(J,"lex");for(var A,G,B,re,ie={},ke,ce,Ut,Re;;){if(G=y[y.length-1],this.defaultActions[G]?B=this.defaultActions[G]:((A===null||typeof A>"u")&&(A=J()),B=l[G]&&l[G][A]),typeof B>"u"||!B.length||!B[0]){var nt="";Re=[];for(ke in l[G])this.terminals_[ke]&&ke>z&&Re.push("'"+this.terminals_[ke]+"'");Q.showPosition?nt="Parse error on line "+(R+1)+`:
`+Q.showPosition()+`
Expecting `+Re.join(", ")+", got '"+(this.terminals_[A]||A)+"'":nt="Parse error on line "+(R+1)+": Unexpected "+(A==K?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(nt,{text:Q.match,token:this.terminals_[A]||A,line:Q.yylineno,loc:L,expected:Re})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+A);switch(B[0]){case 1:y.push(A),E.push(Q.yytext),u.push(Q.yylloc),y.push(B[1]),A=null,V=Q.yyleng,c=Q.yytext,R=Q.yylineno,L=Q.yylloc;break;case 2:if(ce=this.productions_[B[1]][1],ie.$=E[E.length-ce],ie._$={first_line:u[u.length-(ce||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(ce||1)].first_column,last_column:u[u.length-1].last_column},N&&(ie._$.range=[u[u.length-(ce||1)].range[0],u[u.length-1].range[1]]),re=this.performAction.apply(ie,[c,V,R,ae.yy,B[1],E,u].concat(X)),typeof re<"u")return re;ce&&(y=y.slice(0,-1*ce*2),E=E.slice(0,-1*ce),u=u.slice(0,-1*ce)),y.push(this.productions_[B[1]][0]),E.push(ie.$),u.push(ie._$),Ut=l[y[y.length-2]][y[y.length-1]],y.push(Ut);break;case 3:return!0}}return!0},"parse")},M=function(){var Y={EOF:1,parseError:i.__name(function(h,y){if(this.yy.parser)this.yy.parser.parseError(h,y);else throw new Error(h)},"parseError"),setInput:i.__name(function(f,h){return this.yy=h||this.yy||{},this._input=f,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:i.__name(function(){var f=this._input[0];this.yytext+=f,this.yyleng++,this.offset++,this.match+=f,this.matched+=f;var h=f.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),f},"input"),unput:i.__name(function(f){var h=f.length,y=f.split(/(?:\r\n?|\n)/g);this._input=f+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var m=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),y.length-1&&(this.yylineno-=y.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:y?(y.length===m.length?this.yylloc.first_column:0)+m[m.length-y.length].length-y[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:i.__name(function(){return this._more=!0,this},"more"),reject:i.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:i.__name(function(f){this.unput(this.match.slice(f))},"less"),pastInput:i.__name(function(){var f=this.matched.substr(0,this.matched.length-this.match.length);return(f.length>20?"...":"")+f.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:i.__name(function(){var f=this.match;return f.length<20&&(f+=this._input.substr(0,20-f.length)),(f.substr(0,20)+(f.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:i.__name(function(){var f=this.pastInput(),h=new Array(f.length+1).join("-");return f+this.upcomingInput()+`
`+h+"^"},"showPosition"),test_match:i.__name(function(f,h){var y,m,E;if(this.options.backtrack_lexer&&(E={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(E.yylloc.range=this.yylloc.range.slice(0))),m=f[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+f[0].length},this.yytext+=f[0],this.match+=f[0],this.matches=f,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(f[0].length),this.matched+=f[0],y=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var u in E)this[u]=E[u];return!1}return!1},"test_match"),next:i.__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var f,h,y,m;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),u=0;u<E.length;u++)if(y=this._input.match(this.rules[E[u]]),y&&(!h||y[0].length>h[0].length)){if(h=y,m=u,this.options.backtrack_lexer){if(f=this.test_match(y,E[u]),f!==!1)return f;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(f=this.test_match(h,E[m]),f!==!1?f:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:i.__name(function(){var h=this.next();return h||this.lex()},"lex"),begin:i.__name(function(h){this.conditionStack.push(h)},"begin"),popState:i.__name(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:i.__name(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:i.__name(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:i.__name(function(h){this.begin(h)},"pushState"),stateStackSize:i.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:i.__name(function(h,y,m,E){switch(m){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 Y}();S.lexer=M;function k(){this.yy={}}return i.__name(k,"Parser"),k.prototype=S,S.Parser=k,new k}();gt.parser=gt;var ga=gt;i.dayjs2.extend(sa);i.dayjs2.extend(la);i.dayjs2.extend(ma);var Zt={friday:5,saturday:6},ue="",_t="",xt=void 0,bt="",Pe=[],Ve=[],wt=new Map,Ct=[],et=[],Ue="",Dt="",gn=["active","done","crit","milestone","vert"],Mt=[],ze=!1,St=!1,Ft="sunday",tt="saturday",yt=0,ya=i.__name(function(){Ct=[],et=[],Ue="",Mt=[],Ge=0,pt=void 0,$e=void 0,ee=[],ue="",_t="",Dt="",xt=void 0,bt="",Pe=[],Ve=[],ze=!1,St=!1,yt=0,wt=new Map,i.clear(),Ft="sunday",tt="saturday"},"clear"),ka=i.__name(function(e){_t=e},"setAxisFormat"),pa=i.__name(function(){return _t},"getAxisFormat"),va=i.__name(function(e){xt=e},"setTickInterval"),Ta=i.__name(function(){return xt},"getTickInterval"),_a=i.__name(function(e){bt=e},"setTodayMarker"),xa=i.__name(function(){return bt},"getTodayMarker"),ba=i.__name(function(e){ue=e},"setDateFormat"),wa=i.__name(function(){ze=!0},"enableInclusiveEndDates"),Ca=i.__name(function(){return ze},"endDatesAreInclusive"),Da=i.__name(function(){St=!0},"enableTopAxis"),Ma=i.__name(function(){return St},"topAxisEnabled"),Sa=i.__name(function(e){Dt=e},"setDisplayMode"),Fa=i.__name(function(){return Dt},"getDisplayMode"),Ya=i.__name(function(){return ue},"getDateFormat"),Ua=i.__name(function(e){Pe=e.toLowerCase().split(/[\s,]+/)},"setIncludes"),Ea=i.__name(function(){return Pe},"getIncludes"),Aa=i.__name(function(e){Ve=e.toLowerCase().split(/[\s,]+/)},"setExcludes"),La=i.__name(function(){return Ve},"getExcludes"),Ia=i.__name(function(){return wt},"getLinks"),Wa=i.__name(function(e){Ue=e,Ct.push(e)},"addSection"),Oa=i.__name(function(){return Ct},"getSections"),Ha=i.__name(function(){let e=Xt();const t=10;let n=0;for(;!e&&n<t;)e=Xt(),n++;return et=ee,et},"getTasks"),yn=i.__name(function(e,t,n,r){return r.includes(e.format(t.trim()))?!1:n.includes("weekends")&&(e.isoWeekday()===Zt[tt]||e.isoWeekday()===Zt[tt]+1)||n.includes(e.format("dddd").toLowerCase())?!0:n.includes(e.format(t.trim()))},"isInvalidDate"),Na=i.__name(function(e){Ft=e},"setWeekday"),Pa=i.__name(function(){return Ft},"getWeekday"),Va=i.__name(function(e){tt=e},"setWeekend"),kn=i.__name(function(e,t,n,r){if(!n.length||e.manualEndTime)return;let a;e.startTime instanceof Date?a=i.dayjs2(e.startTime):a=i.dayjs2(e.startTime,t,!0),a=a.add(1,"d");let s;e.endTime instanceof Date?s=i.dayjs2(e.endTime):s=i.dayjs2(e.endTime,t,!0);const[o,p]=za(a,s,t,n,r);e.endTime=o.toDate(),e.renderEndTime=p},"checkTaskDates"),za=i.__name(function(e,t,n,r,a){let s=!1,o=null;for(;e<=t;)s||(o=t.toDate()),s=yn(e,n,r,a),s&&(t=t.add(1,"d")),e=e.add(1,"d");return[t,o]},"fixTaskDates"),kt=i.__name(function(e,t,n){n=n.trim();const a=/^after\s+(?<ids>[\d\w- ]+)/.exec(n);if(a!==null){let o=null;for(const D of a.groups.ids.split(" ")){let T=we(D);T!==void 0&&(!o||T.endTime>o.endTime)&&(o=T)}if(o)return o.endTime;const p=new Date;return p.setHours(0,0,0,0),p}let s=i.dayjs2(n,t.trim(),!0);if(s.isValid())return s.toDate();{i.log.debug("Invalid date:"+n),i.log.debug("With date format:"+t.trim());const o=new Date(n);if(o===void 0||isNaN(o.getTime())||o.getFullYear()<-1e4||o.getFullYear()>1e4)throw new Error("Invalid date:"+n);return o}},"getStartDate"),pn=i.__name(function(e){const t=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim());return t!==null?[Number.parseFloat(t[1]),t[2]]:[NaN,"ms"]},"parseDuration"),vn=i.__name(function(e,t,n,r=!1){n=n.trim();const s=/^until\s+(?<ids>[\d\w- ]+)/.exec(n);if(s!==null){let g=null;for(const w of s.groups.ids.split(" ")){let _=we(w);_!==void 0&&(!g||_.startTime<g.startTime)&&(g=_)}if(g)return g.startTime;const U=new Date;return U.setHours(0,0,0,0),U}let o=i.dayjs2(n,t.trim(),!0);if(o.isValid())return r&&(o=o.add(1,"d")),o.toDate();let p=i.dayjs2(e);const[D,T]=pn(n);if(!Number.isNaN(D)){const g=p.add(D,T);g.isValid()&&(p=g)}return p.toDate()},"getEndDate"),Ge=0,Se=i.__name(function(e){return e===void 0?(Ge=Ge+1,"task"+Ge):e},"parseId"),Ra=i.__name(function(e,t){let n;t.substr(0,1)===":"?n=t.substr(1,t.length):n=t;const r=n.split(","),a={};Yt(r,a,gn);for(let o=0;o<r.length;o++)r[o]=r[o].trim();let s="";switch(r.length){case 1:a.id=Se(),a.startTime=e.endTime,s=r[0];break;case 2:a.id=Se(),a.startTime=kt(void 0,ue,r[0]),s=r[1];break;case 3:a.id=Se(r[0]),a.startTime=kt(void 0,ue,r[1]),s=r[2];break}return s&&(a.endTime=vn(a.startTime,ue,s,ze),a.manualEndTime=i.dayjs2(s,"YYYY-MM-DD",!0).isValid(),kn(a,ue,Ve,Pe)),a},"compileData"),ja=i.__name(function(e,t){let n;t.substr(0,1)===":"?n=t.substr(1,t.length):n=t;const r=n.split(","),a={};Yt(r,a,gn);for(let s=0;s<r.length;s++)r[s]=r[s].trim();switch(r.length){case 1:a.id=Se(),a.startTime={type:"prevTaskEnd",id:e},a.endTime={data:r[0]};break;case 2:a.id=Se(),a.startTime={type:"getStartDate",startData:r[0]},a.endTime={data:r[1]};break;case 3:a.id=Se(r[0]),a.startTime={type:"getStartDate",startData:r[1]},a.endTime={data:r[2]};break}return a},"parseData"),pt,$e,ee=[],Tn={},qa=i.__name(function(e,t){const n={section:Ue,type:Ue,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:t},task:e,classes:[]},r=ja($e,t);n.raw.startTime=r.startTime,n.raw.endTime=r.endTime,n.id=r.id,n.prevTaskId=$e,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.vert=r.vert,n.order=yt,yt++;const a=ee.push(n);$e=n.id,Tn[n.id]=a-1},"addTask"),we=i.__name(function(e){const t=Tn[e];return ee[t]},"findTaskById"),Ba=i.__name(function(e,t){const n={section:Ue,type:Ue,description:e,task:e,classes:[]},r=Ra(pt,t);n.startTime=r.startTime,n.endTime=r.endTime,n.id=r.id,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.vert=r.vert,pt=n,et.push(n)},"addTaskOrg"),Xt=i.__name(function(){const e=i.__name(function(n){const r=ee[n];let a="";switch(ee[n].raw.startTime.type){case"prevTaskEnd":{const s=we(r.prevTaskId);r.startTime=s.endTime;break}case"getStartDate":a=kt(void 0,ue,ee[n].raw.startTime.startData),a&&(ee[n].startTime=a);break}return ee[n].startTime&&(ee[n].endTime=vn(ee[n].startTime,ue,ee[n].raw.endTime.data,ze),ee[n].endTime&&(ee[n].processed=!0,ee[n].manualEndTime=i.dayjs2(ee[n].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),kn(ee[n],ue,Ve,Pe))),ee[n].processed},"compileTask");let t=!0;for(const[n,r]of ee.entries())e(n),t=t&&r.processed;return t},"compileTasks"),Za=i.__name(function(e,t){let n=t;i.getConfig2().securityLevel!=="loose"&&(n=i.distExports.sanitizeUrl(t)),e.split(",").forEach(function(r){we(r)!==void 0&&(xn(r,()=>{window.open(n,"_self")}),wt.set(r,n))}),_n(e,"clickable")},"setLink"),_n=i.__name(function(e,t){e.split(",").forEach(function(n){let r=we(n);r!==void 0&&r.classes.push(t)})},"setClass"),Xa=i.__name(function(e,t,n){if(i.getConfig2().securityLevel!=="loose"||t===void 0)return;let r=[];if(typeof n=="string"){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let s=0;s<r.length;s++){let o=r[s].trim();o.startsWith('"')&&o.endsWith('"')&&(o=o.substr(1,o.length-2)),r[s]=o}}r.length===0&&r.push(e),we(e)!==void 0&&xn(e,()=>{i.utils_default.runFunc(t,...r)})},"setClickFun"),xn=i.__name(function(e,t){Mt.push(function(){const n=document.querySelector(`[id="${e}"]`);n!==null&&n.addEventListener("click",function(){t()})},function(){const n=document.querySelector(`[id="${e}-text"]`);n!==null&&n.addEventListener("click",function(){t()})})},"pushFun"),Ga=i.__name(function(e,t,n){e.split(",").forEach(function(r){Xa(r,t,n)}),_n(e,"clickable")},"setClickEvent"),$a=i.__name(function(e){Mt.forEach(function(t){t(e)})},"bindFunctions"),Qa={getConfig:i.__name(()=>i.getConfig2().gantt,"getConfig"),clear:ya,setDateFormat:ba,getDateFormat:Ya,enableInclusiveEndDates:wa,endDatesAreInclusive:Ca,enableTopAxis:Da,topAxisEnabled:Ma,setAxisFormat:ka,getAxisFormat:pa,setTickInterval:va,getTickInterval:Ta,setTodayMarker:_a,getTodayMarker:xa,setAccTitle:i.setAccTitle,getAccTitle:i.getAccTitle,setDiagramTitle:i.setDiagramTitle,getDiagramTitle:i.getDiagramTitle,setDisplayMode:Sa,getDisplayMode:Fa,setAccDescription:i.setAccDescription,getAccDescription:i.getAccDescription,addSection:Wa,getSections:Oa,getTasks:Ha,addTask:qa,findTaskById:we,addTaskOrg:Ba,setIncludes:Ua,getIncludes:Ea,setExcludes:Aa,getExcludes:La,setClickEvent:Ga,setLink:Za,getLinks:Ia,bindFunctions:$a,parseDuration:pn,isInvalidDate:yn,setWeekday:Na,getWeekday:Pa,setWeekend:Va};function Yt(e,t,n){let r=!0;for(;r;)r=!1,n.forEach(function(a){const s="^\\s*"+a+"\\s*$",o=new RegExp(s);e[0].match(o)&&(t[a]=!0,e.shift(1),r=!0)})}i.__name(Yt,"getTaskTags");var Ja=i.__name(function(){i.log.debug("Something is calling, setConf, remove the call")},"setConf"),Gt={monday:Oe,tuesday:an,wednesday:sn,thursday:Te,friday:on,saturday:cn,sunday:Ne},Ka=i.__name((e,t)=>{let n=[...e].map(()=>-1/0),r=[...e].sort((s,o)=>s.startTime-o.startTime||s.order-o.order),a=0;for(const s of r)for(let o=0;o<n.length;o++)if(s.startTime>=n[o]){n[o]=s.endTime,s.order=o+t,o>a&&(a=o);break}return a},"getMaxIntersections"),fe,ei=i.__name(function(e,t,n,r){const a=i.getConfig2().gantt,s=i.getConfig2().securityLevel;let o;s==="sandbox"&&(o=i.select("#i"+t));const p=s==="sandbox"?i.select(o.nodes()[0].contentDocument.body):i.select("body"),D=s==="sandbox"?o.nodes()[0].contentDocument:document,T=D.getElementById(t);fe=T.parentElement.offsetWidth,fe===void 0&&(fe=1200),a.useWidth!==void 0&&(fe=a.useWidth);const g=r.db.getTasks();let U=[];for(const x of g)U.push(x.type);U=H(U);const w={};let _=2*a.topPadding;if(r.db.getDisplayMode()==="compact"||a.displayMode==="compact"){const x={};for(const S of g)x[S.section]===void 0?x[S.section]=[S]:x[S.section].push(S);let F=0;for(const S of Object.keys(x)){const M=Ka(x[S],F)+1;F+=M,_+=M*(a.barHeight+a.barGap),w[S]=M}}else{_+=g.length*(a.barHeight+a.barGap);for(const x of U)w[x]=g.filter(F=>F.type===x).length}T.setAttribute("viewBox","0 0 "+fe+" "+_);const Z=p.select(`[id="${t}"]`),O=na().domain([Cn(g,function(x){return x.startTime}),wn(g,function(x){return x.endTime})]).rangeRound([0,fe-a.leftPadding-a.rightPadding]);function C(x,F){const S=x.startTime,M=F.startTime;let k=0;return S>M?k=1:S<M&&(k=-1),k}i.__name(C,"taskCompare"),g.sort(C),I(g,fe,_),i.configureSvgSize(Z,_,fe,a.useMaxWidth),Z.append("text").text(r.db.getDiagramTitle()).attr("x",fe/2).attr("y",a.titleTopMargin).attr("class","titleText");function I(x,F,S){const M=a.barHeight,k=M+a.barGap,Y=a.topPadding,f=a.leftPadding,h=De.linear().domain([0,U.length]).range(["#00B9FA","#F95002"]).interpolate(Pn);W(k,Y,f,F,S,x,r.db.getExcludes(),r.db.getIncludes()),q(f,Y,F,S),P(x,k,Y,f,M,h,F),$(k,Y),b(f,Y,F,S)}i.__name(I,"makeGantt");function P(x,F,S,M,k,Y,f){x.sort((l,c)=>l.vert===c.vert?0:l.vert?1:-1);const y=[...new Set(x.map(l=>l.order))].map(l=>x.find(c=>c.order===l));Z.append("g").selectAll("rect").data(y).enter().append("rect").attr("x",0).attr("y",function(l,c){return c=l.order,c*F+S-2}).attr("width",function(){return f-a.rightPadding/2}).attr("height",F).attr("class",function(l){for(const[c,R]of U.entries())if(l.type===R)return"section section"+c%a.numberSectionStyles;return"section section0"}).enter();const m=Z.append("g").selectAll("rect").data(x).enter(),E=r.db.getLinks();if(m.append("rect").attr("id",function(l){return l.id}).attr("rx",3).attr("ry",3).attr("x",function(l){return l.milestone?O(l.startTime)+M+.5*(O(l.endTime)-O(l.startTime))-.5*k:O(l.startTime)+M}).attr("y",function(l,c){return c=l.order,l.vert?a.gridLineStartPadding:c*F+S}).attr("width",function(l){return l.milestone?k:l.vert?.08*k:O(l.renderEndTime||l.endTime)-O(l.startTime)}).attr("height",function(l){return l.vert?g.length*(a.barHeight+a.barGap)+a.barHeight*2:k}).attr("transform-origin",function(l,c){return c=l.order,(O(l.startTime)+M+.5*(O(l.endTime)-O(l.startTime))).toString()+"px "+(c*F+S+.5*k).toString()+"px"}).attr("class",function(l){const c="task";let R="";l.classes.length>0&&(R=l.classes.join(" "));let V=0;for(const[K,X]of U.entries())l.type===X&&(V=K%a.numberSectionStyles);let z="";return l.active?l.crit?z+=" activeCrit":z=" active":l.done?l.crit?z=" doneCrit":z=" done":l.crit&&(z+=" crit"),z.length===0&&(z=" task"),l.milestone&&(z=" milestone "+z),l.vert&&(z=" vert "+z),z+=V,z+=" "+R,c+z}),m.append("text").attr("id",function(l){return l.id+"-text"}).text(function(l){return l.task}).attr("font-size",a.fontSize).attr("x",function(l){let c=O(l.startTime),R=O(l.renderEndTime||l.endTime);if(l.milestone&&(c+=.5*(O(l.endTime)-O(l.startTime))-.5*k,R=c+k),l.vert)return O(l.startTime)+M;const V=this.getBBox().width;return V>R-c?R+V+1.5*a.leftPadding>f?c+M-5:R+M+5:(R-c)/2+c+M}).attr("y",function(l,c){return l.vert?a.gridLineStartPadding+g.length*(a.barHeight+a.barGap)+60:(c=l.order,c*F+a.barHeight/2+(a.fontSize/2-2)+S)}).attr("text-height",k).attr("class",function(l){const c=O(l.startTime);let R=O(l.endTime);l.milestone&&(R=c+k);const V=this.getBBox().width;let z="";l.classes.length>0&&(z=l.classes.join(" "));let K=0;for(const[Q,ae]of U.entries())l.type===ae&&(K=Q%a.numberSectionStyles);let X="";return l.active&&(l.crit?X="activeCritText"+K:X="activeText"+K),l.done?l.crit?X=X+" doneCritText"+K:X=X+" doneText"+K:l.crit&&(X=X+" critText"+K),l.milestone&&(X+=" milestoneText"),l.vert&&(X+=" vertText"),V>R-c?R+V+1.5*a.leftPadding>f?z+" taskTextOutsideLeft taskTextOutside"+K+" "+X:z+" taskTextOutsideRight taskTextOutside"+K+" "+X+" width-"+V:z+" taskText taskText"+K+" "+X+" width-"+V}),i.getConfig2().securityLevel==="sandbox"){let l;l=i.select("#i"+t);const c=l.nodes()[0].contentDocument;m.filter(function(R){return E.has(R.id)}).each(function(R){var V=c.querySelector("#"+R.id),z=c.querySelector("#"+R.id+"-text");const K=V.parentNode;var X=c.createElement("a");X.setAttribute("xlink:href",E.get(R.id)),X.setAttribute("target","_top"),K.appendChild(X),X.appendChild(V),X.appendChild(z)})}}i.__name(P,"drawRects");function W(x,F,S,M,k,Y,f,h){if(f.length===0&&h.length===0)return;let y,m;for(const{startTime:V,endTime:z}of Y)(y===void 0||V<y)&&(y=V),(m===void 0||z>m)&&(m=z);if(!y||!m)return;if(i.dayjs2(m).diff(i.dayjs2(y),"year")>5){i.log.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 E=r.db.getDateFormat(),u=[];let l=null,c=i.dayjs2(y);for(;c.valueOf()<=m;)r.db.isInvalidDate(c,E,f,h)?l?l.end=c:l={start:c,end:c}:l&&(u.push(l),l=null),c=c.add(1,"d");Z.append("g").selectAll("rect").data(u).enter().append("rect").attr("id",function(V){return"exclude-"+V.start.format("YYYY-MM-DD")}).attr("x",function(V){return O(V.start)+S}).attr("y",a.gridLineStartPadding).attr("width",function(V){const z=V.end.add(1,"day");return O(z)-O(V.start)}).attr("height",k-F-a.gridLineStartPadding).attr("transform-origin",function(V,z){return(O(V.start)+S+.5*(O(V.end)-O(V.start))).toString()+"px "+(z*x+.5*k).toString()+"px"}).attr("class","exclude-range")}i.__name(W,"drawExcludeDays");function q(x,F,S,M){let k=An(O).tickSize(-M+F+a.gridLineStartPadding).tickFormat(Ke(r.db.getAxisFormat()||a.axisFormat||"%Y-%m-%d"));const f=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||a.tickInterval);if(f!==null){const h=f[1],y=f[2],m=r.db.getWeekday()||a.weekday;switch(y){case"millisecond":k.ticks(Fe.every(h));break;case"second":k.ticks(pe.every(h));break;case"minute":k.ticks(Ie.every(h));break;case"hour":k.ticks(We.every(h));break;case"day":k.ticks(ve.every(h));break;case"week":k.ticks(Gt[m].every(h));break;case"month":k.ticks(He.every(h));break}}if(Z.append("g").attr("class","grid").attr("transform","translate("+x+", "+(M-50)+")").call(k).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),r.db.topAxisEnabled()||a.topAxis){let h=En(O).tickSize(-M+F+a.gridLineStartPadding).tickFormat(Ke(r.db.getAxisFormat()||a.axisFormat||"%Y-%m-%d"));if(f!==null){const y=f[1],m=f[2],E=r.db.getWeekday()||a.weekday;switch(m){case"millisecond":h.ticks(Fe.every(y));break;case"second":h.ticks(pe.every(y));break;case"minute":h.ticks(Ie.every(y));break;case"hour":h.ticks(We.every(y));break;case"day":h.ticks(ve.every(y));break;case"week":h.ticks(Gt[E].every(y));break;case"month":h.ticks(He.every(y));break}}Z.append("g").attr("class","grid").attr("transform","translate("+x+", "+F+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}i.__name(q,"makeGrid");function $(x,F){let S=0;const M=Object.keys(w).map(k=>[k,w[k]]);Z.append("g").selectAll("text").data(M).enter().append(function(k){const Y=k[0].split(i.common_default.lineBreakRegex),f=-(Y.length-1)/2,h=D.createElementNS("http://www.w3.org/2000/svg","text");h.setAttribute("dy",f+"em");for(const[y,m]of Y.entries()){const E=D.createElementNS("http://www.w3.org/2000/svg","tspan");E.setAttribute("alignment-baseline","central"),E.setAttribute("x","10"),y>0&&E.setAttribute("dy","1em"),E.textContent=m,h.appendChild(E)}return h}).attr("x",10).attr("y",function(k,Y){if(Y>0)for(let f=0;f<Y;f++)return S+=M[Y-1][1],k[1]*x/2+S*x+F;else return k[1]*x/2+F}).attr("font-size",a.sectionFontSize).attr("class",function(k){for(const[Y,f]of U.entries())if(k[0]===f)return"sectionTitle sectionTitle"+Y%a.numberSectionStyles;return"sectionTitle"})}i.__name($,"vertLabels");function b(x,F,S,M){const k=r.db.getTodayMarker();if(k==="off")return;const Y=Z.append("g").attr("class","today"),f=new Date,h=Y.append("line");h.attr("x1",O(f)+x).attr("x2",O(f)+x).attr("y1",a.titleTopMargin).attr("y2",M-a.titleTopMargin).attr("class","today"),k!==""&&h.attr("style",k.replace(/,/g,";"))}i.__name(b,"drawToday");function H(x){const F={},S=[];for(let M=0,k=x.length;M<k;++M)Object.prototype.hasOwnProperty.call(F,x[M])||(F[x[M]]=!0,S.push(x[M]));return S}i.__name(H,"checkUnique")},"draw"),ti={setConf:Ja,draw:ei},ni=i.__name(e=>`
.mermaid-main-font {
font-family: ${e.fontFamily};
}
.exclude-range {
fill: ${e.excludeBkgColor};
}
.section {
stroke: none;
opacity: 0.2;
}
.section0 {
fill: ${e.sectionBkgColor};
}
.section2 {
fill: ${e.sectionBkgColor2};
}
.section1,
.section3 {
fill: ${e.altSectionBkgColor};
opacity: 0.2;
}
.sectionTitle0 {
fill: ${e.titleColor};
}
.sectionTitle1 {
fill: ${e.titleColor};
}
.sectionTitle2 {
fill: ${e.titleColor};
}
.sectionTitle3 {
fill: ${e.titleColor};
}
.sectionTitle {
text-anchor: start;
font-family: ${e.fontFamily};
}
/* Grid and axis */
.grid .tick {
stroke: ${e.gridColor};
opacity: 0.8;
shape-rendering: crispEdges;
}
.grid .tick text {
font-family: ${e.fontFamily};
fill: ${e.textColor};
}
.grid path {
stroke-width: 0;
}
/* Today line */
.today {
fill: none;
stroke: ${e.todayLineColor};
stroke-width: 2px;
}
/* Task styling */
/* Default task */
.task {
stroke-width: 2;
}
.taskText {
text-anchor: middle;
font-family: ${e.fontFamily};
}
.taskTextOutsideRight {
fill: ${e.taskTextDarkColor};
text-anchor: start;
font-family: ${e.fontFamily};
}
.taskTextOutsideLeft {
fill: ${e.taskTextDarkColor};
text-anchor: end;
}
/* Special case clickable */
.task.clickable {
cursor: pointer;
}
.taskText.clickable {
cursor: pointer;
fill: ${e.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideLeft.clickable {
cursor: pointer;
fill: ${e.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideRight.clickable {
cursor: pointer;
fill: ${e.taskTextClickableColor} !important;
font-weight: bold;
}
/* Specific task settings for the sections*/
.taskText0,
.taskText1,
.taskText2,
.taskText3 {
fill: ${e.taskTextColor};
}
.task0,
.task1,
.task2,
.task3 {
fill: ${e.taskBkgColor};
stroke: ${e.taskBorderColor};
}
.taskTextOutside0,
.taskTextOutside2
{
fill: ${e.taskTextOutsideColor};
}
.taskTextOutside1,
.taskTextOutside3 {
fill: ${e.taskTextOutsideColor};
}
/* Active task */
.active0,
.active1,
.active2,
.active3 {
fill: ${e.activeTaskBkgColor};
stroke: ${e.activeTaskBorderColor};
}
.activeText0,
.activeText1,
.activeText2,
.activeText3 {
fill: ${e.taskTextDarkColor} !important;
}
/* Completed task */
.done0,
.done1,
.done2,
.done3 {
stroke: ${e.doneTaskBorderColor};
fill: ${e.doneTaskBkgColor};
stroke-width: 2;
}
.doneText0,
.doneText1,
.doneText2,
.doneText3 {
fill: ${e.taskTextDarkColor} !important;
}
/* Tasks on the critical line */
.crit0,
.crit1,
.crit2,
.crit3 {
stroke: ${e.critBorderColor};
fill: ${e.critBkgColor};
stroke-width: 2;
}
.activeCrit0,
.activeCrit1,
.activeCrit2,
.activeCrit3 {
stroke: ${e.critBorderColor};
fill: ${e.activeTaskBkgColor};
stroke-width: 2;
}
.doneCrit0,
.doneCrit1,
.doneCrit2,
.doneCrit3 {
stroke: ${e.critBorderColor};
fill: ${e.doneTaskBkgColor};
stroke-width: 2;
cursor: pointer;
shape-rendering: crispEdges;
}
.milestone {
transform: rotate(45deg) scale(0.8,0.8);
}
.milestoneText {
font-style: italic;
}
.doneCritText0,
.doneCritText1,
.doneCritText2,
.doneCritText3 {
fill: ${e.taskTextDarkColor} !important;
}
.vert {
stroke: ${e.vertLineColor};
}
.vertText {
font-size: 15px;
text-anchor: middle;
fill: ${e.vertLineColor} !important;
}
.activeCritText0,
.activeCritText1,
.activeCritText2,
.activeCritText3 {
fill: ${e.taskTextDarkColor} !important;
}
.titleText {
text-anchor: middle;
font-size: 18px;
fill: ${e.titleColor||e.textColor};
font-family: ${e.fontFamily};
}
`,"getStyles"),ri=ni,ai={parser:ga,db:Qa,renderer:ti,styles:ri};exports.diagram=ai;