@getvibeguard/cli 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/README.md +166 -0
  2. package/dashboard/dist/assets/Tableau10-B-NsZVaP.js +1 -0
  3. package/dashboard/dist/assets/arc-CZ1oDkm-.js +1 -0
  4. package/dashboard/dist/assets/array-BKyUJesY.js +1 -0
  5. package/dashboard/dist/assets/blockDiagram-c4efeb88-BLITAZDl.js +118 -0
  6. package/dashboard/dist/assets/c4Diagram-c83219d4-DErNj891.js +10 -0
  7. package/dashboard/dist/assets/channel-sWBGOq9p.js +1 -0
  8. package/dashboard/dist/assets/classDiagram-beda092f-Bj8IB6RW.js +2 -0
  9. package/dashboard/dist/assets/classDiagram-v2-2358418a-BZtd2g5W.js +2 -0
  10. package/dashboard/dist/assets/clone-DtEyH3ya.js +1 -0
  11. package/dashboard/dist/assets/createText-1719965b-DkNrTk-5.js +7 -0
  12. package/dashboard/dist/assets/edges-96097737-CYxl0j3g.js +4 -0
  13. package/dashboard/dist/assets/erDiagram-0228fc6a-ClEp9Atg.js +51 -0
  14. package/dashboard/dist/assets/flowDb-c6c81e3f-ClDJCJwu.js +10 -0
  15. package/dashboard/dist/assets/flowDiagram-50d868cf-DYxwClWS.js +4 -0
  16. package/dashboard/dist/assets/flowDiagram-v2-4f6560a1-D7vEnO1T.js +1 -0
  17. package/dashboard/dist/assets/flowchart-elk-definition-6af322e1-C-wX1mNx.js +139 -0
  18. package/dashboard/dist/assets/ganttDiagram-a2739b55-DTeLavAj.js +257 -0
  19. package/dashboard/dist/assets/gitGraphDiagram-82fe8481-ClxNoYya.js +70 -0
  20. package/dashboard/dist/assets/graph-CT-F3Got.js +1 -0
  21. package/dashboard/dist/assets/index-5325376f-C-jTCYZA.js +1 -0
  22. package/dashboard/dist/assets/index-CvYvquQR.js +283 -0
  23. package/dashboard/dist/assets/index-n43poL1x.css +1 -0
  24. package/dashboard/dist/assets/infoDiagram-8eee0895-Zljudo5L.js +7 -0
  25. package/dashboard/dist/assets/init-Gi6I4Gst.js +1 -0
  26. package/dashboard/dist/assets/journeyDiagram-c64418c1-DXzTbuum.js +139 -0
  27. package/dashboard/dist/assets/katex-Cu_Erd72.js +261 -0
  28. package/dashboard/dist/assets/layout-CVO3EizT.js +1 -0
  29. package/dashboard/dist/assets/line-CIgln-0z.js +1 -0
  30. package/dashboard/dist/assets/linear-bmIUMQqg.js +1 -0
  31. package/dashboard/dist/assets/mindmap-definition-8da855dc-BDLTNZYk.js +425 -0
  32. package/dashboard/dist/assets/ordinal-Cboi1Yqb.js +1 -0
  33. package/dashboard/dist/assets/path-CbwjOpE9.js +1 -0
  34. package/dashboard/dist/assets/pieDiagram-a8764435-DtcOKNPc.js +35 -0
  35. package/dashboard/dist/assets/quadrantDiagram-1e28029f-zoSI_Ltf.js +7 -0
  36. package/dashboard/dist/assets/requirementDiagram-08caed73-TsQZ9lTB.js +52 -0
  37. package/dashboard/dist/assets/sankeyDiagram-a04cb91d-DE5ciDwD.js +8 -0
  38. package/dashboard/dist/assets/sequenceDiagram-c5b8d532-DhabPb2n.js +122 -0
  39. package/dashboard/dist/assets/stateDiagram-1ecb1508-Bg2q_YNx.js +1 -0
  40. package/dashboard/dist/assets/stateDiagram-v2-c2b004d7-Bs5iRjYB.js +1 -0
  41. package/dashboard/dist/assets/styles-b4e223ce-DchmAmav.js +160 -0
  42. package/dashboard/dist/assets/styles-ca3715f6-Bu5zjaDx.js +207 -0
  43. package/dashboard/dist/assets/styles-d45a18b0-jCaD8baR.js +116 -0
  44. package/dashboard/dist/assets/svgDrawCommon-b86b1483-BrYVGY4c.js +1 -0
  45. package/dashboard/dist/assets/timeline-definition-faaaa080--sq0bTHe.js +61 -0
  46. package/dashboard/dist/assets/xychartDiagram-f5964ef8-ByvzN0uj.js +7 -0
  47. package/dashboard/dist/index.html +22 -0
  48. package/dist/cli.d.ts +4 -0
  49. package/dist/cli.d.ts.map +1 -0
  50. package/dist/cli.js +641 -0
  51. package/dist/cli.js.map +1 -0
  52. package/dist/commands/dashboard.d.ts +2 -0
  53. package/dist/commands/dashboard.d.ts.map +1 -0
  54. package/dist/commands/dashboard.js +184 -0
  55. package/dist/commands/dashboard.js.map +1 -0
  56. package/dist/commands/init.d.ts +5 -0
  57. package/dist/commands/init.d.ts.map +1 -0
  58. package/dist/commands/init.js +501 -0
  59. package/dist/commands/init.js.map +1 -0
  60. package/dist/index.d.ts +3 -0
  61. package/dist/index.d.ts.map +1 -0
  62. package/dist/index.js +602 -0
  63. package/dist/index.js.map +1 -0
  64. package/dist/librarian/autofix.d.ts +34 -0
  65. package/dist/librarian/autofix.d.ts.map +1 -0
  66. package/dist/librarian/autofix.js +369 -0
  67. package/dist/librarian/autofix.js.map +1 -0
  68. package/dist/librarian/heartbeat.d.ts +38 -0
  69. package/dist/librarian/heartbeat.d.ts.map +1 -0
  70. package/dist/librarian/heartbeat.js +98 -0
  71. package/dist/librarian/heartbeat.js.map +1 -0
  72. package/dist/librarian/initializer.d.ts +41 -0
  73. package/dist/librarian/initializer.d.ts.map +1 -0
  74. package/dist/librarian/initializer.js +202 -0
  75. package/dist/librarian/initializer.js.map +1 -0
  76. package/dist/librarian/memory-manager.d.ts +37 -0
  77. package/dist/librarian/memory-manager.d.ts.map +1 -0
  78. package/dist/librarian/memory-manager.js +205 -0
  79. package/dist/librarian/memory-manager.js.map +1 -0
  80. package/dist/librarian/oracle.d.ts +51 -0
  81. package/dist/librarian/oracle.d.ts.map +1 -0
  82. package/dist/librarian/oracle.js +235 -0
  83. package/dist/librarian/oracle.js.map +1 -0
  84. package/dist/librarian/summarizer.d.ts +19 -0
  85. package/dist/librarian/summarizer.d.ts.map +1 -0
  86. package/dist/librarian/summarizer.js +175 -0
  87. package/dist/librarian/summarizer.js.map +1 -0
  88. package/dist/librarian/watcher.d.ts +51 -0
  89. package/dist/librarian/watcher.d.ts.map +1 -0
  90. package/dist/librarian/watcher.js +189 -0
  91. package/dist/librarian/watcher.js.map +1 -0
  92. package/dist/mcp-server.d.ts +10 -0
  93. package/dist/mcp-server.d.ts.map +1 -0
  94. package/dist/mcp-server.js +879 -0
  95. package/dist/mcp-server.js.map +1 -0
  96. package/dist/services/token-tracker.d.ts +58 -0
  97. package/dist/services/token-tracker.d.ts.map +1 -0
  98. package/dist/services/token-tracker.js +178 -0
  99. package/dist/services/token-tracker.js.map +1 -0
  100. package/dist/utils/chunker.d.ts +5 -0
  101. package/dist/utils/chunker.d.ts.map +1 -0
  102. package/dist/utils/chunker.js +121 -0
  103. package/dist/utils/chunker.js.map +1 -0
  104. package/dist/utils/config-manager.d.ts +65 -0
  105. package/dist/utils/config-manager.d.ts.map +1 -0
  106. package/dist/utils/config-manager.js +243 -0
  107. package/dist/utils/config-manager.js.map +1 -0
  108. package/dist/utils/config.d.ts +46 -0
  109. package/dist/utils/config.d.ts.map +1 -0
  110. package/dist/utils/config.js +171 -0
  111. package/dist/utils/config.js.map +1 -0
  112. package/dist/utils/diff-cleaner.d.ts +13 -0
  113. package/dist/utils/diff-cleaner.d.ts.map +1 -0
  114. package/dist/utils/diff-cleaner.js +80 -0
  115. package/dist/utils/diff-cleaner.js.map +1 -0
  116. package/dist/utils/git.d.ts +71 -0
  117. package/dist/utils/git.d.ts.map +1 -0
  118. package/dist/utils/git.js +285 -0
  119. package/dist/utils/git.js.map +1 -0
  120. package/dist/utils/llm.d.ts +30 -0
  121. package/dist/utils/llm.d.ts.map +1 -0
  122. package/dist/utils/llm.js +308 -0
  123. package/dist/utils/llm.js.map +1 -0
  124. package/dist/utils/pricing.d.ts +47 -0
  125. package/dist/utils/pricing.d.ts.map +1 -0
  126. package/dist/utils/pricing.js +171 -0
  127. package/dist/utils/pricing.js.map +1 -0
  128. package/package.json +45 -0
@@ -0,0 +1,257 @@
1
+ import{R as Be,J as Dn,K as Ze,L as Xe,M as qe,N as Kt,O as Mn,P as ye,Q as ke,a as Sn,s as _n,C as Yn,D as Un,b as Fn,c as Ln,g as Dt,d as Rt,e as En,T as nt,l as Gt,k as An,j as In,E as Wn,B as On}from"./index-CvYvquQR.js";import{b as Hn,t as Ye,c as Nn,a as Vn,l as Pn}from"./linear-bmIUMQqg.js";import{i as zn}from"./init-Gi6I4Gst.js";function Rn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Bn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Zn(t){return t}var Zt=1,te=2,ue=3,Bt=4,Ue=1e-6;function Xn(t){return"translate("+t+",0)"}function qn(t){return"translate(0,"+t+")"}function Gn(t){return e=>+t(e)}function Qn(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function jn(){return!this.__axis}function Ge(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,S=typeof window<"u"&&window.devicePixelRatio>1?0:.5,p=t===Zt||t===Bt?-1:1,g=t===Bt||t===te?"x":"y",F=t===Zt||t===ue?Xn:qn;function w(T){var q=r??(e.ticks?e.ticks.apply(e,n):e.domain()),I=i??(e.tickFormat?e.tickFormat.apply(e,n):Zn),D=Math.max(s,0)+y,L=e.range(),H=+L[0]+S,E=+L[L.length-1]+S,Z=(e.bandwidth?Qn:Gn)(e.copy(),S),j=T.selection?T.selection():T,b=j.selectAll(".domain").data([null]),W=j.selectAll(".tick").data(q,e).order(),v=W.exit(),U=W.enter().append("g").attr("class","tick"),_=W.select("line"),x=W.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),W=W.merge(U),_=_.merge(U.append("line").attr("stroke","currentColor").attr(g+"2",p*s)),x=x.merge(U.append("text").attr("fill","currentColor").attr(g,p*D).attr("dy",t===Zt?"0em":t===ue?"0.71em":"0.32em")),T!==j&&(b=b.transition(T),W=W.transition(T),_=_.transition(T),x=x.transition(T),v=v.transition(T).attr("opacity",Ue).attr("transform",function(o){return isFinite(o=Z(o))?F(o+S):this.getAttribute("transform")}),U.attr("opacity",Ue).attr("transform",function(o){var f=this.parentNode.__axis;return F((f&&isFinite(f=f(o))?f:Z(o))+S)})),v.remove(),b.attr("d",t===Bt||t===te?a?"M"+p*a+","+H+"H"+S+"V"+E+"H"+p*a:"M"+S+","+H+"V"+E:a?"M"+H+","+p*a+"V"+S+"H"+E+"V"+p*a:"M"+H+","+S+"H"+E),W.attr("opacity",1).attr("transform",function(o){return F(Z(o)+S)}),_.attr(g+"2",p*s),x.attr(g,p*D).text(I),j.filter(jn).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===te?"start":t===Bt?"end":"middle"),j.each(function(){this.__axis=Z})}return w.scale=function(T){return arguments.length?(e=T,w):e},w.ticks=function(){return n=Array.from(arguments),w},w.tickArguments=function(T){return arguments.length?(n=T==null?[]:Array.from(T),w):n.slice()},w.tickValues=function(T){return arguments.length?(r=T==null?null:Array.from(T),w):r&&r.slice()},w.tickFormat=function(T){return arguments.length?(i=T,w):i},w.tickSize=function(T){return arguments.length?(s=a=+T,w):s},w.tickSizeInner=function(T){return arguments.length?(s=+T,w):s},w.tickSizeOuter=function(T){return arguments.length?(a=+T,w):a},w.tickPadding=function(T){return arguments.length?(y=+T,w):y},w.offset=function(T){return arguments.length?(S=+T,w):S},w}function Jn(t){return Ge(Zt,t)}function $n(t){return Ge(ue,t)}const Kn=Math.PI/180,tr=180/Math.PI,Qt=18,Qe=.96422,je=1,Je=.82521,$e=4/29,Mt=6/29,Ke=3*Mt*Mt,er=Mt*Mt*Mt;function tn(t){if(t instanceof st)return new st(t.l,t.a,t.b,t.opacity);if(t instanceof ft)return en(t);t instanceof Be||(t=Dn(t));var e=ie(t.r),n=ie(t.g),r=ie(t.b),i=ee((.2225045*e+.7168786*n+.0606169*r)/je),s,a;return e===n&&n===r?s=a=i:(s=ee((.4360747*e+.3850649*n+.1430804*r)/Qe),a=ee((.0139322*e+.0971045*n+.7141733*r)/Je)),new st(116*i-16,500*(s-i),200*(i-a),t.opacity)}function nr(t,e,n,r){return arguments.length===1?tn(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}Ze(st,nr,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=Qe*ne(e),t=je*ne(t),n=Je*ne(n),new Be(re(3.1338561*e-1.6168667*t-.4906146*n),re(-.9787684*e+1.9161415*t+.033454*n),re(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function ee(t){return t>er?Math.pow(t,1/3):t/Ke+$e}function ne(t){return t>Mt?t*t*t:Ke*(t-$e)}function re(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ie(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function rr(t){if(t instanceof ft)return new ft(t.h,t.c,t.l,t.opacity);if(t instanceof st||(t=tn(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)*tr;return new ft(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function fe(t,e,n,r){return arguments.length===1?rr(t):new 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 en(t){if(isNaN(t.h))return new st(t.l,0,0,t.opacity);var e=t.h*Kn;return new st(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Ze(ft,fe,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 en(this).rgb()}}));function ir(t){return function(e,n){var r=t((e=fe(e)).h,(n=fe(n)).h),i=Kt(e.c,n.c),s=Kt(e.l,n.l),a=Kt(e.opacity,n.opacity);return function(y){return e.h=r(y),e.c=i(y),e.l=s(y),e.opacity=a(y),e+""}}}const sr=ir(Mn);function ar(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],s=t[r],a;return s<i&&(a=n,n=r,r=a,a=i,i=s,s=a),t[n]=e.floor(i),t[r]=e.ceil(s),t}const se=new Date,ae=new Date;function tt(t,e,n,r){function i(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a<y-s?a:y},i.offset=(s,a)=>(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const S=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s<a)||!(y>0))return S;let p;do S.push(p=new Date(+s)),e(s,y),t(s);while(p<s&&s<a);return S},i.filter=s=>tt(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(se.setTime(+s),ae.setTime(+a),t(se),t(ae),Math.floor(n(se,ae))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const _t=tt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);_t.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):_t);_t.range;const ht=1e3,rt=ht*60,dt=rt*60,mt=dt*24,pe=mt*7,Fe=mt*30,oe=mt*365,kt=tt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*ht)},(t,e)=>(e-t)/ht,t=>t.getUTCSeconds());kt.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 or=tt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*rt)},(t,e)=>(e-t)/rt,t=>t.getUTCMinutes());or.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 cr=tt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*dt)},(t,e)=>(e-t)/dt,t=>t.getUTCHours());cr.range;const pt=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);pt.range;const Te=tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/mt,t=>t.getUTCDate()-1);Te.range;const lr=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));lr.range;function bt(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)/pe)}const Ht=bt(0),Wt=bt(1),nn=bt(2),rn=bt(3),Tt=bt(4),sn=bt(5),an=bt(6);Ht.range;Wt.range;nn.range;rn.range;Tt.range;sn.range;an.range;function xt(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)/pe)}const on=xt(0),jt=xt(1),ur=xt(2),fr=xt(3),Yt=xt(4),hr=xt(5),dr=xt(6);on.range;jt.range;ur.range;fr.range;Yt.range;hr.range;dr.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 mr=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());mr.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 vt=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());vt.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)});vt.range;function gr(t,e,n,r,i,s){const a=[[kt,1,ht],[kt,5,5*ht],[kt,15,15*ht],[kt,30,30*ht],[s,1,rt],[s,5,5*rt],[s,15,15*rt],[s,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,pe],[e,1,Fe],[e,3,3*Fe],[t,1,oe]];function y(p,g,F){const w=g<p;w&&([p,g]=[g,p]);const T=F&&typeof F.range=="function"?F:S(p,g,F),q=T?T.range(p,+g+1):[];return w?q.reverse():q}function S(p,g,F){const w=Math.abs(g-p)/F,T=Hn(([,,D])=>D).right(a,w);if(T===a.length)return t.every(Ye(p/oe,g/oe,F));if(T===0)return _t.every(Math.max(Ye(p,g,F),1));const[q,I]=a[w/a[T-1][2]<a[T][2]/w?T-1:T];return q.every(I)}return[y,S]}const[yr,kr]=gr(gt,Ot,Ht,pt,It,At);function ce(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function le(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ft(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function pr(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,s=t.days,a=t.shortDays,y=t.months,S=t.shortMonths,p=Lt(i),g=Et(i),F=Lt(s),w=Et(s),T=Lt(a),q=Et(a),I=Lt(y),D=Et(y),L=Lt(S),H=Et(S),E={a:c,A:G,b:d,B:h,c:null,d:Oe,e:Oe,f:Pr,g:Jr,G:Kr,H:Hr,I:Nr,j:Vr,L:cn,m:zr,M:Rr,p:C,q:X,Q:Ve,s:Pe,S:Br,u:Zr,U:Xr,V:qr,w:Gr,W:Qr,x:null,X:null,y:jr,Y:$r,Z:ti,"%":Ne},Z={a:O,A:P,b:N,B:z,c:null,d:He,e:He,f:ii,g:mi,G:yi,H:ei,I:ni,j:ri,L:un,m:si,M:ai,p:at,q:ot,Q:Ve,s:Pe,S:oi,u:ci,U:li,V:ui,w:fi,W:hi,x:null,X:null,y:di,Y:gi,Z:ki,"%":Ne},j={a:_,A:x,b:o,B:f,c:m,d:Ie,e:Ie,f:Ar,g:Ae,G:Ee,H:We,I:We,j:Ur,L:Er,m:Yr,M:Fr,p:U,q:_r,Q:Wr,s:Or,S:Lr,u:wr,U:Cr,V:Dr,w:xr,W:Mr,x:u,X:M,y:Ae,Y:Ee,Z:Sr,"%":Ir};E.x=b(n,E),E.X=b(r,E),E.c=b(e,E),Z.x=b(n,Z),Z.X=b(r,Z),Z.c=b(e,Z);function b(k,A){return function(Y){var l=[],B=-1,V=0,Q=k.length,J,$,ct;for(Y instanceof Date||(Y=new Date(+Y));++B<Q;)k.charCodeAt(B)===37&&(l.push(k.slice(V,B)),($=Le[J=k.charAt(++B)])!=null?J=k.charAt(++B):$=J==="e"?" ":"0",(ct=A[J])&&(J=ct(Y,$)),l.push(J),V=B+1);return l.push(k.slice(V,B)),l.join("")}}function W(k,A){return function(Y){var l=Ft(1900,void 0,1),B=v(l,k,Y+="",0),V,Q;if(B!=Y.length)return null;if("Q"in l)return new Date(l.Q);if("s"in l)return new Date(l.s*1e3+("L"in l?l.L:0));if(A&&!("Z"in l)&&(l.Z=0),"p"in l&&(l.H=l.H%12+l.p*12),l.m===void 0&&(l.m="q"in l?l.q:0),"V"in l){if(l.V<1||l.V>53)return null;"w"in l||(l.w=1),"Z"in l?(V=le(Ft(l.y,0,1)),Q=V.getUTCDay(),V=Q>4||Q===0?jt.ceil(V):jt(V),V=Te.offset(V,(l.V-1)*7),l.y=V.getUTCFullYear(),l.m=V.getUTCMonth(),l.d=V.getUTCDate()+(l.w+6)%7):(V=ce(Ft(l.y,0,1)),Q=V.getDay(),V=Q>4||Q===0?Wt.ceil(V):Wt(V),V=pt.offset(V,(l.V-1)*7),l.y=V.getFullYear(),l.m=V.getMonth(),l.d=V.getDate()+(l.w+6)%7)}else("W"in l||"U"in l)&&("w"in l||(l.w="u"in l?l.u%7:"W"in l?1:0),Q="Z"in l?le(Ft(l.y,0,1)).getUTCDay():ce(Ft(l.y,0,1)).getDay(),l.m=0,l.d="W"in l?(l.w+6)%7+l.W*7-(Q+5)%7:l.w+l.U*7-(Q+6)%7);return"Z"in l?(l.H+=l.Z/100|0,l.M+=l.Z%100,le(l)):ce(l)}}function v(k,A,Y,l){for(var B=0,V=A.length,Q=Y.length,J,$;B<V;){if(l>=Q)return-1;if(J=A.charCodeAt(B++),J===37){if(J=A.charAt(B++),$=j[J in Le?A.charAt(B++):J],!$||(l=$(k,Y,l))<0)return-1}else if(J!=Y.charCodeAt(l++))return-1}return l}function U(k,A,Y){var l=p.exec(A.slice(Y));return l?(k.p=g.get(l[0].toLowerCase()),Y+l[0].length):-1}function _(k,A,Y){var l=T.exec(A.slice(Y));return l?(k.w=q.get(l[0].toLowerCase()),Y+l[0].length):-1}function x(k,A,Y){var l=F.exec(A.slice(Y));return l?(k.w=w.get(l[0].toLowerCase()),Y+l[0].length):-1}function o(k,A,Y){var l=L.exec(A.slice(Y));return l?(k.m=H.get(l[0].toLowerCase()),Y+l[0].length):-1}function f(k,A,Y){var l=I.exec(A.slice(Y));return l?(k.m=D.get(l[0].toLowerCase()),Y+l[0].length):-1}function m(k,A,Y){return v(k,e,A,Y)}function u(k,A,Y){return v(k,n,A,Y)}function M(k,A,Y){return v(k,r,A,Y)}function c(k){return a[k.getDay()]}function G(k){return s[k.getDay()]}function d(k){return S[k.getMonth()]}function h(k){return y[k.getMonth()]}function C(k){return i[+(k.getHours()>=12)]}function X(k){return 1+~~(k.getMonth()/3)}function O(k){return a[k.getUTCDay()]}function P(k){return s[k.getUTCDay()]}function N(k){return S[k.getUTCMonth()]}function z(k){return y[k.getUTCMonth()]}function at(k){return i[+(k.getUTCHours()>=12)]}function ot(k){return 1+~~(k.getUTCMonth()/3)}return{format:function(k){var A=b(k+="",E);return A.toString=function(){return k},A},parse:function(k){var A=W(k+="",!1);return A.toString=function(){return k},A},utcFormat:function(k){var A=b(k+="",Z);return A.toString=function(){return k},A},utcParse:function(k){var A=W(k+="",!0);return A.toString=function(){return k},A}}}var Le={"-":"",_:" ",0:"0"},et=/^\s*\d+/,Tr=/^%/,vr=/[\\^$*+?|[\]().{}]/g;function R(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(e)+i:i)}function br(t){return t.replace(vr,"\\$&")}function Lt(t){return new RegExp("^(?:"+t.map(br).join("|")+")","i")}function Et(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function xr(t,e,n){var r=et.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function wr(t,e,n){var r=et.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Cr(t,e,n){var r=et.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Dr(t,e,n){var r=et.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Mr(t,e,n){var r=et.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Ee(t,e,n){var r=et.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Ae(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 Sr(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 _r(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 Yr(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 Ie(t,e,n){var r=et.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Ur(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 We(t,e,n){var r=et.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Fr(t,e,n){var r=et.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Lr(t,e,n){var r=et.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Er(t,e,n){var r=et.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Ar(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 Ir(t,e,n){var r=Tr.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Wr(t,e,n){var r=et.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=et.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Oe(t,e){return R(t.getDate(),e,2)}function Hr(t,e){return R(t.getHours(),e,2)}function Nr(t,e){return R(t.getHours()%12||12,e,2)}function Vr(t,e){return R(1+pt.count(gt(t),t),e,3)}function cn(t,e){return R(t.getMilliseconds(),e,3)}function Pr(t,e){return cn(t,e)+"000"}function zr(t,e){return R(t.getMonth()+1,e,2)}function Rr(t,e){return R(t.getMinutes(),e,2)}function Br(t,e){return R(t.getSeconds(),e,2)}function Zr(t){var e=t.getDay();return e===0?7:e}function Xr(t,e){return R(Ht.count(gt(t)-1,t),e,2)}function ln(t){var e=t.getDay();return e>=4||e===0?Tt(t):Tt.ceil(t)}function qr(t,e){return t=ln(t),R(Tt.count(gt(t),t)+(gt(t).getDay()===4),e,2)}function Gr(t){return t.getDay()}function Qr(t,e){return R(Wt.count(gt(t)-1,t),e,2)}function jr(t,e){return R(t.getFullYear()%100,e,2)}function Jr(t,e){return t=ln(t),R(t.getFullYear()%100,e,2)}function $r(t,e){return R(t.getFullYear()%1e4,e,4)}function Kr(t,e){var n=t.getDay();return t=n>=4||n===0?Tt(t):Tt.ceil(t),R(t.getFullYear()%1e4,e,4)}function ti(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+R(e/60|0,"0",2)+R(e%60,"0",2)}function He(t,e){return R(t.getUTCDate(),e,2)}function ei(t,e){return R(t.getUTCHours(),e,2)}function ni(t,e){return R(t.getUTCHours()%12||12,e,2)}function ri(t,e){return R(1+Te.count(vt(t),t),e,3)}function un(t,e){return R(t.getUTCMilliseconds(),e,3)}function ii(t,e){return un(t,e)+"000"}function si(t,e){return R(t.getUTCMonth()+1,e,2)}function ai(t,e){return R(t.getUTCMinutes(),e,2)}function oi(t,e){return R(t.getUTCSeconds(),e,2)}function ci(t){var e=t.getUTCDay();return e===0?7:e}function li(t,e){return R(on.count(vt(t)-1,t),e,2)}function fn(t){var e=t.getUTCDay();return e>=4||e===0?Yt(t):Yt.ceil(t)}function ui(t,e){return t=fn(t),R(Yt.count(vt(t),t)+(vt(t).getUTCDay()===4),e,2)}function fi(t){return t.getUTCDay()}function hi(t,e){return R(jt.count(vt(t)-1,t),e,2)}function di(t,e){return R(t.getUTCFullYear()%100,e,2)}function mi(t,e){return t=fn(t),R(t.getUTCFullYear()%100,e,2)}function gi(t,e){return R(t.getUTCFullYear()%1e4,e,4)}function yi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Yt(t):Yt.ceil(t),R(t.getUTCFullYear()%1e4,e,4)}function ki(){return"+0000"}function Ne(){return"%"}function Ve(t){return+t}function Pe(t){return Math.floor(+t/1e3)}var Ct,Jt;pi({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function pi(t){return Ct=pr(t),Jt=Ct.format,Ct.parse,Ct.utcFormat,Ct.utcParse,Ct}function Ti(t){return new Date(t)}function vi(t){return t instanceof Date?+t:+new Date(+t)}function hn(t,e,n,r,i,s,a,y,S,p){var g=Nn(),F=g.invert,w=g.domain,T=p(".%L"),q=p(":%S"),I=p("%I:%M"),D=p("%I %p"),L=p("%a %d"),H=p("%b %d"),E=p("%B"),Z=p("%Y");function j(b){return(S(b)<b?T:y(b)<b?q:a(b)<b?I:s(b)<b?D:r(b)<b?i(b)<b?L:H:n(b)<b?E:Z)(b)}return g.invert=function(b){return new Date(F(b))},g.domain=function(b){return arguments.length?w(Array.from(b,vi)):w().map(Ti)},g.ticks=function(b){var W=w();return t(W[0],W[W.length-1],b??10)},g.tickFormat=function(b,W){return W==null?j:p(W)},g.nice=function(b){var W=w();return(!b||typeof b.range!="function")&&(b=e(W[0],W[W.length-1],b??10)),b?w(ar(W,b)):g},g.copy=function(){return Vn(g,hn(t,e,n,r,i,s,a,y,S,p))},g}function bi(){return zn.apply(hn(yr,kr,gt,Ot,Ht,pt,It,At,kt,Jt).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var dn={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(ye,function(){var n="day";return function(r,i,s){var a=function(p){return p.add(4-p.isoWeekday(),n)},y=i.prototype;y.isoWeekYear=function(){return a(this).year()},y.isoWeek=function(p){if(!this.$utils().u(p))return this.add(7*(p-this.isoWeek()),n);var g,F,w,T,q=a(this),I=(g=this.isoWeekYear(),F=this.$u,w=(F?s.utc:s)().year(g).startOf("year"),T=4-w.isoWeekday(),w.isoWeekday()>4&&(T+=7),w.add(T,n));return q.diff(I,"week")+1},y.isoWeekday=function(p){return this.$utils().u(p)?this.day()||7:this.day(this.day()%7?p:p-7)};var S=y.startOf;y.startOf=function(p,g){var F=this.$utils(),w=!!F.u(g)||g;return F.p(p)==="isoweek"?w?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):S.bind(this)(p,g)}}})})(dn);var xi=dn.exports;const wi=ke(xi);var mn={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(ye,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,S={},p=function(D){return(D=+D)+(D>68?1900:2e3)},g=function(D){return function(L){this[D]=+L}},F=[/[+-]\d\d:?(\d\d)?|Z/,function(D){(this.zone||(this.zone={})).offset=function(L){if(!L||L==="Z")return 0;var H=L.match(/([+-]|\d\d)/g),E=60*H[1]+(+H[2]||0);return E===0?0:H[0]==="+"?-E:E}(D)}],w=function(D){var L=S[D];return L&&(L.indexOf?L:L.s.concat(L.f))},T=function(D,L){var H,E=S.meridiem;if(E){for(var Z=1;Z<=24;Z+=1)if(D.indexOf(E(Z,0,L))>-1){H=Z>12;break}}else H=D===(L?"pm":"PM");return H},q={A:[y,function(D){this.afternoon=T(D,!1)}],a:[y,function(D){this.afternoon=T(D,!0)}],Q:[i,function(D){this.month=3*(D-1)+1}],S:[i,function(D){this.milliseconds=100*+D}],SS:[s,function(D){this.milliseconds=10*+D}],SSS:[/\d{3}/,function(D){this.milliseconds=+D}],s:[a,g("seconds")],ss:[a,g("seconds")],m:[a,g("minutes")],mm:[a,g("minutes")],H:[a,g("hours")],h:[a,g("hours")],HH:[a,g("hours")],hh:[a,g("hours")],D:[a,g("day")],DD:[s,g("day")],Do:[y,function(D){var L=S.ordinal,H=D.match(/\d+/);if(this.day=H[0],L)for(var E=1;E<=31;E+=1)L(E).replace(/\[|\]/g,"")===D&&(this.day=E)}],w:[a,g("week")],ww:[s,g("week")],M:[a,g("month")],MM:[s,g("month")],MMM:[y,function(D){var L=w("months"),H=(w("monthsShort")||L.map(function(E){return E.slice(0,3)})).indexOf(D)+1;if(H<1)throw new Error;this.month=H%12||H}],MMMM:[y,function(D){var L=w("months").indexOf(D)+1;if(L<1)throw new Error;this.month=L%12||L}],Y:[/[+-]?\d+/,g("year")],YY:[s,function(D){this.year=p(D)}],YYYY:[/\d{4}/,g("year")],Z:F,ZZ:F};function I(D){var L,H;L=D,H=S&&S.formats;for(var E=(D=L.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(_,x,o){var f=o&&o.toUpperCase();return x||H[o]||n[o]||H[f].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(m,u,M){return u||M.slice(1)})})).match(r),Z=E.length,j=0;j<Z;j+=1){var b=E[j],W=q[b],v=W&&W[0],U=W&&W[1];E[j]=U?{regex:v,parser:U}:b.replace(/^\[|\]$/g,"")}return function(_){for(var x={},o=0,f=0;o<Z;o+=1){var m=E[o];if(typeof m=="string")f+=m.length;else{var u=m.regex,M=m.parser,c=_.slice(f),G=u.exec(c)[0];M.call(x,G),_=_.replace(G,"")}}return function(d){var h=d.afternoon;if(h!==void 0){var C=d.hours;h?C<12&&(d.hours+=12):C===12&&(d.hours=0),delete d.afternoon}}(x),x}}return function(D,L,H){H.p.customParseFormat=!0,D&&D.parseTwoDigitYear&&(p=D.parseTwoDigitYear);var E=L.prototype,Z=E.parse;E.parse=function(j){var b=j.date,W=j.utc,v=j.args;this.$u=W;var U=v[1];if(typeof U=="string"){var _=v[2]===!0,x=v[3]===!0,o=_||x,f=v[2];x&&(f=v[2]),S=this.$locale(),!_&&f&&(S=H.Ls[f]),this.$d=function(c,G,d,h){try{if(["x","X"].indexOf(G)>-1)return new Date((G==="X"?1e3:1)*c);var C=I(G)(c),X=C.year,O=C.month,P=C.day,N=C.hours,z=C.minutes,at=C.seconds,ot=C.milliseconds,k=C.zone,A=C.week,Y=new Date,l=P||(X||O?1:Y.getDate()),B=X||Y.getFullYear(),V=0;X&&!O||(V=O>0?O-1:Y.getMonth());var Q,J=N||0,$=z||0,ct=at||0,yt=ot||0;return k?new Date(Date.UTC(B,V,l,J,$,ct,yt+60*k.offset*1e3)):d?new Date(Date.UTC(B,V,l,J,$,ct,yt)):(Q=new Date(B,V,l,J,$,ct,yt),A&&(Q=h(Q).week(A).toDate()),Q)}catch{return new Date("")}}(b,U,W,H),this.init(),f&&f!==!0&&(this.$L=this.locale(f).$L),o&&b!=this.format(U)&&(this.$d=new Date("")),S={}}else if(U instanceof Array)for(var m=U.length,u=1;u<=m;u+=1){v[1]=U[u-1];var M=H.apply(this,v);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}u===m&&(this.$d=new Date(""))}else Z.call(this,j)}}})})(mn);var Ci=mn.exports;const Di=ke(Ci);var gn={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(ye,function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,S=this.$locale();if(!this.isValid())return s.bind(this)(a);var p=this.$utils(),g=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(F){switch(F){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return S.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return S.ordinal(y.week(),"W");case"w":case"ww":return p.s(y.week(),F==="w"?1:2,"0");case"W":case"WW":return p.s(y.isoWeek(),F==="W"?1:2,"0");case"k":case"kk":return p.s(String(y.$H===0?24:y.$H),F==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return F}});return s.bind(this)(g)}}})})(gn);var Mi=gn.exports;const Si=ke(Mi);var he=function(){var t=function(x,o,f,m){for(f=f||{},m=x.length;m--;f[x[m]]=o);return f},e=[6,8,10,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,30,32,33,35,37],n=[1,25],r=[1,26],i=[1,27],s=[1,28],a=[1,29],y=[1,30],S=[1,31],p=[1,9],g=[1,10],F=[1,11],w=[1,12],T=[1,13],q=[1,14],I=[1,15],D=[1,16],L=[1,18],H=[1,19],E=[1,20],Z=[1,21],j=[1,22],b=[1,24],W=[1,32],v={trace:function(){},yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,dateFormat:19,inclusiveEndDates:20,topAxis:21,axisFormat:22,tickInterval:23,excludes:24,includes:25,todayMarker:26,title:27,acc_title:28,acc_title_value:29,acc_descr:30,acc_descr_value:31,acc_descr_multiline_value:32,section:33,clickStatement:34,taskTxt:35,taskData:36,click:37,callbackname:38,callbackargs:39,href:40,clickStatementDebug:41,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",19:"dateFormat",20:"inclusiveEndDates",21:"topAxis",22:"axisFormat",23:"tickInterval",24:"excludes",25:"includes",26:"todayMarker",27:"title",28:"acc_title",29:"acc_title_value",30:"acc_descr",31:"acc_descr_value",32:"acc_descr_multiline_value",33:"section",35:"taskTxt",36:"taskData",37:"click",38:"callbackname",39:"callbackargs",40:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[34,2],[34,3],[34,3],[34,4],[34,3],[34,4],[34,2],[41,2],[41,3],[41,3],[41,4],[41,3],[41,4],[41,2]],performAction:function(o,f,m,u,M,c,G){var d=c.length-1;switch(M){case 1:return c[d-1];case 2:this.$=[];break;case 3:c[d-1].push(c[d]),this.$=c[d-1];break;case 4:case 5:this.$=c[d];break;case 6:case 7:this.$=[];break;case 8:u.setWeekday("monday");break;case 9:u.setWeekday("tuesday");break;case 10:u.setWeekday("wednesday");break;case 11:u.setWeekday("thursday");break;case 12:u.setWeekday("friday");break;case 13:u.setWeekday("saturday");break;case 14:u.setWeekday("sunday");break;case 15:u.setDateFormat(c[d].substr(11)),this.$=c[d].substr(11);break;case 16:u.enableInclusiveEndDates(),this.$=c[d].substr(18);break;case 17:u.TopAxis(),this.$=c[d].substr(8);break;case 18:u.setAxisFormat(c[d].substr(11)),this.$=c[d].substr(11);break;case 19:u.setTickInterval(c[d].substr(13)),this.$=c[d].substr(13);break;case 20:u.setExcludes(c[d].substr(9)),this.$=c[d].substr(9);break;case 21:u.setIncludes(c[d].substr(9)),this.$=c[d].substr(9);break;case 22:u.setTodayMarker(c[d].substr(12)),this.$=c[d].substr(12);break;case 24:u.setDiagramTitle(c[d].substr(6)),this.$=c[d].substr(6);break;case 25:this.$=c[d].trim(),u.setAccTitle(this.$);break;case 26:case 27:this.$=c[d].trim(),u.setAccDescription(this.$);break;case 28:u.addSection(c[d].substr(8)),this.$=c[d].substr(8);break;case 30:u.addTask(c[d-1],c[d]),this.$="task";break;case 31:this.$=c[d-1],u.setClickEvent(c[d-1],c[d],null);break;case 32:this.$=c[d-2],u.setClickEvent(c[d-2],c[d-1],c[d]);break;case 33:this.$=c[d-2],u.setClickEvent(c[d-2],c[d-1],null),u.setLink(c[d-2],c[d]);break;case 34:this.$=c[d-3],u.setClickEvent(c[d-3],c[d-2],c[d-1]),u.setLink(c[d-3],c[d]);break;case 35:this.$=c[d-2],u.setClickEvent(c[d-2],c[d],null),u.setLink(c[d-2],c[d-1]);break;case 36:this.$=c[d-3],u.setClickEvent(c[d-3],c[d-1],c[d]),u.setLink(c[d-3],c[d-2]);break;case 37:this.$=c[d-1],u.setLink(c[d-1],c[d]);break;case 38:case 44:this.$=c[d-1]+" "+c[d];break;case 39:case 40:case 42:this.$=c[d-2]+" "+c[d-1]+" "+c[d];break;case 41:case 43:this.$=c[d-3]+" "+c[d-2]+" "+c[d-1]+" "+c[d];break}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:S,19:p,20:g,21:F,22:w,23:T,24:q,25:I,26:D,27:L,28:H,30:E,32:Z,33:j,34:23,35:b,37:W},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:33,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:S,19:p,20:g,21:F,22:w,23:T,24:q,25:I,26:D,27:L,28:H,30:E,32:Z,33:j,34:23,35:b,37:W},t(e,[2,5]),t(e,[2,6]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),{29:[1,34]},{31:[1,35]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),{36:[1,36]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),{38:[1,37],40:[1,38]},t(e,[2,4]),t(e,[2,25]),t(e,[2,26]),t(e,[2,30]),t(e,[2,31],{39:[1,39],40:[1,40]}),t(e,[2,37],{38:[1,41]}),t(e,[2,32],{40:[1,42]}),t(e,[2,33]),t(e,[2,35],{39:[1,43]}),t(e,[2,34]),t(e,[2,36])],defaultActions:{},parseError:function(o,f){if(f.recoverable)this.trace(o);else{var m=new Error(o);throw m.hash=f,m}},parse:function(o){var f=this,m=[0],u=[],M=[null],c=[],G=this.table,d="",h=0,C=0,X=2,O=1,P=c.slice.call(arguments,1),N=Object.create(this.lexer),z={yy:{}};for(var at in this.yy)Object.prototype.hasOwnProperty.call(this.yy,at)&&(z.yy[at]=this.yy[at]);N.setInput(o,z.yy),z.yy.lexer=N,z.yy.parser=this,typeof N.yylloc>"u"&&(N.yylloc={});var ot=N.yylloc;c.push(ot);var k=N.options&&N.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function A(){var lt;return lt=u.pop()||N.lex()||O,typeof lt!="number"&&(lt instanceof Array&&(u=lt,lt=u.pop()),lt=f.symbols_[lt]||lt),lt}for(var Y,l,B,V,Q={},J,$,ct,yt;;){if(l=m[m.length-1],this.defaultActions[l]?B=this.defaultActions[l]:((Y===null||typeof Y>"u")&&(Y=A()),B=G[l]&&G[l][Y]),typeof B>"u"||!B.length||!B[0]){var zt="";yt=[];for(J in G[l])this.terminals_[J]&&J>X&&yt.push("'"+this.terminals_[J]+"'");N.showPosition?zt="Parse error on line "+(h+1)+`:
2
+ `+N.showPosition()+`
3
+ Expecting `+yt.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":zt="Parse error on line "+(h+1)+": Unexpected "+(Y==O?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(zt,{text:N.match,token:this.terminals_[Y]||Y,line:N.yylineno,loc:ot,expected:yt})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+l+", token: "+Y);switch(B[0]){case 1:m.push(Y),M.push(N.yytext),c.push(N.yylloc),m.push(B[1]),Y=null,C=N.yyleng,d=N.yytext,h=N.yylineno,ot=N.yylloc;break;case 2:if($=this.productions_[B[1]][1],Q.$=M[M.length-$],Q._$={first_line:c[c.length-($||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-($||1)].first_column,last_column:c[c.length-1].last_column},k&&(Q._$.range=[c[c.length-($||1)].range[0],c[c.length-1].range[1]]),V=this.performAction.apply(Q,[d,C,h,z.yy,B[1],M,c].concat(P)),typeof V<"u")return V;$&&(m=m.slice(0,-1*$*2),M=M.slice(0,-1*$),c=c.slice(0,-1*$)),m.push(this.productions_[B[1]][0]),M.push(Q.$),c.push(Q._$),ct=G[m[m.length-2]][m[m.length-1]],m.push(ct);break;case 3:return!0}}return!0}},U=function(){var x={EOF:1,parseError:function(f,m){if(this.yy.parser)this.yy.parser.parseError(f,m);else throw new Error(f)},setInput:function(o,f){return this.yy=f||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var f=o.match(/(?:\r\n?|\n).*/g);return f?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},unput:function(o){var f=o.length,m=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),m.length-1&&(this.yylineno-=m.length-1);var M=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:m?(m.length===u.length?this.yylloc.first_column:0)+u[u.length-m.length].length-m[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[M[0],M[0]+this.yyleng-f]),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).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(o){this.unput(this.match.slice(o))},pastInput:function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var o=this.pastInput(),f=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
5
+ `+f+"^"},test_match:function(o,f){var m,u,M;if(this.options.backtrack_lexer&&(M={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&&(M.yylloc.range=this.yylloc.range.slice(0))),u=o[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],m=this.performAction.call(this,this.yy,this,f,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),m)return m;if(this._backtrack){for(var c in M)this[c]=M[c];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,f,m,u;this._more||(this.yytext="",this.match="");for(var M=this._currentRules(),c=0;c<M.length;c++)if(m=this._input.match(this.rules[M[c]]),m&&(!f||m[0].length>f[0].length)){if(f=m,u=c,this.options.backtrack_lexer){if(o=this.test_match(m,M[c]),o!==!1)return o;if(this._backtrack){f=!1;continue}else return!1}else if(!this.options.flex)break}return f?(o=this.test_match(f,M[u]),o!==!1?o:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var f=this.next();return f||this.lex()},begin:function(f){this.conditionStack.push(f)},popState:function(){var f=this.conditionStack.length-1;return f>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(f){return f=this.conditionStack.length-1-Math.abs(f||0),f>=0?this.conditionStack[f]:"INITIAL"},pushState:function(f){this.begin(f)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(f,m,u,M){switch(u){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),28;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),30;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 40;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 38;case 21:this.popState();break;case 22:return 39;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 37;case 26:return 4;case 27:return 19;case 28:return 20;case 29:return 21;case 30:return 22;case 31:return 23;case 32:return 25;case 33:return 24;case 34:return 26;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return"date";case 43:return 27;case 44:return"accDescription";case 45:return 33;case 46:return 35;case 47:return 36;case 48:return":";case 49:return 6;case 50:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50],inclusive:!0}}};return x}();v.lexer=U;function _(){this.yy={}}return _.prototype=v,v.Parser=_,new _}();he.parser=he;const _i=he;nt.extend(wi);nt.extend(Di);nt.extend(Si);let it="",ve="",be,xe="",Nt=[],Vt=[],we={},Ce=[],$t=[],Ut="",De="";const yn=["active","done","crit","milestone"];let Me=[],Pt=!1,Se=!1,_e="sunday",de=0;const Yi=function(){Ce=[],$t=[],Ut="",Me=[],Xt=0,ge=void 0,qt=void 0,K=[],it="",ve="",De="",be=void 0,xe="",Nt=[],Vt=[],Pt=!1,Se=!1,de=0,we={},Wn(),_e="sunday"},Ui=function(t){ve=t},Fi=function(){return ve},Li=function(t){be=t},Ei=function(){return be},Ai=function(t){xe=t},Ii=function(){return xe},Wi=function(t){it=t},Oi=function(){Pt=!0},Hi=function(){return Pt},Ni=function(){Se=!0},Vi=function(){return Se},Pi=function(t){De=t},zi=function(){return De},Ri=function(){return it},Bi=function(t){Nt=t.toLowerCase().split(/[\s,]+/)},Zi=function(){return Nt},Xi=function(t){Vt=t.toLowerCase().split(/[\s,]+/)},qi=function(){return Vt},Gi=function(){return we},Qi=function(t){Ut=t,Ce.push(t)},ji=function(){return Ce},Ji=function(){let t=ze();const e=10;let n=0;for(;!t&&n<e;)t=ze(),n++;return $t=K,$t},kn=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()))},$i=function(t){_e=t},Ki=function(){return _e},pn=function(t,e,n,r){if(!n.length||t.manualEndTime)return;let i;t.startTime instanceof Date?i=nt(t.startTime):i=nt(t.startTime,e,!0),i=i.add(1,"d");let s;t.endTime instanceof Date?s=nt(t.endTime):s=nt(t.endTime,e,!0);const[a,y]=ts(i,s,e,n,r);t.endTime=a.toDate(),t.renderEndTime=y},ts=function(t,e,n,r,i){let s=!1,a=null;for(;t<=e;)s||(a=e.toDate()),s=kn(t,n,r,i),s&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,a]},me=function(t,e,n){n=n.trim();const i=/^after\s+(?<ids>[\d\w- ]+)/.exec(n);if(i!==null){let a=null;for(const S of i.groups.ids.split(" ")){let p=wt(S);p!==void 0&&(!a||p.endTime>a.endTime)&&(a=p)}if(a)return a.endTime;const y=new Date;return y.setHours(0,0,0,0),y}let s=nt(n,e.trim(),!0);if(s.isValid())return s.toDate();{Gt.debug("Invalid date:"+n),Gt.debug("With date format:"+e.trim());const a=new Date(n);if(a===void 0||isNaN(a.getTime())||a.getFullYear()<-1e4||a.getFullYear()>1e4)throw new Error("Invalid date:"+n);return a}},Tn=function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},vn=function(t,e,n,r=!1){n=n.trim();const s=/^until\s+(?<ids>[\d\w- ]+)/.exec(n);if(s!==null){let g=null;for(const w of s.groups.ids.split(" ")){let T=wt(w);T!==void 0&&(!g||T.startTime<g.startTime)&&(g=T)}if(g)return g.startTime;const F=new Date;return F.setHours(0,0,0,0),F}let a=nt(n,e.trim(),!0);if(a.isValid())return r&&(a=a.add(1,"d")),a.toDate();let y=nt(t);const[S,p]=Tn(n);if(!Number.isNaN(S)){const g=y.add(S,p);g.isValid()&&(y=g)}return y.toDate()};let Xt=0;const St=function(t){return t===void 0?(Xt=Xt+1,"task"+Xt):t},es=function(t,e){let n;e.substr(0,1)===":"?n=e.substr(1,e.length):n=e;const r=n.split(","),i={};Cn(r,i,yn);for(let a=0;a<r.length;a++)r[a]=r[a].trim();let s="";switch(r.length){case 1:i.id=St(),i.startTime=t.endTime,s=r[0];break;case 2:i.id=St(),i.startTime=me(void 0,it,r[0]),s=r[1];break;case 3:i.id=St(r[0]),i.startTime=me(void 0,it,r[1]),s=r[2];break}return s&&(i.endTime=vn(i.startTime,it,s,Pt),i.manualEndTime=nt(s,"YYYY-MM-DD",!0).isValid(),pn(i,it,Vt,Nt)),i},ns=function(t,e){let n;e.substr(0,1)===":"?n=e.substr(1,e.length):n=e;const r=n.split(","),i={};Cn(r,i,yn);for(let s=0;s<r.length;s++)r[s]=r[s].trim();switch(r.length){case 1:i.id=St(),i.startTime={type:"prevTaskEnd",id:t},i.endTime={data:r[0]};break;case 2:i.id=St(),i.startTime={type:"getStartDate",startData:r[0]},i.endTime={data:r[1]};break;case 3:i.id=St(r[0]),i.startTime={type:"getStartDate",startData:r[1]},i.endTime={data:r[2]};break}return i};let ge,qt,K=[];const bn={},rs=function(t,e){const n={section:Ut,type:Ut,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},r=ns(qt,e);n.raw.startTime=r.startTime,n.raw.endTime=r.endTime,n.id=r.id,n.prevTaskId=qt,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.order=de,de++;const i=K.push(n);qt=n.id,bn[n.id]=i-1},wt=function(t){const e=bn[t];return K[e]},is=function(t,e){const n={section:Ut,type:Ut,description:t,task:t,classes:[]},r=es(ge,e);n.startTime=r.startTime,n.endTime=r.endTime,n.id=r.id,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,ge=n,$t.push(n)},ze=function(){const t=function(n){const r=K[n];let i="";switch(K[n].raw.startTime.type){case"prevTaskEnd":{const s=wt(r.prevTaskId);r.startTime=s.endTime;break}case"getStartDate":i=me(void 0,it,K[n].raw.startTime.startData),i&&(K[n].startTime=i);break}return K[n].startTime&&(K[n].endTime=vn(K[n].startTime,it,K[n].raw.endTime.data,Pt),K[n].endTime&&(K[n].processed=!0,K[n].manualEndTime=nt(K[n].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),pn(K[n],it,Vt,Nt))),K[n].processed};let e=!0;for(const[n,r]of K.entries())t(n),e=e&&r.processed;return e},ss=function(t,e){let n=e;Dt().securityLevel!=="loose"&&(n=In.sanitizeUrl(e)),t.split(",").forEach(function(r){wt(r)!==void 0&&(wn(r,()=>{window.open(n,"_self")}),we[r]=n)}),xn(t,"clickable")},xn=function(t,e){t.split(",").forEach(function(n){let r=wt(n);r!==void 0&&r.classes.push(e)})},as=function(t,e,n){if(Dt().securityLevel!=="loose"||e===void 0)return;let r=[];if(typeof n=="string"){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let s=0;s<r.length;s++){let a=r[s].trim();a.charAt(0)==='"'&&a.charAt(a.length-1)==='"'&&(a=a.substr(1,a.length-2)),r[s]=a}}r.length===0&&r.push(t),wt(t)!==void 0&&wn(t,()=>{On.runFunc(e,...r)})},wn=function(t,e){Me.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()})})},os=function(t,e,n){t.split(",").forEach(function(r){as(r,e,n)}),xn(t,"clickable")},cs=function(t){Me.forEach(function(e){e(t)})},ls={getConfig:()=>Dt().gantt,clear:Yi,setDateFormat:Wi,getDateFormat:Ri,enableInclusiveEndDates:Oi,endDatesAreInclusive:Hi,enableTopAxis:Ni,topAxisEnabled:Vi,setAxisFormat:Ui,getAxisFormat:Fi,setTickInterval:Li,getTickInterval:Ei,setTodayMarker:Ai,getTodayMarker:Ii,setAccTitle:Ln,getAccTitle:Fn,setDiagramTitle:Un,getDiagramTitle:Yn,setDisplayMode:Pi,getDisplayMode:zi,setAccDescription:_n,getAccDescription:Sn,addSection:Qi,getSections:ji,getTasks:Ji,addTask:rs,findTaskById:wt,addTaskOrg:is,setIncludes:Bi,getIncludes:Zi,setExcludes:Xi,getExcludes:qi,setClickEvent:os,setLink:ss,getLinks:Gi,bindFunctions:cs,parseDuration:Tn,isInvalidDate:kn,setWeekday:$i,getWeekday:Ki};function Cn(t,e,n){let r=!0;for(;r;)r=!1,n.forEach(function(i){const s="^\\s*"+i+"\\s*$",a=new RegExp(s);t[0].match(a)&&(e[i]=!0,t.shift(1),r=!0)})}const us=function(){Gt.debug("Something is calling, setConf, remove the call")},Re={monday:Wt,tuesday:nn,wednesday:rn,thursday:Tt,friday:sn,saturday:an,sunday:Ht},fs=(t,e)=>{let n=[...t].map(()=>-1/0),r=[...t].sort((s,a)=>s.startTime-a.startTime||s.order-a.order),i=0;for(const s of r)for(let a=0;a<n.length;a++)if(s.startTime>=n[a]){n[a]=s.endTime,s.order=a+e,a>i&&(i=a);break}return i};let ut;const hs=function(t,e,n,r){const i=Dt().gantt,s=Dt().securityLevel;let a;s==="sandbox"&&(a=Rt("#i"+e));const y=s==="sandbox"?Rt(a.nodes()[0].contentDocument.body):Rt("body"),S=s==="sandbox"?a.nodes()[0].contentDocument:document,p=S.getElementById(e);ut=p.parentElement.offsetWidth,ut===void 0&&(ut=1200),i.useWidth!==void 0&&(ut=i.useWidth);const g=r.db.getTasks();let F=[];for(const v of g)F.push(v.type);F=W(F);const w={};let T=2*i.topPadding;if(r.db.getDisplayMode()==="compact"||i.displayMode==="compact"){const v={};for(const _ of g)v[_.section]===void 0?v[_.section]=[_]:v[_.section].push(_);let U=0;for(const _ of Object.keys(v)){const x=fs(v[_],U)+1;U+=x,T+=x*(i.barHeight+i.barGap),w[_]=x}}else{T+=g.length*(i.barHeight+i.barGap);for(const v of F)w[v]=g.filter(U=>U.type===v).length}p.setAttribute("viewBox","0 0 "+ut+" "+T);const q=y.select(`[id="${e}"]`),I=bi().domain([Bn(g,function(v){return v.startTime}),Rn(g,function(v){return v.endTime})]).rangeRound([0,ut-i.leftPadding-i.rightPadding]);function D(v,U){const _=v.startTime,x=U.startTime;let o=0;return _>x?o=1:_<x&&(o=-1),o}g.sort(D),L(g,ut,T),En(q,T,ut,i.useMaxWidth),q.append("text").text(r.db.getDiagramTitle()).attr("x",ut/2).attr("y",i.titleTopMargin).attr("class","titleText");function L(v,U,_){const x=i.barHeight,o=x+i.barGap,f=i.topPadding,m=i.leftPadding,u=Pn().domain([0,F.length]).range(["#00B9FA","#F95002"]).interpolate(sr);E(o,f,m,U,_,v,r.db.getExcludes(),r.db.getIncludes()),Z(m,f,U,_),H(v,o,f,m,x,u,U),j(o,f),b(m,f,U,_)}function H(v,U,_,x,o,f,m){const M=[...new Set(v.map(h=>h.order))].map(h=>v.find(C=>C.order===h));q.append("g").selectAll("rect").data(M).enter().append("rect").attr("x",0).attr("y",function(h,C){return C=h.order,C*U+_-2}).attr("width",function(){return m-i.rightPadding/2}).attr("height",U).attr("class",function(h){for(const[C,X]of F.entries())if(h.type===X)return"section section"+C%i.numberSectionStyles;return"section section0"});const c=q.append("g").selectAll("rect").data(v).enter(),G=r.db.getLinks();if(c.append("rect").attr("id",function(h){return h.id}).attr("rx",3).attr("ry",3).attr("x",function(h){return h.milestone?I(h.startTime)+x+.5*(I(h.endTime)-I(h.startTime))-.5*o:I(h.startTime)+x}).attr("y",function(h,C){return C=h.order,C*U+_}).attr("width",function(h){return h.milestone?o:I(h.renderEndTime||h.endTime)-I(h.startTime)}).attr("height",o).attr("transform-origin",function(h,C){return C=h.order,(I(h.startTime)+x+.5*(I(h.endTime)-I(h.startTime))).toString()+"px "+(C*U+_+.5*o).toString()+"px"}).attr("class",function(h){const C="task";let X="";h.classes.length>0&&(X=h.classes.join(" "));let O=0;for(const[N,z]of F.entries())h.type===z&&(O=N%i.numberSectionStyles);let P="";return h.active?h.crit?P+=" activeCrit":P=" active":h.done?h.crit?P=" doneCrit":P=" done":h.crit&&(P+=" crit"),P.length===0&&(P=" task"),h.milestone&&(P=" milestone "+P),P+=O,P+=" "+X,C+P}),c.append("text").attr("id",function(h){return h.id+"-text"}).text(function(h){return h.task}).attr("font-size",i.fontSize).attr("x",function(h){let C=I(h.startTime),X=I(h.renderEndTime||h.endTime);h.milestone&&(C+=.5*(I(h.endTime)-I(h.startTime))-.5*o),h.milestone&&(X=C+o);const O=this.getBBox().width;return O>X-C?X+O+1.5*i.leftPadding>m?C+x-5:X+x+5:(X-C)/2+C+x}).attr("y",function(h,C){return C=h.order,C*U+i.barHeight/2+(i.fontSize/2-2)+_}).attr("text-height",o).attr("class",function(h){const C=I(h.startTime);let X=I(h.endTime);h.milestone&&(X=C+o);const O=this.getBBox().width;let P="";h.classes.length>0&&(P=h.classes.join(" "));let N=0;for(const[at,ot]of F.entries())h.type===ot&&(N=at%i.numberSectionStyles);let z="";return h.active&&(h.crit?z="activeCritText"+N:z="activeText"+N),h.done?h.crit?z=z+" doneCritText"+N:z=z+" doneText"+N:h.crit&&(z=z+" critText"+N),h.milestone&&(z+=" milestoneText"),O>X-C?X+O+1.5*i.leftPadding>m?P+" taskTextOutsideLeft taskTextOutside"+N+" "+z:P+" taskTextOutsideRight taskTextOutside"+N+" "+z+" width-"+O:P+" taskText taskText"+N+" "+z+" width-"+O}),Dt().securityLevel==="sandbox"){let h;h=Rt("#i"+e);const C=h.nodes()[0].contentDocument;c.filter(function(X){return G[X.id]!==void 0}).each(function(X){var O=C.querySelector("#"+X.id),P=C.querySelector("#"+X.id+"-text");const N=O.parentNode;var z=C.createElement("a");z.setAttribute("xlink:href",G[X.id]),z.setAttribute("target","_top"),N.appendChild(z),z.appendChild(O),z.appendChild(P)})}}function E(v,U,_,x,o,f,m,u){if(m.length===0&&u.length===0)return;let M,c;for(const{startTime:O,endTime:P}of f)(M===void 0||O<M)&&(M=O),(c===void 0||P>c)&&(c=P);if(!M||!c)return;if(nt(c).diff(nt(M),"year")>5){Gt.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 G=r.db.getDateFormat(),d=[];let h=null,C=nt(M);for(;C.valueOf()<=c;)r.db.isInvalidDate(C,G,m,u)?h?h.end=C:h={start:C,end:C}:h&&(d.push(h),h=null),C=C.add(1,"d");q.append("g").selectAll("rect").data(d).enter().append("rect").attr("id",function(O){return"exclude-"+O.start.format("YYYY-MM-DD")}).attr("x",function(O){return I(O.start)+_}).attr("y",i.gridLineStartPadding).attr("width",function(O){const P=O.end.add(1,"day");return I(P)-I(O.start)}).attr("height",o-U-i.gridLineStartPadding).attr("transform-origin",function(O,P){return(I(O.start)+_+.5*(I(O.end)-I(O.start))).toString()+"px "+(P*v+.5*o).toString()+"px"}).attr("class","exclude-range")}function Z(v,U,_,x){let o=$n(I).tickSize(-x+U+i.gridLineStartPadding).tickFormat(Jt(r.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));const m=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||i.tickInterval);if(m!==null){const u=m[1],M=m[2],c=r.db.getWeekday()||i.weekday;switch(M){case"millisecond":o.ticks(_t.every(u));break;case"second":o.ticks(kt.every(u));break;case"minute":o.ticks(At.every(u));break;case"hour":o.ticks(It.every(u));break;case"day":o.ticks(pt.every(u));break;case"week":o.ticks(Re[c].every(u));break;case"month":o.ticks(Ot.every(u));break}}if(q.append("g").attr("class","grid").attr("transform","translate("+v+", "+(x-50)+")").call(o).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),r.db.topAxisEnabled()||i.topAxis){let u=Jn(I).tickSize(-x+U+i.gridLineStartPadding).tickFormat(Jt(r.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));if(m!==null){const M=m[1],c=m[2],G=r.db.getWeekday()||i.weekday;switch(c){case"millisecond":u.ticks(_t.every(M));break;case"second":u.ticks(kt.every(M));break;case"minute":u.ticks(At.every(M));break;case"hour":u.ticks(It.every(M));break;case"day":u.ticks(pt.every(M));break;case"week":u.ticks(Re[G].every(M));break;case"month":u.ticks(Ot.every(M));break}}q.append("g").attr("class","grid").attr("transform","translate("+v+", "+U+")").call(u).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function j(v,U){let _=0;const x=Object.keys(w).map(o=>[o,w[o]]);q.append("g").selectAll("text").data(x).enter().append(function(o){const f=o[0].split(An.lineBreakRegex),m=-(f.length-1)/2,u=S.createElementNS("http://www.w3.org/2000/svg","text");u.setAttribute("dy",m+"em");for(const[M,c]of f.entries()){const G=S.createElementNS("http://www.w3.org/2000/svg","tspan");G.setAttribute("alignment-baseline","central"),G.setAttribute("x","10"),M>0&&G.setAttribute("dy","1em"),G.textContent=c,u.appendChild(G)}return u}).attr("x",10).attr("y",function(o,f){if(f>0)for(let m=0;m<f;m++)return _+=x[f-1][1],o[1]*v/2+_*v+U;else return o[1]*v/2+U}).attr("font-size",i.sectionFontSize).attr("class",function(o){for(const[f,m]of F.entries())if(o[0]===m)return"sectionTitle sectionTitle"+f%i.numberSectionStyles;return"sectionTitle"})}function b(v,U,_,x){const o=r.db.getTodayMarker();if(o==="off")return;const f=q.append("g").attr("class","today"),m=new Date,u=f.append("line");u.attr("x1",I(m)+v).attr("x2",I(m)+v).attr("y1",i.titleTopMargin).attr("y2",x-i.titleTopMargin).attr("class","today"),o!==""&&u.attr("style",o.replace(/,/g,";"))}function W(v){const U={},_=[];for(let x=0,o=v.length;x<o;++x)Object.prototype.hasOwnProperty.call(U,v[x])||(U[v[x]]=!0,_.push(v[x]));return _}},ds={setConf:us,draw:hs},ms=t=>`
7
+ .mermaid-main-font {
8
+ font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
9
+ }
10
+
11
+ .exclude-range {
12
+ fill: ${t.excludeBkgColor};
13
+ }
14
+
15
+ .section {
16
+ stroke: none;
17
+ opacity: 0.2;
18
+ }
19
+
20
+ .section0 {
21
+ fill: ${t.sectionBkgColor};
22
+ }
23
+
24
+ .section2 {
25
+ fill: ${t.sectionBkgColor2};
26
+ }
27
+
28
+ .section1,
29
+ .section3 {
30
+ fill: ${t.altSectionBkgColor};
31
+ opacity: 0.2;
32
+ }
33
+
34
+ .sectionTitle0 {
35
+ fill: ${t.titleColor};
36
+ }
37
+
38
+ .sectionTitle1 {
39
+ fill: ${t.titleColor};
40
+ }
41
+
42
+ .sectionTitle2 {
43
+ fill: ${t.titleColor};
44
+ }
45
+
46
+ .sectionTitle3 {
47
+ fill: ${t.titleColor};
48
+ }
49
+
50
+ .sectionTitle {
51
+ text-anchor: start;
52
+ font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
53
+ }
54
+
55
+
56
+ /* Grid and axis */
57
+
58
+ .grid .tick {
59
+ stroke: ${t.gridColor};
60
+ opacity: 0.8;
61
+ shape-rendering: crispEdges;
62
+ }
63
+
64
+ .grid .tick text {
65
+ font-family: ${t.fontFamily};
66
+ fill: ${t.textColor};
67
+ }
68
+
69
+ .grid path {
70
+ stroke-width: 0;
71
+ }
72
+
73
+
74
+ /* Today line */
75
+
76
+ .today {
77
+ fill: none;
78
+ stroke: ${t.todayLineColor};
79
+ stroke-width: 2px;
80
+ }
81
+
82
+
83
+ /* Task styling */
84
+
85
+ /* Default task */
86
+
87
+ .task {
88
+ stroke-width: 2;
89
+ }
90
+
91
+ .taskText {
92
+ text-anchor: middle;
93
+ font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
94
+ }
95
+
96
+ .taskTextOutsideRight {
97
+ fill: ${t.taskTextDarkColor};
98
+ text-anchor: start;
99
+ font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
100
+ }
101
+
102
+ .taskTextOutsideLeft {
103
+ fill: ${t.taskTextDarkColor};
104
+ text-anchor: end;
105
+ }
106
+
107
+
108
+ /* Special case clickable */
109
+
110
+ .task.clickable {
111
+ cursor: pointer;
112
+ }
113
+
114
+ .taskText.clickable {
115
+ cursor: pointer;
116
+ fill: ${t.taskTextClickableColor} !important;
117
+ font-weight: bold;
118
+ }
119
+
120
+ .taskTextOutsideLeft.clickable {
121
+ cursor: pointer;
122
+ fill: ${t.taskTextClickableColor} !important;
123
+ font-weight: bold;
124
+ }
125
+
126
+ .taskTextOutsideRight.clickable {
127
+ cursor: pointer;
128
+ fill: ${t.taskTextClickableColor} !important;
129
+ font-weight: bold;
130
+ }
131
+
132
+
133
+ /* Specific task settings for the sections*/
134
+
135
+ .taskText0,
136
+ .taskText1,
137
+ .taskText2,
138
+ .taskText3 {
139
+ fill: ${t.taskTextColor};
140
+ }
141
+
142
+ .task0,
143
+ .task1,
144
+ .task2,
145
+ .task3 {
146
+ fill: ${t.taskBkgColor};
147
+ stroke: ${t.taskBorderColor};
148
+ }
149
+
150
+ .taskTextOutside0,
151
+ .taskTextOutside2
152
+ {
153
+ fill: ${t.taskTextOutsideColor};
154
+ }
155
+
156
+ .taskTextOutside1,
157
+ .taskTextOutside3 {
158
+ fill: ${t.taskTextOutsideColor};
159
+ }
160
+
161
+
162
+ /* Active task */
163
+
164
+ .active0,
165
+ .active1,
166
+ .active2,
167
+ .active3 {
168
+ fill: ${t.activeTaskBkgColor};
169
+ stroke: ${t.activeTaskBorderColor};
170
+ }
171
+
172
+ .activeText0,
173
+ .activeText1,
174
+ .activeText2,
175
+ .activeText3 {
176
+ fill: ${t.taskTextDarkColor} !important;
177
+ }
178
+
179
+
180
+ /* Completed task */
181
+
182
+ .done0,
183
+ .done1,
184
+ .done2,
185
+ .done3 {
186
+ stroke: ${t.doneTaskBorderColor};
187
+ fill: ${t.doneTaskBkgColor};
188
+ stroke-width: 2;
189
+ }
190
+
191
+ .doneText0,
192
+ .doneText1,
193
+ .doneText2,
194
+ .doneText3 {
195
+ fill: ${t.taskTextDarkColor} !important;
196
+ }
197
+
198
+
199
+ /* Tasks on the critical line */
200
+
201
+ .crit0,
202
+ .crit1,
203
+ .crit2,
204
+ .crit3 {
205
+ stroke: ${t.critBorderColor};
206
+ fill: ${t.critBkgColor};
207
+ stroke-width: 2;
208
+ }
209
+
210
+ .activeCrit0,
211
+ .activeCrit1,
212
+ .activeCrit2,
213
+ .activeCrit3 {
214
+ stroke: ${t.critBorderColor};
215
+ fill: ${t.activeTaskBkgColor};
216
+ stroke-width: 2;
217
+ }
218
+
219
+ .doneCrit0,
220
+ .doneCrit1,
221
+ .doneCrit2,
222
+ .doneCrit3 {
223
+ stroke: ${t.critBorderColor};
224
+ fill: ${t.doneTaskBkgColor};
225
+ stroke-width: 2;
226
+ cursor: pointer;
227
+ shape-rendering: crispEdges;
228
+ }
229
+
230
+ .milestone {
231
+ transform: rotate(45deg) scale(0.8,0.8);
232
+ }
233
+
234
+ .milestoneText {
235
+ font-style: italic;
236
+ }
237
+ .doneCritText0,
238
+ .doneCritText1,
239
+ .doneCritText2,
240
+ .doneCritText3 {
241
+ fill: ${t.taskTextDarkColor} !important;
242
+ }
243
+
244
+ .activeCritText0,
245
+ .activeCritText1,
246
+ .activeCritText2,
247
+ .activeCritText3 {
248
+ fill: ${t.taskTextDarkColor} !important;
249
+ }
250
+
251
+ .titleText {
252
+ text-anchor: middle;
253
+ font-size: 18px;
254
+ fill: ${t.titleColor||t.textColor};
255
+ font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
256
+ }
257
+ `,gs=ms,Ts={parser:_i,db:ls,renderer:ds,styles:gs};export{Ts as diagram};
@@ -0,0 +1,70 @@
1
+ import{C as vt,D as Ct,s as Ot,a as Pt,b as Gt,c as It,g as C,l as B,d as St,B as At,H as Nt,E as Ht,k as D,I as Bt}from"./index-CvYvquQR.js";var mt=function(){var r=function(I,o,u,d){for(u=u||{},d=I.length;d--;u[I[d]]=o);return u},n=[1,3],l=[1,6],h=[1,4],i=[1,5],c=[2,5],p=[1,12],m=[5,7,13,19,21,23,24,26,28,31,37,40,47],x=[7,13,19,21,23,24,26,28,31,37,40],y=[7,12,13,19,21,23,24,26,28,31,37,40],a=[7,13,47],R=[1,42],_=[1,41],b=[7,13,29,32,35,38,47],f=[1,55],k=[1,56],g=[1,57],E=[7,13,32,35,42,47],z={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,GG:5,document:6,EOF:7,":":8,DIR:9,options:10,body:11,OPT:12,NL:13,line:14,statement:15,commitStatement:16,mergeStatement:17,cherryPickStatement:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,section:24,branchStatement:25,CHECKOUT:26,ref:27,BRANCH:28,ORDER:29,NUM:30,CHERRY_PICK:31,COMMIT_ID:32,STR:33,PARENT_COMMIT:34,COMMIT_TAG:35,EMPTYSTR:36,MERGE:37,COMMIT_TYPE:38,commitType:39,COMMIT:40,commit_arg:41,COMMIT_MSG:42,NORMAL:43,REVERSE:44,HIGHLIGHT:45,ID:46,";":47,$accept:0,$end:1},terminals_:{2:"error",5:"GG",7:"EOF",8:":",9:"DIR",12:"OPT",13:"NL",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"section",26:"CHECKOUT",28:"BRANCH",29:"ORDER",30:"NUM",31:"CHERRY_PICK",32:"COMMIT_ID",33:"STR",34:"PARENT_COMMIT",35:"COMMIT_TAG",36:"EMPTYSTR",37:"MERGE",38:"COMMIT_TYPE",40:"COMMIT",42:"COMMIT_MSG",43:"NORMAL",44:"REVERSE",45:"HIGHLIGHT",46:"ID",47:";"},productions_:[0,[3,2],[3,3],[3,4],[3,5],[6,0],[6,2],[10,2],[10,1],[11,0],[11,2],[14,2],[14,1],[15,1],[15,1],[15,1],[15,2],[15,2],[15,1],[15,1],[15,1],[15,2],[25,2],[25,4],[18,3],[18,5],[18,5],[18,7],[18,7],[18,5],[18,5],[18,5],[18,7],[18,7],[18,7],[18,7],[17,2],[17,4],[17,4],[17,4],[17,6],[17,6],[17,6],[17,6],[17,6],[17,6],[17,8],[17,8],[17,8],[17,8],[17,8],[17,8],[16,2],[16,3],[16,3],[16,5],[16,5],[16,3],[16,5],[16,5],[16,5],[16,5],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,3],[16,5],[16,5],[16,5],[16,5],[16,5],[16,5],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[41,0],[41,1],[39,1],[39,1],[39,1],[27,1],[27,1],[4,1],[4,1],[4,1]],performAction:function(o,u,d,s,T,t,X){var e=t.length-1;switch(T){case 2:return t[e];case 3:return t[e-1];case 4:return s.setDirection(t[e-3]),t[e-1];case 6:s.setOptions(t[e-1]),this.$=t[e];break;case 7:t[e-1]+=t[e],this.$=t[e-1];break;case 9:this.$=[];break;case 10:t[e-1].push(t[e]),this.$=t[e-1];break;case 11:this.$=t[e-1];break;case 16:this.$=t[e].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=t[e].trim(),s.setAccDescription(this.$);break;case 19:s.addSection(t[e].substr(8)),this.$=t[e].substr(8);break;case 21:s.checkout(t[e]);break;case 22:s.branch(t[e]);break;case 23:s.branch(t[e-2],t[e]);break;case 24:s.cherryPick(t[e],"",void 0);break;case 25:s.cherryPick(t[e-2],"",void 0,t[e]);break;case 26:s.cherryPick(t[e-2],"",t[e]);break;case 27:s.cherryPick(t[e-4],"",t[e],t[e-2]);break;case 28:s.cherryPick(t[e-4],"",t[e-2],t[e]);break;case 29:s.cherryPick(t[e],"",t[e-2]);break;case 30:s.cherryPick(t[e],"","");break;case 31:s.cherryPick(t[e-2],"","");break;case 32:s.cherryPick(t[e-4],"","",t[e-2]);break;case 33:s.cherryPick(t[e-4],"","",t[e]);break;case 34:s.cherryPick(t[e-2],"",t[e-4],t[e]);break;case 35:s.cherryPick(t[e-2],"","",t[e]);break;case 36:s.merge(t[e],"","","");break;case 37:s.merge(t[e-2],t[e],"","");break;case 38:s.merge(t[e-2],"",t[e],"");break;case 39:s.merge(t[e-2],"","",t[e]);break;case 40:s.merge(t[e-4],t[e],"",t[e-2]);break;case 41:s.merge(t[e-4],"",t[e],t[e-2]);break;case 42:s.merge(t[e-4],"",t[e-2],t[e]);break;case 43:s.merge(t[e-4],t[e-2],t[e],"");break;case 44:s.merge(t[e-4],t[e-2],"",t[e]);break;case 45:s.merge(t[e-4],t[e],t[e-2],"");break;case 46:s.merge(t[e-6],t[e-4],t[e-2],t[e]);break;case 47:s.merge(t[e-6],t[e],t[e-4],t[e-2]);break;case 48:s.merge(t[e-6],t[e-4],t[e],t[e-2]);break;case 49:s.merge(t[e-6],t[e-2],t[e-4],t[e]);break;case 50:s.merge(t[e-6],t[e],t[e-2],t[e-4]);break;case 51:s.merge(t[e-6],t[e-2],t[e],t[e-4]);break;case 52:s.commit(t[e]);break;case 53:s.commit("","",s.commitType.NORMAL,t[e]);break;case 54:s.commit("","",t[e],"");break;case 55:s.commit("","",t[e],t[e-2]);break;case 56:s.commit("","",t[e-2],t[e]);break;case 57:s.commit("",t[e],s.commitType.NORMAL,"");break;case 58:s.commit("",t[e-2],s.commitType.NORMAL,t[e]);break;case 59:s.commit("",t[e],s.commitType.NORMAL,t[e-2]);break;case 60:s.commit("",t[e-2],t[e],"");break;case 61:s.commit("",t[e],t[e-2],"");break;case 62:s.commit("",t[e-4],t[e-2],t[e]);break;case 63:s.commit("",t[e-4],t[e],t[e-2]);break;case 64:s.commit("",t[e-2],t[e-4],t[e]);break;case 65:s.commit("",t[e],t[e-4],t[e-2]);break;case 66:s.commit("",t[e],t[e-2],t[e-4]);break;case 67:s.commit("",t[e-2],t[e],t[e-4]);break;case 68:s.commit(t[e],"",s.commitType.NORMAL,"");break;case 69:s.commit(t[e],"",s.commitType.NORMAL,t[e-2]);break;case 70:s.commit(t[e-2],"",s.commitType.NORMAL,t[e]);break;case 71:s.commit(t[e-2],"",t[e],"");break;case 72:s.commit(t[e],"",t[e-2],"");break;case 73:s.commit(t[e],t[e-2],s.commitType.NORMAL,"");break;case 74:s.commit(t[e-2],t[e],s.commitType.NORMAL,"");break;case 75:s.commit(t[e-4],"",t[e-2],t[e]);break;case 76:s.commit(t[e-4],"",t[e],t[e-2]);break;case 77:s.commit(t[e-2],"",t[e-4],t[e]);break;case 78:s.commit(t[e],"",t[e-4],t[e-2]);break;case 79:s.commit(t[e],"",t[e-2],t[e-4]);break;case 80:s.commit(t[e-2],"",t[e],t[e-4]);break;case 81:s.commit(t[e-4],t[e],t[e-2],"");break;case 82:s.commit(t[e-4],t[e-2],t[e],"");break;case 83:s.commit(t[e-2],t[e],t[e-4],"");break;case 84:s.commit(t[e],t[e-2],t[e-4],"");break;case 85:s.commit(t[e],t[e-4],t[e-2],"");break;case 86:s.commit(t[e-2],t[e-4],t[e],"");break;case 87:s.commit(t[e-4],t[e],s.commitType.NORMAL,t[e-2]);break;case 88:s.commit(t[e-4],t[e-2],s.commitType.NORMAL,t[e]);break;case 89:s.commit(t[e-2],t[e],s.commitType.NORMAL,t[e-4]);break;case 90:s.commit(t[e],t[e-2],s.commitType.NORMAL,t[e-4]);break;case 91:s.commit(t[e],t[e-4],s.commitType.NORMAL,t[e-2]);break;case 92:s.commit(t[e-2],t[e-4],s.commitType.NORMAL,t[e]);break;case 93:s.commit(t[e-6],t[e-4],t[e-2],t[e]);break;case 94:s.commit(t[e-6],t[e-4],t[e],t[e-2]);break;case 95:s.commit(t[e-6],t[e-2],t[e-4],t[e]);break;case 96:s.commit(t[e-6],t[e],t[e-4],t[e-2]);break;case 97:s.commit(t[e-6],t[e-2],t[e],t[e-4]);break;case 98:s.commit(t[e-6],t[e],t[e-2],t[e-4]);break;case 99:s.commit(t[e-4],t[e-6],t[e-2],t[e]);break;case 100:s.commit(t[e-4],t[e-6],t[e],t[e-2]);break;case 101:s.commit(t[e-2],t[e-6],t[e-4],t[e]);break;case 102:s.commit(t[e],t[e-6],t[e-4],t[e-2]);break;case 103:s.commit(t[e-2],t[e-6],t[e],t[e-4]);break;case 104:s.commit(t[e],t[e-6],t[e-2],t[e-4]);break;case 105:s.commit(t[e],t[e-4],t[e-2],t[e-6]);break;case 106:s.commit(t[e-2],t[e-4],t[e],t[e-6]);break;case 107:s.commit(t[e],t[e-2],t[e-4],t[e-6]);break;case 108:s.commit(t[e-2],t[e],t[e-4],t[e-6]);break;case 109:s.commit(t[e-4],t[e-2],t[e],t[e-6]);break;case 110:s.commit(t[e-4],t[e],t[e-2],t[e-6]);break;case 111:s.commit(t[e-2],t[e-4],t[e-6],t[e]);break;case 112:s.commit(t[e],t[e-4],t[e-6],t[e-2]);break;case 113:s.commit(t[e-2],t[e],t[e-6],t[e-4]);break;case 114:s.commit(t[e],t[e-2],t[e-6],t[e-4]);break;case 115:s.commit(t[e-4],t[e-2],t[e-6],t[e]);break;case 116:s.commit(t[e-4],t[e],t[e-6],t[e-2]);break;case 117:this.$="";break;case 118:this.$=t[e];break;case 119:this.$=s.commitType.NORMAL;break;case 120:this.$=s.commitType.REVERSE;break;case 121:this.$=s.commitType.HIGHLIGHT;break}},table:[{3:1,4:2,5:n,7:l,13:h,47:i},{1:[3]},{3:7,4:2,5:n,7:l,13:h,47:i},{6:8,7:c,8:[1,9],9:[1,10],10:11,13:p},r(m,[2,124]),r(m,[2,125]),r(m,[2,126]),{1:[2,1]},{7:[1,13]},{6:14,7:c,10:11,13:p},{8:[1,15]},r(x,[2,9],{11:16,12:[1,17]}),r(y,[2,8]),{1:[2,2]},{7:[1,18]},{6:19,7:c,10:11,13:p},{7:[2,6],13:[1,22],14:20,15:21,16:23,17:24,18:25,19:[1,26],21:[1,27],23:[1,28],24:[1,29],25:30,26:[1,31],28:[1,35],31:[1,34],37:[1,33],40:[1,32]},r(y,[2,7]),{1:[2,3]},{7:[1,36]},r(x,[2,10]),{4:37,7:l,13:h,47:i},r(x,[2,12]),r(a,[2,13]),r(a,[2,14]),r(a,[2,15]),{20:[1,38]},{22:[1,39]},r(a,[2,18]),r(a,[2,19]),r(a,[2,20]),{27:40,33:R,46:_},r(a,[2,117],{41:43,32:[1,46],33:[1,48],35:[1,44],38:[1,45],42:[1,47]}),{27:49,33:R,46:_},{32:[1,50],35:[1,51]},{27:52,33:R,46:_},{1:[2,4]},r(x,[2,11]),r(a,[2,16]),r(a,[2,17]),r(a,[2,21]),r(b,[2,122]),r(b,[2,123]),r(a,[2,52]),{33:[1,53]},{39:54,43:f,44:k,45:g},{33:[1,58]},{33:[1,59]},r(a,[2,118]),r(a,[2,36],{32:[1,60],35:[1,62],38:[1,61]}),{33:[1,63]},{33:[1,64],36:[1,65]},r(a,[2,22],{29:[1,66]}),r(a,[2,53],{32:[1,68],38:[1,67],42:[1,69]}),r(a,[2,54],{32:[1,71],35:[1,70],42:[1,72]}),r(E,[2,119]),r(E,[2,120]),r(E,[2,121]),r(a,[2,57],{35:[1,73],38:[1,74],42:[1,75]}),r(a,[2,68],{32:[1,78],35:[1,76],38:[1,77]}),{33:[1,79]},{39:80,43:f,44:k,45:g},{33:[1,81]},r(a,[2,24],{34:[1,82],35:[1,83]}),{32:[1,84]},{32:[1,85]},{30:[1,86]},{39:87,43:f,44:k,45:g},{33:[1,88]},{33:[1,89]},{33:[1,90]},{33:[1,91]},{33:[1,92]},{33:[1,93]},{39:94,43:f,44:k,45:g},{33:[1,95]},{33:[1,96]},{39:97,43:f,44:k,45:g},{33:[1,98]},r(a,[2,37],{35:[1,100],38:[1,99]}),r(a,[2,38],{32:[1,102],35:[1,101]}),r(a,[2,39],{32:[1,103],38:[1,104]}),{33:[1,105]},{33:[1,106],36:[1,107]},{33:[1,108]},{33:[1,109]},r(a,[2,23]),r(a,[2,55],{32:[1,110],42:[1,111]}),r(a,[2,59],{38:[1,112],42:[1,113]}),r(a,[2,69],{32:[1,115],38:[1,114]}),r(a,[2,56],{32:[1,116],42:[1,117]}),r(a,[2,61],{35:[1,118],42:[1,119]}),r(a,[2,72],{32:[1,121],35:[1,120]}),r(a,[2,58],{38:[1,122],42:[1,123]}),r(a,[2,60],{35:[1,124],42:[1,125]}),r(a,[2,73],{35:[1,127],38:[1,126]}),r(a,[2,70],{32:[1,129],38:[1,128]}),r(a,[2,71],{32:[1,131],35:[1,130]}),r(a,[2,74],{35:[1,133],38:[1,132]}),{39:134,43:f,44:k,45:g},{33:[1,135]},{33:[1,136]},{33:[1,137]},{33:[1,138]},{39:139,43:f,44:k,45:g},r(a,[2,25],{35:[1,140]}),r(a,[2,26],{34:[1,141]}),r(a,[2,31],{34:[1,142]}),r(a,[2,29],{34:[1,143]}),r(a,[2,30],{34:[1,144]}),{33:[1,145]},{33:[1,146]},{39:147,43:f,44:k,45:g},{33:[1,148]},{39:149,43:f,44:k,45:g},{33:[1,150]},{33:[1,151]},{33:[1,152]},{33:[1,153]},{33:[1,154]},{33:[1,155]},{33:[1,156]},{39:157,43:f,44:k,45:g},{33:[1,158]},{33:[1,159]},{33:[1,160]},{39:161,43:f,44:k,45:g},{33:[1,162]},{39:163,43:f,44:k,45:g},{33:[1,164]},{33:[1,165]},{33:[1,166]},{39:167,43:f,44:k,45:g},{33:[1,168]},r(a,[2,43],{35:[1,169]}),r(a,[2,44],{38:[1,170]}),r(a,[2,42],{32:[1,171]}),r(a,[2,45],{35:[1,172]}),r(a,[2,40],{38:[1,173]}),r(a,[2,41],{32:[1,174]}),{33:[1,175],36:[1,176]},{33:[1,177]},{33:[1,178]},{33:[1,179]},{33:[1,180]},r(a,[2,66],{42:[1,181]}),r(a,[2,79],{32:[1,182]}),r(a,[2,67],{42:[1,183]}),r(a,[2,90],{38:[1,184]}),r(a,[2,80],{32:[1,185]}),r(a,[2,89],{38:[1,186]}),r(a,[2,65],{42:[1,187]}),r(a,[2,78],{32:[1,188]}),r(a,[2,64],{42:[1,189]}),r(a,[2,84],{35:[1,190]}),r(a,[2,77],{32:[1,191]}),r(a,[2,83],{35:[1,192]}),r(a,[2,63],{42:[1,193]}),r(a,[2,91],{38:[1,194]}),r(a,[2,62],{42:[1,195]}),r(a,[2,85],{35:[1,196]}),r(a,[2,86],{35:[1,197]}),r(a,[2,92],{38:[1,198]}),r(a,[2,76],{32:[1,199]}),r(a,[2,87],{38:[1,200]}),r(a,[2,75],{32:[1,201]}),r(a,[2,81],{35:[1,202]}),r(a,[2,82],{35:[1,203]}),r(a,[2,88],{38:[1,204]}),{33:[1,205]},{39:206,43:f,44:k,45:g},{33:[1,207]},{33:[1,208]},{39:209,43:f,44:k,45:g},{33:[1,210]},r(a,[2,27]),r(a,[2,32]),r(a,[2,28]),r(a,[2,33]),r(a,[2,34]),r(a,[2,35]),{33:[1,211]},{33:[1,212]},{33:[1,213]},{39:214,43:f,44:k,45:g},{33:[1,215]},{39:216,43:f,44:k,45:g},{33:[1,217]},{33:[1,218]},{33:[1,219]},{33:[1,220]},{33:[1,221]},{33:[1,222]},{33:[1,223]},{39:224,43:f,44:k,45:g},{33:[1,225]},{33:[1,226]},{33:[1,227]},{39:228,43:f,44:k,45:g},{33:[1,229]},{39:230,43:f,44:k,45:g},{33:[1,231]},{33:[1,232]},{33:[1,233]},{39:234,43:f,44:k,45:g},r(a,[2,46]),r(a,[2,48]),r(a,[2,47]),r(a,[2,49]),r(a,[2,51]),r(a,[2,50]),r(a,[2,107]),r(a,[2,108]),r(a,[2,105]),r(a,[2,106]),r(a,[2,110]),r(a,[2,109]),r(a,[2,114]),r(a,[2,113]),r(a,[2,112]),r(a,[2,111]),r(a,[2,116]),r(a,[2,115]),r(a,[2,104]),r(a,[2,103]),r(a,[2,102]),r(a,[2,101]),r(a,[2,99]),r(a,[2,100]),r(a,[2,98]),r(a,[2,97]),r(a,[2,96]),r(a,[2,95]),r(a,[2,93]),r(a,[2,94])],defaultActions:{7:[2,1],13:[2,2],18:[2,3],36:[2,4]},parseError:function(o,u){if(u.recoverable)this.trace(o);else{var d=new Error(o);throw d.hash=u,d}},parse:function(o){var u=this,d=[0],s=[],T=[null],t=[],X=this.table,e="",rt=0,ft=0,wt=2,pt=1,Lt=t.slice.call(arguments,1),O=Object.create(this.lexer),F={yy:{}};for(var ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ct)&&(F.yy[ct]=this.yy[ct]);O.setInput(o,F.yy),F.yy.lexer=O,F.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var ot=O.yylloc;t.push(ot);var Rt=O.options&&O.options.ranges;typeof F.yy.parseError=="function"?this.parseError=F.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Mt(){var Y;return Y=s.pop()||O.lex()||pt,typeof Y!="number"&&(Y instanceof Array&&(s=Y,Y=s.pop()),Y=u.symbols_[Y]||Y),Y}for(var N,K,V,lt,J={},it,q,bt,st;;){if(K=d[d.length-1],this.defaultActions[K]?V=this.defaultActions[K]:((N===null||typeof N>"u")&&(N=Mt()),V=X[K]&&X[K][N]),typeof V>"u"||!V.length||!V[0]){var ht="";st=[];for(it in X[K])this.terminals_[it]&&it>wt&&st.push("'"+this.terminals_[it]+"'");O.showPosition?ht="Parse error on line "+(rt+1)+`:
2
+ `+O.showPosition()+`
3
+ Expecting `+st.join(", ")+", got '"+(this.terminals_[N]||N)+"'":ht="Parse error on line "+(rt+1)+": Unexpected "+(N==pt?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(ht,{text:O.match,token:this.terminals_[N]||N,line:O.yylineno,loc:ot,expected:st})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+K+", token: "+N);switch(V[0]){case 1:d.push(N),T.push(O.yytext),t.push(O.yylloc),d.push(V[1]),N=null,ft=O.yyleng,e=O.yytext,rt=O.yylineno,ot=O.yylloc;break;case 2:if(q=this.productions_[V[1]][1],J.$=T[T.length-q],J._$={first_line:t[t.length-(q||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(q||1)].first_column,last_column:t[t.length-1].last_column},Rt&&(J._$.range=[t[t.length-(q||1)].range[0],t[t.length-1].range[1]]),lt=this.performAction.apply(J,[e,ft,rt,F.yy,V[1],T,t].concat(Lt)),typeof lt<"u")return lt;q&&(d=d.slice(0,-1*q*2),T=T.slice(0,-1*q),t=t.slice(0,-1*q)),d.push(this.productions_[V[1]][0]),T.push(J.$),t.push(J._$),bt=X[d[d.length-2]][d[d.length-1]],d.push(bt);break;case 3:return!0}}return!0}},M=function(){var I={EOF:1,parseError:function(u,d){if(this.yy.parser)this.yy.parser.parseError(u,d);else throw new Error(u)},setInput:function(o,u){return this.yy=u||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var u=o.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},unput:function(o){var u=o.length,d=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var s=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),d.length-1&&(this.yylineno-=d.length-1);var T=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:d?(d.length===s.length?this.yylloc.first_column:0)+s[s.length-d.length].length-d[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-u]),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).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(o){this.unput(this.match.slice(o))},pastInput:function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var o=this.pastInput(),u=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
5
+ `+u+"^"},test_match:function(o,u){var d,s,T;if(this.options.backtrack_lexer&&(T={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&&(T.yylloc.range=this.yylloc.range.slice(0))),s=o[0].match(/(?:\r\n?|\n).*/g),s&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],d=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),d)return d;if(this._backtrack){for(var t in T)this[t]=T[t];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,u,d,s;this._more||(this.yytext="",this.match="");for(var T=this._currentRules(),t=0;t<T.length;t++)if(d=this._input.match(this.rules[T[t]]),d&&(!u||d[0].length>u[0].length)){if(u=d,s=t,this.options.backtrack_lexer){if(o=this.test_match(d,T[t]),o!==!1)return o;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(o=this.test_match(u,T[s]),o!==!1?o:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var u=this.next();return u||this.lex()},begin:function(u){this.conditionStack.push(u)},popState:function(){var u=this.conditionStack.length-1;return u>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(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},pushState:function(u){this.begin(u)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(u,d,s,T){switch(s){case 0:return this.begin("acc_title"),19;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),21;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 13;case 8:break;case 9:break;case 10:return 5;case 11:return 40;case 12:return 32;case 13:return 38;case 14:return 42;case 15:return 43;case 16:return 44;case 17:return 45;case 18:return 35;case 19:return 28;case 20:return 29;case 21:return 37;case 22:return 31;case 23:return 34;case 24:return 26;case 25:return 9;case 26:return 9;case 27:return 8;case 28:return"CARET";case 29:this.begin("options");break;case 30:this.popState();break;case 31:return 12;case 32:return 36;case 33:this.begin("string");break;case 34:this.popState();break;case 35:return 33;case 36:return 30;case 37:return 46;case 38:return 7}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit(?=\s|$))/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch(?=\s|$))/i,/^(?:order:)/i,/^(?:merge(?=\s|$))/i,/^(?:cherry-pick(?=\s|$))/i,/^(?:parent:)/i,/^(?:checkout(?=\s|$))/i,/^(?:LR\b)/i,/^(?:TB\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+(?=\s|$))/i,/^(?:\w([-\./\w]*[-\w])?)/i,/^(?:$)/i,/^(?:\s+)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},options:{rules:[30,31],inclusive:!1},string:{rules:[34,35],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,32,33,36,37,38,39],inclusive:!0}}};return I}();z.lexer=M;function S(){this.yy={}}return S.prototype=z,z.Parser=S,new S}();mt.parser=mt;const Vt=mt;let at=C().gitGraph.mainBranchName,Dt=C().gitGraph.mainBranchOrder,v={},A=null,tt={};tt[at]={name:at,order:Dt};let L={};L[at]=A;let G=at,kt="LR",W=0;function ut(){return Bt({length:7})}function zt(r,n){const l=Object.create(null);return r.reduce((h,i)=>{const c=n(i);return l[c]||(l[c]=!0,h.push(i)),h},[])}const qt=function(r){kt=r};let xt={};const Yt=function(r){B.debug("options str",r),r=r&&r.trim(),r=r||"{}";try{xt=JSON.parse(r)}catch(n){B.error("error while parsing gitGraph options",n.message)}},jt=function(){return xt},Ft=function(r,n,l,h){B.debug("Entering commit:",r,n,l,h),n=D.sanitizeText(n,C()),r=D.sanitizeText(r,C()),h=D.sanitizeText(h,C());const i={id:n||W+"-"+ut(),message:r,seq:W++,type:l||Q.NORMAL,tag:h||"",parents:A==null?[]:[A.id],branch:G};A=i,v[i.id]=i,L[G]=i.id,B.debug("in pushCommit "+i.id)},Kt=function(r,n){if(r=D.sanitizeText(r,C()),L[r]===void 0)L[r]=A!=null?A.id:null,tt[r]={name:r,order:n?parseInt(n,10):null},yt(r),B.debug("in createBranch");else{let l=new Error('Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout '+r+'")');throw l.hash={text:"branch "+r,token:"branch "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+r+'"']},l}},Ut=function(r,n,l,h){r=D.sanitizeText(r,C()),n=D.sanitizeText(n,C());const i=v[L[G]],c=v[L[r]];if(G===r){let m=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw m.hash={text:"merge "+r,token:"merge "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},m}else if(i===void 0||!i){let m=new Error('Incorrect usage of "merge". Current branch ('+G+")has no commits");throw m.hash={text:"merge "+r,token:"merge "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},m}else if(L[r]===void 0){let m=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw m.hash={text:"merge "+r,token:"merge "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+r]},m}else if(c===void 0||!c){let m=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw m.hash={text:"merge "+r,token:"merge "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},m}else if(i===c){let m=new Error('Incorrect usage of "merge". Both branches have same head');throw m.hash={text:"merge "+r,token:"merge "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},m}else if(n&&v[n]!==void 0){let m=new Error('Incorrect usage of "merge". Commit with id:'+n+" already exists, use different custom Id");throw m.hash={text:"merge "+r+n+l+h,token:"merge "+r+n+l+h,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+r+" "+n+"_UNIQUE "+l+" "+h]},m}const p={id:n||W+"-"+ut(),message:"merged branch "+r+" into "+G,seq:W++,parents:[A==null?null:A.id,L[r]],branch:G,type:Q.MERGE,customType:l,customId:!!n,tag:h||""};A=p,v[p.id]=p,L[G]=p.id,B.debug(L),B.debug("in mergeBranch")},Wt=function(r,n,l,h){if(B.debug("Entering cherryPick:",r,n,l),r=D.sanitizeText(r,C()),n=D.sanitizeText(n,C()),l=D.sanitizeText(l,C()),h=D.sanitizeText(h,C()),!r||v[r]===void 0){let p=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw p.hash={text:"cherryPick "+r+" "+n,token:"cherryPick "+r+" "+n,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},p}let i=v[r],c=i.branch;if(h&&!(Array.isArray(i.parents)&&i.parents.includes(h)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");if(i.type===Q.MERGE&&!h)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!n||v[n]===void 0){if(c===G){let x=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw x.hash={text:"cherryPick "+r+" "+n,token:"cherryPick "+r+" "+n,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},x}const p=v[L[G]];if(p===void 0||!p){let x=new Error('Incorrect usage of "cherry-pick". Current branch ('+G+")has no commits");throw x.hash={text:"cherryPick "+r+" "+n,token:"cherryPick "+r+" "+n,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},x}const m={id:W+"-"+ut(),message:"cherry-picked "+i+" into "+G,seq:W++,parents:[A==null?null:A.id,i.id],branch:G,type:Q.CHERRY_PICK,tag:l??`cherry-pick:${i.id}${i.type===Q.MERGE?`|parent:${h}`:""}`};A=m,v[m.id]=m,L[G]=m.id,B.debug(L),B.debug("in cherryPick")}},yt=function(r){if(r=D.sanitizeText(r,C()),L[r]===void 0){let n=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+r+'")');throw n.hash={text:"checkout "+r,token:"checkout "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+r+'"']},n}else{G=r;const n=L[G];A=v[n]}};function gt(r,n,l){const h=r.indexOf(n);h===-1?r.push(l):r.splice(h,1,l)}function _t(r){const n=r.reduce((i,c)=>i.seq>c.seq?i:c,r[0]);let l="";r.forEach(function(i){i===n?l+=" *":l+=" |"});const h=[l,n.id,n.seq];for(let i in L)L[i]===n.id&&h.push(i);if(B.debug(h.join(" ")),n.parents&&n.parents.length==2){const i=v[n.parents[0]];gt(r,n,i),r.push(v[n.parents[1]])}else{if(n.parents.length==0)return;{const i=v[n.parents];gt(r,n,i)}}r=zt(r,i=>i.id),_t(r)}const Jt=function(){B.debug(v);const r=Et()[0];_t([r])},Qt=function(){v={},A=null;let r=C().gitGraph.mainBranchName,n=C().gitGraph.mainBranchOrder;L={},L[r]=null,tt={},tt[r]={name:r,order:n},G=r,W=0,Ht()},Xt=function(){return Object.values(tt).map((n,l)=>n.order!==null?n:{...n,order:parseFloat(`0.${l}`,10)}).sort((n,l)=>n.order-l.order).map(({name:n})=>({name:n}))},Zt=function(){return L},$t=function(){return v},Et=function(){const r=Object.keys(v).map(function(n){return v[n]});return r.forEach(function(n){B.debug(n.id)}),r.sort((n,l)=>n.seq-l.seq),r},te=function(){return G},ee=function(){return kt},re=function(){return A},Q={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},ie={getConfig:()=>C().gitGraph,setDirection:qt,setOptions:Yt,getOptions:jt,commit:Ft,branch:Kt,merge:Ut,cherryPick:Wt,checkout:yt,prettyPrint:Jt,clear:Qt,getBranchesAsObjArray:Xt,getBranches:Zt,getCommits:$t,getCommitsArray:Et,getCurrentBranch:te,getDirection:ee,getHead:re,setAccTitle:It,getAccTitle:Gt,getAccDescription:Pt,setAccDescription:Ot,setDiagramTitle:Ct,getDiagramTitle:vt,commitType:Q};let Z={};const P={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},U=8;let H={},j={},nt=[],et=0,w="LR";const se=()=>{H={},j={},Z={},et=0,nt=[],w="LR"},Tt=r=>{const n=document.createElementNS("http://www.w3.org/2000/svg","text");let l=[];typeof r=="string"?l=r.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(r)?l=r:l=[];for(const h of l){const i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=h.trim(),n.appendChild(i)}return n},ae=r=>{let n="",l=0;return r.forEach(h=>{const i=w==="TB"?j[h].y:j[h].x;i>=l&&(n=h,l=i)}),n||void 0},dt=(r,n,l)=>{const h=C().gitGraph,i=r.append("g").attr("class","commit-bullets"),c=r.append("g").attr("class","commit-labels");let p=0;w==="TB"&&(p=30);const x=Object.keys(n).sort((_,b)=>n[_].seq-n[b].seq),y=h.parallelCommits,a=10,R=40;x.forEach(_=>{const b=n[_];if(y)if(b.parents.length){const E=ae(b.parents);p=w==="TB"?j[E].y+R:j[E].x+R}else p=0,w==="TB"&&(p=30);const f=p+a,k=w==="TB"?f:H[b.branch].pos,g=w==="TB"?H[b.branch].pos:f;if(l){let E,z=b.customType!==void 0&&b.customType!==""?b.customType:b.type;switch(z){case P.NORMAL:E="commit-normal";break;case P.REVERSE:E="commit-reverse";break;case P.HIGHLIGHT:E="commit-highlight";break;case P.MERGE:E="commit-merge";break;case P.CHERRY_PICK:E="commit-cherry-pick";break;default:E="commit-normal"}if(z===P.HIGHLIGHT){const M=i.append("rect");M.attr("x",g-10),M.attr("y",k-10),M.attr("height",20),M.attr("width",20),M.attr("class",`commit ${b.id} commit-highlight${H[b.branch].index%U} ${E}-outer`),i.append("rect").attr("x",g-6).attr("y",k-6).attr("height",12).attr("width",12).attr("class",`commit ${b.id} commit${H[b.branch].index%U} ${E}-inner`)}else if(z===P.CHERRY_PICK)i.append("circle").attr("cx",g).attr("cy",k).attr("r",10).attr("class",`commit ${b.id} ${E}`),i.append("circle").attr("cx",g-3).attr("cy",k+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${b.id} ${E}`),i.append("circle").attr("cx",g+3).attr("cy",k+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${b.id} ${E}`),i.append("line").attr("x1",g+3).attr("y1",k+1).attr("x2",g).attr("y2",k-5).attr("stroke","#fff").attr("class",`commit ${b.id} ${E}`),i.append("line").attr("x1",g-3).attr("y1",k+1).attr("x2",g).attr("y2",k-5).attr("stroke","#fff").attr("class",`commit ${b.id} ${E}`);else{const M=i.append("circle");if(M.attr("cx",g),M.attr("cy",k),M.attr("r",b.type===P.MERGE?9:10),M.attr("class",`commit ${b.id} commit${H[b.branch].index%U}`),z===P.MERGE){const S=i.append("circle");S.attr("cx",g),S.attr("cy",k),S.attr("r",6),S.attr("class",`commit ${E} ${b.id} commit${H[b.branch].index%U}`)}z===P.REVERSE&&i.append("path").attr("d",`M ${g-5},${k-5}L${g+5},${k+5}M${g-5},${k+5}L${g+5},${k-5}`).attr("class",`commit ${E} ${b.id} commit${H[b.branch].index%U}`)}}if(w==="TB"?j[b.id]={x:g,y:f}:j[b.id]={x:f,y:k},l){if(b.type!==P.CHERRY_PICK&&(b.customId&&b.type===P.MERGE||b.type!==P.MERGE)&&h.showCommitLabel){const M=c.append("g"),S=M.insert("rect").attr("class","commit-label-bkg"),I=M.append("text").attr("x",p).attr("y",k+25).attr("class","commit-label").text(b.id);let o=I.node().getBBox();if(S.attr("x",f-o.width/2-2).attr("y",k+13.5).attr("width",o.width+2*2).attr("height",o.height+2*2),w==="TB"&&(S.attr("x",g-(o.width+4*4+5)).attr("y",k-12),I.attr("x",g-(o.width+4*4)).attr("y",k+o.height-12)),w!=="TB"&&I.attr("x",f-o.width/2),h.rotateCommitLabel)if(w==="TB")I.attr("transform","rotate(-45, "+g+", "+k+")"),S.attr("transform","rotate(-45, "+g+", "+k+")");else{let u=-7.5-(o.width+10)/25*9.5,d=10+o.width/25*8.5;M.attr("transform","translate("+u+", "+d+") rotate(-45, "+p+", "+k+")")}}if(b.tag){const M=c.insert("polygon"),S=c.append("circle"),I=c.append("text").attr("y",k-16).attr("class","tag-label").text(b.tag);let o=I.node().getBBox();I.attr("x",f-o.width/2);const u=o.height/2,d=k-19.2;M.attr("class","tag-label-bkg").attr("points",`
7
+ ${p-o.width/2-4/2},${d+2}
8
+ ${p-o.width/2-4/2},${d-2}
9
+ ${f-o.width/2-4},${d-u-2}
10
+ ${f+o.width/2+4},${d-u-2}
11
+ ${f+o.width/2+4},${d+u+2}
12
+ ${f-o.width/2-4},${d+u+2}`),S.attr("cx",p-o.width/2+4/2).attr("cy",d).attr("r",1.5).attr("class","tag-hole"),w==="TB"&&(M.attr("class","tag-label-bkg").attr("points",`
13
+ ${g},${p+2}
14
+ ${g},${p-2}
15
+ ${g+a},${p-u-2}
16
+ ${g+a+o.width+4},${p-u-2}
17
+ ${g+a+o.width+4},${p+u+2}
18
+ ${g+a},${p+u+2}`).attr("transform","translate(12,12) rotate(45, "+g+","+p+")"),S.attr("cx",g+4/2).attr("cy",p).attr("transform","translate(12,12) rotate(45, "+g+","+p+")"),I.attr("x",g+5).attr("y",p+3).attr("transform","translate(14,14) rotate(45, "+g+","+p+")"))}}p+=R+a,p>et&&(et=p)})},ne=(r,n,l,h,i)=>{const p=(w==="TB"?l.x<h.x:l.y<h.y)?n.branch:r.branch,m=y=>y.branch===p,x=y=>y.seq>r.seq&&y.seq<n.seq;return Object.values(i).some(y=>x(y)&&m(y))},$=(r,n,l=0)=>{const h=r+Math.abs(r-n)/2;if(l>5)return h;if(nt.every(p=>Math.abs(p-h)>=10))return nt.push(h),h;const c=Math.abs(r-n);return $(r,n-c/5,l+1)},ce=(r,n,l,h)=>{const i=j[n.id],c=j[l.id],p=ne(n,l,i,c,h);let m="",x="",y=0,a=0,R=H[l.branch].index;l.type===P.MERGE&&n.id!==l.parents[0]&&(R=H[n.branch].index);let _;if(p){m="A 10 10, 0, 0, 0,",x="A 10 10, 0, 0, 1,",y=10,a=10;const b=i.y<c.y?$(i.y,c.y):$(c.y,i.y),f=i.x<c.x?$(i.x,c.x):$(c.x,i.x);w==="TB"?i.x<c.x?_=`M ${i.x} ${i.y} L ${f-y} ${i.y} ${x} ${f} ${i.y+a} L ${f} ${c.y-y} ${m} ${f+a} ${c.y} L ${c.x} ${c.y}`:(R=H[n.branch].index,_=`M ${i.x} ${i.y} L ${f+y} ${i.y} ${m} ${f} ${i.y+a} L ${f} ${c.y-y} ${x} ${f-a} ${c.y} L ${c.x} ${c.y}`):i.y<c.y?_=`M ${i.x} ${i.y} L ${i.x} ${b-y} ${m} ${i.x+a} ${b} L ${c.x-y} ${b} ${x} ${c.x} ${b+a} L ${c.x} ${c.y}`:(R=H[n.branch].index,_=`M ${i.x} ${i.y} L ${i.x} ${b+y} ${x} ${i.x+a} ${b} L ${c.x-y} ${b} ${m} ${c.x} ${b-a} L ${c.x} ${c.y}`)}else m="A 20 20, 0, 0, 0,",x="A 20 20, 0, 0, 1,",y=20,a=20,w==="TB"?(i.x<c.x&&(l.type===P.MERGE&&n.id!==l.parents[0]?_=`M ${i.x} ${i.y} L ${i.x} ${c.y-y} ${m} ${i.x+a} ${c.y} L ${c.x} ${c.y}`:_=`M ${i.x} ${i.y} L ${c.x-y} ${i.y} ${x} ${c.x} ${i.y+a} L ${c.x} ${c.y}`),i.x>c.x&&(m="A 20 20, 0, 0, 0,",x="A 20 20, 0, 0, 1,",y=20,a=20,l.type===P.MERGE&&n.id!==l.parents[0]?_=`M ${i.x} ${i.y} L ${i.x} ${c.y-y} ${x} ${i.x-a} ${c.y} L ${c.x} ${c.y}`:_=`M ${i.x} ${i.y} L ${c.x+y} ${i.y} ${m} ${c.x} ${i.y+a} L ${c.x} ${c.y}`),i.x===c.x&&(_=`M ${i.x} ${i.y} L ${c.x} ${c.y}`)):(i.y<c.y&&(l.type===P.MERGE&&n.id!==l.parents[0]?_=`M ${i.x} ${i.y} L ${c.x-y} ${i.y} ${x} ${c.x} ${i.y+a} L ${c.x} ${c.y}`:_=`M ${i.x} ${i.y} L ${i.x} ${c.y-y} ${m} ${i.x+a} ${c.y} L ${c.x} ${c.y}`),i.y>c.y&&(l.type===P.MERGE&&n.id!==l.parents[0]?_=`M ${i.x} ${i.y} L ${c.x-y} ${i.y} ${m} ${c.x} ${i.y-a} L ${c.x} ${c.y}`:_=`M ${i.x} ${i.y} L ${i.x} ${c.y+y} ${x} ${i.x+a} ${c.y} L ${c.x} ${c.y}`),i.y===c.y&&(_=`M ${i.x} ${i.y} L ${c.x} ${c.y}`));r.append("path").attr("d",_).attr("class","arrow arrow"+R%U)},oe=(r,n)=>{const l=r.append("g").attr("class","commit-arrows");Object.keys(n).forEach(h=>{const i=n[h];i.parents&&i.parents.length>0&&i.parents.forEach(c=>{ce(l,n[c],i,n)})})},le=(r,n)=>{const l=C().gitGraph,h=r.append("g");n.forEach((i,c)=>{const p=c%U,m=H[i.name].pos,x=h.append("line");x.attr("x1",0),x.attr("y1",m),x.attr("x2",et),x.attr("y2",m),x.attr("class","branch branch"+p),w==="TB"&&(x.attr("y1",30),x.attr("x1",m),x.attr("y2",et),x.attr("x2",m)),nt.push(m);let y=i.name;const a=Tt(y),R=h.insert("rect"),b=h.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+p);b.node().appendChild(a);let f=a.getBBox();R.attr("class","branchLabelBkg label"+p).attr("rx",4).attr("ry",4).attr("x",-f.width-4-(l.rotateCommitLabel===!0?30:0)).attr("y",-f.height/2+8).attr("width",f.width+18).attr("height",f.height+4),b.attr("transform","translate("+(-f.width-14-(l.rotateCommitLabel===!0?30:0))+", "+(m-f.height/2-1)+")"),w==="TB"&&(R.attr("x",m-f.width/2-10).attr("y",0),b.attr("transform","translate("+(m-f.width/2-5)+", 0)")),w!=="TB"&&R.attr("transform","translate(-19, "+(m-f.height/2)+")")})},he=function(r,n,l,h){se();const i=C(),c=i.gitGraph;B.debug("in gitgraph renderer",r+`
19
+ `,"id:",n,l),Z=h.db.getCommits();const p=h.db.getBranchesAsObjArray();w=h.db.getDirection();const m=St(`[id="${n}"]`);let x=0;p.forEach((y,a)=>{const R=Tt(y.name),_=m.append("g"),b=_.insert("g").attr("class","branchLabel"),f=b.insert("g").attr("class","label branch-label");f.node().appendChild(R);let k=R.getBBox();H[y.name]={pos:x,index:a},x+=50+(c.rotateCommitLabel?40:0)+(w==="TB"?k.width/2:0),f.remove(),b.remove(),_.remove()}),dt(m,Z,!1),c.showBranches&&le(m,p),oe(m,Z),dt(m,Z,!0),At.insertTitle(m,"gitTitleText",c.titleTopMargin,h.db.getDiagramTitle()),Nt(void 0,m,c.diagramPadding,c.useMaxWidth??i.useMaxWidth)},me={draw:he},ue=r=>`
20
+ .commit-id,
21
+ .commit-msg,
22
+ .branch-label {
23
+ fill: lightgrey;
24
+ color: lightgrey;
25
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
26
+ font-family: var(--mermaid-font-family);
27
+ }
28
+ ${[0,1,2,3,4,5,6,7].map(n=>`
29
+ .branch-label${n} { fill: ${r["gitBranchLabel"+n]}; }
30
+ .commit${n} { stroke: ${r["git"+n]}; fill: ${r["git"+n]}; }
31
+ .commit-highlight${n} { stroke: ${r["gitInv"+n]}; fill: ${r["gitInv"+n]}; }
32
+ .label${n} { fill: ${r["git"+n]}; }
33
+ .arrow${n} { stroke: ${r["git"+n]}; }
34
+ `).join(`
35
+ `)}
36
+
37
+ .branch {
38
+ stroke-width: 1;
39
+ stroke: ${r.lineColor};
40
+ stroke-dasharray: 2;
41
+ }
42
+ .commit-label { font-size: ${r.commitLabelFontSize}; fill: ${r.commitLabelColor};}
43
+ .commit-label-bkg { font-size: ${r.commitLabelFontSize}; fill: ${r.commitLabelBackground}; opacity: 0.5; }
44
+ .tag-label { font-size: ${r.tagLabelFontSize}; fill: ${r.tagLabelColor};}
45
+ .tag-label-bkg { fill: ${r.tagLabelBackground}; stroke: ${r.tagLabelBorder}; }
46
+ .tag-hole { fill: ${r.textColor}; }
47
+
48
+ .commit-merge {
49
+ stroke: ${r.primaryColor};
50
+ fill: ${r.primaryColor};
51
+ }
52
+ .commit-reverse {
53
+ stroke: ${r.primaryColor};
54
+ fill: ${r.primaryColor};
55
+ stroke-width: 3;
56
+ }
57
+ .commit-highlight-outer {
58
+ }
59
+ .commit-highlight-inner {
60
+ stroke: ${r.primaryColor};
61
+ fill: ${r.primaryColor};
62
+ }
63
+
64
+ .arrow { stroke-width: 8; stroke-linecap: round; fill: none}
65
+ .gitTitleText {
66
+ text-anchor: middle;
67
+ font-size: 18px;
68
+ fill: ${r.textColor};
69
+ }
70
+ `,fe=ue,be={parser:Vt,db:ie,renderer:me,styles:fe};export{be as diagram};
@@ -0,0 +1 @@
1
+ import{aJ as $,aK as He,aL as T,ag as y,aM as Ye,aN as Ze,af as Ae,aO as qe,aP as Oe,aQ as D,ad as q,aR as Xe,aS as Te,aT as Je,aU as C,am as Ee,aV as x,a8 as me,aW as Qe,aX as Y,aY as We,aZ as ze,a_ as L,al as Ve,a$ as ke,ae as en,b0 as ne,b1 as nn,b2 as rn,ak as tn,aj as we,ah as sn,b3 as j,ab as an,b4 as un,an as F,z as re,b5 as te}from"./index-CvYvquQR.js";var fn="[object Symbol]";function X(e){return typeof e=="symbol"||$(e)&&He(e)==fn}function Pe(e,n){for(var r=-1,t=e==null?0:e.length,i=Array(t);++r<t;)i[r]=n(e[r],r,e);return i}var ie=T?T.prototype:void 0,se=ie?ie.toString:void 0;function ve(e){if(typeof e=="string")return e;if(y(e))return Pe(e,ve)+"";if(X(e))return se?se.call(e):"";var n=e+"";return n=="0"&&1/e==-1/0?"-0":n}function on(){}function Le(e,n){for(var r=-1,t=e==null?0:e.length;++r<t&&n(e[r],r,e)!==!1;);return e}function dn(e,n,r,t){for(var i=e.length,s=r+-1;++s<i;)if(n(e[s],s,e))return s;return-1}function hn(e){return e!==e}function ln(e,n,r){for(var t=r-1,i=e.length;++t<i;)if(e[t]===n)return t;return-1}function gn(e,n,r){return n===n?ln(e,n,r):dn(e,hn,r)}function cn(e,n){var r=e==null?0:e.length;return!!r&&gn(e,n,0)>-1}function O(e){return Ae(e)?Ye(e):Ze(e)}var _n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pn=/^\w*$/;function J(e,n){if(y(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||X(e)?!0:pn.test(e)||!_n.test(e)||n!=null&&e in Object(n)}var bn=500;function yn(e){var n=qe(e,function(t){return r.size===bn&&r.clear(),t}),r=n.cache;return n}var An=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,On=/\\(\\)?/g,Tn=yn(function(e){var n=[];return e.charCodeAt(0)===46&&n.push(""),e.replace(An,function(r,t,i,s){n.push(i?s.replace(On,"$1"):t||r)}),n});function En(e){return e==null?"":ve(e)}function $e(e,n){return y(e)?e:J(e,n)?[e]:Tn(En(e))}function G(e){if(typeof e=="string"||X(e))return e;var n=e+"";return n=="0"&&1/e==-1/0?"-0":n}function Ce(e,n){n=$e(n,e);for(var r=0,t=n.length;e!=null&&r<t;)e=e[G(n[r++])];return r&&r==t?e:void 0}function mn(e,n,r){var t=e==null?void 0:Ce(e,n);return t===void 0?r:t}function Q(e,n){for(var r=-1,t=n.length,i=e.length;++r<t;)e[i+r]=n[r];return e}var ae=T?T.isConcatSpreadable:void 0;function wn(e){return y(e)||Oe(e)||!!(ae&&e&&e[ae])}function Pn(e,n,r,t,i){var s=-1,a=e.length;for(r||(r=wn),i||(i=[]);++s<a;){var u=e[s];r(u)?Q(i,u):t||(i[i.length]=u)}return i}function vn(e,n,r,t){var i=-1,s=e==null?0:e.length;for(t&&s&&(r=e[++i]);++i<s;)r=n(r,e[i],i,e);return r}function Ln(e,n){return e&&D(n,O(n),e)}function $n(e,n){return e&&D(n,q(n),e)}function Ie(e,n){for(var r=-1,t=e==null?0:e.length,i=0,s=[];++r<t;){var a=e[r];n(a,r,e)&&(s[i++]=a)}return s}function Se(){return[]}var Cn=Object.prototype,In=Cn.propertyIsEnumerable,ue=Object.getOwnPropertySymbols,W=ue?function(e){return e==null?[]:(e=Object(e),Ie(ue(e),function(n){return In.call(e,n)}))}:Se;function Sn(e,n){return D(e,W(e),n)}var Nn=Object.getOwnPropertySymbols,Ne=Nn?function(e){for(var n=[];e;)Q(n,W(e)),e=Xe(e);return n}:Se;function Fn(e,n){return D(e,Ne(e),n)}function Fe(e,n,r){var t=n(e);return y(e)?t:Q(t,r(e))}function Z(e){return Fe(e,O,W)}function Mn(e){return Fe(e,q,Ne)}var Rn=Object.prototype,xn=Rn.hasOwnProperty;function Dn(e){var n=e.length,r=new e.constructor(n);return n&&typeof e[0]=="string"&&xn.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function Gn(e,n){var r=n?Te(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var jn=/\w*$/;function Un(e){var n=new e.constructor(e.source,jn.exec(e));return n.lastIndex=e.lastIndex,n}var fe=T?T.prototype:void 0,oe=fe?fe.valueOf:void 0;function Bn(e){return oe?Object(oe.call(e)):{}}var Kn="[object Boolean]",Hn="[object Date]",Yn="[object Map]",Zn="[object Number]",qn="[object RegExp]",Xn="[object Set]",Jn="[object String]",Qn="[object Symbol]",Wn="[object ArrayBuffer]",zn="[object DataView]",Vn="[object Float32Array]",kn="[object Float64Array]",er="[object Int8Array]",nr="[object Int16Array]",rr="[object Int32Array]",tr="[object Uint8Array]",ir="[object Uint8ClampedArray]",sr="[object Uint16Array]",ar="[object Uint32Array]";function ur(e,n,r){var t=e.constructor;switch(n){case Wn:return Te(e);case Kn:case Hn:return new t(+e);case zn:return Gn(e,r);case Vn:case kn:case er:case nr:case rr:case tr:case ir:case sr:case ar:return Je(e,r);case Yn:return new t;case Zn:case Jn:return new t(e);case qn:return Un(e);case Xn:return new t;case Qn:return Bn(e)}}var fr="[object Map]";function or(e){return $(e)&&C(e)==fr}var de=x&&x.isMap,dr=de?Ee(de):or,hr="[object Set]";function lr(e){return $(e)&&C(e)==hr}var he=x&&x.isSet,gr=he?Ee(he):lr,cr=1,_r=2,pr=4,Me="[object Arguments]",br="[object Array]",yr="[object Boolean]",Ar="[object Date]",Or="[object Error]",Re="[object Function]",Tr="[object GeneratorFunction]",Er="[object Map]",mr="[object Number]",xe="[object Object]",wr="[object RegExp]",Pr="[object Set]",vr="[object String]",Lr="[object Symbol]",$r="[object WeakMap]",Cr="[object ArrayBuffer]",Ir="[object DataView]",Sr="[object Float32Array]",Nr="[object Float64Array]",Fr="[object Int8Array]",Mr="[object Int16Array]",Rr="[object Int32Array]",xr="[object Uint8Array]",Dr="[object Uint8ClampedArray]",Gr="[object Uint16Array]",jr="[object Uint32Array]",d={};d[Me]=d[br]=d[Cr]=d[Ir]=d[yr]=d[Ar]=d[Sr]=d[Nr]=d[Fr]=d[Mr]=d[Rr]=d[Er]=d[mr]=d[xe]=d[wr]=d[Pr]=d[vr]=d[Lr]=d[xr]=d[Dr]=d[Gr]=d[jr]=!0;d[Or]=d[Re]=d[$r]=!1;function U(e,n,r,t,i,s){var a,u=n&cr,f=n&_r,g=n&pr;if(a!==void 0)return a;if(!me(e))return e;var l=y(e);if(l){if(a=Dn(e),!u)return Qe(e,a)}else{var o=C(e),h=o==Re||o==Tr;if(Y(e))return We(e,u);if(o==xe||o==Me||h&&!i){if(a=f||h?{}:ze(e),!u)return f?Fn(e,$n(a,e)):Sn(e,Ln(a,e))}else{if(!d[o])return i?e:{};a=ur(e,o,u)}}s||(s=new L);var A=s.get(e);if(A)return A;s.set(e,a),gr(e)?e.forEach(function(c){a.add(U(c,n,r,c,e,s))}):dr(e)&&e.forEach(function(c,_){a.set(_,U(c,n,r,_,e,s))});var p=g?f?Mn:Z:f?q:O,b=l?void 0:p(e);return Le(b||e,function(c,_){b&&(_=c,c=e[_]),Ve(a,_,U(c,n,r,_,e,s))}),a}var Ur="__lodash_hash_undefined__";function Br(e){return this.__data__.set(e,Ur),this}function Kr(e){return this.__data__.has(e)}function I(e){var n=-1,r=e==null?0:e.length;for(this.__data__=new ke;++n<r;)this.add(e[n])}I.prototype.add=I.prototype.push=Br;I.prototype.has=Kr;function Hr(e,n){for(var r=-1,t=e==null?0:e.length;++r<t;)if(n(e[r],r,e))return!0;return!1}function De(e,n){return e.has(n)}var Yr=1,Zr=2;function Ge(e,n,r,t,i,s){var a=r&Yr,u=e.length,f=n.length;if(u!=f&&!(a&&f>u))return!1;var g=s.get(e),l=s.get(n);if(g&&l)return g==n&&l==e;var o=-1,h=!0,A=r&Zr?new I:void 0;for(s.set(e,n),s.set(n,e);++o<u;){var p=e[o],b=n[o];if(t)var c=a?t(b,p,o,n,e,s):t(p,b,o,e,n,s);if(c!==void 0){if(c)continue;h=!1;break}if(A){if(!Hr(n,function(_,E){if(!De(A,E)&&(p===_||i(p,_,r,t,s)))return A.push(E)})){h=!1;break}}else if(!(p===b||i(p,b,r,t,s))){h=!1;break}}return s.delete(e),s.delete(n),h}function qr(e){var n=-1,r=Array(e.size);return e.forEach(function(t,i){r[++n]=[i,t]}),r}function z(e){var n=-1,r=Array(e.size);return e.forEach(function(t){r[++n]=t}),r}var Xr=1,Jr=2,Qr="[object Boolean]",Wr="[object Date]",zr="[object Error]",Vr="[object Map]",kr="[object Number]",et="[object RegExp]",nt="[object Set]",rt="[object String]",tt="[object Symbol]",it="[object ArrayBuffer]",st="[object DataView]",le=T?T.prototype:void 0,B=le?le.valueOf:void 0;function at(e,n,r,t,i,s,a){switch(r){case st:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case it:return!(e.byteLength!=n.byteLength||!s(new ne(e),new ne(n)));case Qr:case Wr:case kr:return en(+e,+n);case zr:return e.name==n.name&&e.message==n.message;case et:case rt:return e==n+"";case Vr:var u=qr;case nt:var f=t&Xr;if(u||(u=z),e.size!=n.size&&!f)return!1;var g=a.get(e);if(g)return g==n;t|=Jr,a.set(e,n);var l=Ge(u(e),u(n),t,i,s,a);return a.delete(e),l;case tt:if(B)return B.call(e)==B.call(n)}return!1}var ut=1,ft=Object.prototype,ot=ft.hasOwnProperty;function dt(e,n,r,t,i,s){var a=r&ut,u=Z(e),f=u.length,g=Z(n),l=g.length;if(f!=l&&!a)return!1;for(var o=f;o--;){var h=u[o];if(!(a?h in n:ot.call(n,h)))return!1}var A=s.get(e),p=s.get(n);if(A&&p)return A==n&&p==e;var b=!0;s.set(e,n),s.set(n,e);for(var c=a;++o<f;){h=u[o];var _=e[h],E=n[h];if(t)var ee=a?t(E,_,h,n,e,s):t(_,E,h,e,n,s);if(!(ee===void 0?_===E||i(_,E,r,t,s):ee)){b=!1;break}c||(c=h=="constructor")}if(b&&!c){var S=e.constructor,N=n.constructor;S!=N&&"constructor"in e&&"constructor"in n&&!(typeof S=="function"&&S instanceof S&&typeof N=="function"&&N instanceof N)&&(b=!1)}return s.delete(e),s.delete(n),b}var ht=1,ge="[object Arguments]",ce="[object Array]",M="[object Object]",lt=Object.prototype,_e=lt.hasOwnProperty;function gt(e,n,r,t,i,s){var a=y(e),u=y(n),f=a?ce:C(e),g=u?ce:C(n);f=f==ge?M:f,g=g==ge?M:g;var l=f==M,o=g==M,h=f==g;if(h&&Y(e)){if(!Y(n))return!1;a=!0,l=!1}if(h&&!l)return s||(s=new L),a||nn(e)?Ge(e,n,r,t,i,s):at(e,n,f,r,t,i,s);if(!(r&ht)){var A=l&&_e.call(e,"__wrapped__"),p=o&&_e.call(n,"__wrapped__");if(A||p){var b=A?e.value():e,c=p?n.value():n;return s||(s=new L),i(b,c,r,t,s)}}return h?(s||(s=new L),dt(e,n,r,t,i,s)):!1}function V(e,n,r,t,i){return e===n?!0:e==null||n==null||!$(e)&&!$(n)?e!==e&&n!==n:gt(e,n,r,t,V,i)}var ct=1,_t=2;function pt(e,n,r,t){var i=r.length,s=i;if(e==null)return!s;for(e=Object(e);i--;){var a=r[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<s;){a=r[i];var u=a[0],f=e[u],g=a[1];if(a[2]){if(f===void 0&&!(u in e))return!1}else{var l=new L,o;if(!(o===void 0?V(g,f,ct|_t,t,l):o))return!1}}return!0}function je(e){return e===e&&!me(e)}function bt(e){for(var n=O(e),r=n.length;r--;){var t=n[r],i=e[t];n[r]=[t,i,je(i)]}return n}function Ue(e,n){return function(r){return r==null?!1:r[e]===n&&(n!==void 0||e in Object(r))}}function yt(e){var n=bt(e);return n.length==1&&n[0][2]?Ue(n[0][0],n[0][1]):function(r){return r===e||pt(r,e,n)}}function At(e,n){return e!=null&&n in Object(e)}function Ot(e,n,r){n=$e(n,e);for(var t=-1,i=n.length,s=!1;++t<i;){var a=G(n[t]);if(!(s=e!=null&&r(e,a)))break;e=e[a]}return s||++t!=i?s:(i=e==null?0:e.length,!!i&&rn(i)&&tn(a,i)&&(y(e)||Oe(e)))}function Tt(e,n){return e!=null&&Ot(e,n,At)}var Et=1,mt=2;function wt(e,n){return J(e)&&je(n)?Ue(G(e),n):function(r){var t=mn(r,e);return t===void 0&&t===n?Tt(r,e):V(n,t,Et|mt)}}function Pt(e){return function(n){return n==null?void 0:n[e]}}function vt(e){return function(n){return Ce(n,e)}}function Lt(e){return J(e)?Pt(G(e)):vt(e)}function Be(e){return typeof e=="function"?e:e==null?we:typeof e=="object"?y(e)?wt(e[0],e[1]):yt(e):Lt(e)}function $t(e,n){return e&&sn(e,n,O)}function Ct(e,n){return function(r,t){if(r==null)return r;if(!Ae(r))return e(r,t);for(var i=r.length,s=-1,a=Object(r);++s<i&&t(a[s],s,a)!==!1;);return r}}var k=Ct($t);function It(e){return typeof e=="function"?e:we}function m(e,n){var r=y(e)?Le:k;return r(e,It(n))}function St(e,n){var r=[];return k(e,function(t,i,s){n(t,i,s)&&r.push(t)}),r}function R(e,n){var r=y(e)?Ie:St;return r(e,Be(n))}function Nt(e,n){return Pe(n,function(r){return e[r]})}function K(e){return e==null?[]:Nt(e,O(e))}function P(e){return e===void 0}function Ft(e,n,r,t,i){return i(e,function(s,a,u){r=t?(t=!1,s):n(r,s,a,u)}),r}function Mt(e,n,r){var t=y(e)?vn:Ft,i=arguments.length<3;return t(e,Be(n),r,i,k)}var Rt=1/0,xt=j&&1/z(new j([,-0]))[1]==Rt?function(e){return new j(e)}:on,Dt=200;function Gt(e,n,r){var t=-1,i=cn,s=e.length,a=!0,u=[],f=u;if(s>=Dt){var g=xt(e);if(g)return z(g);a=!1,i=De,f=new I}else f=u;e:for(;++t<s;){var l=e[t],o=l;if(l=l!==0?l:0,a&&o===o){for(var h=f.length;h--;)if(f[h]===o)continue e;u.push(l)}else i(f,o,r)||(f!==u&&f.push(o),u.push(l))}return u}var jt=an(function(e){return Gt(Pn(e,1,un,!0))}),Ut="\0",w="\0",pe="";class Ke{constructor(n={}){this._isDirected=Object.prototype.hasOwnProperty.call(n,"directed")?n.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(n,"multigraph")?n.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(n,"compound")?n.compound:!1,this._label=void 0,this._defaultNodeLabelFn=F(void 0),this._defaultEdgeLabelFn=F(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[w]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(n){return this._label=n,this}graph(){return this._label}setDefaultNodeLabel(n){return re(n)||(n=F(n)),this._defaultNodeLabelFn=n,this}nodeCount(){return this._nodeCount}nodes(){return O(this._nodes)}sources(){var n=this;return R(this.nodes(),function(r){return te(n._in[r])})}sinks(){var n=this;return R(this.nodes(),function(r){return te(n._out[r])})}setNodes(n,r){var t=arguments,i=this;return m(n,function(s){t.length>1?i.setNode(s,r):i.setNode(s)}),this}setNode(n,r){return Object.prototype.hasOwnProperty.call(this._nodes,n)?(arguments.length>1&&(this._nodes[n]=r),this):(this._nodes[n]=arguments.length>1?r:this._defaultNodeLabelFn(n),this._isCompound&&(this._parent[n]=w,this._children[n]={},this._children[w][n]=!0),this._in[n]={},this._preds[n]={},this._out[n]={},this._sucs[n]={},++this._nodeCount,this)}node(n){return this._nodes[n]}hasNode(n){return Object.prototype.hasOwnProperty.call(this._nodes,n)}removeNode(n){if(Object.prototype.hasOwnProperty.call(this._nodes,n)){var r=t=>this.removeEdge(this._edgeObjs[t]);delete this._nodes[n],this._isCompound&&(this._removeFromParentsChildList(n),delete this._parent[n],m(this.children(n),t=>{this.setParent(t)}),delete this._children[n]),m(O(this._in[n]),r),delete this._in[n],delete this._preds[n],m(O(this._out[n]),r),delete this._out[n],delete this._sucs[n],--this._nodeCount}return this}setParent(n,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(P(r))r=w;else{r+="";for(var t=r;!P(t);t=this.parent(t))if(t===n)throw new Error("Setting "+r+" as parent of "+n+" would create a cycle");this.setNode(r)}return this.setNode(n),this._removeFromParentsChildList(n),this._parent[n]=r,this._children[r][n]=!0,this}_removeFromParentsChildList(n){delete this._children[this._parent[n]][n]}parent(n){if(this._isCompound){var r=this._parent[n];if(r!==w)return r}}children(n){if(P(n)&&(n=w),this._isCompound){var r=this._children[n];if(r)return O(r)}else{if(n===w)return this.nodes();if(this.hasNode(n))return[]}}predecessors(n){var r=this._preds[n];if(r)return O(r)}successors(n){var r=this._sucs[n];if(r)return O(r)}neighbors(n){var r=this.predecessors(n);if(r)return jt(r,this.successors(n))}isLeaf(n){var r;return this.isDirected()?r=this.successors(n):r=this.neighbors(n),r.length===0}filterNodes(n){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var t=this;m(this._nodes,function(a,u){n(u)&&r.setNode(u,a)}),m(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,t.edge(a))});var i={};function s(a){var u=t.parent(a);return u===void 0||r.hasNode(u)?(i[a]=u,u):u in i?i[u]:s(u)}return this._isCompound&&m(r.nodes(),function(a){r.setParent(a,s(a))}),r}setDefaultEdgeLabel(n){return re(n)||(n=F(n)),this._defaultEdgeLabelFn=n,this}edgeCount(){return this._edgeCount}edges(){return K(this._edgeObjs)}setPath(n,r){var t=this,i=arguments;return Mt(n,function(s,a){return i.length>1?t.setEdge(s,a,r):t.setEdge(s,a),a}),this}setEdge(){var n,r,t,i,s=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(n=a.v,r=a.w,t=a.name,arguments.length===2&&(i=arguments[1],s=!0)):(n=a,r=arguments[1],t=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),n=""+n,r=""+r,P(t)||(t=""+t);var u=v(this._isDirected,n,r,t);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,u))return s&&(this._edgeLabels[u]=i),this;if(!P(t)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(n),this.setNode(r),this._edgeLabels[u]=s?i:this._defaultEdgeLabelFn(n,r,t);var f=Bt(this._isDirected,n,r,t);return n=f.v,r=f.w,Object.freeze(f),this._edgeObjs[u]=f,be(this._preds[r],n),be(this._sucs[n],r),this._in[r][u]=f,this._out[n][u]=f,this._edgeCount++,this}edge(n,r,t){var i=arguments.length===1?H(this._isDirected,arguments[0]):v(this._isDirected,n,r,t);return this._edgeLabels[i]}hasEdge(n,r,t){var i=arguments.length===1?H(this._isDirected,arguments[0]):v(this._isDirected,n,r,t);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(n,r,t){var i=arguments.length===1?H(this._isDirected,arguments[0]):v(this._isDirected,n,r,t),s=this._edgeObjs[i];return s&&(n=s.v,r=s.w,delete this._edgeLabels[i],delete this._edgeObjs[i],ye(this._preds[r],n),ye(this._sucs[n],r),delete this._in[r][i],delete this._out[n][i],this._edgeCount--),this}inEdges(n,r){var t=this._in[n];if(t){var i=K(t);return r?R(i,function(s){return s.v===r}):i}}outEdges(n,r){var t=this._out[n];if(t){var i=K(t);return r?R(i,function(s){return s.w===r}):i}}nodeEdges(n,r){var t=this.inEdges(n,r);if(t)return t.concat(this.outEdges(n,r))}}Ke.prototype._nodeCount=0;Ke.prototype._edgeCount=0;function be(e,n){e[n]?e[n]++:e[n]=1}function ye(e,n){--e[n]||delete e[n]}function v(e,n,r,t){var i=""+n,s=""+r;if(!e&&i>s){var a=i;i=s,s=a}return i+pe+s+pe+(P(t)?Ut:t)}function Bt(e,n,r,t){var i=""+n,s=""+r;if(!e&&i>s){var a=i;i=s,s=a}var u={v:i,w:s};return t&&(u.name=t),u}function H(e,n){return v(e,n.v,n.w,n.name)}export{Ke as G,X as a,Pn as b,U as c,Be as d,dn as e,k as f,Pe as g,It as h,P as i,$t as j,O as k,Ot as l,$e as m,Ce as n,Tt as o,En as p,m as q,R as r,Mt as s,G as t,K as v};
@@ -0,0 +1 @@
1
+ import{i as N,G as A}from"./graph-CT-F3Got.js";import{m as $,l as H}from"./layout-CVO3EizT.js";import{c as V}from"./clone-DtEyH3ya.js";import{i as U,u as W,s as _,a as q,b as z,g as D,p as O,c as K,d as Q,e as p,f as J,h as Y,j as Z}from"./edges-96097737-CYxl0j3g.js";import{l as s,g as T,r as S,d as L}from"./index-CvYvquQR.js";import{a as I}from"./createText-1719965b-DkNrTk-5.js";function m(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:tt(e),edges:et(e)};return N(e.graph())||(t.value=V(e.graph())),t}function tt(e){return $(e.nodes(),function(t){var n=e.node(t),r=e.parent(t),i={v:t};return N(n)||(i.value=n),N(r)||(i.parent=r),i})}function et(e){return $(e.edges(),function(t){var n=e.edge(t),r={v:t.v,w:t.w};return N(t.name)||(r.name=t.name),N(n)||(r.value=n),r})}let l={},g={},R={};const nt=()=>{g={},R={},l={}},B=(e,t)=>(s.trace("In isDescendant",t," ",e," = ",g[t].includes(e)),!!g[t].includes(e)),it=(e,t)=>(s.info("Descendants of ",t," is ",g[t]),s.info("Edge is ",e),e.v===t||e.w===t?!1:g[t]?g[t].includes(e.v)||B(e.v,t)||B(e.w,t)||g[t].includes(e.w):(s.debug("Tilt, ",t,",not in descendants"),!1)),P=(e,t,n,r)=>{s.warn("Copying children of ",e,"root",r,"data",t.node(e),r);const i=t.children(e)||[];e!==r&&i.push(e),s.warn("Copying (nodes) clusterId",e,"nodes",i),i.forEach(a=>{if(t.children(a).length>0)P(a,t,n,r);else{const d=t.node(a);s.info("cp ",a," to ",r," with parent ",e),n.setNode(a,d),r!==t.parent(a)&&(s.warn("Setting parent",a,t.parent(a)),n.setParent(a,t.parent(a))),e!==r&&a!==e?(s.debug("Setting parent",a,e),n.setParent(a,e)):(s.info("In copy ",e,"root",r,"data",t.node(e),r),s.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==r,"node!==clusterId",a!==e));const u=t.edges(a);s.debug("Copying Edges",u),u.forEach(f=>{s.info("Edge",f);const h=t.edge(f.v,f.w,f.name);s.info("Edge data",h,r);try{it(f,r)?(s.info("Copying as ",f.v,f.w,h,f.name),n.setEdge(f.v,f.w,h,f.name),s.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):s.info("Skipping copy of edge ",f.v,"-->",f.w," rootId: ",r," clusterId:",e)}catch(w){s.error(w)}})}s.debug("Removing node",a),t.removeNode(a)})},k=(e,t)=>{const n=t.children(e);let r=[...n];for(const i of n)R[i]=e,r=[...r,...k(i,t)];return r},C=(e,t)=>{s.trace("Searching",e);const n=t.children(e);if(s.trace("Searching children of id ",e,n),n.length<1)return s.trace("This is a valid node",e),e;for(const r of n){const i=C(r,t);if(i)return s.trace("Found replacement for",e," => ",i),i}},X=e=>!l[e]||!l[e].externalConnections?e:l[e]?l[e].id:e,st=(e,t)=>{if(!e||t>10){s.debug("Opting out, no graph ");return}else s.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(s.warn("Cluster identified",n," Replacement id in edges: ",C(n,e)),g[n]=k(n,e),l[n]={id:C(n,e),clusterData:e.node(n)})}),e.nodes().forEach(function(n){const r=e.children(n),i=e.edges();r.length>0?(s.debug("Cluster identified",n,g),i.forEach(a=>{if(a.v!==n&&a.w!==n){const d=B(a.v,n),u=B(a.w,n);d^u&&(s.warn("Edge: ",a," leaves cluster ",n),s.warn("Descendants of XXX ",n,": ",g[n]),l[n].externalConnections=!0)}})):s.debug("Not a cluster ",n,g)});for(let n of Object.keys(l)){const r=l[n].id,i=e.parent(r);i!==n&&l[i]&&!l[i].externalConnections&&(l[n].id=i)}e.edges().forEach(function(n){const r=e.edge(n);s.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),s.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let i=n.v,a=n.w;if(s.warn("Fix XXX",l,"ids:",n.v,n.w,"Translating: ",l[n.v]," --- ",l[n.w]),l[n.v]&&l[n.w]&&l[n.v]===l[n.w]){s.warn("Fixing and trixing link to self - removing XXX",n.v,n.w,n.name),s.warn("Fixing and trixing - removing XXX",n.v,n.w,n.name),i=X(n.v),a=X(n.w),e.removeEdge(n.v,n.w,n.name);const d=n.w+"---"+n.v;e.setNode(d,{domId:d,id:d,labelStyle:"",labelText:r.label,padding:0,shape:"labelRect",style:""});const u=structuredClone(r),f=structuredClone(r);u.label="",u.arrowTypeEnd="none",f.label="",u.fromCluster=n.v,f.toCluster=n.v,e.setEdge(i,d,u,n.name+"-cyclic-special"),e.setEdge(d,a,f,n.name+"-cyclic-special")}else if(l[n.v]||l[n.w]){if(s.warn("Fixing and trixing - removing XXX",n.v,n.w,n.name),i=X(n.v),a=X(n.w),e.removeEdge(n.v,n.w,n.name),i!==n.v){const d=e.parent(i);l[d].externalConnections=!0,r.fromCluster=n.v}if(a!==n.w){const d=e.parent(a);l[d].externalConnections=!0,r.toCluster=n.w}s.warn("Fix Replacing with XXX",i,a,n.name),e.setEdge(i,a,r,n.name)}}),s.warn("Adjusted Graph",m(e)),F(e,0),s.trace(l)},F=(e,t)=>{if(s.warn("extractor - ",t,m(e),e.children("D")),t>10){s.error("Bailing out");return}let n=e.nodes(),r=!1;for(const i of n){const a=e.children(i);r=r||a.length>0}if(!r){s.debug("Done, no node has children",e.nodes());return}s.debug("Nodes = ",n,t);for(const i of n)if(s.debug("Extracting node",i,l,l[i]&&!l[i].externalConnections,!e.parent(i),e.node(i),e.children("D")," Depth ",t),!l[i])s.debug("Not a cluster",i,t);else if(!l[i].externalConnections&&e.children(i)&&e.children(i).length>0){s.warn("Cluster without external connections, without a parent and with children",i,t);let d=e.graph().rankdir==="TB"?"LR":"TB";l[i]&&l[i].clusterData&&l[i].clusterData.dir&&(d=l[i].clusterData.dir,s.warn("Fixing dir",l[i].clusterData.dir,d));const u=new A({multigraph:!0,compound:!0}).setGraph({rankdir:d,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});s.warn("Old graph before copy",m(e)),P(i,e,u,i),e.setNode(i,{clusterNode:!0,id:i,clusterData:l[i].clusterData,labelText:l[i].labelText,graph:u}),s.warn("New graph after copy node: (",i,")",m(u)),s.debug("Old graph after copy",m(e))}else s.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!l[i].externalConnections," no parent: ",!e.parent(i)," children ",e.children(i)&&e.children(i).length>0,e.children("D"),t),s.debug(l);n=e.nodes(),s.warn("New list of nodes",n);for(const i of n){const a=e.node(i);s.warn(" Now next level",i,a),a.clusterNode&&F(a.graph,t+1)}},G=(e,t)=>{if(t.length===0)return[];let n=Object.assign(t);return t.forEach(r=>{const i=e.children(r),a=G(e,i);n=[...n,...a]}),n},rt=e=>G(e,e.children()),at=(e,t)=>{s.info("Creating subgraph rect for ",t.id,t);const n=T(),r=e.insert("g").attr("class","cluster"+(t.class?" "+t.class:"")).attr("id",t.id),i=r.insert("rect",":first-child"),a=S(n.flowchart.htmlLabels),d=r.insert("g").attr("class","cluster-label"),u=t.labelType==="markdown"?I(d,t.labelText,{style:t.labelStyle,useHtmlLabels:a}):d.node().appendChild(J(t.labelText,t.labelStyle,void 0,!0));let f=u.getBBox();if(S(n.flowchart.htmlLabels)){const c=u.children[0],o=L(u);f=c.getBoundingClientRect(),o.attr("width",f.width),o.attr("height",f.height)}const h=0*t.padding,w=h/2,x=t.width<=f.width+h?f.width+h:t.width;t.width<=f.width+h?t.diff=(f.width-t.width)/2-t.padding/2:t.diff=-t.padding/2,s.trace("Data ",t,JSON.stringify(t)),i.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-x/2).attr("y",t.y-t.height/2-w).attr("width",x).attr("height",t.height+h);const{subGraphTitleTopMargin:v}=D(n);a?d.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+v})`):d.attr("transform",`translate(${t.x}, ${t.y-t.height/2+v})`);const y=i.node().getBBox();return t.width=y.width,t.height=y.height,t.intersect=function(c){return p(t,c)},r},ct=(e,t)=>{const n=e.insert("g").attr("class","note-cluster").attr("id",t.id),r=n.insert("rect",":first-child"),i=0*t.padding,a=i/2;r.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+i).attr("height",t.height+i).attr("fill","none");const d=r.node().getBBox();return t.width=d.width,t.height=d.height,t.intersect=function(u){return p(t,u)},n},ot=(e,t)=>{const n=T(),r=e.insert("g").attr("class",t.classes).attr("id",t.id),i=r.insert("rect",":first-child"),a=r.insert("g").attr("class","cluster-label"),d=r.append("rect"),u=a.node().appendChild(J(t.labelText,t.labelStyle,void 0,!0));let f=u.getBBox();if(S(n.flowchart.htmlLabels)){const c=u.children[0],o=L(u);f=c.getBoundingClientRect(),o.attr("width",f.width),o.attr("height",f.height)}f=u.getBBox();const h=0*t.padding,w=h/2,x=t.width<=f.width+t.padding?f.width+t.padding:t.width;t.width<=f.width+t.padding?t.diff=(f.width+t.padding*0-t.width)/2:t.diff=-t.padding/2,i.attr("class","outer").attr("x",t.x-x/2-w).attr("y",t.y-t.height/2-w).attr("width",x+h).attr("height",t.height+h),d.attr("class","inner").attr("x",t.x-x/2-w).attr("y",t.y-t.height/2-w+f.height-1).attr("width",x+h).attr("height",t.height+h-f.height-3);const{subGraphTitleTopMargin:v}=D(n);a.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2-t.padding/3+(S(n.flowchart.htmlLabels)?5:3)+v})`);const y=i.node().getBBox();return t.height=y.height,t.intersect=function(c){return p(t,c)},r},lt=(e,t)=>{const n=e.insert("g").attr("class",t.classes).attr("id",t.id),r=n.insert("rect",":first-child"),i=0*t.padding,a=i/2;r.attr("class","divider").attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2).attr("width",t.width+i).attr("height",t.height+i);const d=r.node().getBBox();return t.width=d.width,t.height=d.height,t.diff=-t.padding/2,t.intersect=function(u){return p(t,u)},n},ft={rect:at,roundedWithTitle:ot,noteGroup:ct,divider:lt};let j={};const dt=(e,t)=>{s.trace("Inserting cluster");const n=t.shape||"rect";j[t.id]=ft[n](e,t)},ut=()=>{j={}},M=async(e,t,n,r,i,a)=>{s.info("Graph in recursive render: XXX",m(t),i);const d=t.graph().rankdir;s.trace("Dir in recursive render - dir:",d);const u=e.insert("g").attr("class","root");t.nodes()?s.info("Recursive render XXX",t.nodes()):s.info("No nodes found for",t),t.edges().length>0&&s.trace("Recursive edges",t.edge(t.edges()[0]));const f=u.insert("g").attr("class","clusters"),h=u.insert("g").attr("class","edgePaths"),w=u.insert("g").attr("class","edgeLabels"),x=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(c){const o=t.node(c);if(i!==void 0){const b=JSON.parse(JSON.stringify(i.clusterData));s.info("Setting data for cluster XXX (",c,") ",b,i),t.setNode(i.id,b),t.parent(c)||(s.trace("Setting parent",c,i.id),t.setParent(c,i.id,b))}if(s.info("(Insert) Node XXX"+c+": "+JSON.stringify(t.node(c))),o&&o.clusterNode){s.info("Cluster identified",c,o.width,t.node(c));const b=await M(x,o.graph,n,r,t.node(c),a),E=b.elem;W(o,E),o.diff=b.diff||0,s.info("Node bounds (abc123)",c,o,o.width,o.x,o.y),_(E,o),s.warn("Recursive render complete ",E,o)}else t.children(c).length>0?(s.info("Cluster - the non recursive path XXX",c,o.id,o,t),s.info(C(o.id,t)),l[o.id]={id:C(o.id,t),node:o}):(s.info("Node - the non recursive path",c,o.id,o),await q(x,t.node(c),d))})),t.edges().forEach(function(c){const o=t.edge(c.v,c.w,c.name);s.info("Edge "+c.v+" -> "+c.w+": "+JSON.stringify(c)),s.info("Edge "+c.v+" -> "+c.w+": ",c," ",JSON.stringify(t.edge(c))),s.info("Fix",l,"ids:",c.v,c.w,"Translating: ",l[c.v],l[c.w]),z(w,o)}),t.edges().forEach(function(c){s.info("Edge "+c.v+" -> "+c.w+": "+JSON.stringify(c))}),s.info("#############################################"),s.info("### Layout ###"),s.info("#############################################"),s.info(t),H(t),s.info("Graph after layout:",m(t));let v=0;const{subGraphTitleTotalMargin:y}=D(a);return rt(t).forEach(function(c){const o=t.node(c);s.info("Position "+c+": "+JSON.stringify(t.node(c))),s.info("Position "+c+": ("+o.x,","+o.y,") width: ",o.width," height: ",o.height),o&&o.clusterNode?(o.y+=y,O(o)):t.children(c).length>0?(o.height+=y,dt(f,o),l[o.id].node=o):(o.y+=y/2,O(o))}),t.edges().forEach(function(c){const o=t.edge(c);s.info("Edge "+c.v+" -> "+c.w+": "+JSON.stringify(o),o),o.points.forEach(E=>E.y+=y/2);const b=K(h,c,o,l,n,t,r);Q(o,b)}),t.nodes().forEach(function(c){const o=t.node(c);s.info(c,o.type,o.diff),o.type==="group"&&(v=o.diff)}),{elem:u,diff:v}},bt=async(e,t,n,r,i)=>{U(e,n,r,i),Y(),Z(),ut(),nt(),s.warn("Graph at first:",JSON.stringify(m(t))),st(t),s.warn("Graph after:",JSON.stringify(m(t)));const a=T();await M(e,t,r,i,void 0,a)};export{bt as r};