@band-app/server 0.20.2 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/DockviewBrowserContainer-_omnSiyJ.js +5 -0
- package/dist/client/assets/DockviewTerminalContainer-DAn_WCfx.js +2 -0
- package/dist/client/assets/TerminalPanel-CNPsPif8.js +5 -0
- package/dist/client/assets/{_basePickBy-K7I344em.js → _basePickBy-DtyMrmhl.js} +1 -1
- package/dist/client/assets/{_baseUniq-840KfAAa.js → _baseUniq-BJUkdL_v.js} +1 -1
- package/dist/client/assets/{arc-CyZzBxl3.js → arc-yAV3EAnY.js} +1 -1
- package/dist/client/assets/{architectureDiagram-VXUJARFQ-CmR2ldp9.js → architectureDiagram-VXUJARFQ-B3FpBxQF.js} +1 -1
- package/dist/client/assets/{blockDiagram-VD42YOAC-DrrwS0qA.js → blockDiagram-VD42YOAC-3LlBLqQC.js} +1 -1
- package/dist/client/assets/{c4Diagram-YG6GDRKO-DaK5OX1L.js → c4Diagram-YG6GDRKO-Be5RpvjZ.js} +1 -1
- package/dist/client/assets/channel-DbN6Vg7w.js +1 -0
- package/dist/client/assets/{chunk-4BX2VUAB-CsnsxsVp.js → chunk-4BX2VUAB-CISDQxrq.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-BwSrHj7M.js → chunk-55IACEB6-BfU__3ET.js} +1 -1
- package/dist/client/assets/{chunk-B4BG7PRW-BufiBtiI.js → chunk-B4BG7PRW-D4iHXw8l.js} +1 -1
- package/dist/client/assets/{chunk-DI55MBZ5-Yk6m5bd6.js → chunk-DI55MBZ5-BAdhjTka.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-DjItmPEo.js → chunk-FMBD7UC4-Zwu4-L0P.js} +1 -1
- package/dist/client/assets/{chunk-QN33PNHL-B7fPTsQD.js → chunk-QN33PNHL-DxMovsgL.js} +1 -1
- package/dist/client/assets/{chunk-QZHKN3VN-TVQc71ZW.js → chunk-QZHKN3VN-vrDNXKJS.js} +1 -1
- package/dist/client/assets/{chunk-TZMSLE5B-2idj0WVp.js → chunk-TZMSLE5B-CX92zDel.js} +1 -1
- package/dist/client/assets/classDiagram-2ON5EDUG-BegLJbQe.js +1 -0
- package/dist/client/assets/classDiagram-v2-WZHVMYZB-BegLJbQe.js +1 -0
- package/dist/client/assets/clone-Cl7gVEL3.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-BhM4dIed.js → cose-bilkent-S5V4N54A-GNlGGpMz.js} +1 -1
- package/dist/client/assets/{dagre-6UL2VRFP-BW7B-2Wf.js → dagre-6UL2VRFP-p1fgRXjW.js} +1 -1
- package/dist/client/assets/{diagram-PSM6KHXK-D_bAy1sr.js → diagram-PSM6KHXK-CYtWPBH-.js} +1 -1
- package/dist/client/assets/{diagram-QEK2KX5R-D8JQR6S5.js → diagram-QEK2KX5R-Cgd-_Ub3.js} +1 -1
- package/dist/client/assets/{diagram-S2PKOQOG-CfcIDV7e.js → diagram-S2PKOQOG-DAs62NY3.js} +1 -1
- package/dist/client/assets/{erDiagram-Q2GNP2WA-CH496Ckq.js → erDiagram-Q2GNP2WA-DBI_1PZQ.js} +1 -1
- package/dist/client/assets/{flowDiagram-NV44I4VS-DnG8llmE.js → flowDiagram-NV44I4VS-C8JqBNNX.js} +1 -1
- package/dist/client/assets/{ganttDiagram-JELNMOA3--itEi_t7.js → ganttDiagram-JELNMOA3-B_NTSbsU.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-V2S2FVAM-TMvOD2Hw.js → gitGraphDiagram-V2S2FVAM-CSgrclqJ.js} +1 -1
- package/dist/client/assets/{graph-c_E6O25w.js → graph-CnuI3kx8.js} +1 -1
- package/dist/client/assets/{highlighted-body-B3W2YXNL-BQQGrbuP.js → highlighted-body-B3W2YXNL-B0miGNm_.js} +1 -1
- package/dist/client/assets/{index-CPgwx8nF.js → index-7yDQgH1f.js} +1 -1
- package/dist/client/assets/{index-BDr61s69.js → index-B6S69IUm.js} +1 -1
- package/dist/client/assets/{index-DWRgJu21.js → index-BArE6nAN.js} +1 -1
- package/dist/client/assets/{index-DOS5ytTy.js → index-BOAi4k9G.js} +1 -1
- package/dist/client/assets/{index-A07Yw0tn.js → index-BWouWVU0.js} +1 -1
- package/dist/client/assets/{index-CKuNUVLa.js → index-BmMzlQLK.js} +1 -1
- package/dist/client/assets/{index-vbYm59ME.js → index-Bz2VMYkX.js} +1 -1
- package/dist/client/assets/{index-DfuA-PNG.js → index-C4-1pvZ7.js} +1 -1
- package/dist/client/assets/{index-m8_Ch1aa.js → index-CmyTYJul.js} +1 -1
- package/dist/client/assets/{index-iGcckmiU.js → index-CtkaVda1.js} +1 -1
- package/dist/client/assets/{index-Cu2JEhny.js → index-D88tU2rQ.js} +1 -1
- package/dist/client/assets/{index-B5eB60aU.js → index-DSgvPpOw.js} +1 -1
- package/dist/client/assets/{index-D8IXa_66.js → index-DXAzUetQ.js} +1 -1
- package/dist/client/assets/{index-B7YwKzXu.js → index-DYeExVW-.js} +1 -1
- package/dist/client/assets/{index-Ds5Q3ErL.js → index-DtIW2F6f.js} +1 -1
- package/dist/client/assets/{index-C_O1BBs4.js → index-UiJjSfLA.js} +1 -1
- package/dist/client/assets/{index-By0qQdHl.js → index-W_8A45Ak.js} +1 -1
- package/dist/client/assets/{index-CZ26DWy1.js → index-nNmyPk2g.js} +1 -1
- package/dist/client/assets/{infoDiagram-HS3SLOUP--m1No2DR.js → infoDiagram-HS3SLOUP-CsK1yEhl.js} +1 -1
- package/dist/client/assets/{journeyDiagram-XKPGCS4Q-BDutHWrQ.js → journeyDiagram-XKPGCS4Q-7ztemwUy.js} +1 -1
- package/dist/client/assets/{kanban-definition-3W4ZIXB7-C7PkU-98.js → kanban-definition-3W4ZIXB7-Cre8PAMX.js} +1 -1
- package/dist/client/assets/{layout-TzPz9qDe.js → layout-BM0hAxpp.js} +1 -1
- package/dist/client/assets/{main-Dg3qcN-n.js → main-p2Lo-pWV.js} +230 -230
- package/dist/client/assets/{mindmap-definition-VGOIOE7T-CSiVydvY.js → mindmap-definition-VGOIOE7T-BjEgocYT.js} +1 -1
- package/dist/client/assets/{pieDiagram-ADFJNKIX-Dc6SkC1V.js → pieDiagram-ADFJNKIX-C4RjN3hy.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-AYHSOK5B-BhNEAthj.js → quadrantDiagram-AYHSOK5B-NEf3JRFz.js} +1 -1
- package/dist/client/assets/{requirementDiagram-UZGBJVZJ-C1P5R6lO.js → requirementDiagram-UZGBJVZJ-BeRnY69a.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-TZEHDZUN-Bk4NapW-.js → sankeyDiagram-TZEHDZUN-DVODsg78.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-WL72ISMW-CZkAOyvQ.js → sequenceDiagram-WL72ISMW-D6joy57s.js} +1 -1
- package/dist/client/assets/{square-terminal-GppBzFTB.js → square-terminal-DHH8tUx5.js} +1 -1
- package/dist/client/assets/{stateDiagram-FKZM4ZOC-BHVMEify.js → stateDiagram-FKZM4ZOC-DsFp4qia.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-4FDKWEC3-Dgk5Hjv7.js +1 -0
- package/dist/client/assets/{timeline-definition-IT6M3QCI-BddSUTvN.js → timeline-definition-IT6M3QCI-0xcgjNhV.js} +1 -1
- package/dist/client/assets/{treemap-GDKQZRPO-C1EZTZwZ.js → treemap-GDKQZRPO-BWb88BcP.js} +1 -1
- package/dist/client/assets/{workspace._workspaceId-DlSNI5Oq.js → workspace._workspaceId-BGYd2hI-.js} +1 -1
- package/dist/client/assets/{workspace._workspaceId-BWohejgu.js → workspace._workspaceId-jOqDoJcM.js} +2 -2
- package/dist/client/assets/{xychartDiagram-PRI3JC2R-DpUCBrE-.js → xychartDiagram-PRI3JC2R--tkhYHwZ.js} +1 -1
- package/dist/openapi.json +85 -25
- package/dist/server/assets/{DockviewBrowserContainer-DLO8DHQ8.js → DockviewBrowserContainer-bdNwZbjc.js} +62 -44
- package/dist/server/assets/{DockviewTerminalContainer-CyrT6RMc.js → DockviewTerminalContainer-B1Nw8LXB.js} +65 -46
- package/dist/server/assets/{TerminalPanel-EgMwvOQl.js → TerminalPanel-Badqj0m0.js} +67 -11
- package/dist/server/assets/{_basePickBy-DffNdyLl.js → _basePickBy-D8ok8_jI.js} +2 -2
- package/dist/server/assets/{_baseUniq-Bfpn2XXj.js → _baseUniq--LQjrjoo.js} +1 -1
- package/dist/server/assets/{_tanstack-start-manifest_v-Bz2MwyQC.js → _tanstack-start-manifest_v-CIcSNV55.js} +1 -1
- package/dist/server/assets/{arc-D-2lE2nY.js → arc-UlCdTTPZ.js} +1 -1
- package/dist/server/assets/{architecture-7HQA4BMR-Dl_dn3FS.js → architecture-7HQA4BMR-g585WmZs.js} +6 -6
- package/dist/server/assets/{architectureDiagram-VXUJARFQ-CUeN4CLM.js → architectureDiagram-VXUJARFQ-kdf4spX4.js} +6 -6
- package/dist/server/assets/{blockDiagram-VD42YOAC-CoHm7pVm.js → blockDiagram-VD42YOAC-XJWMoZPI.js} +6 -6
- package/dist/server/assets/{c4Diagram-YG6GDRKO-ixN9bfNO.js → c4Diagram-YG6GDRKO-BULLTo2O.js} +2 -2
- package/dist/server/assets/{channel-C2x8ka5l.js → channel-N781S9-q.js} +1 -1
- package/dist/server/assets/{chunk-4BX2VUAB-ty5ENgn-.js → chunk-4BX2VUAB-D4MPtIqQ.js} +1 -1
- package/dist/server/assets/{chunk-55IACEB6-CdhYl0WD.js → chunk-55IACEB6-BsRaN4wq.js} +1 -1
- package/dist/server/assets/{chunk-B4BG7PRW-BskXevag.js → chunk-B4BG7PRW-kuOFZXeP.js} +4 -4
- package/dist/server/assets/{chunk-DI55MBZ5-BjfW2WAW.js → chunk-DI55MBZ5-ccubr48T.js} +3 -3
- package/dist/server/assets/{chunk-FMBD7UC4-Cuj-_YqX.js → chunk-FMBD7UC4-BNEgTZts.js} +1 -1
- package/dist/server/assets/{chunk-QN33PNHL-N-a0mOYh.js → chunk-QN33PNHL-gAa-_mPg.js} +1 -1
- package/dist/server/assets/{chunk-QZHKN3VN-G3i4r4Cx.js → chunk-QZHKN3VN-qid0EAJk.js} +1 -1
- package/dist/server/assets/{chunk-TZMSLE5B-B3g6EfmG.js → chunk-TZMSLE5B-BAwrhrCM.js} +1 -1
- package/dist/server/assets/{classDiagram-v2-WZHVMYZB-BHvCGARt.js → classDiagram-2ON5EDUG-D48G1fOA.js} +5 -5
- package/dist/server/assets/{classDiagram-2ON5EDUG-BHvCGARt.js → classDiagram-v2-WZHVMYZB-D48G1fOA.js} +5 -5
- package/dist/server/assets/{clone-Dvf-f1rO.js → clone-g6aLZKbC.js} +1 -1
- package/dist/server/assets/{cose-bilkent-S5V4N54A-DQur-dSk.js → cose-bilkent-S5V4N54A-GH832JBk.js} +1 -1
- package/dist/server/assets/{dagre-6UL2VRFP-BqY_BEAB.js → dagre-6UL2VRFP-DCM_EeeJ.js} +6 -6
- package/dist/server/assets/{diagram-PSM6KHXK-Ci3qYhO1.js → diagram-PSM6KHXK-Wsb4GT24.js} +7 -7
- package/dist/server/assets/{diagram-QEK2KX5R-Cetw62MH.js → diagram-QEK2KX5R--ln7zI47.js} +6 -6
- package/dist/server/assets/{diagram-S2PKOQOG-C9ZAbCH3.js → diagram-S2PKOQOG-nDhXR9ui.js} +6 -6
- package/dist/server/assets/{erDiagram-Q2GNP2WA-CXWd7XfZ.js → erDiagram-Q2GNP2WA-CMa2Pz-v.js} +4 -4
- package/dist/server/assets/{flowDiagram-NV44I4VS-BYT0MDKu.js → flowDiagram-NV44I4VS-4gEGHH9W.js} +5 -5
- package/dist/server/assets/{ganttDiagram-JELNMOA3-DRqUEh77.js → ganttDiagram-JELNMOA3-BOS7aF_7.js} +1 -1
- package/dist/server/assets/{gitGraph-G5XIXVHT-BCxnYqav.js → gitGraph-G5XIXVHT-DPzSD5yq.js} +6 -6
- package/dist/server/assets/{gitGraphDiagram-V2S2FVAM-iXeYaqRc.js → gitGraphDiagram-V2S2FVAM-CKZ8qTSA.js} +7 -7
- package/dist/server/assets/{graph-CsW8oeuR.js → graph-CdCcTp1P.js} +2 -2
- package/dist/server/assets/{highlighted-body-B3W2YXNL-DFADuqgv.js → highlighted-body-B3W2YXNL-Dmr6rOWq.js} +1 -1
- package/dist/server/assets/{index-RNkDnge6.js → index-3AJisjJ-.js} +2 -2
- package/dist/server/assets/{index-CW8ZK5DO.js → index-BQy_SzGG.js} +2 -2
- package/dist/server/assets/{index-O9RnegqI.js → index-BXNtERIJ.js} +2 -2
- package/dist/server/assets/{index-24i7qhhh.js → index-Bvxb7XFW.js} +1 -1
- package/dist/server/assets/{index-CqA-krzP.js → index-C4WwCpyx.js} +2 -2
- package/dist/server/assets/{index-u8w_jl1U.js → index-CZpP5Q96.js} +2 -2
- package/dist/server/assets/{index-C5QUMB__.js → index-D7vNc-qo.js} +2 -2
- package/dist/server/assets/{index-Xzkl582b.js → index-DAc69z6c.js} +2 -2
- package/dist/server/assets/{index-BFTJZ14_.js → index-DBfcn5gX.js} +2 -2
- package/dist/server/assets/{index-IuIWAovp.js → index-DTBi6jO_.js} +5 -5
- package/dist/server/assets/{index-BY32AoKU.js → index-Ddp0lHMA.js} +4 -4
- package/dist/server/assets/{index-CaI_IFFh.js → index-DinEbWse.js} +3 -3
- package/dist/server/assets/{index-Bk2rEXd9.js → index-Dm8dBBAU.js} +2 -2
- package/dist/server/assets/{index-BGD-OYit.js → index-DtlVc4yR.js} +2 -2
- package/dist/server/assets/{index-CsRze8_V.js → index-DzVgMYHM.js} +1 -1
- package/dist/server/assets/{index-Dh-QOcLi.js → index-VEnlzI7K.js} +3 -3
- package/dist/server/assets/{index-4I0NKW9A.js → index-gQzM4HJi.js} +2 -2
- package/dist/server/assets/{index-DlE6TTwo.js → index-joSkjgFP.js} +5 -5
- package/dist/server/assets/{info-VBDWY6EO-CE3Djkbi.js → info-VBDWY6EO-BZp8zZQH.js} +6 -6
- package/dist/server/assets/{infoDiagram-HS3SLOUP-CcvjlamO.js → infoDiagram-HS3SLOUP-CLZPZZt4.js} +5 -5
- package/dist/server/assets/{journeyDiagram-XKPGCS4Q-D1o9zBGm.js → journeyDiagram-XKPGCS4Q-DqIllasj.js} +4 -4
- package/dist/server/assets/{kanban-definition-3W4ZIXB7-CbYt-CCT.js → kanban-definition-3W4ZIXB7-B3yTD6nz.js} +2 -2
- package/dist/server/assets/{layout-hg_ZN_X1.js → layout-DbYj2Jh8.js} +4 -4
- package/dist/server/assets/{mermaid-3ZIDBTTL-B1numrTC.js → mermaid-3ZIDBTTL-Bf-b4R3F.js} +1 -1
- package/dist/server/assets/{mermaid-parser.core-BjIxT260.js → mermaid-parser.core-BPo5KaJR.js} +11 -11
- package/dist/server/assets/{mindmap-definition-VGOIOE7T-s5IHcHtD.js → mindmap-definition-VGOIOE7T-BsUTGWbP.js} +3 -3
- package/dist/server/assets/{packet-DYOGHKS2-CghPtnD0.js → packet-DYOGHKS2-BNRq6Npr.js} +6 -6
- package/dist/server/assets/{pie-VRWISCQL-4ycWjPDl.js → pie-VRWISCQL-Dbo7CqNc.js} +6 -6
- package/dist/server/assets/{pieDiagram-ADFJNKIX-Xc0hpyln.js → pieDiagram-ADFJNKIX-BSiV1fdc.js} +7 -7
- package/dist/server/assets/{quadrantDiagram-AYHSOK5B-CTCsgLnq.js → quadrantDiagram-AYHSOK5B-DzkaSCma.js} +1 -1
- package/dist/server/assets/{radar-ZZBFDIW7-CnRv1HeP.js → radar-ZZBFDIW7-C5pSAtKi.js} +6 -6
- package/dist/server/assets/{requirementDiagram-UZGBJVZJ-6L85o8SZ.js → requirementDiagram-UZGBJVZJ--OE8EeQy.js} +3 -3
- package/dist/server/assets/{router-DbWGQ17k.js → router-D6HwaUre.js} +729 -382
- package/dist/server/assets/{sankeyDiagram-TZEHDZUN-Dtxaeifp.js → sankeyDiagram-TZEHDZUN--_Lp6TNE.js} +1 -1
- package/dist/server/assets/{sequenceDiagram-WL72ISMW-37UL27_4.js → sequenceDiagram-WL72ISMW-Cnkewzyp.js} +3 -3
- package/dist/server/assets/{square-terminal-D4RjbVtI.js → square-terminal-D02AASv1.js} +1 -1
- package/dist/server/assets/{stateDiagram-FKZM4ZOC-Bs7b06Ra.js → stateDiagram-FKZM4ZOC-Rrf6wgHM.js} +8 -8
- package/dist/server/assets/{stateDiagram-v2-4FDKWEC3-DUdtQcpy.js → stateDiagram-v2-4FDKWEC3-CLZxE5q1.js} +4 -4
- package/dist/server/assets/{timeline-definition-IT6M3QCI-C2u2MfVa.js → timeline-definition-IT6M3QCI-CXfT4jgF.js} +2 -2
- package/dist/server/assets/{treemap-GDKQZRPO-CF8Y_9gD.js → treemap-GDKQZRPO-CLL_lvY2.js} +6 -6
- package/dist/server/assets/{workspace._workspaceId-DbDNrvi3.js → workspace._workspaceId-CwFiKcq0.js} +1 -1
- package/dist/server/assets/{workspace._workspaceId-C9ajqro8.js → workspace._workspaceId-DXxXFkGR.js} +3 -3
- package/dist/server/assets/{xychartDiagram-PRI3JC2R-C1IkvLoX.js → xychartDiagram-PRI3JC2R-DPZMWcNA.js} +1 -1
- package/dist/server/server.js +2 -2
- package/dist/start-server.mjs +477 -220
- package/package.json +4 -4
- package/dist/client/assets/DockviewBrowserContainer-DuxWaqHN.js +0 -5
- package/dist/client/assets/DockviewTerminalContainer-BXoPda0X.js +0 -2
- package/dist/client/assets/TerminalPanel-CulmEPyX.js +0 -5
- package/dist/client/assets/channel-Dr0vMA-3.js +0 -1
- package/dist/client/assets/classDiagram-2ON5EDUG-DazWWFRK.js +0 -1
- package/dist/client/assets/classDiagram-v2-WZHVMYZB-DazWWFRK.js +0 -1
- package/dist/client/assets/clone-DLEN27Sv.js +0 -1
- package/dist/client/assets/stateDiagram-v2-4FDKWEC3-DvHwGtBf.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{dM as Oh,dN as xh,da as bd,dw as Dh,de as Mh,db as je,by as Fh,bz as bl,dl as Gh,dp as _d,dq as Id,dm as Uh,dB as _l,bB as Yn,bC as ae,dc as qh,d6 as jh,dO as zh,_ as En}from"./main-Dg3qcN-n.js";import{k as qr,j as tl,g as Hr,S as Bh,w as Wh,x as Vh,c as Pd,v as $e,y as $d,l as Kh,z as Hh,A as Yh,B as Xh,C as Jh,a as Ld,d as q,i as tn,r as Je,f as ht,D as Fe}from"./_baseUniq-840KfAAa.js";import{j as nl,m as M,d as Qh,f as yt,g as jr,h as z,i as rl,l as jn,e as Zh}from"./_basePickBy-K7I344em.js";import{c as Be}from"./clone-DLEN27Sv.js";var ep=Object.prototype,tp=ep.hasOwnProperty,ft=Oh(function(t,e){if(xh(e)||bd(e)){Dh(e,qr(e),t);return}for(var n in e)tp.call(e,n)&&Mh(t,n,e[n])});function Od(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}function ns(t){for(var e=-1,n=t==null?0:t.length,r=0,i=[];++e<n;){var s=t[e];s&&(i[r++]=s)}return i}function np(t,e,n,r){for(var i=-1,s=t==null?0:t.length;++i<s;){var a=t[i];e(r,a,n(a),t)}return r}function rp(t,e,n,r){return tl(t,function(i,s,a){e(r,i,n(i),a)}),r}function ip(t,e){return function(n,r){var i=je(n)?np:rp,s=e?e():{};return i(n,t,Hr(r),s)}}var sp=200;function ap(t,e,n,r){var i=-1,s=Wh,a=!0,o=t.length,c=[],l=e.length;if(!o)return c;e.length>=sp&&(s=Vh,a=!1,e=new Bh(e));e:for(;++i<o;){var u=t[i],f=u;if(u=u!==0?u:0,a&&f===f){for(var m=l;m--;)if(e[m]===f)continue e;c.push(u)}else s(e,f,r)||c.push(u)}return c}var _a=Fh(function(t,e){return bl(t)?ap(t,Pd(e,1,bl,!0)):[]});function Ge(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:nl(e),Od(t,e<0?0:e,r)):[]}function zi(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:nl(e),e=r-e,Od(t,0,e<0?0:e)):[]}function op(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function cp(t,e){var n=!0;return tl(t,function(r,i,s){return n=!!e(r,i,s),n}),n}function kt(t,e,n){var r=je(t)?op:cp;return r(t,Hr(e))}function wt(t){return t&&t.length?t[0]:void 0}function dt(t,e){return Pd(M(t,e))}var lp=Object.prototype,up=lp.hasOwnProperty,dp=ip(function(t,e,n){up.call(t,n)?t[n].push(e):Gh(t,n,[e])}),fp="[object String]";function nt(t){return typeof t=="string"||!je(t)&&_d(t)&&Id(t)==fp}var hp=Math.max;function et(t,e,n,r){t=bd(t)?t:$e(t),n=n?nl(n):0;var i=t.length;return n<0&&(n=hp(i+n,0)),nt(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&$d(t,e,n)>-1}function Il(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=0;return $d(t,e,i)}var pp="[object RegExp]";function mp(t){return _d(t)&&Id(t)==pp}var Pl=_l&&_l.isRegExp,nn=Pl?Uh(Pl):mp,gp="Expected a function";function yp(t){if(typeof t!="function")throw new TypeError(gp);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function Nt(t,e){if(t==null)return{};var n=Kh(Hh(t),function(r){return[r]});return e=Hr(e),Qh(t,n,function(r,i){return e(r,i[0])})}function Ia(t,e){var n=je(t)?Yh:Xh;return n(t,yp(Hr(e)))}function Tp(t,e){var n;return tl(t,function(r,i,s){return n=e(r,i,s),!n}),!!n}function xd(t,e,n){var r=je(t)?Jh:Tp;return r(t,Hr(e))}function il(t){return t&&t.length?Ld(t):[]}function Rp(t,e){return t&&t.length?Ld(t,Hr(e)):[]}function We(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function St(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}function un(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}function vp(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function fi(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}class Dd{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){const n=this.types[e.container.$type];if(!n)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const r=n.properties[e.property]?.referenceType;if(!r)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return r}getTypeMetaData(e){const n=this.types[e];return n||{name:e,properties:{},superTypes:[]}}isInstance(e,n){return We(e)&&this.isSubtype(e.$type,n)}isSubtype(e,n){if(e===n)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});const i=r[n];if(i!==void 0)return i;{const s=this.types[e],a=s?s.superTypes.some(o=>this.isSubtype(o,n)):!1;return r[n]=a,a}}getAllSubTypes(e){const n=this.allSubtypes[e];if(n)return n;{const r=this.getAllTypes(),i=[];for(const s of r)this.isSubtype(s,e)&&i.push(s);return this.allSubtypes[e]=i,i}}}function Bi(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function Md(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function Fd(t){return Bi(t)&&typeof t.fullText=="string"}class Ue{constructor(e,n){this.startFn=e,this.nextFn=n}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let n=0,r=e.next();for(;!r.done;)n++,r=e.next();return n}toArray(){const e=[],n=this.iterator();let r;do r=n.next(),r.value!==void 0&&e.push(r.value);while(!r.done);return e}toSet(){return new Set(this)}toMap(e,n){const r=this.map(i=>[e?e(i):i,n?n(i):i]);return new Map(r)}toString(){return this.join()}concat(e){return new Ue(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),n=>{let r;if(!n.firstDone){do if(r=this.nextFn(n.first),!r.done)return r;while(!r.done);n.firstDone=!0}do if(r=n.iterator.next(),!r.done)return r;while(!r.done);return lt})}join(e=","){const n=this.iterator();let r="",i,s=!1;do i=n.next(),i.done||(s&&(r+=e),r+=Ep(i.value)),s=!0;while(!i.done);return r}indexOf(e,n=0){const r=this.iterator();let i=0,s=r.next();for(;!s.done;){if(i>=n&&s.value===e)return i;s=r.next(),i++}return-1}every(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(!e(r.value))return!1;r=n.next()}return!0}some(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return!0;r=n.next()}return!1}forEach(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;)e(i.value,r),i=n.next(),r++}map(e){return new Ue(this.startFn,n=>{const{done:r,value:i}=this.nextFn(n);return r?lt:{done:!1,value:e(i)}})}filter(e){return new Ue(this.startFn,n=>{let r;do if(r=this.nextFn(n),!r.done&&e(r.value))return r;while(!r.done);return lt})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,n){const r=this.iterator();let i=n,s=r.next();for(;!s.done;)i===void 0?i=s.value:i=e(i,s.value),s=r.next();return i}reduceRight(e,n){return this.recursiveReduce(this.iterator(),e,n)}recursiveReduce(e,n,r){const i=e.next();if(i.done)return r;const s=this.recursiveReduce(e,n,r);return s===void 0?i.value:n(s,i.value)}find(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return r.value;r=n.next()}}findIndex(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;){if(e(i.value))return r;i=n.next(),r++}return-1}includes(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(r.value===e)return!0;r=n.next()}return!1}flatMap(e){return new Ue(()=>({this:this.startFn()}),n=>{do{if(n.iterator){const s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}const{done:r,value:i}=this.nextFn(n.this);if(!r){const s=e(i);if(aa(s))n.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(n.iterator);return lt})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const n=e>1?this.flat(e-1):this;return new Ue(()=>({this:n.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:i,value:s}=n.nextFn(r.this);if(!i)if(aa(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(r.iterator);return lt})}head(){const n=this.iterator().next();if(!n.done)return n.value}tail(e=1){return new Ue(()=>{const n=this.startFn();for(let r=0;r<e;r++)if(this.nextFn(n).done)return n;return n},this.nextFn)}limit(e){return new Ue(()=>({size:0,state:this.startFn()}),n=>(n.size++,n.size>e?lt:this.nextFn(n.state)))}distinct(e){return new Ue(()=>({set:new Set,internalState:this.startFn()}),n=>{let r;do if(r=this.nextFn(n.internalState),!r.done){const i=e?e(r.value):r.value;if(!n.set.has(i))return n.set.add(i),r}while(!r.done);return lt})}exclude(e,n){const r=new Set;for(const i of e){const s=n?n(i):i;r.add(s)}return this.filter(i=>{const s=n?n(i):i;return!r.has(s)})}}function Ep(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function aa(t){return!!t&&typeof t[Symbol.iterator]=="function"}const Gd=new Ue(()=>{},()=>lt),lt=Object.freeze({done:!0,value:void 0});function me(...t){if(t.length===1){const e=t[0];if(e instanceof Ue)return e;if(aa(e))return new Ue(()=>e[Symbol.iterator](),n=>n.next());if(typeof e.length=="number")return new Ue(()=>({index:0}),n=>n.index<e.length?{done:!1,value:e[n.index++]}:lt)}return t.length>1?new Ue(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const n=e.iterator.next();if(!n.done)return n;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){const n=t[e.collIndex++];aa(n)?e.iterator=n[Symbol.iterator]():n&&typeof n.length=="number"&&(e.array=n)}}while(e.iterator||e.array||e.collIndex<t.length);return lt}):Gd}class sl extends Ue{constructor(e,n,r){super(()=>({iterators:r?.includeRoot?[[e][Symbol.iterator]()]:[n(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const a=i.iterators[i.iterators.length-1].next();if(a.done)i.iterators.pop();else return i.iterators.push(n(a.value)[Symbol.iterator]()),a}return lt})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var To;(function(t){function e(s){return s.reduce((a,o)=>a+o,0)}t.sum=e;function n(s){return s.reduce((a,o)=>a*o,0)}t.product=n;function r(s){return s.reduce((a,o)=>Math.min(a,o))}t.min=r;function i(s){return s.reduce((a,o)=>Math.max(a,o))}t.max=i})(To||(To={}));function Ro(t,e={}){for(const[n,r]of Object.entries(t))n.startsWith("$")||(Array.isArray(r)?r.forEach((i,s)=>{We(i)&&(i.$container=t,i.$containerProperty=n,i.$containerIndex=s,e.deep&&Ro(i,e))}):We(r)&&(r.$container=t,r.$containerProperty=n,e.deep&&Ro(r,e)))}function Pa(t,e){let n=t;for(;n;){if(e(n))return n;n=n.$container}}function Qt(t){const n=Ws(t).$document;if(!n)throw new Error("AST node has no document.");return n}function Ws(t){for(;t.$container;)t=t.$container;return t}function $l(t){return St(t)?t.ref?[t.ref]:[]:un(t)?t.items.map(e=>e.ref):[]}function al(t,e){if(!t)throw new Error("Node must be an AstNode.");const n=e?.range;return new Ue(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),r=>{for(;r.keyIndex<r.keys.length;){const i=r.keys[r.keyIndex];if(!i.startsWith("$")){const s=t[i];if(We(s)){if(r.keyIndex++,Ll(s,n))return{done:!1,value:s}}else if(Array.isArray(s)){for(;r.arrayIndex<s.length;){const a=r.arrayIndex++,o=s[a];if(We(o)&&Ll(o,n))return{done:!1,value:o}}r.arrayIndex=0}}r.keyIndex++}return lt})}function rs(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new sl(t,n=>al(n,e))}function Zt(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new sl(t,n=>al(n,e),{includeRoot:!0})}function Ll(t,e){if(!e)return!0;const n=t.$cstNode?.range;return n?Bp(n,e):!1}function oa(t){return new Ue(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const n=e.keys[e.keyIndex];if(!n.startsWith("$")){const r=t[n];if(St(r)||un(r))return e.keyIndex++,{done:!1,value:{reference:r,container:t,property:n}};if(Array.isArray(r)){for(;e.arrayIndex<r.length;){const i=e.arrayIndex++,s=r[i];if(St(s)||un(r))return{done:!1,value:{reference:s,container:t,property:n,index:i}}}e.arrayIndex=0}}e.keyIndex++}return lt})}function Ap(t,e){const n=t.getTypeMetaData(e.$type),r=e;for(const i of Object.values(n.properties))i.defaultValue!==void 0&&r[i.name]===void 0&&(r[i.name]=Ud(i.defaultValue))}function Ud(t){return Array.isArray(t)?[...t.map(Ud)]:t}const ct={$type:"AbstractElement",cardinality:"cardinality"};function Sp(t){return ee.isInstance(t,ct.$type)}const Vs={$type:"AbstractParserRule"};function is(t){return ee.isInstance(t,Vs.$type)}const Is={$type:"AbstractRule"},Et={$type:"AbstractType"},On={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function $a(t){return ee.isInstance(t,On.$type)}const Ks={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function qd(t){return ee.isInstance(t,Ks.$type)}const Ol={$type:"ArrayLiteral",elements:"elements"},xl={$type:"ArrayType",elementType:"elementType"},xn={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function zn(t){return ee.isInstance(t,xn.$type)}const vo={$type:"BooleanLiteral",true:"true"};function kp(t){return ee.isInstance(t,vo.$type)}const Dn={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function Cp(t){return ee.isInstance(t,Dn.$type)}const nr={$type:"Condition"},Hs={$type:"Conjunction",left:"left",right:"right"};function wp(t){return ee.isInstance(t,Hs.$type)}const Mn={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function La(t){return ee.isInstance(t,Mn.$type)}const Ys={$type:"Disjunction",left:"left",right:"right"};function Np(t){return ee.isInstance(t,Ys.$type)}const Eo={$type:"EndOfFile",cardinality:"cardinality"};function bp(t){return ee.isInstance(t,Eo.$type)}const An={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},Dl={$type:"GrammarImport",path:"path"},cr={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function ol(t){return ee.isInstance(t,cr.$type)}const Ao={$type:"InferredType",name:"name"};function jd(t){return ee.isInstance(t,Ao.$type)}const Vt={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function ca(t){return ee.isInstance(t,Vt.$type)}const Ka={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},Ml={$type:"InfixRuleOperators",precedences:"precedences"},Li={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function _p(t){return ee.isInstance(t,Li.$type)}const Oi={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function Bn(t){return ee.isInstance(t,Oi.$type)}const Ps={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},lr={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Ip(t){return ee.isInstance(t,lr.$type)}const So={$type:"Negation",value:"value"};function Pp(t){return ee.isInstance(t,So.$type)}const Fl={$type:"NumberLiteral",value:"value"},$s={$type:"Parameter",name:"name"},ko={$type:"ParameterReference",parameter:"parameter"};function $p(t){return ee.isInstance(t,ko.$type)}const Pt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function sn(t){return ee.isInstance(t,Pt.$type)}const Ha={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},ur={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function Lp(t){return ee.isInstance(t,ur.$type)}const Co={$type:"ReturnType",name:"name"};function Op(t){return ee.isInstance(t,Co.$type)}const dr={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function Wn(t){return ee.isInstance(t,dr.$type)}const xi={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function xp(t){return ee.isInstance(t,xi.$type)}const Gl={$type:"StringLiteral",value:"value"},fr={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Dp(t){return ee.isInstance(t,fr.$type)}const gt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},hr={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Mp(t){return ee.isInstance(t,hr.$type)}const ln={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function an(t){return ee.isInstance(t,ln.$type)}const pr={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function Fp(t){return ee.isInstance(t,pr.$type)}const Xs={$type:"Type",name:"name",type:"type"};function Gp(t){return ee.isInstance(t,Xs.$type)}const hi={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},pi={$type:"TypeDefinition"},Ul={$type:"UnionType",types:"types"},Js={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function zd(t){return ee.isInstance(t,Js.$type)}const mr={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Up(t){return ee.isInstance(t,mr.$type)}const mi={$type:"ValueLiteral"},Di={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function qp(t){return ee.isInstance(t,Di.$type)}class Bd extends Dd{constructor(){super(...arguments),this.types={AbstractElement:{name:ct.$type,properties:{cardinality:{name:ct.cardinality}},superTypes:[]},AbstractParserRule:{name:Vs.$type,properties:{},superTypes:[Is.$type,Et.$type]},AbstractRule:{name:Is.$type,properties:{},superTypes:[]},AbstractType:{name:Et.$type,properties:{},superTypes:[]},Action:{name:On.$type,properties:{cardinality:{name:On.cardinality},feature:{name:On.feature},inferredType:{name:On.inferredType},operator:{name:On.operator},type:{name:On.type,referenceType:Et.$type}},superTypes:[ct.$type]},Alternatives:{name:Ks.$type,properties:{cardinality:{name:Ks.cardinality},elements:{name:Ks.elements,defaultValue:[]}},superTypes:[ct.$type]},ArrayLiteral:{name:Ol.$type,properties:{elements:{name:Ol.elements,defaultValue:[]}},superTypes:[mi.$type]},ArrayType:{name:xl.$type,properties:{elementType:{name:xl.elementType}},superTypes:[pi.$type]},Assignment:{name:xn.$type,properties:{cardinality:{name:xn.cardinality},feature:{name:xn.feature},operator:{name:xn.operator},predicate:{name:xn.predicate},terminal:{name:xn.terminal}},superTypes:[ct.$type]},BooleanLiteral:{name:vo.$type,properties:{true:{name:vo.true,defaultValue:!1}},superTypes:[nr.$type,mi.$type]},CharacterRange:{name:Dn.$type,properties:{cardinality:{name:Dn.cardinality},left:{name:Dn.left},lookahead:{name:Dn.lookahead},parenthesized:{name:Dn.parenthesized,defaultValue:!1},right:{name:Dn.right}},superTypes:[gt.$type]},Condition:{name:nr.$type,properties:{},superTypes:[]},Conjunction:{name:Hs.$type,properties:{left:{name:Hs.left},right:{name:Hs.right}},superTypes:[nr.$type]},CrossReference:{name:Mn.$type,properties:{cardinality:{name:Mn.cardinality},deprecatedSyntax:{name:Mn.deprecatedSyntax,defaultValue:!1},isMulti:{name:Mn.isMulti,defaultValue:!1},terminal:{name:Mn.terminal},type:{name:Mn.type,referenceType:Et.$type}},superTypes:[ct.$type]},Disjunction:{name:Ys.$type,properties:{left:{name:Ys.left},right:{name:Ys.right}},superTypes:[nr.$type]},EndOfFile:{name:Eo.$type,properties:{cardinality:{name:Eo.cardinality}},superTypes:[ct.$type]},Grammar:{name:An.$type,properties:{imports:{name:An.imports,defaultValue:[]},interfaces:{name:An.interfaces,defaultValue:[]},isDeclared:{name:An.isDeclared,defaultValue:!1},name:{name:An.name},rules:{name:An.rules,defaultValue:[]},types:{name:An.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Dl.$type,properties:{path:{name:Dl.path}},superTypes:[]},Group:{name:cr.$type,properties:{cardinality:{name:cr.cardinality},elements:{name:cr.elements,defaultValue:[]},guardCondition:{name:cr.guardCondition},predicate:{name:cr.predicate}},superTypes:[ct.$type]},InferredType:{name:Ao.$type,properties:{name:{name:Ao.name}},superTypes:[Et.$type]},InfixRule:{name:Vt.$type,properties:{call:{name:Vt.call},dataType:{name:Vt.dataType},inferredType:{name:Vt.inferredType},name:{name:Vt.name},operators:{name:Vt.operators},parameters:{name:Vt.parameters,defaultValue:[]},returnType:{name:Vt.returnType,referenceType:Et.$type}},superTypes:[Vs.$type]},InfixRuleOperatorList:{name:Ka.$type,properties:{associativity:{name:Ka.associativity},operators:{name:Ka.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Ml.$type,properties:{precedences:{name:Ml.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Li.$type,properties:{attributes:{name:Li.attributes,defaultValue:[]},name:{name:Li.name},superTypes:{name:Li.superTypes,defaultValue:[],referenceType:Et.$type}},superTypes:[Et.$type]},Keyword:{name:Oi.$type,properties:{cardinality:{name:Oi.cardinality},predicate:{name:Oi.predicate},value:{name:Oi.value}},superTypes:[ct.$type]},NamedArgument:{name:Ps.$type,properties:{calledByName:{name:Ps.calledByName,defaultValue:!1},parameter:{name:Ps.parameter,referenceType:$s.$type},value:{name:Ps.value}},superTypes:[]},NegatedToken:{name:lr.$type,properties:{cardinality:{name:lr.cardinality},lookahead:{name:lr.lookahead},parenthesized:{name:lr.parenthesized,defaultValue:!1},terminal:{name:lr.terminal}},superTypes:[gt.$type]},Negation:{name:So.$type,properties:{value:{name:So.value}},superTypes:[nr.$type]},NumberLiteral:{name:Fl.$type,properties:{value:{name:Fl.value}},superTypes:[mi.$type]},Parameter:{name:$s.$type,properties:{name:{name:$s.name}},superTypes:[]},ParameterReference:{name:ko.$type,properties:{parameter:{name:ko.parameter,referenceType:$s.$type}},superTypes:[nr.$type]},ParserRule:{name:Pt.$type,properties:{dataType:{name:Pt.dataType},definition:{name:Pt.definition},entry:{name:Pt.entry,defaultValue:!1},fragment:{name:Pt.fragment,defaultValue:!1},inferredType:{name:Pt.inferredType},name:{name:Pt.name},parameters:{name:Pt.parameters,defaultValue:[]},returnType:{name:Pt.returnType,referenceType:Et.$type}},superTypes:[Vs.$type]},ReferenceType:{name:Ha.$type,properties:{isMulti:{name:Ha.isMulti,defaultValue:!1},referenceType:{name:Ha.referenceType}},superTypes:[pi.$type]},RegexToken:{name:ur.$type,properties:{cardinality:{name:ur.cardinality},lookahead:{name:ur.lookahead},parenthesized:{name:ur.parenthesized,defaultValue:!1},regex:{name:ur.regex}},superTypes:[gt.$type]},ReturnType:{name:Co.$type,properties:{name:{name:Co.name}},superTypes:[]},RuleCall:{name:dr.$type,properties:{arguments:{name:dr.arguments,defaultValue:[]},cardinality:{name:dr.cardinality},predicate:{name:dr.predicate},rule:{name:dr.rule,referenceType:Is.$type}},superTypes:[ct.$type]},SimpleType:{name:xi.$type,properties:{primitiveType:{name:xi.primitiveType},stringType:{name:xi.stringType},typeRef:{name:xi.typeRef,referenceType:Et.$type}},superTypes:[pi.$type]},StringLiteral:{name:Gl.$type,properties:{value:{name:Gl.value}},superTypes:[mi.$type]},TerminalAlternatives:{name:fr.$type,properties:{cardinality:{name:fr.cardinality},elements:{name:fr.elements,defaultValue:[]},lookahead:{name:fr.lookahead},parenthesized:{name:fr.parenthesized,defaultValue:!1}},superTypes:[gt.$type]},TerminalElement:{name:gt.$type,properties:{cardinality:{name:gt.cardinality},lookahead:{name:gt.lookahead},parenthesized:{name:gt.parenthesized,defaultValue:!1}},superTypes:[ct.$type]},TerminalGroup:{name:hr.$type,properties:{cardinality:{name:hr.cardinality},elements:{name:hr.elements,defaultValue:[]},lookahead:{name:hr.lookahead},parenthesized:{name:hr.parenthesized,defaultValue:!1}},superTypes:[gt.$type]},TerminalRule:{name:ln.$type,properties:{definition:{name:ln.definition},fragment:{name:ln.fragment,defaultValue:!1},hidden:{name:ln.hidden,defaultValue:!1},name:{name:ln.name},type:{name:ln.type}},superTypes:[Is.$type]},TerminalRuleCall:{name:pr.$type,properties:{cardinality:{name:pr.cardinality},lookahead:{name:pr.lookahead},parenthesized:{name:pr.parenthesized,defaultValue:!1},rule:{name:pr.rule,referenceType:ln.$type}},superTypes:[gt.$type]},Type:{name:Xs.$type,properties:{name:{name:Xs.name},type:{name:Xs.type}},superTypes:[Et.$type]},TypeAttribute:{name:hi.$type,properties:{defaultValue:{name:hi.defaultValue},isOptional:{name:hi.isOptional,defaultValue:!1},name:{name:hi.name},type:{name:hi.type}},superTypes:[]},TypeDefinition:{name:pi.$type,properties:{},superTypes:[]},UnionType:{name:Ul.$type,properties:{types:{name:Ul.types,defaultValue:[]}},superTypes:[pi.$type]},UnorderedGroup:{name:Js.$type,properties:{cardinality:{name:Js.cardinality},elements:{name:Js.elements,defaultValue:[]}},superTypes:[ct.$type]},UntilToken:{name:mr.$type,properties:{cardinality:{name:mr.cardinality},lookahead:{name:mr.lookahead},parenthesized:{name:mr.parenthesized,defaultValue:!1},terminal:{name:mr.terminal}},superTypes:[gt.$type]},ValueLiteral:{name:mi.$type,properties:{},superTypes:[]},Wildcard:{name:Di.$type,properties:{cardinality:{name:Di.cardinality},lookahead:{name:Di.lookahead},parenthesized:{name:Di.parenthesized,defaultValue:!1}},superTypes:[gt.$type]}}}}const ee=new Bd;function wo(t){return new sl(t,e=>Bi(e)?e.content:[],{includeRoot:!0})}function jp(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function No(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function la(t){if(!t)return;const{offset:e,end:n,range:r}=t;return{range:r,offset:e,end:n,length:n-e}}var Xt;(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"})(Xt||(Xt={}));function zp(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return Xt.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return Xt.After;const n=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,r=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return n&&r?Xt.Inside:n?Xt.OverlapBack:r?Xt.OverlapFront:Xt.Outside}function Bp(t,e){return zp(t,e)>Xt.After}const Wp=/^[\w\p{L}]$/u;function Vp(t,e){if(t){const n=Kp(t,!0);if(n&&ql(n,e))return n;if(Fd(t)){const r=t.content.findIndex(i=>!i.hidden);for(let i=r-1;i>=0;i--){const s=t.content[i];if(ql(s,e))return s}}}}function ql(t,e){return Md(t)&&e.includes(t.tokenType.name)}function Kp(t,e=!0){for(;t.container;){const n=t.container;let r=n.content.indexOf(t);for(;r>0;){r--;const i=n.content[r];if(e||!i.hidden)return i}t=n}}class Wd extends Error{constructor(e,n){super(e?`${n} at ${e.range.start.line}:${e.range.start.character}`:n)}}function ss(t,e="Error: Got unexpected value."){throw new Error(e)}function W(t){return t.charCodeAt(0)}function Ya(t,e){Array.isArray(t)?t.forEach(function(n){e.push(n)}):e.push(t)}function gi(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function rr(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function Hp(){throw Error("Internal Error - Should never get here!")}function jl(t){return t.type==="Character"}const ua=[];for(let t=W("0");t<=W("9");t++)ua.push(t);const da=[W("_")].concat(ua);for(let t=W("a");t<=W("z");t++)da.push(t);for(let t=W("A");t<=W("Z");t++)da.push(t);const zl=[W(" "),W("\f"),W(`
|
|
1
|
+
import{dN as Oh,dO as xh,db as bd,dx as Dh,df as Mh,dc as je,by as Fh,bz as bl,dm as Gh,dq as _d,dr as Id,dn as Uh,dC as _l,bB as Yn,bC as ae,dd as qh,d7 as jh,dP as zh,_ as En}from"./main-p2Lo-pWV.js";import{k as qr,j as tl,g as Hr,S as Bh,w as Wh,x as Vh,c as Pd,v as $e,y as $d,l as Kh,z as Hh,A as Yh,B as Xh,C as Jh,a as Ld,d as q,i as tn,r as Je,f as ht,D as Fe}from"./_baseUniq-BJUkdL_v.js";import{j as nl,m as M,d as Qh,f as yt,g as jr,h as z,i as rl,l as jn,e as Zh}from"./_basePickBy-DtyMrmhl.js";import{c as Be}from"./clone-Cl7gVEL3.js";var ep=Object.prototype,tp=ep.hasOwnProperty,ft=Oh(function(t,e){if(xh(e)||bd(e)){Dh(e,qr(e),t);return}for(var n in e)tp.call(e,n)&&Mh(t,n,e[n])});function Od(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}function ns(t){for(var e=-1,n=t==null?0:t.length,r=0,i=[];++e<n;){var s=t[e];s&&(i[r++]=s)}return i}function np(t,e,n,r){for(var i=-1,s=t==null?0:t.length;++i<s;){var a=t[i];e(r,a,n(a),t)}return r}function rp(t,e,n,r){return tl(t,function(i,s,a){e(r,i,n(i),a)}),r}function ip(t,e){return function(n,r){var i=je(n)?np:rp,s=e?e():{};return i(n,t,Hr(r),s)}}var sp=200;function ap(t,e,n,r){var i=-1,s=Wh,a=!0,o=t.length,c=[],l=e.length;if(!o)return c;e.length>=sp&&(s=Vh,a=!1,e=new Bh(e));e:for(;++i<o;){var u=t[i],f=u;if(u=u!==0?u:0,a&&f===f){for(var m=l;m--;)if(e[m]===f)continue e;c.push(u)}else s(e,f,r)||c.push(u)}return c}var _a=Fh(function(t,e){return bl(t)?ap(t,Pd(e,1,bl,!0)):[]});function Ge(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:nl(e),Od(t,e<0?0:e,r)):[]}function zi(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:nl(e),e=r-e,Od(t,0,e<0?0:e)):[]}function op(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function cp(t,e){var n=!0;return tl(t,function(r,i,s){return n=!!e(r,i,s),n}),n}function kt(t,e,n){var r=je(t)?op:cp;return r(t,Hr(e))}function wt(t){return t&&t.length?t[0]:void 0}function dt(t,e){return Pd(M(t,e))}var lp=Object.prototype,up=lp.hasOwnProperty,dp=ip(function(t,e,n){up.call(t,n)?t[n].push(e):Gh(t,n,[e])}),fp="[object String]";function nt(t){return typeof t=="string"||!je(t)&&_d(t)&&Id(t)==fp}var hp=Math.max;function et(t,e,n,r){t=bd(t)?t:$e(t),n=n?nl(n):0;var i=t.length;return n<0&&(n=hp(i+n,0)),nt(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&$d(t,e,n)>-1}function Il(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=0;return $d(t,e,i)}var pp="[object RegExp]";function mp(t){return _d(t)&&Id(t)==pp}var Pl=_l&&_l.isRegExp,nn=Pl?Uh(Pl):mp,gp="Expected a function";function yp(t){if(typeof t!="function")throw new TypeError(gp);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function Nt(t,e){if(t==null)return{};var n=Kh(Hh(t),function(r){return[r]});return e=Hr(e),Qh(t,n,function(r,i){return e(r,i[0])})}function Ia(t,e){var n=je(t)?Yh:Xh;return n(t,yp(Hr(e)))}function Tp(t,e){var n;return tl(t,function(r,i,s){return n=e(r,i,s),!n}),!!n}function xd(t,e,n){var r=je(t)?Jh:Tp;return r(t,Hr(e))}function il(t){return t&&t.length?Ld(t):[]}function Rp(t,e){return t&&t.length?Ld(t,Hr(e)):[]}function We(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function St(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}function un(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}function vp(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function fi(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}class Dd{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){const n=this.types[e.container.$type];if(!n)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const r=n.properties[e.property]?.referenceType;if(!r)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return r}getTypeMetaData(e){const n=this.types[e];return n||{name:e,properties:{},superTypes:[]}}isInstance(e,n){return We(e)&&this.isSubtype(e.$type,n)}isSubtype(e,n){if(e===n)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});const i=r[n];if(i!==void 0)return i;{const s=this.types[e],a=s?s.superTypes.some(o=>this.isSubtype(o,n)):!1;return r[n]=a,a}}getAllSubTypes(e){const n=this.allSubtypes[e];if(n)return n;{const r=this.getAllTypes(),i=[];for(const s of r)this.isSubtype(s,e)&&i.push(s);return this.allSubtypes[e]=i,i}}}function Bi(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function Md(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function Fd(t){return Bi(t)&&typeof t.fullText=="string"}class Ue{constructor(e,n){this.startFn=e,this.nextFn=n}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let n=0,r=e.next();for(;!r.done;)n++,r=e.next();return n}toArray(){const e=[],n=this.iterator();let r;do r=n.next(),r.value!==void 0&&e.push(r.value);while(!r.done);return e}toSet(){return new Set(this)}toMap(e,n){const r=this.map(i=>[e?e(i):i,n?n(i):i]);return new Map(r)}toString(){return this.join()}concat(e){return new Ue(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),n=>{let r;if(!n.firstDone){do if(r=this.nextFn(n.first),!r.done)return r;while(!r.done);n.firstDone=!0}do if(r=n.iterator.next(),!r.done)return r;while(!r.done);return lt})}join(e=","){const n=this.iterator();let r="",i,s=!1;do i=n.next(),i.done||(s&&(r+=e),r+=Ep(i.value)),s=!0;while(!i.done);return r}indexOf(e,n=0){const r=this.iterator();let i=0,s=r.next();for(;!s.done;){if(i>=n&&s.value===e)return i;s=r.next(),i++}return-1}every(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(!e(r.value))return!1;r=n.next()}return!0}some(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return!0;r=n.next()}return!1}forEach(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;)e(i.value,r),i=n.next(),r++}map(e){return new Ue(this.startFn,n=>{const{done:r,value:i}=this.nextFn(n);return r?lt:{done:!1,value:e(i)}})}filter(e){return new Ue(this.startFn,n=>{let r;do if(r=this.nextFn(n),!r.done&&e(r.value))return r;while(!r.done);return lt})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,n){const r=this.iterator();let i=n,s=r.next();for(;!s.done;)i===void 0?i=s.value:i=e(i,s.value),s=r.next();return i}reduceRight(e,n){return this.recursiveReduce(this.iterator(),e,n)}recursiveReduce(e,n,r){const i=e.next();if(i.done)return r;const s=this.recursiveReduce(e,n,r);return s===void 0?i.value:n(s,i.value)}find(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return r.value;r=n.next()}}findIndex(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;){if(e(i.value))return r;i=n.next(),r++}return-1}includes(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(r.value===e)return!0;r=n.next()}return!1}flatMap(e){return new Ue(()=>({this:this.startFn()}),n=>{do{if(n.iterator){const s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}const{done:r,value:i}=this.nextFn(n.this);if(!r){const s=e(i);if(aa(s))n.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(n.iterator);return lt})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const n=e>1?this.flat(e-1):this;return new Ue(()=>({this:n.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:i,value:s}=n.nextFn(r.this);if(!i)if(aa(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(r.iterator);return lt})}head(){const n=this.iterator().next();if(!n.done)return n.value}tail(e=1){return new Ue(()=>{const n=this.startFn();for(let r=0;r<e;r++)if(this.nextFn(n).done)return n;return n},this.nextFn)}limit(e){return new Ue(()=>({size:0,state:this.startFn()}),n=>(n.size++,n.size>e?lt:this.nextFn(n.state)))}distinct(e){return new Ue(()=>({set:new Set,internalState:this.startFn()}),n=>{let r;do if(r=this.nextFn(n.internalState),!r.done){const i=e?e(r.value):r.value;if(!n.set.has(i))return n.set.add(i),r}while(!r.done);return lt})}exclude(e,n){const r=new Set;for(const i of e){const s=n?n(i):i;r.add(s)}return this.filter(i=>{const s=n?n(i):i;return!r.has(s)})}}function Ep(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function aa(t){return!!t&&typeof t[Symbol.iterator]=="function"}const Gd=new Ue(()=>{},()=>lt),lt=Object.freeze({done:!0,value:void 0});function me(...t){if(t.length===1){const e=t[0];if(e instanceof Ue)return e;if(aa(e))return new Ue(()=>e[Symbol.iterator](),n=>n.next());if(typeof e.length=="number")return new Ue(()=>({index:0}),n=>n.index<e.length?{done:!1,value:e[n.index++]}:lt)}return t.length>1?new Ue(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const n=e.iterator.next();if(!n.done)return n;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){const n=t[e.collIndex++];aa(n)?e.iterator=n[Symbol.iterator]():n&&typeof n.length=="number"&&(e.array=n)}}while(e.iterator||e.array||e.collIndex<t.length);return lt}):Gd}class sl extends Ue{constructor(e,n,r){super(()=>({iterators:r?.includeRoot?[[e][Symbol.iterator]()]:[n(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const a=i.iterators[i.iterators.length-1].next();if(a.done)i.iterators.pop();else return i.iterators.push(n(a.value)[Symbol.iterator]()),a}return lt})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var To;(function(t){function e(s){return s.reduce((a,o)=>a+o,0)}t.sum=e;function n(s){return s.reduce((a,o)=>a*o,0)}t.product=n;function r(s){return s.reduce((a,o)=>Math.min(a,o))}t.min=r;function i(s){return s.reduce((a,o)=>Math.max(a,o))}t.max=i})(To||(To={}));function Ro(t,e={}){for(const[n,r]of Object.entries(t))n.startsWith("$")||(Array.isArray(r)?r.forEach((i,s)=>{We(i)&&(i.$container=t,i.$containerProperty=n,i.$containerIndex=s,e.deep&&Ro(i,e))}):We(r)&&(r.$container=t,r.$containerProperty=n,e.deep&&Ro(r,e)))}function Pa(t,e){let n=t;for(;n;){if(e(n))return n;n=n.$container}}function Qt(t){const n=Ws(t).$document;if(!n)throw new Error("AST node has no document.");return n}function Ws(t){for(;t.$container;)t=t.$container;return t}function $l(t){return St(t)?t.ref?[t.ref]:[]:un(t)?t.items.map(e=>e.ref):[]}function al(t,e){if(!t)throw new Error("Node must be an AstNode.");const n=e?.range;return new Ue(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),r=>{for(;r.keyIndex<r.keys.length;){const i=r.keys[r.keyIndex];if(!i.startsWith("$")){const s=t[i];if(We(s)){if(r.keyIndex++,Ll(s,n))return{done:!1,value:s}}else if(Array.isArray(s)){for(;r.arrayIndex<s.length;){const a=r.arrayIndex++,o=s[a];if(We(o)&&Ll(o,n))return{done:!1,value:o}}r.arrayIndex=0}}r.keyIndex++}return lt})}function rs(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new sl(t,n=>al(n,e))}function Zt(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new sl(t,n=>al(n,e),{includeRoot:!0})}function Ll(t,e){if(!e)return!0;const n=t.$cstNode?.range;return n?Bp(n,e):!1}function oa(t){return new Ue(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const n=e.keys[e.keyIndex];if(!n.startsWith("$")){const r=t[n];if(St(r)||un(r))return e.keyIndex++,{done:!1,value:{reference:r,container:t,property:n}};if(Array.isArray(r)){for(;e.arrayIndex<r.length;){const i=e.arrayIndex++,s=r[i];if(St(s)||un(r))return{done:!1,value:{reference:s,container:t,property:n,index:i}}}e.arrayIndex=0}}e.keyIndex++}return lt})}function Ap(t,e){const n=t.getTypeMetaData(e.$type),r=e;for(const i of Object.values(n.properties))i.defaultValue!==void 0&&r[i.name]===void 0&&(r[i.name]=Ud(i.defaultValue))}function Ud(t){return Array.isArray(t)?[...t.map(Ud)]:t}const ct={$type:"AbstractElement",cardinality:"cardinality"};function Sp(t){return ee.isInstance(t,ct.$type)}const Vs={$type:"AbstractParserRule"};function is(t){return ee.isInstance(t,Vs.$type)}const Is={$type:"AbstractRule"},Et={$type:"AbstractType"},On={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function $a(t){return ee.isInstance(t,On.$type)}const Ks={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function qd(t){return ee.isInstance(t,Ks.$type)}const Ol={$type:"ArrayLiteral",elements:"elements"},xl={$type:"ArrayType",elementType:"elementType"},xn={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function zn(t){return ee.isInstance(t,xn.$type)}const vo={$type:"BooleanLiteral",true:"true"};function kp(t){return ee.isInstance(t,vo.$type)}const Dn={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function Cp(t){return ee.isInstance(t,Dn.$type)}const nr={$type:"Condition"},Hs={$type:"Conjunction",left:"left",right:"right"};function wp(t){return ee.isInstance(t,Hs.$type)}const Mn={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function La(t){return ee.isInstance(t,Mn.$type)}const Ys={$type:"Disjunction",left:"left",right:"right"};function Np(t){return ee.isInstance(t,Ys.$type)}const Eo={$type:"EndOfFile",cardinality:"cardinality"};function bp(t){return ee.isInstance(t,Eo.$type)}const An={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},Dl={$type:"GrammarImport",path:"path"},cr={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function ol(t){return ee.isInstance(t,cr.$type)}const Ao={$type:"InferredType",name:"name"};function jd(t){return ee.isInstance(t,Ao.$type)}const Vt={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function ca(t){return ee.isInstance(t,Vt.$type)}const Ka={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},Ml={$type:"InfixRuleOperators",precedences:"precedences"},Li={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function _p(t){return ee.isInstance(t,Li.$type)}const Oi={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function Bn(t){return ee.isInstance(t,Oi.$type)}const Ps={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},lr={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Ip(t){return ee.isInstance(t,lr.$type)}const So={$type:"Negation",value:"value"};function Pp(t){return ee.isInstance(t,So.$type)}const Fl={$type:"NumberLiteral",value:"value"},$s={$type:"Parameter",name:"name"},ko={$type:"ParameterReference",parameter:"parameter"};function $p(t){return ee.isInstance(t,ko.$type)}const Pt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function sn(t){return ee.isInstance(t,Pt.$type)}const Ha={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},ur={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function Lp(t){return ee.isInstance(t,ur.$type)}const Co={$type:"ReturnType",name:"name"};function Op(t){return ee.isInstance(t,Co.$type)}const dr={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function Wn(t){return ee.isInstance(t,dr.$type)}const xi={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function xp(t){return ee.isInstance(t,xi.$type)}const Gl={$type:"StringLiteral",value:"value"},fr={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Dp(t){return ee.isInstance(t,fr.$type)}const gt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},hr={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Mp(t){return ee.isInstance(t,hr.$type)}const ln={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function an(t){return ee.isInstance(t,ln.$type)}const pr={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function Fp(t){return ee.isInstance(t,pr.$type)}const Xs={$type:"Type",name:"name",type:"type"};function Gp(t){return ee.isInstance(t,Xs.$type)}const hi={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},pi={$type:"TypeDefinition"},Ul={$type:"UnionType",types:"types"},Js={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function zd(t){return ee.isInstance(t,Js.$type)}const mr={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Up(t){return ee.isInstance(t,mr.$type)}const mi={$type:"ValueLiteral"},Di={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function qp(t){return ee.isInstance(t,Di.$type)}class Bd extends Dd{constructor(){super(...arguments),this.types={AbstractElement:{name:ct.$type,properties:{cardinality:{name:ct.cardinality}},superTypes:[]},AbstractParserRule:{name:Vs.$type,properties:{},superTypes:[Is.$type,Et.$type]},AbstractRule:{name:Is.$type,properties:{},superTypes:[]},AbstractType:{name:Et.$type,properties:{},superTypes:[]},Action:{name:On.$type,properties:{cardinality:{name:On.cardinality},feature:{name:On.feature},inferredType:{name:On.inferredType},operator:{name:On.operator},type:{name:On.type,referenceType:Et.$type}},superTypes:[ct.$type]},Alternatives:{name:Ks.$type,properties:{cardinality:{name:Ks.cardinality},elements:{name:Ks.elements,defaultValue:[]}},superTypes:[ct.$type]},ArrayLiteral:{name:Ol.$type,properties:{elements:{name:Ol.elements,defaultValue:[]}},superTypes:[mi.$type]},ArrayType:{name:xl.$type,properties:{elementType:{name:xl.elementType}},superTypes:[pi.$type]},Assignment:{name:xn.$type,properties:{cardinality:{name:xn.cardinality},feature:{name:xn.feature},operator:{name:xn.operator},predicate:{name:xn.predicate},terminal:{name:xn.terminal}},superTypes:[ct.$type]},BooleanLiteral:{name:vo.$type,properties:{true:{name:vo.true,defaultValue:!1}},superTypes:[nr.$type,mi.$type]},CharacterRange:{name:Dn.$type,properties:{cardinality:{name:Dn.cardinality},left:{name:Dn.left},lookahead:{name:Dn.lookahead},parenthesized:{name:Dn.parenthesized,defaultValue:!1},right:{name:Dn.right}},superTypes:[gt.$type]},Condition:{name:nr.$type,properties:{},superTypes:[]},Conjunction:{name:Hs.$type,properties:{left:{name:Hs.left},right:{name:Hs.right}},superTypes:[nr.$type]},CrossReference:{name:Mn.$type,properties:{cardinality:{name:Mn.cardinality},deprecatedSyntax:{name:Mn.deprecatedSyntax,defaultValue:!1},isMulti:{name:Mn.isMulti,defaultValue:!1},terminal:{name:Mn.terminal},type:{name:Mn.type,referenceType:Et.$type}},superTypes:[ct.$type]},Disjunction:{name:Ys.$type,properties:{left:{name:Ys.left},right:{name:Ys.right}},superTypes:[nr.$type]},EndOfFile:{name:Eo.$type,properties:{cardinality:{name:Eo.cardinality}},superTypes:[ct.$type]},Grammar:{name:An.$type,properties:{imports:{name:An.imports,defaultValue:[]},interfaces:{name:An.interfaces,defaultValue:[]},isDeclared:{name:An.isDeclared,defaultValue:!1},name:{name:An.name},rules:{name:An.rules,defaultValue:[]},types:{name:An.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Dl.$type,properties:{path:{name:Dl.path}},superTypes:[]},Group:{name:cr.$type,properties:{cardinality:{name:cr.cardinality},elements:{name:cr.elements,defaultValue:[]},guardCondition:{name:cr.guardCondition},predicate:{name:cr.predicate}},superTypes:[ct.$type]},InferredType:{name:Ao.$type,properties:{name:{name:Ao.name}},superTypes:[Et.$type]},InfixRule:{name:Vt.$type,properties:{call:{name:Vt.call},dataType:{name:Vt.dataType},inferredType:{name:Vt.inferredType},name:{name:Vt.name},operators:{name:Vt.operators},parameters:{name:Vt.parameters,defaultValue:[]},returnType:{name:Vt.returnType,referenceType:Et.$type}},superTypes:[Vs.$type]},InfixRuleOperatorList:{name:Ka.$type,properties:{associativity:{name:Ka.associativity},operators:{name:Ka.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Ml.$type,properties:{precedences:{name:Ml.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Li.$type,properties:{attributes:{name:Li.attributes,defaultValue:[]},name:{name:Li.name},superTypes:{name:Li.superTypes,defaultValue:[],referenceType:Et.$type}},superTypes:[Et.$type]},Keyword:{name:Oi.$type,properties:{cardinality:{name:Oi.cardinality},predicate:{name:Oi.predicate},value:{name:Oi.value}},superTypes:[ct.$type]},NamedArgument:{name:Ps.$type,properties:{calledByName:{name:Ps.calledByName,defaultValue:!1},parameter:{name:Ps.parameter,referenceType:$s.$type},value:{name:Ps.value}},superTypes:[]},NegatedToken:{name:lr.$type,properties:{cardinality:{name:lr.cardinality},lookahead:{name:lr.lookahead},parenthesized:{name:lr.parenthesized,defaultValue:!1},terminal:{name:lr.terminal}},superTypes:[gt.$type]},Negation:{name:So.$type,properties:{value:{name:So.value}},superTypes:[nr.$type]},NumberLiteral:{name:Fl.$type,properties:{value:{name:Fl.value}},superTypes:[mi.$type]},Parameter:{name:$s.$type,properties:{name:{name:$s.name}},superTypes:[]},ParameterReference:{name:ko.$type,properties:{parameter:{name:ko.parameter,referenceType:$s.$type}},superTypes:[nr.$type]},ParserRule:{name:Pt.$type,properties:{dataType:{name:Pt.dataType},definition:{name:Pt.definition},entry:{name:Pt.entry,defaultValue:!1},fragment:{name:Pt.fragment,defaultValue:!1},inferredType:{name:Pt.inferredType},name:{name:Pt.name},parameters:{name:Pt.parameters,defaultValue:[]},returnType:{name:Pt.returnType,referenceType:Et.$type}},superTypes:[Vs.$type]},ReferenceType:{name:Ha.$type,properties:{isMulti:{name:Ha.isMulti,defaultValue:!1},referenceType:{name:Ha.referenceType}},superTypes:[pi.$type]},RegexToken:{name:ur.$type,properties:{cardinality:{name:ur.cardinality},lookahead:{name:ur.lookahead},parenthesized:{name:ur.parenthesized,defaultValue:!1},regex:{name:ur.regex}},superTypes:[gt.$type]},ReturnType:{name:Co.$type,properties:{name:{name:Co.name}},superTypes:[]},RuleCall:{name:dr.$type,properties:{arguments:{name:dr.arguments,defaultValue:[]},cardinality:{name:dr.cardinality},predicate:{name:dr.predicate},rule:{name:dr.rule,referenceType:Is.$type}},superTypes:[ct.$type]},SimpleType:{name:xi.$type,properties:{primitiveType:{name:xi.primitiveType},stringType:{name:xi.stringType},typeRef:{name:xi.typeRef,referenceType:Et.$type}},superTypes:[pi.$type]},StringLiteral:{name:Gl.$type,properties:{value:{name:Gl.value}},superTypes:[mi.$type]},TerminalAlternatives:{name:fr.$type,properties:{cardinality:{name:fr.cardinality},elements:{name:fr.elements,defaultValue:[]},lookahead:{name:fr.lookahead},parenthesized:{name:fr.parenthesized,defaultValue:!1}},superTypes:[gt.$type]},TerminalElement:{name:gt.$type,properties:{cardinality:{name:gt.cardinality},lookahead:{name:gt.lookahead},parenthesized:{name:gt.parenthesized,defaultValue:!1}},superTypes:[ct.$type]},TerminalGroup:{name:hr.$type,properties:{cardinality:{name:hr.cardinality},elements:{name:hr.elements,defaultValue:[]},lookahead:{name:hr.lookahead},parenthesized:{name:hr.parenthesized,defaultValue:!1}},superTypes:[gt.$type]},TerminalRule:{name:ln.$type,properties:{definition:{name:ln.definition},fragment:{name:ln.fragment,defaultValue:!1},hidden:{name:ln.hidden,defaultValue:!1},name:{name:ln.name},type:{name:ln.type}},superTypes:[Is.$type]},TerminalRuleCall:{name:pr.$type,properties:{cardinality:{name:pr.cardinality},lookahead:{name:pr.lookahead},parenthesized:{name:pr.parenthesized,defaultValue:!1},rule:{name:pr.rule,referenceType:ln.$type}},superTypes:[gt.$type]},Type:{name:Xs.$type,properties:{name:{name:Xs.name},type:{name:Xs.type}},superTypes:[Et.$type]},TypeAttribute:{name:hi.$type,properties:{defaultValue:{name:hi.defaultValue},isOptional:{name:hi.isOptional,defaultValue:!1},name:{name:hi.name},type:{name:hi.type}},superTypes:[]},TypeDefinition:{name:pi.$type,properties:{},superTypes:[]},UnionType:{name:Ul.$type,properties:{types:{name:Ul.types,defaultValue:[]}},superTypes:[pi.$type]},UnorderedGroup:{name:Js.$type,properties:{cardinality:{name:Js.cardinality},elements:{name:Js.elements,defaultValue:[]}},superTypes:[ct.$type]},UntilToken:{name:mr.$type,properties:{cardinality:{name:mr.cardinality},lookahead:{name:mr.lookahead},parenthesized:{name:mr.parenthesized,defaultValue:!1},terminal:{name:mr.terminal}},superTypes:[gt.$type]},ValueLiteral:{name:mi.$type,properties:{},superTypes:[]},Wildcard:{name:Di.$type,properties:{cardinality:{name:Di.cardinality},lookahead:{name:Di.lookahead},parenthesized:{name:Di.parenthesized,defaultValue:!1}},superTypes:[gt.$type]}}}}const ee=new Bd;function wo(t){return new sl(t,e=>Bi(e)?e.content:[],{includeRoot:!0})}function jp(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function No(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function la(t){if(!t)return;const{offset:e,end:n,range:r}=t;return{range:r,offset:e,end:n,length:n-e}}var Xt;(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"})(Xt||(Xt={}));function zp(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return Xt.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return Xt.After;const n=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,r=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return n&&r?Xt.Inside:n?Xt.OverlapBack:r?Xt.OverlapFront:Xt.Outside}function Bp(t,e){return zp(t,e)>Xt.After}const Wp=/^[\w\p{L}]$/u;function Vp(t,e){if(t){const n=Kp(t,!0);if(n&&ql(n,e))return n;if(Fd(t)){const r=t.content.findIndex(i=>!i.hidden);for(let i=r-1;i>=0;i--){const s=t.content[i];if(ql(s,e))return s}}}}function ql(t,e){return Md(t)&&e.includes(t.tokenType.name)}function Kp(t,e=!0){for(;t.container;){const n=t.container;let r=n.content.indexOf(t);for(;r>0;){r--;const i=n.content[r];if(e||!i.hidden)return i}t=n}}class Wd extends Error{constructor(e,n){super(e?`${n} at ${e.range.start.line}:${e.range.start.character}`:n)}}function ss(t,e="Error: Got unexpected value."){throw new Error(e)}function W(t){return t.charCodeAt(0)}function Ya(t,e){Array.isArray(t)?t.forEach(function(n){e.push(n)}):e.push(t)}function gi(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function rr(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function Hp(){throw Error("Internal Error - Should never get here!")}function jl(t){return t.type==="Character"}const ua=[];for(let t=W("0");t<=W("9");t++)ua.push(t);const da=[W("_")].concat(ua);for(let t=W("a");t<=W("z");t++)da.push(t);for(let t=W("A");t<=W("Z");t++)da.push(t);const zl=[W(" "),W("\f"),W(`
|
|
2
2
|
`),W("\r"),W(" "),W("\v"),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W(" "),W("\u2028"),W("\u2029"),W(" "),W(" "),W(" "),W("\uFEFF")],Yp=/[0-9a-fA-F]/,Ls=/[0-9]/,Xp=/[1-9]/;class Vd{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const n=this.disjunction();this.consumeChar("/");const r={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":gi(r,"global");break;case"i":gi(r,"ignoreCase");break;case"m":gi(r,"multiLine");break;case"u":gi(r,"unicode");break;case"y":gi(r,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:n,loc:this.loc(0)}}disjunction(){const e=[],n=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(n)}}alternative(){const e=[],n=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(n)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let n;switch(this.popChar()){case"=":n="Lookahead";break;case"!":n="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":n="Lookbehind";break;case"!":n="NegativeLookbehind"}break}}rr(n);const r=this.disjunction();return this.consumeChar(")"),{type:n,value:r,loc:this.loc(e)}}return Hp()}quantifier(e=!1){let n;const r=this.idx;switch(this.popChar()){case"*":n={atLeast:0,atMost:1/0};break;case"+":n={atLeast:1,atMost:1/0};break;case"?":n={atLeast:0,atMost:1};break;case"{":const i=this.integerIncludingZero();switch(this.popChar()){case"}":n={atLeast:i,atMost:i};break;case",":let s;this.isDigit()?(s=this.integerIncludingZero(),n={atLeast:i,atMost:s}):n={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&n===void 0)return;rr(n);break}if(!(e===!0&&n===void 0)&&rr(n))return this.peekChar(0)==="?"?(this.consumeChar("?"),n.greedy=!1):n.greedy=!0,n.type="Quantifier",n.loc=this.loc(r),n}atom(){let e;const n=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}if(e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),rr(e))return e.loc=this.loc(n),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[W(`
|
|
3
3
|
`),W("\r"),W("\u2028"),W("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,n=!1;switch(this.popChar()){case"d":e=ua;break;case"D":e=ua,n=!0;break;case"s":e=zl;break;case"S":e=zl,n=!0;break;case"w":e=da;break;case"W":e=da,n=!0;break}if(rr(e))return{type:"Set",value:e,complement:n}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=W("\f");break;case"n":e=W(`
|
|
4
4
|
`);break;case"r":e=W("\r");break;case"t":e=W(" ");break;case"v":e=W("\v");break}if(rr(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:W("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:W(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
package/dist/client/assets/{workspace._workspaceId-DlSNI5Oq.js → workspace._workspaceId-BGYd2hI-.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{R as e,j as a,N as r}from"./main-
|
|
1
|
+
import{R as e,j as a,N as r}from"./main-p2Lo-pWV.js";function t(){const{workspaceId:o}=e.useParams();return a.jsx(r,{to:"/workspace/$workspaceId",params:{workspaceId:o},replace:!0})}export{t as notFoundComponent};
|
package/dist/client/assets/{workspace._workspaceId-BWohejgu.js → workspace._workspaceId-jOqDoJcM.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DockviewTerminalContainer-
|
|
2
|
-
import{j as n,bQ as Y,bV as G,bW as X,r as e,R as Z,bR as I,bX as P,bU as W,bY as J,p as S,bZ as ee,b_ as te,b$ as ne,c0 as se,c1 as ie,c2 as oe,c3 as ae,c4 as re,c5 as ce,c6 as le,c7 as ue,c8 as de,_ as fe}from"./main-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DockviewTerminalContainer-DAn_WCfx.js","assets/main-p2Lo-pWV.js","assets/main-BgcIGjy5.css","assets/square-terminal-DHH8tUx5.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{j as n,bQ as Y,bV as G,bW as X,r as e,R as Z,bR as I,bX as P,bU as W,bY as J,p as S,bZ as ee,b_ as te,b$ as ne,c0 as se,c1 as ie,c2 as oe,c3 as ae,c4 as re,c5 as ce,c6 as le,c7 as ue,c8 as de,_ as fe}from"./main-p2Lo-pWV.js";import{S as he}from"./square-terminal-DHH8tUx5.js";const ge=[{id:"chat",label:"Chat",icon:Y},{id:"diff",label:"Changes",icon:G},{id:"code",label:"Files",icon:X},{id:"terminal",label:"Terminal",icon:he}];function pe({activeTab:t,onTabChange:a,diffFileCount:o}){return n.jsx("div",{className:"flex shrink-0 border-b border-border",children:ge.map(c=>{const r=c.icon,i=t===c.id,d=c.id==="diff"&&o!=null&&o>0,h=`flex flex-1 items-center justify-center gap-1.5 py-2.5 text-sm font-medium transition-colors ${i?"border-b-2 border-foreground text-foreground":"text-muted-foreground hover:text-foreground"}`;return n.jsxs("button",{type:"button",onClick:()=>a(c.id),className:h,"aria-label":c.label,title:c.label,children:[n.jsx(r,{className:"size-4"}),d&&n.jsx("span",{className:"inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-blue-500/20 text-blue-600 dark:text-blue-400 px-1.5 text-xs font-medium",children:o})]},c.id)})})}const _=e.createContext({chatKey:0,setTaskRunning:()=>{}});function Se(){return e.useContext(_)}const $=e.createContext({showSessionList:!1,setShowSessionList:()=>{}});function me(){return e.useContext($)}const ve=e.lazy(()=>fe(()=>import("./DockviewTerminalContainer-DAn_WCfx.js"),__vite__mapDeps([0,1,2,3])).then(t=>({default:t.DockviewTerminalContainer})));function xe(){const[t,a]=e.useState(null),[o,c]=e.useState(0);return e.useLayoutEffect(()=>{const r=window.visualViewport,i=()=>{a(r?r.height:window.innerHeight),c(r?r.offsetTop:0)};return i(),r&&(r.addEventListener("resize",i),r.addEventListener("scroll",i)),window.addEventListener("resize",i),()=>{r&&(r.removeEventListener("resize",i),r.removeEventListener("scroll",i)),window.removeEventListener("resize",i)}},[]),{height:t,offsetTop:o}}function be(t){const{diffMode:a,compareBranch:o}=ce(t),[c,r]=e.useState(0);return e.useEffect(()=>{let i=!1;const d=()=>{S.workspace.getDiffSummary.query({workspaceId:t,diffMode:a,compareBranch:o??void 0}).then(g=>{i||r(g.stats?.filesChanged??0)}).catch(()=>{})};d();const h=setInterval(d,15e3);return()=>{i=!0,clearInterval(h)}},[t,a,o]),c}function Ae(){const{workspaceId:t}=Z.useParams(),a=decodeURIComponent(t),c=I()||W,[r,i]=e.useState(!1);e.useLayoutEffect(()=>{i(!0)},[]);const d=P(g=>g.setActiveWorkspace);e.useEffect(()=>{d(a)},[a,d]);const h=P(g=>g.clearNeedsAttention);return e.useEffect(()=>{h(a)},[a,h]),n.jsx("div",{className:`h-full ${r?"":"invisible"}`,children:c?null:n.jsx(ye,{workspaceId:a},a)})}function ye({workspaceId:t}){const a=J(),{height:o,offsetTop:c}=xe(),r=be(t),[i,d]=e.useState("chat"),[h,g]=e.useState(void 0),[b,A]=e.useState(!1),[L,k]=e.useState([]),[m,v]=e.useState(""),[,E]=e.useState(!1),[C,O]=e.useState(0),N=e.useRef(null);e.useEffect(()=>{let s=!1;return S.settings.get.query().then(u=>{if(s)return;const x=u.codingAgents,R=Array.isArray(x)?x:[];if(R.length>0){const Q=new Set,U=R.filter(z=>Q.has(z.type)?!1:(Q.add(z.type),!0));k(U)}const q=u.defaultCodingAgent;q&&!m&&v(q)}),S.statuses.get.query({workspaceId:t}).then(u=>{s||u?.agent?.codingAgentId&&v(u.agent.codingAgentId)}).catch(()=>{}),()=>{s=!0}},[t,C]);const[T,w]=e.useState(!1),[f,l]=e.useState(!1),[p,y]=e.useState(void 0),[D,j]=e.useState(!1),F=e.useCallback(s=>{g(s),d("code")},[]);e.useEffect(()=>{const s=u=>{const x=u.detail;x?.filename&&(x.workspaceId&&x.workspaceId!==t||(y(x.filename),l(!0)))};return window.addEventListener("band:open-file",s),()=>window.removeEventListener("band:open-file",s)},[t]),e.useEffect(()=>{const s=()=>l(!0),u=()=>j(!0);return window.addEventListener("band:open-quick-open",s),window.addEventListener("band:open-search-files",u),()=>{window.removeEventListener("band:open-quick-open",s),window.removeEventListener("band:open-search-files",u)}},[]);const K=e.useCallback(async s=>{if(s!==m)try{await S.workspace.switchAgent.mutate({workspaceId:t,agentId:s}),v(s),O(u=>u+1)}catch(u){console.error("[switchAgent] error:",u)}},[t,m]),M=e.useCallback(()=>{a({to:"/"})},[a]),V=e.useCallback(s=>{A(s)},[]),B=e.useCallback(s=>{g(s??void 0)},[]),H=L.find(s=>s.id===m);return n.jsx($.Provider,{value:{showSessionList:b,setShowSessionList:V},children:n.jsx(_.Provider,{value:{chatKey:C,setTaskRunning:E,agentType:H?.type,codingAgentId:m,switchAgent:K,newSessionRef:N},children:n.jsxs("div",{className:"flex flex-col overflow-hidden",style:{height:o?`${o}px`:"100dvh",transform:c?`translateY(${c}px)`:void 0},children:[W&&n.jsx(ee,{}),n.jsxs("header",{className:"flex h-[calc(2.5rem+env(safe-area-inset-top))] shrink-0 items-center gap-2 border-b border-border/50 px-3 pt-[env(safe-area-inset-top)]",children:[n.jsx("button",{type:"button",onClick:M,"aria-label":"Back to project list",className:"inline-flex size-7 shrink-0 items-center justify-center rounded-md hover:bg-accent",children:n.jsx(te,{className:"size-4"})}),n.jsxs("button",{type:"button",onClick:()=>w(!0),"aria-haspopup":"dialog","aria-label":"Switch workspace",className:"inline-flex min-w-0 flex-1 items-center justify-center gap-1.5 rounded-md px-2 py-1 hover:bg-accent active:bg-accent",children:[n.jsx("h1",{className:"truncate text-sm font-semibold",children:t}),n.jsx(ne,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),n.jsx("div",{"aria-hidden":"true",className:"size-7 shrink-0"})]}),n.jsx(pe,{activeTab:i,onTabChange:d,diffFileCount:r}),n.jsxs("main",{className:"flex min-h-0 flex-1 flex-col",children:[i==="chat"&&n.jsx(Ce,{workspaceId:t}),i==="diff"&&n.jsx(se,{workspaceId:t,active:!0,onOpenFile:F}),i==="code"&&n.jsx(ie,{workspaceId:t,file:h,onSelectFile:B}),i==="terminal"&&n.jsx(e.Suspense,{fallback:null,children:n.jsx(ve,{workspaceId:t,visible:!0})})]}),n.jsx(oe,{workspaceId:t,open:f,onOpenChange:s=>{l(s),s||y(void 0)},onOpenFile:F,initialQuery:p,autoOpen:p!=null}),n.jsx(ae,{workspaceId:t,open:D,onOpenChange:j,onOpenFile:F}),n.jsx(re,{open:T,onOpenChange:w})]})})})}function Ce({workspaceId:t}){const{settings:a}=le(),[o,c]=e.useState(void 0),[r,i]=e.useState(!1),[d,h]=e.useState(void 0),[g,b]=e.useState(!1),[A,L]=e.useState(0),{showSessionList:k,setShowSessionList:m}=me(),{chatKey:v,setTaskRunning:E,agentType:C,codingAgentId:O,switchAgent:N,newSessionRef:T}=Se();e.useEffect(()=>{let f=!1;return S.chats.list.query({workspaceId:t}).then(l=>{if(!f)if(l.chats.length>0)c(l.chats[0].id);else return S.chats.create.mutate({workspaceId:t}).then(p=>{f||c(p.chat.id)})}).catch(l=>console.error("[MobileChatContent] error resolving chat:",l)),()=>{f=!0}},[t]),e.useEffect(()=>{if(!o)return;let f=!1;return S.chats.get.query({chatId:o}).then(l=>{if(f)return;const p=l?.chat,y=p?.agent??a.defaultCodingAgent,D=y?a.codingAgents?.find(j=>j.id===y):void 0;i(ue(D?.type)),p?.activeSessionId&&h(p.activeSessionId),b(!0)}).catch(l=>{f||b(!0),console.error("[chats.get] error:",l)}),()=>{f=!0}},[t,o,v,a]);const w=e.useCallback(async f=>{if(o){try{await S.chats.setActiveSession.mutate({workspaceId:t,chatId:o,sessionId:f??void 0})}catch(l){console.error("[MobileChatContent] error persisting active session:",l);return}h(f),b(!1),L(l=>l+1)}},[t,o]);return o?n.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:n.jsx(de,{chatKey:v,workspaceId:t,chatId:o,workspaceName:t,supportsSessionListing:r,initialSessionId:d,sessionQueryDone:g,showSessionList:k,onShowSessionListChange:m,onStreamingChange:E,onNewSessionRef:T,onSwitchSession:w,agentType:C,codingAgentId:O,onSwitchAgent:N},`${v}-${A}`)}):null}export{Ae as component};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{O as gi,S as xi,ae as Xt,ad as di,U as pi,V as fi,W as n,$ as Nt,au as yi,a0 as mi,aj as bi,as as Ct,a3 as Ai,aq as Yt,ar as wi,aM as Ci,aN as Bt,aO as Si,aL as Wt,aP as zt}from"./main-
|
|
1
|
+
import{O as gi,S as xi,ae as Xt,ad as di,U as pi,V as fi,W as n,$ as Nt,au as yi,a0 as mi,aj as bi,as as Ct,a3 as Ai,aq as Yt,ar as wi,aM as Ci,aN as Bt,aO as Si,aL as Wt,aP as zt}from"./main-p2Lo-pWV.js";var mt=(function(){var s=n(function(W,r,u,g){for(u=u||{},g=W.length;g--;u[W[g]]=r);return u},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],e=[1,3],a=[1,5],c=[1,6],d=[1,7],m=[1,5,10,12,14,16,18,19,21,23,34,35,36],b=[1,25],P=[1,26],I=[1,28],R=[1,29],L=[1,30],z=[1,31],F=[1,32],D=[1,33],V=[1,34],f=[1,35],C=[1,36],l=[1,37],M=[1,43],B=[1,42],U=[1,47],X=[1,50],h=[1,10,12,14,16,18,19,21,23,34,35,36],k=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],w=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],S=[1,64],$={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n(function(r,u,g,x,A,o,nt){var p=o.length-1;switch(A){case 5:x.setOrientation(o[p]);break;case 9:x.setDiagramTitle(o[p].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[p]);break;case 13:x.setLineData(o[p-1],o[p]);break;case 14:x.setBarData({text:"",type:"text"},o[p]);break;case 15:x.setBarData(o[p-1],o[p]);break;case 16:this.$=o[p].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[p].trim(),x.setAccDescription(this.$);break;case 19:this.$=o[p-1];break;case 20:this.$=[Number(o[p-2]),...o[p]];break;case 21:this.$=[Number(o[p])];break;case 22:x.setXAxisTitle(o[p]);break;case 23:x.setXAxisTitle(o[p-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(o[p]);break;case 26:x.setXAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 27:this.$=o[p-1];break;case 28:this.$=[o[p-2],...o[p]];break;case 29:this.$=[o[p]];break;case 30:x.setYAxisTitle(o[p]);break;case 31:x.setYAxisTitle(o[p-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 37:this.$={text:o[p],type:"text"};break;case 38:this.$={text:o[p],type:"text"};break;case 39:this.$={text:o[p],type:"markdown"};break;case 40:this.$=o[p];break;case 41:this.$=o[p-1]+""+o[p];break}},"anonymous"),table:[s(t,i,{3:1,4:2,7:4,5:e,34:a,35:c,36:d}),{1:[3]},s(t,i,{4:2,7:4,3:8,5:e,34:a,35:c,36:d}),s(t,i,{4:2,7:4,6:9,3:10,5:e,8:[1,11],34:a,35:c,36:d}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},s(m,[2,34]),s(m,[2,35]),s(m,[2,36]),{1:[2,1]},s(t,i,{4:2,7:4,3:21,5:e,34:a,35:c,36:d}),{1:[2,3]},s(m,[2,5]),s(t,[2,7],{4:22,34:a,35:c,36:d}),{11:23,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},{11:39,13:38,24:M,27:B,29:40,30:41,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},{11:45,15:44,27:U,33:46,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},{11:49,17:48,24:X,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},{11:52,17:51,24:X,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},{20:[1,53]},{22:[1,54]},s(h,[2,18]),{1:[2,2]},s(h,[2,8]),s(h,[2,9]),s(k,[2,37],{40:55,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l}),s(k,[2,38]),s(k,[2,39]),s(w,[2,40]),s(w,[2,42]),s(w,[2,43]),s(w,[2,44]),s(w,[2,45]),s(w,[2,46]),s(w,[2,47]),s(w,[2,48]),s(w,[2,49]),s(w,[2,50]),s(w,[2,51]),s(h,[2,10]),s(h,[2,22],{30:41,29:56,24:M,27:B}),s(h,[2,24]),s(h,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},s(h,[2,11]),s(h,[2,30],{33:60,27:U}),s(h,[2,32]),{31:[1,61]},s(h,[2,12]),{17:62,24:X},{25:63,27:S},s(h,[2,14]),{17:65,24:X},s(h,[2,16]),s(h,[2,17]),s(w,[2,41]),s(h,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},s(h,[2,31]),{27:[1,69]},s(h,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},s(h,[2,15]),s(h,[2,26]),s(h,[2,27]),{11:59,32:72,37:24,38:b,39:P,40:27,41:I,42:R,43:L,44:z,45:F,46:D,47:V,48:f,49:C,50:l},s(h,[2,33]),s(h,[2,19]),{25:73,27:S},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n(function(r,u){if(u.recoverable)this.trace(r);else{var g=new Error(r);throw g.hash=u,g}},"parseError"),parse:n(function(r){var u=this,g=[0],x=[],A=[null],o=[],nt=this.table,p="",lt=0,Et=0,hi=2,It=1,li=o.slice.call(arguments,1),_=Object.create(this.lexer),Y={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(Y.yy[dt]=this.yy[dt]);_.setInput(r,Y.yy),Y.yy.lexer=_,Y.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var pt=_.yylloc;o.push(pt);var ci=_.options&&_.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(v){g.length=g.length-2*v,A.length=A.length-v,o.length=o.length-v}n(ui,"popStack");function Vt(){var v;return v=x.pop()||_.lex()||It,typeof v!="number"&&(v instanceof Array&&(x=v,v=x.pop()),v=u.symbols_[v]||v),v}n(Vt,"lex");for(var T,H,E,ft,q={},ct,O,Mt,ut;;){if(H=g[g.length-1],this.defaultActions[H]?E=this.defaultActions[H]:((T===null||typeof T>"u")&&(T=Vt()),E=nt[H]&&nt[H][T]),typeof E>"u"||!E.length||!E[0]){var yt="";ut=[];for(ct in nt[H])this.terminals_[ct]&&ct>hi&&ut.push("'"+this.terminals_[ct]+"'");_.showPosition?yt="Parse error on line "+(lt+1)+`:
|
|
2
2
|
`+_.showPosition()+`
|
|
3
3
|
Expecting `+ut.join(", ")+", got '"+(this.terminals_[T]||T)+"'":yt="Parse error on line "+(lt+1)+": Unexpected "+(T==It?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError(yt,{text:_.match,token:this.terminals_[T]||T,line:_.yylineno,loc:pt,expected:ut})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+T);switch(E[0]){case 1:g.push(T),A.push(_.yytext),o.push(_.yylloc),g.push(E[1]),T=null,Et=_.yyleng,p=_.yytext,lt=_.yylineno,pt=_.yylloc;break;case 2:if(O=this.productions_[E[1]][1],q.$=A[A.length-O],q._$={first_line:o[o.length-(O||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(O||1)].first_column,last_column:o[o.length-1].last_column},ci&&(q._$.range=[o[o.length-(O||1)].range[0],o[o.length-1].range[1]]),ft=this.performAction.apply(q,[p,Et,lt,Y.yy,E[1],A,o].concat(li)),typeof ft<"u")return ft;O&&(g=g.slice(0,-1*O*2),A=A.slice(0,-1*O),o=o.slice(0,-1*O)),g.push(this.productions_[E[1]][0]),A.push(q.$),o.push(q._$),Mt=nt[g[g.length-2]][g[g.length-1]],g.push(Mt);break;case 3:return!0}}return!0},"parse")},Lt=(function(){var W={EOF:1,parseError:n(function(u,g){if(this.yy.parser)this.yy.parser.parseError(u,g);else throw new Error(u)},"parseError"),setInput:n(function(r,u){return this.yy=u||this.yy||{},this._input=r,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:n(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var u=r.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:n(function(r){var u=r.length,g=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var x=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),g.length-1&&(this.yylineno-=g.length-1);var A=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:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(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:n(function(r){this.unput(this.match.slice(r))},"less"),pastInput:n(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var r=this.pastInput(),u=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
package/dist/openapi.json
CHANGED
|
@@ -1708,32 +1708,19 @@
|
|
|
1708
1708
|
"type": "object",
|
|
1709
1709
|
"properties": {
|
|
1710
1710
|
"data": {
|
|
1711
|
-
"
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
"
|
|
1715
|
-
"
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
},
|
|
1719
|
-
"required": [
|
|
1720
|
-
"workspaceId"
|
|
1721
|
-
],
|
|
1722
|
-
"additionalProperties": false
|
|
1723
|
-
},
|
|
1724
|
-
{
|
|
1725
|
-
"type": "object",
|
|
1726
|
-
"properties": {
|
|
1727
|
-
"workspaceId": {
|
|
1728
|
-
"type": "null"
|
|
1729
|
-
}
|
|
1730
|
-
},
|
|
1731
|
-
"required": [
|
|
1732
|
-
"workspaceId"
|
|
1733
|
-
],
|
|
1734
|
-
"additionalProperties": false
|
|
1711
|
+
"type": "object",
|
|
1712
|
+
"properties": {
|
|
1713
|
+
"workspaceId": {
|
|
1714
|
+
"type": [
|
|
1715
|
+
"string",
|
|
1716
|
+
"null"
|
|
1717
|
+
]
|
|
1735
1718
|
}
|
|
1736
|
-
|
|
1719
|
+
},
|
|
1720
|
+
"required": [
|
|
1721
|
+
"workspaceId"
|
|
1722
|
+
],
|
|
1723
|
+
"additionalProperties": false
|
|
1737
1724
|
}
|
|
1738
1725
|
},
|
|
1739
1726
|
"required": [
|
|
@@ -1778,6 +1765,79 @@
|
|
|
1778
1765
|
]
|
|
1779
1766
|
}
|
|
1780
1767
|
},
|
|
1768
|
+
"/statuses.notify": {
|
|
1769
|
+
"post": {
|
|
1770
|
+
"operationId": "statuses.notify",
|
|
1771
|
+
"description": "Agent-agnostic entry point for coding-agent lifecycle notifications\n(e.g. Claude Code hooks piped through `band notify`). The CLI forwards\nthe raw payload plus the agent's cwd; the server resolves the workspace,\nlooks up its configured agent, and dispatches to that agent's adapter to\ntranslate the payload into a status. Keeping the mapping in the adapter\nmeans adding hook support for a new agent never touches the CLI.\n\nFire-and-forget semantics: unknown cwd → no-op `{ ok: true }` (matches the\nCLI hook contract, which must never fail and break the agent).",
|
|
1772
|
+
"tags": [
|
|
1773
|
+
"statuses"
|
|
1774
|
+
],
|
|
1775
|
+
"responses": {
|
|
1776
|
+
"200": {
|
|
1777
|
+
"description": "Successful response",
|
|
1778
|
+
"content": {
|
|
1779
|
+
"application/json": {
|
|
1780
|
+
"schema": {
|
|
1781
|
+
"type": "object",
|
|
1782
|
+
"properties": {
|
|
1783
|
+
"result": {
|
|
1784
|
+
"type": "object",
|
|
1785
|
+
"properties": {
|
|
1786
|
+
"data": {
|
|
1787
|
+
"type": "object",
|
|
1788
|
+
"properties": {
|
|
1789
|
+
"ok": {
|
|
1790
|
+
"type": "boolean"
|
|
1791
|
+
}
|
|
1792
|
+
},
|
|
1793
|
+
"required": [
|
|
1794
|
+
"ok"
|
|
1795
|
+
],
|
|
1796
|
+
"additionalProperties": false
|
|
1797
|
+
}
|
|
1798
|
+
},
|
|
1799
|
+
"required": [
|
|
1800
|
+
"data"
|
|
1801
|
+
]
|
|
1802
|
+
}
|
|
1803
|
+
},
|
|
1804
|
+
"required": [
|
|
1805
|
+
"result"
|
|
1806
|
+
]
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
},
|
|
1811
|
+
"default": {
|
|
1812
|
+
"$ref": "#/components/responses/Error"
|
|
1813
|
+
}
|
|
1814
|
+
},
|
|
1815
|
+
"requestBody": {
|
|
1816
|
+
"required": true,
|
|
1817
|
+
"content": {
|
|
1818
|
+
"application/json": {
|
|
1819
|
+
"schema": {
|
|
1820
|
+
"type": "object",
|
|
1821
|
+
"properties": {
|
|
1822
|
+
"cwd": {
|
|
1823
|
+
"type": "string"
|
|
1824
|
+
},
|
|
1825
|
+
"payload": {
|
|
1826
|
+
"type": "object",
|
|
1827
|
+
"additionalProperties": {}
|
|
1828
|
+
}
|
|
1829
|
+
},
|
|
1830
|
+
"required": [
|
|
1831
|
+
"cwd",
|
|
1832
|
+
"payload"
|
|
1833
|
+
],
|
|
1834
|
+
"additionalProperties": false
|
|
1835
|
+
}
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
}
|
|
1840
|
+
},
|
|
1781
1841
|
"/history.record": {
|
|
1782
1842
|
"post": {
|
|
1783
1843
|
"operationId": "history.record",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as reactExports, j as jsxRuntimeExports, R as React } from "../server.js";
|
|
2
|
-
import { m as createLucideIcon, bR as isDesktop,
|
|
2
|
+
import { m as createLucideIcon, bR as isDesktop, co as invoke, cp as listen, p as trpc, cq as reactDomExports, cr as Globe, cj as SearchBar, cs as Popover, ct as PopoverTrigger, cu as PopoverContent, cv as Search, cw as Trash2, cx as DropdownMenu, cy as DropdownMenuTrigger, cz as ChevronDown, cA as DropdownMenuContent, cB as DropdownMenuItem, cC as TriangleAlert, bX as ArrowLeft, cd as ArrowRight, X, cD as RotateCw, u as useAdapter, n as useQueryClient, o as useQuery, q as selectNeighbourBeforeRemove, r as centralPanelPosition, v as ensureEdgeGroups, w as attachEdgeGroupDragVisibility, x as registerInnerDockview, y as PanelVisibilityContext, z as DockviewReact, F as cycleTabsInActiveGroup, G as cycleGridGroups, C as Columns2, A as Rows2, B as Plus, E as usePanelVisibility } from "./router-D6HwaUre.js";
|
|
3
3
|
import "node:async_hooks";
|
|
4
4
|
import "node:stream";
|
|
5
5
|
import "util";
|
|
@@ -1370,12 +1370,13 @@ function BrowserTab(props) {
|
|
|
1370
1370
|
const d = props.api.onDidTitleChange(() => setTitle(props.api.title ?? "New Tab"));
|
|
1371
1371
|
return () => d.dispose();
|
|
1372
1372
|
}, [props.api]);
|
|
1373
|
+
const containerApi = props.containerApi;
|
|
1373
1374
|
const handleClose = reactExports.useCallback(
|
|
1374
1375
|
(e) => {
|
|
1375
1376
|
e.stopPropagation();
|
|
1376
|
-
|
|
1377
|
+
panelActionsByApiId.get(containerApi.id)?.current?.onClose(browserId);
|
|
1377
1378
|
},
|
|
1378
|
-
[browserId]
|
|
1379
|
+
[containerApi, browserId]
|
|
1379
1380
|
);
|
|
1380
1381
|
const showFavicon = faviconUrl && !faviconError;
|
|
1381
1382
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "dv-default-tab", children: [
|
|
@@ -1403,51 +1404,56 @@ function BrowserTab(props) {
|
|
|
1403
1404
|
)
|
|
1404
1405
|
] });
|
|
1405
1406
|
}
|
|
1406
|
-
const
|
|
1407
|
-
current: { onAdd: () => {
|
|
1408
|
-
}, onSplit: () => {
|
|
1409
|
-
} }
|
|
1410
|
-
};
|
|
1411
|
-
const closeTabRef = {
|
|
1412
|
-
current: null
|
|
1413
|
-
};
|
|
1407
|
+
const panelActionsByApiId = /* @__PURE__ */ new Map();
|
|
1414
1408
|
const RightHeaderActions = React.memo(function RightHeaderActions2(props) {
|
|
1415
1409
|
const isGridGroup = (props.location?.type ?? "grid") === "grid";
|
|
1410
|
+
const apiId = props.containerApi.id;
|
|
1416
1411
|
const groupId = props.group.id;
|
|
1417
|
-
return
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
type: "button",
|
|
1423
|
-
className: "inline-flex size-8 items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent rounded transition-colors",
|
|
1424
|
-
onClick: () => addTabRef.current.onSplit(groupId, "right"),
|
|
1425
|
-
title: "Split right",
|
|
1426
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Columns2, { className: "size-3.5" })
|
|
1427
|
-
}
|
|
1428
|
-
),
|
|
1429
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1430
|
-
"button",
|
|
1431
|
-
{
|
|
1432
|
-
type: "button",
|
|
1433
|
-
className: "inline-flex size-8 items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent rounded transition-colors",
|
|
1434
|
-
onClick: () => addTabRef.current.onSplit(groupId, "below"),
|
|
1435
|
-
title: "Split down",
|
|
1436
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Rows2, { className: "size-3.5" })
|
|
1437
|
-
}
|
|
1438
|
-
)
|
|
1439
|
-
] }),
|
|
1440
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1441
|
-
"button",
|
|
1412
|
+
return (
|
|
1413
|
+
// `data-testid` on grid-group toolbars only (edge groups get no testid)
|
|
1414
|
+
// gives integration tests a stable hook for the central action row.
|
|
1415
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1416
|
+
"div",
|
|
1442
1417
|
{
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1418
|
+
className: "flex h-full w-full items-center justify-center",
|
|
1419
|
+
"data-testid": isGridGroup ? "dockview-browser__toolbar" : void 0,
|
|
1420
|
+
children: [
|
|
1421
|
+
isGridGroup && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
1422
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1423
|
+
"button",
|
|
1424
|
+
{
|
|
1425
|
+
type: "button",
|
|
1426
|
+
className: "inline-flex size-8 items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent rounded transition-colors",
|
|
1427
|
+
onClick: () => panelActionsByApiId.get(apiId)?.current?.onSplit(groupId, "right"),
|
|
1428
|
+
title: "Split right",
|
|
1429
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Columns2, { className: "size-3.5" })
|
|
1430
|
+
}
|
|
1431
|
+
),
|
|
1432
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1433
|
+
"button",
|
|
1434
|
+
{
|
|
1435
|
+
type: "button",
|
|
1436
|
+
className: "inline-flex size-8 items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent rounded transition-colors",
|
|
1437
|
+
onClick: () => panelActionsByApiId.get(apiId)?.current?.onSplit(groupId, "below"),
|
|
1438
|
+
title: "Split down",
|
|
1439
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Rows2, { className: "size-3.5" })
|
|
1440
|
+
}
|
|
1441
|
+
)
|
|
1442
|
+
] }),
|
|
1443
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1444
|
+
"button",
|
|
1445
|
+
{
|
|
1446
|
+
type: "button",
|
|
1447
|
+
className: "inline-flex size-8 items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent rounded transition-colors",
|
|
1448
|
+
onClick: () => panelActionsByApiId.get(apiId)?.current?.onAdd(groupId),
|
|
1449
|
+
title: "New browser tab",
|
|
1450
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "size-4" })
|
|
1451
|
+
}
|
|
1452
|
+
)
|
|
1453
|
+
]
|
|
1448
1454
|
}
|
|
1449
1455
|
)
|
|
1450
|
-
|
|
1456
|
+
);
|
|
1451
1457
|
});
|
|
1452
1458
|
const browserPanelComponents = {
|
|
1453
1459
|
browserTab: BrowserTabPanel
|
|
@@ -1844,10 +1850,19 @@ function DockviewBrowserContainer({
|
|
|
1844
1850
|
}
|
|
1845
1851
|
});
|
|
1846
1852
|
}, [adapter, workspaceId]);
|
|
1847
|
-
|
|
1848
|
-
|
|
1853
|
+
const actionsRef = reactExports.useRef({
|
|
1854
|
+
onAdd: () => {
|
|
1855
|
+
},
|
|
1856
|
+
onSplit: () => {
|
|
1857
|
+
},
|
|
1858
|
+
onClose: () => {
|
|
1859
|
+
}
|
|
1860
|
+
});
|
|
1861
|
+
actionsRef.current = { onAdd: handleAddTab, onSplit: handleSplit, onClose: closeTab };
|
|
1849
1862
|
reactExports.useEffect(() => {
|
|
1850
1863
|
return () => {
|
|
1864
|
+
const api = apiRef.current;
|
|
1865
|
+
if (api) panelActionsByApiId.delete(api.id);
|
|
1851
1866
|
edgeDragDisposerRef.current?.();
|
|
1852
1867
|
edgeDragDisposerRef.current = null;
|
|
1853
1868
|
innerRegisterDisposerRef.current?.();
|
|
@@ -1864,7 +1879,10 @@ function DockviewBrowserContainer({
|
|
|
1864
1879
|
visibleRef.current = visible;
|
|
1865
1880
|
const onReady = reactExports.useCallback(
|
|
1866
1881
|
(event) => {
|
|
1882
|
+
const prevApi = apiRef.current;
|
|
1883
|
+
if (prevApi && prevApi.id !== event.api.id) panelActionsByApiId.delete(prevApi.id);
|
|
1867
1884
|
apiRef.current = event.api;
|
|
1885
|
+
panelActionsByApiId.set(event.api.id, actionsRef);
|
|
1868
1886
|
const savedLayout = initialLayoutRef.current;
|
|
1869
1887
|
const knownBrowserIds = initialBrowserIdsRef.current;
|
|
1870
1888
|
const knownUrls = initialUrlsRef.current;
|