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