sliccy 6.91.0 → 6.93.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui/.vite/manifest.json +209 -193
- package/dist/ui/assets/{SKILL-BKUxKc7f.js → SKILL-BdkyF8EU.js} +2 -0
- package/dist/ui/assets/{account-store-C1yfzSh8.js → account-store-9c4PkWuh.js} +1 -1
- package/dist/ui/assets/{account-store-WnXgLTc8.js → account-store-Becnsm1_.js} +2 -2
- package/dist/ui/assets/{adobe-CI_mfh6W.js → adobe-BaP3Wand.js} +1 -1
- package/dist/ui/assets/{adobe-CyU_4QFp.js → adobe-BzUeHCKr.js} +1 -1
- package/dist/ui/assets/{agent-message-to-chat-ChAiEgvC.js → agent-message-to-chat-LqFvUGRI.js} +1 -1
- package/dist/ui/assets/{apply-layout-Ch4rpOGr.js → apply-layout-DWyyaCog.js} +1 -1
- package/dist/ui/assets/{apps-pxc-GoM0.js → apps-5wY3IrHr.js} +1 -1
- package/dist/ui/assets/{azure-openai-HfNUqh5T.js → azure-openai-D4Ggho3w.js} +1 -1
- package/dist/ui/assets/{azure-openai-Ct81BkzM.js → azure-openai-DM6LTLK3.js} +1 -1
- package/dist/ui/assets/{bsh-watchdog-BM2oq7W2.js → bsh-watchdog-DY8mtwiy.js} +1 -1
- package/dist/ui/assets/{cerebras-C650XqL5.js → cerebras-Bj8vZVel.js} +1 -1
- package/dist/ui/assets/{cerebras-C0stC2m8.js → cerebras-D0h32sBp.js} +1 -1
- package/dist/ui/assets/{composer-speech-Cy4g3lh3.js → composer-speech-BEsclnPz.js} +1 -1
- package/dist/ui/assets/{connect-surface-BQZqnOMC.js → connect-surface-BIgNmgme.js} +1 -1
- package/dist/ui/assets/derive-Do9C10kj.js +1 -0
- package/dist/ui/assets/{dip-B58NQGEQ.js → dip-CRb_i6v6.js} +1 -1
- package/dist/ui/assets/{ensure-speech-assets-CKwQ54O1.js → ensure-speech-assets-DGe2vAs-.js} +1 -1
- package/dist/ui/assets/{esbuild-wasm-C_e51T2J.js → esbuild-wasm-CinjyQaN.js} +1 -1
- package/dist/ui/assets/{fs-Dnva5HZ3.js → fs-BDrRWsaw.js} +1 -1
- package/dist/ui/assets/{fs-B4qf4l57.js → fs-DFgauCYS.js} +2 -2
- package/dist/ui/assets/{github-BZFgkPO1.js → github-DSj_Ykjo.js} +2 -2
- package/dist/ui/assets/{github-copilot-Ch0RZpCi.js → github-copilot-J_U-KVRL.js} +1 -1
- package/dist/ui/assets/{github-copilot-BxH2PYuM.js → github-copilot-Nr0g-GGT.js} +1 -1
- package/dist/ui/assets/{github-install-DpekDVQj.js → github-install-BA1OlFF9.js} +1 -1
- package/dist/ui/assets/{github-BGwttSIP.js → github-o83EeWHv.js} +1 -1
- package/dist/ui/assets/{github-zip-0POubY9i.js → github-zip-pJuqUBAb.js} +1 -1
- package/dist/ui/assets/{hear-BqNAK8-P.js → hear-B4FZ3b1i.js} +1 -1
- package/dist/ui/assets/installer-C-ZqHeoQ.js +4 -0
- package/dist/ui/assets/{js-realm-worker-DrcpR5sl.js → js-realm-worker-JbIL5mVZ.js} +1 -1
- package/dist/ui/assets/kernel-worker-C36kjoyJ.js +5241 -0
- package/dist/ui/assets/key-BKGnJdkU.js +1 -0
- package/dist/ui/assets/leader-session-events-Iq9N1w56.js +1 -0
- package/dist/ui/assets/{local-llm-djwmLEi-.js → local-llm-B-qSN2xR.js} +1 -1
- package/dist/ui/assets/{local-llm-C1Or3Y52.js → local-llm-M1vfLIfi.js} +1 -1
- package/dist/ui/assets/{magick-wasm-DVJe3sB9.js → magick-wasm-SReqqSFf.js} +1 -1
- package/dist/ui/assets/{main-CjaIZrJd.js → main-DX4-_Jcu.js} +3 -3
- package/dist/ui/assets/{mount-BNyT2nnD.js → mount-CISNNuFi.js} +1 -1
- package/dist/ui/assets/{mount-BRdDn52A.js → mount-DaMKwySD.js} +2 -2
- package/dist/ui/assets/{mount-recovery-BsWQfSkJ.js → mount-recovery-DuNa_gDS.js} +1 -1
- package/dist/ui/assets/{new-session-362b6Pml.js → new-session-CtMabzCy.js} +2 -2
- package/dist/ui/assets/{oauth-bootstrap-C5IBUZ3l.js → oauth-bootstrap-D4wOG7r-.js} +2 -2
- package/dist/ui/assets/{onboarding-orchestrator-CnKr0yBW.js → onboarding-orchestrator-BF4m_3Ig.js} +1 -1
- package/dist/ui/assets/{openai-codex-YDtg8ur-.js → openai-codex-B-msy2Vx.js} +1 -1
- package/dist/ui/assets/{openai-codex-BKMbZQZc.js → openai-codex-BpwmCdMx.js} +1 -1
- package/dist/ui/assets/{openrouter-C931t0hQ.js → openrouter-C4LniVur.js} +1 -1
- package/dist/ui/assets/{openrouter-DkuBgJvP.js → openrouter-DNGVJ7a3.js} +1 -1
- package/dist/ui/assets/{openrouter-oauth-CMiNl7hg.js → openrouter-oauth-BFYZMJ0V.js} +1 -1
- package/dist/ui/assets/{openrouter-oauth-D7kC0-6w.js → openrouter-oauth-DuD6RTkR.js} +1 -1
- package/dist/ui/assets/panel-rpc-handlers-D0pJdTiL.js +2 -0
- package/dist/ui/assets/{panelize-shell-Sersv_GI.js → panelize-shell-BXouoIAD.js} +1 -1
- package/dist/ui/assets/{provider-Qy7QIkOc.js → provider-DFOH8yQP.js} +2 -2
- package/dist/ui/assets/{provider-DePb9O4W.js → provider-DxCcTmqx.js} +1 -1
- package/dist/ui/assets/{provider-settings-DiEr5ZRx.js → provider-settings-CO157WVv.js} +1 -1
- package/dist/ui/assets/{provider-settings-wn9tOS6g.js → provider-settings-D-ZsyczU.js} +1 -1
- package/dist/ui/assets/provider-store-access-BbjnKiLx.js +1 -0
- package/dist/ui/assets/{provider-store-access-CjMqlHh9.js → provider-store-access-CgCrUQEn.js} +2 -2
- package/dist/ui/assets/{providers-CdbrXnHp.js → providers-DO_p0xND.js} +1 -1
- package/dist/ui/assets/{providers-DWSKNmmF.js → providers-DnJR1mMn.js} +2 -2
- package/dist/ui/assets/{quick-llm-CJjhx9Bw.js → quick-llm-C3kXqZlY.js} +1 -1
- package/dist/ui/assets/record-C0lt6kKE.js +1 -0
- package/dist/ui/assets/{recovery-screen-B6XY3sMT.js → recovery-screen-kS6MV4Xg.js} +1 -1
- package/dist/ui/assets/{redirect-uri-Bo2sC4P3.js → redirect-uri-BzP_62xp.js} +1 -1
- package/dist/ui/assets/{session-freezer-Dp9JZe-A.js → session-freezer-QzhGhlzG.js} +3 -3
- package/dist/ui/assets/{setup-feature-flags-remote-z12X6D4v.js → setup-feature-flags-remote-DgVAsT7C.js} +1 -1
- package/dist/ui/assets/{setup-standalone-prelude-BTj3azbf.js → setup-standalone-prelude-DsB5MkPB.js} +1 -1
- package/dist/ui/assets/{setup-sudo-CErVw53c.js → setup-sudo-BdKr5Kuf.js} +2 -2
- package/dist/ui/assets/shared-pJ1rPAkk.js +1 -0
- package/dist/ui/assets/shared-t4jDsyrf.js +4 -0
- package/dist/ui/assets/{skills-BeciHeJd.js → skills-DeqgtlUL.js} +1 -1
- package/dist/ui/assets/slicc-version-Cf6ItGqM.js +1 -0
- package/dist/ui/assets/{speak-BSK3Souh.js → speak-CrgQ-hNi.js} +1 -1
- package/dist/ui/assets/{sprinkle-bridge-CSfksHce.js → sprinkle-bridge-Cdo9vfXE.js} +1 -1
- package/dist/ui/assets/{sprinkle-manager-EEbsd3wB.js → sprinkle-manager-I7XOumZQ.js} +1 -1
- package/dist/ui/assets/{src-CUFrGOpV.js → src-DFt0HWZc.js} +152 -95
- package/dist/ui/assets/{store-DGOhX8_w.js → store-BG9Q_aZD.js} +1 -1
- package/dist/ui/assets/{store-_EfBoYjW.js → store-gpb186tM.js} +1 -1
- package/dist/ui/assets/{sudo-C8vnwjt-.js → sudo-C_2D7T0c.js} +1 -1
- package/dist/ui/assets/{transformers-env-DPjdc2EQ.js → transformers-env-Iknr0kLF.js} +1 -1
- package/dist/ui/assets/{upgrade-detection-CW8nHgbA.js → upgrade-detection-BTZMZOnD.js} +1 -1
- package/dist/ui/assets/{voice-reply-BNX-jA0G.js → voice-reply-BUnKYH8O.js} +1 -1
- package/dist/ui/assets/{wc-attach-Dg3dkg8N.js → wc-attach-CkeEl04a.js} +2 -2
- package/dist/ui/assets/wc-extension-CvonxeUh.js +2 -0
- package/dist/ui/assets/wc-float-label-CQitMvjM.js +1 -0
- package/dist/ui/assets/wc-floatbar-online-uDk8A8hD.js +1 -0
- package/dist/ui/assets/wc-follower-AI8PF-EP.js +17 -0
- package/dist/ui/assets/wc-live-0ND6N-9h.js +8 -0
- package/dist/ui/assets/{wc-nav-Bo-m8RiK.js → wc-nav-KB9V9YIf.js} +2 -2
- package/dist/ui/assets/{wc-onboarding-DFFKlypy.js → wc-onboarding-DYhI6TEE.js} +2 -2
- package/dist/ui/assets/{wc-placeholder-CHx_pcKq.js → wc-placeholder-DYloDixz.js} +2 -2
- package/dist/ui/assets/{wc-settings-CB2nUyx1.js → wc-settings-8yS_7tZR.js} +2 -2
- package/dist/ui/assets/{wc-shell-hfLGwN7O.js → wc-shell-DejC0Myk.js} +3 -3
- package/dist/ui/assets/{wc-sprinkles-yYuetahF.js → wc-sprinkles-EHJeVQcY.js} +2 -2
- package/dist/ui/assets/wc-tray-D6n1OY5g.js +2 -0
- package/dist/ui/assets/wc-tray-scoops-YUFzbJOw.js +5 -0
- package/dist/ui/assets/wc-unit-context-DvrjSIee.js +1 -0
- package/dist/ui/assets/{welcome-detection-DjomEbCT.js → welcome-detection-iVN_xL76.js} +1 -1
- package/dist/ui/assets/{whisper-session-DpDs0sDL.js → whisper-session-C9hx7LSp.js} +2 -2
- package/dist/ui/assets/{xai-grok-BTxvDdNy.js → xai-grok-B63HB-D_.js} +1 -1
- package/dist/ui/assets/{xai-grok-1GJSyFOo.js → xai-grok-BuzpaZ3J.js} +1 -1
- package/dist/ui/index.html +6 -6
- package/dist/ui/logos/slicc-icon-tinted-master-1024.png +0 -0
- package/dist/ui/packages/webapp/index.html +6 -6
- package/package.json +1 -1
- package/dist/ui/assets/installer-DW4F27JY.js +0 -3
- package/dist/ui/assets/kernel-worker-CC5u39mz.js +0 -5233
- package/dist/ui/assets/leader-session-events-CC6poXIx.js +0 -1
- package/dist/ui/assets/panel-rpc-handlers-Dz6tHtwK.js +0 -2
- package/dist/ui/assets/provider-store-access-CW8iwqLX.js +0 -1
- package/dist/ui/assets/record-Cy655bTh.js +0 -1
- package/dist/ui/assets/shared-CddfUR6k.js +0 -1
- package/dist/ui/assets/shared-DqziuFis.js +0 -4
- package/dist/ui/assets/slicc-version-CdTEe-7X.js +0 -1
- package/dist/ui/assets/wc-extension-DKIN3f-l.js +0 -2
- package/dist/ui/assets/wc-float-label-D7p-4xyd.js +0 -1
- package/dist/ui/assets/wc-follower-B9fAW5o_.js +0 -17
- package/dist/ui/assets/wc-live-Djx7vpPK.js +0 -8
- package/dist/ui/assets/wc-permissions-registry-DfoogAy3.js +0 -1
- package/dist/ui/assets/wc-tray-osj-XVdy.js +0 -2
- package/dist/ui/assets/wc-tray-scoops-Bv6lSzxH.js +0 -5
- package/dist/ui/assets/wc-unit-context-Da9Dpd9y.js +0 -1
|
@@ -3827,7 +3827,7 @@ slicc-layout .slicc-layout__zone {
|
|
|
3827
3827
|
sit side by side or stacked — see zoneAxis(). */
|
|
3828
3828
|
slicc-layout .slicc-layout__zone[data-axis='row'] { flex-direction: row; }
|
|
3829
3829
|
slicc-layout .slicc-layout__zone[data-axis='col'] { flex-direction: column; }
|
|
3830
|
-
${ba}`,Ea=`slicc-layout-style`;function Da(e){if(e.getElementById(Ea))return;let t=e.createElement(`style`);t.id=Ea,t.textContent=Ta,(e.head??e.documentElement).appendChild(t)}function Oa(e,t){let n=document.createElement(e);return n.className=t,n}var ka=class extends HTMLElement{static observedAttributes=[`platform`];#e=m();#t=null;#n=!1;#r=Oa(`div`,`slicc-layout__root`);#i=Oa(`div`,`slicc-layout__parking`);#a=new Set;#o=null;#s=null;#c=0;#l=new MutationObserver(()=>this.#f());#u=new ma(this);connectedCallback(){Da(this.ownerDocument),this.#n=!0,this.#r.parentElement!==this&&this.append(this.#r),this.#i.parentElement!==this&&this.append(this.#i);for(let e of this.#u.overlays())e.parentElement!==this&&this.append(e);this.#v(),this.#f(),this.#l.observe(this,{childList:!0})}disconnectedCallback(){this.#n=!1,this.#l.disconnect(),this.#u.cancel(),this.#s?.disconnect(),this.#s=null,this.#c&&cancelAnimationFrame(this.#c),this.#c=0}attributeChangedCallback(e,t,n){e!==`platform`||t===n||!this.#n||this.#f(`environment`)}setLayout(e){this.#e=e?v(e):m(),this.#n&&this.#f(`set`)}getLayout(){return v(this.#e)}getResolved(){return this.#t?v(this.#t):null}getPlacedPanelIds(){return this.#t?g(this.#t).filter(e=>this.#a.has(e)):[]}isLocked(e){let t=this.#o??this.#t;return t?l(t,e):!1}environment(){let e=this.getBoundingClientRect(),t=this.getAttribute(`platform`);return{width:e.width,height:e.height,platform:t===`web`||t===`extension`||t===`electron`?t:void 0}}#d(){let e=new Map;for(let t of Array.from(this.querySelectorAll(`[${wa}]`))){if(!(t instanceof HTMLElement)||t.parentElement?.closest(`[data-slicc-panel]`))continue;let n=t.getAttribute(`panel-id`);n&&e.set(n,t)}return e}#f(e=`set`,t){let n=y(this.#e,this.environment());this.#o=n;let r=this.#d(),i=new Set,a=e=>this.#p(n,e,r,i),o=Oa(`div`,`slicc-layout__row`),s=a(`left`),c=a(`right`);s&&o.appendChild(s);let l=this.#m(n,r,i);l.style.flex=`1 1 0`,o.appendChild(l),c&&o.appendChild(c);let u=[],d=a(`top`);d&&u.push(d),u.push(o);let f=a(`bottom`);f&&u.push(f);let p=this.#g(n,r,i);p&&u.push(p);for(let[e,t]of r)i.has(e)||t.parentElement!==this.#i&&this.#i.appendChild(t);this.#r.replaceChildren(...u),this.#l.takeRecords(),this.#t=n,this.#a=i,this.#o=null,!t?.silent&&this.dispatchEvent(new CustomEvent(`slicc-layout-change`,{bubbles:!0,composed:!0,detail:{layout:v(n),reason:e}}))}#p(e,t,n,r){let i=e.docks.filter(e=>e.edge===t);if(i.length===0)return null;let a=[];for(let o of i){let i=Oa(`div`,`slicc-layout__dock slicc-layout__dock--${t}`);i.dataset.edge=t;let s=!1;for(let t of o.panels){let a=n.get(t);!a||e.panels[t]?.visible===!1||(this.#_(a,e,t),i.appendChild(a),r.add(t),s=!0)}s&&(i.style.flex=o.size==null?`0 0 auto`:d(o.size),a.push(i))}if(a.length===0)return null;if(a.length===1)return a[0];let o=Oa(`div`,`slicc-layout__dockstack slicc-layout__dockstack--${t}`);return o.dataset.edge=t,o.append(...a),o.style.flex=`0 0 auto`,o}#m(e,t,n){let r=e.zones??(e.center?p(e.center):{}),i=Oa(`div`,`slicc-layout__work`),a=i=>{let a=e.locked||(r.locked??[]).includes(i),o=(r[i]??[]).map(r=>this.#h(r,i,e,t,n)).filter(e=>e!==null);if(o.length===0)return null;let s=Oa(`div`,`slicc-layout__zone slicc-layout__zone--${i}`);s.dataset.zone=i;let c=_(r,i);s.dataset.axis=c,o.forEach((e,t)=>{if(t>0){let e=this.#u.buildZonePanelDivider(i,c,s,a);e&&s.appendChild(e)}s.appendChild(e)});let l=r.sizes?.[i];return s.style.flex=i===`center`?`1 1 0`:d(l??void 0),s},o=(t,n,i)=>{let o=n.map(e=>({zone:e,element:a(e)})).filter(e=>!!e.element);o.forEach((n,a)=>{if(a>0){let s=o[a-1].zone,c=e.locked||(r.locked??[]).includes(s)||(r.locked??[]).includes(n.zone),l=this.#u.buildZoneDivider(s,n.zone,i,t,c);l&&t.appendChild(l)}t.appendChild(n.element)})},s=Oa(`div`,`slicc-layout__work-row`);o(s,[`left`,`center`,`right`],!0);let c=a(`top`),l=a(`bottom`),u=[];return c&&u.push({zone:`top`,element:c}),u.push({zone:`center`,element:s}),l&&u.push({zone:`bottom`,element:l}),u.forEach((t,n)=>{if(n>0){let a=u[n-1].zone,o=e.locked||(r.locked??[]).includes(a)||(r.locked??[]).includes(t.zone),s=this.#u.buildZoneDivider(a,t.zone,!1,i,o);s&&i.appendChild(s)}i.appendChild(t.element)}),i}#h(e,t,n,r,i){let a=r.get(e);if(!a||n.panels[e]?.visible===!1)return null;let o=Oa(`div`,`slicc-layout__slot`);return o.dataset.panelId=e,o.dataset.zone=t,o.style.flex=d(n.panels[e]?.size??void 0),this.#_(a,n,e),o.appendChild(a),this.#u.decorateSlot(o,e),i.add(e),o}applyMove(e,t){if(this.isLocked(e))return;let n=ua(this.#e,this.environment()),r=n.zones??p(n.center??null),i=u(r,e,t);i===r&&n.zones||(n.zones=i,n.center=null,this.#f(`rearrange`))}applyResize(e,t){let n=ua(this.#e,this.environment()).zones,r=n?.[e];if(!n||!r||r.length!==t.length)return;let i={...this.#e.panels??{}};r.forEach((e,n)=>{i[e]={...i[e],size:t[n]}}),this.#e.panels=i}applyZoneResize(e,t){let n=ua(this.#e,this.environment());n.zones&&(n.zones.sizes={...n.zones.sizes,[e]:t})}rerender(){this.#f(`resize`,{silent:!0})}commitResize(){this.#f(`resize`)}#g(e,t,n){if(e.floating.length===0)return null;let r=Oa(`div`,`slicc-layout__floating`),i=!1;for(let a of e.floating){let o=t.get(a.panel);!o||e.panels[a.panel]?.visible===!1||(this.#_(o,e,a.panel),o.setAttribute(`presentation`,`floating`),a.anchor&&o.setAttribute(`anchor`,a.anchor),a.width!=null&&(o.style.width=Aa(a.width)),a.height!=null&&(o.style.height=Aa(a.height)),r.appendChild(o),n.add(a.panel),i=!0)}return i?r:null}#_(e,t,n){e.toggleAttribute(`locked`,l(t,n)),e.removeAttribute(`hidden`),e.setAttribute(`presentation`,`docked`),e.removeAttribute(`anchor`),e.style.removeProperty(`width`),e.style.removeProperty(`height`)}#v(){typeof ResizeObserver>`u`||(this.#s=new ResizeObserver(()=>{this.#e.variants?.length&&(this.#c||=requestAnimationFrame(()=>{this.#c=0;let e=y(this.#e,this.environment()),t=this.#t?.appliedVariants.join(`,`)??``;e.appliedVariants.join(`,`)!==t&&this.#f(`viewport`)}))}),this.#s.observe(this))}};function Aa(e){return typeof e==`number`?`${e}px`:e}A(`slicc-layout`,ka);var ja=M(`
|
|
3830
|
+
${ba}`,Ea=`slicc-layout-style`;function Da(e){if(e.getElementById(Ea))return;let t=e.createElement(`style`);t.id=Ea,t.textContent=Ta,(e.head??e.documentElement).appendChild(t)}function Oa(e,t){let n=document.createElement(e);return n.className=t,n}var ka=class extends HTMLElement{static observedAttributes=[`platform`];#e=m();#t=null;#n=!1;#r=Oa(`div`,`slicc-layout__root`);#i=Oa(`div`,`slicc-layout__parking`);#a=new Set;#o=null;#s=null;#c=0;#l=new MutationObserver(()=>this.#f());#u=new ma(this);connectedCallback(){Da(this.ownerDocument),this.#n=!0,this.#r.parentElement!==this&&this.append(this.#r),this.#i.parentElement!==this&&this.append(this.#i);for(let e of this.#u.overlays())e.parentElement!==this&&this.append(e);this.#v(),this.#f(),this.#l.observe(this,{childList:!0})}disconnectedCallback(){this.#n=!1,this.#l.disconnect(),this.#u.cancel(),this.#s?.disconnect(),this.#s=null,this.#c&&cancelAnimationFrame(this.#c),this.#c=0}attributeChangedCallback(e,t,n){e!==`platform`||t===n||!this.#n||this.#f(`environment`)}setLayout(e){this.#e=e?v(e):m(),this.#n&&this.#f(`set`)}getLayout(){return v(this.#e)}getResolved(){return this.#t?v(this.#t):null}getPlacedPanelIds(){return this.#t?g(this.#t).filter(e=>this.#a.has(e)):[]}isLocked(e){let t=this.#o??this.#t;return t?l(t,e):!1}environment(){let e=this.getBoundingClientRect(),t=this.getAttribute(`platform`);return{width:e.width,height:e.height,platform:t===`web`||t===`extension`||t===`electron`?t:void 0}}#d(){let e=new Map;for(let t of Array.from(this.querySelectorAll(`[${wa}]`))){if(!(t instanceof HTMLElement)||t.parentElement?.closest(`[data-slicc-panel]`))continue;let n=t.getAttribute(`panel-id`);n&&e.set(n,t)}return e}#f(e=`set`,t){let n=y(this.#e,this.environment());this.#o=n;let r=this.#d(),i=new Set,a=e=>this.#p(n,e,r,i),o=Oa(`div`,`slicc-layout__row`),s=a(`left`),c=a(`right`);s&&o.appendChild(s);let l=this.#m(n,r,i);l.style.flex=`1 1 0`,o.appendChild(l),c&&o.appendChild(c);let u=[],d=a(`top`);d&&u.push(d),u.push(o);let f=a(`bottom`);f&&u.push(f);let p=this.#g(n,r,i);p&&u.push(p);for(let[e,t]of r)i.has(e)||t.parentElement!==this.#i&&this.#i.appendChild(t);this.#r.replaceChildren(...u),this.#l.takeRecords(),this.#t=n,this.#a=i,this.#o=null,!t?.silent&&this.dispatchEvent(new CustomEvent(`slicc-layout-change`,{bubbles:!0,composed:!0,detail:{layout:v(n),reason:e}}))}#p(e,t,n,r){let i=e.docks.filter(e=>e.edge===t);if(i.length===0)return null;let a=[];for(let o of i){let i=Oa(`div`,`slicc-layout__dock slicc-layout__dock--${t}`);i.dataset.edge=t;let s=!1;for(let t of o.panels){let a=n.get(t);!a||e.panels[t]?.visible===!1||(this.#_(a,e,t),i.appendChild(a),r.add(t),s=!0)}s&&(i.style.flex=o.size==null?`0 0 auto`:d(o.size),a.push(i))}if(a.length===0)return null;if(a.length===1)return a[0];let o=Oa(`div`,`slicc-layout__dockstack slicc-layout__dockstack--${t}`);return o.dataset.edge=t,o.append(...a),o.style.flex=`0 0 auto`,o}#m(e,t,n){let r=e.zones??(e.center?p(e.center):{}),i=Oa(`div`,`slicc-layout__work`),a=i=>{let a=e.locked||(r.locked??[]).includes(i),o=(r[i]??[]).map(r=>this.#h(r,i,e,t,n)).filter(e=>e!==null);if(o.length===0)return null;let s=Oa(`div`,`slicc-layout__zone slicc-layout__zone--${i}`);s.dataset.zone=i;let c=_(r,i);s.dataset.axis=c,o.forEach((e,t)=>{if(t>0){let e=this.#u.buildZonePanelDivider(i,c,s,a);e&&s.appendChild(e)}s.appendChild(e)});let l=r.sizes?.[i];return s.style.flex=i===`center`?`1 1 0`:d(l??void 0),s},o=(t,n,i)=>{let o=n.map(e=>({zone:e,element:a(e)})).filter(e=>!!e.element);o.forEach((n,a)=>{if(a>0){let s=o[a-1].zone,c=e.locked||(r.locked??[]).includes(s)||(r.locked??[]).includes(n.zone),l=this.#u.buildZoneDivider(s,n.zone,i,t,c);l&&t.appendChild(l)}t.appendChild(n.element)})},s=Oa(`div`,`slicc-layout__work-row`);o(s,[`left`,`center`,`right`],!0);let c=a(`top`),l=a(`bottom`),u=[];return c&&u.push({zone:`top`,element:c}),u.push({zone:`center`,element:s}),l&&u.push({zone:`bottom`,element:l}),u.forEach((t,n)=>{if(n>0){let a=u[n-1].zone,o=e.locked||(r.locked??[]).includes(a)||(r.locked??[]).includes(t.zone),s=this.#u.buildZoneDivider(a,t.zone,!1,i,o);s&&i.appendChild(s)}i.appendChild(t.element)}),i}#h(e,t,n,r,i){let a=r.get(e);if(!a||n.panels[e]?.visible===!1)return null;let o=Oa(`div`,`slicc-layout__slot`);return o.dataset.panelId=e,o.dataset.zone=t,o.style.flex=d(n.panels[e]?.size??void 0),this.#_(a,n,e),o.appendChild(a),this.#u.decorateSlot(o,e),i.add(e),o}applyMove(e,t){if(this.isLocked(e))return;let n=ua(this.#e,this.environment()),r=n.zones??p(n.center??null),i=u(r,e,t);i===r&&n.zones||(n.zones=i,n.center=null,this.#f(`rearrange`))}applyResize(e,t){let n=ua(this.#e,this.environment()).zones,r=n?.[e];if(!n||!r||r.length!==t.length)return;let i={...this.#e.panels??{}};r.forEach((e,n)=>{i[e]={...i[e],size:t[n]}}),this.#e.panels=i}applyZoneResize(e,t){let n=ua(this.#e,this.environment());n.zones&&(n.zones.sizes={...n.zones.sizes,[e]:t})}rerender(){this.#f(`resize`,{silent:!0})}commitResize(){this.#f(`resize`)}#g(e,t,n){if(e.floating.length===0)return null;let r=Oa(`div`,`slicc-layout__floating`),i=!1;for(let a of e.floating){let o=t.get(a.panel);!o||e.panels[a.panel]?.visible===!1||(this.#_(o,e,a.panel),o.setAttribute(`presentation`,`floating`),a.anchor&&o.setAttribute(`anchor`,a.anchor),a.width!=null&&(o.style.width=Aa(a.width)),a.height!=null&&(o.style.height=Aa(a.height)),r.appendChild(o),n.add(a.panel),i=!0)}return i?r:null}#_(e,t,n){e.toggleAttribute(`locked`,l(t,n)),e.removeAttribute(`hidden`),e.setAttribute(`presentation`,`docked`),e.removeAttribute(`anchor`),e.style.removeProperty(`width`),e.style.removeProperty(`height`)}#v(){typeof ResizeObserver>`u`||(this.#s=new ResizeObserver(()=>{this.#e.variants?.length&&(this.#c||=requestAnimationFrame(()=>{this.#c=0;let e=y(this.#e,this.environment()),t=this.#t?.appliedVariants.join(`,`)??``;e.appliedVariants.join(`,`)!==t&&this.#f(`viewport`)}))}),this.#s.observe(this))}};function Aa(e){return typeof e==`number`?`${e}px`:e}A(`slicc-layout`,ka);var ja={offline:`#94a3b8`,connecting:`#f59e0b`,live:`#22c55e`,stalled:`#eab308`,reconnecting:`#f97316`,error:`#ef4444`},Ma={offline:`color-mix(in srgb, #94a3b8 18%, transparent)`,connecting:`color-mix(in srgb, #f59e0b 28%, transparent)`,live:`color-mix(in srgb, #22c55e 22%, transparent)`,stalled:`color-mix(in srgb, #eab308 26%, transparent)`,reconnecting:`color-mix(in srgb, #f97316 28%, transparent)`,error:`color-mix(in srgb, #ef4444 24%, transparent)`},Na={offline:`offline`,connecting:`connecting`,live:`live`,stalled:`leader busy`,reconnecting:`reconnecting`,error:`connection error`},Pa={npx:`terminal`,sliccstart:`monitor`,extension:`blocks`,standalone:`monitor`,cherry:`frame`,electron:`laptop`,hosted:`cloud`},Fa={npx:`npx`,sliccstart:`sliccstart`,extension:`extension`,standalone:`standalone`,cherry:`cherry`,electron:`electron`,hosted:`hosted`},Ia={leader:`crown`,follower:`radio`},La={none:`local`,leader:`leading tray`,follower:`following tray`};function Ra(e){return Pa[e]}function za(e){return Fa[e]}function Ba(e){return ja[e]}function Va(e){return Ma[e]}function Ha(e){return Na[e]}function Ua(e){return e===`none`?null:Ia[e]}function Wa(e){return La[e]}function Ga(e){return e===`connecting`||e===`reconnecting`}function Ka(){return{connection:`offline`,floatKind:`standalone`,trayRole:`none`}}function qa(e){return[za(e.floatKind),Wa(e.trayRole),Ha(e.connection)].join(` · `)}var Ja=M(`
|
|
3831
3831
|
:host {
|
|
3832
3832
|
display: inline-grid;
|
|
3833
3833
|
place-items: center;
|
|
@@ -3874,7 +3874,7 @@ ${ba}`,Ea=`slicc-layout-style`;function Da(e){if(e.getElementById(Ea))return;let
|
|
|
3874
3874
|
object-fit: cover;
|
|
3875
3875
|
display: block;
|
|
3876
3876
|
}
|
|
3877
|
-
`),
|
|
3877
|
+
`),Ya=class extends HTMLElement{static observedAttributes=[`initials`,`name`,`src`,`email`,`size`,`label`];#e;#t=0;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ja],this.addEventListener(`click`,this.#i),this.addEventListener(`keydown`,this.#a)}connectedCallback(){this.hasAttribute(`role`)||this.setAttribute(`role`,`button`),this.hasAttribute(`tabindex`)||this.setAttribute(`tabindex`,`0`),this.#o()}disconnectedCallback(){this.#t++}attributeChangedCallback(e,t,n){e===`size`&&this.#r(n),this.isConnected&&this.#o()}get initials(){return this.getAttribute(`initials`)}set initials(e){e==null?this.removeAttribute(`initials`):this.setAttribute(`initials`,e)}get name(){return this.getAttribute(`name`)}set name(e){e==null?this.removeAttribute(`name`):this.setAttribute(`name`,e)}get src(){return this.getAttribute(`src`)}set src(e){e==null?this.removeAttribute(`src`):this.setAttribute(`src`,e)}get email(){return this.getAttribute(`email`)}set email(e){e==null?this.removeAttribute(`email`):this.setAttribute(`email`,e)}get size(){return this.getAttribute(`size`)}set size(e){e==null?this.removeAttribute(`size`):this.setAttribute(`size`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get resolvedInitials(){let e=this.initials;return e!=null&&e.trim()!==``?e.trim().slice(0,2).toUpperCase():Za(this.name)||`?`}async gravatarUrl(e=this.email){let t=e?.trim().toLowerCase();return t?`https://www.gravatar.com/avatar/${await Xa(t)}?s=${this.#n()}&d=404`:null}#n(){let e=this.getBoundingClientRect().width;return Math.max(1,Math.round((e>0?e:30)*2))}#r(e){e==null||e.trim()===``?this.style.removeProperty(`--avatar-size`):this.style.setProperty(`--avatar-size`,e)}#i=()=>{this.dispatchEvent(new CustomEvent(`slicc-avatar-click`,{bubbles:!0,composed:!0}))};#a=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.click())};#o(){let e=++this.#t,t=this.src,n=this.email,r=this.resolvedInitials,i=this.label??this.name??(r===`?`?`Account`:r);this.setAttribute(`aria-label`,i);let a=[j(`span`,{class:`ini`,part:`initials`},r)];if(t){let n=j(`img`,{class:`img`,part:`image`,src:t,alt:i});n.addEventListener(`load`,()=>{e===this.#t&&this.#e.querySelector(`.me`)?.classList.add(`has-img`)}),n.addEventListener(`error`,()=>{e===this.#t&&(n.remove(),this.#e.querySelector(`.me`)?.classList.remove(`has-img`))}),a.push(n)}let o=j(`div`,{class:`me`,part:`avatar`},j(`slot`,null,...a));this.#e.replaceChildren(o),!t&&n&&this.#s(n,e)}#s(e,t){this.gravatarUrl(e).then(e=>{if(!e||t!==this.#t)return;let n=new Image;n.onload=()=>{if(t!==this.#t||!this.isConnected)return;let n=this.#e.querySelector(`.me`);n&&(n.style.backgroundImage=`url("${e}")`,n.classList.add(`has-img`))},n.src=e}).catch(()=>{})}};async function Xa(e){let t=new TextEncoder().encode(e),n=await crypto.subtle.digest(`SHA-256`,t);return Array.from(new Uint8Array(n)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}function Za(e){if(!e)return``;let t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?``:t.length===1?t[0].slice(0,2).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()}A(`slicc-avatar`,Ya);var Qa=5,$a=1;function eo(e){return e.replace(`claude-`,``)}function to(e){return e==null||e===0?``:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(0)}K`:String(e)}function no(e){if(e.length<=Qa)return{individuals:e,buckets:[]};let t=[...e].sort((e,t)=>t.cost-e.cost),n=t.slice(0,Qa),r=[],i={count:0,cost:0};for(let e of t.slice(Qa))i.count+=1,i.cost+=e.cost,i.cost>=$a&&(r.push(i),i={count:0,cost:0});if(i.count>0){let e=r.at(-1);e?(e.count+=i.count,e.cost+=i.cost):r.push(i)}return{individuals:n,buckets:r}}var ro=M(`
|
|
3878
3878
|
:host {
|
|
3879
3879
|
position: absolute;
|
|
3880
3880
|
top: calc(100% + 8px);
|
|
@@ -3998,7 +3998,7 @@ ${ba}`,Ea=`slicc-layout-style`;function Da(e){if(e.getElementById(Ea))return;let
|
|
|
3998
3998
|
font-variant-numeric: tabular-nums;
|
|
3999
3999
|
color: var(--ink);
|
|
4000
4000
|
}
|
|
4001
|
-
`);A(`slicc-cost-overlay`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=[];#n=[];#r=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
4001
|
+
`);A(`slicc-cost-overlay`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=[];#n=[];#r=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ro]}connectedCallback(){this.#i()}attributeChangedCallback(){this.isConnected&&this.#i()}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,!!e)}get models(){return this.#t}set models(e){this.#t=e,this.isConnected&&this.#i()}get scoops(){return this.#n}set scoops(e){this.#n=e,this.isConnected&&this.#i()}get total(){return this.#r}set total(e){this.#r=e!=null&&Number.isFinite(e)?e:null,this.isConnected&&this.#i()}#i(){let e=[];if(this.#t.length>0){let t=this.#t.map(e=>{let t=to(e.tokens);return j(`div`,{class:`model-row`},j(`span`,{class:`model-name`},eo(e.model)),t?j(`span`,{class:`model-tokens`},t):!1,j(`span`,{class:`model-cost`},`$${e.cost.toFixed(2)}`))});e.push(j(`div`,{class:`section section--models`},j(`div`,{class:`section-title`},`BY MODEL`),...t))}if(this.#n.length>0){let t=no(this.#n),n=t.individuals.map(e=>j(`div`,{class:`scoop-row`},j(`span`,{class:`scoop-name`},e.name),j(`span`,{class:`scoop-cost`},`$${e.cost.toFixed(2)}`))),r=t.buckets.map(e=>j(`div`,{class:`bucket-row`,part:`bucket`},`${e.count} ${e.count===1?`agent`:`agents`} · $${e.cost.toFixed(2)}`));e.push(j(`div`,{class:`section section--scoops`},j(`div`,{class:`section-title`},`BY AGENT`),...n,...r))}let t=this.#r??this.#t.reduce((e,t)=>e+t.cost,0);e.push(j(`div`,{class:`total-row`},j(`span`,{class:`total-label`},`Total`),j(`span`,{class:`total-cost`},`$${t.toFixed(2)}`)));let n=j(`div`,{class:`card`},...e);this.#e.replaceChildren(n)}});var io=M(`
|
|
4002
4002
|
:host {
|
|
4003
4003
|
display: flex;
|
|
4004
4004
|
align-items: center;
|
|
@@ -4027,7 +4027,7 @@ ${ba}`,Ea=`slicc-layout-style`;function Da(e){if(e.getElementById(Ea))return;let
|
|
|
4027
4027
|
min-width: 0;
|
|
4028
4028
|
background: var(--line, #e5e5e5);
|
|
4029
4029
|
}
|
|
4030
|
-
`);A(`slicc-day-separator`,class extends HTMLElement{static observedAttributes=[`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
4030
|
+
`);A(`slicc-day-separator`,class extends HTMLElement{static observedAttributes=[`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[io]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#t(){let e=this.label??j(`slot`);this.#e.replaceChildren(j(`span`,{class:`label`,part:`label`},e))}});var ao=M(`
|
|
4031
4031
|
:host {
|
|
4032
4032
|
position: absolute;
|
|
4033
4033
|
top: calc(100% + 8px);
|
|
@@ -4145,7 +4145,7 @@ ${ba}`,Ea=`slicc-layout-style`;function Da(e){if(e.getElementById(Ea))return;let
|
|
|
4145
4145
|
color: var(--txt-2);
|
|
4146
4146
|
font-size: 11px;
|
|
4147
4147
|
}
|
|
4148
|
-
`);A(`slicc-follower-hud`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=[];#n=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
4148
|
+
`);A(`slicc-follower-hud`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=[];#n=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ao]}connectedCallback(){this.#r()}attributeChangedCallback(){this.isConnected&&this.#r()}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,!!e)}get rows(){return this.#t}set rows(e){this.#t=e,this.isConnected&&this.#r()}get hint(){return this.#n}set hint(e){this.#n=e&&e.trim()!==``?e:null,this.isConnected&&this.#r()}#r(){let e=this.#t.length,t=[];if(e===0)t.push(j(`div`,{class:`empty`},`No followers connected.`));else{let r=this.#t.map(e=>j(`div`,{class:`row`,part:`row`},n(e.icon,{size:14}),j(`div`,{class:`row-main`},j(`span`,{class:`row-title`},e.title),e.detail?j(`span`,{class:`row-detail`},e.detail):!1,e.chips&&e.chips.length>0?j(`div`,{class:`chips`},...e.chips.map(e=>j(`span`,{class:`chip`},e))):!1),j(`div`,{class:`row-state`},j(`span`,{class:`sdot`,"data-state":e.state}),e.stateText)));t.push(j(`div`,{class:`section`},j(`div`,{class:`section-title`},`${e} ${e===1?`follower`:`followers`}`),...r))}this.#n&&t.push(j(`div`,{class:`hint`},this.#n)),this.#e.replaceChildren(j(`div`,{class:`card`,part:`card`},...t))}});var oo=`CLI float`;function so(e){if(e==null)return null;let t=e.trim();if(t===``)return null;let n=Number.parseFloat(t.replace(/^\$/,``));return Number.isFinite(n)?n:null}function co(e){let t=so(e);return t==null?null:`$${t.toFixed(2)}`}function lo(e){return`${co(e)??`$0.00`}/h`}var uo=720,fo=M(`
|
|
4149
4149
|
:host {
|
|
4150
4150
|
position: relative;
|
|
4151
4151
|
display: inline-flex;
|
|
@@ -4171,13 +4171,62 @@ ${ba}`,Ea=`slicc-layout-style`;function Da(e){if(e.getElementById(Ea))return;let
|
|
|
4171
4171
|
border-color: color-mix(in srgb, var(--rose) 40%, var(--line));
|
|
4172
4172
|
}
|
|
4173
4173
|
|
|
4174
|
-
.
|
|
4175
|
-
|
|
4176
|
-
|
|
4174
|
+
/* Status beacon — connection color, float-kind icon, tray-role pip. */
|
|
4175
|
+
.beacon {
|
|
4176
|
+
position: relative;
|
|
4177
|
+
display: inline-flex;
|
|
4178
|
+
align-items: center;
|
|
4179
|
+
justify-content: center;
|
|
4180
|
+
width: 15px;
|
|
4181
|
+
height: 15px;
|
|
4177
4182
|
flex: 0 0 auto;
|
|
4183
|
+
}
|
|
4184
|
+
.beacon__ring {
|
|
4185
|
+
position: absolute;
|
|
4186
|
+
inset: 0;
|
|
4178
4187
|
border-radius: 50%;
|
|
4179
|
-
background: #
|
|
4180
|
-
box-shadow: 0 0 0
|
|
4188
|
+
background: var(--beacon-fill, #94a3b8);
|
|
4189
|
+
box-shadow: 0 0 0 2.5px var(--beacon-glow, color-mix(in srgb, #94a3b8 18%, transparent));
|
|
4190
|
+
}
|
|
4191
|
+
.beacon__icon {
|
|
4192
|
+
position: relative;
|
|
4193
|
+
z-index: 1;
|
|
4194
|
+
display: inline-flex;
|
|
4195
|
+
color: var(--canvas, #fff);
|
|
4196
|
+
line-height: 0;
|
|
4197
|
+
}
|
|
4198
|
+
.beacon__icon svg {
|
|
4199
|
+
display: block;
|
|
4200
|
+
width: 9px;
|
|
4201
|
+
height: 9px;
|
|
4202
|
+
}
|
|
4203
|
+
.beacon__role {
|
|
4204
|
+
position: absolute;
|
|
4205
|
+
right: -3px;
|
|
4206
|
+
bottom: -2px;
|
|
4207
|
+
z-index: 2;
|
|
4208
|
+
display: inline-flex;
|
|
4209
|
+
align-items: center;
|
|
4210
|
+
justify-content: center;
|
|
4211
|
+
width: 8px;
|
|
4212
|
+
height: 8px;
|
|
4213
|
+
border-radius: 50%;
|
|
4214
|
+
border: 1px solid var(--canvas, #fff);
|
|
4215
|
+
background: var(--ink, #111);
|
|
4216
|
+
color: var(--canvas, #fff);
|
|
4217
|
+
line-height: 0;
|
|
4218
|
+
}
|
|
4219
|
+
.beacon__role svg {
|
|
4220
|
+
display: block;
|
|
4221
|
+
width: 5px;
|
|
4222
|
+
height: 5px;
|
|
4223
|
+
}
|
|
4224
|
+
.beacon[data-pulse] .beacon__ring {
|
|
4225
|
+
animation: beacon-pulse 1.4s ease-in-out infinite;
|
|
4226
|
+
}
|
|
4227
|
+
@keyframes beacon-pulse {
|
|
4228
|
+
0%, 100% { transform: scale(1); opacity: 1; }
|
|
4229
|
+
50% { transform: scale(1.08); opacity: 0.82; }
|
|
4181
4230
|
}
|
|
4182
4231
|
|
|
4183
4232
|
.label { white-space: nowrap; }
|
|
@@ -4294,8 +4343,9 @@ ${ba}`,Ea=`slicc-layout-style`;function Da(e){if(e.getElementById(Ea))return;let
|
|
|
4294
4343
|
|
|
4295
4344
|
@media (prefers-reduced-motion: reduce) {
|
|
4296
4345
|
.tip { transition: none; }
|
|
4346
|
+
.beacon[data-pulse] .beacon__ring { animation: none; }
|
|
4297
4347
|
}
|
|
4298
|
-
`);A(`slicc-floatbar`,class extends HTMLElement{static observedAttributes=[`label`,`linked`,`
|
|
4348
|
+
`);A(`slicc-floatbar`,class extends HTMLElement{static observedAttributes=[`label`,`linked`,`connection`,`float-kind`,`tray-role`,`rate`,`spent`];#e;#t=null;#n=null;#r=[];#i=[];#a;#o=[];#s=null;#c;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[fo]}connectedCallback(){this.#f();let e=this.closest(`slicc-nav`);e&&typeof ResizeObserver<`u`&&(this.#t=new ResizeObserver(()=>this.#d()),this.#t.observe(e))}disconnectedCallback(){this.#t?.disconnect(),this.#t=null,clearTimeout(this.#a),clearTimeout(this.#c)}attributeChangedCallback(e,t,n){t!==n&&this.isConnected&&this.#f()}get label(){return this.getAttribute(`label`)??oo}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get linked(){return this.hasAttribute(`linked`)}set linked(e){this.toggleAttribute(`linked`,!!e)}get connection(){let e=this.getAttribute(`connection`);return e===`connecting`||e===`live`||e===`stalled`||e===`reconnecting`||e===`error`?e:`offline`}set connection(e){e==null?this.removeAttribute(`connection`):this.setAttribute(`connection`,e)}get floatKind(){let e=this.getAttribute(`float-kind`);return e===`npx`||e===`sliccstart`||e===`extension`||e===`standalone`||e===`cherry`||e===`electron`||e===`hosted`?e:Ka().floatKind}set floatKind(e){e==null?this.removeAttribute(`float-kind`):this.setAttribute(`float-kind`,e)}get trayRole(){let e=this.getAttribute(`tray-role`);return e===`leader`||e===`follower`?e:`none`}set trayRole(e){e==null||e===`none`?this.removeAttribute(`tray-role`):this.setAttribute(`tray-role`,e)}get status(){return{connection:this.connection,floatKind:this.floatKind,trayRole:this.trayRole}}set status(e){this.connection=e.connection,this.floatKind=e.floatKind,this.trayRole=e.trayRole}get spent(){return this.getAttribute(`spent`)}set spent(e){e==null?this.removeAttribute(`spent`):this.setAttribute(`spent`,String(e))}get rate(){return this.getAttribute(`rate`)}set rate(e){e==null?this.removeAttribute(`rate`):this.setAttribute(`rate`,String(e))}get costModels(){return this.#r}set costModels(e){this.#r=e,this.#n&&(this.#n.models=e)}get followers(){return this.#o}set followers(e){this.#o=e,e.length>0?this.setAttribute(`follower-count`,String(e.length)):this.removeAttribute(`follower-count`),this.isConnected?this.#f():this.#s&&(this.#s.rows=e)}get costScoops(){return this.#i}set costScoops(e){this.#i=e,this.#n&&(this.#n.scoops=e)}#l(){let e=[this.label,qa(this.status)],t=this.#o.length;return t>0&&e.push(`${t} ${t===1?`follower`:`followers`}`),e.push(lo(this.rate)),e.push(`recency-weighted session avg`),e.join(` · `)}#u(e){let{connection:t,floatKind:r,trayRole:i}=e,a=j(`span`,{class:`beacon__ring`,part:`beacon-ring`,style:`--beacon-fill:${Ba(t)};--beacon-glow:${Va(t)}`}),o=j(`span`,{class:`beacon__icon`,part:`beacon-icon`},n(Ra(r),{size:9,strokeWidth:2.25})),s={class:`beacon`,part:`beacon dot`,"data-connection":t,"data-float-kind":r,"aria-label":qa({connection:t,floatKind:r,trayRole:i})};i!==`none`&&(s[`data-tray-role`]=i),Ga(t)&&(s[`data-pulse`]=``);let c=[a,o],l=Ua(i);return l&&c.push(j(`span`,{class:`beacon__role`,part:`beacon-role`,"aria-hidden":`true`},n(l,{size:5,strokeWidth:2.5}))),j(`span`,s,...c)}#d(){let e=this.closest(`slicc-nav`),t=e?getComputedStyle(e):null;(e?e.clientWidth-Number.parseFloat(t?.paddingLeft??`0`)-Number.parseFloat(t?.paddingRight??`0`):1/0)<=uo?this.setAttribute(`title`,this.#l()):this.removeAttribute(`title`)}#f(){let e=[];e.push(this.#u(this.status));let[t,...r]=this.label.split(` · `),i=[j(`span`,{class:`runtime`},t)];r.length>0&&i.push(j(`span`,{class:`detail`},` · ${r.join(` · `)}`)),e.push(j(`span`,{class:`label`,part:`label`},j(`slot`,null,...i))),this.#o.length>0&&(e.push(j(`span`,{class:`sep sep--followers`,part:`sep`})),e.push(this.#p(this.#o.length))),e.push(j(`span`,{class:`sep sep--spent`,part:`sep`}));let a=j(`span`,{class:`spent`,part:`spent rate`},n(`circle-dollar-sign`,{size:12}),j(`span`,{class:`amount`},lo(this.rate)));a.addEventListener(`mouseenter`,()=>this.#_()),a.addEventListener(`mouseleave`,()=>this.#v()),e.push(a),e.push(j(`span`,{class:`tip`,part:`tip`,"aria-hidden":`true`},this.#l()));let o=this.#s?.hasAttribute(`open`)&&this.#o.length>0?this.#s:null;this.#n=null,this.#s=o,this.#e.replaceChildren(...e),o&&(o.rows=this.#o,this.#e.appendChild(o)),this.#d()}#p(e){let t=j(`button`,{class:`followers`,part:`followers`,type:`button`,"aria-haspopup":`dialog`,"aria-label":`${`${e} ${e===1?`follower`:`followers`}`} connected — open session sharing`},n(`users`,{size:12}),j(`span`,{class:`follower-count`},String(e)));return t.addEventListener(`mouseenter`,()=>this.#m()),t.addEventListener(`mouseleave`,()=>this.#h()),t.addEventListener(`focus`,()=>this.#m()),t.addEventListener(`blur`,()=>this.#h()),t.addEventListener(`keydown`,e=>{e.key===`Escape`&&this.#g()}),t.addEventListener(`click`,()=>{this.#g(),this.dispatchEvent(new CustomEvent(`slicc-followers-click`,{bubbles:!0,composed:!0}))}),t}#m(){if(clearTimeout(this.#c),!this.#s){let e=document.createElement(`slicc-follower-hud`);e.rows=this.#o,e.hint=`Click for sharing options.`,e.addEventListener(`mouseenter`,()=>this.#m()),e.addEventListener(`mouseleave`,()=>this.#h()),this.#e.appendChild(e),this.#s=e}this.#s.toggleAttribute(`open`,!0)}#h(){this.#c=setTimeout(()=>this.#g(),150)}#g(){clearTimeout(this.#c),this.#s?.removeAttribute(`open`)}#_(){if(clearTimeout(this.#a),!this.#n){let e=document.createElement(`slicc-cost-overlay`);e.models=this.#r,e.scoops=this.#i,e.total=so(this.spent),e.addEventListener(`mouseenter`,()=>this.#_()),e.addEventListener(`mouseleave`,()=>this.#v()),this.#e.appendChild(e),this.#n=e}this.#n.toggleAttribute(`open`,!0)}#v(){this.#a=setTimeout(()=>{this.#n&&this.#n.removeAttribute(`open`)},150)}});var po=M(`
|
|
4299
4349
|
:host { display: inline-grid; }
|
|
4300
4350
|
:host([hidden]) { display: none; }
|
|
4301
4351
|
.iconbtn {
|
|
@@ -4324,7 +4374,7 @@ ${ba}`,Ea=`slicc-layout-style`;function Da(e){if(e.getElementById(Ea))return;let
|
|
|
4324
4374
|
.iconbtn:disabled:hover { background: var(--canvas); color: var(--txt-2); }
|
|
4325
4375
|
.icon { display: grid; place-items: center; pointer-events: none; }
|
|
4326
4376
|
.icon svg { display: block; }
|
|
4327
|
-
`),
|
|
4377
|
+
`),mo=`plus`,ho=16;A(`slicc-icon-button`,class extends HTMLElement{static observedAttributes=[`icon`,`disabled`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[po]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get icon(){return this.getAttribute(`icon`)??mo}set icon(e){e==null?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){e?this.setAttribute(`disabled`,``):this.removeAttribute(`disabled`)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#t(){let e=this.label,t=j(`slot`,null,j(`span`,{class:`icon`},n(this.icon,{size:ho,part:`icon`}))),r=j(`button`,{type:`button`,class:`iconbtn`,part:`button`,"aria-label":e??void 0,title:e??void 0,disabled:this.disabled},t);this.#e.replaceChildren(r)}});var go=`
|
|
4328
4378
|
slicc-pane {
|
|
4329
4379
|
display: flex;
|
|
4330
4380
|
flex-direction: column;
|
|
@@ -4363,7 +4413,7 @@ slicc-pane .slicc-pane__body {
|
|
|
4363
4413
|
min-height: 0;
|
|
4364
4414
|
overflow: auto;
|
|
4365
4415
|
}
|
|
4366
|
-
|
|
4416
|
+
`,_o=`slicc-pane-style`;function vo(e){if(e.getElementById(_o))return;let t=e.createElement(`style`);t.id=_o,t.textContent=go,(e.head??e.documentElement).appendChild(t)}A(`slicc-pane`,class extends HTMLElement{static observedAttributes=[`elevated`];#e;#t;#n=!1;connectedCallback(){vo(this.ownerDocument),this.#r()}attributeChangedCallback(e,t,n){e===`elevated`&&t!==n&&this.isConnected&&this.dispatchEvent(new CustomEvent(`slicc-pane-change`,{bubbles:!0,composed:!0,detail:{elevated:n!==null}}))}get elevated(){return this.hasAttribute(`elevated`)}set elevated(e){e?this.setAttribute(`elevated`,``):this.removeAttribute(`elevated`)}#r(){if(this.#n)return;this.#n=!0;let e=Array.from(this.childNodes).filter(e=>!(e instanceof HTMLElement&&e.classList.contains(`slicc-pane__surface`))),t=this.ownerDocument.createElement(`div`);t.className=`slicc-pane__surface`,t.setAttribute(`part`,`surface`),this.#e=this.ownerDocument.createElement(`div`),this.#e.className=`slicc-pane__header`,this.#e.setAttribute(`part`,`header`),this.#t=this.ownerDocument.createElement(`div`),this.#t.className=`slicc-pane__body`,this.#t.setAttribute(`part`,`body`),t.append(this.#e,this.#t);for(let t of e)t instanceof HTMLElement&&t.getAttribute(`slot`)===`header`?this.#e.appendChild(t):this.#t.appendChild(t);this.appendChild(t)}});var yo=`
|
|
4367
4417
|
slicc-press-button {
|
|
4368
4418
|
display: inline-flex;
|
|
4369
4419
|
}
|
|
@@ -4455,7 +4505,7 @@ slicc-press-button {
|
|
|
4455
4505
|
animation: none;
|
|
4456
4506
|
}
|
|
4457
4507
|
}
|
|
4458
|
-
`,
|
|
4508
|
+
`,bo=`slicc-press-button-style`;function xo(e){if(e.getElementById(bo))return;let t=e.createElement(`style`);t.id=bo,t.textContent=yo,(e.head??e.documentElement).appendChild(t)}var So=`slicc-press-btn`,Co=`is-squish`,wo=`is-wobble`;A(`slicc-press-button`,class extends HTMLElement{static get observedAttributes(){return[`label`,`tooltip`,`tooltip-pos`,`disabled`]}innerBtn=null;pressLayer=null;handle=null;initialized=!1;pendingShortTimer=null;pendingShortEvent=null;animEndListener=null;connectedCallback(){xo(this.ownerDocument),this.initialized?this.handle===null&&this.attachGesture():this.initialize(),this.syncAttributes()}disconnectedCallback(){this.handle?.destroy(),this.handle=null,this.clearPendingShort(),this.clearRipple(),this.clearAnimation()}attributeChangedCallback(){this.initialized&&this.syncAttributes()}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){this.toggleAttribute(`disabled`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get tooltip(){return this.getAttribute(`tooltip`)}set tooltip(e){e==null?this.removeAttribute(`tooltip`):this.setAttribute(`tooltip`,e)}setIcon(e){this.initialized||this.initialize();let t=this.innerBtn,n=this.pressLayer;for(let e of Array.from(t.childNodes))e!==n&&e.remove();let r=new DOMParser().parseFromString(e,`text/html`).body;for(;r.firstChild;)t.appendChild(r.firstChild)}focus(e){this.initialized||this.initialize(),this.innerBtn?.focus(e)}initialize(){this.initialized=!0;let e=j(`span`,{class:`${So}__press-layer`,part:`press-layer`}),t=j(`button`,{type:`button`,class:`${So}__btn`,part:`button`},e);for(;this.firstChild;)t.appendChild(this.firstChild);this.appendChild(t),this.innerBtn=t,this.pressLayer=e,this.attachGesture()}syncAttributes(){let e=this.innerBtn;if(!e)return;let t=this.getAttribute(`label`);t==null?e.removeAttribute(`aria-label`):e.setAttribute(`aria-label`,t);let n=this.getAttribute(`tooltip`);n==null?delete e.dataset.tooltip:e.dataset.tooltip=n;let r=this.getAttribute(`tooltip-pos`);r==null?delete e.dataset.tooltipPos:e.dataset.tooltipPos=r,this.hasAttribute(`disabled`)?e.setAttribute(`disabled`,``):e.removeAttribute(`disabled`)}longPressMs(){let e=this.getAttribute(`long-press-ms`);if(e==null)return $n;let t=Number(e);return Number.isFinite(t)&&t>0?t:$n}doubleClickMs(){let e=this.getAttribute(`double-click-ms`);if(e==null)return 350;let t=Number(e);return Number.isFinite(t)&&t>0?t:350}doubleClickDisabled(){return this.hasAttribute(`disable-double-click`)}emit(e,t){e===`short-click`?this.playAnimation(Co):e===`double-click`&&this.playAnimation(wo);let n=t?{sourceEvent:t}:{};this.dispatchEvent(new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n}))}playAnimation(e){let t=this.innerBtn;if(!t)return;this.clearAnimation(),t.offsetWidth,t.classList.add(e);let n=e=>{e.target===t&&this.clearAnimation()};this.animEndListener=n,t.addEventListener(`animationend`,n)}clearAnimation(){let e=this.innerBtn;e&&(this.animEndListener&&=(e.removeEventListener(`animationend`,this.animEndListener),null),e.classList.remove(Co,wo))}clearPendingShort(){this.pendingShortTimer!==null&&(clearTimeout(this.pendingShortTimer),this.pendingShortTimer=null),this.pendingShortEvent=null}attachGesture(){this.handle=er(this,{longPressMs:this.longPressMs(),onPressStart:e=>this.paintRipple(e),onPressEnd:()=>this.clearRipple(),onLongPress:()=>{if(this.pendingShortTimer!==null){this.clearPendingShort(),this.emit(`double-click`);return}this.emit(`long-press`)},onShortClick:e=>{if(this.doubleClickDisabled()){this.emit(`short-click`,e);return}if(this.pendingShortTimer!==null){this.clearPendingShort(),this.emit(`double-click`,e);return}this.pendingShortEvent=e,this.pendingShortTimer=setTimeout(()=>{this.pendingShortTimer=null;let e=this.pendingShortEvent;this.pendingShortEvent=null,this.emit(`short-click`,e??void 0)},this.doubleClickMs())}})}paintRipple(e){this.clearRipple();let t=this.pressLayer;if(!t)return;let n=t.getBoundingClientRect(),r=e.clientX-n.left,i=e.clientY-n.top,a=Math.max(r,n.width-r),o=Math.max(i,n.height-i),s=Math.ceil(Math.hypot(a,o))+2,c=this.ownerDocument.createElement(`span`);c.className=`${So}__press`,c.style.left=`${r}px`,c.style.top=`${i}px`,c.style.width=`0px`,c.style.height=`0px`,c.style.transitionDuration=`${this.longPressMs()}ms`,t.appendChild(c),requestAnimationFrame(()=>{c.isConnected&&(c.style.width=`${s*2}px`,c.style.height=`${s*2}px`)})}clearRipple(){let e=this.pressLayer;if(e)for(;e.firstChild;)e.firstChild.remove()}});var To=M(`
|
|
4459
4509
|
:host { display: inline-flex; }
|
|
4460
4510
|
:host([hidden]) { display: none; }
|
|
4461
4511
|
|
|
@@ -4485,7 +4535,7 @@ slicc-press-button {
|
|
|
4485
4535
|
outline: 2px solid var(--violet);
|
|
4486
4536
|
outline-offset: 2px;
|
|
4487
4537
|
}
|
|
4488
|
-
`);A(`slicc-swatch`,class extends HTMLElement{static observedAttributes=[`color`,`hue`,`selected`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
4538
|
+
`);A(`slicc-swatch`,class extends HTMLElement{static observedAttributes=[`color`,`hue`,`selected`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[To]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get color(){return this.getAttribute(`color`)}set color(e){e==null?this.removeAttribute(`color`):this.setAttribute(`color`,e)}get hue(){return this.hasAttribute(`hue`)}set hue(e){this.toggleAttribute(`hue`,!!e)}get selected(){return this.hasAttribute(`selected`)}set selected(e){this.toggleAttribute(`selected`,!!e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#t(){let e=this.color,t=[`sw`];this.hue&&t.push(`hue`),this.selected&&t.push(`on`);let n=j(`button`,{type:`button`,part:`button`,class:t.join(` `),"aria-pressed":this.selected?`true`:`false`,"aria-label":this.label??e??`color swatch`},j(`slot`));e&&n.style.setProperty(`--swatch-color`,e),n.addEventListener(`click`,this.#n),this.#e.replaceChildren(n)}#n=()=>{this.selected=!0,this.dispatchEvent(new CustomEvent(`select`,{detail:{color:this.color},bubbles:!0,composed:!0}))}});var Eo=new Set([`rose`,`cyan`,`violet`,`amber`,`waffle`,`green`]),Do=M(`
|
|
4489
4539
|
:host {
|
|
4490
4540
|
display: inline-flex;
|
|
4491
4541
|
vertical-align: middle;
|
|
@@ -4545,7 +4595,7 @@ slicc-press-button {
|
|
|
4545
4595
|
:host-context(.dark)[hue="amber"] .tag, :host-context([data-theme="dark"])[hue="amber"] .tag { background: color-mix(in srgb, var(--amber) 22%, var(--canvas)); border-color: color-mix(in srgb, var(--amber) 38%, var(--line)); }
|
|
4546
4596
|
:host-context(.dark)[hue="waffle"] .tag, :host-context([data-theme="dark"])[hue="waffle"] .tag { background: color-mix(in srgb, var(--waffle) 22%, var(--canvas)); border-color: color-mix(in srgb, var(--waffle) 38%, var(--line)); }
|
|
4547
4597
|
:host-context(.dark)[hue="green"] .tag, :host-context([data-theme="dark"])[hue="green"] .tag { background: color-mix(in srgb, var(--green) 22%, var(--canvas)); border-color: color-mix(in srgb, var(--green) 38%, var(--line)); }
|
|
4548
|
-
`);A(`slicc-tag`,class extends HTMLElement{static observedAttributes=[`hue`,`label`,`dot`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
4598
|
+
`);A(`slicc-tag`,class extends HTMLElement{static observedAttributes=[`hue`,`label`,`dot`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Do]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get hue(){let e=this.getAttribute(`hue`);return e&&Eo.has(e)?e:null}set hue(e){e==null?this.removeAttribute(`hue`):this.setAttribute(`hue`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get dot(){return this.hasAttribute(`dot`)}set dot(e){e?this.setAttribute(`dot`,``):this.removeAttribute(`dot`)}#t(){let e=this.label??j(`slot`),t=j(`span`,{class:`tag`,part:`tag`},this.dot?j(`span`,{class:`dot`,part:`dot`}):null,j(`span`,{class:`label`,part:`label`},e));this.#e.replaceChildren(t)}});var Oo=M(`
|
|
4549
4599
|
:host {
|
|
4550
4600
|
position: fixed;
|
|
4551
4601
|
inset: 0;
|
|
@@ -4733,7 +4783,7 @@ iframe {
|
|
|
4733
4783
|
font-size: 13px;
|
|
4734
4784
|
}
|
|
4735
4785
|
.fallback code { font-family: var(--mono, monospace); font-size: 12px; }
|
|
4736
|
-
`),
|
|
4786
|
+
`),ko={rendered:`Preview`,file:`Source`,diff:`Diff`};function Ao(e){let t=[];return e.rendered&&t.push(`rendered`),Po(e)&&t.push(`file`),e.baseContent!==void 0&&t.push(`diff`),t}function jo(e){return e.rendered?`rendered`:e.baseContent===void 0?`file`:`diff`}var Mo=null,No=null;function Po(e){if(e.text===!0)return!0;let t=e.mimeType.split(`;`,1)[0]?.trim()??e.mimeType;return t.startsWith(`text/`)?!0:t===`application/json`||t===`application/xml`||t===`application/javascript`||t===`image/svg+xml`||t.endsWith(`+json`)||t.endsWith(`+xml`)}function Fo(e){return typeof e==`string`?e:new TextDecoder().decode(e)}function Io(e,t){let n=typeof e==`string`?new TextEncoder().encode(e):e;return new Blob([n],{type:t})}var Lo=!1;function Ro(e){if(!Lo){Lo=!0;for(let t of[`jsh`,`bsh`])try{e.setCustomExtension(t,`zsh`)}catch{}}}function zo(e,t){let n=`<style>:root{color-scheme:${t};}html{background:Canvas;color:CanvasText;}</style>`,r=/^\s*<!doctype[^>]*>/i.exec(e);return r?e.slice(0,r[0].length)+n+e.slice(r[0].length):n+e}function Bo(){let e=document.documentElement,t=e.dataset.theme??e.getAttribute(`data-theme`)??``;return t.includes(`dark`)?`dark`:t.includes(`light`)?`light`:globalThis.matchMedia?.(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}var Vo=class e extends HTMLElement{#e;#t=[];#n=0;#r=null;#i=null;#a=`file`;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Oo]}disconnectedCallback(){for(let e of this.#t)URL.revokeObjectURL(e);this.#t.length=0,Mo===this&&(Mo=null)}static open(t){e.close();let r=document.createElement(`slicc-quick-look`);r.#r=t,r.#n+=1,r.#a=jo(t);let i=t.path.split(`/`).pop()||t.path,a=t.path.slice(0,t.path.length-i.length),o=j(`div`,{class:`backdrop`}),s=j(`button`,{class:`x`});s.setAttribute(`aria-label`,`Close preview`),s.appendChild(n(`x`,{size:14}));let c=j(`div`,{class:`header`},j(`div`,{class:`name`},j(`span`,{class:`dir`},a),i));c.appendChild(j(`span`,{class:`chip`},Ho(t))),t.gitStatus&&c.appendChild(j(`span`,{class:`chip chip--git`},t.gitStatus));let l=Ao(t);l.length>1&&c.appendChild(r.#o(l)),c.appendChild(s);let u=j(`div`,{class:`content`});r.#i=u,r.#s();let d=j(`div`,{class:`panel`},c,u);d.tabIndex=-1,r.#e.append(o,d),document.body.appendChild(r),Mo=r,d.focus(),o.addEventListener(`click`,()=>r.#l(`backdrop`)),s.addEventListener(`click`,()=>r.#l(`close-button`)),No&&document.removeEventListener(`keydown`,No),No=e=>{e.key===`Escape`&&r.#l(`escape`)},document.addEventListener(`keydown`,No)}static close(){if(Mo){for(let e of Mo.#t)URL.revokeObjectURL(e);Mo.remove(),Mo=null}No&&=(document.removeEventListener(`keydown`,No),null)}#o(e){let t=e.map(e=>j(`button`,{type:`button`},ko[e])),n=()=>{for(let[n,r]of e.entries())t[n]?.setAttribute(`aria-pressed`,String(this.#a===r))};n();for(let[r,i]of e.entries())t[r]?.addEventListener(`click`,()=>{this.#a!==i&&(this.#a=i,n(),this.#s())});return j(`div`,{class:`toggle`},...t)}#s(){let e=this.#r,t=this.#i;!e||!t||(t.replaceChildren(this.#d(e)),t.classList.toggle(`content--rich`,this.#a===`rendered`&&e.rendered?.mount===`sandbox`),this.#a!==`rendered`&&Po(e)&&this.#u(this.#n))}#c(e){let t=e.rendered;if(!t)return j(`pre`,null,Fo(e.content));if(t.mount===`sandbox`){let n=document.createElement(`iframe`);return n.setAttribute(`sandbox`,``),n.srcdoc=zo(t.html,Bo()),n.title=`${e.path.split(`/`).pop()||e.path} preview`,n.className=`rendered-frame`,n}let n=j(`div`,{class:`rendered`}),r=this.ownerDocument.createRange();return r.selectNodeContents(n),n.appendChild(r.createContextualFragment(t.html)),n}#l(t){this.dispatchEvent(new CustomEvent(`quick-look-close`,{bubbles:!0,composed:!0,detail:{reason:t}})),e.close()}async#u(e){let n=this.#r,r=this.#i;if(!n||!r)return;let i;try{i=await t(()=>import(`./dist-B4LJzMVB.js`).then(e=>e.t),__vite__mapDeps([0,1,2]))}catch{return}if(Ro(i),e!==this.#n||!this.isConnected)return;let a=n.path.split(`/`).pop()||n.path,o=Fo(n.content),s={themeType:Bo(),theme:{dark:`github-dark`,light:`github-light`},stickyHeader:!1,disableFileHeader:!0},c=j(`div`);try{if(this.#a===`diff`&&n.baseContent!==void 0){let e=new i.FileDiff({...s,diffStyle:`unified`});e.render({oldFile:{name:a,contents:n.baseContent},newFile:{name:a,contents:o},containerWrapper:c}),n.line!==void 0&&e.setSelectedLines({start:n.line,end:n.line,side:`additions`})}else{let e=new i.File(s);e.render({file:{name:a,contents:o},containerWrapper:c}),n.line!==void 0&&e.setSelectedLines({start:n.line,end:n.line})}}catch{return}e!==this.#n||!this.isConnected||(r.classList.add(`content--rich`),r.replaceChildren(c))}#d(e){let t=e.mimeType;if(this.#a===`rendered`)return this.#c(e);if(Po(e))return j(`pre`,null,Fo(e.content));if(t.startsWith(`image/`)){let n=document.createElement(`img`);return n.src=this.#f(e.content,t),n.alt=e.path.split(`/`).pop()||``,n}if(t.startsWith(`audio/`)){let n=document.createElement(`audio`);return n.controls=!0,n.src=this.#f(e.content,t),n}if(t.startsWith(`video/`)){let n=document.createElement(`video`);return n.controls=!0,n.src=this.#f(e.content,t),n}if(t===`application/pdf`){let n=document.createElement(`iframe`);return n.src=this.#f(e.content,t),n.title=e.path.split(`/`).pop()||`PDF preview`,n}return j(`div`,{class:`fallback`},j(`div`,null,`Preview not available for this file type (${Uo(typeof e.content==`string`?e.content.length:e.content.byteLength)})`),j(`div`,{style:`margin-top:6px;`},j(`code`,null,t)))}#f(e,t){let n=URL.createObjectURL(Io(e,t));return this.#t.push(n),n}};function Ho(e){let t=e.mimeType.split(`;`,1)[0]?.trim()??e.mimeType;return t===`application/octet-stream`?`binary`:t.slice(t.indexOf(`/`)+1).replace(/^x-/,``).replace(/\+.*$/,``)}function Uo(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}A(`slicc-quick-look`,Vo);var Wo=`
|
|
4737
4787
|
.slicc-chatpane {
|
|
4738
4788
|
flex: 1 1 0;
|
|
4739
4789
|
width: 100%;
|
|
@@ -4774,7 +4824,7 @@ iframe {
|
|
|
4774
4824
|
-webkit-mask-image: none;
|
|
4775
4825
|
mask-image: none;
|
|
4776
4826
|
}
|
|
4777
|
-
`,
|
|
4827
|
+
`,Go=`slicc-chatpane-style`;function Ko(e){if(e.getElementById(Go))return;let t=e.createElement(`style`);t.id=Go,t.textContent=Wo,(e.head??e.documentElement).appendChild(t)}var qo=[`slicc-chat-thread`,`slicc-composer`];A(`slicc-chatpane`,class extends HTMLElement{static observedAttributes=[`narrow`];#e=null;#t=!1;connectedCallback(){Ko(this.ownerDocument),this.classList.add(`slicc-chatpane`),this.setAttribute(`part`,`pane`),this.#t=!0,this.#n(),this.#r()}disconnectedCallback(){this.#e?.disconnect(),this.#e=null}attributeChangedCallback(e,t,n){e===`narrow`&&t!==n&&this.isConnected&&(this.#n(),this.dispatchEvent(new CustomEvent(`slicc-chatpane-narrow-change`,{detail:{narrow:this.narrow},bubbles:!0,composed:!0})))}get narrow(){return this.hasAttribute(`narrow`)}set narrow(e){e?this.setAttribute(`narrow`,``):this.removeAttribute(`narrow`)}get nav(){return this.querySelector(`:scope > slicc-nav`)}get thread(){return this.querySelector(`:scope > slicc-chat-thread`)}get composer(){return this.querySelector(`:scope > slicc-composer`)}#n(){if(!this.#t)return;let e=this.narrow;for(let t of qo)for(let n of this.querySelectorAll(`:scope > ${t}`))e?n.setAttribute(`open`,``):n.removeAttribute(`open`)}#r(){this.#e||(this.#e=new MutationObserver(()=>this.#n()),this.#e.observe(this,{childList:!0}))}});var Jo=`
|
|
4778
4828
|
.slicc-shell { display: flex; flex: 1; min-height: 0; }
|
|
4779
4829
|
.slicc-shell > slicc-dock-tree,
|
|
4780
4830
|
.slicc-shell > .dock-tree {
|
|
@@ -4790,22 +4840,29 @@ iframe {
|
|
|
4790
4840
|
and blur the rail's own opaque strip. */
|
|
4791
4841
|
.slicc-shell > slicc-dock,
|
|
4792
4842
|
.slicc-shell > .dock { flex: 0 0 48px; position: relative; z-index: 3; }
|
|
4793
|
-
`,
|
|
4843
|
+
`,Yo=`slicc-shell-style`;function Xo(e){if(e.getElementById(Yo))return;let t=e.createElement(`style`);t.id=Yo,t.textContent=Jo,(e.head??e.documentElement).appendChild(t)}var Zo=`chat`;A(`slicc-shell`,class extends HTMLElement{#e=e=>{let t=e.detail?.placed;if(!Array.isArray(t))return;let n=t.some(e=>e!==Zo);this.querySelector(`slicc-chatpane`)?.toggleAttribute(`narrow`,n)};connectedCallback(){Xo(this.ownerDocument),this.classList.add(`slicc-shell`),this.setAttribute(`part`,`shell`),this.addEventListener(`dock-tree-render`,this.#e)}disconnectedCallback(){this.removeEventListener(`dock-tree-render`,this.#e)}get dockTree(){return this.querySelector(`:scope > slicc-dock-tree, :scope > .dock-tree`)}get dock(){return this.querySelector(`:scope > slicc-dock, :scope > .dock`)}});var Qo=[`idle`,`thinking`,`working`,`awaiting`],$o=.22,es=.08,ts=3400,ns=4600,rs=.38,is=2600,as=.22,os=1e3,ss=.1,cs=.55,ls=.16,us={left:{raise:-9,tilt:-10},right:{raise:2,tilt:6}},ds=[{x:45,y:-15},{x:150,y:-10},{x:95,y:-25},{x:160,y:-30},{x:40,y:-28}],fs=1300,ps=[{x:70,y:60},{x:130,y:40},{x:100,y:72},{x:55,y:30},{x:148,y:62}],ms=4100,hs=2.2,gs={x:100,y:66};function _s(e,t,n){return e+(t-e)*n}function vs(e,t,n,r){return e+(t-e)*Math.min(1,n*r)}function ys(e){return e===null?null:Qo.includes(e)?e:`idle`}function bs(e){let t=Number.parseFloat(e??``);return Number.isFinite(t)&&t>=0?t:90}function xs(e){return+(e===`working`)}function Ss(e){return _s(38,10,e)}function Cs(e,t){return _s(e,e*$o,t)}function ws(e){return e<=50?1:e>=85?2.2:1+(e-50)/35*1.2}function Ts(e){return e<=0?1:1+ls*Math.min(1,e/350)}function Es(e){return Math.max(2,Math.min(16,38-e-4))}function Ds(e){return e>.001?12+e*2*38:9}function Os(e){return e>.001?88-e*2*38:91}function ks(e,t){let n=e-50;return _s(Math.sqrt(Math.max(0,1444-n*n)),36,t)}function As(e,t){return e<=t?ss:_s(ss,cs,Math.min(1,(e-t)/12))}function js(e){return e.left.raise<0}function Ms(e,t=Math.random){let n=t()<.65?!js(e):js(e),r={raise:-(7+t()*5),tilt:7+t()*5},i={raise:1+t()*2,tilt:4+t()*3};return n?{left:{raise:r.raise,tilt:-r.tilt},right:i}:{left:{raise:i.raise,tilt:-i.tilt},right:r}}function Ns(e,t,n){return t<2?0:(e+1+Math.floor(n()*(t-1)))%t}var Ps=`http://www.w3.org/2000/svg`,Fs={cx:55,cy:50,r:38},Is={cx:145,cy:50,r:38},Ls=1,Rs=12,zs=.72,Bs=[.08,.36,.68,.94],Vs=1372365086,Hs=2654435769,Us=2246822507,Ws=Date.UTC(2001,0,1),Gs=500,Ks={cone:{vb:`70 330 440 570`,eyes:{top:-18.5,left:17,width:70,height:44},zoom:3,glyph:96},scoop:{vb:`0 0 580 470`,eyes:{top:30,left:15,width:70,height:45},zoom:2.65,glyph:96}},qs={cone:`#D2691E`,scoop:`#FFB6C1`},Js=M(`
|
|
4794
4844
|
:host{display:block;width:26px;height:26px;pointer-events:none;}
|
|
4795
|
-
|
|
4845
|
+
/* The tile itself no longer clips: .crop owns the roundrect so the brows can
|
|
4846
|
+
break out of it (see .brow-layer). Everything else still paints inside. */
|
|
4847
|
+
.avatar{position:relative;display:block;width:100%;height:100%;overflow:visible;}
|
|
4848
|
+
.crop{position:absolute;inset:0;overflow:hidden;border-radius:7px;background:color-mix(in srgb,var(--slicc-agent-tabs-hue) 18%,transparent);}
|
|
4796
4849
|
.icon-inner{position:absolute;inset:0;transform-origin:0 0;transform:translate(var(--tx),var(--ty)) scale(var(--zoom));}
|
|
4850
|
+
/* A second copy of the icon-inner zoom/pan, outside the crop, carrying the
|
|
4851
|
+
brows only: at BROW_Y=2 with a raise of up to -9 in a band zoomed ~2.65x the
|
|
4852
|
+
roundrect would otherwise shave the brows off at the top and outer sides. */
|
|
4853
|
+
.brow-layer{pointer-events:none;}
|
|
4797
4854
|
.glyph{position:absolute;left:50%;top:50%;display:block;width:var(--g);height:var(--g);overflow:visible;transform:translate(-50%,-50%);}
|
|
4798
4855
|
.eyes{position:absolute;pointer-events:none;}
|
|
4799
|
-
.eyes-svg{display:block;overflow:visible;}
|
|
4856
|
+
.eyes-svg,.brows-svg{display:block;overflow:visible;}
|
|
4800
4857
|
.eye-blink,.eye-frozen{transform-box:view-box;}
|
|
4801
|
-
@keyframes slicc-agent-avatar-blink{0%,92%,100%{transform:scaleY(1);}96%{transform:scaleY(${
|
|
4858
|
+
@keyframes slicc-agent-avatar-blink{0%,92%,100%{transform:scaleY(1);}96%{transform:scaleY(${es});}}
|
|
4802
4859
|
:host([blink]) .eye-blink{animation:slicc-agent-avatar-blink 3.4s ease-in-out infinite;}
|
|
4803
4860
|
:host([blink]) .eye-r{animation-duration:4.6s;}
|
|
4804
4861
|
/* The engine drives blinks itself so it can commit shape changes at the apex. */
|
|
4805
4862
|
.avatar[data-expressive] .eye-blink{animation:none;}
|
|
4806
4863
|
.brow{transition:opacity 350ms ease,transform 350ms ease;}
|
|
4807
4864
|
@media (prefers-reduced-motion:reduce){:host([blink]) .eye-blink{animation:none;}.brow{transition:none;}}
|
|
4808
|
-
`);function z(e,t,...n){let r=document.createElementNS(_s,e);for(let[e,n]of Object.entries(t))r.setAttribute(e,String(n));return r.append(...n),r}function Ms(e,t,n){e&&e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Ns(e,t,n){Ms(e,t,n.toFixed(2))}function Ps(e,t){let n=e.replace(`#`,``),r=n.length===3?[...n].map(e=>`${e}${e}`).join(``):n,i=Number.parseInt(r,16);if(!Number.isFinite(i))return e;let a=t<0?0:255,o=e=>Math.round(e+(a-e)*Math.abs(t)).toString(16).padStart(2,`0`);return`#${o(i>>16&255)}${o(i>>8&255)}${o(i&255)}`}function Fs(e,t,n){let r=[[`path`,{d:`M108.22,414.88l189.84,460.03c1.36,3.3,6.09,3.16,7.25-.22l159.34-463.34c.87-2.53-1.03-5.16-3.7-5.13l-349.18,3.32c-2.74.03-4.59,2.82-3.55,5.35Z`,fill:e,stroke:t,"stroke-linejoin":`round`,"stroke-width":20}],[`path`,{d:`M261.93,482.48h0c15.03-15.03,4.46-40.72-16.79-40.83h0c-21.37-.11-32.14,25.72-17.03,40.83h0c9.34,9.34,24.48,9.34,33.82,0Z`,fill:n}],[`path`,{d:`M384.85,527.49l-51.82,51.82c-2.24,2.24-2.24,5.86,0,8.1l55.71,55.71c2.24,2.24,5.86,2.24,8.1,0h0c.62-.62,1.08-1.36,1.37-2.19l26.52-77.11c.71-2.07.18-4.36-1.37-5.91l-30.41-30.41c-2.24-2.24-5.86-2.24-8.1,0Z`,fill:n}],[`path`,{d:`M371.7,684.58l-25.94,25.94c-2.24,2.24-2.24,5.86,0,8.1l12.67,12.67c2.99,2.99,8.09,1.82,9.46-2.19l13.28-38.61c1.97-5.74-5.17-10.2-9.46-5.91Z`,fill:n}],[`path`,{d:`M159.42,564.14l2.73,6.83c1.52,3.82,6.46,4.83,9.37,1.93l2.05-2.05c2.24-2.24,2.24-5.86,0-8.1l-4.78-4.78c-4.4-4.4-11.67.39-9.37,6.17Z`,fill:n}],[`path`,{d:`M243.92,633.11l-48.65-48.65c-5.24-5.24-13.74-5.24-18.99,0h0c-3.8,3.8-4.97,9.49-2.98,14.47l27.77,69.54c3.58,8.95,15.14,11.33,21.96,4.51l20.89-20.89c5.24-5.24,5.24-13.74,0-18.99Z`,fill:n}],[`path`,{d:`M211.32,533.1h0c14.11-14.11,14.11-36.98,0-51.08l-34.94-34.94c-.72-.72-.72-1.89,0-2.62h0c1.16-1.16.34-3.15-1.3-3.16l-11.23-.06c-25.62-.13-43.23,25.72-33.73,49.51l5.37,13.45c1.82,4.55,4.54,8.68,8,12.15l16.74,16.74c14.11,14.11,36.98,14.11,51.08,0Z`,fill:n}],[`path`,{d:`M263.74,792.53h0c-5.69,5.69-7.45,14.23-4.46,21.71l22.5,56.36c6.92,17.34,31.68,16.74,37.75-.92l8.66-25.2c2.5-7.28.64-15.35-4.8-20.79l-31.17-31.17c-7.87-7.87-20.62-7.87-28.48,0Z`,fill:n}],[`path`,{d:`M392.94,503.07l40.81-40.81c2.24-2.24,5.86-2.24,8.1,0l.06.06c2.24,2.24,2.24,5.86,0,8.1l-40.81,40.81c-2.24,2.24-2.24,5.86,0,8.1l22.48,22.48c2.99,2.99,8.09,1.82,9.46-2.19l30.71-89.32c1.27-3.71-1.47-7.57-5.39-7.59l-120.63-.6c-5.11-.03-7.69,6.16-4.08,9.77l51.18,51.18c2.24,2.24,5.86,2.24,8.1,0Z`,fill:n}]],i=[[274.59,463.59,84.73,95.66,42.36,`translate(-268.79 373.91) rotate(-45)`],[291.06,603.84,72.24,90.24,36.12,`translate(-363.06 421.43) rotate(-45)`],[217.18,527.25,72.24,95.66,36.12,`translate(-332.45 347.55) rotate(-45)`],[236.26,661.25,67.04,90.24,33.52,`translate(-420.46 397.65) rotate(-45)`]],a=r.map(([e,t])=>z(e,t));return a.push(...i.map(([e,t,r,i,a,o])=>z(`rect`,{x:e,y:t,width:r,height:i,rx:a,ry:a,transform:o,fill:n})),z(`ellipse`,{cx:288.37,cy:404.38,rx:182.34,ry:67.01,fill:e,stroke:t,"stroke-miterlimit":10,"stroke-width":20})),a}function Is(e,t){return[z(`path`,{d:`M566.75,340.67c0-29.85-12.97-56.87-33.96-76.47,4.8-9.98,7.44-20.71,7.44-31.9,0-38.29-30.62-71.33-74.92-86.77.33-3.07.51-6.17.51-9.3,0-69.72-84.29-126.24-188.26-126.24s-188.26,56.52-188.26,126.24c0,4,.29,7.95.83,11.86-34.94,15.4-58.48,44.25-58.48,77.34,0,18.21,7.15,34.25,19.39,49.26-25.1,19.88-41.05,49.47-41.05,82.54,0,59.85,52.15,108.37,116.49,108.37,10.83,0,21.3-1.4,31.26-3.98,31.42,41.91,83.55,69.34,142.55,69.34,64.73,0,121.2-33,151.11-81.94,63.8-.57,115.34-48.85,115.34-108.34Z`,fill:e,stroke:t,"stroke-width":20})]}function Ls(e,t,n,r){return z(`rect`,{x:e-t,y:50-t,width:t*2,height:t*2,rx:n,...r})}function Rs(e,t,n,r){return z(`g`,{class:`pupil pupil-${t}`},Ls(e,n,os(n,r),{fill:`#000`}),z(`circle`,{cx:e-n*.3,cy:50-n*.35,r:n*.4,fill:`#fff`}))}function zs(e,t){return z(`line`,{class:`lid-line lid-${t}`,x1:e-38,y1:50,x2:e+38,y2:50,stroke:`#000`,"stroke-width":4,"stroke-linecap":`round`,display:`none`})}function Bs(e,t){let n=z(`line`,{class:`brow brow-${t}`,x1:e-22,y1:2,x2:e+22,y2:2,stroke:`#000`,"stroke-width":8,"stroke-linecap":`round`,opacity:0});return n.style.transformBox=`fill-box`,n.style.transformOrigin=`center`,n}function Vs(e,t,n){let r=z(`g`,{class:`${n} eye-${t}`});return r.style.transformOrigin=`${e}px 50px`,r}function Hs(e,t,n){let r=`slicc-agent-avatar-noise-${t}`;return z(`g`,{class:`eye-static eye-body-${t}`},z(`defs`,{},z(`clipPath`,{id:r},Ls(e,38,n,{class:`noise-clip`}))),Ls(e,38,n,{class:`socket`,fill:`#fff`}),z(`g`,{class:`noise noise-${t}`,"clip-path":`url(#${r})`,"data-cell-size":bs}),Ls(e,38,n,{class:`eye-outline`,fill:`none`,stroke:`#000`,"stroke-width":4}))}function Us(e){return e^=e<<13,e^=e>>>17,e^=e<<5,e>>>0}function Ws(e){return(ws^Math.imul(e,Es))>>>0}function Gs(e,t){return(Ws(e)^Math.imul(t,Ts))>>>0}function Ks(){return Math.floor((Date.now()-Ds)/1e3*xs)>>>0}function qs(e){return[z(`circle`,{cx:e,cy:50,r:38,fill:`#fff`,stroke:`#000`,"stroke-width":4}),z(`line`,{x1:e-15,y1:35,x2:e+15,y2:65,stroke:`#000`,"stroke-width":8,"stroke-linecap":`round`}),z(`line`,{x1:e+15,y1:35,x2:e-15,y2:65,stroke:`#000`,"stroke-width":8,"stroke-linecap":`round`})]}function Js(e,t,n,r,i){let a=n-t,o=r-50,s=Math.hypot(a,o),c=Math.min(s,i),l=s>0?a/s*c:0,u=s>0?o/s*c:0;e.setAttribute(`transform`,`translate(${l.toFixed(2)},${u.toFixed(2)})`)}var Ys={now:()=>performance.now(),requestFrame:e=>window.requestAnimationFrame(e),cancelFrame:e=>window.cancelAnimationFrame(e),delay:(e,t)=>window.setTimeout(e,t),cancelDelay:e=>window.clearTimeout(e),repeat:(e,t)=>window.setInterval(e,t),cancelRepeat:e=>window.clearInterval(e)};A(`slicc-agent-avatar`,class extends HTMLElement{static observedAttributes=[`type`,`color`,`eyes`,`fill`,`connection`,`activity`,`gaze-target`,`drowse-delay`];#e;#t=e=>this.#Oe(e);#n=()=>{this.#B(),this.#K(),this.#H()===`static`&&this.#Ce()};#r=null;#i=null;#a=null;#o=null;#s=[];#c=null;#l=16;#u=!1;#d=null;#f=!1;#p=!1;#m=0;#h=0;#g=!1;#_=0;#v=0;#y=qo;#b={x:100,y:50};#x=0;#S=0;#C=18;#w=null;#T=0;#E=0;#D=0;#O=null;#k=0;#A=[];#j=null;#M=[];#N=$o;#P=null;#F=Ys;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[js]}connectedCallback(){this.#r=window.matchMedia(`(prefers-reduced-motion: reduce)`),this.#r.addEventListener(`change`,this.#n),this.#L(),this.#B(),this.#K()}disconnectedCallback(){this.#V(),this.#Ee(),this.#Z(),this.#r?.removeEventListener(`change`,this.#n),this.#r=null,this.#p=!1}attributeChangedCallback(e){if(this.isConnected){if(e===`activity`||e===`gaze-target`||e===`drowse-delay`){this.#G();return}this.#L(),this.#B(),this.#K()}}get activity(){return ns(this.getAttribute(`activity`))}set activity(e){e===null?this.removeAttribute(`activity`):this.setAttribute(`activity`,e)}get gazeTarget(){return this.getAttribute(`gaze-target`)}set gazeTarget(e){e===null?this.removeAttribute(`gaze-target`):this.setAttribute(`gaze-target`,e)}get drowseDelay(){return rs(this.getAttribute(`drowse-delay`))}set drowseDelay(e){this.setAttribute(`drowse-delay`,String(e))}get clock(){return this.#F}set clock(e){if(e===this.#F)return;this.#Z(),this.#F=e;let t=e.now();this.#k=t,this.#w!==null&&(this.#w=t),this.#T=0,this.#E=0,this.#D=0,this.#P=null,this.isConnected&&this.#K()}get expression(){return Object.freeze({activity:this.#d,shape:this.#m,lidTop:this.#_,lidBottom:this.#v,pupilRadius:this.#C,gaze:{...this.#b},brows:this.#y,browsVisible:this.#ge()})}wake(){let e=this.#F.now();this.#w=e,this.#U()||(this.#D=e+350,this.#se()),this.#J()}scrutinize(){this.#E=this.#F.now()+Uo,this.#J()}glower(){this.#T=this.#F.now()+Vo,this.#J()}resetExpression(){this.#oe();let e=this.#F.now();this.#T=0,this.#E=0,this.#D=0,this.#_=0,this.#v=0,this.#y=qo,this.#N=$o,this.#P=null,this.#S=0,this.#w=this.#d===`awaiting`?e:null,this.#g=!1,this.#h=is(this.#d),this.#m=this.#h,this.#k=e,this.#I()&&this.isConnected&&(this.#_e(),this.#K())}#I(){return this.hasAttribute(`activity`)||this.#f}#L(){this.#Ee(),this.#s=[];let e=this.getAttribute(`type`)===`cone`?`cone`:`scoop`,t=ks[e],n=this.getAttribute(`color`)??As[e],r=this.#I();this.#d=ns(this.getAttribute(`activity`)),this.#d===`awaiting`&&this.#w===null&&(this.#w=this.#F.now()),this.#p||=(this.#m=this.#h=is(this.#d),!0);let i=z(`svg`,{class:`glyph`,viewBox:t.vb,preserveAspectRatio:`xMidYMid meet`,style:`--g:${t.glyph}%`},...e===`cone`?Fs(n,Ps(n,-.38),Ps(n,.3)):Is(n,Ps(n,-.32)));this.#o=z(`svg`,{class:`eyes-svg`,viewBox:`0 0 200 100`,width:`100%`,height:`100%`,preserveAspectRatio:`xMidYMid meet`},...this.#R(r));let a=j(`span`,{class:`eyes`,style:`top:${t.eyes.top}%;left:${t.eyes.left}%;width:${t.eyes.width}%;height:${t.eyes.height}%`});a.append(this.#o);let o=j(`span`,{class:`icon-inner`,style:`--tx:${((.5-t.zoom*((t.eyes.left+t.eyes.width/2)/100))*100).toFixed(2)}%;--ty:${((.5-t.zoom*((t.eyes.top+t.eyes.height/2)/100))*100).toFixed(2)}%;--zoom:${t.zoom}`},i,a);this.#e.replaceChildren(j(`span`,{class:`avatar`,"aria-hidden":`true`,"data-expressive":r||null},o)),this.#i=this.#e.querySelector(`.pupil-l`),this.#a=this.#e.querySelector(`.pupil-r`),this.#H()===`static`&&this.#Ce(),r&&this.#_e()}#R(e){let t=this.#H();if(t===`none`)return[];if(t===`dead`)return[...qs(vs.cx),...qs(ys.cx)];this.#C=this.#z(),this.#l=ls(this.#C);let n=as(this.#m);return[vs.cx,ys.cx].map((r,i)=>{let a=i===0?`l`:`r`,o=t===`static`,s=Vs(r,a,o?`eye-frozen`:`eye-blink`),c=o?Hs(r,a,n):z(`g`,{class:`eye-body eye-body-${a}`},Ls(r,38,n,{class:`socket`,fill:`#fff`,stroke:`#000`,"stroke-width":4}),Rs(r,a,this.#C,this.#m));if(s.append(c),!e)return s;let l=`slicc-agent-avatar-lid-${a}`;return s.append(z(`defs`,{},z(`clipPath`,{id:l},z(`rect`,{class:`lid-clip`,x:r-38-3,y:9,width:82,height:82}))),zs(r,`top`),zs(r,`bottom`),Bs(r,a)),c.setAttribute(`clip-path`,`url(#${l})`),s})}#z(){return 18*ss(Math.max(0,Math.min(100,Number.parseFloat(this.getAttribute(`fill`)??`0`)||0)))}#B(){let e=this.#H()===`open`&&!this.#r?.matches&&(this.#d===null||this.#d===`working`);e&&!this.#u?(this.ownerDocument.addEventListener(`pointermove`,this.#t),this.#u=!0):e||(this.#V(),(this.#d===null||this.#d===`working`)&&this.#De())}#V(){this.#u&&=(this.ownerDocument.removeEventListener(`pointermove`,this.#t),!1)}#H(){let e=this.getAttribute(`connection`);if(e!==null&&e!==`connected`)return`static`;let t=this.getAttribute(`eyes`);return t===`dead`||t===`none`||t===`static`?t:`open`}#U(){return this.#r?.matches===!0||this.#H()!==`open`||!this.isConnected||!this.#p}#W(){return this.#H()!==`open`}#G(){let e=ns(this.getAttribute(`activity`)),t=this.#e.querySelector(`.avatar[data-expressive]`)!==null;e===`awaiting`&&this.#d!==`awaiting`?this.#w=this.#F.now():e!==`awaiting`&&(this.#w=null),this.#P=null,this.#d=e,this.#I()!==t&&this.#L(),this.#B(),this.#K()}#K(){if(!this.#I()||!this.isConnected){this.#Z();return}if(this.#W()||this.#r?.matches){this.#X(),this.#q(),this.#ee();return}this.#le(),this.#Y()}#q(){for(let e of this.#M)this.#F.cancelRepeat(e);this.#M=[]}#J(){this.#I()||(this.#f=!0,this.isConnected&&this.#L()),this.#K()}#Y(){this.#O===null&&(this.#k=this.#F.now(),this.#O=this.#F.requestFrame(this.#Q))}#X(){this.#O!==null&&(this.#F.cancelFrame(this.#O),this.#O=null)}#Z(){this.#X();for(let e of this.#A)this.#F.cancelDelay(e);this.#A=[],this.#j!==null&&this.#F.cancelDelay(this.#j),this.#j=null;for(let e of this.#M)this.#F.cancelRepeat(e);this.#M=[]}#Q=e=>{this.#O=this.#F.requestFrame(this.#Q);let t=Math.min(.05,Math.max(0,(e-this.#k)/1e3));this.#k=e,this.#$(e,t),this.#_e()};#$(e,t){let n=is(this.#d);n!==this.#h&&!this.#g&&this.#ie(n),this.#m=ts(this.#m,this.#h,6,t),this.#_=ts(this.#_,this.#ne(e,!1),5,t),this.#v=ts(this.#v,this.#re(e),5,t),this.#fe(e,t)}#ee(){let e=this.#F.now();this.#W()||(this.#h=this.#m=is(this.#d),this.#_=this.#ne(e,!0),this.#v=this.#re(e),this.#pe()),this.#_e(),this.#te(e)}#te(e){if(this.#j!==null&&this.#F.cancelDelay(this.#j),this.#j=null,this.#W())return;let t=this.#d===`awaiting`&&this.#w!==null?this.#w+this.drowseDelay*1e3:1/0,n=Math.min(this.#T>e?this.#T:1/0,this.#E>e?this.#E:1/0,t>e?t:1/0);Number.isFinite(n)&&(this.#j=this.#F.delay(()=>this.#ee(),Math.max(0,n-e)+1))}#ne(e,t){let n=this.#T>e?Bo:0;if(this.#d!==`awaiting`)return n;let r=this.#w===null?0:(e-this.#w)/1e3,i=this.drowseDelay;return Math.max(n,ps(t&&r>i?i+12:r,i))}#re(e){return this.#E>e?Ho:0}#ie(e){if(this.#U()){this.#h=this.#m=e;return}this.#g=!0,this.#se(()=>{this.#h=this.#m=e,this.#g=!1})}#ae(){return[...this.#e.querySelectorAll(`.eye-blink`)]}#oe(){for(let e of this.#A)this.#F.cancelDelay(e);this.#A=[];for(let e of this.#ae())e.style.transition=`none`,e.style.transform=`scaleY(1)`}#se(e){let t=this.#ae();if(t.length===0){e?.();return}t.forEach((t,n)=>{this.#ce(t,n===0?e:void 0)})}#ce(e,t){e.style.transition=`transform 110ms ease-in`,e.style.transform=`scaleY(${Lo})`,this.#A.push(this.#F.delay(()=>{t?.(),this.#d===`thinking`&&!this.#W()&&(this.#y=hs(this.#y)),e.style.transition=`transform 130ms ease-out`,e.style.transform=`scaleY(1)`},120))}#le(){this.#M.length>0||this.#U()||this.#W()||[Ro,zo].forEach((e,t)=>{this.#M.push(this.#F.repeat(()=>{let e=this.#ae()[t];e&&this.hasAttribute(`blink`)&&!this.#W()&&this.#ce(e)},e))})}#ue(e){return this.#d===`thinking`?{target:this.#de(e,Jo,Yo),rate:9}:this.#d===`idle`?{target:this.#de(e,Xo,Zo),rate:Qo}:this.#d===`awaiting`?{target:this.#he(e),rate:6}:null}#de(e,t,n){return e-this.#S>n&&(this.#S=e,this.#x=gs(this.#x,t.length,Math.random)),t[this.#x]??$o}#fe(e,t){let n=this.#ue(e);n&&(this.#b={x:ts(this.#b.x,n.target.x,n.rate,t),y:ts(this.#b.y,n.target.y,n.rate,t)},this.#me())}#pe(){this.#d===`awaiting`?(this.#b=this.#he(this.#F.now()),this.#me()):(this.#d===`thinking`||this.#d===`idle`)&&this.#De()}#me(){this.#i&&Js(this.#i,vs.cx,this.#b.x,this.#b.y,this.#l),this.#a&&Js(this.#a,ys.cx,this.#b.x,this.#b.y,this.#l)}#he(e){if(this.#P!==null&&e-this.#P<Os)return this.#N;this.#P=e;let t=this.getAttribute(`gaze-target`),n=t?this.ownerDocument.querySelector(t):null,r=this.#o?.getBoundingClientRect();if(!n||!r?.width||!r.height)return this.#N=$o,this.#N;let i=n.getBoundingClientRect();return this.#N={x:(i.left+i.width/2-r.left)*(200/r.width),y:(i.top+i.height/2-r.top)*(100/r.height)},this.#N}#ge(){return this.#d===`thinking`}#_e(){let e=this.#F.now(),t=this.#m,n=as(t),r=this.#z()*cs(this.#D-e);this.#C=r,this.#l=ls(r);for(let[e,i]of[`l`,`r`].entries()){let a=e===0?vs.cx:ys.cx;this.#ve(i,n),this.#ye(i,a,r,t),this.#be(i,a,t),this.#Se(i)}}#ve(e,t){for(let n of this.#e.querySelectorAll(`.eye-body-${e} .socket, .eye-body-${e} .eye-outline, .eye-body-${e} .noise-clip`))Ns(n,`rx`,t)}#ye(e,t,n,r){let i=this.#e.querySelector(`.pupil-${e} rect`);if(!i)return;Ns(i,`x`,t-n),Ns(i,`y`,50-n),Ns(i,`width`,n*2),Ns(i,`height`,n*2),Ns(i,`rx`,os(n,r));let a=this.#e.querySelector(`.pupil-${e} circle`);Ns(a,`cx`,t-n*.3),Ns(a,`cy`,50-n*.35),Ns(a,`r`,n*.4)}#be(e,t,n){let r=this.#e.querySelector(`.eye-${e} .lid-clip`);if(!r)return;let i=us(this.#_),a=ds(this.#v);Ns(r,`y`,i),Ns(r,`height`,Math.max(0,a-i)),this.#xe(`.eye-${e} .lid-top`,t,i,n,this.#_),this.#xe(`.eye-${e} .lid-bottom`,t,a,n,this.#v)}#xe(e,t,n,r,i){let a=this.#e.querySelector(e);if(!a)return;let o=fs(n,r);Ns(a,`x1`,t-o),Ns(a,`x2`,t+o),Ns(a,`y1`,n),Ns(a,`y2`,n),Ms(a,`display`,i>.02?`inline`:`none`)}#Se(e){let t=this.#e.querySelector(`.brow-${e}`);if(!t)return;let n=this.#ge(),r=e===`l`?this.#y.left:this.#y.right;Ms(t,`opacity`,n?`1`:`0`),t.style.transform=n?`translateY(${r.raise.toFixed(2)}px) rotate(${r.tilt.toFixed(2)}deg)`:`translateY(6px)`}#Ce(){if(this.#Ee(),this.#s.length===0&&this.#we(),this.#r?.matches){this.#Te(null);return}this.#Te(Ks()),this.#c=window.setInterval(()=>{this.#Te(Ks())},1e3/xs)}#we(){let e=this.#o?.getBoundingClientRect(),t=e?Math.min(e.width/200,e.height/100):0,n=bs/(t>0?t:.25);this.#s=[...this.#e.querySelectorAll(`.noise`)].map((e,t)=>{let r=t===0?vs.cx:ys.cx,i=[],a=r-vs.r,o=r+vs.r,s=50-vs.r,c=50+vs.r;for(let e=s;e<c;e+=n)for(let t=a;t<o;t+=n){let r=z(`rect`,{x:t,y:e,width:Math.min(n,o-t),height:Math.min(n,c-e),opacity:Ss});i.push(r)}return e.replaceChildren(...i),i})}#Te(e){this.#s.forEach((t,n)=>{let r=e===null?Ws(n):Gs(n,e),i=r===0?ws:r;(t[0]?.parentElement)?.setAttribute(`data-seed`,String(i));for(let e of t){i=Us(i);let t=`${Cs[i%Cs.length]*100}%`;e.setAttribute(`fill`,`rgb(${t} ${t} ${t})`)}})}#Ee(){this.#c!==null&&(window.clearInterval(this.#c),this.#c=null)}#De(){this.#i?.setAttribute(`transform`,`translate(0,0)`),this.#a?.setAttribute(`transform`,`translate(0,0)`)}#Oe(e){if(!this.#o||!this.#i||!this.#a)return;let t=this.#o.getBoundingClientRect();!t.width||!t.height||(this.#b={x:(e.clientX-t.left)*(200/t.width),y:(e.clientY-t.top)*(100/t.height)},this.#me())}});var Xs=M(`
|
|
4865
|
+
`);function z(e,t,...n){let r=document.createElementNS(Ps,e);for(let[e,n]of Object.entries(t))r.setAttribute(e,String(n));return r.append(...n),r}function Ys(e,t,n){e&&e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Xs(e,t,n){Ys(e,t,n.toFixed(2))}function Zs(e,t){let n=e.replace(`#`,``),r=n.length===3?[...n].map(e=>`${e}${e}`).join(``):n,i=Number.parseInt(r,16);if(!Number.isFinite(i))return e;let a=t<0?0:255,o=e=>Math.round(e+(a-e)*Math.abs(t)).toString(16).padStart(2,`0`);return`#${o(i>>16&255)}${o(i>>8&255)}${o(i&255)}`}function Qs(e,t,n){let r=[[`path`,{d:`M108.22,414.88l189.84,460.03c1.36,3.3,6.09,3.16,7.25-.22l159.34-463.34c.87-2.53-1.03-5.16-3.7-5.13l-349.18,3.32c-2.74.03-4.59,2.82-3.55,5.35Z`,fill:e,stroke:t,"stroke-linejoin":`round`,"stroke-width":20}],[`path`,{d:`M261.93,482.48h0c15.03-15.03,4.46-40.72-16.79-40.83h0c-21.37-.11-32.14,25.72-17.03,40.83h0c9.34,9.34,24.48,9.34,33.82,0Z`,fill:n}],[`path`,{d:`M384.85,527.49l-51.82,51.82c-2.24,2.24-2.24,5.86,0,8.1l55.71,55.71c2.24,2.24,5.86,2.24,8.1,0h0c.62-.62,1.08-1.36,1.37-2.19l26.52-77.11c.71-2.07.18-4.36-1.37-5.91l-30.41-30.41c-2.24-2.24-5.86-2.24-8.1,0Z`,fill:n}],[`path`,{d:`M371.7,684.58l-25.94,25.94c-2.24,2.24-2.24,5.86,0,8.1l12.67,12.67c2.99,2.99,8.09,1.82,9.46-2.19l13.28-38.61c1.97-5.74-5.17-10.2-9.46-5.91Z`,fill:n}],[`path`,{d:`M159.42,564.14l2.73,6.83c1.52,3.82,6.46,4.83,9.37,1.93l2.05-2.05c2.24-2.24,2.24-5.86,0-8.1l-4.78-4.78c-4.4-4.4-11.67.39-9.37,6.17Z`,fill:n}],[`path`,{d:`M243.92,633.11l-48.65-48.65c-5.24-5.24-13.74-5.24-18.99,0h0c-3.8,3.8-4.97,9.49-2.98,14.47l27.77,69.54c3.58,8.95,15.14,11.33,21.96,4.51l20.89-20.89c5.24-5.24,5.24-13.74,0-18.99Z`,fill:n}],[`path`,{d:`M211.32,533.1h0c14.11-14.11,14.11-36.98,0-51.08l-34.94-34.94c-.72-.72-.72-1.89,0-2.62h0c1.16-1.16.34-3.15-1.3-3.16l-11.23-.06c-25.62-.13-43.23,25.72-33.73,49.51l5.37,13.45c1.82,4.55,4.54,8.68,8,12.15l16.74,16.74c14.11,14.11,36.98,14.11,51.08,0Z`,fill:n}],[`path`,{d:`M263.74,792.53h0c-5.69,5.69-7.45,14.23-4.46,21.71l22.5,56.36c6.92,17.34,31.68,16.74,37.75-.92l8.66-25.2c2.5-7.28.64-15.35-4.8-20.79l-31.17-31.17c-7.87-7.87-20.62-7.87-28.48,0Z`,fill:n}],[`path`,{d:`M392.94,503.07l40.81-40.81c2.24-2.24,5.86-2.24,8.1,0l.06.06c2.24,2.24,2.24,5.86,0,8.1l-40.81,40.81c-2.24,2.24-2.24,5.86,0,8.1l22.48,22.48c2.99,2.99,8.09,1.82,9.46-2.19l30.71-89.32c1.27-3.71-1.47-7.57-5.39-7.59l-120.63-.6c-5.11-.03-7.69,6.16-4.08,9.77l51.18,51.18c2.24,2.24,5.86,2.24,8.1,0Z`,fill:n}]],i=[[274.59,463.59,84.73,95.66,42.36,`translate(-268.79 373.91) rotate(-45)`],[291.06,603.84,72.24,90.24,36.12,`translate(-363.06 421.43) rotate(-45)`],[217.18,527.25,72.24,95.66,36.12,`translate(-332.45 347.55) rotate(-45)`],[236.26,661.25,67.04,90.24,33.52,`translate(-420.46 397.65) rotate(-45)`]],a=r.map(([e,t])=>z(e,t));return a.push(...i.map(([e,t,r,i,a,o])=>z(`rect`,{x:e,y:t,width:r,height:i,rx:a,ry:a,transform:o,fill:n})),z(`ellipse`,{cx:288.37,cy:404.38,rx:182.34,ry:67.01,fill:e,stroke:t,"stroke-miterlimit":10,"stroke-width":20})),a}function $s(e,t){return[z(`path`,{d:`M566.75,340.67c0-29.85-12.97-56.87-33.96-76.47,4.8-9.98,7.44-20.71,7.44-31.9,0-38.29-30.62-71.33-74.92-86.77.33-3.07.51-6.17.51-9.3,0-69.72-84.29-126.24-188.26-126.24s-188.26,56.52-188.26,126.24c0,4,.29,7.95.83,11.86-34.94,15.4-58.48,44.25-58.48,77.34,0,18.21,7.15,34.25,19.39,49.26-25.1,19.88-41.05,49.47-41.05,82.54,0,59.85,52.15,108.37,116.49,108.37,10.83,0,21.3-1.4,31.26-3.98,31.42,41.91,83.55,69.34,142.55,69.34,64.73,0,121.2-33,151.11-81.94,63.8-.57,115.34-48.85,115.34-108.34Z`,fill:e,stroke:t,"stroke-width":20})]}function ec(e,t,n,r){return z(`rect`,{x:e-t,y:50-t,width:t*2,height:t*2,rx:n,...r})}function tc(e,t,n,r){return z(`g`,{class:`pupil pupil-${t}`},ec(e,n,Cs(n,r),{fill:`#000`}),z(`circle`,{cx:e-n*.3,cy:50-n*.35,r:n*.4,fill:`#fff`}))}function nc(e,t){return z(`line`,{class:`lid-line lid-${t}`,x1:e-38,y1:50,x2:e+38,y2:50,stroke:`#000`,"stroke-width":4,"stroke-linecap":`round`,display:`none`})}function rc(e,t){let n=z(`line`,{class:`brow brow-${t}`,x1:e-22,y1:2,x2:e+22,y2:2,stroke:`#000`,"stroke-width":8,"stroke-linecap":`round`,opacity:0});return n.style.transformBox=`fill-box`,n.style.transformOrigin=`center`,n}function ic(e){return j(`span`,{class:`eyes`,style:`top:${e.eyes.top}%;left:${e.eyes.left}%;width:${e.eyes.width}%;height:${e.eyes.height}%`})}function ac(e,t,n){let r=z(`g`,{class:`${n} eye-${t}`});return r.style.transformOrigin=`${e}px 50px`,r}function oc(e,t,n){let r=`slicc-agent-avatar-noise-${t}`;return z(`g`,{class:`eye-static eye-body-${t}`},z(`defs`,{},z(`clipPath`,{id:r},ec(e,38,n,{class:`noise-clip`}))),ec(e,38,n,{class:`socket`,fill:`#fff`}),z(`g`,{class:`noise noise-${t}`,"clip-path":`url(#${r})`,"data-cell-size":Ls}),ec(e,38,n,{class:`eye-outline`,fill:`none`,stroke:`#000`,"stroke-width":4}))}function sc(e){return e^=e<<13,e^=e>>>17,e^=e<<5,e>>>0}function cc(e){return(Vs^Math.imul(e,Us))>>>0}function lc(e,t){return(cc(e)^Math.imul(t,Hs))>>>0}function uc(){return Math.floor((Date.now()-Ws)/1e3*Rs)>>>0}function dc(e){return[z(`circle`,{cx:e,cy:50,r:38,fill:`#fff`,stroke:`#000`,"stroke-width":4}),z(`line`,{x1:e-15,y1:35,x2:e+15,y2:65,stroke:`#000`,"stroke-width":8,"stroke-linecap":`round`}),z(`line`,{x1:e+15,y1:35,x2:e-15,y2:65,stroke:`#000`,"stroke-width":8,"stroke-linecap":`round`})]}function fc(e,t,n,r,i){let a=n-t,o=r-50,s=Math.hypot(a,o),c=Math.min(s,i),l=s>0?a/s*c:0,u=s>0?o/s*c:0;e.setAttribute(`transform`,`translate(${l.toFixed(2)},${u.toFixed(2)})`)}var pc={now:()=>performance.now(),requestFrame:e=>window.requestAnimationFrame(e),cancelFrame:e=>window.cancelAnimationFrame(e),delay:(e,t)=>window.setTimeout(e,t),cancelDelay:e=>window.clearTimeout(e),repeat:(e,t)=>window.setInterval(e,t),cancelRepeat:e=>window.clearInterval(e)};A(`slicc-agent-avatar`,class extends HTMLElement{static observedAttributes=[`type`,`color`,`eyes`,`fill`,`connection`,`activity`,`gaze-target`,`drowse-delay`];#e;#t=e=>this.#ke(e);#n=()=>{this.#V(),this.#q(),this.#U()===`static`&&this.#we()};#r=null;#i=null;#a=null;#o=null;#s=[];#c=null;#l=16;#u=!1;#d=null;#f=!1;#p=!1;#m=0;#h=0;#g=!1;#_=0;#v=0;#y=us;#b={x:100,y:50};#x=0;#S=0;#C=18;#w=null;#T=0;#E=0;#D=0;#O=null;#k=0;#A=[];#j=null;#M=[];#N=gs;#P=null;#F=pc;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Js]}connectedCallback(){this.#r=window.matchMedia(`(prefers-reduced-motion: reduce)`),this.#r.addEventListener(`change`,this.#n),this.#L(),this.#V(),this.#q()}disconnectedCallback(){this.#H(),this.#De(),this.#Q(),this.#r?.removeEventListener(`change`,this.#n),this.#r=null,this.#p=!1}attributeChangedCallback(e){if(this.isConnected){if(e===`activity`||e===`gaze-target`||e===`drowse-delay`){this.#K();return}this.#L(),this.#V(),this.#q()}}get activity(){return ys(this.getAttribute(`activity`))}set activity(e){e===null?this.removeAttribute(`activity`):this.setAttribute(`activity`,e)}get gazeTarget(){return this.getAttribute(`gaze-target`)}set gazeTarget(e){e===null?this.removeAttribute(`gaze-target`):this.setAttribute(`gaze-target`,e)}get drowseDelay(){return bs(this.getAttribute(`drowse-delay`))}set drowseDelay(e){this.setAttribute(`drowse-delay`,String(e))}get clock(){return this.#F}set clock(e){if(e===this.#F)return;this.#Q(),this.#F=e;let t=e.now();this.#k=t,this.#w!==null&&(this.#w=t),this.#T=0,this.#E=0,this.#D=0,this.#P=null,this.isConnected&&this.#q()}get expression(){return Object.freeze({activity:this.#d,shape:this.#m,lidTop:this.#_,lidBottom:this.#v,pupilRadius:this.#C,gaze:{...this.#b},brows:this.#y,browsVisible:this.#_e()})}wake(){let e=this.#F.now();this.#w=e,this.#W()||(this.#D=e+350,this.#ce()),this.#Y()}scrutinize(){this.#E=this.#F.now()+os,this.#Y()}glower(){this.#T=this.#F.now()+is,this.#Y()}resetExpression(){this.#se();let e=this.#F.now();this.#T=0,this.#E=0,this.#D=0,this.#_=0,this.#v=0,this.#y=us,this.#N=gs,this.#P=null,this.#S=0,this.#w=this.#d===`awaiting`?e:null,this.#g=!1,this.#h=xs(this.#d),this.#m=this.#h,this.#k=e,this.#I()&&this.isConnected&&(this.#ve(),this.#q())}#I(){return this.hasAttribute(`activity`)||this.#f}#L(){this.#De(),this.#s=[];let e=this.getAttribute(`type`)===`cone`?`cone`:`scoop`,t=Ks[e],n=this.getAttribute(`color`)??qs[e],r=this.#I();this.#d=ys(this.getAttribute(`activity`)),this.#d===`awaiting`&&this.#w===null&&(this.#w=this.#F.now()),this.#p||=(this.#m=this.#h=xs(this.#d),!0);let i=z(`svg`,{class:`glyph`,viewBox:t.vb,preserveAspectRatio:`xMidYMid meet`,style:`--g:${t.glyph}%`},...e===`cone`?Qs(n,Zs(n,-.38),Zs(n,.3)):$s(n,Zs(n,-.32)));this.#o=z(`svg`,{class:`eyes-svg`,viewBox:`0 0 200 100`,width:`100%`,height:`100%`,preserveAspectRatio:`xMidYMid meet`},...this.#R(r));let a=ic(t);a.append(this.#o);let o=`--tx:${((.5-t.zoom*((t.eyes.left+t.eyes.width/2)/100))*100).toFixed(2)}%;--ty:${((.5-t.zoom*((t.eyes.top+t.eyes.height/2)/100))*100).toFixed(2)}%;--zoom:${t.zoom}`,s=j(`span`,{class:`icon-inner`,style:o},i,a),c=this.#z(r),l=null;if(c){let e=ic(t);e.append(c),l=j(`span`,{class:`icon-inner brow-layer`,style:o},e)}this.#e.replaceChildren(j(`span`,{class:`avatar`,"aria-hidden":`true`,"data-expressive":r||null},j(`span`,{class:`crop`},s),l)),this.#i=this.#e.querySelector(`.pupil-l`),this.#a=this.#e.querySelector(`.pupil-r`),this.#U()===`static`&&this.#we(),r&&this.#ve()}#R(e){let t=this.#U();if(t===`none`)return[];if(t===`dead`)return[...dc(Fs.cx),...dc(Is.cx)];this.#C=this.#B(),this.#l=Es(this.#C);let n=Ss(this.#m);return[Fs.cx,Is.cx].map((r,i)=>{let a=i===0?`l`:`r`,o=t===`static`,s=ac(r,a,o?`eye-frozen`:`eye-blink`),c=o?oc(r,a,n):z(`g`,{class:`eye-body eye-body-${a}`},ec(r,38,n,{class:`socket`,fill:`#fff`,stroke:`#000`,"stroke-width":4}),tc(r,a,this.#C,this.#m));if(s.append(c),!e)return s;let l=`slicc-agent-avatar-lid-${a}`;return s.append(z(`defs`,{},z(`clipPath`,{id:l},z(`rect`,{class:`lid-clip`,x:r-38-3,y:9,width:82,height:82}))),nc(r,`top`),nc(r,`bottom`)),c.setAttribute(`clip-path`,`url(#${l})`),s})}#z(e){let t=this.#U();return!e||t===`none`||t===`dead`?null:z(`svg`,{class:`brows-svg`,viewBox:`0 0 200 100`,width:`100%`,height:`100%`,preserveAspectRatio:`xMidYMid meet`},...[Fs.cx,Is.cx].map((e,t)=>{let n=t===0?`l`:`r`,r=z(`g`,{class:`brow-group brow-group-${n}`});return r.style.transformBox=`view-box`,r.style.transformOrigin=`${e}px 50px`,r.append(rc(e,n)),r}))}#B(){return 18*ws(Math.max(0,Math.min(100,Number.parseFloat(this.getAttribute(`fill`)??`0`)||0)))}#V(){let e=this.#U()===`open`&&!this.#r?.matches&&(this.#d===null||this.#d===`working`);e&&!this.#u?(this.ownerDocument.addEventListener(`pointermove`,this.#t),this.#u=!0):e||(this.#H(),(this.#d===null||this.#d===`working`)&&this.#Oe())}#H(){this.#u&&=(this.ownerDocument.removeEventListener(`pointermove`,this.#t),!1)}#U(){let e=this.getAttribute(`connection`);if(e!==null&&e!==`connected`)return`static`;let t=this.getAttribute(`eyes`);return t===`dead`||t===`none`||t===`static`?t:`open`}#W(){return this.#r?.matches===!0||this.#U()!==`open`||!this.isConnected||!this.#p}#G(){return this.#U()!==`open`}#K(){let e=ys(this.getAttribute(`activity`)),t=this.#e.querySelector(`.avatar[data-expressive]`)!==null;e===`awaiting`&&this.#d!==`awaiting`?this.#w=this.#F.now():e!==`awaiting`&&(this.#w=null),this.#P=null,this.#d=e,this.#I()!==t&&this.#L(),this.#V(),this.#q()}#q(){if(!this.#I()||!this.isConnected){this.#Q();return}if(this.#G()||this.#r?.matches){this.#Z(),this.#J(),this.#te();return}this.#ue(),this.#X()}#J(){for(let e of this.#M)this.#F.cancelRepeat(e);this.#M=[]}#Y(){this.#I()||(this.#f=!0,this.isConnected&&this.#L()),this.#q()}#X(){this.#O===null&&(this.#k=this.#F.now(),this.#O=this.#F.requestFrame(this.#$))}#Z(){this.#O!==null&&(this.#F.cancelFrame(this.#O),this.#O=null)}#Q(){this.#Z();for(let e of this.#A)this.#F.cancelDelay(e);this.#A=[],this.#j!==null&&this.#F.cancelDelay(this.#j),this.#j=null;for(let e of this.#M)this.#F.cancelRepeat(e);this.#M=[]}#$=e=>{this.#O=this.#F.requestFrame(this.#$);let t=Math.min(.05,Math.max(0,(e-this.#k)/1e3));this.#k=e,this.#ee(e,t),this.#ve()};#ee(e,t){let n=xs(this.#d);n!==this.#h&&!this.#g&&this.#ae(n),this.#m=vs(this.#m,this.#h,6,t),this.#_=vs(this.#_,this.#re(e,!1),5,t),this.#v=vs(this.#v,this.#ie(e),5,t),this.#pe(e,t)}#te(){let e=this.#F.now();this.#G()||(this.#h=this.#m=xs(this.#d),this.#_=this.#re(e,!0),this.#v=this.#ie(e),this.#me()),this.#ve(),this.#ne(e)}#ne(e){if(this.#j!==null&&this.#F.cancelDelay(this.#j),this.#j=null,this.#G())return;let t=this.#d===`awaiting`&&this.#w!==null?this.#w+this.drowseDelay*1e3:1/0,n=Math.min(this.#T>e?this.#T:1/0,this.#E>e?this.#E:1/0,t>e?t:1/0);Number.isFinite(n)&&(this.#j=this.#F.delay(()=>this.#te(),Math.max(0,n-e)+1))}#re(e,t){let n=this.#T>e?rs:0;if(this.#d!==`awaiting`)return n;let r=this.#w===null?0:(e-this.#w)/1e3,i=this.drowseDelay;return Math.max(n,As(t&&r>i?i+12:r,i))}#ie(e){return this.#E>e?as:0}#ae(e){if(this.#W()){this.#h=this.#m=e;return}this.#g=!0,this.#ce(()=>{this.#h=this.#m=e,this.#g=!1})}#oe(){return[...this.#e.querySelectorAll(`.eye-blink`)]}#se(){for(let e of this.#A)this.#F.cancelDelay(e);this.#A=[];for(let e of this.#oe())e.style.transition=`none`,e.style.transform=`scaleY(1)`}#ce(e){let t=this.#oe();if(t.length===0){e?.();return}t.forEach((t,n)=>{this.#le(t,n===0?e:void 0)})}#le(e,t){e.style.transition=`transform 110ms ease-in`,e.style.transform=`scaleY(${es})`,this.#A.push(this.#F.delay(()=>{t?.(),this.#d===`thinking`&&!this.#G()&&(this.#y=Ms(this.#y)),e.style.transition=`transform 130ms ease-out`,e.style.transform=`scaleY(1)`},120))}#ue(){this.#M.length>0||this.#W()||this.#G()||[ts,ns].forEach((e,t)=>{this.#M.push(this.#F.repeat(()=>{let e=this.#oe()[t];e&&this.hasAttribute(`blink`)&&!this.#G()&&this.#le(e)},e))})}#de(e){return this.#d===`thinking`?{target:this.#fe(e,ds,fs),rate:9}:this.#d===`idle`?{target:this.#fe(e,ps,ms),rate:hs}:this.#d===`awaiting`?{target:this.#ge(e),rate:6}:null}#fe(e,t,n){return e-this.#S>n&&(this.#S=e,this.#x=Ns(this.#x,t.length,Math.random)),t[this.#x]??gs}#pe(e,t){let n=this.#de(e);n&&(this.#b={x:vs(this.#b.x,n.target.x,n.rate,t),y:vs(this.#b.y,n.target.y,n.rate,t)},this.#he())}#me(){this.#d===`awaiting`?(this.#b=this.#ge(this.#F.now()),this.#he()):(this.#d===`thinking`||this.#d===`idle`)&&this.#Oe()}#he(){this.#i&&fc(this.#i,Fs.cx,this.#b.x,this.#b.y,this.#l),this.#a&&fc(this.#a,Is.cx,this.#b.x,this.#b.y,this.#l)}#ge(e){if(this.#P!==null&&e-this.#P<Gs)return this.#N;this.#P=e;let t=this.getAttribute(`gaze-target`),n=t?this.ownerDocument.querySelector(t):null,r=this.#o?.getBoundingClientRect();if(!n||!r?.width||!r.height)return this.#N=gs,this.#N;let i=n.getBoundingClientRect();return this.#N={x:(i.left+i.width/2-r.left)*(200/r.width),y:(i.top+i.height/2-r.top)*(100/r.height)},this.#N}#_e(){return this.#d===`thinking`}#ve(){let e=this.#F.now(),t=this.#m,n=Ss(t),r=this.#B()*Ts(this.#D-e);this.#C=r,this.#l=Es(r);for(let[e,i]of[`l`,`r`].entries()){let a=e===0?Fs.cx:Is.cx;this.#ye(i,n),this.#be(i,a,r,t),this.#xe(i,a,t),this.#Ce(i)}}#ye(e,t){for(let n of this.#e.querySelectorAll(`.eye-body-${e} .socket, .eye-body-${e} .eye-outline, .eye-body-${e} .noise-clip`))Xs(n,`rx`,t)}#be(e,t,n,r){let i=this.#e.querySelector(`.pupil-${e} rect`);if(!i)return;Xs(i,`x`,t-n),Xs(i,`y`,50-n),Xs(i,`width`,n*2),Xs(i,`height`,n*2),Xs(i,`rx`,Cs(n,r));let a=this.#e.querySelector(`.pupil-${e} circle`);Xs(a,`cx`,t-n*.3),Xs(a,`cy`,50-n*.35),Xs(a,`r`,n*.4)}#xe(e,t,n){let r=this.#e.querySelector(`.eye-${e} .lid-clip`);if(!r)return;let i=Ds(this.#_),a=Os(this.#v);Xs(r,`y`,i),Xs(r,`height`,Math.max(0,a-i)),this.#Se(`.eye-${e} .lid-top`,t,i,n,this.#_),this.#Se(`.eye-${e} .lid-bottom`,t,a,n,this.#v)}#Se(e,t,n,r,i){let a=this.#e.querySelector(e);if(!a)return;let o=ks(n,r);Xs(a,`x1`,t-o),Xs(a,`x2`,t+o),Xs(a,`y1`,n),Xs(a,`y2`,n),Ys(a,`display`,i>.02?`inline`:`none`)}#Ce(e){let t=this.#e.querySelector(`.brow-${e}`);if(!t)return;let n=this.#_e(),r=e===`l`?this.#y.left:this.#y.right;Ys(t,`opacity`,n?`1`:`0`),t.style.transform=n?`translateY(${r.raise.toFixed(2)}px) rotate(${r.tilt.toFixed(2)}deg)`:`translateY(6px)`}#we(){if(this.#De(),this.#s.length===0&&this.#Te(),this.#r?.matches){this.#Ee(null);return}this.#Ee(uc()),this.#c=window.setInterval(()=>{this.#Ee(uc())},1e3/Rs)}#Te(){let e=this.#o?.getBoundingClientRect(),t=e?Math.min(e.width/200,e.height/100):0,n=Ls/(t>0?t:.25);this.#s=[...this.#e.querySelectorAll(`.noise`)].map((e,t)=>{let r=t===0?Fs.cx:Is.cx,i=[],a=r-Fs.r,o=r+Fs.r,s=50-Fs.r,c=50+Fs.r;for(let e=s;e<c;e+=n)for(let t=a;t<o;t+=n){let r=z(`rect`,{x:t,y:e,width:Math.min(n,o-t),height:Math.min(n,c-e),opacity:zs});i.push(r)}return e.replaceChildren(...i),i})}#Ee(e){this.#s.forEach((t,n)=>{let r=e===null?cc(n):lc(n,e),i=r===0?Vs:r;(t[0]?.parentElement)?.setAttribute(`data-seed`,String(i));for(let e of t){i=sc(i);let t=`${Bs[i%Bs.length]*100}%`;e.setAttribute(`fill`,`rgb(${t} ${t} ${t})`)}})}#De(){this.#c!==null&&(window.clearInterval(this.#c),this.#c=null)}#Oe(){this.#i?.setAttribute(`transform`,`translate(0,0)`),this.#a?.setAttribute(`transform`,`translate(0,0)`)}#ke(e){if(!this.#o||!this.#i||!this.#a)return;let t=this.#o.getBoundingClientRect();!t.width||!t.height||(this.#b={x:(e.clientX-t.left)*(200/t.width),y:(e.clientY-t.top)*(100/t.height)},this.#he())}});var mc=M(`
|
|
4809
4866
|
:host{display:inline-block;}
|
|
4810
4867
|
.switcher-more{position:relative;}
|
|
4811
4868
|
.morebtn{display:none;font:inherit;font-size:13px;font-weight:600;color:var(--txt-2);background:transparent;border:1px solid var(--line);border-radius:9999px;height:var(--ctl-h,30px);padding:0 11px;cursor:pointer;line-height:1;align-items:center;}
|
|
@@ -4837,14 +4894,14 @@ iframe {
|
|
|
4837
4894
|
@keyframes scoopReveal{from{opacity:0;transform:translateY(-4px);}to{opacity:1;transform:none;}}
|
|
4838
4895
|
@keyframes scoopArc{from{transform:rotate(-90deg);}to{transform:rotate(270deg);}}
|
|
4839
4896
|
@media (prefers-reduced-motion:reduce){.popup-row{animation:none;}.popup-row[data-state="working"] .glyph-arc{animation:none;transform:rotate(-90deg);}}
|
|
4840
|
-
`),
|
|
4841
|
-
.slicc-agent-tabs{display:flex;align-items:center;gap:${
|
|
4897
|
+
`),hc=[4,5,3,7,1,6,2,0,8],gc=`http://www.w3.org/2000/svg`,_c=5,vc=2*Math.PI*_c;function yc(e,t,...n){let r=document.createElementNS(gc,e);for(let[e,n]of Object.entries(t))r.setAttribute(e,String(n));return r.append(...n),r}function bc(e){return typeof e==`number`&&Number.isFinite(e)?Math.max(0,Math.min(100,e)):0}function xc(e){return e.state??`idle`}function Sc(e){return(90+bc(e)*2.7)/360*vc}function Cc(e,t){let n=[];return e===`initializing`?n.push(yc(`circle`,{class:`initializing-ring`,cx:7,cy:7,r:_c,"stroke-width":1.7})):n.push(yc(`circle`,{class:`glyph-base`,cx:7,cy:7,r:_c,"stroke-width":1.5})),(e===`working`||e===`idle`)&&n.push(yc(`circle`,{class:`glyph-arc`,cx:7,cy:7,r:_c,"stroke-width":2,"stroke-dasharray":`${Sc(t).toFixed(3)} ${vc.toFixed(3)}`,"stroke-dashoffset":0})),e===`working`&&n.push(yc(`circle`,{class:`glyph-pin`,cx:7,cy:7,r:1.25})),e===`broken`&&n.push(yc(`line`,{class:`broken-x`,x1:4.8,y1:4.8,x2:9.2,y2:9.2,"stroke-width":1.8}),yc(`line`,{class:`broken-x`,x1:9.2,y1:4.8,x2:4.8,y2:9.2,"stroke-width":1.8})),yc(`svg`,{class:`status-glyph`,viewBox:`0 0 14 14`,width:14,height:14,"aria-hidden":`true`},...n)}function wc(e){return e.state===`broken`?`broken`:(e.fill??0)>=75?`near-limit`:e.state===`working`?`working`:`idle`}function Tc(e){return e===`broken`?3:e===`near-limit`?2:+(e===`working`)}function Ec(e){let t=e.reduce((e,t)=>{let n=wc(t);return Tc(n)>Tc(e)?n:e},`idle`),n=t===`near-limit`?`near context limit`:t;return`${e.length} hidden scoop${e.length===1?``:`s`}; worst state ${n}`}function Dc(e,t=!1){if(t)return j(`span`,{class:`overflow-grid-cell overflow-grid-cell--plus`,"aria-hidden":`true`},j(`span`,{class:`overflow-plus-bar overflow-plus-bar--horizontal`}),j(`span`,{class:`overflow-plus-bar overflow-plus-bar--vertical`}));let n={class:`overflow-grid-cell`,"aria-hidden":`true`};return e&&(n[`data-dot-state`]=e),j(`span`,n)}function Oc(e){let t=e.map((e,t)=>({order:t,state:wc(e)})).sort((e,t)=>Tc(t.state)-Tc(e.state)||e.order-t.order).slice(0,e.length>9?8:9),n=Array.from({length:hc.length},()=>Dc());return t.forEach((e,t)=>{n[hc[t]]=Dc(e.state)}),e.length>9&&(n[hc.at(-1)]=Dc(void 0,!0)),j(`span`,{class:`overflow-grid`,role:`img`,"aria-label":Ec(e),"data-hidden-count":String(e.length)},...n)}A(`slicc-scoop-overflow`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=[];#n;#r;#i;#a;#o=e=>{this.open&&!this.contains(e.target)&&this.close()};#s=e=>{!this.open||e.key!==`Escape`||(e.preventDefault(),this.close(),this.#r.focus())};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[mc]}connectedCallback(){this.#c()}disconnectedCallback(){document.removeEventListener(`click`,this.#o),document.removeEventListener(`keydown`,this.#s)}attributeChangedCallback(e){e===`open`&&this.#n&&this.#u()}get items(){return this.#t}set items(e){this.#t=Array.isArray(e)?e:[],this.isConnected&&this.#l()}get count(){return this.#t.length}get hasOverflow(){return this.#t.length>0}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}show(){this.open||=!0}close(){this.open&&=!1}toggle(){this.open=!this.open}#c(){this.#i=j(`slot`,{name:`more`},Oc(this.#t)),this.#r=j(`button`,{class:`morebtn`,part:`more`,type:`button`,title:`More scoops`,"aria-haspopup":`true`,"aria-expanded":`false`},this.#i),this.#a=j(`div`,{class:`pop`,part:`pop`,role:`menu`}),this.#n=j(`div`,{class:`switcher-more`,part:`wrap`},this.#r,this.#a),this.#r.addEventListener(`click`,e=>{e.stopPropagation(),this.toggle()}),this.#e.replaceChildren(this.#n),this.#l(),this.#u()}#l(){let e=this.#t.length;e>0?this.setAttribute(`count`,String(e)):this.removeAttribute(`count`),this.#n.classList.toggle(`has-overflow`,e>0),this.#r.setAttribute(`aria-haspopup`,`true`);let t=Ec(this.#t);if(this.#r.setAttribute(`aria-label`,`${t}. Show hidden scoops`),this.#i.replaceChildren(Oc(this.#t)),e===0){this.#a.replaceChildren(j(`slot`,{name:`empty`})),this.open&&this.close();return}let n=[];this.#t.forEach((e,t)=>{let r=e.id,i=e.label??e.id,a=xc(e),o=bc(e.fill),s=j(`button`,{class:`popup-row`,part:`row`,type:`button`,role:`menuitem`,"aria-label":`${i}: ${a}, ${o}% context fill`,"data-state":a,"data-k":r,style:`--hue:${e.color??`var(--rose)`};--i:${t}`},Cc(a,o),j(`span`,{class:`popup-label`},i),j(`span`,{class:`popup-state`},`${a} · ${o}%`));s.addEventListener(`click`,()=>{let e=s.dataset.k??``,t=this.#t.find(t=>t.id===e);this.#d(e,t?.label??e)}),n.push(s)}),this.#a.replaceChildren(...n)}#u(){let e=this.open;this.#n.classList.toggle(`open`,e),this.#r.setAttribute(`aria-expanded`,e?`true`:`false`),document.removeEventListener(`click`,this.#o),document.removeEventListener(`keydown`,this.#s),e&&(document.addEventListener(`click`,this.#o),document.addEventListener(`keydown`,this.#s))}#d(e,t){this.dispatchEvent(new CustomEvent(`slicc-scoop-select`,{detail:{id:e,key:e,label:t},bubbles:!0,composed:!0})),this.close()}});var B=`slicc-agent-tabs`,kc=`${B}-style`,Ac=`http://www.w3.org/2000/svg`,jc=5,Mc=2*Math.PI*jc,Nc=26,Pc=8,Fc=6,Ic=39,Lc=`sliccy`,Rc=14,zc=5,Bc=16,Vc=4,Hc=65,Uc={cone:`var(--waffle)`,researcher:`var(--cyan)`,designer:`var(--violet)`,tester:`var(--amber)`,triage:`var(--green)`},Wc=`
|
|
4898
|
+
.slicc-agent-tabs{display:flex;align-items:center;gap:${Pc}px;min-width:0;overflow:visible;color:var(--ink);font-family:var(--ui);}
|
|
4842
4899
|
.slicc-agent-tabs *{box-sizing:border-box;}
|
|
4843
|
-
.slicc-agent-tabs__focus-avatar{display:block;flex:0 0 ${
|
|
4900
|
+
.slicc-agent-tabs__focus-avatar{display:block;flex:0 0 ${Nc}px;width:${Nc}px;height:${Nc}px;pointer-events:none;}
|
|
4844
4901
|
.slicc-agent-tabs__track-frame{position:relative;flex:0 1 auto;min-width:0;height:var(--ctl-h,30px);overflow:visible;border:1px solid var(--line);border-radius:9px;background:var(--ghost);}
|
|
4845
4902
|
.slicc-agent-tabs__track{display:flex;align-items:center;min-width:0;height:100%;padding:2px;overflow:hidden;}
|
|
4846
4903
|
.slicc-agent-tabs.has-overflow .slicc-agent-tabs__track{padding-right:41px;}
|
|
4847
|
-
.slicc-agent-tabs__segment{position:relative;display:inline-flex;flex:0 1 auto;align-items:center;justify-content:center;gap:${
|
|
4904
|
+
.slicc-agent-tabs__segment{position:relative;display:inline-flex;flex:0 1 auto;align-items:center;justify-content:center;gap:${zc}px;width:max-content;min-width:var(--slicc-agent-tabs-segment-floor,${Hc}px);max-width:160px;height:24px;padding:0 8px;overflow:hidden;color:var(--txt-2);font:500 11px/1 var(--ui);white-space:nowrap;border:0;border-radius:6px;background:transparent;cursor:pointer;}
|
|
4848
4905
|
.slicc-agent-tabs__segment:hover{color:var(--ink);}
|
|
4849
4906
|
.slicc-agent-tabs__segment[aria-selected='true']{color:var(--ink);background:var(--canvas);box-shadow:0 1px 3px color-mix(in srgb,var(--ink) 12%,transparent);}
|
|
4850
4907
|
.slicc-agent-tabs__segment.hide{display:none;}
|
|
@@ -4873,7 +4930,7 @@ iframe {
|
|
|
4873
4930
|
.slicc-agent-tabs slicc-scoop-overflow::part(pop){right:0;left:auto;}
|
|
4874
4931
|
@keyframes slicc-agent-tabs-arc{from{transform:rotate(-90deg);}to{transform:rotate(270deg);}}
|
|
4875
4932
|
@media (prefers-reduced-motion:reduce){.slicc-agent-tabs__glyph-arc{animation:none;transform:rotate(-90deg);}.slicc-agent-tabs__glyph-glow{transition:none;}}
|
|
4876
|
-
`;function
|
|
4933
|
+
`;function Gc(e){if(e.getElementById(kc))return;let t=e.createElement(`style`);t.id=kc,t.textContent=Wc,(e.head??e.documentElement).append(t)}function Kc(e,t,...n){let r=document.createElementNS(Ac,e);for(let[e,n]of Object.entries(t))r.setAttribute(e,String(n));return r.append(...n),r}function qc(e){return typeof e==`number`&&Number.isFinite(e)?Math.max(0,Math.min(100,e)):0}function Jc(e){let t=e.ownerDocument.createElement(`canvas`).getContext(`2d`),n=e.ownerDocument.defaultView?.getComputedStyle(e);return!t||!n?Hc:(t.font=n.font,Math.ceil(t.measureText(Lc).width+Rc+zc+Bc)+Vc)}function Yc(e){return(90+qc(e)*2.7)/360*Mc}function Xc(e,t){return t===`working`?e.phase===`tool`?`tool`:`thinking`:null}function Zc(e,t){return t===`working`?Xc(e,t)===`tool`?`working`:`thinking`:t===`idle`?e.awaiting?`awaiting`:`idle`:null}function Qc(e,t){return e.state?e.state:e.eyes===`dead`?`broken`:t===e.key?`working`:`idle`}function $c(e){return e.type===`cone`||e.key===`cone`?`cone`:`scoop`}function el(e){return e.eyes??`open`}function tl(e){return Uc[e.key]??e.color??`var(--rose)`}function nl(e){let t=[Kc(`circle`,{class:`${B}__glyph-glow`,cx:7,cy:7,r:jc,"stroke-width":1.5}),Kc(`circle`,{class:`${B}__glyph-base`,cx:7,cy:7,r:jc,"stroke-width":1.5}),Kc(`circle`,{class:`${B}__glyph-arc`,cx:7,cy:7,r:jc,"stroke-width":2,"stroke-dasharray":`${Yc(qc(e.fill)).toFixed(3)} ${Mc.toFixed(3)}`,"stroke-dashoffset":0}),Kc(`circle`,{class:`${B}__glyph-pin`,cx:7,cy:7,r:1.25}),Kc(`rect`,{class:`${B}__glyph-pin-square`,x:5.5,y:5.5,width:3,height:3,rx:.15}),Kc(`line`,{class:`${B}__broken-x`,x1:4.8,y1:4.8,x2:9.2,y2:9.2,"stroke-width":1.8}),Kc(`line`,{class:`${B}__broken-x`,x1:9.2,y1:4.8,x2:4.8,y2:9.2,"stroke-width":1.8}),Kc(`circle`,{class:`${B}__initializing-ring`,cx:7,cy:7,r:jc,"stroke-width":1.7})];return Kc(`svg`,{class:`${B}__status-glyph`,viewBox:`0 0 14 14`,width:14,height:14,"aria-hidden":`true`},...t)}A(`slicc-agent-tabs`,class extends HTMLElement{static observedAttributes=[`active`,`attention`,`connection`,`gaze-target`,`drowse-delay`];#e=[];#t=null;#n=null;#r=null;#i=null;#a=null;#o=null;#s=!1;#c=null;#l=!1;#u=null;#d=e=>this.#w(e);#f=e=>this.#T(e);connectedCallback(){Gc(this.ownerDocument),this.classList.add(B),this.setAttribute(`part`,`row`),this.#l||=!0,this.addEventListener(`click`,this.#d),this.addEventListener(`keydown`,this.#f),this.#m(),this.#O(),requestAnimationFrame(()=>this.reflow())}disconnectedCallback(){this.#o?.disconnect(),this.#o=null,this.#c!==null&&cancelAnimationFrame(this.#c),this.#c=null,this.removeEventListener(`click`,this.#d),this.removeEventListener(`keydown`,this.#f)}attributeChangedCallback(){!this.#l||!this.isConnected||(this.#m(),this.reflow())}get scoops(){return this.#e.map(e=>({...e}))}set scoops(e){let t=new Map;if(Array.isArray(e))for(let n of e)t.has(n.key)||t.set(n.key,{...n});this.#e=[...t.values()],this.#l&&this.isConnected&&(this.#m(),this.reflow())}get attention(){return this.getAttribute(`attention`)}set attention(e){e==null?this.removeAttribute(`attention`):this.setAttribute(`attention`,e)}get active(){return this.getAttribute(`active`)}set active(e){e==null?this.removeAttribute(`active`):this.setAttribute(`active`,e)}get connection(){return this.getAttribute(`connection`)===`disconnected`?`disconnected`:`connected`}set connection(e){this.setAttribute(`connection`,e)}get gazeTarget(){return this.getAttribute(`gaze-target`)}set gazeTarget(e){e==null?this.removeAttribute(`gaze-target`):this.setAttribute(`gaze-target`,e)}get drowseDelay(){let e=this.getAttribute(`drowse-delay`);if(e===null)return null;let t=Number.parseFloat(e);return Number.isFinite(t)?t:null}set drowseDelay(e){e==null?this.removeAttribute(`drowse-delay`):this.setAttribute(`drowse-delay`,String(e))}scrutinize(){this.#t?.scrutinize()}glower(){this.#t?.glower()}wake(){this.#t?.wake()}select(e){this.active=e;let t=this.#e.find(t=>t.key===e)?.label??e;this.dispatchEvent(new CustomEvent(`slicc-scoop-select`,{detail:{id:e,key:e,label:t},bubbles:!0,composed:!0}))}reflow(){if(!(!this.isConnected||this.#s)){this.#s=!0;try{this.#p()}finally{this.#s=!1}}}#p(){let e=[...this.querySelectorAll(`.${B}__segment`)];for(let t of e)t.classList.remove(`hide`);if(this.classList.remove(`has-overflow`),e.length===0){this.#C([]);return}this.#u===null&&(this.#u=Jc(e[0]),this.style.setProperty(`--slicc-agent-tabs-segment-floor`,`${this.#u}px`));let t=this.clientWidth;if(t<=0){this.#C([]),requestAnimationFrame(()=>{this.isConnected&&this.clientWidth>0&&this.reflow()});return}let n=Math.max(0,t-Nc-Pc-Fc),r=e.map(e=>e.offsetWidth),i=r.reduce((e,t)=>e+t,0),a=e.length>1&&i>n+1;this.classList.toggle(`has-overflow`,a);let o=a?e.map(e=>e.offsetWidth):r,s=Math.max(0,n-(a?Ic:0));if(!a){this.#C([]);return}let c=[],l=0;e.forEach((e,t)=>{t===0||c.length===0&&l+o[t]<=s?l+=o[t]:(e.classList.add(`hide`),c.push(e))}),this.#C(c)}#m(){let e=this.#E(),t=this.#e.find(e=>e.key===this.active)??this.#e.at(0)??null;this.#h(),this.#v(t),this.#x(t?.key??null),e!=null&&!this.#e.some(t=>t.key===e)&&this.#D(t?.key??null)?.focus()}#h(){if(this.#r&&this.#i&&this.#a&&this.contains(this.#i))return;this.#r=j(`div`,{class:`${B}__track`,part:`track`,role:`tablist`,"aria-label":`Agents`});let e=this.ownerDocument.createElement(`slicc-scoop-overflow`);e.setAttribute(`part`,`overflow`),e.addEventListener(`slicc-scoop-select`,e=>{let t=e.detail?.id;typeof t==`string`&&(e.stopPropagation(),this.select(t))}),this.#a=e,this.#i=j(`div`,{class:`${B}__track-frame`,part:`track-frame`},this.#r,e),this.replaceChildren(this.#i)}#g(e){let t=j(`slicc-agent-avatar`,{class:`${B}__focus-avatar`,part:`avatar`,role:`img`});return this.#_(t,e),t}#_(e,t){let n=Qc(t,this.attention);this.#S(e,`type`,$c(t)),this.#S(e,`color`,t.color??null),this.#S(e,`eyes`,el(t)),this.#S(e,`connection`,this.getAttribute(`connection`)),this.#S(e,`fill`,String(Math.round(qc(t.fill)))),this.#S(e,`blink`,n===`working`),this.#S(e,`activity`,Zc(t,n)),this.#S(e,`gaze-target`,this.getAttribute(`gaze-target`)),this.#S(e,`drowse-delay`,this.getAttribute(`drowse-delay`)),this.#S(e,`aria-label`,`${t.label??t.key} focused agent`),e.style.setProperty(`--slicc-agent-tabs-hue`,tl(t))}#v(e){if(!e){this.#t?.remove(),this.#t=null,this.#n=null;return}let t=this.#t??this.#g(e);this.#t=t;let n=this.#n!==null&&this.#n!==e.key;this.#n=e.key,this.#_(t,e),n&&t.resetExpression(),(t.parentElement!==this||t.nextElementSibling!==this.#i)&&this.insertBefore(t,this.#i)}#y(e,t){let n=j(`button`,{part:`segment`,type:`button`,role:`tab`},nl(e),j(`span`,{class:`${B}__label`},e.label??e.key));return this.#b(n,e,t),n}#b(e,t,n){let r=Qc(t,this.attention),i=Xc(t,r),a=qc(t.fill),o=this.attention===t.key;e.className=`${B}__segment${t.ephemeral?` ephemeral`:``}`,e.setAttribute(`aria-selected`,String(t.key===n)),e.tabIndex=t.key===n?0:-1;let s=i===`tool`?` (running a tool)`:i?` (thinking)`:``;e.setAttribute(`aria-label`,`${t.label??t.key}: ${r}${s}, ${Math.round(a)}% context fill${o?`, spoke most recently`:``}`),e.dataset.k=t.key,e.dataset.state=r,this.#S(e,`data-phase`,i),this.#S(e,`data-attention`,o?`true`:null),e.style.setProperty(`--slicc-agent-tabs-hue`,tl(t));let c=e.querySelector(`.${B}__label`);c&&(c.textContent=t.label??t.key),e.querySelector(`.${B}__glyph-arc`)?.setAttribute(`stroke-dasharray`,`${Yc(a).toFixed(3)} ${Mc.toFixed(3)}`)}#x(e){if(!this.#r)return;let t=new Map;for(let e of this.#r.querySelectorAll(`:scope > .${B}__segment`)){let n=e.dataset.k??``;t.has(n)?e.remove():t.set(n,e)}let n=this.#e.map(n=>{let r=t.get(n.key)??this.#y(n,e);return t.delete(n.key),this.#b(r,n,e),r});for(let e of t.values())e.remove();n.forEach((e,t)=>{let n=this.#r?.children.item(t)??null;n!==e&&this.#r?.insertBefore(e,n)})}#S(e,t,n){n===null||n===!1?e.hasAttribute(t)&&e.removeAttribute(t):n===!0?e.hasAttribute(t)||e.setAttribute(t,``):e.getAttribute(t)!==n&&e.setAttribute(t,n)}#C(e){if(!this.#a)return;let t=e.map(e=>{let t=e.dataset.k??``,n=this.#e.find(e=>e.key===t)??{key:t};return{id:t,label:n.label??t,type:$c(n),color:n.color,eyes:el(n),state:Qc(n,this.attention),fill:qc(n.fill)}});this.#a.items=t}#w(e){let t=e.target?.closest(`.${B}__segment`);t&&this.contains(t)&&t.dataset.k&&this.select(t.dataset.k)}#T(e){let t=e.target?.closest(`.${B}__segment`);if(!t||!this.contains(t))return;if(e.key===`Enter`||e.key===` `){if(!t.dataset.k)return;e.preventDefault(),this.select(t.dataset.k);return}let n=[...this.querySelectorAll(`.${B}__segment:not(.hide)`)].filter(e=>!e.disabled),r=n.indexOf(t);if(r<0||n.length===0)return;let i;if(e.key===`ArrowLeft`)i=n[(r-1+n.length)%n.length];else if(e.key===`ArrowRight`)i=n[(r+1)%n.length];else if(e.key===`Home`)i=n[0];else if(e.key===`End`)i=n.at(-1);else return;e.preventDefault(),i?.focus()}#E(){let e=this.ownerDocument.activeElement;return!(e instanceof Element)||!this.contains(e)?null:e.closest(`.${B}__segment`)?.dataset.k??null}#D(e){return e==null?null:[...this.querySelectorAll(`.${B}__segment`)].find(t=>t.dataset.k===e)??null}#O(){this.#o||typeof ResizeObserver>`u`||(this.#o=new ResizeObserver(()=>{this.#c===null&&(this.#c=requestAnimationFrame(()=>{this.#c=null,this.reflow()}))}),this.#o.observe(this),this.parentElement&&this.#o.observe(this.parentElement))}});var rl=`/**
|
|
4877
4934
|
* SLICC design tokens — lifted verbatim from the prototype
|
|
4878
4935
|
* (proto/StellarRubySwift.html :root + body.dark). Light is the default; dark is
|
|
4879
4936
|
* opt-in. Per project decision the prototype's token vocabulary and light-default
|
|
@@ -4937,7 +4994,7 @@ iframe {
|
|
|
4937
4994
|
--shaderbg: #171410;
|
|
4938
4995
|
--shadow-pane: rgba(0, 0, 0, 0.35) 0 8px 26px -10px;
|
|
4939
4996
|
}
|
|
4940
|
-
`,
|
|
4997
|
+
`,il=`slicc-tokens`;function al(e=document){if(e.getElementById(il))return;let t=e.createElement(`style`);t.id=il,t.textContent=rl,(e.head??e.documentElement).appendChild(t)}function ol(e,t=document.body){t.classList.toggle(`dark`,e===`dark`),t.setAttribute(`data-theme`,e)}function sl(e=document.body){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=()=>ol(t.matches?`dark`:`light`,e);return n(),t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}var cl=M(`
|
|
4941
4998
|
:host { display: inline-flex; flex: 0 0 auto; }
|
|
4942
4999
|
.themetgl {
|
|
4943
5000
|
font: inherit; font-family: var(--ui); font-size: 14px; line-height: 1;
|
|
@@ -4949,7 +5006,7 @@ iframe {
|
|
|
4949
5006
|
}
|
|
4950
5007
|
.themetgl:hover { background: color-mix(in srgb, var(--ink) 8%, var(--ghost)); }
|
|
4951
5008
|
.themetgl svg { display: block; }
|
|
4952
|
-
`),
|
|
5009
|
+
`),ll=16,ul={light:`moon`,dark:`sun`},dl={light:`Switch to dark mode`,dark:`Switch to light mode`};A(`slicc-theme-toggle`,class extends HTMLElement{static observedAttributes=[`theme`];#e;#t=null;#n=!1;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[cl];let e=j(`button`,{class:`themetgl`,part:`button`,type:`button`,"aria-pressed":`false`},j(`slot`,{name:`glyph-light`},n(ul.light,{size:ll})),j(`slot`,{name:`glyph-dark`,hidden:!0},n(ul.dark,{size:ll})));this.#e.replaceChildren(e),this.#t=e}connectedCallback(){this.#t?.addEventListener(`click`,this.#i),this.#a(this.theme??`light`,{silent:!0})}disconnectedCallback(){this.#t?.removeEventListener(`click`,this.#i)}attributeChangedCallback(e,t,n){e===`theme`&&t!==n&&(this.#n||this.isConnected&&this.#a(this.#r(n)??`light`,{silent:!0}))}get theme(){return this.#r(this.getAttribute(`theme`))}set theme(e){this.#a(e===`dark`?`dark`:`light`,{silent:!0})}get pressed(){return this.theme===`dark`}#r(e){return e===`dark`?`dark`:e===`light`?`light`:null}#i=()=>{this.#a(this.theme===`dark`?`light`:`dark`)};#a(e,t={}){this.#n=!0;try{if(ol(e),this.getAttribute(`theme`)!==e&&this.setAttribute(`theme`,e),this.#t){this.#t.setAttribute(`aria-pressed`,e===`dark`?`true`:`false`),this.#t.title=dl[e];let t=this.#e.querySelector(`slot[name="glyph-light"]`),n=this.#e.querySelector(`slot[name="glyph-dark"]`);t?.toggleAttribute(`hidden`,e===`dark`),n?.toggleAttribute(`hidden`,e===`light`)}for(let t of document.querySelectorAll(`slicc-add-menu`))t.setAttribute(`theme`,e)}finally{this.#n=!1}t.silent||this.dispatchEvent(new CustomEvent(`slicc-theme-change`,{detail:{theme:e},bubbles:!0,composed:!0}))}}),A(`slicc-theme`,class extends HTMLElement{static observedAttributes=[`theme`];connectedCallback(){al(this.ownerDocument),this.classList.add(`slicc-theme`),this.#e()}attributeChangedCallback(e,t,n){e===`theme`&&t!==n&&this.isConnected&&this.#e()}get theme(){return this.getAttribute(`theme`)===`dark`?`dark`:`light`}set theme(e){this.setAttribute(`theme`,e===`dark`?`dark`:`light`)}#e(){let e=this.theme;ol(e,this),this.dispatchEvent(new CustomEvent(`slicc-theme-change`,{detail:{theme:e},bubbles:!0,composed:!0}))}});var fl=`
|
|
4953
5010
|
slicc-dock-tree {
|
|
4954
5011
|
display: block;
|
|
4955
5012
|
/* Fill the parent shell's flex column. Without this the host collapses to
|
|
@@ -5172,7 +5229,7 @@ slicc-dock-tree .dock-tree__preview {
|
|
|
5172
5229
|
slicc-dock-tree .dock-tree__preview--active {
|
|
5173
5230
|
display: block;
|
|
5174
5231
|
}
|
|
5175
|
-
`,Yc=`slicc-dock-tree-style`;function Xc(e){if(e.getElementById(Yc))return;let t=e.createElement(`style`);t.id=Yc,t.textContent=Jc,(e.head??e.documentElement).appendChild(t)}var Zc=`slicc-surface`,Qc=`chat`,$c=`sprinkle:`;function el(e){return typeof e==`string`&&e.trim().toLowerCase()===`false`}function tl(e){return e===`chat`?`Chat`:e.startsWith($c)?e.slice(9):e}var nl=[`top`,`left`,`middle`,`right`,`bottom`],rl=[`left`,`middle`,`right`],il=[`top`,`center`,`bottom`],al=.02;function ol(){return{zones:{top:null,left:null,middle:null,right:null,bottom:null},rowFr:{top:1,center:1,bottom:1},colFr:{left:1,middle:1,right:1}}}function sl(e){return JSON.parse(JSON.stringify(e))}function cl(e,t){if(e.type===`leaf`){t.push(e.surfaceId);return}for(let n of e.children)cl(n,t)}function ll(e,t){if(e.type===`leaf`)return e.surfaceId===t?e:null;for(let n of e.children){let e=ll(n,t);if(e)return e}return null}function ul(e,t,n){if(n)return!0;function r(e,n){let i=n||e.locked===!0;if(e===t)return i;if(e.type!==`split`)return null;for(let t of e.children){let e=r(t,i);if(e!=null)return e}return null}return r(e,!1)??!1}function dl(e){return e.locked===!0||e.type===`split`&&e.children.some(dl)}function fl(e){return e.getAttribute(`surface-id`)||e.getAttribute(`data-s`)||e.id||null}function pl(e){e.style.position=`relative`,e.style.inset=`auto`,e.style.display=`flex`,e.style.flex=`1 1 auto`,e.style.minWidth=`0`,e.style.minHeight=`0`}function ml(e){e.style.removeProperty(`position`),e.style.removeProperty(`inset`),e.style.removeProperty(`flex`),e.style.removeProperty(`min-width`),e.style.removeProperty(`min-height`),e.style.display=`none`}function hl(e,t){return{type:`split`,dir:e,children:t,sizes:t.map(()=>1)}}function gl(e,t,n){e.type===`split`&&e.children.forEach((r,i)=>{r===t?n(e,i):gl(r,t,n)})}function _l(e,t){if(e.type!==`split`)return null;for(let n=0;n<e.children.length;n++){let r=e.children[n];if(r===t)return{parent:e,index:n};let i=_l(r,t);if(i)return i}return null}function vl(e){if(!e)return null;if(e.type!==`split`)return e;e.children=e.children.map(vl).filter(e=>e!=null);let t=[],n=[];return e.children.forEach((r,i)=>{r.type===`split`&&r.dir===e.dir?r.children.forEach((a,o)=>{t.push(a),n.push((e.sizes[i]||1)*(r.sizes[o]||1))}):(t.push(r),n.push(e.sizes[i]||1))}),e.children=t,e.sizes=n,e.children.length===0?null:e.children.length===1?e.children[0]:e}function yl(e,t,n){let r=e[t];if(r){if(r===n){e[t]=null;return}gl(r,n,(e,t)=>{e.children.splice(t,1),e.sizes.splice(t,1)}),e[t]=vl(r)}}function bl(e,t,n,r){if(e[t]===n){e[t]=r;return}let i=e[t];i&&gl(i,n,(e,t)=>{e.children[t]=r})}function xl(e,t,n){let r=t.reduce((e,t)=>e+t,0)-e;if(r<=0)return null;let i=Math.min(.98,Math.max(al,n));return i*r/(1-i)}function Sl(e,t,n){let r=(t-e.left)/e.width,i=(n-e.top)/e.height;if(r>.34&&r<.66&&i>.34&&i<.66)return`center`;let a={n:i,s:1-i,w:r,e:1-r},o=Object.entries(a);return o.sort((e,t)=>e[1]-t[1]),o[0][0]}function Cl(e){let t=document.createElement(`div`);return t.className=`dock-tree__divider dock-tree__divider--${e}`,t}function wl(){let e=document.createElement(`div`);return e.className=`dock-tree__root`,e}function Tl(){let e=document.createElement(`div`);return e.className=`dock-tree__parking`,e.hidden=!0,e}function El(){let e=document.createElement(`div`);return e.className=`dock-tree__ghost`,e}function Dl(){let e=document.createElement(`div`);return e.className=`dock-tree__preview`,e}A(`slicc-dock-tree`,class extends HTMLElement{static observedAttributes=[`tiles-movable`];#e=ol();#t=!1;#n=!1;#r=new Set;#i=null;#a=null;#o=new WeakMap;#s=new Set;#c=wl();#l=Tl();#u=El();#d=Dl();#f=new MutationObserver(()=>this.#x());connectedCallback(){Xc(this.ownerDocument),this.#n=!0,this.#c.parentElement!==this&&this.append(this.#c),this.#l.parentElement!==this&&this.append(this.#l),this.#u.parentElement!==this&&this.append(this.#u),this.#d.parentElement!==this&&this.append(this.#d),this.#x(),this.#f.observe(this,{childList:!0})}disconnectedCallback(){this.#n=!1,this.#f.disconnect(),this.#L()}attributeChangedCallback(e,t,n){e!==`tiles-movable`||t===n||!this.#n||(this.tilesMovable||this.#L(),this.#x())}get tilesMovable(){let e=this.getAttribute(`tiles-movable`);return e!==null&&!el(e)}set tilesMovable(e){this.toggleAttribute(`tiles-movable`,!!e&&!el(e))}setTree(e){this.#e=e?sl(e):ol(),this.#n&&this.#x()}getTree(){return sl(this.#e)}setPinned(e){this.#r=new Set(e)}getSurfaceIds(){let e=[];for(let t of nl){let n=this.#e.zones[t];n&&cl(n,e)}return e}#p(e){return this.#e.zones[e]!=null||this.#t}#m(e,t){let n=this.#e.zones[t];return n?ul(n,e,this.#e.locked===!0):!1}#h(e){if(this.#e.locked===!0)return!0;let t=this.#e.zones[e];return t!=null&&dl(t)}#g(e){return this.#e.locked===!0?!0:e===`center`?rl.some(e=>this.#h(e)):this.#h(e)}placeSurface(e,t){if(this.getSurfaceIds().includes(e))return;let n={type:`leaf`,surfaceId:e},r=this.#e.zones[t];this.#e.zones[t]=r==null?n:vl(hl(`col`,[r,n])),this.#n&&this.#x(),this.#R()}removeSurface(e){if(!this.#r.has(e))for(let t of nl){let n=this.#e.zones[t];if(!n)continue;let r=ll(n,e);if(r){if(this.#m(r,t))return;yl(this.#e.zones,t,r),this.#n&&this.#x(),this.#R();return}}}moveSurfaceToZone(e,t){let n=!1;for(let r of nl){let i=this.#e.zones[r];if(!i)continue;let a=ll(i,e);if(a){if(n=!0,this.#m(a,r)||r===t&&i===a)return;yl(this.#e.zones,r,a);break}}if(!n){this.placeSurface(e,t);return}let r={type:`leaf`,surfaceId:e};this.#e.zones[t]=r,this.#n&&this.#x(),this.#R()}setSurfaceSize(e,t){let n=this.#_(e);if(!n)return!1;let r=this.#z().get(e)??null,i=r?.getBoundingClientRect()??null,a=r?.closest(`.dock-tree__leaf`)?.getBoundingClientRect()??i,o=!1;if(n.width&&(t.widthPx!=null||t.widthPercent!=null)){let e=a&&i?Math.max(0,a.width-i.width):0;o=this.#b(n.width,t.widthPx==null?void 0:t.widthPx+e,t.widthPercent,a?.width)||o}if(n.height&&(t.heightPx!=null||t.heightPercent!=null)){let e=a&&i?Math.max(0,a.height-i.height):0;o=this.#b(n.height,t.heightPx==null?void 0:t.heightPx+e,t.heightPercent,a?.height)||o}return o&&(this.#x(),this.#k()),o}#_(e){for(let t of nl){let n=this.#e.zones[t];if(!n)continue;let r=ll(n,e);if(!r)continue;if(this.#m(r,t))return{width:null,height:null};let i=_l(n,r);if(i){let{parent:e,index:t}=i,n={currentFr:e.sizes[t]??1,groupFr:e.sizes,apply:n=>{e.sizes[t]=n}};return{width:e.dir===`row`?n:null,height:e.dir===`col`?n:null}}let a=t===`left`||t===`middle`||t===`right`,o=null;if(a){let e=t,n=this.#y();o={currentFr:this.#e.colFr[e],groupFr:n.map(e=>this.#e.colFr[e]),apply:t=>{this.#e.colFr[e]=t}}}let s=a?`center`:t,c=this.#v(),l={currentFr:this.#e.rowFr[s],groupFr:c.map(e=>this.#e.rowFr[e]),apply:e=>{this.#e.rowFr[s]=e}};return{width:o,height:l}}return null}#v(){let e=[];return this.#p(`top`)&&e.push(`top`),rl.some(e=>this.#p(e))&&e.push(`center`),this.#p(`bottom`)&&e.push(`bottom`),e}#y(){return rl.filter(e=>this.#p(e))}#b(e,t,n,r){let i=null;if(n!=null)i=n/100;else if(t!=null&&r!=null&&r>0&&e.currentFr>0){let n=r*e.groupFr.reduce((e,t)=>e+t,0)/e.currentFr;n>0&&(i=t/n)}if(i==null)return!1;let a=xl(e.currentFr,e.groupFr,i);return a!=null&&(e.apply(a),!0)}#x(){let e=this.#e,t=this.#z(),n=new Set(this.getSurfaceIds()),r=this.#S(e,t),i=[];if(this.#p(`top`)){let n=this.#C(`top`,t);n.style.flex=`${e.rowFr.top} 1 0`,i.push({key:`top`,el:n})}if(r&&i.push({key:`center`,el:r}),this.#p(`bottom`)){let n=this.#C(`bottom`,t);n.style.flex=`${e.rowFr.bottom} 1 0`,i.push({key:`bottom`,el:n})}let a=[];i.forEach((t,n)=>{a.push(t.el),n<i.length-1&&!this.#g(t.key)&&!this.#g(i[n+1].key)&&a.push(this.#E(`v`,t.key,i[n+1].key,this.#c,e.rowFr,il))}),this.#c.replaceChildren(...a);for(let[e,r]of t)n.has(e)||(ml(r),r.parentElement!==this.#l&&this.#l.appendChild(r));this.#s=n,this.dispatchEvent(new CustomEvent(`dock-tree-render`,{detail:{placed:[...n]},bubbles:!0,composed:!0}))}#S(e,t){let n=rl.filter(e=>this.#p(e));if(n.length===0)return null;let r=document.createElement(`div`);return r.className=`dock-tree__row`,r.style.flex=`${e.rowFr.center} 1 0`,n.forEach((i,a)=>{let o=this.#C(i,t);o.style.flex=`${e.colFr[i]} 1 0`,r.appendChild(o),a<n.length-1&&!this.#h(i)&&!this.#h(n[a+1])&&r.appendChild(this.#E(`h`,i,n[a+1],r,e.colFr,rl))}),r}#C(e,t){let n=document.createElement(`div`);n.className=`dock-tree__zone`,this.#t&&n.classList.add(`dock-tree__zone--droppable`),n.dataset.zone=e;let r=this.#e.zones[e];if(r==null){let t=document.createElement(`div`);return t.className=`dock-tree__empty`,t.textContent=`${e} (drop here)`,n.appendChild(t),n}let i=this.#w(r,t,e);return i.style.flex=`1 1 0`,n.appendChild(i),n}#w(e,t,n){if(e.type===`leaf`){let r=document.createElement(`div`);r.className=`dock-tree__leaf`;let i=t.get(e.surfaceId);return i&&r.appendChild(this.#T(e,n,e.surfaceId,i)),r}let r=document.createElement(`div`);r.className=`dock-tree__split dock-tree__split--${e.dir}`;let i=this.#e.locked===!0||e.locked===!0;return e.children.forEach((a,o)=>{let s=this.#w(a,t,n);s.style.flex=`${e.sizes[o]??1} 1 0`,r.appendChild(s),o<e.children.length-1&&!i&&r.appendChild(this.#D(e,o,r))}),r}#T(e,t,r,i){let a=document.createElement(`div`);if(a.className=`dock-tree__tile`,r!==`chat`&&(a.classList.add(`dock-tree__tile--chrome`),this.#s.has(r)||a.classList.add(`dock-tree__tile--enter`)),this.tilesMovable&&!this.#m(e,t)){let i=tl(r),o=document.createElement(`button`);o.type=`button`,o.className=`dock-tree__tile-move`,o.setAttribute(`aria-label`,`Move ${i}`),o.title=i,o.appendChild(n(`grip-vertical`,{size:13})),o.addEventListener(`pointerdown`,n=>this.#A(n,e,t)),a.appendChild(o)}let o=document.createElement(`div`);return o.className=`dock-tree__tile-body`,pl(i),o.appendChild(i),a.appendChild(o),this.#o.set(a,e),a}#E(e,t,n,r,i,a){let o=Cl(e);return this.#O(o,e===`h`,r,()=>i[t]??1,()=>i[n]??1,(e,r)=>{i[t]=e,i[n]=r},()=>a.reduce((e,t)=>e+(i[t]??1),0)),o}#D(e,t,n){let r=e.dir===`row`,i=Cl(r?`h`:`v`);return this.#O(i,r,n,()=>e.sizes[t]??1,()=>e.sizes[t+1]??1,(n,r)=>{e.sizes[t]=n,e.sizes[t+1]=r},()=>e.sizes.reduce((e,t)=>e+(t??1),0)),i}#O(e,t,n,r,i,a,o){e.addEventListener(`pointerdown`,e=>{e.preventDefault(),this.setPointerCapture(e.pointerId);let s=n.getBoundingClientRect(),c=r()+i(),l=c*al,u=o(),d=t?s.width:s.height,f=t?e.clientX:e.clientY,p=r(),m=e=>{let n=t?e.clientX:e.clientY,r=d>0?(n-f)/d*u:0,i=Math.max(l,Math.min(c-l,p+r));a(i,c-i),this.#x()},h=()=>{window.removeEventListener(`pointermove`,m),window.removeEventListener(`pointerup`,h),window.removeEventListener(`pointercancel`,h),this.hasPointerCapture(e.pointerId)&&this.releasePointerCapture(e.pointerId),this.#k()};window.addEventListener(`pointermove`,m),window.addEventListener(`pointerup`,h),window.addEventListener(`pointercancel`,h)})}#k(){this.dispatchEvent(new CustomEvent(`dock-tree-resize`,{detail:{tree:this.getTree()},bubbles:!0,composed:!0}))}#A(e,t,n){!this.tilesMovable||this.#m(t,n)||(e.preventDefault(),this.#j({kind:`internal`,node:t,fromZone:n},t.type===`leaf`?t.surfaceId:`panel`),this.#M(e))}beginExternalDrag(e,t){this.tilesMovable&&this.#j({kind:`external`,surfaceId:e},e)}#j(e,t){this.#i=e,this.#a=null,this.#t=!0,this.#x(),this.#u.textContent=t,this.#u.classList.add(`dock-tree__ghost--active`),window.addEventListener(`pointermove`,this.#N),window.addEventListener(`pointerup`,this.#I)}#M(e){this.#u.style.left=`${e.clientX}px`,this.#u.style.top=`${e.clientY}px`}#N=e=>{this.#M(e),this.#a=null,this.#d.classList.remove(`dock-tree__preview--active`);for(let e of Array.from(this.querySelectorAll(`.dock-tree__zone--hot`)))e.classList.remove(`dock-tree__zone--hot`);let t=this.#i;if(!t)return;let n=document.elementFromPoint(e.clientX,e.clientY);if(!n)return;let r=n.closest(`.dock-tree__zone`);if(!(r instanceof HTMLElement))return;let i=r.dataset.zone;if(!i)return;r.classList.add(`dock-tree__zone--hot`);let a=n.closest(`.dock-tree__tile`),o=a instanceof HTMLElement?this.#o.get(a):void 0,s=t.kind===`internal`&&o===t.node,c=!!o&&this.#m(o,i);if(a instanceof HTMLElement&&o&&!s&&!c){let t=a.getBoundingClientRect(),n=Sl(t,e.clientX,e.clientY);this.#a={zone:i,leaf:o,region:n},this.#P(t,n)}else a||(this.#a={zone:i,empty:!0},this.#F(r.getBoundingClientRect()))};#P(e,t){let{left:n,top:r,width:i,height:a}=e;t===`n`?a=e.height/2:t===`s`?(r=e.top+e.height/2,a=e.height/2):t===`w`?i=e.width/2:t===`e`&&(n=e.left+e.width/2,i=e.width/2),this.#F(new DOMRect(n,r,i,a))}#F(e){this.#d.style.left=`${e.left}px`,this.#d.style.top=`${e.top}px`,this.#d.style.width=`${e.width}px`,this.#d.style.height=`${e.height}px`,this.#d.classList.add(`dock-tree__preview--active`)}#I=()=>{window.removeEventListener(`pointermove`,this.#N),window.removeEventListener(`pointerup`,this.#I),this.#u.classList.remove(`dock-tree__ghost--active`),this.#d.classList.remove(`dock-tree__preview--active`);for(let e of Array.from(this.querySelectorAll(`.dock-tree__zone--hot`)))e.classList.remove(`dock-tree__zone--hot`);let e=this.#a,t=this.#i;this.#a=null,this.#i=null,this.#t=!1;let n=!!t&&t.kind===`internal`&&!!e&&!e.empty&&e.leaf===t.node,r=!!t&&t.kind===`external`&&this.getSurfaceIds().includes(t.surfaceId);if(!t||!e||n||r){this.#x();return}let i;if(t.kind===`internal`?(yl(this.#e.zones,t.fromZone,t.node),i=t.node):i={type:`leaf`,surfaceId:t.surfaceId},e.empty||this.#e.zones[e.zone]==null)this.#e.zones[e.zone]=i;else{let{region:t,leaf:n}=e,r=hl(t===`e`||t===`w`?`row`:`col`,t===`n`||t===`w`?[i,n]:[n,i]);bl(this.#e.zones,e.zone,n,r),this.#e.zones[e.zone]=vl(this.#e.zones[e.zone])}this.#x(),this.#R()};#L(){this.#i&&(window.removeEventListener(`pointermove`,this.#N),window.removeEventListener(`pointerup`,this.#I),this.#i=null,this.#a=null,this.#t=!1,this.#u.classList.remove(`dock-tree__ghost--active`),this.#d.classList.remove(`dock-tree__preview--active`))}#R(){this.dispatchEvent(new CustomEvent(`dock-tree-change`,{detail:{tree:this.getTree()},bubbles:!0,composed:!0}))}#z(){let e=new Map;for(let t of Array.from(this.querySelectorAll(Zc))){if(!(t instanceof HTMLElement)||t.parentElement?.closest(Zc))continue;let n=fl(t);n&&e.set(n,t)}return e}});var Ol=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
5232
|
+
`,pl=`slicc-dock-tree-style`;function ml(e){if(e.getElementById(pl))return;let t=e.createElement(`style`);t.id=pl,t.textContent=fl,(e.head??e.documentElement).appendChild(t)}var hl=`slicc-surface`,gl=`chat`,_l=`sprinkle:`;function vl(e){return typeof e==`string`&&e.trim().toLowerCase()===`false`}function yl(e){return e===`chat`?`Chat`:e.startsWith(_l)?e.slice(9):e}var bl=[`top`,`left`,`middle`,`right`,`bottom`],xl=[`left`,`middle`,`right`],Sl=[`top`,`center`,`bottom`],Cl=.02;function wl(){return{zones:{top:null,left:null,middle:null,right:null,bottom:null},rowFr:{top:1,center:1,bottom:1},colFr:{left:1,middle:1,right:1}}}function Tl(e){return JSON.parse(JSON.stringify(e))}function El(e,t){if(e.type===`leaf`){t.push(e.surfaceId);return}for(let n of e.children)El(n,t)}function Dl(e,t){if(e.type===`leaf`)return e.surfaceId===t?e:null;for(let n of e.children){let e=Dl(n,t);if(e)return e}return null}function Ol(e,t,n){if(n)return!0;function r(e,n){let i=n||e.locked===!0;if(e===t)return i;if(e.type!==`split`)return null;for(let t of e.children){let e=r(t,i);if(e!=null)return e}return null}return r(e,!1)??!1}function kl(e){return e.locked===!0||e.type===`split`&&e.children.some(kl)}function Al(e){return e.getAttribute(`surface-id`)||e.getAttribute(`data-s`)||e.id||null}function jl(e){e.style.position=`relative`,e.style.inset=`auto`,e.style.display=`flex`,e.style.flex=`1 1 auto`,e.style.minWidth=`0`,e.style.minHeight=`0`}function Ml(e){e.style.removeProperty(`position`),e.style.removeProperty(`inset`),e.style.removeProperty(`flex`),e.style.removeProperty(`min-width`),e.style.removeProperty(`min-height`),e.style.display=`none`}function Nl(e,t){return{type:`split`,dir:e,children:t,sizes:t.map(()=>1)}}function Pl(e,t,n){e.type===`split`&&e.children.forEach((r,i)=>{r===t?n(e,i):Pl(r,t,n)})}function Fl(e,t){if(e.type!==`split`)return null;for(let n=0;n<e.children.length;n++){let r=e.children[n];if(r===t)return{parent:e,index:n};let i=Fl(r,t);if(i)return i}return null}function Il(e){if(!e)return null;if(e.type!==`split`)return e;e.children=e.children.map(Il).filter(e=>e!=null);let t=[],n=[];return e.children.forEach((r,i)=>{r.type===`split`&&r.dir===e.dir?r.children.forEach((a,o)=>{t.push(a),n.push((e.sizes[i]||1)*(r.sizes[o]||1))}):(t.push(r),n.push(e.sizes[i]||1))}),e.children=t,e.sizes=n,e.children.length===0?null:e.children.length===1?e.children[0]:e}function Ll(e,t,n){let r=e[t];if(r){if(r===n){e[t]=null;return}Pl(r,n,(e,t)=>{e.children.splice(t,1),e.sizes.splice(t,1)}),e[t]=Il(r)}}function Rl(e,t,n,r){if(e[t]===n){e[t]=r;return}let i=e[t];i&&Pl(i,n,(e,t)=>{e.children[t]=r})}function zl(e,t,n){let r=t.reduce((e,t)=>e+t,0)-e;if(r<=0)return null;let i=Math.min(.98,Math.max(Cl,n));return i*r/(1-i)}function Bl(e,t,n){let r=(t-e.left)/e.width,i=(n-e.top)/e.height;if(r>.34&&r<.66&&i>.34&&i<.66)return`center`;let a={n:i,s:1-i,w:r,e:1-r},o=Object.entries(a);return o.sort((e,t)=>e[1]-t[1]),o[0][0]}function Vl(e){let t=document.createElement(`div`);return t.className=`dock-tree__divider dock-tree__divider--${e}`,t}function Hl(){let e=document.createElement(`div`);return e.className=`dock-tree__root`,e}function Ul(){let e=document.createElement(`div`);return e.className=`dock-tree__parking`,e.hidden=!0,e}function Wl(){let e=document.createElement(`div`);return e.className=`dock-tree__ghost`,e}function Gl(){let e=document.createElement(`div`);return e.className=`dock-tree__preview`,e}A(`slicc-dock-tree`,class extends HTMLElement{static observedAttributes=[`tiles-movable`];#e=wl();#t=!1;#n=!1;#r=new Set;#i=null;#a=null;#o=new WeakMap;#s=new Set;#c=Hl();#l=Ul();#u=Wl();#d=Gl();#f=new MutationObserver(()=>this.#x());connectedCallback(){ml(this.ownerDocument),this.#n=!0,this.#c.parentElement!==this&&this.append(this.#c),this.#l.parentElement!==this&&this.append(this.#l),this.#u.parentElement!==this&&this.append(this.#u),this.#d.parentElement!==this&&this.append(this.#d),this.#x(),this.#f.observe(this,{childList:!0})}disconnectedCallback(){this.#n=!1,this.#f.disconnect(),this.#L()}attributeChangedCallback(e,t,n){e!==`tiles-movable`||t===n||!this.#n||(this.tilesMovable||this.#L(),this.#x())}get tilesMovable(){let e=this.getAttribute(`tiles-movable`);return e!==null&&!vl(e)}set tilesMovable(e){this.toggleAttribute(`tiles-movable`,!!e&&!vl(e))}setTree(e){this.#e=e?Tl(e):wl(),this.#n&&this.#x()}getTree(){return Tl(this.#e)}setPinned(e){this.#r=new Set(e)}getSurfaceIds(){let e=[];for(let t of bl){let n=this.#e.zones[t];n&&El(n,e)}return e}#p(e){return this.#e.zones[e]!=null||this.#t}#m(e,t){let n=this.#e.zones[t];return n?Ol(n,e,this.#e.locked===!0):!1}#h(e){if(this.#e.locked===!0)return!0;let t=this.#e.zones[e];return t!=null&&kl(t)}#g(e){return this.#e.locked===!0?!0:e===`center`?xl.some(e=>this.#h(e)):this.#h(e)}placeSurface(e,t){if(this.getSurfaceIds().includes(e))return;let n={type:`leaf`,surfaceId:e},r=this.#e.zones[t];this.#e.zones[t]=r==null?n:Il(Nl(`col`,[r,n])),this.#n&&this.#x(),this.#R()}removeSurface(e){if(!this.#r.has(e))for(let t of bl){let n=this.#e.zones[t];if(!n)continue;let r=Dl(n,e);if(r){if(this.#m(r,t))return;Ll(this.#e.zones,t,r),this.#n&&this.#x(),this.#R();return}}}moveSurfaceToZone(e,t){let n=!1;for(let r of bl){let i=this.#e.zones[r];if(!i)continue;let a=Dl(i,e);if(a){if(n=!0,this.#m(a,r)||r===t&&i===a)return;Ll(this.#e.zones,r,a);break}}if(!n){this.placeSurface(e,t);return}let r={type:`leaf`,surfaceId:e};this.#e.zones[t]=r,this.#n&&this.#x(),this.#R()}setSurfaceSize(e,t){let n=this.#_(e);if(!n)return!1;let r=this.#z().get(e)??null,i=r?.getBoundingClientRect()??null,a=r?.closest(`.dock-tree__leaf`)?.getBoundingClientRect()??i,o=!1;if(n.width&&(t.widthPx!=null||t.widthPercent!=null)){let e=a&&i?Math.max(0,a.width-i.width):0;o=this.#b(n.width,t.widthPx==null?void 0:t.widthPx+e,t.widthPercent,a?.width)||o}if(n.height&&(t.heightPx!=null||t.heightPercent!=null)){let e=a&&i?Math.max(0,a.height-i.height):0;o=this.#b(n.height,t.heightPx==null?void 0:t.heightPx+e,t.heightPercent,a?.height)||o}return o&&(this.#x(),this.#k()),o}#_(e){for(let t of bl){let n=this.#e.zones[t];if(!n)continue;let r=Dl(n,e);if(!r)continue;if(this.#m(r,t))return{width:null,height:null};let i=Fl(n,r);if(i){let{parent:e,index:t}=i,n={currentFr:e.sizes[t]??1,groupFr:e.sizes,apply:n=>{e.sizes[t]=n}};return{width:e.dir===`row`?n:null,height:e.dir===`col`?n:null}}let a=t===`left`||t===`middle`||t===`right`,o=null;if(a){let e=t,n=this.#y();o={currentFr:this.#e.colFr[e],groupFr:n.map(e=>this.#e.colFr[e]),apply:t=>{this.#e.colFr[e]=t}}}let s=a?`center`:t,c=this.#v(),l={currentFr:this.#e.rowFr[s],groupFr:c.map(e=>this.#e.rowFr[e]),apply:e=>{this.#e.rowFr[s]=e}};return{width:o,height:l}}return null}#v(){let e=[];return this.#p(`top`)&&e.push(`top`),xl.some(e=>this.#p(e))&&e.push(`center`),this.#p(`bottom`)&&e.push(`bottom`),e}#y(){return xl.filter(e=>this.#p(e))}#b(e,t,n,r){let i=null;if(n!=null)i=n/100;else if(t!=null&&r!=null&&r>0&&e.currentFr>0){let n=r*e.groupFr.reduce((e,t)=>e+t,0)/e.currentFr;n>0&&(i=t/n)}if(i==null)return!1;let a=zl(e.currentFr,e.groupFr,i);return a!=null&&(e.apply(a),!0)}#x(){let e=this.#e,t=this.#z(),n=new Set(this.getSurfaceIds()),r=this.#S(e,t),i=[];if(this.#p(`top`)){let n=this.#C(`top`,t);n.style.flex=`${e.rowFr.top} 1 0`,i.push({key:`top`,el:n})}if(r&&i.push({key:`center`,el:r}),this.#p(`bottom`)){let n=this.#C(`bottom`,t);n.style.flex=`${e.rowFr.bottom} 1 0`,i.push({key:`bottom`,el:n})}let a=[];i.forEach((t,n)=>{a.push(t.el),n<i.length-1&&!this.#g(t.key)&&!this.#g(i[n+1].key)&&a.push(this.#E(`v`,t.key,i[n+1].key,this.#c,e.rowFr,Sl))}),this.#c.replaceChildren(...a);for(let[e,r]of t)n.has(e)||(Ml(r),r.parentElement!==this.#l&&this.#l.appendChild(r));this.#s=n,this.dispatchEvent(new CustomEvent(`dock-tree-render`,{detail:{placed:[...n]},bubbles:!0,composed:!0}))}#S(e,t){let n=xl.filter(e=>this.#p(e));if(n.length===0)return null;let r=document.createElement(`div`);return r.className=`dock-tree__row`,r.style.flex=`${e.rowFr.center} 1 0`,n.forEach((i,a)=>{let o=this.#C(i,t);o.style.flex=`${e.colFr[i]} 1 0`,r.appendChild(o),a<n.length-1&&!this.#h(i)&&!this.#h(n[a+1])&&r.appendChild(this.#E(`h`,i,n[a+1],r,e.colFr,xl))}),r}#C(e,t){let n=document.createElement(`div`);n.className=`dock-tree__zone`,this.#t&&n.classList.add(`dock-tree__zone--droppable`),n.dataset.zone=e;let r=this.#e.zones[e];if(r==null){let t=document.createElement(`div`);return t.className=`dock-tree__empty`,t.textContent=`${e} (drop here)`,n.appendChild(t),n}let i=this.#w(r,t,e);return i.style.flex=`1 1 0`,n.appendChild(i),n}#w(e,t,n){if(e.type===`leaf`){let r=document.createElement(`div`);r.className=`dock-tree__leaf`;let i=t.get(e.surfaceId);return i&&r.appendChild(this.#T(e,n,e.surfaceId,i)),r}let r=document.createElement(`div`);r.className=`dock-tree__split dock-tree__split--${e.dir}`;let i=this.#e.locked===!0||e.locked===!0;return e.children.forEach((a,o)=>{let s=this.#w(a,t,n);s.style.flex=`${e.sizes[o]??1} 1 0`,r.appendChild(s),o<e.children.length-1&&!i&&r.appendChild(this.#D(e,o,r))}),r}#T(e,t,r,i){let a=document.createElement(`div`);if(a.className=`dock-tree__tile`,r!==`chat`&&(a.classList.add(`dock-tree__tile--chrome`),this.#s.has(r)||a.classList.add(`dock-tree__tile--enter`)),this.tilesMovable&&!this.#m(e,t)){let i=yl(r),o=document.createElement(`button`);o.type=`button`,o.className=`dock-tree__tile-move`,o.setAttribute(`aria-label`,`Move ${i}`),o.title=i,o.appendChild(n(`grip-vertical`,{size:13})),o.addEventListener(`pointerdown`,n=>this.#A(n,e,t)),a.appendChild(o)}let o=document.createElement(`div`);return o.className=`dock-tree__tile-body`,jl(i),o.appendChild(i),a.appendChild(o),this.#o.set(a,e),a}#E(e,t,n,r,i,a){let o=Vl(e);return this.#O(o,e===`h`,r,()=>i[t]??1,()=>i[n]??1,(e,r)=>{i[t]=e,i[n]=r},()=>a.reduce((e,t)=>e+(i[t]??1),0)),o}#D(e,t,n){let r=e.dir===`row`,i=Vl(r?`h`:`v`);return this.#O(i,r,n,()=>e.sizes[t]??1,()=>e.sizes[t+1]??1,(n,r)=>{e.sizes[t]=n,e.sizes[t+1]=r},()=>e.sizes.reduce((e,t)=>e+(t??1),0)),i}#O(e,t,n,r,i,a,o){e.addEventListener(`pointerdown`,e=>{e.preventDefault(),this.setPointerCapture(e.pointerId);let s=n.getBoundingClientRect(),c=r()+i(),l=c*Cl,u=o(),d=t?s.width:s.height,f=t?e.clientX:e.clientY,p=r(),m=e=>{let n=t?e.clientX:e.clientY,r=d>0?(n-f)/d*u:0,i=Math.max(l,Math.min(c-l,p+r));a(i,c-i),this.#x()},h=()=>{window.removeEventListener(`pointermove`,m),window.removeEventListener(`pointerup`,h),window.removeEventListener(`pointercancel`,h),this.hasPointerCapture(e.pointerId)&&this.releasePointerCapture(e.pointerId),this.#k()};window.addEventListener(`pointermove`,m),window.addEventListener(`pointerup`,h),window.addEventListener(`pointercancel`,h)})}#k(){this.dispatchEvent(new CustomEvent(`dock-tree-resize`,{detail:{tree:this.getTree()},bubbles:!0,composed:!0}))}#A(e,t,n){!this.tilesMovable||this.#m(t,n)||(e.preventDefault(),this.#j({kind:`internal`,node:t,fromZone:n},t.type===`leaf`?t.surfaceId:`panel`),this.#M(e))}beginExternalDrag(e,t){this.tilesMovable&&this.#j({kind:`external`,surfaceId:e},e)}#j(e,t){this.#i=e,this.#a=null,this.#t=!0,this.#x(),this.#u.textContent=t,this.#u.classList.add(`dock-tree__ghost--active`),window.addEventListener(`pointermove`,this.#N),window.addEventListener(`pointerup`,this.#I)}#M(e){this.#u.style.left=`${e.clientX}px`,this.#u.style.top=`${e.clientY}px`}#N=e=>{this.#M(e),this.#a=null,this.#d.classList.remove(`dock-tree__preview--active`);for(let e of Array.from(this.querySelectorAll(`.dock-tree__zone--hot`)))e.classList.remove(`dock-tree__zone--hot`);let t=this.#i;if(!t)return;let n=document.elementFromPoint(e.clientX,e.clientY);if(!n)return;let r=n.closest(`.dock-tree__zone`);if(!(r instanceof HTMLElement))return;let i=r.dataset.zone;if(!i)return;r.classList.add(`dock-tree__zone--hot`);let a=n.closest(`.dock-tree__tile`),o=a instanceof HTMLElement?this.#o.get(a):void 0,s=t.kind===`internal`&&o===t.node,c=!!o&&this.#m(o,i);if(a instanceof HTMLElement&&o&&!s&&!c){let t=a.getBoundingClientRect(),n=Bl(t,e.clientX,e.clientY);this.#a={zone:i,leaf:o,region:n},this.#P(t,n)}else a||(this.#a={zone:i,empty:!0},this.#F(r.getBoundingClientRect()))};#P(e,t){let{left:n,top:r,width:i,height:a}=e;t===`n`?a=e.height/2:t===`s`?(r=e.top+e.height/2,a=e.height/2):t===`w`?i=e.width/2:t===`e`&&(n=e.left+e.width/2,i=e.width/2),this.#F(new DOMRect(n,r,i,a))}#F(e){this.#d.style.left=`${e.left}px`,this.#d.style.top=`${e.top}px`,this.#d.style.width=`${e.width}px`,this.#d.style.height=`${e.height}px`,this.#d.classList.add(`dock-tree__preview--active`)}#I=()=>{window.removeEventListener(`pointermove`,this.#N),window.removeEventListener(`pointerup`,this.#I),this.#u.classList.remove(`dock-tree__ghost--active`),this.#d.classList.remove(`dock-tree__preview--active`);for(let e of Array.from(this.querySelectorAll(`.dock-tree__zone--hot`)))e.classList.remove(`dock-tree__zone--hot`);let e=this.#a,t=this.#i;this.#a=null,this.#i=null,this.#t=!1;let n=!!t&&t.kind===`internal`&&!!e&&!e.empty&&e.leaf===t.node,r=!!t&&t.kind===`external`&&this.getSurfaceIds().includes(t.surfaceId);if(!t||!e||n||r){this.#x();return}let i;if(t.kind===`internal`?(Ll(this.#e.zones,t.fromZone,t.node),i=t.node):i={type:`leaf`,surfaceId:t.surfaceId},e.empty||this.#e.zones[e.zone]==null)this.#e.zones[e.zone]=i;else{let{region:t,leaf:n}=e,r=Nl(t===`e`||t===`w`?`row`:`col`,t===`n`||t===`w`?[i,n]:[n,i]);Rl(this.#e.zones,e.zone,n,r),this.#e.zones[e.zone]=Il(this.#e.zones[e.zone])}this.#x(),this.#R()};#L(){this.#i&&(window.removeEventListener(`pointermove`,this.#N),window.removeEventListener(`pointerup`,this.#I),this.#i=null,this.#a=null,this.#t=!1,this.#u.classList.remove(`dock-tree__ghost--active`),this.#d.classList.remove(`dock-tree__preview--active`))}#R(){this.dispatchEvent(new CustomEvent(`dock-tree-change`,{detail:{tree:this.getTree()},bubbles:!0,composed:!0}))}#z(){let e=new Map;for(let t of Array.from(this.querySelectorAll(hl))){if(!(t instanceof HTMLElement)||t.parentElement?.closest(hl))continue;let n=Al(t);n&&e.set(n,t)}return e}});var Kl=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
5176
5233
|
<symbol id="file-tree-icon-chevron" viewBox="0 0 16 16">
|
|
5177
5234
|
<path d="M12.4697 5.46973C12.7626 5.17684 13.2374 5.17684 13.5303 5.46973C13.8232 5.76262 13.8232 6.23738 13.5303 6.53028L8.53028 11.5303C8.23738 11.8232 7.76262 11.8232 7.46973 11.5303L2.46973 6.53028C2.17684 6.23738 2.17684 5.76262 2.46973 5.46973C2.76262 5.17684 3.23738 5.17684 3.53028 5.46973L8 9.93946L12.4697 5.46973Z" fill="currentcolor"/>
|
|
5178
5235
|
</symbol>
|
|
@@ -5189,72 +5246,72 @@ slicc-dock-tree .dock-tree__preview--active {
|
|
|
5189
5246
|
<symbol id="file-tree-icon-ellipsis" viewBox="0 0 16 16">
|
|
5190
5247
|
<path d="M5 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M9.5 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M14 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0" />
|
|
5191
5248
|
</symbol>
|
|
5192
|
-
</svg>`,
|
|
5249
|
+
</svg>`,ql=`<symbol id="file-tree-builtin-astro" viewBox="0 0 16 16">
|
|
5193
5250
|
<path fill="currentColor" d="M6.08 13.92c-.63-.57-.81-1.79-.55-2.67.45.56 1.08.73 1.73.83 1 .15 1.99.1 2.92-.37l.32-.19q.13.38.08.78a2.1 2.1 0 0 1-.9 1.5q-.3.24-.61.43c-.64.44-.81.95-.57 1.69l.02.08a1.7 1.7 0 0 1-.74-.64 2 2 0 0 1-.3-.98q0-.27-.02-.52-.07-.61-.61-.62a.7.7 0 0 0-.75.6z" class="bg" opacity=".6"/>
|
|
5194
5251
|
<path fill="currentColor" d="M2.5 11.1s1.86-.9 3.72-.9l1.4-4.39c.05-.21.2-.36.38-.36s.33.15.38.36l1.4 4.38c2.2 0 3.72.92 3.72.92l-3.16-8.69q-.13-.4-.45-.42H6.11q-.3.02-.45.42z" class="fg"/>
|
|
5195
|
-
</symbol>`,
|
|
5252
|
+
</symbol>`,Jl=`<symbol id="file-tree-builtin-babel" viewBox="0 0 16 16">
|
|
5196
5253
|
<path fill="currentColor" fill-rule="evenodd" d="M9.49.5q1.92.05 2.66.54 1.27.6 1.35 1.52v.23a4 4 0 0 1-.53 1.9l-1.38 1.24q-.74.38-.72.63c.77.82 1.33 1.29.85 2.42q-.47 1.1-2.04 2.28c-.5.32-1.88 1.35-2.96 1.86-1.64.77-3.1 1.4-4.65 1.89-.51.16-1.5.16-1.5.16L.5 15A76 76 0 0 0 5.76 3.49q-.1-.08-.1-.2.1 0 .32-.35l-.03-.09q-1.17.39-2.38 1.3l-.13.03q0-.1-.21-.16-.46.31-.82.7l-.13-.19.16-.06-.03-.16-.34.29L2 4.5q.36-.48.72-.54l.04-.1V3.8q.16 0 .15-.06l.13-.06a6 6 0 0 0 1.13-.9v-.03H4.1l-.12.07q0-.1-.1-.1l-.15.07-.04-.1q.93-.52 1.63-1.05Q7.89.65 9.5.5M8.46 7.83l-.32.04c-1.31.54-2.31.82-2.91.88a71 71 0 0 0-2.2 4.54h.07q.58-.04 3.04-1.42.13 0 1.66-1.05L9.18 9.7v.03q.45-.2.81-1.3v-.2q-.5-.46-1.53-.4m.28-5.75c-.5.1-.75.19-.72.38l-1.16 2.6q-.17.1-.34.95-.3.48-.25.77v.1l.22.05A15 15 0 0 1 8.86 6c1.1-.71 2.12-1.38 2.8-2.54q.24-.33.21-.54-.02-.33-.4-.54c-.54 0-1.07-.34-1.63-.28l-.94-.03z" clip-rule="evenodd"/>
|
|
5197
|
-
</symbol>`,
|
|
5254
|
+
</symbol>`,Yl=`<symbol id="file-tree-builtin-bash" viewBox="0 0 16 16">
|
|
5198
5255
|
<path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
|
|
5199
5256
|
<path fill="currentColor" d="M11.5 11a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1zM7 6.75C7 6.42 6.64 6 6 6s-1 .42-1 .75q-.01.25.22.41.26.21.89.35.74.14 1.28.53c.37.29.61.7.61 1.21 0 .87-.68 1.5-1.5 1.7v.55a.5.5 0 0 1-1 0v-.56c-.82-.18-1.5-.82-1.5-1.69a.5.5 0 0 1 1 0c0 .33.36.75 1 .75s1-.42 1-.75q.01-.25-.22-.41a2 2 0 0 0-.89-.35q-.74-.14-1.28-.53A1.5 1.5 0 0 1 4 6.75c0-.87.68-1.5 1.5-1.7V4.5a.5.5 0 0 1 1 0v.56c.82.18 1.5.82 1.5 1.69a.5.5 0 0 1-1 0" class="fg-stroke"/>
|
|
5200
|
-
</symbol>`,
|
|
5257
|
+
</symbol>`,Xl=`<symbol id="file-tree-builtin-biome" viewBox="0 0 16 16">
|
|
5201
5258
|
<path fill="currentColor" d="M8 2 4.88 7.35a7 7 0 0 1 3.7-.13l1.04.25-.99 4.16-1.05-.25a2.7 2.7 0 0 0-3.07 1.45l-.98-.47a4 4 0 0 1 1.07-1.31 3.8 3.8 0 0 1 3.23-.71l.5-2.08a6 6 0 0 0-5.07 1.12A5.9 5.9 0 0 0 1 14h14z"/>
|
|
5202
|
-
</symbol>`,
|
|
5259
|
+
</symbol>`,Zl=`<symbol id="file-tree-builtin-bootstrap" viewBox="0 0 16 16">
|
|
5203
5260
|
<path fill="currentColor" fill-rule="evenodd" d="M11.72 1.5A2.5 2.5 0 0 1 14.2 4q.02 1.08.3 2.09c.22.73.56 1.24 1.08 1.45.22.08.4.27.4.5s-.18.43-.4.51q-.76.34-1.08 1.45c-.2.65-.27 1.32-.3 2a2.5 2.5 0 0 1-2.48 2.5H4.25A2.6 2.6 0 0 1 1.7 12c-.04-.85-.1-1.68-.22-2.04C1.26 9.23.92 8.7.4 8.5.18 8.42 0 8.23 0 8s.18-.42.4-.5q.77-.35 1.09-1.46c.1-.36.17-1.19.2-2.04a2.6 2.6 0 0 1 2.56-2.5z" class="bg" clip-rule="evenodd" opacity=".2"/>
|
|
5204
5261
|
<path fill="currentColor" fill-rule="evenodd" d="M8.47 4.54c1.23 0 2.04.68 2.04 1.73 0 .73-.55 1.39-1.24 1.5v.04c.94.1 1.58.77 1.58 1.7 0 1.2-.9 1.95-2.37 1.95H5.97a.3.3 0 0 1-.2-.08.3.3 0 0 1-.08-.2V4.82a.3.3 0 0 1 .08-.2.3.3 0 0 1 .2-.08zm-1.7 6.04h1.49q1.47-.01 1.49-1.15Q9.74 8.31 8.2 8.3H6.77zm0-5.16v2.06h1.21c.93 0 1.45-.38 1.45-1.06 0-.65-.44-1-1.22-1z" class="fg" clip-rule="evenodd"/>
|
|
5205
|
-
</symbol>`,
|
|
5262
|
+
</symbol>`,Ql=`<symbol id="file-tree-builtin-browserslist" viewBox="0 0 16 16">
|
|
5206
5263
|
<path fill="currentColor" d="M8.88 6.96c0 3.82 3.72 4.7 5.7 3.74-.23.9-1.04 1.67-2.35 1.93-.02.4.42 1.28.82 1.63-.9.35-1.94-.12-2.51-.48a5 5 0 0 0-.32 1.87c-.68 0-1.57-1-1.8-1.37-.3.18-.85 1.15-.96 1.72a2.4 2.4 0 0 1-.81-.86 2.4 2.4 0 0 1-.3-1.15c-.38.27-1.48.95-1.99 1.18-.25-.58-.15-1.3 0-2.06-.21.12-1.8.27-2.43.12.32-.36.75-1.19.94-1.57A4.5 4.5 0 0 1 .44 10.6c.48-.22.97-.53 1.49-1.06C1.26 9.17.24 8.64 0 7.7a6 6 0 0 0 1.79-.32C1.28 7.08.44 6.15.6 5.01c.42.21 1.3.37 1.73.3a3.4 3.4 0 0 1-.25-2.75 5 5 0 0 0 1.48 1c-.08-.8.3-2.31.8-2.71.2.46.73 1.21 1.08 1.4.09-.61.87-2.06 1.57-2.25 0 .5.27 1.4.5 1.67.51-.54 2.25-1.44 3.64-1.13-.43.45-.75.61-.86.98 1.05 0 2.78.34 4.27 1.93-2.34-.89-5.69.56-5.69 3.5" class="bg" opacity=".5"/>
|
|
5207
5264
|
<path fill="currentColor" d="M11.21 3.59a4.1 4.1 0 0 0 2.47 2.89c.24-.22.61-.38.95-.19.76.44.2 1.26-.34 1.66l-.07.06a13 13 0 0 1-4.49 1.61l-.3-.43a10.5 10.5 0 0 0 4.13-1.31 1 1 0 0 0 .23-.25.5.5 0 0 0-.21-.69l-.15-.06a4.5 4.5 0 0 1-1.77-1.31 4.5 4.5 0 0 1-.88-1.77q.2-.12.43-.21"/>
|
|
5208
5265
|
<path fill="currentColor" d="M10.36 5.18a.4.4 0 0 0-.03.38c.09.2.3.3.46.23s.24-.3.15-.5l-.01-.02q.23.13.34.39a.83.83 0 0 1-.43 1.08.8.8 0 0 1-1.08-.43.83.83 0 0 1 .6-1.13"/>
|
|
5209
|
-
</symbol
|
|
5266
|
+
</symbol>`,$l=`<symbol id="file-tree-builtin-bun" viewBox="0 0 16 16">
|
|
5210
5267
|
<path fill="currentColor" d="M8 14c3.87 0 7-2.46 7-5.49 0-1.88-1.2-3.53-3.04-4.52q-1.1-.61-1.84-1.07C9.2 2.35 8.64 2 8 2s-1.36.45-2.31 1.03A29 29 0 0 1 4.04 4C2.2 4.98 1 6.63 1 8.51 1 11.54 4.13 14 8 14M7.18 3.88q.3-.66.3-1.37c0-.08.11-.1.13-.01.38 1.57-.53 2.35-1.2 2.61-.08.03-.12-.07-.06-.12a3 3 0 0 0 .83-1.12m1.2-.05a3 3 0 0 0-.45-1.3V2.5c-.04-.07.05-.15.1-.1 1.15 1.2.77 2.3.33 2.87-.05.05-.13 0-.11-.08q.21-.67.13-1.37m1.04-.32a3 3 0 0 0-.94-1.02v-.01c-.06-.05-.01-.16.07-.12 1.51.61 1.61 1.8 1.43 2.5l-.03.03a.07.07 0 0 1-.1-.06 3 3 0 0 0-.43-1.32m-2.97.32c-.36.3-.74.43-1.2.56q-.11 0-.1-.1a3.5 3.5 0 0 0 1.76-1.57s.09-.07.1.04c0 .18-.2.76-.56 1.07m2.89 6.36q-.13.52-.55.88a1.3 1.3 0 0 1-.75.35 1.3 1.3 0 0 1-.77-.35 1.7 1.7 0 0 1-.54-.88.13.13 0 0 1 .15-.15h2.31a.14.14 0 0 1 .15.15M6.15 8.95a1.1 1.1 0 0 1-1.39-.14A1.1 1.1 0 0 1 5.12 7a1.1 1.1 0 0 1 1.2.25 1.1 1.1 0 0 1-.17 1.69m4.96 0a1.1 1.1 0 0 1-1.4-.14 1.1 1.1 0 0 1 .37-1.8 1.1 1.1 0 0 1 1.2.25 1.1 1.1 0 0 1 .24 1.2 1 1 0 0 1-.41.5"/>
|
|
5211
|
-
</symbol>`,
|
|
5268
|
+
</symbol>`,eu=`<symbol id="file-tree-builtin-c" viewBox="0 0 16 16">
|
|
5212
5269
|
<path fill="currentColor" fill-rule="evenodd" d="M8 1q.084 0 .166.021.098.023.186.075c1.055.624 4.22 2.486 5.277 3.11.085.05.15.112.209.192h-.002l.028.037a.5.5 0 0 1 .103.21q.031.102.033.21v6.29a.71.71 0 0 1-.347.616l-5.307 3.144a.68.68 0 0 1-.693 0l-5.307-3.144A.72.72 0 0 1 2 11.145V4.832a.71.71 0 0 1 .346-.612l5.288-3.126A.7.7 0 0 1 7.992 1zm2.901 4.349a3.75 3.75 0 1 0 0 5.302l-1.06-1.06a2.25 2.25 0 1 1 0-3.182z" clip-rule="evenodd"/>
|
|
5213
|
-
</symbol>`,
|
|
5270
|
+
</symbol>`,tu=`<symbol id="file-tree-builtin-claude" viewBox="0 0 16 16">
|
|
5214
5271
|
<path fill="currentColor" d="M3.75 10.31 6.5 8.77l.04-.14-.04-.07h-.14l-.46-.03-1.57-.04-1.38-.07-1.33-.07-.34-.07L1 7.86l.03-.21.28-.18.4.03.89.07 1.33.08.97.06 1.43.16h.22l.03-.1-.07-.05-.06-.06-1.39-.92-1.48-.98-.79-.57-.42-.28-.2-.28-.1-.6.39-.41.52.04.12.03.52.4 1.12.86L6.2 6.04l.2.17.09-.06.01-.04-.1-.15-.76-1.46-.85-1.46-.37-.6-.1-.36a1 1 0 0 1-.06-.42l.42-.59.25-.07.6.08.22.2.36.84.58 1.3.9 1.77.29.53.14.47.04.14h.1v-.07l.07-1 .14-1.22.14-1.57.04-.45.23-.53.42-.28.36.15.28.41-.04.25-.16 1.08-.36 1.7-.21 1.14h.12l.14-.15.58-.76.97-1.2.42-.5.5-.51.32-.25h.6l.44.66-.2.68-.61.79-.52.65-.74 1-.45.8.04.05h.1l1.68-.36.9-.16 1.06-.18.5.23.05.22-.2.48-1.15.28-1.34.28-2 .46-.04.01.03.04.9.09.4.03h.94l1.77.14.46.28.27.37-.04.28-.72.37-.95-.23-2.24-.53-.76-.18h-.11v.06l.64.63L12 10.86l1.48 1.35.07.34-.18.28-.2-.03-1.29-.98-.5-.42-1.12-.95h-.07v.1l.25.38 1.37 2.05.07.63-.1.2-.36.14-.38-.08-.8-1.12-.85-1.26-.66-1.15-.07.05-.4 4.23-.19.21-.42.17-.35-.28-.2-.42.2-.87.23-1.12.18-.9.17-1.1.1-.36v-.03h-.1l-.84 1.16-1.27 1.72-1 1.07-.24.1-.42-.22.04-.39.22-.32 1.4-1.8.84-1.1.57-.64-.02-.07h-.04l-3.7 2.4-.66.09-.28-.28.03-.42.14-.14 1.12-.77z"/>
|
|
5215
|
-
</symbol>`,
|
|
5272
|
+
</symbol>`,nu=`<symbol id="file-tree-builtin-cpp" viewBox="0 0 16 16">
|
|
5216
5273
|
<path fill="currentColor" fill-rule="evenodd" d="M8 1q.084 0 .166.021.098.023.186.075c1.055.624 4.22 2.486 5.277 3.11.085.05.15.112.209.192h-.002l.028.037a.5.5 0 0 1 .103.21q.031.102.033.21v6.29a.71.71 0 0 1-.347.616l-5.307 3.144a.68.68 0 0 1-.693 0l-5.307-3.144A.72.72 0 0 1 2 11.145V4.832a.71.71 0 0 1 .346-.612l5.288-3.126A.7.7 0 0 1 7.992 1zm2.901 4.349a3.75 3.75 0 1 0 0 5.302l-1.06-1.06a2.25 2.25 0 1 1 0-3.182z" clip-rule="evenodd"/>
|
|
5217
|
-
</symbol>`,
|
|
5274
|
+
</symbol>`,ru=`<symbol id="file-tree-builtin-css" viewBox="0 0 16 16">
|
|
5218
5275
|
<path fill="currentColor" d="M8 15c-5.76 0-7-1.24-7-7V2a1 1 0 0 1 1-1h6c5.77 0 7 1.24 7 7s-1.24 7-7 7" class="vector" opacity=".2"/>
|
|
5219
5276
|
<path fill="currentColor" d="M10.1 9.19h.73c.03.49.22.6 1 .6.76 0 .93-.12.93-.68 0-.52-.17-.67-.94-.85-1.38-.3-1.68-.56-1.68-1.47 0-1.05.3-1.29 1.67-1.29 1.29 0 1.57.2 1.6 1.13h-.74c-.01-.34-.17-.42-.85-.42-.77 0-.94.1-.94.58 0 .42.17.55.96.73 1.36.3 1.66.58 1.66 1.59 0 1.14-.31 1.39-1.73 1.39-1.39 0-1.69-.24-1.67-1.31m-3.9 0h.74c.03.49.21.6.99.6.76 0 .93-.12.93-.68 0-.52-.17-.67-.93-.85-1.39-.3-1.69-.56-1.69-1.47 0-1.05.3-1.29 1.67-1.29 1.3 0 1.58.2 1.6 1.13h-.73c-.02-.34-.18-.42-.85-.42-.78 0-.95.1-.95.58 0 .42.17.55.96.73 1.37.3 1.67.58 1.67 1.59 0 1.14-.32 1.39-1.74 1.39-1.38 0-1.68-.24-1.66-1.31m-1.22 0h.75c-.09 1.07-.37 1.31-1.56 1.31-1.37 0-1.68-.45-1.68-2.5 0-1.96.36-2.5 1.68-2.5 1.16 0 1.44.25 1.52 1.35h-.76c-.08-.52-.22-.64-.76-.64-.74 0-.9.33-.9 1.78 0 1.47.16 1.8.9 1.8.58 0 .74-.11.8-.6"/>
|
|
5220
|
-
</symbol>`,
|
|
5277
|
+
</symbol>`,iu=`<symbol id="file-tree-builtin-database" viewBox="0 0 16 16">
|
|
5221
5278
|
<path fill="currentColor" d="M14.953 9.733a12.4 12.4 0 0 1-.244 1.936c-.207.933-.532 1.58-.996 2.044s-1.11.789-2.044.996C10.73 14.918 9.533 15 8 15s-2.73-.082-3.669-.291c-.933-.207-1.58-.532-2.044-.996s-.789-1.11-.996-2.044c-.122-.547-.2-1.182-.244-1.92q.23.364.532.667c.64.639 1.482 1.031 2.533 1.265 1.046.232 2.33.315 3.884.315 1.555 0 2.838-.083 3.884-.315 1.051-.234 1.893-.626 2.532-1.265a4 4 0 0 0 .541-.683"/>
|
|
5222
5279
|
<path fill="currentColor" d="M14.93 5.924c-.046.663-.118 1.24-.23 1.743-.207.932-.532 1.579-.995 2.042s-1.11.789-2.042.996c-.938.209-2.135.291-3.667.291-1.531 0-2.729-.082-3.667-.29-.932-.208-1.579-.534-2.042-.997s-.789-1.11-.996-2.042a12 12 0 0 1-.227-1.683l.016-.188a4 4 0 0 0 .5.62c.638.639 1.48 1.031 2.532 1.265 1.046.232 2.33.315 3.884.315 1.555 0 2.838-.083 3.884-.315 1.051-.234 1.893-.626 2.532-1.265.192-.192.357-.404.506-.633z"/>
|
|
5223
5280
|
<path fill="currentColor" d="M8 1c1.533 0 2.73.082 3.669.291.933.207 1.58.533 2.044.996.403.404.904.944.91 1.695.004.764-.509 1.318-.918 1.727-.463.463-1.11.789-2.042.996-.938.209-2.135.291-3.667.291-1.531 0-2.729-.082-3.667-.29-.932-.208-1.579-.534-2.042-.997-.406-.406-.915-.953-.915-1.71 0-.758.509-1.305.915-1.712.464-.463 1.11-.789 2.044-.996C5.27 1.082 6.467 1 8 1"/>
|
|
5224
|
-
</symbol>`,
|
|
5281
|
+
</symbol>`,au=`<symbol id="file-tree-builtin-default" viewBox="0 0 16 16">
|
|
5225
5282
|
<path fill="currentColor" d="M8 1v3a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1z" class="bg" opacity=".4"/>
|
|
5226
5283
|
<path fill="currentColor" d="M9.5 1a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z" class="fg"/>
|
|
5227
|
-
</symbol>`,
|
|
5284
|
+
</symbol>`,ou=`<symbol id="file-tree-builtin-docker" viewBox="0 0 16 16">
|
|
5228
5285
|
<path fill="currentColor" d="M15.85 6.54c-.05-.04-.45-.36-1.31-.36q-.34 0-.68.06a2.7 2.7 0 0 0-1.14-1.79l-.23-.14-.15.23a3 3 0 0 0-.4 1q-.24 1.01.26 1.84c-.4.24-1.03.3-1.17.3H.5a.5.5 0 0 0-.5.52q-.01 1.46.46 2.83.55 1.5 1.6 2.18c.79.5 2.08.79 3.54.79q.96 0 1.94-.18a8 8 0 0 0 2.55-.97 7 7 0 0 0 1.73-1.5 10 10 0 0 0 1.7-3.06h.15a2.4 2.4 0 0 0 1.8-.7 2 2 0 0 0 .47-.74l.06-.2z"/>
|
|
5229
5286
|
<path fill="currentColor" d="M1.48 7.36h1.4a.14.14 0 0 0 .14-.13V5.91q-.01-.12-.13-.14H1.48a.13.13 0 0 0-.13.14v1.32q.02.13.13.13m1.94 0h1.41a.14.14 0 0 0 .13-.13V5.91q-.01-.12-.13-.14h-1.4a.13.13 0 0 0-.13.14v1.32q0 .13.12.13m1.98 0h1.4q.13 0 .14-.13V5.91a.13.13 0 0 0-.14-.14H5.4q-.1.01-.12.14v1.32q0 .13.12.13m1.95 0h1.42q.1 0 .12-.13V5.91q0-.12-.12-.14H7.35q-.1.01-.12.14v1.32q.01.13.12.13M3.42 5.5h1.41c.07 0 .13-.08.13-.15V4.03a.13.13 0 0 0-.13-.14h-1.4q-.12 0-.13.14v1.31q0 .13.12.15m1.98 0h1.4c.08 0 .14-.08.14-.15V4.03q0-.13-.14-.14H5.4q-.1 0-.12.14v1.31q0 .13.12.15m1.95 0h1.42c.06 0 .12-.08.12-.15V4.03q-.01-.13-.12-.14H7.35q-.1 0-.12.14v1.31q.01.13.12.15m0-1.9h1.42q.1-.02.12-.14v-1.3Q8.88 2 8.77 2H7.35q-.1 0-.12.14v1.3q.01.13.12.14m1.97 3.78h1.4a.13.13 0 0 0 .14-.13V5.91q-.01-.12-.13-.14H9.32q-.1.01-.12.14v1.32q.01.13.12.13" opacity=".5"/>
|
|
5230
|
-
</symbol>`,
|
|
5287
|
+
</symbol>`,su=`<symbol id="file-tree-builtin-eslint" viewBox="0 0 16 16">
|
|
5231
5288
|
<path fill="currentColor" d="M11.16 6.1 8.12 4.35a.3.3 0 0 0-.24 0L4.84 6.1a.3.3 0 0 0-.12.2v3.5q0 .14.12.22l3.04 1.74q.12.08.24 0l3.04-1.74a.2.2 0 0 0 .13-.22V6.3a.3.3 0 0 0-.13-.2" opacity=".5"/>
|
|
5232
5289
|
<path fill="currentColor" d="m.1 7.69 3.63-6.3A.8.8 0 0 1 4.37 1h7.26c.26 0 .5.17.64.4l3.63 6.27a.8.8 0 0 1 0 .75l-3.63 6.24a.7.7 0 0 1-.64.34H4.37a.7.7 0 0 1-.64-.34L.1 8.41a.7.7 0 0 1 0-.72m3 3.02q.01.15.14.23l4.63 2.66q.13.06.26 0l4.63-2.66a.3.3 0 0 0 .14-.23V5.4a.3.3 0 0 0-.14-.23L8.13 2.52a.3.3 0 0 0-.26 0L3.24 5.17a.3.3 0 0 0-.14.23z"/>
|
|
5233
|
-
</symbol>`,
|
|
5290
|
+
</symbol>`,cu=`<symbol id="file-tree-builtin-font" viewBox="0 0 16 16">
|
|
5234
5291
|
<path fill="currentColor" d="M12.3 13c-1.59 0-2.68-.99-2.68-2.5 0-1.43 1-2.34 2.88-2.35h2.16v-.83c0-1.08-.62-1.68-1.73-1.68-1.05 0-1.66.54-1.73 1.36H9.93c.09-1.43 1.06-2.48 3.05-2.48 1.75 0 3.02.95 3.02 2.68v5.66h-1.29v-1.02h-.04c-.41.66-1.16 1.16-2.37 1.16m.36-1.12c1.14 0 2-.72 2-1.74v-.96H12.6c-1.12 0-1.6.54-1.6 1.28 0 .97.8 1.42 1.66 1.42m-11.24.98H0L3.8 2h1.39l3.8 10.86H7.54l-1.08-3.2H2.5zm3.09-9.25h-.04l-1.6 4.95H6.1z"/>
|
|
5235
|
-
</symbol>`,
|
|
5292
|
+
</symbol>`,lu=`<symbol id="file-tree-builtin-git" viewBox="0 0 16 16">
|
|
5236
5293
|
<path fill="currentColor" d="M14.74 7.38 8.62 1.26a.9.9 0 0 0-1.27 0L6.08 2.53l1.61 1.61a1.07 1.07 0 0 1 1.36 1.37l1.55 1.55a1.07 1.07 0 0 1 1.1 1.77 1.07 1.07 0 0 1-1.74-1.16L8.5 6.22v3.8a1.07 1.07 0 1 1-.89-.02V6.15a1.07 1.07 0 0 1-.58-1.4l-1.58-1.6-4.2 4.2a.9.9 0 0 0 0 1.27l6.12 6.12a.9.9 0 0 0 1.27 0l6.09-6.09a.9.9 0 0 0 0-1.27"/>
|
|
5237
|
-
</symbol>`,
|
|
5294
|
+
</symbol>`,uu=`<symbol id="file-tree-builtin-go" viewBox="0 0 16 16">
|
|
5238
5295
|
<path fill="currentColor" fill-rule="evenodd" d="M4.41 4.57A3.2 3.2 0 0 1 6.87 5q.74.49 1.08 1.29.08.12-.1.16l-1.55.4c-.14.03-.15.04-.27-.1a1 1 0 0 0-.44-.34 1.6 1.6 0 0 0-1.68.14q-.95.61-.94 1.73c0 .73.52 1.33 1.25 1.43q.95.1 1.58-.6l.25-.34h-1.8c-.19 0-.24-.12-.17-.27.12-.28.34-.76.47-1a.3.3 0 0 1 .24-.14h2.98a4 4 0 0 1 .64-1.19 4 4 0 0 1 2.6-1.52 3.5 3.5 0 0 1 2.64.46q1.13.73 1.31 2.04a3.5 3.5 0 0 1-1.06 3.09q-.93.92-2.23 1.17l-.74.08a3.5 3.5 0 0 1-2.27-.8 3 3 0 0 1-.93-1.42 4 4 0 0 1-.39.61 4 4 0 0 1-2.64 1.56 3.3 3.3 0 0 1-2.5-.6 3 3 0 0 1-1.18-2.03 3.5 3.5 0 0 1 .8-2.67 4 4 0 0 1 2.6-1.58M13.1 7.5a1.53 1.53 0 0 0-1.9-1.21q-1.3.3-1.62 1.59a1.5 1.5 0 0 0 .85 1.72q.77.33 1.52-.05a2 2 0 0 0 1.18-1.74q0-.17-.03-.3" clip-rule="evenodd"/>
|
|
5239
|
-
</symbol>`,
|
|
5296
|
+
</symbol>`,du=`<symbol id="file-tree-builtin-graphql" viewBox="0 0 16 16">
|
|
5240
5297
|
<path fill="currentColor" fill-rule="evenodd" d="M8 1a1.25 1.25 0 0 1 1.18 1.65l2.8 1.61q.33-.25.77-.26a1.25 1.25 0 0 1 .48 2.4v3.2a1.25 1.25 0 1 1-1.25 2.13l-2.8 1.62A1.25 1.25 0 0 1 8 15a1.25 1.25 0 0 1-1.18-1.65l-2.8-1.62q-.33.26-.77.27a1.25 1.25 0 0 1-.48-2.4V6.4a1.25 1.25 0 1 1 1.25-2.14l2.8-1.61A1.25 1.25 0 0 1 8 1M4.44 11.14l-.06.13 2.75 1.58a1.25 1.25 0 0 1 1.74 0l2.74-1.58-.05-.13zm3.89-7.68a1.3 1.3 0 0 1-.66 0L4.03 9.77q.37.3.45.78h7.04q.08-.48.45-.78zM4.38 4.73a1.24 1.24 0 0 1-1.02 1.76v3.02l.13.01 3.67-6.35-.03-.02zm4.46-1.56 3.67 6.35.13-.01V6.49a1.25 1.25 0 0 1-1.03-1.76L8.87 3.15z" clip-rule="evenodd"/>
|
|
5241
|
-
</symbol>`,
|
|
5298
|
+
</symbol>`,fu=`<symbol id="file-tree-builtin-html" viewBox="0 0 16 16">
|
|
5242
5299
|
<path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
|
|
5243
5300
|
<path fill="currentColor" d="M10.48 3.76a.5.5 0 0 1 .4.58L10.6 5.8h1.14a.5.5 0 0 1 0 1h-1.32L10 9.2h1.08a.5.5 0 0 1 0 1H9.8l-.3 1.64a.5.5 0 1 1-.98-.18l.27-1.46H6.4l-.3 1.64a.5.5 0 1 1-.98-.18l.27-1.46H4.25a.5.5 0 0 1 0-1h1.32L6 6.8H4.93a.5.5 0 0 1 0-1H6.2l.3-1.64a.5.5 0 1 1 .98.18L7.2 5.8h2.4l.3-1.64a.5.5 0 0 1 .58-.4M6.58 9.2h2.4l.44-2.4h-2.4z" class="fg"/>
|
|
5244
|
-
</symbol>`,
|
|
5301
|
+
</symbol>`,pu=`<symbol id="file-tree-builtin-image" viewBox="0 0 16 16">
|
|
5245
5302
|
<path fill="currentColor" d="M12.5 2A2.5 2.5 0 0 1 15 4.5v4.67l-4.05-3.54-4.08 4.08-3-2L1 10.6V4.5A2.5 2.5 0 0 1 3.5 2z" opacity=".3"/>
|
|
5246
5303
|
<path fill="currentColor" d="M15 10.5v1a2.5 2.5 0 0 1-2.5 2.5h-9a2.5 2.5 0 0 1-2.46-2.04L4 9l3 2 4-4zm-7-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"/>
|
|
5247
|
-
</symbol>`,
|
|
5304
|
+
</symbol>`,mu=`<symbol id="file-tree-builtin-javascript" viewBox="0 0 16 16">
|
|
5248
5305
|
<path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
|
|
5249
5306
|
<path fill="currentColor" d="M8.1 9.64h.95c.04.62.28.76 1.28.76s1.2-.14 1.2-.85c0-.66-.2-.85-1.2-1.07-1.79-.38-2.18-.7-2.18-1.86C8.15 5.3 8.54 5 10.31 5c1.67 0 2.04.26 2.07 1.42h-.95c-.02-.43-.23-.53-1.1-.53-1 0-1.22.14-1.22.74 0 .52.22.7 1.24.92 1.76.38 2.15.73 2.15 2 0 1.44-.4 1.75-2.24 1.75-1.8 0-2.18-.3-2.15-1.66M3.5 9.5h.98c0 .76.15.92.85.92.77 0 .94-.18.94-1.02V5.1h1v4.34c0 1.54-.35 1.87-1.92 1.87-1.55 0-1.89-.32-1.86-1.8"/>
|
|
5250
|
-
</symbol>`,
|
|
5307
|
+
</symbol>`,hu=`<symbol id="file-tree-builtin-json" viewBox="0 0 16 16">
|
|
5251
5308
|
<path fill="currentColor" d="M13.25 11.5V9.75a.5.5 0 0 1 .36-.48l.55-.15a1.16 1.16 0 0 0 0-2.24l-.55-.15a.5.5 0 0 1-.36-.48V4.5a2.5 2.5 0 0 0-2.5-2.5h-.25a.5.5 0 0 0 0 1h.25a1.5 1.5 0 0 1 1.5 1.5v1.75a1.5 1.5 0 0 0 1.09 1.44l.54.15a.16.16 0 0 1 0 .32l-.54.15a1.5 1.5 0 0 0-1.09 1.44v1.75a1.5 1.5 0 0 1-1.5 1.5h-.25a.5.5 0 0 0 0 1h.25a2.5 2.5 0 0 0 2.5-2.5m-10.5 0V9.75a.5.5 0 0 0-.36-.48l-.55-.15a1.16 1.16 0 0 1 0-2.24l.55-.15a.5.5 0 0 0 .36-.48V4.5A2.5 2.5 0 0 1 5.25 2h.25a.5.5 0 0 1 0 1h-.25a1.5 1.5 0 0 0-1.5 1.5v1.75a1.5 1.5 0 0 1-1.09 1.44l-.54.15a.16.16 0 0 0 0 .32l.54.15a1.5 1.5 0 0 1 1.09 1.45v1.74a1.5 1.5 0 0 0 1.5 1.5h.25a.5.5 0 0 1 0 1h-.25a2.5 2.5 0 0 1-2.5-2.5"/>
|
|
5252
|
-
</symbol>`,
|
|
5309
|
+
</symbol>`,gu=`<symbol id="file-tree-builtin-markdown" viewBox="0 0 16 16">
|
|
5253
5310
|
<path fill="currentColor" d="M1 12V4h2l2 2.5L7 4h2v8H7V7.5l-2 2-2-2V12zm9-3 3 3.5L16 9h-2V4h-2v5z"/>
|
|
5254
|
-
</symbol
|
|
5311
|
+
</symbol>`,_u=`<symbol id="file-tree-builtin-mcp" viewBox="0 0 16 16">
|
|
5255
5312
|
<path fill="currentColor" d="M9.26-.04a3 3 0 0 1 2 .82 2.8 2.8 0 0 1 .8 2.35 2.9 2.9 0 0 1 2.41.8l.03.02a2.74 2.74 0 0 1 0 3.94l-5.8 5.69-.04.06-.02.07q0 .04.02.07.01.04.04.06l1.2 1.17a.55.55 0 0 1 0 .79.6.6 0 0 1-.81 0l-1.2-1.17a1.3 1.3 0 0 1 0-1.84L13.7 7.1a1.65 1.65 0 0 0 .37-1.82 2 2 0 0 0-.37-.54l-.03-.03a1.73 1.73 0 0 0-2.4 0L6.47 9.4l-.07.06a.58.58 0 0 1-.92-.18.6.6 0 0 1 .12-.6l4.85-4.76a1.65 1.65 0 0 0 0-2.36 1.73 1.73 0 0 0-2.4 0l-6.43 6.3a.6.6 0 0 1-.8 0 .55.55 0 0 1 0-.8L7.25.79a3 3 0 0 1 2-.82"/>
|
|
5256
5313
|
<path fill="currentColor" d="M9.26 2.19a.6.6 0 0 1 .52.34.6.6 0 0 1 0 .43l-.12.18L4.9 7.79a1.65 1.65 0 0 0 0 2.36 1.73 1.73 0 0 0 2.4 0l4.75-4.66a.58.58 0 0 1 .93.18.6.6 0 0 1-.12.61l-4.75 4.66a2.9 2.9 0 0 1-4.01 0 2.75 2.75 0 0 1-.62-3.04A3 3 0 0 1 4.1 7l4.74-4.65a.6.6 0 0 1 .4-.16"/>
|
|
5257
|
-
</symbol>`,
|
|
5314
|
+
</symbol>`,vu=`<symbol id="file-tree-builtin-nextjs" viewBox="0 0 16 16">
|
|
5258
5315
|
<defs>
|
|
5259
5316
|
<linearGradient id="a" x1="4.522" x2="14" y1="3.943" y2="16" gradientUnits="userSpaceOnUse">
|
|
5260
5317
|
<stop stop-color="currentColor"/>
|
|
@@ -5264,82 +5321,82 @@ slicc-dock-tree .dock-tree__preview--active {
|
|
|
5264
5321
|
<path fill="currentColor" d="M3 2h1.522v9.09H3z"/>
|
|
5265
5322
|
<path fill="url(#a)" d="M4.903 2 15 15.075q-.565.5-1.195.925L4.522 3.943z"/>
|
|
5266
5323
|
<path fill="currentColor" d="M12.172 2h-1.508v9.094h1.508z"/>
|
|
5267
|
-
</symbol>`,
|
|
5324
|
+
</symbol>`,yu=`<symbol id="file-tree-builtin-npm" viewBox="0 0 16 16">
|
|
5268
5325
|
<path fill="currentColor" d="M2 1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1z" class="vector" opacity=".2"/>
|
|
5269
5326
|
<path fill="currentColor" d="M10.5 13H13V3H3v10h5V5.5h2.5z"/>
|
|
5270
|
-
</symbol>`,
|
|
5327
|
+
</symbol>`,bu=`<symbol id="file-tree-builtin-oxc" viewBox="0 0 16 16">
|
|
5271
5328
|
<path fill="currentColor" d="M9.5 1a.5.5 0 0 1 .5.5V3h3.5a.5.5 0 0 1 .38.83L10.5 7.69v1.44q.41.04.95-.16a4 4 0 0 0 .72-.35l.04-.03h.01a.5.5 0 0 1 .67.1l2 2.5a.5.5 0 0 1 0 .62c-.76.96-3.14 2.69-6.89 2.69s-6.13-1.73-6.89-2.69a.5.5 0 0 1 0-.62l2-2.5a.5.5 0 0 1 .67-.1l.05.03.16.09q.22.13.56.26.54.2.95.16V7.69L2.12 3.83A.5.5 0 0 1 2.5 3H6V1.5a.5.5 0 0 1 .5-.5zM7 3.5a.5.5 0 0 1-.5.5H3.6l2.78 3.17a.5.5 0 0 1 .12.33v2a.5.5 0 0 1-.28.45c-.7.35-1.5.15-2.02-.05a5 5 0 0 1-.58-.26l-1.46 1.84c.82.78 2.8 2.02 5.84 2.02s5.02-1.24 5.84-2.02l-1.46-1.83a5 5 0 0 1-.58.26c-.52.2-1.33.39-2.02.04a.5.5 0 0 1-.28-.45v-2a.5.5 0 0 1 .12-.33L12.4 4H9.5a.5.5 0 0 1-.5-.5V2H7z"/>
|
|
5272
|
-
</symbol>`,
|
|
5329
|
+
</symbol>`,xu=`<symbol id="file-tree-builtin-postcss" viewBox="0 0 16 16">
|
|
5273
5330
|
<path fill="currentColor" d="M14.5 8a6.5 6.5 0 0 0-5.9-6.47l5.42 8.93A7 7 0 0 0 14.5 8M2.88 12A6.5 6.5 0 0 0 8 14.5c2.08 0 3.93-.98 5.12-2.5zm8.62-1h1.68L11.5 8.24zm-1-.55a4 4 0 0 1-.7.55h.7zM8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M5.5 11h.7a4 4 0 0 1-.7-.55zm-2.68 0H4.5V8.24zm3.76-6.2A4 4 0 0 1 8 4.5q.76 0 1.42.3L8 2.46zM1.5 8q0 1.31.48 2.46L7.4 1.53A6.5 6.5 0 0 0 1.5 8m14 0a7.5 7.5 0 0 1-.99 3.72l-.01.03-.02.03A7.5 7.5 0 0 1 8 15.5a7.5 7.5 0 0 1-6.5-3.75l-.01-.03A7.5 7.5 0 1 1 15.5 8"/>
|
|
5274
|
-
</symbol>`,
|
|
5331
|
+
</symbol>`,Su=`<symbol id="file-tree-builtin-prettier" viewBox="0 0 16 16">
|
|
5275
5332
|
<path fill="currentColor" d="M6 12v1H4.93v-1zm1-2v1H2v-1zm6-4v1h-3V6zm-1-4v1H9V2z"/>
|
|
5276
5333
|
<path fill="currentColor" d="M11.5 10v1H8v-1zM5 6v1H2V6zm5-2v1H9V4z" opacity=".8"/>
|
|
5277
5334
|
<path fill="currentColor" d="M6 14v1H2v-1zm-.5-6v1H2V8zM13 4v1h-3V4zM4.93 2v1H2V2z" opacity=".6"/>
|
|
5278
5335
|
<path fill="currentColor" d="M4.93 12v1H2v-1zM13 8v1H9V8zM5.5 4v1H2V4zM9 2v1H4.93V2z" opacity=".4"/>
|
|
5279
|
-
</symbol>`,
|
|
5336
|
+
</symbol>`,Cu=`<symbol id="file-tree-builtin-python" viewBox="0 0 16 16">
|
|
5280
5337
|
<path fill="currentColor" d="M8.33 8.4H10c1.16 0 1.9-.73 1.9-1.86V5.08q0-.24.25-.24h.74c.75 0 1.33.32 1.66.97q.4.73.41 1.46c.09.9.09 1.78-.24 2.67-.25.73-.75 1.3-1.58 1.46h-4.8c-.08 0-.25 0-.25.08v.4s.17.09.25.09h2.82q.34-.02.33.32v1.06c0 .56-.25.97-.75 1.13-.41.16-.83.33-1.24.4a7 7 0 0 1-2.98-.07 3 3 0 0 1-1.16-.49c-.33-.32-.58-.65-.5-1.14v-2.91c0-1.13.67-1.78 1.82-1.78q.89-.1 1.66-.08m2.32 4.86a.65.65 0 0 0-.66-.65c-.34 0-.67.33-.67.65s.33.57.67.65a.65.65 0 0 0 .66-.65" class="bg" opacity=".8"/>
|
|
5281
5338
|
<path fill="currentColor" d="M7.67 7.6H6c-1.16 0-1.9.73-1.9 1.86v1.46q0 .24-.25.24h-.74c-.75 0-1.33-.32-1.66-.97a3 3 0 0 1-.41-1.46 6 6 0 0 1 .24-2.67c.25-.73.75-1.3 1.58-1.46h4.8c.08 0 .25 0 .25-.08v-.4s-.17-.09-.25-.09H4.85c-.24 0-.33-.08-.33-.32V2.65c0-.56.25-.97.75-1.13.41-.16.83-.33 1.24-.4a7 7 0 0 1 2.98.07c.41.09.83.25 1.16.49.33.32.58.65.5 1.13v2.92c0 1.14-.67 1.78-1.82 1.78-.58.08-1.16.08-1.66.08M5.35 2.73c0 .33.25.65.66.65.33 0 .66-.32.66-.65 0-.32-.33-.56-.66-.64a.65.65 0 0 0-.66.64" class="fg"/>
|
|
5282
|
-
</symbol>`,
|
|
5339
|
+
</symbol>`,wu=`<symbol id="file-tree-builtin-react" viewBox="0 0 16 16">
|
|
5283
5340
|
<path fill="currentColor" d="M8 6.65c.73 0 1.31.6 1.31 1.35S8.73 9.35 8 9.35 6.69 8.75 6.69 8 7.27 6.65 8 6.65"/>
|
|
5284
5341
|
<path fill="currentColor" fill-rule="evenodd" d="M8 2.55c1.3-.99 2.59-1.34 3.5-.8.92.55 1.27 1.87 1.08 3.53C14.06 5.94 15 6.9 15 8s-.94 2.06-2.42 2.72c.19 1.65-.16 2.98-1.08 3.52-.91.55-2.2.2-3.5-.8-1.3 1-2.58 1.35-3.5.8-.91-.54-1.27-1.87-1.08-3.52C1.94 10.06 1 9.1 1 8s.94-2.06 2.42-2.72c-.19-1.66.17-2.98 1.08-3.52s2.2-.2 3.5.8M4.26 11.2c-.08 1.34.28 2.03.68 2.26s1.15.22 2.25-.52l.11-.09a12 12 0 0 1-1.24-1.39 11 11 0 0 1-1.8-.41zm7.47-.15q-.83.27-1.79.41-.6.8-1.24 1.4l.11.08c1.1.74 1.86.76 2.25.52.4-.23.76-.92.68-2.26zm-3.04.54a14 14 0 0 1-1.38 0q.34.38.69.7.35-.32.7-.7M8 5.29q-.76 0-1.47.1A13 13 0 0 0 5.07 8a14 14 0 0 0 1.46 2.62 13 13 0 0 0 2.94 0A13 13 0 0 0 10.93 8a14 14 0 0 0-1.46-2.62A13 13 0 0 0 8 5.3M4.64 9.18q-.15.5-.25.96.44.16.94.27a15 15 0 0 1-.7-1.23m6.73 0a15 15 0 0 1-.7 1.23q.5-.11.95-.27a10 10 0 0 0-.25-.96M3.44 6.26C2.27 6.86 1.87 7.53 1.87 8s.4 1.14 1.57 1.74l.13.07q.18-.88.55-1.81a12 12 0 0 1-.55-1.8q-.07.02-.13.06m8.99-.07A12 12 0 0 1 11.88 8q.36.94.55 1.8l.13-.06c1.17-.6 1.56-1.27 1.56-1.74s-.39-1.14-1.56-1.74zm-7.1-.6q-.5.11-.94.27.1.46.25.96a15 15 0 0 1 .69-1.23m5.34 0a15 15 0 0 1 .7 1.23q.14-.5.24-.96-.44-.15-.94-.27M7.18 3.06c-1.09-.74-1.85-.76-2.24-.52s-.76.92-.69 2.26l.01.15a11 11 0 0 1 1.8-.41q.6-.8 1.24-1.4zm3.88-.52c-.4-.24-1.15-.22-2.25.52l-.12.08q.65.6 1.25 1.4.96.15 1.8.41v-.14c.08-1.35-.28-2.04-.68-2.27M8 3.7a10 10 0 0 0-.7.7 14 14 0 0 1 1.4 0 10 10 0 0 0-.7-.7" clip-rule="evenodd"/>
|
|
5285
|
-
</symbol>`,
|
|
5342
|
+
</symbol>`,Tu=`<symbol id="file-tree-builtin-ruby" viewBox="0 0 16 16">
|
|
5286
5343
|
<path fill="currentColor" fill-rule="evenodd" d="M11.04 2c.48 0 .92.23 1.18.6l2.54 3.65c.37.52.3 1.23-.15 1.69l-5.58 5.64a1.47 1.47 0 0 1-2.06 0L1.39 7.94a1.3 1.3 0 0 1-.15-1.7l2.54-3.63q.2-.3.5-.45.33-.16.68-.16zm.84 2.17a.5.5 0 0 0-.7-.05L8 6.84 4.83 4.12a.5.5 0 0 0-.65.76L6.65 7H3.5a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1H9.35l2.48-2.12a.5.5 0 0 0 .05-.7" clip-rule="evenodd"/>
|
|
5287
|
-
</symbol>`,
|
|
5344
|
+
</symbol>`,Eu=`<symbol id="file-tree-builtin-rust" viewBox="0 0 16 16">
|
|
5288
5345
|
<path fill="currentColor" fill-rule="evenodd" d="M8 .8a.2.2 0 0 1 .18.1l.38.6.16.02.5-.53.01-.01a.2.2 0 0 1 .33.08l.25.68.16.05.59-.43h.02a.2.2 0 0 1 .3.14l.12.71.15.08.65-.3a.2.2 0 0 1 .2.02.2.2 0 0 1 .1.18l-.03.72.12.1.71-.16a.2.2 0 0 1 .25.25l-.17.7q.06.06.1.13l.73-.03A.2.2 0 0 1 14 4a.2.2 0 0 1 .02.2l-.3.66.08.14.71.12a.2.2 0 0 1 .14.32l-.43.59.05.16.68.25a.2.2 0 0 1 .07.35l-.53.49.01.16.62.38a.2.2 0 0 1 0 .36l-.62.38-.01.16.53.5a.2.2 0 0 1-.07.34l-.68.25-.05.16.43.59a.2.2 0 0 1-.14.32l-.72.12-.07.15.3.65a.2.2 0 0 1-.02.2.2.2 0 0 1-.18.1l-.72-.03-.1.13.16.7a.2.2 0 0 1-.25.25l-.7-.17-.13.1.03.73a.2.2 0 0 1-.1.18.2.2 0 0 1-.2.02l-.66-.3-.14.08-.12.71a.2.2 0 0 1-.32.14l-.59-.43-.16.05-.25.68a.2.2 0 0 1-.34.07l-.5-.53-.16.01-.38.62a.2.2 0 0 1-.36 0l-.38-.62-.16-.01-.5.53a.2.2 0 0 1-.34-.07l-.25-.68-.16-.05-.59.43a.2.2 0 0 1-.32-.14L5 13.78l-.15-.07-.65.3a.2.2 0 0 1-.2-.02.2.2 0 0 1-.1-.18l.03-.72-.13-.1-.7.16a.2.2 0 0 1-.25-.25l.17-.7-.1-.13-.73.03a.2.2 0 0 1-.2-.3l.3-.66-.08-.14-.71-.12a.2.2 0 0 1-.14-.32l.43-.59-.05-.16-.68-.25A.2.2 0 0 1 1 9.22l.53-.5-.02-.16-.6-.38A.2.2 0 0 1 .8 8a.2.2 0 0 1 .1-.18l.6-.38.02-.16-.53-.5a.2.2 0 0 1 .07-.34l.68-.25.05-.16-.43-.59a.2.2 0 0 1 .14-.32L2.2 5l.08-.15L2 4.2a.2.2 0 0 1 .2-.3l.72.03.1-.13-.16-.7a.2.2 0 0 1 .25-.25l.7.16.13-.1-.03-.72A.2.2 0 0 1 4 2a.2.2 0 0 1 .2-.02l.65.3L5 2.2l.12-.71v-.03a.2.2 0 0 1 .32-.1l.59.41.16-.04.25-.68.01-.02A.2.2 0 0 1 6.8.99l.49.53.16-.02.38-.61.02-.02A.2.2 0 0 1 8 .79M6.8 9.45h1.26l.06.01q.03.01.03.05v1.52q0 .07-.09.06h-4.5A5.4 5.4 0 0 0 8 13.42a5.4 5.4 0 0 0 4.45-2.33h-2.42c-.36 0-.68-.5-.77-.75-.08-.22-.2-.91-.25-1.12-.15-.61-.59-.71-.78-.73H6.8zM8 2.58a5.4 5.4 0 0 0-4.07 1.85h5.74l.17.02c.23.03.6.12.96.35.34.23.83.68.83 1.4 0 .66-.55 1.16-1.08 1.5.42.33.7.53.86 1.44.04.17.34.32.62.29.29-.03.62-.16.62-.75v-.24q0-.1.07-.1h.68A5.43 5.43 0 0 0 8 2.59M2.96 6.03a5.4 5.4 0 0 0-.19 3.37h1.66V6.03zM6.8 7.06h1.66c.35 0 .77-.12.77-.47 0-.42-.55-.53-.65-.53H6.8z" clip-rule="evenodd"/>
|
|
5289
|
-
</symbol>`,
|
|
5346
|
+
</symbol>`,Du=`<symbol id="file-tree-builtin-sass" viewBox="0 0 16 16">
|
|
5290
5347
|
<path fill="currentColor" fill-rule="evenodd" d="M8.08 1.44c2.41-.91 4.96-.37 5.35 1.27.39 1.62-.92 3.56-2.6 4.25a5 5 0 0 1-3.26.35c-.58-.2-.92-.62-1-.85-.03-.09-.09-.24 0-.3.05-.03.08-.02.22.15s.7.6 1.75.48c2.78-.34 4.45-2.64 3.92-3.88-.37-.87-2.5-1.26-5.18.16C4.03 4.81 3.85 6.24 3.82 6.8c-.08 1.5 1.73 2.28 2.7 3.4q.04.03.07.08c.3-.12.7-.19 1.35-.2 1.58-.03 2.47 1.08 2.43 2.08-.03.78-.7 1.1-.82 1.13-.1.01-.14.02-.15-.06q-.03-.06.13-.15c.16-.09.42-.3.48-.72.05-.43-.24-1.44-1.76-1.63a3 3 0 0 0-1.33.08c.27.62.32 1.87-.29 2.83-.63 1-1.8 1.61-2.93 1.27-.37-.1-.93-.92-.45-2.05.46-1.07 2.4-2.12 2.66-2.26-.9-.83-3.08-1.95-3.4-3.65-.08-.49.13-1.65 1.46-2.98a12 12 0 0 1 4.11-2.52m-1.88 9.7c-.01.01-.9.47-1.52 1.17-.59.66-.75 1.48-.43 1.69.3.18 1-.04 1.51-.62a3 3 0 0 0 .5-.9q.2-.64.02-1.39z" clip-rule="evenodd"/>
|
|
5291
|
-
</symbol>`,
|
|
5348
|
+
</symbol>`,Ou=`<symbol id="file-tree-builtin-stylelint" viewBox="0 0 16 16">
|
|
5292
5349
|
<path fill="currentColor" d="M4 3v3.5l1.5-1L7 15 .5 6l1-1.5L0 3l2.5-2h1zm12 0-1.5 1.5 1 1.5L9 15l1.5-9.5 1.5 1V3l.5-2h1zm-8 8.5a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1m0-3a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1m0-3a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1"/>
|
|
5293
5350
|
<path fill="currentColor" d="M6.5 2.5V4l-2 1.5v-4zm5 3L9.5 4V2.5l2-1zM9 4H7V2.5h2z"/>
|
|
5294
|
-
</symbol>`,
|
|
5351
|
+
</symbol>`,ku=`<symbol id="file-tree-builtin-svelte" viewBox="0 0 16 16">
|
|
5295
5352
|
<path fill="currentColor" d="m3.98 3.7 3.36-2.08a4.5 4.5 0 0 1 5.9 1.23 4 4 0 0 1 .7 3.02q-.16.75-.58 1.4c.42.77.56 1.66.4 2.52a3.7 3.7 0 0 1-1.57 2.4l-.17.1-3.36 2.09a4.5 4.5 0 0 1-5.9-1.23 4 4 0 0 1-.66-1.44 4 4 0 0 1-.04-1.58 4 4 0 0 1 .58-1.4 4 4 0 0 1-.4-2.52 3.7 3.7 0 0 1 1.57-2.4zl3.36-2.08zm7.87 0a2.7 2.7 0 0 0-1.26-.95 2.7 2.7 0 0 0-1.6-.07 3 3 0 0 0-.52.2l-.16.09-3.36 2.08a2 2 0 0 0-.69.64 2 2 0 0 0-.36.86 2.3 2.3 0 0 0 .42 1.81A2.7 2.7 0 0 0 7.18 9.4q.28-.06.53-.2l.16-.09 1.28-.79.2-.09a.8.8 0 0 1 .87.31.7.7 0 0 1 .13.55.7.7 0 0 1-.24.4l-.08.05-3.36 2.08-.2.09a1 1 0 0 1-.49-.02 1 1 0 0 1-.38-.3 1 1 0 0 1-.13-.37v-.1l.01-.13-.13-.03a4 4 0 0 1-1.1-.5l-.2-.14-.18-.12-.07.18-.08.3a2.3 2.3 0 0 0 .43 1.82q.45.64 1.19.93.73.28 1.51.14l.16-.04q.27-.07.52-.2l.16-.09 3.36-2.08q.4-.25.69-.64.27-.4.36-.86a2.3 2.3 0 0 0-.42-1.82 2.7 2.7 0 0 0-1.27-.95 2.7 2.7 0 0 0-1.6-.08q-.27.07-.52.2l-.16.1-1.28.79-.2.09a1 1 0 0 1-.49-.03 1 1 0 0 1-.38-.29.7.7 0 0 1-.13-.54.7.7 0 0 1 .24-.4l.08-.06L9.33 4.4l.2-.1a.8.8 0 0 1 .87.32 1 1 0 0 1 .13.38v.22l.11.04q.6.18 1.12.5l.2.14.17.12.06-.19.08-.3a2.3 2.3 0 0 0-.42-1.81z"/>
|
|
5296
|
-
</symbol>`,
|
|
5353
|
+
</symbol>`,Au=`<symbol id="file-tree-builtin-svg" viewBox="0 0 16 16">
|
|
5297
5354
|
<path fill="currentColor" d="M5 7a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2z"/>
|
|
5298
5355
|
<path fill="currentColor" d="M6 1a5 5 0 0 1 4.58 3H7a3 3 0 0 0-3 3v3.58A5 5 0 0 1 6 1" opacity=".5"/>
|
|
5299
|
-
</symbol>`,
|
|
5356
|
+
</symbol>`,ju=`<symbol id="file-tree-builtin-svgo" viewBox="0 0 16 16">
|
|
5300
5357
|
<path fill="currentColor" d="M9.43 4.8A.6.6 0 1 1 9.19 6l-.56.96a1.2 1.2 0 0 1 .32 1.58l.7.53a.89.89 0 1 1-.17.22l-.7-.52a1.2 1.2 0 0 1-1.4.25l-.56.87a.75.75 0 1 1-.57-.2 1 1 0 0 1 .32.05l.56-.87a1.2 1.2 0 0 1-.4-1.24l-1.2-.47a.56.56 0 1 1 .1-.28v.02l1.2.47a1.2 1.2 0 0 1 1.56-.55l.56-.97a.6.6 0 0 1-.15-.64.6.6 0 0 1 .63-.4"/>
|
|
5301
5358
|
<path fill="currentColor" fill-rule="evenodd" d="M9.17 1q.16.63.27 1.26a6 6 0 0 1 1.61.67q.52-.38 1.08-.71l1.65 1.64q-.32.56-.68 1.05.48.78.72 1.67.6.09 1.18.25v2.32q-.55.15-1.11.24a6 6 0 0 1-.7 1.82q.31.44.59.91l-1.65 1.65-.85-.55a6 6 0 0 1-1.9.83q-.08.47-.2.95H6.84q-.12-.46-.2-.93a6 6 0 0 1-1.96-.81q-.39.27-.8.51l-1.65-1.65q.25-.43.53-.84a6 6 0 0 1-.75-1.9L1 9.16V6.83q.54-.14 1.09-.24a6 6 0 0 1 .77-1.74q-.33-.47-.63-.98l1.65-1.65q.54.32 1.03.68a6 6 0 0 1 1.66-.66q.1-.61.26-1.24zM7.96 3.73a4 4 0 0 0-1.74.36 4.5 4.5 0 0 0-2.3 2.3 4.4 4.4 0 0 0-.1 3.29l.03.06a4.4 4.4 0 0 0 2.4 2.47 4.4 4.4 0 0 0 3.48-.02l.03-.02a4.4 4.4 0 0 0 2.3-2.42l.06-.14a4.4 4.4 0 0 0-.2-3.4 4.4 4.4 0 0 0-2.13-2.07L9.47 4a4 4 0 0 0-1.51-.27" clip-rule="evenodd"/>
|
|
5302
|
-
</symbol>`,
|
|
5359
|
+
</symbol>`,Mu=`<symbol id="file-tree-builtin-swift" viewBox="0 0 16 16">
|
|
5303
5360
|
<path fill="currentColor" d="M9.63 1c6.15 4.35 4.16 9.15 4.16 9.15s1.75 2.05 1.04 3.85c0 0-.72-1.26-1.93-1.26-1.17 0-1.85 1.26-4.2 1.26C3.47 14 1 9.46 1 9.46c4.71 3.22 7.93.94 7.93.94C6.8 9.12 2.29 3 2.29 3c3.93 3.47 5.63 4.39 5.63 4.39-1.01-.87-3.86-5.13-3.86-5.13C6.34 4.66 10.86 8 10.86 8c1.28-3.7-1.23-7-1.23-7"/>
|
|
5304
|
-
</symbol>`,
|
|
5361
|
+
</symbol>`,Nu=`<symbol id="file-tree-builtin-table" viewBox="0 0 16 16">
|
|
5305
5362
|
<path fill="currentColor" d="M8 4a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1H8z" class="bg" opacity=".4"/>
|
|
5306
5363
|
<path fill="currentColor" d="M11.5 8a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-7a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5zM5 12h2.5v-1H5zm3.5 0H11v-1H8.5zM5 10h2.5V9H5zm3.5 0H11V9H8.5zm1-9a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z" class="fg"/>
|
|
5307
|
-
</symbol>`,
|
|
5364
|
+
</symbol>`,Pu=`<symbol id="file-tree-builtin-tailwind" viewBox="0 0 16 16">
|
|
5308
5365
|
<path fill="currentColor" fill-rule="evenodd" d="M8 4Q5.2 4 4.5 6.67q1.05-1.34 2.45-1c.53.12.91.5 1.33.9C8.98 7.23 9.77 8 11.5 8q2.8 0 3.5-2.67-1.05 1.34-2.45 1c-.53-.12-.91-.5-1.33-.9C10.52 4.77 9.73 4 8 4M4.5 8Q1.7 8 1 10.67q1.05-1.34 2.45-1c.53.12.91.5 1.33.9C5.48 11.23 6.26 12 8 12q2.8 0 3.5-2.67-1.05 1.34-2.45 1c-.53-.12-.91-.5-1.33-.9C7.02 8.77 6.24 8 4.5 8" clip-rule="evenodd"/>
|
|
5309
|
-
</symbol>`,
|
|
5366
|
+
</symbol>`,Fu=`<symbol id="file-tree-builtin-terraform" viewBox="0 0 16 16">
|
|
5310
5367
|
<path fill="currentColor" d="M1 0v5.05l4.35 2.53V2.53zm9.18 5.34L5.83 2.82v5.05l4.35 2.53zm.47 5.06V5.34L15 2.82v5.05zm-.48 5.6-4.35-2.53V8.42l4.35 2.53z"/>
|
|
5311
|
-
</symbol>`,
|
|
5368
|
+
</symbol>`,Iu=`<symbol id="file-tree-builtin-text" viewBox="0 0 16 16">
|
|
5312
5369
|
<path fill="currentColor" fill-rule="evenodd" d="M8 4a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1H8z" class="bg" clip-rule="evenodd" opacity=".4"/>
|
|
5313
5370
|
<path fill="currentColor" d="M8.5 11a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1zm2-2a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1zm-1-8a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z"/>
|
|
5314
|
-
</symbol>`,
|
|
5371
|
+
</symbol>`,Lu=`<symbol id="file-tree-builtin-typescript" viewBox="0 0 16 16">
|
|
5315
5372
|
<path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
|
|
5316
5373
|
<path fill="currentColor" d="M8.1 9.64h.95c.04.62.28.76 1.28.76s1.2-.14 1.2-.85c0-.66-.2-.85-1.2-1.07-1.79-.38-2.18-.7-2.18-1.86C8.15 5.3 8.54 5 10.31 5c1.67 0 2.04.26 2.07 1.42h-.95c-.02-.43-.23-.53-1.1-.53-1 0-1.22.14-1.22.74 0 .52.22.7 1.24.92 1.76.38 2.15.73 2.15 2 0 1.44-.4 1.75-2.24 1.75-1.8 0-2.18-.3-2.15-1.66m-3 1.57V5.99H3.5v-.9h4.21v.9H6.1v5.22z"/>
|
|
5317
|
-
</symbol>`,
|
|
5374
|
+
</symbol>`,Ru=`<symbol id="file-tree-builtin-vite" viewBox="0 0 16 16">
|
|
5318
5375
|
<path fill="currentColor" d="M8.57 14.87c-.18.26-.55.11-.55-.22v-3.18l-.05-.27-.13-.22-.2-.15-.24-.06H4.29c-.26 0-.4-.32-.26-.55L6.08 7c.3-.46 0-1.1-.5-1.1H1.8c-.25 0-.4-.32-.25-.56l2.65-4.2A.3.3 0 0 1 4.46 1h7.9c.26 0 .4.32.26.55l-2.05 3.23c-.29.46 0 1.1.5 1.1h3.12c.26 0 .4.34.24.57z"/>
|
|
5319
|
-
</symbol>`,
|
|
5376
|
+
</symbol>`,zu=`<symbol id="file-tree-builtin-vscode" viewBox="0 0 16 16">
|
|
5320
5377
|
<path fill="currentColor" d="m5.11 9.68-2.4 1.84a.6.6 0 0 1-.75-.04l-.77-.7a.6.6 0 0 1 0-.87L3.28 8zm5.52-8.42a.51.51 0 0 1 .87.36V4.8L7.32 8 5.1 6.32z" opacity=".75"/>
|
|
5321
5378
|
<path fill="currentColor" d="M11.1 14.99h.03zM1.96 4.52a.6.6 0 0 1 .75-.04l8.8 6.71v3.19a.51.51 0 0 1-.88.36L1.19 6.1a.6.6 0 0 1 0-.87z" opacity=".65"/>
|
|
5322
5379
|
<path fill="currentColor" d="M11.62 14.91a.9.9 0 0 1-1-.17.51.51 0 0 0 .88-.36V1.62a.51.51 0 0 0-.87-.36.9.9 0 0 1 1-.17l2.87 1.39a.9.9 0 0 1 .5.8v9.44a.9.9 0 0 1-.5.8z"/>
|
|
5323
|
-
</symbol>`,
|
|
5380
|
+
</symbol>`,Bu=`<symbol id="file-tree-builtin-vue" viewBox="0 0 16 16">
|
|
5324
5381
|
<path fill="currentColor" d="M9.62 2.25 8 5.02 6.38 2.25H1l7 12 7-12z" opacity=".5"/>
|
|
5325
5382
|
<path fill="currentColor" d="M9.54 2.25 8 4.95l-1.54-2.7H4l4 7 4-7z"/>
|
|
5326
|
-
</symbol>`,
|
|
5383
|
+
</symbol>`,Vu=`<symbol id="file-tree-builtin-wasm" viewBox="0 0 16 16">
|
|
5327
5384
|
<path fill="currentColor" d="M13 1a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h3a2 2 0 1 0 4 0z" class="subtract" opacity=".2"/>
|
|
5328
5385
|
<path fill="currentColor" d="M4.64 11.4h.02l.8-3.4h.91l.73 3.45L7.88 8h.96l-1.25 5h-.97L5.9 9.6 5.1 13h-1L3 8h.98z"/>
|
|
5329
5386
|
<path fill="currentColor" fill-rule="evenodd" d="M13 13h-1.02l-.33-1.11H9.9L9.64 13h-.97l1.26-5h1.54zm-2.49-3.77-.42 1.84h1.32l-.49-1.84z" clip-rule="evenodd"/>
|
|
5330
|
-
</symbol>`,
|
|
5387
|
+
</symbol>`,Hu=`<symbol id="file-tree-builtin-webpack" viewBox="0 0 16 16">
|
|
5331
5388
|
<path fill="currentColor" d="M14.1 11.79 8.26 15v-2.5l3.64-1.94zm.4-.35V4.73l-2.14 1.2v4.3zm-12.6.35L7.74 15v-2.5L4.1 10.56zm-.4-.35V4.73l2.14 1.2v4.3zm.25-7.15 6-3.29v2.42L3.9 5.47l-.03.01zm12.5 0L8.25 1v2.42l3.85 2.05.03.01z" class="bg" opacity=".4"/>
|
|
5332
5389
|
<path fill="currentColor" d="m7.74 11.93-3.59-1.92v-3.8l3.6 2.02zm.52 0 3.59-1.92v-3.8l-3.6 2.02zM4.4 5.77 8 3.85l3.6 1.93L8 7.8z" class="fg"/>
|
|
5333
|
-
</symbol>`,
|
|
5390
|
+
</symbol>`,Uu=`<symbol id="file-tree-builtin-yml" viewBox="0 0 16 16">
|
|
5334
5391
|
<path fill="currentColor" d="M7.5 2A1.5 1.5 0 0 1 9 3.5v3A1.5 1.5 0 0 1 7.5 8h-2v2A1.5 1.5 0 0 0 7 11.5v-1A1.5 1.5 0 0 1 8.5 9h5a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-5A1.5 1.5 0 0 1 7 13.5v-1A2.5 2.5 0 0 1 4.5 10V8h-2A1.5 1.5 0 0 1 1 6.5v-3A1.5 1.5 0 0 1 2.5 2zm1 8a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5zm-6-7a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5z"/>
|
|
5335
|
-
</symbol>`,
|
|
5392
|
+
</symbol>`,Wu=`<symbol id="file-tree-builtin-zig" viewBox="0 0 16 16">
|
|
5336
5393
|
<path fill="currentColor" d="m14.73 1.5-7.29 8.82h4.17l-1.73 2.04H5.76L1.27 14.5l7.3-8.91H4.39l1.73-2.05h4.12z"/>
|
|
5337
5394
|
<path fill="currentColor" d="M5.21 3.54 3.56 5.6h-.55v4.73h.83L2.1 12.36H1V3.54zm9.79 0v8.82h-4.3l1.74-2.04h.55V5.68h-.83l1.74-2.14z"/>
|
|
5338
|
-
</symbol>`,
|
|
5395
|
+
</symbol>`,Gu=[Yl,eu,nu,ru,iu,au,cu,lu,uu,fu,pu,mu,hu,gu,_u,Cu,Tu,Eu,Mu,Nu,Iu,Lu,`<symbol id="file-tree-builtin-zip" viewBox="0 0 16 16">
|
|
5339
5396
|
<path fill="currentColor" d="M4.585 2a2 2 0 0 1 1.028.285l1.788 1.072a1 1 0 0 0 .514.143H12A2 2 0 0 1 13.935 5H0V4a2 2 0 0 1 2-2z" class="bg" opacity=".5"/>
|
|
5340
5397
|
<path fill="currentColor" fill-rule="evenodd" d="M14 12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-1.25h1v-1H0V6h14zM9.9 8.25c-.883 0-1.9.5-1.9.5H7v1h1v1s1.017.5 1.9.5c.884 0 1.6-.672 1.6-1.5s-.716-1.5-1.6-1.5M2 9.75v1h1v-1zm2 0v1h1v-1zm2 0v1h1v-1zm-5-1v1h1v-1zm2 0v1h1v-1zm2 0v1h1v-1z" class="fg" clip-rule="evenodd"/>
|
|
5341
|
-
</symbol>`],
|
|
5342
|
-
`)}\n</svg>`)}var Au=ku(Ol,Du),ju={minimal:Ol,standard:Au,complete:ku(Au,Ou)},Mu={".babelrc":`babel`,".babelrc.json":`babel`,".bash_profile":`bash`,".bashrc":`bash`,".browserslistrc":`browserslist`,".dockerignore":`docker`,".eslintignore":`eslint`,".eslintrc":`eslint`,".eslintrc.cjs":`eslint`,".eslintrc.js":`eslint`,".eslintrc.json":`eslint`,".eslintrc.yaml":`eslint`,".eslintrc.yml":`eslint`,".gitattributes":`git`,".gitignore":`git`,".gitkeep":`git`,".gitmodules":`git`,".oxlintrc.json":`oxc`,".postcssrc":`postcss`,".postcssrc.json":`postcss`,".postcssrc.yaml":`postcss`,".postcssrc.yml":`postcss`,".prettierignore":`prettier`,".prettierrc":`prettier`,".prettierrc.cjs":`prettier`,".prettierrc.js":`prettier`,".prettierrc.json":`prettier`,".prettierrc.mjs":`prettier`,".prettierrc.toml":`prettier`,".prettierrc.yaml":`prettier`,".prettierrc.yml":`prettier`,".stylelintignore":`stylelint`,".stylelintrc":`stylelint`,".stylelintrc.cjs":`stylelint`,".stylelintrc.js":`stylelint`,".stylelintrc.json":`stylelint`,".stylelintrc.mjs":`stylelint`,".stylelintrc.yaml":`stylelint`,".stylelintrc.yml":`stylelint`,".terraform.lock.hcl":`terraform`,".zprofile":`bash`,".zshenv":`bash`,".zshrc":`bash`,"babel.config.cjs":`babel`,"babel.config.js":`babel`,"babel.config.json":`babel`,"babel.config.mjs":`babel`,"biome.json":`biome`,"biome.jsonc":`biome`,"bootstrap.bundle.js":`bootstrap`,"bootstrap.bundle.min.js":`bootstrap`,"bootstrap.css":`bootstrap`,"bootstrap.js":`bootstrap`,"bootstrap.min.css":`bootstrap`,"bootstrap.min.js":`bootstrap`,"bun.lock":`bun`,"bun.lockb":`bun`,"bunfig.toml":`bun`,"claude.md":`claude`,"compose.yaml":`docker`,"compose.yml":`docker`,"docker-compose.override.yml":`docker`,"docker-compose.yaml":`docker`,"docker-compose.yml":`docker`,dockerfile:`docker`,"eslint.config.cjs":`eslint`,"eslint.config.js":`eslint`,"eslint.config.mjs":`eslint`,"eslint.config.mts":`eslint`,"eslint.config.ts":`eslint`,gemfile:`ruby`,"next.config.js":`nextjs`,"next.config.mjs":`nextjs`,"next.config.mts":`nextjs`,"next.config.ts":`nextjs`,"postcss.config.cjs":`postcss`,"postcss.config.js":`postcss`,"postcss.config.mjs":`postcss`,"postcss.config.ts":`postcss`,"prettier.config.cjs":`prettier`,"prettier.config.js":`prettier`,"prettier.config.mjs":`prettier`,rakefile:`ruby`,"readme.md":`markdown`,"stylelint.config.cjs":`stylelint`,"stylelint.config.js":`stylelint`,"stylelint.config.mjs":`stylelint`,"svgo.config.cjs":`svgo`,"svgo.config.js":`svgo`,"svgo.config.mjs":`svgo`,"svgo.config.ts":`svgo`,"tailwind.config.cjs":`tailwind`,"tailwind.config.js":`tailwind`,"tailwind.config.mjs":`tailwind`,"tailwind.config.ts":`tailwind`,"vite.config.js":`vite`,"vite.config.mjs":`vite`,"vite.config.mts":`vite`,"vite.config.ts":`vite`,"webpack.config.babel.js":`webpack`,"webpack.config.cjs":`webpack`,"webpack.config.js":`webpack`,"webpack.config.mjs":`webpack`,"webpack.config.ts":`webpack`},Nu={"7z":`zip`,astro:`astro`,AUTHORS:`text`,avif:`image`,bash:`bash`,bmp:`image`,bz2:`zip`,c:`c`,cc:`cpp`,cfg:`text`,CHANGELOG:`text`,cjs:`javascript`,"code-workspace":`vscode`,conf:`text`,CONTRIBUTORS:`text`,cpp:`cpp`,csh:`bash`,css:`css`,csv:`table`,cts:`typescript`,cxx:`cpp`,db:`database`,editorconfig:`text`,env:`text`,"env.development":`text`,"env.local":`text`,"env.production":`text`,eot:`font`,erb:`ruby`,fish:`bash`,gemspec:`ruby`,gif:`image`,go:`go`,gql:`graphql`,graphql:`graphql`,gz:`zip`,h:`c`,hh:`cpp`,hpp:`cpp`,htm:`html`,html:`html`,hxx:`cpp`,icns:`image`,ico:`image`,ini:`text`,inl:`cpp`,jar:`zip`,jpeg:`image`,jpg:`image`,js:`javascript`,json:`json`,json5:`json`,jsonc:`json`,jsonl:`json`,jsx:`javascript`,ksh:`bash`,less:`css`,LICENSE:`text`,log:`text`,markdown:`markdown`,mcp:`mcp`,md:`markdown`,mdx:`markdown`,"mdx.tsx":`markdown`,mjs:`javascript`,mm:`cpp`,mts:`typescript`,ods:`table`,otf:`font`,png:`image`,postcss:`css`,py:`python`,pyi:`python`,pyw:`python`,pyx:`python`,rake:`ruby`,rar:`zip`,rb:`ruby`,rs:`rust`,rst:`text`,rtf:`text`,sass:`css`,scss:`css`,sh:`bash`,sql:`database`,sqlite:`database`,sqlite3:`database`,styl:`css`,svelte:`svelte`,svg:`svg`,swift:`swift`,tar:`zip`,tf:`terraform`,tfstate:`terraform`,tfvars:`terraform`,tgz:`zip`,tif:`image`,tiff:`image`,ts:`typescript`,tsv:`table`,tsx:`typescript`,ttf:`font`,txt:`text`,vue:`vue`,war:`zip`,wasm:`wasm`,wast:`wasm`,wat:`wasm`,webp:`image`,woff:`font`,woff2:`font`,xhtml:`html`,xls:`table`,xlsx:`table`,xz:`zip`,yaml:`yml`,yml:`yml`,zig:`zig`,zip:`zip`,zsh:`bash`},Pu={jsx:`react`,sass:`sass`,scss:`sass`,tsx:`react`},Fu=new Set([`bash`,`c`,`cpp`,`css`,`database`,`default`,`font`,`git`,`go`,`html`,`image`,`javascript`,`json`,`markdown`,`mcp`,`python`,`ruby`,`rust`,`swift`,`table`,`text`,`typescript`,`zip`]),Iu=new Set([`complete`]);function Lu(e){return ju[e===`none`?`minimal`:e]}function Ru(e){return`file-tree-builtin-${e}`}function zu(e){return e!==`none`&&Iu.has(e)}function Bu(e,t,n){if(e===`minimal`||e===`none`)return;let r=e===`complete`,i=Mu[t.toLowerCase()];if(i!=null&&(r||Fu.has(i)))return i;for(let e of n){if(r){let t=Pu[e];if(t!=null)return t}let t=Nu[e];if(t!=null&&(r||Fu.has(t)))return t}return`default`}var Vu=`file-tree-container`,Hu=`data-file-tree-style`,Uu=`data-file-tree-unsafe-css`,Wu=`data-file-tree-scrollbar-measure`,Gu=`data-file-tree-scrollbar-gutter-measured`,Ku=`--trees-scrollbar-gutter-measured`,qu=`header`,Ju=`context-menu`,Yu=`context-menu-trigger`;function Xu(e){return e.spriteSheet!=null||e.remap!=null||e.byFileName!=null||e.byFileExtension!=null||e.byFileNameContains!=null}function Zu(e){return e==null?{set:`complete`,colored:!0}:typeof e==`string`?{set:e,colored:!0}:{...e,set:e.set??(Xu(e)?`none`:`complete`),colored:e.colored??!0}}var Qu=e=>e.trim().toLowerCase(),$u=e=>e.split(`/`).at(-1)??e,ed=e=>{let t=e.toLowerCase().split(`.`),n=[];for(let e=1;e<t.length;e+=1)n.push(t.slice(e).join(`.`));return n};function td(e,t){return typeof e==`string`?{name:e,remappedFrom:t}:{...e,remappedFrom:t}}function nd(e){let t=Zu(e),n=t.remap,r=new Map;for(let[e,n]of Object.entries(t.byFileName??{}))r.set(e.toLowerCase(),n);let i=new Map;for(let[e,n]of Object.entries(t.byFileExtension??{}))i.set(Qu(e),n);let a=Object.entries(t.byFileNameContains??{}).map(([e,t])=>[e.toLowerCase(),t]);return{resolveIcon:(e,o)=>{if(e===`file-tree-icon-file`&&o!=null){let s=$u(o),c=s.toLowerCase(),l=r.get(c);if(l!=null)return td(l,e);for(let[t,n]of a)if(c.includes(t))return td(n,e);let u=ed(s);for(let t of u){let n=i.get(t);if(n!=null)return td(n,e)}let d=Bu(t.set,s,u);if(d!=null&&t.set!==`none`){if(d==="default"){let t=n?.[e];if(t!=null)return td(t,e)}return{name:Ru(d),remappedFrom:e,token:d}}}let s=n?.[e];return s==null?{name:e}:td(s,e)}}}var rd=5,id=32,ad=128;function od(){return{childIdByNameId:new Map,childIds:[],childPositionById:new Map,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function sd(){return{childIdByNameId:null,childIds:[],childPositionById:null,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function cd(e,t){if(t.childIdByNameId!=null)return t.childIdByNameId;let n=new Map;for(let r of t.childIds){let t=e[r];t!=null&&n.set(t.nameId,r)}return t.childIdByNameId=n,n}function ld(e){if(e.childPositionById!=null)return e.childPositionById;let t=new Map;for(let n=0;n<e.childIds.length;n++){let r=e.childIds[n];r!=null&&t.set(r,n)}return e.childPositionById=t,t}function ud(e,t){e.childPositionById!=null&&e.childPositionById.set(t,e.childIds.length),e.childIds.push(t)}function dd(e,t){if(e.childPositionById!=null)for(let n=t;n<e.childIds.length;n++){let t=e.childIds[n];t!=null&&e.childPositionById.set(t,n)}}function fd(e,t){let n=0,r=0;for(let i of t.childIds){let t=e[i];t!=null&&(n+=t.subtreeNodeCount,r+=t.visibleSubtreeCount)}t.totalChildSubtreeNodeCount=n,t.totalChildVisibleSubtreeCount=r,gd(e,t)}function pd(e,t,n,r){if(e.totalChildSubtreeNodeCount+=n,e.totalChildVisibleSubtreeCount+=r,e.childVisibleChunkSums==null||r===0)return;let i=ld(e).get(t);if(i===void 0)return;let a=i>>rd;e.childVisibleChunkSums[a]+=r}function md(e,t,n){let r=t.childVisibleChunkSums;if(r!=null){let i=n,a=0;for(let o of r){if(i<o){let r=_d(e,t,a,i);return{...r,childVisibleIndex:n-r.localVisibleIndex}}i-=o,a+=id}throw Error(`Visible child index ${String(n)} is out of range`)}let i=n;for(let r=0;r<t.childIds.length;r++){let a=t.childIds[r];if(a==null)continue;let o=e[a];if(o!=null){if(i<o.visibleSubtreeCount)return{childIndex:r,childVisibleIndex:n-i,localVisibleIndex:i};i-=o.visibleSubtreeCount}}throw Error(`Visible child index ${String(n)} is out of range`)}function hd(e,t,n){let r=0,i=t.childVisibleChunkSums,a=0;if(i!=null){let e=n>>rd;for(let t=0;t<e;t+=1)r+=i[t]??0;a=e<<rd}for(let i=a;i<n;i+=1){let n=t.childIds[i];if(n==null)continue;let a=e[n];a!=null&&(r+=a.visibleSubtreeCount)}return r}function gd(e,t){if(t.childIds.length<ad){t.childVisibleChunkSums=null;return}let n=Math.ceil(t.childIds.length/id),r=new Int32Array(n);for(let n=0;n<t.childIds.length;n++){let i=t.childIds[n];if(i==null)continue;let a=e[i];a!=null&&(r[n>>rd]+=a.visibleSubtreeCount)}t.childVisibleChunkSums=r}function _d(e,t,n,r){let i=Math.min(t.childIds.length,n+id),a=r;for(let r=n;r<i;r++){let n=t.childIds[r];if(n==null)continue;let i=e[n];if(i!=null){if(a<i.visibleSubtreeCount)return{childIndex:r,localVisibleIndex:a};a-=i.visibleSubtreeCount}}throw Error(`Visible child index ${String(r)} is out of range`)}var vd=7,yd=3,bd=8,xd=4;function Sd(e,t,n=0){return e<<xd|n<<yd|t}function Cd(e){return e.depthAndFlags>>>xd}function wd(e){return(e.depthAndFlags&bd)>>yd}function V(e){return(e.depthAndFlags&bd)!==0}function Td(e){return e.depthAndFlags&vd}function H(e,t){return(Td(e)&t)!==0}function Ed(e,t){e.depthAndFlags|=t}function Dd(e,t){e.depthAndFlags=Sd(t,Td(e),wd(e))}var Od=Symbol(`benchmarkInstrumentation`);function kd(e,t){return t==null||Object.defineProperty(e,Od,{configurable:!0,enumerable:!1,value:t,writable:!1}),e}function Ad(e){return e==null?null:e[Od]??null}function U(e,t,n){return e==null?n():e.measurePhase(t,n)}function jd(e,t,n){!Number.isFinite(n)||e==null||e.setCounter(t,n)}function Md(e){return e>=48&&e<=57}function Nd(e){let t=[],n=0,r=0;for(;r<e.length;){for(;r<e.length&&!Md(e.charCodeAt(r));)r+=1;if(r>=e.length)break;r>n&&t.push(e.slice(n,r));let i=0;for(;r<e.length&&Md(e.charCodeAt(r));)i=i*10+(e.charCodeAt(r)-48),r+=1;t.push(i),n=r}return(n<e.length||t.length===0)&&t.push(e.slice(n)),t}function Pd(e){let t=e.toLowerCase();return{lowerValue:t,tokens:Nd(t)}}function Fd(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++){let n=e[r],i=t[r];if(n===i)continue;if(typeof n==`number`&&typeof i==`number`)return n<i?-1:1;let a=String(n),o=String(i);if(a!==o)return a<o?-1:1}return e.length===t.length?0:e.length<t.length?-1:1}function Id(e,t){if(e.tokens.length===1&&t.tokens.length===1&&typeof e.tokens[0]==`string`&&typeof t.tokens[0]==`string`)return e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1;let n=Fd(e.tokens,t.tokens);return n===0?e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1:n}function Ld(e,t,n){let r=Id(n(e),n(t));return r===0?e===t?0:e<t?-1:1:r}function Rd(e,t){return Ld(e,t,Pd)}function zd(e,t){return t===e.segments.length-1?+!!e.isDirectory:1}function Bd(e,t){let n=Math.min(e.segments.length,t.segments.length);for(let r=0;r<n;r++){let n=e.segments[r],i=t.segments[r];if(n===i)continue;let a=zd(e,r);return a===zd(t,r)?Rd(n,i):a===1?-1:1}return e.segments.length===t.segments.length?e.isDirectory===t.isDirectory?0:e.isDirectory?-1:1:e.segments.length<t.segments.length?-1:1}function Vd(e,t){return Bd(e,t)}function Hd(e,t,n){let r=e=>{let t=n.get(e);if(t!=null)return t;let r=Pd(e);return n.set(e,r),r},i=Math.min(e.segments.length,t.segments.length);for(let n=0;n<i;n++){let i=e.segments[n],a=t.segments[n];if(i===a)continue;let o=zd(e,n);return o===zd(t,n)?Ld(i,a,r):o===1?-1:1}return e.segments.length===t.segments.length?e.isDirectory===t.isDirectory?0:e.isDirectory?-1:1:e.segments.length<t.segments.length?-1:1}function Ud(e,t){let n=e.sortKeyById[t];if(n!==void 0)return n;let r=e.valueById[t],i=Pd(r);return e.sortKeyById[t]=i,i}function Wd(e={}){return{flattenEmptyDirectories:e.flattenEmptyDirectories!==!1,sort:e.sort??`default`}}function Gd(e){let t=e.length>0&&e.charCodeAt(e.length-1)===47,n=t?e.length-1:e.length,r=[],i=0;for(let t=0;t<n;t++)e.charCodeAt(t)===47&&(r.push(e.slice(i,t)),i=t+1);return r.push(e.slice(i,n)),{hasTrailingSlash:t,segments:r}}function Kd(e){let{hasTrailingSlash:t,segments:n}=Gd(e);return{basename:n[n.length-1]??``,isDirectory:t,path:e,segments:n}}function qd(e){if(e.length===0)return{requiresDirectory:!1,segments:[]};let{hasTrailingSlash:t,segments:n}=Gd(e);return{requiresDirectory:t,segments:n}}function Jd(){let e=new Map;return e.set(``,0),{idByValue:e,valueById:[``],sortKeyById:[Pd(``)]}}function Yd(e,t){let n=e.idByValue.get(t);if(n!==void 0)return n;let r=e.valueById.length;return e.idByValue.set(t,r),e.valueById.push(t),r}function Xd(e,t){let n=e.valueById[t];if(n===void 0)throw Error(`Unknown segment ID: ${String(t)}`);return n}var Zd=Symbol(`pathStorePreparedInputKind`);function Qd(e,t){return e[Zd]=t,e}function $d(e){return{basename:e.basename,depth:e.segments.length,isDirectory:e.isDirectory,path:e.path,segments:e.segments}}function ef(e,t,n){return n==="default"?Vd(e,t):n($d(e),$d(t))}function tf(){return{depthAndFlags:Sd(0,3,1),nameId:0,parentId:0,subtreeNodeCount:1,visibleSubtreeCount:1}}function nf(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++)if(e[r]!==t[r])return r;return n}function rf(e){return e.isDirectory?e.segments.length:e.segments.length-1}function af(e){return Array.isArray(e)&&e.every(e=>typeof e==`object`&&!!e&&typeof e.path==`string`&&Array.isArray(e.segments)&&typeof e.basename==`string`&&typeof e.isDirectory==`boolean`)}function of(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function sf(e,t={}){return pf(e,t).map(e=>e.path)}function cf(e,t={}){let n=pf(e,t);return Qd({paths:n.map(e=>e.path),preparedPaths:n},`prepared`)}function lf(e){let t=e.length,n=!1;for(let r=0;r<t;r+=1){let t=e[r];if(t.length>0&&t.charCodeAt(t.length-1)===47){n=!0;break}}return Qd({paths:e,presortedPaths:e,presortedPathsContainDirectories:n},`presorted`)}function uf(e){let t=e,n=t.preparedPaths;if(t[Zd]===`prepared`&&n!=null)return n;if(!af(n))throw Error(`preparedInput must come from PathStore.prepareInput()`);return n}function df(e){let t=e;return t[Zd]===`presorted`&&t.presortedPaths!=null||of(t.presortedPaths)?t.presortedPaths:null}function ff(e){let t=e;return typeof t.presortedPathsContainDirectories==`boolean`?t.presortedPathsContainDirectories:null}function pf(e,t={}){let n=Wd(t),r=Ad(t);jd(r,`workload.inputFiles`,e.length);let i=U(r,`store.preparePathEntries.parse`,()=>e.map(e=>Kd(e)));return U(r,`store.preparePathEntries.sort`,()=>i.sort((e,t)=>ef(e,t,n.sort))),i}var mf=class{directories=new Map;directoryStack=[0];presortedDirectoryNodeIds=[];initialExpandedPathSet;createdDirectoriesAllExpanded=!1;createdDirectoryCount=0;lastPreparedPath=null;nodes=[tf()];options;instrumentation;segmentSortKeyCache=new Map;segmentTable=Jd();hasDeferredDirectoryIndexes=!1;constructor(e={}){this.instrumentation=Ad(e),this.options=Wd(e);let t=e.initialExpandedPaths??null;if(t==null||t.length===0)this.initialExpandedPathSet=null;else{let e=new Set,n=t.length;for(let r=0;r<n;r+=1){let n=t[r],i=n.length;e.add(i>0&&n.charCodeAt(i-1)===47?n.slice(0,i-1):n)}this.initialExpandedPathSet=e,this.createdDirectoriesAllExpanded=!0}this.directories.set(0,od())}appendPaths(e){return U(this.instrumentation,`store.builder.appendPaths.parse`,()=>this.appendPreparedPaths(e.map(e=>Kd(e))))}appendPreparedPaths(e,t=!0){return this.createdDirectoriesAllExpanded=!1,U(this.instrumentation,`store.builder.appendPreparedPaths`,()=>{for(let n of e)this.appendPreparedPath(n,t)}),this}appendPresortedPaths(e,t=null){return U(this.instrumentation,`store.builder.appendPresortedPaths`,()=>{if(t===!1){this.appendPresortedFilePaths(e);return}this.createdDirectoriesAllExpanded=!1;let n=null,r=0,i=this.nodes,a=this.segmentTable,o=a.idByValue,s=a.valueById,c=this.directoryStack,l=0,u=``,d=0;for(let t of e){if(n===t)throw Error(`Duplicate path: "${t}"`);let e=t.length>0&&t.charCodeAt(t.length-1)===47,a=e?t.length-1:t.length,f=0,p=0;if(n!=null)if(u.length>0&&t.length>u.length&&t.startsWith(u))f=d,p=u.length;else{let r=Math.min(a,n.length),i=!0;for(let e=0;e<r;e++){let r=t.charCodeAt(e);if(r!==n.charCodeAt(e)){i=!1;break}r===47&&(f++,p=e+1)}i&&e&&r===a&&n.length>a&&n.charCodeAt(a)===47&&(f++,p=a+1)}l=f,r=f;let m=p,h=t.indexOf(`/`,m);for(;h>=0&&h<a;){let e=c[l];if(e===void 0)throw Error(`Directory stack underflow while building the path store`);r++;let n=t.slice(m,h),a=o.get(n);a===void 0&&(a=s.length,o.set(n,a),s.push(n));let u=i.length;i.push({depthAndFlags:Sd(r,0,1),nameId:a,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),this.recordCreatedDirectoryPath(t.slice(0,h)),l++,c[l]=u,m=h+1,h=t.indexOf(`/`,m)}if(e){if(m<a){let e=c[l];if(e===void 0)throw Error(`Unable to resolve directory parent for "${t}"`);r++;let n=t.slice(m,a),u=o.get(n);u===void 0&&(u=s.length,o.set(n,u),s.push(n));let d=i.length;i.push({depthAndFlags:Sd(r,0,1),nameId:u,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),l++,c[l]=d,m=a+1}let e=c[l];if(e===void 0)throw Error(`Unable to resolve directory node for "${t}"`);this.promoteDirectoryToExplicit(e,t)}else{let e=c[l];if(e===void 0)throw Error(`Unable to resolve file parent for "${t}"`);let n=t.slice(m),a=o.get(n);a===void 0&&(a=s.length,o.set(n,a),s.push(n)),i.push({depthAndFlags:Sd(r+1,0),nameId:a,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1})}m!==u.length&&(u=t.substring(0,m),d=r),n=t}c.length=l+1,n!=null&&(this.lastPreparedPath=Kd(n)),this.hasDeferredDirectoryIndexes=!0}),this}appendPresortedFilePaths(e){let t=null,n=0,r=this.nodes,i=this.segmentTable,a=i.idByValue,o=i.valueById,s=this.directoryStack,c=0,l=``,u=0;for(let i of e){if(t===i)throw Error(`Duplicate path: "${i}"`);let e=i.length,d=0,f=0;if(t!=null)if(l.length>0&&i.length>l.length&&i.startsWith(l))d=u,f=l.length;else{let n=Math.min(e,t.length);for(let e=0;e<n;e++){let n=i.charCodeAt(e);if(n!==t.charCodeAt(e))break;n===47&&(d++,f=e+1)}}c=d,n=d;let p=f,m=i.indexOf(`/`,p);for(;m>=0;){let e=s[c];if(e===void 0)throw Error(`Directory stack underflow while building the path store`);n++;let t=i.slice(p,m),l=a.get(t);l===void 0&&(l=o.length,a.set(t,l),o.push(t));let u=r.length;r.push({depthAndFlags:Sd(n,0,1),nameId:l,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),this.recordCreatedDirectoryPath(i.slice(0,m)),this.presortedDirectoryNodeIds.push(u),c++,s[c]=u,p=m+1,m=i.indexOf(`/`,p)}let h=s[c];if(h===void 0)throw Error(`Unable to resolve file parent for "${i}"`);let g=i.slice(p),_=a.get(g);_===void 0&&(_=o.length,a.set(g,_),o.push(g)),r.push({depthAndFlags:Sd(n+1,0),nameId:_,parentId:h,subtreeNodeCount:1,visibleSubtreeCount:1}),p!==l.length&&(l=i.substring(0,p),u=n),t=i}s.length=c+1,t!=null&&(this.lastPreparedPath=Kd(t)),this.hasDeferredDirectoryIndexes=!0}finish(e={}){let t=e.skipSubtreeCountPass===!0;return this.hasDeferredDirectoryIndexes?(U(this.instrumentation,`store.builder.buildDirectoryIndexes`,()=>this.buildPresortedFinish(t)),this.hasDeferredDirectoryIndexes=!1):t||U(this.instrumentation,`store.builder.computeSubtreeCounts`,()=>this.computeSubtreeCounts(0)),{directories:this.directories,nodes:this.nodes,options:this.options,rootId:0,segmentTable:this.segmentTable,presortedDirectoryNodeIds:this.presortedDirectoryNodeIds.length>0?this.presortedDirectoryNodeIds:null}}didMatchAllInitialExpandedPaths(){return this.createdDirectoriesAllExpanded&&this.initialExpandedPathSet!=null&&this.createdDirectoryCount===this.initialExpandedPathSet.size}appendPreparedPath(e,t){if(this.hasDeferredDirectoryIndexes&&=(this.buildDirectoryIndexes(),!1),this.lastPreparedPath!=null){if(e.path===this.lastPreparedPath.path)throw Error(`Duplicate path: "${e.path}"`);if(t&&(this.options.sort==="default"?Hd(this.lastPreparedPath,e,this.segmentSortKeyCache):ef(this.lastPreparedPath,e,this.options.sort))>0)throw Error(`Builder input must be sorted before appendPaths(): "${e.path}"`)}let n=this.lastPreparedPath,r=rf(e),i=n==null?0:rf(n),a=n==null?0:nf(n.segments,e.segments),o=Math.min(a,r,i);this.directoryStack.length=o+1;for(let n=o;n<r;n++){let r=this.directoryStack[this.directoryStack.length-1];if(r===void 0)throw Error(`Directory stack underflow while building the path store`);let i=t?this.getOrCreateDirectoryChild(r,e.segments[n]):this.createDirectoryChild(r,e.segments[n]);this.directoryStack.push(i)}if(e.isDirectory){let t=this.directoryStack[this.directoryStack.length-1];if(t===void 0)throw Error(`Unable to resolve directory node for "${e.path}"`);this.promoteDirectoryToExplicit(t,e.path),this.lastPreparedPath=e;return}let s=this.directoryStack[this.directoryStack.length-1];if(s===void 0)throw Error(`Unable to resolve file parent for "${e.path}"`);t?this.createFileChild(s,e.basename,e.path):this.createFileChildUnchecked(s,e.basename),this.lastPreparedPath=e}recordCreatedDirectoryPath(e){!this.createdDirectoriesAllExpanded||this.initialExpandedPathSet==null||(this.createdDirectoryCount+=1,this.initialExpandedPathSet.has(e)||(this.createdDirectoriesAllExpanded=!1))}createFileChild(e,t,n){let r=Yd(this.segmentTable,t),i=this.getDirectoryIndex(e),a=i.childIdByNameId;if(a!=null&&a.get(r)!==void 0)throw Error(`Path collides with an existing entry: "${n}"`);let o=this.nodes[e];if(o===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let s=this.nodes.length;return this.nodes.push({depthAndFlags:Sd(Cd(o)+1,0),nameId:r,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),a?.set(r,s),ud(i,s),s}createFileChildUnchecked(e,t){let n=Yd(this.segmentTable,t),r=this.getDirectoryIndex(e),i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:Sd(Cd(i)+1,0),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),ud(r,a),a}getOrCreateDirectoryChild(e,t){let n=Yd(this.segmentTable,t),r=this.getDirectoryIndex(e);if(r.childIdByNameId!=null){let e=r.childIdByNameId.get(n);if(e!==void 0){let n=this.nodes[e];if(n!=null&&!V(n))throw Error(`Path collides with an existing file while creating directory "${t}"`);return e}}let i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:Sd(Cd(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),ud(r,a),this.directories.set(a,od()),a}createDirectoryChild(e,t){let n=Yd(this.segmentTable,t),r=this.getDirectoryIndex(e),i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:Sd(Cd(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),ud(r,a),this.directories.set(a,od()),a}promoteDirectoryToExplicit(e,t){let n=this.nodes[e];if(n===void 0)throw Error(`Unknown directory node ID: ${String(e)}`);if(!V(n))throw Error(`Path is not a directory: "${t}"`);if(H(n,1))throw Error(`Duplicate path: "${t}"`);Ed(n,1)}getDirectoryIndex(e){let t=this.directories.get(e);if(t!==void 0)return t;throw Error(`Unknown directory child index for node ${String(e)}`)}buildPresortedFinish(e){let t=this.nodes,n=this.directories;n.set(0,sd());let r=-1,i=null;for(let e=1;e<t.length;e++){let a=t[e];if(a==null)continue;if(V(a)){let t=sd();n.set(e,t),r=e,i=t}let o;a.parentId===r?o=i:(o=n.get(a.parentId),r=a.parentId,i=o??null),o?.childIds.push(e)}if(!e)for(let e=t.length-1;e>=1;e--){let n=t[e];if(n==null)continue;let r=t[n.parentId];r!=null&&(r.subtreeNodeCount+=n.subtreeNodeCount,r.visibleSubtreeCount+=n.visibleSubtreeCount)}}buildDirectoryIndexes(){let e=this.nodes;for(let t=1;t<e.length;t++){let n=e[t];if(n==null)continue;V(n)&&this.directories.set(t,od());let r=this.directories.get(n.parentId);r!=null&&(r.childIdByNameId!=null&&r.childIdByNameId.set(n.nameId,t),ud(r,t))}}computeSubtreeCounts(e){let t=this.nodes[e];if(t===void 0)throw Error(`Unknown node ID: ${String(e)}`);if(!V(t))return t.subtreeNodeCount=1,t.visibleSubtreeCount=1,1;let n=this.getDirectoryIndex(e),r=1;for(let e of n.childIds)r+=this.computeSubtreeCounts(e);return fd(this.nodes,n),t.subtreeNodeCount=r,t.visibleSubtreeCount=r,r}};function hf(e,t=`closed`,n=null){let r=_f(t);return{activeNodeCount:e.nodes.length-1,collapsedDirectoryIds:new Set,collapseNewDirectoriesByDefault:!1,defaultExpansion:r,directoriesOpenByDefault:r===`open`,hasCollapsedDirectoryOverrides:!1,directoryLoadInfoById:new Map,expandedDirectoryIds:new Set,instrumentation:n,listeners:new Map,pathCacheByNodeId:new Map([[e.rootId,{path:``,version:0}]]),pathCacheVersion:0,snapshot:e,transactionStack:[]}}function gf(){return{affectedAncestorIds:new Set,affectedNodeIds:new Set,events:[]}}function _f(e){if(typeof e!=`number`)return e;if(!Number.isInteger(e)||e<0)throw Error(`initialExpansion must be "open", "closed", or a non-negative integer depth. Received: ${String(e)}`);return e}function vf(e,t){return H(t,2)||e.defaultExpansion===`open`?!0:e.defaultExpansion!==`closed`&&Cd(t)<=e.defaultExpansion}function yf(e,t,n=e.snapshot.nodes[t]){return n==null||!V(n)?!1:e.directoriesOpenByDefault&&!e.hasCollapsedDirectoryOverrides?!0:e.collapsedDirectoryIds.has(t)?!1:e.expandedDirectoryIds.has(t)?!0:vf(e,n)}function bf(e,t,n,r=e.snapshot.nodes[t]){if(r==null||!V(r))return;let i=vf(e,r);if(n){if(i){e.collapsedDirectoryIds.delete(t),e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0;return}e.expandedDirectoryIds.add(t);return}if(i){e.collapsedDirectoryIds.add(t),e.hasCollapsedDirectoryOverrides=!0;return}e.expandedDirectoryIds.delete(t)}function xf(e,t){let n=e.directoryLoadInfoById.get(t);if(n!=null)return n;let r={activeAttemptId:null,errorMessage:null,nextAttemptId:1,state:`loaded`};return e.directoryLoadInfoById.set(t,r),r}function Sf(e,t){return e.directoryLoadInfoById.get(t)?.state??`loaded`}function Cf(e,t){let n=xf(e,t);if(n.state===`loading`&&n.activeAttemptId!=null)return{attemptId:n.activeAttemptId,nodeId:t,reused:!0};let r=n.nextAttemptId;return n.activeAttemptId=r,n.errorMessage=null,n.nextAttemptId+=1,n.state=`loading`,{attemptId:r,nodeId:t,reused:!1}}function wf(e,t){let n=xf(e,t);n.activeAttemptId=null,n.errorMessage=null,n.state=`unloaded`}function Tf(e,t,n){let r=e.directoryLoadInfoById.get(t);return r==null||r.activeAttemptId!==n?!1:(r.activeAttemptId=null,r.errorMessage=null,r.state=`loaded`,!0)}function Ef(e,t,n){return e.directoryLoadInfoById.get(t)?.activeAttemptId===n}function Df(e,t,n,r){let i=e.directoryLoadInfoById.get(t);return i==null||i.activeAttemptId!==n?!1:(i.activeAttemptId=null,i.errorMessage=r??null,i.state=`error`,!0)}function Of(e,t){e.directoryLoadInfoById.delete(t)}function kf(e,t,n){let r=n,i=e.listeners.get(t);return i==null?e.listeners.set(t,new Set([r])):i.add(r),()=>{let n=e.listeners.get(t);n!=null&&(n.delete(r),n.size===0&&e.listeners.delete(t))}}function Af(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`add`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function jf(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`remove`,path:e.path,projectionChanged:e.projectionChanged,recursive:e.recursive,visibleCountDelta:null}}function Mf(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,from:e.from,operation:`move`,projectionChanged:e.projectionChanged,to:e.to,visibleCountDelta:null}}function Nf(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`expand`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function Pf(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`collapse`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function Ff(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`mark-directory-unloaded`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function If(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,operation:`begin-child-load`,path:e.path,projectionChanged:e.projectionChanged,reused:e.reused,visibleCountDelta:null}}function Lf(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:e.childEvents.some(e=>e.canonicalChanged),childEvents:e.childEvents,operation:`apply-child-patch`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function Rf(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,operation:`complete-child-load`,path:e.path,projectionChanged:e.projectionChanged,stale:e.stale,visibleCountDelta:null}}function zf(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,errorMessage:e.errorMessage,operation:`fail-child-load`,path:e.path,projectionChanged:e.projectionChanged,stale:e.stale,visibleCountDelta:null}}function Bf(e){return{activeNodeCountAfter:e.activeNodeCountAfter,activeNodeCountBefore:e.activeNodeCountBefore,affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],cachedPathEntryCountAfter:e.cachedPathEntryCountAfter,cachedPathEntryCountBefore:e.cachedPathEntryCountBefore,canonicalChanged:!1,idsPreserved:e.idsPreserved,loadInfoEntryCountAfter:e.loadInfoEntryCountAfter,loadInfoEntryCountBefore:e.loadInfoEntryCountBefore,mode:e.mode,operation:`cleanup`,projectionChanged:e.projectionChanged,reclaimedCachedPathEntryCount:e.reclaimedCachedPathEntryCount,reclaimedLoadInfoEntryCount:e.reclaimedLoadInfoEntryCount,reclaimedNodeSlotCount:e.reclaimedNodeSlotCount,reclaimedSegmentCount:e.reclaimedSegmentCount,segmentCountAfter:e.segmentCountAfter,segmentCountBefore:e.segmentCountBefore,totalNodeSlotCountAfter:e.totalNodeSlotCountAfter,totalNodeSlotCountBefore:e.totalNodeSlotCountBefore,visibleCountDelta:null}}function Vf(e,t,n){return{...n,visibleCountDelta:Qf(e)-t}}function Hf(e,t){let n=Qf(e),r=gf();e.transactionStack.push(r);try{t()}catch(t){throw Gf(e,r,!1),t}Gf(e,r,!0,Qf(e)-n)}function Uf(e,t){let n=e.instrumentation;if(n==null){Wf(e,t);return}U(n,`store.events.record`,()=>Wf(e,t))}function Wf(e,t){let n=e.transactionStack[e.transactionStack.length-1]??null;if(n==null){Xf(e,t);return}n.events.push(t),Yf(n,t)}function Gf(e,t,n,r=null){if(e.transactionStack.pop()!==t)throw Error(`Transaction stack underflow`);if(!n)return;let i=e.transactionStack[e.transactionStack.length-1]??null;if(i!=null){let n=e.instrumentation;n==null?Jf(i,t):U(n,`store.events.batch.merge`,()=>Jf(i,t));return}let a=Kf(t,r),o=e.instrumentation;if(o==null){Xf(e,a);return}U(o,`store.events.batch.commit`,()=>Xf(e,a))}function Kf(e,t){return{affectedAncestorIds:[...e.affectedAncestorIds],affectedNodeIds:[...e.affectedNodeIds],canonicalChanged:e.events.some(e=>e.canonicalChanged),events:[...e.events],operation:`batch`,projectionChanged:e.events.some(e=>e.projectionChanged),visibleCountDelta:t}}function qf(e,t){for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n);for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n)}function Jf(e,t){for(let n of t.events)e.events.push(n);qf(e,t)}function Yf(e,t){for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n);for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n)}function Xf(e,t){let n=e.instrumentation;if(n==null){Zf(e,t);return}U(n,`store.events.emit`,()=>Zf(e,t))}function Zf(e,t){e.listeners.get(t.operation)?.forEach(e=>e(t)),e.listeners.get(`*`)?.forEach(e=>e(t))}function Qf(e){return e.snapshot.nodes[e.snapshot.rootId]?.visibleSubtreeCount??0}function $f(e,t){if(e.snapshot.options.flattenEmptyDirectories!==!0)return null;let n=e.snapshot.nodes[t];if(n==null||!V(n)||H(n,2))return null;let r=e.snapshot.directories.get(t);if(r==null||r.childIds.length!==1)return null;let i=r.childIds[0];if(i==null)return null;let a=e.snapshot.nodes[i];return a==null||!V(a)?null:i}function ep(e,t){let n=t;for(;;){let t=$f(e,n);if(t==null)return n;n=t}}function tp(e,t){let n=[t],r=t;for(;;){let t=$f(e,r);if(t==null)return n;n.push(t),r=t}}function np(e,t){let n=t==null?e.snapshot.rootId:dp(e,t);return n==null?[]:pp(e,n)}function rp(e,t){let n=Kd(t),r=n.isDirectory?n.segments:n.segments.slice(0,-1),i=Op(e,Dp(e,r)),{createdNodeIds:a,directoryId:o}=mp(e,r),s=new Set(a),c=o;if(n.isDirectory){let n=K(e,o);if(H(n,1))throw Error(`Path already exists: "${t}"`);Ed(n,1),e.pathCacheByNodeId.set(o,{path:t,version:e.pathCacheVersion}),s.add(o)}else c=gp(e,o,n.basename),s.add(c);cp(e,o);let l=Op(e,o);return Af({affectedAncestorIds:up(e,c),affectedNodeIds:[...s],path:t,projectionChanged:kp(i,l)})}function ip(e,t,n){let r=dp(e,t);if(r==null)throw Error(`Path does not exist: "${t}"`);let i=K(e,r);if(H(i,2))throw Error(`The root node cannot be removed`);if(V(i)&&G(e,r).childIds.length>0&&n.recursive!==!0)throw Error(`Cannot remove a non-empty directory without recursive: "${t}"`);let a=i.parentId,o=Op(e,a),s=Tp(e,r);yp(e,a,r,i.nameId),Ep(e,a),cp(e,a);let c=Op(e,a);return jf({affectedAncestorIds:up(e,a),affectedNodeIds:s,path:t,projectionChanged:kp(o,c),recursive:n.recursive===!0})}function ap(e,t,n,r){let i=dp(e,t);if(i==null)throw Error(`Source path does not exist: "${t}"`);let a=K(e,i);if(H(a,2))throw Error(`The root node cannot be moved`);let o=r.collision??`error`,s=Cp(e,i,n),c=Op(e,a.parentId),l=Op(e,s.parentId),u=Xd(e.snapshot.segmentTable,a.nameId),d=Yd(e.snapshot.segmentTable,s.basename);if(s.parentId===a.parentId&&u===s.basename)return null;if(V(a)&&Np(e,i,s.parentId))throw Error(`Cannot move a directory into one of its descendants`);let f=cd(e.snapshot.nodes,G(e,s.parentId)).get(d),p=s.existingNodeId??f??null;if(p!=null&&p!==i&&wp(e,p,o,wd(a))===`skip`)return null;let m=a.parentId;yp(e,m,i,a.nameId),a.parentId=s.parentId,a.nameId=d,e.pathCacheByNodeId.delete(i),Mp(e,i),vp(e,s.parentId,i),Ep(e,m),e.pathCacheVersion++,cp(e,m),s.parentId!==m&&cp(e,s.parentId);let h=Op(e,m),g=Op(e,s.parentId);return Mf({affectedAncestorIds:[...new Set([...up(e,m),...up(e,s.parentId)])],affectedNodeIds:[i],from:t,projectionChanged:Ap([c,l],[h,g]),to:W(e,i)})}function op(e,t){let n=e.pathCacheByNodeId.get(t);return n!=null&&n.version===e.pathCacheVersion?n.path:null}function sp(e,t,n){return e.pathCacheByNodeId.set(t,{path:n,version:e.pathCacheVersion}),n}function W(e,t){let n=K(e,t),r=op(e,t);if(r!=null)return r;if(H(n,2))return sp(e,t,``);let i=W(e,n.parentId),a=Xd(e.snapshot.segmentTable,n.nameId),o=i.length===0?a:`${i}${a}`;return sp(e,t,V(n)?`${o}/`:o)}function cp(e,t){let n=e.instrumentation;if(n==null){Fp(e,t);return}U(n,`store.recomputeCountsUpwardFrom`,()=>Fp(e,t))}function lp(e,t){let n=[[t,0]],{nodes:r,directories:i}=e.snapshot;for(;n.length>0;){let t=n[n.length-1],a=t[0],o=r[a];if(o==null||!V(o)){Pp(e,a,o,!0),n.pop();continue}let s=i.get(a);if(s==null||t[1]>=s.childIds.length){Pp(e,a,o,!0),n.pop();continue}let c=s.childIds[t[1]++];n.push([c,0])}}function up(e,t){let n=[],r=t;for(;r!=null;){let t=K(e,r);if(n.push(r),r===e.snapshot.rootId)break;r=t.parentId}return n}function dp(e,t){if(t.length===0)return e.snapshot.rootId;let n=qd(t);return fp(e,n.segments,n.requiresDirectory)}function fp(e,t,n){let r=e.snapshot.rootId;for(let n of t){let t=e.snapshot.segmentTable.idByValue.get(n);if(t===void 0)return null;let i=G(e,r),a=cd(e.snapshot.nodes,i).get(t);if(a===void 0)return null;r=a}let i=K(e,r);return n&&!V(i)?null:r}function G(e,t){let n=e.snapshot.directories.get(t);if(n===void 0)throw Error(`Unknown directory child index for node ${String(t)}`);return n}function K(e,t){let n=e.snapshot.nodes[t];if(n===void 0||H(n,4))throw Error(`Unknown node ID: ${String(t)}`);return n}function pp(e,t){let n=e.snapshot.nodes[t];if(n===void 0||H(n,4))return[];if(!V(n))return[W(e,t)];if(G(e,t).childIds.length===0)return H(n,1)&&!H(n,2)?[W(e,t)]:[];let r=[],i=[{childIndex:0,nodeId:t}];for(;i.length>0;){let t=i[i.length-1];if(t==null)break;let n=e.snapshot.nodes[t.nodeId];if(n===void 0||H(n,4)){i.pop();continue}if(!V(n)){r.push(W(e,t.nodeId)),i.pop();continue}let a=G(e,t.nodeId);if(a.childIds.length===0){H(n,1)&&!H(n,2)&&r.push(W(e,t.nodeId)),i.pop();continue}let o=a.childIds[t.childIndex];if(o==null){i.pop();continue}t.childIndex++,i.push({childIndex:0,nodeId:o})}return r}function mp(e,t){let n=[],r=e.snapshot.rootId;for(let i of t){let t=Yd(e.snapshot.segmentTable,i),a=G(e,r),o=cd(e.snapshot.nodes,a).get(t);if(o!==void 0){if(!V(K(e,o)))throw Error(`Cannot create a directory that collides with an existing file: "${i}"`);r=o;continue}r=hp(e,r,t),n.push(r)}return{createdNodeIds:n,directoryId:r}}function hp(e,t,n){let r=K(e,t),i=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:Sd(Cd(r)+1,0,1),nameId:n,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),e.snapshot.directories.set(i,od()),vp(e,t,i),e.collapseNewDirectoriesByDefault&&(e.collapsedDirectoryIds.add(i),e.hasCollapsedDirectoryOverrides=!0),e.activeNodeCount++,i}function gp(e,t,n){let r=Yd(e.snapshot.segmentTable,n),i=G(e,t);if(cd(e.snapshot.nodes,i).has(r))throw Error(`Path already exists: "${Lp(e,t,n)}"`);let a=K(e,t),o=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:Sd(Cd(a)+1,0),nameId:r,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),vp(e,t,o),e.activeNodeCount++,o}function _p(e,t,n){let r=0,i=t.childIds.length;for(;r<i;){let a=r+i>>>1,o=t.childIds[a];if(o==null){i=a;continue}bp(e,n,o)<0?i=a:r=a+1}return r}function vp(e,t,n){let r=G(e,t),i=K(e,n);cd(e.snapshot.nodes,r).set(i.nameId,n),pd(r,n,i.subtreeNodeCount,i.visibleSubtreeCount);let a=_p(e,r,n);r.childIds.splice(a,0,n),dd(r,a),gd(e.snapshot.nodes,r)}function yp(e,t,n,r){let i=G(e,t),a=ld(i),o=a.get(n)??-1;cd(e.snapshot.nodes,i).delete(r),a.delete(n);let s=e.snapshot.nodes[n];s!=null&&pd(i,n,-s.subtreeNodeCount,-s.visibleSubtreeCount),o>=0&&(i.childIds.splice(o,1),dd(i,o),gd(e.snapshot.nodes,i))}function bp(e,t,n){let r=e.snapshot.options.sort;return r==="default"?xp(e,t,n):r(Sp(e,t),Sp(e,n))}function xp(e,t,n){let r=K(e,t),i=K(e,n),a=V(r);if(a!==V(i))return a?-1:1;let o=Id(Ud(e.snapshot.segmentTable,r.nameId),Ud(e.snapshot.segmentTable,i.nameId));if(o!==0)return o;let s=Xd(e.snapshot.segmentTable,r.nameId),c=Xd(e.snapshot.segmentTable,i.nameId);return s===c?t<n?-1:1:s<c?-1:1}function Sp(e,t){let n=K(e,t),r=W(e,t),i=V(n),a=i?r.slice(0,-1):r;return{basename:Xd(e.snapshot.segmentTable,n.nameId),depth:Cd(n),isDirectory:i,path:r,segments:a.length===0?[]:a.split(`/`)}}function Cp(e,t,n){let r=K(e,t),i=dp(e,n);if(i!=null){let t=K(e,i);if(V(t))return{basename:Xd(e.snapshot.segmentTable,r.nameId),existingNodeId:null,parentId:i};let a=qd(n).segments;return{basename:a[a.length-1]??``,existingNodeId:i,parentId:t.parentId}}let a=qd(n),o=a.segments[a.segments.length-1]??``,s=a.segments.slice(0,-1),c=s.length===0?e.snapshot.rootId:fp(e,s,!0);if(c==null)throw Error(`Destination parent does not exist: "${n}"`);return{basename:o,existingNodeId:null,parentId:c}}function wp(e,t,n,r){if(n===`skip`)return`skip`;if(n===`error`)throw Error(`Destination already exists: "${W(e,t)}"`);let i=K(e,t);if(wd(i)!==r)throw Error(`replace collision requires the same source and destination kinds`);if(V(i)&&G(e,t).childIds.length>0)throw Error(`replace collision does not support non-empty directories`);let a=i.parentId,o=i.nameId;return Tp(e,t),yp(e,a,t,o),Ep(e,a),cp(e,a),`handled`}function Tp(e,t){let n=[],r=[{nodeId:t,visitedChildren:!1}];for(;r.length>0;){let t=r.pop();if(t==null)break;let i=K(e,t.nodeId);if(t.visitedChildren||!V(i)){V(i)&&e.snapshot.directories.delete(t.nodeId),Ed(i,4),e.pathCacheByNodeId.delete(t.nodeId),e.collapsedDirectoryIds.delete(t.nodeId)&&(e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0),e.expandedDirectoryIds.delete(t.nodeId),Of(e,t.nodeId),e.activeNodeCount--,n.push(t.nodeId);continue}r.push({nodeId:t.nodeId,visitedChildren:!0});let a=G(e,t.nodeId);for(let e=a.childIds.length-1;e>=0;e--){let t=a.childIds[e];t!=null&&r.push({nodeId:t,visitedChildren:!1})}}return n}function Ep(e,t){let n=t;for(;n!=null;){let t=K(e,n);if(!V(t)||H(t,2)||G(e,n).childIds.length>0)return;Ed(t,1),n=t.parentId===n?null:t.parentId}}function Dp(e,t){let n=e.snapshot.rootId;for(let r of t){let t=e.snapshot.segmentTable.idByValue.get(r);if(t==null)break;let i=cd(e.snapshot.nodes,G(e,n)).get(t);if(i==null||!V(K(e,i)))break;n=i}return n}function Op(e,t){let n=jp(e,t);if(n==null)return null;let r=ep(e,n),i=K(e,r),a=n===r?null:tp(e,n).map(t=>W(e,t));return JSON.stringify({flattenedSegmentPaths:a,hasChildren:G(e,r).childIds.length>0,path:W(e,r),terminalKind:wd(i)})}function kp(e,t){return Ap([e],[t])}function Ap(e,t){for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(r==null||i==null||r!==i)return!0}return!1}function jp(e,t){let n=t;for(;n!=null;){let t=K(e,n);if(!V(t)||H(t,2))return null;if(!yf(e,n,t))return n;n=t.parentId}return null}function Mp(e,t){let n=K(e,t);if(Dd(n,(t===e.snapshot.rootId?-1:Cd(K(e,n.parentId)))+1),!V(n))return;let r=G(e,t);for(let t of r.childIds)Mp(e,t)}function Np(e,t,n){let r=n;for(;r!=null;){if(r===t)return!0;let n=K(e,r);if(r===e.snapshot.rootId)return!1;r=n.parentId}return!1}function Pp(e,t,n=K(e,t),r=!1){let i=e.instrumentation;if(i==null){Ip(e,t,n,r);return}U(i,`store.recomputeNodeCounts`,()=>Ip(e,t,n,r))}function Fp(e,t){let n=t;for(;n!=null;){let t=K(e,n),r=t.subtreeNodeCount,i=t.visibleSubtreeCount;if(Pp(e,n,t),n===e.snapshot.rootId)return;let a=t.subtreeNodeCount-r,o=t.visibleSubtreeCount-i,s=t.parentId;(a!==0||o!==0)&&pd(G(e,s),n,a,o),n=s}}function Ip(e,t,n,r){if(!V(n)){n.subtreeNodeCount=1,n.visibleSubtreeCount=1;return}let i=G(e,t);if(r){let t=e.instrumentation;t==null?fd(e.snapshot.nodes,i):U(t,`store.recomputeNodeCounts.rebuildChildAggregates`,()=>fd(e.snapshot.nodes,i))}let a=1+i.totalChildSubtreeNodeCount,o=i.totalChildVisibleSubtreeCount;if(n.subtreeNodeCount=a,H(n,2)){n.visibleSubtreeCount=o;return}n.visibleSubtreeCount=$f(e,t)==null?yf(e,t,n)?1+o:1:o}function Lp(e,t,n){let r=W(e,t);return r.length===0?n:`${r}${n}`}function Rp(e){return e!=null&&!H(e,4)}function zp(e,t){let n=e.snapshot.nodes[t];return!Rp(n)||!V(n)||H(n,2)?null:n}function Bp(e){let t=0;for(let[n,r]of e.pathCacheByNodeId)r.version===e.pathCacheVersion&&Rp(e.snapshot.nodes[n])&&(t+=1);return t}function Vp(e){return Math.max(0,e.valueById.length-1)}function Hp(e){return{activeNodeCount:e.activeNodeCount,cachedPathEntryCount:Bp(e),loadInfoEntryCount:e.directoryLoadInfoById.size,segmentCount:Vp(e.snapshot.segmentTable),totalNodeSlotCount:Math.max(0,e.snapshot.nodes.length-1)}}function Up(e,t,n,r){return{activeNodeCountAfter:r.activeNodeCount,activeNodeCountBefore:n.activeNodeCount,cachedPathEntryCountAfter:r.cachedPathEntryCount,cachedPathEntryCountBefore:n.cachedPathEntryCount,idsPreserved:t,loadInfoEntryCountAfter:r.loadInfoEntryCount,loadInfoEntryCountBefore:n.loadInfoEntryCount,mode:e,reclaimedCachedPathEntryCount:n.cachedPathEntryCount-r.cachedPathEntryCount,reclaimedLoadInfoEntryCount:n.loadInfoEntryCount-r.loadInfoEntryCount,reclaimedNodeSlotCount:n.totalNodeSlotCount-r.totalNodeSlotCount,reclaimedSegmentCount:n.segmentCount-r.segmentCount,segmentCountAfter:r.segmentCount,segmentCountBefore:n.segmentCount,totalNodeSlotCountAfter:r.totalNodeSlotCount,totalNodeSlotCountBefore:n.totalNodeSlotCount}}function Wp(e){let t=[],n=[];for(let n of e.collapsedDirectoryIds)zp(e,n)!=null&&t.push(W(e,n));for(let t of e.expandedDirectoryIds)zp(e,t)!=null&&n.push(W(e,t));return{collapsedPaths:t,expandedPaths:n}}function Gp(e){let t=[];for(let[n,r]of e.directoryLoadInfoById)zp(e,n)!=null&&Sf(e,n)!==`loaded`&&t.push({info:{activeAttemptId:null,errorMessage:r.errorMessage,nextAttemptId:r.nextAttemptId,state:r.state},path:W(e,n)});return t}function Kp(e,t){e.collapsedDirectoryIds.clear(),e.hasCollapsedDirectoryOverrides=!1,e.expandedDirectoryIds.clear();for(let n of t.expandedPaths){let t=dp(e,n);t!=null&&bf(e,t,!0,K(e,t))}for(let n of t.collapsedPaths){let t=dp(e,n);t!=null&&bf(e,t,!1,K(e,t))}}function qp(e,t){e.directoryLoadInfoById.clear();for(let n of t){let t=dp(e,n.path);t!=null&&zp(e,t)!=null&&e.directoryLoadInfoById.set(t,{activeAttemptId:null,errorMessage:n.info.errorMessage,nextAttemptId:n.info.nextAttemptId,state:n.info.state})}}function Jp(e){e.pathCacheVersion+=1,e.pathCacheByNodeId.clear(),e.pathCacheByNodeId.set(e.snapshot.rootId,{path:``,version:e.pathCacheVersion})}function Yp(e){let t=e.snapshot.segmentTable,n=Jd();for(let r of e.snapshot.nodes)if(Rp(r)){if(H(r,2)){r.nameId=0;continue}r.nameId=Yd(n,Xd(t,r.nameId))}e.snapshot.segmentTable=n}function Xp(e){for(let[t,n]of e.snapshot.directories){let r=e.snapshot.nodes[t];if(!Rp(r)||!V(r)){e.snapshot.directories.delete(t);continue}let i=n.childIds.filter(n=>{let r=e.snapshot.nodes[n];return Rp(r)&&r.parentId===t});n.childIds=i,n.childIdByNameId=new Map(i.map(t=>[K(e,t).nameId,t])),n.childPositionById=new Map(i.map((e,t)=>[e,t])),fd(e.snapshot.nodes,n)}}function Zp(e){let t=e.snapshot.nodes.length-1;for(;t>e.snapshot.rootId;){let n=e.snapshot.nodes[t];if(Rp(n))break;--t}e.snapshot.nodes.length=t+1}function Qp(e){let t=Wp(e),n=Gp(e);U(e.instrumentation,`store.cleanup.stable.clearPathCaches`,()=>Jp(e)),U(e.instrumentation,`store.cleanup.stable.rebuildSegmentTable`,()=>Yp(e)),U(e.instrumentation,`store.cleanup.stable.rebuildDirectoryIndexes`,()=>Xp(e)),U(e.instrumentation,`store.cleanup.stable.trimTrailingRemovedNodeSlots`,()=>Zp(e)),U(e.instrumentation,`store.cleanup.stable.restoreExpansionOverrides`,()=>Kp(e,t)),U(e.instrumentation,`store.cleanup.stable.restoreDirectoryLoadInfos`,()=>qp(e,n)),U(e.instrumentation,`store.cleanup.stable.recomputeCounts`,()=>lp(e,e.snapshot.rootId))}function $p(e){let t=Wp(e),n=Gp(e),r=U(e.instrumentation,`store.cleanup.aggressive.listPaths`,()=>np(e)),i=kd({...e.snapshot.options},e.instrumentation),a=U(e.instrumentation,`store.cleanup.aggressive.rebuildSnapshot`,()=>{let e=new mf(i);return e.appendPaths(r),e.finish()});e.snapshot=a,e.activeNodeCount=a.nodes.length-1,e.pathCacheByNodeId=new Map([[a.rootId,{path:``,version:0}]]),e.pathCacheVersion=0,U(e.instrumentation,`store.cleanup.aggressive.restoreExpansionOverrides`,()=>Kp(e,t)),U(e.instrumentation,`store.cleanup.aggressive.restoreDirectoryLoadInfos`,()=>qp(e,n)),U(e.instrumentation,`store.cleanup.aggressive.recomputeCounts`,()=>lp(e,e.snapshot.rootId))}function em(e){for(let t of e.directoryLoadInfoById.values())if(t.state===`loading`&&t.activeAttemptId!=null)return!0;return!1}function tm(e,t){let n=Hp(e);t===`stable`?U(e.instrumentation,`store.cleanup.stable`,()=>Qp(e)):U(e.instrumentation,`store.cleanup.aggressive`,()=>$p(e));let r=Hp(e);return Up(t,t===`stable`,n,r)}var nm=64;function rm(e,t){let n=t+2;if(n<=e.length)return e;let r=e.length;for(;r<n;)r*=2;let i=new Int32Array(r);return i.fill(-1),i.set(e),i}function q(e){return K(e,e.snapshot.rootId).visibleSubtreeCount}function im(e,t,n,r){let i=K(e,t.terminalNodeId),a=Math.max(1,i.visibleSubtreeCount);return Math.min(r-1,n+a-1)}function am(e,t,n,r){return{ancestorPaths:r,index:t.index,posInSet:t.posInSet,row:wm(e,t.cursor),setSize:t.setSize,subtreeEndIndex:im(e,t.cursor,t.index,n)}}function om(e,t,n,r,i,a){let o=G(e,t),{childIndex:s,childVisibleIndex:c,localVisibleIndex:l}=md(e.snapshot.nodes,o,n),u=o.childIds[s];if(u==null)throw Error(`Visible index ${String(n)} is out of range`);return sm(e,u,l,r+c,i+1,s,o.childIds.length,a)}function sm(e,t,n,r,i,a,o,s){if(!V(K(e,t))){if(n===0)return{ancestors:s,cursor:{headNodeId:t,terminalNodeId:t,visibleDepth:i},index:r,posInSet:a,setSize:o};throw Error(`Visible index ${String(n)} is out of range for file`)}let c=vm(e,t,i);if(n===0)return{ancestors:s,cursor:c,index:r,posInSet:a,setSize:o};let l=K(e,c.terminalNodeId);if(!V(l)||!yf(e,c.terminalNodeId,l))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return om(e,c.terminalNodeId,n-1,r+1,c.visibleDepth,[...s,{cursor:c,index:r,posInSet:a,setSize:o}])}function cm(e,t){let n=q(e);if(t<0||t>=n)return null;let r=om(e,e.snapshot.rootId,t,0,-1,[]),i=r.ancestors.map(t=>W(e,t.cursor.terminalNodeId)),a=null;return{ancestorPaths:i,get ancestorRows(){if(a!=null)return a;let t=[],i=[];for(let a of r.ancestors){let r=am(e,a,n,[...i]);t.push(r),i.push(r.row.path)}return a=t,a},index:r.index,posInSet:r.posInSet,row:wm(e,r.cursor),setSize:r.setSize,subtreeEndIndex:im(e,r.cursor,r.index,n)}}function lm(e,t,n){let r=e.instrumentation,i=q(e);if(i<=0||n<t)return[];let a=Math.max(0,Math.min(t,i-1)),o=Math.max(a,Math.min(n,i-1));if(r==null){if(a===0)return Cm(e,o+1);let t=[],n=hm(e,a);for(let r=a;r<=o&&n!=null;r++){let r=wm(e,n);t.push(r),n=bm(e,n)}return t}let s=[],c=0,l=0,u=U(r,`store.getVisibleSlice.selectFirstRow`,()=>hm(e,a));for(let t=a;t<=o&&u!=null;t++){let t=U(r,`store.getVisibleSlice.materializeRow`,()=>wm(e,u));s.push(t),t.isFlattened&&(c++,l+=t.flattenedSegments?.length??0),u=U(r,`store.getVisibleSlice.advanceCursor`,()=>bm(e,u))}return jd(r,`workload.visibleRowsRead`,s.length),jd(r,`workload.flattenedRowsRead`,c),jd(r,`workload.flattenedSegmentsRead`,l),s}function um(e,t=q(e)){let n=e.instrumentation;return n==null?Sm(e,t):U(n,`store.getVisibleTreeProjection`,()=>Sm(e,t))}function dm(e){return xm(um(e))}function fm(e,t){let n=dp(e,t);if(n==null||n===e.snapshot.rootId||V(K(e,n))&&ep(e,n)!==n)return null;let r=0,i=n,{nodes:a,rootId:o}=e.snapshot;for(;i!==o;){let t=K(e,i).parentId,n=G(e,t),s=ld(n).get(i);if(s==null)throw Error(`Child ${String(i)} was not found in its parent index`);if(r+=hd(a,n,s),t!==o){let n=K(e,t),a=$f(e,t);if(!yf(e,t,n)&&a!==i)return null;ep(e,t)===t&&(r+=1)}i=t}return r}function pm(e,t){let n=dp(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=K(e,n);if(!V(r))throw Error(`Path is not a directory: "${t}"`);return yf(e,n,r)?null:(bf(e,n,!0,r),cp(e,n),Nf({affectedAncestorIds:up(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0}))}function mm(e,t){let n=dp(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=K(e,n);if(!V(r))throw Error(`Path is not a directory: "${t}"`);return yf(e,n,r)?(bf(e,n,!1,r),cp(e,n),Pf({affectedAncestorIds:up(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0})):null}function hm(e,t){return t<0||t>=q(e)?null:gm(e,e.snapshot.rootId,t,-1)}function gm(e,t,n,r){let i=G(e,t),a=e.instrumentation,{childIndex:o,localVisibleIndex:s}=a==null?md(e.snapshot.nodes,i,n):U(a,`store.getVisibleSlice.selectChildIndex`,()=>md(e.snapshot.nodes,i,n)),c=i.childIds[o];if(c!=null)return _m(e,c,s,r+1);throw Error(`Visible index ${String(n)} is out of range`)}function _m(e,t,n,r){if(!V(K(e,t))){if(n===0)return{headNodeId:t,terminalNodeId:t,visibleDepth:r};throw Error(`Visible index ${String(n)} is out of range for file`)}let i=vm(e,t,r);if(n===0)return i;let a=K(e,i.terminalNodeId);if(!V(a)||!yf(e,i.terminalNodeId,a))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return gm(e,i.terminalNodeId,n-1,i.visibleDepth)}function vm(e,t,n){return V(K(e,t))?e.instrumentation==null?{headNodeId:t,terminalNodeId:ep(e,t),visibleDepth:n}:{headNodeId:t,terminalNodeId:U(e.instrumentation,`store.getVisibleSlice.flatten.resolveTerminalDirectory`,()=>ep(e,t)),visibleDepth:n}:{headNodeId:t,terminalNodeId:t,visibleDepth:n}}function ym(e,t){let n=K(e,t);if(!V(n))return!0;let r=n.parentId;return r===e.snapshot.rootId||$f(e,r)!==t}function bm(e,t){let n=K(e,t.terminalNodeId);if(V(n)){let r=G(e,t.terminalNodeId);if(yf(e,t.terminalNodeId,n)&&r.childIds.length>0){let n=r.childIds[0];return n==null?null:_m(e,n,0,t.visibleDepth+1)}}let r=t.terminalNodeId,i=t.visibleDepth;for(;;){let t=K(e,r);if(r===e.snapshot.rootId)return null;let n=t.parentId,a=G(e,n),o=ld(a).get(r)??-1;if(o<0)throw Error(`Child ${String(r)} was not found in its parent index`);let s=a.childIds[o+1]??null;if(s!=null)return _m(e,s,0,i);ym(e,r)&&i--,r=n}}function xm(e){let t=e.paths.length,n=Array(t);for(let r=0;r<t;r+=1){let t=e.getParentIndex(r);n[r]={index:r,parentPath:t>=0?e.paths[t]??null:null,path:e.paths[r]??``,posInSet:e.posInSetByIndex[r]??0,setSize:e.setSizeByIndex[r]??0}}return{getParentIndex:e.getParentIndex,rows:n,get visibleIndexByPath(){return e.visibleIndexByPath}}}function Sm(e,t){let n=Array(t),r=new Int32Array(t),i=new Int32Array(t),a=new Int32Array(t),o=new Int32Array(nm);o.fill(-1);let s=0,{nodes:c,directories:l,segmentTable:u}=e.snapshot,d=[[l.get(e.snapshot.rootId),0,-1,``]],f=e.snapshot.options.flattenEmptyDirectories,p=e.pathCacheByNodeId,m=e.pathCacheVersion,h=u.valueById;for(;d.length>0&&s<t;){let t=d[d.length-1],u=t[0];if(t[1]>=u.childIds.length){d.pop();continue}let g=t[1],_=u.childIds[t[1]++],v=c[_],y=t[2]+1,b=t[3];o=rm(o,y);let x,S=_;if(V(v))S=f?ep(e,_):_,x=S===_?`${b}${h[v.nameId]}/`:W(e,S);else{let e=p.get(_);x=e!=null&&e.version===m?e.path:`${b}${h[v.nameId]}`}r[s]=o[y],n[s]=x,i[s]=g,a[s]=u.childIds.length,o[y+1]=s,s+=1;let C=c[S];C!=null&&V(C)&&yf(e,S,C)&&d.push([l.get(S),0,y,x])}s<t&&(n.length=s);let g=r.subarray(0,s),_=i.subarray(0,s),v=a.subarray(0,s),y=null;return{getParentIndex(e){return e<0||e>=s?-1:g[e]??-1},paths:n,posInSetByIndex:_,setSizeByIndex:v,get visibleIndexByPath(){if(y==null){y=new Map;for(let e=0;e<s;e+=1)y.set(n[e]??``,e)}return y}}}function Cm(e,t){let n=Array(t),r=0,{nodes:i,directories:a,segmentTable:o}=e.snapshot,s=[[a.get(e.snapshot.rootId),0,-1]],c=o.valueById,l=e.snapshot.options.flattenEmptyDirectories,u=e.pathCacheByNodeId,d=e.pathCacheVersion;for(;s.length>0&&r<t;){let t=s[s.length-1],o=t[0];if(t[1]>=o.childIds.length){s.pop();continue}let f=o.childIds[t[1]++],p=i[f],m=t[2]+1;if(!V(p)){let t=u.get(f);n[r++]={depth:m,flattenedSegments:void 0,hasChildren:!1,id:f,isExpanded:!1,isFlattened:!1,isLoading:!1,kind:`file`,loadState:void 0,name:c[p.nameId],path:t!=null&&t.version===d?t.path:W(e,f)};continue}let h=l?ep(e,f):f,g={headNodeId:f,terminalNodeId:h,visibleDepth:m};n[r++]=wm(e,g);let _=i[h];_!=null&&V(_)&&yf(e,h,_)&&s.push([a.get(h),0,m])}return r<t&&(n.length=r),n}function wm(e,t){let n=K(e,t.terminalNodeId),r=V(n)?Tm(e,t):null,i=W(e,t.terminalNodeId),a=Xd(e.snapshot.segmentTable,n.nameId),o=V(n)&&G(e,t.terminalNodeId).childIds.length>0,s=t.headNodeId!==t.terminalNodeId,c=e.instrumentation,l=s?c==null?tp(e,t.headNodeId).map(n=>{let r=K(e,n);return{isTerminal:n===t.terminalNodeId,name:Xd(e.snapshot.segmentTable,r.nameId),nodeId:n,path:W(e,n)}}):U(c,`store.getVisibleSlice.flatten.collectSegments`,()=>tp(e,t.headNodeId).map(n=>{let r=K(e,n);return{isTerminal:n===t.terminalNodeId,name:Xd(e.snapshot.segmentTable,r.nameId),nodeId:n,path:W(e,n)}})):void 0;return{depth:t.visibleDepth,flattenedSegments:l,hasChildren:o,id:t.terminalNodeId,isExpanded:V(n)&&yf(e,t.terminalNodeId,n),isFlattened:s,isLoading:r===`loading`,kind:V(n)?`directory`:`file`,loadState:r==null||r===`loaded`?void 0:r,name:a,path:i}}function Tm(e,t){if(t.headNodeId===t.terminalNodeId)return Sf(e,t.terminalNodeId);let n=tp(e,t.headNodeId),r=!1,i=!1;for(let t of n){let n=Sf(e,t);if(n===`loading`)return`loading`;if(n===`error`){i=!0;continue}n===`unloaded`&&(r=!0)}return i?`error`:r?`unloaded`:`loaded`}var Em=8;function Dm(e){let{nodes:t,directories:n,rootId:r,options:i}=e,a=t.length,o=new Int32Array(a),s=new Int32Array(a),c=new Int32Array(a),l=new Int32Array(a),u=new Int32Array(a),d=new Int32Array(a),f=new Int32Array(a);for(let e=0;e<a;e+=1){let n=t[e];n!=null&&(o[e]=n.parentId,s[e]=n.nameId,c[e]=n.depthAndFlags,l[e]=n.subtreeNodeCount,u[e]=n.visibleSubtreeCount)}let p=0;for(let e of n.values())p+=e.childIds.length;let m=new Int32Array(p),h=0;for(let[e,t]of n){let n=t.childIds;d[e]=h,f[e]=n.length;for(let e=0;e<n.length;e+=1)m[h]=n[e],h+=1}return{nodeCount:a,rootId:r,flattenEmptyDirectories:i.flattenEmptyDirectories===!0,parentId:o,nameId:s,depthAndFlags:c,subtreeNodeCount:l,visibleSubtreeCount:u,childStart:d,childCount:f,childIdsFlat:m}}function Om(e){let{nodeCount:t,rootId:n,flattenEmptyDirectories:r,depthAndFlags:i,subtreeNodeCount:a,visibleSubtreeCount:o,childStart:s,childCount:c,childIdsFlat:l}=e;for(let e=t-1;e>=1;--e){if((i[e]&Em)===0)continue;let t=s[e],n=c[e],u=0,d=0;for(let e=0;e<n;e+=1){let n=l[t+e];u+=a[n],d+=o[n]}a[e]=1+u;let f;f=r&&n===1?(i[l[t]]&Em)===0?1+d:d:1+d,o[e]=f}let u=s[n],d=c[n],f=0,p=0;for(let e=0;e<d;e+=1){let t=l[u+e];f+=a[t],p+=o[t]}a[n]=1+f,o[n]=p}function km(e){let{directories:t,nodes:n,options:r,rootId:i,presortedDirectoryNodeIds:a}=e.snapshot,o=r.flattenEmptyDirectories===!0,s=e=>{let r=n[e];if(r==null||!V(r))return;let i=t.get(e);if(i==null)throw Error(`Unknown directory child index for node ${String(e)}`);let a=i.childIds,s=a.length,c=0,l=0;for(let e=0;e<s;e++){let t=a[e];if(t==null)continue;let r=n[t];c+=r.subtreeNodeCount,l+=r.visibleSubtreeCount}i.totalChildSubtreeNodeCount=c,i.totalChildVisibleSubtreeCount=l,s>=128&&gd(n,i),r.subtreeNodeCount=1+c;let u;if(o&&s===1){let e=n[a[0]];u=e!=null&&V(e)?l:1+l}else u=1+l;r.visibleSubtreeCount=u};if(a!=null)for(let e=a.length-1;e>=0;e--)s(a[e]);else for(let e=n.length-1;e>=1;e--)s(e);let c=n[i],l=t.get(i);if(c==null||l==null)return;let u=l.childIds,d=0,f=0;for(let e=0;e<u.length;e++){let t=u[e];if(t==null)continue;let r=n[t];d+=r.subtreeNodeCount,f+=r.visibleSubtreeCount}l.totalChildSubtreeNodeCount=d,l.totalChildVisibleSubtreeCount=f,gd(n,l),c.subtreeNodeCount=1+d,c.visibleSubtreeCount=f}function Am(e){let{directories:t,nodes:n,rootId:r}=e.snapshot,i=Dm(e.snapshot);Om(i);let a=i.subtreeNodeCount,o=i.visibleSubtreeCount;for(let e=0;e<n.length;e+=1){let t=n[e];t!=null&&(t.subtreeNodeCount=a[e],t.visibleSubtreeCount=o[e])}for(let[e,i]of t){let t=i.childIds,a=t.length,o=0,s=0;for(let e=0;e<a;e++){let r=t[e];if(r==null)continue;let i=n[r];o+=i.subtreeNodeCount,s+=i.visibleSubtreeCount}i.totalChildSubtreeNodeCount=o,i.totalChildVisibleSubtreeCount=s,(e===r||a>=128)&&gd(n,i)}}function jm(e){return e.initialExpansion===`open`&&(e.initialExpandedPaths==null||e.initialExpandedPaths.length===0)}var Mm=class e{#e;constructor(e={}){let t=Ad(e),n=U(t,`store.builder.create`,()=>new mf(e));if(e.preparedInput!=null){let t=df(e.preparedInput);t==null?n.appendPreparedPaths(uf(e.preparedInput),!1):n.appendPresortedPaths(t,ff(e.preparedInput))}else{let r=e.paths??[];e.presorted===!0?n.appendPaths(r):n.appendPreparedPaths(U(t,`store.preparePathEntries`,()=>pf(r,e)))}let r=U(t,`store.builder.finish`,()=>n.finish({skipSubtreeCountPass:!0})),i=U(t,`store.state.detectAllDirectoriesExpanded`,()=>(e.initialExpansion??`closed`)===`closed`&&n.didMatchAllInitialExpandedPaths());this.#e=U(t,`store.state.create`,()=>hf(r,i?`open`:e.initialExpansion??`closed`,t)),i&&(this.#e.collapseNewDirectoriesByDefault=!0);let a=i?this.#e.snapshot.directories.size-1:U(t,`store.state.initializeExpandedPaths`,()=>this.initializeExpandedPaths(e.initialExpandedPaths));i||jm(e)||(e.initialExpansion??`closed`)===`closed`&&a===this.#e.snapshot.directories.size-1||(e.initialExpandedPaths?.length??0)>0&&U(t,`store.state.checkAllDirectoriesExpanded`,()=>this.hasAllDirectoriesExpanded())?e.useSoaCountSweep===!0?U(t,`store.state.initializeOpenVisibleCountsViaSoa`,()=>Am(this.#e)):U(t,`store.state.initializeOpenVisibleCounts`,()=>km(this.#e)):U(t,`store.state.recomputeCounts`,()=>lp(this.#e,this.#e.snapshot.rootId))}static preparePaths(e,t={}){return sf(e,t)}static prepareInput(e,t={}){return cf(e,t)}static preparePresortedInput(e){return lf(e)}list(e){return U(this.#e.instrumentation,`store.list`,()=>np(this.#e,e))}add(e){U(this.#e.instrumentation,`store.add`,()=>{let t=q(this.#e);Uf(this.#e,Vf(this.#e,t,rp(this.#e,e)))})}remove(e,t={}){U(this.#e.instrumentation,`store.remove`,()=>{let n=q(this.#e);Uf(this.#e,Vf(this.#e,n,ip(this.#e,e,t)))})}move(e,t,n={}){U(this.#e.instrumentation,`store.move`,()=>{let r=q(this.#e),i=ap(this.#e,e,t,n);i!=null&&Uf(this.#e,Vf(this.#e,r,i))})}batch(e){Hf(this.#e,()=>{if(typeof e==`function`){e(this);return}for(let t of e)switch(t.type){case`add`:this.add(t.path);break;case`remove`:this.remove(t.path,{recursive:t.recursive});break;case`move`:this.move(t.from,t.to,{collision:t.collision});break}})}getVisibleCount(){return U(this.#e.instrumentation,`store.getVisibleCount`,()=>q(this.#e))}getVisibleSlice(e,t){return U(this.#e.instrumentation,`store.getVisibleSlice`,()=>lm(this.#e,e,t))}getVisibleRowContext(e){return U(this.#e.instrumentation,`store.getVisibleRowContext`,()=>cm(this.#e,e))}getVisibleTreeProjection(){return dm(this.#e)}getVisibleTreeProjectionData(e){return um(this.#e,e)}getVisibleIndex(e){return U(this.#e.instrumentation,`store.getVisibleIndex`,()=>fm(this.#e,e))}getPathInfo(e){return U(this.#e.instrumentation,`store.getPathInfo`,()=>{let t=dp(this.#e,e);if(t==null)return null;let n=K(this.#e,t);return{depth:Cd(n),kind:V(n)?`directory`:`file`,path:W(this.#e,t)}})}isExpanded(e){return U(this.#e.instrumentation,`store.isExpanded`,()=>{let t=this.requireDirectoryNodeId(e),n=K(this.#e,t);return yf(this.#e,t,n)})}expand(e){U(this.#e.instrumentation,`store.expand`,()=>{let t=q(this.#e),n=pm(this.#e,e);n!=null&&Uf(this.#e,Vf(this.#e,t,n))})}collapse(e){U(this.#e.instrumentation,`store.collapse`,()=>{let t=q(this.#e),n=mm(this.#e,e);n!=null&&Uf(this.#e,Vf(this.#e,t,n))})}on(e,t){return kf(this.#e,e,t)}getDirectoryLoadState(e){let t=this.requireDirectoryNodeId(e);return Sf(this.#e,t)}markDirectoryUnloaded(e){U(this.#e.instrumentation,`store.markDirectoryUnloaded`,()=>{let t=this.requireDirectoryNodeId(e);if(G(this.#e,t).childIds.length>0)throw Error(`Cannot mark a directory with known children as unloaded: "${e}"`);let n=q(this.#e);wf(this.#e,t),Uf(this.#e,Vf(this.#e,n,Ff({affectedAncestorIds:up(this.#e,t),affectedNodeIds:[t],path:e,projectionChanged:this.isDirectoryProjectionVisible(t)})))})}beginChildLoad(e){return U(this.#e.instrumentation,`store.beginChildLoad`,()=>{let t=this.requireDirectoryNodeId(e),n=q(this.#e),r=Cf(this.#e,t);return Uf(this.#e,Vf(this.#e,n,If({affectedAncestorIds:up(this.#e,t),affectedNodeIds:[t],attemptId:r.attemptId,path:e,projectionChanged:this.isDirectoryProjectionVisible(t),reused:r.reused}))),r})}applyChildPatch(e,t){return U(this.#e.instrumentation,`store.applyChildPatch`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null||Sf(this.#e,n)!==`loading`||!Ef(this.#e,n,e.attemptId))return!1;let r=W(this.#e,n);this.validateChildPatch(r,t);let i=q(this.#e),a=[];for(let e of t.operations){Nm(r,e);let t=q(this.#e);switch(e.type){case`add`:a.push(Vf(this.#e,t,rp(this.#e,e.path)));break;case`remove`:a.push(Vf(this.#e,t,ip(this.#e,e.path,{recursive:e.recursive})));break;case`move`:{let n=ap(this.#e,e.from,e.to,{collision:e.collision});n!=null&&a.push(Vf(this.#e,t,n));break}}}let o=a.some(e=>e.projectionChanged)||this.isDirectoryProjectionVisible(n);return Uf(this.#e,Vf(this.#e,i,Lf({affectedAncestorIds:up(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,childEvents:a,path:W(this.#e,n),projectionChanged:o}))),!0})}completeChildLoad(e){return U(this.#e.instrumentation,`store.completeChildLoad`,()=>{let t=this.resolveActiveDirectoryNodeId(e.nodeId);if(t==null)return!1;let n=q(this.#e),r=Tf(this.#e,t,e.attemptId);return Uf(this.#e,Vf(this.#e,n,Rf({affectedAncestorIds:up(this.#e,t),affectedNodeIds:[t],attemptId:e.attemptId,path:W(this.#e,t),projectionChanged:this.isDirectoryProjectionVisible(t),stale:!r}))),r})}failChildLoad(e,t){return U(this.#e.instrumentation,`store.failChildLoad`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null)return!1;let r=q(this.#e),i=Df(this.#e,n,e.attemptId,t);return Uf(this.#e,Vf(this.#e,r,zf({affectedAncestorIds:up(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,errorMessage:t,path:W(this.#e,n),projectionChanged:this.isDirectoryProjectionVisible(n),stale:!i}))),i})}cleanup(e={}){return U(this.#e.instrumentation,`store.cleanup`,()=>{if(this.#e.transactionStack.length>0)throw Error(`Cleanup cannot run during an open batch or transaction.`);if(em(this.#e))throw Error(`Cleanup cannot run while directory loads are active.`);let t=q(this.#e),n=tm(this.#e,e.mode??`stable`);return Uf(this.#e,Vf(this.#e,t,Bf({...n,affectedAncestorIds:[],affectedNodeIds:[],projectionChanged:n.idsPreserved===!1}))),n})}getNodeCount(){return this.#e.activeNodeCount}initializeExpandedPaths(e){if(e==null||e.length===0)return 0;let t=0,n=[],r=[],i=0,a=null,o=this.#e.snapshot.segmentTable,s=o.valueById,c=this.#e.snapshot.nodes,l=new Map;for(let u of e){a!=null&&u<a&&(a=null,i=0,n.length=0,r.length=0);let e=u.length>0&&u.charCodeAt(u.length-1)===47?u.length-1:u.length;if(e===0){a=u,i=e,n.length=0,r.length=0;continue}let d=0,f=0;if(a!=null){let t=Math.min(e,i),n=!0;for(let e=0;e<t;e+=1){let t=u.charCodeAt(e);if(t!==a.charCodeAt(e)){n=!1;break}t===47&&(d+=1,f=e+1)}n&&(t===i&&e>t&&u.charCodeAt(t)===47?(d+=1,f=t+1):t===e&&i>t&&a.charCodeAt(t)===47&&(d+=1,f=e+1)),d=Math.min(d,r.length)}let p=d===0?this.#e.snapshot.rootId:r[d-1]??this.#e.snapshot.rootId,m=d,h=!0,g=f;for(;g<=e;){let t=u.indexOf(`/`,g),i=t===-1||t>e?e:t,a=u.slice(g,i),f=G(this.#e,p).childIds,_=m===d?n[m]??0:0,v=_,y,b=l.get(a)??Pd(a);l.set(a,b);let x=(e,t)=>{for(v=e;v<t;v+=1){let e=f[v],t=c[e],n=s[t.nameId];if(n===a)return y=e,!0;let r=Id(Ud(o,t.nameId),b);if(r>0||r===0&&n>a)return!1}return!1};if(!x(_,f.length)&&_>0&&x(0,_),y===void 0){h=!1;break}if(!V(K(this.#e,y))){h=!1;break}if(n[m]=v,r[m]=y,p=y,m+=1,i===e)break;g=i+1}if(a=u,i=e,n.length=m,r.length=m,!h){a=null,i=0,n.length=0,r.length=0;continue}for(let e=d;e<m;e+=1){let n=r[e];if(n==null)continue;let i=K(this.#e,n);yf(this.#e,n,i)||(bf(this.#e,n,!0,i),t+=1)}}return t}hasAllDirectoriesExpanded(){for(let e of this.#e.snapshot.directories.keys()){if(e===this.#e.snapshot.rootId)continue;let t=K(this.#e,e);if(!yf(this.#e,e,t))return!1}return!0}requireDirectoryNodeId(e){let t=dp(this.#e,e);if(t==null)throw Error(`Path does not exist: "${e}"`);if(!V(K(this.#e,t)))throw Error(`Path is not a directory: "${e}"`);return t}resolveActiveDirectoryNodeId(e){try{if(!V(K(this.#e,e)))throw Error(`Node is not a directory: ${String(e)}`);return e}catch{return null}}isDirectoryProjectionVisible(e){let t=e;for(;t!==this.#e.snapshot.rootId;){let e=K(this.#e,t).parentId;if(e!==this.#e.snapshot.rootId){let n=K(this.#e,e),r=$f(this.#e,e);if(!yf(this.#e,e,n)&&r!==t)return!1}t=e}return!0}validateChildPatch(t,n){new e({paths:this.list(t),presorted:!0,sort:this.#e.snapshot.options.sort}).batch(n.operations)}};function Nm(e,t){switch(t.type){case`add`:case`remove`:if(!t.path.startsWith(e)||t.path===e)throw Error(`Child patch operation must stay within ${e}: "${t.path}"`);break;case`move`:if(!t.from.startsWith(e)||!t.to.startsWith(e)||t.from===e||t.to===e)throw Error(`Child patch move must stay within ${e}: "${t.from}" -> "${t.to}"`)}}function Pm(e,t={}){return Mm.prepareInput(e,t)}var Fm={compact:{itemHeight:24,factor:.8},default:{itemHeight:30,factor:1},relaxed:{itemHeight:36,factor:1.2}};function Im(e,t){if(typeof e==`number`)return{itemHeight:t??Fm.default.itemHeight,factor:e};let n=Fm[e??`default`];return{itemHeight:t??n.itemHeight,factor:n.factor}}var Lm=Fm.default.itemHeight,Rm=`@layer base {
|
|
5398
|
+
</symbol>`],Ku=[ql,Jl,Xl,Zl,Ql,$l,tu,ou,su,du,vu,yu,bu,xu,Su,wu,Du,Ou,ku,Au,ju,Pu,Fu,Ru,zu,Bu,Vu,Hu,Uu,Wu];function qu(e,t){return t.length===0?e:e.replace(`</svg>`,`\n ${t.join(`
|
|
5399
|
+
`)}\n</svg>`)}var Ju=qu(Kl,Gu),Yu={minimal:Kl,standard:Ju,complete:qu(Ju,Ku)},Xu={".babelrc":`babel`,".babelrc.json":`babel`,".bash_profile":`bash`,".bashrc":`bash`,".browserslistrc":`browserslist`,".dockerignore":`docker`,".eslintignore":`eslint`,".eslintrc":`eslint`,".eslintrc.cjs":`eslint`,".eslintrc.js":`eslint`,".eslintrc.json":`eslint`,".eslintrc.yaml":`eslint`,".eslintrc.yml":`eslint`,".gitattributes":`git`,".gitignore":`git`,".gitkeep":`git`,".gitmodules":`git`,".oxlintrc.json":`oxc`,".postcssrc":`postcss`,".postcssrc.json":`postcss`,".postcssrc.yaml":`postcss`,".postcssrc.yml":`postcss`,".prettierignore":`prettier`,".prettierrc":`prettier`,".prettierrc.cjs":`prettier`,".prettierrc.js":`prettier`,".prettierrc.json":`prettier`,".prettierrc.mjs":`prettier`,".prettierrc.toml":`prettier`,".prettierrc.yaml":`prettier`,".prettierrc.yml":`prettier`,".stylelintignore":`stylelint`,".stylelintrc":`stylelint`,".stylelintrc.cjs":`stylelint`,".stylelintrc.js":`stylelint`,".stylelintrc.json":`stylelint`,".stylelintrc.mjs":`stylelint`,".stylelintrc.yaml":`stylelint`,".stylelintrc.yml":`stylelint`,".terraform.lock.hcl":`terraform`,".zprofile":`bash`,".zshenv":`bash`,".zshrc":`bash`,"babel.config.cjs":`babel`,"babel.config.js":`babel`,"babel.config.json":`babel`,"babel.config.mjs":`babel`,"biome.json":`biome`,"biome.jsonc":`biome`,"bootstrap.bundle.js":`bootstrap`,"bootstrap.bundle.min.js":`bootstrap`,"bootstrap.css":`bootstrap`,"bootstrap.js":`bootstrap`,"bootstrap.min.css":`bootstrap`,"bootstrap.min.js":`bootstrap`,"bun.lock":`bun`,"bun.lockb":`bun`,"bunfig.toml":`bun`,"claude.md":`claude`,"compose.yaml":`docker`,"compose.yml":`docker`,"docker-compose.override.yml":`docker`,"docker-compose.yaml":`docker`,"docker-compose.yml":`docker`,dockerfile:`docker`,"eslint.config.cjs":`eslint`,"eslint.config.js":`eslint`,"eslint.config.mjs":`eslint`,"eslint.config.mts":`eslint`,"eslint.config.ts":`eslint`,gemfile:`ruby`,"next.config.js":`nextjs`,"next.config.mjs":`nextjs`,"next.config.mts":`nextjs`,"next.config.ts":`nextjs`,"postcss.config.cjs":`postcss`,"postcss.config.js":`postcss`,"postcss.config.mjs":`postcss`,"postcss.config.ts":`postcss`,"prettier.config.cjs":`prettier`,"prettier.config.js":`prettier`,"prettier.config.mjs":`prettier`,rakefile:`ruby`,"readme.md":`markdown`,"stylelint.config.cjs":`stylelint`,"stylelint.config.js":`stylelint`,"stylelint.config.mjs":`stylelint`,"svgo.config.cjs":`svgo`,"svgo.config.js":`svgo`,"svgo.config.mjs":`svgo`,"svgo.config.ts":`svgo`,"tailwind.config.cjs":`tailwind`,"tailwind.config.js":`tailwind`,"tailwind.config.mjs":`tailwind`,"tailwind.config.ts":`tailwind`,"vite.config.js":`vite`,"vite.config.mjs":`vite`,"vite.config.mts":`vite`,"vite.config.ts":`vite`,"webpack.config.babel.js":`webpack`,"webpack.config.cjs":`webpack`,"webpack.config.js":`webpack`,"webpack.config.mjs":`webpack`,"webpack.config.ts":`webpack`},Zu={"7z":`zip`,astro:`astro`,AUTHORS:`text`,avif:`image`,bash:`bash`,bmp:`image`,bz2:`zip`,c:`c`,cc:`cpp`,cfg:`text`,CHANGELOG:`text`,cjs:`javascript`,"code-workspace":`vscode`,conf:`text`,CONTRIBUTORS:`text`,cpp:`cpp`,csh:`bash`,css:`css`,csv:`table`,cts:`typescript`,cxx:`cpp`,db:`database`,editorconfig:`text`,env:`text`,"env.development":`text`,"env.local":`text`,"env.production":`text`,eot:`font`,erb:`ruby`,fish:`bash`,gemspec:`ruby`,gif:`image`,go:`go`,gql:`graphql`,graphql:`graphql`,gz:`zip`,h:`c`,hh:`cpp`,hpp:`cpp`,htm:`html`,html:`html`,hxx:`cpp`,icns:`image`,ico:`image`,ini:`text`,inl:`cpp`,jar:`zip`,jpeg:`image`,jpg:`image`,js:`javascript`,json:`json`,json5:`json`,jsonc:`json`,jsonl:`json`,jsx:`javascript`,ksh:`bash`,less:`css`,LICENSE:`text`,log:`text`,markdown:`markdown`,mcp:`mcp`,md:`markdown`,mdx:`markdown`,"mdx.tsx":`markdown`,mjs:`javascript`,mm:`cpp`,mts:`typescript`,ods:`table`,otf:`font`,png:`image`,postcss:`css`,py:`python`,pyi:`python`,pyw:`python`,pyx:`python`,rake:`ruby`,rar:`zip`,rb:`ruby`,rs:`rust`,rst:`text`,rtf:`text`,sass:`css`,scss:`css`,sh:`bash`,sql:`database`,sqlite:`database`,sqlite3:`database`,styl:`css`,svelte:`svelte`,svg:`svg`,swift:`swift`,tar:`zip`,tf:`terraform`,tfstate:`terraform`,tfvars:`terraform`,tgz:`zip`,tif:`image`,tiff:`image`,ts:`typescript`,tsv:`table`,tsx:`typescript`,ttf:`font`,txt:`text`,vue:`vue`,war:`zip`,wasm:`wasm`,wast:`wasm`,wat:`wasm`,webp:`image`,woff:`font`,woff2:`font`,xhtml:`html`,xls:`table`,xlsx:`table`,xz:`zip`,yaml:`yml`,yml:`yml`,zig:`zig`,zip:`zip`,zsh:`bash`},Qu={jsx:`react`,sass:`sass`,scss:`sass`,tsx:`react`},$u=new Set([`bash`,`c`,`cpp`,`css`,`database`,`default`,`font`,`git`,`go`,`html`,`image`,`javascript`,`json`,`markdown`,`mcp`,`python`,`ruby`,`rust`,`swift`,`table`,`text`,`typescript`,`zip`]),ed=new Set([`complete`]);function td(e){return Yu[e===`none`?`minimal`:e]}function nd(e){return`file-tree-builtin-${e}`}function rd(e){return e!==`none`&&ed.has(e)}function id(e,t,n){if(e===`minimal`||e===`none`)return;let r=e===`complete`,i=Xu[t.toLowerCase()];if(i!=null&&(r||$u.has(i)))return i;for(let e of n){if(r){let t=Qu[e];if(t!=null)return t}let t=Zu[e];if(t!=null&&(r||$u.has(t)))return t}return`default`}var ad=`file-tree-container`,od=`data-file-tree-style`,sd=`data-file-tree-unsafe-css`,cd=`data-file-tree-scrollbar-measure`,ld=`data-file-tree-scrollbar-gutter-measured`,ud=`--trees-scrollbar-gutter-measured`,dd=`header`,fd=`context-menu`,pd=`context-menu-trigger`;function md(e){return e.spriteSheet!=null||e.remap!=null||e.byFileName!=null||e.byFileExtension!=null||e.byFileNameContains!=null}function hd(e){return e==null?{set:`complete`,colored:!0}:typeof e==`string`?{set:e,colored:!0}:{...e,set:e.set??(md(e)?`none`:`complete`),colored:e.colored??!0}}var gd=e=>e.trim().toLowerCase(),_d=e=>e.split(`/`).at(-1)??e,vd=e=>{let t=e.toLowerCase().split(`.`),n=[];for(let e=1;e<t.length;e+=1)n.push(t.slice(e).join(`.`));return n};function yd(e,t){return typeof e==`string`?{name:e,remappedFrom:t}:{...e,remappedFrom:t}}function bd(e){let t=hd(e),n=t.remap,r=new Map;for(let[e,n]of Object.entries(t.byFileName??{}))r.set(e.toLowerCase(),n);let i=new Map;for(let[e,n]of Object.entries(t.byFileExtension??{}))i.set(gd(e),n);let a=Object.entries(t.byFileNameContains??{}).map(([e,t])=>[e.toLowerCase(),t]);return{resolveIcon:(e,o)=>{if(e===`file-tree-icon-file`&&o!=null){let s=_d(o),c=s.toLowerCase(),l=r.get(c);if(l!=null)return yd(l,e);for(let[t,n]of a)if(c.includes(t))return yd(n,e);let u=vd(s);for(let t of u){let n=i.get(t);if(n!=null)return yd(n,e)}let d=id(t.set,s,u);if(d!=null&&t.set!==`none`){if(d==="default"){let t=n?.[e];if(t!=null)return yd(t,e)}return{name:nd(d),remappedFrom:e,token:d}}}let s=n?.[e];return s==null?{name:e}:yd(s,e)}}}var xd=5,Sd=32,Cd=128;function wd(){return{childIdByNameId:new Map,childIds:[],childPositionById:new Map,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function Td(){return{childIdByNameId:null,childIds:[],childPositionById:null,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function Ed(e,t){if(t.childIdByNameId!=null)return t.childIdByNameId;let n=new Map;for(let r of t.childIds){let t=e[r];t!=null&&n.set(t.nameId,r)}return t.childIdByNameId=n,n}function Dd(e){if(e.childPositionById!=null)return e.childPositionById;let t=new Map;for(let n=0;n<e.childIds.length;n++){let r=e.childIds[n];r!=null&&t.set(r,n)}return e.childPositionById=t,t}function Od(e,t){e.childPositionById!=null&&e.childPositionById.set(t,e.childIds.length),e.childIds.push(t)}function kd(e,t){if(e.childPositionById!=null)for(let n=t;n<e.childIds.length;n++){let t=e.childIds[n];t!=null&&e.childPositionById.set(t,n)}}function Ad(e,t){let n=0,r=0;for(let i of t.childIds){let t=e[i];t!=null&&(n+=t.subtreeNodeCount,r+=t.visibleSubtreeCount)}t.totalChildSubtreeNodeCount=n,t.totalChildVisibleSubtreeCount=r,Pd(e,t)}function jd(e,t,n,r){if(e.totalChildSubtreeNodeCount+=n,e.totalChildVisibleSubtreeCount+=r,e.childVisibleChunkSums==null||r===0)return;let i=Dd(e).get(t);if(i===void 0)return;let a=i>>xd;e.childVisibleChunkSums[a]+=r}function Md(e,t,n){let r=t.childVisibleChunkSums;if(r!=null){let i=n,a=0;for(let o of r){if(i<o){let r=Fd(e,t,a,i);return{...r,childVisibleIndex:n-r.localVisibleIndex}}i-=o,a+=Sd}throw Error(`Visible child index ${String(n)} is out of range`)}let i=n;for(let r=0;r<t.childIds.length;r++){let a=t.childIds[r];if(a==null)continue;let o=e[a];if(o!=null){if(i<o.visibleSubtreeCount)return{childIndex:r,childVisibleIndex:n-i,localVisibleIndex:i};i-=o.visibleSubtreeCount}}throw Error(`Visible child index ${String(n)} is out of range`)}function Nd(e,t,n){let r=0,i=t.childVisibleChunkSums,a=0;if(i!=null){let e=n>>xd;for(let t=0;t<e;t+=1)r+=i[t]??0;a=e<<xd}for(let i=a;i<n;i+=1){let n=t.childIds[i];if(n==null)continue;let a=e[n];a!=null&&(r+=a.visibleSubtreeCount)}return r}function Pd(e,t){if(t.childIds.length<Cd){t.childVisibleChunkSums=null;return}let n=Math.ceil(t.childIds.length/Sd),r=new Int32Array(n);for(let n=0;n<t.childIds.length;n++){let i=t.childIds[n];if(i==null)continue;let a=e[i];a!=null&&(r[n>>xd]+=a.visibleSubtreeCount)}t.childVisibleChunkSums=r}function Fd(e,t,n,r){let i=Math.min(t.childIds.length,n+Sd),a=r;for(let r=n;r<i;r++){let n=t.childIds[r];if(n==null)continue;let i=e[n];if(i!=null){if(a<i.visibleSubtreeCount)return{childIndex:r,localVisibleIndex:a};a-=i.visibleSubtreeCount}}throw Error(`Visible child index ${String(r)} is out of range`)}var Id=7,Ld=3,Rd=8,zd=4;function Bd(e,t,n=0){return e<<zd|n<<Ld|t}function Vd(e){return e.depthAndFlags>>>zd}function Hd(e){return(e.depthAndFlags&Rd)>>Ld}function V(e){return(e.depthAndFlags&Rd)!==0}function Ud(e){return e.depthAndFlags&Id}function H(e,t){return(Ud(e)&t)!==0}function Wd(e,t){e.depthAndFlags|=t}function Gd(e,t){e.depthAndFlags=Bd(t,Ud(e),Hd(e))}var Kd=Symbol(`benchmarkInstrumentation`);function qd(e,t){return t==null||Object.defineProperty(e,Kd,{configurable:!0,enumerable:!1,value:t,writable:!1}),e}function Jd(e){return e==null?null:e[Kd]??null}function U(e,t,n){return e==null?n():e.measurePhase(t,n)}function Yd(e,t,n){!Number.isFinite(n)||e==null||e.setCounter(t,n)}function Xd(e){return e>=48&&e<=57}function Zd(e){let t=[],n=0,r=0;for(;r<e.length;){for(;r<e.length&&!Xd(e.charCodeAt(r));)r+=1;if(r>=e.length)break;r>n&&t.push(e.slice(n,r));let i=0;for(;r<e.length&&Xd(e.charCodeAt(r));)i=i*10+(e.charCodeAt(r)-48),r+=1;t.push(i),n=r}return(n<e.length||t.length===0)&&t.push(e.slice(n)),t}function Qd(e){let t=e.toLowerCase();return{lowerValue:t,tokens:Zd(t)}}function $d(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++){let n=e[r],i=t[r];if(n===i)continue;if(typeof n==`number`&&typeof i==`number`)return n<i?-1:1;let a=String(n),o=String(i);if(a!==o)return a<o?-1:1}return e.length===t.length?0:e.length<t.length?-1:1}function ef(e,t){if(e.tokens.length===1&&t.tokens.length===1&&typeof e.tokens[0]==`string`&&typeof t.tokens[0]==`string`)return e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1;let n=$d(e.tokens,t.tokens);return n===0?e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1:n}function tf(e,t,n){let r=ef(n(e),n(t));return r===0?e===t?0:e<t?-1:1:r}function nf(e,t){return tf(e,t,Qd)}function rf(e,t){return t===e.segments.length-1?+!!e.isDirectory:1}function af(e,t){let n=Math.min(e.segments.length,t.segments.length);for(let r=0;r<n;r++){let n=e.segments[r],i=t.segments[r];if(n===i)continue;let a=rf(e,r);return a===rf(t,r)?nf(n,i):a===1?-1:1}return e.segments.length===t.segments.length?e.isDirectory===t.isDirectory?0:e.isDirectory?-1:1:e.segments.length<t.segments.length?-1:1}function of(e,t){return af(e,t)}function sf(e,t,n){let r=e=>{let t=n.get(e);if(t!=null)return t;let r=Qd(e);return n.set(e,r),r},i=Math.min(e.segments.length,t.segments.length);for(let n=0;n<i;n++){let i=e.segments[n],a=t.segments[n];if(i===a)continue;let o=rf(e,n);return o===rf(t,n)?tf(i,a,r):o===1?-1:1}return e.segments.length===t.segments.length?e.isDirectory===t.isDirectory?0:e.isDirectory?-1:1:e.segments.length<t.segments.length?-1:1}function cf(e,t){let n=e.sortKeyById[t];if(n!==void 0)return n;let r=e.valueById[t],i=Qd(r);return e.sortKeyById[t]=i,i}function lf(e={}){return{flattenEmptyDirectories:e.flattenEmptyDirectories!==!1,sort:e.sort??`default`}}function uf(e){let t=e.length>0&&e.charCodeAt(e.length-1)===47,n=t?e.length-1:e.length,r=[],i=0;for(let t=0;t<n;t++)e.charCodeAt(t)===47&&(r.push(e.slice(i,t)),i=t+1);return r.push(e.slice(i,n)),{hasTrailingSlash:t,segments:r}}function df(e){let{hasTrailingSlash:t,segments:n}=uf(e);return{basename:n[n.length-1]??``,isDirectory:t,path:e,segments:n}}function ff(e){if(e.length===0)return{requiresDirectory:!1,segments:[]};let{hasTrailingSlash:t,segments:n}=uf(e);return{requiresDirectory:t,segments:n}}function pf(){let e=new Map;return e.set(``,0),{idByValue:e,valueById:[``],sortKeyById:[Qd(``)]}}function mf(e,t){let n=e.idByValue.get(t);if(n!==void 0)return n;let r=e.valueById.length;return e.idByValue.set(t,r),e.valueById.push(t),r}function hf(e,t){let n=e.valueById[t];if(n===void 0)throw Error(`Unknown segment ID: ${String(t)}`);return n}var gf=Symbol(`pathStorePreparedInputKind`);function _f(e,t){return e[gf]=t,e}function vf(e){return{basename:e.basename,depth:e.segments.length,isDirectory:e.isDirectory,path:e.path,segments:e.segments}}function yf(e,t,n){return n==="default"?of(e,t):n(vf(e),vf(t))}function bf(){return{depthAndFlags:Bd(0,3,1),nameId:0,parentId:0,subtreeNodeCount:1,visibleSubtreeCount:1}}function xf(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++)if(e[r]!==t[r])return r;return n}function Sf(e){return e.isDirectory?e.segments.length:e.segments.length-1}function Cf(e){return Array.isArray(e)&&e.every(e=>typeof e==`object`&&!!e&&typeof e.path==`string`&&Array.isArray(e.segments)&&typeof e.basename==`string`&&typeof e.isDirectory==`boolean`)}function wf(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function Tf(e,t={}){return jf(e,t).map(e=>e.path)}function Ef(e,t={}){let n=jf(e,t);return _f({paths:n.map(e=>e.path),preparedPaths:n},`prepared`)}function Df(e){let t=e.length,n=!1;for(let r=0;r<t;r+=1){let t=e[r];if(t.length>0&&t.charCodeAt(t.length-1)===47){n=!0;break}}return _f({paths:e,presortedPaths:e,presortedPathsContainDirectories:n},`presorted`)}function Of(e){let t=e,n=t.preparedPaths;if(t[gf]===`prepared`&&n!=null)return n;if(!Cf(n))throw Error(`preparedInput must come from PathStore.prepareInput()`);return n}function kf(e){let t=e;return t[gf]===`presorted`&&t.presortedPaths!=null||wf(t.presortedPaths)?t.presortedPaths:null}function Af(e){let t=e;return typeof t.presortedPathsContainDirectories==`boolean`?t.presortedPathsContainDirectories:null}function jf(e,t={}){let n=lf(t),r=Jd(t);Yd(r,`workload.inputFiles`,e.length);let i=U(r,`store.preparePathEntries.parse`,()=>e.map(e=>df(e)));return U(r,`store.preparePathEntries.sort`,()=>i.sort((e,t)=>yf(e,t,n.sort))),i}var Mf=class{directories=new Map;directoryStack=[0];presortedDirectoryNodeIds=[];initialExpandedPathSet;createdDirectoriesAllExpanded=!1;createdDirectoryCount=0;lastPreparedPath=null;nodes=[bf()];options;instrumentation;segmentSortKeyCache=new Map;segmentTable=pf();hasDeferredDirectoryIndexes=!1;constructor(e={}){this.instrumentation=Jd(e),this.options=lf(e);let t=e.initialExpandedPaths??null;if(t==null||t.length===0)this.initialExpandedPathSet=null;else{let e=new Set,n=t.length;for(let r=0;r<n;r+=1){let n=t[r],i=n.length;e.add(i>0&&n.charCodeAt(i-1)===47?n.slice(0,i-1):n)}this.initialExpandedPathSet=e,this.createdDirectoriesAllExpanded=!0}this.directories.set(0,wd())}appendPaths(e){return U(this.instrumentation,`store.builder.appendPaths.parse`,()=>this.appendPreparedPaths(e.map(e=>df(e))))}appendPreparedPaths(e,t=!0){return this.createdDirectoriesAllExpanded=!1,U(this.instrumentation,`store.builder.appendPreparedPaths`,()=>{for(let n of e)this.appendPreparedPath(n,t)}),this}appendPresortedPaths(e,t=null){return U(this.instrumentation,`store.builder.appendPresortedPaths`,()=>{if(t===!1){this.appendPresortedFilePaths(e);return}this.createdDirectoriesAllExpanded=!1;let n=null,r=0,i=this.nodes,a=this.segmentTable,o=a.idByValue,s=a.valueById,c=this.directoryStack,l=0,u=``,d=0;for(let t of e){if(n===t)throw Error(`Duplicate path: "${t}"`);let e=t.length>0&&t.charCodeAt(t.length-1)===47,a=e?t.length-1:t.length,f=0,p=0;if(n!=null)if(u.length>0&&t.length>u.length&&t.startsWith(u))f=d,p=u.length;else{let r=Math.min(a,n.length),i=!0;for(let e=0;e<r;e++){let r=t.charCodeAt(e);if(r!==n.charCodeAt(e)){i=!1;break}r===47&&(f++,p=e+1)}i&&e&&r===a&&n.length>a&&n.charCodeAt(a)===47&&(f++,p=a+1)}l=f,r=f;let m=p,h=t.indexOf(`/`,m);for(;h>=0&&h<a;){let e=c[l];if(e===void 0)throw Error(`Directory stack underflow while building the path store`);r++;let n=t.slice(m,h),a=o.get(n);a===void 0&&(a=s.length,o.set(n,a),s.push(n));let u=i.length;i.push({depthAndFlags:Bd(r,0,1),nameId:a,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),this.recordCreatedDirectoryPath(t.slice(0,h)),l++,c[l]=u,m=h+1,h=t.indexOf(`/`,m)}if(e){if(m<a){let e=c[l];if(e===void 0)throw Error(`Unable to resolve directory parent for "${t}"`);r++;let n=t.slice(m,a),u=o.get(n);u===void 0&&(u=s.length,o.set(n,u),s.push(n));let d=i.length;i.push({depthAndFlags:Bd(r,0,1),nameId:u,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),l++,c[l]=d,m=a+1}let e=c[l];if(e===void 0)throw Error(`Unable to resolve directory node for "${t}"`);this.promoteDirectoryToExplicit(e,t)}else{let e=c[l];if(e===void 0)throw Error(`Unable to resolve file parent for "${t}"`);let n=t.slice(m),a=o.get(n);a===void 0&&(a=s.length,o.set(n,a),s.push(n)),i.push({depthAndFlags:Bd(r+1,0),nameId:a,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1})}m!==u.length&&(u=t.substring(0,m),d=r),n=t}c.length=l+1,n!=null&&(this.lastPreparedPath=df(n)),this.hasDeferredDirectoryIndexes=!0}),this}appendPresortedFilePaths(e){let t=null,n=0,r=this.nodes,i=this.segmentTable,a=i.idByValue,o=i.valueById,s=this.directoryStack,c=0,l=``,u=0;for(let i of e){if(t===i)throw Error(`Duplicate path: "${i}"`);let e=i.length,d=0,f=0;if(t!=null)if(l.length>0&&i.length>l.length&&i.startsWith(l))d=u,f=l.length;else{let n=Math.min(e,t.length);for(let e=0;e<n;e++){let n=i.charCodeAt(e);if(n!==t.charCodeAt(e))break;n===47&&(d++,f=e+1)}}c=d,n=d;let p=f,m=i.indexOf(`/`,p);for(;m>=0;){let e=s[c];if(e===void 0)throw Error(`Directory stack underflow while building the path store`);n++;let t=i.slice(p,m),l=a.get(t);l===void 0&&(l=o.length,a.set(t,l),o.push(t));let u=r.length;r.push({depthAndFlags:Bd(n,0,1),nameId:l,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),this.recordCreatedDirectoryPath(i.slice(0,m)),this.presortedDirectoryNodeIds.push(u),c++,s[c]=u,p=m+1,m=i.indexOf(`/`,p)}let h=s[c];if(h===void 0)throw Error(`Unable to resolve file parent for "${i}"`);let g=i.slice(p),_=a.get(g);_===void 0&&(_=o.length,a.set(g,_),o.push(g)),r.push({depthAndFlags:Bd(n+1,0),nameId:_,parentId:h,subtreeNodeCount:1,visibleSubtreeCount:1}),p!==l.length&&(l=i.substring(0,p),u=n),t=i}s.length=c+1,t!=null&&(this.lastPreparedPath=df(t)),this.hasDeferredDirectoryIndexes=!0}finish(e={}){let t=e.skipSubtreeCountPass===!0;return this.hasDeferredDirectoryIndexes?(U(this.instrumentation,`store.builder.buildDirectoryIndexes`,()=>this.buildPresortedFinish(t)),this.hasDeferredDirectoryIndexes=!1):t||U(this.instrumentation,`store.builder.computeSubtreeCounts`,()=>this.computeSubtreeCounts(0)),{directories:this.directories,nodes:this.nodes,options:this.options,rootId:0,segmentTable:this.segmentTable,presortedDirectoryNodeIds:this.presortedDirectoryNodeIds.length>0?this.presortedDirectoryNodeIds:null}}didMatchAllInitialExpandedPaths(){return this.createdDirectoriesAllExpanded&&this.initialExpandedPathSet!=null&&this.createdDirectoryCount===this.initialExpandedPathSet.size}appendPreparedPath(e,t){if(this.hasDeferredDirectoryIndexes&&=(this.buildDirectoryIndexes(),!1),this.lastPreparedPath!=null){if(e.path===this.lastPreparedPath.path)throw Error(`Duplicate path: "${e.path}"`);if(t&&(this.options.sort==="default"?sf(this.lastPreparedPath,e,this.segmentSortKeyCache):yf(this.lastPreparedPath,e,this.options.sort))>0)throw Error(`Builder input must be sorted before appendPaths(): "${e.path}"`)}let n=this.lastPreparedPath,r=Sf(e),i=n==null?0:Sf(n),a=n==null?0:xf(n.segments,e.segments),o=Math.min(a,r,i);this.directoryStack.length=o+1;for(let n=o;n<r;n++){let r=this.directoryStack[this.directoryStack.length-1];if(r===void 0)throw Error(`Directory stack underflow while building the path store`);let i=t?this.getOrCreateDirectoryChild(r,e.segments[n]):this.createDirectoryChild(r,e.segments[n]);this.directoryStack.push(i)}if(e.isDirectory){let t=this.directoryStack[this.directoryStack.length-1];if(t===void 0)throw Error(`Unable to resolve directory node for "${e.path}"`);this.promoteDirectoryToExplicit(t,e.path),this.lastPreparedPath=e;return}let s=this.directoryStack[this.directoryStack.length-1];if(s===void 0)throw Error(`Unable to resolve file parent for "${e.path}"`);t?this.createFileChild(s,e.basename,e.path):this.createFileChildUnchecked(s,e.basename),this.lastPreparedPath=e}recordCreatedDirectoryPath(e){!this.createdDirectoriesAllExpanded||this.initialExpandedPathSet==null||(this.createdDirectoryCount+=1,this.initialExpandedPathSet.has(e)||(this.createdDirectoriesAllExpanded=!1))}createFileChild(e,t,n){let r=mf(this.segmentTable,t),i=this.getDirectoryIndex(e),a=i.childIdByNameId;if(a!=null&&a.get(r)!==void 0)throw Error(`Path collides with an existing entry: "${n}"`);let o=this.nodes[e];if(o===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let s=this.nodes.length;return this.nodes.push({depthAndFlags:Bd(Vd(o)+1,0),nameId:r,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),a?.set(r,s),Od(i,s),s}createFileChildUnchecked(e,t){let n=mf(this.segmentTable,t),r=this.getDirectoryIndex(e),i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:Bd(Vd(i)+1,0),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),Od(r,a),a}getOrCreateDirectoryChild(e,t){let n=mf(this.segmentTable,t),r=this.getDirectoryIndex(e);if(r.childIdByNameId!=null){let e=r.childIdByNameId.get(n);if(e!==void 0){let n=this.nodes[e];if(n!=null&&!V(n))throw Error(`Path collides with an existing file while creating directory "${t}"`);return e}}let i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:Bd(Vd(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),Od(r,a),this.directories.set(a,wd()),a}createDirectoryChild(e,t){let n=mf(this.segmentTable,t),r=this.getDirectoryIndex(e),i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:Bd(Vd(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),Od(r,a),this.directories.set(a,wd()),a}promoteDirectoryToExplicit(e,t){let n=this.nodes[e];if(n===void 0)throw Error(`Unknown directory node ID: ${String(e)}`);if(!V(n))throw Error(`Path is not a directory: "${t}"`);if(H(n,1))throw Error(`Duplicate path: "${t}"`);Wd(n,1)}getDirectoryIndex(e){let t=this.directories.get(e);if(t!==void 0)return t;throw Error(`Unknown directory child index for node ${String(e)}`)}buildPresortedFinish(e){let t=this.nodes,n=this.directories;n.set(0,Td());let r=-1,i=null;for(let e=1;e<t.length;e++){let a=t[e];if(a==null)continue;if(V(a)){let t=Td();n.set(e,t),r=e,i=t}let o;a.parentId===r?o=i:(o=n.get(a.parentId),r=a.parentId,i=o??null),o?.childIds.push(e)}if(!e)for(let e=t.length-1;e>=1;e--){let n=t[e];if(n==null)continue;let r=t[n.parentId];r!=null&&(r.subtreeNodeCount+=n.subtreeNodeCount,r.visibleSubtreeCount+=n.visibleSubtreeCount)}}buildDirectoryIndexes(){let e=this.nodes;for(let t=1;t<e.length;t++){let n=e[t];if(n==null)continue;V(n)&&this.directories.set(t,wd());let r=this.directories.get(n.parentId);r!=null&&(r.childIdByNameId!=null&&r.childIdByNameId.set(n.nameId,t),Od(r,t))}}computeSubtreeCounts(e){let t=this.nodes[e];if(t===void 0)throw Error(`Unknown node ID: ${String(e)}`);if(!V(t))return t.subtreeNodeCount=1,t.visibleSubtreeCount=1,1;let n=this.getDirectoryIndex(e),r=1;for(let e of n.childIds)r+=this.computeSubtreeCounts(e);return Ad(this.nodes,n),t.subtreeNodeCount=r,t.visibleSubtreeCount=r,r}};function Nf(e,t=`closed`,n=null){let r=Ff(t);return{activeNodeCount:e.nodes.length-1,collapsedDirectoryIds:new Set,collapseNewDirectoriesByDefault:!1,defaultExpansion:r,directoriesOpenByDefault:r===`open`,hasCollapsedDirectoryOverrides:!1,directoryLoadInfoById:new Map,expandedDirectoryIds:new Set,instrumentation:n,listeners:new Map,pathCacheByNodeId:new Map([[e.rootId,{path:``,version:0}]]),pathCacheVersion:0,snapshot:e,transactionStack:[]}}function Pf(){return{affectedAncestorIds:new Set,affectedNodeIds:new Set,events:[]}}function Ff(e){if(typeof e!=`number`)return e;if(!Number.isInteger(e)||e<0)throw Error(`initialExpansion must be "open", "closed", or a non-negative integer depth. Received: ${String(e)}`);return e}function If(e,t){return H(t,2)||e.defaultExpansion===`open`?!0:e.defaultExpansion!==`closed`&&Vd(t)<=e.defaultExpansion}function Lf(e,t,n=e.snapshot.nodes[t]){return n==null||!V(n)?!1:e.directoriesOpenByDefault&&!e.hasCollapsedDirectoryOverrides?!0:e.collapsedDirectoryIds.has(t)?!1:e.expandedDirectoryIds.has(t)?!0:If(e,n)}function Rf(e,t,n,r=e.snapshot.nodes[t]){if(r==null||!V(r))return;let i=If(e,r);if(n){if(i){e.collapsedDirectoryIds.delete(t),e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0;return}e.expandedDirectoryIds.add(t);return}if(i){e.collapsedDirectoryIds.add(t),e.hasCollapsedDirectoryOverrides=!0;return}e.expandedDirectoryIds.delete(t)}function zf(e,t){let n=e.directoryLoadInfoById.get(t);if(n!=null)return n;let r={activeAttemptId:null,errorMessage:null,nextAttemptId:1,state:`loaded`};return e.directoryLoadInfoById.set(t,r),r}function Bf(e,t){return e.directoryLoadInfoById.get(t)?.state??`loaded`}function Vf(e,t){let n=zf(e,t);if(n.state===`loading`&&n.activeAttemptId!=null)return{attemptId:n.activeAttemptId,nodeId:t,reused:!0};let r=n.nextAttemptId;return n.activeAttemptId=r,n.errorMessage=null,n.nextAttemptId+=1,n.state=`loading`,{attemptId:r,nodeId:t,reused:!1}}function Hf(e,t){let n=zf(e,t);n.activeAttemptId=null,n.errorMessage=null,n.state=`unloaded`}function Uf(e,t,n){let r=e.directoryLoadInfoById.get(t);return r==null||r.activeAttemptId!==n?!1:(r.activeAttemptId=null,r.errorMessage=null,r.state=`loaded`,!0)}function Wf(e,t,n){return e.directoryLoadInfoById.get(t)?.activeAttemptId===n}function Gf(e,t,n,r){let i=e.directoryLoadInfoById.get(t);return i==null||i.activeAttemptId!==n?!1:(i.activeAttemptId=null,i.errorMessage=r??null,i.state=`error`,!0)}function Kf(e,t){e.directoryLoadInfoById.delete(t)}function qf(e,t,n){let r=n,i=e.listeners.get(t);return i==null?e.listeners.set(t,new Set([r])):i.add(r),()=>{let n=e.listeners.get(t);n!=null&&(n.delete(r),n.size===0&&e.listeners.delete(t))}}function Jf(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`add`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function Yf(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`remove`,path:e.path,projectionChanged:e.projectionChanged,recursive:e.recursive,visibleCountDelta:null}}function Xf(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,from:e.from,operation:`move`,projectionChanged:e.projectionChanged,to:e.to,visibleCountDelta:null}}function Zf(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`expand`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function Qf(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`collapse`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function $f(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`mark-directory-unloaded`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function ep(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,operation:`begin-child-load`,path:e.path,projectionChanged:e.projectionChanged,reused:e.reused,visibleCountDelta:null}}function tp(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:e.childEvents.some(e=>e.canonicalChanged),childEvents:e.childEvents,operation:`apply-child-patch`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function np(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,operation:`complete-child-load`,path:e.path,projectionChanged:e.projectionChanged,stale:e.stale,visibleCountDelta:null}}function rp(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,errorMessage:e.errorMessage,operation:`fail-child-load`,path:e.path,projectionChanged:e.projectionChanged,stale:e.stale,visibleCountDelta:null}}function ip(e){return{activeNodeCountAfter:e.activeNodeCountAfter,activeNodeCountBefore:e.activeNodeCountBefore,affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],cachedPathEntryCountAfter:e.cachedPathEntryCountAfter,cachedPathEntryCountBefore:e.cachedPathEntryCountBefore,canonicalChanged:!1,idsPreserved:e.idsPreserved,loadInfoEntryCountAfter:e.loadInfoEntryCountAfter,loadInfoEntryCountBefore:e.loadInfoEntryCountBefore,mode:e.mode,operation:`cleanup`,projectionChanged:e.projectionChanged,reclaimedCachedPathEntryCount:e.reclaimedCachedPathEntryCount,reclaimedLoadInfoEntryCount:e.reclaimedLoadInfoEntryCount,reclaimedNodeSlotCount:e.reclaimedNodeSlotCount,reclaimedSegmentCount:e.reclaimedSegmentCount,segmentCountAfter:e.segmentCountAfter,segmentCountBefore:e.segmentCountBefore,totalNodeSlotCountAfter:e.totalNodeSlotCountAfter,totalNodeSlotCountBefore:e.totalNodeSlotCountBefore,visibleCountDelta:null}}function ap(e,t,n){return{...n,visibleCountDelta:gp(e)-t}}function op(e,t){let n=gp(e),r=Pf();e.transactionStack.push(r);try{t()}catch(t){throw lp(e,r,!1),t}lp(e,r,!0,gp(e)-n)}function sp(e,t){let n=e.instrumentation;if(n==null){cp(e,t);return}U(n,`store.events.record`,()=>cp(e,t))}function cp(e,t){let n=e.transactionStack[e.transactionStack.length-1]??null;if(n==null){mp(e,t);return}n.events.push(t),pp(n,t)}function lp(e,t,n,r=null){if(e.transactionStack.pop()!==t)throw Error(`Transaction stack underflow`);if(!n)return;let i=e.transactionStack[e.transactionStack.length-1]??null;if(i!=null){let n=e.instrumentation;n==null?fp(i,t):U(n,`store.events.batch.merge`,()=>fp(i,t));return}let a=up(t,r),o=e.instrumentation;if(o==null){mp(e,a);return}U(o,`store.events.batch.commit`,()=>mp(e,a))}function up(e,t){return{affectedAncestorIds:[...e.affectedAncestorIds],affectedNodeIds:[...e.affectedNodeIds],canonicalChanged:e.events.some(e=>e.canonicalChanged),events:[...e.events],operation:`batch`,projectionChanged:e.events.some(e=>e.projectionChanged),visibleCountDelta:t}}function dp(e,t){for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n);for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n)}function fp(e,t){for(let n of t.events)e.events.push(n);dp(e,t)}function pp(e,t){for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n);for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n)}function mp(e,t){let n=e.instrumentation;if(n==null){hp(e,t);return}U(n,`store.events.emit`,()=>hp(e,t))}function hp(e,t){e.listeners.get(t.operation)?.forEach(e=>e(t)),e.listeners.get(`*`)?.forEach(e=>e(t))}function gp(e){return e.snapshot.nodes[e.snapshot.rootId]?.visibleSubtreeCount??0}function _p(e,t){if(e.snapshot.options.flattenEmptyDirectories!==!0)return null;let n=e.snapshot.nodes[t];if(n==null||!V(n)||H(n,2))return null;let r=e.snapshot.directories.get(t);if(r==null||r.childIds.length!==1)return null;let i=r.childIds[0];if(i==null)return null;let a=e.snapshot.nodes[i];return a==null||!V(a)?null:i}function vp(e,t){let n=t;for(;;){let t=_p(e,n);if(t==null)return n;n=t}}function yp(e,t){let n=[t],r=t;for(;;){let t=_p(e,r);if(t==null)return n;n.push(t),r=t}}function bp(e,t){let n=t==null?e.snapshot.rootId:kp(e,t);return n==null?[]:jp(e,n)}function xp(e,t){let n=df(t),r=n.isDirectory?n.segments:n.segments.slice(0,-1),i=Kp(e,Gp(e,r)),{createdNodeIds:a,directoryId:o}=Mp(e,r),s=new Set(a),c=o;if(n.isDirectory){let n=K(e,o);if(H(n,1))throw Error(`Path already exists: "${t}"`);Wd(n,1),e.pathCacheByNodeId.set(o,{path:t,version:e.pathCacheVersion}),s.add(o)}else c=Pp(e,o,n.basename),s.add(c);Ep(e,o);let l=Kp(e,o);return Jf({affectedAncestorIds:Op(e,c),affectedNodeIds:[...s],path:t,projectionChanged:qp(i,l)})}function Sp(e,t,n){let r=kp(e,t);if(r==null)throw Error(`Path does not exist: "${t}"`);let i=K(e,r);if(H(i,2))throw Error(`The root node cannot be removed`);if(V(i)&&G(e,r).childIds.length>0&&n.recursive!==!0)throw Error(`Cannot remove a non-empty directory without recursive: "${t}"`);let a=i.parentId,o=Kp(e,a),s=Up(e,r);Lp(e,a,r,i.nameId),Wp(e,a),Ep(e,a);let c=Kp(e,a);return Yf({affectedAncestorIds:Op(e,a),affectedNodeIds:s,path:t,projectionChanged:qp(o,c),recursive:n.recursive===!0})}function Cp(e,t,n,r){let i=kp(e,t);if(i==null)throw Error(`Source path does not exist: "${t}"`);let a=K(e,i);if(H(a,2))throw Error(`The root node cannot be moved`);let o=r.collision??`error`,s=Vp(e,i,n),c=Kp(e,a.parentId),l=Kp(e,s.parentId),u=hf(e.snapshot.segmentTable,a.nameId),d=mf(e.snapshot.segmentTable,s.basename);if(s.parentId===a.parentId&&u===s.basename)return null;if(V(a)&&Zp(e,i,s.parentId))throw Error(`Cannot move a directory into one of its descendants`);let f=Ed(e.snapshot.nodes,G(e,s.parentId)).get(d),p=s.existingNodeId??f??null;if(p!=null&&p!==i&&Hp(e,p,o,Hd(a))===`skip`)return null;let m=a.parentId;Lp(e,m,i,a.nameId),a.parentId=s.parentId,a.nameId=d,e.pathCacheByNodeId.delete(i),Xp(e,i),Ip(e,s.parentId,i),Wp(e,m),e.pathCacheVersion++,Ep(e,m),s.parentId!==m&&Ep(e,s.parentId);let h=Kp(e,m),g=Kp(e,s.parentId);return Xf({affectedAncestorIds:[...new Set([...Op(e,m),...Op(e,s.parentId)])],affectedNodeIds:[i],from:t,projectionChanged:Jp([c,l],[h,g]),to:W(e,i)})}function wp(e,t){let n=e.pathCacheByNodeId.get(t);return n!=null&&n.version===e.pathCacheVersion?n.path:null}function Tp(e,t,n){return e.pathCacheByNodeId.set(t,{path:n,version:e.pathCacheVersion}),n}function W(e,t){let n=K(e,t),r=wp(e,t);if(r!=null)return r;if(H(n,2))return Tp(e,t,``);let i=W(e,n.parentId),a=hf(e.snapshot.segmentTable,n.nameId),o=i.length===0?a:`${i}${a}`;return Tp(e,t,V(n)?`${o}/`:o)}function Ep(e,t){let n=e.instrumentation;if(n==null){$p(e,t);return}U(n,`store.recomputeCountsUpwardFrom`,()=>$p(e,t))}function Dp(e,t){let n=[[t,0]],{nodes:r,directories:i}=e.snapshot;for(;n.length>0;){let t=n[n.length-1],a=t[0],o=r[a];if(o==null||!V(o)){Qp(e,a,o,!0),n.pop();continue}let s=i.get(a);if(s==null||t[1]>=s.childIds.length){Qp(e,a,o,!0),n.pop();continue}let c=s.childIds[t[1]++];n.push([c,0])}}function Op(e,t){let n=[],r=t;for(;r!=null;){let t=K(e,r);if(n.push(r),r===e.snapshot.rootId)break;r=t.parentId}return n}function kp(e,t){if(t.length===0)return e.snapshot.rootId;let n=ff(t);return Ap(e,n.segments,n.requiresDirectory)}function Ap(e,t,n){let r=e.snapshot.rootId;for(let n of t){let t=e.snapshot.segmentTable.idByValue.get(n);if(t===void 0)return null;let i=G(e,r),a=Ed(e.snapshot.nodes,i).get(t);if(a===void 0)return null;r=a}let i=K(e,r);return n&&!V(i)?null:r}function G(e,t){let n=e.snapshot.directories.get(t);if(n===void 0)throw Error(`Unknown directory child index for node ${String(t)}`);return n}function K(e,t){let n=e.snapshot.nodes[t];if(n===void 0||H(n,4))throw Error(`Unknown node ID: ${String(t)}`);return n}function jp(e,t){let n=e.snapshot.nodes[t];if(n===void 0||H(n,4))return[];if(!V(n))return[W(e,t)];if(G(e,t).childIds.length===0)return H(n,1)&&!H(n,2)?[W(e,t)]:[];let r=[],i=[{childIndex:0,nodeId:t}];for(;i.length>0;){let t=i[i.length-1];if(t==null)break;let n=e.snapshot.nodes[t.nodeId];if(n===void 0||H(n,4)){i.pop();continue}if(!V(n)){r.push(W(e,t.nodeId)),i.pop();continue}let a=G(e,t.nodeId);if(a.childIds.length===0){H(n,1)&&!H(n,2)&&r.push(W(e,t.nodeId)),i.pop();continue}let o=a.childIds[t.childIndex];if(o==null){i.pop();continue}t.childIndex++,i.push({childIndex:0,nodeId:o})}return r}function Mp(e,t){let n=[],r=e.snapshot.rootId;for(let i of t){let t=mf(e.snapshot.segmentTable,i),a=G(e,r),o=Ed(e.snapshot.nodes,a).get(t);if(o!==void 0){if(!V(K(e,o)))throw Error(`Cannot create a directory that collides with an existing file: "${i}"`);r=o;continue}r=Np(e,r,t),n.push(r)}return{createdNodeIds:n,directoryId:r}}function Np(e,t,n){let r=K(e,t),i=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:Bd(Vd(r)+1,0,1),nameId:n,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),e.snapshot.directories.set(i,wd()),Ip(e,t,i),e.collapseNewDirectoriesByDefault&&(e.collapsedDirectoryIds.add(i),e.hasCollapsedDirectoryOverrides=!0),e.activeNodeCount++,i}function Pp(e,t,n){let r=mf(e.snapshot.segmentTable,n),i=G(e,t);if(Ed(e.snapshot.nodes,i).has(r))throw Error(`Path already exists: "${tm(e,t,n)}"`);let a=K(e,t),o=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:Bd(Vd(a)+1,0),nameId:r,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),Ip(e,t,o),e.activeNodeCount++,o}function Fp(e,t,n){let r=0,i=t.childIds.length;for(;r<i;){let a=r+i>>>1,o=t.childIds[a];if(o==null){i=a;continue}Rp(e,n,o)<0?i=a:r=a+1}return r}function Ip(e,t,n){let r=G(e,t),i=K(e,n);Ed(e.snapshot.nodes,r).set(i.nameId,n),jd(r,n,i.subtreeNodeCount,i.visibleSubtreeCount);let a=Fp(e,r,n);r.childIds.splice(a,0,n),kd(r,a),Pd(e.snapshot.nodes,r)}function Lp(e,t,n,r){let i=G(e,t),a=Dd(i),o=a.get(n)??-1;Ed(e.snapshot.nodes,i).delete(r),a.delete(n);let s=e.snapshot.nodes[n];s!=null&&jd(i,n,-s.subtreeNodeCount,-s.visibleSubtreeCount),o>=0&&(i.childIds.splice(o,1),kd(i,o),Pd(e.snapshot.nodes,i))}function Rp(e,t,n){let r=e.snapshot.options.sort;return r==="default"?zp(e,t,n):r(Bp(e,t),Bp(e,n))}function zp(e,t,n){let r=K(e,t),i=K(e,n),a=V(r);if(a!==V(i))return a?-1:1;let o=ef(cf(e.snapshot.segmentTable,r.nameId),cf(e.snapshot.segmentTable,i.nameId));if(o!==0)return o;let s=hf(e.snapshot.segmentTable,r.nameId),c=hf(e.snapshot.segmentTable,i.nameId);return s===c?t<n?-1:1:s<c?-1:1}function Bp(e,t){let n=K(e,t),r=W(e,t),i=V(n),a=i?r.slice(0,-1):r;return{basename:hf(e.snapshot.segmentTable,n.nameId),depth:Vd(n),isDirectory:i,path:r,segments:a.length===0?[]:a.split(`/`)}}function Vp(e,t,n){let r=K(e,t),i=kp(e,n);if(i!=null){let t=K(e,i);if(V(t))return{basename:hf(e.snapshot.segmentTable,r.nameId),existingNodeId:null,parentId:i};let a=ff(n).segments;return{basename:a[a.length-1]??``,existingNodeId:i,parentId:t.parentId}}let a=ff(n),o=a.segments[a.segments.length-1]??``,s=a.segments.slice(0,-1),c=s.length===0?e.snapshot.rootId:Ap(e,s,!0);if(c==null)throw Error(`Destination parent does not exist: "${n}"`);return{basename:o,existingNodeId:null,parentId:c}}function Hp(e,t,n,r){if(n===`skip`)return`skip`;if(n===`error`)throw Error(`Destination already exists: "${W(e,t)}"`);let i=K(e,t);if(Hd(i)!==r)throw Error(`replace collision requires the same source and destination kinds`);if(V(i)&&G(e,t).childIds.length>0)throw Error(`replace collision does not support non-empty directories`);let a=i.parentId,o=i.nameId;return Up(e,t),Lp(e,a,t,o),Wp(e,a),Ep(e,a),`handled`}function Up(e,t){let n=[],r=[{nodeId:t,visitedChildren:!1}];for(;r.length>0;){let t=r.pop();if(t==null)break;let i=K(e,t.nodeId);if(t.visitedChildren||!V(i)){V(i)&&e.snapshot.directories.delete(t.nodeId),Wd(i,4),e.pathCacheByNodeId.delete(t.nodeId),e.collapsedDirectoryIds.delete(t.nodeId)&&(e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0),e.expandedDirectoryIds.delete(t.nodeId),Kf(e,t.nodeId),e.activeNodeCount--,n.push(t.nodeId);continue}r.push({nodeId:t.nodeId,visitedChildren:!0});let a=G(e,t.nodeId);for(let e=a.childIds.length-1;e>=0;e--){let t=a.childIds[e];t!=null&&r.push({nodeId:t,visitedChildren:!1})}}return n}function Wp(e,t){let n=t;for(;n!=null;){let t=K(e,n);if(!V(t)||H(t,2)||G(e,n).childIds.length>0)return;Wd(t,1),n=t.parentId===n?null:t.parentId}}function Gp(e,t){let n=e.snapshot.rootId;for(let r of t){let t=e.snapshot.segmentTable.idByValue.get(r);if(t==null)break;let i=Ed(e.snapshot.nodes,G(e,n)).get(t);if(i==null||!V(K(e,i)))break;n=i}return n}function Kp(e,t){let n=Yp(e,t);if(n==null)return null;let r=vp(e,n),i=K(e,r),a=n===r?null:yp(e,n).map(t=>W(e,t));return JSON.stringify({flattenedSegmentPaths:a,hasChildren:G(e,r).childIds.length>0,path:W(e,r),terminalKind:Hd(i)})}function qp(e,t){return Jp([e],[t])}function Jp(e,t){for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(r==null||i==null||r!==i)return!0}return!1}function Yp(e,t){let n=t;for(;n!=null;){let t=K(e,n);if(!V(t)||H(t,2))return null;if(!Lf(e,n,t))return n;n=t.parentId}return null}function Xp(e,t){let n=K(e,t);if(Gd(n,(t===e.snapshot.rootId?-1:Vd(K(e,n.parentId)))+1),!V(n))return;let r=G(e,t);for(let t of r.childIds)Xp(e,t)}function Zp(e,t,n){let r=n;for(;r!=null;){if(r===t)return!0;let n=K(e,r);if(r===e.snapshot.rootId)return!1;r=n.parentId}return!1}function Qp(e,t,n=K(e,t),r=!1){let i=e.instrumentation;if(i==null){em(e,t,n,r);return}U(i,`store.recomputeNodeCounts`,()=>em(e,t,n,r))}function $p(e,t){let n=t;for(;n!=null;){let t=K(e,n),r=t.subtreeNodeCount,i=t.visibleSubtreeCount;if(Qp(e,n,t),n===e.snapshot.rootId)return;let a=t.subtreeNodeCount-r,o=t.visibleSubtreeCount-i,s=t.parentId;(a!==0||o!==0)&&jd(G(e,s),n,a,o),n=s}}function em(e,t,n,r){if(!V(n)){n.subtreeNodeCount=1,n.visibleSubtreeCount=1;return}let i=G(e,t);if(r){let t=e.instrumentation;t==null?Ad(e.snapshot.nodes,i):U(t,`store.recomputeNodeCounts.rebuildChildAggregates`,()=>Ad(e.snapshot.nodes,i))}let a=1+i.totalChildSubtreeNodeCount,o=i.totalChildVisibleSubtreeCount;if(n.subtreeNodeCount=a,H(n,2)){n.visibleSubtreeCount=o;return}n.visibleSubtreeCount=_p(e,t)==null?Lf(e,t,n)?1+o:1:o}function tm(e,t,n){let r=W(e,t);return r.length===0?n:`${r}${n}`}function nm(e){return e!=null&&!H(e,4)}function rm(e,t){let n=e.snapshot.nodes[t];return!nm(n)||!V(n)||H(n,2)?null:n}function im(e){let t=0;for(let[n,r]of e.pathCacheByNodeId)r.version===e.pathCacheVersion&&nm(e.snapshot.nodes[n])&&(t+=1);return t}function am(e){return Math.max(0,e.valueById.length-1)}function om(e){return{activeNodeCount:e.activeNodeCount,cachedPathEntryCount:im(e),loadInfoEntryCount:e.directoryLoadInfoById.size,segmentCount:am(e.snapshot.segmentTable),totalNodeSlotCount:Math.max(0,e.snapshot.nodes.length-1)}}function sm(e,t,n,r){return{activeNodeCountAfter:r.activeNodeCount,activeNodeCountBefore:n.activeNodeCount,cachedPathEntryCountAfter:r.cachedPathEntryCount,cachedPathEntryCountBefore:n.cachedPathEntryCount,idsPreserved:t,loadInfoEntryCountAfter:r.loadInfoEntryCount,loadInfoEntryCountBefore:n.loadInfoEntryCount,mode:e,reclaimedCachedPathEntryCount:n.cachedPathEntryCount-r.cachedPathEntryCount,reclaimedLoadInfoEntryCount:n.loadInfoEntryCount-r.loadInfoEntryCount,reclaimedNodeSlotCount:n.totalNodeSlotCount-r.totalNodeSlotCount,reclaimedSegmentCount:n.segmentCount-r.segmentCount,segmentCountAfter:r.segmentCount,segmentCountBefore:n.segmentCount,totalNodeSlotCountAfter:r.totalNodeSlotCount,totalNodeSlotCountBefore:n.totalNodeSlotCount}}function cm(e){let t=[],n=[];for(let n of e.collapsedDirectoryIds)rm(e,n)!=null&&t.push(W(e,n));for(let t of e.expandedDirectoryIds)rm(e,t)!=null&&n.push(W(e,t));return{collapsedPaths:t,expandedPaths:n}}function lm(e){let t=[];for(let[n,r]of e.directoryLoadInfoById)rm(e,n)!=null&&Bf(e,n)!==`loaded`&&t.push({info:{activeAttemptId:null,errorMessage:r.errorMessage,nextAttemptId:r.nextAttemptId,state:r.state},path:W(e,n)});return t}function um(e,t){e.collapsedDirectoryIds.clear(),e.hasCollapsedDirectoryOverrides=!1,e.expandedDirectoryIds.clear();for(let n of t.expandedPaths){let t=kp(e,n);t!=null&&Rf(e,t,!0,K(e,t))}for(let n of t.collapsedPaths){let t=kp(e,n);t!=null&&Rf(e,t,!1,K(e,t))}}function dm(e,t){e.directoryLoadInfoById.clear();for(let n of t){let t=kp(e,n.path);t!=null&&rm(e,t)!=null&&e.directoryLoadInfoById.set(t,{activeAttemptId:null,errorMessage:n.info.errorMessage,nextAttemptId:n.info.nextAttemptId,state:n.info.state})}}function fm(e){e.pathCacheVersion+=1,e.pathCacheByNodeId.clear(),e.pathCacheByNodeId.set(e.snapshot.rootId,{path:``,version:e.pathCacheVersion})}function pm(e){let t=e.snapshot.segmentTable,n=pf();for(let r of e.snapshot.nodes)if(nm(r)){if(H(r,2)){r.nameId=0;continue}r.nameId=mf(n,hf(t,r.nameId))}e.snapshot.segmentTable=n}function mm(e){for(let[t,n]of e.snapshot.directories){let r=e.snapshot.nodes[t];if(!nm(r)||!V(r)){e.snapshot.directories.delete(t);continue}let i=n.childIds.filter(n=>{let r=e.snapshot.nodes[n];return nm(r)&&r.parentId===t});n.childIds=i,n.childIdByNameId=new Map(i.map(t=>[K(e,t).nameId,t])),n.childPositionById=new Map(i.map((e,t)=>[e,t])),Ad(e.snapshot.nodes,n)}}function hm(e){let t=e.snapshot.nodes.length-1;for(;t>e.snapshot.rootId;){let n=e.snapshot.nodes[t];if(nm(n))break;--t}e.snapshot.nodes.length=t+1}function gm(e){let t=cm(e),n=lm(e);U(e.instrumentation,`store.cleanup.stable.clearPathCaches`,()=>fm(e)),U(e.instrumentation,`store.cleanup.stable.rebuildSegmentTable`,()=>pm(e)),U(e.instrumentation,`store.cleanup.stable.rebuildDirectoryIndexes`,()=>mm(e)),U(e.instrumentation,`store.cleanup.stable.trimTrailingRemovedNodeSlots`,()=>hm(e)),U(e.instrumentation,`store.cleanup.stable.restoreExpansionOverrides`,()=>um(e,t)),U(e.instrumentation,`store.cleanup.stable.restoreDirectoryLoadInfos`,()=>dm(e,n)),U(e.instrumentation,`store.cleanup.stable.recomputeCounts`,()=>Dp(e,e.snapshot.rootId))}function _m(e){let t=cm(e),n=lm(e),r=U(e.instrumentation,`store.cleanup.aggressive.listPaths`,()=>bp(e)),i=qd({...e.snapshot.options},e.instrumentation),a=U(e.instrumentation,`store.cleanup.aggressive.rebuildSnapshot`,()=>{let e=new Mf(i);return e.appendPaths(r),e.finish()});e.snapshot=a,e.activeNodeCount=a.nodes.length-1,e.pathCacheByNodeId=new Map([[a.rootId,{path:``,version:0}]]),e.pathCacheVersion=0,U(e.instrumentation,`store.cleanup.aggressive.restoreExpansionOverrides`,()=>um(e,t)),U(e.instrumentation,`store.cleanup.aggressive.restoreDirectoryLoadInfos`,()=>dm(e,n)),U(e.instrumentation,`store.cleanup.aggressive.recomputeCounts`,()=>Dp(e,e.snapshot.rootId))}function vm(e){for(let t of e.directoryLoadInfoById.values())if(t.state===`loading`&&t.activeAttemptId!=null)return!0;return!1}function ym(e,t){let n=om(e);t===`stable`?U(e.instrumentation,`store.cleanup.stable`,()=>gm(e)):U(e.instrumentation,`store.cleanup.aggressive`,()=>_m(e));let r=om(e);return sm(t,t===`stable`,n,r)}var bm=64;function xm(e,t){let n=t+2;if(n<=e.length)return e;let r=e.length;for(;r<n;)r*=2;let i=new Int32Array(r);return i.fill(-1),i.set(e),i}function q(e){return K(e,e.snapshot.rootId).visibleSubtreeCount}function Sm(e,t,n,r){let i=K(e,t.terminalNodeId),a=Math.max(1,i.visibleSubtreeCount);return Math.min(r-1,n+a-1)}function Cm(e,t,n,r){return{ancestorPaths:r,index:t.index,posInSet:t.posInSet,row:Hm(e,t.cursor),setSize:t.setSize,subtreeEndIndex:Sm(e,t.cursor,t.index,n)}}function wm(e,t,n,r,i,a){let o=G(e,t),{childIndex:s,childVisibleIndex:c,localVisibleIndex:l}=Md(e.snapshot.nodes,o,n),u=o.childIds[s];if(u==null)throw Error(`Visible index ${String(n)} is out of range`);return Tm(e,u,l,r+c,i+1,s,o.childIds.length,a)}function Tm(e,t,n,r,i,a,o,s){if(!V(K(e,t))){if(n===0)return{ancestors:s,cursor:{headNodeId:t,terminalNodeId:t,visibleDepth:i},index:r,posInSet:a,setSize:o};throw Error(`Visible index ${String(n)} is out of range for file`)}let c=Im(e,t,i);if(n===0)return{ancestors:s,cursor:c,index:r,posInSet:a,setSize:o};let l=K(e,c.terminalNodeId);if(!V(l)||!Lf(e,c.terminalNodeId,l))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return wm(e,c.terminalNodeId,n-1,r+1,c.visibleDepth,[...s,{cursor:c,index:r,posInSet:a,setSize:o}])}function Em(e,t){let n=q(e);if(t<0||t>=n)return null;let r=wm(e,e.snapshot.rootId,t,0,-1,[]),i=r.ancestors.map(t=>W(e,t.cursor.terminalNodeId)),a=null;return{ancestorPaths:i,get ancestorRows(){if(a!=null)return a;let t=[],i=[];for(let a of r.ancestors){let r=Cm(e,a,n,[...i]);t.push(r),i.push(r.row.path)}return a=t,a},index:r.index,posInSet:r.posInSet,row:Hm(e,r.cursor),setSize:r.setSize,subtreeEndIndex:Sm(e,r.cursor,r.index,n)}}function Dm(e,t,n){let r=e.instrumentation,i=q(e);if(i<=0||n<t)return[];let a=Math.max(0,Math.min(t,i-1)),o=Math.max(a,Math.min(n,i-1));if(r==null){if(a===0)return Vm(e,o+1);let t=[],n=Nm(e,a);for(let r=a;r<=o&&n!=null;r++){let r=Hm(e,n);t.push(r),n=Rm(e,n)}return t}let s=[],c=0,l=0,u=U(r,`store.getVisibleSlice.selectFirstRow`,()=>Nm(e,a));for(let t=a;t<=o&&u!=null;t++){let t=U(r,`store.getVisibleSlice.materializeRow`,()=>Hm(e,u));s.push(t),t.isFlattened&&(c++,l+=t.flattenedSegments?.length??0),u=U(r,`store.getVisibleSlice.advanceCursor`,()=>Rm(e,u))}return Yd(r,`workload.visibleRowsRead`,s.length),Yd(r,`workload.flattenedRowsRead`,c),Yd(r,`workload.flattenedSegmentsRead`,l),s}function Om(e,t=q(e)){let n=e.instrumentation;return n==null?Bm(e,t):U(n,`store.getVisibleTreeProjection`,()=>Bm(e,t))}function km(e){return zm(Om(e))}function Am(e,t){let n=kp(e,t);if(n==null||n===e.snapshot.rootId||V(K(e,n))&&vp(e,n)!==n)return null;let r=0,i=n,{nodes:a,rootId:o}=e.snapshot;for(;i!==o;){let t=K(e,i).parentId,n=G(e,t),s=Dd(n).get(i);if(s==null)throw Error(`Child ${String(i)} was not found in its parent index`);if(r+=Nd(a,n,s),t!==o){let n=K(e,t),a=_p(e,t);if(!Lf(e,t,n)&&a!==i)return null;vp(e,t)===t&&(r+=1)}i=t}return r}function jm(e,t){let n=kp(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=K(e,n);if(!V(r))throw Error(`Path is not a directory: "${t}"`);return Lf(e,n,r)?null:(Rf(e,n,!0,r),Ep(e,n),Zf({affectedAncestorIds:Op(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0}))}function Mm(e,t){let n=kp(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=K(e,n);if(!V(r))throw Error(`Path is not a directory: "${t}"`);return Lf(e,n,r)?(Rf(e,n,!1,r),Ep(e,n),Qf({affectedAncestorIds:Op(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0})):null}function Nm(e,t){return t<0||t>=q(e)?null:Pm(e,e.snapshot.rootId,t,-1)}function Pm(e,t,n,r){let i=G(e,t),a=e.instrumentation,{childIndex:o,localVisibleIndex:s}=a==null?Md(e.snapshot.nodes,i,n):U(a,`store.getVisibleSlice.selectChildIndex`,()=>Md(e.snapshot.nodes,i,n)),c=i.childIds[o];if(c!=null)return Fm(e,c,s,r+1);throw Error(`Visible index ${String(n)} is out of range`)}function Fm(e,t,n,r){if(!V(K(e,t))){if(n===0)return{headNodeId:t,terminalNodeId:t,visibleDepth:r};throw Error(`Visible index ${String(n)} is out of range for file`)}let i=Im(e,t,r);if(n===0)return i;let a=K(e,i.terminalNodeId);if(!V(a)||!Lf(e,i.terminalNodeId,a))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return Pm(e,i.terminalNodeId,n-1,i.visibleDepth)}function Im(e,t,n){return V(K(e,t))?e.instrumentation==null?{headNodeId:t,terminalNodeId:vp(e,t),visibleDepth:n}:{headNodeId:t,terminalNodeId:U(e.instrumentation,`store.getVisibleSlice.flatten.resolveTerminalDirectory`,()=>vp(e,t)),visibleDepth:n}:{headNodeId:t,terminalNodeId:t,visibleDepth:n}}function Lm(e,t){let n=K(e,t);if(!V(n))return!0;let r=n.parentId;return r===e.snapshot.rootId||_p(e,r)!==t}function Rm(e,t){let n=K(e,t.terminalNodeId);if(V(n)){let r=G(e,t.terminalNodeId);if(Lf(e,t.terminalNodeId,n)&&r.childIds.length>0){let n=r.childIds[0];return n==null?null:Fm(e,n,0,t.visibleDepth+1)}}let r=t.terminalNodeId,i=t.visibleDepth;for(;;){let t=K(e,r);if(r===e.snapshot.rootId)return null;let n=t.parentId,a=G(e,n),o=Dd(a).get(r)??-1;if(o<0)throw Error(`Child ${String(r)} was not found in its parent index`);let s=a.childIds[o+1]??null;if(s!=null)return Fm(e,s,0,i);Lm(e,r)&&i--,r=n}}function zm(e){let t=e.paths.length,n=Array(t);for(let r=0;r<t;r+=1){let t=e.getParentIndex(r);n[r]={index:r,parentPath:t>=0?e.paths[t]??null:null,path:e.paths[r]??``,posInSet:e.posInSetByIndex[r]??0,setSize:e.setSizeByIndex[r]??0}}return{getParentIndex:e.getParentIndex,rows:n,get visibleIndexByPath(){return e.visibleIndexByPath}}}function Bm(e,t){let n=Array(t),r=new Int32Array(t),i=new Int32Array(t),a=new Int32Array(t),o=new Int32Array(bm);o.fill(-1);let s=0,{nodes:c,directories:l,segmentTable:u}=e.snapshot,d=[[l.get(e.snapshot.rootId),0,-1,``]],f=e.snapshot.options.flattenEmptyDirectories,p=e.pathCacheByNodeId,m=e.pathCacheVersion,h=u.valueById;for(;d.length>0&&s<t;){let t=d[d.length-1],u=t[0];if(t[1]>=u.childIds.length){d.pop();continue}let g=t[1],_=u.childIds[t[1]++],v=c[_],y=t[2]+1,b=t[3];o=xm(o,y);let x,S=_;if(V(v))S=f?vp(e,_):_,x=S===_?`${b}${h[v.nameId]}/`:W(e,S);else{let e=p.get(_);x=e!=null&&e.version===m?e.path:`${b}${h[v.nameId]}`}r[s]=o[y],n[s]=x,i[s]=g,a[s]=u.childIds.length,o[y+1]=s,s+=1;let C=c[S];C!=null&&V(C)&&Lf(e,S,C)&&d.push([l.get(S),0,y,x])}s<t&&(n.length=s);let g=r.subarray(0,s),_=i.subarray(0,s),v=a.subarray(0,s),y=null;return{getParentIndex(e){return e<0||e>=s?-1:g[e]??-1},paths:n,posInSetByIndex:_,setSizeByIndex:v,get visibleIndexByPath(){if(y==null){y=new Map;for(let e=0;e<s;e+=1)y.set(n[e]??``,e)}return y}}}function Vm(e,t){let n=Array(t),r=0,{nodes:i,directories:a,segmentTable:o}=e.snapshot,s=[[a.get(e.snapshot.rootId),0,-1]],c=o.valueById,l=e.snapshot.options.flattenEmptyDirectories,u=e.pathCacheByNodeId,d=e.pathCacheVersion;for(;s.length>0&&r<t;){let t=s[s.length-1],o=t[0];if(t[1]>=o.childIds.length){s.pop();continue}let f=o.childIds[t[1]++],p=i[f],m=t[2]+1;if(!V(p)){let t=u.get(f);n[r++]={depth:m,flattenedSegments:void 0,hasChildren:!1,id:f,isExpanded:!1,isFlattened:!1,isLoading:!1,kind:`file`,loadState:void 0,name:c[p.nameId],path:t!=null&&t.version===d?t.path:W(e,f)};continue}let h=l?vp(e,f):f,g={headNodeId:f,terminalNodeId:h,visibleDepth:m};n[r++]=Hm(e,g);let _=i[h];_!=null&&V(_)&&Lf(e,h,_)&&s.push([a.get(h),0,m])}return r<t&&(n.length=r),n}function Hm(e,t){let n=K(e,t.terminalNodeId),r=V(n)?Um(e,t):null,i=W(e,t.terminalNodeId),a=hf(e.snapshot.segmentTable,n.nameId),o=V(n)&&G(e,t.terminalNodeId).childIds.length>0,s=t.headNodeId!==t.terminalNodeId,c=e.instrumentation,l=s?c==null?yp(e,t.headNodeId).map(n=>{let r=K(e,n);return{isTerminal:n===t.terminalNodeId,name:hf(e.snapshot.segmentTable,r.nameId),nodeId:n,path:W(e,n)}}):U(c,`store.getVisibleSlice.flatten.collectSegments`,()=>yp(e,t.headNodeId).map(n=>{let r=K(e,n);return{isTerminal:n===t.terminalNodeId,name:hf(e.snapshot.segmentTable,r.nameId),nodeId:n,path:W(e,n)}})):void 0;return{depth:t.visibleDepth,flattenedSegments:l,hasChildren:o,id:t.terminalNodeId,isExpanded:V(n)&&Lf(e,t.terminalNodeId,n),isFlattened:s,isLoading:r===`loading`,kind:V(n)?`directory`:`file`,loadState:r==null||r===`loaded`?void 0:r,name:a,path:i}}function Um(e,t){if(t.headNodeId===t.terminalNodeId)return Bf(e,t.terminalNodeId);let n=yp(e,t.headNodeId),r=!1,i=!1;for(let t of n){let n=Bf(e,t);if(n===`loading`)return`loading`;if(n===`error`){i=!0;continue}n===`unloaded`&&(r=!0)}return i?`error`:r?`unloaded`:`loaded`}var Wm=8;function Gm(e){let{nodes:t,directories:n,rootId:r,options:i}=e,a=t.length,o=new Int32Array(a),s=new Int32Array(a),c=new Int32Array(a),l=new Int32Array(a),u=new Int32Array(a),d=new Int32Array(a),f=new Int32Array(a);for(let e=0;e<a;e+=1){let n=t[e];n!=null&&(o[e]=n.parentId,s[e]=n.nameId,c[e]=n.depthAndFlags,l[e]=n.subtreeNodeCount,u[e]=n.visibleSubtreeCount)}let p=0;for(let e of n.values())p+=e.childIds.length;let m=new Int32Array(p),h=0;for(let[e,t]of n){let n=t.childIds;d[e]=h,f[e]=n.length;for(let e=0;e<n.length;e+=1)m[h]=n[e],h+=1}return{nodeCount:a,rootId:r,flattenEmptyDirectories:i.flattenEmptyDirectories===!0,parentId:o,nameId:s,depthAndFlags:c,subtreeNodeCount:l,visibleSubtreeCount:u,childStart:d,childCount:f,childIdsFlat:m}}function Km(e){let{nodeCount:t,rootId:n,flattenEmptyDirectories:r,depthAndFlags:i,subtreeNodeCount:a,visibleSubtreeCount:o,childStart:s,childCount:c,childIdsFlat:l}=e;for(let e=t-1;e>=1;--e){if((i[e]&Wm)===0)continue;let t=s[e],n=c[e],u=0,d=0;for(let e=0;e<n;e+=1){let n=l[t+e];u+=a[n],d+=o[n]}a[e]=1+u;let f;f=r&&n===1?(i[l[t]]&Wm)===0?1+d:d:1+d,o[e]=f}let u=s[n],d=c[n],f=0,p=0;for(let e=0;e<d;e+=1){let t=l[u+e];f+=a[t],p+=o[t]}a[n]=1+f,o[n]=p}function qm(e){let{directories:t,nodes:n,options:r,rootId:i,presortedDirectoryNodeIds:a}=e.snapshot,o=r.flattenEmptyDirectories===!0,s=e=>{let r=n[e];if(r==null||!V(r))return;let i=t.get(e);if(i==null)throw Error(`Unknown directory child index for node ${String(e)}`);let a=i.childIds,s=a.length,c=0,l=0;for(let e=0;e<s;e++){let t=a[e];if(t==null)continue;let r=n[t];c+=r.subtreeNodeCount,l+=r.visibleSubtreeCount}i.totalChildSubtreeNodeCount=c,i.totalChildVisibleSubtreeCount=l,s>=128&&Pd(n,i),r.subtreeNodeCount=1+c;let u;if(o&&s===1){let e=n[a[0]];u=e!=null&&V(e)?l:1+l}else u=1+l;r.visibleSubtreeCount=u};if(a!=null)for(let e=a.length-1;e>=0;e--)s(a[e]);else for(let e=n.length-1;e>=1;e--)s(e);let c=n[i],l=t.get(i);if(c==null||l==null)return;let u=l.childIds,d=0,f=0;for(let e=0;e<u.length;e++){let t=u[e];if(t==null)continue;let r=n[t];d+=r.subtreeNodeCount,f+=r.visibleSubtreeCount}l.totalChildSubtreeNodeCount=d,l.totalChildVisibleSubtreeCount=f,Pd(n,l),c.subtreeNodeCount=1+d,c.visibleSubtreeCount=f}function Jm(e){let{directories:t,nodes:n,rootId:r}=e.snapshot,i=Gm(e.snapshot);Km(i);let a=i.subtreeNodeCount,o=i.visibleSubtreeCount;for(let e=0;e<n.length;e+=1){let t=n[e];t!=null&&(t.subtreeNodeCount=a[e],t.visibleSubtreeCount=o[e])}for(let[e,i]of t){let t=i.childIds,a=t.length,o=0,s=0;for(let e=0;e<a;e++){let r=t[e];if(r==null)continue;let i=n[r];o+=i.subtreeNodeCount,s+=i.visibleSubtreeCount}i.totalChildSubtreeNodeCount=o,i.totalChildVisibleSubtreeCount=s,(e===r||a>=128)&&Pd(n,i)}}function Ym(e){return e.initialExpansion===`open`&&(e.initialExpandedPaths==null||e.initialExpandedPaths.length===0)}var Xm=class e{#e;constructor(e={}){let t=Jd(e),n=U(t,`store.builder.create`,()=>new Mf(e));if(e.preparedInput!=null){let t=kf(e.preparedInput);t==null?n.appendPreparedPaths(Of(e.preparedInput),!1):n.appendPresortedPaths(t,Af(e.preparedInput))}else{let r=e.paths??[];e.presorted===!0?n.appendPaths(r):n.appendPreparedPaths(U(t,`store.preparePathEntries`,()=>jf(r,e)))}let r=U(t,`store.builder.finish`,()=>n.finish({skipSubtreeCountPass:!0})),i=U(t,`store.state.detectAllDirectoriesExpanded`,()=>(e.initialExpansion??`closed`)===`closed`&&n.didMatchAllInitialExpandedPaths());this.#e=U(t,`store.state.create`,()=>Nf(r,i?`open`:e.initialExpansion??`closed`,t)),i&&(this.#e.collapseNewDirectoriesByDefault=!0);let a=i?this.#e.snapshot.directories.size-1:U(t,`store.state.initializeExpandedPaths`,()=>this.initializeExpandedPaths(e.initialExpandedPaths));i||Ym(e)||(e.initialExpansion??`closed`)===`closed`&&a===this.#e.snapshot.directories.size-1||(e.initialExpandedPaths?.length??0)>0&&U(t,`store.state.checkAllDirectoriesExpanded`,()=>this.hasAllDirectoriesExpanded())?e.useSoaCountSweep===!0?U(t,`store.state.initializeOpenVisibleCountsViaSoa`,()=>Jm(this.#e)):U(t,`store.state.initializeOpenVisibleCounts`,()=>qm(this.#e)):U(t,`store.state.recomputeCounts`,()=>Dp(this.#e,this.#e.snapshot.rootId))}static preparePaths(e,t={}){return Tf(e,t)}static prepareInput(e,t={}){return Ef(e,t)}static preparePresortedInput(e){return Df(e)}list(e){return U(this.#e.instrumentation,`store.list`,()=>bp(this.#e,e))}add(e){U(this.#e.instrumentation,`store.add`,()=>{let t=q(this.#e);sp(this.#e,ap(this.#e,t,xp(this.#e,e)))})}remove(e,t={}){U(this.#e.instrumentation,`store.remove`,()=>{let n=q(this.#e);sp(this.#e,ap(this.#e,n,Sp(this.#e,e,t)))})}move(e,t,n={}){U(this.#e.instrumentation,`store.move`,()=>{let r=q(this.#e),i=Cp(this.#e,e,t,n);i!=null&&sp(this.#e,ap(this.#e,r,i))})}batch(e){op(this.#e,()=>{if(typeof e==`function`){e(this);return}for(let t of e)switch(t.type){case`add`:this.add(t.path);break;case`remove`:this.remove(t.path,{recursive:t.recursive});break;case`move`:this.move(t.from,t.to,{collision:t.collision});break}})}getVisibleCount(){return U(this.#e.instrumentation,`store.getVisibleCount`,()=>q(this.#e))}getVisibleSlice(e,t){return U(this.#e.instrumentation,`store.getVisibleSlice`,()=>Dm(this.#e,e,t))}getVisibleRowContext(e){return U(this.#e.instrumentation,`store.getVisibleRowContext`,()=>Em(this.#e,e))}getVisibleTreeProjection(){return km(this.#e)}getVisibleTreeProjectionData(e){return Om(this.#e,e)}getVisibleIndex(e){return U(this.#e.instrumentation,`store.getVisibleIndex`,()=>Am(this.#e,e))}getPathInfo(e){return U(this.#e.instrumentation,`store.getPathInfo`,()=>{let t=kp(this.#e,e);if(t==null)return null;let n=K(this.#e,t);return{depth:Vd(n),kind:V(n)?`directory`:`file`,path:W(this.#e,t)}})}isExpanded(e){return U(this.#e.instrumentation,`store.isExpanded`,()=>{let t=this.requireDirectoryNodeId(e),n=K(this.#e,t);return Lf(this.#e,t,n)})}expand(e){U(this.#e.instrumentation,`store.expand`,()=>{let t=q(this.#e),n=jm(this.#e,e);n!=null&&sp(this.#e,ap(this.#e,t,n))})}collapse(e){U(this.#e.instrumentation,`store.collapse`,()=>{let t=q(this.#e),n=Mm(this.#e,e);n!=null&&sp(this.#e,ap(this.#e,t,n))})}on(e,t){return qf(this.#e,e,t)}getDirectoryLoadState(e){let t=this.requireDirectoryNodeId(e);return Bf(this.#e,t)}markDirectoryUnloaded(e){U(this.#e.instrumentation,`store.markDirectoryUnloaded`,()=>{let t=this.requireDirectoryNodeId(e);if(G(this.#e,t).childIds.length>0)throw Error(`Cannot mark a directory with known children as unloaded: "${e}"`);let n=q(this.#e);Hf(this.#e,t),sp(this.#e,ap(this.#e,n,$f({affectedAncestorIds:Op(this.#e,t),affectedNodeIds:[t],path:e,projectionChanged:this.isDirectoryProjectionVisible(t)})))})}beginChildLoad(e){return U(this.#e.instrumentation,`store.beginChildLoad`,()=>{let t=this.requireDirectoryNodeId(e),n=q(this.#e),r=Vf(this.#e,t);return sp(this.#e,ap(this.#e,n,ep({affectedAncestorIds:Op(this.#e,t),affectedNodeIds:[t],attemptId:r.attemptId,path:e,projectionChanged:this.isDirectoryProjectionVisible(t),reused:r.reused}))),r})}applyChildPatch(e,t){return U(this.#e.instrumentation,`store.applyChildPatch`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null||Bf(this.#e,n)!==`loading`||!Wf(this.#e,n,e.attemptId))return!1;let r=W(this.#e,n);this.validateChildPatch(r,t);let i=q(this.#e),a=[];for(let e of t.operations){Zm(r,e);let t=q(this.#e);switch(e.type){case`add`:a.push(ap(this.#e,t,xp(this.#e,e.path)));break;case`remove`:a.push(ap(this.#e,t,Sp(this.#e,e.path,{recursive:e.recursive})));break;case`move`:{let n=Cp(this.#e,e.from,e.to,{collision:e.collision});n!=null&&a.push(ap(this.#e,t,n));break}}}let o=a.some(e=>e.projectionChanged)||this.isDirectoryProjectionVisible(n);return sp(this.#e,ap(this.#e,i,tp({affectedAncestorIds:Op(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,childEvents:a,path:W(this.#e,n),projectionChanged:o}))),!0})}completeChildLoad(e){return U(this.#e.instrumentation,`store.completeChildLoad`,()=>{let t=this.resolveActiveDirectoryNodeId(e.nodeId);if(t==null)return!1;let n=q(this.#e),r=Uf(this.#e,t,e.attemptId);return sp(this.#e,ap(this.#e,n,np({affectedAncestorIds:Op(this.#e,t),affectedNodeIds:[t],attemptId:e.attemptId,path:W(this.#e,t),projectionChanged:this.isDirectoryProjectionVisible(t),stale:!r}))),r})}failChildLoad(e,t){return U(this.#e.instrumentation,`store.failChildLoad`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null)return!1;let r=q(this.#e),i=Gf(this.#e,n,e.attemptId,t);return sp(this.#e,ap(this.#e,r,rp({affectedAncestorIds:Op(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,errorMessage:t,path:W(this.#e,n),projectionChanged:this.isDirectoryProjectionVisible(n),stale:!i}))),i})}cleanup(e={}){return U(this.#e.instrumentation,`store.cleanup`,()=>{if(this.#e.transactionStack.length>0)throw Error(`Cleanup cannot run during an open batch or transaction.`);if(vm(this.#e))throw Error(`Cleanup cannot run while directory loads are active.`);let t=q(this.#e),n=ym(this.#e,e.mode??`stable`);return sp(this.#e,ap(this.#e,t,ip({...n,affectedAncestorIds:[],affectedNodeIds:[],projectionChanged:n.idsPreserved===!1}))),n})}getNodeCount(){return this.#e.activeNodeCount}initializeExpandedPaths(e){if(e==null||e.length===0)return 0;let t=0,n=[],r=[],i=0,a=null,o=this.#e.snapshot.segmentTable,s=o.valueById,c=this.#e.snapshot.nodes,l=new Map;for(let u of e){a!=null&&u<a&&(a=null,i=0,n.length=0,r.length=0);let e=u.length>0&&u.charCodeAt(u.length-1)===47?u.length-1:u.length;if(e===0){a=u,i=e,n.length=0,r.length=0;continue}let d=0,f=0;if(a!=null){let t=Math.min(e,i),n=!0;for(let e=0;e<t;e+=1){let t=u.charCodeAt(e);if(t!==a.charCodeAt(e)){n=!1;break}t===47&&(d+=1,f=e+1)}n&&(t===i&&e>t&&u.charCodeAt(t)===47?(d+=1,f=t+1):t===e&&i>t&&a.charCodeAt(t)===47&&(d+=1,f=e+1)),d=Math.min(d,r.length)}let p=d===0?this.#e.snapshot.rootId:r[d-1]??this.#e.snapshot.rootId,m=d,h=!0,g=f;for(;g<=e;){let t=u.indexOf(`/`,g),i=t===-1||t>e?e:t,a=u.slice(g,i),f=G(this.#e,p).childIds,_=m===d?n[m]??0:0,v=_,y,b=l.get(a)??Qd(a);l.set(a,b);let x=(e,t)=>{for(v=e;v<t;v+=1){let e=f[v],t=c[e],n=s[t.nameId];if(n===a)return y=e,!0;let r=ef(cf(o,t.nameId),b);if(r>0||r===0&&n>a)return!1}return!1};if(!x(_,f.length)&&_>0&&x(0,_),y===void 0){h=!1;break}if(!V(K(this.#e,y))){h=!1;break}if(n[m]=v,r[m]=y,p=y,m+=1,i===e)break;g=i+1}if(a=u,i=e,n.length=m,r.length=m,!h){a=null,i=0,n.length=0,r.length=0;continue}for(let e=d;e<m;e+=1){let n=r[e];if(n==null)continue;let i=K(this.#e,n);Lf(this.#e,n,i)||(Rf(this.#e,n,!0,i),t+=1)}}return t}hasAllDirectoriesExpanded(){for(let e of this.#e.snapshot.directories.keys()){if(e===this.#e.snapshot.rootId)continue;let t=K(this.#e,e);if(!Lf(this.#e,e,t))return!1}return!0}requireDirectoryNodeId(e){let t=kp(this.#e,e);if(t==null)throw Error(`Path does not exist: "${e}"`);if(!V(K(this.#e,t)))throw Error(`Path is not a directory: "${e}"`);return t}resolveActiveDirectoryNodeId(e){try{if(!V(K(this.#e,e)))throw Error(`Node is not a directory: ${String(e)}`);return e}catch{return null}}isDirectoryProjectionVisible(e){let t=e;for(;t!==this.#e.snapshot.rootId;){let e=K(this.#e,t).parentId;if(e!==this.#e.snapshot.rootId){let n=K(this.#e,e),r=_p(this.#e,e);if(!Lf(this.#e,e,n)&&r!==t)return!1}t=e}return!0}validateChildPatch(t,n){new e({paths:this.list(t),presorted:!0,sort:this.#e.snapshot.options.sort}).batch(n.operations)}};function Zm(e,t){switch(t.type){case`add`:case`remove`:if(!t.path.startsWith(e)||t.path===e)throw Error(`Child patch operation must stay within ${e}: "${t.path}"`);break;case`move`:if(!t.from.startsWith(e)||!t.to.startsWith(e)||t.from===e||t.to===e)throw Error(`Child patch move must stay within ${e}: "${t.from}" -> "${t.to}"`)}}function Qm(e,t={}){return Xm.prepareInput(e,t)}var $m={compact:{itemHeight:24,factor:.8},default:{itemHeight:30,factor:1},relaxed:{itemHeight:36,factor:1.2}};function eh(e,t){if(typeof e==`number`)return{itemHeight:t??$m.default.itemHeight,factor:e};let n=$m[e??`default`];return{itemHeight:t??n.itemHeight,factor:n.factor}}var th=$m.default.itemHeight,nh=`@layer base {
|
|
5343
5400
|
:host {
|
|
5344
5401
|
--trees-accent: var(--trees-accent-override, #009fff);
|
|
5345
5402
|
--trees-fg: var(--trees-fg-override, var(--trees-theme-sidebar-fg, light-dark(#6c6c71, #adadb1)));
|
|
@@ -6431,13 +6488,13 @@ slicc-dock-tree .dock-tree__preview--active {
|
|
|
6431
6488
|
}
|
|
6432
6489
|
|
|
6433
6490
|
@layer theme, unsafe;
|
|
6434
|
-
`,
|
|
6491
|
+
`,rh=`@layer base, unsafe;`;function ih(e){return`${rh}
|
|
6435
6492
|
@layer base {
|
|
6436
6493
|
${e}
|
|
6437
|
-
}`}function
|
|
6494
|
+
}`}function ah(e){return`${rh}
|
|
6438
6495
|
@layer unsafe {
|
|
6439
6496
|
${e}
|
|
6440
|
-
}`}var Hm=new WeakMap;function Um(e){let t=Hm.get(e);if(t!=null)return t;let n=document.createElement(`div`);n.setAttribute(Wu,`true`);let r=document.createElement(`div`);r.style.position=`relative`,r.style.height=`200%`,n.appendChild(r),e.appendChild(n);let i=Math.max(n.offsetWidth-n.clientWidth,0);return n.remove(),Hm.set(e,i),i}function Wm(e,t){if(!e.isConnected)return;let n=Um(t);if(n==null)return;let r=t.querySelector(`style[${Gu}]`),i=r instanceof HTMLStyleElement?r:document.createElement(`style`);r instanceof HTMLStyleElement||(i.setAttribute(Gu,``),t.appendChild(i)),i.textContent=`:host { ${Ku}: ${n}px; }`}var Gm;function Km(e){if(typeof CSSStyleSheet<`u`&&typeof CSSStyleSheet.prototype.replaceSync==`function`&&`adoptedStyleSheets`in e){Gm??(Gm=new CSSStyleSheet,Gm.replaceSync(Bm(Rm)));let t=!1;try{e.adoptedStyleSheets=[Gm],t=!0}catch{}if(t){e.querySelector(`style[${Hu}]`)?.remove();return}}if(e.querySelector(`style[data-file-tree-style]`)==null){let t=document.createElement(`style`);t.setAttribute(Hu,``),t.textContent=Bm(Rm),e.prepend(t)}}function qm(e,t){Jm(e,t),Km(t),Wm(e,t)}function Jm(e,t){let n=e.querySelector(`template[shadowrootmode="open"], template[data-file-tree-shadowrootmode="open"]`);n instanceof HTMLTemplateElement&&(t.childNodes.length>0||(t.appendChild(n.content.cloneNode(!0)),n.hasAttribute(`shadowrootmode`)&&n.remove()))}if(typeof HTMLElement<`u`&&customElements.get(`file-tree-container`)==null){class e extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.shadowRoot??this.attachShadow({mode:`open`});qm(this,e)}}if(customElements.define(Vu,e),typeof document<`u`)for(let e of Array.from(document.querySelectorAll(Vu)))e instanceof HTMLElement&&qm(e,e.shadowRoot??e.attachShadow({mode:`open`}))}var Ym=e=>e.startsWith(`f::`)?e.slice(3):e;function Xm(e){let t=e.lastIndexOf(`/`);return t<0?{parentPath:``,baseName:e}:{parentPath:e.slice(0,t),baseName:e.slice(t+1)}}function Zm(e,t){return e===``?t:`${e}/${t}`}function Qm({files:e,path:t,isFolder:n,nextBasename:r}){let i=Ym(t),a=r.trim();if(a.length===0)return{error:`Name cannot be empty.`};if(a.includes(`/`))return{error:`Name cannot include "/".`};let{parentPath:o,baseName:s}=Xm(i);if(a===s)return{nextFiles:e,sourcePath:i,destinationPath:i,isFolder:n};let c=Zm(o,a),l=Array(e.length),u=new Set;if(!n){let t=`${c}/`,r=!1;for(let n=0;n<e.length;n++){let a=e[n];if(a!==i&&a.startsWith(t))return{error:`"${c}" already exists.`};let o=a===i?c:a;if(u.has(o))return{error:`"${c}" already exists.`};u.add(o),l[n]=o,a===i&&(r=!0)}return r?{nextFiles:l,sourcePath:i,destinationPath:c,isFolder:n}:{error:`Could not find the selected file to rename.`}}let d=`${i}/`,f=`${c}/`,p=0;for(let t=0;t<e.length;t++){let n=e[t],r=n===i||n.startsWith(d);if(!r&&(n===c||n.startsWith(f)))return{error:`"${c}" already exists.`};let a=r?`${c}${n.slice(i.length)}`:n;if(u.has(a))return{error:`"${c}" already exists.`};u.add(a),l[t]=a,r&&p++}return p===0?{error:`Could not find the selected folder to rename.`}:{nextFiles:l,sourcePath:i,destinationPath:c,isFolder:n}}function $m(e){return e.endsWith(`/`)}function eh(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`),r=n<0?t:t.slice(n+1);return e.endsWith(`/`)?`${r}/`:r}function th(e){let t=[],n=new Set;for(let r of e)n.has(r)||(n.add(r),t.push(r));let r=new Set;for(let e of t.toSorted((e,t)=>e.length===t.length?e.localeCompare(t):e.length-t.length)){let t=(e.endsWith(`/`)?e.slice(0,-1):e).split(`/`),n=!1;for(let e=0;e<t.length-1;e+=1){let i=`${t.slice(0,e+1).join(`/`)}/`;if(r.has(i)){n=!0;break}}n||r.add(e)}return t.filter(e=>r.has(e))}function nh(e,t){return t.includes(e)?th(t):[e]}function rh(e,t){return e===t?!0:e==null||t==null?!1:e.kind===t.kind&&e.directoryPath===t.directoryPath&&e.flattenedSegmentPath===t.flattenedSegmentPath&&e.hoveredPath===t.hoveredPath}function ih(e,t){return{draggedPaths:e,target:t}}function ah(e,t){if(t.kind!==`directory`||t.directoryPath==null)return!1;for(let n of e)if($m(n)&&(t.directoryPath===n||t.directoryPath.startsWith(n)))return!0;return!1}function oh(e,t){return t.kind===`root`||t.directoryPath==null?eh(e):t.directoryPath}function sh(e,t){let n=e.map(e=>{let n=oh(e,t);return n===e?null:{from:e,to:n,type:`move`}}).filter(e=>e!=null);return n.length===0?null:{operations:n,result:{draggedPaths:e,operation:n.length===1?`move`:`batch`,target:t}}}function ch(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function lh(e,t,n){let{paths:r,preparedInput:i}=e;if(i==null){if(r==null)throw Error(`FileTree requires paths or preparedInput`);return{paths:r,preparedInput:void 0}}let a=i.paths;if(r==null)return{paths:a,preparedInput:i};if(!ch(Mm.preparePaths(r,n==null?{}:{sort:n}),a))throw Error(`FileTree ${t} received paths and preparedInput for different path lists`);return{paths:a,preparedInput:i}}function uh(e){return e.operation===`add`||e.operation===`remove`||e.operation===`move`||e.operation===`batch`}function dh(e,t,n){if(e===t)return n;let r=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(r)?`${n.endsWith(`/`)?n:`${n}/`}${e.slice(r.length)}`:e}function fh(e,t){if(e===t)return!0;let n=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(n)}function ph(e,t,n=!1){if(e==null)return null;switch(t.operation){case`add`:case`expand`:case`collapse`:case`mark-directory-unloaded`:case`begin-child-load`:case`apply-child-patch`:case`complete-child-load`:case`fail-child-load`:case`cleanup`:return e;case`remove`:return fh(e,t.path)?n?e:null:e;case`move`:return dh(e,t.from,t.to);case`batch`:{let r=e;for(let e of t.events)if(r=ph(r,e,n),r==null)return null;return r}}}function mh(e){return{canonicalChanged:e.canonicalChanged,projectionChanged:e.projectionChanged,visibleCountDelta:e.visibleCountDelta}}function hh(e){switch(e.operation){case`add`:return{...mh(e),operation:`add`,path:e.path};case`remove`:return{...mh(e),operation:`remove`,path:e.path,recursive:e.recursive};case`move`:return{...mh(e),from:e.from,operation:`move`,to:e.to}}}function gh(e){return{...mh(e),events:e.events.filter(e=>e.operation===`add`||e.operation===`remove`||e.operation===`move`).map(e=>hh(e)),operation:`batch`}}function _h(e){switch(e.operation){case`add`:case`remove`:case`move`:return hh(e);case`batch`:return gh(e);default:return null}}function vh(e,t){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function yh(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;if(t.length===0)return[];let n=t.split(`/`);return n.slice(0,-1).map((e,t)=>`${n.slice(0,t+1).join(`/`)}/`)}function bh(e){return yh(e).at(-1)??null}function xh(e,t){return t==null?e:e.startsWith(t)?e.slice(t.length):e}function Sh(e){return e.endsWith(`/`)}var Ch=e=>e.toLowerCase();function wh(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`);return n<0?t:t.slice(n+1)}function Th(e){return e.endsWith(`/`)?e.slice(0,-1):e}function Eh(e,t){return t&&!e.endsWith(`/`)?`${e}/`:e}var Dh=e=>{let t=e.trim();return t.length===0?``:(t.includes(`\\`)?t.replaceAll(`\\`,`/`):t).toLowerCase()},Oh=Symbol(`FILE_TREE_RENAME_VIEW`),kh=512,Ah=512;function jh(e){return e===`top`||e===`center`?e:`nearest`}function Mh(e,t,n){if(e===0)return-1;if(n!=null){let e=t(n);if(e!=null)return e;let r=yh(n);for(let e=r.length-1;e>=0;--e){let n=r[e];if(n==null)continue;let i=t(n);if(i!=null)return i}}return 0}function Nh(e,t,n){if(e.paths.length===0)return{focusedIndex:-1,getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex};if(t==null)return{focusedIndex:0,getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex};let r=n??(t=>e.visibleIndexByPath.get(t)??null);return{focusedIndex:Mh(e.paths.length,r,t),getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex}}var Ph=class e{static{Object.defineProperty(e.prototype,Oh,{configurable:!0,value(){return{cancel:()=>{this.#q()},commit:()=>{this.#J()},getPath:()=>this.#T,getValue:()=>this.#E,isActive:()=>this.#T!=null,setValue:e=>{this.#Y(e)}}},writable:!0})}#e;#t=new Set;#n=new Map;#r=null;#i=null;#a=new Map;#o=new Map;#s=-1;#c=null;#l=!1;#u=e=>-1;#d=new Map;#f=null;#p=null;#m=null;#h=null;#g=null;#_;#v;#y;#b=[];#x=new Int32Array;#S=new Int32Array;#C=void 0;#w=!1;#T=null;#E=``;#D=!1;#O=new Set;#k=[];#A;#j=null;#M=null;#N=null;#P=null;#F=null;#I=null;#L=null;#R=0;#z=null;#B=new Set;#V=0;#H;#U=0;#W=!1;#G=0;#K;constructor(e){let{dragAndDrop:t,fileTreeSearchMode:n,initialSearchQuery:r,initialSelectedPaths:i,renaming:a,onSearchChange:o,paths:s,preparedInput:c,...l}=e,u=lh({paths:s,preparedInput:c},`constructor`,l.sort);this.#e=l,t!=null&&t!==!1&&(this.#r=t===!0?{}:t),this.#w=a!=null&&a!==!1,a!=null&&a!==!1&&a!==!0&&(this.#C=a.canRename,this.#v=a.onError,this.#_=a.onRename),this.#y=o,this.#A=n??`hide-non-matches`,this.#H=this.#le(u.paths,u.preparedInput);let d=i?.map(e=>this.#Ne(e)).filter(e=>e!=null)??[],f=d.at(-1)??null;d.length>0&&(this.#B=new Set(d),this.#z=f,this.#V=1),this.#je(f,!1),r!=null&&this.#Te(r,!1),this.#K=this.#Re()}destroy(){this.#K?.(),this.#K=null,this.#n.clear(),this.#t.clear(),this.#d.clear(),this.#i=null,this.#he()}focusFirstItem(){this.#be().length>0&&this.#Fe(0)}focusLastItem(){this.#G<=0||(this.#Ie(),this.#Fe(this.#G-1))}focusNextItem(){this.#Ae(1)}focusParentItem(){if(this.#c==null)return;let e=bh(this.#c);if(e==null)return;let t=this.#Z(e);t>=0&&this.#Fe(t)}focusPath(e){let t=this.#H.getPathInfo(e)?.path??null;if(t==null)return;this.#Ie();let n=this.#Z(t);n>=0&&this.#Fe(n)}scrollToPath(e,t){let n=this.#H.getPathInfo(e)?.path??null;if(n==null)return;this.#Ie();let r=this.#xe(n);r<0||this.#Me(r)!=null&&(t?.focus!==!1&&this.#Fe(r,!1),this.#L={id:this.#R+=1,offset:jh(t?.offset),visibleIndex:r},this.#De())}focusMountedPathFromInput(e){let t=this.#H.getPathInfo(e)?.path??null;if(t==null)return;let n=this.#Z(t);n>=0&&this.#Fe(n)}focusNearestPath(e){let t=this.resolveNearestVisiblePath(e);if(t==null)return null;let n=this.#Z(t);return n>=0?(this.#Fe(n),this.#be()[n]??t):null}focusPreviousItem(){this.#Ae(-1)}getFocusedIndex(){return this.#s}getFocusedItem(){return this.#c==null?null:this.#Q(this.#c)}getFocusedPath(){return this.#c}getScrollRequest(){return this.#L}clearScrollRequest(e){this.#L?.id===e&&(this.#L=null)}resolveNearestVisiblePath(e){let t=this.#be();if(this.#G===0)return null;if(e==null)return this.#c??t[0]??null;let n=this.#H.getPathInfo(e)?.path??e,r=this.#Z(n);return r>=0?t[r]??n:this.#X(n)??this.#c??t[0]??null}getSelectedPaths(){return[...this.#B]}getSelectionVersion(){return this.#V}getVisibleCount(){return this.#G}getVisibleRows(e,t){if(t<e||this.#G===0)return[];let n=Math.max(0,e),r=Math.min(this.#G-1,t);if(r<n)return[];let i=r-n+1;if(this.#F==null&&!this.#l&&r>=this.#b.length&&i<=Ah){let e=[];for(let t=n;t<=r;t+=1){let n=this.#H.getVisibleRowContext(t);if(n==null)break;e.push(this.#ee(n))}return e}if(!this.#l&&r>=this.#b.length&&this.#Ie(),this.#F!=null){let e=Array.from({length:r-n+1},(e,t)=>this.#Se(n+t)),t=new Map,i=e[0]??-1,a=i;for(let n=1;n<=e.length;n+=1){let r=e[n];if(r!=null&&r===a+1){a=r;continue}if(i>=0&&this.#H.getVisibleSlice(i,a).forEach((e,n)=>{t.set(i+n,e)}),r==null){i=-1,a=-1;continue}i=r,a=r}return Array.from({length:r-n+1},(e,r)=>{let i=n+r,a=this.#Se(i),o=t.get(a),s=this.#b[a];if(o==null||s==null)throw Error(`Missing projection row for filtered visible index ${String(i)}`);return this.#$(o,i,a,{ancestorPaths:this.#re(a),path:s})})}return this.#H.getVisibleSlice(n,r).map((e,t)=>{let r=n+t,i=this.#b[r];if(i==null)throw Error(`Missing projection path for visible index ${String(r)}`);return this.#$(e,r,r,{ancestorPaths:this.#re(r),path:i})})}getStickyRowCandidates(e,t){if(this.#F!=null)return null;if(this.#G===0||e<=0||t<=0)return[];let n=[];for(let r=0;r<this.#G;r+=1){let i=e+r*t,a=Math.min(this.#G-1,Math.floor(i/t)),o=this.#te(a,r)??(a>0?this.#te(a-1,r):void 0);if(o==null)break;n.push({row:this.#ee(o),subtreeEndIndex:o.subtreeEndIndex})}return n}getItem(e){let t=this.#H.getPathInfo(e);return t==null?null:this.#Q(t.path,t)}resolveMountedDirectoryPathFromInput(e){let t=this.#H.getPathInfo(e);return t?.kind===`directory`?t.path:null}toggleMountedDirectoryFromInput(e){let t=this.resolveMountedDirectoryPathFromInput(e);t!=null&&this.#ze(t)}selectAllVisiblePaths(){this.#Ie();let e=[...this.#be()];this.#ae(e,this.#c??this.#z)}selectOnlyPath(e){let t=this.#Ne(e);t!=null&&this.#ae([t],t)}selectOnlyMountedPathFromInput(e){this.#ae([e],e)}selectPath(e){let t=this.#Ne(e);t==null||this.#B.has(t)||this.#ae([...this.#B,t])}deselectPath(e){let t=this.#Ne(e);t==null||!this.#B.has(t)||this.#ae([...this.#B].filter(e=>e!==t))}toggleFocusedSelection(){this.#c!=null&&this.togglePathSelectionFromInput(this.#c)}togglePathSelection(e){let t=this.#Ne(e);if(t!=null){if(this.#B.has(t)){this.deselectPath(t);return}this.selectPath(t)}}togglePathSelectionFromInput(e){let t=this.#Ne(e);if(t!=null){if(this.#B.has(t)){this.#ae([...this.#B].filter(e=>e!==t),t);return}this.#ae([...this.#B,t],t)}}selectPathRange(e,t){let n=this.#Ne(e);if(n==null)return;this.#Ie();let r=this.#z,i=r==null?-1:this.#Ce(r),a=this.#Ce(n);if(i===-1||a===-1){let e=t?[...this.#B,n]:[n];this.#ae(e,n);return}let[o,s]=i<=a?[i,a]:[a,i],c=this.#be().slice(o,s+1),l=t?[...this.#B,...c]:c;this.#ae(l,r)}extendSelectionFromFocused(e){if(this.#c==null)return;let t=this.#s;if(t===-1)return;let n=Math.min(this.#G-1,Math.max(0,t+e));if(n===t)return;!this.#l&&n>=this.#b.length&&this.#Ie();let r=this.#be(),i=r[t]??null,a=r[n]??null;if(i==null||a==null)return;let o=new Set(this.#B);o.has(i)&&o.has(a)?o.delete(i):o.add(a),this.#ae([...o],this.#z??i,!1),this.#Fe(n)}getDragAndDropConfig(){return this.#r}isDragAndDropEnabled(){return this.#r!=null}getDragSession(){return this.#i==null?null:{draggedPaths:[...this.#i.draggedPaths],primaryPath:this.#i.primaryPath,target:this.#i.target==null?null:{...this.#i.target}}}startDrag(e){if(this.#r==null)return!1;let t=this.#Ne(e);if(t==null||this.#M!=null&&this.#M.length>0)return!1;let n=this.getSelectedPaths(),r=nh(t,n);return this.#r.canDrag?.(r)!==!1&&(n.includes(t)||this.#ae([t],t,!1),this.#Pe(t),this.#i={draggedPaths:r,primaryPath:t,target:null},this.#De(),!0)}setDragTarget(e){let t=this.#i;if(t==null)return;let n=e;if(n!=null){let e=ih(t.draggedPaths,n);(ah(t.draggedPaths,n)||this.#r?.canDrop?.(e)===!1)&&(n=null)}rh(t.target,n)||(this.#i={...t,target:n},this.#De())}cancelDrag(){this.#i!=null&&(this.#i=null,this.#De())}completeDrag(){let e=this.#i;if(e==null)return!1;this.#i=null;let t=e.target==null?null:{...e.target};if(t==null)return this.#De(),!1;let n=ih(e.draggedPaths,t);if(ah(e.draggedPaths,t)||this.#r?.canDrop?.(n)===!1)return this.#De(),!1;let r=sh(e.draggedPaths,t);if(r==null)return this.#De(),!1;try{if(r.operations.length===1){let e=r.operations[0];if(e==null||e.type!==`move`)throw Error(`Expected a single move operation for one-item drops`);this.#H.move(e.from,e.to,{collision:e.collision})}else this.#ce(r.operations),this.#H.batch(r.operations)}catch(e){return this.#De(),this.#r?.onDropError?.(e instanceof Error?e.message:String(e),n),!1}return this.#r?.onDropComplete?.(r.result),!0}subscribe(e){return this.#t.add(e),e(),()=>{this.#t.delete(e)}}add(e){this.#H.add(e)}remove(e,t={}){this.#H.remove(e,t)}move(e,t,n={}){this.#H.move(e,t,n)}batch(e){this.#H.batch(e)}onMutation(e,t){let n=e,r=t,i=this.#n.get(n);return i??(i=new Set,this.#n.set(n,i)),i.add(r),()=>{let e=this.#n.get(n);e?.delete(r),e?.size===0&&this.#n.delete(n)}}setSearch(e){this.#Te(e,!0)}openSearch(e=``){this.#Te(e,!0)}closeSearch(){this.#Te(null,!0)}isSearchOpen(){return this.#M!==null}getSearchValue(){return this.#M??``}getSearchMatchingPaths(){return this.#k}focusNextSearchMatch(){this.#we(1)}focusPreviousSearchMatch(){this.#we(-1)}startRenaming(e=this.#c??``,t={}){if(!this.#w)return!1;let n=this.#H.getPathInfo(e);if(n==null)return!1;let r=n.path,i=Sh(r),a=Th(r);if(this.#C?.({isFolder:i,path:a})===!1)return!1;for(let e of yh(r))this.#H.isExpanded(e)||this.#H.expand(e);return this.#ae([r],r,!1),this.#M!=null&&(this.#Te(null,!1),this.#y?.(this.#M)),this.#Pe(r),this.#T=r,this.#E=wh(r),this.#D=t.removeIfCanceled??!1,this.#De(),!0}#q(){if(this.#T==null)return;let e=this.#T,t=this.#D;if(this.#T=null,this.#E=``,this.#D=!1,t){this.remove(e,Sh(e)?{recursive:!0}:void 0);return}this.#Pe(e),this.#De()}#J(){let e=this.#T;if(e==null)return;if(this.#D&&this.#E.trim().length===0){this.#T=null,this.#E=``,this.#D=!1,this.remove(e,Sh(e)?{recursive:!0}:void 0);return}let t=Sh(e),n=Qm({files:this.#H.list(),isFolder:t,nextBasename:this.#E,path:Th(e)});if(this.#T=null,this.#E=``,this.#D=!1,`error`in n){this.#Pe(e),this.#v?.(n.error),this.#De();return}if(n.sourcePath===n.destinationPath){this.#Pe(e),this.#De();return}this.#_?.({destinationPath:n.destinationPath,isFolder:n.isFolder,sourcePath:n.sourcePath}),this.move(Eh(n.sourcePath,t),Eh(n.destinationPath,t))}#Y(e){this.#T!=null&&this.#E!==e&&(this.#E=e,this.#De())}resetPaths(e,t={}){let n=!Array.isArray(e),r=n?void 0:e,i=n?e:t,a=this.#H.list().length,o=this.#G,s=lh({paths:r,preparedInput:i.preparedInput},`resetPaths`,this.#e.sort),c=this.#le(s.paths,s.preparedInput,i.initialExpandedPaths),l=this.#c,u=this.#T,d=this.getSelectedPaths(),f=this.#z;this.#K?.(),this.#H=c,this.#d.clear(),this.#he();let p=d.map(e=>c.getPathInfo(e)?.path??null).filter(e=>e!=null),m=!vh(this.#B,p);this.#B=new Set(p),m&&(this.#V+=1),this.#z=f==null?null:c.getPathInfo(f)?.path??null,this.#T=u==null?null:c.getPathInfo(u)?.path??null,this.#T??(this.#E=``,this.#D=!1),this.#je(l,l!=null||p.length>0||this.#z!=null),this.#K=this.#Re(),this.#De(),this.#Oe({canonicalChanged:!0,operation:`reset`,pathCountAfter:s.paths.length,pathCountBefore:a,projectionChanged:!0,usedPreparedInput:i.preparedInput!=null,visibleCountDelta:this.#G-o})}#X(e){this.#Ie();let t=bh(e),n=xh(e,t),r=null,i=null;for(let e of this.#be()){if(bh(e)!==t)continue;let a=xh(e,t);if(a<n){r=e;continue}if(a>n){i=e;break}}return r??i}#Z(e){let t=this.#Ce(e);if(t!==-1)return t;let n=yh(e);for(let e=n.length-1;e>=0;--e){let t=n[e];if(t==null)continue;let r=this.#Ce(t);if(r!==-1)return r}return this.#be().length>0?0:-1}#Q(e,t){let n=this.#d.get(e);if(n!=null)return n;let r=t??this.#H.getPathInfo(e);if(r==null)return null;let i=r.kind===`directory`?this.#oe(r.path):this.#se(r.path);return this.#d.set(r.path,i),i}#$(e,t,n,r){return{ancestorPaths:r.ancestorPaths,depth:e.depth,flattenedSegments:e.flattenedSegments?.map(e=>({isTerminal:e.isTerminal,name:e.name,path:e.path})),hasChildren:e.hasChildren,index:t,isExpanded:e.isExpanded,isFlattened:e.isFlattened,isFocused:r.path===this.#c,isSelected:this.#B.has(r.path),kind:e.kind,level:e.depth,name:e.name,path:r.path,posInSet:r.posInSet??this.#x[n]??0,setSize:r.setSize??this.#S[n]??0}}#ee(e){return this.#$(e.row,e.index,e.index,{ancestorPaths:e.ancestorPaths,path:e.row.path,posInSet:e.posInSet,setSize:e.setSize})}#te(e,t){let n=this.#H.getVisibleRowContext(e);return n==null?void 0:n.ancestorRows[t]??(t===n.ancestorRows.length&&n.row.kind===`directory`&&n.row.isExpanded?n:void 0)}#ne(e){let t=this.#a.get(e);if(t!=null)return t;let n=this.#u(e),r=n<0?[]:[...this.#ne(n),n];return this.#a.set(e,r),r}#re(e){let t=this.#o.get(e);if(t!=null)return t;let n=this.#ne(e).map(e=>this.#b[e]??``).filter(e=>e!==``);return this.#o.set(e,n),n}#ie(e){this.#H.collapse(e)}#ae(e,t=this.#z,n=!0){let r=[...new Set(e)],i=!vh(this.#B,r),a=this.#z!==t;!i&&!a||(this.#B=new Set(r),this.#z=t,i&&(this.#V+=1),n&&this.#De())}#oe(e){return{collapse:()=>{this.#ie(e)},deselect:()=>{this.deselectPath(e)},expand:()=>{this.#ke(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!0,isExpanded:()=>this.#H.isExpanded(e),isFocused:()=>this.#c===e,isSelected:()=>this.#B.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)},toggle:()=>{this.#ze(e)}}}#se(e){return{deselect:()=>{this.deselectPath(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!1,isFocused:()=>this.#c===e,isSelected:()=>this.#B.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)}}}#ce(e){let t=this.#H.list();this.#le(t).batch(e)}#le(e,t,n){return new Mm({...this.#e,paths:e,preparedInput:t??void 0,...n===void 0?{}:{initialExpandedPaths:n}})}#ue(){return this.#h??=this.#H.list(),this.#h}#de(){if(this.#m!=null)return this.#m;let e=new Set;for(let t of this.#ue()){e.add(t);for(let n of yh(t))e.add(n)}return this.#m=[...e].sort(),this.#m}#fe(){return this.#g??=this.#ue().map(Ch),this.#g}#pe(){return this.#f??=this.#de().filter(e=>e.endsWith(`/`)),this.#f}#me(){return this.#p??=this.#pe().map(Ch),this.#p}#he(){this.#f=null,this.#p=null,this.#m=null,this.#h=null,this.#g=null}#ge(){return this.#pe().filter(e=>this.#H.isExpanded(e))}#_e(e){let t=new Set(this.#j??[]);if(e)for(let e of this.#B)for(let n of yh(e))t.add(n);this.#ve(t)}#ve(e){this.#W=!0;try{for(let t of this.#pe()){let n=e.has(t),r=this.#H.isExpanded(t);n&&!r?this.#H.expand(t):!n&&r&&this.#H.collapse(t)}}finally{this.#W=!1}}#ye(){if(this.#M==null||this.#M.length===0){this.#k=[],this.#F=null,this.#I=null,this.#P=null,this.#G=this.#U;return}let e=this.#b;if(this.#k=e.filter(e=>this.#O.has(e)),this.#A!==`hide-non-matches`||this.#O.size===0){this.#F=null,this.#I=null,this.#P=null,this.#G=this.#U;return}let t=[],n=[],r=new Map;for(let[i,a]of e.entries())this.#N?.has(a)===!0&&(r.set(a,n.length),t.push(i),n.push(a));this.#F=t,this.#I=n,this.#P=r,this.#G=n.length}#be(){return this.#I??this.#b}#xe(e){return this.#I==null?this.#H.getVisibleIndex(e)??-1:this.#P?.get(e)??-1}#Se(e){return this.#F?.[e]??e}#Ce(e){return this.#P?.get(e)??this.#H.getVisibleIndex(e)??-1}#we(e){let t=this.#k;if(t.length===0)return;let n=this.#c,r=n==null?-1:t.indexOf(n),i=t[r<0?e>0?0:t.length-1:Math.min(t.length-1,Math.max(0,r+e))];i!=null&&this.focusPath(i)}#Te(e,t){let n=e==null?null:Dh(e),r=this.#M;if(r!==n){if(r==null&&n!=null&&(this.#j=this.#ge()),this.#M=n,n==null)this.#_e(!0),this.#j=null,this.#O.clear(),this.#N=null,this.#je(this.#c,!0);else if(n.length===0)this.#_e(!1),this.#O.clear(),this.#N=null,this.#je(this.#c,!0);else{let e=this.#Ee();this.#je(e,!0)}t&&(this.#y?.(this.#M),this.#De())}}#Ee(){if(this.#M==null||this.#M.length===0)return this.#O.clear(),this.#c;let e=this.#M,t=this.#ue(),n=this.#fe(),r=[],i=new Set,a=null;for(let o=0;o<t.length;o+=1){if(!n[o].includes(e))continue;let s=t[o];r.push(s),i.add(s),a??=s}let o=this.#pe(),s=this.#me();for(let t=0;t<o.length;t+=1){if(!s[t].includes(e))continue;let n=o[t];i.has(n)||(r.push(n),i.add(n),a??=n)}this.#O=i;let c=this.#A===`hide-non-matches`&&r.length>0?new Set:null;this.#N=c;let l=this.#A===`expand-matches`?new Set(this.#j??[]):new Set;for(let e of r){c?.add(e),e.endsWith(`/`)&&l.add(e);for(let t of yh(e))l.add(t),c?.add(t)}return this.#ve(l),a??this.#c}#De(){for(let e of this.#t)e()}#Oe(e){this.#n.get(e.operation)?.forEach(t=>{t(e)}),this.#n.get(`*`)?.forEach(t=>{t(e)})}#ke(e){for(let t of yh(e))this.#H.isExpanded(t)||this.#H.expand(t);this.#H.isExpanded(e)||this.#H.expand(e)}#Ae(e){let t=this.#G;if(t===0)return;let n=this.#s===-1?0:this.#s,r=Math.min(t-1,Math.max(0,n+e));(r!==n||this.#s===-1)&&(!this.#l&&this.#F==null&&r>=this.#b.length&&this.#Ie(),this.#Fe(r))}#je(e,t=!0){let n=this.#H.getVisibleCount();this.#U=n;let r=Nh(this.#H.getVisibleTreeProjectionData(t?void 0:Math.min(n,kh)),e,t?e=>this.#H.getVisibleIndex(e):void 0);this.#a.clear(),this.#o.clear(),this.#l=r.paths.length>=n,this.#u=r.getParentIndex,this.#b=r.paths,this.#x=r.posInSetByIndex,this.#S=r.setSizeByIndex,this.#ye(),this.#s=e==null?this.#be().length>0?0:-1:this.#Z(e),this.#c=this.#s<0?null:this.#Me(this.#s)}#Me(e){return this.#be()[e]??(this.#F==null?this.#H.getVisibleRowContext(e)?.row.path??null:null)}#Ne(e){return this.#H.getPathInfo(e)?.path??null}#Pe(e){if(e==null)return;let t=this.#Z(e);t>=0&&this.#Fe(t,!1)}#Fe(e,t=!0){let n=this.#Me(e);n!=null&&(this.#s!==e||this.#c!==n)&&(this.#s=e,this.#c=n,t&&this.#De())}#Ie(){this.#l||this.#je(this.#c,!0)}#Le(e){let t=ph(this.#T,e);t==null&&this.#T!=null&&(this.#E=``),this.#T=t;let n=ph(this.#c,e,!0),r=[...this.#B].map(t=>ph(t,e)).filter(e=>e!=null).map(e=>this.#H.getPathInfo(e)?.path??null).filter(e=>e!=null),i=ph(this.#z,e),a=i==null?null:this.#H.getPathInfo(i)?.path??null,o=[...new Set(r)];return vh(this.#B,o)||(this.#B=new Set(o),this.#V+=1),this.#z=a,n}#Re(){return this.#H.on(`*`,e=>{if(this.#W)return;e.canonicalChanged&&(this.#d.clear(),this.#he()),this.#i!=null&&uh(e)&&(this.#i=null);let t=uh(e)?this.#Le(e):this.#c,n=this.#M!=null&&this.#M.length>0?this.#Ee():this.#M===``?this.#c:t,r=this.#M!=null||e.operation!==`expand`&&e.operation!==`collapse`;this.#je(n,r),this.#De();let i=_h(e);i!=null&&this.#Oe(i)})}#ze(e){if(this.#H.isExpanded(e)){this.#ie(e);return}this.#ke(e)}},Fh=e=>{if(e==null||e.length===0)return`0`;let t=`${e.length}`;for(let n of e)t+=`\0${n.path}\0${n.status}`;return t};function Ih(e){let t=e.endsWith(`/`),n=``,r=-1;for(let t=0;t<=e.length;t+=1){if(e[t]!==`/`&&t!==e.length){r===-1&&(r=t);continue}r!==-1&&(n!==``&&(n+=`/`),n+=e.slice(r,t),r=-1)}return n===``?null:{isDirectory:t,path:n}}function Lh(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;if(t.length===0)return[];let n=[],r=0;for(;;){let e=t.indexOf(`/`,r);if(e===-1)break;n.push(t.slice(0,e+1)),r=e+1}return n}function Rh(e,t){return t?`${e}/`:e}function zh(e,t=null){let n=Fh(e==null?void 0:[...e]);if(n===`0`)return null;if(t?.signature===n)return t;let r=new Map,i=new Set,a=new Set,o=new Map;for(let t of e??[]){let e=Vh(t);e!=null&&Wh({canonicalPath:e.canonicalPath,changeCountByDirectoryPath:o,directoriesWithChanges:i,ignoredDirectoryPaths:a,isDirectory:e.isDirectory,status:t.status,statusByPath:r})}return r.size===0?null:{changeCountByDirectoryPath:o,directoriesWithChanges:i,ignoredDirectoryPaths:a,signature:n,statusByPath:r}}function Bh(e,t){let n=t?.remove??[],r=t?.set??[];if(n.length===0&&r.length===0)return e;let i=new Map(e?.statusByPath),a=new Set(e?.directoriesWithChanges),o=new Set(e?.ignoredDirectoryPaths),s=new Map(e?.changeCountByDirectoryPath),c=!1;for(let e of n){let t=Hh(e);t!=null&&(c=Uh({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,statusByPath:i})||c)}for(let e of r){let t=Vh(e);t!=null&&(c=Wh({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,isDirectory:t.isDirectory,status:e.status,statusByPath:i})||c)}return c?i.size===0?null:{changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,signature:qh(i),statusByPath:i}:e}function Vh(e){return Hh(e.path)}function Hh(e){let t=Ih(e);if(t!=null)return{canonicalPath:Rh(t.path,t.isDirectory),isDirectory:t.isDirectory}}function Uh({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,statusByPath:i}){let a=i.get(e);return a!=null&&(i.delete(e),a===`ignored`&&e.endsWith(`/`)&&r.delete(e),Kh(t,n,e),!0)}function Wh({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,isDirectory:i,status:a,statusByPath:o}){let s=o.get(e);return s!==a&&(s??Gh(t,n,e),o.set(e,a),a===`ignored`&&i?r.add(e):i&&r.delete(e),!0)}function Gh(e,t,n){for(let r of Lh(n))e.set(r,(e.get(r)??0)+1),t.add(r)}function Kh(e,t,n){for(let r of Lh(n)){let n=(e.get(r)??0)-1;n>0?e.set(r,n):(e.delete(r),t.delete(r))}}function qh(e){let t=`${e.size}`;for(let[n,r]of e)t+=`\0${n}\0${r}`;return t}var J,Jh,Yh,Xh,Zh,Qh,$h,eg,tg,ng,rg={},ig=[],ag=Array.isArray,og=ig.slice,sg=Object.assign;function cg(e){e&&e.parentNode&&e.remove()}function lg(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`&&typeof e!=`function`?i=t[a]:o[a]=t[a];return arguments.length>2&&(o.children=arguments.length>3?og.call(arguments,2):n),ug(e,o,r,i,null)}function ug(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Jh,__i:-1,__u:0};return i==null&&J.vnode!=null&&J.vnode(a),a}function dg(e){return e.children}function fg(e,t){this.props=e,this.context=t,this.__g=0}function pg(e,t){if(t==null)return e.__?pg(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?pg(e):null}function mg(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=n.__e;break}return mg(e)}}function hg(e){(8&e.__g||!(e.__g|=8)||!Yh.push(e)||Zh++)&&Xh==J.debounceRendering||((Xh=J.debounceRendering)||queueMicrotask)(gg)}function gg(){for(var e,t,n,r,i,a,o,s,c=1;Yh.length;)Yh.length>c&&Yh.sort(Qh),e=Yh.shift(),c=Yh.length,8&e.__g&&(n=void 0,i=(r=(t=e).__v).__e,a=[],o=[],(s=t.__P)&&((n=sg({},r)).__v=r.__v+1,J.vnode&&J.vnode(n),wg(s,n,r,t.__n,s.namespaceURI,32&r.__u?[i]:null,a,i??pg(r),!!(32&r.__u),o,s.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,Eg(a,n,o),n.__e!=i&&mg(n)));Zh=0}function _g(e,t,n,r,i,a,o,s,c,l,u,d){var f,p,m,h,g,_,v,y=r&&r.__k||ig,b=t.length;for(c=vg(n,t,y,c,b),f=0;f<b;f++)(m=n.__k[f])!=null&&(p=m.__i==-1?rg:y[m.__i]||rg,m.__i=f,_=wg(e,m,p,i,a,o,s,c,l,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&kg(p.ref,null,m),u.push(m.ref,m.__c||h,m)),g==null&&h!=null&&(g=h),(v=!!(4&m.__u))||p.__k===m.__k?c=yg(m,c,e,v):typeof m.type==`function`&&_!==void 0?c=_:h&&(c=h.nextSibling),m.__u&=-7);return n.__e=g,c}function vg(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(c=a+f,(o=e.__k[a]=typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?ug(null,o,null,null,null):ag(o)?ug(dg,{children:o},null,null,null):o.constructor==null&&o.__b>0?ug(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,s=null,(l=o.__i=bg(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=pg(s)),Ag(s,s));return r}function yg(e,t,n,r){var i,a;if(typeof e.type==`function`){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=yg(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=pg(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function bg(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&!(2&l.__u);if(l===null&&e.key==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function xg(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n??``}function Sg(e,t,n,r,i){var a;n:if(t==`style`)if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||xg(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||xg(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace($h,`$1`)),(t=t.slice(2))[0].toLowerCase()!=t[0]&&(t=t.toLowerCase()),e.__l||={},e.__l[t+a]=n,n?r?n.l=r.l:(n.l=eg,e.addEventListener(t,a?ng:tg,a)):e.removeEventListener(t,a?ng:tg,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function Cg(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=eg++;else if(t.u<n.l)return;return n(J.event?J.event(t):t)}}}function wg(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v,y,b,x,S,C,ee,te,w,T,E,ne,re,ie,D=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),n.__c.__z&&(s=t.__e=n.__e=(a=n.__c.__z)[0],n.__c.__z=null)),(d=J.__b)&&d(t);n:if(typeof D==`function`)try{if(v=t.props,y=`prototype`in D&&D.prototype.render,b=(d=D.contextType)&&r[d.__c],x=d?b?b.props.value:d.__:r,n.__c?2&(f=t.__c=n.__c).__g&&(f.__g|=1,_=!0):(y?t.__c=f=new D(v,x):(t.__c=f=new fg(v,x),f.constructor=D,f.render=jg),b&&b.sub(f),f.props=v,f.state||(f.state={}),f.context=x,f.__n=r,p=!0,f.__g|=8,f.__h=[],f._sb=[]),y&&f.__s==null&&(f.__s=f.state),y&&D.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=sg({},f.__s)),sg(f.__s,D.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&D.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&D.getDerivedStateFromProps==null&&v!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(v,x),!(4&f.__g)&&f.shouldComponentUpdate!=null&&!1===f.shouldComponentUpdate(v,f.__s,x)||t.__v==n.__v){for(t.__v!=n.__v&&(f.props=v,f.state=f.__s,f.__g&=-9),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),S=0;S<f._sb.length;S++)f.__h.push(f._sb[S]);f._sb=[],f.__h.length&&o.push(f);break n}f.componentWillUpdate!=null&&f.componentWillUpdate(v,f.__s,x),y&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,h,g)})}if(f.context=x,f.props=v,f.__P=e,f.__g&=-5,C=J.__r,ee=0,y){for(f.state=f.__s,f.__g&=-9,C&&C(t),d=f.render(f.props,f.state,f.context),te=0;te<f._sb.length;te++)f.__h.push(f._sb[te]);f._sb=[]}else do f.__g&=-9,C&&C(t),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(8&f.__g&&++ee<25);f.state=f.__s,f.getChildContext!=null&&(r=sg({},r,f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),w=d,d!=null&&d.type===dg&&d.key==null&&(w=Dg(d.props.children)),s=_g(e,ag(w)?w:[w],t,n,r,i,a,o,s,c,l,u),t.__u&=-161,f.__h.length&&o.push(f),_&&(f.__g&=-4)}catch(e){if(t.__v=null,c||a!=null)if(e.then){for(T=0,E=!1,t.__u|=c?160:128,t.__c.__z=[],ne=0;ne<a.length;ne++)(re=a[ne])==null||E||(re.nodeType==8&&re.data==`$s`?(T>0&&t.__c.__z.push(re),T++,a[ne]=null):re.nodeType==8&&re.data==`/$s`?(--T>0&&t.__c.__z.push(re),E=T===0,s=a[ne],a[ne]=null):T>0&&(t.__c.__z.push(re),a[ne]=null));if(!E){for(;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__c.__z=[s]}t.__e=s}else{for(ie=a.length;ie--;)cg(a[ie]);Tg(t)}else t.__e=n.__e,t.__k=n.__k,e.then||Tg(t);J.__e(e,t,n)}else s=t.__e=Og(n.__e,t,n,r,i,a,o,c,l,u);return(d=J.diffed)&&d(t),128&t.__u?void 0:s}function Tg(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(Tg)}function Eg(e,t,n){for(var r=0;r<n.length;r++)kg(n[r],n[++r],n[++r]);J.__c&&J.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){J.__e(e,t.__v)}})}function Dg(e){return typeof e!=`object`||!e||e.__b&&e.__b>0?e:ag(e)?e.map(Dg):sg({},e)}function Og(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v=n.props,y=t.props,b=t.type;if(b==`svg`?i=`http://www.w3.org/2000/svg`:b==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||=`http://www.w3.org/1999/xhtml`,a!=null){for(u=0;u<a.length;u++)if((m=a[u])&&`setAttribute`in m==!!b&&(b?m.localName==b:m.nodeType==3)){e=m,a[u]=null;break}}if(e==null){if(b==null)return l.createTextNode(y);e=l.createElementNS(i,b,y.is&&y),s&&=(J.__m&&J.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a&&=og.call(e.childNodes),v=n.props||rg,!s&&a!=null)for(v={},u=0;u<e.attributes.length;u++)v[(m=e.attributes[u]).name]=m.value;for(u in v)if(m=v[u],u!=`children`){if(u==`dangerouslySetInnerHTML`)f=m;else if(!(u in y)){if(u==`value`&&`defaultValue`in y||u==`checked`&&`defaultChecked`in y)continue;Sg(e,u,null,m,i)}}for(u in _=1&n.__u,y)m=y[u],u==`children`?p=m:u==`dangerouslySetInnerHTML`?d=m:u==`value`?h=m:u==`checked`?g=m:s&&typeof m!=`function`||v[u]===m&&!_||Sg(e,u,m,v[u],i);if(d)s||f&&(d.__html==f.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(f&&(e.innerHTML=``),_g(b==`template`?e.content:e,ag(p)?p:[p],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&pg(n,0),s,c,l),a!=null)for(u=a.length;u--;)cg(a[u]);s||(u=`value`,b==`progress`&&h==null?e.removeAttribute(`value`):h==null||h===e[u]&&(b!==`progress`||h)||Sg(e,u,h,v[u],i),u=`checked`,g!=null&&g!=e[u]&&Sg(e,u,g,v[u],i))}return e}function kg(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){J.__e(e,n)}}function Ag(e,t,n){var r,i;if(J.unmount&&J.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||kg(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){J.__e(e,t)}r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Ag(r[i],t,n||typeof e.type!=`function`);n||cg(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function jg(e,t,n){return this.constructor(e,n)}function Mg(e,t){var n,r,i,a;t==document&&(t=document.documentElement),J.__&&J.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=lg(dg,null,[e]),i=[],a=[],wg(t,e,r||rg,rg,t.namespaceURI,r?null:t.firstChild?og.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,a,t.ownerDocument),Eg(i,e,a)}function Ng(e,t){e.__u|=32,Mg(e,t)}J={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!(1&i.__g)){i.__g|=4;try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=8&i.__g),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=8&i.__g),o)return void(i.__g|=2)}catch(t){e=t}}throw Zh=0,e}},Jh=0,fg.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=sg({},this.state);typeof e==`function`&&(e=e(sg({},n),this.props)),e&&sg(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),hg(this))},fg.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),hg(this))},fg.prototype.render=dg,Yh=[],Zh=0,Qh=function(e,t){return e.__v.__b-t.__v.__b},$h=/(PointerCapture)$|Capture$/i,eg=0,tg=Cg(!1),ng=Cg(!0);var Pg=0;Array.isArray;function Y(e,t,n,r,i,a){t||={};var o,s,c=t;if(`ref`in c&&typeof e!=`function`)for(s in c={},t)s==`ref`?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Pg,__i:-1,__u:0,__source:i,__self:a};return J.vnode&&J.vnode(l),l}var Fg=16,Ig=16,Lg={};function Rg({name:e,remappedFrom:t,token:n,width:r,height:i,viewBox:a,label:o,alignCapitals:s=!1}){"use no memo";let c=`#${e.replace(/^#/,``)}`,{width:l,height:u,viewBox:d}=Lg[e]??{width:Fg,height:Ig},f=r??l,p=i??u,m=a??d??`0 0 ${l} ${u}`;return Y(`svg`,{"data-icon-name":t??e,"data-icon-token":n,"data-align-capitals":s,...o==null?{"aria-hidden":!0}:{"aria-label":o,role:`img`},viewBox:m,width:f,height:p,children:Y(`use`,{href:c})})}var zg=e=>e!==void 0&&/\s/.test(e),Bg=(e,t)=>{let n=t=>zg(e[t-1])||zg(e[t]);if(!n(t))return t;for(let r=1;r<e.length;r++){let i=t-r;if(i>0&&!n(i))return i;let a=t+r;if(a<e.length&&!n(a))return a}return t},Vg=e=>Bg(e,Math.ceil(e.length/2)),Hg=e=>{if(e.length<2)return[e,``];let t=Vg(e);return[e.slice(0,t),e.slice(t)]},Ug=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`.`)+1,n=e.length-t>10,r=t>=1&&!n?t:Vg(e);return[e.slice(0,r),e.slice(r)]},Wg=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`/`)+1,n=e.length-t>25,r=t>=1&&!n?t:Math.ceil(e.length/2);return[e.slice(0,r),e.slice(r)]},Gg=(e,{splitIndex:t}={})=>{if(typeof t!=`number`){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}return[e.slice(0,t),e.slice(t)]},Kg=(e,{splitOffset:t}={})=>{if(typeof t!=`number`||t<=0||t>=e.length){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}let n=e.length-t;return[e.slice(0,n),e.slice(n)]},qg=(e,{splitOffset:t}={})=>{if(typeof t!=`number`||t<=0||t>=e.length){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}let n=t;return[e.slice(0,n),e.slice(n)]};function Jg({children:e,marker:t,variant:n=`default`}){"use no memo";return Y(`div`,{"aria-hidden":!0,"data-truncate-marker-cell":!0,children:Y(`div`,{"data-truncate-marker":!0,children:typeof t==`function`?t({children:e}):n===`fade`?Y(`span`,{"data-truncate-fade":!0}):t})})}function Yg(e){"use no memo";let{mode:t,children:n}=e;return Y(`div`,{children:[Y(`div`,{"data-truncate-content":`visible`,children:t===`fruncate`?Y(`span`,{children:n}):n}),Y(`div`,{"data-truncate-content":`overflow`,"aria-hidden":!0,children:t===`fruncate`?Y(`span`,{children:n}):n})]})}function Xg({children:e,mode:t=`truncate`,marker:n=`…`,variant:r=`default`,...i}){"use no memo";let a=Y(Yg,{mode:t,children:e},`content`),o=Y(Jg,{marker:n,mode:t,variant:r},`marker`),s=Y(`div`,{"data-truncate-fill":!0},`fill`);return Y(`div`,{"data-truncate-container":t,"data-truncate-variant":r,...i,children:Y(`div`,{"data-truncate-grid":!0,children:t===`truncate`?[a,o]:[o,a,s]})})}function Zg({children:e,...t}){"use no memo";return Y(Xg,{mode:`truncate`,...t,children:e})}function Qg({children:e,...t}){"use no memo";return Y(Xg,{mode:`fruncate`,...t,children:e})}function $g({children:e,contents:t,priority:n=`end`,split:r=`center`,minimumLength:i=12,className:a,style:o,...s}){"use no memo";let c=null,l=null;if(Array.isArray(t)){if(t.length!==2)return console.error(`MiddleTruncate: contents must be an array of two items`),null;c=Y(Zg,{...s,children:t[0]}),l=Y(Qg,{...s,children:t[1]})}else{if(typeof e!=`string`)return console.error(`MiddleTruncate: children must be a string`),null;if(e.length===0)return Y(`div`,{className:a,style:o});if(e.length<i)return Y(n===`end`?Qg:Zg,{...s,className:a,style:o,children:e});let t=null,u=null,d=null;if(typeof r==`string`)r===`center`?t=Hg:r===`extension`?t=Ug:r===`leaf-path`&&(t=Wg);else if(typeof r==`number`)t=Gg,u=r;else if(Array.isArray(r)){let[e,n]=r;d=n,e===`last`?t=Kg:e===`first`&&(t=qg)}else typeof r==`function`&&(t=r);t??=Hg;let[f,p]=t(e,{priority:n,variant:s.variant,splitIndex:typeof u==`number`?u:void 0,splitOffset:typeof d==`number`?d:void 0}),m=f.length>=p.length,h=n===`equal`&&!m,g=n===`equal`&&m,_={},v={};h&&(_.marker=``),g&&(v.marker=``),c=Y(Zg,{...s,..._,children:f}),l=Y(Qg,{...s,...v,children:p})}return Y(`div`,{"data-truncate-group-container":`middle`,className:a,style:o,children:[Y(`div`,{"data-truncate-segment-priority":n===`start`||n===`equal`?`1`:`2`,children:c}),Y(`div`,{"data-truncate-segment-priority":n===`end`||n===`equal`?`1`:`2`,children:l})]})}var e_={endIndex:-1,startIndex:-1};function t_(e,t,n){return Math.min(Math.max(e,t),n)}function n_(e,t){return e<0||t<e?e_:{endIndex:t,startIndex:e}}function r_(e){return e.startIndex<0||e.endIndex<e.startIndex}function i_(e,t){return r_(e)?0:(e.endIndex-e.startIndex+1)*t}function a_(e,t,n){if(t<=0)return-1;let r=t*n;return e<=0?0:e>=r?t:Math.floor(e/n)}function o_(e,t,n){return t<=0||e<=0?-1:e>=t*n?t-1:Math.ceil(e/n)-1}function s_(e){let t=new Map;return e.forEach((e,n)=>{if(e.kind!==`directory`||!e.isExpanded)return;let r=e.ancestorPaths.length,i=t.get(r);if(i==null){t.set(r,[n]);return}i.push(n)}),t}function c_(e,t){let n=0,r=e.length-1,i=-1;for(;n<=r;){let a=Math.floor((n+r)/2),o=e[a];if(o==null)break;if(o<=t){i=a,n=a+1;continue}r=a-1}return i}function l_(e){let t=new Map,n=[];for(let r=0;r<e.length;r+=1){let i=e[r];if(i==null)continue;let a=i.kind===`directory`&&i.isExpanded?[...i.ancestorPaths,i.path]:i.ancestorPaths,o=0;for(;o<n.length&&o<a.length&&n[o]===a[o];)o+=1;for(let e=n.length-1;e>=o;--e){let i=n[e];i!=null&&t.set(i,r-1)}n.length=o;for(let e=o;e<a.length;e+=1){let t=a[e];t!=null&&n.push(t)}}let r=e.length-1;for(let e of n)t.set(e,r);return t}function u_(e,t,n){if(e.length===0||t<=0)return[];let r=l_(e),i=s_(e),a=[];for(let r=0;r<e.length;r+=1){let o=i.get(r);if(o==null||o.length===0)break;let s=t+r*n,c=c_(o,Math.min(e.length-1,Math.floor(s/n))),l=null;for(;c>=0;){let t=o[c],n=t==null?null:e[t]??null;if(n!=null&&(r===0||n.ancestorPaths[r-1]===a[r-1]?.path)){l=n;break}--c}if(l==null)break;a.push(l)}return a.map((i,a)=>{let o=a*n,s=(r.get(i.path)??e.length-1)+1;if(s>=e.length)return{row:i,top:o};let c=s*n-t;return{row:i,top:Math.min(o,c-n)}}).filter(e=>e.top+n>0)}function d_(e,t){let n=t.totalRowCount??e.length,r=n*t.itemHeight,i=Math.max(0,t.viewportHeight),a=Math.max(0,Math.floor(t.overscan)),o=Math.max(0,r-i),s=t_(t.scrollTop,0,o),c=t.stickyRows??u_(e,s,t.itemHeight),l=c.reduce((e,n)=>Math.max(e,n.top+t.itemHeight),0),u=Math.min(r,s+l),d=Math.max(0,i-l),f=Math.max(0,r-u),p=a_(s,n,t.itemHeight),m=a_(u,n,t.itemHeight),h=l<=0||p<0||p>=n?-1:p,g=h===-1?-1:Math.min(n-1,m-1),_=h===-1||g<h?0:g-h+1,v=d<=0||m>=n?e_:n_(m,o_(u+d,n,t.itemHeight)),y=g+1,b=r_(v)?e_:n_(Math.max(y,v.startIndex-a),Math.min(n-1,v.endIndex+a)),x=i_(b,t.itemHeight);return{occlusion:{firstOccludedIndex:h,lastOccludedIndex:g,occludedCount:_},physical:{itemHeight:t.itemHeight,maxScrollTop:o,overscan:a,scrollTop:s,totalHeight:r,totalRowCount:n,viewportHeight:i},projected:{contentHeight:f,paneHeight:d,paneTop:u},sticky:{height:l,rows:c},visible:v,window:{endIndex:b.endIndex,height:x,offsetTop:r_(b)?0:b.startIndex*t.itemHeight,startIndex:b.startIndex}}}var f_={added:`A`,deleted:`D`,ignored:null,modified:`M`,renamed:`R`,untracked:`U`},p_={added:`Git status: added`,deleted:`Git status: deleted`,ignored:`Git status: ignored`,modified:`Git status: modified`,renamed:`Git status: renamed`,untracked:`Git status: untracked`},m_=`Contains git status items`;function h_(e){return e.current?!0:(e.current=!0,!1)}function g_(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,topInset:i=0,viewportHeight:a}=e;if(n<0)return null;let o=Math.max(0,i),s=n*r,c=s+r;if(s<t+o){let e=Math.max(0,s-o);return e===t?null:e}if(c>t+a){let e=c-a;return e===t?null:e}return null}function __(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,offset:i,topInset:a=0,totalHeight:o,viewportHeight:s}=e;if(i===`nearest`)return g_({currentScrollTop:t,focusedIndex:n,itemHeight:r,topInset:a,viewportHeight:s});if(n<0)return null;let c=Math.max(0,a),l=n*r,u=Math.max(0,s-c),d=i===`center`?c+Math.max(0,(u-r)/2):c,f=Math.max(0,o-s),p=Math.max(0,Math.min(l-d,f));return p===t?null:p}function v_(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,targetViewportOffset:i,totalHeight:a,viewportHeight:o}=e;if(n<0)return null;let s=Math.max(0,i),c=n*r,l=c+r,u=t+s,d=t+o;if(c>=u&&l<=d)return null;let f=Math.max(0,a-o),p=Math.max(0,Math.min(c-s,f));return p===t?null:p}function y_(e){if(e==null||!e.isConnected||e===document.body||e===document.documentElement)return!1;e.focus({preventScroll:!0});let t=e.getRootNode();return t instanceof ShadowRoot?t.activeElement===e:document.activeElement===e}function b_(e){let t=e.getRootNode();if(t instanceof ShadowRoot){let e=t.activeElement;return e instanceof HTMLElement?e:null}let n=document.activeElement;return n instanceof HTMLElement&&e.contains(n)?n:null}function x_(e,t){if(e==null)return t;let n=e.getBoundingClientRect().height;return n>0?n:e.clientHeight>0?e.clientHeight:t}function S_(e,t){return e!=null&&e>0?e:t}function C_(e){let t=e.borderBoxSize,n=Array.isArray(t)?t[0]:t;return n!=null&&Number.isFinite(n.blockSize)&&n.blockSize>0?n.blockSize:e.contentRect.height>0?e.contentRect.height:null}function w_(e,t,n,r,i=0){let a=g_({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,topInset:i,viewportHeight:r});return a!=null&&(e.scrollTop=a,!0)}function T_(e,t,n,r,i,a,o=0){let s=__({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,offset:a,topInset:o,totalHeight:i,viewportHeight:r});return s!=null&&(e.scrollTop=s,!0)}function E_(e,t,n,r,i,a){let o=v_({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,targetViewportOffset:a,totalHeight:i,viewportHeight:r});return o!=null&&(e.scrollTop=o,!0)}function D_(e,t,n,r){return n.end<n.start?null:e<n.start?-t:e>n.end?r:null}function O_(e){let{renamingPath:t,previousRenamingPath:n,hasRenderedInput:r}=e;return t==null?`reset`:r?n===t?`ignore`:`focus-input`:`reveal-canonical`}function k_({ariaLabel:e,isFlattened:t=!1,ref:n,value:r,onBlur:i,onInput:a}){return Y(`input`,{ref:n,"data-item-rename-input":!0,...t?{"data-item-flattened-rename-input":!0}:{},"aria-label":e,value:r,onBlur:i,onInput:a,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation()})}function A_(e){let{row:t,mode:n,targetPath:r,ariaLabel:i,domId:a,isParked:o,itemHeight:s,features:c,state:l,extraStyle:u}=e,d=n===`sticky`,f=t.ancestorPaths.at(-1)??``,p={};return l.isFocusRinged&&(p[`data-item-focused`]=!0),t.isSelected&&(p[`data-item-selected`]=!0),l.isContextHovered&&(p[`data-item-context-hover`]=`true`),l.isDragTarget&&(p[`data-item-drag-target`]=!0),l.isDragging&&(p[`data-item-dragging`]=!0),l.effectiveGitStatus!=null&&(p[`data-item-git-status`]=l.effectiveGitStatus),l.containsGitChange&&(p[`data-item-contains-git-change`]=`true`),{"aria-expanded":!d&&t.kind===`directory`?t.isExpanded:void 0,"aria-haspopup":c.contextMenuEnabled?`menu`:void 0,"aria-label":i,"aria-level":d?void 0:t.level+1,"aria-posinset":d?void 0:t.posInSet+1,"aria-selected":d?void 0:t.isSelected?`true`:`false`,"aria-setsize":d?void 0:t.setSize,"data-file-tree-sticky-path":d?r:void 0,"data-file-tree-sticky-row":d?`true`:void 0,"data-item-context-menu-button-visibility":c.actionLaneEnabled?c.contextMenuButtonVisibility:void 0,"data-item-context-menu-trigger-mode":c.contextMenuEnabled?c.contextMenuTriggerMode:void 0,"data-item-has-context-menu-action-lane":c.actionLaneEnabled?`true`:void 0,"data-item-has-git-lane":c.gitLaneActive?`true`:void 0,"data-item-parent-path":f.length>0?f:void 0,"data-item-parked":o?`true`:void 0,"data-item-path":r,"data-item-type":t.kind===`directory`?`folder`:`file`,"data-type":`item`,id:d?void 0:a,role:d?void 0:`treeitem`,style:{minHeight:`${s}px`,...u},tabIndex:!d&&t.isFocused?0:-1,...p}}function j_(e){let{event:t,mode:n,isSearchOpen:r,isDirectory:i}=e,a=t.ctrlKey||t.metaKey,o=t.shiftKey||a,s=t.shiftKey?{additive:a,kind:`range`}:a?{kind:`toggle`}:{kind:`single`};return{closeSearch:r,revealCanonical:n===`sticky`,selection:s,toggleDirectory:!o&&i}}var M_,X,N_,P_,F_=Object.is,I_=0,L_=[],Z=J,R_=Z.__b,z_=Z.__r,B_=Z.diffed,V_=Z.__c,H_=Z.unmount,U_=Z.__;function W_(e,t){Z.__h&&Z.__h(X,e,I_||t),I_=0;var n=X.__H||(X.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function G_(e){return I_=1,K_(nv,e)}function K_(e,t,n){var r=W_(M_++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):nv(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);F_(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=X,!X.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return!!e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,F_(t,e.__[0])||(o=!0)}}),a&&a.call(this,e,t,n)||o};X.__f=!0;var a=X.shouldComponentUpdate,o=X.componentWillUpdate;X.componentWillUpdate=function(e,t,n){if(4&this.__g){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},X.shouldComponentUpdate=i}return r.__N||r.__}function q_(e,t){var n=W_(M_++,3);!Z.__s&&tv(n.__H,t)&&(n.__=e,n.u=t,X.__H.__h.push(n))}function J_(e,t){var n=W_(M_++,4);!Z.__s&&tv(n.__H,t)&&(n.__=e,n.u=t,X.__h.push(n))}function Q(e){return I_=5,Y_(function(){return{current:e}},[])}function Y_(e,t){var n=W_(M_++,7);return tv(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function $(e,t){return I_=8,Y_(function(){return e},t)}function X_(){for(var e;e=L_.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach($_),e.__H.__h.forEach(ev),e.__H.__h=[]}catch(t){e.__H.__h=[],Z.__e(t,e.__v)}}Z.__b=function(e){X=null,R_&&R_(e)},Z.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),U_&&U_(e,t)},Z.__r=function(e){z_&&z_(e),M_=0;var t=(X=e.__c).__H;t&&(N_===X?(t.__h=[],X.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach($_),t.__h.forEach(ev),t.__h=[],M_=0)),N_=X},Z.diffed=function(e){B_&&B_(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(L_.push(t)!==1&&P_===Z.requestAnimationFrame||((P_=Z.requestAnimationFrame)||Q_)(X_)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),N_=X=null},Z.__c=function(e,t){t.some(function(e){try{e.__h.forEach($_),e.__h=e.__h.filter(function(e){return!e.__||ev(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],Z.__e(n,e.__v)}}),V_&&V_(e,t)},Z.unmount=function(e){H_&&H_(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{$_(e)}catch(e){t=e}}),n.__H=void 0,t&&Z.__e(t,n.__v))};var Z_=typeof requestAnimationFrame==`function`;function Q_(e){var t,n=function(){clearTimeout(r),Z_&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Z_&&(t=requestAnimationFrame(n))}function $_(e){var t=X,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),X=t}function ev(e){var t=X;e.__c=e.__(),X=t}function tv(e,t){return!e||e.length!==t.length||t.some(function(t,n){return!F_(t,e[n])})}function nv(e,t){return typeof t==`function`?t(e):t}function rv(e,t=null,n=null){"use no memo";let r=e.flattenedSegments;return r==null||r.length===0?t??e.name:Y(`span`,{"data-item-flattened-subitems":!0,children:r.map((e,i)=>{let a=i===r.length-1;return Y(dg,{children:[Y(`span`,{"data-item-flattened-subitem":e.path,"data-item-flattened-subitem-drag-target":n===e.path?`true`:void 0,children:a&&t!=null?t:Y(Zg,{children:e.name})}),i<r.length-1?` / `:``]},e.path)})})}function iv(e){return e.isFlattened?e.flattenedSegments?.findLast(e=>e.isTerminal)?.path??e.path:e.path}function av(e){let t=e.flattenedSegments;return t==null||t.length===0?e.name:t.map(e=>e.name).join(` / `)}function ov(e,t,n,r){return e.map((e,i)=>{let a=i*n,o=e.subtreeEndIndex+1;if(o>=r)return{row:e.row,top:a};let s=o*n-t;return{row:e.row,top:Math.min(a,s-n)}}).filter(e=>e.top+n>0)}function sv({controller:e,itemHeight:t,overscan:n,scrollTop:r,stickyFolders:i,viewportHeight:a}){let o=e.getVisibleCount(),s=i&&o>0?e.getStickyRowCandidates(r,t):[],c=s==null&&i&&o>0?e.getVisibleRows(0,o-1):[],l=d_(c,{itemHeight:t,overscan:n,scrollTop:r,stickyRows:s==null?void 0:ov(s,r,t,o),totalRowCount:o,viewportHeight:a}),u=i&&r<=0&&o>0?e.getStickyRowCandidates(1,t):[],d=u!=null&&r<=0?ov(u,1,t,o):i&&r<=0&&c.length>0?u_(c,1,t):l.sticky.rows;return{overlayHeight:d.reduce((e,n)=>Math.max(e,n.top+t),0),overlayRows:d,snapshot:l,visibleRows:c}}var cv=400,lv=40,uv=18;function dv(e,t,n){let r=e,i=document.elementFromPoint?.bind(document)??null,a=r.elementFromPoint?.(t,n)??i?.(t,n)??null;return e instanceof ShadowRoot&&(a==null||!e.contains(a))?fv(e,t,n):a instanceof HTMLElement?a:null}function fv(e,t,n){let r=Array.from(e.querySelectorAll(`[data-type="item"], [data-item-flattened-subitem]`));for(let e=r.length-1;e>=0;e--){let i=r[e],a=i.getBoundingClientRect();if(t>=a.left&&t<=a.right&&n>=a.top&&n<=a.bottom)return i}return null}function pv(e){let t=e?.closest?.(`[data-type="item"]`);if(!(t instanceof HTMLElement))return null;let n=t.dataset.itemPath??null;if(n==null)return null;let r=e?.closest?.(`[data-item-flattened-subitem]`),i=r instanceof HTMLElement?r.getAttribute(`data-item-flattened-subitem`)??null:null;if(i!=null&&i.endsWith(`/`))return{directoryPath:i,flattenedSegmentPath:i,hoveredPath:n,kind:`directory`};if(t.dataset.itemType===`folder`)return{directoryPath:n,flattenedSegmentPath:null,hoveredPath:n,kind:`directory`};let a=t.dataset.itemParentPath??null;return a==null||a.length===0?{directoryPath:null,flattenedSegmentPath:null,hoveredPath:n,kind:`root`}:{directoryPath:a,flattenedSegmentPath:null,hoveredPath:n,kind:`directory`}}function mv(e){let t=e.cloneNode(!0);return t.removeAttribute(`id`),t.dataset.fileTreeDragPreview=`true`,t.setAttribute(`aria-hidden`,`true`),t.tabIndex=-1,Object.assign(t.style,{boxShadow:`0 4px 12px rgba(0, 0, 0, 0.15)`,left:`0px`,margin:`0`,pointerEvents:`none`,position:`fixed`,top:`0px`,willChange:`transform`,zIndex:`10000`}),t}function hv(){return navigator.vendor!==`Apple Computer, Inc.`}function gv(e,t){let n=e-t.top;if(n<lv)return-Math.ceil((lv-Math.max(0,n))/lv*uv);let r=t.bottom-e;return r<lv?Math.ceil((lv-Math.max(0,r))/lv*uv):0}function _v(e,t){if(e!=null){let t=f_[e];return t==null?null:{text:t,title:p_[e]}}return t?{icon:{name:`file-tree-icon-dot`,width:6,height:6},title:m_}:null}function vv(e,t,n){if(t==null||t.size===0)return null;let r=[];for(let i=e.length-1;i>=0;--i){let a=e[i],o=n.get(a);if(o!=null){for(let e of r)n.set(e,o);return o?`ignored`:null}if(t.has(a)){n.set(a,!0);for(let e of r)n.set(e,!0);return`ignored`}r.push(a)}for(let e of r)n.set(e,!1);return null}function yv(e){return e!=null&&`toggle`in e}function bv(e){return e.code===`Space`||e.key===` `||e.key===`Spacebar`}function xv(e){return e.key.length===1&&/^[\p{L}\p{N}]$/u.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey}function Sv(e){return e==null?``:`[data-item-section="spacing-item"][data-ancestor-path="${e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`)}"] { opacity: 1; }`}function Cv(e){return e.shiftKey&&e.key===`F10`||e.key===`ContextMenu`}function wv(e,t){return t&&Cv(e)||(e.ctrlKey||e.metaKey)&&bv(e)?!0:e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`||e.key===`ArrowUp`}var Tv=new Set([`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`]);function Ev(e){for(let t of e.composedPath())if(t instanceof HTMLElement&&(t.dataset.fileTreeContextMenuRoot===`true`||t.dataset.type===`context-menu-anchor`||t.dataset.type===`context-menu-trigger`||t.getAttribute(`slot`)===`context-menu`))return!0;return!1}function Dv(e){return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width,x:e.x,y:e.y}}function Ov(e,t){return{bottom:t,height:0,left:e,right:e,top:t,width:0,x:e,y:t}}function kv(e,t){if(e==null)return t.offsetTop;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return n.top-r.top}function Av(e,t,n){if(n==null){e.delete(t);return}e.set(t,n)}function jv(e,t,n){if(e==null)return null;let r=t.get(e)??null;if(r!=null)return r;let i=n.get(e)??null;return i?.dataset.itemParked===`true`?null:i}function Mv(e){if(e==null)return[];let t=[];for(let n of e.querySelectorAll(`button[data-file-tree-sticky-row="true"]`)){if(!(n instanceof HTMLElement))continue;let e=n.dataset.fileTreeStickyPath;e!=null&&t.push(e)}return t}function Nv(e,t){if(e==null||t==null)return null;for(let n of e.querySelectorAll(`button[data-item-focused="true"][data-item-parked="true"]`))if(n instanceof HTMLElement&&n.dataset.itemPath===t)return n;return null}function Pv(e,t,n,r,i,a,o){let s=Math.max(0,a-i),c=t?.getBoundingClientRect()??null,l=c==null||n==null?null:n.getBoundingClientRect().top-c.top,u=Nv(e,r),d=c==null||u==null?null:u.getBoundingClientRect().top-c.top;return Math.max(0,Math.min(d??Math.max(l??0,s),Math.max(0,o-i)))}function Fv(e,t){return{kind:e.kind,name:av(e),path:t}}function Iv(e){return e==null?void 0:`${e}__tree`}function Lv(e,t,n){if(e!=null)return`${e}__focused-item-${encodeURIComponent(t)}${n?`__parked`:``}`}function Rv(e){return e===`file-tree-icon-chevron`||e===`file-tree-icon-dot`||e===`file-tree-icon-file`||e===`file-tree-icon-lock`}function zv(e,t){if(e==null)return null;if(`text`in e)return e.parts==null?Y(`span`,{title:e.title,children:e.text}):Y(`span`,{title:e.title,children:e.parts.map((e,t)=>Y(`span`,{style:{color:e.color},children:e.text},t))});let n=typeof e.icon==`string`?Rv(e.icon)?t(e.icon):{name:e.icon}:Rv(e.icon.name)?(()=>{let n=t(e.icon.name),{name:r,...i}=e.icon;return{...n,...i}})():e.icon;return Y(`span`,{title:e.title,children:Y(Rg,{...n})})}function Bv(e){e!=null&&y_(e.querySelector([`button:not([disabled])`,`[href]`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `))??e)}function Vv(e,t,{actionLaneEnabled:n=!1,customDecoration:r=null,decorationLaneEnabled:i=!1,dragTargetFlattenedSegmentPath:a=null,gitDecoration:o=null,gitLaneActive:s=!1,renameInput:c=null,showDecorativeActionAffordance:l=!1}={}){let u=iv(e);return Y(dg,{children:[e.depth>0?Y(`div`,{"data-item-section":`spacing`,children:Array.from({length:e.depth}).map((t,n)=>Y(`div`,{"data-item-section":`spacing-item`,"data-ancestor-path":e.ancestorPaths[n]},n))}):null,Y(`div`,{"data-item-section":`icon`,children:e.kind===`directory`?Y(Rg,{...t(`file-tree-icon-chevron`)}):Y(Rg,{...t(`file-tree-icon-file`,u)})}),Y(`div`,{"data-item-section":`content`,children:e.isFlattened?rv(e,c,a):c??Y($g,{minimumLength:5,split:`extension`,children:e.name})}),i?Y(`div`,{"data-item-section":`decoration`,children:r==null?null:zv(r,t)}):null,s?Y(`div`,{"data-item-section":`git`,children:zv(o,t)}):null,n?Y(`div`,{"data-item-section":`action`,children:l?Y(`span`,{"aria-hidden":`true`,"data-item-action-affordance":`decorative`,children:Y(Rg,{...t(`file-tree-icon-ellipsis`)})}):null}):null]})}function Hv(e,t,n,r={}){let{controller:i,renameView:a,visualFocusPath:o,contextHoverPath:s,draggedPathSet:c,dragTarget:l,dragAndDropEnabled:u,shouldSuppressContextMenu:d,handleRowDragStart:f,handleRowDragEnd:p,handleRowTouchStart:m,instanceId:h,itemHeight:g,gitStatusByPath:_,ignoredGitDirectories:v,ignoredInheritanceCache:y,directoriesWithGitChanges:b,gitLaneActive:x,contextMenuEnabled:S,contextMenuTriggerMode:C,contextMenuButtonTriggerEnabled:ee,contextMenuButtonVisibility:te,contextMenuRightClickEnabled:w,registerRenameInput:T,registerButton:E,resolveIcon:ne,renderDecorationForRow:re,openContextMenuForRow:ie,onRowClick:D,onKeyDown:ae}=e,O=iv(t),{isParked:oe=!1,mode:se=`flow`,style:ce}=r,le=se===`sticky`,ue=_?.get(O)??null??vv(t.ancestorPaths,v,y),de=t.kind===`directory`&&(b?.has(O)??!1),fe=re(t,O),pe=_v(ue,de),me=S&&ee,k=fe!=null||x||me,he=me&&te===`always`,ge=a.getPath()===O,_e=ge?a.getValue():``,ve=le||!ge?null:Y(k_,{ref:T,ariaLabel:`Rename ${av(t)}`,isFlattened:t.isFlattened,value:_e,onBlur:()=>{a.commit()},onInput:e=>{a.setValue(e.currentTarget.value)}}),ye=Vv(t,ne,{actionLaneEnabled:me,customDecoration:fe,decorationLaneEnabled:k,dragTargetFlattenedSegmentPath:l?.flattenedSegmentPath??null,gitDecoration:pe,gitLaneActive:x,renameInput:ve,showDecorativeActionAffordance:he}),be={...A_({ariaLabel:av(t),domId:t.isFocused?Lv(h,O,oe):void 0,extraStyle:ce,features:{actionLaneEnabled:me,contextMenuButtonVisibility:me?te:null,contextMenuEnabled:S,contextMenuTriggerMode:S?C:null,gitLaneActive:x},isParked:oe,itemHeight:g,mode:se,row:t,state:{containsGitChange:de,effectiveGitStatus:ue,isContextHovered:s===O,isDragTarget:l?.kind===`directory`&&l.directoryPath===O,isDragging:c?.has(O)===!0,isFocusRinged:t.isFocused&&o===O},targetPath:O}),key:n,onContextMenu:S||u?e=>{if(d()){e.preventDefault();return}S&&(e.preventDefault(),w&&(i.focusMountedPathFromInput(O),ie(t,O,{anchorRect:Ov(e.clientX,e.clientY),source:`right-click`})))}:void 0,onFocus:le?void 0:()=>{i.focusMountedPathFromInput(O)},onKeyDown:le?void 0:ae,ref:e=>{E(O,e)}};return!le&&ge?Y(`div`,{...be,children:ye}):Y(`button`,{...be,type:`button`,draggable:u&&!oe,onDragEnd:u&&!oe?p:void 0,onDragStart:u&&!oe?e=>{f(e,t,O)}:void 0,onMouseDown:e=>{if(le){e.preventDefault();return}i.isSearchOpen()&&e.preventDefault()},onTouchStart:u&&!oe?e=>{m(e,t,O)}:void 0,onClick:e=>{D(e,t,O,se)},children:ye})}function Uv(e,t,n){return t.end<t.start?[]:e.controller.getVisibleRows(t.start,t.end).filter(e=>!n.has(iv(e))).map((n,r)=>Hv(e,n,t.start+r))}function Wv({composition:e,controller:t,gitStatusByPath:n,ignoredGitDirectories:r,directoriesWithGitChanges:i,icons:a,instanceId:o,itemHeight:s=Lm,overscan:c=10,renamingEnabled:l=!1,renderRowDecoration:u,searchBlurBehavior:d=`close`,searchEnabled:f=!1,searchFakeFocus:p=!1,slotHost:m,stickyFolders:h=!1,initialViewportHeight:g=420}){"use no memo";let _=Q(null),v=Q(null),y=Q(!1),b=Q(null),x=Q(null),S=Q(null),C=Q(null),ee=Q(null),te=Q(new Map),w=Q(new Map),T=Q(()=>{}),E=Q(null),ne=Q(0),re=Q(!1),ie=Q(null);ie.current!==t&&(re.current=!1,ie.current=t);let D=Q(!1),ae=Q(null),O=Q(null),oe=Q(!1),se=Q(null),ce=Q(null),le=Q(null),ue=Q(null),de=Q(null),fe=Q(null),pe=Q(null),me=Q(null),k=Q(!1),he=Q(null),ge=Q(null),_e=Q(null),ve=Q(null),ye=Y_(()=>new Map,[]),[,be]=G_(0),xe=Q(!1),[Se,Ce]=G_(null),[A,we]=G_(null),[j,M]=G_(null),[Te,Ee]=G_(null),[De,Oe]=G_(0),[N,ke]=G_(null),Ae=Q(N);Ae.current=N;let je=Q(null),Me=Q(null),Ne=Q(null),Pe=Q(null),Fe=Q(null),Ie=Q(!1),Le=()=>{Me.current=null,Ne.current=null,Pe.current=null},Re=(e,t)=>{Me.current=e,Ne.current=null,Pe.current=t==null?null:{path:e,scrollTop:t}},ze=(e,t)=>{Me.current=null,Ne.current={path:e,viewportOffset:t},Pe.current=null},Be=Q(d===`retain`&&t.isSearchOpen()),[Ve,He]=G_(p);q_(()=>{p||He(!1)},[p]);let Ue=Q(!1),We=$(()=>{Ue.current=!0,He(e=>e&&!1)},[]),[Ge,Ke]=G_(()=>sv({controller:t,itemHeight:s,overscan:c,scrollTop:0,stickyFolders:h,viewportHeight:g})),[qe,Je]=G_(!1);q_(()=>{Je(!0)},[]);let P=e?.contextMenu?.enabled===!0||e?.contextMenu?.render!=null||e?.contextMenu?.onOpen!=null||e?.contextMenu?.onClose!=null,Ye=e?.contextMenu?.triggerMode??(P?`right-click`:`both`),Xe=Ye===`both`||Ye===`button`,Ze=e?.contextMenu?.buttonVisibility??`when-needed`,Qe=Ye===`both`||Ye===`right-click`;J_(()=>{let e=S.current;if(e==null)return;let t=e=>{if(!(e instanceof CustomEvent))return;let t=e.detail?.path??null;Fe.current=t,we(t),Ee(t==null?null:`pointer`)},n=e=>{e instanceof CustomEvent&&(Ie.current=e.detail?.disabled===!0)};return e.addEventListener(`file-tree-debug-set-context-menu-trigger`,t),e.addEventListener(`file-tree-debug-set-scroll-suppression`,n),()=>{e.removeEventListener(`file-tree-debug-set-context-menu-trigger`,t),e.removeEventListener(`file-tree-debug-set-scroll-suppression`,n)}},[]);let $e=$((e,t)=>{Av(te.current,e,t)},[]),et=$((e,t)=>{Av(w.current,e,t)},[]),tt=$(e=>{x.current=e},[]),nt=$(e=>jv(e,w.current,te.current),[]),rt=n!=null||r!=null||i!=null,{resolveIcon:it}=Y_(()=>nd(a),[a]),at=t[Oh](),ot=at.getPath(),st=ot!=null,ct=t.isSearchOpen(),lt=t.getSearchValue(),F=t.getFocusedPath(),I=t.getFocusedIndex(),ut=t.getScrollRequest(),dt=t.isDragAndDropEnabled(),ft=t.getDragSession(),pt=Y_(()=>ft==null?null:new Set(ft.draggedPaths),[ft]),mt=ft?.target??null,ht=ft?.primaryPath??null,gt=Iv(o),{overlayHeight:_t,overlayRows:vt,snapshot:L,visibleRows:yt}=Ge,R=L.physical.viewportHeight,bt=Y_(()=>({end:L.window.endIndex,start:L.window.startIndex}),[L.window.endIndex,L.window.startIndex]),xt=vt,St=L.sticky.rows,Ct=L.physical.totalHeight,wt=L.sticky.height,Tt=Y_(()=>new Set(St.map(e=>iv(e.row))),[St]),Et=I>=0&&I>=bt.start&&I<=bt.end,Dt=$((e,t)=>u?.({item:Fv(e,t),row:e})??null,[u]),Ot=$(e=>y_(e==null?null:te.current.get(e)??null)?!0:y_(S.current),[]),kt=$(e=>{Ot(t.focusNearestPath(e))},[t,Ot]),At=Q(kt);At.current=kt;let jt=Q(!0),Mt=Q(()=>{}),Nt=$((t=!0)=>{let n=Ae.current;n!=null&&(jt.current=jt.current&&t,ke(null),e?.contextMenu?.onClose?.(),jt.current&&kt(n.path))},[e?.contextMenu,kt]);Mt.current=Nt;let Pt=$(e=>{let t=e==null?null:kv(S.current,e);M(e=>e===t?e:t)},[]),Ft=$((e,n,r)=>{let i=t.getItem(n);if(i==null)return;let a=nt(n);if(a?.dataset.fileTreeStickyRow===`true`){let e=C.current;Re(n,e?.scrollTop??null),D.current=!0,Ce(e=>e===n?e:n)}i.focus(),Pt(a),jt.current=!0,ke({anchorRect:r?.anchorRect??null,item:Fv(e,n),path:n,source:r?.source??`keyboard`})},[t,nt,Pt]),It=$(e=>{if(l){if(t.isSearchOpen()){let e=C.current,t=x_(e,R);se.current=I<0||e==null?null:Math.max(0,Math.min(I*s-e.scrollTop,Math.max(0,t-s))),oe.current=!0}t.startRenaming(e)!==!1&&(Ee(`focus`),be(e=>e+1))}},[t,I,s,l,R]),Lt=$((e,{restoreTreeFocus:n=!0,targetOffset:r=`live-overlay`}={})=>{let i=C.current;if(i==null)return!1;t.focusPath(e);let a=t.getFocusedIndex();if(a<0)return!1;let o=t.getVisibleRows(a,a)[0]??null;if(o==null)return!1;let l=x_(i,R),u=t.getVisibleCount()*s,d=r===`sticky-parents`?o.ancestorPaths.length*s:sv({controller:t,itemHeight:s,overscan:c,scrollTop:i.scrollTop,stickyFolders:h,viewportHeight:l}).snapshot.sticky.height;return D.current=!0,E_(i,a,s,l,u,d),T.current(),je.current=n?e:null,!0},[t,s,c,R,h]),Rt=()=>y.current===!0||ve.current!=null||k.current===!0,zt=e=>typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>{e()}):window.setTimeout(e,16),Bt=e=>{if(e!=null){if(typeof window.cancelAnimationFrame==`function`){window.cancelAnimationFrame(e);return}window.clearTimeout(e)}},Vt=()=>{ue.current!=null&&(clearTimeout(ue.current),ue.current=null),le.current=null},Ht=()=>{fe.current?.remove(),fe.current=null},Ut=()=>{Bt(ce.current),ce.current=null,de.current=null},Wt=e=>{let t=S.current?.getRootNode();if(t instanceof ShadowRoot){t.append(e);return}document.body.append(e)},Gt=()=>{me.current?.(),me.current=null,ve.current!=null&&(clearTimeout(ve.current),ve.current=null),k.current=!1,he.current=null,_e.current=null,ge.current!=null&&(ge.current.setAttribute(`draggable`,`true`),ge.current.style.removeProperty(`touch-action`),ge.current=null),Ht(),Vt(),Ut(),pe.current=null},Kt=(e,n)=>{let r=S.current?.getRootNode(),i=pv(dv(r instanceof ShadowRoot?r:document,e,n));return t.setDragTarget(i),t.getDragSession()?.target??null},qt=e=>{let n=t.getDragAndDropConfig()?.openOnDropDelay??800;if(e==null||e.kind!==`directory`||e.directoryPath==null||n<=0){Vt();return}let r=t.getItem(e.directoryPath),i=yv(r)?r:null;if(i==null||i.isExpanded()){Vt();return}let a=`${e.directoryPath}::${e.flattenedSegmentPath??``}`;le.current!==a&&(Vt(),le.current=a,ue.current=setTimeout(()=>{let n=t.getDragSession()?.target;n?.kind===`directory`&&n.directoryPath===e.directoryPath&&n.flattenedSegmentPath===e.flattenedSegmentPath&&i.expand()},n))},Jt=()=>{ce.current=null;let e=de.current,n=C.current;if(e==null||n==null||t.getDragSession()==null)return;let r=n.getBoundingClientRect(),i=gv(e.clientY,r);if(i===0)return;let a=Math.max(0,n.scrollHeight-n.clientHeight),o=Math.max(0,Math.min(a,n.scrollTop+i));o!==n.scrollTop&&(n.scrollTop=o,T.current()),qt(Kt(e.clientX,e.clientY)),ce.current=zt(Jt)},Yt=(e,t)=>{de.current={clientX:e,clientY:t},ce.current??=zt(Jt)},Xt=(e,n,r)=>{let i=e.currentTarget;if(i!=null){if(Gt(),Ht(),Vt(),Ut(),t.startDrag(r)===!1){e.preventDefault();return}if(pe.current=n,e.dataTransfer!=null&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.dropEffect=`move`,e.dataTransfer.setData(`text/plain`,r),hv())){let t=mv(i),n=i.getBoundingClientRect();Object.assign(t.style,{height:`${n.height}px`,opacity:`0.85`,transform:`translate3d(-9999px, 0px, 0)`,width:`${n.width}px`}),Wt(t),fe.current=t,e.dataTransfer.setDragImage(t,Math.max(0,e.clientX-n.left),Math.max(0,e.clientY-n.top))}}},Zt=()=>{Ht(),Vt(),Ut(),pe.current=null,t.cancelDrag()},Qt=(e,n,r)=>{if(ve.current!=null||k.current)return;let i=e.touches[0],a=e.currentTarget;if(i==null||a==null)return;_e.current={clientX:i.clientX,clientY:i.clientY},ge.current=a,a.setAttribute(`draggable`,`false`);let o=(e={})=>{let t=e.restoreNativeDraggable??!k.current;ve.current!=null&&(clearTimeout(ve.current),ve.current=null),document.removeEventListener(`touchmove`,s),document.removeEventListener(`touchend`,c),document.removeEventListener(`touchcancel`,c),me.current===o&&(me.current=null),t&&(a.setAttribute(`draggable`,`true`),ge.current===a&&(ge.current=null),_e.current=null)},s=e=>{let t=e.touches[0],n=_e.current;if(t==null||n==null)return;let r=t.clientX-n.clientX,i=t.clientY-n.clientY;r*r+i*i<=100||o()},c=()=>{o()};document.addEventListener(`touchmove`,s,{passive:!0}),document.addEventListener(`touchend`,c),document.addEventListener(`touchcancel`,c),me.current=o,ve.current=setTimeout(()=>{if(o({restoreNativeDraggable:!1}),t.startDrag(r)===!1){a.setAttribute(`draggable`,`true`),ge.current===a&&(ge.current=null),_e.current=null;return}k.current=!0,ge.current=a,a.setAttribute(`draggable`,`false`),a.style.setProperty(`touch-action`,`none`),pe.current=n;let e=a.getBoundingClientRect(),s=mv(a);Object.assign(s.style,{height:`${e.height}px`,opacity:`0.85`,transform:`translate3d(${e.left}px, ${e.top}px, 0)`,width:`${e.width}px`}),Wt(s),fe.current=s,he.current={x:i.clientX-e.left,y:i.clientY-e.top};let c=e=>{let t=e.touches[0];if(t==null)return;e.preventDefault();let n=he.current;n!=null&&fe.current!=null&&(fe.current.style.transform=`translate3d(${t.clientX-n.x}px, ${t.clientY-n.y}px, 0)`),qt(Kt(t.clientX,t.clientY)),Yt(t.clientX,t.clientY)},l=e=>{let n=e.changedTouches[0];n!=null&&Kt(n.clientX,n.clientY),t.completeDrag(),Gt()},u=()=>{t.cancelDrag(),Gt()};me.current=()=>{document.removeEventListener(`touchmove`,c),document.removeEventListener(`touchend`,l),document.removeEventListener(`touchcancel`,u)},document.addEventListener(`touchmove`,c,{passive:!1}),document.addEventListener(`touchend`,l),document.addEventListener(`touchcancel`,u)},cv)},$t=e=>{if(N!=null){if(e.key===`Escape`){Nt(),e.preventDefault(),e.stopPropagation();return}Tv.has(e.key)&&(e.preventDefault(),e.stopPropagation());return}if(at.isActive()){if(e.isComposing||e.keyCode===229)return;if(e.key===`Escape`)at.cancel();else if(e.key===`Enter`)at.commit();else return;Ee(`focus`),be(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(l&&e.key===`F2`){It(F??void 0),e.preventDefault(),e.stopPropagation();return}if(ct){if(e.key===`Escape`)oe.current=!1,se.current=null,t.closeSearch();else if(e.key===`Enter`){let e=t.getFocusedPath();e!=null&&t.selectOnlyPath(e);let n=C.current,r=x_(n,R);se.current=I<0||n==null?null:Math.max(0,Math.min(I*s-n.scrollTop,Math.max(0,r-s))),oe.current=!0,t.closeSearch()}else if(e.key===`ArrowDown`)t.focusNextSearchMatch();else if(e.key===`ArrowUp`)t.focusPreviousSearchMatch();else return;Ee(`focus`),be(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(f&&xv(e)){t.openSearch(e.key),be(e=>e+1),e.preventDefault(),e.stopPropagation();return}let n=P&&Cv(e),r=wv(e,P),i=r&&S.current!=null?b_(S.current):null,a=r?new Set(Mv(S.current)):new Set,o=i?.dataset.fileTreeStickyPath??null,c=i?.dataset.fileTreeStickyRow===`true`&&o!=null;if(c&&o!==F&&a.has(o)){let e=C.current;Re(o,e?.scrollTop??null),t.focusPath(o)}let u=t.getFocusedPath(),d=t.getFocusedIndex(),p=t.getFocusedItem();if(p==null)return;let m=yv(p)?p:null,h=u!=null&&(Tt.has(u)||c&&o===u&&a.has(u)),g=e.key===`ArrowDown`||e.key===`ArrowUp`||e.key===`ArrowRight`&&m!=null&&m.isExpanded(),_=e.key===`ArrowLeft`&&h&&m!=null&&m.isExpanded(),v=C.current,y=!0;if(e.shiftKey&&e.key===`ArrowDown`)t.extendSelectionFromFocused(1);else if(e.shiftKey&&e.key===`ArrowUp`)t.extendSelectionFromFocused(-1);else if(n&&u!=null&&d>=0){let e=t.getVisibleRows(d,d)[0]??null,n=jv(u,w.current,te.current);e==null||n==null?y=!1:Ft(e,u)}else if((e.ctrlKey||e.metaKey)&&bv(e))t.toggleFocusedSelection();else if((e.ctrlKey||e.metaKey)&&e.key.toLowerCase()===`a`)t.selectAllVisiblePaths();else switch(e.key){case`ArrowDown`:t.focusNextItem();break;case`ArrowUp`:t.focusPreviousItem();break;case`ArrowRight`:m==null||m.isExpanded()?t.focusNextItem():m.expand();break;case`ArrowLeft`:m!=null&&m.isExpanded()?m.collapse():t.focusParentItem();break;case`Home`:t.focusFirstItem();break;case`End`:t.focusLastItem();break;default:y=!1}if(!y)return;Ee(`focus`);let b=t.getFocusedPath(),x=b!=null&&(Tt.has(b)||a.has(b)),ee=g&&b!==u,T=n&&c&&o===u&&b===u;if((h||T)&&b!=null&&(ee&&x||T))Re(b,v?.scrollTop??null),D.current=!0,Ce(e=>e===b?e:b);else{let t=e.key===`ArrowUp`&&h&&b!==u;b!=null&&(t||_&&b===u)?(ze(b,Pv(S.current,v,i,u,s,wt,R)),D.current=!0,Ce(e=>e===b?e:b)):Le()}be(e=>e+1),e.preventDefault(),e.stopPropagation()};J_(()=>{if(!(!f||!ct)){if(Be.current){Be.current=!1;return}y_(ee.current)}},[ct,f]),J_(()=>{let e=x.current;switch(O_({hasRenderedInput:e!=null,previousRenamingPath:O.current,renamingPath:ot})){case`reset`:O.current=null;return;case`reveal-canonical`:ot!=null&&Lt(ot,{restoreTreeFocus:!1,targetOffset:`live-overlay`});return;case`ignore`:return;case`focus-input`:e!=null&&(je.current=null,O.current=ot,y_(e),e.select());return}},[bt.end,bt.start,ot,Lt,Tt]),J_(()=>{let e=S.current;if(e==null)return;let t=null,n=()=>{t!=null&&(clearTimeout(t),t=null)},r=()=>{let t=b_(e)?.dataset.itemPath??null;Ce(e=>e===t?e:t)},i=()=>{n(),D.current=!0,r()},a=i=>{let a=i.relatedTarget;if(a==null){n(),t=setTimeout(()=>{if(t=null,b_(e)!=null){r();return}D.current=!1,Ce(null)},0);return}if(!(a instanceof Node)||!e.contains(a)){n(),D.current=!1,Ce(null);return}let o=a instanceof HTMLElement?a.dataset.itemPath??null:null;Ce(e=>e===o?e:o)};return e.addEventListener(`focusin`,i),e.addEventListener(`focusout`,a),()=>{n(),e.removeEventListener(`focusin`,i),e.removeEventListener(`focusout`,a)}},[]),J_(()=>{let e=S.current;e!=null&&(L.physical.scrollTop<=0?e.dataset.scrollAtTop=`true`:delete e.dataset.scrollAtTop)},[L.physical.scrollTop]),J_(()=>{let e=null,n=C.current,r=b.current,i=S.current;if(n==null)return;E.current=x_(n,g);let a=()=>{let e=t.getVisibleCount(),r=S_(E.current,g),i=Math.max(0,e*s-r);n.scrollTop>i&&(n.scrollTop=i),Ke(sv({controller:t,itemHeight:s,overscan:c,scrollTop:Math.min(n.scrollTop,i),stickyFolders:h,viewportHeight:r}))};if(!re.current){re.current=!0;let e=t.getFocusedIndex();if(e>=0){let r=S_(E.current,g),i=t.getVisibleRows(e,e)[0]??null;w_(n,e,s,r,h&&i!=null?Math.max(0,Math.min(i.ancestorPaths.length*s,Math.max(0,r-s))):0)}}T.current=a;let o=t.subscribe(()=>{h_(xe)&&be(e=>e+1),a()}),l=()=>{Ie.current!==!0&&(r!=null&&(r.dataset.isScrolling??=``),i!=null&&(i.dataset.isScrolling??=``),y.current=!0,e!=null&&clearTimeout(e),e=setTimeout(()=>{r!=null&&delete r.dataset.isScrolling,i!=null&&delete i.dataset.isScrolling,y.current=!1,Oe(e=>e+1),e=null},50))},u=null,d=()=>{i!=null&&delete i.dataset.overlayReveal,u!=null&&(clearTimeout(u),u=null)},f=()=>{i!=null&&Ie.current!==!0&&(n.scrollTop>0||(i.dataset.overlayReveal=`true`,u!=null&&clearTimeout(u),u=setTimeout(()=>{d()},200)))},p=()=>{if(a(),n.scrollTop>0&&d(),Ae.current!=null&&y.current&&Mt.current(),Ie.current===!0){y.current=!1;return}we(e=>e==null?e:null),l()},m=()=>{l(),f()},_=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`,` `,`Spacebar`]),v=e=>{_.has(e.key)&&m()};n.addEventListener(`scroll`,p,{passive:!0}),n.addEventListener(`wheel`,m,{passive:!0}),n.addEventListener(`touchmove`,m,{passive:!0}),n.addEventListener(`keydown`,v);let x=typeof ResizeObserver<`u`?new ResizeObserver(e=>{E.current=(e[0]==null?null:C_(e[0]))??x_(n,g),a()}):null;return x?.observe(n),()=>{T.current=()=>{},o(),n.removeEventListener(`scroll`,p),n.removeEventListener(`wheel`,m),n.removeEventListener(`touchmove`,m),n.removeEventListener(`keydown`,v),e!=null&&clearTimeout(e),u!=null&&clearTimeout(u),r!=null&&delete r.dataset.isScrolling,i!=null&&(delete i.dataset.isScrolling,delete i.dataset.overlayReveal),y.current=!1,E.current=null,x?.disconnect()}},[t,g,s,c,h]),J_(()=>{P||N==null||Nt(!1)},[Nt,P,N]);let en=Y_(()=>N==null?null:`${N.path}::${N.source}`,[N]);J_(()=>{if(en==null){m?.clearSlotContent(Ju);return}let t=Ae.current;if(t==null)return;let n=v.current??_.current;if(n==null)return;let r={anchorElement:n,anchorRect:t.anchorRect??Dv(n.getBoundingClientRect()),close:e=>{Mt.current(e?.restoreFocus??!0)},restoreFocus:()=>{jt.current&&At.current(Ae.current?.path??null)}},i=e?.contextMenu?.render?.(t.item,r)??null;return m?.setSlotContent(Ju,i),e?.contextMenu?.onOpen?.(t.item,r),Bv(i),queueMicrotask(()=>{i==null||!i.isConnected||document.activeElement===i&&Bv(i)}),()=>{m?.clearSlotContent(Ju)}},[en,e?.contextMenu,m]),J_(()=>{N!=null&&t.getItem(N.path)==null&&Nt()},[Nt,N,t]),J_(()=>{if(N==null)return;let e=S.current?.getRootNode(),t=e instanceof ShadowRoot?e.host:S.current,n=e=>{let n=e.target;n instanceof Node&&(Ev(e)||_.current?.contains(n)!==!0&&t?.contains(n)!==!0&&Nt())},r=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),Nt())};return document.addEventListener(`mousedown`,n,!0),document.addEventListener(`keydown`,r,!0),()=>{document.removeEventListener(`mousedown`,n,!0),document.removeEventListener(`keydown`,r,!0)}},[Nt,N]),J_(()=>{let e=C.current,n=S.current;if(e==null||n==null){ae.current=F;return}let r=F==null?null:te.current.get(F)??null,i=b_(n),a=i?.dataset.itemPath??null,o=st&&x.current===i,c=f&&ee.current===i,l=oe.current&&!ct,u=se.current??0,d=je.current,p=Me.current,m=Ne.current,g=Pe.current,_=i!=null,v=D.current||_,y=ae.current!==F,b=p!=null&&p===F&&F!=null,w=!1,E=!1;if(ut!=null&&ut.id!==ne.current){ne.current=ut.id;let n=ut.visibleIndex,r=t.getVisibleRows(n,n)[0]??null;if(r!=null){let t=h?Math.max(0,Math.min(r.ancestorPaths.length*s,Math.max(0,R-s))):wt;w=!0,E=T_(e,n,s,R,Ct,ut.offset,t)}t.clearScrollRequest(ut.id)}let re=!w&&l&&E_(e,I,s,R,Ct,u),ie=!w&&d!=null&&d===F&&E_(e,I,s,R,Ct,wt),O=!w&&m!=null&&m.path===F&&E_(e,I,s,R,Ct,m.viewportOffset),ce=!w&&g!=null&&g.path===F&&e.scrollTop!==g.scrollTop;if(ce&&(e.scrollTop=g.scrollTop),(ce||E||ie||O||re||v&&y&&d!==F&&!b&&w_(e,I,s,R,wt))&&T.current(),w){ae.current=F;return}if(!v){ae.current=F;return}if(o){ae.current=F;return}if(c&&!l){ae.current=F;return}if(r==null){l&&I>=0&&(E_(e,I,s,R,Ct,u),T.current()),ae.current=F;return}(y||l||d===F||p===F||m?.path===F||g?.path===F||a==null||a!==F)&&(y_(r),d===F&&(je.current=null),p===F&&(Me.current=null),m?.path===F&&(Ne.current=null),g?.path===F&&(Pe.current=null),oe.current=!1,se.current=null),ae.current=F},[t,I,F,Et,s,st,ct,bt,R,f,ut,h,wt,Ct,yt]);let tn=I>=0&&I>=L.visible.startIndex&&I<=L.visible.endIndex,nn=F!=null&&xt.some(e=>iv(e.row)===F),rn=tn||nn,an=Xe&&D.current===!0&&rn?F:null,on=Te===`pointer`?A:null,sn=N?.path??Fe.current??on??an??A,cn=N?.source===`right-click`;J_(()=>{y.current&&N==null||Pt(nt(sn))},[N,nt,bt,R,De,xt,sn,Pt,yt]);let ln=$(e=>{if(y.current||Ev(e))return;let t=e.target;if(!(t instanceof HTMLElement)||t.closest?.(`[data-type="context-menu-trigger"]`)!=null)return;let n=t.closest?.(`[data-file-tree-sticky-row="true"]`),r=t.closest?.(`[data-type="item"]`),i=n instanceof HTMLElement?n.dataset.fileTreeStickyPath??null:r instanceof HTMLElement?r.dataset.itemPath??null:null;i!=null&&Ee(e=>e===`pointer`?e:`pointer`),we(e=>e===i?e:i)},[]),un=$(()=>{we(null)},[]);J_(()=>{if(!dt)return;let e=()=>{Gt(),t.cancelDrag()};return window.addEventListener(`dragend`,e),()=>{window.removeEventListener(`dragend`,e),Gt(),t.cancelDrag()}},[t,dt]);let dn=e=>{if(!dt||t.getDragSession()==null||k.current)return;let n=pv(e.target instanceof HTMLElement?e.target:null);t.setDragTarget(n),qt(t.getDragSession()?.target??null),Yt(e.clientX,e.clientY),e.dataTransfer!=null&&(e.dataTransfer.dropEffect=`move`),e.preventDefault()},fn=e=>{if(!dt||t.getDragSession()==null||k.current)return;let n=e.relatedTarget;n instanceof Node&&S.current?.contains(n)===!0||(Vt(),Ut(),t.setDragTarget(null))},pn=e=>{!dt||t.getDragSession()==null||k.current||(e.preventDefault(),Kt(e.clientX,e.clientY),t.completeDrag(),Ht(),Vt(),Ut(),pe.current=null)},mn=L.window.height,hn=L.window.offsetTop,gn=Math.min(0,R-mn),_n=Math.min(0,R-mn-wt),vn=Se===F||oe.current,yn=F!=null&&vn&&!Et&&I>=0?yt[I]??t.getVisibleRows(I,I)[0]??null:null,bn=yn==null?null:D_(I,s,bt,mn),xn=pe.current,Sn=ht!=null&&xn!=null&&xn.path===ht&&xn.index>=bt.start&&xn.index<=bt.end,Cn=ht!=null&&xn!=null&&xn.path===ht&&!Sn&&xn.path!==yn?.path?xn:null,wn=Cn==null?null:D_(Cn.index,s,bt,mn),Tn=Sv((I>=0?yt[I]??t.getVisibleRows(I,I)[0]??null:null)?.ancestorPaths.at(-1)??null),En=ct&&F!=null?Lv(o,F,!Et):void 0,Dn=N?.path??(ct?F:Se),On=N?.path??A,kn=nt(sn),An=P&&Xe&&!cn&&!st&&kn!=null&&j!=null&&sn!=null,jn=P&&(An||N!=null),Mn=N?.anchorRect,Nn=Mn==null&&kn!=null&&j!=null&&(N!=null||An)?j:null,Pn=Mn==null?Nn==null?void 0:{top:`${Nn}px`}:{left:`${Mn.left}px`,position:`fixed`,right:`auto`,top:`${Mn.top}px`},Fn=cn?{opacity:`0`}:void 0,In=$((e,n,r,i)=>{let a=j_({event:{ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey},isDirectory:n.kind===`directory`,isSearchOpen:ct,mode:i}),o=a.toggleDirectory&&n.kind===`directory`,s=o?t.resolveMountedDirectoryPathFromInput(r):null;if(o&&s==null)return;let c=s??r;switch(a.selection.kind){case`range`:t.selectPathRange(c,a.selection.additive);break;case`toggle`:t.togglePathSelectionFromInput(c);break;case`single`:t.selectOnlyMountedPathFromInput(c)}let l=e.currentTarget instanceof HTMLElement?e.currentTarget:null,u=n.index>=L.visible.startIndex&&n.index<=L.visible.endIndex,d=i===`flow`&&u&&l!=null&&l.dataset.itemParked!==`true`;t.focusMountedPathFromInput(c),d&&(D.current=!0,Ce(e=>e===c?e:c),Ee(`focus`)),o&&t.toggleMountedDirectoryFromInput(c),a.closeSearch&&t.closeSearch(),a.revealCanonical&&Lt(c,{targetOffset:`sticky-parents`})},[t,ct,L.visible.endIndex,L.visible.startIndex,Lt]),Ln=()=>{if(y.current||!Xe||sn==null||kn==null)return;let e=t.getItem(sn);e!=null&&(Pt(kn),jt.current=!0,ke({anchorRect:null,item:{kind:e.isDirectory()?`directory`:`file`,name:kn.getAttribute(`aria-label`)??sn,path:e.getPath()},path:e.getPath(),source:`button`}))},Rn={contextHoverPath:On,contextMenuButtonTriggerEnabled:Xe,contextMenuButtonVisibility:Ze,contextMenuEnabled:P,contextMenuRightClickEnabled:Qe,contextMenuTriggerMode:Ye,controller:t,directoriesWithGitChanges:i,dragAndDropEnabled:dt,draggedPathSet:pt,dragTarget:mt,gitLaneActive:rt,gitStatusByPath:n,handleRowDragEnd:Zt,handleRowDragStart:Xt,handleRowTouchStart:Qt,ignoredGitDirectories:r,ignoredInheritanceCache:ye,instanceId:o,itemHeight:s,onKeyDown:$t,onRowClick:In,openContextMenuForRow:Ft,registerButton:$e,registerRenameInput:tt,renameView:at,renderDecorationForRow:Dt,resolveIcon:it,shouldSuppressContextMenu:Rt,visualFocusPath:Dn},zn={...Rn,registerButton:et};return Y(`div`,{ref:S,id:gt,"data-file-tree-context-menu-button-visibility":P&&Xe?Ze:void 0,"data-file-tree-context-menu-trigger-mode":P?Ye:void 0,"data-file-tree-has-context-menu-action-lane":P&&Xe?`true`:void 0,"data-file-tree-has-git-lane":rt?`true`:void 0,"data-file-tree-virtualized-root":`true`,onDragLeave:dt?fn:void 0,onDragOver:dt?dn:void 0,onDrop:dt?pn:void 0,onKeyDown:$t,onPointerLeave:P?un:void 0,onPointerOver:P?ln:void 0,role:`tree`,tabIndex:-1,style:{outline:`none`,position:`relative`},children:[Y(`style`,{"data-file-tree-guide-style":`true`,dangerouslySetInnerHTML:{__html:Tn}}),Y(`slot`,{name:qu,"data-type":`header-slot`}),f?Y(`div`,{"data-file-tree-search-container":!0,"data-open":ct?`true`:`false`,children:Y(`input`,{ref:ee,"aria-activedescendant":En,"aria-controls":gt,placeholder:`Search…`,"data-file-tree-search-input":!0,"data-file-tree-search-input-fake-focus":Ve?`true`:void 0,value:lt,onBlur:()=>{d===`retain`&&!Ue.current||t.closeSearch()},onFocus:We,onPointerDown:We,onInput:e=>{We();let n=e.currentTarget;t.setSearch(n.value)}})}):null,Y(`div`,{ref:C,"data-file-tree-virtualized-scroll":`true`,children:[h&&qe&&xt.length>0?Y(`div`,{"aria-hidden":`true`,"data-file-tree-sticky-overlay":`true`,children:Y(`div`,{"data-file-tree-sticky-overlay-content":`true`,style:{height:`${_t}px`},children:xt.map((e,t)=>Hv(zn,e.row,`sticky:${iv(e.row)}`,{mode:`sticky`,style:{left:`0`,position:`absolute`,right:`0`,top:`${e.top}px`,zIndex:`${xt.length-t}`}}))})}):null,Y(`div`,{ref:b,"data-file-tree-virtualized-list":`true`,style:{height:`${Ct}px`},children:[Y(`div`,{"data-file-tree-virtualized-sticky-offset":`true`,"aria-hidden":`true`,style:{height:`${hn}px`}}),Y(`div`,{"data-file-tree-virtualized-sticky":`true`,style:{height:`${mn}px`,top:`${gn}px`,bottom:`${_n}px`},children:[Uv(Rn,bt,Tt),yn!=null&&bn!=null?Hv(Rn,yn,`parked:${yn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:ht===yn.path?`none`:void 0,position:`absolute`,right:`0`,top:`${bn}px`}}):null,Cn!=null&&wn!=null?Hv(Rn,Cn,`parked-drag:${Cn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:`none`,position:`absolute`,right:`0`,top:`${wn}px`}}):null]})]})]}),P?Y(`div`,{ref:_,"data-type":`context-menu-anchor`,"data-visible":jn?`true`:`false`,style:Pn,children:[Y(`button`,{ref:v,type:`button`,"data-type":Yu,"aria-label":`Options`,"aria-haspopup":`menu`,"aria-expanded":N==null?`false`:`true`,"data-visible":An?`true`:`false`,onMouseDown:e=>{e.preventDefault()},onClick:e=>{if(e.preventDefault(),e.stopPropagation(),N!=null){Nt();return}Ln()},tabIndex:-1,style:Fn,children:Y(Rg,{...it(`file-tree-icon-ellipsis`)})}),N==null?null:Y(`slot`,{name:Ju})]}):null,N==null?null:Y(`div`,{"data-type":`context-menu-wash`,"aria-hidden":`true`,onMouseDownCapture:e=>{e.preventDefault(),Nt()},onTouchStartCapture:e=>{e.preventDefault(),e.stopPropagation(),Nt()},onTouchMoveCapture:e=>{e.preventDefault(),e.stopPropagation()},onWheelCapture:e=>{e.preventDefault(),e.stopPropagation()}})]})}var Gv={hydrateRoot:(e,t)=>{Ng(lg(Wv,t),e)},renderRoot:(e,t)=>{Mg(lg(Wv,t),e)},unmountRoot:e=>{Mg(null,e)}};function Kv(e,t){Gv.renderRoot(e,t)}function qv(e,t){Gv.hydrateRoot(e,t)}function Jv(e){Gv.unmountRoot(e)}var Yv=class{#e=new Map;#t=null;clearAll(){for(let e of this.#e.values())e.remove();this.#e.clear()}clearSlotContent(e){let t=this.#n(e);t!=null&&(t.remove(),this.#e.delete(e))}setHost(e){if(this.#t=e,e!=null){this.#i(e);for(let[e,t]of this.#e)this.#r(e,t)}}setSlotContent(e,t){let n=this.#n(e);if(n===t){t!=null&&(this.#e.set(e,t),this.#r(e,t));return}if(n?.remove(),t==null){this.#e.delete(e);return}this.#e.set(e,t),this.#r(e,t)}setSlotHtml(e,t){let n=t?.trim()??``;if(n.length===0){this.setSlotContent(e,null);return}let r=this.#n(e);if(r!=null&&r.innerHTML===n){this.#e.set(e,r),this.#r(e,r);return}let i=document.createElement(`div`);i.innerHTML=n,this.setSlotContent(e,i)}#n(e){let t=this.#e.get(e)??null;if(t!=null)return t;let n=this.#t;if(n==null)return null;for(let t of Array.from(n.children))if(t instanceof HTMLElement&&t.dataset.fileTreeManagedSlot===e)return t;return null}#r(e,t){t.slot=e,t.dataset.fileTreeManagedSlot=e,this.#t!=null&&t.parentNode!==this.#t&&this.#t.appendChild(t)}#i(e){for(let t of Array.from(e.children)){if(!(t instanceof HTMLElement))continue;let e=t.dataset.fileTreeManagedSlot;e==null||this.#e.has(e)||this.#e.set(e,t)}}};Array.isArray;var Xv=0;function Zv(e){return e!=null&&e.length>0?e:(Xv+=1,`pst_ft_${Xv}`)}function Qv({initialVisibleRowCount:e,itemHeight:t}){return e==null?420:Math.max(0,e)*(t??Lm)}function $v(e){if(typeof document>`u`)return;let t=document.createElement(`div`);t.innerHTML=e;let n=t.querySelector(`svg`);return n instanceof SVGElement?n:void 0}function ey(e){return e.querySelector(`#file-tree-icon-chevron`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-file`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-dot`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-lock`)instanceof SVGElement}function ty(e){return Array.from(e.children).filter(e=>e instanceof SVGElement)}var ny=class{static LoadedCustomComponent=!0;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=new Yv;#u;#d;#f;#p;#m;#h;#g;#_;#v;#y=null;#b;#x=!1;#S=!1;constructor(e){let{composition:t,density:n,fileTreeSearchMode:r,gitStatus:i,id:a,initialSearchQuery:o,icons:s,itemHeight:c,onSearchChange:l,onSelectionChange:u,overscan:d,renderRowDecoration:f,renaming:p,search:m,searchBlurBehavior:h,searchFakeFocus:g,stickyFolders:_,unsafeCSS:v,initialVisibleRowCount:y,...b}=e;this.#e=t,this.#n=Zv(a),this.#p=zh(i),this.#m=s,this.#h=v,this.#r=u,this.#i=f,this.#a=p!=null&&p!==!1,this.#o=h,this.#s=m===!0,this.#c=g===!0,this.#u=Im(n,c),this.#d={itemHeight:this.#u.itemHeight,overscan:d,stickyFolders:_,initialVisibleRowCount:y},this.#t=new Ph({...b,fileTreeSearchMode:r,initialSearchQuery:o,onSearchChange:l,renaming:p}),this.#v=this.#t.getSelectionVersion(),this.#y=this.#r==null?null:this.subscribe(()=>{this.#D()})}unmount(){this.#b!=null&&(Jv(this.#b),delete this.#b.dataset.fileTreeVirtualizedWrapper,this.#b=void 0),this.#l.clearAll(),this.#l.setHost(null),this.#f!=null&&(delete this.#f.dataset.fileTreeVirtualized,this.#I(this.#f),this.#f=void 0)}cleanUp(){this.unmount(),this.#y?.(),this.#y=null,this.#t.destroy()}getFileTreeContainer(){return this.#f}getItem(e){return this.#t.getItem(e)}getFocusedItem(){return this.#t.getFocusedItem()}getFocusedPath(){return this.#t.getFocusedPath()}getFocusedIndex(){return this.#t.getFocusedIndex()}getVisibleCount(){return this.#t.getVisibleCount()}getVisibleRows(e,t){return this.#t.getVisibleRows(e,t)}getSelectedPaths(){return this.#t.getSelectedPaths()}getComposition(){return this.#e}getItemHeight(){return this.#u.itemHeight}getDensityFactor(){return this.#u.factor}subscribe(e){let t=!1;return this.#t.subscribe(()=>{if(!t){t=!0;return}e()})}focusPath(e){this.#t.focusPath(e)}focusFirstItem(){this.#t.focusFirstItem()}focusLastItem(){this.#t.focusLastItem()}focusNextItem(){this.#t.focusNextItem()}focusPreviousItem(){this.#t.focusPreviousItem()}focusParentItem(){this.#t.focusParentItem()}scrollToPath(e,t){this.#t.scrollToPath(e,t)}focusNearestPath(e){return this.#t.focusNearestPath(e)}add(e){this.#t.add(e)}batch(e){this.#t.batch(e)}applyGitStatusPatch(e){let t=Bh(this.#p,e);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&Kv(n.wrapper,this.#w())}move(e,t,n){this.#t.move(e,t,n)}onMutation(e,t){return this.#t.onMutation(e,t)}setSearch(e){this.#t.setSearch(e)}openSearch(e){this.#t.openSearch(e)}closeSearch(){this.#t.closeSearch()}isSearchOpen(){return this.#t.isSearchOpen()}getSearchValue(){return this.#t.getSearchValue()}getSearchMatchingPaths(){return this.#t.getSearchMatchingPaths()}focusNextSearchMatch(){this.#t.focusNextSearchMatch()}focusPreviousSearchMatch(){this.#t.focusPreviousSearchMatch()}startRenaming(e,t){return this.#t.startRenaming(e,t)}remove(e,t){this.#t.remove(e,t)}resetPaths(e,t){Array.isArray(e)?this.#t.resetPaths(e,t):this.#t.resetPaths(e)}setComposition(e){this.#e=e;let t=this.#T();t!=null&&(this.#O(),Kv(t.wrapper,this.#w()))}setGitStatus(e){let t=zh(e,this.#p);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&Kv(n.wrapper,this.#w())}setIcons(e){this.#m=e;let t=this.#T();t!=null&&(this.#E(t.host,t.wrapper),Kv(t.wrapper,this.#w()))}hydrate({fileTreeContainer:e}){let t=this.#P(e),n=this.#N(t);this.#O(),qv(n,this.#w())}render({containerWrapper:e,fileTreeContainer:t}){let n=this.#P(t??this.#f,e),r=this.#N(n);this.#O(),Kv(r,this.#w())}#C(){return{initialViewportHeight:Qv({initialVisibleRowCount:this.#d.initialVisibleRowCount,itemHeight:this.#d.itemHeight}),itemHeight:this.#d.itemHeight,overscan:this.#d.overscan,stickyFolders:this.#d.stickyFolders}}#w(){return{composition:this.#e,controller:this.#t,gitStatusByPath:this.#p?.statusByPath,ignoredGitDirectories:this.#p?.ignoredDirectoryPaths,directoriesWithGitChanges:this.#p?.directoriesWithChanges,icons:this.#m,instanceId:this.#n,renamingEnabled:this.#a,renderRowDecoration:this.#i,searchBlurBehavior:this.#o,searchEnabled:this.#s,searchFakeFocus:this.#c,slotHost:this.#l,...this.#C()}}#T(){let e=this.#f,t=this.#b;return e==null||t==null?null:{host:e,wrapper:t}}#E(e,t){let n=e.shadowRoot;n!=null&&(this.#k(n),this.#A(n)),this.#j(t)}#D(){let e=this.#r;if(e==null)return;let t=this.#t.getSelectionVersion();t!==this.#v&&(this.#v=t,e(this.#t.getSelectedPaths()))}#O(){let e=this.#e?.header?.render;if(e!=null){this.#l.setSlotContent(qu,e());return}this.#l.setSlotHtml(qu,this.#e?.header?.html??null)}#k(e){let t=ty(e).find(e=>ey(e)),n=$v(Lu(Zu(this.#m).set));n!=null&&(t==null||t.outerHTML!==n.outerHTML)&&(t==null?e.prepend(n):t.replaceWith(n))}#A(e){let t=ty(e),n=t.find(e=>ey(e)),r=t.filter(e=>e!==n),i=Zu(this.#m).spriteSheet?.trim()??``;if(i.length===0){for(let e of r)e.remove();return}let a=$v(i);if(a==null){for(let e of r)e.remove();return}if(r.length!==1||r[0].outerHTML!==a.outerHTML){for(let e of r)e.remove();e.appendChild(a)}}#j(e){let t=Zu(this.#m);t.colored&&zu(t.set)?e.dataset.fileTreeColoredIcons=`true`:delete e.dataset.fileTreeColoredIcons}#M(e){let t=e.querySelector(`style[${Uu}]`);if(this.#g==null&&t instanceof HTMLStyleElement&&(this.#g=t),this.#h==null||this.#h===``){this.#g?.remove(),this.#g=void 0,this.#_=void 0;return}(this.#g?.parentNode!==e||this.#_!==this.#h)&&(this.#g??=document.createElement(`style`),this.#g.setAttribute(Uu,``),this.#g.parentNode!==e&&e.appendChild(this.#g),this.#g.textContent=Vm(this.#h),this.#_=this.#h)}#N(e){if(this.#b!=null)return this.#b;let t=e.shadowRoot;if(t==null)throw Error(`FileTree requires a shadow root`);let n=Array.from(t.children).filter(e=>e instanceof HTMLDivElement&&typeof e.dataset.fileTreeId==`string`&&e.dataset.fileTreeId.length>0),r=n.find(e=>e.dataset.fileTreeId===this.#n)??n[0];return r!=null&&(this.#n=r.dataset.fileTreeId??this.#n),this.#b=r??document.createElement(`div`),this.#b.dataset.fileTreeId=this.#n,this.#b.dataset.fileTreeVirtualizedWrapper=`true`,this.#E(e,this.#b),this.#b.parentNode!==t&&t.appendChild(this.#b),this.#b}#P(e,t){let n=e??this.#f??document.createElement(`file-tree-container`);t!=null&&n.parentNode!==t&&t.appendChild(n);let r=n.shadowRoot??n.attachShadow({mode:`open`});return qm(n,r),this.#M(r),n.dataset.fileTreeVirtualized=`true`,n.style.display=`flex`,this.#F(n),this.#l.setHost(n),this.#f=n,n}#F(e){e.style.getPropertyValue(`--trees-item-height`)===``&&(e.style.setProperty(`--trees-item-height`,`${String(this.#u.itemHeight)}px`),this.#x=!0),e.style.getPropertyValue(`--trees-density-override`)===``&&(e.style.setProperty(`--trees-density-override`,String(this.#u.factor)),this.#S=!0)}#I(e){this.#x&&=(e.style.removeProperty(`--trees-item-height`),!1),this.#S&&=(e.style.removeProperty(`--trees-density-override`),!1)}},ry=`
|
|
6497
|
+
}`}var oh=new WeakMap;function sh(e){let t=oh.get(e);if(t!=null)return t;let n=document.createElement(`div`);n.setAttribute(cd,`true`);let r=document.createElement(`div`);r.style.position=`relative`,r.style.height=`200%`,n.appendChild(r),e.appendChild(n);let i=Math.max(n.offsetWidth-n.clientWidth,0);return n.remove(),oh.set(e,i),i}function ch(e,t){if(!e.isConnected)return;let n=sh(t);if(n==null)return;let r=t.querySelector(`style[${ld}]`),i=r instanceof HTMLStyleElement?r:document.createElement(`style`);r instanceof HTMLStyleElement||(i.setAttribute(ld,``),t.appendChild(i)),i.textContent=`:host { ${ud}: ${n}px; }`}var lh;function uh(e){if(typeof CSSStyleSheet<`u`&&typeof CSSStyleSheet.prototype.replaceSync==`function`&&`adoptedStyleSheets`in e){lh??(lh=new CSSStyleSheet,lh.replaceSync(ih(nh)));let t=!1;try{e.adoptedStyleSheets=[lh],t=!0}catch{}if(t){e.querySelector(`style[${od}]`)?.remove();return}}if(e.querySelector(`style[data-file-tree-style]`)==null){let t=document.createElement(`style`);t.setAttribute(od,``),t.textContent=ih(nh),e.prepend(t)}}function dh(e,t){fh(e,t),uh(t),ch(e,t)}function fh(e,t){let n=e.querySelector(`template[shadowrootmode="open"], template[data-file-tree-shadowrootmode="open"]`);n instanceof HTMLTemplateElement&&(t.childNodes.length>0||(t.appendChild(n.content.cloneNode(!0)),n.hasAttribute(`shadowrootmode`)&&n.remove()))}if(typeof HTMLElement<`u`&&customElements.get(`file-tree-container`)==null){class e extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.shadowRoot??this.attachShadow({mode:`open`});dh(this,e)}}if(customElements.define(ad,e),typeof document<`u`)for(let e of Array.from(document.querySelectorAll(ad)))e instanceof HTMLElement&&dh(e,e.shadowRoot??e.attachShadow({mode:`open`}))}var ph=e=>e.startsWith(`f::`)?e.slice(3):e;function mh(e){let t=e.lastIndexOf(`/`);return t<0?{parentPath:``,baseName:e}:{parentPath:e.slice(0,t),baseName:e.slice(t+1)}}function hh(e,t){return e===``?t:`${e}/${t}`}function gh({files:e,path:t,isFolder:n,nextBasename:r}){let i=ph(t),a=r.trim();if(a.length===0)return{error:`Name cannot be empty.`};if(a.includes(`/`))return{error:`Name cannot include "/".`};let{parentPath:o,baseName:s}=mh(i);if(a===s)return{nextFiles:e,sourcePath:i,destinationPath:i,isFolder:n};let c=hh(o,a),l=Array(e.length),u=new Set;if(!n){let t=`${c}/`,r=!1;for(let n=0;n<e.length;n++){let a=e[n];if(a!==i&&a.startsWith(t))return{error:`"${c}" already exists.`};let o=a===i?c:a;if(u.has(o))return{error:`"${c}" already exists.`};u.add(o),l[n]=o,a===i&&(r=!0)}return r?{nextFiles:l,sourcePath:i,destinationPath:c,isFolder:n}:{error:`Could not find the selected file to rename.`}}let d=`${i}/`,f=`${c}/`,p=0;for(let t=0;t<e.length;t++){let n=e[t],r=n===i||n.startsWith(d);if(!r&&(n===c||n.startsWith(f)))return{error:`"${c}" already exists.`};let a=r?`${c}${n.slice(i.length)}`:n;if(u.has(a))return{error:`"${c}" already exists.`};u.add(a),l[t]=a,r&&p++}return p===0?{error:`Could not find the selected folder to rename.`}:{nextFiles:l,sourcePath:i,destinationPath:c,isFolder:n}}function _h(e){return e.endsWith(`/`)}function vh(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`),r=n<0?t:t.slice(n+1);return e.endsWith(`/`)?`${r}/`:r}function yh(e){let t=[],n=new Set;for(let r of e)n.has(r)||(n.add(r),t.push(r));let r=new Set;for(let e of t.toSorted((e,t)=>e.length===t.length?e.localeCompare(t):e.length-t.length)){let t=(e.endsWith(`/`)?e.slice(0,-1):e).split(`/`),n=!1;for(let e=0;e<t.length-1;e+=1){let i=`${t.slice(0,e+1).join(`/`)}/`;if(r.has(i)){n=!0;break}}n||r.add(e)}return t.filter(e=>r.has(e))}function bh(e,t){return t.includes(e)?yh(t):[e]}function xh(e,t){return e===t?!0:e==null||t==null?!1:e.kind===t.kind&&e.directoryPath===t.directoryPath&&e.flattenedSegmentPath===t.flattenedSegmentPath&&e.hoveredPath===t.hoveredPath}function Sh(e,t){return{draggedPaths:e,target:t}}function Ch(e,t){if(t.kind!==`directory`||t.directoryPath==null)return!1;for(let n of e)if(_h(n)&&(t.directoryPath===n||t.directoryPath.startsWith(n)))return!0;return!1}function wh(e,t){return t.kind===`root`||t.directoryPath==null?vh(e):t.directoryPath}function Th(e,t){let n=e.map(e=>{let n=wh(e,t);return n===e?null:{from:e,to:n,type:`move`}}).filter(e=>e!=null);return n.length===0?null:{operations:n,result:{draggedPaths:e,operation:n.length===1?`move`:`batch`,target:t}}}function Eh(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function Dh(e,t,n){let{paths:r,preparedInput:i}=e;if(i==null){if(r==null)throw Error(`FileTree requires paths or preparedInput`);return{paths:r,preparedInput:void 0}}let a=i.paths;if(r==null)return{paths:a,preparedInput:i};if(!Eh(Xm.preparePaths(r,n==null?{}:{sort:n}),a))throw Error(`FileTree ${t} received paths and preparedInput for different path lists`);return{paths:a,preparedInput:i}}function Oh(e){return e.operation===`add`||e.operation===`remove`||e.operation===`move`||e.operation===`batch`}function kh(e,t,n){if(e===t)return n;let r=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(r)?`${n.endsWith(`/`)?n:`${n}/`}${e.slice(r.length)}`:e}function Ah(e,t){if(e===t)return!0;let n=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(n)}function jh(e,t,n=!1){if(e==null)return null;switch(t.operation){case`add`:case`expand`:case`collapse`:case`mark-directory-unloaded`:case`begin-child-load`:case`apply-child-patch`:case`complete-child-load`:case`fail-child-load`:case`cleanup`:return e;case`remove`:return Ah(e,t.path)?n?e:null:e;case`move`:return kh(e,t.from,t.to);case`batch`:{let r=e;for(let e of t.events)if(r=jh(r,e,n),r==null)return null;return r}}}function Mh(e){return{canonicalChanged:e.canonicalChanged,projectionChanged:e.projectionChanged,visibleCountDelta:e.visibleCountDelta}}function Nh(e){switch(e.operation){case`add`:return{...Mh(e),operation:`add`,path:e.path};case`remove`:return{...Mh(e),operation:`remove`,path:e.path,recursive:e.recursive};case`move`:return{...Mh(e),from:e.from,operation:`move`,to:e.to}}}function Ph(e){return{...Mh(e),events:e.events.filter(e=>e.operation===`add`||e.operation===`remove`||e.operation===`move`).map(e=>Nh(e)),operation:`batch`}}function Fh(e){switch(e.operation){case`add`:case`remove`:case`move`:return Nh(e);case`batch`:return Ph(e);default:return null}}function Ih(e,t){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function Lh(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;if(t.length===0)return[];let n=t.split(`/`);return n.slice(0,-1).map((e,t)=>`${n.slice(0,t+1).join(`/`)}/`)}function Rh(e){return Lh(e).at(-1)??null}function zh(e,t){return t==null?e:e.startsWith(t)?e.slice(t.length):e}function Bh(e){return e.endsWith(`/`)}var Vh=e=>e.toLowerCase();function Hh(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`);return n<0?t:t.slice(n+1)}function Uh(e){return e.endsWith(`/`)?e.slice(0,-1):e}function Wh(e,t){return t&&!e.endsWith(`/`)?`${e}/`:e}var Gh=e=>{let t=e.trim();return t.length===0?``:(t.includes(`\\`)?t.replaceAll(`\\`,`/`):t).toLowerCase()},Kh=Symbol(`FILE_TREE_RENAME_VIEW`),qh=512,Jh=512;function Yh(e){return e===`top`||e===`center`?e:`nearest`}function Xh(e,t,n){if(e===0)return-1;if(n!=null){let e=t(n);if(e!=null)return e;let r=Lh(n);for(let e=r.length-1;e>=0;--e){let n=r[e];if(n==null)continue;let i=t(n);if(i!=null)return i}}return 0}function Zh(e,t,n){if(e.paths.length===0)return{focusedIndex:-1,getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex};if(t==null)return{focusedIndex:0,getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex};let r=n??(t=>e.visibleIndexByPath.get(t)??null);return{focusedIndex:Xh(e.paths.length,r,t),getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex}}var Qh=class e{static{Object.defineProperty(e.prototype,Kh,{configurable:!0,value(){return{cancel:()=>{this.#q()},commit:()=>{this.#J()},getPath:()=>this.#T,getValue:()=>this.#E,isActive:()=>this.#T!=null,setValue:e=>{this.#Y(e)}}},writable:!0})}#e;#t=new Set;#n=new Map;#r=null;#i=null;#a=new Map;#o=new Map;#s=-1;#c=null;#l=!1;#u=e=>-1;#d=new Map;#f=null;#p=null;#m=null;#h=null;#g=null;#_;#v;#y;#b=[];#x=new Int32Array;#S=new Int32Array;#C=void 0;#w=!1;#T=null;#E=``;#D=!1;#O=new Set;#k=[];#A;#j=null;#M=null;#N=null;#P=null;#F=null;#I=null;#L=null;#R=0;#z=null;#B=new Set;#V=0;#H;#U=0;#W=!1;#G=0;#K;constructor(e){let{dragAndDrop:t,fileTreeSearchMode:n,initialSearchQuery:r,initialSelectedPaths:i,renaming:a,onSearchChange:o,paths:s,preparedInput:c,...l}=e,u=Dh({paths:s,preparedInput:c},`constructor`,l.sort);this.#e=l,t!=null&&t!==!1&&(this.#r=t===!0?{}:t),this.#w=a!=null&&a!==!1,a!=null&&a!==!1&&a!==!0&&(this.#C=a.canRename,this.#v=a.onError,this.#_=a.onRename),this.#y=o,this.#A=n??`hide-non-matches`,this.#H=this.#le(u.paths,u.preparedInput);let d=i?.map(e=>this.#Ne(e)).filter(e=>e!=null)??[],f=d.at(-1)??null;d.length>0&&(this.#B=new Set(d),this.#z=f,this.#V=1),this.#je(f,!1),r!=null&&this.#Te(r,!1),this.#K=this.#Re()}destroy(){this.#K?.(),this.#K=null,this.#n.clear(),this.#t.clear(),this.#d.clear(),this.#i=null,this.#he()}focusFirstItem(){this.#be().length>0&&this.#Fe(0)}focusLastItem(){this.#G<=0||(this.#Ie(),this.#Fe(this.#G-1))}focusNextItem(){this.#Ae(1)}focusParentItem(){if(this.#c==null)return;let e=Rh(this.#c);if(e==null)return;let t=this.#Z(e);t>=0&&this.#Fe(t)}focusPath(e){let t=this.#H.getPathInfo(e)?.path??null;if(t==null)return;this.#Ie();let n=this.#Z(t);n>=0&&this.#Fe(n)}scrollToPath(e,t){let n=this.#H.getPathInfo(e)?.path??null;if(n==null)return;this.#Ie();let r=this.#xe(n);r<0||this.#Me(r)!=null&&(t?.focus!==!1&&this.#Fe(r,!1),this.#L={id:this.#R+=1,offset:Yh(t?.offset),visibleIndex:r},this.#De())}focusMountedPathFromInput(e){let t=this.#H.getPathInfo(e)?.path??null;if(t==null)return;let n=this.#Z(t);n>=0&&this.#Fe(n)}focusNearestPath(e){let t=this.resolveNearestVisiblePath(e);if(t==null)return null;let n=this.#Z(t);return n>=0?(this.#Fe(n),this.#be()[n]??t):null}focusPreviousItem(){this.#Ae(-1)}getFocusedIndex(){return this.#s}getFocusedItem(){return this.#c==null?null:this.#Q(this.#c)}getFocusedPath(){return this.#c}getScrollRequest(){return this.#L}clearScrollRequest(e){this.#L?.id===e&&(this.#L=null)}resolveNearestVisiblePath(e){let t=this.#be();if(this.#G===0)return null;if(e==null)return this.#c??t[0]??null;let n=this.#H.getPathInfo(e)?.path??e,r=this.#Z(n);return r>=0?t[r]??n:this.#X(n)??this.#c??t[0]??null}getSelectedPaths(){return[...this.#B]}getSelectionVersion(){return this.#V}getVisibleCount(){return this.#G}getVisibleRows(e,t){if(t<e||this.#G===0)return[];let n=Math.max(0,e),r=Math.min(this.#G-1,t);if(r<n)return[];let i=r-n+1;if(this.#F==null&&!this.#l&&r>=this.#b.length&&i<=Jh){let e=[];for(let t=n;t<=r;t+=1){let n=this.#H.getVisibleRowContext(t);if(n==null)break;e.push(this.#ee(n))}return e}if(!this.#l&&r>=this.#b.length&&this.#Ie(),this.#F!=null){let e=Array.from({length:r-n+1},(e,t)=>this.#Se(n+t)),t=new Map,i=e[0]??-1,a=i;for(let n=1;n<=e.length;n+=1){let r=e[n];if(r!=null&&r===a+1){a=r;continue}if(i>=0&&this.#H.getVisibleSlice(i,a).forEach((e,n)=>{t.set(i+n,e)}),r==null){i=-1,a=-1;continue}i=r,a=r}return Array.from({length:r-n+1},(e,r)=>{let i=n+r,a=this.#Se(i),o=t.get(a),s=this.#b[a];if(o==null||s==null)throw Error(`Missing projection row for filtered visible index ${String(i)}`);return this.#$(o,i,a,{ancestorPaths:this.#re(a),path:s})})}return this.#H.getVisibleSlice(n,r).map((e,t)=>{let r=n+t,i=this.#b[r];if(i==null)throw Error(`Missing projection path for visible index ${String(r)}`);return this.#$(e,r,r,{ancestorPaths:this.#re(r),path:i})})}getStickyRowCandidates(e,t){if(this.#F!=null)return null;if(this.#G===0||e<=0||t<=0)return[];let n=[];for(let r=0;r<this.#G;r+=1){let i=e+r*t,a=Math.min(this.#G-1,Math.floor(i/t)),o=this.#te(a,r)??(a>0?this.#te(a-1,r):void 0);if(o==null)break;n.push({row:this.#ee(o),subtreeEndIndex:o.subtreeEndIndex})}return n}getItem(e){let t=this.#H.getPathInfo(e);return t==null?null:this.#Q(t.path,t)}resolveMountedDirectoryPathFromInput(e){let t=this.#H.getPathInfo(e);return t?.kind===`directory`?t.path:null}toggleMountedDirectoryFromInput(e){let t=this.resolveMountedDirectoryPathFromInput(e);t!=null&&this.#ze(t)}selectAllVisiblePaths(){this.#Ie();let e=[...this.#be()];this.#ae(e,this.#c??this.#z)}selectOnlyPath(e){let t=this.#Ne(e);t!=null&&this.#ae([t],t)}selectOnlyMountedPathFromInput(e){this.#ae([e],e)}selectPath(e){let t=this.#Ne(e);t==null||this.#B.has(t)||this.#ae([...this.#B,t])}deselectPath(e){let t=this.#Ne(e);t==null||!this.#B.has(t)||this.#ae([...this.#B].filter(e=>e!==t))}toggleFocusedSelection(){this.#c!=null&&this.togglePathSelectionFromInput(this.#c)}togglePathSelection(e){let t=this.#Ne(e);if(t!=null){if(this.#B.has(t)){this.deselectPath(t);return}this.selectPath(t)}}togglePathSelectionFromInput(e){let t=this.#Ne(e);if(t!=null){if(this.#B.has(t)){this.#ae([...this.#B].filter(e=>e!==t),t);return}this.#ae([...this.#B,t],t)}}selectPathRange(e,t){let n=this.#Ne(e);if(n==null)return;this.#Ie();let r=this.#z,i=r==null?-1:this.#Ce(r),a=this.#Ce(n);if(i===-1||a===-1){let e=t?[...this.#B,n]:[n];this.#ae(e,n);return}let[o,s]=i<=a?[i,a]:[a,i],c=this.#be().slice(o,s+1),l=t?[...this.#B,...c]:c;this.#ae(l,r)}extendSelectionFromFocused(e){if(this.#c==null)return;let t=this.#s;if(t===-1)return;let n=Math.min(this.#G-1,Math.max(0,t+e));if(n===t)return;!this.#l&&n>=this.#b.length&&this.#Ie();let r=this.#be(),i=r[t]??null,a=r[n]??null;if(i==null||a==null)return;let o=new Set(this.#B);o.has(i)&&o.has(a)?o.delete(i):o.add(a),this.#ae([...o],this.#z??i,!1),this.#Fe(n)}getDragAndDropConfig(){return this.#r}isDragAndDropEnabled(){return this.#r!=null}getDragSession(){return this.#i==null?null:{draggedPaths:[...this.#i.draggedPaths],primaryPath:this.#i.primaryPath,target:this.#i.target==null?null:{...this.#i.target}}}startDrag(e){if(this.#r==null)return!1;let t=this.#Ne(e);if(t==null||this.#M!=null&&this.#M.length>0)return!1;let n=this.getSelectedPaths(),r=bh(t,n);return this.#r.canDrag?.(r)!==!1&&(n.includes(t)||this.#ae([t],t,!1),this.#Pe(t),this.#i={draggedPaths:r,primaryPath:t,target:null},this.#De(),!0)}setDragTarget(e){let t=this.#i;if(t==null)return;let n=e;if(n!=null){let e=Sh(t.draggedPaths,n);(Ch(t.draggedPaths,n)||this.#r?.canDrop?.(e)===!1)&&(n=null)}xh(t.target,n)||(this.#i={...t,target:n},this.#De())}cancelDrag(){this.#i!=null&&(this.#i=null,this.#De())}completeDrag(){let e=this.#i;if(e==null)return!1;this.#i=null;let t=e.target==null?null:{...e.target};if(t==null)return this.#De(),!1;let n=Sh(e.draggedPaths,t);if(Ch(e.draggedPaths,t)||this.#r?.canDrop?.(n)===!1)return this.#De(),!1;let r=Th(e.draggedPaths,t);if(r==null)return this.#De(),!1;try{if(r.operations.length===1){let e=r.operations[0];if(e==null||e.type!==`move`)throw Error(`Expected a single move operation for one-item drops`);this.#H.move(e.from,e.to,{collision:e.collision})}else this.#ce(r.operations),this.#H.batch(r.operations)}catch(e){return this.#De(),this.#r?.onDropError?.(e instanceof Error?e.message:String(e),n),!1}return this.#r?.onDropComplete?.(r.result),!0}subscribe(e){return this.#t.add(e),e(),()=>{this.#t.delete(e)}}add(e){this.#H.add(e)}remove(e,t={}){this.#H.remove(e,t)}move(e,t,n={}){this.#H.move(e,t,n)}batch(e){this.#H.batch(e)}onMutation(e,t){let n=e,r=t,i=this.#n.get(n);return i??(i=new Set,this.#n.set(n,i)),i.add(r),()=>{let e=this.#n.get(n);e?.delete(r),e?.size===0&&this.#n.delete(n)}}setSearch(e){this.#Te(e,!0)}openSearch(e=``){this.#Te(e,!0)}closeSearch(){this.#Te(null,!0)}isSearchOpen(){return this.#M!==null}getSearchValue(){return this.#M??``}getSearchMatchingPaths(){return this.#k}focusNextSearchMatch(){this.#we(1)}focusPreviousSearchMatch(){this.#we(-1)}startRenaming(e=this.#c??``,t={}){if(!this.#w)return!1;let n=this.#H.getPathInfo(e);if(n==null)return!1;let r=n.path,i=Bh(r),a=Uh(r);if(this.#C?.({isFolder:i,path:a})===!1)return!1;for(let e of Lh(r))this.#H.isExpanded(e)||this.#H.expand(e);return this.#ae([r],r,!1),this.#M!=null&&(this.#Te(null,!1),this.#y?.(this.#M)),this.#Pe(r),this.#T=r,this.#E=Hh(r),this.#D=t.removeIfCanceled??!1,this.#De(),!0}#q(){if(this.#T==null)return;let e=this.#T,t=this.#D;if(this.#T=null,this.#E=``,this.#D=!1,t){this.remove(e,Bh(e)?{recursive:!0}:void 0);return}this.#Pe(e),this.#De()}#J(){let e=this.#T;if(e==null)return;if(this.#D&&this.#E.trim().length===0){this.#T=null,this.#E=``,this.#D=!1,this.remove(e,Bh(e)?{recursive:!0}:void 0);return}let t=Bh(e),n=gh({files:this.#H.list(),isFolder:t,nextBasename:this.#E,path:Uh(e)});if(this.#T=null,this.#E=``,this.#D=!1,`error`in n){this.#Pe(e),this.#v?.(n.error),this.#De();return}if(n.sourcePath===n.destinationPath){this.#Pe(e),this.#De();return}this.#_?.({destinationPath:n.destinationPath,isFolder:n.isFolder,sourcePath:n.sourcePath}),this.move(Wh(n.sourcePath,t),Wh(n.destinationPath,t))}#Y(e){this.#T!=null&&this.#E!==e&&(this.#E=e,this.#De())}resetPaths(e,t={}){let n=!Array.isArray(e),r=n?void 0:e,i=n?e:t,a=this.#H.list().length,o=this.#G,s=Dh({paths:r,preparedInput:i.preparedInput},`resetPaths`,this.#e.sort),c=this.#le(s.paths,s.preparedInput,i.initialExpandedPaths),l=this.#c,u=this.#T,d=this.getSelectedPaths(),f=this.#z;this.#K?.(),this.#H=c,this.#d.clear(),this.#he();let p=d.map(e=>c.getPathInfo(e)?.path??null).filter(e=>e!=null),m=!Ih(this.#B,p);this.#B=new Set(p),m&&(this.#V+=1),this.#z=f==null?null:c.getPathInfo(f)?.path??null,this.#T=u==null?null:c.getPathInfo(u)?.path??null,this.#T??(this.#E=``,this.#D=!1),this.#je(l,l!=null||p.length>0||this.#z!=null),this.#K=this.#Re(),this.#De(),this.#Oe({canonicalChanged:!0,operation:`reset`,pathCountAfter:s.paths.length,pathCountBefore:a,projectionChanged:!0,usedPreparedInput:i.preparedInput!=null,visibleCountDelta:this.#G-o})}#X(e){this.#Ie();let t=Rh(e),n=zh(e,t),r=null,i=null;for(let e of this.#be()){if(Rh(e)!==t)continue;let a=zh(e,t);if(a<n){r=e;continue}if(a>n){i=e;break}}return r??i}#Z(e){let t=this.#Ce(e);if(t!==-1)return t;let n=Lh(e);for(let e=n.length-1;e>=0;--e){let t=n[e];if(t==null)continue;let r=this.#Ce(t);if(r!==-1)return r}return this.#be().length>0?0:-1}#Q(e,t){let n=this.#d.get(e);if(n!=null)return n;let r=t??this.#H.getPathInfo(e);if(r==null)return null;let i=r.kind===`directory`?this.#oe(r.path):this.#se(r.path);return this.#d.set(r.path,i),i}#$(e,t,n,r){return{ancestorPaths:r.ancestorPaths,depth:e.depth,flattenedSegments:e.flattenedSegments?.map(e=>({isTerminal:e.isTerminal,name:e.name,path:e.path})),hasChildren:e.hasChildren,index:t,isExpanded:e.isExpanded,isFlattened:e.isFlattened,isFocused:r.path===this.#c,isSelected:this.#B.has(r.path),kind:e.kind,level:e.depth,name:e.name,path:r.path,posInSet:r.posInSet??this.#x[n]??0,setSize:r.setSize??this.#S[n]??0}}#ee(e){return this.#$(e.row,e.index,e.index,{ancestorPaths:e.ancestorPaths,path:e.row.path,posInSet:e.posInSet,setSize:e.setSize})}#te(e,t){let n=this.#H.getVisibleRowContext(e);return n==null?void 0:n.ancestorRows[t]??(t===n.ancestorRows.length&&n.row.kind===`directory`&&n.row.isExpanded?n:void 0)}#ne(e){let t=this.#a.get(e);if(t!=null)return t;let n=this.#u(e),r=n<0?[]:[...this.#ne(n),n];return this.#a.set(e,r),r}#re(e){let t=this.#o.get(e);if(t!=null)return t;let n=this.#ne(e).map(e=>this.#b[e]??``).filter(e=>e!==``);return this.#o.set(e,n),n}#ie(e){this.#H.collapse(e)}#ae(e,t=this.#z,n=!0){let r=[...new Set(e)],i=!Ih(this.#B,r),a=this.#z!==t;!i&&!a||(this.#B=new Set(r),this.#z=t,i&&(this.#V+=1),n&&this.#De())}#oe(e){return{collapse:()=>{this.#ie(e)},deselect:()=>{this.deselectPath(e)},expand:()=>{this.#ke(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!0,isExpanded:()=>this.#H.isExpanded(e),isFocused:()=>this.#c===e,isSelected:()=>this.#B.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)},toggle:()=>{this.#ze(e)}}}#se(e){return{deselect:()=>{this.deselectPath(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!1,isFocused:()=>this.#c===e,isSelected:()=>this.#B.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)}}}#ce(e){let t=this.#H.list();this.#le(t).batch(e)}#le(e,t,n){return new Xm({...this.#e,paths:e,preparedInput:t??void 0,...n===void 0?{}:{initialExpandedPaths:n}})}#ue(){return this.#h??=this.#H.list(),this.#h}#de(){if(this.#m!=null)return this.#m;let e=new Set;for(let t of this.#ue()){e.add(t);for(let n of Lh(t))e.add(n)}return this.#m=[...e].sort(),this.#m}#fe(){return this.#g??=this.#ue().map(Vh),this.#g}#pe(){return this.#f??=this.#de().filter(e=>e.endsWith(`/`)),this.#f}#me(){return this.#p??=this.#pe().map(Vh),this.#p}#he(){this.#f=null,this.#p=null,this.#m=null,this.#h=null,this.#g=null}#ge(){return this.#pe().filter(e=>this.#H.isExpanded(e))}#_e(e){let t=new Set(this.#j??[]);if(e)for(let e of this.#B)for(let n of Lh(e))t.add(n);this.#ve(t)}#ve(e){this.#W=!0;try{for(let t of this.#pe()){let n=e.has(t),r=this.#H.isExpanded(t);n&&!r?this.#H.expand(t):!n&&r&&this.#H.collapse(t)}}finally{this.#W=!1}}#ye(){if(this.#M==null||this.#M.length===0){this.#k=[],this.#F=null,this.#I=null,this.#P=null,this.#G=this.#U;return}let e=this.#b;if(this.#k=e.filter(e=>this.#O.has(e)),this.#A!==`hide-non-matches`||this.#O.size===0){this.#F=null,this.#I=null,this.#P=null,this.#G=this.#U;return}let t=[],n=[],r=new Map;for(let[i,a]of e.entries())this.#N?.has(a)===!0&&(r.set(a,n.length),t.push(i),n.push(a));this.#F=t,this.#I=n,this.#P=r,this.#G=n.length}#be(){return this.#I??this.#b}#xe(e){return this.#I==null?this.#H.getVisibleIndex(e)??-1:this.#P?.get(e)??-1}#Se(e){return this.#F?.[e]??e}#Ce(e){return this.#P?.get(e)??this.#H.getVisibleIndex(e)??-1}#we(e){let t=this.#k;if(t.length===0)return;let n=this.#c,r=n==null?-1:t.indexOf(n),i=t[r<0?e>0?0:t.length-1:Math.min(t.length-1,Math.max(0,r+e))];i!=null&&this.focusPath(i)}#Te(e,t){let n=e==null?null:Gh(e),r=this.#M;if(r!==n){if(r==null&&n!=null&&(this.#j=this.#ge()),this.#M=n,n==null)this.#_e(!0),this.#j=null,this.#O.clear(),this.#N=null,this.#je(this.#c,!0);else if(n.length===0)this.#_e(!1),this.#O.clear(),this.#N=null,this.#je(this.#c,!0);else{let e=this.#Ee();this.#je(e,!0)}t&&(this.#y?.(this.#M),this.#De())}}#Ee(){if(this.#M==null||this.#M.length===0)return this.#O.clear(),this.#c;let e=this.#M,t=this.#ue(),n=this.#fe(),r=[],i=new Set,a=null;for(let o=0;o<t.length;o+=1){if(!n[o].includes(e))continue;let s=t[o];r.push(s),i.add(s),a??=s}let o=this.#pe(),s=this.#me();for(let t=0;t<o.length;t+=1){if(!s[t].includes(e))continue;let n=o[t];i.has(n)||(r.push(n),i.add(n),a??=n)}this.#O=i;let c=this.#A===`hide-non-matches`&&r.length>0?new Set:null;this.#N=c;let l=this.#A===`expand-matches`?new Set(this.#j??[]):new Set;for(let e of r){c?.add(e),e.endsWith(`/`)&&l.add(e);for(let t of Lh(e))l.add(t),c?.add(t)}return this.#ve(l),a??this.#c}#De(){for(let e of this.#t)e()}#Oe(e){this.#n.get(e.operation)?.forEach(t=>{t(e)}),this.#n.get(`*`)?.forEach(t=>{t(e)})}#ke(e){for(let t of Lh(e))this.#H.isExpanded(t)||this.#H.expand(t);this.#H.isExpanded(e)||this.#H.expand(e)}#Ae(e){let t=this.#G;if(t===0)return;let n=this.#s===-1?0:this.#s,r=Math.min(t-1,Math.max(0,n+e));(r!==n||this.#s===-1)&&(!this.#l&&this.#F==null&&r>=this.#b.length&&this.#Ie(),this.#Fe(r))}#je(e,t=!0){let n=this.#H.getVisibleCount();this.#U=n;let r=Zh(this.#H.getVisibleTreeProjectionData(t?void 0:Math.min(n,qh)),e,t?e=>this.#H.getVisibleIndex(e):void 0);this.#a.clear(),this.#o.clear(),this.#l=r.paths.length>=n,this.#u=r.getParentIndex,this.#b=r.paths,this.#x=r.posInSetByIndex,this.#S=r.setSizeByIndex,this.#ye(),this.#s=e==null?this.#be().length>0?0:-1:this.#Z(e),this.#c=this.#s<0?null:this.#Me(this.#s)}#Me(e){return this.#be()[e]??(this.#F==null?this.#H.getVisibleRowContext(e)?.row.path??null:null)}#Ne(e){return this.#H.getPathInfo(e)?.path??null}#Pe(e){if(e==null)return;let t=this.#Z(e);t>=0&&this.#Fe(t,!1)}#Fe(e,t=!0){let n=this.#Me(e);n!=null&&(this.#s!==e||this.#c!==n)&&(this.#s=e,this.#c=n,t&&this.#De())}#Ie(){this.#l||this.#je(this.#c,!0)}#Le(e){let t=jh(this.#T,e);t==null&&this.#T!=null&&(this.#E=``),this.#T=t;let n=jh(this.#c,e,!0),r=[...this.#B].map(t=>jh(t,e)).filter(e=>e!=null).map(e=>this.#H.getPathInfo(e)?.path??null).filter(e=>e!=null),i=jh(this.#z,e),a=i==null?null:this.#H.getPathInfo(i)?.path??null,o=[...new Set(r)];return Ih(this.#B,o)||(this.#B=new Set(o),this.#V+=1),this.#z=a,n}#Re(){return this.#H.on(`*`,e=>{if(this.#W)return;e.canonicalChanged&&(this.#d.clear(),this.#he()),this.#i!=null&&Oh(e)&&(this.#i=null);let t=Oh(e)?this.#Le(e):this.#c,n=this.#M!=null&&this.#M.length>0?this.#Ee():this.#M===``?this.#c:t,r=this.#M!=null||e.operation!==`expand`&&e.operation!==`collapse`;this.#je(n,r),this.#De();let i=Fh(e);i!=null&&this.#Oe(i)})}#ze(e){if(this.#H.isExpanded(e)){this.#ie(e);return}this.#ke(e)}},$h=e=>{if(e==null||e.length===0)return`0`;let t=`${e.length}`;for(let n of e)t+=`\0${n.path}\0${n.status}`;return t};function eg(e){let t=e.endsWith(`/`),n=``,r=-1;for(let t=0;t<=e.length;t+=1){if(e[t]!==`/`&&t!==e.length){r===-1&&(r=t);continue}r!==-1&&(n!==``&&(n+=`/`),n+=e.slice(r,t),r=-1)}return n===``?null:{isDirectory:t,path:n}}function tg(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;if(t.length===0)return[];let n=[],r=0;for(;;){let e=t.indexOf(`/`,r);if(e===-1)break;n.push(t.slice(0,e+1)),r=e+1}return n}function ng(e,t){return t?`${e}/`:e}function rg(e,t=null){let n=$h(e==null?void 0:[...e]);if(n===`0`)return null;if(t?.signature===n)return t;let r=new Map,i=new Set,a=new Set,o=new Map;for(let t of e??[]){let e=ag(t);e!=null&&cg({canonicalPath:e.canonicalPath,changeCountByDirectoryPath:o,directoriesWithChanges:i,ignoredDirectoryPaths:a,isDirectory:e.isDirectory,status:t.status,statusByPath:r})}return r.size===0?null:{changeCountByDirectoryPath:o,directoriesWithChanges:i,ignoredDirectoryPaths:a,signature:n,statusByPath:r}}function ig(e,t){let n=t?.remove??[],r=t?.set??[];if(n.length===0&&r.length===0)return e;let i=new Map(e?.statusByPath),a=new Set(e?.directoriesWithChanges),o=new Set(e?.ignoredDirectoryPaths),s=new Map(e?.changeCountByDirectoryPath),c=!1;for(let e of n){let t=og(e);t!=null&&(c=sg({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,statusByPath:i})||c)}for(let e of r){let t=ag(e);t!=null&&(c=cg({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,isDirectory:t.isDirectory,status:e.status,statusByPath:i})||c)}return c?i.size===0?null:{changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,signature:dg(i),statusByPath:i}:e}function ag(e){return og(e.path)}function og(e){let t=eg(e);if(t!=null)return{canonicalPath:ng(t.path,t.isDirectory),isDirectory:t.isDirectory}}function sg({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,statusByPath:i}){let a=i.get(e);return a!=null&&(i.delete(e),a===`ignored`&&e.endsWith(`/`)&&r.delete(e),ug(t,n,e),!0)}function cg({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,isDirectory:i,status:a,statusByPath:o}){let s=o.get(e);return s!==a&&(s??lg(t,n,e),o.set(e,a),a===`ignored`&&i?r.add(e):i&&r.delete(e),!0)}function lg(e,t,n){for(let r of tg(n))e.set(r,(e.get(r)??0)+1),t.add(r)}function ug(e,t,n){for(let r of tg(n)){let n=(e.get(r)??0)-1;n>0?e.set(r,n):(e.delete(r),t.delete(r))}}function dg(e){let t=`${e.size}`;for(let[n,r]of e)t+=`\0${n}\0${r}`;return t}var J,fg,pg,mg,hg,gg,_g,vg,yg,bg,xg={},Sg=[],Cg=Array.isArray,wg=Sg.slice,Tg=Object.assign;function Eg(e){e&&e.parentNode&&e.remove()}function Dg(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`&&typeof e!=`function`?i=t[a]:o[a]=t[a];return arguments.length>2&&(o.children=arguments.length>3?wg.call(arguments,2):n),Og(e,o,r,i,null)}function Og(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++fg,__i:-1,__u:0};return i==null&&J.vnode!=null&&J.vnode(a),a}function kg(e){return e.children}function Ag(e,t){this.props=e,this.context=t,this.__g=0}function jg(e,t){if(t==null)return e.__?jg(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?jg(e):null}function Mg(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=n.__e;break}return Mg(e)}}function Ng(e){(8&e.__g||!(e.__g|=8)||!pg.push(e)||hg++)&&mg==J.debounceRendering||((mg=J.debounceRendering)||queueMicrotask)(Pg)}function Pg(){for(var e,t,n,r,i,a,o,s,c=1;pg.length;)pg.length>c&&pg.sort(gg),e=pg.shift(),c=pg.length,8&e.__g&&(n=void 0,i=(r=(t=e).__v).__e,a=[],o=[],(s=t.__P)&&((n=Tg({},r)).__v=r.__v+1,J.vnode&&J.vnode(n),Hg(s,n,r,t.__n,s.namespaceURI,32&r.__u?[i]:null,a,i??jg(r),!!(32&r.__u),o,s.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,Wg(a,n,o),n.__e!=i&&Mg(n)));hg=0}function Fg(e,t,n,r,i,a,o,s,c,l,u,d){var f,p,m,h,g,_,v,y=r&&r.__k||Sg,b=t.length;for(c=Ig(n,t,y,c,b),f=0;f<b;f++)(m=n.__k[f])!=null&&(p=m.__i==-1?xg:y[m.__i]||xg,m.__i=f,_=Hg(e,m,p,i,a,o,s,c,l,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&qg(p.ref,null,m),u.push(m.ref,m.__c||h,m)),g==null&&h!=null&&(g=h),(v=!!(4&m.__u))||p.__k===m.__k?c=Lg(m,c,e,v):typeof m.type==`function`&&_!==void 0?c=_:h&&(c=h.nextSibling),m.__u&=-7);return n.__e=g,c}function Ig(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(c=a+f,(o=e.__k[a]=typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?Og(null,o,null,null,null):Cg(o)?Og(kg,{children:o},null,null,null):o.constructor==null&&o.__b>0?Og(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,s=null,(l=o.__i=Rg(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=jg(s)),Jg(s,s));return r}function Lg(e,t,n,r){var i,a;if(typeof e.type==`function`){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=Lg(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=jg(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Rg(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&!(2&l.__u);if(l===null&&e.key==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function zg(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n??``}function Bg(e,t,n,r,i){var a;n:if(t==`style`)if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||zg(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||zg(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(_g,`$1`)),(t=t.slice(2))[0].toLowerCase()!=t[0]&&(t=t.toLowerCase()),e.__l||={},e.__l[t+a]=n,n?r?n.l=r.l:(n.l=vg,e.addEventListener(t,a?bg:yg,a)):e.removeEventListener(t,a?bg:yg,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function Vg(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=vg++;else if(t.u<n.l)return;return n(J.event?J.event(t):t)}}}function Hg(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v,y,b,x,S,C,ee,te,w,T,E,ne,re,ie,D=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),n.__c.__z&&(s=t.__e=n.__e=(a=n.__c.__z)[0],n.__c.__z=null)),(d=J.__b)&&d(t);n:if(typeof D==`function`)try{if(v=t.props,y=`prototype`in D&&D.prototype.render,b=(d=D.contextType)&&r[d.__c],x=d?b?b.props.value:d.__:r,n.__c?2&(f=t.__c=n.__c).__g&&(f.__g|=1,_=!0):(y?t.__c=f=new D(v,x):(t.__c=f=new Ag(v,x),f.constructor=D,f.render=Yg),b&&b.sub(f),f.props=v,f.state||(f.state={}),f.context=x,f.__n=r,p=!0,f.__g|=8,f.__h=[],f._sb=[]),y&&f.__s==null&&(f.__s=f.state),y&&D.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=Tg({},f.__s)),Tg(f.__s,D.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&D.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&D.getDerivedStateFromProps==null&&v!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(v,x),!(4&f.__g)&&f.shouldComponentUpdate!=null&&!1===f.shouldComponentUpdate(v,f.__s,x)||t.__v==n.__v){for(t.__v!=n.__v&&(f.props=v,f.state=f.__s,f.__g&=-9),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),S=0;S<f._sb.length;S++)f.__h.push(f._sb[S]);f._sb=[],f.__h.length&&o.push(f);break n}f.componentWillUpdate!=null&&f.componentWillUpdate(v,f.__s,x),y&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,h,g)})}if(f.context=x,f.props=v,f.__P=e,f.__g&=-5,C=J.__r,ee=0,y){for(f.state=f.__s,f.__g&=-9,C&&C(t),d=f.render(f.props,f.state,f.context),te=0;te<f._sb.length;te++)f.__h.push(f._sb[te]);f._sb=[]}else do f.__g&=-9,C&&C(t),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(8&f.__g&&++ee<25);f.state=f.__s,f.getChildContext!=null&&(r=Tg({},r,f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),w=d,d!=null&&d.type===kg&&d.key==null&&(w=Gg(d.props.children)),s=Fg(e,Cg(w)?w:[w],t,n,r,i,a,o,s,c,l,u),t.__u&=-161,f.__h.length&&o.push(f),_&&(f.__g&=-4)}catch(e){if(t.__v=null,c||a!=null)if(e.then){for(T=0,E=!1,t.__u|=c?160:128,t.__c.__z=[],ne=0;ne<a.length;ne++)(re=a[ne])==null||E||(re.nodeType==8&&re.data==`$s`?(T>0&&t.__c.__z.push(re),T++,a[ne]=null):re.nodeType==8&&re.data==`/$s`?(--T>0&&t.__c.__z.push(re),E=T===0,s=a[ne],a[ne]=null):T>0&&(t.__c.__z.push(re),a[ne]=null));if(!E){for(;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__c.__z=[s]}t.__e=s}else{for(ie=a.length;ie--;)Eg(a[ie]);Ug(t)}else t.__e=n.__e,t.__k=n.__k,e.then||Ug(t);J.__e(e,t,n)}else s=t.__e=Kg(n.__e,t,n,r,i,a,o,c,l,u);return(d=J.diffed)&&d(t),128&t.__u?void 0:s}function Ug(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(Ug)}function Wg(e,t,n){for(var r=0;r<n.length;r++)qg(n[r],n[++r],n[++r]);J.__c&&J.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){J.__e(e,t.__v)}})}function Gg(e){return typeof e!=`object`||!e||e.__b&&e.__b>0?e:Cg(e)?e.map(Gg):Tg({},e)}function Kg(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v=n.props,y=t.props,b=t.type;if(b==`svg`?i=`http://www.w3.org/2000/svg`:b==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||=`http://www.w3.org/1999/xhtml`,a!=null){for(u=0;u<a.length;u++)if((m=a[u])&&`setAttribute`in m==!!b&&(b?m.localName==b:m.nodeType==3)){e=m,a[u]=null;break}}if(e==null){if(b==null)return l.createTextNode(y);e=l.createElementNS(i,b,y.is&&y),s&&=(J.__m&&J.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a&&=wg.call(e.childNodes),v=n.props||xg,!s&&a!=null)for(v={},u=0;u<e.attributes.length;u++)v[(m=e.attributes[u]).name]=m.value;for(u in v)if(m=v[u],u!=`children`){if(u==`dangerouslySetInnerHTML`)f=m;else if(!(u in y)){if(u==`value`&&`defaultValue`in y||u==`checked`&&`defaultChecked`in y)continue;Bg(e,u,null,m,i)}}for(u in _=1&n.__u,y)m=y[u],u==`children`?p=m:u==`dangerouslySetInnerHTML`?d=m:u==`value`?h=m:u==`checked`?g=m:s&&typeof m!=`function`||v[u]===m&&!_||Bg(e,u,m,v[u],i);if(d)s||f&&(d.__html==f.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(f&&(e.innerHTML=``),Fg(b==`template`?e.content:e,Cg(p)?p:[p],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&jg(n,0),s,c,l),a!=null)for(u=a.length;u--;)Eg(a[u]);s||(u=`value`,b==`progress`&&h==null?e.removeAttribute(`value`):h==null||h===e[u]&&(b!==`progress`||h)||Bg(e,u,h,v[u],i),u=`checked`,g!=null&&g!=e[u]&&Bg(e,u,g,v[u],i))}return e}function qg(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){J.__e(e,n)}}function Jg(e,t,n){var r,i;if(J.unmount&&J.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||qg(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){J.__e(e,t)}r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Jg(r[i],t,n||typeof e.type!=`function`);n||Eg(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function Yg(e,t,n){return this.constructor(e,n)}function Xg(e,t){var n,r,i,a;t==document&&(t=document.documentElement),J.__&&J.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=Dg(kg,null,[e]),i=[],a=[],Hg(t,e,r||xg,xg,t.namespaceURI,r?null:t.firstChild?wg.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,a,t.ownerDocument),Wg(i,e,a)}function Zg(e,t){e.__u|=32,Xg(e,t)}J={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!(1&i.__g)){i.__g|=4;try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=8&i.__g),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=8&i.__g),o)return void(i.__g|=2)}catch(t){e=t}}throw hg=0,e}},fg=0,Ag.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Tg({},this.state);typeof e==`function`&&(e=e(Tg({},n),this.props)),e&&Tg(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ng(this))},Ag.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),Ng(this))},Ag.prototype.render=kg,pg=[],hg=0,gg=function(e,t){return e.__v.__b-t.__v.__b},_g=/(PointerCapture)$|Capture$/i,vg=0,yg=Vg(!1),bg=Vg(!0);var Qg=0;Array.isArray;function Y(e,t,n,r,i,a){t||={};var o,s,c=t;if(`ref`in c&&typeof e!=`function`)for(s in c={},t)s==`ref`?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Qg,__i:-1,__u:0,__source:i,__self:a};return J.vnode&&J.vnode(l),l}var $g=16,e_=16,t_={};function n_({name:e,remappedFrom:t,token:n,width:r,height:i,viewBox:a,label:o,alignCapitals:s=!1}){"use no memo";let c=`#${e.replace(/^#/,``)}`,{width:l,height:u,viewBox:d}=t_[e]??{width:$g,height:e_},f=r??l,p=i??u,m=a??d??`0 0 ${l} ${u}`;return Y(`svg`,{"data-icon-name":t??e,"data-icon-token":n,"data-align-capitals":s,...o==null?{"aria-hidden":!0}:{"aria-label":o,role:`img`},viewBox:m,width:f,height:p,children:Y(`use`,{href:c})})}var r_=e=>e!==void 0&&/\s/.test(e),i_=(e,t)=>{let n=t=>r_(e[t-1])||r_(e[t]);if(!n(t))return t;for(let r=1;r<e.length;r++){let i=t-r;if(i>0&&!n(i))return i;let a=t+r;if(a<e.length&&!n(a))return a}return t},a_=e=>i_(e,Math.ceil(e.length/2)),o_=e=>{if(e.length<2)return[e,``];let t=a_(e);return[e.slice(0,t),e.slice(t)]},s_=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`.`)+1,n=e.length-t>10,r=t>=1&&!n?t:a_(e);return[e.slice(0,r),e.slice(r)]},c_=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`/`)+1,n=e.length-t>25,r=t>=1&&!n?t:Math.ceil(e.length/2);return[e.slice(0,r),e.slice(r)]},l_=(e,{splitIndex:t}={})=>{if(typeof t!=`number`){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}return[e.slice(0,t),e.slice(t)]},u_=(e,{splitOffset:t}={})=>{if(typeof t!=`number`||t<=0||t>=e.length){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}let n=e.length-t;return[e.slice(0,n),e.slice(n)]},d_=(e,{splitOffset:t}={})=>{if(typeof t!=`number`||t<=0||t>=e.length){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}let n=t;return[e.slice(0,n),e.slice(n)]};function f_({children:e,marker:t,variant:n=`default`}){"use no memo";return Y(`div`,{"aria-hidden":!0,"data-truncate-marker-cell":!0,children:Y(`div`,{"data-truncate-marker":!0,children:typeof t==`function`?t({children:e}):n===`fade`?Y(`span`,{"data-truncate-fade":!0}):t})})}function p_(e){"use no memo";let{mode:t,children:n}=e;return Y(`div`,{children:[Y(`div`,{"data-truncate-content":`visible`,children:t===`fruncate`?Y(`span`,{children:n}):n}),Y(`div`,{"data-truncate-content":`overflow`,"aria-hidden":!0,children:t===`fruncate`?Y(`span`,{children:n}):n})]})}function m_({children:e,mode:t=`truncate`,marker:n=`…`,variant:r=`default`,...i}){"use no memo";let a=Y(p_,{mode:t,children:e},`content`),o=Y(f_,{marker:n,mode:t,variant:r},`marker`),s=Y(`div`,{"data-truncate-fill":!0},`fill`);return Y(`div`,{"data-truncate-container":t,"data-truncate-variant":r,...i,children:Y(`div`,{"data-truncate-grid":!0,children:t===`truncate`?[a,o]:[o,a,s]})})}function h_({children:e,...t}){"use no memo";return Y(m_,{mode:`truncate`,...t,children:e})}function g_({children:e,...t}){"use no memo";return Y(m_,{mode:`fruncate`,...t,children:e})}function __({children:e,contents:t,priority:n=`end`,split:r=`center`,minimumLength:i=12,className:a,style:o,...s}){"use no memo";let c=null,l=null;if(Array.isArray(t)){if(t.length!==2)return console.error(`MiddleTruncate: contents must be an array of two items`),null;c=Y(h_,{...s,children:t[0]}),l=Y(g_,{...s,children:t[1]})}else{if(typeof e!=`string`)return console.error(`MiddleTruncate: children must be a string`),null;if(e.length===0)return Y(`div`,{className:a,style:o});if(e.length<i)return Y(n===`end`?g_:h_,{...s,className:a,style:o,children:e});let t=null,u=null,d=null;if(typeof r==`string`)r===`center`?t=o_:r===`extension`?t=s_:r===`leaf-path`&&(t=c_);else if(typeof r==`number`)t=l_,u=r;else if(Array.isArray(r)){let[e,n]=r;d=n,e===`last`?t=u_:e===`first`&&(t=d_)}else typeof r==`function`&&(t=r);t??=o_;let[f,p]=t(e,{priority:n,variant:s.variant,splitIndex:typeof u==`number`?u:void 0,splitOffset:typeof d==`number`?d:void 0}),m=f.length>=p.length,h=n===`equal`&&!m,g=n===`equal`&&m,_={},v={};h&&(_.marker=``),g&&(v.marker=``),c=Y(h_,{...s,..._,children:f}),l=Y(g_,{...s,...v,children:p})}return Y(`div`,{"data-truncate-group-container":`middle`,className:a,style:o,children:[Y(`div`,{"data-truncate-segment-priority":n===`start`||n===`equal`?`1`:`2`,children:c}),Y(`div`,{"data-truncate-segment-priority":n===`end`||n===`equal`?`1`:`2`,children:l})]})}var v_={endIndex:-1,startIndex:-1};function y_(e,t,n){return Math.min(Math.max(e,t),n)}function b_(e,t){return e<0||t<e?v_:{endIndex:t,startIndex:e}}function x_(e){return e.startIndex<0||e.endIndex<e.startIndex}function S_(e,t){return x_(e)?0:(e.endIndex-e.startIndex+1)*t}function C_(e,t,n){if(t<=0)return-1;let r=t*n;return e<=0?0:e>=r?t:Math.floor(e/n)}function w_(e,t,n){return t<=0||e<=0?-1:e>=t*n?t-1:Math.ceil(e/n)-1}function T_(e){let t=new Map;return e.forEach((e,n)=>{if(e.kind!==`directory`||!e.isExpanded)return;let r=e.ancestorPaths.length,i=t.get(r);if(i==null){t.set(r,[n]);return}i.push(n)}),t}function E_(e,t){let n=0,r=e.length-1,i=-1;for(;n<=r;){let a=Math.floor((n+r)/2),o=e[a];if(o==null)break;if(o<=t){i=a,n=a+1;continue}r=a-1}return i}function D_(e){let t=new Map,n=[];for(let r=0;r<e.length;r+=1){let i=e[r];if(i==null)continue;let a=i.kind===`directory`&&i.isExpanded?[...i.ancestorPaths,i.path]:i.ancestorPaths,o=0;for(;o<n.length&&o<a.length&&n[o]===a[o];)o+=1;for(let e=n.length-1;e>=o;--e){let i=n[e];i!=null&&t.set(i,r-1)}n.length=o;for(let e=o;e<a.length;e+=1){let t=a[e];t!=null&&n.push(t)}}let r=e.length-1;for(let e of n)t.set(e,r);return t}function O_(e,t,n){if(e.length===0||t<=0)return[];let r=D_(e),i=T_(e),a=[];for(let r=0;r<e.length;r+=1){let o=i.get(r);if(o==null||o.length===0)break;let s=t+r*n,c=E_(o,Math.min(e.length-1,Math.floor(s/n))),l=null;for(;c>=0;){let t=o[c],n=t==null?null:e[t]??null;if(n!=null&&(r===0||n.ancestorPaths[r-1]===a[r-1]?.path)){l=n;break}--c}if(l==null)break;a.push(l)}return a.map((i,a)=>{let o=a*n,s=(r.get(i.path)??e.length-1)+1;if(s>=e.length)return{row:i,top:o};let c=s*n-t;return{row:i,top:Math.min(o,c-n)}}).filter(e=>e.top+n>0)}function k_(e,t){let n=t.totalRowCount??e.length,r=n*t.itemHeight,i=Math.max(0,t.viewportHeight),a=Math.max(0,Math.floor(t.overscan)),o=Math.max(0,r-i),s=y_(t.scrollTop,0,o),c=t.stickyRows??O_(e,s,t.itemHeight),l=c.reduce((e,n)=>Math.max(e,n.top+t.itemHeight),0),u=Math.min(r,s+l),d=Math.max(0,i-l),f=Math.max(0,r-u),p=C_(s,n,t.itemHeight),m=C_(u,n,t.itemHeight),h=l<=0||p<0||p>=n?-1:p,g=h===-1?-1:Math.min(n-1,m-1),_=h===-1||g<h?0:g-h+1,v=d<=0||m>=n?v_:b_(m,w_(u+d,n,t.itemHeight)),y=g+1,b=x_(v)?v_:b_(Math.max(y,v.startIndex-a),Math.min(n-1,v.endIndex+a)),x=S_(b,t.itemHeight);return{occlusion:{firstOccludedIndex:h,lastOccludedIndex:g,occludedCount:_},physical:{itemHeight:t.itemHeight,maxScrollTop:o,overscan:a,scrollTop:s,totalHeight:r,totalRowCount:n,viewportHeight:i},projected:{contentHeight:f,paneHeight:d,paneTop:u},sticky:{height:l,rows:c},visible:v,window:{endIndex:b.endIndex,height:x,offsetTop:x_(b)?0:b.startIndex*t.itemHeight,startIndex:b.startIndex}}}var A_={added:`A`,deleted:`D`,ignored:null,modified:`M`,renamed:`R`,untracked:`U`},j_={added:`Git status: added`,deleted:`Git status: deleted`,ignored:`Git status: ignored`,modified:`Git status: modified`,renamed:`Git status: renamed`,untracked:`Git status: untracked`},M_=`Contains git status items`;function N_(e){return e.current?!0:(e.current=!0,!1)}function P_(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,topInset:i=0,viewportHeight:a}=e;if(n<0)return null;let o=Math.max(0,i),s=n*r,c=s+r;if(s<t+o){let e=Math.max(0,s-o);return e===t?null:e}if(c>t+a){let e=c-a;return e===t?null:e}return null}function F_(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,offset:i,topInset:a=0,totalHeight:o,viewportHeight:s}=e;if(i===`nearest`)return P_({currentScrollTop:t,focusedIndex:n,itemHeight:r,topInset:a,viewportHeight:s});if(n<0)return null;let c=Math.max(0,a),l=n*r,u=Math.max(0,s-c),d=i===`center`?c+Math.max(0,(u-r)/2):c,f=Math.max(0,o-s),p=Math.max(0,Math.min(l-d,f));return p===t?null:p}function I_(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,targetViewportOffset:i,totalHeight:a,viewportHeight:o}=e;if(n<0)return null;let s=Math.max(0,i),c=n*r,l=c+r,u=t+s,d=t+o;if(c>=u&&l<=d)return null;let f=Math.max(0,a-o),p=Math.max(0,Math.min(c-s,f));return p===t?null:p}function L_(e){if(e==null||!e.isConnected||e===document.body||e===document.documentElement)return!1;e.focus({preventScroll:!0});let t=e.getRootNode();return t instanceof ShadowRoot?t.activeElement===e:document.activeElement===e}function R_(e){let t=e.getRootNode();if(t instanceof ShadowRoot){let e=t.activeElement;return e instanceof HTMLElement?e:null}let n=document.activeElement;return n instanceof HTMLElement&&e.contains(n)?n:null}function z_(e,t){if(e==null)return t;let n=e.getBoundingClientRect().height;return n>0?n:e.clientHeight>0?e.clientHeight:t}function B_(e,t){return e!=null&&e>0?e:t}function V_(e){let t=e.borderBoxSize,n=Array.isArray(t)?t[0]:t;return n!=null&&Number.isFinite(n.blockSize)&&n.blockSize>0?n.blockSize:e.contentRect.height>0?e.contentRect.height:null}function H_(e,t,n,r,i=0){let a=P_({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,topInset:i,viewportHeight:r});return a!=null&&(e.scrollTop=a,!0)}function U_(e,t,n,r,i,a,o=0){let s=F_({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,offset:a,topInset:o,totalHeight:i,viewportHeight:r});return s!=null&&(e.scrollTop=s,!0)}function W_(e,t,n,r,i,a){let o=I_({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,targetViewportOffset:a,totalHeight:i,viewportHeight:r});return o!=null&&(e.scrollTop=o,!0)}function G_(e,t,n,r){return n.end<n.start?null:e<n.start?-t:e>n.end?r:null}function K_(e){let{renamingPath:t,previousRenamingPath:n,hasRenderedInput:r}=e;return t==null?`reset`:r?n===t?`ignore`:`focus-input`:`reveal-canonical`}function q_({ariaLabel:e,isFlattened:t=!1,ref:n,value:r,onBlur:i,onInput:a}){return Y(`input`,{ref:n,"data-item-rename-input":!0,...t?{"data-item-flattened-rename-input":!0}:{},"aria-label":e,value:r,onBlur:i,onInput:a,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation()})}function J_(e){let{row:t,mode:n,targetPath:r,ariaLabel:i,domId:a,isParked:o,itemHeight:s,features:c,state:l,extraStyle:u}=e,d=n===`sticky`,f=t.ancestorPaths.at(-1)??``,p={};return l.isFocusRinged&&(p[`data-item-focused`]=!0),t.isSelected&&(p[`data-item-selected`]=!0),l.isContextHovered&&(p[`data-item-context-hover`]=`true`),l.isDragTarget&&(p[`data-item-drag-target`]=!0),l.isDragging&&(p[`data-item-dragging`]=!0),l.effectiveGitStatus!=null&&(p[`data-item-git-status`]=l.effectiveGitStatus),l.containsGitChange&&(p[`data-item-contains-git-change`]=`true`),{"aria-expanded":!d&&t.kind===`directory`?t.isExpanded:void 0,"aria-haspopup":c.contextMenuEnabled?`menu`:void 0,"aria-label":i,"aria-level":d?void 0:t.level+1,"aria-posinset":d?void 0:t.posInSet+1,"aria-selected":d?void 0:t.isSelected?`true`:`false`,"aria-setsize":d?void 0:t.setSize,"data-file-tree-sticky-path":d?r:void 0,"data-file-tree-sticky-row":d?`true`:void 0,"data-item-context-menu-button-visibility":c.actionLaneEnabled?c.contextMenuButtonVisibility:void 0,"data-item-context-menu-trigger-mode":c.contextMenuEnabled?c.contextMenuTriggerMode:void 0,"data-item-has-context-menu-action-lane":c.actionLaneEnabled?`true`:void 0,"data-item-has-git-lane":c.gitLaneActive?`true`:void 0,"data-item-parent-path":f.length>0?f:void 0,"data-item-parked":o?`true`:void 0,"data-item-path":r,"data-item-type":t.kind===`directory`?`folder`:`file`,"data-type":`item`,id:d?void 0:a,role:d?void 0:`treeitem`,style:{minHeight:`${s}px`,...u},tabIndex:!d&&t.isFocused?0:-1,...p}}function Y_(e){let{event:t,mode:n,isSearchOpen:r,isDirectory:i}=e,a=t.ctrlKey||t.metaKey,o=t.shiftKey||a,s=t.shiftKey?{additive:a,kind:`range`}:a?{kind:`toggle`}:{kind:`single`};return{closeSearch:r,revealCanonical:n===`sticky`,selection:s,toggleDirectory:!o&&i}}var X_,X,Z_,Q_,$_=Object.is,ev=0,tv=[],Z=J,nv=Z.__b,rv=Z.__r,iv=Z.diffed,av=Z.__c,ov=Z.unmount,sv=Z.__;function cv(e,t){Z.__h&&Z.__h(X,e,ev||t),ev=0;var n=X.__H||(X.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function lv(e){return ev=1,uv(bv,e)}function uv(e,t,n){var r=cv(X_++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):bv(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);$_(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=X,!X.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return!!e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,$_(t,e.__[0])||(o=!0)}}),a&&a.call(this,e,t,n)||o};X.__f=!0;var a=X.shouldComponentUpdate,o=X.componentWillUpdate;X.componentWillUpdate=function(e,t,n){if(4&this.__g){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},X.shouldComponentUpdate=i}return r.__N||r.__}function dv(e,t){var n=cv(X_++,3);!Z.__s&&yv(n.__H,t)&&(n.__=e,n.u=t,X.__H.__h.push(n))}function fv(e,t){var n=cv(X_++,4);!Z.__s&&yv(n.__H,t)&&(n.__=e,n.u=t,X.__h.push(n))}function Q(e){return ev=5,pv(function(){return{current:e}},[])}function pv(e,t){var n=cv(X_++,7);return yv(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function $(e,t){return ev=8,pv(function(){return e},t)}function mv(){for(var e;e=tv.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(_v),e.__H.__h.forEach(vv),e.__H.__h=[]}catch(t){e.__H.__h=[],Z.__e(t,e.__v)}}Z.__b=function(e){X=null,nv&&nv(e)},Z.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),sv&&sv(e,t)},Z.__r=function(e){rv&&rv(e),X_=0;var t=(X=e.__c).__H;t&&(Z_===X?(t.__h=[],X.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(_v),t.__h.forEach(vv),t.__h=[],X_=0)),Z_=X},Z.diffed=function(e){iv&&iv(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(tv.push(t)!==1&&Q_===Z.requestAnimationFrame||((Q_=Z.requestAnimationFrame)||gv)(mv)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),Z_=X=null},Z.__c=function(e,t){t.some(function(e){try{e.__h.forEach(_v),e.__h=e.__h.filter(function(e){return!e.__||vv(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],Z.__e(n,e.__v)}}),av&&av(e,t)},Z.unmount=function(e){ov&&ov(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{_v(e)}catch(e){t=e}}),n.__H=void 0,t&&Z.__e(t,n.__v))};var hv=typeof requestAnimationFrame==`function`;function gv(e){var t,n=function(){clearTimeout(r),hv&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);hv&&(t=requestAnimationFrame(n))}function _v(e){var t=X,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),X=t}function vv(e){var t=X;e.__c=e.__(),X=t}function yv(e,t){return!e||e.length!==t.length||t.some(function(t,n){return!$_(t,e[n])})}function bv(e,t){return typeof t==`function`?t(e):t}function xv(e,t=null,n=null){"use no memo";let r=e.flattenedSegments;return r==null||r.length===0?t??e.name:Y(`span`,{"data-item-flattened-subitems":!0,children:r.map((e,i)=>{let a=i===r.length-1;return Y(kg,{children:[Y(`span`,{"data-item-flattened-subitem":e.path,"data-item-flattened-subitem-drag-target":n===e.path?`true`:void 0,children:a&&t!=null?t:Y(h_,{children:e.name})}),i<r.length-1?` / `:``]},e.path)})})}function Sv(e){return e.isFlattened?e.flattenedSegments?.findLast(e=>e.isTerminal)?.path??e.path:e.path}function Cv(e){let t=e.flattenedSegments;return t==null||t.length===0?e.name:t.map(e=>e.name).join(` / `)}function wv(e,t,n,r){return e.map((e,i)=>{let a=i*n,o=e.subtreeEndIndex+1;if(o>=r)return{row:e.row,top:a};let s=o*n-t;return{row:e.row,top:Math.min(a,s-n)}}).filter(e=>e.top+n>0)}function Tv({controller:e,itemHeight:t,overscan:n,scrollTop:r,stickyFolders:i,viewportHeight:a}){let o=e.getVisibleCount(),s=i&&o>0?e.getStickyRowCandidates(r,t):[],c=s==null&&i&&o>0?e.getVisibleRows(0,o-1):[],l=k_(c,{itemHeight:t,overscan:n,scrollTop:r,stickyRows:s==null?void 0:wv(s,r,t,o),totalRowCount:o,viewportHeight:a}),u=i&&r<=0&&o>0?e.getStickyRowCandidates(1,t):[],d=u!=null&&r<=0?wv(u,1,t,o):i&&r<=0&&c.length>0?O_(c,1,t):l.sticky.rows;return{overlayHeight:d.reduce((e,n)=>Math.max(e,n.top+t),0),overlayRows:d,snapshot:l,visibleRows:c}}var Ev=400,Dv=40,Ov=18;function kv(e,t,n){let r=e,i=document.elementFromPoint?.bind(document)??null,a=r.elementFromPoint?.(t,n)??i?.(t,n)??null;return e instanceof ShadowRoot&&(a==null||!e.contains(a))?Av(e,t,n):a instanceof HTMLElement?a:null}function Av(e,t,n){let r=Array.from(e.querySelectorAll(`[data-type="item"], [data-item-flattened-subitem]`));for(let e=r.length-1;e>=0;e--){let i=r[e],a=i.getBoundingClientRect();if(t>=a.left&&t<=a.right&&n>=a.top&&n<=a.bottom)return i}return null}function jv(e){let t=e?.closest?.(`[data-type="item"]`);if(!(t instanceof HTMLElement))return null;let n=t.dataset.itemPath??null;if(n==null)return null;let r=e?.closest?.(`[data-item-flattened-subitem]`),i=r instanceof HTMLElement?r.getAttribute(`data-item-flattened-subitem`)??null:null;if(i!=null&&i.endsWith(`/`))return{directoryPath:i,flattenedSegmentPath:i,hoveredPath:n,kind:`directory`};if(t.dataset.itemType===`folder`)return{directoryPath:n,flattenedSegmentPath:null,hoveredPath:n,kind:`directory`};let a=t.dataset.itemParentPath??null;return a==null||a.length===0?{directoryPath:null,flattenedSegmentPath:null,hoveredPath:n,kind:`root`}:{directoryPath:a,flattenedSegmentPath:null,hoveredPath:n,kind:`directory`}}function Mv(e){let t=e.cloneNode(!0);return t.removeAttribute(`id`),t.dataset.fileTreeDragPreview=`true`,t.setAttribute(`aria-hidden`,`true`),t.tabIndex=-1,Object.assign(t.style,{boxShadow:`0 4px 12px rgba(0, 0, 0, 0.15)`,left:`0px`,margin:`0`,pointerEvents:`none`,position:`fixed`,top:`0px`,willChange:`transform`,zIndex:`10000`}),t}function Nv(){return navigator.vendor!==`Apple Computer, Inc.`}function Pv(e,t){let n=e-t.top;if(n<Dv)return-Math.ceil((Dv-Math.max(0,n))/Dv*Ov);let r=t.bottom-e;return r<Dv?Math.ceil((Dv-Math.max(0,r))/Dv*Ov):0}function Fv(e,t){if(e!=null){let t=A_[e];return t==null?null:{text:t,title:j_[e]}}return t?{icon:{name:`file-tree-icon-dot`,width:6,height:6},title:M_}:null}function Iv(e,t,n){if(t==null||t.size===0)return null;let r=[];for(let i=e.length-1;i>=0;--i){let a=e[i],o=n.get(a);if(o!=null){for(let e of r)n.set(e,o);return o?`ignored`:null}if(t.has(a)){n.set(a,!0);for(let e of r)n.set(e,!0);return`ignored`}r.push(a)}for(let e of r)n.set(e,!1);return null}function Lv(e){return e!=null&&`toggle`in e}function Rv(e){return e.code===`Space`||e.key===` `||e.key===`Spacebar`}function zv(e){return e.key.length===1&&/^[\p{L}\p{N}]$/u.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey}function Bv(e){return e==null?``:`[data-item-section="spacing-item"][data-ancestor-path="${e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`)}"] { opacity: 1; }`}function Vv(e){return e.shiftKey&&e.key===`F10`||e.key===`ContextMenu`}function Hv(e,t){return t&&Vv(e)||(e.ctrlKey||e.metaKey)&&Rv(e)?!0:e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`||e.key===`ArrowUp`}var Uv=new Set([`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`]);function Wv(e){for(let t of e.composedPath())if(t instanceof HTMLElement&&(t.dataset.fileTreeContextMenuRoot===`true`||t.dataset.type===`context-menu-anchor`||t.dataset.type===`context-menu-trigger`||t.getAttribute(`slot`)===`context-menu`))return!0;return!1}function Gv(e){return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width,x:e.x,y:e.y}}function Kv(e,t){return{bottom:t,height:0,left:e,right:e,top:t,width:0,x:e,y:t}}function qv(e,t){if(e==null)return t.offsetTop;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return n.top-r.top}function Jv(e,t,n){if(n==null){e.delete(t);return}e.set(t,n)}function Yv(e,t,n){if(e==null)return null;let r=t.get(e)??null;if(r!=null)return r;let i=n.get(e)??null;return i?.dataset.itemParked===`true`?null:i}function Xv(e){if(e==null)return[];let t=[];for(let n of e.querySelectorAll(`button[data-file-tree-sticky-row="true"]`)){if(!(n instanceof HTMLElement))continue;let e=n.dataset.fileTreeStickyPath;e!=null&&t.push(e)}return t}function Zv(e,t){if(e==null||t==null)return null;for(let n of e.querySelectorAll(`button[data-item-focused="true"][data-item-parked="true"]`))if(n instanceof HTMLElement&&n.dataset.itemPath===t)return n;return null}function Qv(e,t,n,r,i,a,o){let s=Math.max(0,a-i),c=t?.getBoundingClientRect()??null,l=c==null||n==null?null:n.getBoundingClientRect().top-c.top,u=Zv(e,r),d=c==null||u==null?null:u.getBoundingClientRect().top-c.top;return Math.max(0,Math.min(d??Math.max(l??0,s),Math.max(0,o-i)))}function $v(e,t){return{kind:e.kind,name:Cv(e),path:t}}function ey(e){return e==null?void 0:`${e}__tree`}function ty(e,t,n){if(e!=null)return`${e}__focused-item-${encodeURIComponent(t)}${n?`__parked`:``}`}function ny(e){return e===`file-tree-icon-chevron`||e===`file-tree-icon-dot`||e===`file-tree-icon-file`||e===`file-tree-icon-lock`}function ry(e,t){if(e==null)return null;if(`text`in e)return e.parts==null?Y(`span`,{title:e.title,children:e.text}):Y(`span`,{title:e.title,children:e.parts.map((e,t)=>Y(`span`,{style:{color:e.color},children:e.text},t))});let n=typeof e.icon==`string`?ny(e.icon)?t(e.icon):{name:e.icon}:ny(e.icon.name)?(()=>{let n=t(e.icon.name),{name:r,...i}=e.icon;return{...n,...i}})():e.icon;return Y(`span`,{title:e.title,children:Y(n_,{...n})})}function iy(e){e!=null&&L_(e.querySelector([`button:not([disabled])`,`[href]`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `))??e)}function ay(e,t,{actionLaneEnabled:n=!1,customDecoration:r=null,decorationLaneEnabled:i=!1,dragTargetFlattenedSegmentPath:a=null,gitDecoration:o=null,gitLaneActive:s=!1,renameInput:c=null,showDecorativeActionAffordance:l=!1}={}){let u=Sv(e);return Y(kg,{children:[e.depth>0?Y(`div`,{"data-item-section":`spacing`,children:Array.from({length:e.depth}).map((t,n)=>Y(`div`,{"data-item-section":`spacing-item`,"data-ancestor-path":e.ancestorPaths[n]},n))}):null,Y(`div`,{"data-item-section":`icon`,children:e.kind===`directory`?Y(n_,{...t(`file-tree-icon-chevron`)}):Y(n_,{...t(`file-tree-icon-file`,u)})}),Y(`div`,{"data-item-section":`content`,children:e.isFlattened?xv(e,c,a):c??Y(__,{minimumLength:5,split:`extension`,children:e.name})}),i?Y(`div`,{"data-item-section":`decoration`,children:r==null?null:ry(r,t)}):null,s?Y(`div`,{"data-item-section":`git`,children:ry(o,t)}):null,n?Y(`div`,{"data-item-section":`action`,children:l?Y(`span`,{"aria-hidden":`true`,"data-item-action-affordance":`decorative`,children:Y(n_,{...t(`file-tree-icon-ellipsis`)})}):null}):null]})}function oy(e,t,n,r={}){let{controller:i,renameView:a,visualFocusPath:o,contextHoverPath:s,draggedPathSet:c,dragTarget:l,dragAndDropEnabled:u,shouldSuppressContextMenu:d,handleRowDragStart:f,handleRowDragEnd:p,handleRowTouchStart:m,instanceId:h,itemHeight:g,gitStatusByPath:_,ignoredGitDirectories:v,ignoredInheritanceCache:y,directoriesWithGitChanges:b,gitLaneActive:x,contextMenuEnabled:S,contextMenuTriggerMode:C,contextMenuButtonTriggerEnabled:ee,contextMenuButtonVisibility:te,contextMenuRightClickEnabled:w,registerRenameInput:T,registerButton:E,resolveIcon:ne,renderDecorationForRow:re,openContextMenuForRow:ie,onRowClick:D,onKeyDown:ae}=e,O=Sv(t),{isParked:oe=!1,mode:se=`flow`,style:ce}=r,le=se===`sticky`,ue=_?.get(O)??null??Iv(t.ancestorPaths,v,y),de=t.kind===`directory`&&(b?.has(O)??!1),fe=re(t,O),pe=Fv(ue,de),me=S&&ee,k=fe!=null||x||me,he=me&&te===`always`,ge=a.getPath()===O,_e=ge?a.getValue():``,ve=le||!ge?null:Y(q_,{ref:T,ariaLabel:`Rename ${Cv(t)}`,isFlattened:t.isFlattened,value:_e,onBlur:()=>{a.commit()},onInput:e=>{a.setValue(e.currentTarget.value)}}),ye=ay(t,ne,{actionLaneEnabled:me,customDecoration:fe,decorationLaneEnabled:k,dragTargetFlattenedSegmentPath:l?.flattenedSegmentPath??null,gitDecoration:pe,gitLaneActive:x,renameInput:ve,showDecorativeActionAffordance:he}),be={...J_({ariaLabel:Cv(t),domId:t.isFocused?ty(h,O,oe):void 0,extraStyle:ce,features:{actionLaneEnabled:me,contextMenuButtonVisibility:me?te:null,contextMenuEnabled:S,contextMenuTriggerMode:S?C:null,gitLaneActive:x},isParked:oe,itemHeight:g,mode:se,row:t,state:{containsGitChange:de,effectiveGitStatus:ue,isContextHovered:s===O,isDragTarget:l?.kind===`directory`&&l.directoryPath===O,isDragging:c?.has(O)===!0,isFocusRinged:t.isFocused&&o===O},targetPath:O}),key:n,onContextMenu:S||u?e=>{if(d()){e.preventDefault();return}S&&(e.preventDefault(),w&&(i.focusMountedPathFromInput(O),ie(t,O,{anchorRect:Kv(e.clientX,e.clientY),source:`right-click`})))}:void 0,onFocus:le?void 0:()=>{i.focusMountedPathFromInput(O)},onKeyDown:le?void 0:ae,ref:e=>{E(O,e)}};return!le&&ge?Y(`div`,{...be,children:ye}):Y(`button`,{...be,type:`button`,draggable:u&&!oe,onDragEnd:u&&!oe?p:void 0,onDragStart:u&&!oe?e=>{f(e,t,O)}:void 0,onMouseDown:e=>{if(le){e.preventDefault();return}i.isSearchOpen()&&e.preventDefault()},onTouchStart:u&&!oe?e=>{m(e,t,O)}:void 0,onClick:e=>{D(e,t,O,se)},children:ye})}function sy(e,t,n){return t.end<t.start?[]:e.controller.getVisibleRows(t.start,t.end).filter(e=>!n.has(Sv(e))).map((n,r)=>oy(e,n,t.start+r))}function cy({composition:e,controller:t,gitStatusByPath:n,ignoredGitDirectories:r,directoriesWithGitChanges:i,icons:a,instanceId:o,itemHeight:s=th,overscan:c=10,renamingEnabled:l=!1,renderRowDecoration:u,searchBlurBehavior:d=`close`,searchEnabled:f=!1,searchFakeFocus:p=!1,slotHost:m,stickyFolders:h=!1,initialViewportHeight:g=420}){"use no memo";let _=Q(null),v=Q(null),y=Q(!1),b=Q(null),x=Q(null),S=Q(null),C=Q(null),ee=Q(null),te=Q(new Map),w=Q(new Map),T=Q(()=>{}),E=Q(null),ne=Q(0),re=Q(!1),ie=Q(null);ie.current!==t&&(re.current=!1,ie.current=t);let D=Q(!1),ae=Q(null),O=Q(null),oe=Q(!1),se=Q(null),ce=Q(null),le=Q(null),ue=Q(null),de=Q(null),fe=Q(null),pe=Q(null),me=Q(null),k=Q(!1),he=Q(null),ge=Q(null),_e=Q(null),ve=Q(null),ye=pv(()=>new Map,[]),[,be]=lv(0),xe=Q(!1),[Se,Ce]=lv(null),[A,we]=lv(null),[j,M]=lv(null),[Te,Ee]=lv(null),[De,Oe]=lv(0),[N,ke]=lv(null),Ae=Q(N);Ae.current=N;let je=Q(null),Me=Q(null),Ne=Q(null),Pe=Q(null),Fe=Q(null),Ie=Q(!1),Le=()=>{Me.current=null,Ne.current=null,Pe.current=null},Re=(e,t)=>{Me.current=e,Ne.current=null,Pe.current=t==null?null:{path:e,scrollTop:t}},ze=(e,t)=>{Me.current=null,Ne.current={path:e,viewportOffset:t},Pe.current=null},Be=Q(d===`retain`&&t.isSearchOpen()),[Ve,He]=lv(p);dv(()=>{p||He(!1)},[p]);let Ue=Q(!1),We=$(()=>{Ue.current=!0,He(e=>e&&!1)},[]),[Ge,Ke]=lv(()=>Tv({controller:t,itemHeight:s,overscan:c,scrollTop:0,stickyFolders:h,viewportHeight:g})),[qe,Je]=lv(!1);dv(()=>{Je(!0)},[]);let P=e?.contextMenu?.enabled===!0||e?.contextMenu?.render!=null||e?.contextMenu?.onOpen!=null||e?.contextMenu?.onClose!=null,Ye=e?.contextMenu?.triggerMode??(P?`right-click`:`both`),Xe=Ye===`both`||Ye===`button`,Ze=e?.contextMenu?.buttonVisibility??`when-needed`,Qe=Ye===`both`||Ye===`right-click`;fv(()=>{let e=S.current;if(e==null)return;let t=e=>{if(!(e instanceof CustomEvent))return;let t=e.detail?.path??null;Fe.current=t,we(t),Ee(t==null?null:`pointer`)},n=e=>{e instanceof CustomEvent&&(Ie.current=e.detail?.disabled===!0)};return e.addEventListener(`file-tree-debug-set-context-menu-trigger`,t),e.addEventListener(`file-tree-debug-set-scroll-suppression`,n),()=>{e.removeEventListener(`file-tree-debug-set-context-menu-trigger`,t),e.removeEventListener(`file-tree-debug-set-scroll-suppression`,n)}},[]);let $e=$((e,t)=>{Jv(te.current,e,t)},[]),et=$((e,t)=>{Jv(w.current,e,t)},[]),tt=$(e=>{x.current=e},[]),nt=$(e=>Yv(e,w.current,te.current),[]),rt=n!=null||r!=null||i!=null,{resolveIcon:it}=pv(()=>bd(a),[a]),at=t[Kh](),ot=at.getPath(),st=ot!=null,ct=t.isSearchOpen(),lt=t.getSearchValue(),F=t.getFocusedPath(),I=t.getFocusedIndex(),ut=t.getScrollRequest(),dt=t.isDragAndDropEnabled(),ft=t.getDragSession(),pt=pv(()=>ft==null?null:new Set(ft.draggedPaths),[ft]),mt=ft?.target??null,ht=ft?.primaryPath??null,gt=ey(o),{overlayHeight:_t,overlayRows:vt,snapshot:L,visibleRows:yt}=Ge,R=L.physical.viewportHeight,bt=pv(()=>({end:L.window.endIndex,start:L.window.startIndex}),[L.window.endIndex,L.window.startIndex]),xt=vt,St=L.sticky.rows,Ct=L.physical.totalHeight,wt=L.sticky.height,Tt=pv(()=>new Set(St.map(e=>Sv(e.row))),[St]),Et=I>=0&&I>=bt.start&&I<=bt.end,Dt=$((e,t)=>u?.({item:$v(e,t),row:e})??null,[u]),Ot=$(e=>L_(e==null?null:te.current.get(e)??null)?!0:L_(S.current),[]),kt=$(e=>{Ot(t.focusNearestPath(e))},[t,Ot]),At=Q(kt);At.current=kt;let jt=Q(!0),Mt=Q(()=>{}),Nt=$((t=!0)=>{let n=Ae.current;n!=null&&(jt.current=jt.current&&t,ke(null),e?.contextMenu?.onClose?.(),jt.current&&kt(n.path))},[e?.contextMenu,kt]);Mt.current=Nt;let Pt=$(e=>{let t=e==null?null:qv(S.current,e);M(e=>e===t?e:t)},[]),Ft=$((e,n,r)=>{let i=t.getItem(n);if(i==null)return;let a=nt(n);if(a?.dataset.fileTreeStickyRow===`true`){let e=C.current;Re(n,e?.scrollTop??null),D.current=!0,Ce(e=>e===n?e:n)}i.focus(),Pt(a),jt.current=!0,ke({anchorRect:r?.anchorRect??null,item:$v(e,n),path:n,source:r?.source??`keyboard`})},[t,nt,Pt]),It=$(e=>{if(l){if(t.isSearchOpen()){let e=C.current,t=z_(e,R);se.current=I<0||e==null?null:Math.max(0,Math.min(I*s-e.scrollTop,Math.max(0,t-s))),oe.current=!0}t.startRenaming(e)!==!1&&(Ee(`focus`),be(e=>e+1))}},[t,I,s,l,R]),Lt=$((e,{restoreTreeFocus:n=!0,targetOffset:r=`live-overlay`}={})=>{let i=C.current;if(i==null)return!1;t.focusPath(e);let a=t.getFocusedIndex();if(a<0)return!1;let o=t.getVisibleRows(a,a)[0]??null;if(o==null)return!1;let l=z_(i,R),u=t.getVisibleCount()*s,d=r===`sticky-parents`?o.ancestorPaths.length*s:Tv({controller:t,itemHeight:s,overscan:c,scrollTop:i.scrollTop,stickyFolders:h,viewportHeight:l}).snapshot.sticky.height;return D.current=!0,W_(i,a,s,l,u,d),T.current(),je.current=n?e:null,!0},[t,s,c,R,h]),Rt=()=>y.current===!0||ve.current!=null||k.current===!0,zt=e=>typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>{e()}):window.setTimeout(e,16),Bt=e=>{if(e!=null){if(typeof window.cancelAnimationFrame==`function`){window.cancelAnimationFrame(e);return}window.clearTimeout(e)}},Vt=()=>{ue.current!=null&&(clearTimeout(ue.current),ue.current=null),le.current=null},Ht=()=>{fe.current?.remove(),fe.current=null},Ut=()=>{Bt(ce.current),ce.current=null,de.current=null},Wt=e=>{let t=S.current?.getRootNode();if(t instanceof ShadowRoot){t.append(e);return}document.body.append(e)},Gt=()=>{me.current?.(),me.current=null,ve.current!=null&&(clearTimeout(ve.current),ve.current=null),k.current=!1,he.current=null,_e.current=null,ge.current!=null&&(ge.current.setAttribute(`draggable`,`true`),ge.current.style.removeProperty(`touch-action`),ge.current=null),Ht(),Vt(),Ut(),pe.current=null},Kt=(e,n)=>{let r=S.current?.getRootNode(),i=jv(kv(r instanceof ShadowRoot?r:document,e,n));return t.setDragTarget(i),t.getDragSession()?.target??null},qt=e=>{let n=t.getDragAndDropConfig()?.openOnDropDelay??800;if(e==null||e.kind!==`directory`||e.directoryPath==null||n<=0){Vt();return}let r=t.getItem(e.directoryPath),i=Lv(r)?r:null;if(i==null||i.isExpanded()){Vt();return}let a=`${e.directoryPath}::${e.flattenedSegmentPath??``}`;le.current!==a&&(Vt(),le.current=a,ue.current=setTimeout(()=>{let n=t.getDragSession()?.target;n?.kind===`directory`&&n.directoryPath===e.directoryPath&&n.flattenedSegmentPath===e.flattenedSegmentPath&&i.expand()},n))},Jt=()=>{ce.current=null;let e=de.current,n=C.current;if(e==null||n==null||t.getDragSession()==null)return;let r=n.getBoundingClientRect(),i=Pv(e.clientY,r);if(i===0)return;let a=Math.max(0,n.scrollHeight-n.clientHeight),o=Math.max(0,Math.min(a,n.scrollTop+i));o!==n.scrollTop&&(n.scrollTop=o,T.current()),qt(Kt(e.clientX,e.clientY)),ce.current=zt(Jt)},Yt=(e,t)=>{de.current={clientX:e,clientY:t},ce.current??=zt(Jt)},Xt=(e,n,r)=>{let i=e.currentTarget;if(i!=null){if(Gt(),Ht(),Vt(),Ut(),t.startDrag(r)===!1){e.preventDefault();return}if(pe.current=n,e.dataTransfer!=null&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.dropEffect=`move`,e.dataTransfer.setData(`text/plain`,r),Nv())){let t=Mv(i),n=i.getBoundingClientRect();Object.assign(t.style,{height:`${n.height}px`,opacity:`0.85`,transform:`translate3d(-9999px, 0px, 0)`,width:`${n.width}px`}),Wt(t),fe.current=t,e.dataTransfer.setDragImage(t,Math.max(0,e.clientX-n.left),Math.max(0,e.clientY-n.top))}}},Zt=()=>{Ht(),Vt(),Ut(),pe.current=null,t.cancelDrag()},Qt=(e,n,r)=>{if(ve.current!=null||k.current)return;let i=e.touches[0],a=e.currentTarget;if(i==null||a==null)return;_e.current={clientX:i.clientX,clientY:i.clientY},ge.current=a,a.setAttribute(`draggable`,`false`);let o=(e={})=>{let t=e.restoreNativeDraggable??!k.current;ve.current!=null&&(clearTimeout(ve.current),ve.current=null),document.removeEventListener(`touchmove`,s),document.removeEventListener(`touchend`,c),document.removeEventListener(`touchcancel`,c),me.current===o&&(me.current=null),t&&(a.setAttribute(`draggable`,`true`),ge.current===a&&(ge.current=null),_e.current=null)},s=e=>{let t=e.touches[0],n=_e.current;if(t==null||n==null)return;let r=t.clientX-n.clientX,i=t.clientY-n.clientY;r*r+i*i<=100||o()},c=()=>{o()};document.addEventListener(`touchmove`,s,{passive:!0}),document.addEventListener(`touchend`,c),document.addEventListener(`touchcancel`,c),me.current=o,ve.current=setTimeout(()=>{if(o({restoreNativeDraggable:!1}),t.startDrag(r)===!1){a.setAttribute(`draggable`,`true`),ge.current===a&&(ge.current=null),_e.current=null;return}k.current=!0,ge.current=a,a.setAttribute(`draggable`,`false`),a.style.setProperty(`touch-action`,`none`),pe.current=n;let e=a.getBoundingClientRect(),s=Mv(a);Object.assign(s.style,{height:`${e.height}px`,opacity:`0.85`,transform:`translate3d(${e.left}px, ${e.top}px, 0)`,width:`${e.width}px`}),Wt(s),fe.current=s,he.current={x:i.clientX-e.left,y:i.clientY-e.top};let c=e=>{let t=e.touches[0];if(t==null)return;e.preventDefault();let n=he.current;n!=null&&fe.current!=null&&(fe.current.style.transform=`translate3d(${t.clientX-n.x}px, ${t.clientY-n.y}px, 0)`),qt(Kt(t.clientX,t.clientY)),Yt(t.clientX,t.clientY)},l=e=>{let n=e.changedTouches[0];n!=null&&Kt(n.clientX,n.clientY),t.completeDrag(),Gt()},u=()=>{t.cancelDrag(),Gt()};me.current=()=>{document.removeEventListener(`touchmove`,c),document.removeEventListener(`touchend`,l),document.removeEventListener(`touchcancel`,u)},document.addEventListener(`touchmove`,c,{passive:!1}),document.addEventListener(`touchend`,l),document.addEventListener(`touchcancel`,u)},Ev)},$t=e=>{if(N!=null){if(e.key===`Escape`){Nt(),e.preventDefault(),e.stopPropagation();return}Uv.has(e.key)&&(e.preventDefault(),e.stopPropagation());return}if(at.isActive()){if(e.isComposing||e.keyCode===229)return;if(e.key===`Escape`)at.cancel();else if(e.key===`Enter`)at.commit();else return;Ee(`focus`),be(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(l&&e.key===`F2`){It(F??void 0),e.preventDefault(),e.stopPropagation();return}if(ct){if(e.key===`Escape`)oe.current=!1,se.current=null,t.closeSearch();else if(e.key===`Enter`){let e=t.getFocusedPath();e!=null&&t.selectOnlyPath(e);let n=C.current,r=z_(n,R);se.current=I<0||n==null?null:Math.max(0,Math.min(I*s-n.scrollTop,Math.max(0,r-s))),oe.current=!0,t.closeSearch()}else if(e.key===`ArrowDown`)t.focusNextSearchMatch();else if(e.key===`ArrowUp`)t.focusPreviousSearchMatch();else return;Ee(`focus`),be(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(f&&zv(e)){t.openSearch(e.key),be(e=>e+1),e.preventDefault(),e.stopPropagation();return}let n=P&&Vv(e),r=Hv(e,P),i=r&&S.current!=null?R_(S.current):null,a=r?new Set(Xv(S.current)):new Set,o=i?.dataset.fileTreeStickyPath??null,c=i?.dataset.fileTreeStickyRow===`true`&&o!=null;if(c&&o!==F&&a.has(o)){let e=C.current;Re(o,e?.scrollTop??null),t.focusPath(o)}let u=t.getFocusedPath(),d=t.getFocusedIndex(),p=t.getFocusedItem();if(p==null)return;let m=Lv(p)?p:null,h=u!=null&&(Tt.has(u)||c&&o===u&&a.has(u)),g=e.key===`ArrowDown`||e.key===`ArrowUp`||e.key===`ArrowRight`&&m!=null&&m.isExpanded(),_=e.key===`ArrowLeft`&&h&&m!=null&&m.isExpanded(),v=C.current,y=!0;if(e.shiftKey&&e.key===`ArrowDown`)t.extendSelectionFromFocused(1);else if(e.shiftKey&&e.key===`ArrowUp`)t.extendSelectionFromFocused(-1);else if(n&&u!=null&&d>=0){let e=t.getVisibleRows(d,d)[0]??null,n=Yv(u,w.current,te.current);e==null||n==null?y=!1:Ft(e,u)}else if((e.ctrlKey||e.metaKey)&&Rv(e))t.toggleFocusedSelection();else if((e.ctrlKey||e.metaKey)&&e.key.toLowerCase()===`a`)t.selectAllVisiblePaths();else switch(e.key){case`ArrowDown`:t.focusNextItem();break;case`ArrowUp`:t.focusPreviousItem();break;case`ArrowRight`:m==null||m.isExpanded()?t.focusNextItem():m.expand();break;case`ArrowLeft`:m!=null&&m.isExpanded()?m.collapse():t.focusParentItem();break;case`Home`:t.focusFirstItem();break;case`End`:t.focusLastItem();break;default:y=!1}if(!y)return;Ee(`focus`);let b=t.getFocusedPath(),x=b!=null&&(Tt.has(b)||a.has(b)),ee=g&&b!==u,T=n&&c&&o===u&&b===u;if((h||T)&&b!=null&&(ee&&x||T))Re(b,v?.scrollTop??null),D.current=!0,Ce(e=>e===b?e:b);else{let t=e.key===`ArrowUp`&&h&&b!==u;b!=null&&(t||_&&b===u)?(ze(b,Qv(S.current,v,i,u,s,wt,R)),D.current=!0,Ce(e=>e===b?e:b)):Le()}be(e=>e+1),e.preventDefault(),e.stopPropagation()};fv(()=>{if(!(!f||!ct)){if(Be.current){Be.current=!1;return}L_(ee.current)}},[ct,f]),fv(()=>{let e=x.current;switch(K_({hasRenderedInput:e!=null,previousRenamingPath:O.current,renamingPath:ot})){case`reset`:O.current=null;return;case`reveal-canonical`:ot!=null&&Lt(ot,{restoreTreeFocus:!1,targetOffset:`live-overlay`});return;case`ignore`:return;case`focus-input`:e!=null&&(je.current=null,O.current=ot,L_(e),e.select());return}},[bt.end,bt.start,ot,Lt,Tt]),fv(()=>{let e=S.current;if(e==null)return;let t=null,n=()=>{t!=null&&(clearTimeout(t),t=null)},r=()=>{let t=R_(e)?.dataset.itemPath??null;Ce(e=>e===t?e:t)},i=()=>{n(),D.current=!0,r()},a=i=>{let a=i.relatedTarget;if(a==null){n(),t=setTimeout(()=>{if(t=null,R_(e)!=null){r();return}D.current=!1,Ce(null)},0);return}if(!(a instanceof Node)||!e.contains(a)){n(),D.current=!1,Ce(null);return}let o=a instanceof HTMLElement?a.dataset.itemPath??null:null;Ce(e=>e===o?e:o)};return e.addEventListener(`focusin`,i),e.addEventListener(`focusout`,a),()=>{n(),e.removeEventListener(`focusin`,i),e.removeEventListener(`focusout`,a)}},[]),fv(()=>{let e=S.current;e!=null&&(L.physical.scrollTop<=0?e.dataset.scrollAtTop=`true`:delete e.dataset.scrollAtTop)},[L.physical.scrollTop]),fv(()=>{let e=null,n=C.current,r=b.current,i=S.current;if(n==null)return;E.current=z_(n,g);let a=()=>{let e=t.getVisibleCount(),r=B_(E.current,g),i=Math.max(0,e*s-r);n.scrollTop>i&&(n.scrollTop=i),Ke(Tv({controller:t,itemHeight:s,overscan:c,scrollTop:Math.min(n.scrollTop,i),stickyFolders:h,viewportHeight:r}))};if(!re.current){re.current=!0;let e=t.getFocusedIndex();if(e>=0){let r=B_(E.current,g),i=t.getVisibleRows(e,e)[0]??null;H_(n,e,s,r,h&&i!=null?Math.max(0,Math.min(i.ancestorPaths.length*s,Math.max(0,r-s))):0)}}T.current=a;let o=t.subscribe(()=>{N_(xe)&&be(e=>e+1),a()}),l=()=>{Ie.current!==!0&&(r!=null&&(r.dataset.isScrolling??=``),i!=null&&(i.dataset.isScrolling??=``),y.current=!0,e!=null&&clearTimeout(e),e=setTimeout(()=>{r!=null&&delete r.dataset.isScrolling,i!=null&&delete i.dataset.isScrolling,y.current=!1,Oe(e=>e+1),e=null},50))},u=null,d=()=>{i!=null&&delete i.dataset.overlayReveal,u!=null&&(clearTimeout(u),u=null)},f=()=>{i!=null&&Ie.current!==!0&&(n.scrollTop>0||(i.dataset.overlayReveal=`true`,u!=null&&clearTimeout(u),u=setTimeout(()=>{d()},200)))},p=()=>{if(a(),n.scrollTop>0&&d(),Ae.current!=null&&y.current&&Mt.current(),Ie.current===!0){y.current=!1;return}we(e=>e==null?e:null),l()},m=()=>{l(),f()},_=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`,` `,`Spacebar`]),v=e=>{_.has(e.key)&&m()};n.addEventListener(`scroll`,p,{passive:!0}),n.addEventListener(`wheel`,m,{passive:!0}),n.addEventListener(`touchmove`,m,{passive:!0}),n.addEventListener(`keydown`,v);let x=typeof ResizeObserver<`u`?new ResizeObserver(e=>{E.current=(e[0]==null?null:V_(e[0]))??z_(n,g),a()}):null;return x?.observe(n),()=>{T.current=()=>{},o(),n.removeEventListener(`scroll`,p),n.removeEventListener(`wheel`,m),n.removeEventListener(`touchmove`,m),n.removeEventListener(`keydown`,v),e!=null&&clearTimeout(e),u!=null&&clearTimeout(u),r!=null&&delete r.dataset.isScrolling,i!=null&&(delete i.dataset.isScrolling,delete i.dataset.overlayReveal),y.current=!1,E.current=null,x?.disconnect()}},[t,g,s,c,h]),fv(()=>{P||N==null||Nt(!1)},[Nt,P,N]);let en=pv(()=>N==null?null:`${N.path}::${N.source}`,[N]);fv(()=>{if(en==null){m?.clearSlotContent(fd);return}let t=Ae.current;if(t==null)return;let n=v.current??_.current;if(n==null)return;let r={anchorElement:n,anchorRect:t.anchorRect??Gv(n.getBoundingClientRect()),close:e=>{Mt.current(e?.restoreFocus??!0)},restoreFocus:()=>{jt.current&&At.current(Ae.current?.path??null)}},i=e?.contextMenu?.render?.(t.item,r)??null;return m?.setSlotContent(fd,i),e?.contextMenu?.onOpen?.(t.item,r),iy(i),queueMicrotask(()=>{i==null||!i.isConnected||document.activeElement===i&&iy(i)}),()=>{m?.clearSlotContent(fd)}},[en,e?.contextMenu,m]),fv(()=>{N!=null&&t.getItem(N.path)==null&&Nt()},[Nt,N,t]),fv(()=>{if(N==null)return;let e=S.current?.getRootNode(),t=e instanceof ShadowRoot?e.host:S.current,n=e=>{let n=e.target;n instanceof Node&&(Wv(e)||_.current?.contains(n)!==!0&&t?.contains(n)!==!0&&Nt())},r=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),Nt())};return document.addEventListener(`mousedown`,n,!0),document.addEventListener(`keydown`,r,!0),()=>{document.removeEventListener(`mousedown`,n,!0),document.removeEventListener(`keydown`,r,!0)}},[Nt,N]),fv(()=>{let e=C.current,n=S.current;if(e==null||n==null){ae.current=F;return}let r=F==null?null:te.current.get(F)??null,i=R_(n),a=i?.dataset.itemPath??null,o=st&&x.current===i,c=f&&ee.current===i,l=oe.current&&!ct,u=se.current??0,d=je.current,p=Me.current,m=Ne.current,g=Pe.current,_=i!=null,v=D.current||_,y=ae.current!==F,b=p!=null&&p===F&&F!=null,w=!1,E=!1;if(ut!=null&&ut.id!==ne.current){ne.current=ut.id;let n=ut.visibleIndex,r=t.getVisibleRows(n,n)[0]??null;if(r!=null){let t=h?Math.max(0,Math.min(r.ancestorPaths.length*s,Math.max(0,R-s))):wt;w=!0,E=U_(e,n,s,R,Ct,ut.offset,t)}t.clearScrollRequest(ut.id)}let re=!w&&l&&W_(e,I,s,R,Ct,u),ie=!w&&d!=null&&d===F&&W_(e,I,s,R,Ct,wt),O=!w&&m!=null&&m.path===F&&W_(e,I,s,R,Ct,m.viewportOffset),ce=!w&&g!=null&&g.path===F&&e.scrollTop!==g.scrollTop;if(ce&&(e.scrollTop=g.scrollTop),(ce||E||ie||O||re||v&&y&&d!==F&&!b&&H_(e,I,s,R,wt))&&T.current(),w){ae.current=F;return}if(!v){ae.current=F;return}if(o){ae.current=F;return}if(c&&!l){ae.current=F;return}if(r==null){l&&I>=0&&(W_(e,I,s,R,Ct,u),T.current()),ae.current=F;return}(y||l||d===F||p===F||m?.path===F||g?.path===F||a==null||a!==F)&&(L_(r),d===F&&(je.current=null),p===F&&(Me.current=null),m?.path===F&&(Ne.current=null),g?.path===F&&(Pe.current=null),oe.current=!1,se.current=null),ae.current=F},[t,I,F,Et,s,st,ct,bt,R,f,ut,h,wt,Ct,yt]);let tn=I>=0&&I>=L.visible.startIndex&&I<=L.visible.endIndex,nn=F!=null&&xt.some(e=>Sv(e.row)===F),rn=tn||nn,an=Xe&&D.current===!0&&rn?F:null,on=Te===`pointer`?A:null,sn=N?.path??Fe.current??on??an??A,cn=N?.source===`right-click`;fv(()=>{y.current&&N==null||Pt(nt(sn))},[N,nt,bt,R,De,xt,sn,Pt,yt]);let ln=$(e=>{if(y.current||Wv(e))return;let t=e.target;if(!(t instanceof HTMLElement)||t.closest?.(`[data-type="context-menu-trigger"]`)!=null)return;let n=t.closest?.(`[data-file-tree-sticky-row="true"]`),r=t.closest?.(`[data-type="item"]`),i=n instanceof HTMLElement?n.dataset.fileTreeStickyPath??null:r instanceof HTMLElement?r.dataset.itemPath??null:null;i!=null&&Ee(e=>e===`pointer`?e:`pointer`),we(e=>e===i?e:i)},[]),un=$(()=>{we(null)},[]);fv(()=>{if(!dt)return;let e=()=>{Gt(),t.cancelDrag()};return window.addEventListener(`dragend`,e),()=>{window.removeEventListener(`dragend`,e),Gt(),t.cancelDrag()}},[t,dt]);let dn=e=>{if(!dt||t.getDragSession()==null||k.current)return;let n=jv(e.target instanceof HTMLElement?e.target:null);t.setDragTarget(n),qt(t.getDragSession()?.target??null),Yt(e.clientX,e.clientY),e.dataTransfer!=null&&(e.dataTransfer.dropEffect=`move`),e.preventDefault()},fn=e=>{if(!dt||t.getDragSession()==null||k.current)return;let n=e.relatedTarget;n instanceof Node&&S.current?.contains(n)===!0||(Vt(),Ut(),t.setDragTarget(null))},pn=e=>{!dt||t.getDragSession()==null||k.current||(e.preventDefault(),Kt(e.clientX,e.clientY),t.completeDrag(),Ht(),Vt(),Ut(),pe.current=null)},mn=L.window.height,hn=L.window.offsetTop,gn=Math.min(0,R-mn),_n=Math.min(0,R-mn-wt),vn=Se===F||oe.current,yn=F!=null&&vn&&!Et&&I>=0?yt[I]??t.getVisibleRows(I,I)[0]??null:null,bn=yn==null?null:G_(I,s,bt,mn),xn=pe.current,Sn=ht!=null&&xn!=null&&xn.path===ht&&xn.index>=bt.start&&xn.index<=bt.end,Cn=ht!=null&&xn!=null&&xn.path===ht&&!Sn&&xn.path!==yn?.path?xn:null,wn=Cn==null?null:G_(Cn.index,s,bt,mn),Tn=Bv((I>=0?yt[I]??t.getVisibleRows(I,I)[0]??null:null)?.ancestorPaths.at(-1)??null),En=ct&&F!=null?ty(o,F,!Et):void 0,Dn=N?.path??(ct?F:Se),On=N?.path??A,kn=nt(sn),An=P&&Xe&&!cn&&!st&&kn!=null&&j!=null&&sn!=null,jn=P&&(An||N!=null),Mn=N?.anchorRect,Nn=Mn==null&&kn!=null&&j!=null&&(N!=null||An)?j:null,Pn=Mn==null?Nn==null?void 0:{top:`${Nn}px`}:{left:`${Mn.left}px`,position:`fixed`,right:`auto`,top:`${Mn.top}px`},Fn=cn?{opacity:`0`}:void 0,In=$((e,n,r,i)=>{let a=Y_({event:{ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey},isDirectory:n.kind===`directory`,isSearchOpen:ct,mode:i}),o=a.toggleDirectory&&n.kind===`directory`,s=o?t.resolveMountedDirectoryPathFromInput(r):null;if(o&&s==null)return;let c=s??r;switch(a.selection.kind){case`range`:t.selectPathRange(c,a.selection.additive);break;case`toggle`:t.togglePathSelectionFromInput(c);break;case`single`:t.selectOnlyMountedPathFromInput(c)}let l=e.currentTarget instanceof HTMLElement?e.currentTarget:null,u=n.index>=L.visible.startIndex&&n.index<=L.visible.endIndex,d=i===`flow`&&u&&l!=null&&l.dataset.itemParked!==`true`;t.focusMountedPathFromInput(c),d&&(D.current=!0,Ce(e=>e===c?e:c),Ee(`focus`)),o&&t.toggleMountedDirectoryFromInput(c),a.closeSearch&&t.closeSearch(),a.revealCanonical&&Lt(c,{targetOffset:`sticky-parents`})},[t,ct,L.visible.endIndex,L.visible.startIndex,Lt]),Ln=()=>{if(y.current||!Xe||sn==null||kn==null)return;let e=t.getItem(sn);e!=null&&(Pt(kn),jt.current=!0,ke({anchorRect:null,item:{kind:e.isDirectory()?`directory`:`file`,name:kn.getAttribute(`aria-label`)??sn,path:e.getPath()},path:e.getPath(),source:`button`}))},Rn={contextHoverPath:On,contextMenuButtonTriggerEnabled:Xe,contextMenuButtonVisibility:Ze,contextMenuEnabled:P,contextMenuRightClickEnabled:Qe,contextMenuTriggerMode:Ye,controller:t,directoriesWithGitChanges:i,dragAndDropEnabled:dt,draggedPathSet:pt,dragTarget:mt,gitLaneActive:rt,gitStatusByPath:n,handleRowDragEnd:Zt,handleRowDragStart:Xt,handleRowTouchStart:Qt,ignoredGitDirectories:r,ignoredInheritanceCache:ye,instanceId:o,itemHeight:s,onKeyDown:$t,onRowClick:In,openContextMenuForRow:Ft,registerButton:$e,registerRenameInput:tt,renameView:at,renderDecorationForRow:Dt,resolveIcon:it,shouldSuppressContextMenu:Rt,visualFocusPath:Dn},zn={...Rn,registerButton:et};return Y(`div`,{ref:S,id:gt,"data-file-tree-context-menu-button-visibility":P&&Xe?Ze:void 0,"data-file-tree-context-menu-trigger-mode":P?Ye:void 0,"data-file-tree-has-context-menu-action-lane":P&&Xe?`true`:void 0,"data-file-tree-has-git-lane":rt?`true`:void 0,"data-file-tree-virtualized-root":`true`,onDragLeave:dt?fn:void 0,onDragOver:dt?dn:void 0,onDrop:dt?pn:void 0,onKeyDown:$t,onPointerLeave:P?un:void 0,onPointerOver:P?ln:void 0,role:`tree`,tabIndex:-1,style:{outline:`none`,position:`relative`},children:[Y(`style`,{"data-file-tree-guide-style":`true`,dangerouslySetInnerHTML:{__html:Tn}}),Y(`slot`,{name:dd,"data-type":`header-slot`}),f?Y(`div`,{"data-file-tree-search-container":!0,"data-open":ct?`true`:`false`,children:Y(`input`,{ref:ee,"aria-activedescendant":En,"aria-controls":gt,placeholder:`Search…`,"data-file-tree-search-input":!0,"data-file-tree-search-input-fake-focus":Ve?`true`:void 0,value:lt,onBlur:()=>{d===`retain`&&!Ue.current||t.closeSearch()},onFocus:We,onPointerDown:We,onInput:e=>{We();let n=e.currentTarget;t.setSearch(n.value)}})}):null,Y(`div`,{ref:C,"data-file-tree-virtualized-scroll":`true`,children:[h&&qe&&xt.length>0?Y(`div`,{"aria-hidden":`true`,"data-file-tree-sticky-overlay":`true`,children:Y(`div`,{"data-file-tree-sticky-overlay-content":`true`,style:{height:`${_t}px`},children:xt.map((e,t)=>oy(zn,e.row,`sticky:${Sv(e.row)}`,{mode:`sticky`,style:{left:`0`,position:`absolute`,right:`0`,top:`${e.top}px`,zIndex:`${xt.length-t}`}}))})}):null,Y(`div`,{ref:b,"data-file-tree-virtualized-list":`true`,style:{height:`${Ct}px`},children:[Y(`div`,{"data-file-tree-virtualized-sticky-offset":`true`,"aria-hidden":`true`,style:{height:`${hn}px`}}),Y(`div`,{"data-file-tree-virtualized-sticky":`true`,style:{height:`${mn}px`,top:`${gn}px`,bottom:`${_n}px`},children:[sy(Rn,bt,Tt),yn!=null&&bn!=null?oy(Rn,yn,`parked:${yn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:ht===yn.path?`none`:void 0,position:`absolute`,right:`0`,top:`${bn}px`}}):null,Cn!=null&&wn!=null?oy(Rn,Cn,`parked-drag:${Cn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:`none`,position:`absolute`,right:`0`,top:`${wn}px`}}):null]})]})]}),P?Y(`div`,{ref:_,"data-type":`context-menu-anchor`,"data-visible":jn?`true`:`false`,style:Pn,children:[Y(`button`,{ref:v,type:`button`,"data-type":pd,"aria-label":`Options`,"aria-haspopup":`menu`,"aria-expanded":N==null?`false`:`true`,"data-visible":An?`true`:`false`,onMouseDown:e=>{e.preventDefault()},onClick:e=>{if(e.preventDefault(),e.stopPropagation(),N!=null){Nt();return}Ln()},tabIndex:-1,style:Fn,children:Y(n_,{...it(`file-tree-icon-ellipsis`)})}),N==null?null:Y(`slot`,{name:fd})]}):null,N==null?null:Y(`div`,{"data-type":`context-menu-wash`,"aria-hidden":`true`,onMouseDownCapture:e=>{e.preventDefault(),Nt()},onTouchStartCapture:e=>{e.preventDefault(),e.stopPropagation(),Nt()},onTouchMoveCapture:e=>{e.preventDefault(),e.stopPropagation()},onWheelCapture:e=>{e.preventDefault(),e.stopPropagation()}})]})}var ly={hydrateRoot:(e,t)=>{Zg(Dg(cy,t),e)},renderRoot:(e,t)=>{Xg(Dg(cy,t),e)},unmountRoot:e=>{Xg(null,e)}};function uy(e,t){ly.renderRoot(e,t)}function dy(e,t){ly.hydrateRoot(e,t)}function fy(e){ly.unmountRoot(e)}var py=class{#e=new Map;#t=null;clearAll(){for(let e of this.#e.values())e.remove();this.#e.clear()}clearSlotContent(e){let t=this.#n(e);t!=null&&(t.remove(),this.#e.delete(e))}setHost(e){if(this.#t=e,e!=null){this.#i(e);for(let[e,t]of this.#e)this.#r(e,t)}}setSlotContent(e,t){let n=this.#n(e);if(n===t){t!=null&&(this.#e.set(e,t),this.#r(e,t));return}if(n?.remove(),t==null){this.#e.delete(e);return}this.#e.set(e,t),this.#r(e,t)}setSlotHtml(e,t){let n=t?.trim()??``;if(n.length===0){this.setSlotContent(e,null);return}let r=this.#n(e);if(r!=null&&r.innerHTML===n){this.#e.set(e,r),this.#r(e,r);return}let i=document.createElement(`div`);i.innerHTML=n,this.setSlotContent(e,i)}#n(e){let t=this.#e.get(e)??null;if(t!=null)return t;let n=this.#t;if(n==null)return null;for(let t of Array.from(n.children))if(t instanceof HTMLElement&&t.dataset.fileTreeManagedSlot===e)return t;return null}#r(e,t){t.slot=e,t.dataset.fileTreeManagedSlot=e,this.#t!=null&&t.parentNode!==this.#t&&this.#t.appendChild(t)}#i(e){for(let t of Array.from(e.children)){if(!(t instanceof HTMLElement))continue;let e=t.dataset.fileTreeManagedSlot;e==null||this.#e.has(e)||this.#e.set(e,t)}}};Array.isArray;var my=0;function hy(e){return e!=null&&e.length>0?e:(my+=1,`pst_ft_${my}`)}function gy({initialVisibleRowCount:e,itemHeight:t}){return e==null?420:Math.max(0,e)*(t??th)}function _y(e){if(typeof document>`u`)return;let t=document.createElement(`div`);t.innerHTML=e;let n=t.querySelector(`svg`);return n instanceof SVGElement?n:void 0}function vy(e){return e.querySelector(`#file-tree-icon-chevron`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-file`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-dot`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-lock`)instanceof SVGElement}function yy(e){return Array.from(e.children).filter(e=>e instanceof SVGElement)}var by=class{static LoadedCustomComponent=!0;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=new py;#u;#d;#f;#p;#m;#h;#g;#_;#v;#y=null;#b;#x=!1;#S=!1;constructor(e){let{composition:t,density:n,fileTreeSearchMode:r,gitStatus:i,id:a,initialSearchQuery:o,icons:s,itemHeight:c,onSearchChange:l,onSelectionChange:u,overscan:d,renderRowDecoration:f,renaming:p,search:m,searchBlurBehavior:h,searchFakeFocus:g,stickyFolders:_,unsafeCSS:v,initialVisibleRowCount:y,...b}=e;this.#e=t,this.#n=hy(a),this.#p=rg(i),this.#m=s,this.#h=v,this.#r=u,this.#i=f,this.#a=p!=null&&p!==!1,this.#o=h,this.#s=m===!0,this.#c=g===!0,this.#u=eh(n,c),this.#d={itemHeight:this.#u.itemHeight,overscan:d,stickyFolders:_,initialVisibleRowCount:y},this.#t=new Qh({...b,fileTreeSearchMode:r,initialSearchQuery:o,onSearchChange:l,renaming:p}),this.#v=this.#t.getSelectionVersion(),this.#y=this.#r==null?null:this.subscribe(()=>{this.#D()})}unmount(){this.#b!=null&&(fy(this.#b),delete this.#b.dataset.fileTreeVirtualizedWrapper,this.#b=void 0),this.#l.clearAll(),this.#l.setHost(null),this.#f!=null&&(delete this.#f.dataset.fileTreeVirtualized,this.#I(this.#f),this.#f=void 0)}cleanUp(){this.unmount(),this.#y?.(),this.#y=null,this.#t.destroy()}getFileTreeContainer(){return this.#f}getItem(e){return this.#t.getItem(e)}getFocusedItem(){return this.#t.getFocusedItem()}getFocusedPath(){return this.#t.getFocusedPath()}getFocusedIndex(){return this.#t.getFocusedIndex()}getVisibleCount(){return this.#t.getVisibleCount()}getVisibleRows(e,t){return this.#t.getVisibleRows(e,t)}getSelectedPaths(){return this.#t.getSelectedPaths()}getComposition(){return this.#e}getItemHeight(){return this.#u.itemHeight}getDensityFactor(){return this.#u.factor}subscribe(e){let t=!1;return this.#t.subscribe(()=>{if(!t){t=!0;return}e()})}focusPath(e){this.#t.focusPath(e)}focusFirstItem(){this.#t.focusFirstItem()}focusLastItem(){this.#t.focusLastItem()}focusNextItem(){this.#t.focusNextItem()}focusPreviousItem(){this.#t.focusPreviousItem()}focusParentItem(){this.#t.focusParentItem()}scrollToPath(e,t){this.#t.scrollToPath(e,t)}focusNearestPath(e){return this.#t.focusNearestPath(e)}add(e){this.#t.add(e)}batch(e){this.#t.batch(e)}applyGitStatusPatch(e){let t=ig(this.#p,e);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&uy(n.wrapper,this.#w())}move(e,t,n){this.#t.move(e,t,n)}onMutation(e,t){return this.#t.onMutation(e,t)}setSearch(e){this.#t.setSearch(e)}openSearch(e){this.#t.openSearch(e)}closeSearch(){this.#t.closeSearch()}isSearchOpen(){return this.#t.isSearchOpen()}getSearchValue(){return this.#t.getSearchValue()}getSearchMatchingPaths(){return this.#t.getSearchMatchingPaths()}focusNextSearchMatch(){this.#t.focusNextSearchMatch()}focusPreviousSearchMatch(){this.#t.focusPreviousSearchMatch()}startRenaming(e,t){return this.#t.startRenaming(e,t)}remove(e,t){this.#t.remove(e,t)}resetPaths(e,t){Array.isArray(e)?this.#t.resetPaths(e,t):this.#t.resetPaths(e)}setComposition(e){this.#e=e;let t=this.#T();t!=null&&(this.#O(),uy(t.wrapper,this.#w()))}setGitStatus(e){let t=rg(e,this.#p);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&uy(n.wrapper,this.#w())}setIcons(e){this.#m=e;let t=this.#T();t!=null&&(this.#E(t.host,t.wrapper),uy(t.wrapper,this.#w()))}hydrate({fileTreeContainer:e}){let t=this.#P(e),n=this.#N(t);this.#O(),dy(n,this.#w())}render({containerWrapper:e,fileTreeContainer:t}){let n=this.#P(t??this.#f,e),r=this.#N(n);this.#O(),uy(r,this.#w())}#C(){return{initialViewportHeight:gy({initialVisibleRowCount:this.#d.initialVisibleRowCount,itemHeight:this.#d.itemHeight}),itemHeight:this.#d.itemHeight,overscan:this.#d.overscan,stickyFolders:this.#d.stickyFolders}}#w(){return{composition:this.#e,controller:this.#t,gitStatusByPath:this.#p?.statusByPath,ignoredGitDirectories:this.#p?.ignoredDirectoryPaths,directoriesWithGitChanges:this.#p?.directoriesWithChanges,icons:this.#m,instanceId:this.#n,renamingEnabled:this.#a,renderRowDecoration:this.#i,searchBlurBehavior:this.#o,searchEnabled:this.#s,searchFakeFocus:this.#c,slotHost:this.#l,...this.#C()}}#T(){let e=this.#f,t=this.#b;return e==null||t==null?null:{host:e,wrapper:t}}#E(e,t){let n=e.shadowRoot;n!=null&&(this.#k(n),this.#A(n)),this.#j(t)}#D(){let e=this.#r;if(e==null)return;let t=this.#t.getSelectionVersion();t!==this.#v&&(this.#v=t,e(this.#t.getSelectedPaths()))}#O(){let e=this.#e?.header?.render;if(e!=null){this.#l.setSlotContent(dd,e());return}this.#l.setSlotHtml(dd,this.#e?.header?.html??null)}#k(e){let t=yy(e).find(e=>vy(e)),n=_y(td(hd(this.#m).set));n!=null&&(t==null||t.outerHTML!==n.outerHTML)&&(t==null?e.prepend(n):t.replaceWith(n))}#A(e){let t=yy(e),n=t.find(e=>vy(e)),r=t.filter(e=>e!==n),i=hd(this.#m).spriteSheet?.trim()??``;if(i.length===0){for(let e of r)e.remove();return}let a=_y(i);if(a==null){for(let e of r)e.remove();return}if(r.length!==1||r[0].outerHTML!==a.outerHTML){for(let e of r)e.remove();e.appendChild(a)}}#j(e){let t=hd(this.#m);t.colored&&rd(t.set)?e.dataset.fileTreeColoredIcons=`true`:delete e.dataset.fileTreeColoredIcons}#M(e){let t=e.querySelector(`style[${sd}]`);if(this.#g==null&&t instanceof HTMLStyleElement&&(this.#g=t),this.#h==null||this.#h===``){this.#g?.remove(),this.#g=void 0,this.#_=void 0;return}(this.#g?.parentNode!==e||this.#_!==this.#h)&&(this.#g??=document.createElement(`style`),this.#g.setAttribute(sd,``),this.#g.parentNode!==e&&e.appendChild(this.#g),this.#g.textContent=ah(this.#h),this.#_=this.#h)}#N(e){if(this.#b!=null)return this.#b;let t=e.shadowRoot;if(t==null)throw Error(`FileTree requires a shadow root`);let n=Array.from(t.children).filter(e=>e instanceof HTMLDivElement&&typeof e.dataset.fileTreeId==`string`&&e.dataset.fileTreeId.length>0),r=n.find(e=>e.dataset.fileTreeId===this.#n)??n[0];return r!=null&&(this.#n=r.dataset.fileTreeId??this.#n),this.#b=r??document.createElement(`div`),this.#b.dataset.fileTreeId=this.#n,this.#b.dataset.fileTreeVirtualizedWrapper=`true`,this.#E(e,this.#b),this.#b.parentNode!==t&&t.appendChild(this.#b),this.#b}#P(e,t){let n=e??this.#f??document.createElement(`file-tree-container`);t!=null&&n.parentNode!==t&&t.appendChild(n);let r=n.shadowRoot??n.attachShadow({mode:`open`});return dh(n,r),this.#M(r),n.dataset.fileTreeVirtualized=`true`,n.style.display=`flex`,this.#F(n),this.#l.setHost(n),this.#f=n,n}#F(e){e.style.getPropertyValue(`--trees-item-height`)===``&&(e.style.setProperty(`--trees-item-height`,`${String(this.#u.itemHeight)}px`),this.#x=!0),e.style.getPropertyValue(`--trees-density-override`)===``&&(e.style.setProperty(`--trees-density-override`,String(this.#u.factor)),this.#S=!0)}#I(e){this.#x&&=(e.style.removeProperty(`--trees-item-height`),!1),this.#S&&=(e.style.removeProperty(`--trees-density-override`),!1)}},xy=`
|
|
6441
6498
|
:host {
|
|
6442
6499
|
--file-tree-font-family: var(--ui, system-ui, sans-serif);
|
|
6443
6500
|
--file-tree-font-size: 12.5px;
|
|
@@ -6453,7 +6510,7 @@ slicc-dock-tree .dock-tree__preview--active {
|
|
|
6453
6510
|
--file-tree-git-deleted-color: var(--rose, #d1242f);
|
|
6454
6511
|
--file-tree-git-untracked-color: var(--txt-3, #717171);
|
|
6455
6512
|
}
|
|
6456
|
-
`,
|
|
6513
|
+
`,Sy=`
|
|
6457
6514
|
slicc-file-tree {
|
|
6458
6515
|
display: block;
|
|
6459
6516
|
box-sizing: border-box;
|
|
@@ -6466,7 +6523,7 @@ slicc-file-tree {
|
|
|
6466
6523
|
font-family: var(--ui);
|
|
6467
6524
|
font-size: 13px;
|
|
6468
6525
|
}
|
|
6469
|
-
`,
|
|
6526
|
+
`,Cy=`slicc-file-tree-style`;function wy(e){if(e.getElementById(Cy))return;let t=e.createElement(`style`);t.id=Cy,t.textContent=Sy,(e.head??e.documentElement).appendChild(t)}function Ty(e){return e?.isDirectory()?e:null}function Ey(e){return e.replace(/^\/+/,``)}function Dy(e){return e<1024?`${e}B`:e<1048576?`${Math.round(e/1024)}K`:e<1073741824?`${(e/1048576).toFixed(1)}M`:`${(e/1073741824).toFixed(1)}G`}function Oy(e){let t=[],n=new Map,r=[],i=e=>{for(let a of e){if(a.kind===`group`)continue;let e=Ey(a.id);if(a.kind===`dir`){n.set(e,{id:a.id,path:a.path??a.id,kind:`directory`}),a.open&&r.push(e),a.children.length===0?t.push(e):i(a.children);continue}t.push(e),n.set(e,{id:a.id,path:a.path??a.label,kind:`file`,...a.size===void 0?{}:{size:a.size}})}};return i(e),{paths:t,meta:n,initiallyOpen:r}}A(`slicc-file-tree`,class extends HTMLElement{#e=[];#t=new Map;#n=null;#r=null;#i=[];#a=null;#o=!1;#s=null;static get observedAttributes(){return[`selected`]}connectedCallback(){wy(this.ownerDocument),this.#r||(this.#r=document.createElement(`div`),this.#r.style.cssText=`display:flex;flex-direction:column;height:100%;min-height:0;`,this.appendChild(this.#r)),this.#d()}disconnectedCallback(){this.#n?.unmount(),this.#n=null}attributeChangedCallback(e,t,n){e===`selected`&&n!==this.#a&&(this.#a=n,this.#u())}get items(){return this.#e.slice()}set items(e){this.#e=Array.isArray(e)?e.slice():[],this.#d()}get gitStatus(){return this.#i.slice()}set gitStatus(e){this.#i=Array.isArray(e)?e.slice():[],this.#d()}get selected(){return this.#a}set selected(e){e===null?this.removeAttribute(`selected`):this.setAttribute(`selected`,e)}selectFile(e){let t=this.#t.get(Ey(e));if(t){this.#o=!0;try{this.selected=e}finally{this.#o=!1}this.#u(),this.#c(`file-select`,{id:e,path:t.path})}}toggleDir(e){let t=Ty(this.#n?.getItem(Ey(e)));t&&(t.toggle(),this.#c(`dir-toggle`,{id:e,open:t.isExpanded()}))}isDirOpen(e){return Ty(this.#n?.getItem(Ey(e)))?.isExpanded()===!0}previewFile(e){let t=this.#t.get(Ey(e));t?.kind===`file`&&this.#c(`file-preview`,{id:e,path:t.path})}#c(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}#l(){let e=this.#n;if(!e)return;let t=e.getVisibleCount();if(t===0)return;let n=e.getVisibleRows(0,t);this.#s=n.filter(e=>e.isExpanded).map(e=>e.path)}#u(){let e=this.#a;if(!(!e||!this.#n)){this.#o=!0;try{this.#n.getItem(Ey(e))?.select()}finally{this.#o=!1}}}#d(){if(!this.isConnected||!this.#r)return;let{paths:e,meta:t,initiallyOpen:n}=Oy(this.#e);this.#t=t,this.#l();let r=this.#s??n;if(this.#n?.unmount(),this.#r.replaceChildren(),e.length===0){this.#n=null;return}let i=new by({preparedInput:Qm(e),gitStatus:this.#i,search:!0,initialVisibleRowCount:40,renaming:!1,dragAndDrop:!1,unsafeCSS:xy,initialExpandedPaths:r,...this.#a?{initialSelectedPaths:[Ey(this.#a)]}:{},onSelectionChange:e=>{if(this.#o)return;let t=e[0];if(t===void 0)return;let n=this.#t.get(t);n&&(this.#a=n.id,this.setAttribute(`selected`,n.id),this.#c(`file-select`,{id:n.id,path:n.path}))},renderRowDecoration:({row:e})=>{let t=this.#t.get(e.path);return!t||t.size===void 0?null:{text:Dy(t.size)}},composition:{contextMenu:{enabled:!0,triggerMode:`both`,buttonVisibility:`when-needed`,onOpen:(e,t)=>{let n=this.#t.get(e.path);t.close({restoreFocus:!1}),this.#c(`file-overflow`,{id:n?.id??e.path,path:n?.path??e.path,anchor:t.anchorElement,kind:e.kind})}}}});i.render({containerWrapper:this.#r}),this.#n=i,this.#f()}#f(){let e=this.#n?.getFileTreeContainer();if(!e)return;let t=()=>{let e=this.#n?.getFocusedPath()??this.#n?.getSelectedPaths()[0],t=e==null?null:this.#t.get(e);t&&this.previewFile(t.id)};e.addEventListener(`dblclick`,t),e.addEventListener(`keydown`,e=>{e.key===`Enter`&&t()})}});var ky=`
|
|
6470
6527
|
slicc-surface {
|
|
6471
6528
|
position: absolute;
|
|
6472
6529
|
inset: 0;
|
|
@@ -6498,7 +6555,7 @@ slicc-surface:fullscreen {
|
|
|
6498
6555
|
background: var(--canvas, #fff);
|
|
6499
6556
|
position: fixed;
|
|
6500
6557
|
}
|
|
6501
|
-
`,
|
|
6558
|
+
`,Ay=`slicc-surface-style`;function jy(e){if(e.getElementById(Ay))return;let t=e.createElement(`style`);t.id=Ay,t.textContent=ky,(e.head??e.documentElement).appendChild(t)}function My(e){return e===`block`||e===`column`?e:`flex`}A(`slicc-surface`,class extends HTMLElement{static observedAttributes=[`surface-id`,`active`,`layout`];connectedCallback(){jy(this.ownerDocument),this.#e()}attributeChangedCallback(e,t,n){this.isConnected&&(e===`surface-id`?this.#e():e===`active`&&t!==n&&this.dispatchEvent(new CustomEvent(`surface-toggle`,{bubbles:!0,composed:!0,detail:{surfaceId:this.surfaceId,active:this.active,layout:this.layout}})))}get surfaceId(){return this.getAttribute(`surface-id`)}set surfaceId(e){e==null?this.removeAttribute(`surface-id`):this.setAttribute(`surface-id`,e)}get active(){return this.hasAttribute(`active`)}set active(e){this.toggleAttribute(`active`,e)}get layout(){return My(this.getAttribute(`layout`))}set layout(e){this.setAttribute(`layout`,My(e))}#e(){let e=this.surfaceId;e==null?delete this.dataset.s:this.dataset.s=e}});var Ny=`/**
|
|
6502
6559
|
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
|
|
6503
6560
|
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
6504
6561
|
* https://github.com/chjj/term.js
|
|
@@ -6783,7 +6840,7 @@ slicc-surface:fullscreen {
|
|
|
6783
6840
|
.xterm .xterm-scrollable-element > .shadow.top.left {
|
|
6784
6841
|
box-shadow: var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset;
|
|
6785
6842
|
}
|
|
6786
|
-
`,
|
|
6843
|
+
`,Py={background:`#0c0c0e`,foreground:`#e7e7ea`,cursor:`#e7e7ea`,cursorAccent:`#0c0c0e`,selectionBackground:`#8b5cf64d`,selectionForeground:`#ffffff`,black:`#0c0c0e`,red:`#f43f5e`,green:`#5bd17b`,yellow:`#f59e0b`,blue:`#3b82f6`,magenta:`#8b5cf6`,cyan:`#06b6d4`,white:`#e7e7ea`,brightBlack:`#8a8a93`,brightRed:`#fb7185`,brightGreen:`#86efac`,brightYellow:`#fbbf24`,brightBlue:`#60a5fa`,brightMagenta:`#a78bfa`,brightCyan:`#22d3ee`,brightWhite:`#ffffff`},Fy=`
|
|
6787
6844
|
:host {
|
|
6788
6845
|
display: flex;
|
|
6789
6846
|
flex-direction: column;
|
|
@@ -6824,7 +6881,7 @@ slicc-surface:fullscreen {
|
|
|
6824
6881
|
/* xterm.js wants its container to size the canvas; let it fill. */
|
|
6825
6882
|
.host .xterm { height: 100%; }
|
|
6826
6883
|
.host .xterm-viewport { overflow-y: auto; }
|
|
6827
|
-
`,
|
|
6884
|
+
`,Iy=null;function Ly(){return Iy||=[M(Ny),M(Fy)],Iy}var Ry=class extends HTMLElement{static observedAttributes=[`label`,`hide-header`];#e;#t=null;#n=null;#r=null;#i=null;#a=[];#o=!1;constructor(){super(),this.#e=this.attachShadow({mode:`open`})}connectedCallback(){this.#o=!1,this.#s(),this.#c()}disconnectedCallback(){this.#l()}attributeChangedCallback(e){if(this.isConnected&&e===`label`){let e=this.#e.querySelector(`.title`);e&&(e.textContent=this.label)}}get label(){return this.getAttribute(`label`)??`Terminal`}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get hideHeader(){return this.hasAttribute(`hide-header`)}set hideHeader(e){this.toggleAttribute(`hide-header`,e)}get terminal(){return this.#n}write(e){this.#n?this.#n.write(e):this.#a.push(e)}writeln(e){this.#n?this.#n.writeln(e):this.#a.push(`${e}\r\n`)}clear(){this.#n?this.#n.clear():this.#a.length=0}focus(){this.#n?.focus()}fit(){this.#r?.fit()}#s(){if(this.#t)return;this.#e.adoptedStyleSheets=Ly();let e=j(`div`,{class:`hd`,part:`header`},n(`terminal`,{size:14}),j(`span`,{class:`title`},this.label),j(`span`,{class:`spacer`})),t=j(`div`,{class:`host`,part:`host`});this.#e.replaceChildren(e,t),this.#t=t}async#c(){if(this.#n||this.#o)return;let[{Terminal:e},{FitAddon:n}]=await Promise.all([t(()=>import(`./xterm-BSL5rRqA.js`),[]),t(()=>import(`./addon-fit-DIOBYJe3.js`),[])]);if(this.#o||!this.#t)return;let r=new e({cursorBlink:!zy(),fontSize:12,lineHeight:1.25,fontFamily:`'IBM Plex Mono', 'Source Code Pro', 'JetBrains Mono', ui-monospace, monospace`,theme:Py,convertEol:!0,scrollback:2e3}),i=new n;if(r.loadAddon(i),r.open(this.#t),r.onData(e=>{this.dispatchEvent(new CustomEvent(`terminal-data`,{detail:e,bubbles:!0,composed:!0}))}),this.#n=r,this.#r=i,i.fit(),this.#a.length){for(let e of this.#a)r.write(e);this.#a.length=0}typeof ResizeObserver==`function`&&(this.#i=new ResizeObserver(()=>this.#r?.fit()),this.#i.observe(this.#t))}#l(){this.#o=!0,this.#i?.disconnect(),this.#i=null,this.#n?.dispose(),this.#n=null,this.#r=null,this.#a.length=0}};function zy(){return typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches}A(`slicc-terminal`,Ry);var By=`slicc_monitor_collapsed`;function Vy(){try{let e=localStorage.getItem(By);return new Set(e?JSON.parse(e):[])}catch{return new Set}}function Hy(e){try{localStorage.setItem(By,JSON.stringify([...e]))}catch{}}var Uy=`
|
|
6828
6885
|
slicc-monitor {
|
|
6829
6886
|
display: block;
|
|
6830
6887
|
box-sizing: border-box;
|
|
@@ -7240,4 +7297,4 @@ slicc-monitor {
|
|
|
7240
7297
|
transition-duration: 0.01ms;
|
|
7241
7298
|
}
|
|
7242
7299
|
}
|
|
7243
|
-
`,
|
|
7300
|
+
`,Wy=`slicc-monitor-style`;function Gy(e){if(e.getElementById(Wy))return;let t=e.createElement(`style`);t.id=Wy,t.textContent=Uy,(e.head??e.documentElement).appendChild(t)}function Ky(e){return e.status?e.status:e.error?`error`:e.active?`active`:`idle`}function qy(e){return e===`active`?`Active`:e===`error`?`Error`:e===`warn`?`Warning`:`Idle`}function Jy(e){let t=Ky(e),r=j(`span`,{class:`monitor-row__badges`});for(let t of e.badges??[])r.appendChild(j(`span`,{class:`monitor-row__badge`},t));let i=j(`span`,{class:`monitor-row__headline`},j(`span`,{class:`monitor-row__name`},e.name));r.childElementCount>0&&i.appendChild(r);let a=j(`span`,{class:`monitor-row__content`},i);return e.sublabel&&a.appendChild(j(`span`,{class:`monitor-row__sublabel`},e.sublabel)),j(`li`,{class:`monitor-row`,"data-status":t},j(`span`,{class:`monitor-row__icon`},n(e.icon??`box`,{size:16})),a,j(`span`,{class:`monitor-row__aside`},j(`span`,{class:`monitor-row__meta`},e.meta),j(`span`,{class:`monitor-row__state monitor-row__state--${t}`},j(`span`,{class:`monitor-row__dot`,"aria-hidden":`true`}),qy(t))))}function Yy(e){return j(`div`,{class:`monitor-empty`,role:`status`},j(`span`,{class:`monitor-empty__icon`},n(`inbox`,{size:18})),j(`span`,{class:`monitor-empty__title`},`No ${e.label.toLocaleLowerCase()} yet`),j(`span`,{class:`monitor-empty__text`},e.emptyText??`${e.label} will appear here when available.`))}function Xy(e,t,r,i){let a=t.has(e.id),o=e.count===0?`monitor-section monitor-section--empty`:`monitor-section`,s=[j(`span`,{class:`monitor-section__toggle`,"aria-hidden":`true`},n(a?`chevron-right`:`chevron-down`,{size:15})),j(`span`,{class:`monitor-section__heading`},j(`span`,{class:`monitor-section__title`},e.label),e.meta?j(`span`,{class:`monitor-section__meta`},e.meta):null)];s.push(j(`span`,{class:`monitor-section__count`},String(e.count)));let c=j(`button`,{class:`monitor-section__header`,type:`button`},...s);c.setAttribute(`aria-expanded`,String(!a)),c.setAttribute(`aria-controls`,i),c.addEventListener(`click`,()=>r(e.id));let l=j(`div`,{class:`monitor-section__body`,id:i});if(a&&l.setAttribute(`hidden`,``),e.rows.length===0)l.appendChild(Yy(e));else{let t=j(`ul`,{class:`monitor-section__list`});for(let n of e.rows)t.appendChild(Jy(n));l.appendChild(t)}return j(`section`,{class:o,"data-section":e.id,"data-accent":e.accent??`neutral`},c,l)}function Zy(e,t){return j(`div`,{class:`monitor-summary__metric`},j(`dt`,null,e),j(`dd`,null,t))}function Qy(e,t){let r=e.flatMap(e=>e.rows),i=r.filter(e=>Ky(e)===`active`).length,a=r.filter(e=>[`warn`,`error`].includes(Ky(e))).length,o=e.reduce((e,t)=>e+(t.id===`cost`?0:t.count),0),s=e.find(e=>e.id===`cost`)?.meta??`—`,c=j(`button`,{class:`monitor-summary__refresh`,type:`button`,"aria-label":`Refresh monitor data`},n(`refresh-cw`,{size:15}),j(`span`,null,`Refresh`));return c.addEventListener(`click`,t),j(`header`,{class:`monitor-summary`},j(`div`,{class:`monitor-summary__topline`},j(`span`,{class:`monitor-summary__mark`},n(`activity`,{size:19})),j(`div`,{class:`monitor-summary__copy`},j(`h2`,{class:`monitor-summary__title`},`Live monitor`),j(`p`,{class:`monitor-summary__subtitle`},`System activity and connections at a glance`)),c),j(`dl`,{class:`monitor-summary__metrics`},Zy(`Tracked`,String(o)),Zy(`Active`,String(i)),Zy(`Attention`,String(a)),Zy(`Session cost`,s)))}function $y(e){return{...e,rows:e.rows.map(e=>({...e,badges:e.badges?.slice()}))}}var eb=0;A(`slicc-monitor`,class extends HTMLElement{#e=[];#t=new Set;#n=!1;#r=++eb;connectedCallback(){Gy(this.ownerDocument),this.#n||=(this.#t=Vy(),!0),this.#e.length>0&&this.#i()}get sections(){return this.#e.map($y)}set sections(e){this.#e=Array.isArray(e)?e.map($y):[],this.isConnected&&this.#i()}#i(){let e=Qy(this.#e,()=>{this.dispatchEvent(new CustomEvent(`slicc-monitor-refresh`,{bubbles:!0,composed:!0}))}),t=j(`div`,{class:`monitor-sections`});for(let e of this.#e){let n=e.id.replace(/[^a-z0-9_-]/gi,`-`);t.appendChild(Xy(e,this.#t,e=>{this.#t.has(e)?this.#t.delete(e):this.#t.add(e),Hy(this.#t),this.#i()},`monitor-${this.#r}-${n}`))}this.replaceChildren(),we(this,[e,t])}});var tb=e({CHAT_SURFACE_ID:()=>gl,DEFAULT_LAUNCHER_CORNER:()=>ee,DEFAULT_LAUNCHER_FOLLOWER_STATUS:()=>T,HOLD_TO_ENABLE_MS:()=>nn,LAUNCHER_FOLLOWER_STATUS_ATTR:()=>E,LAYOUT_SCHEMA_VERSION:()=>1,MACHINE_WRITTEN_MEMORY_PATH:()=>MACHINE_WRITTEN_MEMORY_PATH,PANEL_MARKER_ATTR:()=>wa,REDACTED_REAL_WORLD_MEMORY_PATH:()=>REDACTED_REAL_WORLD_MEMORY_PATH,SYNTHETIC_MEMORY_PATH:()=>SYNTHETIC_MEMORY_PATH,SliccImagePreview:()=>Yt,TOKENS_CSS:()=>rl,ensureGlobalTokens:()=>al,followSystemTheme:()=>sl,setTheme:()=>ol});export{za as a,Vo as i,al as n,ua as o,sl as r,Gi as s,tb as t};
|