@vividcodeai/embeddedcowork 0.0.25 → 0.0.27
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/package.json +1 -1
- package/public/assets/{ChangesTab-CVCRigIg.js → ChangesTab-C1X-Hoct.js} +1 -1
- package/public/assets/{DiffToolbar-BLwxt6FH.js → DiffToolbar-CcxDSZbq.js} +1 -1
- package/public/assets/{FilesTab-DfvJ1VX9.js → FilesTab-DppYcH9k.js} +1 -1
- package/public/assets/{GitChangesTab-BAvkNaml.js → GitChangesTab-rL3bJXdp.js} +1 -1
- package/public/assets/{SplitFilePanel-DnemItxX.js → SplitFilePanel-EYlYmotO.js} +1 -1
- package/public/assets/{StatusTab-BXLPvvyP.js → StatusTab-D2vqB-UO.js} +1 -1
- package/public/assets/{bundle-full-CMTKNrd7.js → bundle-full-BfeWHKj6.js} +1 -1
- package/public/assets/{diff-viewer-0XlMkcjW.js → diff-viewer-Dt-rWkKI.js} +1 -1
- package/public/assets/index-BU6exRDc.js +1 -0
- package/public/assets/index-BzoVKWj7.css +1 -0
- package/public/assets/{index-Koqt9aPM.js → index-CaND_PVN.js} +1 -1
- package/public/assets/{index-DATP6oWI.js → index-Cb0Tv5RS.js} +1 -1
- package/public/assets/{index-BPcUbPnJ.js → index-CoVlCCFh.js} +1 -1
- package/public/assets/{index-DNmM85Hl.js → index-DR3Bizi2.js} +1 -1
- package/public/assets/index-Df9_I8zl.js +2 -0
- package/public/assets/{index-b39FURUg.js → index-unYUMknU.js} +1 -1
- package/public/assets/{loading-CdVRMOQE.js → loading-6n7tGuB0.js} +1 -1
- package/public/assets/main-CkkkdN2F.js +53 -0
- package/public/assets/{markdown-Dk62KJMo.js → markdown-D6oFeh85.js} +3 -3
- package/public/assets/{todo-90kr3HS1.js → todo-BE1jT24j.js} +1 -1
- package/public/assets/{tool-call-BBTy2uel.js → tool-call-Bitxs_-r.js} +3 -3
- package/public/assets/{unified-picker-B7IYheKa.js → unified-picker-Bll7rFy8.js} +1 -1
- package/public/assets/{wrap-text-DKS7oNyJ.js → wrap-text-CQz1JyT_.js} +1 -1
- package/public/index.html +3 -3
- package/public/loading.html +3 -3
- package/public/sw.js +1 -1
- package/public/ui-version.json +1 -1
- package/public/assets/index-BrwpCfJK.js +0 -2
- package/public/assets/index-CjMigdYG.css +0 -1
- package/public/assets/index-DOJSCJIl.js +0 -1
- package/public/assets/main-B6hz2k5O.js +0 -53
package/package.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-OXO07Mos.js","assets/git-diff-vendor-DaSE45SW.js","assets/fast-diff-vendor-DgdwVvTQ.js","assets/highlight-vendor-8FKMu9os.js","assets/git-diff-vendor-HAZkIolJ.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as K}from"./index-
|
|
2
|
+
import{_ as K}from"./index-Df9_I8zl.js";import{m as B,t as g,i as a,s as w,c as F,d as N}from"./monaco-viewer-OXO07Mos.js";import{c as f,n as c,a as L,F as T,S as W,w as j,x as q}from"./git-diff-vendor-DaSE45SW.js";import{D as G}from"./DiffToolbar-CcxDSZbq.js";import{S as H}from"./SplitFilePanel-EYlYmotO.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./main-CkkkdN2F.js";import"./core-DhEqZVGG.js";import"./index-Bsb7z85O.js";import"./wrap-text-CQz1JyT_.js";var J=g('<div class="file-viewer-panel flex-1"><div class="file-viewer-content file-viewer-content--monaco">'),z=g("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),Q=g('<div class="p-3 text-xs text-secondary">'),E=g("<div><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text></span></div><div class=file-list-item-stats><span class=file-list-item-additions>+</span><span class=file-list-item-deletions>-"),U=g("<span class=files-tab-selected-path><span class=file-path-text>"),X=g('<div class=files-tab-stats style="flex:0 0 auto"><span class="files-tab-stat files-tab-stat-additions"><span class=files-tab-stat-value>+</span></span><span class="files-tab-stat files-tab-stat-deletions"><span class=files-tab-stat-value>-'),Y=g("<div style=margin-left:auto>");const Z=q(()=>K(()=>import("./monaco-viewer-OXO07Mos.js").then(e=>e.ad),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoDiffViewer}))),ue=e=>{const M=f(()=>e.activeSessionId()),S=f(()=>!!(M()&&M()!=="info")),D=f(()=>S()?e.activeSessionDiffs():null),m=f(()=>{const n=D();return Array.isArray(n)?[...n].sort((i,l)=>String(i.file||"").localeCompare(String(l.file||""))):[]}),R=f(()=>m().reduce((n,i)=>(n.additions+=typeof i.additions=="number"?i.additions:0,n.deletions+=typeof i.deletions=="number"?i.deletions:0,n),{additions:0,deletions:0})),I=f(()=>{const n=m();return n.length===0?null:n.reduce((i,l)=>{const v=typeof(i==null?void 0:i.additions)=="number"?i.additions:0,y=typeof(i==null?void 0:i.deletions)=="number"?i.deletions:0,x=v+y,A=typeof(l==null?void 0:l.additions)=="number"?l.additions:0,t=typeof(l==null?void 0:l.deletions)=="number"?l.deletions:0,r=A+t;return r>x?l:r<x?i:String(l.file||"").localeCompare(String((i==null?void 0:i.file)||""))<0?l:i},n[0])}),P=f(()=>{const n=e.selectedFile(),i=m();if(n){const l=i.find(v=>v.file===n);if(l)return l}return I()}),O=f(()=>`${e.instanceId}:${S()?M():"no-session"}`),V=f(()=>{if(!S())return e.t("instanceShell.sessionChanges.noSessionSelected");const n=D();return n===void 0?e.t("instanceShell.sessionChanges.loading"):!Array.isArray(n)||n.length===0?e.t("instanceShell.sessionChanges.empty"):e.t("instanceShell.filesShell.viewerEmpty")}),p=f(()=>{const n=P();return n!=null&&n.file?String(n.file):e.t("instanceShell.rightPanel.tabs.changes")});return B(()=>{const n=m(),i=R(),l=P(),v=()=>(()=>{var t=J(),r=t.firstChild;return a(r,c(W,{get when(){return l&&S()&&n.length>0?l:null},get fallback(){return(()=>{var d=z(),s=d.firstChild;return a(s,V),d})()},children:d=>c(j,{get fallback(){return(()=>{var s=z(),u=s.firstChild;return a(u,()=>e.t("instanceInfo.loading")),s})()},get children(){return c(Z,{get scopeKey(){return O()},get path(){return String(d().file||"")},get patch(){return String(d().patch||"")},get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrap(){return e.diffWordWrapMode()}})}})})),t})(),y=()=>(()=>{var t=Q();return a(t,V),t})();return c(H,{get header(){return[(()=>{var t=U(),r=t.firstChild;return a(r,p),L(()=>w(t,"title",p())),t})(),(()=>{var t=X(),r=t.firstChild,d=r.firstChild;d.firstChild;var s=r.nextSibling,u=s.firstChild;return u.firstChild,a(d,()=>i.additions,null),a(u,()=>i.deletions,null),t})(),(()=>{var t=Y();return a(t,c(G,{get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrapMode(){return e.diffWordWrapMode()},get onViewModeChange(){return e.onViewModeChange},get onContextModeChange(){return e.onContextModeChange},get onWordWrapModeChange(){return e.onWordWrapModeChange}})),t})()]},list:{panel:()=>c(W,{get when(){return n.length>0},get fallback(){return y()},get children(){return c(T,{each:n,children:t=>(()=>{var r=E(),d=r.firstChild,s=d.firstChild,u=s.firstChild,b=s.nextSibling,h=b.firstChild;h.firstChild;var C=h.nextSibling;return C.firstChild,r.$$click=()=>{e.onSelectFile(t.file,e.isPhoneLayout())},a(u,()=>t.file),a(h,()=>t.additions,null),a(C,()=>t.deletions,null),L(o=>{var _=`file-list-item ${(l==null?void 0:l.file)===t.file?"file-list-item-active":""}`,$=t.file;return _!==o.e&&F(r,o.e=_),$!==o.t&&w(s,"title",o.t=$),o},{e:void 0,t:void 0}),r})()})}}),overlay:()=>c(W,{get when(){return n.length>0},get fallback(){return y()},get children(){return c(T,{each:n,children:t=>(()=>{var r=E(),d=r.firstChild,s=d.firstChild,u=s.firstChild,b=s.nextSibling,h=b.firstChild;h.firstChild;var C=h.nextSibling;return C.firstChild,r.$$click=()=>{e.onSelectFile(t.file,!0)},a(u,()=>t.file),a(h,()=>t.additions,null),a(C,()=>t.deletions,null),L(o=>{var _=`file-list-item ${(l==null?void 0:l.file)===t.file?"file-list-item-active":""}`,$=t.file,k=t.file;return _!==o.e&&F(r,o.e=_),$!==o.t&&w(r,"title",o.t=$),k!==o.a&&w(s,"title",o.a=k),o},{e:void 0,t:void 0,a:void 0}),r})()})}})},get viewer(){return v()},get listOpen(){return e.listOpen()},get onToggleList(){return e.onToggleList},get splitWidth(){return e.splitWidth()},get onResizeMouseDown(){return e.onResizeMouseDown},get onResizeTouchStart(){return e.onResizeTouchStart},get isPhoneLayout(){return e.isPhoneLayout()},get overlayAriaLabel(){return e.t("instanceShell.rightPanel.tabs.changes")}})})};N(["click"]);export{ue as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as g,i as c,m as W,s as i,c as S,d as C}from"./monaco-viewer-OXO07Mos.js";import{u as T}from"./index-
|
|
1
|
+
import{t as g,i as c,m as W,s as i,c as S,d as C}from"./monaco-viewer-OXO07Mos.js";import{u as T}from"./index-Df9_I8zl.js";import{n as o,m as $,a as V}from"./git-diff-vendor-DaSE45SW.js";import{I as U,S as A,F}from"./main-CkkkdN2F.js";import{A as I,W as D}from"./wrap-text-CQz1JyT_.js";const E=[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m15 5-3-3-3 3",key:"itvq4r"}]],H=t=>o(U,$(t,{name:"UnfoldVertical",iconNode:E}));var N=g("<div class=file-viewer-toolbar><button type=button class=file-viewer-toolbar-icon-button></button><button type=button class=file-viewer-toolbar-icon-button></button><button type=button>");const z=t=>{const{t:a}=T(),r=()=>t.viewMode==="split"?"unified":"split",s=()=>t.contextMode==="collapsed"?"expanded":"collapsed",h=()=>t.wordWrapMode==="on"?"off":"on",f=()=>r()==="split"?a("instanceShell.diff.switchToSplit"):a("instanceShell.diff.switchToUnified"),v=()=>s()==="collapsed"?a("instanceShell.diff.hideUnchanged"):a("instanceShell.diff.showFull"),u=()=>h()==="on"?a("instanceShell.diff.enableWordWrap"):a("instanceShell.diff.disableWordWrap");return(()=>{var b=N(),n=b.firstChild,l=n.nextSibling,d=l.nextSibling;return n.$$click=()=>t.onViewModeChange(r()),c(n,(()=>{var e=W(()=>r()==="split");return()=>e()?o(A,{class:"h-4 w-4","aria-hidden":"true"}):o(I,{class:"h-4 w-4","aria-hidden":"true"})})()),l.$$click=()=>t.onContextModeChange(s()),c(l,(()=>{var e=W(()=>s()==="collapsed");return()=>e()?o(F,{class:"h-4 w-4","aria-hidden":"true"}):o(H,{class:"h-4 w-4","aria-hidden":"true"})})()),d.$$click=()=>t.onWordWrapModeChange(h()),c(d,o(D,{class:"h-4 w-4","aria-hidden":"true"})),V(e=>{var m=f(),w=f(),M=v(),p=v(),x=`file-viewer-toolbar-icon-button${t.wordWrapMode==="on"?" active":""}`,k=u(),y=u();return m!==e.e&&i(n,"aria-label",e.e=m),w!==e.t&&i(n,"title",e.t=w),M!==e.a&&i(l,"aria-label",e.a=M),p!==e.o&&i(l,"title",e.o=p),x!==e.i&&S(d,e.i=x),k!==e.n&&i(d,"aria-label",e.n=k),y!==e.s&&i(d,"title",e.s=y),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),b})()};C(["click"]);export{z as D};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-OXO07Mos.js","assets/git-diff-vendor-DaSE45SW.js","assets/fast-diff-vendor-DgdwVvTQ.js","assets/highlight-vendor-8FKMu9os.js","assets/git-diff-vendor-HAZkIolJ.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as R}from"./index-
|
|
2
|
+
import{_ as R}from"./index-Df9_I8zl.js";import{m as _,t as o,i as s,s as c,c as z,d as I}from"./monaco-viewer-OXO07Mos.js";import{n as i,m as D,S as d,a as v,F,w as V,x as M}from"./git-diff-vendor-DaSE45SW.js";import{S as T}from"./SplitFilePanel-EYlYmotO.js";import{I as O,R as y}from"./main-CkkkdN2F.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./core-DhEqZVGG.js";import"./index-Bsb7z85O.js";const A=[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]],q=e=>i(O,D(e,{name:"Save",iconNode:A}));var g=o("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),K=o('<div class="file-viewer-panel flex-1"><div class="file-viewer-content file-viewer-content--monaco">'),N=o('<div class="p-3 text-xs text-secondary">'),W=o("<div class=file-list-item><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text>.."),H=o('<div><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text></span></div><div class=file-list-item-stats><span class="text-[10px] text-secondary">'),j=o("<span>"),B=o("<div class=files-tab-stats><span class=files-tab-stat><span class=files-tab-selected-path><span class=file-path-text>"),G=o("<button type=button class=files-header-icon-button style=margin-inline-start:auto>"),J=o("<button type=button class=files-header-icon-button>"),Q=o("<span class=text-error>");const U=M(()=>R(()=>import("./monaco-viewer-OXO07Mos.js").then(e=>e.ae),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoFileViewer}))),se=e=>{const C=()=>{const h=e.browserSelectedContent();h!=null&&e.onSave(h)};return _(()=>{const h=e.browserEntries(),P=[...h||[]].sort((t,n)=>{const r=t.type==="directory"?0:1,l=n.type==="directory"?0:1;return r!==l?r-l:String(t.name||"").localeCompare(String(n.name||""))}),L=e.parentPath(),m=()=>e.browserSelectedPath()||e.browserPath(),x=()=>e.browserLoading()&&h===null?e.t("instanceInfo.loading"):e.t("instanceShell.filesShell.viewerEmpty"),k=()=>(()=>{var t=K(),n=t.firstChild;return s(n,i(d,{get when(){return e.browserSelectedLoading()},get fallback(){return i(d,{get when(){return e.browserSelectedError()},get fallback(){return i(d,{get when(){return _(()=>!!(e.browserSelectedPath()&&e.browserSelectedContent()!==null))()?{path:e.browserSelectedPath(),content:e.browserSelectedContent()}:null},get fallback(){return(()=>{var r=g(),l=r.firstChild;return s(l,x),r})()},children:r=>i(V,{get fallback(){return(()=>{var l=g(),a=l.firstChild;return s(a,()=>e.t("instanceInfo.loading")),l})()},get children(){return i(U,{get scopeKey(){return e.scopeKey()},get path(){return r().path},get content(){return r().content},get onSave(){return e.onSave},get onContentChange(){return e.onContentChange}})}})})},children:r=>(()=>{var l=g(),a=l.firstChild;return s(a,r),l})()})},get children(){var r=g(),l=r.firstChild;return s(l,()=>e.t("instanceInfo.loading")),r}})),t})(),w=()=>[i(d,{when:L,children:t=>(()=>{var n=W(),r=n.firstChild,l=r.firstChild;return n.$$click=()=>e.onLoadEntries(t()),v(()=>c(l,"title",t())),n})()}),i(d,{get when(){return e.browserLoading()&&h===null},get children(){var t=N();return s(t,()=>e.t("instanceInfo.loading")),t}}),i(F,{each:P,children:t=>(()=>{var n=H(),r=n.firstChild,l=r.firstChild,a=l.firstChild,f=l.nextSibling,E=f.firstChild;return n.$$click=()=>{if(t.type==="directory"){e.onLoadEntries(t.path);return}e.onRequestOpenFile(t.path)},s(a,()=>t.name),s(E,()=>t.type),v(u=>{var b=`file-list-item ${e.browserSelectedPath()===t.path?"file-list-item-active":""}`,S=t.path,$=t.path;return b!==u.e&&z(n,u.e=b),S!==u.t&&c(n,"title",u.t=S),$!==u.a&&c(l,"title",u.a=$),u},{e:void 0,t:void 0,a:void 0}),n})()})];return i(T,{get header(){return[(()=>{var t=B(),n=t.firstChild,r=n.firstChild,l=r.firstChild;return s(l,m),s(t,i(d,{get when(){return e.browserLoading()},get children(){var a=j();return s(a,()=>e.t("instanceInfo.loading")),a}}),null),s(t,i(d,{get when(){return e.browserError()},children:a=>(()=>{var f=Q();return s(f,a),f})()}),null),v(()=>c(r,"title",m())),t})(),(()=>{var t=G();return t.$$click=C,s(t,i(d,{get when(){return e.browserSelectedSaving()},get fallback(){return i(q,{class:"h-4 w-4"})},get children(){return i(y,{class:"h-4 w-4 animate-spin"})}})),v(n=>{var r=e.t("instanceShell.rightPanel.actions.save")||"Save (Ctrl+S)",l=e.t("instanceShell.rightPanel.actions.save")||"Save",a=e.browserSelectedSaving()||!e.browserSelectedDirty();return r!==n.e&&c(t,"title",n.e=r),l!==n.t&&c(t,"aria-label",n.t=l),a!==n.a&&(t.disabled=n.a=a),n},{e:void 0,t:void 0,a:void 0}),t})(),(()=>{var t=J();return t.$$click=()=>e.onRefresh(),s(t,i(y,{get class(){return`h-4 w-4${e.browserLoading()?" animate-spin":""}`}})),v(n=>{var r=e.t("instanceShell.rightPanel.actions.refresh"),l=e.t("instanceShell.rightPanel.actions.refresh"),a=e.browserLoading();return r!==n.e&&c(t,"title",n.e=r),l!==n.t&&c(t,"aria-label",n.t=l),a!==n.a&&(t.disabled=n.a=a),n},{e:void 0,t:void 0,a:void 0}),t})()]},list:{panel:w,overlay:w},get viewer(){return k()},get listOpen(){return e.listOpen()},get onToggleList(){return e.onToggleList},get splitWidth(){return e.splitWidth()},get onResizeMouseDown(){return e.onResizeMouseDown},get onResizeTouchStart(){return e.onResizeTouchStart},get isPhoneLayout(){return e.isPhoneLayout()},get overlayAriaLabel(){return e.t("instanceShell.rightPanel.tabs.files")}})})};I(["click"]);export{se as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-OXO07Mos.js","assets/git-diff-vendor-DaSE45SW.js","assets/fast-diff-vendor-DgdwVvTQ.js","assets/highlight-vendor-8FKMu9os.js","assets/git-diff-vendor-HAZkIolJ.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as se}from"./index-BrwpCfJK.js";import{m as R,t as h,i as n,s as b,b as U,c as j,d as le}from"./monaco-viewer-OXO07Mos.js";import{n as r,m as re,c as m,a as L,S as w,F as H,w as ce,x as oe}from"./git-diff-vendor-DaSE45SW.js";import{D as de}from"./DiffToolbar-BLwxt6FH.js";import{S as ge}from"./SplitFilePanel-DnemItxX.js";import{I as he,b as ue,R as fe,C as J,a as Q}from"./main-B6hz2k5O.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./wrap-text-DKS7oNyJ.js";import"./core-DhEqZVGG.js";import"./index-Bsb7z85O.js";const me=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],ve=e=>r(he,re(e,{name:"GitBranch",iconNode:me}));var V=h("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),Ce=h('<div class="file-viewer-panel flex-1"><div class="file-viewer-content file-viewer-content--monaco">'),$e=h('<div class="p-3 text-xs text-secondary">'),be=h('<span class="git-change-row-action-bar git-change-row-action-bar-vertical">'),_e=h('<div><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text></span></div><div class=git-change-list-item-right><div class=file-list-item-stats><span class=file-list-item-additions>+</span><span class=file-list-item-deletions>-</span></div></div></div><div class=git-change-list-item-actions-zone><div class=git-change-list-item-actions><button type=button class=git-change-row-action><span aria-hidden=true><span class="git-change-row-action-bar git-change-row-action-bar-horizontal">'),we=h("<div class=git-change-section-items>"),Se=h("<div class=git-change-section><button type=button class=git-change-section-header><span class=git-change-section-header-main><span class=git-change-section-chevron></span><span class=git-change-section-title></span></span><span class=git-change-section-count>"),ye=h('<div class=git-change-section-items><div class=git-change-commit-box><div class=git-change-commit-input-wrap><textarea class=git-change-commit-input rows=1></textarea><button type=button class="git-change-commit-button git-change-commit-button-overlay">'),xe=h("<div class=git-change-sections><div class=git-change-section><button type=button class=git-change-section-header><span class=git-change-section-header-main><span class=git-change-section-chevron></span><span class=git-change-section-title-row><span class=git-change-section-title></span></span></span><span class=git-change-section-count>"),Ie=h('<span class="status-indicator session-status-list worktree-indicator git-change-section-badge"><span class=worktree-indicator-label>'),Me=h("<span class=files-tab-selected-path><span class=file-path-text>"),ke=h('<div class=files-tab-stats style="flex:0 0 auto"><span class="files-tab-stat files-tab-stat-additions"><span class=files-tab-stat-value>+</span></span><span class="files-tab-stat files-tab-stat-deletions"><span class=files-tab-stat-value>-'),Le=h("<button type=button class=files-header-icon-button style=margin-left:auto>"),Ee=h("<span class=text-error>");const Pe=oe(()=>se(()=>import("./monaco-viewer-OXO07Mos.js").then(e=>e.ad),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoDiffViewer}))),qe=e=>{const A=m(()=>e.activeSessionId()),W=m(()=>!!(A()&&A()!=="info")),T=m(()=>W()?e.entries():null),X=m(()=>{const o=T();return Array.isArray(o)?[...o].sort((d,x)=>String(d.path||"").localeCompare(String(x.path||""))):[]}),S=m(()=>ue(X())),Y=m(()=>S().reduce((o,d)=>(o.additions+=typeof d.additions=="number"?d.additions:0,o.deletions+=typeof d.deletions=="number"?d.deletions:0,o),{additions:0,deletions:0})),D=m(()=>S().filter(o=>o.section==="staged")),Z=m(()=>S().filter(o=>o.section==="unstaged")),p=m(()=>D().length>0&&e.commitMessage().trim().length>0&&!e.commitSubmitting()),ee=m(()=>{const o=S(),d=e.selectedItemId(),x=e.mostChangedItemId(),I=o.find(E=>E.id===d)||(x?o.find(E=>E.id===x):void 0);return(I==null?void 0:I.entry)??null}),z=m(()=>W()?T()===null?e.t("instanceShell.gitChanges.loading"):S().length===0?e.t("instanceShell.gitChanges.empty"):e.t("instanceShell.filesShell.viewerEmpty"):e.t("instanceShell.gitChanges.noSessionSelected")),te=m(()=>e.selectedError()===e.t("instanceShell.gitChanges.binaryViewer"));return R(()=>{const o=Y(),d=ee(),x=S(),I=D(),E=Z(),ne=()=>(()=>{var t=Ce(),l=t.firstChild;return n(l,r(w,{get when(){return e.selectedLoading()},get fallback(){return r(w,{get when(){return e.selectedError()},get fallback(){return r(w,{get when(){return R(()=>!!(d&&e.selectedBefore()!==null&&e.selectedAfter()!==null))()?{path:d.path,before:e.selectedBefore(),after:e.selectedAfter()}:null},get fallback(){return(()=>{var i=V(),s=i.firstChild;return n(s,z),i})()},children:i=>r(ce,{get fallback(){return(()=>{var s=V(),a=s.firstChild;return n(a,()=>e.t("instanceInfo.loading")),s})()},get children(){return r(Pe,{get scopeKey(){return e.scopeKey()},get path(){return String(i().path||"")},get before(){return String(i().before||"")},get after(){return String(i().after||"")},get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrap(){return e.diffWordWrapMode()},get insertContextLabel(){return e.t("instanceShell.gitChanges.actions.insertContext")},get onRequestInsertContext(){return te()?void 0:s=>{const a=e.selectedItemId();if(!a)return;const g=S().find(u=>u.id===a);g&&e.onInsertContext(g,s)}}})}})})},children:i=>(()=>{var s=V(),a=s.firstChild;return n(a,i),s})()})},get children(){var i=V(),s=i.firstChild;return n(s,()=>e.t("instanceInfo.loading")),i}})),t})(),ie=()=>(()=>{var t=$e();return n(t,z),t})(),B=t=>{const l=m(()=>e.selectedBulkItemIds().has(t.id)),i=t.section==="staged"?e.t("instanceShell.gitChanges.actions.unstage"):e.t("instanceShell.gitChanges.actions.stage"),s=()=>{t.section==="staged"?e.onUnstageFile(t):e.onStageFile(t)};return(()=>{var a=_e(),g=a.firstChild,u=g.firstChild,M=u.firstChild,v=u.nextSibling,$=v.firstChild,C=$.firstChild;C.firstChild;var _=C.nextSibling;_.firstChild;var P=g.nextSibling,f=P.firstChild,y=f.firstChild,k=y.firstChild;return k.firstChild,a.$$click=c=>e.onRowClick(t,c),a.$$mousedown=c=>{(c.shiftKey||c.ctrlKey||c.metaKey)&&c.preventDefault()},n(M,()=>t.path),n(C,()=>t.additions,null),n(_,()=>t.deletions,null),y.$$click=c=>{c.stopPropagation(),s()},b(y,"title",i),b(y,"aria-label",i),n(k,r(w,{get when(){return t.section!=="staged"},get children(){return be()}}),null),L(c=>{var F=`file-list-item git-change-list-item ${e.selectedItemId()===t.id?"file-list-item-active":""} ${l()?"git-change-list-item-bulk-selected":""}`,G=t.path,K=t.path,q=t.path,N=`git-change-row-action-glyph ${t.section==="staged"?"git-change-row-action-glyph-minus":"git-change-row-action-glyph-plus"}`;return F!==c.e&&j(a,c.e=F),G!==c.t&&b(a,"title",c.t=G),K!==c.a&&b(g,"title",c.a=K),q!==c.o&&b(u,"title",c.o=q),N!==c.i&&j(k,c.i=N),c},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),a})()},ae=(t,l,i,s)=>(()=>{var a=Se(),g=a.firstChild,u=g.firstChild,M=u.firstChild,v=M.nextSibling,$=u.nextSibling;return U(g,"click",s,!0),n(M,i?r(J,{class:"h-3.5 w-3.5"}):r(Q,{class:"h-3.5 w-3.5"})),n(v,t),n($,()=>l.length),n(a,r(w,{when:i,get children(){var C=we();return n(C,r(H,{each:l,children:_=>B(_)})),C}}),null),a})(),O=()=>r(w,{get when(){return x.length>0},get fallback(){return ie()},get children(){var t=xe(),l=t.firstChild,i=l.firstChild,s=i.firstChild,a=s.firstChild,g=a.nextSibling,u=g.firstChild,M=s.nextSibling;return U(i,"click",e.onToggleStagedOpen,!0),n(a,(()=>{var v=R(()=>!!e.stagedOpen());return()=>v()?r(J,{class:"h-3.5 w-3.5"}):r(Q,{class:"h-3.5 w-3.5"})})()),n(u,()=>e.t("instanceShell.gitChanges.sections.staged")),n(g,r(w,{get when(){return e.branchLabel()},children:v=>(()=>{var $=Ie(),C=$.firstChild;return n($,r(ve,{class:"w-3.5 h-3.5","aria-hidden":"true"}),C),n(C,v),L(()=>b($,"title",`Branch: ${v()}`)),$})()}),null),n(M,()=>I.length),n(l,r(w,{get when(){return e.stagedOpen()},get children(){var v=ye(),$=v.firstChild,C=$.firstChild,_=C.firstChild,P=_.nextSibling;return _.$$input=f=>e.onCommitMessageInput(f.currentTarget.value),P.$$click=()=>e.onSubmitCommit(),n(P,(()=>{var f=R(()=>!!e.commitSubmitting());return()=>f()?e.t("instanceShell.gitChanges.commit.submitting"):e.t("instanceShell.gitChanges.commit.submit")})()),n(v,r(H,{each:I,children:f=>B(f)}),null),L(f=>{var y=e.t("instanceShell.gitChanges.commit.placeholder"),k=!p();return y!==f.e&&b(_,"placeholder",f.e=y),k!==f.t&&(P.disabled=f.t=k),f},{e:void 0,t:void 0}),L(()=>_.value=e.commitMessage()),v}}),null),n(t,()=>ae(e.t("instanceShell.gitChanges.sections.unstaged"),E,e.unstagedOpen(),e.onToggleUnstagedOpen),null),t}});return r(ge,{get header(){return[(()=>{var t=Me(),l=t.firstChild;return n(l,()=>(d==null?void 0:d.path)||e.t("instanceShell.rightPanel.tabs.gitChanges")),L(()=>b(t,"title",(d==null?void 0:d.path)||e.t("instanceShell.rightPanel.tabs.gitChanges"))),t})(),(()=>{var t=ke(),l=t.firstChild,i=l.firstChild;i.firstChild;var s=l.nextSibling,a=s.firstChild;return a.firstChild,n(i,()=>o.additions,null),n(a,()=>o.deletions,null),n(t,r(w,{get when(){return e.statusError()},children:g=>(()=>{var u=Ee();return n(u,g),u})()}),null),t})(),(()=>{var t=Le();return t.$$click=()=>e.onRefresh(),n(t,r(fe,{get class(){return`h-4 w-4${e.statusLoading()?" animate-spin":""}`}})),L(l=>{var i=e.t("instanceShell.rightPanel.actions.refresh"),s=e.t("instanceShell.rightPanel.actions.refresh"),a=!W()||e.statusLoading()||T()===null;return i!==l.e&&b(t,"title",l.e=i),s!==l.t&&b(t,"aria-label",l.t=s),a!==l.a&&(t.disabled=l.a=a),l},{e:void 0,t:void 0,a:void 0}),t})(),r(de,{get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrapMode(){return e.diffWordWrapMode()},get onViewModeChange(){return e.onViewModeChange},get onContextModeChange(){return e.onContextModeChange},get onWordWrapModeChange(){return e.onWordWrapModeChange}})]},list:{panel:O,overlay:O},get viewer(){return ne()},get listOpen(){return e.listOpen()},get onToggleList(){return e.onToggleList},get splitWidth(){return e.splitWidth()},get onResizeMouseDown(){return e.onResizeMouseDown},get onResizeTouchStart(){return e.onResizeTouchStart},get isPhoneLayout(){return e.isPhoneLayout()},get overlayAriaLabel(){return e.t("instanceShell.rightPanel.tabs.gitChanges")}})})};le(["mousedown","click","input"]);export{qe as default};
|
|
2
|
+
import{_ as se}from"./index-Df9_I8zl.js";import{m as R,t as h,i as n,s as b,b as U,c as j,d as le}from"./monaco-viewer-OXO07Mos.js";import{n as r,m as re,c as m,a as L,S as w,F as H,w as ce,x as oe}from"./git-diff-vendor-DaSE45SW.js";import{D as de}from"./DiffToolbar-CcxDSZbq.js";import{S as ge}from"./SplitFilePanel-EYlYmotO.js";import{I as he,b as ue,R as fe,C as J,a as Q}from"./main-CkkkdN2F.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./wrap-text-CQz1JyT_.js";import"./core-DhEqZVGG.js";import"./index-Bsb7z85O.js";const me=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],ve=e=>r(he,re(e,{name:"GitBranch",iconNode:me}));var V=h("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),Ce=h('<div class="file-viewer-panel flex-1"><div class="file-viewer-content file-viewer-content--monaco">'),$e=h('<div class="p-3 text-xs text-secondary">'),be=h('<span class="git-change-row-action-bar git-change-row-action-bar-vertical">'),_e=h('<div><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text></span></div><div class=git-change-list-item-right><div class=file-list-item-stats><span class=file-list-item-additions>+</span><span class=file-list-item-deletions>-</span></div></div></div><div class=git-change-list-item-actions-zone><div class=git-change-list-item-actions><button type=button class=git-change-row-action><span aria-hidden=true><span class="git-change-row-action-bar git-change-row-action-bar-horizontal">'),we=h("<div class=git-change-section-items>"),Se=h("<div class=git-change-section><button type=button class=git-change-section-header><span class=git-change-section-header-main><span class=git-change-section-chevron></span><span class=git-change-section-title></span></span><span class=git-change-section-count>"),ye=h('<div class=git-change-section-items><div class=git-change-commit-box><div class=git-change-commit-input-wrap><textarea class=git-change-commit-input rows=1></textarea><button type=button class="git-change-commit-button git-change-commit-button-overlay">'),xe=h("<div class=git-change-sections><div class=git-change-section><button type=button class=git-change-section-header><span class=git-change-section-header-main><span class=git-change-section-chevron></span><span class=git-change-section-title-row><span class=git-change-section-title></span></span></span><span class=git-change-section-count>"),Ie=h('<span class="status-indicator session-status-list worktree-indicator git-change-section-badge"><span class=worktree-indicator-label>'),Me=h("<span class=files-tab-selected-path><span class=file-path-text>"),ke=h('<div class=files-tab-stats style="flex:0 0 auto"><span class="files-tab-stat files-tab-stat-additions"><span class=files-tab-stat-value>+</span></span><span class="files-tab-stat files-tab-stat-deletions"><span class=files-tab-stat-value>-'),Le=h("<button type=button class=files-header-icon-button style=margin-left:auto>"),Ee=h("<span class=text-error>");const Pe=oe(()=>se(()=>import("./monaco-viewer-OXO07Mos.js").then(e=>e.ad),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoDiffViewer}))),qe=e=>{const A=m(()=>e.activeSessionId()),W=m(()=>!!(A()&&A()!=="info")),T=m(()=>W()?e.entries():null),X=m(()=>{const o=T();return Array.isArray(o)?[...o].sort((d,x)=>String(d.path||"").localeCompare(String(x.path||""))):[]}),S=m(()=>ue(X())),Y=m(()=>S().reduce((o,d)=>(o.additions+=typeof d.additions=="number"?d.additions:0,o.deletions+=typeof d.deletions=="number"?d.deletions:0,o),{additions:0,deletions:0})),D=m(()=>S().filter(o=>o.section==="staged")),Z=m(()=>S().filter(o=>o.section==="unstaged")),p=m(()=>D().length>0&&e.commitMessage().trim().length>0&&!e.commitSubmitting()),ee=m(()=>{const o=S(),d=e.selectedItemId(),x=e.mostChangedItemId(),I=o.find(E=>E.id===d)||(x?o.find(E=>E.id===x):void 0);return(I==null?void 0:I.entry)??null}),z=m(()=>W()?T()===null?e.t("instanceShell.gitChanges.loading"):S().length===0?e.t("instanceShell.gitChanges.empty"):e.t("instanceShell.filesShell.viewerEmpty"):e.t("instanceShell.gitChanges.noSessionSelected")),te=m(()=>e.selectedError()===e.t("instanceShell.gitChanges.binaryViewer"));return R(()=>{const o=Y(),d=ee(),x=S(),I=D(),E=Z(),ne=()=>(()=>{var t=Ce(),l=t.firstChild;return n(l,r(w,{get when(){return e.selectedLoading()},get fallback(){return r(w,{get when(){return e.selectedError()},get fallback(){return r(w,{get when(){return R(()=>!!(d&&e.selectedBefore()!==null&&e.selectedAfter()!==null))()?{path:d.path,before:e.selectedBefore(),after:e.selectedAfter()}:null},get fallback(){return(()=>{var i=V(),s=i.firstChild;return n(s,z),i})()},children:i=>r(ce,{get fallback(){return(()=>{var s=V(),a=s.firstChild;return n(a,()=>e.t("instanceInfo.loading")),s})()},get children(){return r(Pe,{get scopeKey(){return e.scopeKey()},get path(){return String(i().path||"")},get before(){return String(i().before||"")},get after(){return String(i().after||"")},get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrap(){return e.diffWordWrapMode()},get insertContextLabel(){return e.t("instanceShell.gitChanges.actions.insertContext")},get onRequestInsertContext(){return te()?void 0:s=>{const a=e.selectedItemId();if(!a)return;const g=S().find(u=>u.id===a);g&&e.onInsertContext(g,s)}}})}})})},children:i=>(()=>{var s=V(),a=s.firstChild;return n(a,i),s})()})},get children(){var i=V(),s=i.firstChild;return n(s,()=>e.t("instanceInfo.loading")),i}})),t})(),ie=()=>(()=>{var t=$e();return n(t,z),t})(),B=t=>{const l=m(()=>e.selectedBulkItemIds().has(t.id)),i=t.section==="staged"?e.t("instanceShell.gitChanges.actions.unstage"):e.t("instanceShell.gitChanges.actions.stage"),s=()=>{t.section==="staged"?e.onUnstageFile(t):e.onStageFile(t)};return(()=>{var a=_e(),g=a.firstChild,u=g.firstChild,M=u.firstChild,v=u.nextSibling,$=v.firstChild,C=$.firstChild;C.firstChild;var _=C.nextSibling;_.firstChild;var P=g.nextSibling,f=P.firstChild,y=f.firstChild,k=y.firstChild;return k.firstChild,a.$$click=c=>e.onRowClick(t,c),a.$$mousedown=c=>{(c.shiftKey||c.ctrlKey||c.metaKey)&&c.preventDefault()},n(M,()=>t.path),n(C,()=>t.additions,null),n(_,()=>t.deletions,null),y.$$click=c=>{c.stopPropagation(),s()},b(y,"title",i),b(y,"aria-label",i),n(k,r(w,{get when(){return t.section!=="staged"},get children(){return be()}}),null),L(c=>{var F=`file-list-item git-change-list-item ${e.selectedItemId()===t.id?"file-list-item-active":""} ${l()?"git-change-list-item-bulk-selected":""}`,G=t.path,K=t.path,q=t.path,N=`git-change-row-action-glyph ${t.section==="staged"?"git-change-row-action-glyph-minus":"git-change-row-action-glyph-plus"}`;return F!==c.e&&j(a,c.e=F),G!==c.t&&b(a,"title",c.t=G),K!==c.a&&b(g,"title",c.a=K),q!==c.o&&b(u,"title",c.o=q),N!==c.i&&j(k,c.i=N),c},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),a})()},ae=(t,l,i,s)=>(()=>{var a=Se(),g=a.firstChild,u=g.firstChild,M=u.firstChild,v=M.nextSibling,$=u.nextSibling;return U(g,"click",s,!0),n(M,i?r(J,{class:"h-3.5 w-3.5"}):r(Q,{class:"h-3.5 w-3.5"})),n(v,t),n($,()=>l.length),n(a,r(w,{when:i,get children(){var C=we();return n(C,r(H,{each:l,children:_=>B(_)})),C}}),null),a})(),O=()=>r(w,{get when(){return x.length>0},get fallback(){return ie()},get children(){var t=xe(),l=t.firstChild,i=l.firstChild,s=i.firstChild,a=s.firstChild,g=a.nextSibling,u=g.firstChild,M=s.nextSibling;return U(i,"click",e.onToggleStagedOpen,!0),n(a,(()=>{var v=R(()=>!!e.stagedOpen());return()=>v()?r(J,{class:"h-3.5 w-3.5"}):r(Q,{class:"h-3.5 w-3.5"})})()),n(u,()=>e.t("instanceShell.gitChanges.sections.staged")),n(g,r(w,{get when(){return e.branchLabel()},children:v=>(()=>{var $=Ie(),C=$.firstChild;return n($,r(ve,{class:"w-3.5 h-3.5","aria-hidden":"true"}),C),n(C,v),L(()=>b($,"title",`Branch: ${v()}`)),$})()}),null),n(M,()=>I.length),n(l,r(w,{get when(){return e.stagedOpen()},get children(){var v=ye(),$=v.firstChild,C=$.firstChild,_=C.firstChild,P=_.nextSibling;return _.$$input=f=>e.onCommitMessageInput(f.currentTarget.value),P.$$click=()=>e.onSubmitCommit(),n(P,(()=>{var f=R(()=>!!e.commitSubmitting());return()=>f()?e.t("instanceShell.gitChanges.commit.submitting"):e.t("instanceShell.gitChanges.commit.submit")})()),n(v,r(H,{each:I,children:f=>B(f)}),null),L(f=>{var y=e.t("instanceShell.gitChanges.commit.placeholder"),k=!p();return y!==f.e&&b(_,"placeholder",f.e=y),k!==f.t&&(P.disabled=f.t=k),f},{e:void 0,t:void 0}),L(()=>_.value=e.commitMessage()),v}}),null),n(t,()=>ae(e.t("instanceShell.gitChanges.sections.unstaged"),E,e.unstagedOpen(),e.onToggleUnstagedOpen),null),t}});return r(ge,{get header(){return[(()=>{var t=Me(),l=t.firstChild;return n(l,()=>(d==null?void 0:d.path)||e.t("instanceShell.rightPanel.tabs.gitChanges")),L(()=>b(t,"title",(d==null?void 0:d.path)||e.t("instanceShell.rightPanel.tabs.gitChanges"))),t})(),(()=>{var t=ke(),l=t.firstChild,i=l.firstChild;i.firstChild;var s=l.nextSibling,a=s.firstChild;return a.firstChild,n(i,()=>o.additions,null),n(a,()=>o.deletions,null),n(t,r(w,{get when(){return e.statusError()},children:g=>(()=>{var u=Ee();return n(u,g),u})()}),null),t})(),(()=>{var t=Le();return t.$$click=()=>e.onRefresh(),n(t,r(fe,{get class(){return`h-4 w-4${e.statusLoading()?" animate-spin":""}`}})),L(l=>{var i=e.t("instanceShell.rightPanel.actions.refresh"),s=e.t("instanceShell.rightPanel.actions.refresh"),a=!W()||e.statusLoading()||T()===null;return i!==l.e&&b(t,"title",l.e=i),s!==l.t&&b(t,"aria-label",l.t=s),a!==l.a&&(t.disabled=l.a=a),l},{e:void 0,t:void 0,a:void 0}),t})(),r(de,{get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrapMode(){return e.diffWordWrapMode()},get onViewModeChange(){return e.onViewModeChange},get onContextModeChange(){return e.onContextModeChange},get onWordWrapModeChange(){return e.onWordWrapModeChange}})]},list:{panel:O,overlay:O},get viewer(){return ne()},get listOpen(){return e.listOpen()},get onToggleList(){return e.onToggleList},get splitWidth(){return e.splitWidth()},get onResizeMouseDown(){return e.onResizeMouseDown},get onResizeTouchStart(){return e.onResizeTouchStart},get isPhoneLayout(){return e.isPhoneLayout()},get overlayAriaLabel(){return e.t("instanceShell.rightPanel.tabs.gitChanges")}})})};le(["mousedown","click","input"]);export{qe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as d,i as l,s as m,b as r,m as b,e as _,d as w}from"./monaco-viewer-OXO07Mos.js";import{a as $,n as s,S as n}from"./git-diff-vendor-DaSE45SW.js";import{u as S}from"./index-
|
|
1
|
+
import{t as d,i as l,s as m,b as r,m as b,e as _,d as w}from"./monaco-viewer-OXO07Mos.js";import{a as $,n as s,S as n}from"./git-diff-vendor-DaSE45SW.js";import{u as S}from"./index-Df9_I8zl.js";var y=d("<div class=file-list-overlay role=dialog><div class=file-list-scroll>");const L=e=>(()=>{var t=y(),a=t.firstChild;return l(a,()=>e.children),$(()=>m(t,"aria-label",e.ariaLabel)),t})();var C=d('<div class=files-split><div class=file-list-panel><div class=file-list-scroll></div></div><div class=file-split-handle role=separator aria-orientation=vertical aria-label="Resize file list">'),x=d("<div class=files-tab-container><div class=files-tab-header><div class=files-tab-header-row><button type=button class=files-toggle-button></button></div></div><div class=files-tab-body>");const z=e=>{const{t}=S();return(()=>{var a=x(),c=a.firstChild,o=c.firstChild,u=o.firstChild,h=c.nextSibling;return r(u,"click",e.onToggleList,!0),l(u,(()=>{var i=b(()=>!!e.listOpen);return()=>i()?t("instanceShell.filesShell.hideFiles"):t("instanceShell.filesShell.showFiles")})()),l(o,()=>e.header,null),l(h,s(n,{get when(){return b(()=>!e.isPhoneLayout)()&&e.listOpen},get fallback(){return e.viewer},get children(){var i=C(),v=i.firstChild,g=v.firstChild,f=v.nextSibling;return l(g,()=>e.list.panel()),r(f,"touchstart",e.onResizeTouchStart,!0),r(f,"mousedown",e.onResizeMouseDown,!0),l(i,()=>e.viewer,null),$(O=>_(i,"--files-pane-width",`${e.splitWidth}px`)),i}}),null),l(h,s(n,{get when(){return e.isPhoneLayout},get children(){return s(n,{get when(){return e.listOpen},get children(){return s(L,{get ariaLabel(){return e.overlayAriaLabel},get children(){return e.list.overlay()}})}})}}),null),a})()};w(["click","mousedown","touchstart"]);export{z as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as $e,P as Ye,t as E,i as f,c as Je,u as Qe,b as ke,s as M,d as Ze}from"./monaco-viewer-OXO07Mos.js";import{n as c,m as P,b as O,o as $,k as te,l as ne,q as ue,s as A,d as D,c as z,S as ee,t as et,A as Ie,a as ae,F as he}from"./git-diff-vendor-DaSE45SW.js";import{I as ge,c as tt,m as B,f as ce,h as nt,i as ot,P as De,j as Oe,k as _e,l as st,n as me,o as de,p as fe,q as Me,t as oe,u as se,D as it,v as ve,w as rt,x as lt,y as R,_ as ye,B as at,z as ct,A as dt,E as L,G as ut,H as gt,J as Te,K as ft,C as pt,L as be,M as ht,N as mt,O as bt,T as vt}from"./main-B6hz2k5O.js";import{u as yt}from"./index-BrwpCfJK.js";import{T as xt}from"./todo-90kr3HS1.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./core-DhEqZVGG.js";import"./index-Bsb7z85O.js";const Ct=[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}]],wt=e=>c(ge,P(e,{name:"BellRing",iconNode:Ct})),St=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Pt=e=>c(ge,P(e,{name:"Info",iconNode:St})),kt=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],It=e=>c(ge,P(e,{name:"TerminalSquare",iconNode:kt})),Tt=[["polygon",{points:"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2",key:"h1p8hx"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],$t=e=>c(ge,P(e,{name:"XOctagon",iconNode:Tt}));var Ee=te();function Dt(){return ne(Ee)}function Ot(){const e=Dt();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function Ae(e,o){return!!(o.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function _t(e,o){var t;const r=o.ref();if(!r)return-1;let i=e.length;if(!i)return-1;for(;i--;){const n=(t=e[i])==null?void 0:t.ref();if(n&&Ae(n,r))return i+1}return 0}function Mt(e){const o=e.map((i,t)=>[t,i]);let r=!1;return o.sort(([i,t],[n,s])=>{const l=t.ref(),m=s.ref();return l===m||!l||!m?0:Ae(l,m)?(i>n&&(r=!0),-1):(i<n&&(r=!0),1)}),r?o.map(([i,t])=>t):e}function Fe(e,o){const r=Mt(e);e!==r&&o(r)}function Et(e){var t,n;const o=e[0],r=(t=e[e.length-1])==null?void 0:t.ref();let i=(n=o==null?void 0:o.ref())==null?void 0:n.parentElement;for(;i;){if(r&&i.contains(r))return i;i=i.parentElement}return ce(i).body}function At(e,o){O(()=>{const r=setTimeout(()=>{Fe(e(),o)});$(()=>clearTimeout(r))})}function Ft(e,o){if(typeof IntersectionObserver!="function"){At(e,o);return}let r=[];O(()=>{const i=()=>{const s=!!r.length;r=e(),s&&Fe(e(),o)},t=Et(e()),n=new IntersectionObserver(i,{root:t});for(const s of e()){const l=s.ref();l&&n.observe(l)}$(()=>n.disconnect())})}function Kt(e={}){const[o,r]=tt({value:()=>ot(e.items),onChange:n=>{var s;return(s=e.onItemsChange)==null?void 0:s.call(e,n)}});Ft(o,r);const i=n=>(r(s=>{const l=_t(s,n);return nt(s,n,l)}),()=>{r(s=>{const l=s.filter(m=>m.ref()!==n.ref());return s.length===l.length?s:l})});return{DomCollectionProvider:n=>c(Ee.Provider,{value:{registerItem:i},get children(){return n.children}})}}function Rt(e){const o=Ot(),r=B({shouldRegisterItem:!0},e);O(()=>{if(!r.shouldRegisterItem)return;const i=o.registerItem(r.getItem());$(i)})}var Lt={};ye(Lt,{Arrow:()=>De,Content:()=>Re,Portal:()=>Le,Root:()=>Be,Tooltip:()=>Z,Trigger:()=>He,useTooltipContext:()=>pe});var Ke=te();function pe(){const e=ne(Ke);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function Re(e){const o=pe(),r=B({id:o.generateId("content")},e),[i,t]=A(r,["ref","style"]);return O(()=>$(o.registerContentId(t.id))),c(ee,{get when(){return o.contentPresent()},get children(){return c(Me.Positioner,{get children(){return c(it,P({ref(n){var s=oe(l=>{o.setContentRef(l)},i.ref);typeof s=="function"&&s(n)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return ve({"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},i.style)},onFocusOutside:n=>n.preventDefault(),onDismiss:()=>o.hideTooltip(!0)},()=>o.dataset(),t))}})}})}function Le(e){const o=pe();return c(ee,{get when(){return o.contentPresent()},get children(){return c(Ye,e)}})}function Bt(e,o,r){const i=e.split("-")[0],t=o.getBoundingClientRect(),n=r.getBoundingClientRect(),s=[],l=t.left+t.width/2,m=t.top+t.height/2;switch(i){case"top":s.push([t.left,m]),s.push([n.left,n.bottom]),s.push([n.left,n.top]),s.push([n.right,n.top]),s.push([n.right,n.bottom]),s.push([t.right,m]);break;case"right":s.push([l,t.top]),s.push([n.left,n.top]),s.push([n.right,n.top]),s.push([n.right,n.bottom]),s.push([n.left,n.bottom]),s.push([l,t.bottom]);break;case"bottom":s.push([t.left,m]),s.push([n.left,n.top]),s.push([n.left,n.bottom]),s.push([n.right,n.bottom]),s.push([n.right,n.top]),s.push([t.right,m]);break;case"left":s.push([l,t.top]),s.push([n.right,n.top]),s.push([n.left,n.top]),s.push([n.left,n.bottom]),s.push([n.right,n.bottom]),s.push([l,t.bottom]);break}return s}var q={},Ht=0,X=!1,K,Q,Y;function Be(e){const o=`tooltip-${ue()}`,r=`${++Ht}`,i=B({id:o,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[t,n]=A(i,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount"]);let s;const[l,m]=D(),[b,C]=D(),[d,g]=D(),[a,v]=D(n.placement),u=Oe({open:()=>t.open,defaultOpen:()=>t.defaultOpen,onOpenChange:h=>{var S;return(S=t.onOpenChange)==null?void 0:S.call(t,h)}}),{present:x}=_e({show:()=>t.forceMount||u.isOpen(),element:()=>d()??null}),y=()=>{q[r]=I},w=()=>{for(const h in q)h!==r&&(q[h](!0),delete q[h])},I=(h=!1)=>{h||t.closeDelay&&t.closeDelay<=0?(window.clearTimeout(s),s=void 0,u.close()):s||(s=window.setTimeout(()=>{s=void 0,u.close()},t.closeDelay)),window.clearTimeout(K),K=void 0,t.skipDelayDuration&&t.skipDelayDuration>=0&&(Y=window.setTimeout(()=>{window.clearTimeout(Y),Y=void 0},t.skipDelayDuration)),X&&(window.clearTimeout(Q),Q=window.setTimeout(()=>{delete q[r],Q=void 0,X=!1},t.closeDelay))},N=()=>{clearTimeout(s),s=void 0,w(),y(),X=!0,u.open(),window.clearTimeout(K),K=void 0,window.clearTimeout(Q),Q=void 0,window.clearTimeout(Y),Y=void 0},F=()=>{w(),y(),!u.isOpen()&&!K&&!X?K=window.setTimeout(()=>{K=void 0,X=!0,N()},t.openDelay):u.isOpen()||N()},_=(h=!1)=>{!h&&t.openDelay&&t.openDelay>0&&!s&&!Y?F():N()},T=()=>{window.clearTimeout(K),K=void 0,X=!1},p=()=>{window.clearTimeout(s),s=void 0},U=h=>me(b(),h)||me(d(),h),H=h=>{const S=b(),k=d();if(!(!S||!k))return Bt(h,S,k)},j=h=>{const S=h.target;if(U(S)){p();return}if(!t.ignoreSafeArea){const k=H(a());if(k&&rt(lt(h),k)){p();return}}s||I()};O(()=>{if(!u.isOpen())return;const h=ce();h.addEventListener("pointermove",j,!0),$(()=>{h.removeEventListener("pointermove",j,!0)})}),O(()=>{const h=b();if(!h||!u.isOpen())return;const S=re=>{const le=re.target;me(le,h)&&I(!0)},k=st();k.addEventListener("scroll",S,{capture:!0}),$(()=>{k.removeEventListener("scroll",S,{capture:!0})})}),$(()=>{clearTimeout(s),q[r]&&delete q[r]});const G={dataset:z(()=>({"data-expanded":u.isOpen()?"":void 0,"data-closed":u.isOpen()?void 0:""})),isOpen:u.isOpen,isDisabled:()=>t.disabled??!1,triggerOnFocusOnly:()=>t.triggerOnFocusOnly??!1,contentId:l,contentPresent:x,openTooltip:_,hideTooltip:I,cancelOpening:T,generateId:fe(()=>i.id),registerContentId:de(m),isTargetOnTooltip:U,setTriggerRef:C,setContentRef:g};return c(Ke.Provider,{value:G,get children(){return c(Me,P({anchorRef:b,contentRef:d,onCurrentPlacementChange:v},n))}})}function He(e){let o;const r=pe(),[i,t]=A(e,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur"]);let n=!1,s=!1,l=!1;const m=()=>{n=!1},b=()=>{!r.isOpen()&&(s||l)&&r.openTooltip(l)},C=y=>{r.isOpen()&&!s&&!l&&r.hideTooltip(y)},d=y=>{R(y,i.onPointerEnter),!(y.pointerType==="touch"||r.triggerOnFocusOnly()||r.isDisabled()||y.defaultPrevented)&&(s=!0,b())},g=y=>{R(y,i.onPointerLeave),y.pointerType!=="touch"&&(s=!1,l=!1,r.isOpen()?C():r.cancelOpening())},a=y=>{R(y,i.onPointerDown),n=!0,ce(o).addEventListener("pointerup",m,{once:!0})},v=y=>{R(y,i.onClick),s=!1,l=!1,C(!0)},u=y=>{R(y,i.onFocus),!(r.isDisabled()||y.defaultPrevented||n)&&(l=!0,b())},x=y=>{R(y,i.onBlur);const w=y.relatedTarget;r.isTargetOnTooltip(w)||(s=!1,l=!1,C(!0))};return $(()=>{ce(o).removeEventListener("pointerup",m)}),c(se,P({as:"button",ref(y){var w=oe(I=>{r.setTriggerRef(I),o=I},i.ref);typeof w=="function"&&w(y)},get"aria-describedby"(){return $e(()=>!!r.isOpen())()?r.contentId():void 0},onPointerEnter:d,onPointerLeave:g,onPointerDown:a,onClick:v,onFocus:u,onBlur:x},()=>r.dataset(),t))}var Z=Object.assign(Be,{Arrow:De,Content:Re,Portal:Le,Trigger:He}),Nt={};ye(Nt,{Collapsible:()=>Ut,Content:()=>xe,Root:()=>Ce,Trigger:()=>we,useCollapsibleContext:()=>ie});var Ne=te();function ie(){const e=ne(Ne);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function xe(e){const[o,r]=D(),i=ie(),t=B({id:i.generateId("content")},e),[n,s]=A(t,["ref","id","style"]),{present:l}=_e({show:i.shouldMount,element:()=>o()??null}),[m,b]=D(0),[C,d]=D(0);let a=i.isOpen()||l();return et(()=>{const v=requestAnimationFrame(()=>{a=!1});$(()=>{cancelAnimationFrame(v)})}),O(Ie(l,()=>{if(!o())return;o().style.transitionDuration="0s",o().style.animationName="none";const v=o().getBoundingClientRect();b(v.height),d(v.width),a||(o().style.transitionDuration="",o().style.animationName="")})),O(Ie(i.isOpen,v=>{!v&&o()&&(o().style.transitionDuration="",o().style.animationName="")},{defer:!0})),O(()=>$(i.registerContentId(n.id))),c(ee,{get when(){return l()},get children(){return c(se,P({as:"div",ref(v){var u=oe(r,n.ref);typeof u=="function"&&u(v)},get id(){return n.id},get style(){return ve({"--kb-collapsible-content-height":m()?`${m()}px`:void 0,"--kb-collapsible-content-width":C()?`${C()}px`:void 0},n.style)}},()=>i.dataset(),s))}})}function Ce(e){const o=`collapsible-${ue()}`,r=B({id:o},e),[i,t]=A(r,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[n,s]=D(),l=Oe({open:()=>i.open,defaultOpen:()=>i.defaultOpen,onOpenChange:C=>{var d;return(d=i.onOpenChange)==null?void 0:d.call(i,C)}}),m=z(()=>({"data-expanded":l.isOpen()?"":void 0,"data-closed":l.isOpen()?void 0:"","data-disabled":i.disabled?"":void 0})),b={dataset:m,isOpen:l.isOpen,disabled:()=>i.disabled??!1,shouldMount:()=>i.forceMount||l.isOpen(),contentId:n,toggle:l.toggle,generateId:fe(()=>t.id),registerContentId:de(s)};return c(Ne.Provider,{value:b,get children(){return c(se,P({as:"div"},m,t))}})}function we(e){const o=ie(),[r,i]=A(e,["onClick"]);return c(at,P({get"aria-expanded"(){return o.isOpen()},get"aria-controls"(){return $e(()=>!!o.isOpen())()?o.contentId():void 0},get disabled(){return o.disabled()},onClick:n=>{R(n,r.onClick),o.toggle()}},()=>o.dataset(),i))}var Ut=Object.assign(Ce,{Content:xe,Trigger:we}),J={};ye(J,{Accordion:()=>jt,Content:()=>qe,Header:()=>We,Item:()=>Ve,Root:()=>Ge,Trigger:()=>Xe,useAccordionContext:()=>Se});var Ue=te();function je(){const e=ne(Ue);if(e===void 0)throw new Error("[kobalte]: `useAccordionItemContext` must be used within a `Accordion.Item` component");return e}function qe(e){const o=je(),r=o.generateId("content"),i=B({id:r},e),[t,n]=A(i,["id","style"]);return O(()=>$(o.registerContentId(t.id))),c(xe,P({role:"region",get"aria-labelledby"(){return o.triggerId()},get style(){return ve({"--kb-accordion-content-height":"var(--kb-collapsible-content-height)","--kb-accordion-content-width":"var(--kb-collapsible-content-width)"},t.style)}},n))}function We(e){const o=ie();return c(se,P({as:"h3"},()=>o.dataset(),e))}var ze=te();function Se(){const e=ne(ze);if(e===void 0)throw new Error("[kobalte]: `useAccordionContext` must be used within a `Accordion.Root` component");return e}function Ve(e){const o=Se(),r=`${o.generateId("item")}-${ue()}`,i=B({id:r},e),[t,n]=A(i,["value","disabled"]),[s,l]=D(),[m,b]=D(),C=()=>o.listState().selectionManager(),d=()=>C().isSelected(t.value),g={value:()=>t.value,triggerId:s,contentId:m,generateId:fe(()=>n.id),registerTriggerId:de(l),registerContentId:de(b)};return c(Ue.Provider,{value:g,get children(){return c(Ce,P({get open(){return d()},get disabled(){return t.disabled}},n))}})}function Ge(e){let o;const r=`accordion-${ue()}`,i=B({id:r,multiple:!1,collapsible:!1,shouldFocusWrap:!0},e),[t,n]=A(i,["id","ref","value","defaultValue","onChange","multiple","collapsible","shouldFocusWrap","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),[s,l]=D([]),{DomCollectionProvider:m}=Kt({items:s,onItemsChange:l}),b=ct({selectedKeys:()=>t.value,defaultSelectedKeys:()=>t.defaultValue,onSelectionChange:g=>{var a;return(a=t.onChange)==null?void 0:a.call(t,Array.from(g))},disallowEmptySelection:()=>!t.multiple&&!t.collapsible,selectionMode:()=>t.multiple?"multiple":"single",dataSource:s});b.selectionManager().setFocusedKey("item-1");const C=dt({selectionManager:()=>b.selectionManager(),collection:()=>b.collection(),disallowEmptySelection:()=>b.selectionManager().disallowEmptySelection(),shouldFocusWrap:()=>t.shouldFocusWrap,disallowTypeAhead:!0,allowsTabNavigation:!0},()=>o),d={listState:()=>b,generateId:fe(()=>t.id)};return c(m,{get children(){return c(ze.Provider,{value:d,get children(){return c(se,P({as:"div",get id(){return t.id},ref(g){var a=oe(v=>o=v,t.ref);typeof a=="function"&&a(g)},get onKeyDown(){return L([t.onKeyDown,C.onKeyDown])},get onMouseDown(){return L([t.onMouseDown,C.onMouseDown])},get onFocusIn(){return L([t.onFocusIn])},get onFocusOut(){return L([t.onFocusOut,C.onFocusOut])}},n))}})}})}function Xe(e){let o;const r=Se(),i=je(),t=ie(),n=i.generateId("trigger"),s=B({id:n},e),[l,m]=A(s,["ref","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);Rt({getItem:()=>({ref:()=>o,type:"item",key:i.value(),textValue:"",disabled:t.disabled()})});const b=ut({key:()=>i.value(),selectionManager:()=>r.listState().selectionManager(),disabled:()=>t.disabled(),shouldSelectOnPressUp:!0},()=>o),C=d=>{["Enter"," "].includes(d.key)&&d.preventDefault(),R(d,l.onKeyDown),R(d,b.onKeyDown)};return O(()=>$(i.registerTriggerId(m.id))),c(we,P({ref(d){var g=oe(a=>o=a,l.ref);typeof g=="function"&&g(d)},get"data-key"(){return b.dataKey()},get onPointerDown(){return L([l.onPointerDown,b.onPointerDown])},get onPointerUp(){return L([l.onPointerUp,b.onPointerUp])},get onClick(){return L([l.onClick,b.onClick])},onKeyDown:C,get onMouseDown(){return L([l.onMouseDown,b.onMouseDown])},get onFocus(){return L([l.onFocus,b.onFocus])}},m))}var jt=Object.assign(Ge,{Content:qe,Header:We,Item:Ve,Trigger:Xe}),qt=E('<div><div class="flex flex-wrap items-center gap-2 text-xs text-primary"><div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary"></span></div><div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary"></span></div><div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary">');const Wt=e=>{const{t:o}=yt(),r=z(()=>gt(e.instanceId,e.sessionId)??{cost:0,contextWindow:0,isSubscriptionModel:!1,inputTokens:0,outputTokens:0,reasoningTokens:0,actualUsageTokens:0,modelOutputLimit:0,contextAvailableTokens:null}),i=z(()=>r().inputTokens??0),t=z(()=>r().outputTokens??0),n=z(()=>{const l=r().isSubscriptionModel?0:r().cost;return l>0?l:0}),s=z(()=>`$${n().toFixed(2)}`);return(()=>{var l=qt(),m=l.firstChild,b=m.firstChild,C=b.firstChild,d=C.nextSibling,g=b.nextSibling,a=g.firstChild,v=a.nextSibling,u=g.nextSibling,x=u.firstChild,y=x.nextSibling;return f(C,()=>o("contextUsagePanel.labels.input")),f(d,()=>Te(i())),f(a,()=>o("contextUsagePanel.labels.output")),f(v,()=>Te(t())),f(x,()=>o("contextUsagePanel.labels.cost")),f(y,s),ae(()=>Je(l,`session-context-panel px-4 py-2 ${e.class??""}`)),l})()};var W=E('<div class="right-panel-empty right-panel-empty--left"><span class=text-xs>'),zt=E('<div class="rounded-md border border-base bg-surface-secondary px-3 py-2"><div class="flex items-start justify-between gap-3"><div class=min-w-0><div class="text-sm font-medium text-primary"></div><p class="mt-1 text-xs text-secondary">'),Vt=E('<div class="flex flex-col gap-3 min-h-0"><div class="flex items-center justify-between gap-2 text-[11px] text-secondary"><span></span><span class="flex items-center gap-2"><span style=color:var(--session-status-idle-fg)></span><span style=color:var(--session-status-working-fg)></span></span></div><div class="session-changes-scroll rounded-md border border-base bg-surface-secondary p-2 max-h-[40vh] overflow-y-auto"><div class="flex flex-col">'),Gt=E('<button type=button class="border-b border-base last:border-b-0 text-left hover:bg-surface-muted rounded-sm"><div class="flex items-center justify-between gap-3"><div class="text-xs font-mono text-primary min-w-0 flex-1 overflow-hidden whitespace-nowrap"style=text-overflow:ellipsis;direction:rtl;text-align:left;unicode-bidi:plaintext></div><div class="flex items-center gap-2 text-[11px] flex-shrink-0"><span style=color:var(--session-status-idle-fg)></span><span style=color:var(--session-status-working-fg)>'),Xt=E('<div class="flex flex-col gap-2">'),Yt=E("<span>"),Jt=E('<div class=status-process-card><div class=status-process-header><span class=status-process-title></span><div class=status-process-meta><span></span><span></span></div></div><div class=status-process-actions><button type=button class="button-tertiary w-full p-1 inline-flex items-center justify-center"></button><button type=button class="button-tertiary w-full p-1 inline-flex items-center justify-center"></button><button type=button class="button-tertiary w-full p-1 inline-flex items-center justify-center">'),Qt=E("<div class=status-tab-container>"),Zt=E("<span class=section-left><span class=section-label>");const dn=e=>{let o;const{isHovered:r,handleMouseEnter:i,handleMouseLeave:t}=ft(()=>o),n=d=>e.expandedItems().includes(d),C=[{id:"yolo-mode",labelKey:"instanceShell.rightPanel.sections.yoloMode",tooltipKey:"instanceShell.rightPanel.sections.yoloMode.tooltip",render:()=>{const d=e.activeSession();return d?(()=>{var g=zt(),a=g.firstChild,v=a.firstChild,u=v.firstChild,x=u.nextSibling;return f(u,()=>e.t("instanceShell.yoloMode.title")),f(x,()=>e.t("instanceShell.yoloMode.description")),f(a,c(bt,{get checked(){return mt(e.instanceId,d.id)},color:"warning",size:"small",get inputProps(){return{"aria-label":e.t("instanceShell.yoloMode.title")}},onChange:()=>ht(e.instanceId,d.id)}),null),g})():(()=>{var g=W(),a=g.firstChild;return f(a,()=>e.t("instanceShell.yoloMode.noSessionSelected")),g})()}},{id:"session-changes",labelKey:"instanceShell.rightPanel.sections.sessionChanges",tooltipKey:"instanceShell.rightPanel.sections.sessionChanges.tooltip",render:()=>{const d=e.activeSessionId();if(!d||d==="info")return(()=>{var u=W(),x=u.firstChild;return f(x,()=>e.t("instanceShell.sessionChanges.noSessionSelected")),u})();const g=e.activeSessionDiffs();if(g===void 0)return(()=>{var u=W(),x=u.firstChild;return f(x,()=>e.t("instanceShell.sessionChanges.loading")),u})();if(!Array.isArray(g)||g.length===0)return(()=>{var u=W(),x=u.firstChild;return f(x,()=>e.t("instanceShell.sessionChanges.empty")),u})();const a=[...g].sort((u,x)=>String(u.file||"").localeCompare(String(x.file||""))),v=a.reduce((u,x)=>(u.additions+=typeof x.additions=="number"?x.additions:0,u.deletions+=typeof x.deletions=="number"?x.deletions:0,u),{additions:0,deletions:0});return(()=>{var u=Vt(),x=u.firstChild,y=x.firstChild,w=y.nextSibling,I=w.firstChild,N=I.nextSibling,F=x.nextSibling,_=F.firstChild;return f(y,()=>e.t("instanceShell.sessionChanges.filesChanged",{count:a.length})),f(I,()=>`+${v.additions}`),f(N,()=>`-${v.deletions}`),f(_,c(he,{each:a,children:T=>(()=>{var p=Gt(),U=p.firstChild,H=U.firstChild,j=H.nextSibling,V=j.firstChild,G=V.nextSibling;return p.$$click=()=>e.onOpenChangesTab(T.file),f(H,()=>T.file),f(V,()=>`+${T.additions}`),f(G,()=>`-${T.deletions}`),ae(h=>{var S=e.t("instanceShell.sessionChanges.actions.show"),k=T.file;return S!==h.e&&M(p,"title",h.e=S),k!==h.t&&M(H,"title",h.t=k),h},{e:void 0,t:void 0}),p})()})),u})()}},{id:"plan",labelKey:"instanceShell.rightPanel.sections.plan",tooltipKey:"instanceShell.rightPanel.sections.plan.tooltip",render:()=>{const d=e.activeSessionId();if(!d||d==="info")return(()=>{var a=W(),v=a.firstChild;return f(v,()=>e.t("instanceShell.plan.noSessionSelected")),a})();const g=e.latestTodoState();return g?c(xt,{state:g,get emptyLabel(){return e.t("instanceShell.plan.empty")},showStatusLabel:!1}):(()=>{var a=W(),v=a.firstChild;return f(v,()=>e.t("instanceShell.plan.empty")),a})()}},{id:"background-processes",labelKey:"instanceShell.rightPanel.sections.backgroundProcesses",tooltipKey:"instanceShell.rightPanel.sections.backgroundProcesses.tooltip",render:()=>{const d=e.backgroundProcessList();return d.length===0?(()=>{var g=W(),a=g.firstChild;return f(a,()=>e.t("instanceShell.backgroundProcesses.empty")),g})():(()=>{var g=Xt();return f(g,c(he,{each:d,children:a=>(()=>{var v=Jt(),u=v.firstChild,x=u.firstChild,y=x.nextSibling,w=y.firstChild,I=w.nextSibling,N=u.nextSibling,F=N.firstChild,_=F.nextSibling,T=_.nextSibling;return f(x,()=>a.title),f(w,c(wt,{class:"h-3.5 w-3.5"})),f(I,()=>e.t("instanceShell.backgroundProcesses.status",{status:a.status})),f(y,c(ee,{get when(){return typeof a.outputSizeBytes=="number"},get children(){var p=Yt();return f(p,()=>e.t("instanceShell.backgroundProcesses.output",{sizeKb:Math.round((a.outputSizeBytes??0)/1024)})),p}}),null),F.$$click=()=>e.onOpenBackgroundOutput(a),f(F,c(It,{class:"h-4 w-4"})),_.$$click=()=>e.onStopBackgroundProcess(a.id),f(_,c($t,{class:"h-4 w-4"})),T.$$click=()=>e.onTerminateBackgroundProcess(a.id),f(T,c(vt,{class:"h-4 w-4"})),ae(p=>{var U=!!a.notifyEnabled,H=!a.notifyEnabled,j=e.t(a.notifyEnabled?"instanceShell.backgroundProcesses.notify.enabled":"instanceShell.backgroundProcesses.notify.disabled"),V=e.t(a.notifyEnabled?"instanceShell.backgroundProcesses.notify.enabled":"instanceShell.backgroundProcesses.notify.disabled"),G=e.t("instanceShell.backgroundProcesses.actions.output"),h=e.t("instanceShell.backgroundProcesses.actions.output"),S=a.status!=="running",k=e.t("instanceShell.backgroundProcesses.actions.stop"),re=e.t("instanceShell.backgroundProcesses.actions.stop"),le=e.t("instanceShell.backgroundProcesses.actions.terminate"),Pe=e.t("instanceShell.backgroundProcesses.actions.terminate");return U!==p.e&&w.classList.toggle("text-success",p.e=U),H!==p.t&&w.classList.toggle("text-tertiary",p.t=H),j!==p.a&&M(w,"aria-label",p.a=j),V!==p.o&&M(w,"title",p.o=V),G!==p.i&&M(F,"aria-label",p.i=G),h!==p.n&&M(F,"title",p.n=h),S!==p.s&&(_.disabled=p.s=S),k!==p.h&&M(_,"aria-label",p.h=k),re!==p.r&&M(_,"title",p.r=re),le!==p.d&&M(T,"aria-label",p.d=le),Pe!==p.l&&M(T,"title",p.l=Pe),p},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0}),v})()})),g})()}},{id:"mcp",labelKey:"instanceShell.rightPanel.sections.mcp",tooltipKey:"instanceShell.rightPanel.sections.mcp.tooltip",render:()=>c(be,{get initialInstance(){return e.instance},sections:["mcp"],showSectionHeadings:!1,class:"space-y-2"})},{id:"lsp",labelKey:"instanceShell.rightPanel.sections.lsp",tooltipKey:"instanceShell.rightPanel.sections.lsp.tooltip",render:()=>c(be,{get initialInstance(){return e.instance},sections:["lsp"],showSectionHeadings:!1,class:"space-y-2"})},{id:"plugins",labelKey:"instanceShell.rightPanel.sections.plugins",tooltipKey:"instanceShell.rightPanel.sections.plugins.tooltip",render:()=>c(be,{get initialInstance(){return e.instance},sections:["plugins"],showSectionHeadings:!1,class:"space-y-2"})}];return(()=>{var d=Qt(),g=o;return typeof g=="function"?Qe(g,d):o=d,ke(d,"mouseleave",t),ke(d,"mouseenter",i),f(d,c(ee,{get when(){return e.activeSession()},children:a=>c(Wt,{get instanceId(){return e.instanceId},get sessionId(){return a().id},class:"status-tab-context-panel"})}),null),f(d,c(J.Root,{class:"right-panel-accordion",collapsible:!0,multiple:!0,get value(){return e.expandedItems()},get onChange(){return e.onExpandedItemsChange},get children(){return c(he,{each:C,children:a=>c(J.Item,{get value(){return a.id},class:"right-panel-accordion-item",get children(){return[c(J.Header,{class:"right-panel-accordion-header-row",get children(){return[c(J.Trigger,{class:"right-panel-accordion-trigger",get children(){return[(()=>{var v=Zt(),u=v.firstChild;return f(u,()=>e.t(a.labelKey)),v})(),c(pt,{get class(){return`right-panel-accordion-chevron ${n(a.id)?"right-panel-accordion-chevron-expanded":""}`}})]}}),c(Z,{openDelay:200,gutter:4,placement:"top",get children(){return[c(Z.Trigger,{as:"button",type:"button",class:"section-info-trigger",get"aria-label"(){return e.t(a.tooltipKey)},get children(){return c(Pt,{class:"section-info-icon"})}}),c(Z.Portal,{get children(){return c(Z.Content,{class:"section-info-tooltip",get children(){return e.t(a.tooltipKey)}})}})]}})]}}),c(J.Content,{class:"right-panel-accordion-content",get children(){return a.render()}})]}})})}}),null),ae(()=>d.classList.toggle("status-tab-container--scroll-hover",!!r())),d})()};Ze(["click"]);export{dn as default};
|
|
1
|
+
import{m as $e,P as Ye,t as E,i as f,c as Je,u as Qe,b as ke,s as M,d as Ze}from"./monaco-viewer-OXO07Mos.js";import{n as c,m as P,b as O,o as $,k as te,l as ne,q as ue,s as A,d as D,c as z,S as ee,t as et,A as Ie,a as ae,F as he}from"./git-diff-vendor-DaSE45SW.js";import{I as ge,c as tt,m as B,f as ce,h as nt,i as ot,P as De,j as Oe,k as _e,l as st,n as me,o as de,p as fe,q as Me,t as oe,u as se,D as it,v as ve,w as rt,x as lt,y as R,_ as ye,B as at,z as ct,A as dt,E as L,G as ut,H as gt,J as Te,K as ft,C as pt,L as be,M as ht,N as mt,O as bt,T as vt}from"./main-CkkkdN2F.js";import{u as yt}from"./index-Df9_I8zl.js";import{T as xt}from"./todo-BE1jT24j.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./core-DhEqZVGG.js";import"./index-Bsb7z85O.js";const Ct=[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}]],wt=e=>c(ge,P(e,{name:"BellRing",iconNode:Ct})),St=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Pt=e=>c(ge,P(e,{name:"Info",iconNode:St})),kt=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],It=e=>c(ge,P(e,{name:"TerminalSquare",iconNode:kt})),Tt=[["polygon",{points:"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2",key:"h1p8hx"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],$t=e=>c(ge,P(e,{name:"XOctagon",iconNode:Tt}));var Ee=te();function Dt(){return ne(Ee)}function Ot(){const e=Dt();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function Ae(e,o){return!!(o.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function _t(e,o){var t;const r=o.ref();if(!r)return-1;let i=e.length;if(!i)return-1;for(;i--;){const n=(t=e[i])==null?void 0:t.ref();if(n&&Ae(n,r))return i+1}return 0}function Mt(e){const o=e.map((i,t)=>[t,i]);let r=!1;return o.sort(([i,t],[n,s])=>{const l=t.ref(),m=s.ref();return l===m||!l||!m?0:Ae(l,m)?(i>n&&(r=!0),-1):(i<n&&(r=!0),1)}),r?o.map(([i,t])=>t):e}function Fe(e,o){const r=Mt(e);e!==r&&o(r)}function Et(e){var t,n;const o=e[0],r=(t=e[e.length-1])==null?void 0:t.ref();let i=(n=o==null?void 0:o.ref())==null?void 0:n.parentElement;for(;i;){if(r&&i.contains(r))return i;i=i.parentElement}return ce(i).body}function At(e,o){O(()=>{const r=setTimeout(()=>{Fe(e(),o)});$(()=>clearTimeout(r))})}function Ft(e,o){if(typeof IntersectionObserver!="function"){At(e,o);return}let r=[];O(()=>{const i=()=>{const s=!!r.length;r=e(),s&&Fe(e(),o)},t=Et(e()),n=new IntersectionObserver(i,{root:t});for(const s of e()){const l=s.ref();l&&n.observe(l)}$(()=>n.disconnect())})}function Kt(e={}){const[o,r]=tt({value:()=>ot(e.items),onChange:n=>{var s;return(s=e.onItemsChange)==null?void 0:s.call(e,n)}});Ft(o,r);const i=n=>(r(s=>{const l=_t(s,n);return nt(s,n,l)}),()=>{r(s=>{const l=s.filter(m=>m.ref()!==n.ref());return s.length===l.length?s:l})});return{DomCollectionProvider:n=>c(Ee.Provider,{value:{registerItem:i},get children(){return n.children}})}}function Rt(e){const o=Ot(),r=B({shouldRegisterItem:!0},e);O(()=>{if(!r.shouldRegisterItem)return;const i=o.registerItem(r.getItem());$(i)})}var Lt={};ye(Lt,{Arrow:()=>De,Content:()=>Re,Portal:()=>Le,Root:()=>Be,Tooltip:()=>Z,Trigger:()=>He,useTooltipContext:()=>pe});var Ke=te();function pe(){const e=ne(Ke);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function Re(e){const o=pe(),r=B({id:o.generateId("content")},e),[i,t]=A(r,["ref","style"]);return O(()=>$(o.registerContentId(t.id))),c(ee,{get when(){return o.contentPresent()},get children(){return c(Me.Positioner,{get children(){return c(it,P({ref(n){var s=oe(l=>{o.setContentRef(l)},i.ref);typeof s=="function"&&s(n)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return ve({"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},i.style)},onFocusOutside:n=>n.preventDefault(),onDismiss:()=>o.hideTooltip(!0)},()=>o.dataset(),t))}})}})}function Le(e){const o=pe();return c(ee,{get when(){return o.contentPresent()},get children(){return c(Ye,e)}})}function Bt(e,o,r){const i=e.split("-")[0],t=o.getBoundingClientRect(),n=r.getBoundingClientRect(),s=[],l=t.left+t.width/2,m=t.top+t.height/2;switch(i){case"top":s.push([t.left,m]),s.push([n.left,n.bottom]),s.push([n.left,n.top]),s.push([n.right,n.top]),s.push([n.right,n.bottom]),s.push([t.right,m]);break;case"right":s.push([l,t.top]),s.push([n.left,n.top]),s.push([n.right,n.top]),s.push([n.right,n.bottom]),s.push([n.left,n.bottom]),s.push([l,t.bottom]);break;case"bottom":s.push([t.left,m]),s.push([n.left,n.top]),s.push([n.left,n.bottom]),s.push([n.right,n.bottom]),s.push([n.right,n.top]),s.push([t.right,m]);break;case"left":s.push([l,t.top]),s.push([n.right,n.top]),s.push([n.left,n.top]),s.push([n.left,n.bottom]),s.push([n.right,n.bottom]),s.push([l,t.bottom]);break}return s}var q={},Ht=0,X=!1,K,Q,Y;function Be(e){const o=`tooltip-${ue()}`,r=`${++Ht}`,i=B({id:o,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[t,n]=A(i,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount"]);let s;const[l,m]=D(),[b,C]=D(),[d,g]=D(),[a,v]=D(n.placement),u=Oe({open:()=>t.open,defaultOpen:()=>t.defaultOpen,onOpenChange:h=>{var S;return(S=t.onOpenChange)==null?void 0:S.call(t,h)}}),{present:x}=_e({show:()=>t.forceMount||u.isOpen(),element:()=>d()??null}),y=()=>{q[r]=I},w=()=>{for(const h in q)h!==r&&(q[h](!0),delete q[h])},I=(h=!1)=>{h||t.closeDelay&&t.closeDelay<=0?(window.clearTimeout(s),s=void 0,u.close()):s||(s=window.setTimeout(()=>{s=void 0,u.close()},t.closeDelay)),window.clearTimeout(K),K=void 0,t.skipDelayDuration&&t.skipDelayDuration>=0&&(Y=window.setTimeout(()=>{window.clearTimeout(Y),Y=void 0},t.skipDelayDuration)),X&&(window.clearTimeout(Q),Q=window.setTimeout(()=>{delete q[r],Q=void 0,X=!1},t.closeDelay))},N=()=>{clearTimeout(s),s=void 0,w(),y(),X=!0,u.open(),window.clearTimeout(K),K=void 0,window.clearTimeout(Q),Q=void 0,window.clearTimeout(Y),Y=void 0},F=()=>{w(),y(),!u.isOpen()&&!K&&!X?K=window.setTimeout(()=>{K=void 0,X=!0,N()},t.openDelay):u.isOpen()||N()},_=(h=!1)=>{!h&&t.openDelay&&t.openDelay>0&&!s&&!Y?F():N()},T=()=>{window.clearTimeout(K),K=void 0,X=!1},p=()=>{window.clearTimeout(s),s=void 0},U=h=>me(b(),h)||me(d(),h),H=h=>{const S=b(),k=d();if(!(!S||!k))return Bt(h,S,k)},j=h=>{const S=h.target;if(U(S)){p();return}if(!t.ignoreSafeArea){const k=H(a());if(k&&rt(lt(h),k)){p();return}}s||I()};O(()=>{if(!u.isOpen())return;const h=ce();h.addEventListener("pointermove",j,!0),$(()=>{h.removeEventListener("pointermove",j,!0)})}),O(()=>{const h=b();if(!h||!u.isOpen())return;const S=re=>{const le=re.target;me(le,h)&&I(!0)},k=st();k.addEventListener("scroll",S,{capture:!0}),$(()=>{k.removeEventListener("scroll",S,{capture:!0})})}),$(()=>{clearTimeout(s),q[r]&&delete q[r]});const G={dataset:z(()=>({"data-expanded":u.isOpen()?"":void 0,"data-closed":u.isOpen()?void 0:""})),isOpen:u.isOpen,isDisabled:()=>t.disabled??!1,triggerOnFocusOnly:()=>t.triggerOnFocusOnly??!1,contentId:l,contentPresent:x,openTooltip:_,hideTooltip:I,cancelOpening:T,generateId:fe(()=>i.id),registerContentId:de(m),isTargetOnTooltip:U,setTriggerRef:C,setContentRef:g};return c(Ke.Provider,{value:G,get children(){return c(Me,P({anchorRef:b,contentRef:d,onCurrentPlacementChange:v},n))}})}function He(e){let o;const r=pe(),[i,t]=A(e,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur"]);let n=!1,s=!1,l=!1;const m=()=>{n=!1},b=()=>{!r.isOpen()&&(s||l)&&r.openTooltip(l)},C=y=>{r.isOpen()&&!s&&!l&&r.hideTooltip(y)},d=y=>{R(y,i.onPointerEnter),!(y.pointerType==="touch"||r.triggerOnFocusOnly()||r.isDisabled()||y.defaultPrevented)&&(s=!0,b())},g=y=>{R(y,i.onPointerLeave),y.pointerType!=="touch"&&(s=!1,l=!1,r.isOpen()?C():r.cancelOpening())},a=y=>{R(y,i.onPointerDown),n=!0,ce(o).addEventListener("pointerup",m,{once:!0})},v=y=>{R(y,i.onClick),s=!1,l=!1,C(!0)},u=y=>{R(y,i.onFocus),!(r.isDisabled()||y.defaultPrevented||n)&&(l=!0,b())},x=y=>{R(y,i.onBlur);const w=y.relatedTarget;r.isTargetOnTooltip(w)||(s=!1,l=!1,C(!0))};return $(()=>{ce(o).removeEventListener("pointerup",m)}),c(se,P({as:"button",ref(y){var w=oe(I=>{r.setTriggerRef(I),o=I},i.ref);typeof w=="function"&&w(y)},get"aria-describedby"(){return $e(()=>!!r.isOpen())()?r.contentId():void 0},onPointerEnter:d,onPointerLeave:g,onPointerDown:a,onClick:v,onFocus:u,onBlur:x},()=>r.dataset(),t))}var Z=Object.assign(Be,{Arrow:De,Content:Re,Portal:Le,Trigger:He}),Nt={};ye(Nt,{Collapsible:()=>Ut,Content:()=>xe,Root:()=>Ce,Trigger:()=>we,useCollapsibleContext:()=>ie});var Ne=te();function ie(){const e=ne(Ne);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function xe(e){const[o,r]=D(),i=ie(),t=B({id:i.generateId("content")},e),[n,s]=A(t,["ref","id","style"]),{present:l}=_e({show:i.shouldMount,element:()=>o()??null}),[m,b]=D(0),[C,d]=D(0);let a=i.isOpen()||l();return et(()=>{const v=requestAnimationFrame(()=>{a=!1});$(()=>{cancelAnimationFrame(v)})}),O(Ie(l,()=>{if(!o())return;o().style.transitionDuration="0s",o().style.animationName="none";const v=o().getBoundingClientRect();b(v.height),d(v.width),a||(o().style.transitionDuration="",o().style.animationName="")})),O(Ie(i.isOpen,v=>{!v&&o()&&(o().style.transitionDuration="",o().style.animationName="")},{defer:!0})),O(()=>$(i.registerContentId(n.id))),c(ee,{get when(){return l()},get children(){return c(se,P({as:"div",ref(v){var u=oe(r,n.ref);typeof u=="function"&&u(v)},get id(){return n.id},get style(){return ve({"--kb-collapsible-content-height":m()?`${m()}px`:void 0,"--kb-collapsible-content-width":C()?`${C()}px`:void 0},n.style)}},()=>i.dataset(),s))}})}function Ce(e){const o=`collapsible-${ue()}`,r=B({id:o},e),[i,t]=A(r,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[n,s]=D(),l=Oe({open:()=>i.open,defaultOpen:()=>i.defaultOpen,onOpenChange:C=>{var d;return(d=i.onOpenChange)==null?void 0:d.call(i,C)}}),m=z(()=>({"data-expanded":l.isOpen()?"":void 0,"data-closed":l.isOpen()?void 0:"","data-disabled":i.disabled?"":void 0})),b={dataset:m,isOpen:l.isOpen,disabled:()=>i.disabled??!1,shouldMount:()=>i.forceMount||l.isOpen(),contentId:n,toggle:l.toggle,generateId:fe(()=>t.id),registerContentId:de(s)};return c(Ne.Provider,{value:b,get children(){return c(se,P({as:"div"},m,t))}})}function we(e){const o=ie(),[r,i]=A(e,["onClick"]);return c(at,P({get"aria-expanded"(){return o.isOpen()},get"aria-controls"(){return $e(()=>!!o.isOpen())()?o.contentId():void 0},get disabled(){return o.disabled()},onClick:n=>{R(n,r.onClick),o.toggle()}},()=>o.dataset(),i))}var Ut=Object.assign(Ce,{Content:xe,Trigger:we}),J={};ye(J,{Accordion:()=>jt,Content:()=>qe,Header:()=>We,Item:()=>Ve,Root:()=>Ge,Trigger:()=>Xe,useAccordionContext:()=>Se});var Ue=te();function je(){const e=ne(Ue);if(e===void 0)throw new Error("[kobalte]: `useAccordionItemContext` must be used within a `Accordion.Item` component");return e}function qe(e){const o=je(),r=o.generateId("content"),i=B({id:r},e),[t,n]=A(i,["id","style"]);return O(()=>$(o.registerContentId(t.id))),c(xe,P({role:"region",get"aria-labelledby"(){return o.triggerId()},get style(){return ve({"--kb-accordion-content-height":"var(--kb-collapsible-content-height)","--kb-accordion-content-width":"var(--kb-collapsible-content-width)"},t.style)}},n))}function We(e){const o=ie();return c(se,P({as:"h3"},()=>o.dataset(),e))}var ze=te();function Se(){const e=ne(ze);if(e===void 0)throw new Error("[kobalte]: `useAccordionContext` must be used within a `Accordion.Root` component");return e}function Ve(e){const o=Se(),r=`${o.generateId("item")}-${ue()}`,i=B({id:r},e),[t,n]=A(i,["value","disabled"]),[s,l]=D(),[m,b]=D(),C=()=>o.listState().selectionManager(),d=()=>C().isSelected(t.value),g={value:()=>t.value,triggerId:s,contentId:m,generateId:fe(()=>n.id),registerTriggerId:de(l),registerContentId:de(b)};return c(Ue.Provider,{value:g,get children(){return c(Ce,P({get open(){return d()},get disabled(){return t.disabled}},n))}})}function Ge(e){let o;const r=`accordion-${ue()}`,i=B({id:r,multiple:!1,collapsible:!1,shouldFocusWrap:!0},e),[t,n]=A(i,["id","ref","value","defaultValue","onChange","multiple","collapsible","shouldFocusWrap","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),[s,l]=D([]),{DomCollectionProvider:m}=Kt({items:s,onItemsChange:l}),b=ct({selectedKeys:()=>t.value,defaultSelectedKeys:()=>t.defaultValue,onSelectionChange:g=>{var a;return(a=t.onChange)==null?void 0:a.call(t,Array.from(g))},disallowEmptySelection:()=>!t.multiple&&!t.collapsible,selectionMode:()=>t.multiple?"multiple":"single",dataSource:s});b.selectionManager().setFocusedKey("item-1");const C=dt({selectionManager:()=>b.selectionManager(),collection:()=>b.collection(),disallowEmptySelection:()=>b.selectionManager().disallowEmptySelection(),shouldFocusWrap:()=>t.shouldFocusWrap,disallowTypeAhead:!0,allowsTabNavigation:!0},()=>o),d={listState:()=>b,generateId:fe(()=>t.id)};return c(m,{get children(){return c(ze.Provider,{value:d,get children(){return c(se,P({as:"div",get id(){return t.id},ref(g){var a=oe(v=>o=v,t.ref);typeof a=="function"&&a(g)},get onKeyDown(){return L([t.onKeyDown,C.onKeyDown])},get onMouseDown(){return L([t.onMouseDown,C.onMouseDown])},get onFocusIn(){return L([t.onFocusIn])},get onFocusOut(){return L([t.onFocusOut,C.onFocusOut])}},n))}})}})}function Xe(e){let o;const r=Se(),i=je(),t=ie(),n=i.generateId("trigger"),s=B({id:n},e),[l,m]=A(s,["ref","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);Rt({getItem:()=>({ref:()=>o,type:"item",key:i.value(),textValue:"",disabled:t.disabled()})});const b=ut({key:()=>i.value(),selectionManager:()=>r.listState().selectionManager(),disabled:()=>t.disabled(),shouldSelectOnPressUp:!0},()=>o),C=d=>{["Enter"," "].includes(d.key)&&d.preventDefault(),R(d,l.onKeyDown),R(d,b.onKeyDown)};return O(()=>$(i.registerTriggerId(m.id))),c(we,P({ref(d){var g=oe(a=>o=a,l.ref);typeof g=="function"&&g(d)},get"data-key"(){return b.dataKey()},get onPointerDown(){return L([l.onPointerDown,b.onPointerDown])},get onPointerUp(){return L([l.onPointerUp,b.onPointerUp])},get onClick(){return L([l.onClick,b.onClick])},onKeyDown:C,get onMouseDown(){return L([l.onMouseDown,b.onMouseDown])},get onFocus(){return L([l.onFocus,b.onFocus])}},m))}var jt=Object.assign(Ge,{Content:qe,Header:We,Item:Ve,Trigger:Xe}),qt=E('<div><div class="flex flex-wrap items-center gap-2 text-xs text-primary"><div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary"></span></div><div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary"></span></div><div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary">');const Wt=e=>{const{t:o}=yt(),r=z(()=>gt(e.instanceId,e.sessionId)??{cost:0,contextWindow:0,isSubscriptionModel:!1,inputTokens:0,outputTokens:0,reasoningTokens:0,actualUsageTokens:0,modelOutputLimit:0,contextAvailableTokens:null}),i=z(()=>r().inputTokens??0),t=z(()=>r().outputTokens??0),n=z(()=>{const l=r().isSubscriptionModel?0:r().cost;return l>0?l:0}),s=z(()=>`$${n().toFixed(2)}`);return(()=>{var l=qt(),m=l.firstChild,b=m.firstChild,C=b.firstChild,d=C.nextSibling,g=b.nextSibling,a=g.firstChild,v=a.nextSibling,u=g.nextSibling,x=u.firstChild,y=x.nextSibling;return f(C,()=>o("contextUsagePanel.labels.input")),f(d,()=>Te(i())),f(a,()=>o("contextUsagePanel.labels.output")),f(v,()=>Te(t())),f(x,()=>o("contextUsagePanel.labels.cost")),f(y,s),ae(()=>Je(l,`session-context-panel px-4 py-2 ${e.class??""}`)),l})()};var W=E('<div class="right-panel-empty right-panel-empty--left"><span class=text-xs>'),zt=E('<div class="rounded-md border border-base bg-surface-secondary px-3 py-2"><div class="flex items-start justify-between gap-3"><div class=min-w-0><div class="text-sm font-medium text-primary"></div><p class="mt-1 text-xs text-secondary">'),Vt=E('<div class="flex flex-col gap-3 min-h-0"><div class="flex items-center justify-between gap-2 text-[11px] text-secondary"><span></span><span class="flex items-center gap-2"><span style=color:var(--session-status-idle-fg)></span><span style=color:var(--session-status-working-fg)></span></span></div><div class="session-changes-scroll rounded-md border border-base bg-surface-secondary p-2 max-h-[40vh] overflow-y-auto"><div class="flex flex-col">'),Gt=E('<button type=button class="border-b border-base last:border-b-0 text-left hover:bg-surface-muted rounded-sm"><div class="flex items-center justify-between gap-3"><div class="text-xs font-mono text-primary min-w-0 flex-1 overflow-hidden whitespace-nowrap"style=text-overflow:ellipsis;direction:rtl;text-align:left;unicode-bidi:plaintext></div><div class="flex items-center gap-2 text-[11px] flex-shrink-0"><span style=color:var(--session-status-idle-fg)></span><span style=color:var(--session-status-working-fg)>'),Xt=E('<div class="flex flex-col gap-2">'),Yt=E("<span>"),Jt=E('<div class=status-process-card><div class=status-process-header><span class=status-process-title></span><div class=status-process-meta><span></span><span></span></div></div><div class=status-process-actions><button type=button class="button-tertiary w-full p-1 inline-flex items-center justify-center"></button><button type=button class="button-tertiary w-full p-1 inline-flex items-center justify-center"></button><button type=button class="button-tertiary w-full p-1 inline-flex items-center justify-center">'),Qt=E("<div class=status-tab-container>"),Zt=E("<span class=section-left><span class=section-label>");const dn=e=>{let o;const{isHovered:r,handleMouseEnter:i,handleMouseLeave:t}=ft(()=>o),n=d=>e.expandedItems().includes(d),C=[{id:"yolo-mode",labelKey:"instanceShell.rightPanel.sections.yoloMode",tooltipKey:"instanceShell.rightPanel.sections.yoloMode.tooltip",render:()=>{const d=e.activeSession();return d?(()=>{var g=zt(),a=g.firstChild,v=a.firstChild,u=v.firstChild,x=u.nextSibling;return f(u,()=>e.t("instanceShell.yoloMode.title")),f(x,()=>e.t("instanceShell.yoloMode.description")),f(a,c(bt,{get checked(){return mt(e.instanceId,d.id)},color:"warning",size:"small",get inputProps(){return{"aria-label":e.t("instanceShell.yoloMode.title")}},onChange:()=>ht(e.instanceId,d.id)}),null),g})():(()=>{var g=W(),a=g.firstChild;return f(a,()=>e.t("instanceShell.yoloMode.noSessionSelected")),g})()}},{id:"session-changes",labelKey:"instanceShell.rightPanel.sections.sessionChanges",tooltipKey:"instanceShell.rightPanel.sections.sessionChanges.tooltip",render:()=>{const d=e.activeSessionId();if(!d||d==="info")return(()=>{var u=W(),x=u.firstChild;return f(x,()=>e.t("instanceShell.sessionChanges.noSessionSelected")),u})();const g=e.activeSessionDiffs();if(g===void 0)return(()=>{var u=W(),x=u.firstChild;return f(x,()=>e.t("instanceShell.sessionChanges.loading")),u})();if(!Array.isArray(g)||g.length===0)return(()=>{var u=W(),x=u.firstChild;return f(x,()=>e.t("instanceShell.sessionChanges.empty")),u})();const a=[...g].sort((u,x)=>String(u.file||"").localeCompare(String(x.file||""))),v=a.reduce((u,x)=>(u.additions+=typeof x.additions=="number"?x.additions:0,u.deletions+=typeof x.deletions=="number"?x.deletions:0,u),{additions:0,deletions:0});return(()=>{var u=Vt(),x=u.firstChild,y=x.firstChild,w=y.nextSibling,I=w.firstChild,N=I.nextSibling,F=x.nextSibling,_=F.firstChild;return f(y,()=>e.t("instanceShell.sessionChanges.filesChanged",{count:a.length})),f(I,()=>`+${v.additions}`),f(N,()=>`-${v.deletions}`),f(_,c(he,{each:a,children:T=>(()=>{var p=Gt(),U=p.firstChild,H=U.firstChild,j=H.nextSibling,V=j.firstChild,G=V.nextSibling;return p.$$click=()=>e.onOpenChangesTab(T.file),f(H,()=>T.file),f(V,()=>`+${T.additions}`),f(G,()=>`-${T.deletions}`),ae(h=>{var S=e.t("instanceShell.sessionChanges.actions.show"),k=T.file;return S!==h.e&&M(p,"title",h.e=S),k!==h.t&&M(H,"title",h.t=k),h},{e:void 0,t:void 0}),p})()})),u})()}},{id:"plan",labelKey:"instanceShell.rightPanel.sections.plan",tooltipKey:"instanceShell.rightPanel.sections.plan.tooltip",render:()=>{const d=e.activeSessionId();if(!d||d==="info")return(()=>{var a=W(),v=a.firstChild;return f(v,()=>e.t("instanceShell.plan.noSessionSelected")),a})();const g=e.latestTodoState();return g?c(xt,{state:g,get emptyLabel(){return e.t("instanceShell.plan.empty")},showStatusLabel:!1}):(()=>{var a=W(),v=a.firstChild;return f(v,()=>e.t("instanceShell.plan.empty")),a})()}},{id:"background-processes",labelKey:"instanceShell.rightPanel.sections.backgroundProcesses",tooltipKey:"instanceShell.rightPanel.sections.backgroundProcesses.tooltip",render:()=>{const d=e.backgroundProcessList();return d.length===0?(()=>{var g=W(),a=g.firstChild;return f(a,()=>e.t("instanceShell.backgroundProcesses.empty")),g})():(()=>{var g=Xt();return f(g,c(he,{each:d,children:a=>(()=>{var v=Jt(),u=v.firstChild,x=u.firstChild,y=x.nextSibling,w=y.firstChild,I=w.nextSibling,N=u.nextSibling,F=N.firstChild,_=F.nextSibling,T=_.nextSibling;return f(x,()=>a.title),f(w,c(wt,{class:"h-3.5 w-3.5"})),f(I,()=>e.t("instanceShell.backgroundProcesses.status",{status:a.status})),f(y,c(ee,{get when(){return typeof a.outputSizeBytes=="number"},get children(){var p=Yt();return f(p,()=>e.t("instanceShell.backgroundProcesses.output",{sizeKb:Math.round((a.outputSizeBytes??0)/1024)})),p}}),null),F.$$click=()=>e.onOpenBackgroundOutput(a),f(F,c(It,{class:"h-4 w-4"})),_.$$click=()=>e.onStopBackgroundProcess(a.id),f(_,c($t,{class:"h-4 w-4"})),T.$$click=()=>e.onTerminateBackgroundProcess(a.id),f(T,c(vt,{class:"h-4 w-4"})),ae(p=>{var U=!!a.notifyEnabled,H=!a.notifyEnabled,j=e.t(a.notifyEnabled?"instanceShell.backgroundProcesses.notify.enabled":"instanceShell.backgroundProcesses.notify.disabled"),V=e.t(a.notifyEnabled?"instanceShell.backgroundProcesses.notify.enabled":"instanceShell.backgroundProcesses.notify.disabled"),G=e.t("instanceShell.backgroundProcesses.actions.output"),h=e.t("instanceShell.backgroundProcesses.actions.output"),S=a.status!=="running",k=e.t("instanceShell.backgroundProcesses.actions.stop"),re=e.t("instanceShell.backgroundProcesses.actions.stop"),le=e.t("instanceShell.backgroundProcesses.actions.terminate"),Pe=e.t("instanceShell.backgroundProcesses.actions.terminate");return U!==p.e&&w.classList.toggle("text-success",p.e=U),H!==p.t&&w.classList.toggle("text-tertiary",p.t=H),j!==p.a&&M(w,"aria-label",p.a=j),V!==p.o&&M(w,"title",p.o=V),G!==p.i&&M(F,"aria-label",p.i=G),h!==p.n&&M(F,"title",p.n=h),S!==p.s&&(_.disabled=p.s=S),k!==p.h&&M(_,"aria-label",p.h=k),re!==p.r&&M(_,"title",p.r=re),le!==p.d&&M(T,"aria-label",p.d=le),Pe!==p.l&&M(T,"title",p.l=Pe),p},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0}),v})()})),g})()}},{id:"mcp",labelKey:"instanceShell.rightPanel.sections.mcp",tooltipKey:"instanceShell.rightPanel.sections.mcp.tooltip",render:()=>c(be,{get initialInstance(){return e.instance},sections:["mcp"],showSectionHeadings:!1,class:"space-y-2"})},{id:"lsp",labelKey:"instanceShell.rightPanel.sections.lsp",tooltipKey:"instanceShell.rightPanel.sections.lsp.tooltip",render:()=>c(be,{get initialInstance(){return e.instance},sections:["lsp"],showSectionHeadings:!1,class:"space-y-2"})},{id:"plugins",labelKey:"instanceShell.rightPanel.sections.plugins",tooltipKey:"instanceShell.rightPanel.sections.plugins.tooltip",render:()=>c(be,{get initialInstance(){return e.instance},sections:["plugins"],showSectionHeadings:!1,class:"space-y-2"})}];return(()=>{var d=Qt(),g=o;return typeof g=="function"?Qe(g,d):o=d,ke(d,"mouseleave",t),ke(d,"mouseenter",i),f(d,c(ee,{get when(){return e.activeSession()},children:a=>c(Wt,{get instanceId(){return e.instanceId},get sessionId(){return a().id},class:"status-tab-context-panel"})}),null),f(d,c(J.Root,{class:"right-panel-accordion",collapsible:!0,multiple:!0,get value(){return e.expandedItems()},get onChange(){return e.onExpandedItemsChange},get children(){return c(he,{each:C,children:a=>c(J.Item,{get value(){return a.id},class:"right-panel-accordion-item",get children(){return[c(J.Header,{class:"right-panel-accordion-header-row",get children(){return[c(J.Trigger,{class:"right-panel-accordion-trigger",get children(){return[(()=>{var v=Zt(),u=v.firstChild;return f(u,()=>e.t(a.labelKey)),v})(),c(pt,{get class(){return`right-panel-accordion-chevron ${n(a.id)?"right-panel-accordion-chevron-expanded":""}`}})]}}),c(Z,{openDelay:200,gutter:4,placement:"top",get children(){return[c(Z.Trigger,{as:"button",type:"button",class:"section-info-trigger",get"aria-label"(){return e.t(a.tooltipKey)},get children(){return c(Pt,{class:"section-info-icon"})}}),c(Z.Portal,{get children(){return c(Z.Content,{class:"section-info-tooltip",get children(){return e.t(a.tooltipKey)}})}})]}})]}}),c(J.Content,{class:"right-panel-accordion-content",get children(){return a.render()}})]}})})}}),null),ae(()=>d.classList.toggle("status-tab-container--scroll-hover",!!r())),d})()};Ze(["click"]);export{dn as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-DVc8C-J4.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-BOJIQeun.js","assets/ruby-BvKwtOVI.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BbnMAYS6.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-BZjJHVRy.js","assets/fortran-free-form-D22FLkUw.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-B7Tvp0Sc.js","assets/gdshader-DkwncUOv.js","assets/gdscript-DTMYz4Jt.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-C8NyazO9.js","assets/r-DiinP2Uv.js","assets/latex-BUKiar2Z.js","assets/tex-Cppo0RY3.js","assets/liquid-DYVedYrR.js","assets/marko-CPi9NSCl.js","assets/less-B1dDrJ26.js","assets/mdc-DUICxH0z.js","assets/nginx-DknmC5AR.js","assets/nim-CVrawwO9.js","assets/perl-C0TMdlhV.js","assets/php-CDn_0X-4.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-WgofotgN.js","assets/csharp-CX12Zw3r.js","assets/rst-B0xPkSld.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/svelte-3Dk4HxPD.js","assets/templ-W15q3VgB.js","assets/go-Dn2_MT6a.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-CO9l9SDP.js","assets/vue-CCoi5OLL.js","assets/vue-html-DAAvJJDi.js","assets/vue-vine-_Ih-lPRR.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var Ln=Object.defineProperty;var Pn=(r,e,t)=>e in r?Ln(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var f=(r,e,t)=>Pn(r,typeof e!="symbol"?e+"":e,t);import{_ as l}from"./index-BrwpCfJK.js";import"./git-diff-vendor-DaSE45SW.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./monaco-viewer-OXO07Mos.js";let k=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function kn(r){return nt(r)}function nt(r){return Array.isArray(r)?In(r):r instanceof RegExp?r:typeof r=="object"?wn(r):r}function In(r){let e=[];for(let t=0,n=r.length;t<n;t++)e[t]=nt(r[t]);return e}function wn(r){let e={};for(let t in r)e[t]=nt(r[t]);return e}function Vt(r,...e){return e.forEach(t=>{for(let n in t)r[n]=t[n]}),r}function Mt(r){const e=~r.lastIndexOf("/")||~r.lastIndexOf("\\");return e===0?r:~e===r.length-1?Mt(r.substring(0,r.length-1)):r.substr(~e+1)}var Me=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,pe=class{static hasCaptures(r){return r===null?!1:(Me.lastIndex=0,Me.test(r))}static replaceCaptures(r,e,t){return r.replace(Me,(n,i,o,s)=>{let c=t[parseInt(i||o,10)];if(c){let a=e.substring(c.start,c.end);for(;a[0]===".";)a=a.substring(1);switch(s){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return n})}};function Bt(r,e){return r<e?-1:r>e?1:0}function Gt(r,e){if(r===null&&e===null)return 0;if(!r)return-1;if(!e)return 1;let t=r.length,n=e.length;if(t===n){for(let i=0;i<t;i++){let o=Bt(r[i],e[i]);if(o!==0)return o}return 0}return t-n}function pt(r){return!!(/^#[0-9a-f]{6}$/i.test(r)||/^#[0-9a-f]{8}$/i.test(r)||/^#[0-9a-f]{3}$/i.test(r)||/^#[0-9a-f]{4}$/i.test(r))}function jt(r){return r.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var $t=class{constructor(r){f(this,"cache",new Map);this.fn=r}get(r){if(this.cache.has(r))return this.cache.get(r);const e=this.fn(r);return this.cache.set(r,e),e}},be=class{constructor(r,e,t){f(this,"_cachedMatchRoot",new $t(r=>this._root.match(r)));this._colorMap=r,this._defaults=e,this._root=t}static createFromRawTheme(r,e){return this.createFromParsedTheme(Dn(r),e)}static createFromParsedTheme(r,e){return xn(r,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(r){if(r===null)return this._defaults;const e=r.scopeName,n=this._cachedMatchRoot.get(e).find(i=>On(r.parent,i.parentScopes));return n?new Ut(n.fontStyle,n.foreground,n.background):null}},Be=class ye{constructor(e,t){this.parent=e,this.scopeName=t}static push(e,t){for(const n of t)e=new ye(e,n);return e}static from(...e){let t=null;for(let n=0;n<e.length;n++)t=new ye(t,e[n]);return t}push(e){return new ye(this,e)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const t=[];let n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function On(r,e){if(e.length===0)return!0;for(let t=0;t<e.length;t++){let n=e[t],i=!1;if(n===">"){if(t===e.length-1)return!1;n=e[++t],i=!0}for(;r&&!Cn(r.scopeName,n);){if(i)return!1;r=r.parent}if(!r)return!1;r=r.parent}return!0}function Cn(r,e){return e===r||r.startsWith(e)&&r[e.length]==="."}var Ut=class{constructor(r,e,t){this.fontStyle=r,this.foregroundId=e,this.backgroundId=t}};function Dn(r){if(!r)return[];if(!r.settings||!Array.isArray(r.settings))return[];let e=r.settings,t=[],n=0;for(let i=0,o=e.length;i<o;i++){let s=e[i];if(!s.settings)continue;let c;if(typeof s.scope=="string"){let d=s.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),c=d.split(",")}else Array.isArray(s.scope)?c=s.scope:c=[""];let a=-1;if(typeof s.settings.fontStyle=="string"){a=0;let d=s.settings.fontStyle.split(" ");for(let h=0,p=d.length;h<p;h++)switch(d[h]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let u=null;typeof s.settings.foreground=="string"&&pt(s.settings.foreground)&&(u=s.settings.foreground);let m=null;typeof s.settings.background=="string"&&pt(s.settings.background)&&(m=s.settings.background);for(let d=0,h=c.length;d<h;d++){let _=c[d].trim().split(" "),b=_[_.length-1],v=null;_.length>1&&(v=_.slice(0,_.length-1),v.reverse()),t[n++]=new Nn(b,v,i,a,u,m)}}return t}var Nn=class{constructor(r,e,t,n,i,o){this.scope=r,this.parentScopes=e,this.index=t,this.fontStyle=n,this.foreground=i,this.background=o}},N=(r=>(r[r.NotSet=-1]="NotSet",r[r.None=0]="None",r[r.Italic=1]="Italic",r[r.Bold=2]="Bold",r[r.Underline=4]="Underline",r[r.Strikethrough=8]="Strikethrough",r))(N||{});function xn(r,e){r.sort((a,u)=>{let m=Bt(a.scope,u.scope);return m!==0||(m=Gt(a.parentScopes,u.parentScopes),m!==0)?m:a.index-u.index});let t=0,n="#000000",i="#ffffff";for(;r.length>=1&&r[0].scope==="";){let a=r.shift();a.fontStyle!==-1&&(t=a.fontStyle),a.foreground!==null&&(n=a.foreground),a.background!==null&&(i=a.background)}let o=new Vn(e),s=new Ut(t,o.getId(n),o.getId(i)),c=new Bn(new Fe(0,null,-1,0,0),[]);for(let a=0,u=r.length;a<u;a++){let m=r[a];c.insert(0,m.scope,m.parentScopes,m.fontStyle,o.getId(m.foreground),o.getId(m.background))}return new be(o,s,c)}var Vn=class{constructor(r){f(this,"_isFrozen");f(this,"_lastColorId");f(this,"_id2color");f(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(r)){this._isFrozen=!0;for(let e=0,t=r.length;e<t;e++)this._color2id[r[e]]=e,this._id2color[e]=r[e]}else this._isFrozen=!1}getId(r){if(r===null)return 0;r=r.toUpperCase();let e=this._color2id[r];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${r}`);return e=++this._lastColorId,this._color2id[r]=e,this._id2color[e]=r,e}getColorMap(){return this._id2color.slice(0)}},Mn=Object.freeze([]),Fe=class Ht{constructor(e,t,n,i,o){f(this,"scopeDepth");f(this,"parentScopes");f(this,"fontStyle");f(this,"foreground");f(this,"background");this.scopeDepth=e,this.parentScopes=t||Mn,this.fontStyle=n,this.foreground=i,this.background=o}clone(){return new Ht(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,i=e.length;n<i;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),i!==0&&(this.background=i)}},Bn=class ze{constructor(e,t=[],n={}){f(this,"_rulesWithParentScopes");this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,i=0;for(;e.parentScopes[n]===">"&&n++,t.parentScopes[i]===">"&&i++,!(n>=e.parentScopes.length||i>=t.parentScopes.length);){const o=t.parentScopes[i].length-e.parentScopes[n].length;if(o!==0)return o;n++,i++}return t.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let n=e.indexOf("."),i,o;if(n===-1?(i=e,o=""):(i=e.substring(0,n),o=e.substring(n+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const t=this._rulesWithParentScopes.concat(this._mainRule);return t.sort(ze._cmpBySpecificity),t}insert(e,t,n,i,o,s){if(t===""){this._doInsertHere(e,n,i,o,s);return}let c=t.indexOf("."),a,u;c===-1?(a=t,u=""):(a=t.substring(0,c),u=t.substring(c+1));let m;this._children.hasOwnProperty(a)?m=this._children[a]:(m=new ze(this._mainRule.clone(),Fe.cloneArr(this._rulesWithParentScopes)),this._children[a]=m),m.insert(e+1,u,n,i,o,s)}_doInsertHere(e,t,n,i,o){if(t===null){this._mainRule.acceptOverwrite(e,n,i,o);return}for(let s=0,c=this._rulesWithParentScopes.length;s<c;s++){let a=this._rulesWithParentScopes[s];if(Gt(a.parentScopes,t)===0){a.acceptOverwrite(e,n,i,o);return}}n===-1&&(n=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Fe(e,t,n,i,o))}},Q=class B{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const t=B.getLanguageId(e),n=B.getTokenType(e),i=B.getFontStyle(e),o=B.getForeground(e),s=B.getBackground(e);console.log({languageId:t,tokenType:n,fontStyle:i,foreground:o,background:s})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,t,n,i,o,s,c){let a=B.getLanguageId(e),u=B.getTokenType(e),m=B.containsBalancedBrackets(e)?1:0,d=B.getFontStyle(e),h=B.getForeground(e),p=B.getBackground(e);return t!==0&&(a=t),n!==8&&(u=n),i!==null&&(m=i?1:0),o!==-1&&(d=o),s!==0&&(h=s),c!==0&&(p=c),(a<<0|u<<8|m<<10|d<<11|h<<15|p<<24)>>>0}};function Re(r,e){const t=[],n=Gn(r);let i=n.next();for(;i!==null;){let a=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=n.next()}let u=s();if(t.push({matcher:u,priority:a}),i!==",")break;i=n.next()}return t;function o(){if(i==="-"){i=n.next();const a=o();return u=>!!a&&!a(u)}if(i==="("){i=n.next();const a=c();return i===")"&&(i=n.next()),a}if(ft(i)){const a=[];do a.push(i),i=n.next();while(ft(i));return u=>e(a,u)}return null}function s(){const a=[];let u=o();for(;u;)a.push(u),u=o();return m=>a.every(d=>d(m))}function c(){const a=[];let u=s();for(;u&&(a.push(u),i==="|"||i===",");){do i=n.next();while(i==="|"||i===",");u=s()}return m=>a.some(d=>d(m))}}function ft(r){return!!r&&!!r.match(/[\w\.:]+/)}function Gn(r){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,t=e.exec(r);return{next:()=>{if(!t)return null;const n=t[0];return t=e.exec(r),n}}}function Wt(r){typeof r.dispose=="function"&&r.dispose()}var oe=class{constructor(r){this.scopeName=r}toKey(){return this.scopeName}},jn=class{constructor(r,e){this.scopeName=r,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},$n=class{constructor(){f(this,"_references",[]);f(this,"_seenReferenceKeys",new Set);f(this,"visitedRule",new Set)}get references(){return this._references}add(r){const e=r.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(r))}},Un=class{constructor(r,e){f(this,"seenFullScopeRequests",new Set);f(this,"seenPartialScopeRequests",new Set);f(this,"Q");this.repo=r,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new oe(this.initialScopeName)]}processQueue(){const r=this.Q;this.Q=[];const e=new $n;for(const t of r)Hn(t,this.initialScopeName,this.repo,e);for(const t of e.references)if(t instanceof oe){if(this.seenFullScopeRequests.has(t.scopeName))continue;this.seenFullScopeRequests.add(t.scopeName),this.Q.push(t)}else{if(this.seenFullScopeRequests.has(t.scopeName)||this.seenPartialScopeRequests.has(t.toKey()))continue;this.seenPartialScopeRequests.add(t.toKey()),this.Q.push(t)}}};function Hn(r,e,t,n){const i=t.lookup(r.scopeName);if(!i){if(r.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=t.lookup(e);r instanceof oe?Ee({baseGrammar:o,selfGrammar:i},n):qe(r.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},n);const s=t.injections(r.scopeName);if(s)for(const c of s)n.add(new oe(c))}function qe(r,e,t){if(e.repository&&e.repository[r]){const n=e.repository[r];Te([n],e,t)}}function Ee(r,e){r.selfGrammar.patterns&&Array.isArray(r.selfGrammar.patterns)&&Te(r.selfGrammar.patterns,{...r,repository:r.selfGrammar.repository},e),r.selfGrammar.injections&&Te(Object.values(r.selfGrammar.injections),{...r,repository:r.selfGrammar.repository},e)}function Te(r,e,t){for(const n of r){if(t.visitedRule.has(n))continue;t.visitedRule.add(n);const i=n.repository?Vt({},e.repository,n.repository):e.repository;Array.isArray(n.patterns)&&Te(n.patterns,{...e,repository:i},t);const o=n.include;if(!o)continue;const s=Ft(o);switch(s.kind){case 0:Ee({...e,selfGrammar:e.baseGrammar},t);break;case 1:Ee(e,t);break;case 2:qe(s.ruleName,{...e,repository:i},t);break;case 3:case 4:const c=s.scopeName===e.selfGrammar.scopeName?e.selfGrammar:s.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(c){const a={baseGrammar:e.baseGrammar,selfGrammar:c,repository:i};s.kind===4?qe(s.ruleName,a,t):Ee(a,t)}else s.kind===4?t.add(new jn(s.scopeName,s.ruleName)):t.add(new oe(s.scopeName));break}}}var Wn=class{constructor(){f(this,"kind",0)}},Fn=class{constructor(){f(this,"kind",1)}},zn=class{constructor(r){f(this,"kind",2);this.ruleName=r}},qn=class{constructor(r){f(this,"kind",3);this.scopeName=r}},Kn=class{constructor(r,e){f(this,"kind",4);this.scopeName=r,this.ruleName=e}};function Ft(r){if(r==="$base")return new Wn;if(r==="$self")return new Fn;const e=r.indexOf("#");if(e===-1)return new qn(r);if(e===0)return new zn(r.substring(1));{const t=r.substring(0,e),n=r.substring(e+1);return new Kn(t,n)}}var Yn=/\\(\d+)/,_t=/\\(\d+)/g,Jn=-1,zt=-2;var de=class{constructor(r,e,t,n){f(this,"$location");f(this,"id");f(this,"_nameIsCapturing");f(this,"_name");f(this,"_contentNameIsCapturing");f(this,"_contentName");this.$location=r,this.id=e,this._name=t||null,this._nameIsCapturing=pe.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=pe.hasCaptures(this._contentName)}get debugName(){const r=this.$location?`${Mt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${r}`}getName(r,e){return!this._nameIsCapturing||this._name===null||r===null||e===null?this._name:pe.replaceCaptures(this._name,r,e)}getContentName(r,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:pe.replaceCaptures(this._contentName,r,e)}},Xn=class extends de{constructor(e,t,n,i,o){super(e,t,n,i);f(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,i){throw new Error("Not supported!")}},Qn=class extends de{constructor(e,t,n,i,o){super(e,t,n,null);f(this,"_match");f(this,"captures");f(this,"_cachedCompiledPatterns");this._match=new se(i,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ae,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},gt=class extends de{constructor(e,t,n,i,o){super(e,t,n,i);f(this,"hasMissingPatterns");f(this,"patterns");f(this,"_cachedCompiledPatterns");this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ae,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ke=class extends de{constructor(e,t,n,i,o,s,c,a,u,m){super(e,t,n,i);f(this,"_begin");f(this,"beginCaptures");f(this,"_end");f(this,"endHasBackReferences");f(this,"endCaptures");f(this,"applyEndPatternLast");f(this,"hasMissingPatterns");f(this,"patterns");f(this,"_cachedCompiledPatterns");this._begin=new se(o,this.id),this.beginCaptures=s,this._end=new se(c||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=u||!1,this.patterns=m.patterns,this.hasMissingPatterns=m.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,i)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ae;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Ae=class extends de{constructor(e,t,n,i,o,s,c,a,u){super(e,t,n,i);f(this,"_begin");f(this,"beginCaptures");f(this,"whileCaptures");f(this,"_while");f(this,"whileHasBackReferences");f(this,"hasMissingPatterns");f(this,"patterns");f(this,"_cachedCompiledPatterns");f(this,"_cachedCompiledWhilePatterns");this._begin=new se(o,this.id),this.beginCaptures=s,this.whileCaptures=a,this._while=new se(c,zt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ae;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,i){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,i)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ae,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},qt=class D{static createCaptureRule(e,t,n,i,o){return e.registerRule(s=>new Xn(t,s,n,i,o))}static getCompiledRuleId(e,t,n){return e.id||t.registerRule(i=>{if(e.id=i,e.match)return new Qn(e.$vscodeTextmateLocation,e.id,e.name,e.match,D._compileCaptures(e.captures,t,n));if(typeof e.begin>"u"){e.repository&&(n=Vt({},n,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new gt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,D._compilePatterns(o,t,n))}return e.while?new Ae(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,D._compileCaptures(e.beginCaptures||e.captures,t,n),e.while,D._compileCaptures(e.whileCaptures||e.captures,t,n),D._compilePatterns(e.patterns,t,n)):new Ke(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,D._compileCaptures(e.beginCaptures||e.captures,t,n),e.end,D._compileCaptures(e.endCaptures||e.captures,t,n),e.applyEndPatternLast,D._compilePatterns(e.patterns,t,n))}),e.id}static _compileCaptures(e,t,n){let i=[];if(e){let o=0;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const c=parseInt(s,10);c>o&&(o=c)}for(let s=0;s<=o;s++)i[s]=null;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const c=parseInt(s,10);let a=0;e[s].patterns&&(a=D.getCompiledRuleId(e[s],t,n)),i[c]=D.createCaptureRule(t,e[s].$vscodeTextmateLocation,e[s].name,e[s].contentName,a)}}return i}static _compilePatterns(e,t,n){let i=[];if(e)for(let o=0,s=e.length;o<s;o++){const c=e[o];let a=-1;if(c.include){const u=Ft(c.include);switch(u.kind){case 0:case 1:a=D.getCompiledRuleId(n[c.include],t,n);break;case 2:let m=n[u.ruleName];m&&(a=D.getCompiledRuleId(m,t,n));break;case 3:case 4:const d=u.scopeName,h=u.kind===4?u.ruleName:null,p=t.getExternalGrammar(d,n);if(p)if(h){let _=p.repository[h];_&&(a=D.getCompiledRuleId(_,t,p.repository))}else a=D.getCompiledRuleId(p.repository.$self,t,p.repository);break}}else a=D.getCompiledRuleId(c,t,n);if(a!==-1){const u=t.getRule(a);let m=!1;if((u instanceof gt||u instanceof Ke||u instanceof Ae)&&u.hasMissingPatterns&&u.patterns.length===0&&(m=!0),m)continue;i.push(a)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},se=class Kt{constructor(e,t){f(this,"source");f(this,"ruleId");f(this,"hasAnchor");f(this,"hasBackReferences");f(this,"_anchorCache");if(e&&typeof e=="string"){const n=e.length;let i=0,o=[],s=!1;for(let c=0;c<n;c++)if(e.charAt(c)==="\\"&&c+1<n){const u=e.charAt(c+1);u==="z"?(o.push(e.substring(i,c)),o.push("$(?!\\n)(?<!\\n)"),i=c+2):(u==="A"||u==="G")&&(s=!0),c++}this.hasAnchor=s,i===0?this.source=e:(o.push(e.substring(i,n)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source=="string"?this.hasBackReferences=Yn.test(this.source):this.hasBackReferences=!1}clone(){return new Kt(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=t.map(i=>e.substring(i.start,i.end));return _t.lastIndex=0,this.source.replace(_t,(i,o)=>jt(n[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],t=[],n=[],i=[],o,s,c,a;for(o=0,s=this.source.length;o<s;o++)c=this.source.charAt(o),e[o]=c,t[o]=c,n[o]=c,i[o]=c,c==="\\"&&o+1<s&&(a=this.source.charAt(o+1),a==="A"?(e[o+1]="",t[o+1]="",n[o+1]="A",i[o+1]="A"):a==="G"?(e[o+1]="",t[o+1]="G",n[o+1]="",i[o+1]="G"):(e[o+1]=a,t[o+1]=a,n[o+1]=a,i[o+1]=a),o++);return{A0_G0:e.join(""),A0_G1:t.join(""),A1_G0:n.join(""),A1_G1:i.join("")}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ae=class{constructor(){f(this,"_items");f(this,"_hasAnchors");f(this,"_cached");f(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(r){this._items.push(r),this._hasAnchors=this._hasAnchors||r.hasAnchor}unshift(r){this._items.unshift(r),this._hasAnchors=this._hasAnchors||r.hasAnchor}length(){return this._items.length}setSource(r,e){this._items[r].source!==e&&(this._disposeCaches(),this._items[r].setSource(e))}compile(r){if(!this._cached){let e=this._items.map(t=>t.source);this._cached=new yt(r,e,this._items.map(t=>t.ruleId))}return this._cached}compileAG(r,e,t){return this._hasAnchors?e?t?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(r,e,t)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(r,e,t)),this._anchorCache.A1_G0):t?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(r,e,t)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(r,e,t)),this._anchorCache.A0_G0):this.compile(r)}_resolveAnchors(r,e,t){let n=this._items.map(i=>i.resolveAnchors(e,t));return new yt(r,n,this._items.map(i=>i.ruleId))}},yt=class{constructor(r,e,t){f(this,"scanner");this.regExps=e,this.rules=t,this.scanner=r.createOnigScanner(e)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const r=[];for(let e=0,t=this.rules.length;e<t;e++)r.push(" - "+this.rules[e]+": "+this.regExps[e]);return r.join(`
|
|
2
|
+
var Ln=Object.defineProperty;var Pn=(r,e,t)=>e in r?Ln(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var f=(r,e,t)=>Pn(r,typeof e!="symbol"?e+"":e,t);import{_ as l}from"./index-Df9_I8zl.js";import"./git-diff-vendor-DaSE45SW.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./monaco-viewer-OXO07Mos.js";let k=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function kn(r){return nt(r)}function nt(r){return Array.isArray(r)?In(r):r instanceof RegExp?r:typeof r=="object"?wn(r):r}function In(r){let e=[];for(let t=0,n=r.length;t<n;t++)e[t]=nt(r[t]);return e}function wn(r){let e={};for(let t in r)e[t]=nt(r[t]);return e}function Vt(r,...e){return e.forEach(t=>{for(let n in t)r[n]=t[n]}),r}function Mt(r){const e=~r.lastIndexOf("/")||~r.lastIndexOf("\\");return e===0?r:~e===r.length-1?Mt(r.substring(0,r.length-1)):r.substr(~e+1)}var Me=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,pe=class{static hasCaptures(r){return r===null?!1:(Me.lastIndex=0,Me.test(r))}static replaceCaptures(r,e,t){return r.replace(Me,(n,i,o,s)=>{let c=t[parseInt(i||o,10)];if(c){let a=e.substring(c.start,c.end);for(;a[0]===".";)a=a.substring(1);switch(s){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return n})}};function Bt(r,e){return r<e?-1:r>e?1:0}function Gt(r,e){if(r===null&&e===null)return 0;if(!r)return-1;if(!e)return 1;let t=r.length,n=e.length;if(t===n){for(let i=0;i<t;i++){let o=Bt(r[i],e[i]);if(o!==0)return o}return 0}return t-n}function pt(r){return!!(/^#[0-9a-f]{6}$/i.test(r)||/^#[0-9a-f]{8}$/i.test(r)||/^#[0-9a-f]{3}$/i.test(r)||/^#[0-9a-f]{4}$/i.test(r))}function jt(r){return r.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var $t=class{constructor(r){f(this,"cache",new Map);this.fn=r}get(r){if(this.cache.has(r))return this.cache.get(r);const e=this.fn(r);return this.cache.set(r,e),e}},be=class{constructor(r,e,t){f(this,"_cachedMatchRoot",new $t(r=>this._root.match(r)));this._colorMap=r,this._defaults=e,this._root=t}static createFromRawTheme(r,e){return this.createFromParsedTheme(Dn(r),e)}static createFromParsedTheme(r,e){return xn(r,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(r){if(r===null)return this._defaults;const e=r.scopeName,n=this._cachedMatchRoot.get(e).find(i=>On(r.parent,i.parentScopes));return n?new Ut(n.fontStyle,n.foreground,n.background):null}},Be=class ye{constructor(e,t){this.parent=e,this.scopeName=t}static push(e,t){for(const n of t)e=new ye(e,n);return e}static from(...e){let t=null;for(let n=0;n<e.length;n++)t=new ye(t,e[n]);return t}push(e){return new ye(this,e)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const t=[];let n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function On(r,e){if(e.length===0)return!0;for(let t=0;t<e.length;t++){let n=e[t],i=!1;if(n===">"){if(t===e.length-1)return!1;n=e[++t],i=!0}for(;r&&!Cn(r.scopeName,n);){if(i)return!1;r=r.parent}if(!r)return!1;r=r.parent}return!0}function Cn(r,e){return e===r||r.startsWith(e)&&r[e.length]==="."}var Ut=class{constructor(r,e,t){this.fontStyle=r,this.foregroundId=e,this.backgroundId=t}};function Dn(r){if(!r)return[];if(!r.settings||!Array.isArray(r.settings))return[];let e=r.settings,t=[],n=0;for(let i=0,o=e.length;i<o;i++){let s=e[i];if(!s.settings)continue;let c;if(typeof s.scope=="string"){let d=s.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),c=d.split(",")}else Array.isArray(s.scope)?c=s.scope:c=[""];let a=-1;if(typeof s.settings.fontStyle=="string"){a=0;let d=s.settings.fontStyle.split(" ");for(let h=0,p=d.length;h<p;h++)switch(d[h]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let u=null;typeof s.settings.foreground=="string"&&pt(s.settings.foreground)&&(u=s.settings.foreground);let m=null;typeof s.settings.background=="string"&&pt(s.settings.background)&&(m=s.settings.background);for(let d=0,h=c.length;d<h;d++){let _=c[d].trim().split(" "),b=_[_.length-1],v=null;_.length>1&&(v=_.slice(0,_.length-1),v.reverse()),t[n++]=new Nn(b,v,i,a,u,m)}}return t}var Nn=class{constructor(r,e,t,n,i,o){this.scope=r,this.parentScopes=e,this.index=t,this.fontStyle=n,this.foreground=i,this.background=o}},N=(r=>(r[r.NotSet=-1]="NotSet",r[r.None=0]="None",r[r.Italic=1]="Italic",r[r.Bold=2]="Bold",r[r.Underline=4]="Underline",r[r.Strikethrough=8]="Strikethrough",r))(N||{});function xn(r,e){r.sort((a,u)=>{let m=Bt(a.scope,u.scope);return m!==0||(m=Gt(a.parentScopes,u.parentScopes),m!==0)?m:a.index-u.index});let t=0,n="#000000",i="#ffffff";for(;r.length>=1&&r[0].scope==="";){let a=r.shift();a.fontStyle!==-1&&(t=a.fontStyle),a.foreground!==null&&(n=a.foreground),a.background!==null&&(i=a.background)}let o=new Vn(e),s=new Ut(t,o.getId(n),o.getId(i)),c=new Bn(new Fe(0,null,-1,0,0),[]);for(let a=0,u=r.length;a<u;a++){let m=r[a];c.insert(0,m.scope,m.parentScopes,m.fontStyle,o.getId(m.foreground),o.getId(m.background))}return new be(o,s,c)}var Vn=class{constructor(r){f(this,"_isFrozen");f(this,"_lastColorId");f(this,"_id2color");f(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(r)){this._isFrozen=!0;for(let e=0,t=r.length;e<t;e++)this._color2id[r[e]]=e,this._id2color[e]=r[e]}else this._isFrozen=!1}getId(r){if(r===null)return 0;r=r.toUpperCase();let e=this._color2id[r];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${r}`);return e=++this._lastColorId,this._color2id[r]=e,this._id2color[e]=r,e}getColorMap(){return this._id2color.slice(0)}},Mn=Object.freeze([]),Fe=class Ht{constructor(e,t,n,i,o){f(this,"scopeDepth");f(this,"parentScopes");f(this,"fontStyle");f(this,"foreground");f(this,"background");this.scopeDepth=e,this.parentScopes=t||Mn,this.fontStyle=n,this.foreground=i,this.background=o}clone(){return new Ht(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,i=e.length;n<i;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),i!==0&&(this.background=i)}},Bn=class ze{constructor(e,t=[],n={}){f(this,"_rulesWithParentScopes");this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,i=0;for(;e.parentScopes[n]===">"&&n++,t.parentScopes[i]===">"&&i++,!(n>=e.parentScopes.length||i>=t.parentScopes.length);){const o=t.parentScopes[i].length-e.parentScopes[n].length;if(o!==0)return o;n++,i++}return t.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let n=e.indexOf("."),i,o;if(n===-1?(i=e,o=""):(i=e.substring(0,n),o=e.substring(n+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const t=this._rulesWithParentScopes.concat(this._mainRule);return t.sort(ze._cmpBySpecificity),t}insert(e,t,n,i,o,s){if(t===""){this._doInsertHere(e,n,i,o,s);return}let c=t.indexOf("."),a,u;c===-1?(a=t,u=""):(a=t.substring(0,c),u=t.substring(c+1));let m;this._children.hasOwnProperty(a)?m=this._children[a]:(m=new ze(this._mainRule.clone(),Fe.cloneArr(this._rulesWithParentScopes)),this._children[a]=m),m.insert(e+1,u,n,i,o,s)}_doInsertHere(e,t,n,i,o){if(t===null){this._mainRule.acceptOverwrite(e,n,i,o);return}for(let s=0,c=this._rulesWithParentScopes.length;s<c;s++){let a=this._rulesWithParentScopes[s];if(Gt(a.parentScopes,t)===0){a.acceptOverwrite(e,n,i,o);return}}n===-1&&(n=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Fe(e,t,n,i,o))}},Q=class B{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const t=B.getLanguageId(e),n=B.getTokenType(e),i=B.getFontStyle(e),o=B.getForeground(e),s=B.getBackground(e);console.log({languageId:t,tokenType:n,fontStyle:i,foreground:o,background:s})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,t,n,i,o,s,c){let a=B.getLanguageId(e),u=B.getTokenType(e),m=B.containsBalancedBrackets(e)?1:0,d=B.getFontStyle(e),h=B.getForeground(e),p=B.getBackground(e);return t!==0&&(a=t),n!==8&&(u=n),i!==null&&(m=i?1:0),o!==-1&&(d=o),s!==0&&(h=s),c!==0&&(p=c),(a<<0|u<<8|m<<10|d<<11|h<<15|p<<24)>>>0}};function Re(r,e){const t=[],n=Gn(r);let i=n.next();for(;i!==null;){let a=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=n.next()}let u=s();if(t.push({matcher:u,priority:a}),i!==",")break;i=n.next()}return t;function o(){if(i==="-"){i=n.next();const a=o();return u=>!!a&&!a(u)}if(i==="("){i=n.next();const a=c();return i===")"&&(i=n.next()),a}if(ft(i)){const a=[];do a.push(i),i=n.next();while(ft(i));return u=>e(a,u)}return null}function s(){const a=[];let u=o();for(;u;)a.push(u),u=o();return m=>a.every(d=>d(m))}function c(){const a=[];let u=s();for(;u&&(a.push(u),i==="|"||i===",");){do i=n.next();while(i==="|"||i===",");u=s()}return m=>a.some(d=>d(m))}}function ft(r){return!!r&&!!r.match(/[\w\.:]+/)}function Gn(r){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,t=e.exec(r);return{next:()=>{if(!t)return null;const n=t[0];return t=e.exec(r),n}}}function Wt(r){typeof r.dispose=="function"&&r.dispose()}var oe=class{constructor(r){this.scopeName=r}toKey(){return this.scopeName}},jn=class{constructor(r,e){this.scopeName=r,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},$n=class{constructor(){f(this,"_references",[]);f(this,"_seenReferenceKeys",new Set);f(this,"visitedRule",new Set)}get references(){return this._references}add(r){const e=r.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(r))}},Un=class{constructor(r,e){f(this,"seenFullScopeRequests",new Set);f(this,"seenPartialScopeRequests",new Set);f(this,"Q");this.repo=r,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new oe(this.initialScopeName)]}processQueue(){const r=this.Q;this.Q=[];const e=new $n;for(const t of r)Hn(t,this.initialScopeName,this.repo,e);for(const t of e.references)if(t instanceof oe){if(this.seenFullScopeRequests.has(t.scopeName))continue;this.seenFullScopeRequests.add(t.scopeName),this.Q.push(t)}else{if(this.seenFullScopeRequests.has(t.scopeName)||this.seenPartialScopeRequests.has(t.toKey()))continue;this.seenPartialScopeRequests.add(t.toKey()),this.Q.push(t)}}};function Hn(r,e,t,n){const i=t.lookup(r.scopeName);if(!i){if(r.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=t.lookup(e);r instanceof oe?Ee({baseGrammar:o,selfGrammar:i},n):qe(r.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},n);const s=t.injections(r.scopeName);if(s)for(const c of s)n.add(new oe(c))}function qe(r,e,t){if(e.repository&&e.repository[r]){const n=e.repository[r];Te([n],e,t)}}function Ee(r,e){r.selfGrammar.patterns&&Array.isArray(r.selfGrammar.patterns)&&Te(r.selfGrammar.patterns,{...r,repository:r.selfGrammar.repository},e),r.selfGrammar.injections&&Te(Object.values(r.selfGrammar.injections),{...r,repository:r.selfGrammar.repository},e)}function Te(r,e,t){for(const n of r){if(t.visitedRule.has(n))continue;t.visitedRule.add(n);const i=n.repository?Vt({},e.repository,n.repository):e.repository;Array.isArray(n.patterns)&&Te(n.patterns,{...e,repository:i},t);const o=n.include;if(!o)continue;const s=Ft(o);switch(s.kind){case 0:Ee({...e,selfGrammar:e.baseGrammar},t);break;case 1:Ee(e,t);break;case 2:qe(s.ruleName,{...e,repository:i},t);break;case 3:case 4:const c=s.scopeName===e.selfGrammar.scopeName?e.selfGrammar:s.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(c){const a={baseGrammar:e.baseGrammar,selfGrammar:c,repository:i};s.kind===4?qe(s.ruleName,a,t):Ee(a,t)}else s.kind===4?t.add(new jn(s.scopeName,s.ruleName)):t.add(new oe(s.scopeName));break}}}var Wn=class{constructor(){f(this,"kind",0)}},Fn=class{constructor(){f(this,"kind",1)}},zn=class{constructor(r){f(this,"kind",2);this.ruleName=r}},qn=class{constructor(r){f(this,"kind",3);this.scopeName=r}},Kn=class{constructor(r,e){f(this,"kind",4);this.scopeName=r,this.ruleName=e}};function Ft(r){if(r==="$base")return new Wn;if(r==="$self")return new Fn;const e=r.indexOf("#");if(e===-1)return new qn(r);if(e===0)return new zn(r.substring(1));{const t=r.substring(0,e),n=r.substring(e+1);return new Kn(t,n)}}var Yn=/\\(\d+)/,_t=/\\(\d+)/g,Jn=-1,zt=-2;var de=class{constructor(r,e,t,n){f(this,"$location");f(this,"id");f(this,"_nameIsCapturing");f(this,"_name");f(this,"_contentNameIsCapturing");f(this,"_contentName");this.$location=r,this.id=e,this._name=t||null,this._nameIsCapturing=pe.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=pe.hasCaptures(this._contentName)}get debugName(){const r=this.$location?`${Mt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${r}`}getName(r,e){return!this._nameIsCapturing||this._name===null||r===null||e===null?this._name:pe.replaceCaptures(this._name,r,e)}getContentName(r,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:pe.replaceCaptures(this._contentName,r,e)}},Xn=class extends de{constructor(e,t,n,i,o){super(e,t,n,i);f(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,i){throw new Error("Not supported!")}},Qn=class extends de{constructor(e,t,n,i,o){super(e,t,n,null);f(this,"_match");f(this,"captures");f(this,"_cachedCompiledPatterns");this._match=new se(i,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ae,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},gt=class extends de{constructor(e,t,n,i,o){super(e,t,n,i);f(this,"hasMissingPatterns");f(this,"patterns");f(this,"_cachedCompiledPatterns");this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ae,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ke=class extends de{constructor(e,t,n,i,o,s,c,a,u,m){super(e,t,n,i);f(this,"_begin");f(this,"beginCaptures");f(this,"_end");f(this,"endHasBackReferences");f(this,"endCaptures");f(this,"applyEndPatternLast");f(this,"hasMissingPatterns");f(this,"patterns");f(this,"_cachedCompiledPatterns");this._begin=new se(o,this.id),this.beginCaptures=s,this._end=new se(c||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=u||!1,this.patterns=m.patterns,this.hasMissingPatterns=m.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,i)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ae;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Ae=class extends de{constructor(e,t,n,i,o,s,c,a,u){super(e,t,n,i);f(this,"_begin");f(this,"beginCaptures");f(this,"whileCaptures");f(this,"_while");f(this,"whileHasBackReferences");f(this,"hasMissingPatterns");f(this,"patterns");f(this,"_cachedCompiledPatterns");f(this,"_cachedCompiledWhilePatterns");this._begin=new se(o,this.id),this.beginCaptures=s,this.whileCaptures=a,this._while=new se(c,zt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ae;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,i){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,i)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ae,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},qt=class D{static createCaptureRule(e,t,n,i,o){return e.registerRule(s=>new Xn(t,s,n,i,o))}static getCompiledRuleId(e,t,n){return e.id||t.registerRule(i=>{if(e.id=i,e.match)return new Qn(e.$vscodeTextmateLocation,e.id,e.name,e.match,D._compileCaptures(e.captures,t,n));if(typeof e.begin>"u"){e.repository&&(n=Vt({},n,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new gt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,D._compilePatterns(o,t,n))}return e.while?new Ae(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,D._compileCaptures(e.beginCaptures||e.captures,t,n),e.while,D._compileCaptures(e.whileCaptures||e.captures,t,n),D._compilePatterns(e.patterns,t,n)):new Ke(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,D._compileCaptures(e.beginCaptures||e.captures,t,n),e.end,D._compileCaptures(e.endCaptures||e.captures,t,n),e.applyEndPatternLast,D._compilePatterns(e.patterns,t,n))}),e.id}static _compileCaptures(e,t,n){let i=[];if(e){let o=0;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const c=parseInt(s,10);c>o&&(o=c)}for(let s=0;s<=o;s++)i[s]=null;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const c=parseInt(s,10);let a=0;e[s].patterns&&(a=D.getCompiledRuleId(e[s],t,n)),i[c]=D.createCaptureRule(t,e[s].$vscodeTextmateLocation,e[s].name,e[s].contentName,a)}}return i}static _compilePatterns(e,t,n){let i=[];if(e)for(let o=0,s=e.length;o<s;o++){const c=e[o];let a=-1;if(c.include){const u=Ft(c.include);switch(u.kind){case 0:case 1:a=D.getCompiledRuleId(n[c.include],t,n);break;case 2:let m=n[u.ruleName];m&&(a=D.getCompiledRuleId(m,t,n));break;case 3:case 4:const d=u.scopeName,h=u.kind===4?u.ruleName:null,p=t.getExternalGrammar(d,n);if(p)if(h){let _=p.repository[h];_&&(a=D.getCompiledRuleId(_,t,p.repository))}else a=D.getCompiledRuleId(p.repository.$self,t,p.repository);break}}else a=D.getCompiledRuleId(c,t,n);if(a!==-1){const u=t.getRule(a);let m=!1;if((u instanceof gt||u instanceof Ke||u instanceof Ae)&&u.hasMissingPatterns&&u.patterns.length===0&&(m=!0),m)continue;i.push(a)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},se=class Kt{constructor(e,t){f(this,"source");f(this,"ruleId");f(this,"hasAnchor");f(this,"hasBackReferences");f(this,"_anchorCache");if(e&&typeof e=="string"){const n=e.length;let i=0,o=[],s=!1;for(let c=0;c<n;c++)if(e.charAt(c)==="\\"&&c+1<n){const u=e.charAt(c+1);u==="z"?(o.push(e.substring(i,c)),o.push("$(?!\\n)(?<!\\n)"),i=c+2):(u==="A"||u==="G")&&(s=!0),c++}this.hasAnchor=s,i===0?this.source=e:(o.push(e.substring(i,n)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source=="string"?this.hasBackReferences=Yn.test(this.source):this.hasBackReferences=!1}clone(){return new Kt(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=t.map(i=>e.substring(i.start,i.end));return _t.lastIndex=0,this.source.replace(_t,(i,o)=>jt(n[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],t=[],n=[],i=[],o,s,c,a;for(o=0,s=this.source.length;o<s;o++)c=this.source.charAt(o),e[o]=c,t[o]=c,n[o]=c,i[o]=c,c==="\\"&&o+1<s&&(a=this.source.charAt(o+1),a==="A"?(e[o+1]="",t[o+1]="",n[o+1]="A",i[o+1]="A"):a==="G"?(e[o+1]="",t[o+1]="G",n[o+1]="",i[o+1]="G"):(e[o+1]=a,t[o+1]=a,n[o+1]=a,i[o+1]=a),o++);return{A0_G0:e.join(""),A0_G1:t.join(""),A1_G0:n.join(""),A1_G1:i.join("")}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ae=class{constructor(){f(this,"_items");f(this,"_hasAnchors");f(this,"_cached");f(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(r){this._items.push(r),this._hasAnchors=this._hasAnchors||r.hasAnchor}unshift(r){this._items.unshift(r),this._hasAnchors=this._hasAnchors||r.hasAnchor}length(){return this._items.length}setSource(r,e){this._items[r].source!==e&&(this._disposeCaches(),this._items[r].setSource(e))}compile(r){if(!this._cached){let e=this._items.map(t=>t.source);this._cached=new yt(r,e,this._items.map(t=>t.ruleId))}return this._cached}compileAG(r,e,t){return this._hasAnchors?e?t?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(r,e,t)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(r,e,t)),this._anchorCache.A1_G0):t?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(r,e,t)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(r,e,t)),this._anchorCache.A0_G0):this.compile(r)}_resolveAnchors(r,e,t){let n=this._items.map(i=>i.resolveAnchors(e,t));return new yt(r,n,this._items.map(i=>i.ruleId))}},yt=class{constructor(r,e,t){f(this,"scanner");this.regExps=e,this.rules=t,this.scanner=r.createOnigScanner(e)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const r=[];for(let e=0,t=this.rules.length;e<t;e++)r.push(" - "+this.rules[e]+": "+this.regExps[e]);return r.join(`
|
|
3
3
|
`)}findNextMatchSync(r,e,t){const n=this.scanner.findNextMatchSync(r,e,t);return n?{ruleId:this.rules[n.index],captureIndices:n.captureIndices}:null}},Ge=class{constructor(r,e){this.languageId=r,this.tokenType=e}},W,Zn=(W=class{constructor(e,t){f(this,"_defaultAttributes");f(this,"_embeddedLanguagesMatcher");f(this,"_getBasicScopeAttributes",new $t(e=>{const t=this._scopeToLanguage(e),n=this._toStandardTokenType(e);return new Ge(t,n)}));this._defaultAttributes=new Ge(e,8),this._embeddedLanguagesMatcher=new er(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?W._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(W.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},f(W,"_NULL_SCOPE_METADATA",new Ge(0,0)),f(W,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),W),er=class{constructor(r){f(this,"values");f(this,"scopesRegExp");if(r.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(r);const e=r.map(([t,n])=>jt(t));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(r){if(!this.scopesRegExp)return;const e=r.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},Et=class{constructor(r,e){this.stack=r,this.stoppedEarly=e}};function Yt(r,e,t,n,i,o,s,c){const a=e.content.length;let u=!1,m=-1;if(s){const p=tr(r,e,t,n,i,o);i=p.stack,n=p.linePos,t=p.isFirstLine,m=p.anchorPosition}const d=Date.now();for(;!u;){if(c!==0&&Date.now()-d>c)return new Et(i,!0);h()}return new Et(i,!1);function h(){const p=nr(r,e,t,n,i,m);if(!p){o.produce(i,a),u=!0;return}const _=p.captureIndices,b=p.matchedRuleId,v=_&&_.length>0?_[0].end>n:!1;if(b===Jn){const y=i.getRule(r);o.produce(i,_[0].start),i=i.withContentNameScopesList(i.nameScopesList),re(r,e,t,i,o,y.endCaptures,_),o.produce(i,_[0].end);const E=i;if(i=i.parent,m=E.getAnchorPos(),!v&&E.getEnterPos()===n){i=E,o.produce(i,a),u=!0;return}}else{const y=r.getRule(b);o.produce(i,_[0].start);const E=i,R=y.getName(e.content,_),A=i.contentNameScopesList.pushAttributed(R,r);if(i=i.push(b,n,m,_[0].end===a,null,A,A),y instanceof Ke){const L=y;re(r,e,t,i,o,L.beginCaptures,_),o.produce(i,_[0].end),m=_[0].end;const x=L.getContentName(e.content,_),O=A.pushAttributed(x,r);if(i=i.withContentNameScopesList(O),L.endHasBackReferences&&(i=i.withEndRule(L.getEndWithResolvedBackReferences(e.content,_))),!v&&E.hasSameRuleAs(i)){i=i.pop(),o.produce(i,a),u=!0;return}}else if(y instanceof Ae){const L=y;re(r,e,t,i,o,L.beginCaptures,_),o.produce(i,_[0].end),m=_[0].end;const x=L.getContentName(e.content,_),O=A.pushAttributed(x,r);if(i=i.withContentNameScopesList(O),L.whileHasBackReferences&&(i=i.withEndRule(L.getWhileWithResolvedBackReferences(e.content,_))),!v&&E.hasSameRuleAs(i)){i=i.pop(),o.produce(i,a),u=!0;return}}else if(re(r,e,t,i,o,y.captures,_),o.produce(i,_[0].end),i=i.pop(),!v){i=i.safePop(),o.produce(i,a),u=!0;return}}_[0].end>n&&(n=_[0].end,t=!1)}}function tr(r,e,t,n,i,o){let s=i.beginRuleCapturedEOL?0:-1;const c=[];for(let a=i;a;a=a.pop()){const u=a.getRule(r);u instanceof Ae&&c.push({rule:u,stack:a})}for(let a=c.pop();a;a=c.pop()){const{ruleScanner:u,findOptions:m}=or(a.rule,r,a.stack.endRule,t,n===s),d=u.findNextMatchSync(e,n,m);if(d){if(d.ruleId!==zt){i=a.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(o.produce(a.stack,d.captureIndices[0].start),re(r,e,t,a.stack,o,a.rule.whileCaptures,d.captureIndices),o.produce(a.stack,d.captureIndices[0].end),s=d.captureIndices[0].end,d.captureIndices[0].end>n&&(n=d.captureIndices[0].end,t=!1))}else{i=a.stack.pop();break}}return{stack:i,linePos:n,anchorPosition:s,isFirstLine:t}}function nr(r,e,t,n,i,o){const s=rr(r,e,t,n,i,o),c=r.getInjections();if(c.length===0)return s;const a=ir(c,r,e,t,n,i,o);if(!a)return s;if(!s)return a;const u=s.captureIndices[0].start,m=a.captureIndices[0].start;return m<u||a.priorityMatch&&m===u?a:s}function rr(r,e,t,n,i,o){const s=i.getRule(r),{ruleScanner:c,findOptions:a}=Jt(s,r,i.endRule,t,n===o),u=c.findNextMatchSync(e,n,a);return u?{captureIndices:u.captureIndices,matchedRuleId:u.ruleId}:null}function ir(r,e,t,n,i,o,s){let c=Number.MAX_VALUE,a=null,u,m=0;const d=o.contentNameScopesList.getScopeNames();for(let h=0,p=r.length;h<p;h++){const _=r[h];if(!_.matcher(d))continue;const b=e.getRule(_.ruleId),{ruleScanner:v,findOptions:y}=Jt(b,e,null,n,i===s),E=v.findNextMatchSync(t,i,y);if(!E)continue;const R=E.captureIndices[0].start;if(!(R>=c)&&(c=R,a=E.captureIndices,u=E.ruleId,m=_.priority,c===i))break}return a?{priorityMatch:m===-1,captureIndices:a,matchedRuleId:u}:null}function Jt(r,e,t,n,i){return{ruleScanner:r.compileAG(e,t,n,i),findOptions:0}}function or(r,e,t,n,i){return{ruleScanner:r.compileWhileAG(e,t,n,i),findOptions:0}}function re(r,e,t,n,i,o,s){if(o.length===0)return;const c=e.content,a=Math.min(o.length,s.length),u=[],m=s[0].end;for(let d=0;d<a;d++){const h=o[d];if(h===null)continue;const p=s[d];if(p.length===0)continue;if(p.start>m)break;for(;u.length>0&&u[u.length-1].endPos<=p.start;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?i.produceFromScopes(u[u.length-1].scopes,p.start):i.produce(n,p.start),h.retokenizeCapturedWithRuleId){const b=h.getName(c,s),v=n.contentNameScopesList.pushAttributed(b,r),y=h.getContentName(c,s),E=v.pushAttributed(y,r),R=n.push(h.retokenizeCapturedWithRuleId,p.start,-1,!1,null,v,E),A=r.createOnigString(c.substring(0,p.end));Yt(r,A,t&&p.start===0,p.start,R,i,!1,0),Wt(A);continue}const _=h.getName(c,s);if(_!==null){const v=(u.length>0?u[u.length-1].scopes:n.contentNameScopesList).pushAttributed(_,r);u.push(new sr(v,p.end))}}for(;u.length>0;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var sr=class{constructor(r,e){f(this,"scopes");f(this,"endPos");this.scopes=r,this.endPos=e}};function ar(r,e,t,n,i,o,s,c){return new cr(r,e,t,n,i,o,s,c)}function vt(r,e,t,n,i){const o=Re(e,Se),s=qt.getCompiledRuleId(t,n,i.repository);for(const c of o)r.push({debugSelector:e,matcher:c.matcher,ruleId:s,grammar:i,priority:c.priority})}function Se(r,e){if(e.length<r.length)return!1;let t=0;return r.every(n=>{for(let i=t;i<e.length;i++)if(lr(e[i],n))return t=i+1,!0;return!1})}function lr(r,e){if(!r)return!1;if(r===e)return!0;const t=e.length;return r.length>t&&r.substr(0,t)===e&&r[t]==="."}var cr=class{constructor(r,e,t,n,i,o,s,c){f(this,"_rootId");f(this,"_lastRuleId");f(this,"_ruleId2desc");f(this,"_includedGrammars");f(this,"_grammarRepository");f(this,"_grammar");f(this,"_injections");f(this,"_basicScopeAttributesProvider");f(this,"_tokenTypeMatchers");if(this._rootScopeName=r,this.balancedBracketSelectors=o,this._onigLib=c,this._basicScopeAttributesProvider=new Zn(t,n),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=bt(e,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const a of Object.keys(i)){const u=Re(a,Se);for(const m of u)this._tokenTypeMatchers.push({matcher:m.matcher,type:i[a]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const r of this._ruleId2desc)r&&r.dispose()}createOnigScanner(r){return this._onigLib.createOnigScanner(r)}createOnigString(r){return this._onigLib.createOnigString(r)}getMetadataForScope(r){return this._basicScopeAttributesProvider.getBasicScopeAttributes(r)}_collectInjections(){const r={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},e=[],t=this._rootScopeName,n=r.lookup(t);if(n){const i=n.injections;if(i)for(let s in i)vt(e,s,i[s],this,n);const o=this._grammarRepository.injections(t);o&&o.forEach(s=>{const c=this.getExternalGrammar(s);if(c){const a=c.injectionSelector;a&&vt(e,a,c,this,c)}})}return e.sort((i,o)=>i.priority-o.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(r){const e=++this._lastRuleId,t=r(e);return this._ruleId2desc[e]=t,t}getRule(r){return this._ruleId2desc[r]}getExternalGrammar(r,e){if(this._includedGrammars[r])return this._includedGrammars[r];if(this._grammarRepository){const t=this._grammarRepository.lookup(r);if(t)return this._includedGrammars[r]=bt(t,e&&e.$base),this._includedGrammars[r]}}tokenizeLine(r,e,t=0){const n=this._tokenize(r,e,!1,t);return{tokens:n.lineTokens.getResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}tokenizeLine2(r,e,t=0){const n=this._tokenize(r,e,!0,t);return{tokens:n.lineTokens.getBinaryResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}_tokenize(r,e,t,n){this._rootId===-1&&(this._rootId=qt.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!e||e===Ye.NULL){i=!0;const u=this._basicScopeAttributesProvider.getDefaultAttributes(),m=this.themeProvider.getDefaults(),d=Q.set(0,u.languageId,u.tokenType,null,m.fontStyle,m.foregroundId,m.backgroundId),h=this.getRule(this._rootId).getName(null,null);let p;h?p=ie.createRootAndLookUpScopeName(h,d,this):p=ie.createRoot("unknown",d),e=new Ye(null,this._rootId,-1,-1,!1,null,p,p)}else i=!1,e.reset();r=r+`
|
|
4
4
|
`;const o=this.createOnigString(r),s=o.content.length,c=new dr(t,r,this._tokenTypeMatchers,this.balancedBracketSelectors),a=Yt(this,o,i,0,e,c,!0,n);return Wt(o),{lineLength:s,lineTokens:c,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function bt(r,e){return r=kn(r),r.repository=r.repository||{},r.repository.$self={$vscodeTextmateLocation:r.$vscodeTextmateLocation,patterns:r.patterns,name:r.scopeName},r.repository.$base=e||r.repository.$self,r}var ie=class j{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(e,t){let n=e,i=(e==null?void 0:e.scopePath)??null;for(const o of t)i=Be.push(i,o.scopeNames),n=new j(n,i,o.encodedTokenAttributes);return n}static createRoot(e,t){return new j(null,new Be(null,e),t)}static createRootAndLookUpScopeName(e,t,n){const i=n.getMetadataForScope(e),o=new Be(null,e),s=n.themeProvider.themeMatch(o),c=j.mergeAttributes(t,i,s);return new j(null,o,c)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return j.equals(this,e)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let i=-1,o=0,s=0;return n!==null&&(i=n.fontStyle,o=n.foregroundId,s=n.backgroundId),Q.set(e,t.languageId,t.tokenType,null,i,o,s)}pushAttributed(e,t){if(e===null)return this;if(e.indexOf(" ")===-1)return j._pushAttributed(this,e,t);const n=e.split(/ /g);let i=this;for(const o of n)i=j._pushAttributed(i,o,t);return i}static _pushAttributed(e,t,n){const i=n.getMetadataForScope(t),o=e.scopePath.push(t),s=n.themeProvider.themeMatch(o),c=j.mergeAttributes(e.tokenAttributes,i,s);return new j(e,o,c)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){var i;const t=[];let n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(((i=n.parent)==null?void 0:i.scopePath)??null)}),n=n.parent;return n===e?t.reverse():void 0}},G,Ye=(G=class{constructor(e,t,n,i,o,s,c,a){f(this,"_stackElementBrand");f(this,"_enterPos");f(this,"_anchorPos");f(this,"depth");this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=o,this.endRule=s,this.nameScopesList=c,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=i}equals(e){return e===null?!1:G._equals(this,e)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?ie.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){G._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,t,n,i,o,s,c){return new G(this,e,t,n,i,o,s,c)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){var n,i;return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${(n=this.nameScopesList)==null?void 0:n.toString()}, ${(i=this.contentNameScopesList)==null?void 0:i.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new G(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){var e,t,n;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((t=this.nameScopesList)==null?void 0:t.getExtensionIfDefined(((e=this.parent)==null?void 0:e.nameScopesList)??null))??[],contentNameScopesList:((n=this.contentNameScopesList)==null?void 0:n.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(e,t){const n=ie.fromExtension((e==null?void 0:e.nameScopesList)??null,t.nameScopesList);return new G(e,t.ruleId,t.enterPos??-1,t.anchorPos??-1,t.beginRuleCapturedEOL,t.endRule,n,ie.fromExtension(n,t.contentNameScopesList))}},f(G,"NULL",new G(null,0,0,0,!1,null,null,null)),G),ur=class{constructor(r,e){f(this,"balancedBracketScopes");f(this,"unbalancedBracketScopes");f(this,"allowAny",!1);this.balancedBracketScopes=r.flatMap(t=>t==="*"?(this.allowAny=!0,[]):Re(t,Se).map(n=>n.matcher)),this.unbalancedBracketScopes=e.flatMap(t=>Re(t,Se).map(n=>n.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(r){for(const e of this.unbalancedBracketScopes)if(e(r))return!1;for(const e of this.balancedBracketScopes)if(e(r))return!0;return this.allowAny}},dr=class{constructor(r,e,t,n){f(this,"_emitBinaryTokens");f(this,"_lineText");f(this,"_tokens");f(this,"_binaryTokens");f(this,"_lastTokenEndIndex");f(this,"_tokenTypeOverrides");this.balancedBracketSelectors=n,this._emitBinaryTokens=r,this._tokenTypeOverrides=t,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(r,e){this.produceFromScopes(r.contentNameScopesList,e)}produceFromScopes(r,e){var n;if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let i=(r==null?void 0:r.tokenAttributes)??0,o=!1;if((n=this.balancedBracketSelectors)!=null&&n.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const s=(r==null?void 0:r.getScopeNames())??[];for(const c of this._tokenTypeOverrides)c.matcher(s)&&(i=Q.set(i,0,c.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(s))}if(o&&(i=Q.set(i,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=e;return}const t=(r==null?void 0:r.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:t}),this._lastTokenEndIndex=e}getResult(r,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(r,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(r,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(r,e),this._binaryTokens[this._binaryTokens.length-2]=0);const t=new Uint32Array(this._binaryTokens.length);for(let n=0,i=this._binaryTokens.length;n<i;n++)t[n]=this._binaryTokens[n];return t}},mr=class{constructor(r,e){f(this,"_grammars",new Map);f(this,"_rawGrammars",new Map);f(this,"_injectionGrammars",new Map);f(this,"_theme");this._onigLib=e,this._theme=r}dispose(){for(const r of this._grammars.values())r.dispose()}setTheme(r){this._theme=r}getColorMap(){return this._theme.getColorMap()}addGrammar(r,e){this._rawGrammars.set(r.scopeName,r),e&&this._injectionGrammars.set(r.scopeName,e)}lookup(r){return this._rawGrammars.get(r)}injections(r){return this._injectionGrammars.get(r)}getDefaults(){return this._theme.getDefaults()}themeMatch(r){return this._theme.match(r)}grammarForScopeName(r,e,t,n,i){if(!this._grammars.has(r)){let o=this._rawGrammars.get(r);if(!o)return null;this._grammars.set(r,ar(r,o,e,t,n,i,this,this._onigLib))}return this._grammars.get(r)}},hr=class{constructor(e){f(this,"_options");f(this,"_syncRegistry");f(this,"_ensureGrammarCache");this._options=e,this._syncRegistry=new mr(be.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(be.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new ur(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,i,o){const s=new Un(this._syncRegistry,e);for(;s.Q.length>0;)s.Q.map(c=>this._loadSingleGrammar(c.scopeName)),s.processQueue();return this._grammarForScopeName(e,t,n,i,o)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const t=this._options.loadGrammar(e);if(t){const n=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,i=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,i)}_grammarForScopeName(e,t=0,n=null,i=null,o=null){return this._syncRegistry.grammarForScopeName(e,t,n,i,o)}},Je=Ye.NULL;const pr=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class me{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}me.prototype.normal={};me.prototype.property={};me.prototype.space=void 0;function Xt(r,e){const t={},n={};for(const i of r)Object.assign(t,i.property),Object.assign(n,i.normal);return new me(t,n,e)}function Xe(r){return r.toLowerCase()}class V{constructor(e,t){this.attribute=t,this.property=e}}V.prototype.attribute="";V.prototype.booleanish=!1;V.prototype.boolean=!1;V.prototype.commaOrSpaceSeparated=!1;V.prototype.commaSeparated=!1;V.prototype.defined=!1;V.prototype.mustUseProperty=!1;V.prototype.number=!1;V.prototype.overloadedBoolean=!1;V.prototype.property="";V.prototype.spaceSeparated=!1;V.prototype.space=void 0;let fr=0;const T=q(),P=q(),Qe=q(),g=q(),S=q(),J=q(),M=q();function q(){return 2**++fr}const Ze=Object.freeze(Object.defineProperty({__proto__:null,boolean:T,booleanish:P,commaOrSpaceSeparated:M,commaSeparated:J,number:g,overloadedBoolean:Qe,spaceSeparated:S},Symbol.toStringTag,{value:"Module"})),je=Object.keys(Ze);class rt extends V{constructor(e,t,n,i){let o=-1;if(super(e,t),Rt(this,"space",i),typeof n=="number")for(;++o<je.length;){const s=je[o];Rt(this,je[o],(n&Ze[s])===Ze[s])}}}rt.prototype.defined=!0;function Rt(r,e,t){t&&(r[e]=t)}function Z(r){const e={},t={};for(const[n,i]of Object.entries(r.properties)){const o=new rt(n,r.transform(r.attributes||{},n),i,r.space);r.mustUseProperty&&r.mustUseProperty.includes(n)&&(o.mustUseProperty=!0),e[n]=o,t[Xe(n)]=n,t[Xe(o.attribute)]=n}return new me(e,t,r.space)}const Qt=Z({properties:{ariaActiveDescendant:null,ariaAtomic:P,ariaAutoComplete:null,ariaBusy:P,ariaChecked:P,ariaColCount:g,ariaColIndex:g,ariaColSpan:g,ariaControls:S,ariaCurrent:null,ariaDescribedBy:S,ariaDetails:null,ariaDisabled:P,ariaDropEffect:S,ariaErrorMessage:null,ariaExpanded:P,ariaFlowTo:S,ariaGrabbed:P,ariaHasPopup:null,ariaHidden:P,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:S,ariaLevel:g,ariaLive:null,ariaModal:P,ariaMultiLine:P,ariaMultiSelectable:P,ariaOrientation:null,ariaOwns:S,ariaPlaceholder:null,ariaPosInSet:g,ariaPressed:P,ariaReadOnly:P,ariaRelevant:null,ariaRequired:P,ariaRoleDescription:S,ariaRowCount:g,ariaRowIndex:g,ariaRowSpan:g,ariaSelected:P,ariaSetSize:g,ariaSort:null,ariaValueMax:g,ariaValueMin:g,ariaValueNow:g,ariaValueText:null,role:null},transform(r,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function Zt(r,e){return e in r?r[e]:e}function en(r,e){return Zt(r,e.toLowerCase())}const _r=Z({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:J,acceptCharset:S,accessKey:S,action:null,allow:null,allowFullScreen:T,allowPaymentRequest:T,allowUserMedia:T,alt:null,as:null,async:T,autoCapitalize:null,autoComplete:S,autoFocus:T,autoPlay:T,blocking:S,capture:null,charSet:null,checked:T,cite:null,className:S,cols:g,colSpan:null,content:null,contentEditable:P,controls:T,controlsList:S,coords:g|J,crossOrigin:null,data:null,dateTime:null,decoding:null,default:T,defer:T,dir:null,dirName:null,disabled:T,download:Qe,draggable:P,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:T,formTarget:null,headers:S,height:g,hidden:Qe,high:g,href:null,hrefLang:null,htmlFor:S,httpEquiv:S,id:null,imageSizes:null,imageSrcSet:null,inert:T,inputMode:null,integrity:null,is:null,isMap:T,itemId:null,itemProp:S,itemRef:S,itemScope:T,itemType:S,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:T,low:g,manifest:null,max:null,maxLength:g,media:null,method:null,min:null,minLength:g,multiple:T,muted:T,name:null,nonce:null,noModule:T,noValidate:T,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:T,optimum:g,pattern:null,ping:S,placeholder:null,playsInline:T,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:T,referrerPolicy:null,rel:S,required:T,reversed:T,rows:g,rowSpan:g,sandbox:S,scope:null,scoped:T,seamless:T,selected:T,shadowRootClonable:T,shadowRootDelegatesFocus:T,shadowRootMode:null,shape:null,size:g,sizes:null,slot:null,span:g,spellCheck:P,src:null,srcDoc:null,srcLang:null,srcSet:null,start:g,step:null,style:null,tabIndex:g,target:null,title:null,translate:null,type:null,typeMustMatch:T,useMap:null,value:P,width:g,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:S,axis:null,background:null,bgColor:null,border:g,borderColor:null,bottomMargin:g,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:T,declare:T,event:null,face:null,frame:null,frameBorder:null,hSpace:g,leftMargin:g,link:null,longDesc:null,lowSrc:null,marginHeight:g,marginWidth:g,noResize:T,noHref:T,noShade:T,noWrap:T,object:null,profile:null,prompt:null,rev:null,rightMargin:g,rules:null,scheme:null,scrolling:P,standby:null,summary:null,text:null,topMargin:g,valueType:null,version:null,vAlign:null,vLink:null,vSpace:g,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:T,disableRemotePlayback:T,prefix:null,property:null,results:g,security:null,unselectable:null},space:"html",transform:en}),gr=Z({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:M,accentHeight:g,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:g,amplitude:g,arabicForm:null,ascent:g,attributeName:null,attributeType:null,azimuth:g,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:g,by:null,calcMode:null,capHeight:g,className:S,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:g,diffuseConstant:g,direction:null,display:null,dur:null,divisor:g,dominantBaseline:null,download:T,dx:null,dy:null,edgeMode:null,editable:null,elevation:g,enableBackground:null,end:null,event:null,exponent:g,externalResourcesRequired:null,fill:null,fillOpacity:g,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:J,g2:J,glyphName:J,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:g,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:g,horizOriginX:g,horizOriginY:g,id:null,ideographic:g,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:g,k:g,k1:g,k2:g,k3:g,k4:g,kernelMatrix:M,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:g,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:g,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:g,overlineThickness:g,paintOrder:null,panose1:null,path:null,pathLength:g,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:S,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:g,pointsAtY:g,pointsAtZ:g,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:M,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:M,rev:M,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:M,requiredFeatures:M,requiredFonts:M,requiredFormats:M,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:g,specularExponent:g,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:g,strikethroughThickness:g,string:null,stroke:null,strokeDashArray:M,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:g,strokeOpacity:g,strokeWidth:null,style:null,surfaceScale:g,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:M,tabIndex:g,tableValues:null,target:null,targetX:g,targetY:g,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:M,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:g,underlineThickness:g,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:g,values:null,vAlphabetic:g,vMathematical:g,vectorEffect:null,vHanging:g,vIdeographic:g,version:null,vertAdvY:g,vertOriginX:g,vertOriginY:g,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:g,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Zt}),tn=Z({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(r,e){return"xlink:"+e.slice(5).toLowerCase()}}),nn=Z({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:en}),rn=Z({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(r,e){return"xml:"+e.slice(3).toLowerCase()}}),yr=/[A-Z]/g,Tt=/-[a-z]/g,Er=/^data[-\w.:]+$/i;function vr(r,e){const t=Xe(e);let n=e,i=V;if(t in r.normal)return r.property[r.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&Er.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(Tt,Rr);n="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!Tt.test(o)){let s=o.replace(yr,br);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}i=rt}return new i(n,e)}function br(r){return"-"+r.toLowerCase()}function Rr(r){return r.charAt(1).toUpperCase()}const Tr=Xt([Qt,_r,tn,nn,rn],"html"),on=Xt([Qt,gr,tn,nn,rn],"svg"),At={}.hasOwnProperty;function Ar(r,e){const t=e||{};function n(i,...o){let s=n.invalid;const c=n.handlers;if(i&&At.call(i,r)){const a=String(i[r]);s=At.call(c,a)?c[a]:n.unknown}if(s)return s.call(this,i,...o)}return n.handlers=t.handlers||{},n.invalid=t.invalid,n.unknown=t.unknown,n}const Sr=/["&'<>`]/g,Lr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Pr=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,kr=/[|\\{}()[\]^$+*?.]/g,St=new WeakMap;function Ir(r,e){if(r=r.replace(e.subset?wr(e.subset):Sr,n),e.subset||e.escapeOnly)return r;return r.replace(Lr,t).replace(Pr,n);function t(i,o,s){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),e)}function n(i,o,s){return e.format(i.charCodeAt(0),s.charCodeAt(o+1),e)}}function wr(r){let e=St.get(r);return e||(e=Or(r),St.set(r,e)),e}function Or(r){const e=[];let t=-1;for(;++t<r.length;)e.push(r[t].replace(kr,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const Cr=/[\dA-Fa-f]/;function Dr(r,e,t){const n="&#x"+r.toString(16).toUpperCase();return t&&e&&!Cr.test(String.fromCharCode(e))?n:n+";"}const Nr=/\d/;function xr(r,e,t){const n="&#"+String(r);return t&&e&&!Nr.test(String.fromCharCode(e))?n:n+";"}const Vr=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],$e={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Mr=["cent","copy","divide","gt","lt","not","para","times"],sn={}.hasOwnProperty,et={};let fe;for(fe in $e)sn.call($e,fe)&&(et[$e[fe]]=fe);const Br=/[^\dA-Za-z]/;function Gr(r,e,t,n){const i=String.fromCharCode(r);if(sn.call(et,i)){const o=et[i],s="&"+o;return t&&Vr.includes(o)&&!Mr.includes(o)&&(!n||e&&e!==61&&Br.test(String.fromCharCode(e)))?s:s+";"}return""}function jr(r,e,t){let n=Dr(r,e,t.omitOptionalSemicolons),i;if((t.useNamedReferences||t.useShortestReferences)&&(i=Gr(r,e,t.omitOptionalSemicolons,t.attribute)),(t.useShortestReferences||!i)&&t.useShortestReferences){const o=xr(r,e,t.omitOptionalSemicolons);o.length<n.length&&(n=o)}return i&&(!t.useShortestReferences||i.length<n.length)?i:n}function X(r,e){return Ir(r,Object.assign({format:jr},e))}const $r=/^>|^->|<!--|-->|--!>|<!-$/g,Ur=[">"],Hr=["<",">"];function Wr(r,e,t,n){return n.settings.bogusComments?"<?"+X(r.value,Object.assign({},n.settings.characterReferences,{subset:Ur}))+">":"<!--"+r.value.replace($r,i)+"-->";function i(o){return X(o,Object.assign({},n.settings.characterReferences,{subset:Hr}))}}function Fr(r,e,t,n){return"<!"+(n.settings.upperDoctype?"DOCTYPE":"doctype")+(n.settings.tightDoctype?"":" ")+"html>"}function Lt(r,e){const t=String(r);if(typeof e!="string")throw new TypeError("Expected character");let n=0,i=t.indexOf(e);for(;i!==-1;)n++,i=t.indexOf(e,i+e.length);return n}function zr(r,e){const t=e||{};return(r[r.length-1]===""?[...r,""]:r).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}function qr(r){return r.join(" ").trim()}const Kr=/[ \t\n\f\r]/g;function it(r){return typeof r=="object"?r.type==="text"?Pt(r.value):!1:Pt(r)}function Pt(r){return r.replace(Kr,"")===""}const w=ln(1),an=ln(-1),Yr=[];function ln(r){return e;function e(t,n,i){const o=t?t.children:Yr;let s=(n||0)+r,c=o[s];if(!i)for(;c&&it(c);)s+=r,c=o[s];return c}}const Jr={}.hasOwnProperty;function cn(r){return e;function e(t,n,i){return Jr.call(r,t.tagName)&&r[t.tagName](t,n,i)}}const ot=cn({body:Qr,caption:Ue,colgroup:Ue,dd:ni,dt:ti,head:Ue,html:Xr,li:ei,optgroup:ri,option:ii,p:Zr,rp:kt,rt:kt,tbody:si,td:It,tfoot:ai,th:It,thead:oi,tr:li});function Ue(r,e,t){const n=w(t,e,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&it(n.value.charAt(0)))}function Xr(r,e,t){const n=w(t,e);return!n||n.type!=="comment"}function Qr(r,e,t){const n=w(t,e);return!n||n.type!=="comment"}function Zr(r,e,t){const n=w(t,e);return n?n.type==="element"&&(n.tagName==="address"||n.tagName==="article"||n.tagName==="aside"||n.tagName==="blockquote"||n.tagName==="details"||n.tagName==="div"||n.tagName==="dl"||n.tagName==="fieldset"||n.tagName==="figcaption"||n.tagName==="figure"||n.tagName==="footer"||n.tagName==="form"||n.tagName==="h1"||n.tagName==="h2"||n.tagName==="h3"||n.tagName==="h4"||n.tagName==="h5"||n.tagName==="h6"||n.tagName==="header"||n.tagName==="hgroup"||n.tagName==="hr"||n.tagName==="main"||n.tagName==="menu"||n.tagName==="nav"||n.tagName==="ol"||n.tagName==="p"||n.tagName==="pre"||n.tagName==="section"||n.tagName==="table"||n.tagName==="ul"):!t||!(t.type==="element"&&(t.tagName==="a"||t.tagName==="audio"||t.tagName==="del"||t.tagName==="ins"||t.tagName==="map"||t.tagName==="noscript"||t.tagName==="video"))}function ei(r,e,t){const n=w(t,e);return!n||n.type==="element"&&n.tagName==="li"}function ti(r,e,t){const n=w(t,e);return!!(n&&n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd"))}function ni(r,e,t){const n=w(t,e);return!n||n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd")}function kt(r,e,t){const n=w(t,e);return!n||n.type==="element"&&(n.tagName==="rp"||n.tagName==="rt")}function ri(r,e,t){const n=w(t,e);return!n||n.type==="element"&&n.tagName==="optgroup"}function ii(r,e,t){const n=w(t,e);return!n||n.type==="element"&&(n.tagName==="option"||n.tagName==="optgroup")}function oi(r,e,t){const n=w(t,e);return!!(n&&n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot"))}function si(r,e,t){const n=w(t,e);return!n||n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot")}function ai(r,e,t){return!w(t,e)}function li(r,e,t){const n=w(t,e);return!n||n.type==="element"&&n.tagName==="tr"}function It(r,e,t){const n=w(t,e);return!n||n.type==="element"&&(n.tagName==="td"||n.tagName==="th")}const ci=cn({body:mi,colgroup:hi,head:di,html:ui,tbody:pi});function ui(r){const e=w(r,-1);return!e||e.type!=="comment"}function di(r){const e=new Set;for(const n of r.children)if(n.type==="element"&&(n.tagName==="base"||n.tagName==="title")){if(e.has(n.tagName))return!1;e.add(n.tagName)}const t=r.children[0];return!t||t.type==="element"}function mi(r){const e=w(r,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&it(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function hi(r,e,t){const n=an(t,e),i=w(r,-1,!0);return t&&n&&n.type==="element"&&n.tagName==="colgroup"&&ot(n,t.children.indexOf(n),t)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function pi(r,e,t){const n=an(t,e),i=w(r,-1);return t&&n&&n.type==="element"&&(n.tagName==="thead"||n.tagName==="tbody")&&ot(n,t.children.indexOf(n),t)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const _e={name:[[`
|
|
5
5
|
\f\r &/=>`.split(""),`
|