hypnagaga/docs/assets/ganttDiagram-60845bff-6c441408.js
2024-08-20 10:01:02 +00:00

267 lines
60 KiB
JavaScript

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