hypnagaga/docs/assets/ganttDiagram-b62c793e-CUqctxko.js
github-actions[bot] 476ea4f88b docs
2024-09-24 06:46:00 +00:00

257 lines
58 KiB
JavaScript

import{ad as ze,ae as Re,af as Be,ag as Ze,ah as Cn,ai as $t,aj as Dn,c as wt,s as Mn,g as _n,p as Sn,q as Un,b as Yn,a as Fn,r as Ln,m as En,l as Xt,h as zt,i as An,j as In,u as Wn}from"./intro-DcDf2Rk3.js";import{d as nt}from"./dayjs.min-BIwLhz4I.js";import{c as qe,g as Xe}from"./_commonjsHelpers-BosuxZz1.js";import{d as On}from"./advancedFormat-D5cdT3Ux.js";import{b as Hn,t as _e,c as Nn,a as Vn,l as Pn}from"./linear-BtNEtQZd.js";import{i as zn}from"./init-Gi6I4Gst.js";import"./docsPage-CrCNk6vV.js";import"./index-DwChlhAQ.js";import"./index-D-8MO0q_.js";import"./index-CswL0fy2.js";import"./index-B9I9zz1X.js";import"./iframe-D4q2UGE4.js";import"../sb-preview/runtime.js";import"./index-DxKRhftL.js";import"./index-DrFu-skq.js";import"./_initCloneObject-D0ofMy5o.js";import"./isSymbol-Br3Fhm6g.js";import"./toString-DnxJX3Gz.js";import"./isObject-C3e4t58V.js";import"./Table-BwGjE9OL.js";import"./parseCss-Cvj3m43l.js";import"./index-CROxjmim.js";import"./_color-UiaLB_4F.js";function Rn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Bn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Zn(t){return t}var Bt=1,te=2,ue=3,Rt=4,Se=1e-6;function qn(t){return"translate("+t+",0)"}function Xn(t){return"translate(0,"+t+")"}function jn(t){return e=>+t(e)}function Qn(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function Gn(){return!this.__axis}function je(t,e){var n=[],r=null,i=null,s=6,a=6,v=3,Y=typeof window<"u"&&window.devicePixelRatio>1?0:.5,y=t===Bt||t===Rt?-1:1,w=t===Rt||t===te?"x":"y",F=t===Bt||t===ue?qn:Xn;function C(T){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),g=i??(e.tickFormat?e.tickFormat.apply(e,n):Zn),L=Math.max(s,0)+v,O=e.range(),W=+O[0]+Y,B=+O[O.length-1]+Y,Z=(e.bandwidth?Qn:jn)(e.copy(),Y),G=T.selection?T.selection():T,b=G.selectAll(".domain").data([null]),A=G.selectAll(".tick").data(X,e).order(),p=A.exit(),U=A.enter().append("g").attr("class","tick"),D=A.select("line"),x=A.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),A=A.merge(U),D=D.merge(U.append("line").attr("stroke","currentColor").attr(w+"2",y*s)),x=x.merge(U.append("text").attr("fill","currentColor").attr(w,y*L).attr("dy",t===Bt?"0em":t===ue?"0.71em":"0.32em")),T!==G&&(b=b.transition(T),A=A.transition(T),D=D.transition(T),x=x.transition(T),p=p.transition(T).attr("opacity",Se).attr("transform",function(o){return isFinite(o=Z(o))?F(o+Y):this.getAttribute("transform")}),U.attr("opacity",Se).attr("transform",function(o){var d=this.parentNode.__axis;return F((d&&isFinite(d=d(o))?d:Z(o))+Y)})),p.remove(),b.attr("d",t===Rt||t===te?a?"M"+y*a+","+W+"H"+Y+"V"+B+"H"+y*a:"M"+Y+","+W+"V"+B:a?"M"+W+","+y*a+"V"+Y+"H"+B+"V"+y*a:"M"+W+","+Y+"H"+B),A.attr("opacity",1).attr("transform",function(o){return F(Z(o)+Y)}),D.attr(w+"2",y*s),x.attr(w,y*L).text(g),G.filter(Gn).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===te?"start":t===Rt?"end":"middle"),G.each(function(){this.__axis=Z})}return C.scale=function(T){return arguments.length?(e=T,C):e},C.ticks=function(){return n=Array.from(arguments),C},C.tickArguments=function(T){return arguments.length?(n=T==null?[]:Array.from(T),C):n.slice()},C.tickValues=function(T){return arguments.length?(r=T==null?null:Array.from(T),C):r&&r.slice()},C.tickFormat=function(T){return arguments.length?(i=T,C):i},C.tickSize=function(T){return arguments.length?(s=a=+T,C):s},C.tickSizeInner=function(T){return arguments.length?(s=+T,C):s},C.tickSizeOuter=function(T){return arguments.length?(a=+T,C):a},C.tickPadding=function(T){return arguments.length?(v=+T,C):v},C.offset=function(T){return arguments.length?(Y=+T,C):Y},C}function Jn(t){return je(Bt,t)}function Kn(t){return je(ue,t)}const $n=Math.PI/180,tr=180/Math.PI,jt=18,Qe=.96422,Ge=1,Je=.82521,Ke=4/29,Ct=6/29,$e=3*Ct*Ct,er=Ct*Ct*Ct;function tn(t){if(t instanceof ot)return new ot(t.l,t.a,t.b,t.opacity);if(t instanceof ut)return en(t);t instanceof Be||(t=Cn(t));var e=ie(t.r),n=ie(t.g),r=ie(t.b),i=ee((.2225045*e+.7168786*n+.0606169*r)/Ge),s,a;return e===n&&n===r?s=a=i:(s=ee((.4360747*e+.3850649*n+.1430804*r)/Qe),a=ee((.0139322*e+.0971045*n+.7141733*r)/Je)),new ot(116*i-16,500*(s-i),200*(i-a),t.opacity)}function nr(t,e,n,r){return arguments.length===1?tn(t):new ot(t,e,n,r??1)}function ot(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}ze(ot,nr,Re(Ze,{brighter(t){return new ot(this.l+jt*(t??1),this.a,this.b,this.opacity)},darker(t){return new ot(this.l-jt*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=Qe*ne(e),t=Ge*ne(t),n=Je*ne(n),new Be(re(3.1338561*e-1.6168667*t-.4906146*n),re(-.9787684*e+1.9161415*t+.033454*n),re(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function ee(t){return t>er?Math.pow(t,1/3):t/$e+Ke}function ne(t){return t>Ct?t*t*t:$e*(t-Ke)}function re(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ie(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function rr(t){if(t instanceof ut)return new ut(t.h,t.c,t.l,t.opacity);if(t instanceof ot||(t=tn(t)),t.a===0&&t.b===0)return new ut(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*tr;return new ut(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function fe(t,e,n,r){return arguments.length===1?rr(t):new ut(t,e,n,r??1)}function ut(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function en(t){if(isNaN(t.h))return new ot(t.l,0,0,t.opacity);var e=t.h*$n;return new ot(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}ze(ut,fe,Re(Ze,{brighter(t){return new ut(this.h,this.c,this.l+jt*(t??1),this.opacity)},darker(t){return new ut(this.h,this.c,this.l-jt*(t??1),this.opacity)},rgb(){return en(this).rgb()}}));function ir(t){return function(e,n){var r=t((e=fe(e)).h,(n=fe(n)).h),i=$t(e.c,n.c),s=$t(e.l,n.l),a=$t(e.opacity,n.opacity);return function(v){return e.h=r(v),e.c=i(v),e.l=s(v),e.opacity=a(v),e+""}}}const sr=ir(Dn);function ar(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],s=t[r],a;return s<i&&(a=n,n=r,r=a,a=i,i=s,s=a),t[n]=e.floor(i),t[r]=e.ceil(s),t}const se=new Date,ae=new Date;function $(t,e,n,r){function i(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),v=i.ceil(s);return s-a<v-s?a:v},i.offset=(s,a)=>(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,v)=>{const Y=[];if(s=i.ceil(s),v=v==null?1:Math.floor(v),!(s<a)||!(v>0))return Y;let y;do Y.push(y=new Date(+s)),e(s,v),t(s);while(y<s&&s<a);return Y},i.filter=s=>$(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,v)=>{if(a>=a)if(v<0)for(;++v<=0;)for(;e(a,-1),!s(a););else for(;--v>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(se.setTime(+s),ae.setTime(+a),t(se),t(ae),Math.floor(n(se,ae))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Mt=$(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Mt.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?$(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Mt);Mt.range;const ft=1e3,rt=ft*60,ht=rt*60,dt=ht*24,ye=dt*7,Ue=dt*30,oe=dt*365,gt=$(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*ft)},(t,e)=>(e-t)/ft,t=>t.getUTCSeconds());gt.range;const Et=$(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ft)},(t,e)=>{t.setTime(+t+e*rt)},(t,e)=>(e-t)/rt,t=>t.getMinutes());Et.range;const or=$(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*rt)},(t,e)=>(e-t)/rt,t=>t.getUTCMinutes());or.range;const At=$(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ft-t.getMinutes()*rt)},(t,e)=>{t.setTime(+t+e*ht)},(t,e)=>(e-t)/ht,t=>t.getHours());At.range;const cr=$(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*ht)},(t,e)=>(e-t)/ht,t=>t.getUTCHours());cr.range;const yt=$(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*rt)/dt,t=>t.getDate()-1);yt.range;const ke=$(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/dt,t=>t.getUTCDate()-1);ke.range;const lr=$(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/dt,t=>Math.floor(t/dt));lr.range;function Tt(t){return $(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*rt)/ye)}const Ot=Tt(0),It=Tt(1),nn=Tt(2),rn=Tt(3),kt=Tt(4),sn=Tt(5),an=Tt(6);Ot.range;It.range;nn.range;rn.range;kt.range;sn.range;an.range;function vt(t){return $(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/ye)}const on=vt(0),Qt=vt(1),ur=vt(2),fr=vt(3),_t=vt(4),hr=vt(5),dr=vt(6);on.range;Qt.range;ur.range;fr.range;_t.range;hr.range;dr.range;const Wt=$(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Wt.range;const mr=$(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());mr.range;const mt=$(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());mt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:$(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});mt.range;const pt=$(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());pt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:$(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});pt.range;function gr(t,e,n,r,i,s){const a=[[gt,1,ft],[gt,5,5*ft],[gt,15,15*ft],[gt,30,30*ft],[s,1,rt],[s,5,5*rt],[s,15,15*rt],[s,30,30*rt],[i,1,ht],[i,3,3*ht],[i,6,6*ht],[i,12,12*ht],[r,1,dt],[r,2,2*dt],[n,1,ye],[e,1,Ue],[e,3,3*Ue],[t,1,oe]];function v(y,w,F){const C=w<y;C&&([y,w]=[w,y]);const T=F&&typeof F.range=="function"?F:Y(y,w,F),X=T?T.range(y,+w+1):[];return C?X.reverse():X}function Y(y,w,F){const C=Math.abs(w-y)/F,T=Hn(([,,L])=>L).right(a,C);if(T===a.length)return t.every(_e(y/oe,w/oe,F));if(T===0)return Mt.every(Math.max(_e(y,w,F),1));const[X,g]=a[C/a[T-1][2]<a[T][2]/C?T-1:T];return X.every(g)}return[v,Y]}const[yr,kr]=gr(mt,Wt,Ot,yt,At,Et);function ce(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function le(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Yt(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function pr(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,s=t.days,a=t.shortDays,v=t.months,Y=t.shortMonths,y=Ft(i),w=Lt(i),F=Ft(s),C=Lt(s),T=Ft(a),X=Lt(a),g=Ft(v),L=Lt(v),O=Ft(Y),W=Lt(Y),B={a:c,A:q,b:f,B:h,c:null,d:Ie,e:Ie,f:Pr,g:Jr,G:$r,H:Hr,I:Nr,j:Vr,L:cn,m:zr,M:Rr,p:S,q:j,Q:He,s:Ne,S:Br,u:Zr,U:qr,V:Xr,w:jr,W:Qr,x:null,X:null,y:Gr,Y:Kr,Z:ti,"%":Oe},Z={a:H,A:V,b:I,B:P,c:null,d:We,e:We,f:ii,g:mi,G:yi,H:ei,I:ni,j:ri,L:un,m:si,M:ai,p:st,q:it,Q:He,s:Ne,S:oi,u:ci,U:li,V:ui,w:fi,W:hi,x:null,X:null,y:di,Y:gi,Z:ki,"%":Oe},G={a:D,A:x,b:o,B:d,c:m,d:Ee,e:Ee,f:Ar,g:Le,G:Fe,H:Ae,I:Ae,j:Yr,L:Er,m:Ur,M:Fr,p:U,q:Sr,Q:Wr,s:Or,S:Lr,u:wr,U:Cr,V:Dr,w:xr,W:Mr,x:u,X:_,y:Le,Y:Fe,Z:_r,"%":Ir};B.x=b(n,B),B.X=b(r,B),B.c=b(e,B),Z.x=b(n,Z),Z.X=b(r,Z),Z.c=b(e,Z);function b(k,E){return function(M){var l=[],R=-1,N=0,Q=k.length,J,et,Ut;for(M instanceof Date||(M=new Date(+M));++R<Q;)k.charCodeAt(R)===37&&(l.push(k.slice(N,R)),(et=Ye[J=k.charAt(++R)])!=null?J=k.charAt(++R):et=J==="e"?" ":"0",(Ut=E[J])&&(J=Ut(M,et)),l.push(J),N=R+1);return l.push(k.slice(N,R)),l.join("")}}function A(k,E){return function(M){var l=Yt(1900,void 0,1),R=p(l,k,M+="",0),N,Q;if(R!=M.length)return null;if("Q"in l)return new Date(l.Q);if("s"in l)return new Date(l.s*1e3+("L"in l?l.L:0));if(E&&!("Z"in l)&&(l.Z=0),"p"in l&&(l.H=l.H%12+l.p*12),l.m===void 0&&(l.m="q"in l?l.q:0),"V"in l){if(l.V<1||l.V>53)return null;"w"in l||(l.w=1),"Z"in l?(N=le(Yt(l.y,0,1)),Q=N.getUTCDay(),N=Q>4||Q===0?Qt.ceil(N):Qt(N),N=ke.offset(N,(l.V-1)*7),l.y=N.getUTCFullYear(),l.m=N.getUTCMonth(),l.d=N.getUTCDate()+(l.w+6)%7):(N=ce(Yt(l.y,0,1)),Q=N.getDay(),N=Q>4||Q===0?It.ceil(N):It(N),N=yt.offset(N,(l.V-1)*7),l.y=N.getFullYear(),l.m=N.getMonth(),l.d=N.getDate()+(l.w+6)%7)}else("W"in l||"U"in l)&&("w"in l||(l.w="u"in l?l.u%7:"W"in l?1:0),Q="Z"in l?le(Yt(l.y,0,1)).getUTCDay():ce(Yt(l.y,0,1)).getDay(),l.m=0,l.d="W"in l?(l.w+6)%7+l.W*7-(Q+5)%7:l.w+l.U*7-(Q+6)%7);return"Z"in l?(l.H+=l.Z/100|0,l.M+=l.Z%100,le(l)):ce(l)}}function p(k,E,M,l){for(var R=0,N=E.length,Q=M.length,J,et;R<N;){if(l>=Q)return-1;if(J=E.charCodeAt(R++),J===37){if(J=E.charAt(R++),et=G[J in Ye?E.charAt(R++):J],!et||(l=et(k,M,l))<0)return-1}else if(J!=M.charCodeAt(l++))return-1}return l}function U(k,E,M){var l=y.exec(E.slice(M));return l?(k.p=w.get(l[0].toLowerCase()),M+l[0].length):-1}function D(k,E,M){var l=T.exec(E.slice(M));return l?(k.w=X.get(l[0].toLowerCase()),M+l[0].length):-1}function x(k,E,M){var l=F.exec(E.slice(M));return l?(k.w=C.get(l[0].toLowerCase()),M+l[0].length):-1}function o(k,E,M){var l=O.exec(E.slice(M));return l?(k.m=W.get(l[0].toLowerCase()),M+l[0].length):-1}function d(k,E,M){var l=g.exec(E.slice(M));return l?(k.m=L.get(l[0].toLowerCase()),M+l[0].length):-1}function m(k,E,M){return p(k,e,E,M)}function u(k,E,M){return p(k,n,E,M)}function _(k,E,M){return p(k,r,E,M)}function c(k){return a[k.getDay()]}function q(k){return s[k.getDay()]}function f(k){return Y[k.getMonth()]}function h(k){return v[k.getMonth()]}function S(k){return i[+(k.getHours()>=12)]}function j(k){return 1+~~(k.getMonth()/3)}function H(k){return a[k.getUTCDay()]}function V(k){return s[k.getUTCDay()]}function I(k){return Y[k.getUTCMonth()]}function P(k){return v[k.getUTCMonth()]}function st(k){return i[+(k.getUTCHours()>=12)]}function it(k){return 1+~~(k.getUTCMonth()/3)}return{format:function(k){var E=b(k+="",B);return E.toString=function(){return k},E},parse:function(k){var E=A(k+="",!1);return E.toString=function(){return k},E},utcFormat:function(k){var E=b(k+="",Z);return E.toString=function(){return k},E},utcParse:function(k){var E=A(k+="",!0);return E.toString=function(){return k},E}}}var Ye={"-":"",_:" ",0:"0"},tt=/^\s*\d+/,Tr=/^%/,vr=/[\\^$*+?|[\]().{}]/g;function z(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(e)+i:i)}function br(t){return t.replace(vr,"\\$&")}function Ft(t){return new RegExp("^(?:"+t.map(br).join("|")+")","i")}function Lt(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function xr(t,e,n){var r=tt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function wr(t,e,n){var r=tt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Cr(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Dr(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Mr(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Fe(t,e,n){var r=tt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Le(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function _r(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Sr(t,e,n){var r=tt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Ur(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Ee(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Yr(t,e,n){var r=tt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ae(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Fr(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Lr(t,e,n){var r=tt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Er(t,e,n){var r=tt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Ar(t,e,n){var r=tt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Ir(t,e,n){var r=Tr.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Wr(t,e,n){var r=tt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=tt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Ie(t,e){return z(t.getDate(),e,2)}function Hr(t,e){return z(t.getHours(),e,2)}function Nr(t,e){return z(t.getHours()%12||12,e,2)}function Vr(t,e){return z(1+yt.count(mt(t),t),e,3)}function cn(t,e){return z(t.getMilliseconds(),e,3)}function Pr(t,e){return cn(t,e)+"000"}function zr(t,e){return z(t.getMonth()+1,e,2)}function Rr(t,e){return z(t.getMinutes(),e,2)}function Br(t,e){return z(t.getSeconds(),e,2)}function Zr(t){var e=t.getDay();return e===0?7:e}function qr(t,e){return z(Ot.count(mt(t)-1,t),e,2)}function ln(t){var e=t.getDay();return e>=4||e===0?kt(t):kt.ceil(t)}function Xr(t,e){return t=ln(t),z(kt.count(mt(t),t)+(mt(t).getDay()===4),e,2)}function jr(t){return t.getDay()}function Qr(t,e){return z(It.count(mt(t)-1,t),e,2)}function Gr(t,e){return z(t.getFullYear()%100,e,2)}function Jr(t,e){return t=ln(t),z(t.getFullYear()%100,e,2)}function Kr(t,e){return z(t.getFullYear()%1e4,e,4)}function $r(t,e){var n=t.getDay();return t=n>=4||n===0?kt(t):kt.ceil(t),z(t.getFullYear()%1e4,e,4)}function ti(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+z(e/60|0,"0",2)+z(e%60,"0",2)}function We(t,e){return z(t.getUTCDate(),e,2)}function ei(t,e){return z(t.getUTCHours(),e,2)}function ni(t,e){return z(t.getUTCHours()%12||12,e,2)}function ri(t,e){return z(1+ke.count(pt(t),t),e,3)}function un(t,e){return z(t.getUTCMilliseconds(),e,3)}function ii(t,e){return un(t,e)+"000"}function si(t,e){return z(t.getUTCMonth()+1,e,2)}function ai(t,e){return z(t.getUTCMinutes(),e,2)}function oi(t,e){return z(t.getUTCSeconds(),e,2)}function ci(t){var e=t.getUTCDay();return e===0?7:e}function li(t,e){return z(on.count(pt(t)-1,t),e,2)}function fn(t){var e=t.getUTCDay();return e>=4||e===0?_t(t):_t.ceil(t)}function ui(t,e){return t=fn(t),z(_t.count(pt(t),t)+(pt(t).getUTCDay()===4),e,2)}function fi(t){return t.getUTCDay()}function hi(t,e){return z(Qt.count(pt(t)-1,t),e,2)}function di(t,e){return z(t.getUTCFullYear()%100,e,2)}function mi(t,e){return t=fn(t),z(t.getUTCFullYear()%100,e,2)}function gi(t,e){return z(t.getUTCFullYear()%1e4,e,4)}function yi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?_t(t):_t.ceil(t),z(t.getUTCFullYear()%1e4,e,4)}function ki(){return"+0000"}function Oe(){return"%"}function He(t){return+t}function Ne(t){return Math.floor(+t/1e3)}var xt,Gt;pi({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 pi(t){return xt=pr(t),Gt=xt.format,xt.parse,xt.utcFormat,xt.utcParse,xt}function Ti(t){return new Date(t)}function vi(t){return t instanceof Date?+t:+new Date(+t)}function hn(t,e,n,r,i,s,a,v,Y,y){var w=Nn(),F=w.invert,C=w.domain,T=y(".%L"),X=y(":%S"),g=y("%I:%M"),L=y("%I %p"),O=y("%a %d"),W=y("%b %d"),B=y("%B"),Z=y("%Y");function G(b){return(Y(b)<b?T:v(b)<b?X:a(b)<b?g:s(b)<b?L:r(b)<b?i(b)<b?O:W:n(b)<b?B:Z)(b)}return w.invert=function(b){return new Date(F(b))},w.domain=function(b){return arguments.length?C(Array.from(b,vi)):C().map(Ti)},w.ticks=function(b){var A=C();return t(A[0],A[A.length-1],b??10)},w.tickFormat=function(b,A){return A==null?G:y(A)},w.nice=function(b){var A=C();return(!b||typeof b.range!="function")&&(b=e(A[0],A[A.length-1],b??10)),b?C(ar(A,b)):w},w.copy=function(){return Vn(w,hn(t,e,n,r,i,s,a,v,Y,y))},w}function bi(){return zn.apply(hn(yr,kr,mt,Wt,Ot,yt,At,Et,gt,Gt).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var dn={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(qe,function(){var n="day";return function(r,i,s){var a=function(y){return y.add(4-y.isoWeekday(),n)},v=i.prototype;v.isoWeekYear=function(){return a(this).year()},v.isoWeek=function(y){if(!this.$utils().u(y))return this.add(7*(y-this.isoWeek()),n);var w,F,C,T,X=a(this),g=(w=this.isoWeekYear(),F=this.$u,C=(F?s.utc:s)().year(w).startOf("year"),T=4-C.isoWeekday(),C.isoWeekday()>4&&(T+=7),C.add(T,n));return X.diff(g,"week")+1},v.isoWeekday=function(y){return this.$utils().u(y)?this.day()||7:this.day(this.day()%7?y:y-7)};var Y=v.startOf;v.startOf=function(y,w){var F=this.$utils(),C=!!F.u(w)||w;return F.p(y)==="isoweek"?C?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):Y.bind(this)(y,w)}}})})(dn);var xi=dn.exports;const wi=Xe(xi);var mn={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(qe,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|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d\d/,s=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,v={},Y=function(g){return(g=+g)+(g>68?1900:2e3)},y=function(g){return function(L){this[g]=+L}},w=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=function(L){if(!L||L==="Z")return 0;var O=L.match(/([+-]|\d\d)/g),W=60*O[1]+(+O[2]||0);return W===0?0:O[0]==="+"?-W:W}(g)}],F=function(g){var L=v[g];return L&&(L.indexOf?L:L.s.concat(L.f))},C=function(g,L){var O,W=v.meridiem;if(W){for(var B=1;B<=24;B+=1)if(g.indexOf(W(B,0,L))>-1){O=B>12;break}}else O=g===(L?"pm":"PM");return O},T={A:[a,function(g){this.afternoon=C(g,!1)}],a:[a,function(g){this.afternoon=C(g,!0)}],S:[/\d/,function(g){this.milliseconds=100*+g}],SS:[i,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[s,y("seconds")],ss:[s,y("seconds")],m:[s,y("minutes")],mm:[s,y("minutes")],H:[s,y("hours")],h:[s,y("hours")],HH:[s,y("hours")],hh:[s,y("hours")],D:[s,y("day")],DD:[i,y("day")],Do:[a,function(g){var L=v.ordinal,O=g.match(/\d+/);if(this.day=O[0],L)for(var W=1;W<=31;W+=1)L(W).replace(/\[|\]/g,"")===g&&(this.day=W)}],M:[s,y("month")],MM:[i,y("month")],MMM:[a,function(g){var L=F("months"),O=(F("monthsShort")||L.map(function(W){return W.slice(0,3)})).indexOf(g)+1;if(O<1)throw new Error;this.month=O%12||O}],MMMM:[a,function(g){var L=F("months").indexOf(g)+1;if(L<1)throw new Error;this.month=L%12||L}],Y:[/[+-]?\d+/,y("year")],YY:[i,function(g){this.year=Y(g)}],YYYY:[/\d{4}/,y("year")],Z:w,ZZ:w};function X(g){var L,O;L=g,O=v&&v.formats;for(var W=(g=L.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(U,D,x){var o=x&&x.toUpperCase();return D||O[x]||n[x]||O[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(d,m,u){return m||u.slice(1)})})).match(r),B=W.length,Z=0;Z<B;Z+=1){var G=W[Z],b=T[G],A=b&&b[0],p=b&&b[1];W[Z]=p?{regex:A,parser:p}:G.replace(/^\[|\]$/g,"")}return function(U){for(var D={},x=0,o=0;x<B;x+=1){var d=W[x];if(typeof d=="string")o+=d.length;else{var m=d.regex,u=d.parser,_=U.slice(o),c=m.exec(_)[0];u.call(D,c),U=U.replace(c,"")}}return function(q){var f=q.afternoon;if(f!==void 0){var h=q.hours;f?h<12&&(q.hours+=12):h===12&&(q.hours=0),delete q.afternoon}}(D),D}}return function(g,L,O){O.p.customParseFormat=!0,g&&g.parseTwoDigitYear&&(Y=g.parseTwoDigitYear);var W=L.prototype,B=W.parse;W.parse=function(Z){var G=Z.date,b=Z.utc,A=Z.args;this.$u=b;var p=A[1];if(typeof p=="string"){var U=A[2]===!0,D=A[3]===!0,x=U||D,o=A[2];D&&(o=A[2]),v=this.$locale(),!U&&o&&(v=O.Ls[o]),this.$d=function(_,c,q){try{if(["x","X"].indexOf(c)>-1)return new Date((c==="X"?1e3:1)*_);var f=X(c)(_),h=f.year,S=f.month,j=f.day,H=f.hours,V=f.minutes,I=f.seconds,P=f.milliseconds,st=f.zone,it=new Date,k=j||(h||S?1:it.getDate()),E=h||it.getFullYear(),M=0;h&&!S||(M=S>0?S-1:it.getMonth());var l=H||0,R=V||0,N=I||0,Q=P||0;return st?new Date(Date.UTC(E,M,k,l,R,N,Q+60*st.offset*1e3)):q?new Date(Date.UTC(E,M,k,l,R,N,Q)):new Date(E,M,k,l,R,N,Q)}catch{return new Date("")}}(G,p,b),this.init(),o&&o!==!0&&(this.$L=this.locale(o).$L),x&&G!=this.format(p)&&(this.$d=new Date("")),v={}}else if(p instanceof Array)for(var d=p.length,m=1;m<=d;m+=1){A[1]=p[m-1];var u=O.apply(this,A);if(u.isValid()){this.$d=u.$d,this.$L=u.$L,this.init();break}m===d&&(this.$d=new Date(""))}else B.call(this,Z)}}})})(mn);var Ci=mn.exports;const Di=Xe(Ci);var he=function(){var t=function(x,o,d,m){for(d=d||{},m=x.length;m--;d[x[m]]=o);return d},e=[6,8,10,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,30,32,33,35,37],n=[1,25],r=[1,26],i=[1,27],s=[1,28],a=[1,29],v=[1,30],Y=[1,31],y=[1,9],w=[1,10],F=[1,11],C=[1,12],T=[1,13],X=[1,14],g=[1,15],L=[1,16],O=[1,18],W=[1,19],B=[1,20],Z=[1,21],G=[1,22],b=[1,24],A=[1,32],p={trace:function(){},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,dateFormat:19,inclusiveEndDates:20,topAxis:21,axisFormat:22,tickInterval:23,excludes:24,includes:25,todayMarker:26,title:27,acc_title:28,acc_title_value:29,acc_descr:30,acc_descr_value:31,acc_descr_multiline_value:32,section:33,clickStatement:34,taskTxt:35,taskData:36,click:37,callbackname:38,callbackargs:39,href:40,clickStatementDebug:41,$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",19:"dateFormat",20:"inclusiveEndDates",21:"topAxis",22:"axisFormat",23:"tickInterval",24:"excludes",25:"includes",26:"todayMarker",27:"title",28:"acc_title",29:"acc_title_value",30:"acc_descr",31:"acc_descr_value",32:"acc_descr_multiline_value",33:"section",35:"taskTxt",36:"taskData",37:"click",38:"callbackname",39:"callbackargs",40:"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],[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],[34,2],[34,3],[34,3],[34,4],[34,3],[34,4],[34,2],[41,2],[41,3],[41,3],[41,4],[41,3],[41,4],[41,2]],performAction:function(o,d,m,u,_,c,q){var f=c.length-1;switch(_){case 1:return c[f-1];case 2:this.$=[];break;case 3:c[f-1].push(c[f]),this.$=c[f-1];break;case 4:case 5:this.$=c[f];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.setDateFormat(c[f].substr(11)),this.$=c[f].substr(11);break;case 16:u.enableInclusiveEndDates(),this.$=c[f].substr(18);break;case 17:u.TopAxis(),this.$=c[f].substr(8);break;case 18:u.setAxisFormat(c[f].substr(11)),this.$=c[f].substr(11);break;case 19:u.setTickInterval(c[f].substr(13)),this.$=c[f].substr(13);break;case 20:u.setExcludes(c[f].substr(9)),this.$=c[f].substr(9);break;case 21:u.setIncludes(c[f].substr(9)),this.$=c[f].substr(9);break;case 22:u.setTodayMarker(c[f].substr(12)),this.$=c[f].substr(12);break;case 24:u.setDiagramTitle(c[f].substr(6)),this.$=c[f].substr(6);break;case 25:this.$=c[f].trim(),u.setAccTitle(this.$);break;case 26:case 27:this.$=c[f].trim(),u.setAccDescription(this.$);break;case 28:u.addSection(c[f].substr(8)),this.$=c[f].substr(8);break;case 30:u.addTask(c[f-1],c[f]),this.$="task";break;case 31:this.$=c[f-1],u.setClickEvent(c[f-1],c[f],null);break;case 32:this.$=c[f-2],u.setClickEvent(c[f-2],c[f-1],c[f]);break;case 33:this.$=c[f-2],u.setClickEvent(c[f-2],c[f-1],null),u.setLink(c[f-2],c[f]);break;case 34:this.$=c[f-3],u.setClickEvent(c[f-3],c[f-2],c[f-1]),u.setLink(c[f-3],c[f]);break;case 35:this.$=c[f-2],u.setClickEvent(c[f-2],c[f],null),u.setLink(c[f-2],c[f-1]);break;case 36:this.$=c[f-3],u.setClickEvent(c[f-3],c[f-1],c[f]),u.setLink(c[f-3],c[f-2]);break;case 37:this.$=c[f-1],u.setLink(c[f-1],c[f]);break;case 38:case 44:this.$=c[f-1]+" "+c[f];break;case 39:case 40:case 42:this.$=c[f-2]+" "+c[f-1]+" "+c[f];break;case 41:case 43:this.$=c[f-3]+" "+c[f-2]+" "+c[f-1]+" "+c[f];break}},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:n,13:r,14:i,15:s,16:a,17:v,18:Y,19:y,20:w,21:F,22:C,23:T,24:X,25:g,26:L,27:O,28:W,30:B,32:Z,33:G,34:23,35:b,37:A},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:33,11:17,12:n,13:r,14:i,15:s,16:a,17:v,18:Y,19:y,20:w,21:F,22:C,23:T,24:X,25:g,26:L,27:O,28:W,30:B,32:Z,33:G,34:23,35:b,37:A},t(e,[2,5]),t(e,[2,6]),t(e,[2,15]),t(e,[2,16]),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]),{29:[1,34]},{31:[1,35]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),{36:[1,36]},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]),{38:[1,37],40:[1,38]},t(e,[2,4]),t(e,[2,25]),t(e,[2,26]),t(e,[2,30]),t(e,[2,31],{39:[1,39],40:[1,40]}),t(e,[2,37],{38:[1,41]}),t(e,[2,32],{40:[1,42]}),t(e,[2,33]),t(e,[2,35],{39:[1,43]}),t(e,[2,34]),t(e,[2,36])],defaultActions:{},parseError:function(o,d){if(d.recoverable)this.trace(o);else{var m=new Error(o);throw m.hash=d,m}},parse:function(o){var d=this,m=[0],u=[],_=[null],c=[],q=this.table,f="",h=0,S=0,j=2,H=1,V=c.slice.call(arguments,1),I=Object.create(this.lexer),P={yy:{}};for(var st in this.yy)Object.prototype.hasOwnProperty.call(this.yy,st)&&(P.yy[st]=this.yy[st]);I.setInput(o,P.yy),P.yy.lexer=I,P.yy.parser=this,typeof I.yylloc>"u"&&(I.yylloc={});var it=I.yylloc;c.push(it);var k=I.options&&I.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function E(){var ct;return ct=u.pop()||I.lex()||H,typeof ct!="number"&&(ct instanceof Array&&(u=ct,ct=u.pop()),ct=d.symbols_[ct]||ct),ct}for(var M,l,R,N,Q={},J,et,Ut,Pt;;){if(l=m[m.length-1],this.defaultActions[l]?R=this.defaultActions[l]:((M===null||typeof M>"u")&&(M=E()),R=q[l]&&q[l][M]),typeof R>"u"||!R.length||!R[0]){var Kt="";Pt=[];for(J in q[l])this.terminals_[J]&&J>j&&Pt.push("'"+this.terminals_[J]+"'");I.showPosition?Kt="Parse error on line "+(h+1)+`:
`+I.showPosition()+`
Expecting `+Pt.join(", ")+", got '"+(this.terminals_[M]||M)+"'":Kt="Parse error on line "+(h+1)+": Unexpected "+(M==H?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(Kt,{text:I.match,token:this.terminals_[M]||M,line:I.yylineno,loc:it,expected:Pt})}if(R[0]instanceof Array&&R.length>1)throw new Error("Parse Error: multiple actions possible at state: "+l+", token: "+M);switch(R[0]){case 1:m.push(M),_.push(I.yytext),c.push(I.yylloc),m.push(R[1]),M=null,S=I.yyleng,f=I.yytext,h=I.yylineno,it=I.yylloc;break;case 2:if(et=this.productions_[R[1]][1],Q.$=_[_.length-et],Q._$={first_line:c[c.length-(et||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(et||1)].first_column,last_column:c[c.length-1].last_column},k&&(Q._$.range=[c[c.length-(et||1)].range[0],c[c.length-1].range[1]]),N=this.performAction.apply(Q,[f,S,h,P.yy,R[1],_,c].concat(V)),typeof N<"u")return N;et&&(m=m.slice(0,-1*et*2),_=_.slice(0,-1*et),c=c.slice(0,-1*et)),m.push(this.productions_[R[1]][0]),_.push(Q.$),c.push(Q._$),Ut=q[m[m.length-2]][m[m.length-1]],m.push(Ut);break;case 3:return!0}}return!0}},U=function(){var x={EOF:1,parseError:function(d,m){if(this.yy.parser)this.yy.parser.parseError(d,m);else throw new Error(d)},setInput:function(o,d){return this.yy=d||this.yy||{},this._input=o,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},input:function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var d=o.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),o},unput:function(o){var d=o.length,m=o.split(/(?:\r\n?|\n)/g);this._input=o+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 _=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=[_[0],_[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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},less:function(o){this.unput(this.match.slice(o))},pastInput:function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var o=this.pastInput(),d=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
`+d+"^"},test_match:function(o,d){var m,u,_;if(this.options.backtrack_lexer&&(_={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&&(_.yylloc.range=this.yylloc.range.slice(0))),u=o[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+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,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(o[0].length),this.matched+=o[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 c in _)this[c]=_[c];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,d,m,u;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),c=0;c<_.length;c++)if(m=this._input.match(this.rules[_[c]]),m&&(!d||m[0].length>d[0].length)){if(d=m,u=c,this.options.backtrack_lexer){if(o=this.test_match(m,_[c]),o!==!1)return o;if(this._backtrack){d=!1;continue}else return!1}else if(!this.options.flex)break}return d?(o=this.test_match(d,_[u]),o!==!1?o:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var d=this.next();return d||this.lex()},begin:function(d){this.conditionStack.push(d)},popState:function(){var d=this.conditionStack.length-1;return d>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(d){return d=this.conditionStack.length-1-Math.abs(d||0),d>=0?this.conditionStack[d]:"INITIAL"},pushState:function(d){this.begin(d)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(d,m,u,_){switch(u){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),28;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),30;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 40;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 38;case 21:this.popState();break;case 22:return 39;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 37;case 26:return 4;case 27:return 19;case 28:return 20;case 29:return 21;case 30:return 22;case 31:return 23;case 32:return 25;case 33:return 24;case 34:return 26;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"date";case 43:return 27;case 44:return"accDescription";case 45:return 33;case 46:return 35;case 47:return 36;case 48:return":";case 49:return 6;case 50:return"INVALID"}},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,/^(?:\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],inclusive:!0}}};return x}();p.lexer=U;function D(){this.yy={}}return D.prototype=p,p.Parser=D,new D}();he.parser=he;const Mi=he;nt.extend(wi);nt.extend(Di);nt.extend(On);let at="",pe="",Te,ve="",Ht=[],Nt=[],be={},xe=[],Jt=[],St="",we="";const gn=["active","done","crit","milestone"];let Ce=[],Vt=!1,De=!1,Me="sunday",de=0;const _i=function(){xe=[],Jt=[],St="",Ce=[],Zt=0,ge=void 0,qt=void 0,K=[],at="",pe="",we="",Te=void 0,ve="",Ht=[],Nt=[],Vt=!1,De=!1,de=0,be={},Ln(),Me="sunday"},Si=function(t){pe=t},Ui=function(){return pe},Yi=function(t){Te=t},Fi=function(){return Te},Li=function(t){ve=t},Ei=function(){return ve},Ai=function(t){at=t},Ii=function(){Vt=!0},Wi=function(){return Vt},Oi=function(){De=!0},Hi=function(){return De},Ni=function(t){we=t},Vi=function(){return we},Pi=function(){return at},zi=function(t){Ht=t.toLowerCase().split(/[\s,]+/)},Ri=function(){return Ht},Bi=function(t){Nt=t.toLowerCase().split(/[\s,]+/)},Zi=function(){return Nt},qi=function(){return be},Xi=function(t){St=t,xe.push(t)},ji=function(){return xe},Qi=function(){let t=Ve();const e=10;let n=0;for(;!t&&n<e;)t=Ve(),n++;return Jt=K,Jt},yn=function(t,e,n,r){return r.includes(t.format(e.trim()))?!1:t.isoWeekday()>=6&&n.includes("weekends")||n.includes(t.format("dddd").toLowerCase())?!0:n.includes(t.format(e.trim()))},Gi=function(t){Me=t},Ji=function(){return Me},kn=function(t,e,n,r){if(!n.length||t.manualEndTime)return;let i;t.startTime instanceof Date?i=nt(t.startTime):i=nt(t.startTime,e,!0),i=i.add(1,"d");let s;t.endTime instanceof Date?s=nt(t.endTime):s=nt(t.endTime,e,!0);const[a,v]=Ki(i,s,e,n,r);t.endTime=a.toDate(),t.renderEndTime=v},Ki=function(t,e,n,r,i){let s=!1,a=null;for(;t<=e;)s||(a=e.toDate()),s=yn(t,n,r,i),s&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,a]},me=function(t,e,n){n=n.trim();const i=/^after\s+(?<ids>[\d\w- ]+)/.exec(n);if(i!==null){let a=null;for(const Y of i.groups.ids.split(" ")){let y=bt(Y);y!==void 0&&(!a||y.endTime>a.endTime)&&(a=y)}if(a)return a.endTime;const v=new Date;return v.setHours(0,0,0,0),v}let s=nt(n,e.trim(),!0);if(s.isValid())return s.toDate();{Xt.debug("Invalid date:"+n),Xt.debug("With date format:"+e.trim());const a=new Date(n);if(a===void 0||isNaN(a.getTime())||a.getFullYear()<-1e4||a.getFullYear()>1e4)throw new Error("Invalid date:"+n);return a}},pn=function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},Tn=function(t,e,n,r=!1){n=n.trim();const s=/^until\s+(?<ids>[\d\w- ]+)/.exec(n);if(s!==null){let w=null;for(const C of s.groups.ids.split(" ")){let T=bt(C);T!==void 0&&(!w||T.startTime<w.startTime)&&(w=T)}if(w)return w.startTime;const F=new Date;return F.setHours(0,0,0,0),F}let a=nt(n,e.trim(),!0);if(a.isValid())return r&&(a=a.add(1,"d")),a.toDate();let v=nt(t);const[Y,y]=pn(n);if(!Number.isNaN(Y)){const w=v.add(Y,y);w.isValid()&&(v=w)}return v.toDate()};let Zt=0;const Dt=function(t){return t===void 0?(Zt=Zt+1,"task"+Zt):t},$i=function(t,e){let n;e.substr(0,1)===":"?n=e.substr(1,e.length):n=e;const r=n.split(","),i={};wn(r,i,gn);for(let a=0;a<r.length;a++)r[a]=r[a].trim();let s="";switch(r.length){case 1:i.id=Dt(),i.startTime=t.endTime,s=r[0];break;case 2:i.id=Dt(),i.startTime=me(void 0,at,r[0]),s=r[1];break;case 3:i.id=Dt(r[0]),i.startTime=me(void 0,at,r[1]),s=r[2];break}return s&&(i.endTime=Tn(i.startTime,at,s,Vt),i.manualEndTime=nt(s,"YYYY-MM-DD",!0).isValid(),kn(i,at,Nt,Ht)),i},ts=function(t,e){let n;e.substr(0,1)===":"?n=e.substr(1,e.length):n=e;const r=n.split(","),i={};wn(r,i,gn);for(let s=0;s<r.length;s++)r[s]=r[s].trim();switch(r.length){case 1:i.id=Dt(),i.startTime={type:"prevTaskEnd",id:t},i.endTime={data:r[0]};break;case 2:i.id=Dt(),i.startTime={type:"getStartDate",startData:r[0]},i.endTime={data:r[1]};break;case 3:i.id=Dt(r[0]),i.startTime={type:"getStartDate",startData:r[1]},i.endTime={data:r[2]};break}return i};let ge,qt,K=[];const vn={},es=function(t,e){const n={section:St,type:St,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},r=ts(qt,e);n.raw.startTime=r.startTime,n.raw.endTime=r.endTime,n.id=r.id,n.prevTaskId=qt,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.order=de,de++;const i=K.push(n);qt=n.id,vn[n.id]=i-1},bt=function(t){const e=vn[t];return K[e]},ns=function(t,e){const n={section:St,type:St,description:t,task:t,classes:[]},r=$i(ge,e);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,ge=n,Jt.push(n)},Ve=function(){const t=function(n){const r=K[n];let i="";switch(K[n].raw.startTime.type){case"prevTaskEnd":{const s=bt(r.prevTaskId);r.startTime=s.endTime;break}case"getStartDate":i=me(void 0,at,K[n].raw.startTime.startData),i&&(K[n].startTime=i);break}return K[n].startTime&&(K[n].endTime=Tn(K[n].startTime,at,K[n].raw.endTime.data,Vt),K[n].endTime&&(K[n].processed=!0,K[n].manualEndTime=nt(K[n].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),kn(K[n],at,Nt,Ht))),K[n].processed};let e=!0;for(const[n,r]of K.entries())t(n),e=e&&r.processed;return e},rs=function(t,e){let n=e;wt().securityLevel!=="loose"&&(n=En.sanitizeUrl(e)),t.split(",").forEach(function(r){bt(r)!==void 0&&(xn(r,()=>{window.open(n,"_self")}),be[r]=n)}),bn(t,"clickable")},bn=function(t,e){t.split(",").forEach(function(n){let r=bt(n);r!==void 0&&r.classes.push(e)})},is=function(t,e,n){if(wt().securityLevel!=="loose"||e===void 0)return;let r=[];if(typeof n=="string"){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let s=0;s<r.length;s++){let a=r[s].trim();a.charAt(0)==='"'&&a.charAt(a.length-1)==='"'&&(a=a.substr(1,a.length-2)),r[s]=a}}r.length===0&&r.push(t),bt(t)!==void 0&&xn(t,()=>{Wn.runFunc(e,...r)})},xn=function(t,e){Ce.push(function(){const n=document.querySelector(`[id="${t}"]`);n!==null&&n.addEventListener("click",function(){e()})},function(){const n=document.querySelector(`[id="${t}-text"]`);n!==null&&n.addEventListener("click",function(){e()})})},ss=function(t,e,n){t.split(",").forEach(function(r){is(r,e,n)}),bn(t,"clickable")},as=function(t){Ce.forEach(function(e){e(t)})},os={getConfig:()=>wt().gantt,clear:_i,setDateFormat:Ai,getDateFormat:Pi,enableInclusiveEndDates:Ii,endDatesAreInclusive:Wi,enableTopAxis:Oi,topAxisEnabled:Hi,setAxisFormat:Si,getAxisFormat:Ui,setTickInterval:Yi,getTickInterval:Fi,setTodayMarker:Li,getTodayMarker:Ei,setAccTitle:Mn,getAccTitle:_n,setDiagramTitle:Sn,getDiagramTitle:Un,setDisplayMode:Ni,getDisplayMode:Vi,setAccDescription:Yn,getAccDescription:Fn,addSection:Xi,getSections:ji,getTasks:Qi,addTask:es,findTaskById:bt,addTaskOrg:ns,setIncludes:zi,getIncludes:Ri,setExcludes:Bi,getExcludes:Zi,setClickEvent:ss,setLink:rs,getLinks:qi,bindFunctions:as,parseDuration:pn,isInvalidDate:yn,setWeekday:Gi,getWeekday:Ji};function wn(t,e,n){let r=!0;for(;r;)r=!1,n.forEach(function(i){const s="^\\s*"+i+"\\s*$",a=new RegExp(s);t[0].match(a)&&(e[i]=!0,t.shift(1),r=!0)})}const cs=function(){Xt.debug("Something is calling, setConf, remove the call")},Pe={monday:It,tuesday:nn,wednesday:rn,thursday:kt,friday:sn,saturday:an,sunday:Ot},ls=(t,e)=>{let n=[...t].map(()=>-1/0),r=[...t].sort((s,a)=>s.startTime-a.startTime||s.order-a.order),i=0;for(const s of r)for(let a=0;a<n.length;a++)if(s.startTime>=n[a]){n[a]=s.endTime,s.order=a+e,a>i&&(i=a);break}return i};let lt;const us=function(t,e,n,r){const i=wt().gantt,s=wt().securityLevel;let a;s==="sandbox"&&(a=zt("#i"+e));const v=s==="sandbox"?zt(a.nodes()[0].contentDocument.body):zt("body"),Y=s==="sandbox"?a.nodes()[0].contentDocument:document,y=Y.getElementById(e);lt=y.parentElement.offsetWidth,lt===void 0&&(lt=1200),i.useWidth!==void 0&&(lt=i.useWidth);const w=r.db.getTasks();let F=[];for(const p of w)F.push(p.type);F=A(F);const C={};let T=2*i.topPadding;if(r.db.getDisplayMode()==="compact"||i.displayMode==="compact"){const p={};for(const D of w)p[D.section]===void 0?p[D.section]=[D]:p[D.section].push(D);let U=0;for(const D of Object.keys(p)){const x=ls(p[D],U)+1;U+=x,T+=x*(i.barHeight+i.barGap),C[D]=x}}else{T+=w.length*(i.barHeight+i.barGap);for(const p of F)C[p]=w.filter(U=>U.type===p).length}y.setAttribute("viewBox","0 0 "+lt+" "+T);const X=v.select(`[id="${e}"]`),g=bi().domain([Bn(w,function(p){return p.startTime}),Rn(w,function(p){return p.endTime})]).rangeRound([0,lt-i.leftPadding-i.rightPadding]);function L(p,U){const D=p.startTime,x=U.startTime;let o=0;return D>x?o=1:D<x&&(o=-1),o}w.sort(L),O(w,lt,T),An(X,T,lt,i.useMaxWidth),X.append("text").text(r.db.getDiagramTitle()).attr("x",lt/2).attr("y",i.titleTopMargin).attr("class","titleText");function O(p,U,D){const x=i.barHeight,o=x+i.barGap,d=i.topPadding,m=i.leftPadding,u=Pn().domain([0,F.length]).range(["#00B9FA","#F95002"]).interpolate(sr);B(o,d,m,U,D,p,r.db.getExcludes(),r.db.getIncludes()),Z(m,d,U,D),W(p,o,d,m,x,u,U),G(o,d),b(m,d,U,D)}function W(p,U,D,x,o,d,m){const _=[...new Set(p.map(h=>h.order))].map(h=>p.find(S=>S.order===h));X.append("g").selectAll("rect").data(_).enter().append("rect").attr("x",0).attr("y",function(h,S){return S=h.order,S*U+D-2}).attr("width",function(){return m-i.rightPadding/2}).attr("height",U).attr("class",function(h){for(const[S,j]of F.entries())if(h.type===j)return"section section"+S%i.numberSectionStyles;return"section section0"});const c=X.append("g").selectAll("rect").data(p).enter(),q=r.db.getLinks();if(c.append("rect").attr("id",function(h){return h.id}).attr("rx",3).attr("ry",3).attr("x",function(h){return h.milestone?g(h.startTime)+x+.5*(g(h.endTime)-g(h.startTime))-.5*o:g(h.startTime)+x}).attr("y",function(h,S){return S=h.order,S*U+D}).attr("width",function(h){return h.milestone?o:g(h.renderEndTime||h.endTime)-g(h.startTime)}).attr("height",o).attr("transform-origin",function(h,S){return S=h.order,(g(h.startTime)+x+.5*(g(h.endTime)-g(h.startTime))).toString()+"px "+(S*U+D+.5*o).toString()+"px"}).attr("class",function(h){const S="task";let j="";h.classes.length>0&&(j=h.classes.join(" "));let H=0;for(const[I,P]of F.entries())h.type===P&&(H=I%i.numberSectionStyles);let V="";return h.active?h.crit?V+=" activeCrit":V=" active":h.done?h.crit?V=" doneCrit":V=" done":h.crit&&(V+=" crit"),V.length===0&&(V=" task"),h.milestone&&(V=" milestone "+V),V+=H,V+=" "+j,S+V}),c.append("text").attr("id",function(h){return h.id+"-text"}).text(function(h){return h.task}).attr("font-size",i.fontSize).attr("x",function(h){let S=g(h.startTime),j=g(h.renderEndTime||h.endTime);h.milestone&&(S+=.5*(g(h.endTime)-g(h.startTime))-.5*o),h.milestone&&(j=S+o);const H=this.getBBox().width;return H>j-S?j+H+1.5*i.leftPadding>m?S+x-5:j+x+5:(j-S)/2+S+x}).attr("y",function(h,S){return S=h.order,S*U+i.barHeight/2+(i.fontSize/2-2)+D}).attr("text-height",o).attr("class",function(h){const S=g(h.startTime);let j=g(h.endTime);h.milestone&&(j=S+o);const H=this.getBBox().width;let V="";h.classes.length>0&&(V=h.classes.join(" "));let I=0;for(const[st,it]of F.entries())h.type===it&&(I=st%i.numberSectionStyles);let P="";return h.active&&(h.crit?P="activeCritText"+I:P="activeText"+I),h.done?h.crit?P=P+" doneCritText"+I:P=P+" doneText"+I:h.crit&&(P=P+" critText"+I),h.milestone&&(P+=" milestoneText"),H>j-S?j+H+1.5*i.leftPadding>m?V+" taskTextOutsideLeft taskTextOutside"+I+" "+P:V+" taskTextOutsideRight taskTextOutside"+I+" "+P+" width-"+H:V+" taskText taskText"+I+" "+P+" width-"+H}),wt().securityLevel==="sandbox"){let h;h=zt("#i"+e);const S=h.nodes()[0].contentDocument;c.filter(function(j){return q[j.id]!==void 0}).each(function(j){var H=S.querySelector("#"+j.id),V=S.querySelector("#"+j.id+"-text");const I=H.parentNode;var P=S.createElement("a");P.setAttribute("xlink:href",q[j.id]),P.setAttribute("target","_top"),I.appendChild(P),P.appendChild(H),P.appendChild(V)})}}function B(p,U,D,x,o,d,m,u){if(m.length===0&&u.length===0)return;let _,c;for(const{startTime:H,endTime:V}of d)(_===void 0||H<_)&&(_=H),(c===void 0||V>c)&&(c=V);if(!_||!c)return;if(nt(c).diff(nt(_),"year")>5){Xt.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 q=r.db.getDateFormat(),f=[];let h=null,S=nt(_);for(;S.valueOf()<=c;)r.db.isInvalidDate(S,q,m,u)?h?h.end=S:h={start:S,end:S}:h&&(f.push(h),h=null),S=S.add(1,"d");X.append("g").selectAll("rect").data(f).enter().append("rect").attr("id",function(H){return"exclude-"+H.start.format("YYYY-MM-DD")}).attr("x",function(H){return g(H.start)+D}).attr("y",i.gridLineStartPadding).attr("width",function(H){const V=H.end.add(1,"day");return g(V)-g(H.start)}).attr("height",o-U-i.gridLineStartPadding).attr("transform-origin",function(H,V){return(g(H.start)+D+.5*(g(H.end)-g(H.start))).toString()+"px "+(V*p+.5*o).toString()+"px"}).attr("class","exclude-range")}function Z(p,U,D,x){let o=Kn(g).tickSize(-x+U+i.gridLineStartPadding).tickFormat(Gt(r.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));const m=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||i.tickInterval);if(m!==null){const u=m[1],_=m[2],c=r.db.getWeekday()||i.weekday;switch(_){case"millisecond":o.ticks(Mt.every(u));break;case"second":o.ticks(gt.every(u));break;case"minute":o.ticks(Et.every(u));break;case"hour":o.ticks(At.every(u));break;case"day":o.ticks(yt.every(u));break;case"week":o.ticks(Pe[c].every(u));break;case"month":o.ticks(Wt.every(u));break}}if(X.append("g").attr("class","grid").attr("transform","translate("+p+", "+(x-50)+")").call(o).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),r.db.topAxisEnabled()||i.topAxis){let u=Jn(g).tickSize(-x+U+i.gridLineStartPadding).tickFormat(Gt(r.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));if(m!==null){const _=m[1],c=m[2],q=r.db.getWeekday()||i.weekday;switch(c){case"millisecond":u.ticks(Mt.every(_));break;case"second":u.ticks(gt.every(_));break;case"minute":u.ticks(Et.every(_));break;case"hour":u.ticks(At.every(_));break;case"day":u.ticks(yt.every(_));break;case"week":u.ticks(Pe[q].every(_));break;case"month":u.ticks(Wt.every(_));break}}X.append("g").attr("class","grid").attr("transform","translate("+p+", "+U+")").call(u).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function G(p,U){let D=0;const x=Object.keys(C).map(o=>[o,C[o]]);X.append("g").selectAll("text").data(x).enter().append(function(o){const d=o[0].split(In.lineBreakRegex),m=-(d.length-1)/2,u=Y.createElementNS("http://www.w3.org/2000/svg","text");u.setAttribute("dy",m+"em");for(const[_,c]of d.entries()){const q=Y.createElementNS("http://www.w3.org/2000/svg","tspan");q.setAttribute("alignment-baseline","central"),q.setAttribute("x","10"),_>0&&q.setAttribute("dy","1em"),q.textContent=c,u.appendChild(q)}return u}).attr("x",10).attr("y",function(o,d){if(d>0)for(let m=0;m<d;m++)return D+=x[d-1][1],o[1]*p/2+D*p+U;else return o[1]*p/2+U}).attr("font-size",i.sectionFontSize).attr("class",function(o){for(const[d,m]of F.entries())if(o[0]===m)return"sectionTitle sectionTitle"+d%i.numberSectionStyles;return"sectionTitle"})}function b(p,U,D,x){const o=r.db.getTodayMarker();if(o==="off")return;const d=X.append("g").attr("class","today"),m=new Date,u=d.append("line");u.attr("x1",g(m)+p).attr("x2",g(m)+p).attr("y1",i.titleTopMargin).attr("y2",x-i.titleTopMargin).attr("class","today"),o!==""&&u.attr("style",o.replace(/,/g,";"))}function A(p){const U={},D=[];for(let x=0,o=p.length;x<o;++x)Object.prototype.hasOwnProperty.call(U,p[x])||(U[p[x]]=!0,D.push(p[x]));return D}},fs={setConf:cs,draw:us},hs=t=>`
.mermaid-main-font {
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
}
.exclude-range {
fill: ${t.excludeBkgColor};
}
.section {
stroke: none;
opacity: 0.2;
}
.section0 {
fill: ${t.sectionBkgColor};
}
.section2 {
fill: ${t.sectionBkgColor2};
}
.section1,
.section3 {
fill: ${t.altSectionBkgColor};
opacity: 0.2;
}
.sectionTitle0 {
fill: ${t.titleColor};
}
.sectionTitle1 {
fill: ${t.titleColor};
}
.sectionTitle2 {
fill: ${t.titleColor};
}
.sectionTitle3 {
fill: ${t.titleColor};
}
.sectionTitle {
text-anchor: start;
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
}
/* Grid and axis */
.grid .tick {
stroke: ${t.gridColor};
opacity: 0.8;
shape-rendering: crispEdges;
}
.grid .tick text {
font-family: ${t.fontFamily};
fill: ${t.textColor};
}
.grid path {
stroke-width: 0;
}
/* Today line */
.today {
fill: none;
stroke: ${t.todayLineColor};
stroke-width: 2px;
}
/* Task styling */
/* Default task */
.task {
stroke-width: 2;
}
.taskText {
text-anchor: middle;
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
}
.taskTextOutsideRight {
fill: ${t.taskTextDarkColor};
text-anchor: start;
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
}
.taskTextOutsideLeft {
fill: ${t.taskTextDarkColor};
text-anchor: end;
}
/* Special case clickable */
.task.clickable {
cursor: pointer;
}
.taskText.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideLeft.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideRight.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
/* Specific task settings for the sections*/
.taskText0,
.taskText1,
.taskText2,
.taskText3 {
fill: ${t.taskTextColor};
}
.task0,
.task1,
.task2,
.task3 {
fill: ${t.taskBkgColor};
stroke: ${t.taskBorderColor};
}
.taskTextOutside0,
.taskTextOutside2
{
fill: ${t.taskTextOutsideColor};
}
.taskTextOutside1,
.taskTextOutside3 {
fill: ${t.taskTextOutsideColor};
}
/* Active task */
.active0,
.active1,
.active2,
.active3 {
fill: ${t.activeTaskBkgColor};
stroke: ${t.activeTaskBorderColor};
}
.activeText0,
.activeText1,
.activeText2,
.activeText3 {
fill: ${t.taskTextDarkColor} !important;
}
/* Completed task */
.done0,
.done1,
.done2,
.done3 {
stroke: ${t.doneTaskBorderColor};
fill: ${t.doneTaskBkgColor};
stroke-width: 2;
}
.doneText0,
.doneText1,
.doneText2,
.doneText3 {
fill: ${t.taskTextDarkColor} !important;
}
/* Tasks on the critical line */
.crit0,
.crit1,
.crit2,
.crit3 {
stroke: ${t.critBorderColor};
fill: ${t.critBkgColor};
stroke-width: 2;
}
.activeCrit0,
.activeCrit1,
.activeCrit2,
.activeCrit3 {
stroke: ${t.critBorderColor};
fill: ${t.activeTaskBkgColor};
stroke-width: 2;
}
.doneCrit0,
.doneCrit1,
.doneCrit2,
.doneCrit3 {
stroke: ${t.critBorderColor};
fill: ${t.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: ${t.taskTextDarkColor} !important;
}
.activeCritText0,
.activeCritText1,
.activeCritText2,
.activeCritText3 {
fill: ${t.taskTextDarkColor} !important;
}
.titleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.titleColor||t.textColor};
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
}
`,ds=hs,Os={parser:Mi,db:os,renderer:fs,styles:ds};export{Os as diagram};