@bigduu/lotus 2026.4.2 → 2026.4.12
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-Ct4Iqvsg.css +1 -0
- package/dist/assets/App-Lp1tMttv.js +247 -0
- package/dist/assets/{_basePickBy-BspK35sI.js → _basePickBy-CSQjZOEH.js} +1 -1
- package/dist/assets/{_baseUniq-yd3d-av8.js → _baseUniq-DQHUo2wZ.js} +1 -1
- package/dist/assets/{architectureDiagram-VXUJARFQ-CQvKJy3I.js → architectureDiagram-VXUJARFQ-BMUh92dd.js} +1 -1
- package/dist/assets/{blockDiagram-VD42YOAC-DyFWUqNO.js → blockDiagram-VD42YOAC-Brh3I75m.js} +1 -1
- package/dist/assets/{c4Diagram-YG6GDRKO-CznZpCeX.js → c4Diagram-YG6GDRKO-DnxCjxA8.js} +1 -1
- package/dist/assets/{chunk-4BX2VUAB-CT4-fTmw.js → chunk-4BX2VUAB-CixM-C1K.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-DPoGFWVp.js → chunk-55IACEB6-5l3X1dpI.js} +1 -1
- package/dist/assets/{chunk-B4BG7PRW-zd34bnG8.js → chunk-B4BG7PRW-B-EJypcR.js} +1 -1
- package/dist/assets/{chunk-DI55MBZ5-DjYfBoqF.js → chunk-DI55MBZ5-BLxvkRT3.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-BDz1nBzO.js → chunk-FMBD7UC4-xvk636Pj.js} +1 -1
- package/dist/assets/{chunk-QN33PNHL-ByHoXcdI.js → chunk-QN33PNHL-C9CiZFt0.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-B58DhLEz.js → chunk-QZHKN3VN-CV7tOA_V.js} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-CE3fOJae.js → chunk-TZMSLE5B-Dj7AmZTG.js} +1 -1
- package/dist/assets/classDiagram-2ON5EDUG-BmRlHYcJ.js +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-BmRlHYcJ.js +1 -0
- package/dist/assets/clone-LotimydJ.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-CQMexX_7.js → cose-bilkent-S5V4N54A-BglMwVVo.js} +1 -1
- package/dist/assets/{dagre-6UL2VRFP-Nr0JTfw1.js → dagre-6UL2VRFP-B_pUYMrn.js} +1 -1
- package/dist/assets/{diagram-PSM6KHXK-2zflANlw.js → diagram-PSM6KHXK-DcFX0GIa.js} +1 -1
- package/dist/assets/{diagram-QEK2KX5R-VyZmBtmD.js → diagram-QEK2KX5R-Bf0mJKZv.js} +1 -1
- package/dist/assets/{diagram-S2PKOQOG-B2faf1Ft.js → diagram-S2PKOQOG-BRd51uCk.js} +1 -1
- package/dist/assets/{erDiagram-Q2GNP2WA-DTAG75D2.js → erDiagram-Q2GNP2WA-DtMpD_dp.js} +1 -1
- package/dist/assets/{flowDiagram-NV44I4VS-Bl2QKbsY.js → flowDiagram-NV44I4VS-T-HBCsOg.js} +1 -1
- package/dist/assets/{ganttDiagram-JELNMOA3-aVmOIbJd.js → ganttDiagram-JELNMOA3-CU32XhNJ.js} +1 -1
- package/dist/assets/{gitGraphDiagram-V2S2FVAM-B0eXnYux.js → gitGraphDiagram-V2S2FVAM-BJJ4R_BN.js} +1 -1
- package/dist/assets/{graph-D0JBNw5a.js → graph-DvuzdqtS.js} +1 -1
- package/dist/assets/{index-CYzkseBh.js → index-BpZHxkza.js} +1 -1
- package/dist/assets/{index-CMK42DTl.js → index-CF-KXsGH.js} +1 -1
- package/dist/assets/{index-Cd0gm8C7.js → index-ClgJQKFk.js} +1 -1
- package/dist/assets/{index-BOUR4S6d.js → index-DVh3FZtR.js} +1 -1
- package/dist/assets/{index-oVXhS3BO.js → index-wEBx2_Bp.js} +1 -1
- package/dist/assets/{index.es-CAbTTDez.js → index.es-DusLI-hl.js} +1 -1
- package/dist/assets/{infoDiagram-HS3SLOUP-Cii6S1my.js → infoDiagram-HS3SLOUP-CPENGo9H.js} +1 -1
- package/dist/assets/{journeyDiagram-XKPGCS4Q-C_iPmuQZ.js → journeyDiagram-XKPGCS4Q-CNU_B7N1.js} +1 -1
- package/dist/assets/{kanban-definition-3W4ZIXB7-Cczg6lpg.js → kanban-definition-3W4ZIXB7-sy_U8c_F.js} +1 -1
- package/dist/assets/{layout-DNfKd0n6.js → layout-BMsjut2n.js} +1 -1
- package/dist/assets/{main-BTCes_R0.js → main-DJkIVk5G.js} +5 -5
- package/dist/assets/{mindmap-definition-VGOIOE7T-qYnf--6q.js → mindmap-definition-VGOIOE7T-B36pEDlU.js} +1 -1
- package/dist/assets/{pieDiagram-ADFJNKIX-CKiWkeBJ.js → pieDiagram-ADFJNKIX-BbT86i-D.js} +1 -1
- package/dist/assets/{quadrantDiagram-AYHSOK5B-CWwC8LhP.js → quadrantDiagram-AYHSOK5B-L5k2W8mA.js} +1 -1
- package/dist/assets/{requirementDiagram-UZGBJVZJ--E3kDOu5.js → requirementDiagram-UZGBJVZJ-Bnucoakg.js} +1 -1
- package/dist/assets/{sankeyDiagram-TZEHDZUN-DjNk0_tw.js → sankeyDiagram-TZEHDZUN-DkMx4gl3.js} +1 -1
- package/dist/assets/{sequenceDiagram-WL72ISMW-CP99d7Wl.js → sequenceDiagram-WL72ISMW-IOZUrf8o.js} +1 -1
- package/dist/assets/{stateDiagram-FKZM4ZOC-BpDaflbT.js → stateDiagram-FKZM4ZOC-CHPy6pjS.js} +1 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-BlNgA_DM.js +1 -0
- package/dist/assets/{timeline-definition-IT6M3QCI-JLPdh86G.js → timeline-definition-IT6M3QCI-CHJ0Uu-N.js} +1 -1
- package/dist/assets/{treemap-GDKQZRPO-D7fekm60.js → treemap-GDKQZRPO-DUA2WI2l.js} +1 -1
- package/dist/assets/vendor-antd-BSy6VeYJ.js +502 -0
- package/dist/assets/{vendor-charts-B5wo7wyK.js → vendor-charts-DLRDG2Rl.js} +2 -2
- package/dist/assets/{vendor-markdown-BtOz1kLl.js → vendor-markdown-CxEpKeyh.js} +1 -1
- package/dist/assets/{vendor-mermaid-CuzF-D1I.js → vendor-mermaid-BIhXK1bF.js} +4 -4
- package/dist/assets/{vendor-pdf-DKSPuLa9.js → vendor-pdf-D0-oBWsD.js} +4 -4
- package/dist/assets/{xychartDiagram-PRI3JC2R-DFMu-kfv.js → xychartDiagram-PRI3JC2R-DwBzmyeu.js} +1 -1
- package/dist/index.html +3 -3
- package/package.json +2 -1
- package/dist/assets/App-BHPFe35o.js +0 -247
- package/dist/assets/App-CWKFDTQi.css +0 -1
- package/dist/assets/classDiagram-2ON5EDUG-BrIAA29n.js +0 -1
- package/dist/assets/classDiagram-v2-WZHVMYZB-BrIAA29n.js +0 -1
- package/dist/assets/clone-UExS44xq.js +0 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-C4ikui-V.js +0 -1
- package/dist/assets/vendor-antd-BlMATH2j.js +0 -502
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Dt}from"./chunk-55IACEB6-DPoGFWVp.js";import{s as wt}from"./chunk-QN33PNHL-ByHoXcdI.js";import{_ as u,b as Vt,a as Lt,s as Mt,g as Bt,p as Ft,q as Yt,c as tt,l as D,y as Pt,x as zt,A as Gt,B as Kt,C as Zt,o as Ut,r as jt,d as Wt,u as Qt}from"./vendor-mermaid-CuzF-D1I.js";import"./vendor-markdown-BtOz1kLl.js";import"./vendor-i18n-BNURlJ23.js";import"./vendor-antd-BlMATH2j.js";import"./vendor-charts-B5wo7wyK.js";var dt=function(){var s=u(function(R,n,a,c){for(a=a||{},c=R.length;c--;a[R[c]]=n);return a},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],h=[1,10],d=[1,11],o=[1,12],l=[1,13],f=[1,20],_=[1,21],E=[1,22],V=[1,23],Z=[1,24],S=[1,19],et=[1,25],U=[1,26],T=[1,18],L=[1,33],st=[1,34],it=[1,35],rt=[1,36],nt=[1,37],pt=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],O=[1,42],A=[1,43],M=[1,52],B=[40,50,68,69],F=[1,63],Y=[1,61],N=[1,58],P=[1,62],z=[1,64],j=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],yt=[63,64,65,66,67],ft=[1,81],_t=[1,80],gt=[1,78],bt=[1,79],mt=[6,10,42,47],v=[6,10,13,41,42,47,48,49],W=[1,89],Q=[1,88],X=[1,87],G=[19,56],Et=[1,98],kt=[1,97],at=[19,56,58,60],ct={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",56:"ATTRIBUTE_WORD",58:",",59:"ATTRIBUTE_KEY",60:"COMMENT",63:"ZERO_OR_ONE",64:"ZERO_OR_MORE",65:"ONE_OR_MORE",66:"ONLY_ONE",67:"MD_PARENT",68:"NON_IDENTIFYING",69:"IDENTIFYING",70:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:u(function(n,a,c,r,p,t,K){var e=t.length-1;switch(p){case 1:break;case 2:this.$=[];break;case 3:t[e-1].push(t[e]),this.$=t[e-1];break;case 4:case 5:this.$=t[e];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[e-4]),r.addEntity(t[e-2]),r.addRelationship(t[e-4],t[e],t[e-2],t[e-3]);break;case 9:r.addEntity(t[e-8]),r.addEntity(t[e-4]),r.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),r.setClass([t[e-8]],t[e-6]),r.setClass([t[e-4]],t[e-2]);break;case 10:r.addEntity(t[e-6]),r.addEntity(t[e-2]),r.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),r.setClass([t[e-6]],t[e-4]);break;case 11:r.addEntity(t[e-6]),r.addEntity(t[e-4]),r.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),r.setClass([t[e-4]],t[e-2]);break;case 12:r.addEntity(t[e-3]),r.addAttributes(t[e-3],t[e-1]);break;case 13:r.addEntity(t[e-5]),r.addAttributes(t[e-5],t[e-1]),r.setClass([t[e-5]],t[e-3]);break;case 14:r.addEntity(t[e-2]);break;case 15:r.addEntity(t[e-4]),r.setClass([t[e-4]],t[e-2]);break;case 16:r.addEntity(t[e]);break;case 17:r.addEntity(t[e-2]),r.setClass([t[e-2]],t[e]);break;case 18:r.addEntity(t[e-6],t[e-4]),r.addAttributes(t[e-6],t[e-1]);break;case 19:r.addEntity(t[e-8],t[e-6]),r.addAttributes(t[e-8],t[e-1]),r.setClass([t[e-8]],t[e-3]);break;case 20:r.addEntity(t[e-5],t[e-3]);break;case 21:r.addEntity(t[e-7],t[e-5]),r.setClass([t[e-7]],t[e-2]);break;case 22:r.addEntity(t[e-3],t[e-1]);break;case 23:r.addEntity(t[e-5],t[e-3]),r.setClass([t[e-5]],t[e]);break;case 24:case 25:this.$=t[e].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[e].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[e-3],r.addClass(t[e-2],t[e-1]);break;case 37:case 38:case 56:case 64:this.$=[t[e]];break;case 39:case 40:this.$=t[e-2].concat([t[e]]);break;case 41:this.$=t[e-2],r.setClass(t[e-1],t[e]);break;case 42:this.$=t[e-3],r.addCssStyles(t[e-2],t[e-1]);break;case 43:this.$=[t[e]];break;case 44:t[e-2].push(t[e]),this.$=t[e-2];break;case 46:this.$=t[e-1]+t[e];break;case 54:case 76:case 77:this.$=t[e].replace(/"/g,"");break;case 55:case 78:this.$=t[e];break;case 57:t[e].push(t[e-1]),this.$=t[e];break;case 58:this.$={type:t[e-1],name:t[e]};break;case 59:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 60:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 61:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 62:case 63:case 66:this.$=t[e];break;case 65:t[e-2].push(t[e]),this.$=t[e-2];break;case 67:this.$=t[e].replace(/"/g,"");break;case 68:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 69:this.$=r.Cardinality.ZERO_OR_ONE;break;case 70:this.$=r.Cardinality.ZERO_OR_MORE;break;case 71:this.$=r.Cardinality.ONE_OR_MORE;break;case 72:this.$=r.Cardinality.ONLY_ONE;break;case 73:this.$=r.Cardinality.MD_PARENT;break;case 74:this.$=r.Identification.NON_IDENTIFYING;break;case 75:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:h,24:d,26:o,28:l,29:14,30:15,31:16,32:17,33:f,34:_,35:E,36:V,37:Z,40:S,43:et,44:U,50:T},s(i,[2,7],{1:[2,1]}),s(i,[2,3]),{9:27,11:9,22:h,24:d,26:o,28:l,29:14,30:15,31:16,32:17,33:f,34:_,35:E,36:V,37:Z,40:S,43:et,44:U,50:T},s(i,[2,5]),s(i,[2,6]),s(i,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:L,64:st,65:it,66:rt,67:nt}),{23:[1,38]},{25:[1,39]},{27:[1,40]},s(i,[2,27]),s(i,[2,28]),s(i,[2,29]),s(i,[2,30]),s(i,[2,31]),s(pt,[2,54]),s(pt,[2,55]),s(i,[2,32]),s(i,[2,33]),s(i,[2,34]),s(i,[2,35]),{16:41,40:O,41:A},{16:44,40:O,41:A},{16:45,40:O,41:A},s(i,[2,4]),{11:46,40:S,50:T},{16:47,40:O,41:A},{18:48,19:[1,49],51:50,52:51,56:M},{11:53,40:S,50:T},{62:54,68:[1,55],69:[1,56]},s(B,[2,69]),s(B,[2,70]),s(B,[2,71]),s(B,[2,72]),s(B,[2,73]),s(i,[2,24]),s(i,[2,25]),s(i,[2,26]),{13:F,38:57,41:Y,42:N,45:59,46:60,48:P,49:z},s(j,[2,37]),s(j,[2,38]),{16:65,40:O,41:A,42:N},{13:F,38:66,41:Y,42:N,45:59,46:60,48:P,49:z},{13:[1,67],15:[1,68]},s(i,[2,17],{61:32,12:69,17:[1,70],42:N,63:L,64:st,65:it,66:rt,67:nt}),{19:[1,71]},s(i,[2,14]),{18:72,19:[2,56],51:50,52:51,56:M},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:L,64:st,65:it,66:rt,67:nt},s(yt,[2,74]),s(yt,[2,75]),{6:ft,10:_t,39:77,42:gt,47:bt},{40:[1,82],41:[1,83]},s(mt,[2,43],{46:84,13:F,41:Y,48:P,49:z}),s(v,[2,45]),s(v,[2,50]),s(v,[2,51]),s(v,[2,52]),s(v,[2,53]),s(i,[2,41],{42:N}),{6:ft,10:_t,39:85,42:gt,47:bt},{14:86,40:W,50:Q,70:X},{16:90,40:O,41:A},{11:91,40:S,50:T},{18:92,19:[1,93],51:50,52:51,56:M},s(i,[2,12]),{19:[2,57]},s(G,[2,58],{54:94,55:95,57:96,59:Et,60:kt}),s([19,56,59,60],[2,63]),s(i,[2,22],{15:[1,100],17:[1,99]}),s([40,50],[2,68]),s(i,[2,36]),{13:F,41:Y,45:101,46:60,48:P,49:z},s(i,[2,47]),s(i,[2,48]),s(i,[2,49]),s(j,[2,39]),s(j,[2,40]),s(v,[2,46]),s(i,[2,42]),s(i,[2,8]),s(i,[2,76]),s(i,[2,77]),s(i,[2,78]),{13:[1,102],42:N},{13:[1,104],15:[1,103]},{19:[1,105]},s(i,[2,15]),s(G,[2,59],{55:106,58:[1,107],60:kt}),s(G,[2,60]),s(at,[2,64]),s(G,[2,67]),s(at,[2,66]),{18:108,19:[1,109],51:50,52:51,56:M},{16:110,40:O,41:A},s(mt,[2,44],{46:84,13:F,41:Y,48:P,49:z}),{14:111,40:W,50:Q,70:X},{16:112,40:O,41:A},{14:113,40:W,50:Q,70:X},s(i,[2,13]),s(G,[2,61]),{57:114,59:Et},{19:[1,115]},s(i,[2,20]),s(i,[2,23],{17:[1,116],42:N}),s(i,[2,11]),{13:[1,117],42:N},s(i,[2,10]),s(at,[2,65]),s(i,[2,18]),{18:118,19:[1,119],51:50,52:51,56:M},{14:120,40:W,50:Q,70:X},{19:[1,121]},s(i,[2,21]),s(i,[2,9]),s(i,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:u(function(n,a){if(a.recoverable)this.trace(n);else{var c=new Error(n);throw c.hash=a,c}},"parseError"),parse:u(function(n){var a=this,c=[0],r=[],p=[null],t=[],K=this.table,e="",H=0,St=0,xt=2,Tt=1,It=t.slice.call(arguments,1),y=Object.create(this.lexer),x={yy:{}};for(var lt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,lt)&&(x.yy[lt]=this.yy[lt]);y.setInput(n,x.yy),x.yy.lexer=y,x.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var ot=y.yylloc;t.push(ot);var vt=y.options&&y.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ct(b){c.length=c.length-2*b,p.length=p.length-b,t.length=t.length-b}u(Ct,"popStack");function Ot(){var b;return b=r.pop()||y.lex()||Tt,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=a.symbols_[b]||b),b}u(Ot,"lex");for(var g,I,m,ht,C={},J,k,At,$;;){if(I=c[c.length-1],this.defaultActions[I]?m=this.defaultActions[I]:((g===null||typeof g>"u")&&(g=Ot()),m=K[I]&&K[I][g]),typeof m>"u"||!m.length||!m[0]){var ut="";$=[];for(J in K[I])this.terminals_[J]&&J>xt&&$.push("'"+this.terminals_[J]+"'");y.showPosition?ut="Parse error on line "+(H+1)+`:
|
|
1
|
+
import{g as Dt}from"./chunk-55IACEB6-5l3X1dpI.js";import{s as wt}from"./chunk-QN33PNHL-C9CiZFt0.js";import{_ as u,b as Vt,a as Lt,s as Mt,g as Bt,p as Ft,q as Yt,c as tt,l as D,y as Pt,x as zt,A as Gt,B as Kt,C as Zt,o as Ut,r as jt,d as Wt,u as Qt}from"./vendor-mermaid-BIhXK1bF.js";import"./vendor-markdown-CxEpKeyh.js";import"./vendor-i18n-BNURlJ23.js";import"./vendor-antd-BSy6VeYJ.js";import"./vendor-charts-DLRDG2Rl.js";var dt=function(){var s=u(function(R,n,a,c){for(a=a||{},c=R.length;c--;a[R[c]]=n);return a},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],h=[1,10],d=[1,11],o=[1,12],l=[1,13],f=[1,20],_=[1,21],E=[1,22],V=[1,23],Z=[1,24],S=[1,19],et=[1,25],U=[1,26],T=[1,18],L=[1,33],st=[1,34],it=[1,35],rt=[1,36],nt=[1,37],pt=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],O=[1,42],A=[1,43],M=[1,52],B=[40,50,68,69],F=[1,63],Y=[1,61],N=[1,58],P=[1,62],z=[1,64],j=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],yt=[63,64,65,66,67],ft=[1,81],_t=[1,80],gt=[1,78],bt=[1,79],mt=[6,10,42,47],v=[6,10,13,41,42,47,48,49],W=[1,89],Q=[1,88],X=[1,87],G=[19,56],Et=[1,98],kt=[1,97],at=[19,56,58,60],ct={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",56:"ATTRIBUTE_WORD",58:",",59:"ATTRIBUTE_KEY",60:"COMMENT",63:"ZERO_OR_ONE",64:"ZERO_OR_MORE",65:"ONE_OR_MORE",66:"ONLY_ONE",67:"MD_PARENT",68:"NON_IDENTIFYING",69:"IDENTIFYING",70:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:u(function(n,a,c,r,p,t,K){var e=t.length-1;switch(p){case 1:break;case 2:this.$=[];break;case 3:t[e-1].push(t[e]),this.$=t[e-1];break;case 4:case 5:this.$=t[e];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[e-4]),r.addEntity(t[e-2]),r.addRelationship(t[e-4],t[e],t[e-2],t[e-3]);break;case 9:r.addEntity(t[e-8]),r.addEntity(t[e-4]),r.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),r.setClass([t[e-8]],t[e-6]),r.setClass([t[e-4]],t[e-2]);break;case 10:r.addEntity(t[e-6]),r.addEntity(t[e-2]),r.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),r.setClass([t[e-6]],t[e-4]);break;case 11:r.addEntity(t[e-6]),r.addEntity(t[e-4]),r.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),r.setClass([t[e-4]],t[e-2]);break;case 12:r.addEntity(t[e-3]),r.addAttributes(t[e-3],t[e-1]);break;case 13:r.addEntity(t[e-5]),r.addAttributes(t[e-5],t[e-1]),r.setClass([t[e-5]],t[e-3]);break;case 14:r.addEntity(t[e-2]);break;case 15:r.addEntity(t[e-4]),r.setClass([t[e-4]],t[e-2]);break;case 16:r.addEntity(t[e]);break;case 17:r.addEntity(t[e-2]),r.setClass([t[e-2]],t[e]);break;case 18:r.addEntity(t[e-6],t[e-4]),r.addAttributes(t[e-6],t[e-1]);break;case 19:r.addEntity(t[e-8],t[e-6]),r.addAttributes(t[e-8],t[e-1]),r.setClass([t[e-8]],t[e-3]);break;case 20:r.addEntity(t[e-5],t[e-3]);break;case 21:r.addEntity(t[e-7],t[e-5]),r.setClass([t[e-7]],t[e-2]);break;case 22:r.addEntity(t[e-3],t[e-1]);break;case 23:r.addEntity(t[e-5],t[e-3]),r.setClass([t[e-5]],t[e]);break;case 24:case 25:this.$=t[e].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[e].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[e-3],r.addClass(t[e-2],t[e-1]);break;case 37:case 38:case 56:case 64:this.$=[t[e]];break;case 39:case 40:this.$=t[e-2].concat([t[e]]);break;case 41:this.$=t[e-2],r.setClass(t[e-1],t[e]);break;case 42:this.$=t[e-3],r.addCssStyles(t[e-2],t[e-1]);break;case 43:this.$=[t[e]];break;case 44:t[e-2].push(t[e]),this.$=t[e-2];break;case 46:this.$=t[e-1]+t[e];break;case 54:case 76:case 77:this.$=t[e].replace(/"/g,"");break;case 55:case 78:this.$=t[e];break;case 57:t[e].push(t[e-1]),this.$=t[e];break;case 58:this.$={type:t[e-1],name:t[e]};break;case 59:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 60:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 61:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 62:case 63:case 66:this.$=t[e];break;case 65:t[e-2].push(t[e]),this.$=t[e-2];break;case 67:this.$=t[e].replace(/"/g,"");break;case 68:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 69:this.$=r.Cardinality.ZERO_OR_ONE;break;case 70:this.$=r.Cardinality.ZERO_OR_MORE;break;case 71:this.$=r.Cardinality.ONE_OR_MORE;break;case 72:this.$=r.Cardinality.ONLY_ONE;break;case 73:this.$=r.Cardinality.MD_PARENT;break;case 74:this.$=r.Identification.NON_IDENTIFYING;break;case 75:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:h,24:d,26:o,28:l,29:14,30:15,31:16,32:17,33:f,34:_,35:E,36:V,37:Z,40:S,43:et,44:U,50:T},s(i,[2,7],{1:[2,1]}),s(i,[2,3]),{9:27,11:9,22:h,24:d,26:o,28:l,29:14,30:15,31:16,32:17,33:f,34:_,35:E,36:V,37:Z,40:S,43:et,44:U,50:T},s(i,[2,5]),s(i,[2,6]),s(i,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:L,64:st,65:it,66:rt,67:nt}),{23:[1,38]},{25:[1,39]},{27:[1,40]},s(i,[2,27]),s(i,[2,28]),s(i,[2,29]),s(i,[2,30]),s(i,[2,31]),s(pt,[2,54]),s(pt,[2,55]),s(i,[2,32]),s(i,[2,33]),s(i,[2,34]),s(i,[2,35]),{16:41,40:O,41:A},{16:44,40:O,41:A},{16:45,40:O,41:A},s(i,[2,4]),{11:46,40:S,50:T},{16:47,40:O,41:A},{18:48,19:[1,49],51:50,52:51,56:M},{11:53,40:S,50:T},{62:54,68:[1,55],69:[1,56]},s(B,[2,69]),s(B,[2,70]),s(B,[2,71]),s(B,[2,72]),s(B,[2,73]),s(i,[2,24]),s(i,[2,25]),s(i,[2,26]),{13:F,38:57,41:Y,42:N,45:59,46:60,48:P,49:z},s(j,[2,37]),s(j,[2,38]),{16:65,40:O,41:A,42:N},{13:F,38:66,41:Y,42:N,45:59,46:60,48:P,49:z},{13:[1,67],15:[1,68]},s(i,[2,17],{61:32,12:69,17:[1,70],42:N,63:L,64:st,65:it,66:rt,67:nt}),{19:[1,71]},s(i,[2,14]),{18:72,19:[2,56],51:50,52:51,56:M},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:L,64:st,65:it,66:rt,67:nt},s(yt,[2,74]),s(yt,[2,75]),{6:ft,10:_t,39:77,42:gt,47:bt},{40:[1,82],41:[1,83]},s(mt,[2,43],{46:84,13:F,41:Y,48:P,49:z}),s(v,[2,45]),s(v,[2,50]),s(v,[2,51]),s(v,[2,52]),s(v,[2,53]),s(i,[2,41],{42:N}),{6:ft,10:_t,39:85,42:gt,47:bt},{14:86,40:W,50:Q,70:X},{16:90,40:O,41:A},{11:91,40:S,50:T},{18:92,19:[1,93],51:50,52:51,56:M},s(i,[2,12]),{19:[2,57]},s(G,[2,58],{54:94,55:95,57:96,59:Et,60:kt}),s([19,56,59,60],[2,63]),s(i,[2,22],{15:[1,100],17:[1,99]}),s([40,50],[2,68]),s(i,[2,36]),{13:F,41:Y,45:101,46:60,48:P,49:z},s(i,[2,47]),s(i,[2,48]),s(i,[2,49]),s(j,[2,39]),s(j,[2,40]),s(v,[2,46]),s(i,[2,42]),s(i,[2,8]),s(i,[2,76]),s(i,[2,77]),s(i,[2,78]),{13:[1,102],42:N},{13:[1,104],15:[1,103]},{19:[1,105]},s(i,[2,15]),s(G,[2,59],{55:106,58:[1,107],60:kt}),s(G,[2,60]),s(at,[2,64]),s(G,[2,67]),s(at,[2,66]),{18:108,19:[1,109],51:50,52:51,56:M},{16:110,40:O,41:A},s(mt,[2,44],{46:84,13:F,41:Y,48:P,49:z}),{14:111,40:W,50:Q,70:X},{16:112,40:O,41:A},{14:113,40:W,50:Q,70:X},s(i,[2,13]),s(G,[2,61]),{57:114,59:Et},{19:[1,115]},s(i,[2,20]),s(i,[2,23],{17:[1,116],42:N}),s(i,[2,11]),{13:[1,117],42:N},s(i,[2,10]),s(at,[2,65]),s(i,[2,18]),{18:118,19:[1,119],51:50,52:51,56:M},{14:120,40:W,50:Q,70:X},{19:[1,121]},s(i,[2,21]),s(i,[2,9]),s(i,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:u(function(n,a){if(a.recoverable)this.trace(n);else{var c=new Error(n);throw c.hash=a,c}},"parseError"),parse:u(function(n){var a=this,c=[0],r=[],p=[null],t=[],K=this.table,e="",H=0,St=0,xt=2,Tt=1,It=t.slice.call(arguments,1),y=Object.create(this.lexer),x={yy:{}};for(var lt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,lt)&&(x.yy[lt]=this.yy[lt]);y.setInput(n,x.yy),x.yy.lexer=y,x.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var ot=y.yylloc;t.push(ot);var vt=y.options&&y.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ct(b){c.length=c.length-2*b,p.length=p.length-b,t.length=t.length-b}u(Ct,"popStack");function Ot(){var b;return b=r.pop()||y.lex()||Tt,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=a.symbols_[b]||b),b}u(Ot,"lex");for(var g,I,m,ht,C={},J,k,At,$;;){if(I=c[c.length-1],this.defaultActions[I]?m=this.defaultActions[I]:((g===null||typeof g>"u")&&(g=Ot()),m=K[I]&&K[I][g]),typeof m>"u"||!m.length||!m[0]){var ut="";$=[];for(J in K[I])this.terminals_[J]&&J>xt&&$.push("'"+this.terminals_[J]+"'");y.showPosition?ut="Parse error on line "+(H+1)+`:
|
|
2
2
|
`+y.showPosition()+`
|
|
3
3
|
Expecting `+$.join(", ")+", got '"+(this.terminals_[g]||g)+"'":ut="Parse error on line "+(H+1)+": Unexpected "+(g==Tt?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(ut,{text:y.match,token:this.terminals_[g]||g,line:y.yylineno,loc:ot,expected:$})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+g);switch(m[0]){case 1:c.push(g),p.push(y.yytext),t.push(y.yylloc),c.push(m[1]),g=null,St=y.yyleng,e=y.yytext,H=y.yylineno,ot=y.yylloc;break;case 2:if(k=this.productions_[m[1]][1],C.$=p[p.length-k],C._$={first_line:t[t.length-(k||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(k||1)].first_column,last_column:t[t.length-1].last_column},vt&&(C._$.range=[t[t.length-(k||1)].range[0],t[t.length-1].range[1]]),ht=this.performAction.apply(C,[e,St,H,x.yy,m[1],p,t].concat(It)),typeof ht<"u")return ht;k&&(c=c.slice(0,-1*k*2),p=p.slice(0,-1*k),t=t.slice(0,-1*k)),c.push(this.productions_[m[1]][0]),p.push(C.$),t.push(C._$),At=K[c[c.length-2]][c[c.length-1]],c.push(At);break;case 3:return!0}}return!0},"parse")},Rt=function(){var R={EOF:1,parseError:u(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:u(function(n,a){return this.yy=a||this.yy||{},this._input=n,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:u(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var a=n.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:u(function(n){var a=n.length,c=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var r=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),c.length-1&&(this.yylineno-=c.length-1);var p=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:c?(c.length===r.length?this.yylloc.first_column:0)+r[r.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(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
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:u(function(n){this.unput(this.match.slice(n))},"less"),pastInput:u(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var n=this.pastInput(),a=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as qt}from"./chunk-FMBD7UC4-
|
|
1
|
+
import{g as qt}from"./chunk-FMBD7UC4-xvk636Pj.js";import{_ as m,n as Ot,l as t1,c as b1,d as S1,o as Ht,r as Xt,u as it,b as Qt,s as Jt,p as Zt,a as $t,g as te,q as ee,k as se,t as ie,J as re,v as ae,x as st,y as ne,z as ue,A as oe,B as le}from"./vendor-mermaid-BIhXK1bF.js";import{g as ce}from"./chunk-55IACEB6-5l3X1dpI.js";import{s as he}from"./chunk-QN33PNHL-C9CiZFt0.js";import"./vendor-markdown-CxEpKeyh.js";import"./vendor-i18n-BNURlJ23.js";import"./vendor-antd-BSy6VeYJ.js";import"./vendor-charts-DLRDG2Rl.js";var de="flowchart-",P1,pe=(P1=class{constructor(){this.vertexCounter=0,this.config=b1(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=Qt,this.setAccDescription=Jt,this.setDiagramTitle=Zt,this.getAccTitle=$t,this.getAccDescription=te,this.getDiagramTitle=ee,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return se.sanitizeText(i,this.config)}lookUpDomId(i){for(const a of this.vertices.values())if(a.id===i)return a.domId;return i}addVertex(i,a,n,u,o,f,c={},A){var L,C;if(!i||i.trim().length===0)return;let r;if(A!==void 0){let d;A.includes(`
|
|
2
2
|
`)?d=A+`
|
|
3
3
|
`:d=`{
|
|
4
4
|
`+A+`
|
|
@@ -1,4 +1,4 @@
|
|
|
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-CuzF-D1I.js";import{d as V,y as xe,z as we}from"./vendor-antd-BlMATH2j.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-B5wo7wyK.js";import"./vendor-markdown-BtOz1kLl.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)+`:
|
|
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-BIhXK1bF.js";import{d as V,y as xe,z as we}from"./vendor-antd-BSy6VeYJ.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-DLRDG2Rl.js";import"./vendor-markdown-CxEpKeyh.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
2
|
`+w.showPosition()+`
|
|
3
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
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()+`
|
package/dist/assets/{gitGraphDiagram-V2S2FVAM-B0eXnYux.js → gitGraphDiagram-V2S2FVAM-BJJ4R_BN.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as Z}from"./chunk-4BX2VUAB-CT4-fTmw.js";import{I as F}from"./chunk-QZHKN3VN-B58DhLEz.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-CuzF-D1I.js";import{p as gr}from"./treemap-GDKQZRPO-D7fekm60.js";import"./vendor-markdown-BtOz1kLl.js";import"./vendor-i18n-BNURlJ23.js";import"./vendor-antd-BlMATH2j.js";import"./vendor-charts-B5wo7wyK.js";import"./_baseUniq-yd3d-av8.js";import"./_basePickBy-BspK35sI.js";import"./clone-UExS44xq.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",`
|
|
1
|
+
import{p as Z}from"./chunk-4BX2VUAB-CixM-C1K.js";import{I as F}from"./chunk-QZHKN3VN-CV7tOA_V.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-BIhXK1bF.js";import{p as gr}from"./treemap-GDKQZRPO-DUA2WI2l.js";import"./vendor-markdown-CxEpKeyh.js";import"./vendor-i18n-BNURlJ23.js";import"./vendor-antd-BSy6VeYJ.js";import"./vendor-charts-DLRDG2Rl.js";import"./_baseUniq-DQHUo2wZ.js";import"./_basePickBy-CSQjZOEH.js";import"./clone-LotimydJ.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
2
|
${s-c/2-k/2},${u+L}
|
|
3
3
|
${s-c/2-k/2},${u-L}
|
|
4
4
|
${a.posWithOffset-c/2-k},${u-y-L}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ao as N,ap as j,aq as f,ar as b,as as E}from"./vendor-mermaid-
|
|
1
|
+
import{ao as N,ap as j,aq as f,ar as b,as as E}from"./vendor-mermaid-BIhXK1bF.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-DQHUo2wZ.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 +1 @@
|
|
|
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-BtOz1kLl.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-BHPFe35o.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-BlMATH2j.js";import"./main-BTCes_R0.js";import"./vendor-charts-B5wo7wyK.js";import"./vendor-mermaid-CuzF-D1I.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
|
+
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-CxEpKeyh.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-Lp1tMttv.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-BSy6VeYJ.js";import"./main-DJkIVk5G.js";import"./vendor-charts-DLRDG2Rl.js";import"./vendor-mermaid-BIhXK1bF.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 +1 @@
|
|
|
1
|
-
import{j as s}from"./vendor-markdown-
|
|
1
|
+
import{j as s}from"./vendor-markdown-CxEpKeyh.js";import{u as b,a as x}from"./vendor-i18n-BNURlJ23.js";import{u as i}from"./App-Lp1tMttv.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-BSy6VeYJ.js";import"./main-DJkIVk5G.js";import"./vendor-charts-DLRDG2Rl.js";import"./vendor-mermaid-BIhXK1bF.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 +1 @@
|
|
|
1
|
-
import{j as n}from"./vendor-markdown-
|
|
1
|
+
import{j as n}from"./vendor-markdown-CxEpKeyh.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-BSy6VeYJ.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 +1 @@
|
|
|
1
|
-
import{j as s}from"./vendor-markdown-
|
|
1
|
+
import{j as s}from"./vendor-markdown-CxEpKeyh.js";import{C as $,d as v,p as T}from"./App-Lp1tMttv.js";import{a as l,u as B}from"./vendor-i18n-BNURlJ23.js";import{v as E,t as M,T as L,w as D,x as K,q as F}from"./vendor-antd-BSy6VeYJ.js";import"./main-DJkIVk5G.js";import"./vendor-charts-DLRDG2Rl.js";import"./vendor-mermaid-BIhXK1bF.js";const z=({visible:p,searchText:k,onSelect:j,onCancel:f,onAutoComplete:g})=>{const[o,i]=l.useState([]),[c,R]=l.useState([]),[d,u]=l.useState(0),[N,I]=l.useState(!1),S=l.useRef(null),h=l.useRef(null);l.useEffect(()=>{if(!p)return;const a=$.getInstance();(async()=>{I(!0);try{const r=await a.listCommands();v("[CommandSelector]","[CommandSelector] Fetched commands:",r),i(r),u(0)}catch(r){console.error("[CommandSelector] Failed to fetch commands:",r),i([])}finally{I(!1)}})()},[p]),l.useEffect(()=>{const a=o.filter(e=>{var x,y,b,C,w;const r=k.toLowerCase(),n=(e.displayName??"").toLowerCase();return e.name.toLowerCase().includes(r)||n.includes(r)||e.description.toLowerCase().includes(r)||e.type==="mcp"&&[(x=e.metadata)==null?void 0:x.serverId,(y=e.metadata)==null?void 0:y.serverName,(b=e.metadata)==null?void 0:b.originalName].filter(m=>typeof m=="string").some(m=>m.toLowerCase().includes(r))||(((C=e.category)==null?void 0:C.toLowerCase().includes(r))??!1)||(((w=e.tags)==null?void 0:w.some(m=>m.toLowerCase().includes(r)))??!1)});R(a),u(0)},[o,k]),l.useEffect(()=>{if(!h.current||!S.current)return;const a=S.current,e=h.current,r=a.getBoundingClientRect(),n=e.getBoundingClientRect();n.top<r.top?e.scrollIntoView({block:"start",behavior:"smooth"}):n.bottom>r.bottom&&e.scrollIntoView({block:"end",behavior:"smooth"})},[d,c]);const t=l.useCallback(async a=>{try{j({name:a.name,type:a.type,id:a.id})}catch(e){console.error(`[CommandSelector] Failed to select command '${a.name}':`,e)}},[j]);return l.useEffect(()=>{const a=e=>{if(p)switch(e.key){case"ArrowDown":case"n":if(e.key==="n"&&!e.ctrlKey)break;e.preventDefault(),e.stopPropagation(),u(r=>r<c.length-1?r+1:0);break;case"ArrowUp":case"p":if(e.key==="p"&&!e.ctrlKey)break;e.preventDefault(),e.stopPropagation(),u(r=>r>0?r-1:c.length-1);break;case"Enter":e.preventDefault(),e.stopPropagation(),c[d]&&t(c[d]);break;case" ":case"Tab":e.preventDefault(),e.stopPropagation(),c[d]&&g&&g(c[d].name);break;case"Escape":e.preventDefault(),e.stopPropagation(),f();break}};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[p,c,d,f,g,t]),{containerRef:S,selectedItemRef:h,filteredCommands:c,selectedIndex:d,setSelectedIndex:u,isLoading:N,handleCommandSelect:t}},{useToken:X}=M,P={workflow:{color:"blue",icon:s.jsx(F,{}),labelKey:"chat.commandSelector.types.workflow"},skill:{color:"green",icon:s.jsx(K,{}),labelKey:"chat.commandSelector.types.skill"},mcp:{color:"purple",icon:s.jsx(D,{}),labelKey:"chat.commandSelector.types.mcp"}},U=({visible:p,onSelect:k,onCancel:j,searchText:f,onAutoComplete:g})=>{const{token:o}=X(),{t:i}=B(),{containerRef:c,selectedItemRef:R,filteredCommands:d,selectedIndex:u,setSelectedIndex:N,isLoading:I,handleCommandSelect:S}=z({visible:p,searchText:f,onSelect:k,onCancel:j,onAutoComplete:g});if(!p)return null;if(I)return s.jsxs("div",{style:{position:"absolute",bottom:"100%",left:0,right:0,background:o.colorBgContainer,border:`1px solid ${o.colorBorderSecondary}`,borderRadius:o.borderRadiusSM,boxShadow:o.boxShadowSecondary,padding:`${o.paddingSM}px ${o.paddingMD}px`,zIndex:1e3,marginBottom:o.marginXS,textAlign:"center"},children:[s.jsx(E,{size:"small"})," ",i("chat.commandSelector.loading")]});if(d.length===0)return s.jsx("div",{style:{position:"absolute",bottom:"100%",left:0,right:0,background:o.colorBgContainer,border:`1px solid ${o.colorBorderSecondary}`,borderRadius:o.borderRadiusSM,boxShadow:o.boxShadowSecondary,padding:`${o.paddingSM}px ${o.paddingMD}px`,zIndex:1e3,marginBottom:o.marginXS,textAlign:"center",color:o.colorTextSecondary},children:f?i("chat.commandSelector.emptyWithSearch",{search:f}):i("chat.commandSelector.empty")});const h=(t,a)=>{var b,C,w;const e=P[t.type],r=a===u,n=t.type==="mcp"?T(t.name):null,x=t.type==="mcp"?((b=t.metadata)==null?void 0:b.originalName)||(n==null?void 0:n.toolName)||t.displayName||t.name:null,y=t.type==="mcp"&&(((C=t.metadata)==null?void 0:C.serverName)||((w=t.metadata)==null?void 0:w.serverId)||(n==null?void 0:n.serverId))||null;return s.jsxs("div",{ref:r?R:null,className:`command-selector-item ${r?"selected":""}`,onClick:()=>S(t),onMouseEnter:()=>N(a),children:[s.jsxs("div",{className:"command-selector-item-header",children:[s.jsxs("div",{className:"command-selector-item-name",style:{color:o.colorPrimary},children:["/",t.type==="mcp"&&x?x:t.name]}),s.jsxs("div",{style:{display:"flex",gap:o.marginXS},children:[t.type==="mcp"&&y&&s.jsx(L,{color:"processing",children:y}),s.jsxs(L,{color:e.color,children:[e.icon," ",i(e.labelKey)]})]})]}),s.jsx("div",{className:"command-selector-item-description",style:{color:o.colorTextSecondary},children:t.description}),t.type==="mcp"&&y&&s.jsxs("div",{className:"command-selector-item-category",style:{color:o.colorTextTertiary},children:[i("common.server")," ",y]}),t.category&&s.jsxs("div",{className:"command-selector-item-category",style:{color:o.colorTextTertiary},children:[i("common.category")," ",t.category]}),t.tags&&t.tags.length>0&&s.jsx("div",{className:"command-selector-item-tags",children:t.tags.slice(0,3).map(m=>s.jsx(L,{children:m},m))})]},t.id)};return s.jsxs("div",{ref:c,className:"command-selector-container",style:{background:o.colorBgContainer,border:`1px solid ${o.colorBorderSecondary}`,borderRadius:o.borderRadiusSM,boxShadow:o.boxShadowSecondary},children:[s.jsx("div",{style:{padding:`${o.paddingXXS}px ${o.paddingSM}px`,borderBottom:`1px solid ${o.colorBorderSecondary}`,background:o.colorFillQuaternary,fontSize:o.fontSizeSM,color:o.colorTextTertiary},children:i("chat.commandSelector.navigationHint")}),d.map((t,a)=>h(t,a))]})};export{U as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./vendor-markdown-
|
|
1
|
+
import{j as e}from"./vendor-markdown-CxEpKeyh.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-BSy6VeYJ.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};
|