@bigduu/lotus 2026.4.28 → 2026.4.30
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.
- package/dist/assets/App-DCXI8jTD.js +248 -0
- package/dist/assets/_baseUniq-JxvxITJ4.js +1 -0
- package/dist/assets/architectureDiagram-Q4EWVU46-BtLEHHTC.js +36 -0
- package/dist/assets/blockDiagram-DXYQGD6D-VCIl5oVL.js +132 -0
- package/dist/assets/c4Diagram-AHTNJAMY-sxcrRtSC.js +10 -0
- package/dist/assets/{chunk-4BX2VUAB-BQS5VpDJ.js → chunk-4BX2VUAB-cdpbCefI.js} +1 -1
- package/dist/assets/chunk-4TB4RGXK-6y4jkX8O.js +206 -0
- package/dist/assets/{chunk-55IACEB6-DDBTvfeq.js → chunk-55IACEB6-zGTUbgou.js} +1 -1
- package/dist/assets/{chunk-QN33PNHL-DXRkgd3W.js → chunk-EDXVE4YY-CPKsbfnW.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-DyekHBM9.js → chunk-FMBD7UC4-u1fsHgLk.js} +1 -1
- package/dist/assets/chunk-OYMX7WX6-B_juGEzU.js +231 -0
- package/dist/assets/{chunk-QZHKN3VN-BxdDkaqA.js → chunk-QZHKN3VN-Cziuusiz.js} +1 -1
- package/dist/assets/chunk-YZCP3GAM-SnPgbijx.js +1 -0
- package/dist/assets/classDiagram-6PBFFD2Q-8WbR2T8d.js +1 -0
- package/dist/assets/classDiagram-v2-HSJHXN6E-8WbR2T8d.js +1 -0
- package/dist/assets/clone-BzHXtWgJ.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-C_pFTYgk.js → cose-bilkent-S5V4N54A-DP12PpvR.js} +1 -1
- package/dist/assets/cytoscape.esm-BiciSPf8.js +331 -0
- package/dist/assets/dagre-KV5264BT-BWrJEOJE.js +4 -0
- package/dist/assets/diagram-5BDNPKRD-B3Ag_nwx.js +10 -0
- package/dist/assets/diagram-G4DWMVQ6-CU5AAMtk.js +24 -0
- package/dist/assets/diagram-MMDJMWI5-0jeeksm5.js +43 -0
- package/dist/assets/diagram-TYMM5635-B8Te0NTK.js +24 -0
- package/dist/assets/erDiagram-SMLLAGMA-DgZehpcF.js +85 -0
- package/dist/assets/flowDiagram-DWJPFMVM-DME4sy3r.js +162 -0
- package/dist/assets/ganttDiagram-T4ZO3ILL-4VUoDKDN.js +292 -0
- package/dist/assets/gitGraphDiagram-UUTBAWPF-M9eA0knu.js +106 -0
- package/dist/assets/graph-Dl52eM4Z.js +1 -0
- package/dist/assets/index-BAibvIVz.js +1 -0
- package/dist/assets/index-BNcuFl0J.js +1 -0
- package/dist/assets/index-C9mV36Y0.js +1 -0
- package/dist/assets/index-v1C2DQLr.js +1 -0
- package/dist/assets/{index-CUKVUr8s.js → index-yMJRRs89.js} +1 -1
- package/dist/assets/{index.es-DdtT3adr.js → index.es-DYgOq-7b.js} +1 -1
- package/dist/assets/infoDiagram-42DDH7IO-DSE-8cVU.js +2 -0
- package/dist/assets/ishikawaDiagram-UXIWVN3A-CZdup7Ia.js +70 -0
- package/dist/assets/journeyDiagram-VCZTEJTY-DApltPSo.js +139 -0
- package/dist/assets/{kanban-definition-3W4ZIXB7-DaQyoaQ-.js → kanban-definition-6JOO6SKY-ClF33MZ9.js} +8 -8
- package/dist/assets/katex-DkKDou_j.js +257 -0
- package/dist/assets/layout-Cc6oxhrd.js +1 -0
- package/dist/assets/{main-DTO0Nb-V.js → main-BgGBpmTu.js} +5 -5
- package/dist/assets/min-CRXMcNks.js +1 -0
- package/dist/assets/mindmap-definition-QFDTVHPH-Cp5dCq5F.js +96 -0
- package/dist/assets/pieDiagram-DEJITSTG-xwiGZjCh.js +30 -0
- package/dist/assets/{quadrantDiagram-AYHSOK5B-BxLvBNZc.js → quadrantDiagram-34T5L4WZ-DYFzLdJ_.js} +1 -1
- package/dist/assets/requirementDiagram-MS252O5E-CcTppyOC.js +84 -0
- package/dist/assets/{sankeyDiagram-TZEHDZUN-CDuaBdM7.js → sankeyDiagram-XADWPNL6-BidnGUTn.js} +1 -1
- package/dist/assets/sequenceDiagram-FGHM5R23-BGNLJ-kB.js +157 -0
- package/dist/assets/stateDiagram-FHFEXIEX-DaT9haW6.js +1 -0
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-CIjRWULt.js +1 -0
- package/dist/assets/timeline-definition-GMOUNBTQ-B7UYx32z.js +120 -0
- package/dist/assets/{vendor-antd-DzhFcYgt.js → vendor-antd-Dvkx9eba.js} +1 -1
- package/dist/assets/{vendor-charts-BvOlsian.js → vendor-charts-DHCOhRb3.js} +1 -1
- package/dist/assets/{vendor-markdown-DYfLXXRA.js → vendor-markdown-DrUBuQ-c.js} +1 -1
- package/dist/assets/vendor-mermaid-BAz0MwVj.js +309 -0
- package/dist/assets/{vendor-pdf-CBvfEKBn.js → vendor-pdf-wx1tMujY.js} +4 -4
- package/dist/assets/vennDiagram-DHZGUBPP-DbgCCrwc.js +34 -0
- package/dist/assets/wardley-RL74JXVD-BeMJefeY.js +162 -0
- package/dist/assets/wardleyDiagram-NUSXRM2D-CfibirQl.js +20 -0
- package/dist/assets/xychartDiagram-5P7HB3ND-OkJekxIp.js +7 -0
- package/dist/index.html +3 -3
- package/package.json +3 -3
- package/dist/assets/App-BhEJNmXl.js +0 -247
- package/dist/assets/_basePickBy-CQxbmRut.js +0 -1
- package/dist/assets/_baseUniq-AfN8N44G.js +0 -1
- package/dist/assets/architectureDiagram-VXUJARFQ-b5ju5KOn.js +0 -36
- package/dist/assets/blockDiagram-VD42YOAC-CJZ9JC7A.js +0 -122
- package/dist/assets/c4Diagram-YG6GDRKO-zPXvbm1r.js +0 -10
- package/dist/assets/chunk-B4BG7PRW-DIX1hsaN.js +0 -165
- package/dist/assets/chunk-DI55MBZ5-CnR_JcZS.js +0 -220
- package/dist/assets/chunk-TZMSLE5B-6C2sedz2.js +0 -1
- package/dist/assets/classDiagram-2ON5EDUG-s0FTHA2r.js +0 -1
- package/dist/assets/classDiagram-v2-WZHVMYZB-s0FTHA2r.js +0 -1
- package/dist/assets/clone-D7s6jAMO.js +0 -1
- package/dist/assets/cytoscape.esm-BY7v1xhs.js +0 -331
- package/dist/assets/dagre-6UL2VRFP-CZufvh9X.js +0 -4
- package/dist/assets/diagram-PSM6KHXK-wHztSVlF.js +0 -24
- package/dist/assets/diagram-QEK2KX5R-DSPQM_i_.js +0 -43
- package/dist/assets/diagram-S2PKOQOG-r4X8riql.js +0 -24
- package/dist/assets/erDiagram-Q2GNP2WA-Lxy4qP7U.js +0 -60
- package/dist/assets/flowDiagram-NV44I4VS-Cnln4KZl.js +0 -162
- package/dist/assets/ganttDiagram-JELNMOA3-D8EVN47E.js +0 -267
- package/dist/assets/gitGraphDiagram-V2S2FVAM-D0f-vt5d.js +0 -65
- package/dist/assets/graph-BHQgv4fY.js +0 -1
- package/dist/assets/index-B3u0XLw6.js +0 -1
- package/dist/assets/index-B9rhKJTy.js +0 -1
- package/dist/assets/index-CYeT_vWc.js +0 -1
- package/dist/assets/index-DRKTke9V.js +0 -1
- package/dist/assets/infoDiagram-HS3SLOUP-DU3h9dF-.js +0 -2
- package/dist/assets/journeyDiagram-XKPGCS4Q-CBYV7J-a.js +0 -139
- package/dist/assets/katex-ChWnQ-fc.js +0 -261
- package/dist/assets/layout-ChFZNADC.js +0 -1
- package/dist/assets/mindmap-definition-VGOIOE7T-Dd8rk7Wy.js +0 -68
- package/dist/assets/pieDiagram-ADFJNKIX-DMRijIH2.js +0 -30
- package/dist/assets/requirementDiagram-UZGBJVZJ-DGpPvRmv.js +0 -64
- package/dist/assets/sequenceDiagram-WL72ISMW-vmIEcx_8.js +0 -145
- package/dist/assets/stateDiagram-FKZM4ZOC-hx8zwjxY.js +0 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-D-E3Vh0S.js +0 -1
- package/dist/assets/timeline-definition-IT6M3QCI-DQvTmToF.js +0 -61
- package/dist/assets/treemap-GDKQZRPO-COsTlA-l.js +0 -160
- package/dist/assets/vendor-mermaid-CQXqUd1Z.js +0 -256
- package/dist/assets/xychartDiagram-PRI3JC2R-BoJPfqrl.js +0 -7
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
import{g as le,s as ue,q as de,p as fe,a as he,b as me,_ as c,c as rt,d as ht,e as ke,l as et,at as ye,au as ge,k as pe,j as ve,y as Te,u as be}from"./vendor-mermaid-CQXqUd1Z.js";import{d as V,y as xe,z as we}from"./vendor-antd-DzhFcYgt.js";import{g as Qt}from"./vendor-i18n-BNURlJ23.js";import{H as _e,I as De,J as Se,E as Ce,K as Ee,L as Nt,M as Rt,N as Ie,O as Me,P as Ae,Q as Fe,R as $e,S as Le,T as We,U as Bt,V as zt,W as qt,X as Ht,Y as jt}from"./vendor-charts-BvOlsian.js";import"./vendor-markdown-DYfLXXRA.js";var mt={exports:{}},Ye=mt.exports,Xt;function Oe(){return Xt||(Xt=1,function(t,n){(function(i,r){t.exports=r()})(Ye,function(){var i="day";return function(r,a,k){var T=function(A){return A.add(4-A.isoWeekday(),i)},S=a.prototype;S.isoWeekYear=function(){return T(this).year()},S.isoWeek=function(A){if(!this.$utils().u(A))return this.add(7*(A-this.isoWeek()),i);var D,$,L,W,Y=T(this),_=(D=this.isoWeekYear(),$=this.$u,L=($?k.utc:k)().year(D).startOf("year"),W=4-L.isoWeekday(),L.isoWeekday()>4&&(W+=7),L.add(W,i));return Y.diff(_,"week")+1},S.isoWeekday=function(A){return this.$utils().u(A)?this.day()||7:this.day(this.day()%7?A:A-7)};var O=S.startOf;S.startOf=function(A,D){var $=this.$utils(),L=!!$.u(D)||D;return $.p(A)==="isoweek"?L?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):O.bind(this)(A,D)}}})}(mt)),mt.exports}var Pe=Oe();const Ve=Qt(Pe);var kt={exports:{}},Ne=kt.exports,Ut;function Re(){return Ut||(Ut=1,function(t,n){(function(i,r){t.exports=r()})(Ne,function(){var i,r,a=1e3,k=6e4,T=36e5,S=864e5,O=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,A=31536e6,D=2628e6,$=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,L={years:A,months:D,days:S,hours:T,minutes:k,seconds:a,milliseconds:1,weeks:6048e5},W=function(I){return I instanceof X},Y=function(I,v,f){return new X(I,f,v.$l)},_=function(I){return r.p(I)+"s"},J=function(I){return I<0},B=function(I){return J(I)?Math.ceil(I):Math.floor(I)},Z=function(I){return Math.abs(I)},q=function(I,v){return I?J(I)?{negative:!0,format:""+Z(I)+v}:{negative:!1,format:""+I+v}:{negative:!1,format:""}},X=function(){function I(f,u,y){var g=this;if(this.$d={},this.$l=y,f===void 0&&(this.$ms=0,this.parseFromMilliseconds()),u)return Y(f*L[_(u)],this);if(typeof f=="number")return this.$ms=f,this.parseFromMilliseconds(),this;if(typeof f=="object")return Object.keys(f).forEach(function(o){g.$d[_(o)]=f[o]}),this.calMilliseconds(),this;if(typeof f=="string"){var p=f.match($);if(p){var m=p.slice(2).map(function(o){return o!=null?Number(o):0});return this.$d.years=m[0],this.$d.months=m[1],this.$d.weeks=m[2],this.$d.days=m[3],this.$d.hours=m[4],this.$d.minutes=m[5],this.$d.seconds=m[6],this.calMilliseconds(),this}}return this}var v=I.prototype;return v.calMilliseconds=function(){var f=this;this.$ms=Object.keys(this.$d).reduce(function(u,y){return u+(f.$d[y]||0)*L[y]},0)},v.parseFromMilliseconds=function(){var f=this.$ms;this.$d.years=B(f/A),f%=A,this.$d.months=B(f/D),f%=D,this.$d.days=B(f/S),f%=S,this.$d.hours=B(f/T),f%=T,this.$d.minutes=B(f/k),f%=k,this.$d.seconds=B(f/a),f%=a,this.$d.milliseconds=f},v.toISOString=function(){var f=q(this.$d.years,"Y"),u=q(this.$d.months,"M"),y=+this.$d.days||0;this.$d.weeks&&(y+=7*this.$d.weeks);var g=q(y,"D"),p=q(this.$d.hours,"H"),m=q(this.$d.minutes,"M"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var l=q(o,"S"),h=f.negative||u.negative||g.negative||p.negative||m.negative||l.negative,d=p.format||m.format||l.format?"T":"",b=(h?"-":"")+"P"+f.format+u.format+g.format+d+p.format+m.format+l.format;return b==="P"||b==="-P"?"P0D":b},v.toJSON=function(){return this.toISOString()},v.format=function(f){var u=f||"YYYY-MM-DDTHH:mm:ss",y={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return u.replace(O,function(g,p){return p||String(y[g])})},v.as=function(f){return this.$ms/L[_(f)]},v.get=function(f){var u=this.$ms,y=_(f);return y==="milliseconds"?u%=1e3:u=y==="weeks"?B(u/L[y]):this.$d[y],u||0},v.add=function(f,u,y){var g;return g=u?f*L[_(u)]:W(f)?f.$ms:Y(f,this).$ms,Y(this.$ms+g*(y?-1:1),this)},v.subtract=function(f,u){return this.add(f,u,!0)},v.locale=function(f){var u=this.clone();return u.$l=f,u},v.clone=function(){return Y(this.$ms,this)},v.humanize=function(f){return i().add(this.$ms,"ms").locale(this.$l).fromNow(!f)},v.valueOf=function(){return this.asMilliseconds()},v.milliseconds=function(){return this.get("milliseconds")},v.asMilliseconds=function(){return this.as("milliseconds")},v.seconds=function(){return this.get("seconds")},v.asSeconds=function(){return this.as("seconds")},v.minutes=function(){return this.get("minutes")},v.asMinutes=function(){return this.as("minutes")},v.hours=function(){return this.get("hours")},v.asHours=function(){return this.as("hours")},v.days=function(){return this.get("days")},v.asDays=function(){return this.as("days")},v.weeks=function(){return this.get("weeks")},v.asWeeks=function(){return this.as("weeks")},v.months=function(){return this.get("months")},v.asMonths=function(){return this.as("months")},v.years=function(){return this.get("years")},v.asYears=function(){return this.as("years")},I}(),Q=function(I,v,f){return I.add(v.years()*f,"y").add(v.months()*f,"M").add(v.days()*f,"d").add(v.hours()*f,"h").add(v.minutes()*f,"m").add(v.seconds()*f,"s").add(v.milliseconds()*f,"ms")};return function(I,v,f){i=f,r=f().$utils(),f.duration=function(g,p){var m=f.locale();return Y(g,{$l:m},p)},f.isDuration=W;var u=v.prototype.add,y=v.prototype.subtract;v.prototype.add=function(g,p){return W(g)?Q(this,g,1):u.bind(this)(g,p)},v.prototype.subtract=function(g,p){return W(g)?Q(this,g,-1):y.bind(this)(g,p)}}})}(kt)),kt.exports}var Be=Re();const ze=Qt(Be);var _t=function(){var t=c(function(m,o,l,h){for(l=l||{},h=m.length;h--;l[m[h]]=o);return l},"o"),n=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],i=[1,26],r=[1,27],a=[1,28],k=[1,29],T=[1,30],S=[1,31],O=[1,32],A=[1,33],D=[1,34],$=[1,9],L=[1,10],W=[1,11],Y=[1,12],_=[1,13],J=[1,14],B=[1,15],Z=[1,16],q=[1,19],X=[1,20],Q=[1,21],I=[1,22],v=[1,23],f=[1,25],u=[1,35],y={trace:c(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:c(function(o,l,h,d,b,s,F){var e=s.length-1;switch(b){case 1:return s[e-1];case 2:this.$=[];break;case 3:s[e-1].push(s[e]),this.$=s[e-1];break;case 4:case 5:this.$=s[e];break;case 6:case 7:this.$=[];break;case 8:d.setWeekday("monday");break;case 9:d.setWeekday("tuesday");break;case 10:d.setWeekday("wednesday");break;case 11:d.setWeekday("thursday");break;case 12:d.setWeekday("friday");break;case 13:d.setWeekday("saturday");break;case 14:d.setWeekday("sunday");break;case 15:d.setWeekend("friday");break;case 16:d.setWeekend("saturday");break;case 17:d.setDateFormat(s[e].substr(11)),this.$=s[e].substr(11);break;case 18:d.enableInclusiveEndDates(),this.$=s[e].substr(18);break;case 19:d.TopAxis(),this.$=s[e].substr(8);break;case 20:d.setAxisFormat(s[e].substr(11)),this.$=s[e].substr(11);break;case 21:d.setTickInterval(s[e].substr(13)),this.$=s[e].substr(13);break;case 22:d.setExcludes(s[e].substr(9)),this.$=s[e].substr(9);break;case 23:d.setIncludes(s[e].substr(9)),this.$=s[e].substr(9);break;case 24:d.setTodayMarker(s[e].substr(12)),this.$=s[e].substr(12);break;case 27:d.setDiagramTitle(s[e].substr(6)),this.$=s[e].substr(6);break;case 28:this.$=s[e].trim(),d.setAccTitle(this.$);break;case 29:case 30:this.$=s[e].trim(),d.setAccDescription(this.$);break;case 31:d.addSection(s[e].substr(8)),this.$=s[e].substr(8);break;case 33:d.addTask(s[e-1],s[e]),this.$="task";break;case 34:this.$=s[e-1],d.setClickEvent(s[e-1],s[e],null);break;case 35:this.$=s[e-2],d.setClickEvent(s[e-2],s[e-1],s[e]);break;case 36:this.$=s[e-2],d.setClickEvent(s[e-2],s[e-1],null),d.setLink(s[e-2],s[e]);break;case 37:this.$=s[e-3],d.setClickEvent(s[e-3],s[e-2],s[e-1]),d.setLink(s[e-3],s[e]);break;case 38:this.$=s[e-2],d.setClickEvent(s[e-2],s[e],null),d.setLink(s[e-2],s[e-1]);break;case 39:this.$=s[e-3],d.setClickEvent(s[e-3],s[e-1],s[e]),d.setLink(s[e-3],s[e-2]);break;case 40:this.$=s[e-1],d.setLink(s[e-1],s[e]);break;case 41:case 47:this.$=s[e-1]+" "+s[e];break;case 42:case 43:case 45:this.$=s[e-2]+" "+s[e-1]+" "+s[e];break;case 44:case 46:this.$=s[e-3]+" "+s[e-2]+" "+s[e-1]+" "+s[e];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:i,13:r,14:a,15:k,16:T,17:S,18:O,19:18,20:A,21:D,22:$,23:L,24:W,25:Y,26:_,27:J,28:B,29:Z,30:q,31:X,33:Q,35:I,36:v,37:24,38:f,40:u},t(n,[2,7],{1:[2,1]}),t(n,[2,3]),{9:36,11:17,12:i,13:r,14:a,15:k,16:T,17:S,18:O,19:18,20:A,21:D,22:$,23:L,24:W,25:Y,26:_,27:J,28:B,29:Z,30:q,31:X,33:Q,35:I,36:v,37:24,38:f,40:u},t(n,[2,5]),t(n,[2,6]),t(n,[2,17]),t(n,[2,18]),t(n,[2,19]),t(n,[2,20]),t(n,[2,21]),t(n,[2,22]),t(n,[2,23]),t(n,[2,24]),t(n,[2,25]),t(n,[2,26]),t(n,[2,27]),{32:[1,37]},{34:[1,38]},t(n,[2,30]),t(n,[2,31]),t(n,[2,32]),{39:[1,39]},t(n,[2,8]),t(n,[2,9]),t(n,[2,10]),t(n,[2,11]),t(n,[2,12]),t(n,[2,13]),t(n,[2,14]),t(n,[2,15]),t(n,[2,16]),{41:[1,40],43:[1,41]},t(n,[2,4]),t(n,[2,28]),t(n,[2,29]),t(n,[2,33]),t(n,[2,34],{42:[1,42],43:[1,43]}),t(n,[2,40],{41:[1,44]}),t(n,[2,35],{43:[1,45]}),t(n,[2,36]),t(n,[2,38],{42:[1,46]}),t(n,[2,37]),t(n,[2,39])],defaultActions:{},parseError:c(function(o,l){if(l.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=l,h}},"parseError"),parse:c(function(o){var l=this,h=[0],d=[],b=[null],s=[],F=this.table,e="",x=0,M=0,E=2,C=1,N=s.slice.call(arguments,1),w=Object.create(this.lexer),U={yy:{}};for(var ot in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ot)&&(U.yy[ot]=this.yy[ot]);w.setInput(o,U.yy),U.yy.lexer=w,U.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var Tt=w.yylloc;s.push(Tt);var oe=w.options&&w.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ce(z){h.length=h.length-2*z,b.length=b.length-z,s.length=s.length-z}c(ce,"popStack");function Pt(){var z;return z=d.pop()||w.lex()||C,typeof z!="number"&&(z instanceof Array&&(d=z,z=d.pop()),z=l.symbols_[z]||z),z}c(Pt,"lex");for(var R,tt,H,bt,it={},dt,G,Vt,ft;;){if(tt=h[h.length-1],this.defaultActions[tt]?H=this.defaultActions[tt]:((R===null||typeof R>"u")&&(R=Pt()),H=F[tt]&&F[tt][R]),typeof H>"u"||!H.length||!H[0]){var xt="";ft=[];for(dt in F[tt])this.terminals_[dt]&&dt>E&&ft.push("'"+this.terminals_[dt]+"'");w.showPosition?xt="Parse error on line "+(x+1)+`:
|
|
2
|
-
`+w.showPosition()+`
|
|
3
|
-
Expecting `+ft.join(", ")+", got '"+(this.terminals_[R]||R)+"'":xt="Parse error on line "+(x+1)+": Unexpected "+(R==C?"end of input":"'"+(this.terminals_[R]||R)+"'"),this.parseError(xt,{text:w.match,token:this.terminals_[R]||R,line:w.yylineno,loc:Tt,expected:ft})}if(H[0]instanceof Array&&H.length>1)throw new Error("Parse Error: multiple actions possible at state: "+tt+", token: "+R);switch(H[0]){case 1:h.push(R),b.push(w.yytext),s.push(w.yylloc),h.push(H[1]),R=null,M=w.yyleng,e=w.yytext,x=w.yylineno,Tt=w.yylloc;break;case 2:if(G=this.productions_[H[1]][1],it.$=b[b.length-G],it._$={first_line:s[s.length-(G||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(G||1)].first_column,last_column:s[s.length-1].last_column},oe&&(it._$.range=[s[s.length-(G||1)].range[0],s[s.length-1].range[1]]),bt=this.performAction.apply(it,[e,M,x,U.yy,H[1],b,s].concat(N)),typeof bt<"u")return bt;G&&(h=h.slice(0,-1*G*2),b=b.slice(0,-1*G),s=s.slice(0,-1*G)),h.push(this.productions_[H[1]][0]),b.push(it.$),s.push(it._$),Vt=F[h[h.length-2]][h[h.length-1]],h.push(Vt);break;case 3:return!0}}return!0},"parse")},g=function(){var m={EOF:1,parseError:c(function(l,h){if(this.yy.parser)this.yy.parser.parseError(l,h);else throw new Error(l)},"parseError"),setInput:c(function(o,l){return this.yy=l||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},"setInput"),input:c(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var l=o.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:c(function(o){var l=o.length,h=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var d=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),h.length-1&&(this.yylineno-=h.length-1);var b=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:h?(h.length===d.length?this.yylloc.first_column:0)+d[d.length-h.length].length-h[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(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},"reject"),less:c(function(o){this.unput(this.match.slice(o))},"less"),pastInput:c(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(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,"")},"upcomingInput"),showPosition:c(function(){var o=this.pastInput(),l=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
5
|
-
`+l+"^"},"showPosition"),test_match:c(function(o,l){var h,d,b;if(this.options.backtrack_lexer&&(b={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&&(b.yylloc.range=this.yylloc.range.slice(0))),d=o[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.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],h=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var s in b)this[s]=b[s];return!1}return!1},"test_match"),next:c(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,l,h,d;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),s=0;s<b.length;s++)if(h=this._input.match(this.rules[b[s]]),h&&(!l||h[0].length>l[0].length)){if(l=h,d=s,this.options.backtrack_lexer){if(o=this.test_match(h,b[s]),o!==!1)return o;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(o=this.test_match(l,b[d]),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})},"next"),lex:c(function(){var l=this.next();return l||this.lex()},"lex"),begin:c(function(l){this.conditionStack.push(l)},"begin"),popState:c(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:c(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:c(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:c(function(l){this.begin(l)},"pushState"),stateStackSize:c(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:c(function(l,h,d,b){switch(d){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return m}();y.lexer=g;function p(){this.yy={}}return c(p,"Parser"),p.prototype=y,y.Parser=p,new p}();_t.parser=_t;var qe=_t;V.extend(Ve);V.extend(xe);V.extend(we);var Gt={friday:5,saturday:6},j="",Et="",It=void 0,Mt="",ct=[],lt=[],At=new Map,Ft=[],pt=[],at="",$t="",Zt=["active","done","crit","milestone","vert"],Lt=[],ut=!1,Wt=!1,Yt="sunday",vt="saturday",Dt=0,He=c(function(){Ft=[],pt=[],at="",Lt=[],yt=0,Ct=void 0,gt=void 0,P=[],j="",Et="",$t="",It=void 0,Mt="",ct=[],lt=[],ut=!1,Wt=!1,Dt=0,At=new Map,Te(),Yt="sunday",vt="saturday"},"clear"),je=c(function(t){Et=t},"setAxisFormat"),Xe=c(function(){return Et},"getAxisFormat"),Ue=c(function(t){It=t},"setTickInterval"),Ge=c(function(){return It},"getTickInterval"),Ke=c(function(t){Mt=t},"setTodayMarker"),Je=c(function(){return Mt},"getTodayMarker"),Qe=c(function(t){j=t},"setDateFormat"),Ze=c(function(){ut=!0},"enableInclusiveEndDates"),ts=c(function(){return ut},"endDatesAreInclusive"),es=c(function(){Wt=!0},"enableTopAxis"),ss=c(function(){return Wt},"topAxisEnabled"),is=c(function(t){$t=t},"setDisplayMode"),rs=c(function(){return $t},"getDisplayMode"),ns=c(function(){return j},"getDateFormat"),as=c(function(t){ct=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),os=c(function(){return ct},"getIncludes"),cs=c(function(t){lt=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),ls=c(function(){return lt},"getExcludes"),us=c(function(){return At},"getLinks"),ds=c(function(t){at=t,Ft.push(t)},"addSection"),fs=c(function(){return Ft},"getSections"),hs=c(function(){let t=Kt();const n=10;let i=0;for(;!t&&i<n;)t=Kt(),i++;return pt=P,pt},"getTasks"),te=c(function(t,n,i,r){const a=t.format(n.trim()),k=t.format("YYYY-MM-DD");return r.includes(a)||r.includes(k)?!1:i.includes("weekends")&&(t.isoWeekday()===Gt[vt]||t.isoWeekday()===Gt[vt]+1)||i.includes(t.format("dddd").toLowerCase())?!0:i.includes(a)||i.includes(k)},"isInvalidDate"),ms=c(function(t){Yt=t},"setWeekday"),ks=c(function(){return Yt},"getWeekday"),ys=c(function(t){vt=t},"setWeekend"),ee=c(function(t,n,i,r){if(!i.length||t.manualEndTime)return;let a;t.startTime instanceof Date?a=V(t.startTime):a=V(t.startTime,n,!0),a=a.add(1,"d");let k;t.endTime instanceof Date?k=V(t.endTime):k=V(t.endTime,n,!0);const[T,S]=gs(a,k,n,i,r);t.endTime=T.toDate(),t.renderEndTime=S},"checkTaskDates"),gs=c(function(t,n,i,r,a){let k=!1,T=null;for(;t<=n;)k||(T=n.toDate()),k=te(t,i,r,a),k&&(n=n.add(1,"d")),t=t.add(1,"d");return[n,T]},"fixTaskDates"),St=c(function(t,n,i){if(i=i.trim(),c(S=>{const O=S.trim();return O==="x"||O==="X"},"isTimestampFormat")(n)&&/^\d+$/.test(i))return new Date(Number(i));const k=/^after\s+(?<ids>[\d\w- ]+)/.exec(i);if(k!==null){let S=null;for(const A of k.groups.ids.split(" ")){let D=st(A);D!==void 0&&(!S||D.endTime>S.endTime)&&(S=D)}if(S)return S.endTime;const O=new Date;return O.setHours(0,0,0,0),O}let T=V(i,n.trim(),!0);if(T.isValid())return T.toDate();{et.debug("Invalid date:"+i),et.debug("With date format:"+n.trim());const S=new Date(i);if(S===void 0||isNaN(S.getTime())||S.getFullYear()<-1e4||S.getFullYear()>1e4)throw new Error("Invalid date:"+i);return S}},"getStartDate"),se=c(function(t){const n=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return n!==null?[Number.parseFloat(n[1]),n[2]]:[NaN,"ms"]},"parseDuration"),ie=c(function(t,n,i,r=!1){i=i.trim();const k=/^until\s+(?<ids>[\d\w- ]+)/.exec(i);if(k!==null){let D=null;for(const L of k.groups.ids.split(" ")){let W=st(L);W!==void 0&&(!D||W.startTime<D.startTime)&&(D=W)}if(D)return D.startTime;const $=new Date;return $.setHours(0,0,0,0),$}let T=V(i,n.trim(),!0);if(T.isValid())return r&&(T=T.add(1,"d")),T.toDate();let S=V(t);const[O,A]=se(i);if(!Number.isNaN(O)){const D=S.add(O,A);D.isValid()&&(S=D)}return S.toDate()},"getEndDate"),yt=0,nt=c(function(t){return t===void 0?(yt=yt+1,"task"+yt):t},"parseId"),ps=c(function(t,n){let i;n.substr(0,1)===":"?i=n.substr(1,n.length):i=n;const r=i.split(","),a={};Ot(r,a,Zt);for(let T=0;T<r.length;T++)r[T]=r[T].trim();let k="";switch(r.length){case 1:a.id=nt(),a.startTime=t.endTime,k=r[0];break;case 2:a.id=nt(),a.startTime=St(void 0,j,r[0]),k=r[1];break;case 3:a.id=nt(r[0]),a.startTime=St(void 0,j,r[1]),k=r[2];break}return k&&(a.endTime=ie(a.startTime,j,k,ut),a.manualEndTime=V(k,"YYYY-MM-DD",!0).isValid(),ee(a,j,lt,ct)),a},"compileData"),vs=c(function(t,n){let i;n.substr(0,1)===":"?i=n.substr(1,n.length):i=n;const r=i.split(","),a={};Ot(r,a,Zt);for(let k=0;k<r.length;k++)r[k]=r[k].trim();switch(r.length){case 1:a.id=nt(),a.startTime={type:"prevTaskEnd",id:t},a.endTime={data:r[0]};break;case 2:a.id=nt(),a.startTime={type:"getStartDate",startData:r[0]},a.endTime={data:r[1]};break;case 3:a.id=nt(r[0]),a.startTime={type:"getStartDate",startData:r[1]},a.endTime={data:r[2]};break}return a},"parseData"),Ct,gt,P=[],re={},Ts=c(function(t,n){const i={section:at,type:at,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:n},task:t,classes:[]},r=vs(gt,n);i.raw.startTime=r.startTime,i.raw.endTime=r.endTime,i.id=r.id,i.prevTaskId=gt,i.active=r.active,i.done=r.done,i.crit=r.crit,i.milestone=r.milestone,i.vert=r.vert,i.order=Dt,Dt++;const a=P.push(i);gt=i.id,re[i.id]=a-1},"addTask"),st=c(function(t){const n=re[t];return P[n]},"findTaskById"),bs=c(function(t,n){const i={section:at,type:at,description:t,task:t,classes:[]},r=ps(Ct,n);i.startTime=r.startTime,i.endTime=r.endTime,i.id=r.id,i.active=r.active,i.done=r.done,i.crit=r.crit,i.milestone=r.milestone,i.vert=r.vert,Ct=i,pt.push(i)},"addTaskOrg"),Kt=c(function(){const t=c(function(i){const r=P[i];let a="";switch(P[i].raw.startTime.type){case"prevTaskEnd":{const k=st(r.prevTaskId);r.startTime=k.endTime;break}case"getStartDate":a=St(void 0,j,P[i].raw.startTime.startData),a&&(P[i].startTime=a);break}return P[i].startTime&&(P[i].endTime=ie(P[i].startTime,j,P[i].raw.endTime.data,ut),P[i].endTime&&(P[i].processed=!0,P[i].manualEndTime=V(P[i].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),ee(P[i],j,lt,ct))),P[i].processed},"compileTask");let n=!0;for(const[i,r]of P.entries())t(i),n=n&&r.processed;return n},"compileTasks"),xs=c(function(t,n){let i=n;rt().securityLevel!=="loose"&&(i=ve.sanitizeUrl(n)),t.split(",").forEach(function(r){st(r)!==void 0&&(ae(r,()=>{window.open(i,"_self")}),At.set(r,i))}),ne(t,"clickable")},"setLink"),ne=c(function(t,n){t.split(",").forEach(function(i){let r=st(i);r!==void 0&&r.classes.push(n)})},"setClass"),ws=c(function(t,n,i){if(rt().securityLevel!=="loose"||n===void 0)return;let r=[];if(typeof i=="string"){r=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let k=0;k<r.length;k++){let T=r[k].trim();T.startsWith('"')&&T.endsWith('"')&&(T=T.substr(1,T.length-2)),r[k]=T}}r.length===0&&r.push(t),st(t)!==void 0&&ae(t,()=>{be.runFunc(n,...r)})},"setClickFun"),ae=c(function(t,n){Lt.push(function(){const i=document.querySelector(`[id="${t}"]`);i!==null&&i.addEventListener("click",function(){n()})},function(){const i=document.querySelector(`[id="${t}-text"]`);i!==null&&i.addEventListener("click",function(){n()})})},"pushFun"),_s=c(function(t,n,i){t.split(",").forEach(function(r){ws(r,n,i)}),ne(t,"clickable")},"setClickEvent"),Ds=c(function(t){Lt.forEach(function(n){n(t)})},"bindFunctions"),Ss={getConfig:c(()=>rt().gantt,"getConfig"),clear:He,setDateFormat:Qe,getDateFormat:ns,enableInclusiveEndDates:Ze,endDatesAreInclusive:ts,enableTopAxis:es,topAxisEnabled:ss,setAxisFormat:je,getAxisFormat:Xe,setTickInterval:Ue,getTickInterval:Ge,setTodayMarker:Ke,getTodayMarker:Je,setAccTitle:me,getAccTitle:he,setDiagramTitle:fe,getDiagramTitle:de,setDisplayMode:is,getDisplayMode:rs,setAccDescription:ue,getAccDescription:le,addSection:ds,getSections:fs,getTasks:hs,addTask:Ts,findTaskById:st,addTaskOrg:bs,setIncludes:as,getIncludes:os,setExcludes:cs,getExcludes:ls,setClickEvent:_s,setLink:xs,getLinks:us,bindFunctions:Ds,parseDuration:se,isInvalidDate:te,setWeekday:ms,getWeekday:ks,setWeekend:ys};function Ot(t,n,i){let r=!0;for(;r;)r=!1,i.forEach(function(a){const k="^\\s*"+a+"\\s*$",T=new RegExp(k);t[0].match(T)&&(n[a]=!0,t.shift(1),r=!0)})}c(Ot,"getTaskTags");V.extend(ze);var Cs=c(function(){et.debug("Something is calling, setConf, remove the call")},"setConf"),Jt={monday:We,tuesday:Le,wednesday:$e,thursday:Fe,friday:Ae,saturday:Me,sunday:Ie},Es=c((t,n)=>{let i=[...t].map(()=>-1/0),r=[...t].sort((k,T)=>k.startTime-T.startTime||k.order-T.order),a=0;for(const k of r)for(let T=0;T<i.length;T++)if(k.startTime>=i[T]){i[T]=k.endTime,k.order=T+n,T>a&&(a=T);break}return a},"getMaxIntersections"),K,wt=1e4,Is=c(function(t,n,i,r){const a=rt().gantt,k=rt().securityLevel;let T;k==="sandbox"&&(T=ht("#i"+n));const S=k==="sandbox"?ht(T.nodes()[0].contentDocument.body):ht("body"),O=k==="sandbox"?T.nodes()[0].contentDocument:document,A=O.getElementById(n);K=A.parentElement.offsetWidth,K===void 0&&(K=1200),a.useWidth!==void 0&&(K=a.useWidth);const D=r.db.getTasks();let $=[];for(const u of D)$.push(u.type);$=f($);const L={};let W=2*a.topPadding;if(r.db.getDisplayMode()==="compact"||a.displayMode==="compact"){const u={};for(const g of D)u[g.section]===void 0?u[g.section]=[g]:u[g.section].push(g);let y=0;for(const g of Object.keys(u)){const p=Es(u[g],y)+1;y+=p,W+=p*(a.barHeight+a.barGap),L[g]=p}}else{W+=D.length*(a.barHeight+a.barGap);for(const u of $)L[u]=D.filter(y=>y.type===u).length}A.setAttribute("viewBox","0 0 "+K+" "+W);const Y=S.select(`[id="${n}"]`),_=_e().domain([De(D,function(u){return u.startTime}),Se(D,function(u){return u.endTime})]).rangeRound([0,K-a.leftPadding-a.rightPadding]);function J(u,y){const g=u.startTime,p=y.startTime;let m=0;return g>p?m=1:g<p&&(m=-1),m}c(J,"taskCompare"),D.sort(J),B(D,K,W),ke(Y,W,K,a.useMaxWidth),Y.append("text").text(r.db.getDiagramTitle()).attr("x",K/2).attr("y",a.titleTopMargin).attr("class","titleText");function B(u,y,g){const p=a.barHeight,m=p+a.barGap,o=a.topPadding,l=a.leftPadding,h=Ce().domain([0,$.length]).range(["#00B9FA","#F95002"]).interpolate(Ee);q(m,o,l,y,g,u,r.db.getExcludes(),r.db.getIncludes()),Q(l,o,y,g),Z(u,m,o,l,p,h,y),I(m,o),v(l,o,y,g)}c(B,"makeGantt");function Z(u,y,g,p,m,o,l){u.sort((e,x)=>e.vert===x.vert?0:e.vert?1:-1);const d=[...new Set(u.map(e=>e.order))].map(e=>u.find(x=>x.order===e));Y.append("g").selectAll("rect").data(d).enter().append("rect").attr("x",0).attr("y",function(e,x){return x=e.order,x*y+g-2}).attr("width",function(){return l-a.rightPadding/2}).attr("height",y).attr("class",function(e){for(const[x,M]of $.entries())if(e.type===M)return"section section"+x%a.numberSectionStyles;return"section section0"}).enter();const b=Y.append("g").selectAll("rect").data(u).enter(),s=r.db.getLinks();if(b.append("rect").attr("id",function(e){return e.id}).attr("rx",3).attr("ry",3).attr("x",function(e){return e.milestone?_(e.startTime)+p+.5*(_(e.endTime)-_(e.startTime))-.5*m:_(e.startTime)+p}).attr("y",function(e,x){return x=e.order,e.vert?a.gridLineStartPadding:x*y+g}).attr("width",function(e){return e.milestone?m:e.vert?.08*m:_(e.renderEndTime||e.endTime)-_(e.startTime)}).attr("height",function(e){return e.vert?D.length*(a.barHeight+a.barGap)+a.barHeight*2:m}).attr("transform-origin",function(e,x){return x=e.order,(_(e.startTime)+p+.5*(_(e.endTime)-_(e.startTime))).toString()+"px "+(x*y+g+.5*m).toString()+"px"}).attr("class",function(e){const x="task";let M="";e.classes.length>0&&(M=e.classes.join(" "));let E=0;for(const[N,w]of $.entries())e.type===w&&(E=N%a.numberSectionStyles);let C="";return e.active?e.crit?C+=" activeCrit":C=" active":e.done?e.crit?C=" doneCrit":C=" done":e.crit&&(C+=" crit"),C.length===0&&(C=" task"),e.milestone&&(C=" milestone "+C),e.vert&&(C=" vert "+C),C+=E,C+=" "+M,x+C}),b.append("text").attr("id",function(e){return e.id+"-text"}).text(function(e){return e.task}).attr("font-size",a.fontSize).attr("x",function(e){let x=_(e.startTime),M=_(e.renderEndTime||e.endTime);if(e.milestone&&(x+=.5*(_(e.endTime)-_(e.startTime))-.5*m,M=x+m),e.vert)return _(e.startTime)+p;const E=this.getBBox().width;return E>M-x?M+E+1.5*a.leftPadding>l?x+p-5:M+p+5:(M-x)/2+x+p}).attr("y",function(e,x){return e.vert?a.gridLineStartPadding+D.length*(a.barHeight+a.barGap)+60:(x=e.order,x*y+a.barHeight/2+(a.fontSize/2-2)+g)}).attr("text-height",m).attr("class",function(e){const x=_(e.startTime);let M=_(e.endTime);e.milestone&&(M=x+m);const E=this.getBBox().width;let C="";e.classes.length>0&&(C=e.classes.join(" "));let N=0;for(const[U,ot]of $.entries())e.type===ot&&(N=U%a.numberSectionStyles);let w="";return e.active&&(e.crit?w="activeCritText"+N:w="activeText"+N),e.done?e.crit?w=w+" doneCritText"+N:w=w+" doneText"+N:e.crit&&(w=w+" critText"+N),e.milestone&&(w+=" milestoneText"),e.vert&&(w+=" vertText"),E>M-x?M+E+1.5*a.leftPadding>l?C+" taskTextOutsideLeft taskTextOutside"+N+" "+w:C+" taskTextOutsideRight taskTextOutside"+N+" "+w+" width-"+E:C+" taskText taskText"+N+" "+w+" width-"+E}),rt().securityLevel==="sandbox"){let e;e=ht("#i"+n);const x=e.nodes()[0].contentDocument;b.filter(function(M){return s.has(M.id)}).each(function(M){var E=x.querySelector("#"+M.id),C=x.querySelector("#"+M.id+"-text");const N=E.parentNode;var w=x.createElement("a");w.setAttribute("xlink:href",s.get(M.id)),w.setAttribute("target","_top"),N.appendChild(w),w.appendChild(E),w.appendChild(C)})}}c(Z,"drawRects");function q(u,y,g,p,m,o,l,h){if(l.length===0&&h.length===0)return;let d,b;for(const{startTime:E,endTime:C}of o)(d===void 0||E<d)&&(d=E),(b===void 0||C>b)&&(b=C);if(!d||!b)return;if(V(b).diff(V(d),"year")>5){et.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 s=r.db.getDateFormat(),F=[];let e=null,x=V(d);for(;x.valueOf()<=b;)r.db.isInvalidDate(x,s,l,h)?e?e.end=x:e={start:x,end:x}:e&&(F.push(e),e=null),x=x.add(1,"d");Y.append("g").selectAll("rect").data(F).enter().append("rect").attr("id",E=>"exclude-"+E.start.format("YYYY-MM-DD")).attr("x",E=>_(E.start.startOf("day"))+g).attr("y",a.gridLineStartPadding).attr("width",E=>_(E.end.endOf("day"))-_(E.start.startOf("day"))).attr("height",m-y-a.gridLineStartPadding).attr("transform-origin",function(E,C){return(_(E.start)+g+.5*(_(E.end)-_(E.start))).toString()+"px "+(C*u+.5*m).toString()+"px"}).attr("class","exclude-range")}c(q,"drawExcludeDays");function X(u,y,g,p){if(g<=0||u>y)return 1/0;const m=y-u,o=V.duration({[p??"day"]:g}).asMilliseconds();return o<=0?1/0:Math.ceil(m/o)}c(X,"getEstimatedTickCount");function Q(u,y,g,p){const m=r.db.getDateFormat(),o=r.db.getAxisFormat();let l;o?l=o:m==="D"?l="%d":l=a.axisFormat??"%Y-%m-%d";let h=ye(_).tickSize(-p+y+a.gridLineStartPadding).tickFormat(Nt(l));const b=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||a.tickInterval);if(b!==null){const s=parseInt(b[1],10);if(isNaN(s)||s<=0)et.warn(`Invalid tick interval value: "${b[1]}". Skipping custom tick interval.`);else{const F=b[2],e=r.db.getWeekday()||a.weekday,x=_.domain(),M=x[0],E=x[1],C=X(M,E,s,F);if(C>wt)et.warn(`The tick interval "${s}${F}" would generate ${C} ticks, which exceeds the maximum allowed (${wt}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(F){case"millisecond":h.ticks(jt.every(s));break;case"second":h.ticks(Ht.every(s));break;case"minute":h.ticks(qt.every(s));break;case"hour":h.ticks(zt.every(s));break;case"day":h.ticks(Bt.every(s));break;case"week":h.ticks(Jt[e].every(s));break;case"month":h.ticks(Rt.every(s));break}}}if(Y.append("g").attr("class","grid").attr("transform","translate("+u+", "+(p-50)+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),r.db.topAxisEnabled()||a.topAxis){let s=ge(_).tickSize(-p+y+a.gridLineStartPadding).tickFormat(Nt(l));if(b!==null){const F=parseInt(b[1],10);if(isNaN(F)||F<=0)et.warn(`Invalid tick interval value: "${b[1]}". Skipping custom tick interval.`);else{const e=b[2],x=r.db.getWeekday()||a.weekday,M=_.domain(),E=M[0],C=M[1];if(X(E,C,F,e)<=wt)switch(e){case"millisecond":s.ticks(jt.every(F));break;case"second":s.ticks(Ht.every(F));break;case"minute":s.ticks(qt.every(F));break;case"hour":s.ticks(zt.every(F));break;case"day":s.ticks(Bt.every(F));break;case"week":s.ticks(Jt[x].every(F));break;case"month":s.ticks(Rt.every(F));break}}}Y.append("g").attr("class","grid").attr("transform","translate("+u+", "+y+")").call(s).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}c(Q,"makeGrid");function I(u,y){let g=0;const p=Object.keys(L).map(m=>[m,L[m]]);Y.append("g").selectAll("text").data(p).enter().append(function(m){const o=m[0].split(pe.lineBreakRegex),l=-(o.length-1)/2,h=O.createElementNS("http://www.w3.org/2000/svg","text");h.setAttribute("dy",l+"em");for(const[d,b]of o.entries()){const s=O.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttribute("alignment-baseline","central"),s.setAttribute("x","10"),d>0&&s.setAttribute("dy","1em"),s.textContent=b,h.appendChild(s)}return h}).attr("x",10).attr("y",function(m,o){if(o>0)for(let l=0;l<o;l++)return g+=p[o-1][1],m[1]*u/2+g*u+y;else return m[1]*u/2+y}).attr("font-size",a.sectionFontSize).attr("class",function(m){for(const[o,l]of $.entries())if(m[0]===l)return"sectionTitle sectionTitle"+o%a.numberSectionStyles;return"sectionTitle"})}c(I,"vertLabels");function v(u,y,g,p){const m=r.db.getTodayMarker();if(m==="off")return;const o=Y.append("g").attr("class","today"),l=new Date,h=o.append("line");h.attr("x1",_(l)+u).attr("x2",_(l)+u).attr("y1",a.titleTopMargin).attr("y2",p-a.titleTopMargin).attr("class","today"),m!==""&&h.attr("style",m.replace(/,/g,";"))}c(v,"drawToday");function f(u){const y={},g=[];for(let p=0,m=u.length;p<m;++p)Object.prototype.hasOwnProperty.call(y,u[p])||(y[u[p]]=!0,g.push(u[p]));return g}c(f,"checkUnique")},"draw"),Ms={setConf:Cs,draw:Is},As=c(t=>`
|
|
7
|
-
.mermaid-main-font {
|
|
8
|
-
font-family: ${t.fontFamily};
|
|
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: ${t.fontFamily};
|
|
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: ${t.fontFamily};
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.taskTextOutsideRight {
|
|
97
|
-
fill: ${t.taskTextDarkColor};
|
|
98
|
-
text-anchor: start;
|
|
99
|
-
font-family: ${t.fontFamily};
|
|
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
|
-
.vert {
|
|
245
|
-
stroke: ${t.vertLineColor};
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.vertText {
|
|
249
|
-
font-size: 15px;
|
|
250
|
-
text-anchor: middle;
|
|
251
|
-
fill: ${t.vertLineColor} !important;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
.activeCritText0,
|
|
255
|
-
.activeCritText1,
|
|
256
|
-
.activeCritText2,
|
|
257
|
-
.activeCritText3 {
|
|
258
|
-
fill: ${t.taskTextDarkColor} !important;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
.titleText {
|
|
262
|
-
text-anchor: middle;
|
|
263
|
-
font-size: 18px;
|
|
264
|
-
fill: ${t.titleColor||t.textColor};
|
|
265
|
-
font-family: ${t.fontFamily};
|
|
266
|
-
}
|
|
267
|
-
`,"getStyles"),Fs=As,Ps={parser:qe,db:Ss,renderer:Ms,styles:Fs};export{Ps as diagram};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import{p as Z}from"./chunk-4BX2VUAB-BQS5VpDJ.js";import{I as F}from"./chunk-QZHKN3VN-BxdDkaqA.js";import{q as U,p as rr,s as er,g as tr,a as ar,b as nr,_ as h,l as m,d as sr,u as or,D as cr,y as ir,k as B,E as dr,F as hr,G as lr,c as $r,H as fr}from"./vendor-mermaid-CQXqUd1Z.js";import{p as gr}from"./treemap-GDKQZRPO-COsTlA-l.js";import"./vendor-markdown-DYfLXXRA.js";import"./vendor-i18n-BNURlJ23.js";import"./vendor-antd-DzhFcYgt.js";import"./vendor-charts-BvOlsian.js";import"./_baseUniq-AfN8N44G.js";import"./_basePickBy-CQxbmRut.js";import"./clone-D7s6jAMO.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},yr=hr.gitGraph,z=h(()=>dr({...yr,...lr().gitGraph}),"getConfig"),i=new F(()=>{const t=z(),r=t.mainBranchName,a=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:a}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function S(){return fr({length:7})}h(S,"getID");function N(t,r){const a=Object.create(null);return t.reduce((s,e)=>{const n=r(e);return a[n]||(a[n]=!0,s.push(e)),s},[])}h(N,"uniqBy");var pr=h(function(t){i.records.direction=t},"setDirection"),xr=h(function(t){m.debug("options str",t),t=t==null?void 0:t.trim(),t=t||"{}";try{i.records.options=JSON.parse(t)}catch(r){m.error("error while parsing gitGraph options",r.message)}},"setOptions"),ur=h(function(){return i.records.options},"getOptions"),br=h(function(t){let r=t.msg,a=t.id;const s=t.type;let e=t.tags;m.info("commit",r,a,s,e),m.debug("Entering commit:",r,a,s,e);const n=z();a=B.sanitizeText(a,n),r=B.sanitizeText(r,n),e=e==null?void 0:e.map(o=>B.sanitizeText(o,n));const c={id:a||i.records.seq+"-"+S(),message:r,seq:i.records.seq++,type:s??x.NORMAL,tags:e??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=c,m.info("main branch",n.mainBranchName),i.records.commits.has(c.id)&&m.warn(`Commit ID ${c.id} already exists`),i.records.commits.set(c.id,c),i.records.branches.set(i.records.currBranch,c.id),m.debug("in pushCommit "+c.id)},"commit"),mr=h(function(t){let r=t.name;const a=t.order;if(r=B.sanitizeText(r,z()),i.records.branches.has(r))throw 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}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:a}),_(r),m.debug("in createBranch")},"branch"),wr=h(t=>{let r=t.branch,a=t.id;const s=t.type,e=t.tags,n=z();r=B.sanitizeText(r,n),a&&(a=B.sanitizeText(a,n));const c=i.records.branches.get(i.records.currBranch),o=i.records.branches.get(r),$=c?i.records.commits.get(c):void 0,l=o?i.records.commits.get(o):void 0;if($&&l&&$.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const d=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},d}if($===void 0||!$){const d=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},d}if(!i.records.branches.has(r)){const d=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},d}if(l===void 0||!l){const d=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},d}if($===l){const d=new Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},d}if(a&&i.records.commits.has(a)){const d=new Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom id");throw d.hash={text:`merge ${r} ${a} ${s} ${e==null?void 0:e.join(" ")}`,token:`merge ${r} ${a} ${s} ${e==null?void 0:e.join(" ")}`,expected:[`merge ${r} ${a}_UNIQUE ${s} ${e==null?void 0:e.join(" ")}`]},d}const f=o||"",g={id:a||`${i.records.seq}-${S()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,f],branch:i.records.currBranch,type:x.MERGE,customType:s,customId:!!a,tags:e??[]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),m.debug(i.records.branches),m.debug("in mergeBranch")},"merge"),vr=h(function(t){let r=t.id,a=t.targetId,s=t.tags,e=t.parent;m.debug("Entering cherryPick:",r,a,s);const n=z();if(r=B.sanitizeText(r,n),a=B.sanitizeText(a,n),s=s==null?void 0:s.map($=>B.sanitizeText($,n)),e=B.sanitizeText(e,n),!r||!i.records.commits.has(r)){const $=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw $.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},$}const c=i.records.commits.get(r);if(c===void 0||!c)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(e&&!(Array.isArray(c.parents)&&c.parents.includes(e)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const o=c.branch;if(c.type===x.MERGE&&!e)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!i.records.commits.has(a)){if(o===i.records.currBranch){const g=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}const $=i.records.branches.get(i.records.currBranch);if($===void 0||!$){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}const l=i.records.commits.get($);if(l===void 0||!l){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}const f={id:i.records.seq+"-"+S(),message:`cherry-picked ${c==null?void 0:c.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,c.id],branch:i.records.currBranch,type:x.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${c.id}${c.type===x.MERGE?`|parent:${e}`:""}`]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),m.debug(i.records.branches),m.debug("in cherryPick")}},"cherryPick"),_=h(function(t){if(t=B.sanitizeText(t,z()),i.records.branches.has(t)){i.records.currBranch=t;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}},"checkout");function D(t,r,a){const s=t.indexOf(r);s===-1?t.push(a):t.splice(s,1,a)}h(D,"upsert");function A(t){const r=t.reduce((e,n)=>e.seq>n.seq?e:n,t[0]);let a="";t.forEach(function(e){e===r?a+=" *":a+=" |"});const s=[a,r.id,r.seq];for(const e in i.records.branches)i.records.branches.get(e)===r.id&&s.push(e);if(m.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const e=i.records.commits.get(r.parents[0]);D(t,r,e),r.parents[1]&&t.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const e=i.records.commits.get(r.parents[0]);D(t,r,e)}}t=N(t,e=>e.id),A(t)}h(A,"prettyPrintCommitHistory");var Cr=h(function(){m.debug(i.records.commits);const t=V()[0];A([t])},"prettyPrint"),Er=h(function(){i.reset(),ir()},"clear"),Br=h(function(){return[...i.records.branchConfig.values()].map((r,a)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${a}`)}).sort((r,a)=>(r.order??0)-(a.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),kr=h(function(){return i.records.branches},"getBranches"),Lr=h(function(){return i.records.commits},"getCommits"),V=h(function(){const t=[...i.records.commits.values()];return t.forEach(function(r){m.debug(r.id)}),t.sort((r,a)=>r.seq-a.seq),t},"getCommitsArray"),Tr=h(function(){return i.records.currBranch},"getCurrentBranch"),Mr=h(function(){return i.records.direction},"getDirection"),Rr=h(function(){return i.records.head},"getHead"),X={commitType:x,getConfig:z,setDirection:pr,setOptions:xr,getOptions:ur,commit:br,branch:mr,merge:wr,cherryPick:vr,checkout:_,prettyPrint:Cr,clear:Er,getBranchesAsObjArray:Br,getBranches:kr,getCommits:Lr,getCommitsArray:V,getCurrentBranch:Tr,getDirection:Mr,getHead:Rr,setAccTitle:nr,getAccTitle:ar,getAccDescription:tr,setAccDescription:er,setDiagramTitle:rr,getDiagramTitle:U},Ir=h((t,r)=>{Z(t,r),t.dir&&r.setDirection(t.dir);for(const a of t.statements)qr(a,r)},"populate"),qr=h((t,r)=>{const s={Commit:h(e=>r.commit(Or(e)),"Commit"),Branch:h(e=>r.branch(zr(e)),"Branch"),Merge:h(e=>r.merge(Gr(e)),"Merge"),Checkout:h(e=>r.checkout(Hr(e)),"Checkout"),CherryPicking:h(e=>r.cherryPick(Pr(e)),"CherryPicking")}[t.$type];s?s(t):m.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),Or=h(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?x[t.type]:x.NORMAL,tags:t.tags??void 0}),"parseCommit"),zr=h(t=>({name:t.name,order:t.order??0}),"parseBranch"),Gr=h(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?x[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Hr=h(t=>t.branch,"parseCheckout"),Pr=h(t=>{var a;return{id:t.id,targetId:"",tags:((a=t.tags)==null?void 0:a.length)===0?void 0:t.tags,parent:t.parent}},"parseCherryPicking"),Wr={parse:h(async t=>{const r=await gr("gitGraph",t);m.debug(r),Ir(r,X)},"parse")},j=$r(),b=j==null?void 0:j.gitGraph,R=10,I=40,k=4,L=2,O=8,C=new Map,E=new Map,P=30,G=new Map,W=[],M=0,p="LR",Sr=h(()=>{C.clear(),E.clear(),G.clear(),M=0,W=[],p="LR"},"clear"),J=h(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(s=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=s.trim(),r.appendChild(e)}),r},"drawText"),Q=h(t=>{let r,a,s;return p==="BT"?(a=h((e,n)=>e<=n,"comparisonFunc"),s=1/0):(a=h((e,n)=>e>=n,"comparisonFunc"),s=0),t.forEach(e=>{var c,o;const n=p==="TB"||p=="BT"?(c=E.get(e))==null?void 0:c.y:(o=E.get(e))==null?void 0:o.x;n!==void 0&&a(n,s)&&(r=e,s=n)}),r},"findClosestParent"),jr=h(t=>{let r="",a=1/0;return t.forEach(s=>{const e=E.get(s).y;e<=a&&(r=s,a=e)}),r||void 0},"findClosestParentBT"),Dr=h((t,r,a)=>{let s=a,e=a;const n=[];t.forEach(c=>{const o=r.get(c);if(!o)throw new Error(`Commit not found for key ${c}`);o.parents.length?(s=Yr(o),e=Math.max(s,e)):n.push(o),Kr(o,s)}),s=e,n.forEach(c=>{Nr(c,s,a)}),t.forEach(c=>{const o=r.get(c);if(o!=null&&o.parents.length){const $=jr(o.parents);s=E.get($).y-I,s<=e&&(e=s);const l=C.get(o.branch).pos,f=s-R;E.set(o.id,{x:l,y:f})}})},"setParallelBTPos"),Ar=h(t=>{var s;const r=Q(t.parents.filter(e=>e!==null));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const a=(s=E.get(r))==null?void 0:s.y;if(a===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return a},"findClosestParentPos"),Yr=h(t=>Ar(t)+I,"calculateCommitPosition"),Kr=h((t,r)=>{const a=C.get(t.branch);if(!a)throw new Error(`Branch not found for commit ${t.id}`);const s=a.pos,e=r+R;return E.set(t.id,{x:s,y:e}),{x:s,y:e}},"setCommitPosition"),Nr=h((t,r,a)=>{const s=C.get(t.branch);if(!s)throw new Error(`Branch not found for commit ${t.id}`);const e=r+a,n=s.pos;E.set(t.id,{x:n,y:e})},"setRootPosition"),_r=h((t,r,a,s,e,n)=>{if(n===x.HIGHLIGHT)t.append("rect").attr("x",a.x-10).attr("y",a.y-10).attr("width",20).attr("height",20).attr("class",`commit ${r.id} commit-highlight${e%O} ${s}-outer`),t.append("rect").attr("x",a.x-6).attr("y",a.y-6).attr("width",12).attr("height",12).attr("class",`commit ${r.id} commit${e%O} ${s}-inner`);else if(n===x.CHERRY_PICK)t.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("class",`commit ${r.id} ${s}`),t.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${s}`),t.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${s}`),t.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${s}`),t.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${s}`);else{const c=t.append("circle");if(c.attr("cx",a.x),c.attr("cy",a.y),c.attr("r",r.type===x.MERGE?9:10),c.attr("class",`commit ${r.id} commit${e%O}`),n===x.MERGE){const o=t.append("circle");o.attr("cx",a.x),o.attr("cy",a.y),o.attr("r",6),o.attr("class",`commit ${s} ${r.id} commit${e%O}`)}n===x.REVERSE&&t.append("path").attr("d",`M ${a.x-5},${a.y-5}L${a.x+5},${a.y+5}M${a.x-5},${a.y+5}L${a.x+5},${a.y-5}`).attr("class",`commit ${s} ${r.id} commit${e%O}`)}},"drawCommitBullet"),Vr=h((t,r,a,s)=>{var e;if(r.type!==x.CHERRY_PICK&&(r.customId&&r.type===x.MERGE||r.type!==x.MERGE)&&(b!=null&&b.showCommitLabel)){const n=t.append("g"),c=n.insert("rect").attr("class","commit-label-bkg"),o=n.append("text").attr("x",s).attr("y",a.y+25).attr("class","commit-label").text(r.id),$=(e=o.node())==null?void 0:e.getBBox();if($&&(c.attr("x",a.posWithOffset-$.width/2-L).attr("y",a.y+13.5).attr("width",$.width+2*L).attr("height",$.height+2*L),p==="TB"||p==="BT"?(c.attr("x",a.x-($.width+4*k+5)).attr("y",a.y-12),o.attr("x",a.x-($.width+4*k)).attr("y",a.y+$.height-12)):o.attr("x",a.posWithOffset-$.width/2),b.rotateCommitLabel))if(p==="TB"||p==="BT")o.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),c.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{const l=-7.5-($.width+10)/25*9.5,f=10+$.width/25*8.5;n.attr("transform","translate("+l+", "+f+") rotate(-45, "+s+", "+a.y+")")}}},"drawCommitLabel"),Xr=h((t,r,a,s)=>{var e;if(r.tags.length>0){let n=0,c=0,o=0;const $=[];for(const l of r.tags.reverse()){const f=t.insert("polygon"),g=t.append("circle"),d=t.append("text").attr("y",a.y-16-n).attr("class","tag-label").text(l),y=(e=d.node())==null?void 0:e.getBBox();if(!y)throw new Error("Tag bbox not found");c=Math.max(c,y.width),o=Math.max(o,y.height),d.attr("x",a.posWithOffset-y.width/2),$.push({tag:d,hole:g,rect:f,yOffset:n}),n+=20}for(const{tag:l,hole:f,rect:g,yOffset:d}of $){const y=o/2,u=a.y-19.2-d;if(g.attr("class","tag-label-bkg").attr("points",`
|
|
2
|
-
${s-c/2-k/2},${u+L}
|
|
3
|
-
${s-c/2-k/2},${u-L}
|
|
4
|
-
${a.posWithOffset-c/2-k},${u-y-L}
|
|
5
|
-
${a.posWithOffset+c/2+k},${u-y-L}
|
|
6
|
-
${a.posWithOffset+c/2+k},${u+y+L}
|
|
7
|
-
${a.posWithOffset-c/2-k},${u+y+L}`),f.attr("cy",u).attr("cx",s-c/2+k/2).attr("r",1.5).attr("class","tag-hole"),p==="TB"||p==="BT"){const w=s+d;g.attr("class","tag-label-bkg").attr("points",`
|
|
8
|
-
${a.x},${w+2}
|
|
9
|
-
${a.x},${w-2}
|
|
10
|
-
${a.x+R},${w-y-2}
|
|
11
|
-
${a.x+R+c+4},${w-y-2}
|
|
12
|
-
${a.x+R+c+4},${w+y+2}
|
|
13
|
-
${a.x+R},${w+y+2}`).attr("transform","translate(12,12) rotate(45, "+a.x+","+s+")"),f.attr("cx",a.x+k/2).attr("cy",w).attr("transform","translate(12,12) rotate(45, "+a.x+","+s+")"),l.attr("x",a.x+5).attr("y",w+3).attr("transform","translate(14,14) rotate(45, "+a.x+","+s+")")}}}},"drawCommitTags"),Jr=h(t=>{switch(t.customType??t.type){case x.NORMAL:return"commit-normal";case x.REVERSE:return"commit-reverse";case x.HIGHLIGHT:return"commit-highlight";case x.MERGE:return"commit-merge";case x.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Qr=h((t,r,a,s)=>{const e={x:0,y:0};if(t.parents.length>0){const n=Q(t.parents);if(n){const c=s.get(n)??e;return r==="TB"?c.y+I:r==="BT"?(s.get(t.id)??e).y-I:c.x+I}}else return r==="TB"?P:r==="BT"?(s.get(t.id)??e).y-I:0;return 0},"calculatePosition"),Zr=h((t,r,a)=>{var c,o;const s=p==="BT"&&a?r:r+R,e=p==="TB"||p==="BT"?s:(c=C.get(t.branch))==null?void 0:c.pos,n=p==="TB"||p==="BT"?(o=C.get(t.branch))==null?void 0:o.pos:s;if(n===void 0||e===void 0)throw new Error(`Position were undefined for commit ${t.id}`);return{x:n,y:e,posWithOffset:s}},"getCommitPosition"),K=h((t,r,a)=>{if(!b)throw new Error("GitGraph config not found");const s=t.append("g").attr("class","commit-bullets"),e=t.append("g").attr("class","commit-labels");let n=p==="TB"||p==="BT"?P:0;const c=[...r.keys()],o=(b==null?void 0:b.parallelCommits)??!1,$=h((f,g)=>{var u,w;const d=(u=r.get(f))==null?void 0:u.seq,y=(w=r.get(g))==null?void 0:w.seq;return d!==void 0&&y!==void 0?d-y:0},"sortKeys");let l=c.sort($);p==="BT"&&(o&&Dr(l,r,n),l=l.reverse()),l.forEach(f=>{var y;const g=r.get(f);if(!g)throw new Error(`Commit not found for key ${f}`);o&&(n=Qr(g,p,n,E));const d=Zr(g,n,o);if(a){const u=Jr(g),w=g.customType??g.type,q=((y=C.get(g.branch))==null?void 0:y.index)??0;_r(s,g,d,u,q,w),Vr(e,g,d,n),Xr(e,g,d,n)}p==="TB"||p==="BT"?E.set(g.id,{x:d.x,y:d.posWithOffset}):E.set(g.id,{x:d.posWithOffset,y:d.y}),n=p==="BT"&&o?n+I:n+I+R,n>M&&(M=n)})},"drawCommits"),Fr=h((t,r,a,s,e)=>{const c=(p==="TB"||p==="BT"?a.x<s.x:a.y<s.y)?r.branch:t.branch,o=h(l=>l.branch===c,"isOnBranchToGetCurve"),$=h(l=>l.seq>t.seq&&l.seq<r.seq,"isBetweenCommits");return[...e.values()].some(l=>$(l)&&o(l))},"shouldRerouteArrow"),H=h((t,r,a=0)=>{const s=t+Math.abs(t-r)/2;if(a>5)return s;if(W.every(c=>Math.abs(c-s)>=10))return W.push(s),s;const n=Math.abs(t-r);return H(t,r-n/5,a+1)},"findLane"),Ur=h((t,r,a,s)=>{var y,u,w,q,Y;const e=E.get(r.id),n=E.get(a.id);if(e===void 0||n===void 0)throw new Error(`Commit positions not found for commits ${r.id} and ${a.id}`);const c=Fr(r,a,e,n,s);let o="",$="",l=0,f=0,g=(y=C.get(a.branch))==null?void 0:y.index;a.type===x.MERGE&&r.id!==a.parents[0]&&(g=(u=C.get(r.branch))==null?void 0:u.index);let d;if(c){o="A 10 10, 0, 0, 0,",$="A 10 10, 0, 0, 1,",l=10,f=10;const T=e.y<n.y?H(e.y,n.y):H(n.y,e.y),v=e.x<n.x?H(e.x,n.x):H(n.x,e.x);p==="TB"?e.x<n.x?d=`M ${e.x} ${e.y} L ${v-l} ${e.y} ${$} ${v} ${e.y+f} L ${v} ${n.y-l} ${o} ${v+f} ${n.y} L ${n.x} ${n.y}`:(g=(w=C.get(r.branch))==null?void 0:w.index,d=`M ${e.x} ${e.y} L ${v+l} ${e.y} ${o} ${v} ${e.y+f} L ${v} ${n.y-l} ${$} ${v-f} ${n.y} L ${n.x} ${n.y}`):p==="BT"?e.x<n.x?d=`M ${e.x} ${e.y} L ${v-l} ${e.y} ${o} ${v} ${e.y-f} L ${v} ${n.y+l} ${$} ${v+f} ${n.y} L ${n.x} ${n.y}`:(g=(q=C.get(r.branch))==null?void 0:q.index,d=`M ${e.x} ${e.y} L ${v+l} ${e.y} ${$} ${v} ${e.y-f} L ${v} ${n.y+l} ${o} ${v-f} ${n.y} L ${n.x} ${n.y}`):e.y<n.y?d=`M ${e.x} ${e.y} L ${e.x} ${T-l} ${o} ${e.x+f} ${T} L ${n.x-l} ${T} ${$} ${n.x} ${T+f} L ${n.x} ${n.y}`:(g=(Y=C.get(r.branch))==null?void 0:Y.index,d=`M ${e.x} ${e.y} L ${e.x} ${T+l} ${$} ${e.x+f} ${T} L ${n.x-l} ${T} ${o} ${n.x} ${T-f} L ${n.x} ${n.y}`)}else o="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,f=20,p==="TB"?(e.x<n.x&&(a.type===x.MERGE&&r.id!==a.parents[0]?d=`M ${e.x} ${e.y} L ${e.x} ${n.y-l} ${o} ${e.x+f} ${n.y} L ${n.x} ${n.y}`:d=`M ${e.x} ${e.y} L ${n.x-l} ${e.y} ${$} ${n.x} ${e.y+f} L ${n.x} ${n.y}`),e.x>n.x&&(o="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,f=20,a.type===x.MERGE&&r.id!==a.parents[0]?d=`M ${e.x} ${e.y} L ${e.x} ${n.y-l} ${$} ${e.x-f} ${n.y} L ${n.x} ${n.y}`:d=`M ${e.x} ${e.y} L ${n.x+l} ${e.y} ${o} ${n.x} ${e.y+f} L ${n.x} ${n.y}`),e.x===n.x&&(d=`M ${e.x} ${e.y} L ${n.x} ${n.y}`)):p==="BT"?(e.x<n.x&&(a.type===x.MERGE&&r.id!==a.parents[0]?d=`M ${e.x} ${e.y} L ${e.x} ${n.y+l} ${$} ${e.x+f} ${n.y} L ${n.x} ${n.y}`:d=`M ${e.x} ${e.y} L ${n.x-l} ${e.y} ${o} ${n.x} ${e.y-f} L ${n.x} ${n.y}`),e.x>n.x&&(o="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,f=20,a.type===x.MERGE&&r.id!==a.parents[0]?d=`M ${e.x} ${e.y} L ${e.x} ${n.y+l} ${o} ${e.x-f} ${n.y} L ${n.x} ${n.y}`:d=`M ${e.x} ${e.y} L ${n.x-l} ${e.y} ${o} ${n.x} ${e.y-f} L ${n.x} ${n.y}`),e.x===n.x&&(d=`M ${e.x} ${e.y} L ${n.x} ${n.y}`)):(e.y<n.y&&(a.type===x.MERGE&&r.id!==a.parents[0]?d=`M ${e.x} ${e.y} L ${n.x-l} ${e.y} ${$} ${n.x} ${e.y+f} L ${n.x} ${n.y}`:d=`M ${e.x} ${e.y} L ${e.x} ${n.y-l} ${o} ${e.x+f} ${n.y} L ${n.x} ${n.y}`),e.y>n.y&&(a.type===x.MERGE&&r.id!==a.parents[0]?d=`M ${e.x} ${e.y} L ${n.x-l} ${e.y} ${o} ${n.x} ${e.y-f} L ${n.x} ${n.y}`:d=`M ${e.x} ${e.y} L ${e.x} ${n.y+l} ${$} ${e.x+f} ${n.y} L ${n.x} ${n.y}`),e.y===n.y&&(d=`M ${e.x} ${e.y} L ${n.x} ${n.y}`));if(d===void 0)throw new Error("Line definition not found");t.append("path").attr("d",d).attr("class","arrow arrow"+g%O)},"drawArrow"),re=h((t,r)=>{const a=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(s=>{const e=r.get(s);e.parents&&e.parents.length>0&&e.parents.forEach(n=>{Ur(a,r.get(n),e,r)})})},"drawArrows"),ee=h((t,r)=>{const a=t.append("g");r.forEach((s,e)=>{var u;const n=e%O,c=(u=C.get(s.name))==null?void 0:u.pos;if(c===void 0)throw new Error(`Position not found for branch ${s.name}`);const o=a.append("line");o.attr("x1",0),o.attr("y1",c),o.attr("x2",M),o.attr("y2",c),o.attr("class","branch branch"+n),p==="TB"?(o.attr("y1",P),o.attr("x1",c),o.attr("y2",M),o.attr("x2",c)):p==="BT"&&(o.attr("y1",M),o.attr("x1",c),o.attr("y2",P),o.attr("x2",c)),W.push(c);const $=s.name,l=J($),f=a.insert("rect"),d=a.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+n);d.node().appendChild(l);const y=l.getBBox();f.attr("class","branchLabelBkg label"+n).attr("rx",4).attr("ry",4).attr("x",-y.width-4-((b==null?void 0:b.rotateCommitLabel)===!0?30:0)).attr("y",-y.height/2+8).attr("width",y.width+18).attr("height",y.height+4),d.attr("transform","translate("+(-y.width-14-((b==null?void 0:b.rotateCommitLabel)===!0?30:0))+", "+(c-y.height/2-1)+")"),p==="TB"?(f.attr("x",c-y.width/2-10).attr("y",0),d.attr("transform","translate("+(c-y.width/2-5)+", 0)")):p==="BT"?(f.attr("x",c-y.width/2-10).attr("y",M),d.attr("transform","translate("+(c-y.width/2-5)+", "+M+")")):f.attr("transform","translate(-19, "+(c-y.height/2)+")")})},"drawBranches"),te=h(function(t,r,a,s,e){return C.set(t,{pos:r,index:a}),r+=50+(e?40:0)+(p==="TB"||p==="BT"?s.width/2:0),r},"setBranchPosition"),ae=h(function(t,r,a,s){if(Sr(),m.debug("in gitgraph renderer",t+`
|
|
14
|
-
`,"id:",r,a),!b)throw new Error("GitGraph config not found");const e=b.rotateCommitLabel??!1,n=s.db;G=n.getCommits();const c=n.getBranchesAsObjArray();p=n.getDirection();const o=sr(`[id="${r}"]`);let $=0;c.forEach((l,f)=>{var q;const g=J(l.name),d=o.append("g"),y=d.insert("g").attr("class","branchLabel"),u=y.insert("g").attr("class","label branch-label");(q=u.node())==null||q.appendChild(g);const w=g.getBBox();$=te(l.name,$,f,w,e),u.remove(),y.remove(),d.remove()}),K(o,G,!1),b.showBranches&&ee(o,c),re(o,G),K(o,G,!0),or.insertTitle(o,"gitTitleText",b.titleTopMargin??0,n.getDiagramTitle()),cr(void 0,o,b.diagramPadding,b.useMaxWidth)},"draw"),ne={draw:ae},se=h(t=>`
|
|
15
|
-
.commit-id,
|
|
16
|
-
.commit-msg,
|
|
17
|
-
.branch-label {
|
|
18
|
-
fill: lightgrey;
|
|
19
|
-
color: lightgrey;
|
|
20
|
-
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
21
|
-
font-family: var(--mermaid-font-family);
|
|
22
|
-
}
|
|
23
|
-
${[0,1,2,3,4,5,6,7].map(r=>`
|
|
24
|
-
.branch-label${r} { fill: ${t["gitBranchLabel"+r]}; }
|
|
25
|
-
.commit${r} { stroke: ${t["git"+r]}; fill: ${t["git"+r]}; }
|
|
26
|
-
.commit-highlight${r} { stroke: ${t["gitInv"+r]}; fill: ${t["gitInv"+r]}; }
|
|
27
|
-
.label${r} { fill: ${t["git"+r]}; }
|
|
28
|
-
.arrow${r} { stroke: ${t["git"+r]}; }
|
|
29
|
-
`).join(`
|
|
30
|
-
`)}
|
|
31
|
-
|
|
32
|
-
.branch {
|
|
33
|
-
stroke-width: 1;
|
|
34
|
-
stroke: ${t.lineColor};
|
|
35
|
-
stroke-dasharray: 2;
|
|
36
|
-
}
|
|
37
|
-
.commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}
|
|
38
|
-
.commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }
|
|
39
|
-
.tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}
|
|
40
|
-
.tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }
|
|
41
|
-
.tag-hole { fill: ${t.textColor}; }
|
|
42
|
-
|
|
43
|
-
.commit-merge {
|
|
44
|
-
stroke: ${t.primaryColor};
|
|
45
|
-
fill: ${t.primaryColor};
|
|
46
|
-
}
|
|
47
|
-
.commit-reverse {
|
|
48
|
-
stroke: ${t.primaryColor};
|
|
49
|
-
fill: ${t.primaryColor};
|
|
50
|
-
stroke-width: 3;
|
|
51
|
-
}
|
|
52
|
-
.commit-highlight-outer {
|
|
53
|
-
}
|
|
54
|
-
.commit-highlight-inner {
|
|
55
|
-
stroke: ${t.primaryColor};
|
|
56
|
-
fill: ${t.primaryColor};
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.arrow { stroke-width: 8; stroke-linecap: round; fill: none}
|
|
60
|
-
.gitTitleText {
|
|
61
|
-
text-anchor: middle;
|
|
62
|
-
font-size: 18px;
|
|
63
|
-
fill: ${t.textColor};
|
|
64
|
-
}
|
|
65
|
-
`,"getStyles"),oe=se,ue={parser:Wr,db:X,renderer:ne,styles:oe};export{ue as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ao as N,ap as j,aq as f,ar as b,as as E}from"./vendor-mermaid-CQXqUd1Z.js";import{a as v,c as P,k as _,f as g,d,i as l,v as p,r as D}from"./_baseUniq-AfN8N44G.js";var w=N(function(o){return v(P(o,1,j,!0))}),F="\0",a="\0",O="";class L{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.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[a]={}),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(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return b(e)||(e=f(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return _(this._nodes)}sources(){var e=this;return g(this.nodes(),function(t){return E(e._in[t])})}sinks(){var e=this;return g(this.nodes(),function(t){return E(e._out[t])})}setNodes(e,t){var s=arguments,i=this;return d(e,function(r){s.length>1?i.setNode(r,t):i.setNode(r)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=a,this._children[e]={},this._children[a][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=s=>this.removeEdge(this._edgeObjs[s]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],d(this.children(e),s=>{this.setParent(s)}),delete this._children[e]),d(_(this._in[e]),t),delete this._in[e],delete this._preds[e],d(_(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(l(t))t=a;else{t+="";for(var s=t;!l(s);s=this.parent(s))if(s===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==a)return t}}children(e){if(l(e)&&(e=a),this._isCompound){var t=this._children[e];if(t)return _(t)}else{if(e===a)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return _(t)}successors(e){var t=this._sucs[e];if(t)return _(t)}neighbors(e){var t=this.predecessors(e);if(t)return w(t,this.successors(e))}isLeaf(e){var t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),t.length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var s=this;d(this._nodes,function(n,h){e(h)&&t.setNode(h,n)}),d(this._edgeObjs,function(n){t.hasNode(n.v)&&t.hasNode(n.w)&&t.setEdge(n,s.edge(n))});var i={};function r(n){var h=s.parent(n);return h===void 0||t.hasNode(h)?(i[n]=h,h):h in i?i[h]:r(h)}return this._isCompound&&d(t.nodes(),function(n){t.setParent(n,r(n))}),t}setDefaultEdgeLabel(e){return b(e)||(e=f(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return p(this._edgeObjs)}setPath(e,t){var s=this,i=arguments;return D(e,function(r,n){return i.length>1?s.setEdge(r,n,t):s.setEdge(r,n),n}),this}setEdge(){var e,t,s,i,r=!1,n=arguments[0];typeof n=="object"&&n!==null&&"v"in n?(e=n.v,t=n.w,s=n.name,arguments.length===2&&(i=arguments[1],r=!0)):(e=n,t=arguments[1],s=arguments[3],arguments.length>2&&(i=arguments[2],r=!0)),e=""+e,t=""+t,l(s)||(s=""+s);var h=c(this._isDirected,e,t,s);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,h))return r&&(this._edgeLabels[h]=i),this;if(!l(s)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[h]=r?i:this._defaultEdgeLabelFn(e,t,s);var u=M(this._isDirected,e,t,s);return e=u.v,t=u.w,Object.freeze(u),this._edgeObjs[h]=u,y(this._preds[t],e),y(this._sucs[e],t),this._in[t][h]=u,this._out[e][h]=u,this._edgeCount++,this}edge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s);return this._edgeLabels[i]}hasEdge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s),r=this._edgeObjs[i];return r&&(e=r.v,t=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],C(this._preds[t],e),C(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){var s=this._in[e];if(s){var i=p(s);return t?g(i,function(r){return r.v===t}):i}}outEdges(e,t){var s=this._out[e];if(s){var i=p(s);return t?g(i,function(r){return r.w===t}):i}}nodeEdges(e,t){var s=this.inEdges(e,t);if(s)return s.concat(this.outEdges(e,t))}}L.prototype._nodeCount=0;L.prototype._edgeCount=0;function y(o,e){o[e]?o[e]++:o[e]=1}function C(o,e){--o[e]||delete o[e]}function c(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var n=i;i=r,r=n}return i+O+r+O+(l(s)?F:s)}function M(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var n=i;i=r,r=n}var h={v:i,w:r};return s&&(h.name=s),h}function m(o,e){return c(o,e.v,e.w,e.name)}export{L as G};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var Y=Object.defineProperty;var ee=(i,t,s)=>t in i?Y(i,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[t]=s;var z=(i,t,s)=>ee(i,typeof t!="symbol"?t+"":t,s);import{j as e}from"./vendor-markdown-DYfLXXRA.js";import{u as V,a as o,i as U}from"./vendor-i18n-BNURlJ23.js";import{w as D,a as te}from"./App-BhEJNmXl.js";import{t as K,n as B,l as A,M as G,S as w,B as b,D as N,G as se,H as ae,J as q,C as re,v as O,E as M,L as W,q as P,K as _,N as Q,O as ie,Q as ne,U as ce,A as L,I as oe,V as le}from"./vendor-antd-DzhFcYgt.js";import"./main-DTO0Nb-V.js";import"./vendor-charts-BvOlsian.js";import"./vendor-mermaid-CQXqUd1Z.js";const de=({visible:i,onClose:t,onSelect:s})=>{const{t:c}=V(),{token:r}=K.useToken(),{Text:a}=B,[n,m]=o.useState(!1),[l,v]=o.useState(""),[u,x]=o.useState(),[S,T]=o.useState([]),[f,j]=o.useState([]);o.useEffect(()=>{i&&g()},[i]);const g=async d=>{m(!0);try{const p=await D.browseFolder(d);v(p.current_path),x(p.parent_path),T(p.folders)}catch(p){console.error("Failed to load directory:",p),A.error("Unable to read folder")}finally{m(!1)}},y=d=>{j([...f,l]),g(d.path)},C=()=>{u&&(j(f.slice(0,-1)),g(u))},I=()=>{j([]),g()},k=()=>{s(l),t()},E=()=>{if(!l)return[];const d=l.split(/[/\\]/).filter(Boolean);return l.startsWith("/")&&d.unshift("/"),d},F=d=>{const R=E().slice(0,d+1).join("/"),$=(l.startsWith("/"),R);g($)};return e.jsx(G,{title:c("chat.folderBrowser.title"),open:i,onCancel:t,width:700,footer:null,children:e.jsxs(w,{direction:"vertical",size:"middle",style:{width:"100%"},children:[e.jsxs(w,{children:[e.jsx(b,{icon:e.jsx(N,{}),onClick:I,size:"small",children:c("common.home")}),e.jsx(b,{icon:e.jsx(se,{}),onClick:C,disabled:!u,size:"small",children:c("common.parentDirectory")}),e.jsx(b,{type:"primary",icon:e.jsx(ae,{}),onClick:k,size:"small",children:c("chat.folderBrowser.selectCurrent")})]}),e.jsx(q,{children:E().map((d,p)=>e.jsx(q.Item,{children:e.jsx(b,{type:"link",size:"small",onClick:()=>F(p),style:{padding:0},children:d==="/"?e.jsx(N,{}):d})},p))}),e.jsxs(re,{size:"small",styles:{body:{padding:r.paddingXS}},children:[e.jsx(a,{type:"secondary",style:{fontSize:12},children:c("common.currentPath")})," ",e.jsx(a,{code:!0,children:l})]}),e.jsx(O,{spinning:n,children:S.length===0&&!n?e.jsx(M,{image:M.PRESENTED_IMAGE_SIMPLE,description:e.jsx(a,{type:"secondary",children:c("chat.folderBrowser.emptyFolder")})}):e.jsx(W,{dataSource:S,style:{maxHeight:400,overflowY:"auto"},renderItem:d=>e.jsx(W.Item,{style:{padding:0},children:e.jsx(b,{type:"text",icon:e.jsx(P,{}),onClick:()=>y(d),style:{width:"100%",textAlign:"left",padding:`${r.paddingXS}px ${r.paddingSM}px`},children:d.name})})})}),e.jsx(a,{type:"secondary",style:{fontSize:12},children:c("chat.folderBrowser.tip")})]})})};class he{constructor(t={}){z(this,"cache",new Map);z(this,"pendingValidations",new Map);z(this,"options");this.options={debounceMs:t.debounceMs??300,cacheTimeoutMs:t.cacheTimeoutMs??5*60*1e3,maxRetries:t.maxRetries??3}}async validateWorkspace(t){if(!t||t.trim().length===0)return{path:"",is_valid:!1,error_message:U.t("chat.workspace.errorEnterPath")};const s=t.trim(),c=this.getCachedResult(s);if(c)return c;const r=this.pendingValidations.get(s);if(r)return r;const a=this.performValidation(s);this.pendingValidations.set(s,a);try{const n=await a;return this.setCachedResult(s,n),n}finally{this.pendingValidations.delete(s)}}validateWorkspaceDebounced(t,s){let c;return c=setTimeout(async()=>{try{const a=await this.validateWorkspace(t);s(a)}catch(a){const n={path:t,is_valid:!1,error_message:a instanceof Error?a.message:U.t("chat.workspace.checkDescription")};s(n)}},this.options.debounceMs),()=>{clearTimeout(c)}}clearCache(){this.cache.clear()}getCachedResult(t){const s=this.cache.get(t);return s?Date.now()-s.timestamp>this.options.cacheTimeoutMs?(this.cache.delete(t),null):s.result:null}setCachedResult(t,s){this.cache.set(t,{result:s,timestamp:Date.now()})}async performValidation(t,s=0){try{return await te.post("workspace/validate",{path:t})}catch(c){if(s<this.options.maxRetries&&this.isRetryableError(c))return await this.delay(Math.pow(2,s)*1e3),this.performValidation(t,s+1);throw c}}isRetryableError(t){return t instanceof Error?t.message.includes("Failed to fetch")||t.message.includes("HTTP error! status: 5"):!1}delay(t){return new Promise(s=>setTimeout(s,t))}async validateMultiplePaths(t){const c=[];for(let r=0;r<t.length;r+=5){const a=t.slice(r,r+5),n=await Promise.all(a.map(m=>this.validateWorkspace(m)));c.push(...n),r+5<t.length&&await this.delay(100)}return c}}const ue=new he,pe=({value:i="",onChange:t,showRecentWorkspaces:s,showSuggestions:c,onValidationChange:r})=>{const[a,n]=o.useState(i),[m,l]=o.useState({isValidating:!1,result:null}),[v,u]=o.useState([]),[x,S]=o.useState(!1),[T,f]=o.useState([]),[j,g]=o.useState(!1),[y,C]=o.useState(!1),I=o.useRef(null),k=o.useRef(null);o.useEffect(()=>{n(i)},[i]),o.useEffect(()=>(s&&E(),c&&F(),()=>{I.current&&I.current.abort(),k.current&&k.current()}),[s,c]);const E=o.useCallback(async()=>{g(!0);try{const h=await D.getRecentWorkspaces();u(h.slice(0,5))}catch(h){console.error("Failed to load recent workspaces:",h),u([])}finally{g(!1)}},[]),F=o.useCallback(async()=>{C(!0);try{const h=await D.getPathSuggestions();f(h.suggestions.slice(0,8))}catch(h){console.error("Failed to load suggestions:",h),f([])}finally{C(!1)}},[]),d=o.useCallback(h=>{n(h),t&&t(h),I.current&&I.current.abort(),k.current&&k.current(),h.trim()?(l({isValidating:!0,result:null}),k.current=ue.validateWorkspaceDebounced(h.trim(),Z=>{l({isValidating:!1,result:Z}),r&&r(Z)})):(l({isValidating:!1,result:null}),r&&r(null))},[t,r]),p=o.useCallback(()=>{S(!0)},[]),R=o.useCallback(h=>{d(h),A.success("Folder selected successfully")},[d]),$=o.useCallback(h=>{d(h)},[d]);return{path:a,validationStatus:m,recentWorkspaces:v,suggestions:T,isLoadingRecent:j,isLoadingSuggestions:y,folderBrowserVisible:x,setFolderBrowserVisible:S,handlePathChange:d,handleBrowseClick:p,handleFolderSelect:R,handleWorkspaceSelect:$}},{Text:H}=B,ge=({show:i,isLoading:t,recentWorkspaces:s,onSelect:c,token:r})=>{const{t:a}=V();return i?e.jsxs(_,{vertical:!0,gap:r.marginXS,style:{marginTop:r.marginMD},children:[e.jsxs(w,{style:{paddingInline:r.paddingSM},children:[e.jsx(Q,{}),e.jsx(H,{strong:!0,children:a("chat.workspace.recentTitle")})]}),t?e.jsx(_,{justify:"center",style:{padding:r.paddingSM},children:e.jsx(O,{size:"small"})}):s.length===0?e.jsx(M,{description:a("chat.workspace.noRecentWorkspaces"),image:M.PRESENTED_IMAGE_SIMPLE,style:{padding:r.paddingSM}}):e.jsx(W,{size:"small",dataSource:s,style:{paddingInline:r.paddingSM},renderItem:n=>e.jsx(W.Item,{style:{padding:0},children:e.jsx(b,{type:"text",onClick:()=>c(n.path),style:{width:"100%",textAlign:"left",padding:`${r.paddingXS}px 0`,height:"auto"},children:e.jsxs(_,{justify:"space-between",align:"center",style:{width:"100%"},children:[e.jsxs(w,{children:[e.jsx(P,{style:{color:r.colorWarning}}),e.jsx(H,{strong:!0,children:n.workspace_name||n.path.split("/").pop()||a("chat.workspace.defaultWorkspaceName")})]}),e.jsx(H,{type:"secondary",ellipsis:{tooltip:n.path},style:{fontSize:12,maxWidth:"55%",textAlign:"right"},children:n.path})]})})})})]}):null},{Text:X}=B,me=(i,t)=>{switch(i.suggestion_type){case"home":return e.jsx(N,{style:{color:t.colorPrimary}});case"documents":case"desktop":case"downloads":return e.jsx(P,{style:{color:t.colorSuccess}});case"recent":return e.jsx(Q,{style:{color:t.colorWarning}});default:return e.jsx(P,{})}},xe=({show:i,isLoading:t,suggestions:s,onSelect:c,token:r})=>{const{t:a}=V();return i?e.jsxs(_,{vertical:!0,gap:r.marginXS,style:{marginTop:r.marginMD},children:[e.jsxs(w,{style:{paddingInline:r.paddingSM},children:[e.jsx(P,{}),e.jsx(X,{strong:!0,children:a("chat.workspace.suggestedTitle")})]}),t?e.jsx(_,{justify:"center",style:{padding:r.paddingSM},children:e.jsx(O,{size:"small"})}):s.length===0?e.jsx(M,{description:a("chat.workspace.noSuggestions"),image:M.PRESENTED_IMAGE_SIMPLE,style:{padding:r.paddingSM}}):e.jsx(W,{size:"small",dataSource:s,style:{paddingInline:r.paddingSM},renderItem:n=>e.jsx(W.Item,{style:{padding:0},children:e.jsx(b,{type:"text",onClick:()=>c(n.path),style:{width:"100%",textAlign:"left",padding:`${r.paddingXS}px 0`,height:"auto"},children:e.jsxs(_,{justify:"space-between",align:"center",style:{width:"100%"},children:[e.jsxs(w,{children:[me(n,r),e.jsx(X,{strong:!0,children:n.name})]}),e.jsx(X,{type:"secondary",ellipsis:{tooltip:n.path},style:{fontSize:12,maxWidth:"55%",textAlign:"right"},children:n.path})]})})})})]}):null},fe=({isValidating:i,result:t,token:s})=>i?e.jsx(ie,{style:{color:s.colorPrimary}}):t?t.is_valid?e.jsx(ne,{style:{color:s.colorSuccess}}):e.jsx(ce,{style:{color:s.colorError}}):null,{Text:J}=B,ye=({result:i,token:t})=>{const{t:s}=V();return i?e.jsx("div",{style:{marginTop:t.marginXS},children:i.is_valid?e.jsx(L,{type:"success",message:e.jsxs(w,{children:[e.jsx("span",{children:s("chat.workspace.validWorkspace")}),i.workspace_name&&e.jsxs(J,{type:"secondary",children:["(",i.workspace_name,")"]}),i.file_count!==void 0&&e.jsx(J,{type:"secondary",children:s("chat.workspace.fileCount",{count:i.file_count})})]}),showIcon:!0}):e.jsx(L,{type:"error",message:i.error_message||s("validation.invalidPath"),showIcon:!0})}):null},{Text:je}=B,we=({value:i="",onChange:t,placeholder:s,disabled:c=!1,allowBrowse:r=!0,showRecentWorkspaces:a=!0,showSuggestions:n=!0,onValidationChange:m,className:l,style:v})=>{const{t:u}=V(),{token:x}=K.useToken(),S=s??u("chat.workspace.placeholder"),{path:T,validationStatus:f,recentWorkspaces:j,suggestions:g,isLoadingRecent:y,isLoadingSuggestions:C,folderBrowserVisible:I,setFolderBrowserVisible:k,handlePathChange:E,handleBrowseClick:F,handleFolderSelect:d,handleWorkspaceSelect:p}=pe({value:i,onChange:t,showRecentWorkspaces:a,showSuggestions:n,onValidationChange:m});return e.jsxs("div",{className:l,style:v,children:[e.jsx(oe,{value:T,onChange:R=>E(R.target.value),placeholder:S,disabled:c,size:"middle",style:{width:"100%"},suffix:e.jsx(fe,{isValidating:f.isValidating,result:f.result,token:x}),addonBefore:e.jsxs(w,{children:[e.jsx(P,{}),e.jsx(je,{children:u("chat.workspace.label")})]}),addonAfter:r?e.jsx(b,{"aria-label":u("chat.workspace.browseFolder"),title:u("chat.workspace.browseFolder"),icon:e.jsx(P,{}),onClick:F,disabled:c,type:"text",size:"middle",style:{display:"inline-flex",alignItems:"center"}}):void 0}),e.jsx(ye,{result:f.result,token:x}),(a||n)&&e.jsxs(e.Fragment,{children:[e.jsx(le,{style:{margin:"16px 0 12px 0"}}),e.jsx(ge,{show:a,isLoading:y,recentWorkspaces:j,onSelect:p,token:x}),e.jsx(xe,{show:n,isLoading:C,suggestions:g,onSelect:p,token:x})]}),e.jsx(de,{visible:I,onClose:()=>k(!1),onSelect:d})]})},{Title:Se}=B,Re=({open:i,initialPath:t="",loading:s=!1,onSubmit:c,onCancel:r})=>{const{t:a}=V(),[n,m]=o.useState(t),[l,v]=o.useState(null),[u,x]=o.useState(!1);o.useEffect(()=>{i&&(m(t),v(null))},[i,t]);const S=y=>{m(y)},T=y=>{v(y)},f=async()=>{if(!n.trim()){A.error(a("chat.workspace.errorEnterPath"));return}l&&!l.is_valid?G.confirm({title:a("chat.workspace.invalidTitle"),content:e.jsxs("div",{children:[e.jsx("p",{children:a("chat.workspace.issuesDetected")}),e.jsx("p",{children:l.error_message||a("chat.workspace.invalidTitle")}),e.jsx("p",{children:a("chat.workspace.confirmSaveInvalid")})]}),okText:a("common.saveAnyway"),cancelText:a("common.cancel"),onOk:()=>j()}):j()},j=async()=>{x(!0);try{l!=null&&l.is_valid&&await D.addRecentWorkspace(n.trim(),{workspace_name:l.workspace_name}),c(n.trim())}catch(y){console.error("Failed to save workspace path:",y),A.error(a("chat.workspace.errorSaveFailed"))}finally{x(!1)}},g=!n.trim()||s||u;return e.jsx(G,{open:i,title:e.jsx(w,{children:e.jsx(Se,{level:4,style:{margin:0},children:a("chat.workspace.modalTitle")})}),okText:a("common.save"),cancelText:a("common.cancel"),onOk:f,onCancel:r,okButtonProps:{disabled:g,loading:u||s},width:600,destroyOnClose:!0,children:e.jsxs(w,{direction:"vertical",size:"middle",style:{width:"100%"},children:[e.jsx(L,{message:a("chat.workspace.descriptionTitle"),description:e.jsxs("div",{children:[e.jsx("p",{children:a("chat.workspace.descriptionP1")}),e.jsx("p",{children:a("chat.workspace.descriptionP2")})]}),type:"info",showIcon:!0}),e.jsx(we,{value:n,onChange:S,onValidationChange:T,placeholder:a("chat.workspace.placeholder"),disabled:u,allowBrowse:!0,showRecentWorkspaces:!0,showSuggestions:!0}),l&&!l.is_valid&&e.jsx(L,{message:a("chat.workspace.checkTitle"),description:l.error_message||a("chat.workspace.checkDescription"),type:"warning",showIcon:!0})]})})};export{Re as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./vendor-markdown-DYfLXXRA.js";import{a as i}from"./vendor-i18n-BNURlJ23.js";import{C as R,A as I,E as S,L as w,S as p,q as z,m as D,n as b,B as E,u as X,v as C,t as L}from"./vendor-antd-DzhFcYgt.js";const{Text:y}=b,{useToken:A}=L,F=({visible:a,files:d,searchText:l,loading:x,error:h,onSelect:c,onCancel:f,onChangeWorkspace:g})=>{const{token:s}=A(),[n,u]=i.useState(0),k=i.useRef(null),j=i.useRef(null),o=i.useMemo(()=>{const t=l.trim().toLowerCase();return t?d.filter(r=>r.name.toLowerCase().startsWith(t)):d},[d,l]);return i.useEffect(()=>{u(0)},[l,d]),i.useEffect(()=>{if(!a)return;const t=r=>{a&&(r.key==="ArrowDown"||r.key==="n"&&r.ctrlKey?(r.preventDefault(),u(m=>o.length===0?0:(m+1)%o.length)):r.key==="ArrowUp"||r.key==="p"&&r.ctrlKey?(r.preventDefault(),u(m=>o.length===0?0:(m-1+o.length)%o.length)):r.key==="Enter"||r.key==="Tab"?o[n]&&(r.preventDefault(),c(o[n])):r.key==="Escape"&&(r.preventDefault(),f()))};return window.addEventListener("keydown",t),()=>{window.removeEventListener("keydown",t)}},[a,o,n,c,f]),i.useEffect(()=>{if(!a)return;const t=j.current;t&&t.scrollIntoView({block:"nearest"})},[n,a]),a?e.jsx("div",{style:{position:"absolute",bottom:"100%",left:0,right:0,zIndex:1e3,marginBottom:s.marginXS},children:e.jsx(R,{size:"small",style:{borderRadius:s.borderRadius,border:`1px solid ${s.colorBorderSecondary}`,boxShadow:s.boxShadowSecondary},bodyStyle:{padding:s.paddingXS,maxHeight:240,overflowY:"auto"},title:e.jsxs(p,{align:"center",size:s.marginXS,children:[e.jsx(y,{strong:!0,children:"@ File Reference"}),x&&e.jsx(C,{size:"small"})]}),extra:e.jsxs(p,{size:s.marginXS,children:[g&&e.jsx(E,{type:"text",size:"small",icon:e.jsx(X,{}),onClick:g,children:"Set Workspace"}),e.jsx(E,{type:"text",size:"small",onClick:f,children:"Close"})]}),children:h?e.jsx(I,{type:"error",message:h,showIcon:!0}):o.length===0&&!x?e.jsx(S,{image:S.PRESENTED_IMAGE_SIMPLE,description:l?"No matching files found":"Directory is empty"}):e.jsx("div",{ref:k,children:e.jsx(w,{dataSource:o,renderItem:(t,r)=>e.jsx(w.Item,{onMouseEnter:()=>u(r),onClick:()=>c(t),ref:r===n?j:void 0,style:{cursor:"pointer",backgroundColor:r===n?s.colorPrimaryBg:"transparent",borderRadius:s.borderRadiusSM,padding:`${s.paddingXXS}px ${s.paddingXS}px`},children:e.jsxs(p,{size:s.marginXS,align:"center",children:[t.is_directory?e.jsx(z,{}):e.jsx(D,{}),e.jsxs("div",{children:[e.jsx(y,{children:t.name}),e.jsx("div",{children:e.jsx(y,{type:"secondary",style:{fontSize:s.fontSizeSM},children:t.is_directory?"Directory":"File"})})]})]})},t.path)})})})}):null};export{F as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./vendor-markdown-DYfLXXRA.js";import{S as s,m as l,n as d,o as c,T as p,B as x,p as m,t as u}from"./vendor-antd-DzhFcYgt.js";import"./vendor-i18n-BNURlJ23.js";const{Text:g}=d,{useToken:h}=u,w=({files:o,onRemove:i,onClear:r})=>{const{token:e}=h();return o.length===0?null:n.jsx("div",{style:{marginBottom:e.marginSM,padding:`${e.paddingXXS}px ${e.paddingXS}px`,borderRadius:999,background:e.colorFillSecondary,border:`1px solid ${e.colorBorderSecondary}`},children:n.jsxs(s,{align:"center",size:e.marginXS,style:{width:"100%",justifyContent:"space-between"},children:[n.jsxs(s,{align:"center",wrap:!0,size:e.marginXS,children:[n.jsx(l,{style:{color:e.colorTextSecondary}}),n.jsxs(g,{type:"secondary",style:{fontSize:e.fontSizeSM},children:[o.length," file",o.length>1?"s":""]}),o.map(t=>n.jsx(c,{title:`${t.type||"unknown"} • ${(t.size/1024).toFixed(1)} KB`,children:n.jsx(p,{closable:!0,onClose:a=>{a.preventDefault(),i(t.id)},style:{borderRadius:999,marginInlineEnd:0,maxWidth:220,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.name})},t.id))]}),r?n.jsx(x,{type:"text",size:"small",icon:n.jsx(m,{}),onClick:r,style:{borderRadius:999},children:"Clear"}):null]})})};export{w as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./vendor-markdown-DYfLXXRA.js";import{u as b,a as x}from"./vendor-i18n-BNURlJ23.js";import{u as i}from"./App-BhEJNmXl.js";import{F as n,B as l,i as w,L as c,T,j as k,P as F,k as L,M as v,I as d,l as r}from"./vendor-antd-DzhFcYgt.js";import"./main-DTO0Nb-V.js";import"./vendor-charts-BvOlsian.js";import"./vendor-mermaid-CQXqUd1Z.js";const V=()=>{const{t}=b(),P=i(e=>e.systemPrompts),f=i(e=>e.addSystemPrompt),M=i(e=>e.updateSystemPrompt),j=i(e=>e.deleteSystemPrompt),[h,u]=x.useState(!1),[a,p]=x.useState(null),[o]=n.useForm(),g=(e=null)=>{if(e!=null&&e.isDefault){r.warning(t("settings.systemPromptManager.defaultPromptLocked"));return}p(e),o.setFieldsValue(e||{name:"",description:"",content:""}),u(!0)},y=()=>{u(!1),p(null),o.resetFields()},S=async()=>{if(a!=null&&a.isDefault){r.warning(t("settings.systemPromptManager.defaultPromptLocked"));return}try{const e=await o.validateFields();a?(await M({...a,...e}),r.success(t("settings.systemPromptManager.updateSuccess"))):(await f(e),r.success(t("settings.systemPromptManager.addSuccess"))),y()}catch(e){console.error("Failed to save prompt:",e),r.error(e instanceof Error?e.message:t("settings.systemPromptManager.saveError"))}},I=async e=>{try{await j(e),r.success(t("settings.systemPromptManager.deleteSuccess"))}catch(m){console.error("Failed to delete prompt:",m),r.error(m instanceof Error?m.message:t("settings.systemPromptManager.deleteError"))}};return s.jsxs("div",{children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[s.jsx("h2",{children:t("settings.systemPromptManager.title")}),s.jsx(l,{type:"primary",icon:s.jsx(w,{}),onClick:()=>g(),children:t("settings.systemPromptManager.addButton")})]}),s.jsx(c,{itemLayout:"horizontal",dataSource:P,renderItem:e=>s.jsxs(c.Item,{actions:[e.isDefault?null:s.jsx(l,{type:"text",icon:s.jsx(k,{}),onClick:()=>g(e)}),e.isDefault?null:s.jsx(F,{title:t("settings.systemPromptManager.deleteConfirm"),onConfirm:()=>I(e.id),okText:t("common.yes"),cancelText:t("common.no"),children:s.jsx(l,{type:"text",danger:!0,icon:s.jsx(L,{}),"aria-label":t("common.delete")})})],children:[s.jsx(c.Item.Meta,{title:e.name,description:e.description||e.content.substring(0,200)+(e.content.length>200?"...":"")}),e.isDefault&&s.jsx(T,{children:t("settings.systemPromptManager.defaultTag")})]})}),s.jsx(v,{title:t(a?"settings.systemPromptManager.editTitle":"settings.systemPromptManager.addTitle"),open:h,onOk:S,onCancel:y,width:"60%",children:s.jsxs(n,{form:o,layout:"vertical",name:"system_prompt_form",children:[s.jsx(n.Item,{name:"name",label:t("settings.systemPromptManager.nameLabel"),rules:[{required:!0,message:t("settings.systemPromptManager.nameRequired")}],children:s.jsx(d,{})}),s.jsx(n.Item,{name:"description",label:t("settings.systemPromptManager.descriptionLabel"),rules:[{required:!1,message:t("settings.systemPromptManager.descriptionRequired")}],children:s.jsx(d.TextArea,{rows:3})}),s.jsx(n.Item,{name:"content",label:t("settings.systemPromptManager.contentLabel"),rules:[{required:!0,message:t("settings.systemPromptManager.contentRequired")}],children:s.jsx(d.TextArea,{rows:10})})]})})]})};export{V as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as e,l as o,I as i,e as n,K as p}from"./vendor-mermaid-CQXqUd1Z.js";import{p as g}from"./treemap-GDKQZRPO-COsTlA-l.js";import"./vendor-markdown-DYfLXXRA.js";import"./vendor-i18n-BNURlJ23.js";import"./vendor-antd-DzhFcYgt.js";import"./vendor-charts-BvOlsian.js";import"./_baseUniq-AfN8N44G.js";import"./_basePickBy-CQxbmRut.js";import"./clone-D7s6jAMO.js";var m={parse:e(async r=>{const a=await g("info",r);o.debug(a)},"parse")},v={version:p.version+""},d=e(()=>v.version,"getVersion"),c={getVersion:d},l=e((r,a,s)=>{o.debug(`rendering info diagram
|
|
2
|
-
`+r);const t=i(a);n(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${s}`)},"draw"),f={draw:l},F={parser:m,db:c,renderer:f};export{F as diagram};
|