@kabmo-labs/kabmo 0.59.1 → 0.61.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/index.html +1 -1
- package/dist/client/index.js +397 -397
- package/dist/client/static/js/{Body-5yedtmnk.js → Body-ab8wswhm.js} +3 -3
- package/dist/client/static/js/{CsvGrid-39m8pp1c.js → CsvGrid-czssywvz.js} +2 -2
- package/dist/client/static/js/{DocxView-vd99cv12.js → DocxView-ke0dwdmt.js} +3 -3
- package/dist/client/static/js/{DrawioView-6nq4412n.js → DrawioView-a1whhy84.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-cs51gszy.js → HtmlPreview-dr32dwjy.js} +1 -1
- package/dist/client/static/js/ImageView-zf4kh5wp.js +1 -0
- package/dist/client/static/js/LayoutWrapper-dncbzcea.js +2 -0
- package/dist/client/static/js/MergeDiffView-btdx9yb9.js +1 -0
- package/dist/client/static/js/Modal-5cxfw2rv.js +60 -0
- package/dist/client/static/js/{PdfView-0zab721q.js → PdfView-2kdn91f9.js} +1 -1
- package/dist/client/static/js/SessionsView-vbn0nvx4.js +1 -0
- package/dist/client/static/js/{SheetView-2wdn5hkd.js → SheetView-ettr9pdw.js} +9 -9
- package/dist/client/static/js/{SvgPreview-fmrfxd7z.js → SvgPreview-hzcejjry.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-41scfh9v.js → abnfDiagram-O67JEVCF-kdmv4y72.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-sxrkxwbq.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-fp6etjvt.js → architectureDiagram-NJMV4G6O-qyrwaq0x.js} +11 -11
- package/dist/client/static/js/{astro-ryr2ajmg.js → astro-yphdvdty.js} +1 -1
- package/dist/client/static/js/bash-bcbct9gc.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-pespk9mt.js → blockDiagram-BEXU5L5S-tszxy2g7.js} +8 -8
- package/dist/client/static/js/c-fn9jz26e.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-rt4z91dx.js → c4Diagram-YGBWAQC7-0ye36hhv.js} +5 -5
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-6bzaq8sd.js → classDiagram-v2-NBCMYWYE-szgk1shv.js} +6 -6
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-z3fhgcba.js → cose-bilkent-JH36ORCC-0s9s4mmv.js} +1 -1
- package/dist/client/static/js/cpp-a1q64mke.js +1 -0
- package/dist/client/static/js/css-b92azee8.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-g1xwa8b9.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-8endeh4p.js → cynefinDiagram-VND7K2PF-664g28ze.js} +2 -2
- package/dist/client/static/js/{dagre-6A5THRUB-2a2f32dv.js → dagre-6A5THRUB-ga4rp1jx.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-wgbyr6b7.js → diagram-22UHCM2B-aagj46ty.js} +15 -15
- package/dist/client/static/js/{diagram-3UASUU5V-5122b41x.js → diagram-3UASUU5V-20qk6whk.js} +2 -2
- package/dist/client/static/js/{diagram-ATOU4E4O-1gt9fr7e.js → diagram-ATOU4E4O-1vg1tfca.js} +2 -2
- package/dist/client/static/js/{diagram-CDSNMT55-v6hs59jb.js → diagram-CDSNMT55-90d6jrqs.js} +4 -4
- package/dist/client/static/js/{diagram-MLGK6HIB-yey2m5nm.js → diagram-MLGK6HIB-8je4z8m1.js} +2 -2
- package/dist/client/static/js/{diagram-MPIPVDR6-hg4f3q4d.js → diagram-MPIPVDR6-0kzpexsj.js} +2 -2
- package/dist/client/static/js/{dockerfile-56tfnp5r.js → dockerfile-5nrbr0ef.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-2mhc9aar.js → ebnfDiagram-ZINNZB2B-47yg36zx.js} +1 -1
- package/dist/client/static/js/{elixir-fyxw6d70.js → elixir-3nwnd9yw.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-wedtvz9y.js → elk-276RUBZZ-5hqp6r2d.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-1kysnby9.js → erDiagram-OPXOYQCR-bt9te7r0.js} +3 -3
- package/dist/client/static/js/{erlang-97ayje6m.js → erlang-p5c4n3t0.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-05p61bka.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-500fcx2a.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-j4g65rpm.js → ganttDiagram-FUAMR5RP-kzc13swm.js} +5 -5
- package/dist/client/static/js/gitGraph-4MIJSDKK-z1yehwys.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-vcwmj4b3.js → gitGraphDiagram-X574FWY7-bjf8aa3j.js} +14 -14
- package/dist/client/static/js/graphql-8d8bn59j.js +1 -0
- package/dist/client/static/js/html-6hdrwtz2.js +1 -0
- package/dist/client/static/js/{index-5e4e18tg.js → index-025s3fp8.js} +2 -2
- package/dist/client/static/js/{index-jaf968hx.js → index-0kcnghxn.js} +4 -4
- package/dist/client/static/js/{index-8tzt0dek.js → index-11qn05g9.js} +2 -2
- package/dist/client/static/js/{index-sqyvj03y.js → index-1fmjhm2d.js} +9 -9
- package/dist/client/static/js/{index-42q5gg7t.js → index-24a40rw8.js} +1 -1
- package/dist/client/static/js/{index-np2rfq06.js → index-2dmew334.js} +2 -2
- package/dist/client/static/js/{index-wkxsypj1.js → index-2zhmmtye.js} +2 -2
- package/dist/client/static/js/{index-m62sf9wn.js → index-3x7cbxwq.js} +1 -1
- package/dist/client/static/js/{index-fg0ne74z.js → index-475dc6h9.js} +2 -2
- package/dist/client/static/js/{index-1mkn5fbf.js → index-4vtc4xct.js} +197 -197
- package/dist/client/static/js/{index-spnrx2c0.js → index-5srvxsht.js} +1 -1
- package/dist/client/static/js/{index-tz5ewsza.js → index-653x8zdq.js} +9 -9
- package/dist/client/static/js/index-6c1s0v4b.js +1 -0
- package/dist/client/static/js/{index-hgzf4ask.js → index-776n5n29.js} +5 -5
- package/dist/client/static/js/{index-a70sk36c.js → index-85jfn1fz.js} +2 -2
- package/dist/client/static/js/{index-yrwm437g.js → index-97sw4d9n.js} +2 -2
- package/dist/client/static/js/{index-csxnqgzw.js → index-9g2nzgpx.js} +6 -6
- package/dist/client/static/js/{index-y4cx8cqf.js → index-a145x0w2.js} +2 -2
- package/dist/client/static/js/{index-mhrkjbjq.js → index-bdtftrym.js} +2 -2
- package/dist/client/static/js/{index-db6s66jr.js → index-bkn6jtn1.js} +2 -2
- package/dist/client/static/js/{index-kt77dwsg.js → index-bq9f0mxp.js} +7 -7
- package/dist/client/static/js/{index-ndqtff48.js → index-ca6tmamh.js} +2 -2
- package/dist/client/static/js/index-cvm2ha01.js +1 -0
- package/dist/client/static/js/index-d11mbz2q.js +4 -0
- package/dist/client/static/js/{index-3kedv94b.js → index-dabnbvbc.js} +2 -2
- package/dist/client/static/js/{index-sg65xdey.js → index-enm77k5z.js} +2 -2
- package/dist/client/static/js/{index-nf4hq5tg.js → index-excgtjhx.js} +14 -14
- package/dist/client/static/js/{index-51rbgeh9.js → index-fb2fjndj.js} +5 -5
- package/dist/client/static/js/index-fen0x3qh.js +1 -0
- package/dist/client/static/js/{index-vs2y8gxr.js → index-fr6wsqk8.js} +2 -2
- package/dist/client/static/js/{index-xqz7bqcn.js → index-gwgh27h3.js} +87 -87
- package/dist/client/static/js/{index-2h7xh93h.js → index-h7agc069.js} +1 -1
- package/dist/client/static/js/{index-69mnn71v.js → index-hwv7bfxc.js} +2 -2
- package/dist/client/static/js/{index-461ga40v.js → index-hxy1sadd.js} +2 -2
- package/dist/client/static/js/{index-s7p2wdr1.js → index-jz4012t5.js} +1 -1
- package/dist/client/static/js/{index-gajpd90b.js → index-k9yf2txw.js} +2 -2
- package/dist/client/static/js/{index-dw9epydj.js → index-kj70d2q9.js} +2 -2
- package/dist/client/static/js/{index-7enfdvh0.js → index-krdz5vby.js} +2 -2
- package/dist/client/static/js/{index-42k78whj.js → index-kyr612aa.js} +1 -1
- package/dist/client/static/js/{index-fvphmwkf.js → index-m24sebb0.js} +2 -2
- package/dist/client/static/js/{index-d9sfavx1.js → index-mtav0rpf.js} +2 -2
- package/dist/client/static/js/{index-58z2hatp.js → index-n8r7r86r.js} +1 -1
- package/dist/client/static/js/index-pg87cgpy.js +2 -0
- package/dist/client/static/js/{index-r42f3r1p.js → index-q1a40v20.js} +2 -2
- package/dist/client/static/js/{index-jct0jryd.js → index-qccydkze.js} +2 -2
- package/dist/client/static/js/index-qmvstmvh.js +1 -0
- package/dist/client/static/js/{index-pn0ja904.js → index-r38e0rya.js} +2 -2
- package/dist/client/static/js/{index-92h38pwg.js → index-s4j2ghmx.js} +2 -2
- package/dist/client/static/js/index-sr14vwn5.js +2 -0
- package/dist/client/static/js/{index-z82nd2bd.js → index-sx83ans2.js} +2 -2
- package/dist/client/static/js/index-t6nqy2n5.css +1 -0
- package/dist/client/static/js/{index-fsa18ns9.js → index-twwsn91p.js} +2 -2
- package/dist/client/static/js/{index-nwbr15b3.js → index-v88m5sva.js} +2 -2
- package/dist/client/static/js/{index-qc3de995.js → index-vgcw01yk.js} +1 -1
- package/dist/client/static/js/{index-pr8wsq24.js → index-vn59zz0k.js} +2 -2
- package/dist/client/static/js/{index-hrez92pw.js → index-wf5j0009.js} +7 -7
- package/dist/client/static/js/{index-q3k8r0ms.js → index-wsy6y5em.js} +9 -9
- package/dist/client/static/js/{index-d201jvs9.js → index-xy0m8te9.js} +1 -1
- package/dist/client/static/js/index-y6zbkh4p.js +2 -0
- package/dist/client/static/js/{index-h1xbx74w.js → index-yfcy4cf6.js} +2 -2
- package/dist/client/static/js/{index-y5pkqrga.js → index-z5s9tmj8.js} +2 -2
- package/dist/client/static/js/{index-vs3g6njv.js → index-zr3965k9.js} +1 -1
- package/dist/client/static/js/info-A6RAGUB7-dqyaxjc1.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-7craq9x2.js → infoDiagram-VRGFBTTK-jy5zvvj8.js} +1 -1
- package/dist/client/static/js/ini-g6a5xsaw.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-ncjty2re.js → ishikawaDiagram-OU5B5YK6-pfky1nnf.js} +3 -3
- package/dist/client/static/js/java-n596am4c.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-yx222bzt.js → journeyDiagram-ZHPQQLJL-mvaf7rfh.js} +4 -4
- package/dist/client/static/js/json-7k70qbkj.js +1 -0
- package/dist/client/static/js/jsx-sndenqrc.js +1 -0
- package/dist/client/static/js/{julia-agc5kfvg.js → julia-rpd1y9vh.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-a2f84qmn.js → kanban-definition-PNTS6WVX-hw2xwe6e.js} +5 -5
- package/dist/client/static/js/lua-djd3g9q5.js +1 -0
- package/dist/client/static/js/markdown-r2tpvxpn.js +1 -0
- package/dist/client/static/js/{mermaid.core-9vfwthw3.js → mermaid.core-hsw87hmq.js} +6 -6
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-fsxysg6f.js → mindmap-definition-NLK3R4M7-wfe4d846.js} +7 -7
- package/dist/client/static/js/one-dark-pro-ckq5capv.js +1 -0
- package/dist/client/static/js/one-light-a908z398.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-7jxzax4z.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-77wxmp9g.js → pegDiagram-GJSIUBJH-cvnmxgst.js} +1 -1
- package/dist/client/static/js/{perl-v5vbtzgf.js → perl-kmtz9dnv.js} +1 -1
- package/dist/client/static/js/{php-83qwy98t.js → php-bttrsbxy.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-wc9wxr7f.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-gvgfhez0.js → pieDiagram-5QR66LMP-0n3gz7sv.js} +2 -2
- package/dist/client/static/js/properties-brn72zdk.js +1 -0
- package/dist/client/static/js/python-g9mghwgm.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-9zkbt5h8.js → quadrantDiagram-O4NWA36T-9qqh6xvv.js} +4 -4
- package/dist/client/static/js/r-e247x4mw.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-kwj5padj.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-h8sdx3w5.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-2wmwx246.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-h4cdgw3y.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-q7m0tfd0.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-w55bsyw6.js → railroadDiagram-XR7U4H2S-5f3x3762.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-828s1e5g.js → requirementDiagram-PLB6GJNP-a68bv6kh.js} +12 -12
- package/dist/client/static/js/{ruby-994n5j6e.js → ruby-dve3y59w.js} +1 -1
- package/dist/client/static/js/{rust-csv5f258.js → rust-qjhdt4b0.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-34f3fyvg.js → sankeyDiagram-IPEJSGJF-ry7xcphh.js} +4 -4
- package/dist/client/static/js/{sass-p6g7qdv2.js → sass-emxqt5p2.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-nnta2hn0.js → sequenceDiagram-PO4LG4MO-mekzzhet.js} +21 -21
- package/dist/client/static/js/{sizeCapture-INFHLROL-gpcramga.js → sizeCapture-INFHLROL-pvc16ame.js} +1 -1
- package/dist/client/static/js/sql-0kar81jy.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-3f2en220.js → stateDiagram-v2-GCMORJYK-3ytxby83.js} +3 -3
- package/dist/client/static/js/{svelte-bek3h1sz.js → svelte-dbsx1ehx.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-jgqt12z9.js → swimlanes-2SLR337P-c2zfp416.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-9gm67sq4.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-sgchcs11.js → timeline-definition-EJHVYXUP-xtvv4za2.js} +6 -6
- package/dist/client/static/js/treeView-Q6P3EWNA-yv9640h3.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-7kpzjg21.js +1 -0
- package/dist/client/static/js/typescript-bm89v3gk.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-znkg9pkq.js → usecaseDiagram-POWQR4AR-sz6b7bnv.js} +51 -51
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-dncg96ej.js → vennDiagram-UO4OBE2U-56q0qs51.js} +5 -5
- package/dist/client/static/js/{vue-y44m889c.js → vue-hyr58df9.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-mggay64p.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-77xz2d49.js → wardleyDiagram-VNRHLVJA-xvtyvde9.js} +5 -5
- package/dist/client/static/js/xml-b7824nx0.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-40j1aqyf.js → xychartDiagram-PMCCYNJV-jcs20s84.js} +6 -6
- package/dist/client/static/js/yaml-kqqktdv1.js +1 -0
- package/package.json +4 -4
- package/src/client/borders.css +28 -15
- package/src/client/components/common/Modal.tsx +10 -2
- package/src/client/components/common/Toast.tsx +8 -3
- package/src/client/components/common/anchored-menu/index.tsx +10 -3
- package/src/client/components/common/command-palette/index.tsx +9 -3
- package/src/client/components/common/fullscreen-viewer/index.tsx +1 -1
- package/src/client/components/common/header-controls/index.test.tsx +40 -3
- package/src/client/components/common/header-controls/index.tsx +106 -56
- package/src/client/components/common/search-select/search-select.test.tsx +10 -1
- package/src/client/components/common/workspace-mark/index.test.tsx +67 -0
- package/src/client/components/common/workspace-mark/index.tsx +48 -0
- package/src/client/components/layout/ActivityBar.test.ts +1 -1
- package/src/client/components/layout/ActivityBarDrag.test.ts +1 -1
- package/src/client/components/layout/LeftActivityBar.test.ts +48 -3
- package/src/client/components/layout/LeftDock.tsx +33 -14
- package/src/client/components/layout/PanelButton.test.tsx +119 -0
- package/src/client/components/layout/PanelButton.tsx +2 -4
- package/src/client/components/layout/activity-bar/Row.tsx +125 -0
- package/src/client/components/layout/{ActivityBar.tsx → activity-bar/index.tsx} +81 -20
- package/src/client/components/layout/controls-bar/index.tsx +183 -0
- package/src/client/components/layout/desktop-layout/BarSlot.tsx +18 -0
- package/src/client/components/layout/desktop-layout/LeftColumn.test.tsx +187 -0
- package/src/client/components/layout/desktop-layout/LeftColumn.tsx +81 -64
- package/src/client/components/layout/desktop-layout/LeftRail.tsx +60 -0
- package/src/client/components/layout/desktop-layout/LeftTabsColumn.tsx +91 -0
- package/src/client/components/layout/desktop-layout/ResizeHandle.tsx +19 -3
- package/src/client/components/layout/desktop-layout/RightColumn.test.tsx +60 -0
- package/src/client/components/layout/desktop-layout/RightColumn.tsx +77 -28
- package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +114 -104
- package/src/client/components/layout/desktop-layout/index.tsx +48 -45
- package/src/client/components/layout/desktop-layout/resizer/index.tsx +25 -83
- package/src/client/components/layout/desktop-layout/resizer/panel-motion.ts +61 -0
- package/src/client/components/layout/desktop-layout/resizer/panel.test.ts +40 -2
- package/src/client/components/layout/desktop-layout/resizer/separator.tsx +89 -0
- package/src/client/components/layout/left-bar/index.tsx +88 -0
- package/src/client/components/layout/session-sidebar/CategoryHeader.tsx +5 -2
- package/src/client/components/layout/session-sidebar/Footer.tsx +28 -11
- package/src/client/components/layout/session-sidebar/FooterHost.tsx +167 -0
- package/src/client/components/layout/session-sidebar/SessionItem.tsx +2 -2
- package/src/client/components/layout/session-sidebar/about-modal/index.tsx +8 -3
- package/src/client/components/layout/session-sidebar/footer-host.test.tsx +133 -0
- package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +5 -2
- package/src/client/components/layout/session-title-bar/index.tsx +199 -0
- package/src/client/components/layout/top-bars.test.tsx +338 -0
- package/src/client/components/mobile/LayoutWrapper.tsx +13 -2
- package/src/client/components/mobile/SessionSidebar.tsx +10 -8
- package/src/client/components/mobile/drawer-layout.test.tsx +67 -0
- package/src/client/components/mobile/drawer-strip.tsx +37 -14
- package/src/client/components/mobile/left-drawer-nav.test.tsx +19 -127
- package/src/client/components/settings/LazyModal.tsx +8 -2
- package/src/client/components/settings/Modal.tsx +6 -2
- package/src/client/components/settings/apply-side-effects.ts +5 -0
- package/src/client/components/settings/categories/AppearanceSettings.test.tsx +1 -0
- package/src/client/components/settings/categories/AppearanceSettings.tsx +2 -0
- package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.test.tsx +6 -5
- package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.tsx +2 -2
- package/src/client/components/settings/categories/appearance-settings/ChromeStyleSection.tsx +105 -0
- package/src/client/components/settings/categories/appearance-settings/groups.ts +3 -2
- package/src/client/components/settings/categories/mcp-settings/ImportModal.tsx +1 -1
- package/src/client/components/settings/categories/voice-settings/SpeechSettings.test.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/AiMessageFooter.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/AiMessageFooterSheet.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/GeneratingIndicator.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/NewChatModal.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/UndoConfirmModal.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.test.ts +8 -1
- package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.test.tsx +8 -1
- package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.test.tsx +9 -2
- package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.tsx +1 -25
- package/src/client/components/workspace/editor/SaveDeletedFileModal.tsx +1 -1
- package/src/client/components/workspace/editor/Tab.tsx +160 -0
- package/src/client/components/workspace/editor/Tabs.test.ts +40 -0
- package/src/client/components/workspace/editor/Tabs.tsx +52 -102
- package/src/client/components/workspace/editor/index.tsx +2 -0
- package/src/client/components/workspace/editor/props.ts +6 -0
- package/src/client/components/workspace/file-explorer/OutlineResize.test.tsx +225 -0
- package/src/client/components/workspace/file-explorer/OutlineSection.tsx +43 -3
- package/src/client/components/workspace/file-explorer/index.tsx +1 -1
- package/src/client/components/workspace/model-dropdown/Panel.tsx +1 -1
- package/src/client/components/workspace/model-dropdown/SpecsTooltip.tsx +1 -1
- package/src/client/components/workspace/panel-tabs/TabChip.tsx +50 -20
- package/src/client/components/workspace/panel-tabs/TabStrip.connected.test.tsx +172 -0
- package/src/client/components/workspace/panel-tabs/TabStrip.tsx +18 -9
- package/src/client/components/workspace/search-panel/Body.tsx +3 -3
- package/src/client/components/workspace/terminal-panel/RealtimeTerminalView.tsx +1 -1
- package/src/client/data/settings/omp-schema.json +205 -9
- package/src/client/floating.css +276 -0
- package/src/client/floating.test.ts +151 -0
- package/src/client/hooks/chat/timeline/session-pagination.ts +13 -9
- package/src/client/hooks/editor/use-outline-resize.ts +145 -0
- package/src/client/hooks/ui/border-style.test.ts +19 -7
- package/src/client/hooks/ui/border-style.ts +2 -3
- package/src/client/hooks/ui/chrome-style.test.ts +140 -0
- package/src/client/hooks/ui/chrome-style.ts +75 -0
- package/src/client/hooks/ui/media-query.ts +29 -0
- package/src/client/hooks/ui/presence.test.ts +104 -0
- package/src/client/hooks/ui/presence.ts +62 -0
- package/src/client/hooks/ui/style-attributes.test.ts +7 -6
- package/src/client/hooks/ui/surface-style.ts +2 -2
- package/src/client/hooks/ui/titlebar-inset.test.ts +56 -0
- package/src/client/hooks/ui/titlebar-inset.ts +31 -0
- package/src/client/hooks/workspace/available-width.ts +25 -1
- package/src/client/hooks/workspace/panel-peek.test.ts +124 -0
- package/src/client/hooks/workspace/panel-peek.ts +151 -0
- package/src/client/hooks/workspace/panel-rail.test.ts +86 -0
- package/src/client/hooks/workspace/panel-rail.ts +108 -0
- package/src/client/hooks/workspace/panel-resize.ts +8 -2
- package/src/client/hooks/workspace/rail-peek.test.ts +119 -0
- package/src/client/hooks/workspace/rail-peek.ts +68 -0
- package/src/client/hooks/workspace/right-panel-card.test.ts +71 -0
- package/src/client/hooks/workspace/right-panel-card.ts +69 -0
- package/src/client/hooks/workspace/right-panel-geometry.ts +172 -0
- package/src/client/hooks/workspace/right-side.ts +7 -0
- package/src/client/lib/desktop/titlebar.test.ts +6 -0
- package/src/client/lib/desktop/titlebar.ts +16 -0
- package/src/client/main.tsx +11 -0
- package/src/client/motion.test.ts +36 -0
- package/src/client/tailwind.css +67 -0
- package/src/server/lib/assets/shell-attributes.server.ts +14 -4
- package/src/server/lib/assets/shell-attributes.test.ts +35 -21
- package/src/server/lib/bundler/titlebar-css.test.ts +3 -2
- package/src/server/lib/realtime/topics/peer-relay.server.test.ts +19 -3
- package/src/server/lib/updates/omp.test.ts +40 -1
- package/src/server/lib/updates/omp.ts +29 -2
- package/src/server/plugins/ssr.ts +2 -0
- package/src/server/routes/settings/mcp.test.ts +16 -0
- package/src/server/routes/settings/mcp.ts +4 -0
- package/src/shared/lib/code/outline/resize.test.ts +57 -0
- package/src/shared/lib/code/outline/resize.ts +67 -0
- package/src/shared/lib/models/provider/glyph.test.ts +3 -1
- package/src/shared/lib/models/provider/glyph.ts +1 -0
- package/src/shared/lib/omp/config/schema-releases-19-4.test.ts +103 -3
- package/src/shared/lib/omp/config/schema.test.ts +9 -0
- package/src/shared/lib/omp/config/schema.ts +8 -0
- package/src/shared/lib/settings/defaults.ts +2 -0
- package/src/shared/lib/theme/border-style.test.ts +12 -14
- package/src/shared/lib/theme/border-style.ts +25 -18
- package/src/shared/lib/theme/chrome-style.test.ts +31 -0
- package/src/shared/lib/theme/chrome-style.ts +74 -0
- package/src/shared/lib/theme/surface-style.test.ts +4 -5
- package/src/shared/lib/theme/surface-style.ts +6 -5
- package/src/shared/lib/ui/motion.ts +29 -0
- package/src/shared/lib/workspace/floating-chrome.ts +23 -0
- package/src/shared/lib/workspace/session-state/store.ts +3 -0
- package/src/shared/lib/workspace/workspace-panel-widths.test.ts +73 -0
- package/src/shared/lib/workspace/workspace-panel-widths.ts +79 -17
- package/src/shared/types/settings/state.ts +10 -9
- package/src/test-support/left-drawer-harness.test-util.ts +169 -0
- package/src/test-support/peer-harness.ts +44 -36
- package/dist/client/static/js/ImageView-nc2n0w6s.js +0 -1
- package/dist/client/static/js/LayoutWrapper-j7786frq.js +0 -2
- package/dist/client/static/js/MergeDiffView-0rn5zsy5.js +0 -1
- package/dist/client/static/js/Modal-7ag7a9qq.js +0 -60
- package/dist/client/static/js/SessionsView-t9rhx472.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-bwn1drdz.js +0 -1
- package/dist/client/static/js/bash-zknkkwkw.js +0 -1
- package/dist/client/static/js/c-0w02jkxb.js +0 -1
- package/dist/client/static/js/cpp-p5b4vean.js +0 -1
- package/dist/client/static/js/css-9jzbvdyz.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-jbc50ks8.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-b37ey01t.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-vd4z6bvy.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-mvqq7tcs.js +0 -1
- package/dist/client/static/js/graphql-xzykn0ba.js +0 -1
- package/dist/client/static/js/html-2zc3shky.js +0 -1
- package/dist/client/static/js/index-6vbra7p9.js +0 -1
- package/dist/client/static/js/index-9mgpbwfr.js +0 -1
- package/dist/client/static/js/index-c5401dqs.js +0 -4
- package/dist/client/static/js/index-dbsy29gn.js +0 -2
- package/dist/client/static/js/index-e39m185a.js +0 -2
- package/dist/client/static/js/index-fnaq8baz.js +0 -1
- package/dist/client/static/js/index-mttx9327.css +0 -1
- package/dist/client/static/js/index-n7bmqeqz.js +0 -1
- package/dist/client/static/js/index-skp6991n.js +0 -2
- package/dist/client/static/js/info-A6RAGUB7-zkv4crz7.js +0 -1
- package/dist/client/static/js/ini-62r3vxaf.js +0 -1
- package/dist/client/static/js/java-kacycary.js +0 -1
- package/dist/client/static/js/json-yrwpn6bd.js +0 -1
- package/dist/client/static/js/jsx-b40ag8q1.js +0 -1
- package/dist/client/static/js/lua-bk961f37.js +0 -1
- package/dist/client/static/js/markdown-b7rgzgd6.js +0 -1
- package/dist/client/static/js/one-dark-pro-7v4by00h.js +0 -1
- package/dist/client/static/js/one-light-5rfzh8p4.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-dgpge627.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-b8pgsqrd.js +0 -1
- package/dist/client/static/js/properties-k8gbzggp.js +0 -1
- package/dist/client/static/js/python-343tspad.js +0 -1
- package/dist/client/static/js/r-ycdwmv8g.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-fmfe5y27.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-b5tks4ce.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-0sf4m0ze.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-pjfy3pt7.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-nr8ngt42.js +0 -1
- package/dist/client/static/js/sql-kwpd5w07.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-xx1z57df.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-23r9fa68.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-mxxzdrj6.js +0 -1
- package/dist/client/static/js/typescript-4dchbnya.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-cbqtax1x.js +0 -1
- package/dist/client/static/js/xml-xs6qz3ya.js +0 -1
- package/dist/client/static/js/yaml-174nk5bn.js +0 -1
- package/src/client/components/layout/desktop-layout/TopNavbar.tsx +0 -238
- package/src/client/components/layout/session-sidebar/Header.test.ts +0 -98
- package/src/client/components/layout/session-sidebar/Header.tsx +0 -60
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d,n,o,i,a,e,p,Q,mn,
|
|
2
|
-
${R}`:y,className:`pl-2 pr-1 py-0.5 text-[11px] font-mono max-w-[150px] truncate ${ge}`,children:y}),e("button",{type:"button",onClick:()=>c(m.id),"aria-label":`Tutup tab ${y}`,title:`Tutup tab ${y}`,className:`mr-0.5 p-1 rounded hover:bg-error hover:text-paper ${ge} ${g?"text-on-ink-muted":"text-ink/40 opacity-0 group-hover:opacity-100 focus-visible:opacity-100"}`,children:e(h,{size:11})})]},m.id)})}),e("button",{type:"button",onClick:u,disabled:!s,"aria-label":"Tab baru",title:s?"Tab baru":`Maksimal ${X} tab`,className:"p-1 rounded hover:bg-ink/5 text-ink/60 hover:text-ink disabled:opacity-30 disabled:hover:bg-transparent disabled:cursor-not-allowed cursor-pointer transition-colors flex-shrink-0",children:e(L,{size:13})})]})}var we="w-full min-w-0 bg-canvas border border-ink/15 rounded px-2 py-1 text-[11px] font-mono text-ink placeholder:text-ink/35 focus:outline-none focus:border-ink/40";function He(t){if(!t||t.ok)return null;if(t.reason==="cross-origin")return"This page is cross-origin, so its elements cannot be read. Name the part and add a note instead.";if(t.reason==="no-frame")return"The page has not loaded, so its elements cannot be read yet.";return"There is no element at this point (empty space). Name the part instead."}function ve({shape:t,index:r,readability:s,onLabel:l,onNote:c}){let u=He(s),f=t.element;return e("div",{className:"flex items-start gap-1.5 min-w-0",children:[e("span",{className:"text-[11px] font-mono text-ink/45 pt-1 flex-shrink-0",children:[Ud[t.tool]," #",r]}),e("div",{className:"flex-1 min-w-0 space-y-1",children:[e("div",{className:"flex items-center gap-1 flex-wrap",children:[e("span",{className:"text-[10px] uppercase font-mono text-ink/40",children:"bagian"}),v0.map((m)=>{let g=t.label===m;return e("button",{type:"button",onClick:()=>l(g?"":m),"aria-pressed":g,className:`px-1.5 py-0.5 rounded-full border text-[10px] font-mono transition-colors cursor-pointer ${g?"bg-ink text-canvas border-ink":"bg-canvas text-ink/65 border-ink/15 hover:border-ink/40"}`,children:m},m)}),e("input",{value:t.label,onInput:(m)=>l(m.currentTarget.value),placeholder:"or type your own…","aria-label":"Name of the marked part",spellcheck:!1,className:`${we} flex-1 min-w-[110px]`})]}),e("textarea",{value:t.note,onInput:(m)=>c(m.currentTarget.value),placeholder:"What is wrong with this part? (e.g. the Pay button looks disabled)",rows:2,"aria-label":"Annotation note",className:`${we} resize-y`}),f?e("p",{className:"text-[10px] font-mono text-ink/45 truncate",title:f.path,children:["elemen: ",f.path,f.state?` · ${f.state}`:""]}):null,u?e("p",{className:"text-[10px] text-ink/40",children:u}):null]})]})}var De=["box","pin","arrow"],Ge="px-2 py-1 rounded text-[11px] font-mono border transition-colors cursor-pointer",j="flex items-center gap-1 px-2 py-1 rounded text-[11px] border border-ink/15 hover:border-ink/40 text-ink/80 hover:text-ink transition-colors cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed";function ye({tool:t,shapes:r,selectedId:s,readability:l,onTool:c,onLabel:u,onNote:f,onRemove:m,onReset:g,onCancel:y,onSend:R}){let I=r.find((E)=>E.id===s)??null,w=r.length>0;return e("div",{className:"flex-shrink-0 border-b border-ink/10 bg-paper px-2.5 py-1.5 space-y-1.5 select-none",children:[e("div",{className:"flex items-center gap-1.5",children:[e("span",{className:"text-[10px] uppercase font-mono text-ink/50 mr-1",children:"Anotasi"}),De.map((E)=>e("button",{type:"button",onClick:()=>c(E),"aria-pressed":t===E,className:`${Ge} ${t===E?"bg-ink text-canvas border-ink":"bg-canvas text-ink/70 border-ink/15 hover:border-ink/40"}`,children:Ud[E]},E)),e("span",{className:"text-[11px] font-mono text-ink/45 ml-1",children:r.length>0?`${r.length} mark${r.length===1?"":"s"}`:"drag on the page to mark a part"}),e("div",{className:"flex-1"}),e("button",{type:"button",onClick:g,disabled:!w,className:j,title:"Clear all marks",children:[e(Q,{size:12})," Bersihkan"]}),e("button",{type:"button",onClick:R,disabled:!w,className:j,title:"Kirim anotasi ke draft chat",children:[e(er,{size:12})," Kirim ke chat"]}),e("button",{type:"button",onClick:y,className:j,title:"Tutup mode anotasi",children:e(h,{size:12})})]}),I?e("div",{className:"flex items-start gap-1.5",children:[e("div",{className:"flex-1 min-w-0",children:e(ve,{shape:I,index:r.indexOf(I)+1,readability:l,onLabel:(E)=>u(I.id,E),onNote:(E)=>f(I.id,E)})}),e("button",{type:"button",onClick:()=>m(I.id),className:j,title:"Remove this mark",children:e(Q,{size:12})})]}):e("p",{className:"text-[11px] text-ink/45",children:"This page cannot be screenshotted, so what gets sent is the area, the part name and your note."})]})}var Te=0;function ke(){return Te+=1,`annot-${Date.now().toString(36)}-${Te}`}function Ae(t){let[r,s]=n(!1),[l,c]=n("box"),[u,f]=n([]),[m,g]=n(null);o(()=>{f([]),g(null)},[t]);let y=a(()=>{s((N)=>!N),g(null)},[]),R=a(()=>{g(null),s(!1)},[]),I=a((N)=>{f((_)=>[..._,N]),g(N.id)},[]),w=a((N,_)=>{f((x)=>x.map((k)=>k.id===N?{...k,note:_}:k))},[]),E=a((N,_)=>{f((x)=>x.map((k)=>k.id===N?{...k,label:_}:k))},[]),b=a((N)=>{f((_)=>_.filter((x)=>x.id!==N)),g((_)=>_===N?null:_)},[]),F=a(()=>{f([]),g(null)},[]);return{active:r,tool:l,shapes:u,selectedId:m,setTool:c,toggle:y,close:R,add:I,setNote:w,setLabel:E,select:g,remove:b,reset:F}}var Ve=4,V="var(--theme-error)";function Be({shapes:t,tool:r,selectedId:s,onMeasure:l,onAdd:c,onSelect:u}){let f=i(null),m=i(null),[g,y]=n(null),[R,I]=n({width:0,height:0});o(()=>{let x=f.current;if(!x)return;let k=()=>{let A=x.getBoundingClientRect();if(A.width<=0||A.height<=0)return;I((z)=>z.width===A.width&&z.height===A.height?z:{width:A.width,height:A.height}),l({width:A.width,height:A.height})};if(k(),typeof ResizeObserver!=="function")return;let P=new ResizeObserver(k);return P.observe(x),()=>P.disconnect()},[l]);let w=(x)=>{let k=f.current;if(!k)return null;let P=k.getBoundingClientRect(),A={x:x.clientX-P.left,y:x.clientY-P.top};return{normalized:y0(P,A),px:A.x,py:A.y}},E=(x)=>{if(x.button!==0)return;let k=w(x);if(!k)return;x.preventDefault(),u(null),x.currentTarget.setPointerCapture?.(x.pointerId);let P={id:ke(),tool:r,start:k.normalized,end:k.normalized,label:"",note:""};m.current=P,y(P)},b=(x)=>{let k=m.current;if(!k)return;let P=w(x);if(!P)return;let A={...k,end:P.normalized};m.current=A,y(A)},F=(x)=>{let k=m.current;if(!k)return;let P=w(x),A=P?{...k,end:P.normalized}:k;if(m.current=null,y(null),x.currentTarget.releasePointerCapture?.(x.pointerId),A.tool!=="pin"){let z=f.current?.getBoundingClientRect();if((z?Math.hypot((A.end.x-A.start.x)*z.width,(A.end.y-A.start.y)*z.height):0)<Ve)return}c(A)},N=()=>{m.current=null,y(null)},_=g?[...t,g]:t;return e("div",{ref:f,className:"absolute inset-0 cursor-crosshair touch-none",onPointerDown:E,onPointerMove:b,onPointerUp:F,onPointerCancel:N,children:e("svg",{className:"absolute inset-0 w-full h-full",viewBox:`0 0 ${Math.max(1,R.width)} ${Math.max(1,R.height)}`,preserveAspectRatio:"none","aria-label":"Page annotation area",children:_.map((x,k)=>e(Xe,{shape:x,index:k+1,box:R,selected:x.id===s,onSelect:()=>u(x.id)},x.id))})})}function Xe({shape:t,index:r,box:s,selected:l,onSelect:c}){let u={x:t.start.x*s.width,y:t.start.y*s.height},f={x:t.end.x*s.width,y:t.end.y*s.height},m=uf(t),g=l?3:2,y=String(r);return e("g",{onPointerDown:(I)=>{I.stopPropagation(),I.preventDefault(),c()},className:"cursor-pointer",children:[t.tool==="box"&&e("rect",{x:m.x*s.width,y:m.y*s.height,width:Math.max(1,m.width*s.width),height:Math.max(1,m.height*s.height),fill:V,fillOpacity:l?0.16:0.1,stroke:V,strokeWidth:g,vectorEffect:"non-scaling-stroke",rx:3}),t.tool==="arrow"&&e(d,{children:[e("line",{x1:u.x,y1:u.y,x2:f.x,y2:f.y,stroke:V,strokeWidth:g,vectorEffect:"non-scaling-stroke"}),e("circle",{cx:f.x,cy:f.y,r:4,fill:V})]}),t.tool==="pin"&&e("circle",{cx:u.x,cy:u.y,r:7,fill:V,fillOpacity:l?0.5:0.3,stroke:V,strokeWidth:g}),e("circle",{cx:u.x,cy:u.y,r:9,fill:V}),e("text",{x:u.x,y:u.y,textAnchor:"middle",dominantBaseline:"central",fontSize:11,fontWeight:700,fill:"var(--theme-paper)",children:y})]})}function Ee(t){let r=t.trim();if(!r)return r;let s=/^[a-z][a-z0-9+.-]*:/i.test(r)?r:`https://${r}`,l=new URL(s);if(l.protocol!=="http:"&&l.protocol!=="https:")throw Error("Only http and https URLs are allowed");return l.toString()}var Ne="userBrowser.tabs",Se="userBrowser.activeTabId",We="userBrowser.inputUrl",Ze="userBrowser.history",Ye="userBrowser.historyIndex";function Me(){let[t,r]=T(Ne,[]),[s,l]=T(Se,null),[c,u]=T(We,""),[f,m]=n(null),[g,y]=n(void 0),{sessionId:R,ready:I}=Oe(),w=i(null),E=(M,B)=>fe(R,M)??B,b=me(t,s),F=K(b);o(()=>{if(!I||w.current===R)return;w.current=R;let M=E(Ne,[]),B=se(M);if(B.length>0){if(JSON.stringify(B)!==JSON.stringify(M))r(B);let Z=E(Se,null);if(!B.some((v)=>v.id===Z))l(B[B.length-1].id);return}let[U]=se([{id:W(),history:E(Ze,[]),index:E(Ye,-1),frameKey:0}]),C=U&&U.history.length>0?U:Y(W());r([C]),l(C.id)},[I,R,r,l]);let N=a((M,B)=>{r((U)=>U.map((C)=>C.id===M?B(C):C))},[r]),_=a((M)=>{let B=M.trim();if(!B)return;let U;try{U=Ee(B)}catch(C){y(C instanceof Error?C.message:"Alamat tidak valid");return}if(y(void 0),u(U),!b){let C=Y(W(),U);r([C]),l(C.id),m(C.id);return}m(b.id),N(b.id,(C)=>ue(C,U))},[b,l,u,r,N]),x=a(()=>{if(!b||!te(b))return;m(b.id),N(b.id,(M)=>oe(M,-1))},[b,N]),k=a(()=>{if(!b||!ne(b))return;m(b.id),N(b.id,(M)=>oe(M,1))},[b,N]),P=a(()=>{if(!b||!F)return;m(b.id),N(b.id,re)},[b,F,N]),A=a((M)=>{m((B)=>B===M?null:B)},[]),z=a(()=>{if(t.length>=X)return;let M=Y(W());r((B)=>[...B,M]),l(M.id),u(""),y(void 0)},[l,u,r,t.length]),D=a((M)=>{let B=t.find((U)=>U.id===M);if(!B)return;l(M),u(K(B)),y(void 0)},[l,u,t]),G=a((M)=>{let B=pe(t,s,M);if(B.tabs.length===0){let U=Y(W());r([U]),l(U.id),u("");return}if(r(B.tabs),B.activeId!==s){l(B.activeId);let U=B.tabs.find((C)=>C.id===B.activeId);u(K(U)),y(void 0)}},[s,l,u,r,t]);return{tabs:t,activeTab:b,activeTabId:b?.id??null,url:F,input:c,setInput:u,frameKey:b?.frameKey??0,loading:f!==null&&f===b?.id,error:g,canGoBack:te(b),canGoForward:ne(b),canOpenTab:t.length<X,submit:_,goBack:x,goForward:k,reload:P,markLoaded:A,openTab:z,selectTab:D,closeTab:G}}function je(t){if(!t)return"no-frame";try{return t.contentDocument?"readable":"cross-origin"}catch{return"cross-origin"}}function q(t){let r=t.replace(/\s+/g," ").trim();return r.length>60?`${r.slice(0,59)}…`:r}function Je(t){let r=t.tagName.toLowerCase();if(t.id)return`${r}#${t.id}`;for(let l of["data-testid","data-test","aria-label"]){let c=t.getAttribute(l);if(c)return`${r}[${l}="${q(c)}"]`}let s=t.getAttribute("role");if(s)return`${r}[role="${s}"]`;return r}function Qe(t){let r=[],s=t;while(s&&r.length<4){if(s.tagName.toLowerCase()==="html")break;r.unshift(Je(s)),s=s.parentElement}return r.join(" > ")}function et(t){let r=[];if(t.disabled)r.push("nonaktif");if(t instanceof HTMLSelectElement||t.tagName.toLowerCase()==="select"){let s=t,c=s.selectedOptions?.[0]?.textContent?.trim()||s.value;if(c)r.push(`nilai "${q(c)}"`);let u=s.options?.length??0;if(u>0)r.push(`${u} opsi`)}else if(t.tagName.toLowerCase()==="input"){let s=t;if(s.type)r.push(`tipe ${s.type}`);if(s.type!=="password"&&s.placeholder)r.push(`placeholder "${q(s.placeholder)}"`)}return r.length>0?r.join(", "):void 0}function tt(t){let r={path:Qe(t),tag:t.tagName.toLowerCase()},s=t.getAttribute("role");if(s)r.role=s;let l=q(t.innerText??t.textContent??"");if(l)r.text=l;let c=et(t);if(c)r.state=c;return r}function Le(t,r){let s=je(t);if(s!=="readable")return{ok:!1,reason:s};let{contentWindow:l,contentDocument:c}=t;if(!l||!c)return{ok:!1,reason:"cross-origin"};try{let u=Math.min(Math.max(r.x,0),1)*l.innerWidth,f=Math.min(Math.max(r.y,0),1)*l.innerHeight,m=c.elementFromPoint(u,f);if(!m||m===c.documentElement||m===c.body)return{ok:!1,reason:"no-element"};return{ok:!0,element:tt(m)}}catch{return{ok:!1,reason:"cross-origin"}}}function on({className:t="",active:r=!0}){let[s,l]=T("userBrowser.viewportMode","responsive"),[c,u]=T("userBrowser.zoomLevel",100),[f,m]=n(null),[g,y]=n(null),[R,I]=n(null),{tabs:w,activeTabId:E,url:b,input:F,setInput:N,loading:_,error:x,canGoBack:k,canGoForward:P,canOpenTab:A,submit:z,goBack:D,goForward:G,reload:M,markLoaded:B,openTab:U,selectTab:C,closeTab:Z}=Me(),v=Ae(`${E??""}:${w.find((O)=>O.id===E)?.frameKey??0}`),Ie=a(()=>{if(!b)return;window.open(b,"_blank","noopener,noreferrer")},[b]),Ue=a(()=>{if(!b)return;Uc({url:b})},[b]),Re=a((O)=>{m((H)=>H&&H.width===O.width&&H.height===O.height?H:O)},[]),Pe=a((O)=>{let H=Le(g,O.start);I(H),v.add(H.ok?{...O,element:H.element}:O)},[v,g]),Ce=a(()=>{if(!b||v.shapes.length===0)return;let O=c/100;Uc({url:b,annotations:v.shapes,panel:{width:(f?.width??0)/O,height:(f?.height??0)/O,viewportMode:s,zoom:c}}),v.close()},[b,v,f,s,c]),J=v.active&&Boolean(b),_e=_?E??null:null;return e("div",{"data-user-browser-panel":"",className:`flex flex-col h-full w-full bg-paper text-ink overflow-hidden ${t}`,children:[e(xe,{tabs:w,activeTabId:E,canOpenTab:A,onSelect:C,onClose:Z,onNewTab:U}),e(ae,{url:b,input:F,loading:_,error:x,canGoBack:k,canGoForward:P,viewportMode:s,zoomLevel:c,onInputChange:N,onSubmit:z,onBack:D,onForward:G,onReload:M,onOpenExternal:Ie,onIncludeInChat:Ue,onChangeViewport:l,onZoomIn:()=>u((O)=>Math.min(200,O+10)),onZoomOut:()=>u((O)=>Math.max(50,O-10)),onResetZoom:()=>u(100),onSetZoom:u,focusKey:E??void 0,annotate:{active:J,count:v.shapes.length,onToggle:v.toggle}}),J&&e(ye,{tool:v.tool,shapes:v.shapes,selectedId:v.selectedId,readability:R,onTool:v.setTool,onLabel:v.setLabel,onNote:v.setNote,onRemove:v.remove,onReset:v.reset,onCancel:v.close,onSend:Ce}),e(be,{tabs:w,activeTabId:E,loadingTabId:_e,viewportMode:s,zoomLevel:c,onLoad:B,onFrame:y,active:r,overlay:J?e(Be,{shapes:v.shapes,tool:v.tool,selectedId:v.selectedId,onMeasure:Re,onAdd:Pe,onSelect:v.select}):null})]})}export{on as UserBrowserPanel};
|
|
1
|
+
import{d,n,o,i,a,e,Pe,me,S,p,Q,mn,Na,qe,L,D,tr,h,C0,mf,Gd,E0,Gc}from"./index-4vtc4xct.js";import{md}from"./index-3x7cbxwq.js";import"./index-z5s9tmj8.js";var Oe={idle:"Kosong",loading:"Memuat",ready:"Siap"},ee="p-1 rounded hover:bg-ink/5 disabled:opacity-25 disabled:hover:bg-transparent text-ink/70 hover:text-ink cursor-pointer disabled:cursor-not-allowed transition-colors";function ae({url:t,input:r,loading:s,error:l,canGoBack:c,canGoForward:u,viewportMode:f,zoomLevel:m,onInputChange:g,onSubmit:y,onBack:U,onForward:M,onReload:w,onOpenExternal:B,onIncludeInChat:b,onChangeViewport:z,onZoomIn:E,onZoomOut:C,onResetZoom:x,onSetZoom:T,annotate:R,focusKey:k}){let O=i(void 0),H=i(null),G=i(null);o(()=>{if(O.current===t)return;O.current=t;let v=G.current;if(G.current=null,!t)return;if(v!==null&&v!==r)return;g(t)},[t,r,g]);let N=i(k);o(()=>{if(k===void 0||N.current===k)return;if(N.current=k,t)return;H.current?.focus()},[k,t]);let A=(v)=>{G.current=v,g(v)},I=!t?"idle":s?"loading":"ready",P=I==="ready"?"bg-success animate-pulse":I==="loading"?"bg-ink/40 animate-pulse":"bg-ink/25",Z=e("div",{className:"flex items-center bg-canvas border border-ink/10 rounded-md p-0.5 space-x-0.5 flex-shrink-0",children:[e("button",{type:"button",onClick:U,disabled:!c,"aria-label":"Back",title:"Back",className:ee,children:e(mn,{size:12})}),e("button",{type:"button",onClick:M,disabled:!u,"aria-label":"Maju",title:"Maju",className:ee,children:e(Na,{size:12})}),e("button",{type:"button",onClick:w,disabled:!t,"aria-label":"Reload",title:"Reload",className:ee,children:e(D,{size:12,className:s?"animate-spin":void 0})})]});return e(md,{twoRows:!0,url:t,statusDotClass:P,statusLabel:Oe[I],viewportMode:f,zoomLevel:m,onChangeViewport:z,onZoomIn:E,onZoomOut:C,onResetZoom:x,onSetZoom:T,annotate:R,onIncludeInChat:b,onOpenExternal:B,openExternalLabel:"Buka di tab baru",openExternalTitle:"Buka di tab baru (untuk situs yang menolak iframe)",children:e("div",{className:"flex items-center flex-1 min-w-0 space-x-1.5",children:[Z,e("form",{className:`flex-1 min-w-0 flex items-center bg-canvas border rounded-md px-2 py-1 space-x-1 focus-within:border-ink/40 ${l?"border-error":"border-ink/15"}`,onSubmit:(v)=>{v.preventDefault(),y(r)},children:[e(qe,{size:12,className:"text-ink/40 flex-shrink-0"}),e("input",{ref:H,type:"text",value:r,onChange:(v)=>A(v.currentTarget.value),placeholder:"Type an address (e.g. localhost:5173) and press Enter…","aria-label":"Browser address","aria-invalid":l!==void 0&&l!==null,title:l??void 0,spellcheck:!1,autoComplete:"off",className:`w-full min-w-0 bg-transparent outline-none font-mono text-[11px] placeholder:text-ink/35 ${l?"text-error-text":"text-ink/90"}`})]})]})})}var ie={"desktop-16-9":"w-full max-w-[1280px] aspect-video max-h-full border border-ink/20 rounded-lg shadow-md overflow-hidden my-auto",laptop:"w-[1024px] max-w-full h-[768px] max-h-full border border-ink/20 rounded-lg shadow-md overflow-hidden my-auto",tablet:"w-[768px] max-w-full h-[1024px] max-h-full border border-ink/20 rounded-lg shadow-md overflow-hidden my-auto",mobile:"w-[375px] max-w-full h-[667px] max-h-full border border-ink/20 rounded-xl shadow-md overflow-hidden my-auto","mobile-lg":"w-[414px] max-w-full h-[896px] max-h-full border border-ink/20 rounded-xl shadow-md overflow-hidden my-auto",responsive:"w-full h-full border-0"};function le(t){let r=t.trim();if(!r)return"";try{let s=new URL(r),l=s.pathname==="/"?"":s.pathname;return`${s.hostname}${l}`.slice(0,64)}catch{return r.slice(0,64)}}var X=12,ce=60,ze=8192,de=0;function W(){return de+=1,`tab-${Date.now().toString(36)}-${de}`}function Y(t,r=""){return r?{id:t,history:[r],index:0,frameKey:0}:{id:t,history:[],index:-1,frameKey:0}}function F(t){if(!t||t.index<0)return"";return t.history[t.index]??""}function te(t){return Boolean(t)&&t.index>0}function ne(t){return Boolean(t)&&t.index>=0&&t.index<t.history.length-1}function ue(t,r){if(F(t)===r)return re(t);let s=[...t.history.slice(0,t.index+1),r],l=Math.max(0,s.length-ce),c=l>0?s.slice(l):s;return{...t,history:c,index:c.length-1,frameKey:t.frameKey+1}}function oe(t,r){let s=t.index+r;if(s<0||s>=t.history.length)return t;return{...t,index:s}}function re(t){return{...t,frameKey:t.frameKey+1}}function pe(t,r,s){let l=t.findIndex((f)=>f.id===s);if(l===-1)return{tabs:t,activeId:r};let c=t.filter((f)=>f.id!==s);if(r!==s)return{tabs:c,activeId:r};let u=c[Math.min(l,c.length-1)]??null;return{tabs:c,activeId:u?u.id:null}}function fe(t,r){return t.find((s)=>s.id===r)??t[t.length-1]??null}function Fe(t){if(!Array.isArray(t))return[];let r=[];for(let s of t){if(typeof s!=="string")continue;let l=s.trim();if(!l||l.length>ze)continue;if(r.push(l),r.length>=ce)break}return r}function se(t){if(!Array.isArray(t))return[];let r=[],s=new Set;for(let l of t){if(typeof l!=="object"||l===null)continue;let c=l,u=typeof c.id==="string"?c.id.trim():"";if(!u||s.has(u))continue;let f=Fe(c.history),m=typeof c.index==="number"&&Number.isFinite(c.index)?Math.trunc(c.index):-1,g=f.length===0?-1:Math.min(f.length-1,Math.max(0,m===-1?0:m)),y=typeof c.frameKey==="number"&&Number.isFinite(c.frameKey)?Math.trunc(c.frameKey):0;if(s.add(u),r.push({id:u,history:f,index:g,frameKey:Math.max(0,y)}),r.length>=X)break}return r}function he(t){return le(F(t))||"Tab baru"}var Ke="clipboard-read; clipboard-write; fullscreen";function be({tabs:t,activeTabId:r,loadingTabId:s,viewportMode:l,zoomLevel:c,onLoad:u,active:f=!0,overlay:m,onFrame:g}){let y=i(new Map),U=t.map((w)=>`${w.id}:${w.frameKey}`).join("|");if(o(()=>{g?.(r?y.current.get(r)??null:null)},[r,g,U]),!f)return null;let M=t.filter((w)=>F(w)!=="");if(M.length===0)return e("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center select-none",children:[e("div",{className:"w-12 h-12 rounded-xl bg-ink/5 border border-ink/10 flex items-center justify-center text-ink/40 mb-3",children:e(qe,{size:22})}),e("h3",{className:"text-sm font-semibold text-ink mb-1",children:"Browser Anda"}),e("p",{className:"text-xs text-ink/60 max-w-sm",children:"Type an address above and press Enter. The page loads inside this panel."}),e("p",{className:"text-[11px] text-ink/45 max-w-sm mt-2",children:"Sebagian situs (Google, GitHub) menolak ditampilkan dalam iframe — pakai tombol buka di tab baru."})]});return e("div",{className:"flex-1 min-h-0 relative flex items-center justify-center p-2 overflow-auto bg-canvas/60",children:M.map((w)=>{let B=F(w),b=w.id===r,z=w.id===s;return e("div",{"data-user-browser-tab":w.id,className:b?"relative flex-1 min-h-0 flex items-center justify-center":"hidden",children:[z?e("div",{className:"absolute inset-0 z-10 flex items-center justify-center pointer-events-none",children:e("div",{className:"flex items-center space-x-2 px-3 py-1.5 rounded-md bg-paper border border-ink/15",children:[e(p,{size:13,className:"animate-spin text-ink/50"}),e("span",{className:"text-[11px] font-mono text-ink/60",children:"Memuat…"})]})}):null,e("div",{className:`relative flex flex-col bg-white ${ie[l]} transition-all duration-200`,style:{zoom:c!==100?`${c}%`:void 0,transformOrigin:"top center"},children:[e("iframe",{ref:(E)=>{if(E)y.current.set(w.id,E);else y.current.delete(w.id)},src:B,title:`Browser pengguna ${w.id}`,onLoad:()=>u(w.id),referrerPolicy:"no-referrer",allow:Ke,className:"w-full h-full bg-white border-0",style:b&&m?{pointerEvents:"none"}:void 0},`${w.id}:${w.frameKey}`),b?m:null]})]},w.id)})})}var ge="cursor-pointer transition-colors";function xe({tabs:t,activeTabId:r,canOpenTab:s,onSelect:l,onClose:c,onNewTab:u}){let f=i(null);return o(()=>{f.current?.scrollIntoView({block:"nearest",inline:"nearest"})},[r,t.length]),e("div",{"data-toolbar-band":"strip",className:"h-8 px-1.5 border-b border-ink/10 bg-paper flex items-center gap-1 flex-shrink-0 select-none",children:[e("div",{className:"flex-1 min-w-0 flex items-center gap-1 overflow-x-auto",children:t.map((m)=>{let g=m.id===r,y=he(m),U=F(m);return e("div",{ref:g?f:void 0,className:`group flex items-center rounded border flex-shrink-0 ${g?"bg-ink text-canvas border-ink":"bg-paper text-ink/70 border-ink/15 hover:border-ink/35 hover:text-ink"}`,children:[e("button",{type:"button",onClick:()=>l(m.id),"aria-pressed":g,"aria-label":`Tab ${y}`,title:U?`${y}
|
|
2
|
+
${U}`:y,className:`pl-2 pr-1 py-0.5 text-[11px] font-mono max-w-[150px] truncate ${ge}`,children:y}),e("button",{type:"button",onClick:()=>c(m.id),"aria-label":`Tutup tab ${y}`,title:`Tutup tab ${y}`,className:`mr-0.5 p-1 rounded hover:bg-error hover:text-paper ${ge} ${g?"text-on-ink-muted":"text-ink/40 opacity-0 group-hover:opacity-100 focus-visible:opacity-100"}`,children:e(h,{size:11})})]},m.id)})}),e("button",{type:"button",onClick:u,disabled:!s,"aria-label":"Tab baru",title:s?"Tab baru":`Maksimal ${X} tab`,className:"p-1 rounded hover:bg-ink/5 text-ink/60 hover:text-ink disabled:opacity-30 disabled:hover:bg-transparent disabled:cursor-not-allowed cursor-pointer transition-colors flex-shrink-0",children:e(L,{size:13})})]})}var we="w-full min-w-0 bg-canvas border border-ink/15 rounded px-2 py-1 text-[11px] font-mono text-ink placeholder:text-ink/35 focus:outline-none focus:border-ink/40";function He(t){if(!t||t.ok)return null;if(t.reason==="cross-origin")return"This page is cross-origin, so its elements cannot be read. Name the part and add a note instead.";if(t.reason==="no-frame")return"The page has not loaded, so its elements cannot be read yet.";return"There is no element at this point (empty space). Name the part instead."}function ve({shape:t,index:r,readability:s,onLabel:l,onNote:c}){let u=He(s),f=t.element;return e("div",{className:"flex items-start gap-1.5 min-w-0",children:[e("span",{className:"text-[11px] font-mono text-ink/45 pt-1 flex-shrink-0",children:[Gd[t.tool]," #",r]}),e("div",{className:"flex-1 min-w-0 space-y-1",children:[e("div",{className:"flex items-center gap-1 flex-wrap",children:[e("span",{className:"text-[10px] uppercase font-mono text-ink/40",children:"bagian"}),E0.map((m)=>{let g=t.label===m;return e("button",{type:"button",onClick:()=>l(g?"":m),"aria-pressed":g,className:`px-1.5 py-0.5 rounded-full border text-[10px] font-mono transition-colors cursor-pointer ${g?"bg-ink text-canvas border-ink":"bg-canvas text-ink/65 border-ink/15 hover:border-ink/40"}`,children:m},m)}),e("input",{value:t.label,onInput:(m)=>l(m.currentTarget.value),placeholder:"or type your own…","aria-label":"Name of the marked part",spellcheck:!1,className:`${we} flex-1 min-w-[110px]`})]}),e("textarea",{value:t.note,onInput:(m)=>c(m.currentTarget.value),placeholder:"What is wrong with this part? (e.g. the Pay button looks disabled)",rows:2,"aria-label":"Annotation note",className:`${we} resize-y`}),f?e("p",{className:"text-[10px] font-mono text-ink/45 truncate",title:f.path,children:["elemen: ",f.path,f.state?` · ${f.state}`:""]}):null,u?e("p",{className:"text-[10px] text-ink/40",children:u}):null]})]})}var De=["box","pin","arrow"],Ge="px-2 py-1 rounded text-[11px] font-mono border transition-colors cursor-pointer",j="flex items-center gap-1 px-2 py-1 rounded text-[11px] border border-ink/15 hover:border-ink/40 text-ink/80 hover:text-ink transition-colors cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed";function ye({tool:t,shapes:r,selectedId:s,readability:l,onTool:c,onLabel:u,onNote:f,onRemove:m,onReset:g,onCancel:y,onSend:U}){let M=r.find((B)=>B.id===s)??null,w=r.length>0;return e("div",{className:"flex-shrink-0 border-b border-ink/10 bg-paper px-2.5 py-1.5 space-y-1.5 select-none",children:[e("div",{className:"flex items-center gap-1.5",children:[e("span",{className:"text-[10px] uppercase font-mono text-ink/50 mr-1",children:"Anotasi"}),De.map((B)=>e("button",{type:"button",onClick:()=>c(B),"aria-pressed":t===B,className:`${Ge} ${t===B?"bg-ink text-canvas border-ink":"bg-canvas text-ink/70 border-ink/15 hover:border-ink/40"}`,children:Gd[B]},B)),e("span",{className:"text-[11px] font-mono text-ink/45 ml-1",children:r.length>0?`${r.length} mark${r.length===1?"":"s"}`:"drag on the page to mark a part"}),e("div",{className:"flex-1"}),e("button",{type:"button",onClick:g,disabled:!w,className:j,title:"Clear all marks",children:[e(Q,{size:12})," Bersihkan"]}),e("button",{type:"button",onClick:U,disabled:!w,className:j,title:"Kirim anotasi ke draft chat",children:[e(tr,{size:12})," Kirim ke chat"]}),e("button",{type:"button",onClick:y,className:j,title:"Tutup mode anotasi",children:e(h,{size:12})})]}),M?e("div",{className:"flex items-start gap-1.5",children:[e("div",{className:"flex-1 min-w-0",children:e(ve,{shape:M,index:r.indexOf(M)+1,readability:l,onLabel:(B)=>u(M.id,B),onNote:(B)=>f(M.id,B)})}),e("button",{type:"button",onClick:()=>m(M.id),className:j,title:"Remove this mark",children:e(Q,{size:12})})]}):e("p",{className:"text-[11px] text-ink/45",children:"This page cannot be screenshotted, so what gets sent is the area, the part name and your note."})]})}var Te=0;function ke(){return Te+=1,`annot-${Date.now().toString(36)}-${Te}`}function Ae(t){let[r,s]=n(!1),[l,c]=n("box"),[u,f]=n([]),[m,g]=n(null);o(()=>{f([]),g(null)},[t]);let y=a(()=>{s((E)=>!E),g(null)},[]),U=a(()=>{g(null),s(!1)},[]),M=a((E)=>{f((C)=>[...C,E]),g(E.id)},[]),w=a((E,C)=>{f((x)=>x.map((T)=>T.id===E?{...T,note:C}:T))},[]),B=a((E,C)=>{f((x)=>x.map((T)=>T.id===E?{...T,label:C}:T))},[]),b=a((E)=>{f((C)=>C.filter((x)=>x.id!==E)),g((C)=>C===E?null:C)},[]),z=a(()=>{f([]),g(null)},[]);return{active:r,tool:l,shapes:u,selectedId:m,setTool:c,toggle:y,close:U,add:M,setNote:w,setLabel:B,select:g,remove:b,reset:z}}var Ve=4,V="var(--theme-error)";function Be({shapes:t,tool:r,selectedId:s,onMeasure:l,onAdd:c,onSelect:u}){let f=i(null),m=i(null),[g,y]=n(null),[U,M]=n({width:0,height:0});o(()=>{let x=f.current;if(!x)return;let T=()=>{let k=x.getBoundingClientRect();if(k.width<=0||k.height<=0)return;M((O)=>O.width===k.width&&O.height===k.height?O:{width:k.width,height:k.height}),l({width:k.width,height:k.height})};if(T(),typeof ResizeObserver!=="function")return;let R=new ResizeObserver(T);return R.observe(x),()=>R.disconnect()},[l]);let w=(x)=>{let T=f.current;if(!T)return null;let R=T.getBoundingClientRect(),k={x:x.clientX-R.left,y:x.clientY-R.top};return{normalized:C0(R,k),px:k.x,py:k.y}},B=(x)=>{if(x.button!==0)return;let T=w(x);if(!T)return;x.preventDefault(),u(null),x.currentTarget.setPointerCapture?.(x.pointerId);let R={id:ke(),tool:r,start:T.normalized,end:T.normalized,label:"",note:""};m.current=R,y(R)},b=(x)=>{let T=m.current;if(!T)return;let R=w(x);if(!R)return;let k={...T,end:R.normalized};m.current=k,y(k)},z=(x)=>{let T=m.current;if(!T)return;let R=w(x),k=R?{...T,end:R.normalized}:T;if(m.current=null,y(null),x.currentTarget.releasePointerCapture?.(x.pointerId),k.tool!=="pin"){let O=f.current?.getBoundingClientRect();if((O?Math.hypot((k.end.x-k.start.x)*O.width,(k.end.y-k.start.y)*O.height):0)<Ve)return}c(k)},E=()=>{m.current=null,y(null)},C=g?[...t,g]:t;return e("div",{ref:f,className:"absolute inset-0 cursor-crosshair touch-none",onPointerDown:B,onPointerMove:b,onPointerUp:z,onPointerCancel:E,children:e("svg",{className:"absolute inset-0 w-full h-full",viewBox:`0 0 ${Math.max(1,U.width)} ${Math.max(1,U.height)}`,preserveAspectRatio:"none","aria-label":"Page annotation area",children:C.map((x,T)=>e(Xe,{shape:x,index:T+1,box:U,selected:x.id===s,onSelect:()=>u(x.id)},x.id))})})}function Xe({shape:t,index:r,box:s,selected:l,onSelect:c}){let u={x:t.start.x*s.width,y:t.start.y*s.height},f={x:t.end.x*s.width,y:t.end.y*s.height},m=mf(t),g=l?3:2,y=String(r);return e("g",{onPointerDown:(M)=>{M.stopPropagation(),M.preventDefault(),c()},className:"cursor-pointer",children:[t.tool==="box"&&e("rect",{x:m.x*s.width,y:m.y*s.height,width:Math.max(1,m.width*s.width),height:Math.max(1,m.height*s.height),fill:V,fillOpacity:l?0.16:0.1,stroke:V,strokeWidth:g,vectorEffect:"non-scaling-stroke",rx:3}),t.tool==="arrow"&&e(d,{children:[e("line",{x1:u.x,y1:u.y,x2:f.x,y2:f.y,stroke:V,strokeWidth:g,vectorEffect:"non-scaling-stroke"}),e("circle",{cx:f.x,cy:f.y,r:4,fill:V})]}),t.tool==="pin"&&e("circle",{cx:u.x,cy:u.y,r:7,fill:V,fillOpacity:l?0.5:0.3,stroke:V,strokeWidth:g}),e("circle",{cx:u.x,cy:u.y,r:9,fill:V}),e("text",{x:u.x,y:u.y,textAnchor:"middle",dominantBaseline:"central",fontSize:11,fontWeight:700,fill:"var(--theme-paper)",children:y})]})}function Ee(t){let r=t.trim();if(!r)return r;let s=/^[a-z][a-z0-9+.-]*:/i.test(r)?r:`https://${r}`,l=new URL(s);if(l.protocol!=="http:"&&l.protocol!=="https:")throw Error("Only http and https URLs are allowed");return l.toString()}var Ne="userBrowser.tabs",Se="userBrowser.activeTabId",We="userBrowser.inputUrl",Ze="userBrowser.history",Ye="userBrowser.historyIndex";function Me(){let[t,r]=S(Ne,[]),[s,l]=S(Se,null),[c,u]=S(We,""),[f,m]=n(null),[g,y]=n(void 0),{sessionId:U,ready:M}=Pe(),w=i(null),B=(N,A)=>me(U,N)??A,b=fe(t,s),z=F(b);o(()=>{if(!M||w.current===U)return;w.current=U;let N=B(Ne,[]),A=se(N);if(A.length>0){if(JSON.stringify(A)!==JSON.stringify(N))r(A);let Z=B(Se,null);if(!A.some((v)=>v.id===Z))l(A[A.length-1].id);return}let[I]=se([{id:W(),history:B(Ze,[]),index:B(Ye,-1),frameKey:0}]),P=I&&I.history.length>0?I:Y(W());r([P]),l(P.id)},[M,U,r,l]);let E=a((N,A)=>{r((I)=>I.map((P)=>P.id===N?A(P):P))},[r]),C=a((N)=>{let A=N.trim();if(!A)return;let I;try{I=Ee(A)}catch(P){y(P instanceof Error?P.message:"Alamat tidak valid");return}if(y(void 0),u(I),!b){let P=Y(W(),I);r([P]),l(P.id),m(P.id);return}m(b.id),E(b.id,(P)=>ue(P,I))},[b,l,u,r,E]),x=a(()=>{if(!b||!te(b))return;m(b.id),E(b.id,(N)=>oe(N,-1))},[b,E]),T=a(()=>{if(!b||!ne(b))return;m(b.id),E(b.id,(N)=>oe(N,1))},[b,E]),R=a(()=>{if(!b||!z)return;m(b.id),E(b.id,re)},[b,z,E]),k=a((N)=>{m((A)=>A===N?null:A)},[]),O=a(()=>{if(t.length>=X)return;let N=Y(W());r((A)=>[...A,N]),l(N.id),u(""),y(void 0)},[l,u,r,t.length]),H=a((N)=>{let A=t.find((I)=>I.id===N);if(!A)return;l(N),u(F(A)),y(void 0)},[l,u,t]),G=a((N)=>{let A=pe(t,s,N);if(A.tabs.length===0){let I=Y(W());r([I]),l(I.id),u("");return}if(r(A.tabs),A.activeId!==s){l(A.activeId);let I=A.tabs.find((P)=>P.id===A.activeId);u(F(I)),y(void 0)}},[s,l,u,r,t]);return{tabs:t,activeTab:b,activeTabId:b?.id??null,url:z,input:c,setInput:u,frameKey:b?.frameKey??0,loading:f!==null&&f===b?.id,error:g,canGoBack:te(b),canGoForward:ne(b),canOpenTab:t.length<X,submit:C,goBack:x,goForward:T,reload:R,markLoaded:k,openTab:O,selectTab:H,closeTab:G}}function je(t){if(!t)return"no-frame";try{return t.contentDocument?"readable":"cross-origin"}catch{return"cross-origin"}}function q(t){let r=t.replace(/\s+/g," ").trim();return r.length>60?`${r.slice(0,59)}…`:r}function Je(t){let r=t.tagName.toLowerCase();if(t.id)return`${r}#${t.id}`;for(let l of["data-testid","data-test","aria-label"]){let c=t.getAttribute(l);if(c)return`${r}[${l}="${q(c)}"]`}let s=t.getAttribute("role");if(s)return`${r}[role="${s}"]`;return r}function Qe(t){let r=[],s=t;while(s&&r.length<4){if(s.tagName.toLowerCase()==="html")break;r.unshift(Je(s)),s=s.parentElement}return r.join(" > ")}function et(t){let r=[];if(t.disabled)r.push("nonaktif");if(t instanceof HTMLSelectElement||t.tagName.toLowerCase()==="select"){let s=t,c=s.selectedOptions?.[0]?.textContent?.trim()||s.value;if(c)r.push(`nilai "${q(c)}"`);let u=s.options?.length??0;if(u>0)r.push(`${u} opsi`)}else if(t.tagName.toLowerCase()==="input"){let s=t;if(s.type)r.push(`tipe ${s.type}`);if(s.type!=="password"&&s.placeholder)r.push(`placeholder "${q(s.placeholder)}"`)}return r.length>0?r.join(", "):void 0}function tt(t){let r={path:Qe(t),tag:t.tagName.toLowerCase()},s=t.getAttribute("role");if(s)r.role=s;let l=q(t.innerText??t.textContent??"");if(l)r.text=l;let c=et(t);if(c)r.state=c;return r}function Le(t,r){let s=je(t);if(s!=="readable")return{ok:!1,reason:s};let{contentWindow:l,contentDocument:c}=t;if(!l||!c)return{ok:!1,reason:"cross-origin"};try{let u=Math.min(Math.max(r.x,0),1)*l.innerWidth,f=Math.min(Math.max(r.y,0),1)*l.innerHeight,m=c.elementFromPoint(u,f);if(!m||m===c.documentElement||m===c.body)return{ok:!1,reason:"no-element"};return{ok:!0,element:tt(m)}}catch{return{ok:!1,reason:"cross-origin"}}}function on({className:t="",active:r=!0}){let[s,l]=S("userBrowser.viewportMode","responsive"),[c,u]=S("userBrowser.zoomLevel",100),[f,m]=n(null),[g,y]=n(null),[U,M]=n(null),{tabs:w,activeTabId:B,url:b,input:z,setInput:E,loading:C,error:x,canGoBack:T,canGoForward:R,canOpenTab:k,submit:O,goBack:H,goForward:G,reload:N,markLoaded:A,openTab:I,selectTab:P,closeTab:Z}=Me(),v=Ae(`${B??""}:${w.find((_)=>_.id===B)?.frameKey??0}`),Ie=a(()=>{if(!b)return;window.open(b,"_blank","noopener,noreferrer")},[b]),Ue=a(()=>{if(!b)return;Gc({url:b})},[b]),Re=a((_)=>{m((K)=>K&&K.width===_.width&&K.height===_.height?K:_)},[]),Ce=a((_)=>{let K=Le(g,_.start);M(K),v.add(K.ok?{..._,element:K.element}:_)},[v,g]),_e=a(()=>{if(!b||v.shapes.length===0)return;let _=c/100;Gc({url:b,annotations:v.shapes,panel:{width:(f?.width??0)/_,height:(f?.height??0)/_,viewportMode:s,zoom:c}}),v.close()},[b,v,f,s,c]),J=v.active&&Boolean(b),$e=C?B??null:null;return e("div",{"data-user-browser-panel":"",className:`flex flex-col h-full w-full bg-paper text-ink overflow-hidden ${t}`,children:[e(xe,{tabs:w,activeTabId:B,canOpenTab:k,onSelect:P,onClose:Z,onNewTab:I}),e(ae,{url:b,input:z,loading:C,error:x,canGoBack:T,canGoForward:R,viewportMode:s,zoomLevel:c,onInputChange:E,onSubmit:O,onBack:H,onForward:G,onReload:N,onOpenExternal:Ie,onIncludeInChat:Ue,onChangeViewport:l,onZoomIn:()=>u((_)=>Math.min(200,_+10)),onZoomOut:()=>u((_)=>Math.max(50,_-10)),onResetZoom:()=>u(100),onSetZoom:u,focusKey:B??void 0,annotate:{active:J,count:v.shapes.length,onToggle:v.toggle}}),J&&e(ye,{tool:v.tool,shapes:v.shapes,selectedId:v.selectedId,readability:U,onTool:v.setTool,onLabel:v.setLabel,onNote:v.setNote,onRemove:v.remove,onReset:v.reset,onCancel:v.close,onSend:_e}),e(be,{tabs:w,activeTabId:B,loadingTabId:$e,viewportMode:s,zoomLevel:c,onLoad:A,onFrame:y,active:r,overlay:J?e(Be,{shapes:v.shapes,tool:v.tool,selectedId:v.selectedId,onMeasure:Re,onAdd:Ce,onSelect:v.select}):null})]})}export{on as UserBrowserPanel};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e=Object.freeze(JSON.parse('{"displayName":"Shell","name":"shellscript","patterns":[{"include":"#initial_context"}],"repository":{"alias_statement":{"begin":"[\\\\t ]*+(alias)[\\\\t ]*+((?:((?<!\\\\w)-\\\\w+)\\\\b[\\\\t ]*+)*)[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))","beginCaptures":{"1":{"name":"storage.type.alias.shell"},"2":{"patterns":[{"match":"(?<!\\\\w)-\\\\w+\\\\b","name":"string.unquoted.argument.shell constant.other.option.shell"}]},"3":{"name":"string.unquoted.argument.shell constant.other.option.shell"},"4":{"name":"variable.other.assignment.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"variable.other.assignment.shell"},"7":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"8":{"name":"punctuation.definition.array.access.shell"},"9":{"name":"keyword.operator.assignment.shell"},"10":{"name":"keyword.operator.assignment.compound.shell"},"11":{"name":"keyword.operator.assignment.compound.shell"}},"end":"(?=[\\\\t ]|$)|(?:(?:(?:(;)|(&&))|(\\\\|\\\\|))|(&))","endCaptures":{"1":{"name":"punctuation.terminator.statement.semicolon.shell"},"2":{"name":"punctuation.separator.statement.and.shell"},"3":{"name":"punctuation.separator.statement.or.shell"},"4":{"name":"punctuation.separator.statement.background.shell"}},"name":"meta.expression.assignment.alias.shell","patterns":[{"include":"#normal_context"}]},"argument":{"begin":"[\\\\t ]++(?![\\\\n#\\\\&(\\\\[|]|$|;)","beginCaptures":{},"end":"(?=[\\\\t \\\\&;|]|$|[\\\\n)`])","endCaptures":{},"name":"meta.argument.shell","patterns":[{"include":"#argument_context"},{"include":"#line_continuation"}]},"argument_context":{"patterns":[{"captures":{"1":{"name":"string.unquoted.argument.shell","patterns":[{"match":"\\\\*","name":"variable.language.special.wildcard.shell"},{"include":"#variable"},{"include":"#numeric_literal"},{"captures":{"1":{"name":"constant.language.$1.shell"}},"match":"(?<!\\\\w)\\\\b(true|false)\\\\b(?!\\\\w)"}]}},"match":"[\\\\t ]*+([^\\\\t\\\\n \\"$\\\\&-);<>\\\\\\\\`|]+(?!>))"},{"include":"#normal_context"}]},"arithmetic_double":{"patterns":[{"begin":"\\\\(\\\\(","beginCaptures":{"0":{"name":"punctuation.section.arithmetic.double.shell"}},"end":"\\\\)\\\\s*\\\\)","endCaptures":{"0":{"name":"punctuation.section.arithmetic.double.shell"}},"name":"meta.arithmetic.shell","patterns":[{"include":"#math"},{"include":"#string"}]}]},"arithmetic_no_dollar":{"patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.arithmetic.single.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.arithmetic.single.shell"}},"name":"meta.arithmetic.shell","patterns":[{"include":"#math"},{"include":"#string"}]}]},"array_access_inline":{"captures":{"1":{"name":"punctuation.section.array.shell"},"2":{"patterns":[{"include":"#special_expansion"},{"include":"#string"},{"include":"#variable"}]},"3":{"name":"punctuation.section.array.shell"}},"match":"(\\\\[)([^]\\\\[]+)(])"},"array_value":{"begin":"[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))[\\\\t ]*+(\\\\()","beginCaptures":{"1":{"name":"variable.other.assignment.shell"},"2":{"name":"punctuation.definition.array.access.shell"},"3":{"name":"variable.other.assignment.shell"},"4":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"keyword.operator.assignment.shell"},"7":{"name":"keyword.operator.assignment.compound.shell"},"8":{"name":"keyword.operator.assignment.compound.shell"},"9":{"name":"punctuation.definition.array.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.array.shell"}},"patterns":[{"include":"#comment"},{"captures":{"1":{"name":"variable.other.assignment.array.shell entity.other.attribute-name.shell"},"2":{"name":"keyword.operator.assignment.shell punctuation.definition.assignment.shell"}},"match":"((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(=)"},{"captures":{"1":{"name":"punctuation.definition.bracket.named-array.shell"},"2":{"name":"string.unquoted.shell entity.other.attribute-name.bracket.shell"},"3":{"name":"punctuation.definition.bracket.named-array.shell"},"4":{"name":"punctuation.definition.assignment.shell"}},"match":"(\\\\[)(.+?)(])(=)"},{"include":"#normal_context"},{"include":"#simple_unquoted"}]},"assignment_statement":{"patterns":[{"include":"#array_value"},{"include":"#modified_assignment_statement"},{"include":"#normal_assignment_statement"}]},"basic_command_name":{"captures":{"1":{"name":"storage.modifier.$1.shell"},"2":{"name":"entity.name.function.call.shell entity.name.command.shell","patterns":[{"match":"(?<!\\\\w)(?:continue|return|break)(?!\\\\w)","name":"keyword.control.$0.shell"},{"match":"(?<!\\\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|[.:])(?!/)(?!\\\\w)(?!-)","name":"support.function.builtin.shell"},{"include":"#variable"}]}},"match":"(?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;])(?!nocorrect |nocorrect\\\\t|nocorrect$|readonly |readonly\\\\t|readonly$|function |function\\\\t|function$|foreach |foreach\\\\t|foreach$|coproc |coproc\\\\t|coproc$|logout |logout\\\\t|logout$|export |export\\\\t|export$|select |select\\\\t|select$|repeat |repeat\\\\t|repeat$|pushd |pushd\\\\t|pushd$|until |until\\\\t|until$|while |while\\\\t|while$|local |local\\\\t|local$|case |case\\\\t|case$|done |done\\\\t|done$|elif |elif\\\\t|elif$|else |else\\\\t|else$|esac |esac\\\\t|esac$|popd |popd\\\\t|popd$|then |then\\\\t|then$|time |time\\\\t|time$|for |for\\\\t|for$|end |end\\\\t|end$|fi |fi\\\\t|fi$|do |do\\\\t|do$|in |in\\\\t|in$|if |if\\\\t|if$)(?:((?<=^|[\\\\t \\\\&;])(?:readonly|declare|typeset|export|local)(?=[\\\\t \\\\&;]|$))|((?![\\"\']|\\\\\\\\\\\\n?$)[^\\\\t\\\\n\\\\r !\\"\'<>]+?))(?:(?=[\\\\t ])|(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\))","name":"meta.statement.command.name.basic.shell"},"block_comment":{"begin":"\\\\s*+(/\\\\*)","beginCaptures":{"1":{"name":"punctuation.definition.comment.begin.shell"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.shell"}},"name":"comment.block.shell"},"boolean":{"match":"\\\\b(?:true|false)\\\\b","name":"constant.language.$0.shell"},"case_statement":{"begin":"\\\\b(case)\\\\b[\\\\t ]*+(.+?)[\\\\t ]*+\\\\b(in)\\\\b","beginCaptures":{"1":{"name":"keyword.control.case.shell"},"2":{"patterns":[{"include":"#initial_context"}]},"3":{"name":"keyword.control.in.shell"}},"end":"\\\\besac\\\\b","endCaptures":{"0":{"name":"keyword.control.esac.shell"}},"name":"meta.case.shell","patterns":[{"include":"#comment"},{"captures":{"1":{"name":"keyword.operator.pattern.case.default.shell"}},"match":"[\\\\t ]*+(\\\\* *\\\\))"},{"begin":"(?<!\\\\))(?![\\\\t ]*+(?:esac\\\\b|$))","beginCaptures":{},"end":"(?=\\\\besac\\\\b)|(\\\\))","endCaptures":{"1":{"name":"keyword.operator.pattern.case.shell"}},"name":"meta.case.entry.pattern.shell","patterns":[{"include":"#case_statement_context"}]},{"begin":"(?<=\\\\))","beginCaptures":{},"end":"(;;)|(?=\\\\besac\\\\b)","endCaptures":{"1":{"name":"punctuation.terminator.statement.case.shell"}},"name":"meta.case.entry.body.shell","patterns":[{"include":"#typical_statements"},{"include":"#initial_context"}]}]},"case_statement_context":{"patterns":[{"match":"\\\\*","name":"variable.language.special.quantifier.star.shell keyword.operator.quantifier.star.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{"match":"\\\\+","name":"variable.language.special.quantifier.plus.shell keyword.operator.quantifier.plus.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{"match":"\\\\?","name":"variable.language.special.quantifier.question.shell keyword.operator.quantifier.question.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{"match":"@","name":"variable.language.special.at.shell keyword.operator.at.shell punctuation.definition.regex.at.shell"},{"match":"\\\\|","name":"keyword.operator.orvariable.language.special.or.shell keyword.operator.alternation.ruby.shell punctuation.definition.regex.alternation.shell punctuation.separator.regex.alternation.shell"},{"match":"\\\\\\\\.","name":"constant.character.escape.shell"},{"match":"(?<=\\\\tin| in|[\\\\t ]|;;)\\\\(","name":"keyword.operator.pattern.case.shell"},{"begin":"(?<=\\\\S)(\\\\()","beginCaptures":{"1":{"name":"punctuation.definition.group.shell punctuation.definition.regex.group.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.definition.regex.group.shell"}},"name":"meta.parenthese.shell","patterns":[{"include":"#case_statement_context"}]},{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.character-class.shell"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.character-class.shell"}},"name":"string.regexp.character-class.shell","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.shell"}]},{"include":"#string"},{"match":"[^\\\\t\\\\n )*?@\\\\[|]","name":"string.unquoted.pattern.shell string.regexp.unquoted.shell"}]},"command_name_range":{"begin":"\\\\G","beginCaptures":{},"end":"(?=[\\\\t \\\\&;|]|$|[\\\\n)`])|(?=<)","endCaptures":{},"name":"meta.statement.command.name.shell","patterns":[{"match":"(?<!\\\\w)(?:continue|return|break)(?!\\\\w)","name":"entity.name.function.call.shell entity.name.command.shell keyword.control.$0.shell"},{"match":"(?<!\\\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|[.:])(?!/)(?!\\\\w)(?!-)","name":"entity.name.function.call.shell entity.name.command.shell support.function.builtin.shell"},{"include":"#variable"},{"captures":{"1":{"name":"entity.name.function.call.shell entity.name.command.shell"}},"match":"(?<!\\\\w)(?<=\\\\G|[\\"\')}])([^\\\\t\\\\n\\\\r \\"\\\\&\');->`{|]+)"},{"begin":"(?:\\\\G|(?<![\\\\t\\\\n #\\\\&;{|]))(\\\\$?)((\\")|(\'))","beginCaptures":{"1":{"name":"meta.statement.command.name.quoted.shell punctuation.definition.string.shell entity.name.function.call.shell entity.name.command.shell"},"2":{},"3":{"name":"meta.statement.command.name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"},"4":{"name":"meta.statement.command.name.quoted.shell string.quoted.single.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"}},"end":"(?<!\\\\G)(?<=\\\\2)","endCaptures":{},"patterns":[{"include":"#continuation_of_single_quoted_command_name"},{"include":"#continuation_of_double_quoted_command_name"}]},{"include":"#line_continuation"},{"include":"#simple_unquoted"}]},"command_statement":{"begin":"[\\\\t ]*+(?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;])(?!nocorrect |nocorrect\\\\t|nocorrect$|readonly |readonly\\\\t|readonly$|function |function\\\\t|function$|foreach |foreach\\\\t|foreach$|coproc |coproc\\\\t|coproc$|logout |logout\\\\t|logout$|export |export\\\\t|export$|select |select\\\\t|select$|repeat |repeat\\\\t|repeat$|pushd |pushd\\\\t|pushd$|until |until\\\\t|until$|while |while\\\\t|while$|local |local\\\\t|local$|case |case\\\\t|case$|done |done\\\\t|done$|elif |elif\\\\t|elif$|else |else\\\\t|else$|esac |esac\\\\t|esac$|popd |popd\\\\t|popd$|then |then\\\\t|then$|time |time\\\\t|time$|for |for\\\\t|for$|end |end\\\\t|end$|fi |fi\\\\t|fi$|do |do\\\\t|do$|in |in\\\\t|in$|if |if\\\\t|if$)(?!\\\\\\\\\\\\n?$)","beginCaptures":{},"end":"(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.command.shell","patterns":[{"include":"#command_name_range"},{"include":"#line_continuation"},{"include":"#option"},{"include":"#argument"},{"include":"#string"},{"include":"#heredoc"}]},"comment":{"captures":{"1":{"name":"comment.line.number-sign.shell meta.shebang.shell"},"2":{"name":"punctuation.definition.comment.shebang.shell"},"3":{"name":"comment.line.number-sign.shell"},"4":{"name":"punctuation.definition.comment.shell"}},"match":"(?:^|[\\\\t ]++)(?:((#!).*)|((#).*))"},"comments":{"patterns":[{"include":"#block_comment"},{"include":"#line_comment"}]},"compound-command":{"patterns":[{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"name":"meta.scope.logical-expression.shell","patterns":[{"include":"#logical-expression"},{"include":"#initial_context"}]},{"begin":"(?<=\\\\s|^)\\\\{(?=\\\\s|$)","beginCaptures":{"0":{"name":"punctuation.definition.group.shell"}},"end":"(?<=^|;)\\\\s*(})","endCaptures":{"1":{"name":"punctuation.definition.group.shell"}},"name":"meta.scope.group.shell","patterns":[{"include":"#initial_context"}]}]},"continuation_of_double_quoted_command_name":{"begin":"\\\\G(?<=\\")","beginCaptures":{},"contentName":"meta.statement.command.name.continuation string.quoted.double entity.name.function.call entity.name.command","end":"\\"","endCaptures":{"0":{"name":"string.quoted.double.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"}},"patterns":[{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\`]","name":"constant.character.escape.shell"},{"include":"#variable"},{"include":"#interpolation"}]},"continuation_of_single_quoted_command_name":{"begin":"\\\\G(?<=\')","beginCaptures":{},"contentName":"meta.statement.command.name.continuation string.quoted.single entity.name.function.call entity.name.command","end":"\'","endCaptures":{"0":{"name":"string.quoted.single.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"}}},"custom_command_names":{"patterns":[]},"custom_commands":{"patterns":[]},"double_quote_context":{"patterns":[{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\`]","name":"constant.character.escape.shell"},{"include":"#variable"},{"include":"#interpolation"}]},"double_quote_escape_char":{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\`]","name":"constant.character.escape.shell"},"floating_keyword":{"patterns":[{"match":"(?<=^|[\\\\t \\\\&;])(?:then|elif|else|done|end|do|if|fi)(?=[\\\\t \\\\&;]|$)","name":"keyword.control.$0.shell"}]},"for_statement":{"patterns":[{"begin":"\\\\b(for)\\\\b[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))[\\\\t ]*+\\\\b(in)\\\\b","beginCaptures":{"1":{"name":"keyword.control.for.shell"},"2":{"name":"variable.other.for.shell"},"3":{"name":"keyword.control.in.shell"}},"end":"(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.for.in.shell","patterns":[{"include":"#string"},{"include":"#simple_unquoted"},{"include":"#normal_context"}]},{"begin":"\\\\b(for)\\\\b","beginCaptures":{"1":{"name":"keyword.control.for.shell"}},"end":"(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.for.shell","patterns":[{"include":"#arithmetic_double"},{"include":"#normal_context"}]}]},"function_definition":{"applyEndPatternLast":1,"begin":"[\\\\t ]*+(?:\\\\b(function)\\\\b[\\\\t ]*+([^\\\\t\\\\n\\\\r \\"\'()=]+)(?:(\\\\()[\\\\t ]*+(\\\\)))?|([^\\\\t\\\\n\\\\r \\"\'()=]+)[\\\\t ]*+(\\\\()[\\\\t ]*+(\\\\)))","beginCaptures":{"1":{"name":"storage.type.function.shell"},"2":{"name":"entity.name.function.shell"},"3":{"name":"punctuation.definition.arguments.shell"},"4":{"name":"punctuation.definition.arguments.shell"},"5":{"name":"entity.name.function.shell"},"6":{"name":"punctuation.definition.arguments.shell"},"7":{"name":"punctuation.definition.arguments.shell"}},"end":"(?<=[)}])","endCaptures":{},"name":"meta.function.shell","patterns":[{"match":"\\\\G[\\\\t\\\\n ]"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"name":"meta.function.body.shell","patterns":[{"include":"#initial_context"}]},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"name":"meta.function.body.shell","patterns":[{"include":"#initial_context"}]},{"include":"#initial_context"}]},"heredoc":{"patterns":[{"begin":"((?<!<)<<-)[\\\\t ]*+([\\"\'])[\\\\t ]*+([^\\"\']+?)(?=[\\"\\\\&\';<\\\\s])(\\\\2)(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.quote.shell"},"3":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"4":{"name":"punctuation.definition.string.heredoc.quote.shell"},"5":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.quoted.heredoc.indent.$3","end":"^\\\\t*\\\\3(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.$0.shell"}},"patterns":[]},{"begin":"((?<!<)<<(?!<))[\\\\t ]*+([\\"\'])[\\\\t ]*+([^\\"\']+?)(?=[\\"\\\\&\';<\\\\s])(\\\\2)(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.quote.shell"},"3":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"4":{"name":"punctuation.definition.string.heredoc.quote.shell"},"5":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.quoted.heredoc.no-indent.$3","end":"^\\\\3(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.delimiter.shell"}},"patterns":[]},{"begin":"((?<!<)<<-)[\\\\t ]*+([^\\\\t \\"\']+)(?=[\\"\\\\&\';<\\\\s])(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"3":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.unquoted.heredoc.indent.$2","end":"^\\\\t*\\\\2(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.delimiter.shell"}},"patterns":[{"include":"#double_quote_escape_char"},{"include":"#variable"},{"include":"#interpolation"}]},{"begin":"((?<!<)<<(?!<))[\\\\t ]*+([^\\\\t \\"\']+)(?=[\\"\\\\&\';<\\\\s])(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"3":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.unquoted.heredoc.no-indent.$2","end":"^\\\\2(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.delimiter.shell"}},"patterns":[{"include":"#double_quote_escape_char"},{"include":"#variable"},{"include":"#interpolation"}]}]},"herestring":{"patterns":[{"begin":"(<<<)\\\\s*((\'))","beginCaptures":{"1":{"name":"keyword.operator.herestring.shell"},"2":{"name":"string.quoted.single.shell"},"3":{"name":"punctuation.definition.string.begin.shell"}},"contentName":"string.quoted.single.shell","end":"(\')","endCaptures":{"0":{"name":"string.quoted.single.shell"},"1":{"name":"punctuation.definition.string.end.shell"}},"name":"meta.herestring.shell"},{"begin":"(<<<)\\\\s*((\\"))","beginCaptures":{"1":{"name":"keyword.operator.herestring.shell"},"2":{"name":"string.quoted.double.shell"},"3":{"name":"punctuation.definition.string.begin.shell"}},"contentName":"string.quoted.double.shell","end":"(\\")","endCaptures":{"0":{"name":"string.quoted.double.shell"},"1":{"name":"punctuation.definition.string.end.shell"}},"name":"meta.herestring.shell","patterns":[{"include":"#double_quote_context"}]},{"captures":{"1":{"name":"keyword.operator.herestring.shell"},"2":{"name":"string.unquoted.herestring.shell","patterns":[{"include":"#initial_context"}]}},"match":"(<<<)\\\\s*(([^)\\\\\\\\\\\\s]|\\\\\\\\.)+)","name":"meta.herestring.shell"}]},"initial_context":{"patterns":[{"include":"#comment"},{"include":"#pipeline"},{"include":"#normal_statement_seperator"},{"include":"#logical_expression_double"},{"include":"#logical_expression_single"},{"include":"#assignment_statement"},{"include":"#case_statement"},{"include":"#for_statement"},{"include":"#loop"},{"include":"#function_definition"},{"include":"#line_continuation"},{"include":"#arithmetic_double"},{"include":"#misc_ranges"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#redirection"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#alias_statement"},{"include":"#normal_statement"},{"include":"#string"},{"include":"#support"}]},"inline_comment":{"captures":{"1":{"name":"comment.block.shell punctuation.definition.comment.begin.shell"},"2":{"name":"comment.block.shell"},"3":{"patterns":[{"match":"\\\\*/","name":"comment.block.shell punctuation.definition.comment.end.shell"},{"match":"\\\\*","name":"comment.block.shell"}]}},"match":"(/\\\\*)((?:[^*]|\\\\*++[^/])*+(\\\\*++/))"},"interpolation":{"patterns":[{"include":"#arithmetic_dollar"},{"include":"#subshell_dollar"},{"begin":"`","beginCaptures":{"0":{"name":"punctuation.definition.evaluation.backticks.shell"}},"end":"`","endCaptures":{"0":{"name":"punctuation.definition.evaluation.backticks.shell"}},"name":"string.interpolated.backtick.shell","patterns":[{"match":"\\\\\\\\[$\\\\\\\\`]","name":"constant.character.escape.shell"},{"begin":"(?<=\\\\W)(?=#)(?!#\\\\{)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.shell"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.shell"}},"end":"(?=`)","name":"comment.line.number-sign.shell"}]},{"include":"#initial_context"}]}]},"keyword":{"patterns":[{"match":"(?<=^|[\\\\&;\\\\s])(then|else|elif|fi|for|in|do|done|select|continue|esac|while|until|return)(?=[\\\\&;\\\\s]|$)","name":"keyword.control.shell"},{"match":"(?<=^|[\\\\&;\\\\s])(?:export|declare|typeset|local|readonly)(?=[\\\\&;\\\\s]|$)","name":"storage.modifier.shell"}]},"line_comment":{"begin":"\\\\s*+(//)","beginCaptures":{"1":{"name":"punctuation.definition.comment.shell"}},"end":"(?<=\\\\n)(?<!\\\\\\\\\\\\n)","endCaptures":{},"name":"comment.line.double-slash.shell","patterns":[{"include":"#line_continuation_character"}]},"line_continuation":{"match":"\\\\\\\\(?=\\\\n)","name":"constant.character.escape.line-continuation.shell"},"logical-expression":{"patterns":[{"include":"#arithmetic_no_dollar"},{"match":"=[=~]?|!=?|[<>]|&&|\\\\|\\\\|","name":"keyword.operator.logical.shell"},{"match":"(?<!\\\\S)-(nt|ot|ef|eq|ne|l[et]|g[et]|[GLNOSa-hknopr-uwxz])\\\\b","name":"keyword.operator.logical.shell"}]},"logical_expression_context":{"patterns":[{"include":"#regex_comparison"},{"include":"#arithmetic_no_dollar"},{"include":"#logical-expression"},{"include":"#logical_expression_single"},{"include":"#logical_expression_double"},{"include":"#comment"},{"include":"#boolean"},{"include":"#redirect_number"},{"include":"#numeric_literal"},{"include":"#pipeline"},{"include":"#normal_statement_seperator"},{"include":"#string"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#support"}]},"logical_expression_double":{"begin":"\\\\[\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"end":"]]","endCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"name":"meta.scope.logical-expression.shell","patterns":[{"include":"#logical_expression_context"}]},"logical_expression_single":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"name":"meta.scope.logical-expression.shell","patterns":[{"include":"#logical_expression_context"}]},"loop":{"patterns":[{"begin":"(?<=^|[\\\\&;\\\\s])(for)\\\\s+(.+?)\\\\s+(in)(?=[\\\\&;\\\\s]|$)","beginCaptures":{"1":{"name":"keyword.control.shell"},"2":{"name":"variable.other.loop.shell","patterns":[{"include":"#string"}]},"3":{"name":"keyword.control.shell"}},"end":"(?<=^|[\\\\&;\\\\s])done(?=[\\\\&;\\\\s]|$|\\\\))","endCaptures":{"0":{"name":"keyword.control.shell"}},"name":"meta.scope.for-in-loop.shell","patterns":[{"include":"#initial_context"}]},{"begin":"(?<=^|[\\\\&;\\\\s])(while|until)(?=[\\\\&;\\\\s]|$)","beginCaptures":{"1":{"name":"keyword.control.shell"}},"end":"(?<=^|[\\\\&;\\\\s])done(?=[\\\\&;\\\\s]|$|\\\\))","endCaptures":{"0":{"name":"keyword.control.shell"}},"name":"meta.scope.while-loop.shell","patterns":[{"include":"#initial_context"}]},{"begin":"(?<=^|[\\\\&;\\\\s])(select)\\\\s+((?:[^\\\\\\\\\\\\s]|\\\\\\\\.)+)(?=[\\\\&;\\\\s]|$)","beginCaptures":{"1":{"name":"keyword.control.shell"},"2":{"name":"variable.other.loop.shell"}},"end":"(?<=^|[\\\\&;\\\\s])(done)(?=[\\\\&;\\\\s]|$|\\\\))","endCaptures":{"1":{"name":"keyword.control.shell"}},"name":"meta.scope.select-block.shell","patterns":[{"include":"#initial_context"}]},{"begin":"(?<=^|[\\\\&;\\\\s])if(?=[\\\\&;\\\\s]|$)","beginCaptures":{"0":{"name":"keyword.control.if.shell"}},"end":"(?<=^|[\\\\&;\\\\s])fi(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"keyword.control.fi.shell"}},"name":"meta.scope.if-block.shell","patterns":[{"include":"#initial_context"}]}]},"math":{"patterns":[{"include":"#variable"},{"match":"\\\\+{1,2}|-{1,2}|[!~]|\\\\*{1,2}|[%/]|<[<=]?|>[=>]?|==|!=|^|\\\\|{1,2}|&{1,2}|[,:=?]|[-%\\\\&*+/^|]=|<<=|>>=","name":"keyword.operator.arithmetic.shell"},{"match":"0[Xx]\\\\h+","name":"constant.numeric.hex.shell"},{"match":";","name":"punctuation.separator.semicolon.range"},{"match":"0\\\\d+","name":"constant.numeric.octal.shell"},{"match":"\\\\d{1,2}#[0-9@-Z_a-z]+","name":"constant.numeric.other.shell"},{"match":"\\\\d+","name":"constant.numeric.integer.shell"},{"match":"(?<!\\\\w)[0-9A-Z_a-z]+(?!\\\\w)","name":"variable.other.normal.shell"}]},"math_operators":{"patterns":[{"match":"\\\\+{1,2}|-{1,2}|[!~]|\\\\*{1,2}|[%/]|<[<=]?|>[=>]?|==|!=|^|\\\\|{1,2}|&{1,2}|[,:=?]|[-%\\\\&*+/^|]=|<<=|>>=","name":"keyword.operator.arithmetic.shell"},{"match":"0[Xx]\\\\h+","name":"constant.numeric.hex.shell"},{"match":"0\\\\d+","name":"constant.numeric.octal.shell"},{"match":"\\\\d{1,2}#[0-9@-Z_a-z]+","name":"constant.numeric.other.shell"},{"match":"\\\\d+","name":"constant.numeric.integer.shell"}]},"misc_ranges":{"patterns":[{"include":"#logical_expression_single"},{"include":"#logical_expression_double"},{"include":"#subshell_dollar"},{"begin":"(?<![^\\\\t ])(\\\\{)(?![$\\\\w])","beginCaptures":{"1":{"name":"punctuation.definition.group.shell"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.group.shell"}},"name":"meta.scope.group.shell","patterns":[{"include":"#initial_context"}]}]},"modified_assignment_statement":{"begin":"(?<=^|[\\\\t \\\\&;])(?:readonly|declare|typeset|export|local)(?=[\\\\t \\\\&;]|$)","beginCaptures":{"0":{"name":"storage.modifier.$0.shell"}},"end":"(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.shell meta.expression.assignment.modified.shell","patterns":[{"match":"(?<!\\\\w)-\\\\w+\\\\b","name":"string.unquoted.argument.shell constant.other.option.shell"},{"include":"#array_value"},{"captures":{"1":{"name":"variable.other.assignment.shell"},"2":{"name":"punctuation.definition.array.access.shell"},"3":{"name":"variable.other.assignment.shell"},"4":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"keyword.operator.assignment.shell"},"7":{"name":"keyword.operator.assignment.compound.shell"},"8":{"name":"keyword.operator.assignment.compound.shell"},"9":{"name":"constant.numeric.shell constant.numeric.hex.shell"},"10":{"name":"constant.numeric.shell constant.numeric.octal.shell"},"11":{"name":"constant.numeric.shell constant.numeric.other.shell"},"12":{"name":"constant.numeric.shell constant.numeric.decimal.shell"},"13":{"name":"constant.numeric.shell constant.numeric.version.shell"},"14":{"name":"constant.numeric.shell constant.numeric.integer.shell"}},"match":"((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))?(?:(?<=[\\\\t =]|^|[(\\\\[{])(?:(?:(?:(?:(?:(0[Xx]\\\\h+)|(0\\\\d+))|(\\\\d{1,2}#[0-9@-Z_a-z]+))|(-?\\\\d+\\\\.\\\\d+))|(-?\\\\d+(?:\\\\.\\\\d+)+))|(-?\\\\d+))(?=[\\\\t ]|$|[);}]))?"},{"include":"#normal_context"}]},"modifiers":{"match":"(?<=^|[\\\\t \\\\&;])(?:readonly|declare|typeset|export|local)(?=[\\\\t \\\\&;]|$)","name":"storage.modifier.$0.shell"},"normal_assignment_statement":{"begin":"[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))","beginCaptures":{"1":{"name":"variable.other.assignment.shell"},"2":{"name":"punctuation.definition.array.access.shell"},"3":{"name":"variable.other.assignment.shell"},"4":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"keyword.operator.assignment.shell"},"7":{"name":"keyword.operator.assignment.compound.shell"},"8":{"name":"keyword.operator.assignment.compound.shell"}},"end":"(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.expression.assignment.shell","patterns":[{"include":"#comment"},{"include":"#string"},{"include":"#normal_assignment_statement"},{"begin":"(?<=[\\\\t ])(?![\\\\t ]|\\\\w+=)","beginCaptures":{},"end":"(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.command.env.shell","patterns":[{"include":"#command_name_range"},{"include":"#line_continuation"},{"include":"#option"},{"include":"#argument"},{"include":"#string"}]},{"include":"#simple_unquoted"},{"include":"#normal_context"}]},"normal_context":{"patterns":[{"include":"#comment"},{"include":"#pipeline"},{"include":"#normal_statement_seperator"},{"include":"#misc_ranges"},{"include":"#boolean"},{"include":"#redirect_number"},{"include":"#numeric_literal"},{"include":"#string"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#redirection"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#support"},{"include":"#parenthese"}]},"normal_statement":{"begin":"(?!^[\\\\t ]*+$)(?:(?<=(?:^until| until|\\\\tuntil|^while| while|\\\\twhile|^elif| elif|\\\\telif|^else| else|\\\\telse|^then| then|\\\\tthen|^do| do|\\\\tdo|^if| if|\\\\tif) )|(?<=^|[!\\\\&(;`{|]))[\\\\t ]*+(?!nocorrect\\\\W|nocorrect\\\\$|function\\\\W|function\\\\$|foreach\\\\W|foreach\\\\$|repeat\\\\W|repeat\\\\$|logout\\\\W|logout\\\\$|coproc\\\\W|coproc\\\\$|select\\\\W|select\\\\$|while\\\\W|while\\\\$|pushd\\\\W|pushd\\\\$|until\\\\W|until\\\\$|case\\\\W|case\\\\$|done\\\\W|done\\\\$|elif\\\\W|elif\\\\$|else\\\\W|else\\\\$|esac\\\\W|esac\\\\$|popd\\\\W|popd\\\\$|then\\\\W|then\\\\$|time\\\\W|time\\\\$|for\\\\W|for\\\\$|end\\\\W|end\\\\$|fi\\\\W|fi\\\\$|do\\\\W|do\\\\$|in\\\\W|in\\\\$|if\\\\W|if\\\\$)","beginCaptures":{},"end":"(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.shell","patterns":[{"include":"#typical_statements"}]},"normal_statement_seperator":{"captures":{"1":{"name":"punctuation.terminator.statement.semicolon.shell"},"2":{"name":"punctuation.separator.statement.and.shell"},"3":{"name":"punctuation.separator.statement.or.shell"},"4":{"name":"punctuation.separator.statement.background.shell"}},"match":"(?:(?:(;)|(&&))|(\\\\|\\\\|))|(&)"},"numeric_literal":{"captures":{"1":{"name":"constant.numeric.shell constant.numeric.hex.shell"},"2":{"name":"constant.numeric.shell constant.numeric.octal.shell"},"3":{"name":"constant.numeric.shell constant.numeric.other.shell"},"4":{"name":"constant.numeric.shell constant.numeric.decimal.shell"},"5":{"name":"constant.numeric.shell constant.numeric.version.shell"},"6":{"name":"constant.numeric.shell constant.numeric.integer.shell"}},"match":"(?<=[\\\\t =]|^|[(\\\\[{])(?:(?:(?:(?:(?:(0[Xx]\\\\h+)|(0\\\\d+))|(\\\\d{1,2}#[0-9@-Z_a-z]+))|(-?\\\\d+\\\\.\\\\d+))|(-?\\\\d+(?:\\\\.\\\\d+)+))|(-?\\\\d+))(?=[\\\\t ]|$|[);}])"},"option":{"begin":"[\\\\t ]++(-)((?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;]))","beginCaptures":{"1":{"name":"string.unquoted.argument.shell constant.other.option.dash.shell"},"2":{"name":"string.unquoted.argument.shell constant.other.option.shell"}},"contentName":"string.unquoted.argument constant.other.option","end":"(?=[\\\\t ])|(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"patterns":[{"include":"#option_context"}]},"option_context":{"patterns":[{"include":"#misc_ranges"},{"include":"#string"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#redirection"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#support"}]},"parenthese":{"patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.parenthese.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.parenthese.shell"}},"name":"meta.parenthese.group.shell","patterns":[{"include":"#initial_context"}]}]},"pathname":{"patterns":[{"match":"(?<=[:=\\\\s]|^)~","name":"keyword.operator.tilde.shell"},{"match":"[*?]","name":"keyword.operator.glob.shell"},{"begin":"([!*+?@])(\\\\()","beginCaptures":{"1":{"name":"keyword.operator.extglob.shell"},"2":{"name":"punctuation.definition.extglob.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.extglob.shell"}},"name":"meta.structure.extglob.shell","patterns":[{"include":"#initial_context"}]}]},"pipeline":{"patterns":[{"match":"(?<=^|[\\\\&;\\\\s])(time)(?=[\\\\&;\\\\s]|$)","name":"keyword.other.shell"},{"match":"[!|]","name":"keyword.operator.pipe.shell"}]},"redirect_fix":{"captures":{"1":{"name":"keyword.operator.redirect.shell"},"2":{"name":"string.unquoted.argument.shell"}},"match":"(>>?)[\\\\t ]*+([^\\\\t\\\\n \\"$\\\\&-);<>\\\\\\\\`|]+)"},"redirect_number":{"captures":{"1":{"name":"keyword.operator.redirect.stdout.shell"},"2":{"name":"keyword.operator.redirect.stderr.shell"},"3":{"name":"keyword.operator.redirect.$3.shell"}},"match":"(?<=[\\\\t ])(?:(1)|(2)|(\\\\d+))(?=>)"},"redirection":{"patterns":[{"begin":"[<>]\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.interpolated.process-substitution.shell","patterns":[{"include":"#initial_context"}]},{"match":"(?<![<>])(&>|\\\\d*>&\\\\d*|\\\\d*(>>|[<>])|\\\\d*<&|\\\\d*<>)(?![<>])","name":"keyword.operator.redirect.shell"}]},"regex_comparison":{"match":"=~","name":"keyword.operator.logical.regex.shell"},"regexp":{"patterns":[{"match":".+"}]},"simple_options":{"captures":{"0":{"patterns":[{"captures":{"1":{"name":"string.unquoted.argument.shell constant.other.option.dash.shell"},"2":{"name":"string.unquoted.argument.shell constant.other.option.shell"}},"match":"[\\\\t ]++(-)(\\\\w+)"}]}},"match":"(?:[\\\\t ]++-\\\\w+)*"},"simple_unquoted":{"match":"[^\\\\t\\\\n \\"$\\\\&-);<>\\\\\\\\`|]","name":"string.unquoted.shell"},"special_expansion":{"match":"!|:[-=?]?|[*@]|##?|%%|[%/]","name":"keyword.operator.expansion.shell"},"start_of_command":{"match":"[\\\\t ]*+(?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;])(?!nocorrect |nocorrect\\\\t|nocorrect$|readonly |readonly\\\\t|readonly$|function |function\\\\t|function$|foreach |foreach\\\\t|foreach$|coproc |coproc\\\\t|coproc$|logout |logout\\\\t|logout$|export |export\\\\t|export$|select |select\\\\t|select$|repeat |repeat\\\\t|repeat$|pushd |pushd\\\\t|pushd$|until |until\\\\t|until$|while |while\\\\t|while$|local |local\\\\t|local$|case |case\\\\t|case$|done |done\\\\t|done$|elif |elif\\\\t|elif$|else |else\\\\t|else$|esac |esac\\\\t|esac$|popd |popd\\\\t|popd$|then |then\\\\t|then$|time |time\\\\t|time$|for |for\\\\t|for$|end |end\\\\t|end$|fi |fi\\\\t|fi$|do |do\\\\t|do$|in |in\\\\t|in$|if |if\\\\t|if$)(?!\\\\\\\\\\\\n?$)"},"string":{"patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.shell"},{"begin":"\'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"\'","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.quoted.single.shell"},{"begin":"\\\\$?\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.quoted.double.shell","patterns":[{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\`]","name":"constant.character.escape.shell"},{"include":"#variable"},{"include":"#interpolation"}]},{"begin":"\\\\$\'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"\'","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.quoted.single.dollar.shell","patterns":[{"match":"\\\\\\\\[\'\\\\\\\\abefnrtv]","name":"constant.character.escape.ansi-c.shell"},{"match":"\\\\\\\\[0-9]{3}\\"","name":"constant.character.escape.octal.shell"},{"match":"\\\\\\\\x\\\\h{2}\\"","name":"constant.character.escape.hex.shell"},{"match":"\\\\\\\\c.\\"","name":"constant.character.escape.control-char.shell"}]}]},"subshell_dollar":{"patterns":[{"begin":"\\\\$\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.subshell.single.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.subshell.single.shell"}},"name":"meta.scope.subshell","patterns":[{"include":"#parenthese"},{"include":"#initial_context"}]}]},"support":{"patterns":[{"match":"(?<=^|[\\\\&;\\\\s])[.:](?=[\\\\&;\\\\s]|$)","name":"support.function.builtin.shell"}]},"typical_statements":{"patterns":[{"include":"#assignment_statement"},{"include":"#case_statement"},{"include":"#for_statement"},{"include":"#while_statement"},{"include":"#function_definition"},{"include":"#command_statement"},{"include":"#line_continuation"},{"include":"#arithmetic_double"},{"include":"#normal_context"}]},"variable":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.parameter.positional.all.shell"},"2":{"name":"variable.parameter.positional.all.shell"}},"match":"(\\\\$)(@(?!\\\\w))"},{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.parameter.positional.shell"},"2":{"name":"variable.parameter.positional.shell"}},"match":"(\\\\$)([0-9](?!\\\\w))"},{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.language.special.shell"},"2":{"name":"variable.language.special.shell"}},"match":"(\\\\$)([-!#$*0?_](?!\\\\w))"},{"begin":"(\\\\$)(\\\\{)[\\\\t ]*+(?=\\\\d)","beginCaptures":{"1":{"name":"punctuation.definition.variable.shell variable.parameter.positional.shell"},"2":{"name":"punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell variable.parameter.positional.shell"}},"contentName":"meta.parameter-expansion","end":"}","endCaptures":{"0":{"name":"punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell variable.parameter.positional.shell"}},"patterns":[{"include":"#special_expansion"},{"include":"#array_access_inline"},{"match":"[0-9]+","name":"variable.parameter.positional.shell"},{"match":"(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)","name":"variable.other.normal.shell"},{"include":"#variable"},{"include":"#string"}]},{"begin":"(\\\\$)(\\\\{)","beginCaptures":{"1":{"name":"punctuation.definition.variable.shell"},"2":{"name":"punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell"}},"contentName":"meta.parameter-expansion","end":"}","endCaptures":{"0":{"name":"punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell"}},"patterns":[{"include":"#special_expansion"},{"include":"#array_access_inline"},{"match":"(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)","name":"variable.other.normal.shell"},{"include":"#variable"},{"include":"#string"}]},{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.other.normal.shell"},"2":{"name":"variable.other.normal.shell"}},"match":"(\\\\$)(\\\\w+(?!\\\\w))"}]},"while_statement":{"patterns":[{"begin":"\\\\b(while)\\\\b","beginCaptures":{"1":{"name":"keyword.control.while.shell"}},"end":"(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.while.shell","patterns":[{"include":"#line_continuation"},{"include":"#math_operators"},{"include":"#option"},{"include":"#simple_unquoted"},{"include":"#normal_context"},{"include":"#string"}]}]}},"scopeName":"source.shell","aliases":["bash","sh","shell","zsh"]}')),Mm=[e];
|
|
2
|
-
export{
|
|
1
|
+
var e=Object.freeze(JSON.parse('{"displayName":"Shell","name":"shellscript","patterns":[{"include":"#initial_context"}],"repository":{"alias_statement":{"begin":"[\\\\t ]*+(alias)[\\\\t ]*+((?:((?<!\\\\w)-\\\\w+)\\\\b[\\\\t ]*+)*)[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))","beginCaptures":{"1":{"name":"storage.type.alias.shell"},"2":{"patterns":[{"match":"(?<!\\\\w)-\\\\w+\\\\b","name":"string.unquoted.argument.shell constant.other.option.shell"}]},"3":{"name":"string.unquoted.argument.shell constant.other.option.shell"},"4":{"name":"variable.other.assignment.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"variable.other.assignment.shell"},"7":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"8":{"name":"punctuation.definition.array.access.shell"},"9":{"name":"keyword.operator.assignment.shell"},"10":{"name":"keyword.operator.assignment.compound.shell"},"11":{"name":"keyword.operator.assignment.compound.shell"}},"end":"(?=[\\\\t ]|$)|(?:(?:(?:(;)|(&&))|(\\\\|\\\\|))|(&))","endCaptures":{"1":{"name":"punctuation.terminator.statement.semicolon.shell"},"2":{"name":"punctuation.separator.statement.and.shell"},"3":{"name":"punctuation.separator.statement.or.shell"},"4":{"name":"punctuation.separator.statement.background.shell"}},"name":"meta.expression.assignment.alias.shell","patterns":[{"include":"#normal_context"}]},"argument":{"begin":"[\\\\t ]++(?![\\\\n#\\\\&(\\\\[|]|$|;)","beginCaptures":{},"end":"(?=[\\\\t \\\\&;|]|$|[\\\\n)`])","endCaptures":{},"name":"meta.argument.shell","patterns":[{"include":"#argument_context"},{"include":"#line_continuation"}]},"argument_context":{"patterns":[{"captures":{"1":{"name":"string.unquoted.argument.shell","patterns":[{"match":"\\\\*","name":"variable.language.special.wildcard.shell"},{"include":"#variable"},{"include":"#numeric_literal"},{"captures":{"1":{"name":"constant.language.$1.shell"}},"match":"(?<!\\\\w)\\\\b(true|false)\\\\b(?!\\\\w)"}]}},"match":"[\\\\t ]*+([^\\\\t\\\\n \\"$\\\\&-);<>\\\\\\\\`|]+(?!>))"},{"include":"#normal_context"}]},"arithmetic_double":{"patterns":[{"begin":"\\\\(\\\\(","beginCaptures":{"0":{"name":"punctuation.section.arithmetic.double.shell"}},"end":"\\\\)\\\\s*\\\\)","endCaptures":{"0":{"name":"punctuation.section.arithmetic.double.shell"}},"name":"meta.arithmetic.shell","patterns":[{"include":"#math"},{"include":"#string"}]}]},"arithmetic_no_dollar":{"patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.arithmetic.single.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.arithmetic.single.shell"}},"name":"meta.arithmetic.shell","patterns":[{"include":"#math"},{"include":"#string"}]}]},"array_access_inline":{"captures":{"1":{"name":"punctuation.section.array.shell"},"2":{"patterns":[{"include":"#special_expansion"},{"include":"#string"},{"include":"#variable"}]},"3":{"name":"punctuation.section.array.shell"}},"match":"(\\\\[)([^]\\\\[]+)(])"},"array_value":{"begin":"[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))[\\\\t ]*+(\\\\()","beginCaptures":{"1":{"name":"variable.other.assignment.shell"},"2":{"name":"punctuation.definition.array.access.shell"},"3":{"name":"variable.other.assignment.shell"},"4":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"keyword.operator.assignment.shell"},"7":{"name":"keyword.operator.assignment.compound.shell"},"8":{"name":"keyword.operator.assignment.compound.shell"},"9":{"name":"punctuation.definition.array.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.array.shell"}},"patterns":[{"include":"#comment"},{"captures":{"1":{"name":"variable.other.assignment.array.shell entity.other.attribute-name.shell"},"2":{"name":"keyword.operator.assignment.shell punctuation.definition.assignment.shell"}},"match":"((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(=)"},{"captures":{"1":{"name":"punctuation.definition.bracket.named-array.shell"},"2":{"name":"string.unquoted.shell entity.other.attribute-name.bracket.shell"},"3":{"name":"punctuation.definition.bracket.named-array.shell"},"4":{"name":"punctuation.definition.assignment.shell"}},"match":"(\\\\[)(.+?)(])(=)"},{"include":"#normal_context"},{"include":"#simple_unquoted"}]},"assignment_statement":{"patterns":[{"include":"#array_value"},{"include":"#modified_assignment_statement"},{"include":"#normal_assignment_statement"}]},"basic_command_name":{"captures":{"1":{"name":"storage.modifier.$1.shell"},"2":{"name":"entity.name.function.call.shell entity.name.command.shell","patterns":[{"match":"(?<!\\\\w)(?:continue|return|break)(?!\\\\w)","name":"keyword.control.$0.shell"},{"match":"(?<!\\\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|[.:])(?!/)(?!\\\\w)(?!-)","name":"support.function.builtin.shell"},{"include":"#variable"}]}},"match":"(?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;])(?!nocorrect |nocorrect\\\\t|nocorrect$|readonly |readonly\\\\t|readonly$|function |function\\\\t|function$|foreach |foreach\\\\t|foreach$|coproc |coproc\\\\t|coproc$|logout |logout\\\\t|logout$|export |export\\\\t|export$|select |select\\\\t|select$|repeat |repeat\\\\t|repeat$|pushd |pushd\\\\t|pushd$|until |until\\\\t|until$|while |while\\\\t|while$|local |local\\\\t|local$|case |case\\\\t|case$|done |done\\\\t|done$|elif |elif\\\\t|elif$|else |else\\\\t|else$|esac |esac\\\\t|esac$|popd |popd\\\\t|popd$|then |then\\\\t|then$|time |time\\\\t|time$|for |for\\\\t|for$|end |end\\\\t|end$|fi |fi\\\\t|fi$|do |do\\\\t|do$|in |in\\\\t|in$|if |if\\\\t|if$)(?:((?<=^|[\\\\t \\\\&;])(?:readonly|declare|typeset|export|local)(?=[\\\\t \\\\&;]|$))|((?![\\"\']|\\\\\\\\\\\\n?$)[^\\\\t\\\\n\\\\r !\\"\'<>]+?))(?:(?=[\\\\t ])|(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\))","name":"meta.statement.command.name.basic.shell"},"block_comment":{"begin":"\\\\s*+(/\\\\*)","beginCaptures":{"1":{"name":"punctuation.definition.comment.begin.shell"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.shell"}},"name":"comment.block.shell"},"boolean":{"match":"\\\\b(?:true|false)\\\\b","name":"constant.language.$0.shell"},"case_statement":{"begin":"\\\\b(case)\\\\b[\\\\t ]*+(.+?)[\\\\t ]*+\\\\b(in)\\\\b","beginCaptures":{"1":{"name":"keyword.control.case.shell"},"2":{"patterns":[{"include":"#initial_context"}]},"3":{"name":"keyword.control.in.shell"}},"end":"\\\\besac\\\\b","endCaptures":{"0":{"name":"keyword.control.esac.shell"}},"name":"meta.case.shell","patterns":[{"include":"#comment"},{"captures":{"1":{"name":"keyword.operator.pattern.case.default.shell"}},"match":"[\\\\t ]*+(\\\\* *\\\\))"},{"begin":"(?<!\\\\))(?![\\\\t ]*+(?:esac\\\\b|$))","beginCaptures":{},"end":"(?=\\\\besac\\\\b)|(\\\\))","endCaptures":{"1":{"name":"keyword.operator.pattern.case.shell"}},"name":"meta.case.entry.pattern.shell","patterns":[{"include":"#case_statement_context"}]},{"begin":"(?<=\\\\))","beginCaptures":{},"end":"(;;)|(?=\\\\besac\\\\b)","endCaptures":{"1":{"name":"punctuation.terminator.statement.case.shell"}},"name":"meta.case.entry.body.shell","patterns":[{"include":"#typical_statements"},{"include":"#initial_context"}]}]},"case_statement_context":{"patterns":[{"match":"\\\\*","name":"variable.language.special.quantifier.star.shell keyword.operator.quantifier.star.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{"match":"\\\\+","name":"variable.language.special.quantifier.plus.shell keyword.operator.quantifier.plus.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{"match":"\\\\?","name":"variable.language.special.quantifier.question.shell keyword.operator.quantifier.question.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{"match":"@","name":"variable.language.special.at.shell keyword.operator.at.shell punctuation.definition.regex.at.shell"},{"match":"\\\\|","name":"keyword.operator.orvariable.language.special.or.shell keyword.operator.alternation.ruby.shell punctuation.definition.regex.alternation.shell punctuation.separator.regex.alternation.shell"},{"match":"\\\\\\\\.","name":"constant.character.escape.shell"},{"match":"(?<=\\\\tin| in|[\\\\t ]|;;)\\\\(","name":"keyword.operator.pattern.case.shell"},{"begin":"(?<=\\\\S)(\\\\()","beginCaptures":{"1":{"name":"punctuation.definition.group.shell punctuation.definition.regex.group.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.definition.regex.group.shell"}},"name":"meta.parenthese.shell","patterns":[{"include":"#case_statement_context"}]},{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.character-class.shell"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.character-class.shell"}},"name":"string.regexp.character-class.shell","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.shell"}]},{"include":"#string"},{"match":"[^\\\\t\\\\n )*?@\\\\[|]","name":"string.unquoted.pattern.shell string.regexp.unquoted.shell"}]},"command_name_range":{"begin":"\\\\G","beginCaptures":{},"end":"(?=[\\\\t \\\\&;|]|$|[\\\\n)`])|(?=<)","endCaptures":{},"name":"meta.statement.command.name.shell","patterns":[{"match":"(?<!\\\\w)(?:continue|return|break)(?!\\\\w)","name":"entity.name.function.call.shell entity.name.command.shell keyword.control.$0.shell"},{"match":"(?<!\\\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|[.:])(?!/)(?!\\\\w)(?!-)","name":"entity.name.function.call.shell entity.name.command.shell support.function.builtin.shell"},{"include":"#variable"},{"captures":{"1":{"name":"entity.name.function.call.shell entity.name.command.shell"}},"match":"(?<!\\\\w)(?<=\\\\G|[\\"\')}])([^\\\\t\\\\n\\\\r \\"\\\\&\');->`{|]+)"},{"begin":"(?:\\\\G|(?<![\\\\t\\\\n #\\\\&;{|]))(\\\\$?)((\\")|(\'))","beginCaptures":{"1":{"name":"meta.statement.command.name.quoted.shell punctuation.definition.string.shell entity.name.function.call.shell entity.name.command.shell"},"2":{},"3":{"name":"meta.statement.command.name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"},"4":{"name":"meta.statement.command.name.quoted.shell string.quoted.single.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"}},"end":"(?<!\\\\G)(?<=\\\\2)","endCaptures":{},"patterns":[{"include":"#continuation_of_single_quoted_command_name"},{"include":"#continuation_of_double_quoted_command_name"}]},{"include":"#line_continuation"},{"include":"#simple_unquoted"}]},"command_statement":{"begin":"[\\\\t ]*+(?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;])(?!nocorrect |nocorrect\\\\t|nocorrect$|readonly |readonly\\\\t|readonly$|function |function\\\\t|function$|foreach |foreach\\\\t|foreach$|coproc |coproc\\\\t|coproc$|logout |logout\\\\t|logout$|export |export\\\\t|export$|select |select\\\\t|select$|repeat |repeat\\\\t|repeat$|pushd |pushd\\\\t|pushd$|until |until\\\\t|until$|while |while\\\\t|while$|local |local\\\\t|local$|case |case\\\\t|case$|done |done\\\\t|done$|elif |elif\\\\t|elif$|else |else\\\\t|else$|esac |esac\\\\t|esac$|popd |popd\\\\t|popd$|then |then\\\\t|then$|time |time\\\\t|time$|for |for\\\\t|for$|end |end\\\\t|end$|fi |fi\\\\t|fi$|do |do\\\\t|do$|in |in\\\\t|in$|if |if\\\\t|if$)(?!\\\\\\\\\\\\n?$)","beginCaptures":{},"end":"(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.command.shell","patterns":[{"include":"#command_name_range"},{"include":"#line_continuation"},{"include":"#option"},{"include":"#argument"},{"include":"#string"},{"include":"#heredoc"}]},"comment":{"captures":{"1":{"name":"comment.line.number-sign.shell meta.shebang.shell"},"2":{"name":"punctuation.definition.comment.shebang.shell"},"3":{"name":"comment.line.number-sign.shell"},"4":{"name":"punctuation.definition.comment.shell"}},"match":"(?:^|[\\\\t ]++)(?:((#!).*)|((#).*))"},"comments":{"patterns":[{"include":"#block_comment"},{"include":"#line_comment"}]},"compound-command":{"patterns":[{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"name":"meta.scope.logical-expression.shell","patterns":[{"include":"#logical-expression"},{"include":"#initial_context"}]},{"begin":"(?<=\\\\s|^)\\\\{(?=\\\\s|$)","beginCaptures":{"0":{"name":"punctuation.definition.group.shell"}},"end":"(?<=^|;)\\\\s*(})","endCaptures":{"1":{"name":"punctuation.definition.group.shell"}},"name":"meta.scope.group.shell","patterns":[{"include":"#initial_context"}]}]},"continuation_of_double_quoted_command_name":{"begin":"\\\\G(?<=\\")","beginCaptures":{},"contentName":"meta.statement.command.name.continuation string.quoted.double entity.name.function.call entity.name.command","end":"\\"","endCaptures":{"0":{"name":"string.quoted.double.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"}},"patterns":[{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\`]","name":"constant.character.escape.shell"},{"include":"#variable"},{"include":"#interpolation"}]},"continuation_of_single_quoted_command_name":{"begin":"\\\\G(?<=\')","beginCaptures":{},"contentName":"meta.statement.command.name.continuation string.quoted.single entity.name.function.call entity.name.command","end":"\'","endCaptures":{"0":{"name":"string.quoted.single.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"}}},"custom_command_names":{"patterns":[]},"custom_commands":{"patterns":[]},"double_quote_context":{"patterns":[{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\`]","name":"constant.character.escape.shell"},{"include":"#variable"},{"include":"#interpolation"}]},"double_quote_escape_char":{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\`]","name":"constant.character.escape.shell"},"floating_keyword":{"patterns":[{"match":"(?<=^|[\\\\t \\\\&;])(?:then|elif|else|done|end|do|if|fi)(?=[\\\\t \\\\&;]|$)","name":"keyword.control.$0.shell"}]},"for_statement":{"patterns":[{"begin":"\\\\b(for)\\\\b[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))[\\\\t ]*+\\\\b(in)\\\\b","beginCaptures":{"1":{"name":"keyword.control.for.shell"},"2":{"name":"variable.other.for.shell"},"3":{"name":"keyword.control.in.shell"}},"end":"(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.for.in.shell","patterns":[{"include":"#string"},{"include":"#simple_unquoted"},{"include":"#normal_context"}]},{"begin":"\\\\b(for)\\\\b","beginCaptures":{"1":{"name":"keyword.control.for.shell"}},"end":"(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.for.shell","patterns":[{"include":"#arithmetic_double"},{"include":"#normal_context"}]}]},"function_definition":{"applyEndPatternLast":1,"begin":"[\\\\t ]*+(?:\\\\b(function)\\\\b[\\\\t ]*+([^\\\\t\\\\n\\\\r \\"\'()=]+)(?:(\\\\()[\\\\t ]*+(\\\\)))?|([^\\\\t\\\\n\\\\r \\"\'()=]+)[\\\\t ]*+(\\\\()[\\\\t ]*+(\\\\)))","beginCaptures":{"1":{"name":"storage.type.function.shell"},"2":{"name":"entity.name.function.shell"},"3":{"name":"punctuation.definition.arguments.shell"},"4":{"name":"punctuation.definition.arguments.shell"},"5":{"name":"entity.name.function.shell"},"6":{"name":"punctuation.definition.arguments.shell"},"7":{"name":"punctuation.definition.arguments.shell"}},"end":"(?<=[)}])","endCaptures":{},"name":"meta.function.shell","patterns":[{"match":"\\\\G[\\\\t\\\\n ]"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"name":"meta.function.body.shell","patterns":[{"include":"#initial_context"}]},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"name":"meta.function.body.shell","patterns":[{"include":"#initial_context"}]},{"include":"#initial_context"}]},"heredoc":{"patterns":[{"begin":"((?<!<)<<-)[\\\\t ]*+([\\"\'])[\\\\t ]*+([^\\"\']+?)(?=[\\"\\\\&\';<\\\\s])(\\\\2)(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.quote.shell"},"3":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"4":{"name":"punctuation.definition.string.heredoc.quote.shell"},"5":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.quoted.heredoc.indent.$3","end":"^\\\\t*\\\\3(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.$0.shell"}},"patterns":[]},{"begin":"((?<!<)<<(?!<))[\\\\t ]*+([\\"\'])[\\\\t ]*+([^\\"\']+?)(?=[\\"\\\\&\';<\\\\s])(\\\\2)(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.quote.shell"},"3":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"4":{"name":"punctuation.definition.string.heredoc.quote.shell"},"5":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.quoted.heredoc.no-indent.$3","end":"^\\\\3(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.delimiter.shell"}},"patterns":[]},{"begin":"((?<!<)<<-)[\\\\t ]*+([^\\\\t \\"\']+)(?=[\\"\\\\&\';<\\\\s])(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"3":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.unquoted.heredoc.indent.$2","end":"^\\\\t*\\\\2(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.delimiter.shell"}},"patterns":[{"include":"#double_quote_escape_char"},{"include":"#variable"},{"include":"#interpolation"}]},{"begin":"((?<!<)<<(?!<))[\\\\t ]*+([^\\\\t \\"\']+)(?=[\\"\\\\&\';<\\\\s])(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"3":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.unquoted.heredoc.no-indent.$2","end":"^\\\\2(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.delimiter.shell"}},"patterns":[{"include":"#double_quote_escape_char"},{"include":"#variable"},{"include":"#interpolation"}]}]},"herestring":{"patterns":[{"begin":"(<<<)\\\\s*((\'))","beginCaptures":{"1":{"name":"keyword.operator.herestring.shell"},"2":{"name":"string.quoted.single.shell"},"3":{"name":"punctuation.definition.string.begin.shell"}},"contentName":"string.quoted.single.shell","end":"(\')","endCaptures":{"0":{"name":"string.quoted.single.shell"},"1":{"name":"punctuation.definition.string.end.shell"}},"name":"meta.herestring.shell"},{"begin":"(<<<)\\\\s*((\\"))","beginCaptures":{"1":{"name":"keyword.operator.herestring.shell"},"2":{"name":"string.quoted.double.shell"},"3":{"name":"punctuation.definition.string.begin.shell"}},"contentName":"string.quoted.double.shell","end":"(\\")","endCaptures":{"0":{"name":"string.quoted.double.shell"},"1":{"name":"punctuation.definition.string.end.shell"}},"name":"meta.herestring.shell","patterns":[{"include":"#double_quote_context"}]},{"captures":{"1":{"name":"keyword.operator.herestring.shell"},"2":{"name":"string.unquoted.herestring.shell","patterns":[{"include":"#initial_context"}]}},"match":"(<<<)\\\\s*(([^)\\\\\\\\\\\\s]|\\\\\\\\.)+)","name":"meta.herestring.shell"}]},"initial_context":{"patterns":[{"include":"#comment"},{"include":"#pipeline"},{"include":"#normal_statement_seperator"},{"include":"#logical_expression_double"},{"include":"#logical_expression_single"},{"include":"#assignment_statement"},{"include":"#case_statement"},{"include":"#for_statement"},{"include":"#loop"},{"include":"#function_definition"},{"include":"#line_continuation"},{"include":"#arithmetic_double"},{"include":"#misc_ranges"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#redirection"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#alias_statement"},{"include":"#normal_statement"},{"include":"#string"},{"include":"#support"}]},"inline_comment":{"captures":{"1":{"name":"comment.block.shell punctuation.definition.comment.begin.shell"},"2":{"name":"comment.block.shell"},"3":{"patterns":[{"match":"\\\\*/","name":"comment.block.shell punctuation.definition.comment.end.shell"},{"match":"\\\\*","name":"comment.block.shell"}]}},"match":"(/\\\\*)((?:[^*]|\\\\*++[^/])*+(\\\\*++/))"},"interpolation":{"patterns":[{"include":"#arithmetic_dollar"},{"include":"#subshell_dollar"},{"begin":"`","beginCaptures":{"0":{"name":"punctuation.definition.evaluation.backticks.shell"}},"end":"`","endCaptures":{"0":{"name":"punctuation.definition.evaluation.backticks.shell"}},"name":"string.interpolated.backtick.shell","patterns":[{"match":"\\\\\\\\[$\\\\\\\\`]","name":"constant.character.escape.shell"},{"begin":"(?<=\\\\W)(?=#)(?!#\\\\{)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.shell"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.shell"}},"end":"(?=`)","name":"comment.line.number-sign.shell"}]},{"include":"#initial_context"}]}]},"keyword":{"patterns":[{"match":"(?<=^|[\\\\&;\\\\s])(then|else|elif|fi|for|in|do|done|select|continue|esac|while|until|return)(?=[\\\\&;\\\\s]|$)","name":"keyword.control.shell"},{"match":"(?<=^|[\\\\&;\\\\s])(?:export|declare|typeset|local|readonly)(?=[\\\\&;\\\\s]|$)","name":"storage.modifier.shell"}]},"line_comment":{"begin":"\\\\s*+(//)","beginCaptures":{"1":{"name":"punctuation.definition.comment.shell"}},"end":"(?<=\\\\n)(?<!\\\\\\\\\\\\n)","endCaptures":{},"name":"comment.line.double-slash.shell","patterns":[{"include":"#line_continuation_character"}]},"line_continuation":{"match":"\\\\\\\\(?=\\\\n)","name":"constant.character.escape.line-continuation.shell"},"logical-expression":{"patterns":[{"include":"#arithmetic_no_dollar"},{"match":"=[=~]?|!=?|[<>]|&&|\\\\|\\\\|","name":"keyword.operator.logical.shell"},{"match":"(?<!\\\\S)-(nt|ot|ef|eq|ne|l[et]|g[et]|[GLNOSa-hknopr-uwxz])\\\\b","name":"keyword.operator.logical.shell"}]},"logical_expression_context":{"patterns":[{"include":"#regex_comparison"},{"include":"#arithmetic_no_dollar"},{"include":"#logical-expression"},{"include":"#logical_expression_single"},{"include":"#logical_expression_double"},{"include":"#comment"},{"include":"#boolean"},{"include":"#redirect_number"},{"include":"#numeric_literal"},{"include":"#pipeline"},{"include":"#normal_statement_seperator"},{"include":"#string"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#support"}]},"logical_expression_double":{"begin":"\\\\[\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"end":"]]","endCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"name":"meta.scope.logical-expression.shell","patterns":[{"include":"#logical_expression_context"}]},"logical_expression_single":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"name":"meta.scope.logical-expression.shell","patterns":[{"include":"#logical_expression_context"}]},"loop":{"patterns":[{"begin":"(?<=^|[\\\\&;\\\\s])(for)\\\\s+(.+?)\\\\s+(in)(?=[\\\\&;\\\\s]|$)","beginCaptures":{"1":{"name":"keyword.control.shell"},"2":{"name":"variable.other.loop.shell","patterns":[{"include":"#string"}]},"3":{"name":"keyword.control.shell"}},"end":"(?<=^|[\\\\&;\\\\s])done(?=[\\\\&;\\\\s]|$|\\\\))","endCaptures":{"0":{"name":"keyword.control.shell"}},"name":"meta.scope.for-in-loop.shell","patterns":[{"include":"#initial_context"}]},{"begin":"(?<=^|[\\\\&;\\\\s])(while|until)(?=[\\\\&;\\\\s]|$)","beginCaptures":{"1":{"name":"keyword.control.shell"}},"end":"(?<=^|[\\\\&;\\\\s])done(?=[\\\\&;\\\\s]|$|\\\\))","endCaptures":{"0":{"name":"keyword.control.shell"}},"name":"meta.scope.while-loop.shell","patterns":[{"include":"#initial_context"}]},{"begin":"(?<=^|[\\\\&;\\\\s])(select)\\\\s+((?:[^\\\\\\\\\\\\s]|\\\\\\\\.)+)(?=[\\\\&;\\\\s]|$)","beginCaptures":{"1":{"name":"keyword.control.shell"},"2":{"name":"variable.other.loop.shell"}},"end":"(?<=^|[\\\\&;\\\\s])(done)(?=[\\\\&;\\\\s]|$|\\\\))","endCaptures":{"1":{"name":"keyword.control.shell"}},"name":"meta.scope.select-block.shell","patterns":[{"include":"#initial_context"}]},{"begin":"(?<=^|[\\\\&;\\\\s])if(?=[\\\\&;\\\\s]|$)","beginCaptures":{"0":{"name":"keyword.control.if.shell"}},"end":"(?<=^|[\\\\&;\\\\s])fi(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"keyword.control.fi.shell"}},"name":"meta.scope.if-block.shell","patterns":[{"include":"#initial_context"}]}]},"math":{"patterns":[{"include":"#variable"},{"match":"\\\\+{1,2}|-{1,2}|[!~]|\\\\*{1,2}|[%/]|<[<=]?|>[=>]?|==|!=|^|\\\\|{1,2}|&{1,2}|[,:=?]|[-%\\\\&*+/^|]=|<<=|>>=","name":"keyword.operator.arithmetic.shell"},{"match":"0[Xx]\\\\h+","name":"constant.numeric.hex.shell"},{"match":";","name":"punctuation.separator.semicolon.range"},{"match":"0\\\\d+","name":"constant.numeric.octal.shell"},{"match":"\\\\d{1,2}#[0-9@-Z_a-z]+","name":"constant.numeric.other.shell"},{"match":"\\\\d+","name":"constant.numeric.integer.shell"},{"match":"(?<!\\\\w)[0-9A-Z_a-z]+(?!\\\\w)","name":"variable.other.normal.shell"}]},"math_operators":{"patterns":[{"match":"\\\\+{1,2}|-{1,2}|[!~]|\\\\*{1,2}|[%/]|<[<=]?|>[=>]?|==|!=|^|\\\\|{1,2}|&{1,2}|[,:=?]|[-%\\\\&*+/^|]=|<<=|>>=","name":"keyword.operator.arithmetic.shell"},{"match":"0[Xx]\\\\h+","name":"constant.numeric.hex.shell"},{"match":"0\\\\d+","name":"constant.numeric.octal.shell"},{"match":"\\\\d{1,2}#[0-9@-Z_a-z]+","name":"constant.numeric.other.shell"},{"match":"\\\\d+","name":"constant.numeric.integer.shell"}]},"misc_ranges":{"patterns":[{"include":"#logical_expression_single"},{"include":"#logical_expression_double"},{"include":"#subshell_dollar"},{"begin":"(?<![^\\\\t ])(\\\\{)(?![$\\\\w])","beginCaptures":{"1":{"name":"punctuation.definition.group.shell"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.group.shell"}},"name":"meta.scope.group.shell","patterns":[{"include":"#initial_context"}]}]},"modified_assignment_statement":{"begin":"(?<=^|[\\\\t \\\\&;])(?:readonly|declare|typeset|export|local)(?=[\\\\t \\\\&;]|$)","beginCaptures":{"0":{"name":"storage.modifier.$0.shell"}},"end":"(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.shell meta.expression.assignment.modified.shell","patterns":[{"match":"(?<!\\\\w)-\\\\w+\\\\b","name":"string.unquoted.argument.shell constant.other.option.shell"},{"include":"#array_value"},{"captures":{"1":{"name":"variable.other.assignment.shell"},"2":{"name":"punctuation.definition.array.access.shell"},"3":{"name":"variable.other.assignment.shell"},"4":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"keyword.operator.assignment.shell"},"7":{"name":"keyword.operator.assignment.compound.shell"},"8":{"name":"keyword.operator.assignment.compound.shell"},"9":{"name":"constant.numeric.shell constant.numeric.hex.shell"},"10":{"name":"constant.numeric.shell constant.numeric.octal.shell"},"11":{"name":"constant.numeric.shell constant.numeric.other.shell"},"12":{"name":"constant.numeric.shell constant.numeric.decimal.shell"},"13":{"name":"constant.numeric.shell constant.numeric.version.shell"},"14":{"name":"constant.numeric.shell constant.numeric.integer.shell"}},"match":"((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))?(?:(?<=[\\\\t =]|^|[(\\\\[{])(?:(?:(?:(?:(?:(0[Xx]\\\\h+)|(0\\\\d+))|(\\\\d{1,2}#[0-9@-Z_a-z]+))|(-?\\\\d+\\\\.\\\\d+))|(-?\\\\d+(?:\\\\.\\\\d+)+))|(-?\\\\d+))(?=[\\\\t ]|$|[);}]))?"},{"include":"#normal_context"}]},"modifiers":{"match":"(?<=^|[\\\\t \\\\&;])(?:readonly|declare|typeset|export|local)(?=[\\\\t \\\\&;]|$)","name":"storage.modifier.$0.shell"},"normal_assignment_statement":{"begin":"[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))","beginCaptures":{"1":{"name":"variable.other.assignment.shell"},"2":{"name":"punctuation.definition.array.access.shell"},"3":{"name":"variable.other.assignment.shell"},"4":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"keyword.operator.assignment.shell"},"7":{"name":"keyword.operator.assignment.compound.shell"},"8":{"name":"keyword.operator.assignment.compound.shell"}},"end":"(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.expression.assignment.shell","patterns":[{"include":"#comment"},{"include":"#string"},{"include":"#normal_assignment_statement"},{"begin":"(?<=[\\\\t ])(?![\\\\t ]|\\\\w+=)","beginCaptures":{},"end":"(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.command.env.shell","patterns":[{"include":"#command_name_range"},{"include":"#line_continuation"},{"include":"#option"},{"include":"#argument"},{"include":"#string"}]},{"include":"#simple_unquoted"},{"include":"#normal_context"}]},"normal_context":{"patterns":[{"include":"#comment"},{"include":"#pipeline"},{"include":"#normal_statement_seperator"},{"include":"#misc_ranges"},{"include":"#boolean"},{"include":"#redirect_number"},{"include":"#numeric_literal"},{"include":"#string"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#redirection"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#support"},{"include":"#parenthese"}]},"normal_statement":{"begin":"(?!^[\\\\t ]*+$)(?:(?<=(?:^until| until|\\\\tuntil|^while| while|\\\\twhile|^elif| elif|\\\\telif|^else| else|\\\\telse|^then| then|\\\\tthen|^do| do|\\\\tdo|^if| if|\\\\tif) )|(?<=^|[!\\\\&(;`{|]))[\\\\t ]*+(?!nocorrect\\\\W|nocorrect\\\\$|function\\\\W|function\\\\$|foreach\\\\W|foreach\\\\$|repeat\\\\W|repeat\\\\$|logout\\\\W|logout\\\\$|coproc\\\\W|coproc\\\\$|select\\\\W|select\\\\$|while\\\\W|while\\\\$|pushd\\\\W|pushd\\\\$|until\\\\W|until\\\\$|case\\\\W|case\\\\$|done\\\\W|done\\\\$|elif\\\\W|elif\\\\$|else\\\\W|else\\\\$|esac\\\\W|esac\\\\$|popd\\\\W|popd\\\\$|then\\\\W|then\\\\$|time\\\\W|time\\\\$|for\\\\W|for\\\\$|end\\\\W|end\\\\$|fi\\\\W|fi\\\\$|do\\\\W|do\\\\$|in\\\\W|in\\\\$|if\\\\W|if\\\\$)","beginCaptures":{},"end":"(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.shell","patterns":[{"include":"#typical_statements"}]},"normal_statement_seperator":{"captures":{"1":{"name":"punctuation.terminator.statement.semicolon.shell"},"2":{"name":"punctuation.separator.statement.and.shell"},"3":{"name":"punctuation.separator.statement.or.shell"},"4":{"name":"punctuation.separator.statement.background.shell"}},"match":"(?:(?:(;)|(&&))|(\\\\|\\\\|))|(&)"},"numeric_literal":{"captures":{"1":{"name":"constant.numeric.shell constant.numeric.hex.shell"},"2":{"name":"constant.numeric.shell constant.numeric.octal.shell"},"3":{"name":"constant.numeric.shell constant.numeric.other.shell"},"4":{"name":"constant.numeric.shell constant.numeric.decimal.shell"},"5":{"name":"constant.numeric.shell constant.numeric.version.shell"},"6":{"name":"constant.numeric.shell constant.numeric.integer.shell"}},"match":"(?<=[\\\\t =]|^|[(\\\\[{])(?:(?:(?:(?:(?:(0[Xx]\\\\h+)|(0\\\\d+))|(\\\\d{1,2}#[0-9@-Z_a-z]+))|(-?\\\\d+\\\\.\\\\d+))|(-?\\\\d+(?:\\\\.\\\\d+)+))|(-?\\\\d+))(?=[\\\\t ]|$|[);}])"},"option":{"begin":"[\\\\t ]++(-)((?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;]))","beginCaptures":{"1":{"name":"string.unquoted.argument.shell constant.other.option.dash.shell"},"2":{"name":"string.unquoted.argument.shell constant.other.option.shell"}},"contentName":"string.unquoted.argument constant.other.option","end":"(?=[\\\\t ])|(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"patterns":[{"include":"#option_context"}]},"option_context":{"patterns":[{"include":"#misc_ranges"},{"include":"#string"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#redirection"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#support"}]},"parenthese":{"patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.parenthese.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.parenthese.shell"}},"name":"meta.parenthese.group.shell","patterns":[{"include":"#initial_context"}]}]},"pathname":{"patterns":[{"match":"(?<=[:=\\\\s]|^)~","name":"keyword.operator.tilde.shell"},{"match":"[*?]","name":"keyword.operator.glob.shell"},{"begin":"([!*+?@])(\\\\()","beginCaptures":{"1":{"name":"keyword.operator.extglob.shell"},"2":{"name":"punctuation.definition.extglob.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.extglob.shell"}},"name":"meta.structure.extglob.shell","patterns":[{"include":"#initial_context"}]}]},"pipeline":{"patterns":[{"match":"(?<=^|[\\\\&;\\\\s])(time)(?=[\\\\&;\\\\s]|$)","name":"keyword.other.shell"},{"match":"[!|]","name":"keyword.operator.pipe.shell"}]},"redirect_fix":{"captures":{"1":{"name":"keyword.operator.redirect.shell"},"2":{"name":"string.unquoted.argument.shell"}},"match":"(>>?)[\\\\t ]*+([^\\\\t\\\\n \\"$\\\\&-);<>\\\\\\\\`|]+)"},"redirect_number":{"captures":{"1":{"name":"keyword.operator.redirect.stdout.shell"},"2":{"name":"keyword.operator.redirect.stderr.shell"},"3":{"name":"keyword.operator.redirect.$3.shell"}},"match":"(?<=[\\\\t ])(?:(1)|(2)|(\\\\d+))(?=>)"},"redirection":{"patterns":[{"begin":"[<>]\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.interpolated.process-substitution.shell","patterns":[{"include":"#initial_context"}]},{"match":"(?<![<>])(&>|\\\\d*>&\\\\d*|\\\\d*(>>|[<>])|\\\\d*<&|\\\\d*<>)(?![<>])","name":"keyword.operator.redirect.shell"}]},"regex_comparison":{"match":"=~","name":"keyword.operator.logical.regex.shell"},"regexp":{"patterns":[{"match":".+"}]},"simple_options":{"captures":{"0":{"patterns":[{"captures":{"1":{"name":"string.unquoted.argument.shell constant.other.option.dash.shell"},"2":{"name":"string.unquoted.argument.shell constant.other.option.shell"}},"match":"[\\\\t ]++(-)(\\\\w+)"}]}},"match":"(?:[\\\\t ]++-\\\\w+)*"},"simple_unquoted":{"match":"[^\\\\t\\\\n \\"$\\\\&-);<>\\\\\\\\`|]","name":"string.unquoted.shell"},"special_expansion":{"match":"!|:[-=?]?|[*@]|##?|%%|[%/]","name":"keyword.operator.expansion.shell"},"start_of_command":{"match":"[\\\\t ]*+(?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;])(?!nocorrect |nocorrect\\\\t|nocorrect$|readonly |readonly\\\\t|readonly$|function |function\\\\t|function$|foreach |foreach\\\\t|foreach$|coproc |coproc\\\\t|coproc$|logout |logout\\\\t|logout$|export |export\\\\t|export$|select |select\\\\t|select$|repeat |repeat\\\\t|repeat$|pushd |pushd\\\\t|pushd$|until |until\\\\t|until$|while |while\\\\t|while$|local |local\\\\t|local$|case |case\\\\t|case$|done |done\\\\t|done$|elif |elif\\\\t|elif$|else |else\\\\t|else$|esac |esac\\\\t|esac$|popd |popd\\\\t|popd$|then |then\\\\t|then$|time |time\\\\t|time$|for |for\\\\t|for$|end |end\\\\t|end$|fi |fi\\\\t|fi$|do |do\\\\t|do$|in |in\\\\t|in$|if |if\\\\t|if$)(?!\\\\\\\\\\\\n?$)"},"string":{"patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.shell"},{"begin":"\'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"\'","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.quoted.single.shell"},{"begin":"\\\\$?\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.quoted.double.shell","patterns":[{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\`]","name":"constant.character.escape.shell"},{"include":"#variable"},{"include":"#interpolation"}]},{"begin":"\\\\$\'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"\'","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.quoted.single.dollar.shell","patterns":[{"match":"\\\\\\\\[\'\\\\\\\\abefnrtv]","name":"constant.character.escape.ansi-c.shell"},{"match":"\\\\\\\\[0-9]{3}\\"","name":"constant.character.escape.octal.shell"},{"match":"\\\\\\\\x\\\\h{2}\\"","name":"constant.character.escape.hex.shell"},{"match":"\\\\\\\\c.\\"","name":"constant.character.escape.control-char.shell"}]}]},"subshell_dollar":{"patterns":[{"begin":"\\\\$\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.subshell.single.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.subshell.single.shell"}},"name":"meta.scope.subshell","patterns":[{"include":"#parenthese"},{"include":"#initial_context"}]}]},"support":{"patterns":[{"match":"(?<=^|[\\\\&;\\\\s])[.:](?=[\\\\&;\\\\s]|$)","name":"support.function.builtin.shell"}]},"typical_statements":{"patterns":[{"include":"#assignment_statement"},{"include":"#case_statement"},{"include":"#for_statement"},{"include":"#while_statement"},{"include":"#function_definition"},{"include":"#command_statement"},{"include":"#line_continuation"},{"include":"#arithmetic_double"},{"include":"#normal_context"}]},"variable":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.parameter.positional.all.shell"},"2":{"name":"variable.parameter.positional.all.shell"}},"match":"(\\\\$)(@(?!\\\\w))"},{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.parameter.positional.shell"},"2":{"name":"variable.parameter.positional.shell"}},"match":"(\\\\$)([0-9](?!\\\\w))"},{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.language.special.shell"},"2":{"name":"variable.language.special.shell"}},"match":"(\\\\$)([-!#$*0?_](?!\\\\w))"},{"begin":"(\\\\$)(\\\\{)[\\\\t ]*+(?=\\\\d)","beginCaptures":{"1":{"name":"punctuation.definition.variable.shell variable.parameter.positional.shell"},"2":{"name":"punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell variable.parameter.positional.shell"}},"contentName":"meta.parameter-expansion","end":"}","endCaptures":{"0":{"name":"punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell variable.parameter.positional.shell"}},"patterns":[{"include":"#special_expansion"},{"include":"#array_access_inline"},{"match":"[0-9]+","name":"variable.parameter.positional.shell"},{"match":"(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)","name":"variable.other.normal.shell"},{"include":"#variable"},{"include":"#string"}]},{"begin":"(\\\\$)(\\\\{)","beginCaptures":{"1":{"name":"punctuation.definition.variable.shell"},"2":{"name":"punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell"}},"contentName":"meta.parameter-expansion","end":"}","endCaptures":{"0":{"name":"punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell"}},"patterns":[{"include":"#special_expansion"},{"include":"#array_access_inline"},{"match":"(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)","name":"variable.other.normal.shell"},{"include":"#variable"},{"include":"#string"}]},{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.other.normal.shell"},"2":{"name":"variable.other.normal.shell"}},"match":"(\\\\$)(\\\\w+(?!\\\\w))"}]},"while_statement":{"patterns":[{"begin":"\\\\b(while)\\\\b","beginCaptures":{"1":{"name":"keyword.control.while.shell"}},"end":"(?=[\\\\n\\\\&);`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.while.shell","patterns":[{"include":"#line_continuation"},{"include":"#math_operators"},{"include":"#option"},{"include":"#simple_unquoted"},{"include":"#normal_context"},{"include":"#string"}]}]}},"scopeName":"source.shell","aliases":["bash","sh","shell","zsh"]}')),Om=[e];
|
|
2
|
+
export{Om};
|