@bkm016/basalt 0.0.0-stage → 0.1.1
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/README.md +275 -2
- package/chunk-09vr609h.js +2 -0
- package/chunk-0hbjv3y6.js +11 -0
- package/chunk-0qqb6v41.js +3753 -0
- package/chunk-0szjy61m.js +2 -0
- package/chunk-0yytz0r1.js +59 -0
- package/chunk-1aspj1hn.js +3 -0
- package/chunk-1b7gbe8g.js +10 -0
- package/chunk-1v7st27a.js +25 -0
- package/chunk-1yzt0qm0.js +2 -0
- package/chunk-2bb01ddq.js +16 -0
- package/chunk-2wkaw73s.js +9 -0
- package/chunk-2zqny2sy.js +2 -0
- package/chunk-32at88hc.js +3 -0
- package/chunk-3m7qwfm3.js +7 -0
- package/chunk-44ek81ad.js +3 -0
- package/chunk-45cz26ap.js +39 -0
- package/chunk-501zkf9b.js +3 -0
- package/chunk-58vz2qsq.js +2 -0
- package/chunk-6e49xsf5.js +3 -0
- package/chunk-6qertm2t.js +3 -0
- package/chunk-8dxzqwq3.js +2 -0
- package/chunk-9mmz6wt3.js +2 -0
- package/chunk-a3tqx584.js +10 -0
- package/chunk-a6r4z44b.js +2 -0
- package/chunk-a8nyk4k9.js +2 -0
- package/chunk-agntrqs9.js +2 -0
- package/chunk-bhqyxyap.js +3 -0
- package/chunk-bpw6q7g0.js +3 -0
- package/chunk-c25s4w6a.js +5 -0
- package/chunk-cv5wsd9m.js +8 -0
- package/chunk-d48bfd2e.js +3 -0
- package/chunk-dakrpbe6.js +3 -0
- package/chunk-dhm42y04.js +7 -0
- package/chunk-exnn1867.js +2 -0
- package/chunk-f7egr55n.js +31 -0
- package/chunk-g2t6t8fk.js +3 -0
- package/chunk-h6sw8fbt.js +5 -0
- package/chunk-hat3s3pr.js +3 -0
- package/chunk-hcn9cf6v.js +2 -0
- package/chunk-jhd54p1b.js +3 -0
- package/chunk-k7w7ac9q.js +18 -0
- package/chunk-kf8hq21a.js +25 -0
- package/chunk-kfq8wyd3.js +3 -0
- package/chunk-n6e43rvk.js +3 -0
- package/chunk-nt2gntad.js +2 -0
- package/chunk-pmc3y1z8.js +2 -0
- package/chunk-pvncysbb.js +3 -0
- package/chunk-q8zx3kt6.js +2 -0
- package/chunk-qczbfccb.js +12 -0
- package/chunk-qnr1f5pj.js +3 -0
- package/chunk-qx0m82rw.js +2 -0
- package/chunk-r9aatvwm.js +3 -0
- package/chunk-rm3kcxq9.js +20 -0
- package/chunk-rv06x0kn.js +7 -0
- package/chunk-ry0z4ev6.js +2 -0
- package/chunk-s37s3k24.js +12 -0
- package/chunk-sh74qzvt.js +5 -0
- package/chunk-szat3vp4.js +3 -0
- package/chunk-t057xfrt.js +5 -0
- package/chunk-tvm4zmgj.js +3 -0
- package/chunk-v9fea96h.js +3 -0
- package/chunk-vgvq3q12.js +3 -0
- package/chunk-vkkj4awb.js +2 -0
- package/chunk-vv7fp27r.js +3 -0
- package/chunk-wjd9fr23.js +2 -0
- package/chunk-wx7kdf0b.js +2 -0
- package/chunk-x3dnb9sz.js +3 -0
- package/chunk-xsbxykr4.js +2 -0
- package/chunk-xysny0ve.js +3 -0
- package/chunk-y69ewdn2.js +3 -0
- package/chunk-yskm0hsy.js +2 -0
- package/chunk-zef13k3h.js +471 -0
- package/cli.js +89 -0
- package/compiled.js +23 -0
- package/icon-dp9pmcvp.png +0 -0
- package/package.json +21 -4
- package/ui-test-worker.js +226 -0
- package/web/KaTeX_AMS-Regular-n7eqehx2.woff2 +0 -0
- package/web/KaTeX_Caligraphic-Bold-20r3b6fv.woff2 +0 -0
- package/web/KaTeX_Caligraphic-Regular-kkjm8f18.woff2 +0 -0
- package/web/KaTeX_Fraktur-Bold-pz5vg4t0.woff2 +0 -0
- package/web/KaTeX_Fraktur-Regular-a1e9wkwk.woff2 +0 -0
- package/web/KaTeX_Main-Bold-mcp098h8.woff2 +0 -0
- package/web/KaTeX_Main-BoldItalic-fy74z249.woff2 +0 -0
- package/web/KaTeX_Main-Italic-hw2gxy7f.woff2 +0 -0
- package/web/KaTeX_Main-Regular-xvp1b75c.woff2 +0 -0
- package/web/KaTeX_Math-BoldItalic-mf5nf33d.woff2 +0 -0
- package/web/KaTeX_Math-Italic-ap60jrna.woff2 +0 -0
- package/web/KaTeX_SansSerif-Bold-we3bymb6.woff2 +0 -0
- package/web/KaTeX_SansSerif-Italic-ent92bjx.woff2 +0 -0
- package/web/KaTeX_SansSerif-Regular-0573pbz9.woff2 +0 -0
- package/web/KaTeX_Script-Regular-z2rtj6vq.woff2 +0 -0
- package/web/KaTeX_Size1-Regular-dfr3w1hv.woff2 +0 -0
- package/web/KaTeX_Size2-Regular-kted78zb.woff2 +0 -0
- package/web/KaTeX_Size3-Regular-e6k1k5jk.woff2 +0 -0
- package/web/KaTeX_Size4-Regular-abedc1pd.woff2 +0 -0
- package/web/KaTeX_Typewriter-Regular-scw9zx1z.woff2 +0 -0
- package/web/apple-touch-icon-7dkm33qp.png +0 -0
- package/web/apple-touch-icon.png +0 -0
- package/web/chunk-05w4fyzc.js +1 -0
- package/web/chunk-0mrkjnte.js +1 -0
- package/web/chunk-0pbjgdgp.js +2 -0
- package/web/chunk-0s80zw00.js +1 -0
- package/web/chunk-0vt9fg48.js +2 -0
- package/web/chunk-20q90epj.js +2 -0
- package/web/chunk-22a4ety5.js +1 -0
- package/web/chunk-24mfx6w1.js +2 -0
- package/web/chunk-2j4m0bh1.js +2 -0
- package/web/chunk-2m12wyrb.js +16 -0
- package/web/chunk-2msj52w6.js +1 -0
- package/web/chunk-2ps6mepk.js +120 -0
- package/web/chunk-2pver6r4.js +1 -0
- package/web/chunk-2scce33n.js +1 -0
- package/web/chunk-37ajk6zg.js +2 -0
- package/web/chunk-3ee04tmm.js +200 -0
- package/web/chunk-3jhyzmnf.js +292 -0
- package/web/chunk-45fzdcgz.js +30 -0
- package/web/chunk-4gavbw65.js +1 -0
- package/web/chunk-4ks96e4r.js +1 -0
- package/web/chunk-4rm1vy7w.js +1 -0
- package/web/chunk-4v8en1yw.js +40 -0
- package/web/chunk-4wd9r73y.js +1 -0
- package/web/chunk-4wkm9fda.js +1 -0
- package/web/chunk-54thej0t.js +2 -0
- package/web/chunk-59kqahb3.js +1 -0
- package/web/chunk-5vw9rs4r.js +4 -0
- package/web/chunk-6beqrmtq.js +1 -0
- package/web/chunk-6m69hczt.js +2 -0
- package/web/chunk-70qwwwak.js +2 -0
- package/web/chunk-74j07k8k.js +2 -0
- package/web/chunk-8g239029.js +1 -0
- package/web/chunk-8p4tc9f4.js +70 -0
- package/web/chunk-90kp4pnz.js +2 -0
- package/web/chunk-9an7cjd9.js +291 -0
- package/web/chunk-9dxjafp2.js +78 -0
- package/web/chunk-9p12mgs6.js +2 -0
- package/web/chunk-9v1f6yc8.js +1 -0
- package/web/chunk-9yakxvjb.js +2 -0
- package/web/chunk-a1z5qx1r.js +36 -0
- package/web/chunk-a3verqw9.js +214 -0
- package/web/chunk-a5x2zveg.js +7 -0
- package/web/chunk-ad6x47yy.js +1 -0
- package/web/chunk-amzgyy1k.js +1 -0
- package/web/chunk-b1pe46zz.js +2 -0
- package/web/chunk-b4wbk7vc.js +217 -0
- package/web/chunk-bc78qf1m.js +7 -0
- package/web/chunk-bgnnrpna.js +89 -0
- package/web/chunk-bj90t5gh.js +99 -0
- package/web/chunk-bjkc94mv.js +1 -0
- package/web/chunk-ca682sm6.js +370 -0
- package/web/chunk-cff5hcm8.js +8 -0
- package/web/chunk-cg3jterp.js +2 -0
- package/web/chunk-d18r4m14.js +141 -0
- package/web/chunk-dmqtdeb4.js +1 -0
- package/web/chunk-dt462hk9.js +332 -0
- package/web/chunk-dy2gm1fs.js +1 -0
- package/web/chunk-dzwxgqgm.js +39 -0
- package/web/chunk-e32y85kx.js +1 -0
- package/web/chunk-e53wfgb8.js +1 -0
- package/web/chunk-e6jxqbv7.js +3 -0
- package/web/chunk-esp1mmgr.js +1 -0
- package/web/chunk-ew3cgdtd.js +1 -0
- package/web/chunk-f26smjjf.js +2 -0
- package/web/chunk-f91wzwtk.js +1 -0
- package/web/chunk-fk0dh93x.js +89 -0
- package/web/chunk-fm2ybfj5.js +98 -0
- package/web/chunk-fscafg24.js +34 -0
- package/web/chunk-fz06t6km.js +55 -0
- package/web/chunk-g1ev11wx.js +1 -0
- package/web/chunk-g4azyef7.js +106 -0
- package/web/chunk-gjq1pxw3.js +1 -0
- package/web/chunk-gqw3f02j.js +140 -0
- package/web/chunk-h5ejbf6e.js +1 -0
- package/web/chunk-hev4hq89.js +2 -0
- package/web/chunk-hfaffkrh.js +1 -0
- package/web/chunk-hp167dbv.js +1 -0
- package/web/chunk-j2vt8c8v.js +1 -0
- package/web/chunk-jjh5jvva.js +1 -0
- package/web/chunk-jrcyc9s9.js +38 -0
- package/web/chunk-jwzd9tzk.js +24 -0
- package/web/chunk-k5btcvbg.js +1 -0
- package/web/chunk-ka3q31t1.js +1 -0
- package/web/chunk-kdyjnwdx.js +2 -0
- package/web/chunk-kpvgecwy.js +1 -0
- package/web/chunk-kq40ss39.js +1 -0
- package/web/chunk-m2d1sp30.js +1 -0
- package/web/chunk-n1dmrz44.js +2 -0
- package/web/chunk-n90cqdvg.js +2 -0
- package/web/chunk-nj0cv1cq.js +257 -0
- package/web/chunk-nzey7cpv.js +1 -0
- package/web/chunk-p3b9crsa.js +2 -0
- package/web/chunk-pf2ab8p8.js +1 -0
- package/web/chunk-pxe3vna4.js +1 -0
- package/web/chunk-q0p5xqe1.js +84 -0
- package/web/chunk-q5ke7a33.js +24 -0
- package/web/chunk-q7dsnvpf.js +1 -0
- package/web/chunk-qd8bxxdj.js +1 -0
- package/web/chunk-qefasa1j.js +2 -0
- package/web/chunk-qh7265qw.js +4 -0
- package/web/chunk-qnaqf0cr.js +1 -0
- package/web/chunk-r1dnh0s8.js +1 -0
- package/web/chunk-r5eakmw6.js +1 -0
- package/web/chunk-rg426vkf.js +1 -0
- package/web/chunk-rpmpttbk.js +12 -0
- package/web/chunk-rtf2zzzv.js +1 -0
- package/web/chunk-ry9256r7.js +1 -0
- package/web/chunk-rykfak98.js +2 -0
- package/web/chunk-scpwc9ev.js +1 -0
- package/web/chunk-srrfphes.js +1 -0
- package/web/chunk-ss1bcb0n.js +2 -0
- package/web/chunk-ssy07dd2.js +1 -0
- package/web/chunk-t6agpn2z.js +1 -0
- package/web/chunk-taynqrgq.js +142 -0
- package/web/chunk-tgpbhzn9.js +1 -0
- package/web/chunk-tmvakq7n.js +19 -0
- package/web/chunk-tqmwd9qp.js +139 -0
- package/web/chunk-ts7zrf5b.js +2 -0
- package/web/chunk-ttg6tbwx.js +2 -0
- package/web/chunk-v28fx2nd.js +1 -0
- package/web/chunk-v5cnt7c8.js +1 -0
- package/web/chunk-vt40e1kp.js +1136 -0
- package/web/chunk-w53rba6g.js +1 -0
- package/web/chunk-w86n42dy.js +1 -0
- package/web/chunk-w880psmw.js +1 -0
- package/web/chunk-wptv8atc.js +2 -0
- package/web/chunk-wtawdeej.css +1 -0
- package/web/chunk-xbty0rv7.js +41 -0
- package/web/chunk-xet1jjy9.js +1 -0
- package/web/chunk-xjxv8dg8.js +169 -0
- package/web/chunk-xrxne80b.js +62 -0
- package/web/chunk-xzp7jf7e.js +2 -0
- package/web/chunk-y0m8hrwz.js +303 -0
- package/web/chunk-y49fhfda.js +7 -0
- package/web/chunk-yd46jhqv.js +1 -0
- package/web/chunk-ydtrc1ay.js +2 -0
- package/web/chunk-z09emmrb.js +1 -0
- package/web/chunk-z7dcbxws.js +1 -0
- package/web/chunk-zbj1trar.js +2 -0
- package/web/chunk-zde7mj43.js +1 -0
- package/web/icon-192.png +0 -0
- package/web/icon-512.png +0 -0
- package/web/icon-maskable-512.png +0 -0
- package/web/icon-yx2p2pye.svg +13 -0
- package/web/icon.svg +13 -0
- package/web/index.html +23 -0
- package/web/install.ps1 +91 -0
- package/web/install.sh +177 -0
- package/web/inter-latin-wght-normal-an0py913.woff2 +0 -0
- package/web/jetbrains-mono-latin-wght-normal-hj2e42wt.woff2 +0 -0
- package/web/manifest-txf6vfbq.webmanifest +35 -0
- package/web/manifest.webmanifest +35 -0
- package/web/source-serif-4-latin-wght-italic-ta5tqqvz.woff2 +0 -0
- package/web/source-serif-4-latin-wght-normal-1yyvbhsz.woff2 +0 -0
- package/web/sw.js +90 -0
- package/worker.js +2 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{h,o,g,i,a,v,t,n,_,yt}from"./chunk-vt40e1kp.js";var U="__chat__";function T(s){if(!Number.isFinite(s)||s<=0)return"0";if(s<1000)return Math.round(s).toString();if(s<1e6)return`${(s/1000).toFixed(1)}K`;if(s<1e9)return`${(s/1e6).toFixed(2)}M`;return`${(s/1e9).toFixed(2)}B`}function B(s){let c=Number.isFinite(s)?Math.max(0,s):0;return Math.round(c).toLocaleString("en-US")}function P(s){if(!Number.isFinite(s)||s<=0)return"0s";if(s<1000)return"<1s";if(s<60000)return`${Math.floor(s/1000)}s`;if(s<3600000){let u=Math.floor(s/1000),e=Math.floor(u/60),d=u%60;return d>0?`${e}m ${d}s`:`${e}m`}if(s<259200000){let u=Math.floor(s/60000),e=Math.floor(u/60),d=u%60;return d>0?`${e}h ${d}m`:`${e}h`}let c=Math.floor(s/3600000),x=Math.floor(c/24),p=c%24;return p>0?`${x}d ${p}h`:`${x}d`}function X(s){if(!Number.isFinite(s)||s<=0)return"0s";if(s<1000)return"<1s";if(s<60000)return`${Math.round(s/1000)}s`;if(s<3600000)return`${Math.round(s/60000)}m`;if(s<86400000){let p=s/3600000;return`${p>=10?Math.round(p).toString():p.toFixed(1).replace(/\.0$/,"")}h`}let c=s/86400000;return`${c>=10?Math.round(c).toString():c.toFixed(1).replace(/\.0$/,"")}d`}function L(s,c=1){if(!Number.isFinite(s)||s<=0)return"0%";let x=10**-c/100;if(s<x)return`<${(x*100).toFixed(c)}%`;return`${(s*100).toFixed(c)}%`}function K(s){if(!Number.isFinite(s)||s<=0)return"0 B";if(s<1024)return`${Math.round(s)} B`;if(s<1048576)return`${(s/1024).toFixed(1)} KB`;if(s<1073741824)return`${(s/1048576).toFixed(2)} MB`;return`${(s/1073741824).toFixed(2)} GB`}function G(s){let c=s.split("-"),x=c[1],p=c[2];if(x!==void 0&&p!==void 0)return`${x}/${p}`;return s}function Y(s){let c=s.split("-"),x=c[0],p=c[1],u=c[2];if(x===void 0||p===void 0||u===void 0)return s;let e=Number(x),d=Number(p)-1,b=Number(u),w=new Date(Date.UTC(e,d,b)),R=["周日","周一","周二","周三","周四","周五","周六"],M=w.getUTCDay(),F=R[M]??"";return`${s} ${F}`}function ee(s,c=Date.now()){if(s===null||s===void 0||!Number.isFinite(s)||s<=0)return"从未";let x=Math.max(0,c-s);if(x<60000)return"刚刚";if(x<3600000)return`${Math.max(1,Math.floor(x/60000))} 分钟前`;if(x<86400000)return`${Math.max(1,Math.floor(x/3600000))} 小时前`;if(x<2592000000)return`${Math.max(1,Math.floor(x/86400000))} 天前`;let p=new Date(s),u=p.getFullYear(),e=String(p.getMonth()+1).padStart(2,"0"),d=String(p.getDate()).padStart(2,"0");return`${u}-${e}-${d}`}function te(s){let{projects:c,selectedProjectID:x,onSelectProject:p}=s,{style:u}=_();if(c.length===0)return t("div",{className:u("surface.empty"),children:"暂无项目统计数据"});return t("div",{className:"divide-y divide-line",children:c.map((e)=>{let d=e.projectID??U,b=x===d,w=Math.max(e.tokenShare>0?1:0,e.tokenShare*100);return n("div",{className:"p-4 space-y-2.5",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 items-center gap-2",children:[t("span",{className:"font-medium text-sm text-ink truncate",children:e.name}),t("span",{className:u("control.badge","font-mono truncate max-w-[240px]"),title:e.directory||"未绑定项目目录",children:e.directory||"独立会话"}),t("button",{type:"button",onClick:()=>p(b?null:d),className:"rounded px-1.5 py-0.5 text-[11px] text-accent hover:bg-accent/10 transition-colors cursor-pointer shrink-0",children:b?"取消筛选":"筛选"})]}),n("div",{className:"flex items-baseline gap-1.5 font-mono tabular-nums shrink-0",children:[t("span",{className:"text-xs font-medium text-ink",title:B(e.totalTokens),children:T(e.totalTokens)}),n("span",{className:"text-[11px] text-faint",children:["(",L(e.tokenShare),")"]})]})]}),t("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-raised",children:t("div",{className:"h-full rounded-full bg-accent transition-all duration-300",style:{width:`${w}%`}})}),n("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-1 font-mono text-[11px] text-dim tabular-nums",children:[n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[n("span",{children:["输入 ",t("span",{className:"text-ink",children:T(e.inputTokens)})]}),n("span",{children:["输出 ",t("span",{className:"text-ink",children:T(e.outputTokens)})]}),n("span",{children:["缓存读 ",t("span",{className:"text-ink",children:T(e.cacheReadTokens)}),n("span",{className:"text-faint",children:[" (",L(e.cacheHitRate),")"]})]})]}),n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[n("span",{children:["耗时 ",t("span",{className:"text-ink",children:P(e.activeDurationMs)})]}),n("span",{children:[t("span",{className:"text-ink",children:e.sessionCount.toLocaleString()})," 会话"]}),n("span",{children:["工具 ",t("span",{className:"text-ink",children:e.toolCalls.toLocaleString()})," 次"]})]})]})]},d)})})}function ae(s){let{models:c}=s,{ModelIcon:x,style:p}=_();if(c.length===0)return t("div",{className:p("surface.empty"),children:"暂无模型调用数据"});return t("div",{className:"divide-y divide-line",children:c.map((u)=>{let e=Math.max(u.share>0?1:0,u.share*100);return n("div",{className:"p-4 space-y-2.5",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 items-center gap-2",children:[t(x,{modelID:u.model,className:"size-4 shrink-0"}),t("span",{className:"font-mono text-sm font-medium text-ink truncate",children:u.shortName}),t("span",{className:p("control.badge","font-mono shrink-0"),children:u.provider})]}),n("div",{className:"flex items-baseline gap-2.5 font-mono tabular-nums shrink-0",children:[u.avgTps!==null&&n("span",{className:"text-[11px] text-dim",children:[u.avgTps.toFixed(1)," tok/s"]}),n("span",{className:"text-xs font-medium text-ink",title:B(u.totalTokens),children:[T(u.totalTokens)," ",n("span",{className:"text-[11px] font-normal text-faint",children:["(",L(u.share),")"]})]})]})]}),t("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-raised",children:t("div",{className:"h-full rounded-full bg-accent transition-all duration-300",style:{width:`${e}%`}})}),n("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-1 font-mono text-[11px] text-dim tabular-nums",children:[n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[n("span",{children:["输入 ",t("span",{className:"text-ink",children:T(u.inputTokens)})]}),n("span",{children:["输出 ",t("span",{className:"text-ink",children:T(u.outputTokens)})]}),n("span",{children:["缓存读 ",t("span",{className:"text-ink",children:T(u.cacheReadTokens)}),n("span",{className:"text-faint",children:[" (",L(u.cacheHitRate),")"]})]})]}),n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[n("span",{children:[t("span",{className:"text-ink",children:u.turns.toLocaleString()})," 轮",u.errors>0?n("span",{className:"text-danger",children:[" (",u.errors," 错)"]}):null]}),n("span",{children:["工具 ",t("span",{className:"text-ink",children:u.toolCalls.toLocaleString()})," 次"]}),u.generationMs>0&&n("span",{children:["推理 ",t("span",{className:"text-ink",children:X(u.generationMs)})]})]})]})]},u.model)})})}function ne(s){let{tools:c}=s,{StatusChip:x,style:p}=_();if(c.length===0)return t("div",{className:p("surface.empty"),children:"暂无工具调用数据"});return t("div",{className:"divide-y divide-line",children:c.map((u)=>{let e=Math.max(u.share>0?1:0,u.share*100),d=u.successRate>=0.95?"success":u.successRate>=0.8?"warning":"danger",b=Math.max(0,u.calls-u.errors),w=u.calls>0?Math.round(u.outputBytes/u.calls):0;return n("div",{className:"p-4 space-y-2.5",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 items-center gap-2",children:[t("span",{className:"font-mono text-sm font-medium text-ink truncate",children:u.name}),n(x,{tone:d,children:["成功率 ",L(u.successRate)]})]}),n("div",{className:"flex items-baseline gap-1.5 font-mono tabular-nums shrink-0",children:[n("span",{className:"text-xs font-medium text-ink",children:[u.calls.toLocaleString()," 次"]}),n("span",{className:"text-[11px] text-faint",children:["(",L(u.share),")"]})]})]}),t("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-raised",children:t("div",{className:"h-full rounded-full bg-accent transition-all duration-300",style:{width:`${e}%`}})}),n("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-1 font-mono text-[11px] text-dim tabular-nums",children:[n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[n("span",{children:["成功 ",t("span",{className:"text-ink",children:b.toLocaleString()})," 次"]}),n("span",{children:["失败 ",t("span",{className:u.errors>0?"text-danger":"text-ink",children:u.errors.toLocaleString()})," 次"]})]}),n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[n("span",{children:["累计输出 ",t("span",{className:"text-ink",children:K(u.outputBytes)})]}),n("span",{children:["单次均值 ",t("span",{className:"text-ink",children:K(w)})]})]})]})]},u.name)})})}function se(s){let{sessions:c,onOpenSession:x}=s,{style:p}=_();if(c.length===0)return t("div",{className:p("surface.empty"),children:"暂无高消耗会话记录"});let u=Math.max(1,...c.map((e)=>e.totalTokens));return t("div",{className:"divide-y divide-line",children:c.map((e)=>{let d=u>0?Math.max(1,e.totalTokens/u*100):0,b=e.model.split("/").pop()??e.model;return n("button",{type:"button",onClick:()=>x(e.id),className:"group block w-full p-4 text-left space-y-2.5 hover:bg-raised/40 transition-colors cursor-pointer",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[t("span",{className:"font-medium text-sm text-ink truncate group-hover:text-accent transition-colors",children:e.title.trim()||"新会话"}),t("span",{className:p("control.badge","font-mono truncate max-w-[140px] shrink-0"),title:e.projectName,children:e.projectName}),e.kind==="sub"&&t("span",{className:"rounded bg-accent/15 px-1.5 py-0.5 text-[10.5px] text-accent shrink-0",children:"子代理"}),e.archivedAt!==null&&t("span",{className:p("control.badge","shrink-0"),children:"已归档"})]}),n("div",{className:"flex items-center gap-1.5 font-mono tabular-nums shrink-0",children:[t("span",{className:"text-xs font-medium text-ink",title:B(e.totalTokens),children:T(e.totalTokens)}),t(yt,{className:"size-3.5 text-faint group-hover:text-ink group-hover:translate-x-0.5 transition-all"})]})]}),t("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-raised",children:t("div",{className:"h-full rounded-full bg-accent transition-all duration-300",style:{width:`${d}%`}})}),n("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-1 font-mono text-[11px] text-dim tabular-nums",children:[n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[n("span",{children:["输入 ",t("span",{className:"text-ink",children:T(e.inputTokens)})]}),n("span",{children:["输出 ",t("span",{className:"text-ink",children:T(e.outputTokens)})]}),n("span",{children:["缓存读 ",t("span",{className:"text-ink",children:T(e.cacheReadTokens)})]})]}),n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[t("span",{className:"text-ink",children:b}),n("span",{children:["耗时 ",t("span",{className:"text-ink",children:P(e.activeDurationMs)})]}),n("span",{children:[t("span",{className:"text-ink",children:e.assistantTurns})," 轮"]}),t("span",{className:"text-faint",children:ee(e.updated)})]})]})]},e.id)})})}var oe=[{value:"tokens",label:"Token 用量"},{value:"duration",label:"活跃耗时"},{value:"activity",label:"交互轮次"}];function re(s){let{cn:c,Segmented:x,SettingGroup:p,style:u}=_(),{daily:e}=s,[d,b]=a("tokens"),[w,R]=a(null),M=g(()=>e.some((r)=>r.totalTokens>0||r.activeDurationMs>0||r.runs>0),[e]),F=g(()=>{if(e.length===0)return{totalText:"0",avgText:"0",peakDate:"—",peakValueText:"0"};if(d==="tokens"){let S=e.reduce((C,I)=>C+I.totalTokens,0),j=e.filter((C)=>C.totalTokens>0).length,y=e[0];for(let C of e)if(!y||C.totalTokens>y.totalTokens)y=C;return{totalText:T(S),totalFullText:B(S),avgText:j>0?T(Math.round(S/j)):"0",peakDate:y&&y.totalTokens>0?G(y.date):"—",peakValueText:y&&y.totalTokens>0?T(y.totalTokens):"0"}}if(d==="duration"){let S=e.reduce((C,I)=>C+I.activeDurationMs,0),j=e.filter((C)=>C.activeDurationMs>0).length,y=e[0];for(let C of e)if(!y||C.activeDurationMs>y.activeDurationMs)y=C;return{totalText:P(S),totalFullText:P(S),avgText:j>0?P(Math.round(S/j)):"0s",peakDate:y&&y.activeDurationMs>0?G(y.date):"—",peakValueText:y&&y.activeDurationMs>0?P(y.activeDurationMs):"0s"}}let r=e.reduce((S,j)=>S+j.assistantTurns,0),l=e.reduce((S,j)=>S+j.userMessages,0),f=r+l,N=e.filter((S)=>S.assistantTurns>0||S.userMessages>0).length,k=e[0];for(let S of e){let j=k?k.assistantTurns+k.userMessages:0;if(!k||S.assistantTurns+S.userMessages>j)k=S}let A=k?k.assistantTurns+k.userMessages:0;return{totalText:`${f.toLocaleString()} 轮`,totalFullText:`助手 ${r.toLocaleString()} 轮 · 用户 ${l.toLocaleString()} 问`,avgText:N>0?`${(f/N).toFixed(1)} 轮/天`:"0 轮/天",peakDate:k&&A>0?G(k.date):"—",peakValueText:k&&A>0?`${A.toLocaleString()} 轮`:"0 轮"}},[e,d]),D=g(()=>{if(w){let r=e.find((l)=>l.date===w);if(r)return r}for(let r=e.length-1;r>=0;r--){let l=e[r];if(l&&(l.totalTokens>0||l.activeDurationMs>0||l.runs>0))return l}return e[e.length-1]},[e,w]),z=g(()=>{if(d==="tokens")return Math.max(1,...e.map((r)=>r.totalTokens));if(d==="duration")return Math.max(1000,...e.map((r)=>r.activeDurationMs));return Math.max(1,...e.map((r)=>r.assistantTurns+r.userMessages))},[e,d]),m=g(()=>{if(e.length<=7)return e.map((f)=>f.date);let r=6,l=[];for(let f=0;f<r;f++){let N=Math.round(f*(e.length-1)/(r-1)),k=e[N];if(k)l.push(k.date)}return l},[e]);if(!M)return t(p,{title:"每日趋势",action:t(x,{value:d,onChange:(r)=>b(r),options:oe}),children:t("div",{className:u("surface.empty"),children:"当前时间范围内暂无活跃数据"})});return t(p,{title:"每日趋势",action:t(x,{value:d,onChange:(r)=>b(r),options:oe}),children:n("div",{className:"p-4 space-y-4",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex flex-wrap items-center gap-x-3.5 gap-y-1 font-mono text-dim tabular-nums",children:[n("span",{children:["汇总 ",t("span",{className:"text-ink",children:F.totalText})]}),n("span",{children:["日均 ",t("span",{className:"text-ink",children:F.avgText})]}),n("span",{children:["峰值 ",t("span",{className:"text-ink",children:F.peakValueText}),F.peakDate!=="—"?n("span",{className:"text-faint",children:[" (",F.peakDate,")"]}):null]})]}),n("div",{className:"flex items-center gap-3 text-[11px] text-dim",children:[d==="tokens"&&n(v,{children:[n("span",{className:"inline-flex items-center gap-1.5",children:[t("span",{className:"size-2 rounded-full bg-accent/40"}),"缓存读"]}),n("span",{className:"inline-flex items-center gap-1.5",children:[t("span",{className:"size-2 rounded-full bg-accent"}),"输入"]}),n("span",{className:"inline-flex items-center gap-1.5",children:[t("span",{className:"size-2 rounded-full bg-success"}),"输出"]})]}),d==="duration"&&n(v,{children:[n("span",{className:"inline-flex items-center gap-1.5",children:[t("span",{className:"size-2 rounded-full bg-accent"}),"工作调度"]}),n("span",{className:"inline-flex items-center gap-1.5",children:[t("span",{className:"size-2 rounded-full bg-success"}),"模型推理"]})]}),d==="activity"&&n(v,{children:[n("span",{className:"inline-flex items-center gap-1.5",children:[t("span",{className:"size-2 rounded-full bg-accent"}),"助手回复"]}),n("span",{className:"inline-flex items-center gap-1.5",children:[t("span",{className:"size-2 rounded-full bg-success"}),"用户提问"]})]})]})]}),n("div",{className:"relative h-44 w-full pt-1",children:[n("div",{className:"absolute inset-0 flex flex-col justify-between pointer-events-none pb-5 text-[10px] text-faint/60",children:[t("div",{className:"border-b border-line/40 w-full"}),t("div",{className:"border-b border-line/30 w-full"}),t("div",{className:"border-b border-line/40 w-full"})]}),n("section",{"aria-label":"每日趋势柱状序列",className:"relative h-full flex flex-col justify-between",onMouseLeave:()=>R(null),children:[t("div",{className:"flex-1 flex items-end gap-1 sm:gap-1.5 pb-2",children:e.map((r)=>{let l=r.totalTokens;if(d==="duration")l=r.activeDurationMs;else if(d==="activity")l=r.assistantTurns+r.userMessages;let f=l<=0,N=f?0:Math.max(3,Math.min(100,l/z*100)),k=D?.date===r.date;return n("button",{type:"button","aria-label":`${r.date} 统计数据`,className:"flex-1 h-full flex flex-col justify-end items-center group cursor-pointer relative min-w-0 bg-transparent p-0 border-0 focus:outline-hidden",onMouseEnter:()=>R(r.date),onFocus:()=>R(r.date),onClick:()=>R(r.date),children:[t("div",{className:c("absolute inset-y-0 w-full rounded-xs transition-colors pointer-events-none",k?"bg-accent/10":"group-hover:bg-raised/60")}),f?t("div",{className:"h-1 w-full max-w-[24px] rounded-full bg-raised group-hover:bg-dim/30"}):n("div",{className:"w-full max-w-[24px] rounded-t-xs overflow-hidden flex flex-col justify-end transition-all duration-150",style:{height:`${N}%`},children:[d==="tokens"&&n(v,{children:[r.outputTokens>0&&t("div",{className:"bg-success transition-all duration-200",style:{height:`${r.outputTokens/r.totalTokens*100}%`}}),r.inputTokens+r.cacheWriteTokens>0&&t("div",{className:"bg-accent transition-all duration-200",style:{height:`${(r.inputTokens+r.cacheWriteTokens)/r.totalTokens*100}%`}}),r.cacheReadTokens>0&&t("div",{className:"bg-accent/40 transition-all duration-200",style:{height:`${r.cacheReadTokens/r.totalTokens*100}%`}})]}),d==="duration"&&n(v,{children:[r.generationMs>0&&t("div",{className:"bg-success transition-all duration-200",style:{height:`${Math.min(100,r.generationMs/Math.max(1,r.activeDurationMs)*100)}%`}}),t("div",{className:"bg-accent flex-1 transition-all duration-200"})]}),d==="activity"&&n(v,{children:[r.userMessages>0&&t("div",{className:"bg-success transition-all duration-200",style:{height:`${r.userMessages/Math.max(1,r.assistantTurns+r.userMessages)*100}%`}}),t("div",{className:"bg-accent flex-1 transition-all duration-200"})]})]}),k&&t("div",{className:"absolute -bottom-1 size-1 rounded-full bg-accent"})]},r.date)})}),t("div",{className:c("flex items-center pt-1.5 text-[10px] text-faint font-mono tabular-nums",e.length<=7?"gap-1 sm:gap-1.5":"justify-between"),children:m.map((r)=>t("div",{className:c("whitespace-nowrap",e.length<=7&&"flex-1 text-center"),children:G(r)},r))})]})]}),t("div",{className:"flex flex-wrap items-center justify-between gap-2 border-t border-line pt-3 font-mono text-xs tabular-nums",children:D?n(v,{children:[t("span",{className:"text-ink",children:Y(D.date)}),n("div",{className:"flex flex-wrap items-center gap-x-3.5 gap-y-1 text-dim",children:[n("span",{children:["Token ",t("span",{className:"text-ink",children:T(D.totalTokens)})]}),n("span",{children:["耗时 ",t("span",{className:"text-ink",children:P(D.activeDurationMs)})]}),n("span",{children:["交互 ",n("span",{className:"text-ink",children:[D.assistantTurns+D.userMessages," 轮"]})]}),n("span",{children:["工具 ",n("span",{className:"text-ink",children:[D.toolCalls," 次"]})]})]})]}):t("span",{className:"font-sans text-faint",children:"悬停柱状图查看单日明细"})})]})})}function ie(s){let{cn:c,SettingGroup:x}=_(),{daily:p,hourly:u}=s,[e,d]=a(null),b=g(()=>{let l=new Map;for(let N of u)l.set(N.hour,N);let f=[];for(let N=0;N<24;N++){let k=l.get(N);if(k)f.push(k);else f.push({hour:N,totalTokens:0,activeDurationMs:0,userMessages:0,assistantTurns:0,runs:0})}return f},[u]),w=g(()=>{let l=b[0];for(let f of b)if(!l||f.totalTokens>l.totalTokens)l=f;return l&&l.totalTokens>0?l:null},[b]),R=g(()=>b.reduce((l,f)=>l+f.totalTokens,0),[b]),M=g(()=>Math.max(1,...b.map((l)=>l.totalTokens)),[b]),F=g(()=>{if(R<=0)return 0;return b.filter((f)=>f.hour>=8&&f.hour<20).reduce((f,N)=>f+N.totalTokens,0)/R},[b,R]),D=g(()=>Math.max(1,...p.map((l)=>l.totalTokens)),[p]),z=g(()=>{let l=0,f=0;for(let N of p)if(N.totalTokens>0||N.activeDurationMs>0||N.runs>0){if(f++,f>l)l=f}else f=0;return l},[p]),m=g(()=>p.filter((l)=>l.totalTokens>0||l.activeDurationMs>0||l.runs>0).length,[p]),r=e!==null?b[e]:w;return n(x,{title:"活跃时段与热力",action:n("div",{className:"flex items-center gap-3 font-mono text-xs text-faint tabular-nums",children:[n("span",{children:["日间占比 ",L(F)]}),n("span",{children:["连续活跃 ",z," 天"]}),n("span",{children:["活跃 ",m,"/",p.length," 天"]})]}),children:[n("div",{className:"p-4 space-y-3",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[t("span",{className:"text-dim",children:"24 小时分布"}),r?n("div",{className:"flex items-center gap-3 font-mono text-dim tabular-nums",children:[n("span",{className:"text-ink",children:[e!==null?"时段 ":"高峰 ",String(r.hour).padStart(2,"0"),":00 -"," ",String((r.hour+1)%24).padStart(2,"0"),":00"]}),t("span",{className:"text-ink",children:T(r.totalTokens)}),r.activeDurationMs>0&&t("span",{children:P(r.activeDurationMs)})]}):t("span",{className:"text-faint",children:"暂无时段分布"})]}),n("section",{"aria-label":"24 小时活跃分布序列",className:"h-28 w-full flex flex-col justify-between pt-1",onMouseLeave:()=>d(null),children:[t("div",{className:"flex-1 flex items-end gap-1.5 pb-1.5",children:b.map((l)=>{let f=w?.hour===l.hour,N=e===l.hour,k=l.totalTokens>0?Math.max(6,l.totalTokens/M*100):0,A=`${String(l.hour).padStart(2,"0")}:00 - ${String((l.hour+1)%24).padStart(2,"0")}:00
|
|
2
|
+
消耗: ${B(l.totalTokens)} Token
|
|
3
|
+
耗时: ${P(l.activeDurationMs)}
|
|
4
|
+
助手轮次: ${l.assistantTurns} 轮`;return t("button",{type:"button","aria-label":`${String(l.hour).padStart(2,"0")}:00 时段统计`,className:"flex-1 h-full flex flex-col justify-end items-center group relative cursor-pointer bg-transparent p-0 border-0 focus:outline-hidden",title:A,onMouseEnter:()=>d(l.hour),onFocus:()=>d(l.hour),onClick:()=>d(l.hour),children:k>0?t("div",{className:c("w-full max-w-[20px] rounded-t-xs transition-all duration-200",f||N?"bg-accent":"bg-accent/55 group-hover:bg-accent"),style:{height:`${k}%`}}):t("div",{className:"h-1 w-full max-w-[20px] rounded-full bg-raised group-hover:bg-dim/30"})},l.hour)})}),n("div",{className:"flex justify-between items-center text-[10px] text-faint font-mono pt-1.5 border-t border-line/40",children:[t("span",{children:"00:00"}),t("span",{children:"04:00"}),t("span",{children:"08:00"}),t("span",{children:"12:00"}),t("span",{children:"16:00"}),t("span",{children:"20:00"}),t("span",{children:"23:00"})]})]})]}),n("div",{className:"p-4 space-y-2.5",children:[n("div",{className:"text-xs text-dim",children:["自然日热力 (",p.length," 天)"]}),t("div",{className:"flex flex-wrap items-center gap-1.5",children:p.map((l)=>{let f="bg-raised";if(l.totalTokens>0){let k=l.totalTokens/D;if(k<=0.33)f="bg-accent/30";else if(k<=0.66)f="bg-accent/60";else f="bg-accent"}let N=`${Y(l.date)}
|
|
5
|
+
消耗: ${B(l.totalTokens)} Token
|
|
6
|
+
耗时: ${P(l.activeDurationMs)}
|
|
7
|
+
助手轮次: ${l.assistantTurns} 轮`;return t("div",{className:c("size-3.5 rounded-xs transition-transform hover:scale-125 cursor-pointer",f),title:N},l.date)})})]})]})}var pe=[{value:"7d",label:"近 7 天"},{value:"30d",label:"近 30 天"},{value:"90d",label:"近 90 天"},{value:"all",label:"全部"}],V=new Map,le=[];function q(s,c){return`${s}:${c??"all"}`}function _e(s){let{connection:c,onOpen:x}=s,{Button:p,PageLayout:u,Segmented:e,SettingGroup:d,style:b}=_(),[w,R]=a("30d"),[M,F]=a(null),[D,z]=a("projects"),[m,r]=a(()=>V.get(q("30d",null))??null),[l,f]=a(()=>!V.has(q("30d",null))),[N,k]=a(null),[A,S]=a(()=>le),j=i(0),y=h(async()=>{let I=++j.current,O=q(w,M),Q=V.get(O);if(Q)r(Q);f(!0);try{let E=new URLSearchParams({range:w,tzOffset:String(new Date().getTimezoneOffset())});if(M)E.set("projectID",M);let W=await c.request(`/api/stats?${E.toString()}`);if(I!==j.current)return;if(V.set(O,W),r(W),k(null),W.projects)S((ue)=>{let Z=new Map(ue.map((H)=>[H.id,H.name]));for(let H of W.projects)if(H.projectID)Z.set(H.projectID,H.name);let J=Array.from(Z.entries()).map(([H,ce])=>({id:H,name:ce}));return le=J,J})}catch(E){if(I===j.current)k(E instanceof Error?E.message:"加载统计数据失败")}finally{if(I===j.current)f(!1)}},[c,w,M]);o(()=>(y(),()=>{j.current++}),[y]);let C=g(()=>{if(!M)return null;if(M===U)return"独立聊天";return(A.find((O)=>O.id===M)??m?.projects.find((O)=>O.projectID===M))?.name??"指定项目"},[M,A,m]);return n(u,{title:C?n(v,{children:["统计 ",n("span",{className:"text-dim",children:["· ",C]})]}):"统计",description:"按项目、模型与工具统计活跃耗时与 Token 消耗。",actions:n(v,{children:[M&&t(p,{size:"sm",variant:"ghost",onClick:()=>F(null),children:"返回全部"}),t(e,{value:w,onChange:R,options:pe})]}),children:[N&&n("div",{className:"mb-4 flex items-center justify-between rounded-lg bg-danger/10 px-3 py-2 text-xs text-danger",children:[t("span",{children:N}),t(p,{size:"sm",variant:"ghost",onClick:()=>{y()},className:"text-danger hover:text-danger",children:"重试"})]}),l&&!m?t("div",{className:"flex justify-center py-12 text-xs text-faint",children:"正在加载统计…"}):!m?t("div",{className:b("surface.card","p-12 text-center text-sm text-dim"),children:"暂无统计数据"}):n("div",{className:"space-y-8",children:[t(d,{title:"核心总览",unboxed:!0,children:n("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[n("div",{className:b("surface.card","p-4"),children:[n("div",{className:"flex items-center justify-between gap-2 text-xs text-faint",children:[t("span",{children:"总 Token 消耗"}),n("span",{className:"font-mono tabular-nums",children:["缓存命中 ",L(m.overview.cacheHitRate)]})]}),t("div",{className:"mt-1.5 font-mono text-xl font-semibold tracking-tight text-ink tabular-nums",title:`${B(m.overview.totalTokens)} Token`,children:T(m.overview.totalTokens)}),n("div",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 font-mono text-[11px] text-dim tabular-nums",children:[n("span",{children:["输入 ",T(m.overview.inputTokens)]}),n("span",{children:["输出 ",T(m.overview.outputTokens)]}),n("span",{children:["缓存读 ",T(m.overview.cacheReadTokens)]})]})]}),n("div",{className:b("surface.card","p-4"),children:[n("div",{className:"flex items-center justify-between gap-2 text-xs text-faint",children:[t("span",{children:"活跃工作耗时"}),n("span",{className:"font-mono tabular-nums",children:["日均"," ",m.overview.activeDays>0?P(m.overview.activeDurationMs/m.overview.activeDays):"0s"]})]}),t("div",{className:"mt-1.5 font-mono text-xl font-semibold tracking-tight text-ink tabular-nums",children:P(m.overview.activeDurationMs)}),n("div",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 font-mono text-[11px] text-dim tabular-nums",children:[n("span",{children:["模型推理 ",P(m.overview.generationMs)]}),n("span",{children:["并发累计 ",P(m.overview.cumulativeRunDurationMs)]})]})]}),n("div",{className:b("surface.card","p-4"),children:[n("div",{className:"flex items-center justify-between gap-2 text-xs text-faint",children:[t("span",{children:"会话与工作流"}),n("span",{className:"font-mono tabular-nums",children:[m.overview.activeProjects,"/",m.overview.totalProjects," 活跃项目"]})]}),n("div",{className:"mt-1.5 font-mono text-xl font-semibold tracking-tight text-ink tabular-nums",children:[m.overview.sessionCount.toLocaleString()," 个会话"]}),n("div",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 font-mono text-[11px] text-dim tabular-nums",children:[n("span",{children:[m.overview.mainSessionCount," 主会话 / ",m.overview.subSessionCount," 子代理"]}),n("span",{children:[m.overview.userMessages," 提问 / ",m.overview.assistantTurns," 回复"]})]})]}),n("div",{className:b("surface.card","p-4"),children:[n("div",{className:"flex items-center justify-between gap-2 text-xs text-faint",children:[t("span",{children:"吞吐效率与调用"}),n("span",{className:"font-mono tabular-nums",children:[m.overview.compactions," 次折叠"]})]}),t("div",{className:"mt-1.5 font-mono text-xl font-semibold tracking-tight text-ink tabular-nums",children:m.overview.avgTps!==null?`${m.overview.avgTps.toFixed(1)} tok/s`:`${m.overview.toolCalls.toLocaleString()} 次调用`}),n("div",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 font-mono text-[11px] text-dim tabular-nums",children:[n("span",{children:[m.overview.toolCalls.toLocaleString()," 次工具调用"]}),n("span",{children:[m.overview.runCount.toLocaleString()," 次运行"]})]})]})]})}),t(re,{daily:m.daily}),t(ie,{daily:m.daily,hourly:m.hourly}),t(d,{title:"分类明细",action:t(e,{value:D,onChange:z,options:[{value:"projects",label:`项目消耗 (${m.projects.length})`},{value:"models",label:`模型分析 (${m.models.length})`},{value:"tools",label:`工具调用 (${m.tools.length})`},{value:"sessions",label:`高消耗会话 (${m.topSessions.length})`}]}),children:n("div",{className:"animate-fade",children:[D==="projects"&&t(te,{projects:m.projects,selectedProjectID:M,onSelectProject:F,onOpenSession:x}),D==="models"&&t(ae,{models:m.models}),D==="tools"&&t(ne,{tools:m.tools}),D==="sessions"&&t(se,{sessions:m.topSessions,onOpenSession:x})]},D)})]})]})}export{_e as StatsPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.freeze(JSON.parse('{"displayName":"Swift","fileTypes":["swift"],"firstLineMatch":"^#!/.*\\\\bswift","name":"swift","patterns":[{"include":"#root"}],"repository":{"async-throws":{"captures":{"1":{"name":"invalid.illegal.await-must-precede-throws.swift"},"2":{"name":"storage.modifier.exception.swift"},"3":{"name":"storage.modifier.async.swift"}},"match":"\\\\b(?:((?:throws\\\\s+|rethrows\\\\s+)async)|((?:|re)throws)|(async))\\\\b"},"attributes":{"patterns":[{"begin":"((@)available)(\\\\()","beginCaptures":{"1":{"name":"storage.modifier.attribute.swift"},"2":{"name":"punctuation.definition.attribute.swift"},"3":{"name":"punctuation.definition.arguments.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"name":"meta.attribute.available.swift","patterns":[{"captures":{"1":{"name":"keyword.other.platform.os.swift"},"2":{"name":"constant.numeric.swift"}},"match":"\\\\b(swift|(?:iOS|macOS|OSX|watchOS|tvOS|visionOS|UIKitForMac)(?:ApplicationExtension)?)\\\\b(?:\\\\s+([0-9]+(?:\\\\.[0-9]+)*)\\\\b)?"},{"begin":"\\\\b((?:introduc|deprecat|obsolet)ed)\\\\s*(:)\\\\s*","beginCaptures":{"1":{"name":"keyword.other.swift"},"2":{"name":"punctuation.separator.key-value.swift"}},"end":"(?!\\\\G)","patterns":[{"match":"\\\\b[0-9]+(?:\\\\.[0-9]+)*\\\\b","name":"constant.numeric.swift"}]},{"begin":"\\\\b(message|renamed)\\\\s*(:)\\\\s*(?=\\")","beginCaptures":{"1":{"name":"keyword.other.swift"},"2":{"name":"punctuation.separator.key-value.swift"}},"end":"(?!\\\\G)","patterns":[{"include":"#literals"}]},{"captures":{"1":{"name":"keyword.other.platform.all.swift"},"2":{"name":"keyword.other.swift"},"3":{"name":"invalid.illegal.character-not-allowed-here.swift"}},"match":"(?:(\\\\*)|\\\\b(deprecated|unavailable|noasync)\\\\b)\\\\s*(.*?)(?=[),])"}]},{"begin":"((@)objc)(\\\\()","beginCaptures":{"1":{"name":"storage.modifier.attribute.swift"},"2":{"name":"punctuation.definition.attribute.swift"},"3":{"name":"punctuation.definition.arguments.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"name":"meta.attribute.objc.swift","patterns":[{"captures":{"1":{"name":"invalid.illegal.missing-colon-after-selector-piece.swift"}},"match":"\\\\w*(?::(?:\\\\w*:)*(\\\\w*))?","name":"entity.name.function.swift"}]},{"begin":"(@)(?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>)","beginCaptures":{"0":{"name":"storage.modifier.attribute.swift"},"1":{"name":"punctuation.definition.attribute.swift"},"2":{"name":"punctuation.definition.identifier.swift"},"3":{"name":"punctuation.definition.identifier.swift"}},"end":"(?!\\\\G\\\\()","name":"meta.attribute.swift","patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.arguments.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"name":"meta.arguments.attribute.swift","patterns":[{"include":"#expressions"}]}]}]},"builtin-functions":{"patterns":[{"match":"(?<=\\\\.)(?:s(?:ort(?:ed)?|plit)|contains|index|partition|f(?:i(?:lter|rst)|orEach|latMap)|with(?:MutableCharacters|CString|U(?:nsafe(?:Mutable(?:BufferPointer|Pointer(?:s|To(?:Header|Elements)))|BufferPointer)|TF8Buffer))|m(?:in|a[px]))(?=\\\\s*[({])\\\\b","name":"support.function.swift"},{"match":"(?<=\\\\.)(?:s(?:ymmetricDifference|t(?:oreBytes|arts|ride)|ortInPlace|u(?:ccessor|ffix|btract(?:ing|InPlace|WithOverflow)?)|quareRoot|amePosition)|h(?:oldsUnique(?:|OrPinned)Reference|as(?:Suf|Pre)fix)|ne(?:gated?|xt)|c(?:o(?:untByEnumerating|py(?:Bytes)?)|lamp(?:ed)?|reate)|t(?:o(?:IntMax|Opaque|UIntMax)|ake(?:R|Unr)etainedValue|r(?:uncatingRemainder|a(?:nscodedLength|ilSurrogate)))|i(?:s(?:MutableAndUniquelyReferenced(?:OrPinned)?|S(?:trictSu(?:perset(?:Of)?|bset(?:Of)?)|u(?:perset(?:Of)?|bset(?:Of)?))|Continuation|T(?:otallyOrdered|railSurrogate)|Disjoint(?:With)?|Unique(?:Reference|lyReferenced(?:OrPinned)?)|Equal|Le(?:ss(?:ThanOrEqualTo)?|adSurrogate))|n(?:sert(?:ContentsOf)?|tersect(?:ion|InPlace)?|itialize(?:Memory|From)?|dex(?:Of|ForKey)))|o(?:verlaps|bjectAt)|d(?:i(?:stance(?:To)?|vide(?:d|WithOverflow)?)|e(?:s(?:cendant|troy)|code(?:CString)?|initialize|alloc(?:ate(?:Capacity)?)?)|rop(?:First|Last))|u(?:n(?:ion(?:InPlace)?|derestimateCount|wrappedOrError)|p(?:date(?:Value)?|percased))|join(?:ed|WithSeparator)|p(?:op(?:First|Last)|ass(?:R|Unr)etained|re(?:decessor|fix))|e(?:scaped?|n(?:code|umerated?)|lementsEqual|xclusiveOr(?:InPlace)?)|f(?:orm(?:Remainder|S(?:ymmetricDifference|quareRoot)|TruncatingRemainder|In(?:tersection|dex)|Union)|latten|rom(?:CString(?:RepairingIllFormedUTF8)?|Opaque))|w(?:i(?:thMemoryRebound|dth)|rite(?:To)?)|l(?:o(?:wercased|ad)|e(?:adSurrogate|xicographical(?:Compare|lyPrecedes)))|a(?:ss(?:ign(?:(?:Backward|)From)?|umingMemoryBound)|d(?:d(?:ing(?:Product)?|Product|WithOverflow)?|vanced(?:By)?)|utorelease|ppend(?:ContentsOf)?|lloc(?:ate)?|bs)|r(?:ound(?:ed)?|e(?:serveCapacity|tain|duce|place(?:(?:R|Subr)ange)?|versed?|quest(?:Native|UniqueMutableBacking)Buffer|lease|m(?:ove(?:Range|Subrange|Value(?:ForKey)?|First|Last|A(?:tIndex|ll))?|ainder(?:WithOverflow)?)))|ge(?:nerate|t(?:Objects|Element))|m(?:in(?:imum(?:Magnitude)?|Element)|ove(?:Initialize(?:Memory|BackwardFrom|From)?|Assign(?:From)?)?|ultipl(?:y(?:WithOverflow)?|ied)|easure|a(?:ke(?:Iterator|Description)|x(?:imum(?:Magnitude)?|Element)))|bindMemory)(?=\\\\s*\\\\()","name":"support.function.swift"},{"match":"(?<=\\\\.)(?:s(?:uperclassMirror|amePositionIn|tartsWith)|nextObject|c(?:haracterAtIndex|o(?:untByEnumeratingWithState|pyWithZone)|ustom(?:Mirror|PlaygroundQuickLook))|is(?:EmptyInput|ASCII)|object(?:Enumerator|ForKey|AtIndex)|join|put|keyEnumerator|withUnsafeMutablePointerToValue|length|getMirror|m(?:oveInitializeAssignFrom|ember))(?=\\\\s*\\\\()","name":"support.function.swift"}]},"builtin-global-functions":{"patterns":[{"begin":"\\\\b(type)(\\\\()\\\\s*(of)(:)","beginCaptures":{"1":{"name":"support.function.dynamic-type.swift"},"2":{"name":"punctuation.definition.arguments.begin.swift"},"3":{"name":"support.variable.parameter.swift"},"4":{"name":"punctuation.separator.argument-label.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"patterns":[{"include":"#expressions"}]},{"match":"\\\\ba(?:nyGenerator|utoreleasepool)(?=\\\\s*[({])\\\\b","name":"support.function.swift"},{"match":"\\\\b(?:s(?:tride(?:of(?:Value)?)?|izeof(?:Value)?|equence|wap)|numericCast|transcode|is(?:UniquelyReferenced(?:NonObjC)?|KnownUniquelyReferenced)|zip|d(?:ump|ebugPrint)|unsafe(?:BitCast|Downcast|Unwrap|Address(?:Of)?)|pr(?:int|econdition(?:Failure)?)|fatalError|with(?:Unsafe(?:Mutable|)Pointer|ExtendedLifetime|VaList)|a(?:ssert(?:ionFailure)?|lignof(?:Value)?|bs)|re(?:peatElement|adLine)|getVaList|m(?:in|ax))(?=\\\\s*\\\\()","name":"support.function.swift"},{"match":"\\\\b(?:s(?:ort|uffix|pli(?:ce|t))|insert|overlaps|d(?:istance|rop(?:First|Last))|join|prefix|extend|withUnsafe(?:Mutable|)Pointers|lazy|advance|re(?:flect|move(?:Range|Last|A(?:tIndex|ll))))(?=\\\\s*\\\\()","name":"support.function.swift"}]},"builtin-properties":{"patterns":[{"match":"(?<=(?:^|\\\\W)(?:Process\\\\.|CommandLine\\\\.))(arguments|argc|unsafeArgv)","name":"support.variable.swift"},{"match":"(?<=\\\\.)(?:s(?:t(?:artIndex|ri(?:ngValue|de))|i(?:ze|gn(?:BitIndex|ificand(?:Bit(?:Count|Pattern)|Width)?|alingNaN)?)|u(?:perclassMirror|mmary|bscriptBaseAddress))|h(?:eader|as(?:hValue|PointerRepresentation))|n(?:ulTerminatedUTF8|ext(?:Down|Up)|a(?:n|tiveOwner))|c(?:haracters|ount(?:TrailingZeros)?|ustom(?:Mirror|PlaygroundQuickLook)|apacity)|i(?:s(?:S(?:ign(?:Minus|aling(?:NaN)?)|ubnormal)|N(?:ormal|aN)|Canonical|Infinite|Zero|Empty|Finite|ASCII)|n(?:dices|finity)|dentity)|owner|de(?:|bugDe)scription|u(?:n(?:safelyUnwrapped|icodeScalars?|derestimatedCount)|tf(?:16|8(?:Start|C(?:String|odeUnitCount))?)|intValue|ppercaseString|lp(?:OfOne)?)|p(?:i|ointee)|e(?:ndIndex|lements|xponent(?:Bit(?:Count|Pattern))?)|values?|keys|quietNaN|f(?:irst(?:ElementAddress(?:IfContiguous)?)?|loatingPointClass)|l(?:ittleEndian|owercaseString|eastNo(?:nzero|rmal)Magnitude|a(?:st|zy))|a(?:l(?:ignment|l(?:ocatedElementCount|Zeros))|rray(?:PropertyIsNativeTypeChecked)?)|ra(?:dix|wValue)|greatestFiniteMagnitude|m(?:in|emory|ax)|b(?:yteS(?:ize|wapped)|i(?:nade|tPattern|gEndian)|uffer|ase(?:Address)?))\\\\b","name":"support.variable.swift"},{"match":"(?<=\\\\.)(?:boolValue|disposition|end|objectIdentifier|quickLookObject|start|valueType)\\\\b","name":"support.variable.swift"},{"match":"(?<=\\\\.)(?:s(?:calarValue|i(?:ze|gnalingNaN)|o(?:und|me)|uppressed|prite|et)|n(?:one|egative(?:Subnormal|Normal|Infinity|Zero))|c(?:ol(?:or|lection)|ustomized)|t(?:o(?:NearestOr(?:Even|AwayFromZero)|wardZero)|uple|ext)|i(?:nt|mage)|optional|d(?:ictionary|o(?:uble|wn))|u(?:Int|p|rl)|p(?:o(?:sitive(?:Subnormal|Normal|Infinity|Zero)|int)|lus)|e(?:rror|mptyInput)|view|quietNaN|float|a(?:ttributedString|wayFromZero)|r(?:ectangle|ange)|generated|minus|b(?:ool|ezierPath))\\\\b","name":"support.variable.swift"}]},"builtin-types":{"patterns":[{"include":"#builtin-types-builtin-class-type"},{"include":"#builtin-types-builtin-enum-type"},{"include":"#builtin-types-builtin-protocol-type"},{"include":"#builtin-types-builtin-struct-type"},{"include":"#builtin-types-builtin-typealias"},{"match":"\\\\bAny\\\\b","name":"support.type.any.swift"}]},"builtin-types-builtin-class-type":{"match":"\\\\b(Managed((?:|Proto)Buffer)|NonObjectiveCBase|AnyGenerator)\\\\b","name":"support.class.swift"},"builtin-types-builtin-enum-type":{"patterns":[{"match":"\\\\b(?:CommandLine|Process(?=\\\\.))\\\\b","name":"support.constant.swift"},{"match":"\\\\bNever\\\\b","name":"support.constant.never.swift"},{"match":"\\\\b(?:ImplicitlyUnwrappedOptional|Representation|MemoryLayout|FloatingPointClassification|SetIndexRepresentation|SetIteratorRepresentation|FloatingPointRoundingRule|UnicodeDecodingResult|Optional|DictionaryIndexRepresentation|AncestorRepresentation|DisplayStyle|PlaygroundQuickLook|Never|FloatingPointSign|Bit|DictionaryIteratorRepresentation)\\\\b","name":"support.type.swift"},{"match":"\\\\b(?:MirrorDisposition|QuickLookObject)\\\\b","name":"support.type.swift"}]},"builtin-types-builtin-protocol-type":{"patterns":[{"match":"\\\\bActor\\\\b","name":"support.type.swift"},{"match":"\\\\b(?:Ra(?:n(?:domAccess(?:Collection|Indexable)|geReplaceable(?:Collection|Indexable))|wRepresentable)|M(?:irrorPath|utable(?:Collection|Indexable))|Bi(?:naryFloatingPoint|twiseOperations|directional(?:Collection|Indexable))|S(?:tr(?:ide|eam)able|igned(?:Number|Integer)|e(?:tAlgebra|quence))|Hashable|C(?:o(?:llection|mparable)|ustom(?:Reflecta|StringConverti|DebugStringConverti|PlaygroundQuickLooka|LeafReflecta)ble|VarArg)|TextOutputStream|I(?:n(?:teger(?:Arithmetic)?|dexable(?:Base)?)|teratorProtocol)|OptionSet|Un(?:signedInteger|icodeCodec)|E(?:quatable|rror|xpressibleBy(?:BooleanLiteral|String(?:Interpolation|Literal)|NilLiteral|IntegerLiteral|DictionaryLiteral|UnicodeScalarLiteral|ExtendedGraphemeClusterLiteral|FloatLiteral|ArrayLiteral))|FloatingPoint|L(?:osslessStringConvertible|azy(?:Sequence|Collection)Protocol)|A(?:nyObject|bsoluteValuable))\\\\b","name":"support.type.swift"},{"match":"\\\\b(?:Ran(?:domAccessIndex|geReplaceableCollection)Type|GeneratorType|M(?:irror(?:|Path)Type|utable(?:Sliceable|CollectionType))|B(?:i(?:twiseOperations|directionalIndex)Type|oolean(?:Type|LiteralConvertible))|S(?:tring(?:Interpolation|Literal)Convertible|i(?:nk|gned(?:Numb|Integ)er)Type|e(?:tAlgebra|quence)Type|liceable)|NilLiteralConvertible|C(?:ollection|VarArg)Type|Inte(?:rvalType|ger(?:Type|LiteralConvertible|ArithmeticType))|O(?:utputStream|ptionSet)Type|DictionaryLiteralConvertible|Un(?:signedIntegerType|icode(?:ScalarLiteralConvertible|CodecType))|E(?:rrorType|xten(?:sibleCollectionType|dedGraphemeClusterLiteralConvertible))|F(?:orwardIndexType|loat(?:ingPointType|LiteralConvertible))|A(?:nyCollectionType|rrayLiteralConvertible))\\\\b","name":"support.type.swift"}]},"builtin-types-builtin-struct-type":{"patterns":[{"match":"\\\\b(?:R(?:e(?:peat(?:ed)?|versed(?:RandomAccess(?:Collection|Index)|Collection|Index))|an(?:domAccessSlice|ge(?:Replaceable(?:RandomAccess|Bidirectional|)Slice|Generator)?))|Generator(?:Sequence|OfOne)|M(?:irror|utable(?:Ran(?:domAccess|geReplaceable(?:RandomAccess|Bidirectional|))|Bidirectional|)Slice|anagedBufferPointer)|B(?:idirectionalSlice|ool)|S(?:t(?:aticString|ri(?:ng|deT(?:hrough(?:(?:Gen|It)erator)?|o(?:(?:Gen|It)erator)?)))|et(?:I(?:ndex|terator))?|lice)|HalfOpenInterval|C(?:haracter(?:View)?|o(?:ntiguousArray|untable(?:|Closed)Range|llectionOfOne)|OpaquePointer|losed(?:Range(?:I(?:ndex|terator))?|Interval)|VaListPointer)|I(?:n(?:t(?:16|8|32|64)?|d(?:ices|ex(?:ing(?:Gen|It)erator)?))|terator(?:Sequence|OverOne)?)|Zip2(?:Sequence|Iterator)|O(?:paquePointer|bjectIdentifier)|D(?:ictionary(?:I(?:ndex|terator)|Literal)?|ouble|efault(?:RandomAccess|Bidirectional|)Indices)|U(?:n(?:safe(?:RawPointer|Mutable(?:Raw|Buffer|)Pointer|BufferPointer(?:(?:Gen|It)erator)?|Pointer)|icodeScalar(?:View)?|foldSequence|managed)|TF(?:16(?:View)?|8(?:View)?|32)|Int(?:16|8|32|64)?)|Join(?:Generator|ed(?:Sequence|Iterator))|PermutationGenerator|E(?:numerate(?:Generator|Sequence|d(?:Sequence|Iterator))|mpty(?:Generator|Collection|Iterator))|Fl(?:oat(?:80)?|atten(?:Generator|BidirectionalCollection(?:Index)?|Sequence|Collection(?:Index)?|Iterator))|L(?:egacyChildren|azy(?:RandomAccessCollection|Map(?:RandomAccessCollection|Generator|BidirectionalCollection|Sequence|Collection|Iterator)|BidirectionalCollection|Sequence|Collection|Filter(?:Generator|BidirectionalCollection|Sequence|Collection|I(?:ndex|terator))))|A(?:ny(?:RandomAccessCollection|Generator|BidirectionalCollection|Sequence|Hashable|Collection|I(?:ndex|terator))|utoreleasingUnsafeMutablePointer|rray(?:Slice)?))\\\\b","name":"support.type.swift"},{"match":"\\\\b(?:R(?:everse(?:RandomAccess(?:Collection|Index)|Collection|Index)|awByte)|Map(?:Generator|Sequence|Collection)|S(?:inkOf|etGenerator)|Zip2Generator|DictionaryGenerator|Filter(?:Generator|Sequence|Collection(?:Index)?)|LazyForwardCollection|Any(?:RandomAccessIndex|BidirectionalIndex|Forward(?:Collection|Index)))\\\\b","name":"support.type.swift"}]},"builtin-types-builtin-typealias":{"patterns":[{"match":"\\\\b(?:Raw(?:Significand|Exponent|Value)|B(?:ooleanLiteralType|uffer|ase)|S(?:t(?:orage|r(?:i(?:ngLiteralType|de)|eam[12]))|ubSequence)|NativeBuffer|C(?:hild(?:ren)?|Bool|S(?:hort|ignedChar)|odeUnit|Char(?:16|32)?|Int|Double|Unsigned(?:Short|Char|Int|Long(?:Long)?)|Float|WideChar|Long(?:Long)?)|I(?:n(?:t(?:Max|egerLiteralType)|d(?:ices|ex(?:Distance)?))|terator)|Distance|U(?:n(?:icodeScalar(?:Type|Index|View|LiteralType)|foldFirstSequence)|TF(?:16(?:Index|View)|8Index)|IntMax)|E(?:lements?|x(?:tendedGraphemeCluster(?:|Literal)Type|ponent))|V(?:oid|alue)|Key|Float(?:32|LiteralType|64)|AnyClass)\\\\b","name":"support.type.swift"},{"match":"\\\\b(?:Generator|PlaygroundQuickLook|UWord|Word)\\\\b","name":"support.type.swift"}]},"code-block":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.scope.begin.swift"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.scope.end.swift"}},"patterns":[{"include":"$self"}]},"comments":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.comment.swift"}},"match":"\\\\A^(#!).*$\\\\n?","name":"comment.line.number-sign.swift"},{"begin":"/\\\\*\\\\*(?!/)","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.swift"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.swift"}},"name":"comment.block.documentation.swift","patterns":[{"include":"#comments-nested"}]},{"begin":"/\\\\*:","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.swift"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.swift"}},"name":"comment.block.documentation.playground.swift","patterns":[{"include":"#comments-nested"}]},{"begin":"/\\\\*","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.swift"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.swift"}},"name":"comment.block.swift","patterns":[{"include":"#comments-nested"}]},{"match":"\\\\*/","name":"invalid.illegal.unexpected-end-of-block-comment.swift"},{"begin":"(^[\\\\t ]+)?(?=//)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.swift"}},"end":"(?!\\\\G)","patterns":[{"begin":"///","beginCaptures":{"0":{"name":"punctuation.definition.comment.swift"}},"end":"$","name":"comment.line.triple-slash.documentation.swift"},{"begin":"//:","beginCaptures":{"0":{"name":"punctuation.definition.comment.swift"}},"end":"$","name":"comment.line.double-slash.documentation.swift"},{"begin":"//","beginCaptures":{"0":{"name":"punctuation.definition.comment.swift"}},"end":"$","name":"comment.line.double-slash.swift"}]}]},"comments-nested":{"begin":"/\\\\*","end":"\\\\*/","patterns":[{"include":"#comments-nested"}]},"compiler-control":{"patterns":[{"begin":"^\\\\s*(#)(if|elseif)\\\\s+(false)\\\\b.*?(?=$|//|/\\\\*)","beginCaptures":{"0":{"name":"meta.preprocessor.conditional.swift"},"1":{"name":"punctuation.definition.preprocessor.swift"},"2":{"name":"keyword.control.import.preprocessor.conditional.swift"},"3":{"name":"constant.language.boolean.swift"}},"contentName":"comment.block.preprocessor.swift","end":"(?=^\\\\s*(#(e(?:lseif|lse|ndif)))\\\\b)"},{"begin":"^\\\\s*(#)(if|elseif)\\\\s+","captures":{"1":{"name":"punctuation.definition.preprocessor.swift"},"2":{"name":"keyword.control.import.preprocessor.conditional.swift"}},"end":"(?=\\\\s*/[*/])|$","name":"meta.preprocessor.conditional.swift","patterns":[{"match":"(&&|\\\\|\\\\|)","name":"keyword.operator.logical.swift"},{"match":"\\\\b(true|false)\\\\b","name":"constant.language.boolean.swift"},{"captures":{"1":{"name":"keyword.other.condition.swift"},"2":{"name":"punctuation.definition.parameters.begin.swift"},"3":{"name":"support.constant.platform.architecture.swift"},"4":{"name":"punctuation.definition.parameters.end.swift"}},"match":"\\\\b(arch)\\\\s*(\\\\()\\\\s*(?:(arm|arm64|powerpc64|powerpc64le|i386|x86_64|s390x)|\\\\w+)\\\\s*(\\\\))"},{"captures":{"1":{"name":"keyword.other.condition.swift"},"2":{"name":"punctuation.definition.parameters.begin.swift"},"3":{"name":"support.constant.platform.os.swift"},"4":{"name":"punctuation.definition.parameters.end.swift"}},"match":"\\\\b(os)\\\\s*(\\\\()\\\\s*(?:(macOS|OSX|iOS|tvOS|watchOS|visionOS|Android|Linux|FreeBSD|Windows|PS4)|\\\\w+)\\\\s*(\\\\))"},{"captures":{"1":{"name":"keyword.other.condition.swift"},"2":{"name":"punctuation.definition.parameters.begin.swift"},"3":{"name":"entity.name.type.module.swift"},"4":{"name":"punctuation.definition.parameters.end.swift"}},"match":"\\\\b(canImport)\\\\s*(\\\\()([_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*)(\\\\))"},{"begin":"\\\\b(targetEnvironment)\\\\s*(\\\\()","beginCaptures":{"1":{"name":"keyword.other.condition.swift"},"2":{"name":"punctuation.definition.parameters.begin.swift"}},"end":"(\\\\))|$","endCaptures":{"1":{"name":"punctuation.definition.parameters.end.swift"}},"patterns":[{"match":"\\\\b(simulator|UIKitForMac)\\\\b","name":"support.constant.platform.environment.swift"}]},{"begin":"\\\\b(swift|compiler)\\\\s*(\\\\()","beginCaptures":{"1":{"name":"keyword.other.condition.swift"},"2":{"name":"punctuation.definition.parameters.begin.swift"}},"end":"(\\\\))|$","endCaptures":{"1":{"name":"punctuation.definition.parameters.end.swift"}},"patterns":[{"match":">=|<","name":"keyword.operator.comparison.swift"},{"match":"\\\\b[0-9]+(?:\\\\.[0-9]+)*\\\\b","name":"constant.numeric.swift"}]}]},{"captures":{"1":{"name":"punctuation.definition.preprocessor.swift"},"2":{"name":"keyword.control.import.preprocessor.conditional.swift"},"3":{"patterns":[{"match":"\\\\S+","name":"invalid.illegal.character-not-allowed-here.swift"}]}},"match":"^\\\\s*(#)(e(?:lse|ndif))(.*?)(?=$|//|/\\\\*)","name":"meta.preprocessor.conditional.swift"},{"captures":{"1":{"name":"punctuation.definition.preprocessor.swift"},"2":{"name":"keyword.control.import.preprocessor.sourcelocation.swift"},"4":{"name":"punctuation.definition.parameters.begin.swift"},"5":{"patterns":[{"begin":"(file)\\\\s*(:)\\\\s*(?=\\")","beginCaptures":{"1":{"name":"support.variable.parameter.swift"},"2":{"name":"punctuation.separator.key-value.swift"}},"end":"(?!\\\\G)","patterns":[{"include":"#literals"}]},{"captures":{"1":{"name":"support.variable.parameter.swift"},"2":{"name":"punctuation.separator.key-value.swift"},"3":{"name":"constant.numeric.integer.swift"}},"match":"(line)\\\\s*(:)\\\\s*([0-9]+)"},{"match":",","name":"punctuation.separator.parameters.swift"},{"match":"\\\\S+","name":"invalid.illegal.character-not-allowed-here.swift"}]},"6":{"name":"punctuation.definition.parameters.begin.swift"},"7":{"patterns":[{"match":"\\\\S+","name":"invalid.illegal.character-not-allowed-here.swift"}]}},"match":"^\\\\s*(#)(sourceLocation)((\\\\()([^)]*)(\\\\)))(.*?)(?=$|//|/\\\\*)","name":"meta.preprocessor.sourcelocation.swift"}]},"conditionals":{"patterns":[{"begin":"(?<!\\\\.)\\\\b(if|guard|switch|for)\\\\b","beginCaptures":{"1":{"patterns":[{"include":"#keywords"}]}},"end":"(?=\\\\{)","patterns":[{"include":"#expressions-without-trailing-closures"}]},{"begin":"(?<!\\\\.)\\\\b(while)\\\\b","beginCaptures":{"1":{"patterns":[{"include":"#keywords"}]}},"end":"(?=\\\\{)|$","patterns":[{"include":"#expressions-without-trailing-closures"}]}]},"declarations":{"patterns":[{"include":"#declarations-function"},{"include":"#declarations-function-initializer"},{"include":"#declarations-function-subscript"},{"include":"#declarations-typed-variable-declaration"},{"include":"#declarations-import"},{"include":"#declarations-operator"},{"include":"#declarations-precedencegroup"},{"include":"#declarations-protocol"},{"include":"#declarations-type"},{"include":"#declarations-extension"},{"include":"#declarations-typealias"},{"include":"#declarations-macro"}]},"declarations-available-types":{"patterns":[{"include":"#comments"},{"include":"#builtin-types"},{"include":"#attributes"},{"match":"\\\\basync\\\\b","name":"storage.modifier.async.swift"},{"match":"\\\\b(?:|re)throws\\\\b","name":"storage.modifier.exception.swift"},{"match":"\\\\bsome\\\\b","name":"keyword.other.operator.type.opaque.swift"},{"match":"\\\\bany\\\\b","name":"keyword.other.operator.type.existential.swift"},{"match":"\\\\b(?:repeat|each)\\\\b","name":"keyword.control.loop.swift"},{"match":"\\\\b(?:inout|isolated|borrowing|consuming)\\\\b","name":"storage.modifier.swift"},{"match":"\\\\bnonisolated(?:\\\\(nonsending\\\\)|\\\\b)","name":"storage.modifier.swift"},{"match":"\\\\bSelf\\\\b","name":"variable.language.swift"},{"captures":{"1":{"name":"keyword.operator.type.function.swift"}},"match":"(?<![-!%\\\\&*+./<=>^|~])(->)(?![-!%\\\\&*+./<=>^|~])"},{"captures":{"1":{"name":"keyword.operator.type.composition.swift"}},"match":"(?<![-!%\\\\&*+./<=>^|~])(&)(?![-!%\\\\&*+./<=>^|~])"},{"match":"[!?]","name":"keyword.operator.type.optional.swift"},{"match":"\\\\.\\\\.\\\\.","name":"keyword.operator.function.variadic-parameter.swift"},{"match":"\\\\bprotocol\\\\b","name":"keyword.other.type.composition.swift"},{"match":"(?<=\\\\.)(?:Protocol|Type)\\\\b","name":"keyword.other.type.metatype.swift"},{"include":"#declarations-available-types-tuple-type"},{"include":"#declarations-available-types-collection-type"},{"include":"#declarations-generic-argument-clause"}]},"declarations-available-types-collection-type":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.section.collection-type.begin.swift"}},"end":"]|(?=[)>{}])","endCaptures":{"0":{"name":"punctuation.section.collection-type.end.swift"}},"patterns":[{"include":"#declarations-available-types"},{"include":"#literals-numeric"},{"match":"\\\\b_\\\\b","name":"support.variable.inferred.swift"},{"match":"(?<=\\\\s)\\\\bof\\\\b(?=\\\\s+[(\\\\[_\\\\p{L}\\\\d\\\\p{N}\\\\p{M}])","name":"keyword.other.inline-array.swift"},{"begin":":","beginCaptures":{"0":{"name":"punctuation.separator.key-value.swift"}},"end":"(?=[])>{}])","patterns":[{"match":":","name":"invalid.illegal.extra-colon-in-dictionary-type.swift"},{"include":"#declarations-available-types"}]}]},"declarations-available-types-tuple-type":{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.tuple-type.begin.swift"}},"end":"\\\\)|(?=[]>{}])","endCaptures":{"0":{"name":"punctuation.section.tuple-type.end.swift"}},"patterns":[{"include":"#declarations-available-types"}]},"declarations-extension":{"begin":"\\\\b(extension)\\\\s+","beginCaptures":{"1":{"name":"storage.type.$1.swift"}},"end":"(?<=})","name":"meta.definition.type.$1.swift","patterns":[{"begin":"\\\\G(?!\\\\s*[\\\\n:{])","end":"(?=\\\\s*[\\\\n:{])|(?!\\\\G)(?=\\\\s*where\\\\b)","name":"entity.name.type.swift","patterns":[{"include":"#declarations-available-types"}]},{"include":"#comments"},{"include":"#declarations-generic-where-clause"},{"include":"#declarations-inheritance-clause"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.type.begin.swift"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.type.end.swift"}},"name":"meta.definition.type.body.swift","patterns":[{"include":"$self"}]}]},"declarations-function":{"begin":"\\\\b(func)\\\\s+((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>)|(?:((?<oph>[-!%\\\\&*+/<-?^|~¡-§©«¬®°±¶»¿×÷‖‗†-‧‰-‾⁁-⁓⁕-⁞←-⏿─-❵➔-⯿⸀-、。〃〈-〰])(\\\\g<oph>|(?<opc>[̀-ͯ᷀-᷿⃐-︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))*)|(\\\\.(\\\\g<oph>|\\\\g<opc>|\\\\.)+)))\\\\s*(?=[(<])","beginCaptures":{"1":{"name":"storage.type.function.swift"},"2":{"name":"entity.name.function.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"(?<=})|$","name":"meta.definition.function.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-parameter-clause"},{"include":"#declarations-parameter-clause"},{"include":"#declarations-function-result"},{"include":"#async-throws"},{"include":"#declarations-generic-where-clause"},{"begin":"(\\\\{)","beginCaptures":{"1":{"name":"punctuation.section.function.begin.swift"}},"end":"(})","endCaptures":{"1":{"name":"punctuation.section.function.end.swift"}},"name":"meta.definition.function.body.swift","patterns":[{"include":"$self"}]}]},"declarations-function-initializer":{"begin":"(?<!\\\\.)\\\\b(init[!?]*)\\\\s*(?=[(<])","beginCaptures":{"1":{"name":"storage.type.function.swift","patterns":[{"match":"(?<=[!?])[!?]+","name":"invalid.illegal.character-not-allowed-here.swift"}]}},"end":"(?<=})|$","name":"meta.definition.function.initializer.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-parameter-clause"},{"include":"#declarations-parameter-clause"},{"include":"#async-throws"},{"include":"#declarations-generic-where-clause"},{"begin":"(\\\\{)","beginCaptures":{"1":{"name":"punctuation.section.function.begin.swift"}},"end":"(})","endCaptures":{"1":{"name":"punctuation.section.function.end.swift"}},"name":"meta.definition.function.body.swift","patterns":[{"include":"$self"}]}]},"declarations-function-result":{"begin":"(?<![-!%\\\\&*+./<=>^|~])(->)(?![-!%\\\\&*+./<=>^|~])\\\\s*","beginCaptures":{"1":{"name":"keyword.operator.function-result.swift"}},"end":"(?!\\\\G)(?=\\\\{|\\\\bwhere\\\\b|[;=])|$","name":"meta.function-result.swift","patterns":[{"match":"\\\\bsending\\\\b","name":"storage.modifier.swift"},{"include":"#declarations-available-types"}]},"declarations-function-subscript":{"begin":"(?<!\\\\.)\\\\b(subscript)\\\\s*(?=[(<])","beginCaptures":{"1":{"name":"storage.type.function.swift"}},"end":"(?<=})|$","name":"meta.definition.function.subscript.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-parameter-clause"},{"include":"#declarations-parameter-clause"},{"include":"#declarations-function-result"},{"include":"#async-throws"},{"include":"#declarations-generic-where-clause"},{"begin":"(\\\\{)","beginCaptures":{"1":{"name":"punctuation.section.function.begin.swift"}},"end":"(})","endCaptures":{"1":{"name":"punctuation.section.function.end.swift"}},"name":"meta.definition.function.body.swift","patterns":[{"include":"$self"}]}]},"declarations-generic-argument-clause":{"begin":"<","beginCaptures":{"0":{"name":"punctuation.separator.generic-argument-clause.begin.swift"}},"end":">|(?=[]){}])","endCaptures":{"0":{"name":"punctuation.separator.generic-argument-clause.end.swift"}},"name":"meta.generic-argument-clause.swift","patterns":[{"include":"#literals-numeric"},{"include":"#declarations-available-types"}]},"declarations-generic-parameter-clause":{"begin":"<","beginCaptures":{"0":{"name":"punctuation.separator.generic-parameter-clause.begin.swift"}},"end":">|(?=[^\\\\&,:<=>`\\\\w\\\\d\\\\s])","endCaptures":{"0":{"name":"punctuation.separator.generic-parameter-clause.end.swift"}},"name":"meta.generic-parameter-clause.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-where-clause"},{"match":"\\\\blet\\\\b","name":"keyword.other.declaration-specifier.swift"},{"match":"\\\\beach\\\\b","name":"keyword.control.loop.swift"},{"captures":{"1":{"name":"variable.language.generic-parameter.swift"}},"match":"\\\\b((?!\\\\d)\\\\w[\\\\w\\\\d]*)\\\\b"},{"match":",","name":"punctuation.separator.generic-parameters.swift"},{"begin":"(:)\\\\s*","beginCaptures":{"1":{"name":"punctuation.separator.generic-parameter-constraint.swift"}},"end":"(?=[,>]|(?!\\\\G)\\\\bwhere\\\\b)","name":"meta.generic-parameter-constraint.swift","patterns":[{"begin":"\\\\G","end":"(?=[,>]|(?!\\\\G)\\\\bwhere\\\\b)","name":"entity.other.inherited-class.swift","patterns":[{"include":"#declarations-type-identifier"},{"include":"#declarations-type-operators"}]}]}]},"declarations-generic-where-clause":{"begin":"\\\\b(where)\\\\b\\\\s*","beginCaptures":{"1":{"name":"keyword.other.generic-constraint-introducer.swift"}},"end":"(?!\\\\G)$|(?=[\\\\n;>{}]|//|/\\\\*)","name":"meta.generic-where-clause.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-where-clause-requirement-list"}]},"declarations-generic-where-clause-requirement-list":{"begin":"\\\\G|,\\\\s*","end":"(?=[\\\\n,;>{}]|//|/\\\\*)","patterns":[{"include":"#comments"},{"include":"#constraint"},{"include":"#declarations-available-types"},{"begin":"(?<![-!%\\\\&*+./<=>^|~])(==)(?![-!%\\\\&*+./<=>^|~])","beginCaptures":{"1":{"name":"keyword.operator.generic-constraint.same-type.swift"}},"end":"(?=\\\\s*[\\\\n,;>{}]|//|/\\\\*)","name":"meta.generic-where-clause.same-type-requirement.swift","patterns":[{"include":"#declarations-available-types"}]},{"begin":"(?<![-!%\\\\&*+./<=>^|~])(:)(?![-!%\\\\&*+./<=>^|~])","beginCaptures":{"1":{"name":"keyword.operator.generic-constraint.conforms-to.swift"}},"end":"(?=\\\\s*[\\\\n,;>{}]|//|/\\\\*)","name":"meta.generic-where-clause.conformance-requirement.swift","patterns":[{"begin":"\\\\G\\\\s*","contentName":"entity.other.inherited-class.swift","end":"(?=\\\\s*[\\\\n,;>{}]|//|/\\\\*)","patterns":[{"include":"#declarations-available-types"}]}]}]},"declarations-import":{"begin":"(?<!\\\\.)\\\\b(import)\\\\s+","beginCaptures":{"1":{"name":"keyword.control.import.swift"}},"end":"(;)|$\\\\n?|(?=/[*/])","endCaptures":{"1":{"name":"punctuation.terminator.statement.swift"}},"name":"meta.import.swift","patterns":[{"begin":"\\\\G(?!;|$|//|/\\\\*)(?:(typealias|struct|class|actor|enum|protocol|var|func)\\\\s+)?","beginCaptures":{"1":{"name":"storage.modifier.swift"}},"end":"(?=;|$|//|/\\\\*)","patterns":[{"captures":{"1":{"name":"punctuation.definition.identifier.swift"},"2":{"name":"punctuation.definition.identifier.swift"}},"match":"(?<=\\\\G|\\\\.)(?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>)","name":"entity.name.type.swift"},{"match":"(?<=\\\\G|\\\\.)\\\\$[0-9]+","name":"entity.name.type.swift"},{"captures":{"1":{"patterns":[{"match":"\\\\.","name":"invalid.illegal.dot-not-allowed-here.swift"}]}},"match":"(?<=\\\\G|\\\\.)(?:((?<oph>[-!%\\\\&*+/<-?^|~¡-§©«¬®°±¶»¿×÷‖‗†-‧‰-‾⁁-⁓⁕-⁞←-⏿─-❵➔-⯿⸀-、。〃〈-〰])(\\\\g<oph>|(?<opc>[̀-ͯ᷀-᷿⃐-︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))*)|(\\\\.(\\\\g<oph>|\\\\g<opc>|\\\\.)+))(?=[.;]|$|//|/\\\\*|\\\\s)","name":"entity.name.type.swift"},{"match":"\\\\.","name":"punctuation.separator.import.swift"},{"begin":"(?!\\\\s*(;|$|//|/\\\\*))","end":"(?=\\\\s*(;|$|//|/\\\\*))","name":"invalid.illegal.character-not-allowed-here.swift"}]}]},"declarations-inheritance-clause":{"begin":"(:)(?=\\\\s*\\\\{)|(:)\\\\s*","beginCaptures":{"1":{"name":"invalid.illegal.empty-inheritance-clause.swift"},"2":{"name":"punctuation.separator.inheritance-clause.swift"}},"end":"(?!\\\\G)$|(?=[={}]|(?!\\\\G)\\\\bwhere\\\\b)","name":"meta.inheritance-clause.swift","patterns":[{"begin":"\\\\bclass\\\\b","beginCaptures":{"0":{"name":"storage.type.class.swift"}},"end":"(?=[={}]|(?!\\\\G)\\\\bwhere\\\\b)","patterns":[{"include":"#comments"},{"include":"#declarations-inheritance-clause-more-types"}]},{"begin":"\\\\G","end":"(?!\\\\G)$|(?=[={}]|(?!\\\\G)\\\\bwhere\\\\b)","patterns":[{"include":"#attributes"},{"include":"#comments"},{"include":"#declarations-inheritance-clause-inherited-type"},{"include":"#declarations-inheritance-clause-more-types"},{"include":"#declarations-type-operators"}]}]},"declarations-inheritance-clause-inherited-type":{"begin":"(?=[_`\\\\p{L}])","end":"(?!\\\\G)","name":"entity.other.inherited-class.swift","patterns":[{"include":"#declarations-type-identifier"}]},"declarations-inheritance-clause-more-types":{"begin":",\\\\s*","end":"(?!\\\\G)(?!/[*/])|(?=[,={}]|(?!\\\\G)\\\\bwhere\\\\b)","name":"meta.inheritance-list.more-types","patterns":[{"include":"#attributes"},{"include":"#comments"},{"include":"#declarations-inheritance-clause-inherited-type"},{"include":"#declarations-inheritance-clause-more-types"},{"include":"#declarations-type-operators"}]},"declarations-macro":{"begin":"\\\\b(macro)\\\\s+((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*(?=[(<=])","beginCaptures":{"1":{"name":"storage.type.function.swift"},"2":{"name":"entity.name.function.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"$|(?=;|//|/\\\\*|[=}])","name":"meta.definition.macro.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-parameter-clause"},{"include":"#declarations-parameter-clause"},{"include":"#declarations-function-result"},{"include":"#async-throws"},{"include":"#declarations-generic-where-clause"}]},"declarations-operator":{"begin":"(?:\\\\b((?:pre|in|post)fix)\\\\s+)?\\\\b(operator)\\\\s+(((?<oph>[-!%\\\\&*+/<-?^|~¡-§©«¬®°±¶»¿×÷‖‗†-‧‰-‾⁁-⁓⁕-⁞←-⏿─-❵➔-⯿⸀-、。〃〈-〰])(\\\\g<oph>|\\\\.|(?<opc>[̀-ͯ᷀-᷿⃐-︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))*+)|(\\\\.(\\\\g<oph>|\\\\g<opc>|\\\\.)++))\\\\s*","beginCaptures":{"1":{"name":"storage.modifier.swift"},"2":{"name":"storage.type.function.operator.swift"},"3":{"name":"entity.name.function.operator.swift"},"4":{"name":"entity.name.function.operator.swift","patterns":[{"match":"\\\\.","name":"invalid.illegal.dot-not-allowed-here.swift"}]}},"end":"(;)|$\\\\n?|(?=/[*/])","endCaptures":{"1":{"name":"punctuation.terminator.statement.swift"}},"name":"meta.definition.operator.swift","patterns":[{"include":"#declarations-operator-swift2"},{"include":"#declarations-operator-swift3"},{"match":"((?!$|;|//|/\\\\*)\\\\S)+","name":"invalid.illegal.character-not-allowed-here.swift"}]},"declarations-operator-swift2":{"begin":"\\\\G(\\\\{)","beginCaptures":{"1":{"name":"punctuation.definition.operator.begin.swift"}},"end":"(})","endCaptures":{"1":{"name":"punctuation.definition.operator.end.swift"}},"patterns":[{"include":"#comments"},{"captures":{"1":{"name":"storage.modifier.swift"},"2":{"name":"keyword.other.operator.associativity.swift"}},"match":"\\\\b(associativity)\\\\s+(left|right)\\\\b"},{"captures":{"1":{"name":"storage.modifier.swift"},"2":{"name":"constant.numeric.integer.swift"}},"match":"\\\\b(precedence)\\\\s+([0-9]+)\\\\b"},{"captures":{"1":{"name":"storage.modifier.swift"}},"match":"\\\\b(assignment)\\\\b"}]},"declarations-operator-swift3":{"captures":{"2":{"name":"entity.other.inherited-class.swift","patterns":[{"include":"#declarations-types-precedencegroup"}]},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"match":"\\\\G(:)\\\\s*((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))"},"declarations-parameter-clause":{"begin":"(\\\\()","beginCaptures":{"1":{"name":"punctuation.definition.parameters.begin.swift"}},"end":"(\\\\))(?:\\\\s*(async)\\\\b)?","endCaptures":{"1":{"name":"punctuation.definition.parameters.end.swift"},"2":{"name":"storage.modifier.async.swift"}},"name":"meta.parameter-clause.swift","patterns":[{"include":"#declarations-parameter-list"}]},"declarations-parameter-list":{"patterns":[{"captures":{"1":{"name":"entity.name.function.swift"},"2":{"name":"punctuation.definition.identifier.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"variable.parameter.function.swift"},"5":{"name":"punctuation.definition.identifier.swift"},"6":{"name":"punctuation.definition.identifier.swift"}},"match":"((?<q1>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q1>))\\\\s+((?<q2>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q2>))(?=\\\\s*:)"},{"captures":{"1":{"name":"variable.parameter.function.swift"},"2":{"name":"entity.name.function.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"match":"(((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>)))(?=\\\\s*:)"},{"begin":":\\\\s*(?!\\\\s)","end":"(?=[),])","patterns":[{"match":"\\\\bsending\\\\b","name":"storage.modifier.swift"},{"include":"#declarations-available-types"},{"match":":","name":"invalid.illegal.extra-colon-in-parameter-list.swift"},{"begin":"=","beginCaptures":{"0":{"name":"keyword.operator.assignment.swift"}},"end":"(?=[),])","patterns":[{"include":"#expressions"}]}]}]},"declarations-precedencegroup":{"begin":"\\\\b(precedencegroup)\\\\s+((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*(?=\\\\{)","beginCaptures":{"1":{"name":"storage.type.precedencegroup.swift"},"2":{"name":"entity.name.type.precedencegroup.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"(?!\\\\G)","name":"meta.definition.precedencegroup.swift","patterns":[{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.precedencegroup.begin.swift"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.precedencegroup.end.swift"}},"patterns":[{"include":"#comments"},{"captures":{"1":{"name":"storage.modifier.swift"},"2":{"name":"entity.other.inherited-class.swift","patterns":[{"include":"#declarations-types-precedencegroup"}]},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"match":"\\\\b((?:high|low)erThan)\\\\s*:\\\\s*((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))"},{"captures":{"1":{"name":"storage.modifier.swift"},"2":{"name":"keyword.other.operator.associativity.swift"}},"match":"\\\\b(associativity)\\\\b(?:\\\\s*:\\\\s*(right|left|none)\\\\b)?"},{"captures":{"1":{"name":"storage.modifier.swift"},"2":{"name":"constant.language.boolean.swift"}},"match":"\\\\b(assignment)\\\\b(?:\\\\s*:\\\\s*(true|false)\\\\b)?"}]}]},"declarations-protocol":{"begin":"\\\\b(protocol)\\\\s+((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))","beginCaptures":{"1":{"name":"storage.type.$1.swift"},"2":{"name":"entity.name.type.$1.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"(?<=})","name":"meta.definition.type.protocol.swift","patterns":[{"include":"#comments"},{"include":"#declarations-inheritance-clause"},{"include":"#declarations-generic-where-clause"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.type.begin.swift"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.type.end.swift"}},"name":"meta.definition.type.body.swift","patterns":[{"include":"#declarations-protocol-protocol-method"},{"include":"#declarations-protocol-protocol-initializer"},{"include":"#declarations-protocol-associated-type"},{"include":"$self"}]}]},"declarations-protocol-associated-type":{"begin":"\\\\b(associatedtype)\\\\s+((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*","beginCaptures":{"1":{"name":"keyword.other.declaration-specifier.swift"},"2":{"name":"variable.language.associatedtype.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"(?!\\\\G)$|(?=[;}]|$)","name":"meta.definition.associatedtype.swift","patterns":[{"include":"#declarations-inheritance-clause"},{"include":"#declarations-generic-where-clause"},{"include":"#declarations-typealias-assignment"}]},"declarations-protocol-protocol-initializer":{"begin":"(?<!\\\\.)\\\\b(init[!?]*)\\\\s*(?=[(<])","beginCaptures":{"1":{"name":"storage.type.function.swift","patterns":[{"match":"(?<=[!?])[!?]+","name":"invalid.illegal.character-not-allowed-here.swift"}]}},"end":"$|(?=;|//|/\\\\*|})","name":"meta.definition.function.initializer.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-parameter-clause"},{"include":"#declarations-parameter-clause"},{"include":"#async-throws"},{"include":"#declarations-generic-where-clause"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.function.begin.swift"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.function.end.swift"}},"name":"invalid.illegal.function-body-not-allowed-in-protocol.swift","patterns":[{"include":"$self"}]}]},"declarations-protocol-protocol-method":{"begin":"\\\\b(func)\\\\s+((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>)|(?:((?<oph>[-!%\\\\&*+/<-?^|~¡-§©«¬®°±¶»¿×÷‖‗†-‧‰-‾⁁-⁓⁕-⁞←-⏿─-❵➔-⯿⸀-、。〃〈-〰])(\\\\g<oph>|(?<opc>[̀-ͯ᷀-᷿⃐-︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))*)|(\\\\.(\\\\g<oph>|\\\\g<opc>|\\\\.)+)))\\\\s*(?=[(<])","beginCaptures":{"1":{"name":"storage.type.function.swift"},"2":{"name":"entity.name.function.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"$|(?=;|//|/\\\\*|})","name":"meta.definition.function.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-parameter-clause"},{"include":"#declarations-parameter-clause"},{"include":"#declarations-function-result"},{"include":"#async-throws"},{"include":"#declarations-generic-where-clause"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.function.begin.swift"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.function.end.swift"}},"name":"invalid.illegal.function-body-not-allowed-in-protocol.swift","patterns":[{"include":"$self"}]}]},"declarations-type":{"patterns":[{"begin":"\\\\b(class(?!\\\\s+(?:func|var|let)\\\\b)|struct|actor)\\\\b\\\\s*((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))","beginCaptures":{"1":{"name":"storage.type.$1.swift"},"2":{"name":"entity.name.type.$1.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"(?<=})","name":"meta.definition.type.$1.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-parameter-clause"},{"include":"#declarations-generic-where-clause"},{"include":"#declarations-inheritance-clause"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.type.begin.swift"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.type.end.swift"}},"name":"meta.definition.type.body.swift","patterns":[{"include":"$self"}]}]},{"include":"#declarations-type-enum"}]},"declarations-type-enum":{"begin":"\\\\b(enum)\\\\s+((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))","beginCaptures":{"1":{"name":"storage.type.$1.swift"},"2":{"name":"entity.name.type.$1.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"(?<=})","name":"meta.definition.type.$1.swift","patterns":[{"include":"#comments"},{"include":"#declarations-generic-parameter-clause"},{"include":"#declarations-generic-where-clause"},{"include":"#declarations-inheritance-clause"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.type.begin.swift"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.type.end.swift"}},"name":"meta.definition.type.body.swift","patterns":[{"include":"#declarations-type-enum-enum-case-clause"},{"include":"$self"}]}]},"declarations-type-enum-associated-values":{"begin":"\\\\G\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.parameters.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.swift"}},"patterns":[{"include":"#comments"},{"begin":"(?:(_)|((?<q1>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*\\\\k<q1>))\\\\s+(((?<q2>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*\\\\k<q2>))\\\\s*(:)","beginCaptures":{"1":{"name":"entity.name.function.swift"},"2":{"name":"invalid.illegal.distinct-labels-not-allowed.swift"},"5":{"name":"variable.parameter.function.swift"},"7":{"name":"punctuation.separator.argument-label.swift"}},"end":"(?=[]),])","patterns":[{"include":"#declarations-available-types"}]},{"begin":"(((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*\\\\k<q>))\\\\s*(:)","beginCaptures":{"1":{"name":"entity.name.function.swift"},"2":{"name":"variable.parameter.function.swift"},"4":{"name":"punctuation.separator.argument-label.swift"}},"end":"(?=[]),])","patterns":[{"include":"#declarations-available-types"}]},{"begin":"(?![]),])(?=\\\\S)","end":"(?=[]),])","patterns":[{"include":"#declarations-available-types"},{"match":":","name":"invalid.illegal.extra-colon-in-parameter-list.swift"}]}]},"declarations-type-enum-enum-case":{"begin":"((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*","beginCaptures":{"1":{"name":"variable.other.enummember.swift"}},"end":"(?<=\\\\))|(?![(=])","patterns":[{"include":"#comments"},{"include":"#declarations-type-enum-associated-values"},{"include":"#declarations-type-enum-raw-value-assignment"}]},"declarations-type-enum-enum-case-clause":{"begin":"\\\\b(case)\\\\b\\\\s*","beginCaptures":{"1":{"name":"storage.type.enum.case.swift"}},"end":"(?=[;}])|(?!\\\\G)(?!/[*/])(?=[^,\\\\s])","patterns":[{"include":"#comments"},{"include":"#declarations-type-enum-enum-case"},{"include":"#declarations-type-enum-more-cases"}]},"declarations-type-enum-more-cases":{"begin":",\\\\s*","end":"(?!\\\\G)(?!/[*/])(?=[;}[^,\\\\s]])","name":"meta.enum-case.more-cases","patterns":[{"include":"#comments"},{"include":"#declarations-type-enum-enum-case"},{"include":"#declarations-type-enum-more-cases"}]},"declarations-type-enum-raw-value-assignment":{"begin":"(=)\\\\s*","beginCaptures":{"1":{"name":"keyword.operator.assignment.swift"}},"end":"(?!\\\\G)","patterns":[{"include":"#comments"},{"include":"#literals"}]},"declarations-type-identifier":{"begin":"((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*","beginCaptures":{"1":{"name":"meta.type-name.swift","patterns":[{"include":"#builtin-types"}]},"2":{"name":"punctuation.definition.identifier.swift"},"3":{"name":"punctuation.definition.identifier.swift"}},"end":"(?!<)","patterns":[{"begin":"(?=<)","end":"(?!\\\\G)","patterns":[{"include":"#declarations-generic-argument-clause"}]}]},"declarations-type-operators":{"patterns":[{"captures":{"1":{"name":"keyword.operator.type.composition.swift"}},"match":"(?<![-!%\\\\&*+./<=>^|~])(&)(?![-!%\\\\&*+./<=>^|~])"},{"captures":{"1":{"name":"keyword.operator.type.requirement-suppression.swift"}},"match":"(?<![-!%\\\\&*+./<=>^|~])(~)(?![-!%\\\\&*+./<=>^|~])"}]},"declarations-typealias":{"begin":"\\\\b(typealias)\\\\s+((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*","beginCaptures":{"1":{"name":"keyword.other.declaration-specifier.swift"},"2":{"name":"entity.name.type.typealias.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.identifier.swift"}},"end":"(?!\\\\G)$|(?=;|//|/\\\\*|$)","name":"meta.definition.typealias.swift","patterns":[{"begin":"\\\\G(?=<)","end":"(?!\\\\G)","patterns":[{"include":"#declarations-generic-parameter-clause"}]},{"include":"#declarations-typealias-assignment"}]},"declarations-typealias-assignment":{"begin":"(=)\\\\s*","beginCaptures":{"1":{"name":"keyword.operator.assignment.swift"}},"end":"(?!\\\\G)$|(?=;|//|/\\\\*|$)","patterns":[{"include":"#declarations-available-types"}]},"declarations-typed-variable-declaration":{"begin":"\\\\b(?:(async)\\\\s+)?(let|var)\\\\b\\\\s+(?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>)\\\\s*:","beginCaptures":{"1":{"name":"storage.modifier.async.swift"},"2":{"name":"keyword.other.declaration-specifier.swift"}},"end":"(?=$|[={])","patterns":[{"include":"#declarations-available-types"}]},"declarations-types-precedencegroup":{"patterns":[{"match":"\\\\b(?:BitwiseShift|Assignment|RangeFormation|Casting|Addition|NilCoalescing|Comparison|LogicalConjunction|LogicalDisjunction|Default|Ternary|Multiplication|FunctionArrow)Precedence\\\\b","name":"support.type.swift"}]},"expressions":{"patterns":[{"include":"#expressions-without-trailing-closures-or-member-references"},{"include":"#expressions-trailing-closure"},{"include":"#member-reference"}]},"expressions-trailing-closure":{"patterns":[{"captures":{"1":{"name":"support.function.any-method.swift"},"2":{"name":"punctuation.definition.identifier.swift"},"3":{"name":"punctuation.definition.identifier.swift"}},"match":"(#?(?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))(?=\\\\s*\\\\{)","name":"meta.function-call.trailing-closure-only.swift"},{"captures":{"1":{"name":"support.function.any-method.trailing-closure-label.swift"},"2":{"name":"punctuation.definition.identifier.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.separator.argument-label.swift"}},"match":"((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*(:)(?=\\\\s*\\\\{)"}]},"expressions-without-trailing-closures":{"patterns":[{"include":"#expressions-without-trailing-closures-or-member-references"},{"include":"#member-references"}]},"expressions-without-trailing-closures-or-member-references":{"patterns":[{"include":"#comments"},{"include":"#code-block"},{"include":"#attributes"},{"include":"#expressions-without-trailing-closures-or-member-references-closure-parameter"},{"include":"#literals"},{"include":"#operators"},{"include":"#builtin-types"},{"include":"#builtin-functions"},{"include":"#builtin-global-functions"},{"include":"#builtin-properties"},{"include":"#expressions-without-trailing-closures-or-member-references-compound-name"},{"include":"#conditionals"},{"include":"#keywords"},{"include":"#expressions-without-trailing-closures-or-member-references-availability-condition"},{"include":"#expressions-without-trailing-closures-or-member-references-function-or-macro-call-expression"},{"include":"#expressions-without-trailing-closures-or-member-references-macro-expansion"},{"include":"#expressions-without-trailing-closures-or-member-references-subscript-expression"},{"include":"#expressions-without-trailing-closures-or-member-references-parenthesized-expression"},{"match":"\\\\b_\\\\b","name":"support.variable.discard-value.swift"}]},"expressions-without-trailing-closures-or-member-references-availability-condition":{"begin":"\\\\B(#(?:un)?available)(\\\\()","beginCaptures":{"1":{"name":"support.function.availability-condition.swift"},"2":{"name":"punctuation.definition.arguments.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"patterns":[{"captures":{"1":{"name":"keyword.other.platform.os.swift"},"2":{"name":"constant.numeric.swift"}},"match":"\\\\s*\\\\b((?:iOS|macOS|OSX|watchOS|tvOS|visionOS|UIKitForMac)(?:ApplicationExtension)?)\\\\b\\\\s+([0-9]+(?:\\\\.[0-9]+)*)\\\\b"},{"captures":{"1":{"name":"keyword.other.platform.all.swift"},"2":{"name":"invalid.illegal.character-not-allowed-here.swift"}},"match":"(\\\\*)\\\\s*(.*?)(?=[),])"},{"match":"[^),\\\\s]+","name":"invalid.illegal.character-not-allowed-here.swift"}]},"expressions-without-trailing-closures-or-member-references-closure-parameter":{"match":"\\\\$[0-9]+","name":"variable.language.closure-parameter.swift"},"expressions-without-trailing-closures-or-member-references-compound-name":{"captures":{"1":{"name":"entity.name.function.compound-name.swift"},"2":{"name":"punctuation.definition.entity.swift"},"3":{"name":"punctuation.definition.entity.swift"},"4":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.entity.swift"},"2":{"name":"punctuation.definition.entity.swift"}},"match":"(?<q>`?)(?!_:)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>):","name":"entity.name.function.compound-name.swift"}]}},"match":"((?<q1>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q1>))\\\\(((((?<q2>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q2>)):)+)\\\\)"},"expressions-without-trailing-closures-or-member-references-expression-element-list":{"patterns":[{"include":"#comments"},{"begin":"((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*(:)","beginCaptures":{"1":{"name":"support.function.any-method.swift"},"2":{"name":"punctuation.definition.identifier.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.separator.argument-label.swift"}},"end":"(?=[]),])","patterns":[{"include":"#expressions"}]},{"begin":"(?![]),])(?=\\\\S)","end":"(?=[]),])","patterns":[{"include":"#expressions"}]}]},"expressions-without-trailing-closures-or-member-references-function-or-macro-call-expression":{"patterns":[{"begin":"(#?(?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))\\\\s*(\\\\()","beginCaptures":{"1":{"name":"support.function.any-method.swift"},"2":{"name":"punctuation.definition.identifier.swift"},"3":{"name":"punctuation.definition.identifier.swift"},"4":{"name":"punctuation.definition.arguments.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"name":"meta.function-call.swift","patterns":[{"include":"#expressions-without-trailing-closures-or-member-references-expression-element-list"}]},{"begin":"(?<=[])>_`}\\\\p{L}\\\\p{N}\\\\p{M}])\\\\s*(\\\\()","beginCaptures":{"1":{"name":"punctuation.definition.arguments.begin.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"name":"meta.function-call.swift","patterns":[{"include":"#expressions-without-trailing-closures-or-member-references-expression-element-list"}]}]},"expressions-without-trailing-closures-or-member-references-macro-expansion":{"match":"(#(?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))","name":"support.function.any-method.swift"},"expressions-without-trailing-closures-or-member-references-parenthesized-expression":{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.tuple.begin.swift"}},"end":"(\\\\))\\\\s*((?:\\\\b(?:async|throws|rethrows)\\\\s)*)","endCaptures":{"1":{"name":"punctuation.section.tuple.end.swift"},"2":{"patterns":[{"match":"\\\\brethrows\\\\b","name":"invalid.illegal.rethrows-only-allowed-on-function-declarations.swift"},{"include":"#async-throws"}]}},"patterns":[{"include":"#expressions-without-trailing-closures-or-member-references-expression-element-list"}]},"expressions-without-trailing-closures-or-member-references-subscript-expression":{"begin":"(?<=[_`\\\\p{L}\\\\p{N}\\\\p{M}])\\\\s*(\\\\[)","beginCaptures":{"1":{"name":"punctuation.definition.arguments.begin.swift"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"name":"meta.subscript-expression.swift","patterns":[{"include":"#expressions-without-trailing-closures-or-member-references-expression-element-list"}]},"keywords":{"patterns":[{"match":"(?<!\\\\.)\\\\b(?:if|else|guard|where|switch|case|default|fallthrough)\\\\b","name":"keyword.control.branch.swift"},{"match":"(?<!\\\\.)\\\\b(?:continue|break|fallthrough|return|yield)\\\\b","name":"keyword.control.transfer.swift"},{"match":"(?<!\\\\.)\\\\b(?:while|for|in|each)\\\\b","name":"keyword.control.loop.swift"},{"match":"(?<=\\\\s)\\\\bof\\\\b(?=\\\\s+[(\\\\[_\\\\p{L}\\\\d\\\\p{N}\\\\p{M}])","name":"keyword.other.inline-array.swift"},{"match":"\\\\bany\\\\b(?=\\\\s*`?[_\\\\p{L}])","name":"keyword.other.operator.type.existential.swift"},{"captures":{"1":{"name":"keyword.control.loop.swift"},"2":{"name":"punctuation.whitespace.trailing.repeat.swift"}},"match":"(?<!\\\\.)\\\\b(repeat)\\\\b(\\\\s*)"},{"match":"(?<!\\\\.)\\\\bdefer\\\\b","name":"keyword.control.defer.swift"},{"captures":{"1":{"name":"invalid.illegal.try-must-precede-await.swift"},"2":{"name":"keyword.control.await.swift"}},"match":"(?<!\\\\.)\\\\b(?:(await\\\\s+try)|(await))\\\\b"},{"match":"(?<!\\\\.)\\\\b(?:catch|throw|try)\\\\b|\\\\btry[!?]\\\\B","name":"keyword.control.exception.swift"},{"match":"(?<!\\\\.)\\\\b(?:|re)throws\\\\b","name":"storage.modifier.exception.swift"},{"captures":{"1":{"name":"keyword.control.exception.swift"},"2":{"name":"punctuation.whitespace.trailing.do.swift"}},"match":"(?<!\\\\.)\\\\b(do)\\\\b(\\\\s*)"},{"captures":{"1":{"name":"storage.modifier.async.swift"},"2":{"name":"keyword.other.declaration-specifier.swift"}},"match":"(?<!\\\\.)\\\\b(?:(async)\\\\s+)?(let|var)\\\\b"},{"match":"(?<!\\\\.)\\\\b(?:associatedtype|operator|typealias)\\\\b","name":"keyword.other.declaration-specifier.swift"},{"match":"(?<!\\\\.)\\\\b(class|enum|extension|precedencegroup|protocol|struct|actor)\\\\b(?=\\\\s*`?[_\\\\p{L}])","name":"storage.type.$1.swift"},{"match":"(?<!\\\\.)\\\\b(?:inout|static|final|lazy|mutating|nonmutating|optional|indirect|required|override|dynamic|convenience|infix|prefix|postfix|distributed|borrowing|consuming)\\\\b","name":"storage.modifier.swift"},{"match":"(?<!\\\\.)\\\\bnonisolated(?:\\\\(nonsending\\\\)|\\\\b)","name":"storage.modifier.swift"},{"match":"\\\\binit[!?]|\\\\binit\\\\b|(?<!\\\\.)\\\\b(?:func|deinit|subscript|didSet|set|willSet|yielding\\\\s+borrow|yielding\\\\s+mutate)\\\\b","name":"storage.type.function.swift"},{"captures":{"1":{"name":"storage.type.function.swift"},"2":{"name":"invalid.illegal.async-must-precede-throws.swift"},"3":{"name":"storage.modifier.async.swift"},"4":{"name":"storage.modifier.exception.swift"}},"match":"\\\\b(get)(?:\\\\s+(throws\\\\s+async)|\\\\s+(async)(?:\\\\s+(throws))?)?\\\\b"},{"match":"(?<!\\\\.)\\\\b(?:fileprivate|private|internal|public|open|package)\\\\b","name":"keyword.other.declaration-specifier.accessibility.swift"},{"match":"(?<!\\\\.)\\\\bunowned\\\\((?:|un)safe\\\\)|(?<!\\\\.)\\\\b(?:weak|unowned)\\\\b","name":"keyword.other.capture-specifier.swift"},{"captures":{"1":{"name":"keyword.other.type.swift"},"2":{"name":"keyword.other.type.metatype.swift"}},"match":"(?<=\\\\.)(?:(dynamicType|self)|(Protocol|Type))\\\\b"},{"match":"(?<!\\\\.)\\\\b(?:super|self|Self)\\\\b","name":"variable.language.swift"},{"match":"(?:\\\\B#(?:file|filePath|fileID|line|column|function|dsohandle|isolation)|\\\\b__(?:FILE|LINE|COLUMN|FUNCTION|DSO_HANDLE)__)\\\\b","name":"support.variable.swift"},{"match":"(?<!\\\\.)\\\\bimport\\\\b","name":"keyword.control.import.swift"},{"match":"(?<!\\\\.)\\\\bconsume(?=\\\\s+`?[_\\\\p{L}])","name":"keyword.control.consume.swift"},{"match":"(?<!\\\\.)\\\\bcopy(?=\\\\s+`?[_\\\\p{L}])","name":"keyword.control.copy.swift"}]},"literals":{"patterns":[{"include":"#literals-boolean"},{"include":"#literals-numeric"},{"include":"#literals-string"},{"match":"\\\\bnil\\\\b","name":"constant.language.nil.swift"},{"match":"\\\\B#((?:color|image|file)Literal)\\\\b","name":"support.function.object-literal.swift"},{"match":"\\\\B#externalMacro\\\\b","name":"support.function.builtin-macro.swift"},{"match":"\\\\B#keyPath\\\\b","name":"support.function.key-path.swift"},{"begin":"\\\\B(#selector)(\\\\()(?:\\\\s*([gs]etter)\\\\s*(:))?","beginCaptures":{"1":{"name":"support.function.selector-reference.swift"},"2":{"name":"punctuation.definition.arguments.begin.swift"},"3":{"name":"support.variable.parameter.swift"},"4":{"name":"punctuation.separator.argument-label.swift"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.arguments.end.swift"}},"patterns":[{"include":"#expressions"}]},{"include":"#literals-regular-expression-literal"}]},"literals-boolean":{"match":"\\\\b(true|false)\\\\b","name":"constant.language.boolean.swift"},"literals-numeric":{"patterns":[{"match":"(\\\\B-|\\\\b)(?<![]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)[0-9][0-9_]*(?=\\\\.[0-9]|[Ee])(?:\\\\.[0-9][0-9_]*)?(?:[Ee][-+]?[0-9][0-9_]*)?\\\\b(?!\\\\.[0-9])","name":"constant.numeric.float.decimal.swift"},{"match":"(\\\\B-|\\\\b)(?<![]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)(0x\\\\h[_\\\\h]*)(?:\\\\.\\\\h[_\\\\h]*)?[Pp][-+]?[0-9][0-9_]*\\\\b(?!\\\\.[0-9])","name":"constant.numeric.float.hexadecimal.swift"},{"match":"(\\\\B-|\\\\b)(?<![]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)(0x\\\\h[_\\\\h]*)(?:\\\\.\\\\h[_\\\\h]*)?[Pp][-+]?\\\\w*\\\\b(?!\\\\.[0-9])","name":"invalid.illegal.numeric.float.invalid-exponent.swift"},{"match":"(\\\\B-|\\\\b)(?<![]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)(0x\\\\h[_\\\\h]*)\\\\.[0-9][.\\\\w]*","name":"invalid.illegal.numeric.float.missing-exponent.swift"},{"match":"(?<=\\\\s|^)-?\\\\.[0-9][.\\\\w]*","name":"invalid.illegal.numeric.float.missing-leading-zero.swift"},{"match":"(\\\\B-|\\\\b)0[box]_[_\\\\h]*(?:[EPep][-+]?\\\\w+)?[.\\\\w]+","name":"invalid.illegal.numeric.leading-underscore.swift"},{"match":"(?<=[]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)[0-9]+\\\\b"},{"match":"(\\\\B-|\\\\b)(?<![]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)0b[01][01_]*\\\\b(?!\\\\.[0-9])","name":"constant.numeric.integer.binary.swift"},{"match":"(\\\\B-|\\\\b)(?<![]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)0o[0-7][0-7_]*\\\\b(?!\\\\.[0-9])","name":"constant.numeric.integer.octal.swift"},{"match":"(\\\\B-|\\\\b)(?<![]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)[0-9][0-9_]*\\\\b(?!\\\\.[0-9])","name":"constant.numeric.integer.decimal.swift"},{"match":"(\\\\B-|\\\\b)(?<![]()\\\\[_{}\\\\p{L}\\\\p{N}\\\\p{M}]\\\\.)0x\\\\h[_\\\\h]*\\\\b(?!\\\\.[0-9])","name":"constant.numeric.integer.hexadecimal.swift"},{"match":"(\\\\B-|\\\\b)[0-9][.\\\\w]*","name":"invalid.illegal.numeric.other.swift"}]},"literals-regular-expression-literal":{"patterns":[{"begin":"(#+)/\\\\n","end":"/\\\\1","name":"string.regexp.block.swift","patterns":[{"include":"#literals-regular-expression-literal-regex-guts"},{"include":"#literals-regular-expression-literal-line-comment"}]},{"captures":{"0":{"patterns":[{"include":"#literals-regular-expression-literal-regex-guts"}]},"1":{"name":"punctuation.definition.string.begin.regexp.swift"},"3":{"name":"punctuation.definition.string.end.regexp.swift"}},"match":"(/)(?!\\\\s)(?!/)(?:\\\\\\\\\\\\s(?=/)|(?<guts>(?>(?:\\\\\\\\Q(?:(?!\\\\\\\\E)(?!/).)*+(?:\\\\\\\\E|(?=/))|\\\\\\\\.|\\\\(\\\\?#[^)]*\\\\)|\\\\(\\\\?(?>\\\\{(?:[^{].*?|\\\\{[^{].*?}|\\\\{\\\\{[^{].*?}}|\\\\{\\\\{\\\\{[^{].*?}}}|\\\\{\\\\{\\\\{\\\\{[^{].*?}}}}|\\\\{\\\\{\\\\{\\\\{\\\\{.+?}}}}})})(?:\\\\[(?!\\\\d)\\\\w+])?[<>X]?\\\\)|\\\\[(?:\\\\\\\\.|[^]\\\\[\\\\\\\\]|\\\\[(?:\\\\\\\\.|[^]\\\\[\\\\\\\\]|\\\\[(?:\\\\\\\\.|[^]\\\\[\\\\\\\\]|\\\\[(?:\\\\\\\\.|[^]\\\\[\\\\\\\\])+])+])+])+]|\\\\(\\\\g<guts>?+\\\\)|(?:(?!/)[^()\\\\[\\\\\\\\])+)+))?+(?<!\\\\s))(/)","name":"string.regexp.line.swift"},{"captures":{"0":{"patterns":[{"include":"#literals-regular-expression-literal-regex-guts"}]},"1":{"name":"punctuation.definition.string.begin.regexp.swift"},"4":{"name":"punctuation.definition.string.end.regexp.swift"},"5":{"name":"invalid.illegal.returns-not-allowed.regexp"}},"match":"((#+)/)(?<guts>(?>(?:\\\\\\\\Q(?:(?!\\\\\\\\E)(?!/\\\\2).)*+(?:\\\\\\\\E|(?=/\\\\2))|\\\\\\\\.|\\\\(\\\\?#[^)]*\\\\)|\\\\(\\\\?(?>\\\\{(?:[^{].*?|\\\\{[^{].*?}|\\\\{\\\\{[^{].*?}}|\\\\{\\\\{\\\\{[^{].*?}}}|\\\\{\\\\{\\\\{\\\\{[^{].*?}}}}|\\\\{\\\\{\\\\{\\\\{\\\\{.+?}}}}})})(?:\\\\[(?!\\\\d)\\\\w+])?[<>X]?\\\\)|\\\\[(?:\\\\\\\\.|[^]\\\\[\\\\\\\\]|\\\\[(?:\\\\\\\\.|[^]\\\\[\\\\\\\\]|\\\\[(?:\\\\\\\\.|[^]\\\\[\\\\\\\\]|\\\\[(?:\\\\\\\\.|[^]\\\\[\\\\\\\\])+])+])+])+]|\\\\(\\\\g<guts>?+\\\\)|(?:(?!/\\\\2)[^()\\\\[\\\\\\\\])+)+))?+(/\\\\2)|#+/.+(\\\\n)","name":"string.regexp.line.extended.swift"}]},"literals-regular-expression-literal-backreference-or-subpattern":{"patterns":[{"captures":{"1":{"name":"constant.character.escape.backslash.regexp"},"2":{"name":"variable.other.group-name.regexp"},"3":{"name":"keyword.operator.recursion-level.regexp"},"4":{"name":"constant.numeric.integer.decimal.regexp"},"5":{"name":"constant.numeric.integer.decimal.regexp"},"6":{"name":"keyword.operator.recursion-level.regexp"},"7":{"name":"constant.numeric.integer.decimal.regexp"},"8":{"name":"constant.character.escape.backslash.regexp"}},"match":"(\\\\\\\\g\\\\{)(?:((?!\\\\d)\\\\w+)(?:([-+])(\\\\d+))?|([-+]?\\\\d+)(?:([-+])(\\\\d+))?)(})"},{"captures":{"1":{"name":"constant.character.escape.backslash.regexp"},"2":{"name":"constant.numeric.integer.decimal.regexp"},"3":{"name":"keyword.operator.recursion-level.regexp"},"4":{"name":"constant.numeric.integer.decimal.regexp"}},"match":"(\\\\\\\\g)([-+]?\\\\d+)(?:([-+])(\\\\d+))?"},{"captures":{"1":{"name":"constant.character.escape.backslash.regexp"},"2":{"name":"variable.other.group-name.regexp"},"3":{"name":"keyword.operator.recursion-level.regexp"},"4":{"name":"constant.numeric.integer.decimal.regexp"},"5":{"name":"constant.numeric.integer.decimal.regexp"},"6":{"name":"keyword.operator.recursion-level.regexp"},"7":{"name":"constant.numeric.integer.decimal.regexp"},"8":{"name":"constant.character.escape.backslash.regexp"}},"match":"(\\\\\\\\[gk]<)(?:((?!\\\\d)\\\\w+)(?:([-+])(\\\\d+))?|([-+]?\\\\d+)(?:([-+])(\\\\d+))?)(>)"},{"captures":{"1":{"name":"constant.character.escape.backslash.regexp"},"2":{"name":"variable.other.group-name.regexp"},"3":{"name":"keyword.operator.recursion-level.regexp"},"4":{"name":"constant.numeric.integer.decimal.regexp"},"5":{"name":"constant.numeric.integer.decimal.regexp"},"6":{"name":"keyword.operator.recursion-level.regexp"},"7":{"name":"constant.numeric.integer.decimal.regexp"},"8":{"name":"constant.character.escape.backslash.regexp"}},"match":"(\\\\\\\\[gk]\')(?:((?!\\\\d)\\\\w+)(?:([-+])(\\\\d+))?|([-+]?\\\\d+)(?:([-+])(\\\\d+))?)(\')"},{"captures":{"1":{"name":"constant.character.escape.backslash.regexp"},"2":{"name":"variable.other.group-name.regexp"},"3":{"name":"keyword.operator.recursion-level.regexp"},"4":{"name":"constant.numeric.integer.decimal.regexp"},"5":{"name":"constant.character.escape.backslash.regexp"}},"match":"(\\\\\\\\k\\\\{)((?!\\\\d)\\\\w+)(?:([-+])(\\\\d+))?(})"},{"match":"\\\\\\\\[1-9][0-9]+","name":"keyword.other.back-reference.regexp"},{"captures":{"1":{"name":"keyword.other.back-reference.regexp"},"2":{"name":"variable.other.group-name.regexp"},"3":{"name":"keyword.operator.recursion-level.regexp"},"4":{"name":"constant.numeric.integer.decimal.regexp"},"5":{"name":"keyword.other.back-reference.regexp"}},"match":"(\\\\(\\\\?(?:P[=>]|&))((?!\\\\d)\\\\w+)(?:([-+])(\\\\d+))?(\\\\))"},{"match":"\\\\(\\\\?R\\\\)","name":"keyword.other.back-reference.regexp"},{"captures":{"1":{"name":"keyword.other.back-reference.regexp"},"2":{"name":"constant.numeric.integer.decimal.regexp"},"3":{"name":"keyword.operator.recursion-level.regexp"},"4":{"name":"constant.numeric.integer.decimal.regexp"},"5":{"name":"keyword.other.back-reference.regexp"}},"match":"(\\\\(\\\\?)([-+]?\\\\d+)(?:([-+])(\\\\d+))?(\\\\))"}]},"literals-regular-expression-literal-backtracking-directive-or-global-matching-option":{"captures":{"1":{"name":"keyword.control.directive.regexp"},"2":{"name":"keyword.control.directive.regexp"},"3":{"name":"keyword.control.directive.regexp"},"4":{"name":"variable.language.tag.regexp"},"5":{"name":"keyword.control.directive.regexp"},"6":{"name":"keyword.operator.assignment.regexp"},"7":{"name":"constant.numeric.integer.decimal.regexp"},"8":{"name":"keyword.control.directive.regexp"},"9":{"name":"keyword.control.directive.regexp"}},"match":"(\\\\(\\\\*)(?:(ACCEPT|FAIL|F|MARK(?=:)|(?=:)|COMMIT|PRUNE|SKIP|THEN)(?:(:)([^)]+))?|(LIMIT_(?:DEPTH|HEAP|MATCH))(=)(\\\\d+)|(CRLF|CR|ANYCRLF|ANY|LF|NUL|BSR_ANYCRLF|BSR_UNICODE|NOTEMPTY_ATSTART|NOTEMPTY|NO_AUTO_POSSESS|NO_DOTSTAR_ANCHOR|NO_JIT|NO_START_OPT|UTF|UCP))(\\\\))"},"literals-regular-expression-literal-callout":{"captures":{"1":{"name":"punctuation.definition.group.regexp"},"2":{"name":"keyword.control.callout.regexp"},"3":{"name":"constant.numeric.integer.decimal.regexp"},"4":{"name":"entity.name.function.callout.regexp"},"5":{"name":"entity.name.function.callout.regexp"},"6":{"name":"entity.name.function.callout.regexp"},"7":{"name":"entity.name.function.callout.regexp"},"8":{"name":"entity.name.function.callout.regexp"},"9":{"name":"entity.name.function.callout.regexp"},"10":{"name":"entity.name.function.callout.regexp"},"11":{"name":"entity.name.function.callout.regexp"},"12":{"name":"punctuation.definition.group.regexp"},"13":{"name":"punctuation.definition.group.regexp"},"14":{"name":"keyword.control.callout.regexp"},"15":{"name":"entity.name.function.callout.regexp"},"16":{"name":"variable.language.tag-name.regexp"},"17":{"name":"punctuation.definition.group.regexp"},"18":{"name":"punctuation.definition.group.regexp"},"19":{"name":"keyword.control.callout.regexp"},"21":{"name":"variable.language.tag-name.regexp"},"22":{"name":"keyword.control.callout.regexp"},"23":{"name":"punctuation.definition.group.regexp"}},"match":"(\\\\()(?<keyw>\\\\?C)(?:(?<num>\\\\d+)|`(?<name>(?:[^`]|``)*)`|\'(?<name>(?:[^\']|\'\')*)\'|\\"(?<name>(?:[^\\"]|\\"\\")*)\\"|\\\\^(?<name>(?:[^^]|\\\\^\\\\^)*)\\\\^|%(?<name>(?:[^%]|%%)*)%|#(?<name>(?:[^#]|##)*)#|\\\\$(?<name>(?:[^$]|\\\\$\\\\$)*)\\\\$|\\\\{(?<name>(?:[^}]|}})*)})?(\\\\))|(\\\\()(?<keyw>\\\\*)(?<name>(?!\\\\d)\\\\w+)(?:\\\\[(?<tag>(?!\\\\d)\\\\w+)])?(?:\\\\{[^,}]+(?:,[^,}]+)*})?(\\\\))|(\\\\()(?<keyw>\\\\?)(?>(\\\\{(?:\\\\g<20>|(?!\\\\{).*?)}))(?:\\\\[(?<tag>(?!\\\\d)\\\\w+)])?(?<keyw>[<>X]?)(\\\\))","name":"meta.callout.regexp"},"literals-regular-expression-literal-character-properties":{"captures":{"1":{"name":"support.variable.character-property.regexp"},"2":{"name":"punctuation.definition.character-class.regexp"},"3":{"name":"support.variable.character-property.regexp"},"4":{"name":"punctuation.definition.character-class.regexp"}},"match":"\\\\\\\\[Pp]\\\\{([-\\\\s\\\\w]+(?:=[-\\\\s\\\\w]+)?)}|(\\\\[:)([-\\\\s\\\\w]+(?:=[-\\\\s\\\\w]+)?)(:])","name":"constant.other.character-class.set.regexp"},"literals-regular-expression-literal-custom-char-class":{"patterns":[{"begin":"(\\\\[)(\\\\^)?","beginCaptures":{"1":{"name":"punctuation.definition.character-class.regexp"},"2":{"name":"keyword.operator.negation.regexp"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.character-class.regexp"}},"name":"constant.other.character-class.set.regexp","patterns":[{"include":"#literals-regular-expression-literal-custom-char-class-members"}]}]},"literals-regular-expression-literal-custom-char-class-members":{"patterns":[{"match":"\\\\\\\\b","name":"constant.character.escape.backslash.regexp"},{"include":"#literals-regular-expression-literal-custom-char-class"},{"include":"#literals-regular-expression-literal-quote"},{"include":"#literals-regular-expression-literal-set-operators"},{"include":"#literals-regular-expression-literal-unicode-scalars"},{"include":"#literals-regular-expression-literal-character-properties"}]},"literals-regular-expression-literal-group-option-toggle":{"match":"\\\\(\\\\?(?:\\\\^(?:[DJPSUWimnswx]|xx|y\\\\{[gw]})*|(?:[DJPSUWimnswx]|xx|y\\\\{[gw]})+|(?:[DJPSUWimnswx]|xx|y\\\\{[gw]})*-(?:[DJPSUWimnswx]|xx|y\\\\{[gw]})*)\\\\)","name":"keyword.other.option-toggle.regexp"},"literals-regular-expression-literal-group-or-conditional":{"patterns":[{"begin":"(\\\\()(\\\\?~)","beginCaptures":{"1":{"name":"punctuation.definition.group.regexp"},"2":{"name":"keyword.control.conditional.absent.regexp"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.regexp"}},"name":"meta.group.absent.regexp","patterns":[{"include":"#literals-regular-expression-literal-regex-guts"}]},{"begin":"(\\\\()(?<cond>\\\\?\\\\()(?:(?<NumberRef>(?<num>[-+]?\\\\d+)(?:(?<op>[-+])(?<num>\\\\d+))?)|(?<cond>R)\\\\g<NumberRef>?|(?<cond>R&)(?<NamedRef>(?<name>(?!\\\\d)\\\\w+)(?:(?<op>[-+])(?<num>\\\\d+))?)|(?<cond><)(?:\\\\g<NamedRef>|\\\\g<NumberRef>)(?<cond>>)|(?<cond>\')(?:\\\\g<NamedRef>|\\\\g<NumberRef>)(?<cond>\')|(?<cond>DEFINE)|(?<cond>VERSION)(?<compar>>?=)(?<num>\\\\d+\\\\.\\\\d+))(?<cond>\\\\))|(\\\\()(?<cond>\\\\?)(?=\\\\()","beginCaptures":{"1":{"name":"punctuation.definition.group.regexp"},"2":{"name":"keyword.control.conditional.regexp"},"4":{"name":"constant.numeric.integer.decimal.regexp"},"5":{"name":"keyword.operator.recursion-level.regexp"},"6":{"name":"constant.numeric.integer.decimal.regexp"},"7":{"name":"keyword.control.conditional.regexp"},"8":{"name":"keyword.control.conditional.regexp"},"10":{"name":"variable.other.group-name.regexp"},"11":{"name":"keyword.operator.recursion-level.regexp"},"12":{"name":"constant.numeric.integer.decimal.regexp"},"13":{"name":"keyword.control.conditional.regexp"},"14":{"name":"keyword.control.conditional.regexp"},"15":{"name":"keyword.control.conditional.regexp"},"16":{"name":"keyword.control.conditional.regexp"},"17":{"name":"keyword.control.conditional.regexp"},"18":{"name":"keyword.control.conditional.regexp"},"19":{"name":"keyword.operator.comparison.regexp"},"20":{"name":"constant.numeric.integer.decimal.regexp"},"21":{"name":"keyword.control.conditional.regexp"},"22":{"name":"punctuation.definition.group.regexp"},"23":{"name":"keyword.control.conditional.regexp"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.regexp"}},"name":"meta.group.conditional.regexp","patterns":[{"include":"#literals-regular-expression-literal-regex-guts"}]},{"begin":"(\\\\()((\\\\?)(?:([!*:=>|]|<[!*=])|P?<(?:((?!\\\\d)\\\\w+)(-))?((?!\\\\d)\\\\w+)>|\'(?:((?!\\\\d)\\\\w+)(-))?((?!\\\\d)\\\\w+)\'|(?:\\\\^(?:[DJPSUWimnswx]|xx|y\\\\{[gw]})*|(?:[DJPSUWimnswx]|xx|y\\\\{[gw]})+|(?:[DJPSUWimnswx]|xx|y\\\\{[gw]})*-(?:[DJPSUWimnswx]|xx|y\\\\{[gw]})*):)|\\\\*(atomic|pla|positive_lookahead|nla|negative_lookahead|plb|positive_lookbehind|nlb|negative_lookbehind|napla|non_atomic_positive_lookahead|naplb|non_atomic_positive_lookbehind|sr|script_run|asr|atomic_script_run):)?+","beginCaptures":{"1":{"name":"punctuation.definition.group.regexp"},"2":{"name":"keyword.other.group-options.regexp"},"3":{"name":"punctuation.definition.group.regexp"},"4":{"name":"punctuation.definition.group.regexp"},"5":{"name":"variable.other.group-name.regexp"},"6":{"name":"keyword.operator.balancing-group.regexp"},"7":{"name":"variable.other.group-name.regexp"},"8":{"name":"variable.other.group-name.regexp"},"9":{"name":"keyword.operator.balancing-group.regexp"},"10":{"name":"variable.other.group-name.regexp"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.regexp"}},"name":"meta.group.regexp","patterns":[{"include":"#literals-regular-expression-literal-regex-guts"}]}]},"literals-regular-expression-literal-line-comment":{"captures":{"1":{"name":"punctuation.definition.comment.regexp"}},"match":"(#).*$","name":"comment.line.regexp"},"literals-regular-expression-literal-quote":{"begin":"\\\\\\\\Q","beginCaptures":{"0":{"name":"constant.character.escape.backslash.regexp"}},"end":"\\\\\\\\E|(\\\\n)","endCaptures":{"0":{"name":"constant.character.escape.backslash.regexp"},"1":{"name":"invalid.illegal.returns-not-allowed.regexp"}},"name":"string.quoted.other.regexp.swift"},"literals-regular-expression-literal-regex-guts":{"patterns":[{"include":"#literals-regular-expression-literal-quote"},{"begin":"\\\\(\\\\?#","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.regexp"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.comment.end.regexp"}},"name":"comment.block.regexp"},{"begin":"<\\\\{","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.regexp"}},"end":"}>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.regexp"}},"name":"meta.embedded.expression.regexp"},{"include":"#literals-regular-expression-literal-unicode-scalars"},{"include":"#literals-regular-expression-literal-character-properties"},{"match":"[$^]|\\\\\\\\[ABGYZbyz]|\\\\\\\\K","name":"keyword.control.anchor.regexp"},{"include":"#literals-regular-expression-literal-backtracking-directive-or-global-matching-option"},{"include":"#literals-regular-expression-literal-callout"},{"include":"#literals-regular-expression-literal-backreference-or-subpattern"},{"match":"\\\\.|\\\\\\\\[CDHNORSVWXdhsvw]","name":"constant.character.character-class.regexp"},{"match":"\\\\\\\\c.","name":"constant.character.entity.control-character.regexp"},{"match":"\\\\\\\\[^c]","name":"constant.character.escape.backslash.regexp"},{"match":"\\\\|","name":"keyword.operator.or.regexp"},{"match":"[*+?]","name":"keyword.operator.quantifier.regexp"},{"match":"\\\\{(?:\\\\s*\\\\d+\\\\s*(?:,\\\\s*\\\\d*\\\\s*)?}|\\\\s*,\\\\s*\\\\d+\\\\s*})","name":"keyword.operator.quantifier.regexp"},{"include":"#literals-regular-expression-literal-custom-char-class"},{"include":"#literals-regular-expression-literal-group-option-toggle"},{"include":"#literals-regular-expression-literal-group-or-conditional"}]},"literals-regular-expression-literal-set-operators":{"patterns":[{"match":"&&","name":"keyword.operator.intersection.regexp.swift"},{"match":"--","name":"keyword.operator.subtraction.regexp.swift"},{"match":"~~","name":"keyword.operator.symmetric-difference.regexp.swift"}]},"literals-regular-expression-literal-unicode-scalars":{"match":"\\\\\\\\(?:u\\\\{\\\\s*(?:\\\\h+\\\\s*)+}|u\\\\h{4}|x\\\\{\\\\h+}|x\\\\h{0,2}|U\\\\h{8}|o\\\\{[0-7]+}|0[0-7]{0,3}|N\\\\{(?:U\\\\+\\\\h{1,8}|[-\\\\s\\\\w]+)})","name":"constant.character.numeric.regexp"},"literals-string":{"patterns":[{"begin":"\\"\\"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.swift"}},"end":"\\"\\"\\"(#*)","endCaptures":{"0":{"name":"punctuation.definition.string.end.swift"},"1":{"name":"invalid.illegal.extra-closing-delimiter.swift"}},"name":"string.quoted.double.block.swift","patterns":[{"match":"\\\\G(?:.+(?=\\"\\"\\")|.+)","name":"invalid.illegal.content-after-opening-delimiter.swift"},{"match":"\\\\\\\\\\\\s*\\\\n","name":"constant.character.escape.newline.swift"},{"include":"#literals-string-string-guts"},{"match":"\\\\S((?!\\\\\\\\\\\\().)*(?=\\"\\"\\")","name":"invalid.illegal.content-before-closing-delimiter.swift"}]},{"begin":"#\\"\\"\\"(?!#)(?=(?:[^\\"]|\\"(?!#))*$)","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.swift"}},"end":"\\"\\"\\"#(#*)","endCaptures":{"0":{"name":"punctuation.definition.string.end.swift"},"1":{"name":"invalid.illegal.extra-closing-delimiter.swift"}},"name":"string.quoted.double.block.raw.swift","patterns":[{"match":"\\\\G(?:.+(?=\\"\\"\\")|.+)","name":"invalid.illegal.content-after-opening-delimiter.swift"},{"match":"\\\\\\\\#\\\\s*\\\\n","name":"constant.character.escape.newline.swift"},{"include":"#literals-string-raw-string-guts"},{"match":"\\\\S((?!\\\\\\\\#\\\\().)*(?=\\"\\"\\")","name":"invalid.illegal.content-before-closing-delimiter.swift"}]},{"begin":"(?<!#)(##+)\\"\\"\\"(?!\\\\1)(?=(?:[^\\"]|\\"(?!\\\\1))*$)","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.swift"}},"end":"\\"\\"\\"\\\\1(#*)","endCaptures":{"0":{"name":"punctuation.definition.string.end.swift"},"1":{"name":"invalid.illegal.extra-closing-delimiter.swift"}},"name":"string.quoted.double.block.raw.swift","patterns":[{"match":"\\\\G(?:.+(?=\\"\\"\\")|.+)","name":"invalid.illegal.content-after-opening-delimiter.swift"}]},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.swift"}},"end":"\\"(#*)","endCaptures":{"0":{"name":"punctuation.definition.string.end.swift"},"1":{"name":"invalid.illegal.extra-closing-delimiter.swift"}},"name":"string.quoted.double.single-line.swift","patterns":[{"match":"[\\\\n\\\\r]","name":"invalid.illegal.returns-not-allowed.swift"},{"include":"#literals-string-string-guts"}]},{"begin":"(?<!#)(##+)\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.raw.swift"}},"end":"\\"\\\\1(#*)","endCaptures":{"0":{"name":"punctuation.definition.string.end.raw.swift"},"1":{"name":"invalid.illegal.extra-closing-delimiter.swift"}},"name":"string.quoted.double.single-line.raw.swift","patterns":[{"match":"[\\\\n\\\\r]","name":"invalid.illegal.returns-not-allowed.swift"}]},{"begin":"#\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.raw.swift"}},"end":"\\"#(#*)","endCaptures":{"0":{"name":"punctuation.definition.string.end.raw.swift"},"1":{"name":"invalid.illegal.extra-closing-delimiter.swift"}},"name":"string.quoted.double.single-line.raw.swift","patterns":[{"match":"[\\\\n\\\\r]","name":"invalid.illegal.returns-not-allowed.swift"},{"include":"#literals-string-raw-string-guts"}]}]},"literals-string-raw-string-guts":{"patterns":[{"match":"\\\\\\\\#[\\"\'0\\\\\\\\nrt]","name":"constant.character.escape.swift"},{"match":"\\\\\\\\#u\\\\{\\\\h{1,8}}","name":"constant.character.escape.unicode.swift"},{"begin":"\\\\\\\\#\\\\(","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.swift"}},"contentName":"source.swift","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.embedded.end.swift"}},"name":"meta.embedded.line.swift","patterns":[{"include":"$self"},{"begin":"\\\\(","end":"\\\\)"}]},{"match":"\\\\\\\\#.","name":"invalid.illegal.escape-not-recognized"}]},"literals-string-string-guts":{"patterns":[{"match":"\\\\\\\\[\\"\'0\\\\\\\\nrt]","name":"constant.character.escape.swift"},{"match":"\\\\\\\\u\\\\{\\\\h{1,8}}","name":"constant.character.escape.unicode.swift"},{"begin":"\\\\\\\\\\\\(","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.swift"}},"contentName":"source.swift","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.embedded.end.swift"}},"name":"meta.embedded.line.swift","patterns":[{"include":"$self"},{"begin":"\\\\(","end":"\\\\)"}]},{"match":"\\\\\\\\.","name":"invalid.illegal.escape-not-recognized"}]},"member-reference":{"patterns":[{"captures":{"1":{"name":"variable.other.swift"},"2":{"name":"punctuation.definition.identifier.swift"},"3":{"name":"punctuation.definition.identifier.swift"}},"match":"(?<=\\\\.)((?<q>`?)[_\\\\p{L}][_\\\\p{L}\\\\p{N}\\\\p{M}]*(\\\\k<q>))"}]},"operators":{"patterns":[{"match":"\\\\b(is\\\\b|as([!?]\\\\B|\\\\b))","name":"keyword.operator.type-casting.swift"},{"begin":"(?=(?<oph>[-!%\\\\&*+/<-?^|~¡-§©«¬®°±¶»¿×÷‖‗†-‧‰-‾⁁-⁓⁕-⁞←-⏿─-❵➔-⯿⸀-、。〃〈-〰])|\\\\.(\\\\g<oph>|[.̀-ͯ᷀-᷿⃐-︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))","end":"(?!\\\\G)","patterns":[{"captures":{"0":{"patterns":[{"match":"\\\\G(\\\\+\\\\+|--)$","name":"keyword.operator.increment-or-decrement.swift"},{"match":"\\\\G([-+])$","name":"keyword.operator.arithmetic.unary.swift"},{"match":"\\\\G!$","name":"keyword.operator.logical.not.swift"},{"match":"\\\\G~$","name":"keyword.operator.bitwise.not.swift"},{"match":".+","name":"keyword.operator.custom.prefix.swift"}]}},"match":"\\\\G(?<=^|[(,:;\\\\[{\\\\s])((?!(//|/\\\\*|\\\\*/))([-!%\\\\&*+/<-?^|~¡-§©«¬®°±¶»¿×÷̀-ͯ᷀-᷿‖‗†-‧‰-‾⁁-⁓⁕-⁞⃐-←-⏿─-❵➔-⯿⸀-、。〃〈-〰︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))++(?![]),:;}\\\\s]|\\\\z)"},{"captures":{"0":{"patterns":[{"match":"\\\\G(\\\\+\\\\+|--)$","name":"keyword.operator.increment-or-decrement.swift"},{"match":"\\\\G!$","name":"keyword.operator.increment-or-decrement.swift"},{"match":".+","name":"keyword.operator.custom.postfix.swift"}]}},"match":"\\\\G(?<!^|[(,:;\\\\[{\\\\s])((?!(//|/\\\\*|\\\\*/))([-!%\\\\&*+/<-?^|~¡-§©«¬®°±¶»¿×÷̀-ͯ᷀-᷿‖‗†-‧‰-‾⁁-⁓⁕-⁞⃐-←-⏿─-❵➔-⯿⸀-、。〃〈-〰︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))++(?=[]),:;}\\\\s]|\\\\z)"},{"captures":{"0":{"patterns":[{"match":"\\\\G=$","name":"keyword.operator.assignment.swift"},{"match":"\\\\G([-%*+/]|<<|>>|[\\\\&^|]|&&|\\\\|\\\\|)=$","name":"keyword.operator.assignment.compound.swift"},{"match":"\\\\G([-*+/])$","name":"keyword.operator.arithmetic.swift"},{"match":"\\\\G&([-*+])$","name":"keyword.operator.arithmetic.overflow.swift"},{"match":"\\\\G%$","name":"keyword.operator.arithmetic.remainder.swift"},{"match":"\\\\G(==|!=|[<>]|>=|<=|~=)$","name":"keyword.operator.comparison.swift"},{"match":"\\\\G\\\\?\\\\?$","name":"keyword.operator.coalescing.swift"},{"match":"\\\\G(&&|\\\\|\\\\|)$","name":"keyword.operator.logical.swift"},{"match":"\\\\G([\\\\&^|]|<<|>>)$","name":"keyword.operator.bitwise.swift"},{"match":"\\\\G([!=]==)$","name":"keyword.operator.bitwise.swift"},{"match":"\\\\G\\\\?$","name":"keyword.operator.ternary.swift"},{"match":".+","name":"keyword.operator.custom.infix.swift"}]}},"match":"\\\\G((?!(//|/\\\\*|\\\\*/))([-!%\\\\&*+/<-?^|~¡-§©«¬®°±¶»¿×÷̀-ͯ᷀-᷿‖‗†-‧‰-‾⁁-⁓⁕-⁞⃐-←-⏿─-❵➔-⯿⸀-、。〃〈-〰︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))++"},{"captures":{"0":{"patterns":[{"match":".+","name":"keyword.operator.custom.prefix.dot.swift"}]}},"match":"\\\\G(?<=^|[(,:;\\\\[{\\\\s])\\\\.((?!(//|/\\\\*|\\\\*/))([-!%\\\\&*+./<-?^|~¡-§©«¬®°±¶»¿×÷̀-ͯ᷀-᷿‖‗†-‧‰-‾⁁-⁓⁕-⁞⃐-←-⏿─-❵➔-⯿⸀-、。〃〈-〰︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))++(?![]),:;}\\\\s]|\\\\z)"},{"captures":{"0":{"patterns":[{"match":".+","name":"keyword.operator.custom.postfix.dot.swift"}]}},"match":"\\\\G(?<!^|[(,:;\\\\[{\\\\s])\\\\.((?!(//|/\\\\*|\\\\*/))([-!%\\\\&*+./<-?^|~¡-§©«¬®°±¶»¿×÷̀-ͯ᷀-᷿‖‗†-‧‰-‾⁁-⁓⁕-⁞⃐-←-⏿─-❵➔-⯿⸀-、。〃〈-〰︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))++(?=[]),:;}\\\\s]|\\\\z)"},{"captures":{"0":{"patterns":[{"match":"\\\\G\\\\.\\\\.[.<]$","name":"keyword.operator.range.swift"},{"match":".+","name":"keyword.operator.custom.infix.dot.swift"}]}},"match":"\\\\G\\\\.((?!(//|/\\\\*|\\\\*/))([-!%\\\\&*+./<-?^|~¡-§©«¬®°±¶»¿×÷̀-ͯ᷀-᷿‖‗†-‧‰-‾⁁-⁓⁕-⁞⃐-←-⏿─-❵➔-⯿⸀-、。〃〈-〰︀-️︠-︯\\\\x{E0100}-\\\\x{E01EF}]))++"}]},{"match":":","name":"keyword.operator.ternary.swift"}]},"root":{"patterns":[{"include":"#compiler-control"},{"include":"#declarations"},{"include":"#expressions"}]}},"scopeName":"source.swift"}')),t=[e];export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-y0m8hrwz.js";import"./chunk-p3b9crsa.js";import{ko}from"./chunk-a3verqw9.js";import"./chunk-2m12wyrb.js";import"./chunk-37ajk6zg.js";import"./chunk-ss1bcb0n.js";import"./chunk-hev4hq89.js";export{ko as diagram};
|