@bud.sh/app 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/client/assets/bud/design.js +1 -1
  2. package/dist/client/assets/{canvas-Cu6R6xxT.js → canvas-8GXJIuDK.js} +1 -1
  3. package/dist/client/assets/difference-worker-C99ychYw.js +8 -0
  4. package/dist/client/assets/{files-js6ElfkU.js → files-DkWt1l9H.js} +1 -1
  5. package/dist/client/assets/i18n-hH_Ba5QO.js +1 -0
  6. package/dist/client/assets/{index-ChANGtl-.js → index-Dn2pfmXf.js} +2 -2
  7. package/dist/client/assets/index-tpHYVXma.css +2 -0
  8. package/dist/client/assets/{pages-6_lhiQmz.js → pages-BVd6MQmu.js} +1 -1
  9. package/dist/client/assets/{project-branches-DO897zM6.js → project-branches-CMGRmrqr.js} +1 -1
  10. package/dist/client/assets/project-comments-D1IIQwsW.js +1 -0
  11. package/dist/client/assets/{project-thread-links-NLFWQRD2.js → project-thread-links-DKwe_SYb.js} +1 -1
  12. package/dist/client/assets/{project-threads-Lay351p4.js → project-threads-ZbKDh78d.js} +2 -2
  13. package/dist/client/assets/{project-work-du0Y-L5Y.js → project-work-D4DZqBCZ.js} +1 -1
  14. package/dist/client/assets/{task-design-Avb2RO4w.js → task-design-BPpc4Gd7.js} +1 -1
  15. package/dist/client/assets/{tasks-CA-E8bbK.js → tasks-Cn0VOZ9Z.js} +1 -1
  16. package/dist/client/assets/{tasks-request-C55IeuiP.js → tasks-request-BLyOzokZ.js} +1 -1
  17. package/dist/client/assets/{workspace-Cw5HvX5d.js → workspace-DGErsSg6.js} +2 -2
  18. package/dist/client/index.html +3 -3
  19. package/dist/hosted/assets/{canvas-V36732ER.js → canvas-BYTOp1p7.js} +4 -4
  20. package/dist/hosted/assets/{comment-data-CF2ZV_3k.js → comment-data-Cn5y2VxV.js} +6 -21
  21. package/dist/hosted/assets/{files-DjSCjfU7.js → files-B1P2_24q.js} +3 -3
  22. package/dist/hosted/assets/{pages-BzjzeuPu.js → pages-B0ZlVdci.js} +3 -3
  23. package/dist/hosted/assets/{project-branches-BT97J9i7.js → project-branches-DlCWmfRo.js} +1 -1
  24. package/dist/hosted/assets/{project-thread-links-BRLgByEe.js → project-thread-links-BZXQ200n.js} +2 -2
  25. package/dist/hosted/assets/{screen-CKp2C7kx.js → screen-CfdC3NbR.js} +5 -1
  26. package/dist/hosted/assets/{tasks-Dj7AyBJB.js → tasks-_yKh2Z6q.js} +4 -4
  27. package/dist/hosted/assets/{tasks-request-DZob623r.js → tasks-request-CFPLvLc7.js} +1 -1
  28. package/dist/hosted/hosted.js +6 -6
  29. package/dist/node/design.js +0 -5
  30. package/dist/node-host/assets/{canvas-TRUfxfL5.js → canvas-DxmcFZCh.js} +4 -4
  31. package/dist/node-host/assets/{comment-data-DyIZNpfG.js → comment-data-yfWEdDQL.js} +6 -21
  32. package/dist/node-host/assets/{files-Dh2TiQZq.js → files-anHi-apm.js} +3 -3
  33. package/dist/node-host/assets/{pages-BxpjbYhs.js → pages-CW4aF6dK.js} +3 -3
  34. package/dist/node-host/assets/{project-branches-B7HUGiVK.js → project-branches-D7rVCxQX.js} +1 -1
  35. package/dist/node-host/assets/{project-thread-links-CauJF0Cz.js → project-thread-links-m-OLpsD9.js} +2 -2
  36. package/dist/node-host/assets/{screen-CZXWJEds.js → screen-DapOVrga.js} +5 -1
  37. package/dist/node-host/assets/{tasks-Bs1IOpeU.js → tasks-BBK_CybR.js} +4 -4
  38. package/dist/node-host/assets/{tasks-request-ZWmbc8fE.js → tasks-request-B0aeNocI.js} +1 -1
  39. package/dist/node-host/node-host.js +6 -6
  40. package/dist/server/assets/{canvas-Dc1mYCwQ.js → canvas-CkMK4hoN.js} +4 -4
  41. package/dist/server/assets/{comment-data-CsjukwAW.js → comment-data-NLeHG89b.js} +6 -21
  42. package/dist/server/assets/{files-E9mSFeoc.js → files-CRdl489E.js} +3 -3
  43. package/dist/server/assets/{listener-DN5TyOjJ.js → listener-BAYn9Q-u.js} +6 -6
  44. package/dist/server/assets/{pages-BBBXyJWV.js → pages-DXVlJlBC.js} +3 -3
  45. package/dist/server/assets/{project-branches-B0YIK6Ur.js → project-branches-CwTsf6WQ.js} +1 -1
  46. package/dist/server/assets/{project-thread-links-CBOpf6zk.js → project-thread-links-lLS_rq7c.js} +2 -2
  47. package/dist/server/assets/{project-work-qSKFO5yj.js → project-work-CSZlCwH-.js} +2 -2
  48. package/dist/server/assets/{screen-BIQA2mr4.js → screen-B1zH_1O3.js} +5 -1
  49. package/dist/server/assets/{tasks-CiXodsLN.js → tasks-CGdz-uox.js} +5 -5
  50. package/dist/server/assets/{tasks-request-DhwCzpRi.js → tasks-request-D2NBjCTl.js} +1 -1
  51. package/dist/server/runtime.js +1 -1
  52. package/dist/server/server.js +1 -1
  53. package/package.json +1 -1
  54. package/dist/client/assets/difference-worker-jfTSn-Tw.js +0 -8
  55. package/dist/client/assets/i18n-DxqFr2mi.js +0 -1
  56. package/dist/client/assets/index-CFFxP0gS.css +0 -2
  57. package/dist/client/assets/project-comments-DFFKVpia.js +0 -1
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DOLkzBtu.js","assets/angular-html-BswFT_28.js","assets/html-DSw1lh5G.js","assets/javascript-BzbQS41l.js","assets/css-BGIxQoYs.js","assets/angular-ts-DOMhGxLQ.js","assets/scss-CWs8DVSa.js","assets/apl-Dio8Ke0X.js","assets/xml-WY0zc4PG.js","assets/java-BtIQNnN0.js","assets/json-B88Oqtu5.js","assets/astro-CN6YWUG3.js","assets/typescript-j_1H8WHN.js","assets/postcss-D_Wz94rJ.js","assets/tsx-BOvsFOI6.js","assets/bat-C7sJWglS.js","assets/bat-HFWzIrao.js","assets/bibtex-DUQXB5kJ.js","assets/bibtex-Conh3HYz.js","assets/blade-BrDpNfUX.js","assets/html-derivative-DyzJkWO6.js","assets/sql-CNu3Or2W.js","assets/bsl-gRq8cI6V.js","assets/sdbl-CpzYUp7e.js","assets/c-Cz4nF6n_.js","assets/c-SSSlmE39.js","assets/cairo-D66nqRlU.js","assets/python-CzFU0dpx.js","assets/chapel-C1sUNn9S.js","assets/clojure-CAE6QLVB.js","assets/clojure-zIjcJonk.js","assets/cmake-Cpsd-0Y4.js","assets/cmake-T_kMSWuN.js","assets/cobol-BvqUwMCV.js","assets/coffee-NEqv5HL5.js","assets/coffee-BSYIIMkB.js","assets/cpp-vothkh01.js","assets/cpp-BDT6bThX.js","assets/regexp-BWpGejPw.js","assets/glsl-CaPTrB3a.js","assets/crystal-DEF7AEJQ.js","assets/shellscript-CqHdAlCp.js","assets/csharp-CFKDkFDZ.js","assets/csharp-B3DbjJyj.js","assets/css-DgaLhXQH.js","assets/csv-k4CB9lhx.js","assets/csv-B_R7vXwK.js","assets/dart-DjhkpiWP.js","assets/dart-_dH3dQdM.js","assets/diff-eeGLjE2V.js","assets/diff-CR4ZX0DC.js","assets/docker-D0LTq72f.js","assets/docker-CAzcIhYn.js","assets/edge-B_SBzXGF.js","assets/elixir-BN3BkYei.js","assets/elixir-BL8v4QDr.js","assets/elm-CC1TmzeR.js","assets/erb-BjlLGk-_.js","assets/ruby-Dl3oLoVp.js","assets/haml-C1zHJAQt.js","assets/graphql-DEIChqxY.js","assets/jsx-D3KKoC5L.js","assets/lua-DjuecEsk.js","assets/yaml-DijMHRDA.js","assets/erlang-ir39Pet8.js","assets/erlang-CCXss5H6.js","assets/markdown-CboqBxpY.js","assets/fortran-fixed-form-1cK5gXa1.js","assets/fortran-free-form-uHOymLAb.js","assets/fortran-free-form-C5q_0aPq.js","assets/fsharp-SO2Zcqp5.js","assets/fsharp-C37UASp4.js","assets/gdresource-LxjHb83i.js","assets/gdshader-kiBtQlv1.js","assets/gdscript-DJFPOtzS.js","assets/gdscript-CJEqcM-5.js","assets/gdshader-BNp4G147.js","assets/git-commit-DaNUDv1O.js","assets/git-commit-BAuDFD-1.js","assets/git-rebase-qxk4jQ_Z.js","assets/git-rebase-Bh7mDoAc.js","assets/glimmer-js-CIdbWayl.js","assets/glimmer-ts-B16xCo2k.js","assets/glsl-D01ELkOo.js","assets/go-CC6EVc1J.js","assets/go-CFMhVTkq.js","assets/graphql-BZEhxNwM.js","assets/groovy-_MokPXAr.js","assets/groovy-Dj7WCBJM.js","assets/hack-C30D-q0p.js","assets/haml-BU6KMePS.js","assets/handlebars-WZCg7K7Q.js","assets/handlebars-g-3gLrXt.js","assets/haxe-B0BMDyun.js","assets/haxe-CD8O8Ul0.js","assets/hlsl-DQJgUA8P.js","assets/hlsl-ajL2FB-w.js","assets/html-BCy9P6D2.js","assets/html-derivative-ekTk9Unt.js","assets/http-BjrBtiM6.js","assets/hurl-B4P9s9G3.js","assets/hxml-DPF7XkXa.js","assets/ini-DiZ1IqbV.js","assets/ini-0B7NLFlx.js","assets/java-_ATy9zCa.js","assets/javascript-CpIGwZ_Y.js","assets/jinja-dRcm23Ea.js","assets/jison-D3aJooqo.js","assets/json-C3WlssX3.js","assets/jsonc-BzJ54Uh_.js","assets/jsonc-dcnCvL0G.js","assets/jsx-C4yDKi0A.js","assets/julia-C8a5hZkp.js","assets/julia-hqywDEUR.js","assets/r-DWzjseEo.js","assets/just-CP_wDfXI.js","assets/perl-sgZsTtaf.js","assets/latex-Bn9nYtub.js","assets/latex-B_Ztlc7G.js","assets/tex-C9L8xJex.js","assets/less-CXhFgJ4v.js","assets/less-B64L-FWb.js","assets/liquid-CQNtsgCr.js","assets/log-Bu1ZtrH6.js","assets/log-BvtJ4bSl.js","assets/lua-fPRBWD-V.js","assets/make-B54cR2A1.js","assets/make-URElk0GJ.js","assets/markdown-CjQmuOi1.js","assets/marko-DPS0EkZ1.js","assets/mdc-C6srEd4p.js","assets/nextflow-uA5IJerx.js","assets/nextflow-groovy-C770ykRh.js","assets/nextflow-groovy-D5vAge1Z.js","assets/nginx-BxRBJ-Af.js","assets/nim-DN3EGtL-.js","assets/nim-ZjzS1dcU.js","assets/objective-c-CsonrGpd.js","assets/objective-c-D_ECFp-D.js","assets/ocaml-BuP2SoBQ.js","assets/ocaml-D6dNsUd0.js","assets/org-BRAbLUOJ.js","assets/php-D9QpVhjP.js","assets/vb-3nVziYZS.js","assets/raku-BtFKomnU.js","assets/rust-DBZE5Si3.js","assets/scala-o2NiCLJc.js","assets/zig-B7sSDI6F.js","assets/xsl-Czhm44Ae.js","assets/perl-Ciba4h2-.js","assets/php-DBfnyu6d.js","assets/postcss-DkKB82OS.js","assets/powershell-Blb2ISmZ.js","assets/powershell-CItYMEtV.js","assets/pug-C_nSP9Mg.js","assets/pug-nGRwXpob.js","assets/python-C5TF47hQ.js","assets/qml-BxleM7bJ.js","assets/r-BXEss897.js","assets/raku-Cj6OV6qV.js","assets/razor-UAq-8THt.js","assets/regexp-wOX-4MEz.js","assets/rst-BCaXiUC4.js","assets/ruby-C4ARPOX3.js","assets/rust-Ch0zZBV0.js","assets/sas-BowjnAvi.js","assets/scala-CTTBu_35.js","assets/scss-D3wBkj3d.js","assets/sdbl-CyKdwm0B.js","assets/shaderlab-DY7g_Ava.js","assets/shellscript-CVTB3cr6.js","assets/shellsession-DDrivR0a.js","assets/soy-CUUUw2U6.js","assets/sparql-Dy5Sx-zJ.js","assets/turtle-CcN57yC0.js","assets/sql-CfM2IJm3.js","assets/stata-Dj4sbAEx.js","assets/stylus-y-ZXgJGq.js","assets/stylus-LiTfbrWi.js","assets/surrealql-NoXzmj18.js","assets/svelte-BaCIHHWd.js","assets/swift-CCLoYZtx.js","assets/swift-DQ24oLw9.js","assets/system-verilog-DFpyZzg3.js","assets/system-verilog-Dp2k_mze.js","assets/templ-BfgLc4ra.js","assets/tex-CNYz7bLJ.js","assets/ts-tags-DLz2GTd3.js","assets/tsx-CGosfAUg.js","assets/turtle-CQ9kcy0m.js","assets/twig-lMQ09cjh.js","assets/twig-HaHkB3PH.js","assets/typescript-Bb1J8qyy.js","assets/typst-DDNSzYFN.js","assets/verilog-kL8Dwv27.js","assets/vb-CP6Ec8nh.js","assets/verilog-1j7BQk-h.js","assets/vue-qH43U_rv.js","assets/vue-html-CGMs_6qn.js","assets/vue-vine-6XI2pIvQ.js","assets/xml-DuKfbPI6.js","assets/xsl-CW58cerL.js","assets/yaml-DDA_XMNu.js","assets/zig-cFafUZna.js","assets/edit-DUotSxjS.js","assets/rolldown-runtime-XKyaHtl9.js","assets/cloneFileDiffMetadata-CWfw01dG.js","assets/lru-DzKYIXMA.js"])))=>i.map(i=>d[i]);
2
- import{n as e}from"./rolldown-runtime-XKyaHtl9.js";import{r as t}from"./i18n-DxqFr2mi.js";import{t as n}from"./jsx-B4XNFIzB.js";import{t as r}from"./component-DWct-Tq6.js";import{s as i,u as a}from"./frame-D6XmK4Df.js";import{a as o,n as s}from"./on-mixin-iWnqUzq5.js";import{t as c}from"./create-element--E6NJ0nh.js";import{n as l}from"./attrs-mixin-CmlG_FtV.js";import{t as u}from"./preload-helper-BLdHbfdN.js";import{a as d,c as f,i as p,l as m,n as h,o as g,r as _,t as v}from"./loader-Q6-HPKft.js";import{$ as y,$n as b,A as x,B as S,Bn as C,C as w,Cn as T,Ct as E,D,Dn as O,E as k,En as A,F as j,Ft as M,G as N,Gn as P,H as F,Hn as ee,I as te,In as ne,It as I,J as L,Jn as R,K as re,L as ie,Ln as ae,Lt as oe,M as se,N as ce,Nt as z,O as le,On as ue,P as de,Q as fe,Qn as B,R as pe,Rn as me,Rt as he,S as ge,Sn as _e,St as ve,T as ye,Tn as be,Tt as V,U as xe,Un as Se,Ut as Ce,V as we,Vn as Te,Vt as Ee,W as De,Wn as Oe,Wt as ke,X as Ae,Xn as je,Y as Me,Yn as Ne,Z as Pe,Zn as Fe,_ as Ie,_n as Le,_t as Re,b as ze,c as Be,cn as Ve,ct as He,d as Ue,dn as We,dt as Ge,en as Ke,er as qe,et as Je,f as Ye,fn as Xe,ft as Ze,g as Qe,gn as $e,gt as et,h as tt,hn as nt,ht as H,i as rt,in as it,ir as at,j as ot,k as st,l as ct,lt,m as ut,mt as dt,n as ft,nr as pt,o as mt,ot as ht,p as gt,pn as _t,pt as vt,q as yt,qn as bt,qt as xt,rr as St,rt as Ct,s as wt,st as Tt,tr as Et,u as Dt,v as Ot,vn as kt,vt as At,w as U,wn as jt,wt as Mt,x as Nt,y as Pt,yt as Ft,z as It,zn as Lt,zt as Rt}from"./task-design-Avb2RO4w.js";import{$ as zt,A as Bt,B as Vt,C as Ht,D as Ut,E as Wt,F as Gt,G as Kt,H as qt,I as Jt,J as Yt,K as Xt,L as Zt,M as Qt,N as $t,O as en,P as tn,Q as nn,R as rn,T as an,U as on,V as sn,W as cn,X as ln,Y as un,Z as dn,a as fn,b as pn,et as mn,g as hn,j as gn,k as _n,m as vn,n as yn,nt as bn,o as xn,q as Sn,r as Cn,t as wn,tt as Tn,u as En,w as Dn,z as On}from"./cloneFileDiffMetadata-CWfw01dG.js";import{l as kn,n as An,o as jn}from"./method-DybmO5PB.js";var Mn=new Map,Nn=new Map,Pn=new Map,Fn=new Set;function In(e){for(let t of Array.isArray(e)?e:[e])if(t!==`text`&&t!==`ansi`&&!Fn.has(t))return!1;return!0}function Ln(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(Fn.has(n.name))continue;let e=Mn.get(n.name);e??(e=n,Mn.set(n.name,e));let r=e.data.find(t=>t.name===e.name||t.aliases?.includes(e.name)===!0);if(r==null)throw Error(`attachResolvedLanguages: No returned grammar declares "${e.name}" as its name or an alias.`);t.loadLanguageSync(e.data);try{t.getLanguage(e.name)}catch{throw Error(`attachResolvedLanguages: "${r.name}" is already loaded without alias "${e.name}". Load the alias first or give the grammar a unique name.`)}Fn.add(e.name)}}function Rn(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var zn=Object.defineProperty,Bn=Object.getOwnPropertyDescriptor,Vn=Object.getOwnPropertyNames,Hn=Object.prototype.hasOwnProperty,Un=(e,t)=>{let n={};for(var r in e)zn(n,r,{get:e[r],enumerable:!0});return t||zn(n,Symbol.toStringTag,{value:`Module`}),n},Wn=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Vn(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Hn.call(e,s)&&s!==n&&zn(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Bn(t,s))||r.enumerable});return e},Gn=(e,t,n)=>(Wn(e,t,`default`),n&&Wn(n,t,`default`)),Kn=[{id:`abap`,name:`ABAP`,import:(()=>u(()=>import(`./abap-CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>u(()=>import(`./actionscript-3-Cs6JJXT5.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>u(()=>import(`./ada-X3Y2mlq2.js`),[]))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>u(()=>import(`./ahk-DwADkxyd.js`),[]))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>u(()=>import(`./ahk2-_6rzW9BS.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>u(()=>import(`./angular-html-DOLkzBtu.js`),__vite__mapDeps([0,1,2,3,4])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>u(()=>import(`./angular-ts-DOMhGxLQ.js`),__vite__mapDeps([5,1,2,3,4,6])))},{id:`apache`,name:`Apache Conf`,import:(()=>u(()=>import(`./apache-U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>u(()=>import(`./apex-KFGFyKwG.js`),[]))},{id:`apl`,name:`APL`,import:(()=>u(()=>import(`./apl-Dio8Ke0X.js`),__vite__mapDeps([7,3,4,2,8,9,10])))},{id:`applescript`,name:`AppleScript`,import:(()=>u(()=>import(`./applescript-CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>u(()=>import(`./ara-4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>u(()=>import(`./asciidoc-SCjQUq34.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>u(()=>import(`./asm-Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>u(()=>import(`./astro-CN6YWUG3.js`),__vite__mapDeps([11,3,4,10,12,13,14])))},{id:`awk`,name:`AWK`,import:(()=>u(()=>import(`./awk-BWXHIvNe.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>u(()=>import(`./ballerina-B7ZEbQpA.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>u(()=>import(`./bat-C7sJWglS.js`),__vite__mapDeps([15,16])))},{id:`beancount`,name:`Beancount`,import:(()=>u(()=>import(`./beancount-C2IN4Vk8.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>u(()=>import(`./berry-DKpUyyne.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>u(()=>import(`./bibtex-DUQXB5kJ.js`),__vite__mapDeps([17,18])))},{id:`bicep`,name:`Bicep`,import:(()=>u(()=>import(`./bicep-CUHmPFLl.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>u(()=>import(`./bird2-CYIUgYqB.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>u(()=>import(`./blade-BrDpNfUX.js`),__vite__mapDeps([19,3,4,2,8,9,10,20,21])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>u(()=>import(`./bsl-gRq8cI6V.js`),__vite__mapDeps([22,23])))},{id:`c`,name:`C`,import:(()=>u(()=>import(`./c-Cz4nF6n_.js`),__vite__mapDeps([24,25])))},{id:`c3`,name:`C3`,import:(()=>u(()=>import(`./c3-D0apG41V.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>u(()=>import(`./cadence-CQ2zXKGN.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>u(()=>import(`./cairo-D66nqRlU.js`),__vite__mapDeps([26,27])))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>u(()=>import(`./chapel-C1sUNn9S.js`),__vite__mapDeps([28,25])))},{id:`clarity`,name:`Clarity`,import:(()=>u(()=>import(`./clarity-CtfBBspg.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>u(()=>import(`./clojure-CAE6QLVB.js`),__vite__mapDeps([29,30])))},{id:`cmake`,name:`CMake`,import:(()=>u(()=>import(`./cmake-Cpsd-0Y4.js`),__vite__mapDeps([31,32])))},{id:`cobol`,name:`COBOL`,import:(()=>u(()=>import(`./cobol-BvqUwMCV.js`),__vite__mapDeps([33,2,3,4,9])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>u(()=>import(`./codeowners-C8r90Shi.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>u(()=>import(`./codeql-oeQT6MSM.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>u(()=>import(`./coffee-NEqv5HL5.js`),__vite__mapDeps([34,35,3])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>u(()=>import(`./common-lisp-Cv5bFMCO.js`),[]))},{id:`coq`,name:`Rocq`,import:(()=>u(()=>import(`./coq-CGaSfhwR.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>u(()=>import(`./cpp-vothkh01.js`),__vite__mapDeps([36,37,38,39,25])))},{id:`crystal`,name:`Crystal`,import:(()=>u(()=>import(`./crystal-DEF7AEJQ.js`),__vite__mapDeps([40,3,4,2,21,25,41])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>u(()=>import(`./csharp-CFKDkFDZ.js`),__vite__mapDeps([42,43])))},{id:`css`,name:`CSS`,import:(()=>u(()=>import(`./css-DgaLhXQH.js`),__vite__mapDeps([44,4])))},{id:`csv`,name:`CSV`,import:(()=>u(()=>import(`./csv-k4CB9lhx.js`),__vite__mapDeps([45,46])))},{id:`cue`,name:`CUE`,import:(()=>u(()=>import(`./cue-CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>u(()=>import(`./cypher-ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>u(()=>import(`./d-qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>u(()=>import(`./dart-DjhkpiWP.js`),__vite__mapDeps([47,48])))},{id:`dax`,name:`DAX`,import:(()=>u(()=>import(`./dax-BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>u(()=>import(`./desktop-Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>u(()=>import(`./diff-eeGLjE2V.js`),__vite__mapDeps([49,50])))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>u(()=>import(`./docker-D0LTq72f.js`),__vite__mapDeps([51,52])))},{id:`dotenv`,name:`dotEnv`,import:(()=>u(()=>import(`./dotenv-CuH5my32.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>u(()=>import(`./dream-maker-DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>u(()=>import(`./edge-B_SBzXGF.js`),__vite__mapDeps([53,2,3,4,12,20])))},{id:`elixir`,name:`Elixir`,import:(()=>u(()=>import(`./elixir-BN3BkYei.js`),__vite__mapDeps([54,55,2,3,4])))},{id:`elm`,name:`Elm`,import:(()=>u(()=>import(`./elm-CC1TmzeR.js`),__vite__mapDeps([56,39,25])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>u(()=>import(`./emacs-lisp-DR2vtWaj.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>u(()=>import(`./erb-BjlLGk-_.js`),__vite__mapDeps([57,2,3,4,58,8,9,21,25,37,38,39,41,59,60,12,14,61,62,63])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>u(()=>import(`./erlang-ir39Pet8.js`),__vite__mapDeps([64,65,66])))},{id:`fennel`,name:`Fennel`,import:(()=>u(()=>import(`./fennel-DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>u(()=>import(`./fish-BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>u(()=>import(`./fluent-C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>u(()=>import(`./fortran-fixed-form-1cK5gXa1.js`),__vite__mapDeps([67,68])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>u(()=>import(`./fortran-free-form-C5q_0aPq.js`),__vite__mapDeps([69,68])))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>u(()=>import(`./fsharp-SO2Zcqp5.js`),__vite__mapDeps([70,71,66])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>u(()=>import(`./gdresource-LxjHb83i.js`),__vite__mapDeps([72,73,74])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>u(()=>import(`./gdscript-CJEqcM-5.js`),__vite__mapDeps([75,74])))},{id:`gdshader`,name:`GDShader`,import:(()=>u(()=>import(`./gdshader-BNp4G147.js`),__vite__mapDeps([76,73])))},{id:`genie`,name:`Genie`,import:(()=>u(()=>import(`./genie-CV2tkWYe.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>u(()=>import(`./gherkin-DExj1W_8.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>u(()=>import(`./git-commit-DaNUDv1O.js`),__vite__mapDeps([77,78,50])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>u(()=>import(`./git-rebase-qxk4jQ_Z.js`),__vite__mapDeps([79,80,41])))},{id:`gleam`,name:`Gleam`,import:(()=>u(()=>import(`./gleam-CSRkHgEL.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>u(()=>import(`./glimmer-js-CIdbWayl.js`),__vite__mapDeps([81,3,4,2,12])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>u(()=>import(`./glimmer-ts-B16xCo2k.js`),__vite__mapDeps([82,3,4,2,12])))},{id:`glsl`,name:`GLSL`,import:(()=>u(()=>import(`./glsl-D01ELkOo.js`),__vite__mapDeps([83,39,25])))},{id:`gn`,name:`GN`,import:(()=>u(()=>import(`./gn-CAXYAgV-.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>u(()=>import(`./gnuplot-7GGW24-e.js`),[]))},{id:`go`,name:`Go`,import:(()=>u(()=>import(`./go-CC6EVc1J.js`),__vite__mapDeps([84,85])))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>u(()=>import(`./graphql-BZEhxNwM.js`),__vite__mapDeps([86,60,3,12,14,61])))},{id:`groovy`,name:`Groovy`,import:(()=>u(()=>import(`./groovy-_MokPXAr.js`),__vite__mapDeps([87,88])))},{id:`hack`,name:`Hack`,import:(()=>u(()=>import(`./hack-C30D-q0p.js`),__vite__mapDeps([89,2,3,4,21])))},{id:`haml`,name:`Ruby Haml`,import:(()=>u(()=>import(`./haml-BU6KMePS.js`),__vite__mapDeps([90,59,3,4])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>u(()=>import(`./handlebars-WZCg7K7Q.js`),__vite__mapDeps([91,92,3,4,2,63])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>u(()=>import(`./haskell-D8IpX4py.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>u(()=>import(`./haxe-B0BMDyun.js`),__vite__mapDeps([93,94])))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>u(()=>import(`./hcl-Dh228itO.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>u(()=>import(`./hjson-CxZEssPk.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>u(()=>import(`./hlsl-DQJgUA8P.js`),__vite__mapDeps([95,96])))},{id:`html`,name:`HTML`,import:(()=>u(()=>import(`./html-BCy9P6D2.js`),__vite__mapDeps([97,2,3,4])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>u(()=>import(`./html-derivative-ekTk9Unt.js`),__vite__mapDeps([98,20,2,3,4])))},{id:`http`,name:`HTTP`,import:(()=>u(()=>import(`./http-BjrBtiM6.js`),__vite__mapDeps([99,8,9,10,41,60,3,12,14,61])))},{id:`hurl`,name:`Hurl`,import:(()=>u(()=>import(`./hurl-B4P9s9G3.js`),__vite__mapDeps([100,8,9,46,60,3,12,14,61])))},{id:`hxml`,name:`HXML`,import:(()=>u(()=>import(`./hxml-DPF7XkXa.js`),__vite__mapDeps([101,94])))},{id:`hy`,name:`Hy`,import:(()=>u(()=>import(`./hy-CZbG8q4J.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>u(()=>import(`./imba-DsUTQ-LC.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>u(()=>import(`./ini-DiZ1IqbV.js`),__vite__mapDeps([102,103])))},{id:`java`,name:`Java`,import:(()=>u(()=>import(`./java-_ATy9zCa.js`),__vite__mapDeps([104,9])))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>u(()=>import(`./javascript-CpIGwZ_Y.js`),__vite__mapDeps([105,3])))},{id:`jinja`,name:`Jinja`,import:(()=>u(()=>import(`./jinja-dRcm23Ea.js`),__vite__mapDeps([106,2,3,4])))},{id:`jison`,name:`Jison`,import:(()=>u(()=>import(`./jison-D3aJooqo.js`),__vite__mapDeps([107,3])))},{id:`json`,name:`JSON`,import:(()=>u(()=>import(`./json-C3WlssX3.js`),__vite__mapDeps([108,10])))},{id:`json5`,name:`JSON5`,import:(()=>u(()=>import(`./json5-BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>u(()=>import(`./jsonc-BzJ54Uh_.js`),__vite__mapDeps([109,110])))},{id:`jsonl`,name:`JSON Lines`,import:(()=>u(()=>import(`./jsonl-CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>u(()=>import(`./jsonnet-CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>u(()=>import(`./jssm-DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>u(()=>import(`./jsx-C4yDKi0A.js`),__vite__mapDeps([111,61])))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>u(()=>import(`./julia-C8a5hZkp.js`),__vite__mapDeps([112,113,3,21,27,37,38,39,25,114])))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>u(()=>import(`./just-CP_wDfXI.js`),__vite__mapDeps([115,3,12,27,41,58,4,2,8,9,21,25,37,38,39,59,60,14,61,62,63,116])))},{id:`kdl`,name:`KDL`,import:(()=>u(()=>import(`./kdl-CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>u(()=>import(`./kotlin-DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>u(()=>import(`./kusto-C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>u(()=>import(`./latex-Bn9nYtub.js`),__vite__mapDeps([117,118,119,114])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>u(()=>import(`./lean-CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>u(()=>import(`./less-CXhFgJ4v.js`),__vite__mapDeps([120,121])))},{id:`liquid`,name:`Liquid`,import:(()=>u(()=>import(`./liquid-CQNtsgCr.js`),__vite__mapDeps([122,3,4,2,10])))},{id:`llvm`,name:`LLVM IR`,import:(()=>u(()=>import(`./llvm-DqHOMS-s.js`),[]))},{id:`log`,name:`Log file`,import:(()=>u(()=>import(`./log-Bu1ZtrH6.js`),__vite__mapDeps([123,124])))},{id:`logo`,name:`Logo`,import:(()=>u(()=>import(`./logo-Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>u(()=>import(`./lua-fPRBWD-V.js`),__vite__mapDeps([125,62,25])))},{id:`luau`,name:`Luau`,import:(()=>u(()=>import(`./luau-VGWVLoqX.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>u(()=>import(`./make-B54cR2A1.js`),__vite__mapDeps([126,127])))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>u(()=>import(`./markdown-CjQmuOi1.js`),__vite__mapDeps([128,66])))},{id:`marko`,name:`Marko`,import:(()=>u(()=>import(`./marko-DPS0EkZ1.js`),__vite__mapDeps([129,4,6,12,121])))},{id:`matlab`,name:`MATLAB`,import:(()=>u(()=>import(`./matlab-D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>u(()=>import(`./mdc-C6srEd4p.js`),__vite__mapDeps([130,20,2,3,4,63,66])))},{id:`mdx`,name:`MDX`,import:(()=>u(()=>import(`./mdx-DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>u(()=>import(`./mermaid-BxpfTIzt.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>u(()=>import(`./mipsasm-BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>u(()=>import(`./mojo-fg40_ntQ.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>u(()=>import(`./moonbit-D9W784E_.js`),[]))},{id:`move`,name:`Move`,import:(()=>u(()=>import(`./move-BYnGhZoM.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>u(()=>import(`./narrat-_X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>u(()=>import(`./nextflow-uA5IJerx.js`),__vite__mapDeps([131,132])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>u(()=>import(`./nextflow-groovy-D5vAge1Z.js`),__vite__mapDeps([133,132])))},{id:`nginx`,name:`Nginx`,import:(()=>u(()=>import(`./nginx-BxRBJ-Af.js`),__vite__mapDeps([134,62,25])))},{id:`nim`,name:`Nim`,import:(()=>u(()=>import(`./nim-DN3EGtL-.js`),__vite__mapDeps([135,136,3,4,2,8,9,25,39,66])))},{id:`nix`,name:`Nix`,import:(()=>u(()=>import(`./nix-IvuFDN5E.js`),[]))},{id:`nsis`,name:`NSIS`,import:(()=>u(()=>import(`./nsis-CjNLYCLg.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>u(()=>import(`./nushell--0fT3PI1.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>u(()=>import(`./objective-c-CsonrGpd.js`),__vite__mapDeps([137,138])))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>u(()=>import(`./objective-cpp-BsSzOQcm.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>u(()=>import(`./ocaml-BuP2SoBQ.js`),__vite__mapDeps([139,140])))},{id:`odin`,name:`Odin`,import:(()=>u(()=>import(`./odin-B1RWQWA5.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>u(()=>import(`./openscad-BUDT5pXO.js`),[]))},{id:`org`,name:`Org Markup`,import:(()=>u(()=>import(`./org-BRAbLUOJ.js`),__vite__mapDeps([141,3,4,2,6,9,8,10,12,14,21,25,27,30,35,38,37,39,41,43,48,50,52,55,62,63,58,59,60,61,66,65,78,80,85,88,103,114,116,118,119,121,127,136,138,140,142,143,144,145,146,147,148])))},{id:`pascal`,name:`Pascal`,import:(()=>u(()=>import(`./pascal-4ZHwLPI5.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>u(()=>import(`./perl-Ciba4h2-.js`),__vite__mapDeps([149,116,3,4,2,8,9,21])))},{id:`php`,name:`PHP`,import:(()=>u(()=>import(`./php-DBfnyu6d.js`),__vite__mapDeps([150,142,3,4,2,8,9,10,21])))},{id:`pkl`,name:`Pkl`,import:(()=>u(()=>import(`./pkl-ot-7Btpt.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>u(()=>import(`./plsql-DGHpHOYJ.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>u(()=>import(`./po-BiJDBrnU.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>u(()=>import(`./polar-C7UOKdEL.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>u(()=>import(`./postcss-DkKB82OS.js`),__vite__mapDeps([151,13])))},{id:`powerquery`,name:`PowerQuery`,import:(()=>u(()=>import(`./powerquery-DNMTfnFr.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>u(()=>import(`./powershell-Blb2ISmZ.js`),__vite__mapDeps([152,153])))},{id:`prisma`,name:`Prisma`,import:(()=>u(()=>import(`./prisma-DMgNhnYS.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>u(()=>import(`./prolog-iXnhIJG7.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>u(()=>import(`./proto-DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>u(()=>import(`./pug-C_nSP9Mg.js`),__vite__mapDeps([154,155,3,4,2])))},{id:`puppet`,name:`Puppet`,import:(()=>u(()=>import(`./puppet-CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>u(()=>import(`./purescript-9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>u(()=>import(`./python-C5TF47hQ.js`),__vite__mapDeps([156,27])))},{id:`qml`,name:`QML`,import:(()=>u(()=>import(`./qml-BxleM7bJ.js`),__vite__mapDeps([157,3])))},{id:`qmldir`,name:`QML Directory`,import:(()=>u(()=>import(`./qmldir-DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>u(()=>import(`./qss-Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>u(()=>import(`./r-BXEss897.js`),__vite__mapDeps([158,114])))},{id:`racket`,name:`Racket`,import:(()=>u(()=>import(`./racket-DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>u(()=>import(`./raku-Cj6OV6qV.js`),__vite__mapDeps([159,144])))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>u(()=>import(`./razor-UAq-8THt.js`),__vite__mapDeps([160,2,3,4,43])))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>u(()=>import(`./rbs-C0MpOrj4.js`),[]))},{id:`reg`,name:`Windows Registry Script`,import:(()=>u(()=>import(`./reg-CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>u(()=>import(`./regexp-wOX-4MEz.js`),__vite__mapDeps([161,38])))},{id:`rel`,name:`Rel`,import:(()=>u(()=>import(`./rel-BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>u(()=>import(`./riscv-Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>u(()=>import(`./ron-VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>u(()=>import(`./rosmsg-CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>u(()=>import(`./rst-BCaXiUC4.js`),__vite__mapDeps([162,3,20,2,4,27,32,37,38,39,25,41,63,58,8,9,21,59,60,12,14,61,62])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>u(()=>import(`./ruby-C4ARPOX3.js`),__vite__mapDeps([163,58,3,4,2,8,9,21,25,37,38,39,41,59,60,12,14,61,62,63])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>u(()=>import(`./rust-Ch0zZBV0.js`),__vite__mapDeps([164,145])))},{id:`sas`,name:`SAS`,import:(()=>u(()=>import(`./sas-BowjnAvi.js`),__vite__mapDeps([165,21])))},{id:`sass`,name:`Sass`,import:(()=>u(()=>import(`./sass-DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>u(()=>import(`./scala-CTTBu_35.js`),__vite__mapDeps([166,146])))},{id:`scheme`,name:`Scheme`,import:(()=>u(()=>import(`./scheme-DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>u(()=>import(`./scss-D3wBkj3d.js`),__vite__mapDeps([167,6,4])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>u(()=>import(`./sdbl-CyKdwm0B.js`),__vite__mapDeps([168,23])))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>u(()=>import(`./shaderlab-DY7g_Ava.js`),__vite__mapDeps([169,96])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>u(()=>import(`./shellscript-CVTB3cr6.js`),__vite__mapDeps([170,41])))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>u(()=>import(`./shellsession-DDrivR0a.js`),__vite__mapDeps([171,41])))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>u(()=>import(`./smalltalk-BHpQb5nM.js`),[]))},{id:`smithy`,name:`Smithy`,import:(()=>u(()=>import(`./smithy-Dgaz7aur.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>u(()=>import(`./solidity-Bj7E1mRn.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>u(()=>import(`./soy-CUUUw2U6.js`),__vite__mapDeps([172,2,3,4])))},{id:`sparql`,name:`SPARQL`,import:(()=>u(()=>import(`./sparql-Dy5Sx-zJ.js`),__vite__mapDeps([173,174])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>u(()=>import(`./splunk-BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>u(()=>import(`./sql-CfM2IJm3.js`),__vite__mapDeps([175,21])))},{id:`ssh-config`,name:`SSH Config`,import:(()=>u(()=>import(`./ssh-config-BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>u(()=>import(`./stata-Dj4sbAEx.js`),__vite__mapDeps([176,21])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>u(()=>import(`./stylus-y-ZXgJGq.js`),__vite__mapDeps([177,178])))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>u(()=>import(`./surrealql-NoXzmj18.js`),__vite__mapDeps([179,3])))},{id:`svelte`,name:`Svelte`,import:(()=>u(()=>import(`./svelte-BaCIHHWd.js`),__vite__mapDeps([180,3,4,12,13])))},{id:`swift`,name:`Swift`,import:(()=>u(()=>import(`./swift-CCLoYZtx.js`),__vite__mapDeps([181,182])))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>u(()=>import(`./system-verilog-DFpyZzg3.js`),__vite__mapDeps([183,184])))},{id:`systemd`,name:`Systemd Units`,import:(()=>u(()=>import(`./systemd-BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>u(()=>import(`./talonscript-CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>u(()=>import(`./tasl-DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>u(()=>import(`./tcl-CZd0xW_V.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>u(()=>import(`./templ-BfgLc4ra.js`),__vite__mapDeps([185,3,4,85])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>u(()=>import(`./terraform-DswuEJGm.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>u(()=>import(`./tex-CNYz7bLJ.js`),__vite__mapDeps([186,119,114])))},{id:`toml`,name:`TOML`,import:(()=>u(()=>import(`./toml-CcmNWLt0.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>u(()=>import(`./ts-tags-DLz2GTd3.js`),__vite__mapDeps([187,3,4,2,8,9,12,21,39,25])))},{id:`tsv`,name:`TSV`,import:(()=>u(()=>import(`./tsv-sltzmVWM.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>u(()=>import(`./tsx-CGosfAUg.js`),__vite__mapDeps([188,14])))},{id:`turtle`,name:`Turtle`,import:(()=>u(()=>import(`./turtle-CQ9kcy0m.js`),__vite__mapDeps([189,174])))},{id:`twig`,name:`Twig`,import:(()=>u(()=>import(`./twig-lMQ09cjh.js`),__vite__mapDeps([190,191,3,4,6,27,58,2,8,9,21,25,37,38,39,41,59,60,12,14,61,62,63,142,10])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>u(()=>import(`./typescript-Bb1J8qyy.js`),__vite__mapDeps([192,12])))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>u(()=>import(`./typespec-BGhR2SqG.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>u(()=>import(`./typst-DDNSzYFN.js`),__vite__mapDeps([193,3,4,2,6,9,8,10,12,14,16,18,21,25,27,30,35,38,37,39,41,43,48,50,52,55,62,63,58,59,60,61,66,65,71,78,80,85,88,92,103,110,114,113,116,118,119,121,124,127,138,142,143,144,145,146,148,153,155,182,184,191,194])))},{id:`v`,name:`V`,import:(()=>u(()=>import(`./v-DBj4K9d_.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>u(()=>import(`./vala-zf12oZj6.js`),[]))},{id:`vb`,name:`Visual Basic`,import:(()=>u(()=>import(`./vb-CP6Ec8nh.js`),__vite__mapDeps([195,143])))},{id:`verilog`,name:`Verilog`,import:(()=>u(()=>import(`./verilog-1j7BQk-h.js`),__vite__mapDeps([196,194])))},{id:`vhdl`,name:`VHDL`,import:(()=>u(()=>import(`./vhdl-BroJfC0k.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>u(()=>import(`./viml-DvXPmvsu.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>u(()=>import(`./vue-qH43U_rv.js`),__vite__mapDeps([197,3,4,2,10,12,20])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>u(()=>import(`./vue-html-CGMs_6qn.js`),__vite__mapDeps([198,3])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>u(()=>import(`./vue-vine-6XI2pIvQ.js`),__vite__mapDeps([199,3,4,6,13,121,178])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>u(()=>import(`./vyper-CgoNMtux.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>u(()=>import(`./wasm-ByWQv1Qj.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>u(()=>import(`./wenyan-C8pVoKbM.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>u(()=>import(`./wgsl-BsKzXJz4.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>u(()=>import(`./wikitext-ClFFjSW2.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>u(()=>import(`./wit-DdvCle-K.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>u(()=>import(`./wolfram-DLL8P-h_.js`),[]))},{id:`xml`,name:`XML`,import:(()=>u(()=>import(`./xml-DuKfbPI6.js`),__vite__mapDeps([200,8,9])))},{id:`xsl`,name:`XSL`,import:(()=>u(()=>import(`./xsl-CW58cerL.js`),__vite__mapDeps([201,148,8,9])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>u(()=>import(`./yaml-DDA_XMNu.js`),__vite__mapDeps([202,63])))},{id:`zenscript`,name:`ZenScript`,import:(()=>u(()=>import(`./zenscript-BnlCZFoB.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>u(()=>import(`./zig-cFafUZna.js`),__vite__mapDeps([203,147])))}],qn=Object.fromEntries(Kn.map(e=>[e.id,e.import])),Jn=Object.fromEntries(Kn.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Yn={...qn,...Jn},Xn=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>u(()=>import(`./andromeeda-vGVdxbeo.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>u(()=>import(`./aurora-x-CDeNXAV0.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>u(()=>import(`./ayu-dark-DluEY0Gj.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>u(()=>import(`./ayu-light-C3h-C4tm.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>u(()=>import(`./ayu-mirage-Bqwy1Gya.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>u(()=>import(`./catppuccin-frappe-C9Q5zVZY.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>u(()=>import(`./catppuccin-latte-CtsyrtPq.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>u(()=>import(`./catppuccin-macchiato-R8nAf1vR.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>u(()=>import(`./catppuccin-mocha-DjuaAJKi.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>u(()=>import(`./dark-plus-Cs2F2srj.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>u(()=>import(`./dracula-BHWKrbxM.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>u(()=>import(`./dracula-soft-5eyTD99u.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>u(()=>import(`./everforest-dark-sB-x3p7T.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>u(()=>import(`./everforest-light-Df2xbC6M.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>u(()=>import(`./github-dark-C-LZuMrd.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>u(()=>import(`./github-dark-default-DXG-b-1a.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>u(()=>import(`./github-dark-dimmed-Bx1FflLF.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>u(()=>import(`./github-dark-high-contrast-B_tTalzw.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>u(()=>import(`./github-light-EUqPIrTm.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>u(()=>import(`./github-light-default-BXViO-2h.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>u(()=>import(`./github-light-high-contrast-B68TUdTA.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>u(()=>import(`./gruvbox-dark-hard-C820rvS2.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>u(()=>import(`./gruvbox-dark-medium-BPjhmG05.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>u(()=>import(`./gruvbox-dark-soft-MrdJrrXF.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>u(()=>import(`./gruvbox-light-hard-BC_s9l72.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>u(()=>import(`./gruvbox-light-medium-BAWPOn9u.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>u(()=>import(`./gruvbox-light-soft-BSMLrYjP.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>u(()=>import(`./horizon-CE9ld1lL.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>u(()=>import(`./horizon-bright-DSNQnXHK.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>u(()=>import(`./houston-CsvMBhTu.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>u(()=>import(`./kanagawa-dragon-Bozd7klA.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>u(()=>import(`./kanagawa-lotus-BmuOG9ZW.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>u(()=>import(`./kanagawa-wave-BML5mF2J.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>u(()=>import(`./laserwave-C_8bwKvT.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>u(()=>import(`./light-plus-DVQuIRkW.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>u(()=>import(`./material-theme-Bm3Qr25_.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>u(()=>import(`./material-theme-darker-2IIEA8gg.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>u(()=>import(`./material-theme-lighter-uhdI0v04.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>u(()=>import(`./material-theme-ocean-CHQ94UKr.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>u(()=>import(`./material-theme-palenight-B5W6OYN7.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>u(()=>import(`./min-dark-BSWPekZh.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>u(()=>import(`./min-light-DDpmG2fV.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>u(()=>import(`./monokai-BscAjiQZ.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>u(()=>import(`./night-owl-DhmEMT88.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>u(()=>import(`./night-owl-light-eJ-hLW7d.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>u(()=>import(`./nord-Cb4Vim4T.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>u(()=>import(`./one-dark-pro-C6YyR8OD.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>u(()=>import(`./one-light-D7Lr4KcI.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>u(()=>import(`./plastic-DQwYfKfQ.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>u(()=>import(`./poimandres-DRFjx7u4.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>u(()=>import(`./red-CYlAq2b0.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>u(()=>import(`./rose-pine-aMsaMD1D.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>u(()=>import(`./rose-pine-dawn-8PwUyIlP.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>u(()=>import(`./rose-pine-moon-DO-qXg-I.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>u(()=>import(`./slack-dark-DnToyrRv.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>u(()=>import(`./slack-ochin-B2OO5cIa.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>u(()=>import(`./snazzy-light-4G7pJPwS.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>u(()=>import(`./solarized-dark-b97czJOk.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>u(()=>import(`./solarized-light-DFPxpIYQ.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>u(()=>import(`./synthwave-84-nFMaYfgc.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>u(()=>import(`./tokyo-night-oM2G3aXe.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>u(()=>import(`./vesper-DdrHHSXu.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>u(()=>import(`./vitesse-black-fwtXNY1n.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>u(()=>import(`./vitesse-dark-BZCL-v6S.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>u(()=>import(`./vitesse-light-VbXTXTou.js`),[]))}].map(e=>[e.id,e.import])),Zn=e({createOnigurumaEngine:()=>Tr,getDefaultWasmLoader:()=>wr,loadWasm:()=>vr,setDefaultWasmLoader:()=>Cr}),Qn=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function $n(){return 2147483648}function er(){return typeof performance<`u`?performance.now():Date.now()}var tr=(e,t)=>e+(t-e%t)%t;async function nr(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=$n();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,tr(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:er,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var rr=Object.defineProperty,ir=(e,t,n)=>t in e?rr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ar=(e,t,n)=>ir(e,typeof t==`symbol`?t:t+``,n),or=null;function sr(e){throw new Qn(e.UTF8ToString(e.getLastOnigError()))}var cr=class e{constructor(t){ar(this,`utf16Length`),ar(this,`utf8Length`),ar(this,`utf16Value`),ar(this,`utf8Value`),ar(this,`utf16OffsetToUtf8`),ar(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},lr=class e{constructor(t){if(ar(this,`id`,++e.LAST_ID),ar(this,`_onigBinding`),ar(this,`content`),ar(this,`utf16Length`),ar(this,`utf8Length`),ar(this,`utf16OffsetToUtf8`),ar(this,`utf8OffsetToUtf16`),ar(this,`ptr`),!or)throw new Qn(`Must invoke loadWasm first.`);this._onigBinding=or,this.content=t;let n=new cr(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=or.omalloc(1e4),e._sharedPtrInUse=!0,or.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(or)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};ar(lr,`LAST_ID`,0),ar(lr,`_sharedPtr`,0),ar(lr,`_sharedPtrInUse`,!1);var ur=lr,dr=class{constructor(e){if(ar(this,`_onigBinding`),ar(this,`_ptr`),!or)throw new Qn(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new cr(e[r]);t[r]=i.createString(or),n[r]=i.utf8Length}let r=or.omalloc(4*e.length);or.HEAPU32.set(t,r/4);let i=or.omalloc(4*e.length);or.HEAPU32.set(n,i/4);let a=or.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)or.ofree(t[n]);or.ofree(i),or.ofree(r),a===0&&sr(or),this._onigBinding=or,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new ur(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function fr(e){return typeof e.instantiator==`function`}function pr(e){return typeof e.default==`function`}function mr(e){return e.data!==void 0}function hr(e){return typeof Response<`u`&&e instanceof Response}function gr(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var _r;function vr(e){if(_r)return _r;async function t(){or=await nr(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),fr(n)?n=await n.instantiator(t):pr(n)?n=await n.default(t):(mr(n)&&(n=n.data),hr(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await br(n)(t):await xr(n)(t):gr(n)||n instanceof WebAssembly.Module?n=await yr(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await yr(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return _r=t(),_r}function yr(e){return t=>WebAssembly.instantiate(e,t)}function br(e){return t=>WebAssembly.instantiateStreaming(e,t)}function xr(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var Sr;function Cr(e){Sr=e}function wr(){return Sr}async function Tr(e){return e&&await vr(e),{createScanner(e){return new dr(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new ur(e)}}}var Er=Un({});Gn(Er,Zn);var Dr=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Or(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function kr(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Ar(e){return Array.isArray(e)?e:[e]}async function jr(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function Mr(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function Nr(e){return e===`ansi`||Mr(e)}function Pr(e){return e===`none`}function Fr(e){return Pr(e)}var Ir=/(\r?\n)/g;function Lr(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(Ir),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var Rr={light:`#333333`,dark:`#bbbbbb`},zr={light:`#fffffe`,dark:`#1e1e1e`},Br=`__shiki_resolved`;function Vr(e){if(e?.[Br])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?Rr.light:Rr.dark,n||=t.type===`light`?zr.light:zr.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,Br,{enumerable:!1,writable:!1,value:!0}),t}async function Hr(e){return[...new Set((await Promise.all(e.filter(e=>!Nr(e)).map(async e=>await jr(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function Ur(e){return(await Promise.all(e.map(async e=>Fr(e)?null:Vr(await jr(e))))).filter(e=>!!e)}function Wr(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new Dr(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var Gr=class extends Bt{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=Vr(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=gn.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Wr(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._syncRegistry?._grammars?.get(e.scopeName)?.dispose(),this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new Dr(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},Kr=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).includes(e.scopeName)||this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},qr=0;function Jr(e){qr+=1,e.warnings!==!1&&qr>=10&&qr%10==0&&console.warn(`[Shiki] ${qr} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new Dr("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Vr),i=new Gr(new Kr(e.engine,n),r,n,e.langAlias),a;function o(t){return Wr(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new Dr(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new Dr(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await Hr(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await Ur(e))}function g(){if(t)throw new Dr(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--qr)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function Yr(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([Ur(e.themes||[]),Hr(e.langs||[]),e.engine]);return Jr({...e,themes:t,langs:n,engine:r})}var Xr=new WeakMap;function Zr(e,t){Xr.set(e,t)}function Qr(e){return Xr.get(e)}var $r=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(Ar(n).map(e=>[e,_n])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return ei(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function ei(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function ti(e,t){if(!(e instanceof $r))throw new Dr(`Invalid grammar state`);return e.getInternalStack(t)}var ni=/,/,ri=/ /;function ii(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(Mr(e.resolveLangAlias(n.lang||`text`))||Pr(r))return Lr(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new Dr(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new Dr(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return oi(t,o,i,a,n)}function ai(...e){if(e.length===2)return Qr(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(Mr(i)||Pr(a))throw new Dr(`Plain language does not have grammar state`);if(i===`ansi`)throw new Dr(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new $r(si(n,c,o,s,r).stateStack,c.name,o.name)}function oi(e,t,n,r,i){let a=si(e,t,n,r,i),o=new $r(a.stateStack,t.name,n.name);return Zr(a.tokens,o),a.tokens}function si(e,t,n,r,i){let a=Or(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500,includeExplanation:c=!1}=i,l=Lr(e),u=i.grammarState?ti(i.grammarState,n.name)??_n:i.grammarContextCode==null?_n:si(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,d=[],f=[];for(let e=0,i=l.length;e<i;e++){let[i,p]=l[e];if(i===``){d=[],f.push([]);continue}if(o>0&&i.length>=o){d=[],f.push([{content:i,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;c&&c!==`tokenType`&&(m=t.tokenizeLine(i,u,s),h=m.tokens,g=0);let _=t.tokenizeLine2(i,u,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:i.length;if(t===o)continue;let s=_.tokens[2*e+1],l=kr(r[Ut.getForeground(s)],a),u=Ut.getFontStyle(s),f={content:i.substring(t,o),offset:p+t,color:l,fontStyle:u};if(c===`tokenType`)f.type=Ut.getTokenType(s);else if(c){let e=[];if(c!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(ni).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(ri))})}f.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=i.substring(t.startIndex,t.endIndex);r+=n.length,f.explanation.push({content:n,scopes:c===`scopeName`?ci(t.scopes):li(e,t.scopes)}),g+=1}}d.push(f)}f.push(d),d=[],u=_.ruleStack}return{tokens:f,stateStack:u}}function ci(e){return e.map(e=>({scopeName:e}))}function li(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:fi(e,i,t.slice(0,r))}}return n}function ui(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function di(e,t,n){if(!ui(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)ui(e[r],n[i])&&--r,--i;return r===-1}function fi(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(di(e,t,n)){r.push(a);break}return r}function pi(e,t,n,r=ii){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:Qr(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=mi(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new $r(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&Zr(s,c),s}function mi(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var hi=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],gi=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};gi.prototype.normal={},gi.prototype.property={},gi.prototype.space=void 0;function _i(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new gi(n,r,t)}function vi(e){return e.toLowerCase()}var yi=class{constructor(e,t){this.attribute=t,this.property=e}};yi.prototype.attribute=``,yi.prototype.booleanish=!1,yi.prototype.boolean=!1,yi.prototype.commaOrSpaceSeparated=!1,yi.prototype.commaSeparated=!1,yi.prototype.defined=!1,yi.prototype.mustUseProperty=!1,yi.prototype.number=!1,yi.prototype.overloadedBoolean=!1,yi.prototype.property=``,yi.prototype.spaceSeparated=!1,yi.prototype.space=void 0;var bi=e({boolean:()=>W,booleanish:()=>Si,commaOrSpaceSeparated:()=>Ei,commaSeparated:()=>Ti,number:()=>G,overloadedBoolean:()=>Ci,spaceSeparated:()=>wi}),xi=0,W=Di(),Si=Di(),Ci=Di(),G=Di(),wi=Di(),Ti=Di(),Ei=Di();function Di(){return 2**++xi}var Oi=Object.keys(bi),ki=class extends yi{constructor(e,t,n,r){let i=-1;if(super(e,t),Ai(this,`space`,r),typeof n==`number`)for(;++i<Oi.length;){let e=Oi[i];Ai(this,Oi[i],(n&bi[e])===bi[e])}}};ki.prototype.defined=!0;function Ai(e,t,n){n&&(e[t]=n)}function ji(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new ki(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[vi(r)]=r,n[vi(a.attribute)]=r}return new gi(t,n,e.space)}var Mi=ji({properties:{ariaActiveDescendant:null,ariaAtomic:Si,ariaAutoComplete:null,ariaBusy:Si,ariaChecked:Si,ariaColCount:G,ariaColIndex:G,ariaColSpan:G,ariaControls:wi,ariaCurrent:null,ariaDescribedBy:wi,ariaDetails:null,ariaDisabled:Si,ariaDropEffect:wi,ariaErrorMessage:null,ariaExpanded:Si,ariaFlowTo:wi,ariaGrabbed:Si,ariaHasPopup:null,ariaHidden:Si,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:wi,ariaLevel:G,ariaLive:null,ariaModal:Si,ariaMultiLine:Si,ariaMultiSelectable:Si,ariaOrientation:null,ariaOwns:wi,ariaPlaceholder:null,ariaPosInSet:G,ariaPressed:Si,ariaReadOnly:Si,ariaRelevant:null,ariaRequired:Si,ariaRoleDescription:wi,ariaRowCount:G,ariaRowIndex:G,ariaRowSpan:G,ariaSelected:Si,ariaSetSize:G,ariaSort:null,ariaValueMax:G,ariaValueMin:G,ariaValueNow:G,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Ni(e,t){return t in e?e[t]:t}function Pi(e,t){return Ni(e,t.toLowerCase())}var Fi=ji({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Ti,acceptCharset:wi,accessKey:wi,action:null,allow:null,allowFullScreen:W,allowPaymentRequest:W,allowUserMedia:W,alpha:W,alt:null,as:null,async:W,autoCapitalize:null,autoComplete:wi,autoFocus:W,autoPlay:W,blocking:wi,capture:null,charSet:null,checked:W,cite:null,className:wi,closedBy:null,colorSpace:null,cols:G,colSpan:G,command:null,commandFor:null,content:null,contentEditable:Si,controls:W,controlsList:wi,coords:G|Ti,crossOrigin:null,data:null,dateTime:null,decoding:null,default:W,defer:W,dir:null,dirName:null,disabled:W,download:Ci,draggable:Si,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:W,formTarget:null,headers:wi,height:G,hidden:Ci,high:G,href:null,hrefLang:null,htmlFor:wi,httpEquiv:wi,id:null,imageSizes:null,imageSrcSet:null,inert:W,inputMode:null,integrity:null,is:null,isMap:W,itemId:null,itemProp:wi,itemRef:wi,itemScope:W,itemType:wi,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:W,low:G,manifest:null,max:null,maxLength:G,media:null,method:null,min:null,minLength:G,multiple:W,muted:W,name:null,nonce:null,noModule:W,noValidate:W,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:W,optimum:G,pattern:null,ping:wi,placeholder:null,playsInline:W,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:W,referrerPolicy:null,rel:wi,required:W,reversed:W,rows:G,rowSpan:G,sandbox:wi,scope:null,scoped:W,seamless:W,selected:W,shadowRootClonable:W,shadowRootCustomElementRegistry:W,shadowRootDelegatesFocus:W,shadowRootMode:null,shadowRootSerializable:W,shape:null,size:G,sizes:null,slot:null,span:G,spellCheck:Si,src:null,srcDoc:null,srcLang:null,srcSet:null,start:G,step:null,style:null,tabIndex:G,target:null,title:null,translate:null,type:null,typeMustMatch:W,useMap:null,value:Si,width:G,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:wi,axis:null,background:null,bgColor:null,border:G,borderColor:null,bottomMargin:G,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:W,declare:W,event:null,face:null,frame:null,frameBorder:null,hSpace:G,leftMargin:G,link:null,longDesc:null,lowSrc:null,marginHeight:G,marginWidth:G,noResize:W,noHref:W,noShade:W,noWrap:W,object:null,profile:null,prompt:null,rev:null,rightMargin:G,rules:null,scheme:null,scrolling:Si,standby:null,summary:null,text:null,topMargin:G,valueType:null,version:null,vAlign:null,vLink:null,vSpace:G,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:W,disablePictureInPicture:W,disableRemotePlayback:W,exportParts:Ti,part:wi,prefix:null,property:null,results:G,security:null,unselectable:null},space:`html`,transform:Pi}),Ii=ji({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Ei,accentHeight:G,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:G,amplitude:G,arabicForm:null,ascent:G,attributeName:null,attributeType:null,azimuth:G,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:G,by:null,calcMode:null,capHeight:G,className:wi,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:G,diffuseConstant:G,direction:null,display:null,dur:null,divisor:G,dominantBaseline:null,download:W,dx:null,dy:null,edgeMode:null,editable:null,elevation:G,enableBackground:null,end:null,event:null,exponent:G,externalResourcesRequired:null,fill:null,fillOpacity:G,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ti,g2:Ti,glyphName:Ti,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:G,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:G,horizOriginX:G,horizOriginY:G,id:null,ideographic:G,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:G,k:G,k1:G,k2:G,k3:G,k4:G,kernelMatrix:Ei,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:G,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:G,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:G,overlineThickness:G,paintOrder:null,panose1:null,path:null,pathLength:G,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:wi,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:G,pointsAtY:G,pointsAtZ:G,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ei,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ei,rev:Ei,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ei,requiredFeatures:Ei,requiredFonts:Ei,requiredFormats:Ei,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:G,specularExponent:G,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:G,strikethroughThickness:G,string:null,stroke:null,strokeDashArray:Ei,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:G,strokeOpacity:G,strokeWidth:null,style:null,surfaceScale:G,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ei,tabIndex:G,tableValues:null,target:null,targetX:G,targetY:G,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ei,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:G,underlineThickness:G,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:G,values:null,vAlphabetic:G,vMathematical:G,vectorEffect:null,vHanging:G,vIdeographic:G,version:null,vertAdvY:G,vertOriginX:G,vertOriginY:G,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:G,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Ni}),Li=ji({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Ri=ji({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Pi}),zi=ji({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Bi=/[A-Z]/g,Vi=/-[a-z]/g,Hi=/^data[-\w.:]+$/i;function Ui(e,t){let n=vi(t),r=t,i=yi;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Hi.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Vi,Gi);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Vi.test(e)){let n=e.replace(Bi,Wi);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=ki}return new i(r,t)}function Wi(e){return`-`+e.toLowerCase()}function Gi(e){return e.charAt(1).toUpperCase()}var Ki=_i([Mi,Fi,Li,Ri,zi],`html`),qi=_i([Mi,Ii,Li,Ri,zi],`svg`),Ji={}.hasOwnProperty;function Yi(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&Ji.call(t,e)){let n=String(t[e]);i=Ji.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var Xi=/["&'<>`]/g,Zi=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Qi=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,$i=/[|\\{}()[\]^$+*?.]/g,ea=new WeakMap;function ta(e,t){return e=e.replace(t.subset?na(t.subset):Xi,r),t.subset||t.escapeOnly?e:e.replace(Zi,n).replace(Qi,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function na(e){let t=ea.get(e);return t||(t=ra(e),ea.set(e,t)),t}function ra(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace($i,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var ia=/[\dA-Fa-f]/;function aa(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!ia.test(String.fromCharCode(t))?r:r+`;`}var oa=/\d/;function sa(e,t,n){let r=`&#`+String(e);return n&&t&&!oa.test(String.fromCharCode(t))?r:r+`;`}var ca=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),la={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:`­`,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:`‌`,zwj:`‍`,lrm:`‎`,rlm:`‏`,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},ua=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],da={}.hasOwnProperty,fa={},pa;for(pa in la)da.call(la,pa)&&(fa[la[pa]]=pa);var ma=/[^\dA-Za-z]/;function ha(e,t,n,r){let i=String.fromCharCode(e);if(da.call(fa,i)){let e=fa[i],a=`&`+e;return n&&ca.includes(e)&&!ua.includes(e)&&(!r||t&&t!==61&&ma.test(String.fromCharCode(t)))?a:a+`;`}return``}function ga(e,t,n){let r=aa(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=ha(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=sa(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function _a(e,t){return ta(e,Object.assign({format:ga},t))}var va=/^>|^->|<!--|-->|--!>|<!-$/g,ya=[`>`],ba=[`<`,`>`];function xa(e,t,n,r){return r.settings.bogusComments?`<?`+_a(e.value,Object.assign({},r.settings.characterReferences,{subset:ya}))+`>`:`<!--`+e.value.replace(va,i)+`-->`;function i(e){return _a(e,Object.assign({},r.settings.characterReferences,{subset:ba}))}}function Sa(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function Ca(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function wa(e){return e.join(` `).trim()}var Ta=/[ \t\n\f\r]/g;function Ea(e){return typeof e==`object`?e.type===`text`&&Da(e.value):Da(e)}function Da(e){return e.replace(Ta,``)===``}var Oa=ja(1),ka=ja(-1),Aa=[];function ja(e){return t;function t(t,n,r){let i=t?t.children:Aa,a=(n||0)+e,o=i[a];if(!r)for(;o&&Ea(o);)a+=e,o=i[a];return o}}var Ma={}.hasOwnProperty;function Na(e){return t;function t(t,n,r){return Ma.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var Pa=Na({body:La,caption:Fa,colgroup:Fa,dd:Va,dt:Ba,head:Fa,html:Ia,li:za,optgroup:Ua,option:Wa,p:Ra,rp:Ha,rt:Ha,tbody:Ka,td:Ya,tfoot:qa,th:Ya,thead:Ga,tr:Ja});function Fa(e,t,n){let r=Oa(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&Ea(r.value.charAt(0)))}function Ia(e,t,n){let r=Oa(n,t);return!r||r.type!==`comment`}function La(e,t,n){let r=Oa(n,t);return!r||r.type!==`comment`}function Ra(e,t,n){let r=Oa(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||n.type!==`element`||n.tagName!==`a`&&n.tagName!==`audio`&&n.tagName!==`del`&&n.tagName!==`ins`&&n.tagName!==`map`&&n.tagName!==`noscript`&&n.tagName!==`video`}function za(e,t,n){let r=Oa(n,t);return!r||r.type===`element`&&r.tagName===`li`}function Ba(e,t,n){let r=Oa(n,t);return!(!r||r.type!==`element`||r.tagName!==`dt`&&r.tagName!==`dd`)}function Va(e,t,n){let r=Oa(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function Ha(e,t,n){let r=Oa(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function Ua(e,t,n){let r=Oa(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function Wa(e,t,n){let r=Oa(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function Ga(e,t,n){let r=Oa(n,t);return!(!r||r.type!==`element`||r.tagName!==`tbody`&&r.tagName!==`tfoot`)}function Ka(e,t,n){let r=Oa(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function qa(e,t,n){return!Oa(n,t)}function Ja(e,t,n){let r=Oa(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function Ya(e,t,n){let r=Oa(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var Xa=Na({body:$a,colgroup:eo,head:Qa,html:Za,tbody:to});function Za(e){let t=Oa(e,-1);return!t||t.type!==`comment`}function Qa(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function $a(e){let t=Oa(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&Ea(t.value.charAt(0)))&&(t.type!==`element`||t.tagName!==`meta`&&t.tagName!==`link`&&t.tagName!==`script`&&t.tagName!==`style`&&t.tagName!==`template`)}function eo(e,t,n){let r=ka(n,t),i=Oa(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&Pa(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function to(e,t,n){let r=ka(n,t),i=Oa(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&Pa(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var no={name:[[`
2
+ import{n as e}from"./rolldown-runtime-XKyaHtl9.js";import{r as t}from"./i18n-hH_Ba5QO.js";import{t as n}from"./jsx-B4XNFIzB.js";import{t as r}from"./component-DWct-Tq6.js";import{s as i,u as a}from"./frame-D6XmK4Df.js";import{a as o,n as s}from"./on-mixin-iWnqUzq5.js";import{t as c}from"./create-element--E6NJ0nh.js";import{n as l}from"./attrs-mixin-CmlG_FtV.js";import{t as u}from"./preload-helper-BLdHbfdN.js";import{a as d,c as f,i as p,l as m,n as h,o as g,r as _,t as v}from"./loader-Q6-HPKft.js";import{$ as y,$n as b,A as x,B as S,Bn as C,C as w,Cn as T,Ct as E,D,Dn as O,E as k,En as A,F as j,Ft as M,G as N,Gn as P,H as F,Hn as ee,I as te,In as ne,It as I,J as L,Jn as R,K as re,L as ie,Ln as ae,Lt as oe,M as se,N as ce,Nt as z,O as le,On as ue,P as de,Q as fe,Qn as B,R as pe,Rn as me,Rt as he,S as ge,Sn as _e,St as ve,T as ye,Tn as be,Tt as V,U as xe,Un as Se,Ut as Ce,V as we,Vn as Te,Vt as Ee,W as De,Wn as Oe,Wt as ke,X as Ae,Xn as je,Y as Me,Yn as Ne,Z as Pe,Zn as Fe,_ as Ie,_n as Le,_t as Re,b as ze,c as Be,cn as Ve,ct as He,d as Ue,dn as We,dt as Ge,en as Ke,er as qe,et as Je,f as Ye,fn as Xe,ft as Ze,g as Qe,gn as $e,gt as et,h as tt,hn as nt,ht as H,i as rt,in as it,ir as at,j as ot,k as st,l as ct,lt,m as ut,mt as dt,n as ft,nr as pt,o as mt,ot as ht,p as gt,pn as _t,pt as vt,q as yt,qn as bt,qt as xt,rr as St,rt as Ct,s as wt,st as Tt,tr as Et,u as Dt,v as Ot,vn as kt,vt as At,w as U,wn as jt,wt as Mt,x as Nt,y as Pt,yt as Ft,z as It,zn as Lt,zt as Rt}from"./task-design-BPpc4Gd7.js";import{$ as zt,A as Bt,B as Vt,C as Ht,D as Ut,E as Wt,F as Gt,G as Kt,H as qt,I as Jt,J as Yt,K as Xt,L as Zt,M as Qt,N as $t,O as en,P as tn,Q as nn,R as rn,T as an,U as on,V as sn,W as cn,X as ln,Y as un,Z as dn,a as fn,b as pn,et as mn,g as hn,j as gn,k as _n,m as vn,n as yn,nt as bn,o as xn,q as Sn,r as Cn,t as wn,tt as Tn,u as En,w as Dn,z as On}from"./cloneFileDiffMetadata-CWfw01dG.js";import{l as kn,n as An,o as jn}from"./method-DybmO5PB.js";var Mn=new Map,Nn=new Map,Pn=new Map,Fn=new Set;function In(e){for(let t of Array.isArray(e)?e:[e])if(t!==`text`&&t!==`ansi`&&!Fn.has(t))return!1;return!0}function Ln(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(Fn.has(n.name))continue;let e=Mn.get(n.name);e??(e=n,Mn.set(n.name,e));let r=e.data.find(t=>t.name===e.name||t.aliases?.includes(e.name)===!0);if(r==null)throw Error(`attachResolvedLanguages: No returned grammar declares "${e.name}" as its name or an alias.`);t.loadLanguageSync(e.data);try{t.getLanguage(e.name)}catch{throw Error(`attachResolvedLanguages: "${r.name}" is already loaded without alias "${e.name}". Load the alias first or give the grammar a unique name.`)}Fn.add(e.name)}}function Rn(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var zn=Object.defineProperty,Bn=Object.getOwnPropertyDescriptor,Vn=Object.getOwnPropertyNames,Hn=Object.prototype.hasOwnProperty,Un=(e,t)=>{let n={};for(var r in e)zn(n,r,{get:e[r],enumerable:!0});return t||zn(n,Symbol.toStringTag,{value:`Module`}),n},Wn=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Vn(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Hn.call(e,s)&&s!==n&&zn(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Bn(t,s))||r.enumerable});return e},Gn=(e,t,n)=>(Wn(e,t,`default`),n&&Wn(n,t,`default`)),Kn=[{id:`abap`,name:`ABAP`,import:(()=>u(()=>import(`./abap-CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>u(()=>import(`./actionscript-3-Cs6JJXT5.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>u(()=>import(`./ada-X3Y2mlq2.js`),[]))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>u(()=>import(`./ahk-DwADkxyd.js`),[]))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>u(()=>import(`./ahk2-_6rzW9BS.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>u(()=>import(`./angular-html-DOLkzBtu.js`),__vite__mapDeps([0,1,2,3,4])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>u(()=>import(`./angular-ts-DOMhGxLQ.js`),__vite__mapDeps([5,1,2,3,4,6])))},{id:`apache`,name:`Apache Conf`,import:(()=>u(()=>import(`./apache-U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>u(()=>import(`./apex-KFGFyKwG.js`),[]))},{id:`apl`,name:`APL`,import:(()=>u(()=>import(`./apl-Dio8Ke0X.js`),__vite__mapDeps([7,3,4,2,8,9,10])))},{id:`applescript`,name:`AppleScript`,import:(()=>u(()=>import(`./applescript-CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>u(()=>import(`./ara-4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>u(()=>import(`./asciidoc-SCjQUq34.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>u(()=>import(`./asm-Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>u(()=>import(`./astro-CN6YWUG3.js`),__vite__mapDeps([11,3,4,10,12,13,14])))},{id:`awk`,name:`AWK`,import:(()=>u(()=>import(`./awk-BWXHIvNe.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>u(()=>import(`./ballerina-B7ZEbQpA.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>u(()=>import(`./bat-C7sJWglS.js`),__vite__mapDeps([15,16])))},{id:`beancount`,name:`Beancount`,import:(()=>u(()=>import(`./beancount-C2IN4Vk8.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>u(()=>import(`./berry-DKpUyyne.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>u(()=>import(`./bibtex-DUQXB5kJ.js`),__vite__mapDeps([17,18])))},{id:`bicep`,name:`Bicep`,import:(()=>u(()=>import(`./bicep-CUHmPFLl.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>u(()=>import(`./bird2-CYIUgYqB.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>u(()=>import(`./blade-BrDpNfUX.js`),__vite__mapDeps([19,3,4,2,8,9,10,20,21])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>u(()=>import(`./bsl-gRq8cI6V.js`),__vite__mapDeps([22,23])))},{id:`c`,name:`C`,import:(()=>u(()=>import(`./c-Cz4nF6n_.js`),__vite__mapDeps([24,25])))},{id:`c3`,name:`C3`,import:(()=>u(()=>import(`./c3-D0apG41V.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>u(()=>import(`./cadence-CQ2zXKGN.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>u(()=>import(`./cairo-D66nqRlU.js`),__vite__mapDeps([26,27])))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>u(()=>import(`./chapel-C1sUNn9S.js`),__vite__mapDeps([28,25])))},{id:`clarity`,name:`Clarity`,import:(()=>u(()=>import(`./clarity-CtfBBspg.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>u(()=>import(`./clojure-CAE6QLVB.js`),__vite__mapDeps([29,30])))},{id:`cmake`,name:`CMake`,import:(()=>u(()=>import(`./cmake-Cpsd-0Y4.js`),__vite__mapDeps([31,32])))},{id:`cobol`,name:`COBOL`,import:(()=>u(()=>import(`./cobol-BvqUwMCV.js`),__vite__mapDeps([33,2,3,4,9])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>u(()=>import(`./codeowners-C8r90Shi.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>u(()=>import(`./codeql-oeQT6MSM.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>u(()=>import(`./coffee-NEqv5HL5.js`),__vite__mapDeps([34,35,3])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>u(()=>import(`./common-lisp-Cv5bFMCO.js`),[]))},{id:`coq`,name:`Rocq`,import:(()=>u(()=>import(`./coq-CGaSfhwR.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>u(()=>import(`./cpp-vothkh01.js`),__vite__mapDeps([36,37,38,39,25])))},{id:`crystal`,name:`Crystal`,import:(()=>u(()=>import(`./crystal-DEF7AEJQ.js`),__vite__mapDeps([40,3,4,2,21,25,41])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>u(()=>import(`./csharp-CFKDkFDZ.js`),__vite__mapDeps([42,43])))},{id:`css`,name:`CSS`,import:(()=>u(()=>import(`./css-DgaLhXQH.js`),__vite__mapDeps([44,4])))},{id:`csv`,name:`CSV`,import:(()=>u(()=>import(`./csv-k4CB9lhx.js`),__vite__mapDeps([45,46])))},{id:`cue`,name:`CUE`,import:(()=>u(()=>import(`./cue-CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>u(()=>import(`./cypher-ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>u(()=>import(`./d-qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>u(()=>import(`./dart-DjhkpiWP.js`),__vite__mapDeps([47,48])))},{id:`dax`,name:`DAX`,import:(()=>u(()=>import(`./dax-BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>u(()=>import(`./desktop-Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>u(()=>import(`./diff-eeGLjE2V.js`),__vite__mapDeps([49,50])))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>u(()=>import(`./docker-D0LTq72f.js`),__vite__mapDeps([51,52])))},{id:`dotenv`,name:`dotEnv`,import:(()=>u(()=>import(`./dotenv-CuH5my32.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>u(()=>import(`./dream-maker-DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>u(()=>import(`./edge-B_SBzXGF.js`),__vite__mapDeps([53,2,3,4,12,20])))},{id:`elixir`,name:`Elixir`,import:(()=>u(()=>import(`./elixir-BN3BkYei.js`),__vite__mapDeps([54,55,2,3,4])))},{id:`elm`,name:`Elm`,import:(()=>u(()=>import(`./elm-CC1TmzeR.js`),__vite__mapDeps([56,39,25])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>u(()=>import(`./emacs-lisp-DR2vtWaj.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>u(()=>import(`./erb-BjlLGk-_.js`),__vite__mapDeps([57,2,3,4,58,8,9,21,25,37,38,39,41,59,60,12,14,61,62,63])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>u(()=>import(`./erlang-ir39Pet8.js`),__vite__mapDeps([64,65,66])))},{id:`fennel`,name:`Fennel`,import:(()=>u(()=>import(`./fennel-DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>u(()=>import(`./fish-BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>u(()=>import(`./fluent-C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>u(()=>import(`./fortran-fixed-form-1cK5gXa1.js`),__vite__mapDeps([67,68])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>u(()=>import(`./fortran-free-form-C5q_0aPq.js`),__vite__mapDeps([69,68])))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>u(()=>import(`./fsharp-SO2Zcqp5.js`),__vite__mapDeps([70,71,66])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>u(()=>import(`./gdresource-LxjHb83i.js`),__vite__mapDeps([72,73,74])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>u(()=>import(`./gdscript-CJEqcM-5.js`),__vite__mapDeps([75,74])))},{id:`gdshader`,name:`GDShader`,import:(()=>u(()=>import(`./gdshader-BNp4G147.js`),__vite__mapDeps([76,73])))},{id:`genie`,name:`Genie`,import:(()=>u(()=>import(`./genie-CV2tkWYe.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>u(()=>import(`./gherkin-DExj1W_8.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>u(()=>import(`./git-commit-DaNUDv1O.js`),__vite__mapDeps([77,78,50])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>u(()=>import(`./git-rebase-qxk4jQ_Z.js`),__vite__mapDeps([79,80,41])))},{id:`gleam`,name:`Gleam`,import:(()=>u(()=>import(`./gleam-CSRkHgEL.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>u(()=>import(`./glimmer-js-CIdbWayl.js`),__vite__mapDeps([81,3,4,2,12])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>u(()=>import(`./glimmer-ts-B16xCo2k.js`),__vite__mapDeps([82,3,4,2,12])))},{id:`glsl`,name:`GLSL`,import:(()=>u(()=>import(`./glsl-D01ELkOo.js`),__vite__mapDeps([83,39,25])))},{id:`gn`,name:`GN`,import:(()=>u(()=>import(`./gn-CAXYAgV-.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>u(()=>import(`./gnuplot-7GGW24-e.js`),[]))},{id:`go`,name:`Go`,import:(()=>u(()=>import(`./go-CC6EVc1J.js`),__vite__mapDeps([84,85])))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>u(()=>import(`./graphql-BZEhxNwM.js`),__vite__mapDeps([86,60,3,12,14,61])))},{id:`groovy`,name:`Groovy`,import:(()=>u(()=>import(`./groovy-_MokPXAr.js`),__vite__mapDeps([87,88])))},{id:`hack`,name:`Hack`,import:(()=>u(()=>import(`./hack-C30D-q0p.js`),__vite__mapDeps([89,2,3,4,21])))},{id:`haml`,name:`Ruby Haml`,import:(()=>u(()=>import(`./haml-BU6KMePS.js`),__vite__mapDeps([90,59,3,4])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>u(()=>import(`./handlebars-WZCg7K7Q.js`),__vite__mapDeps([91,92,3,4,2,63])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>u(()=>import(`./haskell-D8IpX4py.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>u(()=>import(`./haxe-B0BMDyun.js`),__vite__mapDeps([93,94])))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>u(()=>import(`./hcl-Dh228itO.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>u(()=>import(`./hjson-CxZEssPk.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>u(()=>import(`./hlsl-DQJgUA8P.js`),__vite__mapDeps([95,96])))},{id:`html`,name:`HTML`,import:(()=>u(()=>import(`./html-BCy9P6D2.js`),__vite__mapDeps([97,2,3,4])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>u(()=>import(`./html-derivative-ekTk9Unt.js`),__vite__mapDeps([98,20,2,3,4])))},{id:`http`,name:`HTTP`,import:(()=>u(()=>import(`./http-BjrBtiM6.js`),__vite__mapDeps([99,8,9,10,41,60,3,12,14,61])))},{id:`hurl`,name:`Hurl`,import:(()=>u(()=>import(`./hurl-B4P9s9G3.js`),__vite__mapDeps([100,8,9,46,60,3,12,14,61])))},{id:`hxml`,name:`HXML`,import:(()=>u(()=>import(`./hxml-DPF7XkXa.js`),__vite__mapDeps([101,94])))},{id:`hy`,name:`Hy`,import:(()=>u(()=>import(`./hy-CZbG8q4J.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>u(()=>import(`./imba-DsUTQ-LC.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>u(()=>import(`./ini-DiZ1IqbV.js`),__vite__mapDeps([102,103])))},{id:`java`,name:`Java`,import:(()=>u(()=>import(`./java-_ATy9zCa.js`),__vite__mapDeps([104,9])))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>u(()=>import(`./javascript-CpIGwZ_Y.js`),__vite__mapDeps([105,3])))},{id:`jinja`,name:`Jinja`,import:(()=>u(()=>import(`./jinja-dRcm23Ea.js`),__vite__mapDeps([106,2,3,4])))},{id:`jison`,name:`Jison`,import:(()=>u(()=>import(`./jison-D3aJooqo.js`),__vite__mapDeps([107,3])))},{id:`json`,name:`JSON`,import:(()=>u(()=>import(`./json-C3WlssX3.js`),__vite__mapDeps([108,10])))},{id:`json5`,name:`JSON5`,import:(()=>u(()=>import(`./json5-BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>u(()=>import(`./jsonc-BzJ54Uh_.js`),__vite__mapDeps([109,110])))},{id:`jsonl`,name:`JSON Lines`,import:(()=>u(()=>import(`./jsonl-CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>u(()=>import(`./jsonnet-CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>u(()=>import(`./jssm-DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>u(()=>import(`./jsx-C4yDKi0A.js`),__vite__mapDeps([111,61])))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>u(()=>import(`./julia-C8a5hZkp.js`),__vite__mapDeps([112,113,3,21,27,37,38,39,25,114])))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>u(()=>import(`./just-CP_wDfXI.js`),__vite__mapDeps([115,3,12,27,41,58,4,2,8,9,21,25,37,38,39,59,60,14,61,62,63,116])))},{id:`kdl`,name:`KDL`,import:(()=>u(()=>import(`./kdl-CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>u(()=>import(`./kotlin-DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>u(()=>import(`./kusto-C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>u(()=>import(`./latex-Bn9nYtub.js`),__vite__mapDeps([117,118,119,114])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>u(()=>import(`./lean-CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>u(()=>import(`./less-CXhFgJ4v.js`),__vite__mapDeps([120,121])))},{id:`liquid`,name:`Liquid`,import:(()=>u(()=>import(`./liquid-CQNtsgCr.js`),__vite__mapDeps([122,3,4,2,10])))},{id:`llvm`,name:`LLVM IR`,import:(()=>u(()=>import(`./llvm-DqHOMS-s.js`),[]))},{id:`log`,name:`Log file`,import:(()=>u(()=>import(`./log-Bu1ZtrH6.js`),__vite__mapDeps([123,124])))},{id:`logo`,name:`Logo`,import:(()=>u(()=>import(`./logo-Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>u(()=>import(`./lua-fPRBWD-V.js`),__vite__mapDeps([125,62,25])))},{id:`luau`,name:`Luau`,import:(()=>u(()=>import(`./luau-VGWVLoqX.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>u(()=>import(`./make-B54cR2A1.js`),__vite__mapDeps([126,127])))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>u(()=>import(`./markdown-CjQmuOi1.js`),__vite__mapDeps([128,66])))},{id:`marko`,name:`Marko`,import:(()=>u(()=>import(`./marko-DPS0EkZ1.js`),__vite__mapDeps([129,4,6,12,121])))},{id:`matlab`,name:`MATLAB`,import:(()=>u(()=>import(`./matlab-D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>u(()=>import(`./mdc-C6srEd4p.js`),__vite__mapDeps([130,20,2,3,4,63,66])))},{id:`mdx`,name:`MDX`,import:(()=>u(()=>import(`./mdx-DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>u(()=>import(`./mermaid-BxpfTIzt.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>u(()=>import(`./mipsasm-BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>u(()=>import(`./mojo-fg40_ntQ.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>u(()=>import(`./moonbit-D9W784E_.js`),[]))},{id:`move`,name:`Move`,import:(()=>u(()=>import(`./move-BYnGhZoM.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>u(()=>import(`./narrat-_X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>u(()=>import(`./nextflow-uA5IJerx.js`),__vite__mapDeps([131,132])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>u(()=>import(`./nextflow-groovy-D5vAge1Z.js`),__vite__mapDeps([133,132])))},{id:`nginx`,name:`Nginx`,import:(()=>u(()=>import(`./nginx-BxRBJ-Af.js`),__vite__mapDeps([134,62,25])))},{id:`nim`,name:`Nim`,import:(()=>u(()=>import(`./nim-DN3EGtL-.js`),__vite__mapDeps([135,136,3,4,2,8,9,25,39,66])))},{id:`nix`,name:`Nix`,import:(()=>u(()=>import(`./nix-IvuFDN5E.js`),[]))},{id:`nsis`,name:`NSIS`,import:(()=>u(()=>import(`./nsis-CjNLYCLg.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>u(()=>import(`./nushell--0fT3PI1.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>u(()=>import(`./objective-c-CsonrGpd.js`),__vite__mapDeps([137,138])))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>u(()=>import(`./objective-cpp-BsSzOQcm.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>u(()=>import(`./ocaml-BuP2SoBQ.js`),__vite__mapDeps([139,140])))},{id:`odin`,name:`Odin`,import:(()=>u(()=>import(`./odin-B1RWQWA5.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>u(()=>import(`./openscad-BUDT5pXO.js`),[]))},{id:`org`,name:`Org Markup`,import:(()=>u(()=>import(`./org-BRAbLUOJ.js`),__vite__mapDeps([141,3,4,2,6,9,8,10,12,14,21,25,27,30,35,38,37,39,41,43,48,50,52,55,62,63,58,59,60,61,66,65,78,80,85,88,103,114,116,118,119,121,127,136,138,140,142,143,144,145,146,147,148])))},{id:`pascal`,name:`Pascal`,import:(()=>u(()=>import(`./pascal-4ZHwLPI5.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>u(()=>import(`./perl-Ciba4h2-.js`),__vite__mapDeps([149,116,3,4,2,8,9,21])))},{id:`php`,name:`PHP`,import:(()=>u(()=>import(`./php-DBfnyu6d.js`),__vite__mapDeps([150,142,3,4,2,8,9,10,21])))},{id:`pkl`,name:`Pkl`,import:(()=>u(()=>import(`./pkl-ot-7Btpt.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>u(()=>import(`./plsql-DGHpHOYJ.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>u(()=>import(`./po-BiJDBrnU.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>u(()=>import(`./polar-C7UOKdEL.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>u(()=>import(`./postcss-DkKB82OS.js`),__vite__mapDeps([151,13])))},{id:`powerquery`,name:`PowerQuery`,import:(()=>u(()=>import(`./powerquery-DNMTfnFr.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>u(()=>import(`./powershell-Blb2ISmZ.js`),__vite__mapDeps([152,153])))},{id:`prisma`,name:`Prisma`,import:(()=>u(()=>import(`./prisma-DMgNhnYS.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>u(()=>import(`./prolog-iXnhIJG7.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>u(()=>import(`./proto-DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>u(()=>import(`./pug-C_nSP9Mg.js`),__vite__mapDeps([154,155,3,4,2])))},{id:`puppet`,name:`Puppet`,import:(()=>u(()=>import(`./puppet-CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>u(()=>import(`./purescript-9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>u(()=>import(`./python-C5TF47hQ.js`),__vite__mapDeps([156,27])))},{id:`qml`,name:`QML`,import:(()=>u(()=>import(`./qml-BxleM7bJ.js`),__vite__mapDeps([157,3])))},{id:`qmldir`,name:`QML Directory`,import:(()=>u(()=>import(`./qmldir-DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>u(()=>import(`./qss-Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>u(()=>import(`./r-BXEss897.js`),__vite__mapDeps([158,114])))},{id:`racket`,name:`Racket`,import:(()=>u(()=>import(`./racket-DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>u(()=>import(`./raku-Cj6OV6qV.js`),__vite__mapDeps([159,144])))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>u(()=>import(`./razor-UAq-8THt.js`),__vite__mapDeps([160,2,3,4,43])))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>u(()=>import(`./rbs-C0MpOrj4.js`),[]))},{id:`reg`,name:`Windows Registry Script`,import:(()=>u(()=>import(`./reg-CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>u(()=>import(`./regexp-wOX-4MEz.js`),__vite__mapDeps([161,38])))},{id:`rel`,name:`Rel`,import:(()=>u(()=>import(`./rel-BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>u(()=>import(`./riscv-Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>u(()=>import(`./ron-VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>u(()=>import(`./rosmsg-CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>u(()=>import(`./rst-BCaXiUC4.js`),__vite__mapDeps([162,3,20,2,4,27,32,37,38,39,25,41,63,58,8,9,21,59,60,12,14,61,62])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>u(()=>import(`./ruby-C4ARPOX3.js`),__vite__mapDeps([163,58,3,4,2,8,9,21,25,37,38,39,41,59,60,12,14,61,62,63])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>u(()=>import(`./rust-Ch0zZBV0.js`),__vite__mapDeps([164,145])))},{id:`sas`,name:`SAS`,import:(()=>u(()=>import(`./sas-BowjnAvi.js`),__vite__mapDeps([165,21])))},{id:`sass`,name:`Sass`,import:(()=>u(()=>import(`./sass-DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>u(()=>import(`./scala-CTTBu_35.js`),__vite__mapDeps([166,146])))},{id:`scheme`,name:`Scheme`,import:(()=>u(()=>import(`./scheme-DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>u(()=>import(`./scss-D3wBkj3d.js`),__vite__mapDeps([167,6,4])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>u(()=>import(`./sdbl-CyKdwm0B.js`),__vite__mapDeps([168,23])))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>u(()=>import(`./shaderlab-DY7g_Ava.js`),__vite__mapDeps([169,96])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>u(()=>import(`./shellscript-CVTB3cr6.js`),__vite__mapDeps([170,41])))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>u(()=>import(`./shellsession-DDrivR0a.js`),__vite__mapDeps([171,41])))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>u(()=>import(`./smalltalk-BHpQb5nM.js`),[]))},{id:`smithy`,name:`Smithy`,import:(()=>u(()=>import(`./smithy-Dgaz7aur.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>u(()=>import(`./solidity-Bj7E1mRn.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>u(()=>import(`./soy-CUUUw2U6.js`),__vite__mapDeps([172,2,3,4])))},{id:`sparql`,name:`SPARQL`,import:(()=>u(()=>import(`./sparql-Dy5Sx-zJ.js`),__vite__mapDeps([173,174])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>u(()=>import(`./splunk-BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>u(()=>import(`./sql-CfM2IJm3.js`),__vite__mapDeps([175,21])))},{id:`ssh-config`,name:`SSH Config`,import:(()=>u(()=>import(`./ssh-config-BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>u(()=>import(`./stata-Dj4sbAEx.js`),__vite__mapDeps([176,21])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>u(()=>import(`./stylus-y-ZXgJGq.js`),__vite__mapDeps([177,178])))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>u(()=>import(`./surrealql-NoXzmj18.js`),__vite__mapDeps([179,3])))},{id:`svelte`,name:`Svelte`,import:(()=>u(()=>import(`./svelte-BaCIHHWd.js`),__vite__mapDeps([180,3,4,12,13])))},{id:`swift`,name:`Swift`,import:(()=>u(()=>import(`./swift-CCLoYZtx.js`),__vite__mapDeps([181,182])))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>u(()=>import(`./system-verilog-DFpyZzg3.js`),__vite__mapDeps([183,184])))},{id:`systemd`,name:`Systemd Units`,import:(()=>u(()=>import(`./systemd-BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>u(()=>import(`./talonscript-CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>u(()=>import(`./tasl-DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>u(()=>import(`./tcl-CZd0xW_V.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>u(()=>import(`./templ-BfgLc4ra.js`),__vite__mapDeps([185,3,4,85])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>u(()=>import(`./terraform-DswuEJGm.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>u(()=>import(`./tex-CNYz7bLJ.js`),__vite__mapDeps([186,119,114])))},{id:`toml`,name:`TOML`,import:(()=>u(()=>import(`./toml-CcmNWLt0.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>u(()=>import(`./ts-tags-DLz2GTd3.js`),__vite__mapDeps([187,3,4,2,8,9,12,21,39,25])))},{id:`tsv`,name:`TSV`,import:(()=>u(()=>import(`./tsv-sltzmVWM.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>u(()=>import(`./tsx-CGosfAUg.js`),__vite__mapDeps([188,14])))},{id:`turtle`,name:`Turtle`,import:(()=>u(()=>import(`./turtle-CQ9kcy0m.js`),__vite__mapDeps([189,174])))},{id:`twig`,name:`Twig`,import:(()=>u(()=>import(`./twig-lMQ09cjh.js`),__vite__mapDeps([190,191,3,4,6,27,58,2,8,9,21,25,37,38,39,41,59,60,12,14,61,62,63,142,10])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>u(()=>import(`./typescript-Bb1J8qyy.js`),__vite__mapDeps([192,12])))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>u(()=>import(`./typespec-BGhR2SqG.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>u(()=>import(`./typst-DDNSzYFN.js`),__vite__mapDeps([193,3,4,2,6,9,8,10,12,14,16,18,21,25,27,30,35,38,37,39,41,43,48,50,52,55,62,63,58,59,60,61,66,65,71,78,80,85,88,92,103,110,114,113,116,118,119,121,124,127,138,142,143,144,145,146,148,153,155,182,184,191,194])))},{id:`v`,name:`V`,import:(()=>u(()=>import(`./v-DBj4K9d_.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>u(()=>import(`./vala-zf12oZj6.js`),[]))},{id:`vb`,name:`Visual Basic`,import:(()=>u(()=>import(`./vb-CP6Ec8nh.js`),__vite__mapDeps([195,143])))},{id:`verilog`,name:`Verilog`,import:(()=>u(()=>import(`./verilog-1j7BQk-h.js`),__vite__mapDeps([196,194])))},{id:`vhdl`,name:`VHDL`,import:(()=>u(()=>import(`./vhdl-BroJfC0k.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>u(()=>import(`./viml-DvXPmvsu.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>u(()=>import(`./vue-qH43U_rv.js`),__vite__mapDeps([197,3,4,2,10,12,20])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>u(()=>import(`./vue-html-CGMs_6qn.js`),__vite__mapDeps([198,3])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>u(()=>import(`./vue-vine-6XI2pIvQ.js`),__vite__mapDeps([199,3,4,6,13,121,178])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>u(()=>import(`./vyper-CgoNMtux.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>u(()=>import(`./wasm-ByWQv1Qj.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>u(()=>import(`./wenyan-C8pVoKbM.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>u(()=>import(`./wgsl-BsKzXJz4.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>u(()=>import(`./wikitext-ClFFjSW2.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>u(()=>import(`./wit-DdvCle-K.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>u(()=>import(`./wolfram-DLL8P-h_.js`),[]))},{id:`xml`,name:`XML`,import:(()=>u(()=>import(`./xml-DuKfbPI6.js`),__vite__mapDeps([200,8,9])))},{id:`xsl`,name:`XSL`,import:(()=>u(()=>import(`./xsl-CW58cerL.js`),__vite__mapDeps([201,148,8,9])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>u(()=>import(`./yaml-DDA_XMNu.js`),__vite__mapDeps([202,63])))},{id:`zenscript`,name:`ZenScript`,import:(()=>u(()=>import(`./zenscript-BnlCZFoB.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>u(()=>import(`./zig-cFafUZna.js`),__vite__mapDeps([203,147])))}],qn=Object.fromEntries(Kn.map(e=>[e.id,e.import])),Jn=Object.fromEntries(Kn.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Yn={...qn,...Jn},Xn=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>u(()=>import(`./andromeeda-vGVdxbeo.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>u(()=>import(`./aurora-x-CDeNXAV0.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>u(()=>import(`./ayu-dark-DluEY0Gj.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>u(()=>import(`./ayu-light-C3h-C4tm.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>u(()=>import(`./ayu-mirage-Bqwy1Gya.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>u(()=>import(`./catppuccin-frappe-C9Q5zVZY.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>u(()=>import(`./catppuccin-latte-CtsyrtPq.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>u(()=>import(`./catppuccin-macchiato-R8nAf1vR.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>u(()=>import(`./catppuccin-mocha-DjuaAJKi.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>u(()=>import(`./dark-plus-Cs2F2srj.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>u(()=>import(`./dracula-BHWKrbxM.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>u(()=>import(`./dracula-soft-5eyTD99u.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>u(()=>import(`./everforest-dark-sB-x3p7T.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>u(()=>import(`./everforest-light-Df2xbC6M.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>u(()=>import(`./github-dark-C-LZuMrd.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>u(()=>import(`./github-dark-default-DXG-b-1a.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>u(()=>import(`./github-dark-dimmed-Bx1FflLF.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>u(()=>import(`./github-dark-high-contrast-B_tTalzw.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>u(()=>import(`./github-light-EUqPIrTm.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>u(()=>import(`./github-light-default-BXViO-2h.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>u(()=>import(`./github-light-high-contrast-B68TUdTA.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>u(()=>import(`./gruvbox-dark-hard-C820rvS2.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>u(()=>import(`./gruvbox-dark-medium-BPjhmG05.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>u(()=>import(`./gruvbox-dark-soft-MrdJrrXF.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>u(()=>import(`./gruvbox-light-hard-BC_s9l72.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>u(()=>import(`./gruvbox-light-medium-BAWPOn9u.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>u(()=>import(`./gruvbox-light-soft-BSMLrYjP.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>u(()=>import(`./horizon-CE9ld1lL.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>u(()=>import(`./horizon-bright-DSNQnXHK.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>u(()=>import(`./houston-CsvMBhTu.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>u(()=>import(`./kanagawa-dragon-Bozd7klA.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>u(()=>import(`./kanagawa-lotus-BmuOG9ZW.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>u(()=>import(`./kanagawa-wave-BML5mF2J.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>u(()=>import(`./laserwave-C_8bwKvT.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>u(()=>import(`./light-plus-DVQuIRkW.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>u(()=>import(`./material-theme-Bm3Qr25_.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>u(()=>import(`./material-theme-darker-2IIEA8gg.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>u(()=>import(`./material-theme-lighter-uhdI0v04.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>u(()=>import(`./material-theme-ocean-CHQ94UKr.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>u(()=>import(`./material-theme-palenight-B5W6OYN7.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>u(()=>import(`./min-dark-BSWPekZh.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>u(()=>import(`./min-light-DDpmG2fV.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>u(()=>import(`./monokai-BscAjiQZ.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>u(()=>import(`./night-owl-DhmEMT88.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>u(()=>import(`./night-owl-light-eJ-hLW7d.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>u(()=>import(`./nord-Cb4Vim4T.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>u(()=>import(`./one-dark-pro-C6YyR8OD.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>u(()=>import(`./one-light-D7Lr4KcI.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>u(()=>import(`./plastic-DQwYfKfQ.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>u(()=>import(`./poimandres-DRFjx7u4.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>u(()=>import(`./red-CYlAq2b0.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>u(()=>import(`./rose-pine-aMsaMD1D.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>u(()=>import(`./rose-pine-dawn-8PwUyIlP.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>u(()=>import(`./rose-pine-moon-DO-qXg-I.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>u(()=>import(`./slack-dark-DnToyrRv.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>u(()=>import(`./slack-ochin-B2OO5cIa.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>u(()=>import(`./snazzy-light-4G7pJPwS.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>u(()=>import(`./solarized-dark-b97czJOk.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>u(()=>import(`./solarized-light-DFPxpIYQ.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>u(()=>import(`./synthwave-84-nFMaYfgc.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>u(()=>import(`./tokyo-night-oM2G3aXe.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>u(()=>import(`./vesper-DdrHHSXu.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>u(()=>import(`./vitesse-black-fwtXNY1n.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>u(()=>import(`./vitesse-dark-BZCL-v6S.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>u(()=>import(`./vitesse-light-VbXTXTou.js`),[]))}].map(e=>[e.id,e.import])),Zn=e({createOnigurumaEngine:()=>Tr,getDefaultWasmLoader:()=>wr,loadWasm:()=>vr,setDefaultWasmLoader:()=>Cr}),Qn=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function $n(){return 2147483648}function er(){return typeof performance<`u`?performance.now():Date.now()}var tr=(e,t)=>e+(t-e%t)%t;async function nr(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=$n();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,tr(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:er,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var rr=Object.defineProperty,ir=(e,t,n)=>t in e?rr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ar=(e,t,n)=>ir(e,typeof t==`symbol`?t:t+``,n),or=null;function sr(e){throw new Qn(e.UTF8ToString(e.getLastOnigError()))}var cr=class e{constructor(t){ar(this,`utf16Length`),ar(this,`utf8Length`),ar(this,`utf16Value`),ar(this,`utf8Value`),ar(this,`utf16OffsetToUtf8`),ar(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},lr=class e{constructor(t){if(ar(this,`id`,++e.LAST_ID),ar(this,`_onigBinding`),ar(this,`content`),ar(this,`utf16Length`),ar(this,`utf8Length`),ar(this,`utf16OffsetToUtf8`),ar(this,`utf8OffsetToUtf16`),ar(this,`ptr`),!or)throw new Qn(`Must invoke loadWasm first.`);this._onigBinding=or,this.content=t;let n=new cr(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=or.omalloc(1e4),e._sharedPtrInUse=!0,or.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(or)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};ar(lr,`LAST_ID`,0),ar(lr,`_sharedPtr`,0),ar(lr,`_sharedPtrInUse`,!1);var ur=lr,dr=class{constructor(e){if(ar(this,`_onigBinding`),ar(this,`_ptr`),!or)throw new Qn(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new cr(e[r]);t[r]=i.createString(or),n[r]=i.utf8Length}let r=or.omalloc(4*e.length);or.HEAPU32.set(t,r/4);let i=or.omalloc(4*e.length);or.HEAPU32.set(n,i/4);let a=or.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)or.ofree(t[n]);or.ofree(i),or.ofree(r),a===0&&sr(or),this._onigBinding=or,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new ur(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function fr(e){return typeof e.instantiator==`function`}function pr(e){return typeof e.default==`function`}function mr(e){return e.data!==void 0}function hr(e){return typeof Response<`u`&&e instanceof Response}function gr(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var _r;function vr(e){if(_r)return _r;async function t(){or=await nr(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),fr(n)?n=await n.instantiator(t):pr(n)?n=await n.default(t):(mr(n)&&(n=n.data),hr(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await br(n)(t):await xr(n)(t):gr(n)||n instanceof WebAssembly.Module?n=await yr(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await yr(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return _r=t(),_r}function yr(e){return t=>WebAssembly.instantiate(e,t)}function br(e){return t=>WebAssembly.instantiateStreaming(e,t)}function xr(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var Sr;function Cr(e){Sr=e}function wr(){return Sr}async function Tr(e){return e&&await vr(e),{createScanner(e){return new dr(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new ur(e)}}}var Er=Un({});Gn(Er,Zn);var Dr=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Or(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function kr(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Ar(e){return Array.isArray(e)?e:[e]}async function jr(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function Mr(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function Nr(e){return e===`ansi`||Mr(e)}function Pr(e){return e===`none`}function Fr(e){return Pr(e)}var Ir=/(\r?\n)/g;function Lr(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(Ir),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var Rr={light:`#333333`,dark:`#bbbbbb`},zr={light:`#fffffe`,dark:`#1e1e1e`},Br=`__shiki_resolved`;function Vr(e){if(e?.[Br])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?Rr.light:Rr.dark,n||=t.type===`light`?zr.light:zr.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,Br,{enumerable:!1,writable:!1,value:!0}),t}async function Hr(e){return[...new Set((await Promise.all(e.filter(e=>!Nr(e)).map(async e=>await jr(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function Ur(e){return(await Promise.all(e.map(async e=>Fr(e)?null:Vr(await jr(e))))).filter(e=>!!e)}function Wr(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new Dr(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var Gr=class extends Bt{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=Vr(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=gn.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Wr(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._syncRegistry?._grammars?.get(e.scopeName)?.dispose(),this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new Dr(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},Kr=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).includes(e.scopeName)||this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},qr=0;function Jr(e){qr+=1,e.warnings!==!1&&qr>=10&&qr%10==0&&console.warn(`[Shiki] ${qr} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new Dr("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Vr),i=new Gr(new Kr(e.engine,n),r,n,e.langAlias),a;function o(t){return Wr(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new Dr(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new Dr(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await Hr(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await Ur(e))}function g(){if(t)throw new Dr(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--qr)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function Yr(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([Ur(e.themes||[]),Hr(e.langs||[]),e.engine]);return Jr({...e,themes:t,langs:n,engine:r})}var Xr=new WeakMap;function Zr(e,t){Xr.set(e,t)}function Qr(e){return Xr.get(e)}var $r=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(Ar(n).map(e=>[e,_n])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return ei(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function ei(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function ti(e,t){if(!(e instanceof $r))throw new Dr(`Invalid grammar state`);return e.getInternalStack(t)}var ni=/,/,ri=/ /;function ii(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(Mr(e.resolveLangAlias(n.lang||`text`))||Pr(r))return Lr(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new Dr(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new Dr(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return oi(t,o,i,a,n)}function ai(...e){if(e.length===2)return Qr(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(Mr(i)||Pr(a))throw new Dr(`Plain language does not have grammar state`);if(i===`ansi`)throw new Dr(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new $r(si(n,c,o,s,r).stateStack,c.name,o.name)}function oi(e,t,n,r,i){let a=si(e,t,n,r,i),o=new $r(a.stateStack,t.name,n.name);return Zr(a.tokens,o),a.tokens}function si(e,t,n,r,i){let a=Or(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500,includeExplanation:c=!1}=i,l=Lr(e),u=i.grammarState?ti(i.grammarState,n.name)??_n:i.grammarContextCode==null?_n:si(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,d=[],f=[];for(let e=0,i=l.length;e<i;e++){let[i,p]=l[e];if(i===``){d=[],f.push([]);continue}if(o>0&&i.length>=o){d=[],f.push([{content:i,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;c&&c!==`tokenType`&&(m=t.tokenizeLine(i,u,s),h=m.tokens,g=0);let _=t.tokenizeLine2(i,u,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:i.length;if(t===o)continue;let s=_.tokens[2*e+1],l=kr(r[Ut.getForeground(s)],a),u=Ut.getFontStyle(s),f={content:i.substring(t,o),offset:p+t,color:l,fontStyle:u};if(c===`tokenType`)f.type=Ut.getTokenType(s);else if(c){let e=[];if(c!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(ni).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(ri))})}f.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=i.substring(t.startIndex,t.endIndex);r+=n.length,f.explanation.push({content:n,scopes:c===`scopeName`?ci(t.scopes):li(e,t.scopes)}),g+=1}}d.push(f)}f.push(d),d=[],u=_.ruleStack}return{tokens:f,stateStack:u}}function ci(e){return e.map(e=>({scopeName:e}))}function li(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:fi(e,i,t.slice(0,r))}}return n}function ui(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function di(e,t,n){if(!ui(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)ui(e[r],n[i])&&--r,--i;return r===-1}function fi(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(di(e,t,n)){r.push(a);break}return r}function pi(e,t,n,r=ii){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:Qr(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=mi(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new $r(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&Zr(s,c),s}function mi(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var hi=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],gi=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};gi.prototype.normal={},gi.prototype.property={},gi.prototype.space=void 0;function _i(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new gi(n,r,t)}function vi(e){return e.toLowerCase()}var yi=class{constructor(e,t){this.attribute=t,this.property=e}};yi.prototype.attribute=``,yi.prototype.booleanish=!1,yi.prototype.boolean=!1,yi.prototype.commaOrSpaceSeparated=!1,yi.prototype.commaSeparated=!1,yi.prototype.defined=!1,yi.prototype.mustUseProperty=!1,yi.prototype.number=!1,yi.prototype.overloadedBoolean=!1,yi.prototype.property=``,yi.prototype.spaceSeparated=!1,yi.prototype.space=void 0;var bi=e({boolean:()=>W,booleanish:()=>Si,commaOrSpaceSeparated:()=>Ei,commaSeparated:()=>Ti,number:()=>G,overloadedBoolean:()=>Ci,spaceSeparated:()=>wi}),xi=0,W=Di(),Si=Di(),Ci=Di(),G=Di(),wi=Di(),Ti=Di(),Ei=Di();function Di(){return 2**++xi}var Oi=Object.keys(bi),ki=class extends yi{constructor(e,t,n,r){let i=-1;if(super(e,t),Ai(this,`space`,r),typeof n==`number`)for(;++i<Oi.length;){let e=Oi[i];Ai(this,Oi[i],(n&bi[e])===bi[e])}}};ki.prototype.defined=!0;function Ai(e,t,n){n&&(e[t]=n)}function ji(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new ki(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[vi(r)]=r,n[vi(a.attribute)]=r}return new gi(t,n,e.space)}var Mi=ji({properties:{ariaActiveDescendant:null,ariaAtomic:Si,ariaAutoComplete:null,ariaBusy:Si,ariaChecked:Si,ariaColCount:G,ariaColIndex:G,ariaColSpan:G,ariaControls:wi,ariaCurrent:null,ariaDescribedBy:wi,ariaDetails:null,ariaDisabled:Si,ariaDropEffect:wi,ariaErrorMessage:null,ariaExpanded:Si,ariaFlowTo:wi,ariaGrabbed:Si,ariaHasPopup:null,ariaHidden:Si,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:wi,ariaLevel:G,ariaLive:null,ariaModal:Si,ariaMultiLine:Si,ariaMultiSelectable:Si,ariaOrientation:null,ariaOwns:wi,ariaPlaceholder:null,ariaPosInSet:G,ariaPressed:Si,ariaReadOnly:Si,ariaRelevant:null,ariaRequired:Si,ariaRoleDescription:wi,ariaRowCount:G,ariaRowIndex:G,ariaRowSpan:G,ariaSelected:Si,ariaSetSize:G,ariaSort:null,ariaValueMax:G,ariaValueMin:G,ariaValueNow:G,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Ni(e,t){return t in e?e[t]:t}function Pi(e,t){return Ni(e,t.toLowerCase())}var Fi=ji({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Ti,acceptCharset:wi,accessKey:wi,action:null,allow:null,allowFullScreen:W,allowPaymentRequest:W,allowUserMedia:W,alpha:W,alt:null,as:null,async:W,autoCapitalize:null,autoComplete:wi,autoFocus:W,autoPlay:W,blocking:wi,capture:null,charSet:null,checked:W,cite:null,className:wi,closedBy:null,colorSpace:null,cols:G,colSpan:G,command:null,commandFor:null,content:null,contentEditable:Si,controls:W,controlsList:wi,coords:G|Ti,crossOrigin:null,data:null,dateTime:null,decoding:null,default:W,defer:W,dir:null,dirName:null,disabled:W,download:Ci,draggable:Si,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:W,formTarget:null,headers:wi,height:G,hidden:Ci,high:G,href:null,hrefLang:null,htmlFor:wi,httpEquiv:wi,id:null,imageSizes:null,imageSrcSet:null,inert:W,inputMode:null,integrity:null,is:null,isMap:W,itemId:null,itemProp:wi,itemRef:wi,itemScope:W,itemType:wi,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:W,low:G,manifest:null,max:null,maxLength:G,media:null,method:null,min:null,minLength:G,multiple:W,muted:W,name:null,nonce:null,noModule:W,noValidate:W,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:W,optimum:G,pattern:null,ping:wi,placeholder:null,playsInline:W,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:W,referrerPolicy:null,rel:wi,required:W,reversed:W,rows:G,rowSpan:G,sandbox:wi,scope:null,scoped:W,seamless:W,selected:W,shadowRootClonable:W,shadowRootCustomElementRegistry:W,shadowRootDelegatesFocus:W,shadowRootMode:null,shadowRootSerializable:W,shape:null,size:G,sizes:null,slot:null,span:G,spellCheck:Si,src:null,srcDoc:null,srcLang:null,srcSet:null,start:G,step:null,style:null,tabIndex:G,target:null,title:null,translate:null,type:null,typeMustMatch:W,useMap:null,value:Si,width:G,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:wi,axis:null,background:null,bgColor:null,border:G,borderColor:null,bottomMargin:G,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:W,declare:W,event:null,face:null,frame:null,frameBorder:null,hSpace:G,leftMargin:G,link:null,longDesc:null,lowSrc:null,marginHeight:G,marginWidth:G,noResize:W,noHref:W,noShade:W,noWrap:W,object:null,profile:null,prompt:null,rev:null,rightMargin:G,rules:null,scheme:null,scrolling:Si,standby:null,summary:null,text:null,topMargin:G,valueType:null,version:null,vAlign:null,vLink:null,vSpace:G,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:W,disablePictureInPicture:W,disableRemotePlayback:W,exportParts:Ti,part:wi,prefix:null,property:null,results:G,security:null,unselectable:null},space:`html`,transform:Pi}),Ii=ji({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Ei,accentHeight:G,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:G,amplitude:G,arabicForm:null,ascent:G,attributeName:null,attributeType:null,azimuth:G,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:G,by:null,calcMode:null,capHeight:G,className:wi,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:G,diffuseConstant:G,direction:null,display:null,dur:null,divisor:G,dominantBaseline:null,download:W,dx:null,dy:null,edgeMode:null,editable:null,elevation:G,enableBackground:null,end:null,event:null,exponent:G,externalResourcesRequired:null,fill:null,fillOpacity:G,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ti,g2:Ti,glyphName:Ti,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:G,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:G,horizOriginX:G,horizOriginY:G,id:null,ideographic:G,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:G,k:G,k1:G,k2:G,k3:G,k4:G,kernelMatrix:Ei,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:G,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:G,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:G,overlineThickness:G,paintOrder:null,panose1:null,path:null,pathLength:G,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:wi,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:G,pointsAtY:G,pointsAtZ:G,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ei,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ei,rev:Ei,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ei,requiredFeatures:Ei,requiredFonts:Ei,requiredFormats:Ei,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:G,specularExponent:G,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:G,strikethroughThickness:G,string:null,stroke:null,strokeDashArray:Ei,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:G,strokeOpacity:G,strokeWidth:null,style:null,surfaceScale:G,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ei,tabIndex:G,tableValues:null,target:null,targetX:G,targetY:G,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ei,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:G,underlineThickness:G,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:G,values:null,vAlphabetic:G,vMathematical:G,vectorEffect:null,vHanging:G,vIdeographic:G,version:null,vertAdvY:G,vertOriginX:G,vertOriginY:G,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:G,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Ni}),Li=ji({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Ri=ji({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Pi}),zi=ji({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Bi=/[A-Z]/g,Vi=/-[a-z]/g,Hi=/^data[-\w.:]+$/i;function Ui(e,t){let n=vi(t),r=t,i=yi;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Hi.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Vi,Gi);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Vi.test(e)){let n=e.replace(Bi,Wi);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=ki}return new i(r,t)}function Wi(e){return`-`+e.toLowerCase()}function Gi(e){return e.charAt(1).toUpperCase()}var Ki=_i([Mi,Fi,Li,Ri,zi],`html`),qi=_i([Mi,Ii,Li,Ri,zi],`svg`),Ji={}.hasOwnProperty;function Yi(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&Ji.call(t,e)){let n=String(t[e]);i=Ji.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var Xi=/["&'<>`]/g,Zi=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Qi=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,$i=/[|\\{}()[\]^$+*?.]/g,ea=new WeakMap;function ta(e,t){return e=e.replace(t.subset?na(t.subset):Xi,r),t.subset||t.escapeOnly?e:e.replace(Zi,n).replace(Qi,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function na(e){let t=ea.get(e);return t||(t=ra(e),ea.set(e,t)),t}function ra(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace($i,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var ia=/[\dA-Fa-f]/;function aa(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!ia.test(String.fromCharCode(t))?r:r+`;`}var oa=/\d/;function sa(e,t,n){let r=`&#`+String(e);return n&&t&&!oa.test(String.fromCharCode(t))?r:r+`;`}var ca=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),la={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:`­`,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:`‌`,zwj:`‍`,lrm:`‎`,rlm:`‏`,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},ua=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],da={}.hasOwnProperty,fa={},pa;for(pa in la)da.call(la,pa)&&(fa[la[pa]]=pa);var ma=/[^\dA-Za-z]/;function ha(e,t,n,r){let i=String.fromCharCode(e);if(da.call(fa,i)){let e=fa[i],a=`&`+e;return n&&ca.includes(e)&&!ua.includes(e)&&(!r||t&&t!==61&&ma.test(String.fromCharCode(t)))?a:a+`;`}return``}function ga(e,t,n){let r=aa(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=ha(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=sa(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function _a(e,t){return ta(e,Object.assign({format:ga},t))}var va=/^>|^->|<!--|-->|--!>|<!-$/g,ya=[`>`],ba=[`<`,`>`];function xa(e,t,n,r){return r.settings.bogusComments?`<?`+_a(e.value,Object.assign({},r.settings.characterReferences,{subset:ya}))+`>`:`<!--`+e.value.replace(va,i)+`-->`;function i(e){return _a(e,Object.assign({},r.settings.characterReferences,{subset:ba}))}}function Sa(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function Ca(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function wa(e){return e.join(` `).trim()}var Ta=/[ \t\n\f\r]/g;function Ea(e){return typeof e==`object`?e.type===`text`&&Da(e.value):Da(e)}function Da(e){return e.replace(Ta,``)===``}var Oa=ja(1),ka=ja(-1),Aa=[];function ja(e){return t;function t(t,n,r){let i=t?t.children:Aa,a=(n||0)+e,o=i[a];if(!r)for(;o&&Ea(o);)a+=e,o=i[a];return o}}var Ma={}.hasOwnProperty;function Na(e){return t;function t(t,n,r){return Ma.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var Pa=Na({body:La,caption:Fa,colgroup:Fa,dd:Va,dt:Ba,head:Fa,html:Ia,li:za,optgroup:Ua,option:Wa,p:Ra,rp:Ha,rt:Ha,tbody:Ka,td:Ya,tfoot:qa,th:Ya,thead:Ga,tr:Ja});function Fa(e,t,n){let r=Oa(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&Ea(r.value.charAt(0)))}function Ia(e,t,n){let r=Oa(n,t);return!r||r.type!==`comment`}function La(e,t,n){let r=Oa(n,t);return!r||r.type!==`comment`}function Ra(e,t,n){let r=Oa(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||n.type!==`element`||n.tagName!==`a`&&n.tagName!==`audio`&&n.tagName!==`del`&&n.tagName!==`ins`&&n.tagName!==`map`&&n.tagName!==`noscript`&&n.tagName!==`video`}function za(e,t,n){let r=Oa(n,t);return!r||r.type===`element`&&r.tagName===`li`}function Ba(e,t,n){let r=Oa(n,t);return!(!r||r.type!==`element`||r.tagName!==`dt`&&r.tagName!==`dd`)}function Va(e,t,n){let r=Oa(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function Ha(e,t,n){let r=Oa(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function Ua(e,t,n){let r=Oa(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function Wa(e,t,n){let r=Oa(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function Ga(e,t,n){let r=Oa(n,t);return!(!r||r.type!==`element`||r.tagName!==`tbody`&&r.tagName!==`tfoot`)}function Ka(e,t,n){let r=Oa(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function qa(e,t,n){return!Oa(n,t)}function Ja(e,t,n){let r=Oa(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function Ya(e,t,n){let r=Oa(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var Xa=Na({body:$a,colgroup:eo,head:Qa,html:Za,tbody:to});function Za(e){let t=Oa(e,-1);return!t||t.type!==`comment`}function Qa(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function $a(e){let t=Oa(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&Ea(t.value.charAt(0)))&&(t.type!==`element`||t.tagName!==`meta`&&t.tagName!==`link`&&t.tagName!==`script`&&t.tagName!==`style`&&t.tagName!==`template`)}function eo(e,t,n){let r=ka(n,t),i=Oa(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&Pa(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function to(e,t,n){let r=ka(n,t),i=Oa(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&Pa(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var no={name:[[`
3
3
  \f\r &/=>`.split(``),`
4
4
  \f\r "&'/=>\``.split(``)],[`\0
5
5
  \f\r "&'/<=>`.split(``),`\0
@@ -1567,7 +1567,7 @@ XID_Start XIDS`.split(/\s/).map(e=>[al(e),e])),Ql=new Map([[`s`,Ll(383)],[Ll(383
1567
1567
  }`}function aP(e){return`${rP}
1568
1568
  @layer unsafe {
1569
1569
  ${e}
1570
- }`}var oP=new WeakMap;function sP(e){let t=oP.get(e);if(t!=null)return t;let n=document.createElement(`div`);n.setAttribute(aA,`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(),oP.set(e,i),i}function cP(e,t){if(!e.isConnected)return;let n=sP(t);if(n==null)return;let r=t.querySelector(`style[${oA}]`),i=r instanceof HTMLStyleElement?r:document.createElement(`style`);r instanceof HTMLStyleElement||(i.setAttribute(oA,``),t.appendChild(i)),i.textContent=`:host { ${sA}: ${n}px; }`}var lP;function uP(e){if(typeof CSSStyleSheet<`u`&&typeof CSSStyleSheet.prototype.replaceSync==`function`&&`adoptedStyleSheets`in e){lP??(lP=new CSSStyleSheet,lP.replaceSync(iP(nP)));let t=!1;try{e.adoptedStyleSheets=[lP],t=!0}catch{}if(t){e.querySelector(`style[${rA}]`)?.remove();return}}if(e.querySelector(`style[data-file-tree-style]`)==null){let t=document.createElement(`style`);t.setAttribute(rA,``),t.textContent=iP(nP),e.prepend(t)}}function dP(e,t){fP(e,t),uP(t),cP(e,t)}function fP(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`});dP(this,e)}}if(customElements.define(nA,e),typeof document<`u`)for(let e of Array.from(document.querySelectorAll(nA)))e instanceof HTMLElement&&dP(e,e.shadowRoot??e.attachShadow({mode:`open`}))}var pP=e=>e.startsWith(`f::`)?e.slice(3):e;function mP(e){let t=e.lastIndexOf(`/`);return t<0?{parentPath:``,baseName:e}:{parentPath:e.slice(0,t),baseName:e.slice(t+1)}}function hP(e,t){return e===``?t:`${e}/${t}`}function gP({files:e,path:t,isFolder:n,nextBasename:r}){let i=pP(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}=mP(i);if(a===s)return{nextFiles:e,sourcePath:i,destinationPath:i,isFolder:n};let c=hP(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 _P(e){return e.endsWith(`/`)}function vP(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 yP(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 bP(e,t){return t.includes(e)?yP(t):[e]}function xP(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 SP(e,t){return{draggedPaths:e,target:t}}function CP(e,t){if(t.kind!==`directory`||t.directoryPath==null)return!1;for(let n of e)if(_P(n)&&(t.directoryPath===n||t.directoryPath.startsWith(n)))return!0;return!1}function wP(e,t){return t.kind===`root`||t.directoryPath==null?vP(e):t.directoryPath}function TP(e,t){let n=e.map(e=>{let n=wP(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 EP(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 DP(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(!EP(XN.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 OP(e){return e.operation===`add`||e.operation===`remove`||e.operation===`move`||e.operation===`batch`}function kP(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 AP(e,t){if(e===t)return!0;let n=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(n)}function jP(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 AP(e,t.path)?n?e:null:e;case`move`:return kP(e,t.from,t.to);case`batch`:{let r=e;for(let e of t.events)if(r=jP(r,e,n),r==null)return null;return r}}}function MP(e){return{canonicalChanged:e.canonicalChanged,projectionChanged:e.projectionChanged,visibleCountDelta:e.visibleCountDelta}}function NP(e){switch(e.operation){case`add`:return{...MP(e),operation:`add`,path:e.path};case`remove`:return{...MP(e),operation:`remove`,path:e.path,recursive:e.recursive};case`move`:return{...MP(e),from:e.from,operation:`move`,to:e.to}}}function PP(e){return{...MP(e),events:e.events.filter(e=>e.operation===`add`||e.operation===`remove`||e.operation===`move`).map(e=>NP(e)),operation:`batch`}}function FP(e){switch(e.operation){case`add`:case`remove`:case`move`:return NP(e);case`batch`:return PP(e);default:return null}}function IP(e,t){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function LP(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 RP(e){return LP(e).at(-1)??null}function zP(e,t){return t==null?e:e.startsWith(t)?e.slice(t.length):e}function BP(e){return e.endsWith(`/`)}var VP=e=>e.toLowerCase();function HP(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`);return n<0?t:t.slice(n+1)}function UP(e){return e.endsWith(`/`)?e.slice(0,-1):e}function WP(e,t){return t&&!e.endsWith(`/`)?`${e}/`:e}var GP=e=>{let t=e.trim();return t.length===0?``:(t.includes(`\\`)?t.replaceAll(`\\`,`/`):t).toLowerCase()},KP=Symbol(`FILE_TREE_RENAME_VIEW`),qP=512,JP=512;function YP(e){return e===`top`||e===`center`?e:`nearest`}function XP(e,t,n){if(e===0)return-1;if(n!=null){let e=t(n);if(e!=null)return e;let r=LP(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 ZP(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:XP(e.paths.length,r,t),getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex}}var QP=class e{static{Object.defineProperty(e.prototype,KP,{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=DP({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=RP(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:YP(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<=JP){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];r!=null&&r===a+1?a=r:(i>=0&&this.#H.getVisibleSlice(i,a).forEach((e,n)=>{t.set(i+n,e)}),r==null?(i=-1,a=-1):(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);t!=null&&(this.#B.has(t)?this.deselectPath(t):this.selectPath(t))}togglePathSelectionFromInput(e){let t=this.#Ne(e);t!=null&&(this.#B.has(t)?this.#ae([...this.#B].filter(e=>e!==t),t):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=bP(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=SP(t.draggedPaths,n);(CP(t.draggedPaths,n)||this.#r?.canDrop?.(e)===!1)&&(n=null)}xP(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=SP(e.draggedPaths,t);if(CP(e.draggedPaths,t)||this.#r?.canDrop?.(n)===!1)return this.#De(),!1;let r=TP(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=BP(r),a=UP(r);if(this.#C?.({isFolder:i,path:a})===!1)return!1;for(let e of LP(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=HP(r),this.#D=t.removeIfCanceled??!1,this.#De(),!0}#q(){if(this.#T==null)return;let e=this.#T,t=this.#D;this.#T=null,this.#E=``,this.#D=!1,t?this.remove(e,BP(e)?{recursive:!0}:void 0):(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,BP(e)?{recursive:!0}:void 0);return}let t=BP(e),n=gP({files:this.#H.list(),isFolder:t,nextBasename:this.#E,path:UP(e)});this.#T=null,this.#E=``,this.#D=!1,`error`in n?(this.#Pe(e),this.#v?.(n.error),this.#De()):n.sourcePath===n.destinationPath?(this.#Pe(e),this.#De()):(this.#_?.({destinationPath:n.destinationPath,isFolder:n.isFolder,sourcePath:n.sourcePath}),this.move(WP(n.sourcePath,t),WP(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=DP({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=!IP(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=RP(e),n=zP(e,t),r=null,i=null;for(let e of this.#be()){if(RP(e)!==t)continue;let a=zP(e,t);if(a<n)r=e;else if(a>n){i=e;break}}return r??i}#Z(e){let t=this.#Ce(e);if(t!==-1)return t;let n=LP(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=!IP(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 XN({...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 LP(t))e.add(n)}return this.#m=[...e].sort(),this.#m}#fe(){return this.#g??=this.#ue().map(VP),this.#g}#pe(){return this.#f??=this.#de().filter(e=>e.endsWith(`/`)),this.#f}#me(){return this.#p??=this.#pe().map(VP),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 LP(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:GP(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 LP(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 LP(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=ZP(this.#H.getVisibleTreeProjectionData(t?void 0:Math.min(n,qP)),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=jP(this.#T,e);t==null&&this.#T!=null&&(this.#E=``),this.#T=t;let n=jP(this.#c,e,!0),r=[...this.#B].map(t=>jP(t,e)).filter(e=>e!=null).map(e=>this.#H.getPathInfo(e)?.path??null).filter(e=>e!=null),i=jP(this.#z,e),a=i==null?null:this.#H.getPathInfo(i)?.path??null,o=[...new Set(r)];return IP(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&&OP(e)&&(this.#i=null);let t=OP(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=FP(e);i!=null&&this.#Oe(i)})}#ze(e){this.#H.isExpanded(e)?this.#ie(e):this.#ke(e)}},$P=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 eF(e){let t=e.endsWith(`/`),n=``,r=-1;for(let t=0;t<=e.length;t+=1)e[t]!==`/`&&t!==e.length?r===-1&&(r=t):r!==-1&&(n!==``&&(n+=`/`),n+=e.slice(r,t),r=-1);return n===``?null:{isDirectory:t,path:n}}function tF(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 nF(e,t){return t?`${e}/`:e}function rF(e,t=null){let n=$P(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=aF(t);e!=null&&cF({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 iF(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=oF(e);t!=null&&(c=sF({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,statusByPath:i})||c)}for(let e of r){let t=aF(e);t!=null&&(c=cF({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:dF(i),statusByPath:i}:e}function aF(e){return oF(e.path)}function oF(e){let t=eF(e);if(t!=null)return{canonicalPath:nF(t.path,t.isDirectory),isDirectory:t.isDirectory}}function sF({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),uF(t,n,e),!0)}function cF({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,isDirectory:i,status:a,statusByPath:o}){let s=o.get(e);return s!==a&&(s??lF(t,n,e),o.set(e,a),a===`ignored`&&i?r.add(e):i&&r.delete(e),!0)}function lF(e,t,n){for(let r of tF(n))e.set(r,(e.get(r)??0)+1),t.add(r)}function uF(e,t,n){for(let r of tF(n)){let n=(e.get(r)??0)-1;n>0?e.set(r,n):(e.delete(r),t.delete(r))}}function dF(e){let t=`${e.size}`;for(let[n,r]of e)t+=`\0${n}\0${r}`;return t}var fF,pF,mF,hF,gF,_F,vF,yF,bF,xF,SF={},CF=[],wF=Array.isArray,TF=CF.slice,EF=Object.assign;function DF(e){e&&e.parentNode&&e.remove()}function OF(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?TF.call(arguments,2):n),kF(e,o,r,i,null)}function kF(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??++pF,__i:-1,__u:0};return i==null&&fF.vnode!=null&&fF.vnode(a),a}function AF(e){return e.children}function jF(e,t){this.props=e,this.context=t,this.__g=0}function MF(e,t){if(t==null)return e.__?MF(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`?MF(e):null}function NF(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 NF(e)}}function PF(e){(8&e.__g||!(e.__g|=8)||!mF.push(e)||gF++)&&hF==fF.debounceRendering||((hF=fF.debounceRendering)||queueMicrotask)(FF)}function FF(){for(var e,t,n,r,i,a,o,s,c=1;mF.length;)mF.length>c&&mF.sort(_F),e=mF.shift(),c=mF.length,8&e.__g&&(n=void 0,i=(r=(t=e).__v).__e,a=[],o=[],(s=t.__P)&&((n=EF({},r)).__v=r.__v+1,fF.vnode&&fF.vnode(n),UF(s,n,r,t.__n,s.namespaceURI,32&r.__u?[i]:null,a,i??MF(r),!!(32&r.__u),o,s.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,GF(a,n,o),n.__e!=i&&NF(n)));gF=0}function IF(e,t,n,r,i,a,o,s,c,l,u,d){var f,p,m,h,g,_,v,y=r&&r.__k||CF,b=t.length;for(c=LF(n,t,y,c,b),f=0;f<b;f++)(m=n.__k[f])!=null&&(p=m.__i==-1?SF:y[m.__i]||SF,m.__i=f,_=UF(e,m,p,i,a,o,s,c,l,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&JF(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=RF(m,c,e,v):typeof m.type==`function`&&_!==void 0?c=_:h&&(c=h.nextSibling),m.__u&=-7);return n.__e=g,c}function LF(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?kF(null,o,null,null,null):wF(o)?kF(AF,{children:o},null,null,null):o.constructor==null&&o.__b>0?kF(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=zF(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=MF(s)),YF(s,s));return r}function RF(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=RF(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=MF(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function zF(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 BF(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n??``}function VF(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||BF(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||BF(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(vF,`$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=yF,e.addEventListener(t,a?xF:bF,a)):e.removeEventListener(t,a?xF:bF,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 HF(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=yF++;else if(t.u<n.l)return;return n(fF.event?fF.event(t):t)}}}function UF(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M=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=fF.__b)&&d(t);n:if(typeof M==`function`)try{if(v=t.props,y=`prototype`in M&&M.prototype.render,b=(d=M.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 M(v,x):(t.__c=f=new jF(v,x),f.constructor=M,f.render=XF),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&&M.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=EF({},f.__s)),EF(f.__s,M.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&M.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&M.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=fF.__r,w=0,y){for(f.state=f.__s,f.__g&=-9,C&&C(t),d=f.render(f.props,f.state,f.context),T=0;T<f._sb.length;T++)f.__h.push(f._sb[T]);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&&++w<25);f.state=f.__s,f.getChildContext!=null&&(r=EF({},r,f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),E=d,d!=null&&d.type===AF&&d.key==null&&(E=KF(d.props.children)),s=IF(e,wF(E)?E:[E],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(D=0,O=!1,t.__u|=c?160:128,t.__c.__z=[],k=0;k<a.length;k++)(A=a[k])==null||O||(A.nodeType==8&&A.data==`$s`?(D>0&&t.__c.__z.push(A),D++,a[k]=null):A.nodeType==8&&A.data==`/$s`?(--D>0&&t.__c.__z.push(A),O=D===0,s=a[k],a[k]=null):D>0&&(t.__c.__z.push(A),a[k]=null));if(!O){for(;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__c.__z=[s]}t.__e=s}else{for(j=a.length;j--;)DF(a[j]);WF(t)}}else t.__e=n.__e,t.__k=n.__k,e.then||WF(t);fF.__e(e,t,n)}else s=t.__e=qF(n.__e,t,n,r,i,a,o,c,l,u);return(d=fF.diffed)&&d(t),128&t.__u?void 0:s}function WF(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(WF)}function GF(e,t,n){for(var r=0;r<n.length;r++)JF(n[r],n[++r],n[++r]);fF.__c&&fF.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){fF.__e(e,t.__v)}})}function KF(e){return typeof e!=`object`||!e||e.__b&&e.__b>0?e:wF(e)?e.map(KF):EF({},e)}function qF(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&&=(fF.__m&&fF.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a&&=TF.call(e.childNodes),v=n.props||SF,!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;VF(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&&!_||VF(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=``),IF(b==`template`?e.content:e,wF(p)?p:[p],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&MF(n,0),s,c,l),a!=null)for(u=a.length;u--;)DF(a[u]);s||(u=`value`,b==`progress`&&h==null?e.removeAttribute(`value`):h==null||h===e[u]&&(b!==`progress`||h)||VF(e,u,h,v[u],i),u=`checked`,g!=null&&g!=e[u]&&VF(e,u,g,v[u],i))}return e}function JF(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){fF.__e(e,n)}}function YF(e,t,n){var r,i;if(fF.unmount&&fF.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||JF(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){fF.__e(e,t)}r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&YF(r[i],t,n||typeof e.type!=`function`);n||DF(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function XF(e,t,n){return this.constructor(e,n)}function ZF(e,t){var n,r,i,a;t==document&&(t=document.documentElement),fF.__&&fF.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=OF(AF,null,[e]),i=[],a=[],UF(t,e,r||SF,SF,t.namespaceURI,r?null:t.firstChild?TF.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,a,t.ownerDocument),GF(i,e,a)}function QF(e,t){e.__u|=32,ZF(e,t)}fF={__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 gF=0,e}},pF=0,jF.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=EF({},this.state);typeof e==`function`&&(e=e(EF({},n),this.props)),e&&EF(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),PF(this))},jF.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),PF(this))},jF.prototype.render=AF,mF=[],gF=0,_F=function(e,t){return e.__v.__b-t.__v.__b},vF=/(PointerCapture)$|Capture$/i,yF=0,bF=HF(!1),xF=HF(!0);var $F=0;Array.isArray;function Q(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:--$F,__i:-1,__u:0,__source:i,__self:a};return fF.vnode&&fF.vnode(l),l}var eI=16,tI=16,nI={};function rI({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}=nI[e]??{width:eI,height:tI},f=r??l,p=i??u,m=a??d??`0 0 ${l} ${u}`;return Q(`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:Q(`use`,{href:c})})}var iI=e=>e!==void 0&&/\s/.test(e),aI=(e,t)=>{let n=t=>iI(e[t-1])||iI(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},oI=e=>aI(e,Math.ceil(e.length/2)),sI=e=>{if(e.length<2)return[e,``];let t=oI(e);return[e.slice(0,t),e.slice(t)]},cI=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`.`)+1,n=e.length-t>10,r=t>=1&&!n?t:oI(e);return[e.slice(0,r),e.slice(r)]},lI=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)]},uI=(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)]},dI=(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)]},fI=(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 pI({children:e,marker:t,variant:n=`default`}){"use no memo";return Q(`div`,{"aria-hidden":!0,"data-truncate-marker-cell":!0,children:Q(`div`,{"data-truncate-marker":!0,children:typeof t==`function`?t({children:e}):n===`fade`?Q(`span`,{"data-truncate-fade":!0}):t})})}function mI(e){"use no memo";let{mode:t,children:n}=e;return Q(`div`,{children:[Q(`div`,{"data-truncate-content":`visible`,children:t===`fruncate`?Q(`span`,{children:n}):n}),Q(`div`,{"data-truncate-content":`overflow`,"aria-hidden":!0,children:t===`fruncate`?Q(`span`,{children:n}):n})]})}function hI({children:e,mode:t=`truncate`,marker:n=`…`,variant:r=`default`,...i}){"use no memo";let a=Q(mI,{mode:t,children:e},`content`),o=Q(pI,{marker:n,mode:t,variant:r},`marker`),s=Q(`div`,{"data-truncate-fill":!0},`fill`);return Q(`div`,{"data-truncate-container":t,"data-truncate-variant":r,...i,children:Q(`div`,{"data-truncate-grid":!0,children:t===`truncate`?[a,o]:[o,a,s]})})}function gI({children:e,...t}){"use no memo";return Q(hI,{mode:`truncate`,...t,children:e})}function _I({children:e,...t}){"use no memo";return Q(hI,{mode:`fruncate`,...t,children:e})}function vI({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=Q(gI,{...s,children:t[0]}),l=Q(_I,{...s,children:t[1]})}else{if(typeof e!=`string`)return console.error(`MiddleTruncate: children must be a string`),null;if(e.length===0)return Q(`div`,{className:a,style:o});if(e.length<i)return Q(n===`end`?_I:gI,{...s,className:a,style:o,children:e});let t=null,u=null,d=null;if(typeof r==`string`)r===`center`?t=sI:r===`extension`?t=cI:r===`leaf-path`&&(t=lI);else if(typeof r==`number`)t=uI,u=r;else if(Array.isArray(r)){let[e,n]=r;d=n,e===`last`?t=dI:e===`first`&&(t=fI)}else typeof r==`function`&&(t=r);t??=sI;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=Q(gI,{...s,..._,children:f}),l=Q(_I,{...s,...v,children:p})}return Q(`div`,{"data-truncate-group-container":`middle`,className:a,style:o,children:[Q(`div`,{"data-truncate-segment-priority":n===`start`||n===`equal`?`1`:`2`,children:c}),Q(`div`,{"data-truncate-segment-priority":n===`end`||n===`equal`?`1`:`2`,children:l})]})}var yI={endIndex:-1,startIndex:-1};function bI(e,t,n){return Math.min(Math.max(e,t),n)}function xI(e,t){return e<0||t<e?yI:{endIndex:t,startIndex:e}}function SI(e){return e.startIndex<0||e.endIndex<e.startIndex}function CI(e,t){return SI(e)?0:(e.endIndex-e.startIndex+1)*t}function wI(e,t,n){if(t<=0)return-1;let r=t*n;return e<=0?0:e>=r?t:Math.floor(e/n)}function TI(e,t,n){return t<=0||e<=0?-1:e>=t*n?t-1:Math.ceil(e/n)-1}function EI(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);i==null?t.set(r,[n]):i.push(n)}),t}function DI(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;o<=t?(i=a,n=a+1):r=a-1}return i}function OI(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 kI(e,t,n){if(e.length===0||t<=0)return[];let r=OI(e),i=EI(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=DI(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 AI(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=bI(t.scrollTop,0,o),c=t.stickyRows??kI(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=wI(s,n,t.itemHeight),m=wI(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?yI:xI(m,TI(u+d,n,t.itemHeight)),y=g+1,b=SI(v)?yI:xI(Math.max(y,v.startIndex-a),Math.min(n-1,v.endIndex+a)),x=CI(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:SI(b)?0:b.startIndex*t.itemHeight,startIndex:b.startIndex}}}var jI={added:`A`,deleted:`D`,ignored:null,modified:`M`,renamed:`R`,untracked:`U`},MI={added:`Git status: added`,deleted:`Git status: deleted`,ignored:`Git status: ignored`,modified:`Git status: modified`,renamed:`Git status: renamed`,untracked:`Git status: untracked`},NI=`Contains git status items`;function PI(e){return e.current?!0:(e.current=!0,!1)}function FI(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 II(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,offset:i,topInset:a=0,totalHeight:o,viewportHeight:s}=e;if(i===`nearest`)return FI({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 LI(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 RI(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 zI(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 BI(e,t){if(e==null)return t;let n=e.getBoundingClientRect().height;return n>0?n:e.clientHeight>0?e.clientHeight:t}function VI(e,t){return e!=null&&e>0?e:t}function HI(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 UI(e,t,n,r,i=0){let a=FI({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,topInset:i,viewportHeight:r});return a!=null&&(e.scrollTop=a,!0)}function WI(e,t,n,r,i,a,o=0){let s=II({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,offset:a,topInset:o,totalHeight:i,viewportHeight:r});return s!=null&&(e.scrollTop=s,!0)}function GI(e,t,n,r,i,a){let o=LI({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,targetViewportOffset:a,totalHeight:i,viewportHeight:r});return o!=null&&(e.scrollTop=o,!0)}function KI(e,t,n,r){return n.end<n.start?null:e<n.start?-t:e>n.end?r:null}function qI(e){let{renamingPath:t,previousRenamingPath:n,hasRenderedInput:r}=e;return t==null?`reset`:r?n===t?`ignore`:`focus-input`:`reveal-canonical`}function JI({ariaLabel:e,isFlattened:t=!1,ref:n,value:r,onBlur:i,onInput:a}){return Q(`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 YI(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 XI(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 ZI,QI,$I,eL,tL=Object.is,nL=0,rL=[],iL=fF,aL=iL.__b,oL=iL.__r,sL=iL.diffed,cL=iL.__c,lL=iL.unmount,uL=iL.__;function dL(e,t){iL.__h&&iL.__h(QI,e,nL||t),nL=0;var n=QI.__H||(QI.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function fL(e){return nL=1,pL(wL,e)}function pL(e,t,n){var r=dL(ZI++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):wL(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);tL(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=QI,!QI.__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,tL(t,e.__[0])||(o=!0)}}),a&&a.call(this,e,t,n)||o};QI.__f=!0;var a=QI.shouldComponentUpdate,o=QI.componentWillUpdate;QI.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)},QI.shouldComponentUpdate=i}return r.__N||r.__}function mL(e,t){var n=dL(ZI++,3);!iL.__s&&CL(n.__H,t)&&(n.__=e,n.u=t,QI.__H.__h.push(n))}function hL(e,t){var n=dL(ZI++,4);!iL.__s&&CL(n.__H,t)&&(n.__=e,n.u=t,QI.__h.push(n))}function $(e){return nL=5,gL(function(){return{current:e}},[])}function gL(e,t){var n=dL(ZI++,7);return CL(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function _L(e,t){return nL=8,gL(function(){return e},t)}function vL(){for(var e;e=rL.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(xL),e.__H.__h.forEach(SL),e.__H.__h=[]}catch(t){e.__H.__h=[],iL.__e(t,e.__v)}}iL.__b=function(e){QI=null,aL&&aL(e)},iL.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),uL&&uL(e,t)},iL.__r=function(e){oL&&oL(e),ZI=0;var t=(QI=e.__c).__H;t&&($I===QI?(t.__h=[],QI.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(xL),t.__h.forEach(SL),t.__h=[],ZI=0)),$I=QI},iL.diffed=function(e){sL&&sL(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(rL.push(t)!==1&&eL===iL.requestAnimationFrame||((eL=iL.requestAnimationFrame)||bL)(vL)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),$I=QI=null},iL.__c=function(e,t){t.some(function(e){try{e.__h.forEach(xL),e.__h=e.__h.filter(function(e){return!e.__||SL(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],iL.__e(n,e.__v)}}),cL&&cL(e,t)},iL.unmount=function(e){lL&&lL(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{xL(e)}catch(e){t=e}}),n.__H=void 0,t&&iL.__e(t,n.__v))};var yL=typeof requestAnimationFrame==`function`;function bL(e){var t,n=function(){clearTimeout(r),yL&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);yL&&(t=requestAnimationFrame(n))}function xL(e){var t=QI,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),QI=t}function SL(e){var t=QI;e.__c=e.__(),QI=t}function CL(e,t){return!e||e.length!==t.length||t.some(function(t,n){return!tL(t,e[n])})}function wL(e,t){return typeof t==`function`?t(e):t}function TL(e,t=null,n=null){"use no memo";let r=e.flattenedSegments;return r==null||r.length===0?t??e.name:Q(`span`,{"data-item-flattened-subitems":!0,children:r.map((e,i)=>{let a=i===r.length-1;return Q(AF,{children:[Q(`span`,{"data-item-flattened-subitem":e.path,"data-item-flattened-subitem-drag-target":n===e.path?`true`:void 0,children:a&&t!=null?t:Q(gI,{children:e.name})}),i<r.length-1?` / `:``]},e.path)})})}function EL(e){return e.isFlattened?e.flattenedSegments?.findLast(e=>e.isTerminal)?.path??e.path:e.path}function DL(e){let t=e.flattenedSegments;return t==null||t.length===0?e.name:t.map(e=>e.name).join(` / `)}function OL(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 kL({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=AI(c,{itemHeight:t,overscan:n,scrollTop:r,stickyRows:s==null?void 0:OL(s,r,t,o),totalRowCount:o,viewportHeight:a}),u=i&&r<=0&&o>0?e.getStickyRowCandidates(1,t):[],d=u!=null&&r<=0?OL(u,1,t,o):i&&r<=0&&c.length>0?kI(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 AL=400,jL=40,ML=18;function NL(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))?PL(e,t,n):a instanceof HTMLElement?a:null}function PL(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 FL(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 IL(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 LL(){return navigator.vendor!==`Apple Computer, Inc.`}function RL(e,t){let n=e-t.top;if(n<jL)return-Math.ceil((jL-Math.max(0,n))/jL*ML);let r=t.bottom-e;return r<jL?Math.ceil((jL-Math.max(0,r))/jL*ML):0}function zL(e,t){if(e!=null){let t=jI[e];return t==null?null:{text:t,title:MI[e]}}return t?{icon:{name:`file-tree-icon-dot`,width:6,height:6},title:NI}:null}function BL(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 VL(e){return e!=null&&`toggle`in e}function HL(e){return e.code===`Space`||e.key===` `||e.key===`Spacebar`}function UL(e){return e.key.length===1&&/^[\p{L}\p{N}]$/u.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey}function WL(e){return e==null?``:`[data-item-section="spacing-item"][data-ancestor-path="${e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`)}"] { opacity: 1; }`}function GL(e){return e.shiftKey&&e.key===`F10`||e.key===`ContextMenu`}function KL(e,t){return t&&GL(e)||(e.ctrlKey||e.metaKey)&&HL(e)?!0:e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`||e.key===`ArrowUp`}var qL=new Set([`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`]);function JL(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 YL(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 XL(e,t){return{bottom:t,height:0,left:e,right:e,top:t,width:0,x:e,y:t}}function ZL(e,t){if(e==null)return t.offsetTop;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return n.top-r.top}function QL(e,t,n){n==null?e.delete(t):e.set(t,n)}function $L(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 eR(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 tR(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 nR(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=tR(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 rR(e,t){return{kind:e.kind,name:DL(e),path:t}}function iR(e){return e==null?void 0:`${e}__tree`}function aR(e,t,n){if(e!=null)return`${e}__focused-item-${encodeURIComponent(t)}${n?`__parked`:``}`}function oR(e){return e===`file-tree-icon-chevron`||e===`file-tree-icon-dot`||e===`file-tree-icon-file`||e===`file-tree-icon-lock`}function sR(e,t){if(e==null)return null;if(`text`in e)return e.parts==null?Q(`span`,{title:e.title,children:e.text}):Q(`span`,{title:e.title,children:e.parts.map((e,t)=>Q(`span`,{style:{color:e.color},children:e.text},t))});let n=typeof e.icon==`string`?oR(e.icon)?t(e.icon):{name:e.icon}:oR(e.icon.name)?(()=>{let n=t(e.icon.name),{name:r,...i}=e.icon;return{...n,...i}})():e.icon;return Q(`span`,{title:e.title,children:Q(rI,{...n})})}function cR(e){e!=null&&RI(e.querySelector([`button:not([disabled])`,`[href]`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `))??e)}function lR(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=EL(e);return Q(AF,{children:[e.depth>0?Q(`div`,{"data-item-section":`spacing`,children:Array.from({length:e.depth}).map((t,n)=>Q(`div`,{"data-item-section":`spacing-item`,"data-ancestor-path":e.ancestorPaths[n]},n))}):null,Q(`div`,{"data-item-section":`icon`,children:e.kind===`directory`?Q(rI,{...t(`file-tree-icon-chevron`)}):Q(rI,{...t(`file-tree-icon-file`,u)})}),Q(`div`,{"data-item-section":`content`,children:e.isFlattened?TL(e,c,a):c??Q(vI,{minimumLength:5,split:`extension`,children:e.name})}),i?Q(`div`,{"data-item-section":`decoration`,children:r==null?null:sR(r,t)}):null,s?Q(`div`,{"data-item-section":`git`,children:sR(o,t)}):null,n?Q(`div`,{"data-item-section":`action`,children:l?Q(`span`,{"aria-hidden":`true`,"data-item-action-affordance":`decorative`,children:Q(rI,{...t(`file-tree-icon-ellipsis`)})}):null}):null]})}function uR(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:w,contextMenuButtonVisibility:T,contextMenuRightClickEnabled:E,registerRenameInput:D,registerButton:O,resolveIcon:k,renderDecorationForRow:A,openContextMenuForRow:j,onRowClick:M,onKeyDown:N}=e,P=EL(t),{isParked:F=!1,mode:ee=`flow`,style:te}=r,ne=ee===`sticky`,I=_?.get(P)??null??BL(t.ancestorPaths,v,y),L=t.kind===`directory`&&(b?.has(P)??!1),R=A(t,P),re=zL(I,L),ie=S&&w,ae=R!=null||x||ie,oe=ie&&T===`always`,se=a.getPath()===P,ce=se?a.getValue():``,z=ne||!se?null:Q(JI,{ref:D,ariaLabel:`Rename ${DL(t)}`,isFlattened:t.isFlattened,value:ce,onBlur:()=>{a.commit()},onInput:e=>{a.setValue(e.currentTarget.value)}}),le=lR(t,k,{actionLaneEnabled:ie,customDecoration:R,decorationLaneEnabled:ae,dragTargetFlattenedSegmentPath:l?.flattenedSegmentPath??null,gitDecoration:re,gitLaneActive:x,renameInput:z,showDecorativeActionAffordance:oe}),ue={...YI({ariaLabel:DL(t),domId:t.isFocused?aR(h,P,F):void 0,extraStyle:te,features:{actionLaneEnabled:ie,contextMenuButtonVisibility:ie?T:null,contextMenuEnabled:S,contextMenuTriggerMode:S?C:null,gitLaneActive:x},isParked:F,itemHeight:g,mode:ee,row:t,state:{containsGitChange:L,effectiveGitStatus:I,isContextHovered:s===P,isDragTarget:l?.kind===`directory`&&l.directoryPath===P,isDragging:c?.has(P)===!0,isFocusRinged:t.isFocused&&o===P},targetPath:P}),key:n,onContextMenu:S||u?e=>{d()?e.preventDefault():S&&(e.preventDefault(),E&&(i.focusMountedPathFromInput(P),j(t,P,{anchorRect:XL(e.clientX,e.clientY),source:`right-click`})))}:void 0,onFocus:ne?void 0:()=>{i.focusMountedPathFromInput(P)},onKeyDown:ne?void 0:N,ref:e=>{O(P,e)}};return!ne&&se?Q(`div`,{...ue,children:le}):Q(`button`,{...ue,type:`button`,draggable:u&&!F,onDragEnd:u&&!F?p:void 0,onDragStart:u&&!F?e=>{f(e,t,P)}:void 0,onMouseDown:e=>{(ne||i.isSearchOpen())&&e.preventDefault()},onTouchStart:u&&!F?e=>{m(e,t,P)}:void 0,onClick:e=>{M(e,t,P,ee)},children:le})}function dR(e,t,n){return t.end<t.start?[]:e.controller.getVisibleRows(t.start,t.end).filter(e=>!n.has(EL(e))).map((n,r)=>uR(e,n,t.start+r))}function fR({composition:e,controller:t,gitStatusByPath:n,ignoredGitDirectories:r,directoriesWithGitChanges:i,icons:a,instanceId:o,itemHeight:s=tP,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 _=$(null),v=$(null),y=$(!1),b=$(null),x=$(null),S=$(null),C=$(null),w=$(null),T=$(new Map),E=$(new Map),D=$(()=>{}),O=$(null),k=$(0),A=$(!1),j=$(null);j.current!==t&&(A.current=!1,j.current=t);let M=$(!1),N=$(null),P=$(null),F=$(!1),ee=$(null),te=$(null),ne=$(null),I=$(null),L=$(null),R=$(null),re=$(null),ie=$(null),ae=$(!1),oe=$(null),se=$(null),ce=$(null),z=$(null),le=gL(()=>new Map,[]),[,ue]=fL(0),de=$(!1),[fe,B]=fL(null),[pe,me]=fL(null),[he,ge]=fL(null),[_e,ve]=fL(null),[ye,be]=fL(0),[V,xe]=fL(null),Se=$(V);Se.current=V;let Ce=$(null),we=$(null),Te=$(null),Ee=$(null),De=$(null),Oe=$(!1),ke=()=>{we.current=null,Te.current=null,Ee.current=null},Ae=(e,t)=>{we.current=e,Te.current=null,Ee.current=t==null?null:{path:e,scrollTop:t}},je=(e,t)=>{we.current=null,Te.current={path:e,viewportOffset:t},Ee.current=null},Me=$(d===`retain`&&t.isSearchOpen()),[Ne,Pe]=fL(p);mL(()=>{p||Pe(!1)},[p]);let Fe=$(!1),Ie=_L(()=>{Fe.current=!0,Pe(e=>e&&!1)},[]),[Le,Re]=fL(()=>kL({controller:t,itemHeight:s,overscan:c,scrollTop:0,stickyFolders:h,viewportHeight:g})),[ze,Be]=fL(!1);mL(()=>{Be(!0)},[]);let Ve=e?.contextMenu?.enabled===!0||e?.contextMenu?.render!=null||e?.contextMenu?.onOpen!=null||e?.contextMenu?.onClose!=null,He=e?.contextMenu?.triggerMode??(Ve?`right-click`:`both`),Ue=He===`both`||He===`button`,We=e?.contextMenu?.buttonVisibility??`when-needed`,Ge=He===`both`||He===`right-click`;hL(()=>{let e=S.current;if(e==null)return;let t=e=>{if(!(e instanceof CustomEvent))return;let t=e.detail?.path??null;De.current=t,me(t),ve(t==null?null:`pointer`)},n=e=>{e instanceof CustomEvent&&(Oe.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 Ke=_L((e,t)=>{QL(T.current,e,t)},[]),qe=_L((e,t)=>{QL(E.current,e,t)},[]),Je=_L(e=>{x.current=e},[]),Ye=_L(e=>$L(e,E.current,T.current),[]),Xe=n!=null||r!=null||i!=null,{resolveIcon:Ze}=gL(()=>_A(a),[a]),Qe=t[KP](),$e=Qe.getPath(),et=$e!=null,tt=t.isSearchOpen(),nt=t.getSearchValue(),H=t.getFocusedPath(),rt=t.getFocusedIndex(),it=t.getScrollRequest(),at=t.isDragAndDropEnabled(),ot=t.getDragSession(),st=gL(()=>ot==null?null:new Set(ot.draggedPaths),[ot]),ct=ot?.target??null,lt=ot?.primaryPath??null,ut=iR(o),{overlayHeight:dt,overlayRows:ft,snapshot:pt,visibleRows:mt}=Le,ht=pt.physical.viewportHeight,gt=gL(()=>({end:pt.window.endIndex,start:pt.window.startIndex}),[pt.window.endIndex,pt.window.startIndex]),_t=ft,vt=pt.sticky.rows,yt=pt.physical.totalHeight,bt=pt.sticky.height,xt=gL(()=>new Set(vt.map(e=>EL(e.row))),[vt]),St=rt>=0&&rt>=gt.start&&rt<=gt.end,Ct=_L((e,t)=>u?.({item:rR(e,t),row:e})??null,[u]),wt=_L(e=>RI(e==null?null:T.current.get(e)??null)?!0:RI(S.current),[]),Tt=_L(e=>{wt(t.focusNearestPath(e))},[t,wt]),Et=$(Tt);Et.current=Tt;let Dt=$(!0),Ot=$(()=>{}),kt=_L((t=!0)=>{let n=Se.current;n!=null&&(Dt.current=Dt.current&&t,xe(null),e?.contextMenu?.onClose?.(),Dt.current&&Tt(n.path))},[e?.contextMenu,Tt]);Ot.current=kt;let At=_L(e=>{let t=e==null?null:ZL(S.current,e);ge(e=>e===t?e:t)},[]),U=_L((e,n,r)=>{let i=t.getItem(n);if(i==null)return;let a=Ye(n);if(a?.dataset.fileTreeStickyRow===`true`){let e=C.current;Ae(n,e?.scrollTop??null),M.current=!0,B(e=>e===n?e:n)}i.focus(),At(a),Dt.current=!0,xe({anchorRect:r?.anchorRect??null,item:rR(e,n),path:n,source:r?.source??`keyboard`})},[t,Ye,At]),jt=_L(e=>{if(l){if(t.isSearchOpen()){let e=C.current,t=BI(e,ht);ee.current=rt<0||e==null?null:Math.max(0,Math.min(rt*s-e.scrollTop,Math.max(0,t-s))),F.current=!0}t.startRenaming(e)!==!1&&(ve(`focus`),ue(e=>e+1))}},[t,rt,s,l,ht]),Mt=_L((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=BI(i,ht),u=t.getVisibleCount()*s,d=r===`sticky-parents`?o.ancestorPaths.length*s:kL({controller:t,itemHeight:s,overscan:c,scrollTop:i.scrollTop,stickyFolders:h,viewportHeight:l}).snapshot.sticky.height;return M.current=!0,GI(i,a,s,l,u,d),D.current(),Ce.current=n?e:null,!0},[t,s,c,ht,h]),Nt=()=>y.current===!0||z.current!=null||ae.current===!0,Pt=e=>typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>{e()}):window.setTimeout(e,16),Ft=e=>{e!=null&&(typeof window.cancelAnimationFrame==`function`?window.cancelAnimationFrame(e):window.clearTimeout(e))},It=()=>{I.current!=null&&(clearTimeout(I.current),I.current=null),ne.current=null},Lt=()=>{R.current?.remove(),R.current=null},Rt=()=>{Ft(te.current),te.current=null,L.current=null},zt=e=>{let t=S.current?.getRootNode();t instanceof ShadowRoot?t.append(e):document.body.append(e)},Bt=()=>{ie.current?.(),ie.current=null,z.current!=null&&(clearTimeout(z.current),z.current=null),ae.current=!1,oe.current=null,ce.current=null,se.current!=null&&(se.current.setAttribute(`draggable`,`true`),se.current.style.removeProperty(`touch-action`),se.current=null),Lt(),It(),Rt(),re.current=null},Vt=(e,n)=>{let r=S.current?.getRootNode(),i=FL(NL(r instanceof ShadowRoot?r:document,e,n));return t.setDragTarget(i),t.getDragSession()?.target??null},Ht=e=>{let n=t.getDragAndDropConfig()?.openOnDropDelay??800;if(e==null||e.kind!==`directory`||e.directoryPath==null||n<=0){It();return}let r=t.getItem(e.directoryPath),i=VL(r)?r:null;if(i==null||i.isExpanded()){It();return}let a=`${e.directoryPath}::${e.flattenedSegmentPath??``}`;ne.current!==a&&(It(),ne.current=a,I.current=setTimeout(()=>{let n=t.getDragSession()?.target;n?.kind===`directory`&&n.directoryPath===e.directoryPath&&n.flattenedSegmentPath===e.flattenedSegmentPath&&i.expand()},n))},Ut=()=>{te.current=null;let e=L.current,n=C.current;if(e==null||n==null||t.getDragSession()==null)return;let r=n.getBoundingClientRect(),i=RL(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,D.current()),Ht(Vt(e.clientX,e.clientY)),te.current=Pt(Ut)},Wt=(e,t)=>{L.current={clientX:e,clientY:t},te.current??=Pt(Ut)},Gt=(e,n,r)=>{let i=e.currentTarget;if(i!=null){if(Bt(),Lt(),It(),Rt(),t.startDrag(r)===!1)e.preventDefault();else if(re.current=n,e.dataTransfer!=null&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.dropEffect=`move`,e.dataTransfer.setData(`text/plain`,r),LL())){let t=IL(i),n=i.getBoundingClientRect();Object.assign(t.style,{height:`${n.height}px`,opacity:`0.85`,transform:`translate3d(-9999px, 0px, 0)`,width:`${n.width}px`}),zt(t),R.current=t,e.dataTransfer.setDragImage(t,Math.max(0,e.clientX-n.left),Math.max(0,e.clientY-n.top))}}},Kt=()=>{Lt(),It(),Rt(),re.current=null,t.cancelDrag()},qt=(e,n,r)=>{if(z.current!=null||ae.current)return;let i=e.touches[0],a=e.currentTarget;if(i==null||a==null)return;ce.current={clientX:i.clientX,clientY:i.clientY},se.current=a,a.setAttribute(`draggable`,`false`);let o=(e={})=>{let t=e.restoreNativeDraggable??!ae.current;z.current!=null&&(clearTimeout(z.current),z.current=null),document.removeEventListener(`touchmove`,s),document.removeEventListener(`touchend`,c),document.removeEventListener(`touchcancel`,c),ie.current===o&&(ie.current=null),t&&(a.setAttribute(`draggable`,`true`),se.current===a&&(se.current=null),ce.current=null)},s=e=>{let t=e.touches[0],n=ce.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),ie.current=o,z.current=setTimeout(()=>{if(o({restoreNativeDraggable:!1}),t.startDrag(r)===!1){a.setAttribute(`draggable`,`true`),se.current===a&&(se.current=null),ce.current=null;return}ae.current=!0,se.current=a,a.setAttribute(`draggable`,`false`),a.style.setProperty(`touch-action`,`none`),re.current=n;let e=a.getBoundingClientRect(),s=IL(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`}),zt(s),R.current=s,oe.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=oe.current;n!=null&&R.current!=null&&(R.current.style.transform=`translate3d(${t.clientX-n.x}px, ${t.clientY-n.y}px, 0)`),Ht(Vt(t.clientX,t.clientY)),Wt(t.clientX,t.clientY)},l=e=>{let n=e.changedTouches[0];n!=null&&Vt(n.clientX,n.clientY),t.completeDrag(),Bt()},u=()=>{t.cancelDrag(),Bt()};ie.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)},AL)},Jt=e=>{if(V!=null){if(e.key===`Escape`){kt(),e.preventDefault(),e.stopPropagation();return}qL.has(e.key)&&(e.preventDefault(),e.stopPropagation());return}if(Qe.isActive()){if(e.isComposing||e.keyCode===229)return;if(e.key===`Escape`)Qe.cancel();else if(e.key===`Enter`)Qe.commit();else return;ve(`focus`),ue(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(l&&e.key===`F2`){jt(H??void 0),e.preventDefault(),e.stopPropagation();return}if(tt){if(e.key===`Escape`)F.current=!1,ee.current=null,t.closeSearch();else if(e.key===`Enter`){let e=t.getFocusedPath();e!=null&&t.selectOnlyPath(e);let n=C.current,r=BI(n,ht);ee.current=rt<0||n==null?null:Math.max(0,Math.min(rt*s-n.scrollTop,Math.max(0,r-s))),F.current=!0,t.closeSearch()}else if(e.key===`ArrowDown`)t.focusNextSearchMatch();else if(e.key===`ArrowUp`)t.focusPreviousSearchMatch();else return;ve(`focus`),ue(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(f&&UL(e)){t.openSearch(e.key),ue(e=>e+1),e.preventDefault(),e.stopPropagation();return}let n=Ve&&GL(e),r=KL(e,Ve),i=r&&S.current!=null?zI(S.current):null,a=r?new Set(eR(S.current)):new Set,o=i?.dataset.fileTreeStickyPath??null,c=i?.dataset.fileTreeStickyRow===`true`&&o!=null;if(c&&o!==H&&a.has(o)){let e=C.current;Ae(o,e?.scrollTop??null),t.focusPath(o)}let u=t.getFocusedPath(),d=t.getFocusedIndex(),p=t.getFocusedItem();if(p==null)return;let m=VL(p)?p:null,h=u!=null&&(xt.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=$L(u,E.current,T.current);e==null||n==null?y=!1:U(e,u)}else if((e.ctrlKey||e.metaKey)&&HL(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;ve(`focus`);let b=t.getFocusedPath(),x=b!=null&&(xt.has(b)||a.has(b)),w=g&&b!==u,D=n&&c&&o===u&&b===u;if((h||D)&&b!=null&&(w&&x||D))Ae(b,v?.scrollTop??null),M.current=!0,B(e=>e===b?e:b);else{let t=e.key===`ArrowUp`&&h&&b!==u;b!=null&&(t||_&&b===u)?(je(b,nR(S.current,v,i,u,s,bt,ht)),M.current=!0,B(e=>e===b?e:b)):ke()}ue(e=>e+1),e.preventDefault(),e.stopPropagation()};hL(()=>{f&&tt&&(Me.current?Me.current=!1:RI(w.current))},[tt,f]),hL(()=>{let e=x.current;switch(qI({hasRenderedInput:e!=null,previousRenamingPath:P.current,renamingPath:$e})){case`reset`:P.current=null;return;case`reveal-canonical`:$e!=null&&Mt($e,{restoreTreeFocus:!1,targetOffset:`live-overlay`});return;case`ignore`:return;case`focus-input`:e!=null&&(Ce.current=null,P.current=$e,RI(e),e.select());return}},[gt.end,gt.start,$e,Mt,xt]),hL(()=>{let e=S.current;if(e==null)return;let t=null,n=()=>{t!=null&&(clearTimeout(t),t=null)},r=()=>{let t=zI(e)?.dataset.itemPath??null;B(e=>e===t?e:t)},i=()=>{n(),M.current=!0,r()},a=i=>{let a=i.relatedTarget;if(a==null){n(),t=setTimeout(()=>{t=null,zI(e)==null?(M.current=!1,B(null)):r()},0);return}if(!(a instanceof Node)||!e.contains(a)){n(),M.current=!1,B(null);return}let o=a instanceof HTMLElement?a.dataset.itemPath??null:null;B(e=>e===o?e:o)};return e.addEventListener(`focusin`,i),e.addEventListener(`focusout`,a),()=>{n(),e.removeEventListener(`focusin`,i),e.removeEventListener(`focusout`,a)}},[]),hL(()=>{let e=S.current;e!=null&&(pt.physical.scrollTop<=0?e.dataset.scrollAtTop=`true`:delete e.dataset.scrollAtTop)},[pt.physical.scrollTop]),hL(()=>{let e=null,n=C.current,r=b.current,i=S.current;if(n==null)return;O.current=BI(n,g);let a=()=>{let e=t.getVisibleCount(),r=VI(O.current,g),i=Math.max(0,e*s-r);n.scrollTop>i&&(n.scrollTop=i),Re(kL({controller:t,itemHeight:s,overscan:c,scrollTop:Math.min(n.scrollTop,i),stickyFolders:h,viewportHeight:r}))};if(!A.current){A.current=!0;let e=t.getFocusedIndex();if(e>=0){let r=VI(O.current,g),i=t.getVisibleRows(e,e)[0]??null;UI(n,e,s,r,h&&i!=null?Math.max(0,Math.min(i.ancestorPaths.length*s,Math.max(0,r-s))):0)}}D.current=a;let o=t.subscribe(()=>{PI(de)&&ue(e=>e+1),a()}),l=()=>{Oe.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,be(e=>e+1),e=null},50))},u=null,d=()=>{i!=null&&delete i.dataset.overlayReveal,u!=null&&(clearTimeout(u),u=null)},f=()=>{i!=null&&Oe.current!==!0&&(n.scrollTop>0||(i.dataset.overlayReveal=`true`,u!=null&&clearTimeout(u),u=setTimeout(()=>{d()},200)))},p=()=>{a(),n.scrollTop>0&&d(),Se.current!=null&&y.current&&Ot.current(),Oe.current===!0?y.current=!1:(me(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=>{O.current=(e[0]==null?null:HI(e[0]))??BI(n,g),a()}):null;return x?.observe(n),()=>{D.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,O.current=null,x?.disconnect()}},[t,g,s,c,h]),hL(()=>{Ve||V==null||kt(!1)},[kt,Ve,V]);let Yt=gL(()=>V==null?null:`${V.path}::${V.source}`,[V]);hL(()=>{if(Yt==null){m?.clearSlotContent(lA);return}let t=Se.current;if(t==null)return;let n=v.current??_.current;if(n==null)return;let r={anchorElement:n,anchorRect:t.anchorRect??YL(n.getBoundingClientRect()),close:e=>{Ot.current(e?.restoreFocus??!0)},restoreFocus:()=>{Dt.current&&Et.current(Se.current?.path??null)}},i=e?.contextMenu?.render?.(t.item,r)??null;return m?.setSlotContent(lA,i),e?.contextMenu?.onOpen?.(t.item,r),cR(i),queueMicrotask(()=>{i!=null&&i.isConnected&&document.activeElement===i&&cR(i)}),()=>{m?.clearSlotContent(lA)}},[Yt,e?.contextMenu,m]),hL(()=>{V!=null&&t.getItem(V.path)==null&&kt()},[kt,V,t]),hL(()=>{if(V==null)return;let e=S.current?.getRootNode(),t=e instanceof ShadowRoot?e.host:S.current,n=e=>{let n=e.target;n instanceof Node&&(JL(e)||_.current?.contains(n)!==!0&&t?.contains(n)!==!0&&kt())},r=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),kt())};return document.addEventListener(`mousedown`,n,!0),document.addEventListener(`keydown`,r,!0),()=>{document.removeEventListener(`mousedown`,n,!0),document.removeEventListener(`keydown`,r,!0)}},[kt,V]),hL(()=>{let e=C.current,n=S.current;if(e==null||n==null){N.current=H;return}let r=H==null?null:T.current.get(H)??null,i=zI(n),a=i?.dataset.itemPath??null,o=et&&x.current===i,c=f&&w.current===i,l=F.current&&!tt,u=ee.current??0,d=Ce.current,p=we.current,m=Te.current,g=Ee.current,_=i!=null,v=M.current||_,y=N.current!==H,b=p!=null&&p===H&&H!=null,E=!1,O=!1;if(it!=null&&it.id!==k.current){k.current=it.id;let n=it.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,ht-s))):bt;E=!0,O=WI(e,n,s,ht,yt,it.offset,t)}t.clearScrollRequest(it.id)}let A=!E&&l&&GI(e,rt,s,ht,yt,u),j=!E&&d!=null&&d===H&&GI(e,rt,s,ht,yt,bt),P=!E&&m!=null&&m.path===H&&GI(e,rt,s,ht,yt,m.viewportOffset),te=!E&&g!=null&&g.path===H&&e.scrollTop!==g.scrollTop;te&&(e.scrollTop=g.scrollTop),(te||O||j||P||A||v&&y&&d!==H&&!b&&UI(e,rt,s,ht,bt))&&D.current(),E?N.current=H:v?o||c&&!l?N.current=H:r==null?(l&&rt>=0&&(GI(e,rt,s,ht,yt,u),D.current()),N.current=H):((y||l||d===H||p===H||m?.path===H||g?.path===H||a==null||a!==H)&&(RI(r),d===H&&(Ce.current=null),p===H&&(we.current=null),m?.path===H&&(Te.current=null),g?.path===H&&(Ee.current=null),F.current=!1,ee.current=null),N.current=H):N.current=H},[t,rt,H,St,s,et,tt,gt,ht,f,it,h,bt,yt,mt]);let Xt=rt>=0&&rt>=pt.visible.startIndex&&rt<=pt.visible.endIndex,Zt=H!=null&&_t.some(e=>EL(e.row)===H),Qt=Xt||Zt,$t=Ue&&M.current===!0&&Qt?H:null,en=_e===`pointer`?pe:null,tn=V?.path??De.current??en??$t??pe,nn=V?.source===`right-click`;hL(()=>{y.current&&V==null||At(Ye(tn))},[V,Ye,gt,ht,ye,_t,tn,At,mt]);let rn=_L(e=>{if(y.current||JL(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&&ve(e=>e===`pointer`?e:`pointer`),me(e=>e===i?e:i)},[]),an=_L(()=>{me(null)},[]);hL(()=>{if(!at)return;let e=()=>{Bt(),t.cancelDrag()};return window.addEventListener(`dragend`,e),()=>{window.removeEventListener(`dragend`,e),Bt(),t.cancelDrag()}},[t,at]);let on=e=>{if(!at||t.getDragSession()==null||ae.current)return;let n=FL(e.target instanceof HTMLElement?e.target:null);t.setDragTarget(n),Ht(t.getDragSession()?.target??null),Wt(e.clientX,e.clientY),e.dataTransfer!=null&&(e.dataTransfer.dropEffect=`move`),e.preventDefault()},sn=e=>{if(!at||t.getDragSession()==null||ae.current)return;let n=e.relatedTarget;n instanceof Node&&S.current?.contains(n)===!0||(It(),Rt(),t.setDragTarget(null))},cn=e=>{at&&t.getDragSession()!=null&&!ae.current&&(e.preventDefault(),Vt(e.clientX,e.clientY),t.completeDrag(),Lt(),It(),Rt(),re.current=null)},ln=pt.window.height,un=pt.window.offsetTop,dn=Math.min(0,ht-ln),fn=Math.min(0,ht-ln-bt),pn=fe===H||F.current,mn=H!=null&&pn&&!St&&rt>=0?mt[rt]??t.getVisibleRows(rt,rt)[0]??null:null,hn=mn==null?null:KI(rt,s,gt,ln),gn=re.current,_n=lt!=null&&gn!=null&&gn.path===lt&&gn.index>=gt.start&&gn.index<=gt.end,vn=lt!=null&&gn!=null&&gn.path===lt&&!_n&&gn.path!==mn?.path?gn:null,yn=vn==null?null:KI(vn.index,s,gt,ln),bn=WL((rt>=0?mt[rt]??t.getVisibleRows(rt,rt)[0]??null:null)?.ancestorPaths.at(-1)??null),xn=tt&&H!=null?aR(o,H,!St):void 0,Sn=V?.path??(tt?H:fe),Cn=V?.path??pe,wn=Ye(tn),Tn=Ve&&Ue&&!nn&&!et&&wn!=null&&he!=null&&tn!=null,En=Ve&&(Tn||V!=null),Dn=V?.anchorRect,On=Dn==null&&wn!=null&&he!=null&&(V!=null||Tn)?he:null,kn=Dn==null?On==null?void 0:{top:`${On}px`}:{left:`${Dn.left}px`,position:`fixed`,right:`auto`,top:`${Dn.top}px`},An=nn?{opacity:`0`}:void 0,jn=_L((e,n,r,i)=>{let a=XI({event:{ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey},isDirectory:n.kind===`directory`,isSearchOpen:tt,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>=pt.visible.startIndex&&n.index<=pt.visible.endIndex,d=i===`flow`&&u&&l!=null&&l.dataset.itemParked!==`true`;t.focusMountedPathFromInput(c),d&&(M.current=!0,B(e=>e===c?e:c),ve(`focus`)),o&&t.toggleMountedDirectoryFromInput(c),a.closeSearch&&t.closeSearch(),a.revealCanonical&&Mt(c,{targetOffset:`sticky-parents`})},[t,tt,pt.visible.endIndex,pt.visible.startIndex,Mt]),Mn=()=>{if(y.current||!Ue||tn==null||wn==null)return;let e=t.getItem(tn);e!=null&&(At(wn),Dt.current=!0,xe({anchorRect:null,item:{kind:e.isDirectory()?`directory`:`file`,name:wn.getAttribute(`aria-label`)??tn,path:e.getPath()},path:e.getPath(),source:`button`}))},Nn={contextHoverPath:Cn,contextMenuButtonTriggerEnabled:Ue,contextMenuButtonVisibility:We,contextMenuEnabled:Ve,contextMenuRightClickEnabled:Ge,contextMenuTriggerMode:He,controller:t,directoriesWithGitChanges:i,dragAndDropEnabled:at,draggedPathSet:st,dragTarget:ct,gitLaneActive:Xe,gitStatusByPath:n,handleRowDragEnd:Kt,handleRowDragStart:Gt,handleRowTouchStart:qt,ignoredGitDirectories:r,ignoredInheritanceCache:le,instanceId:o,itemHeight:s,onKeyDown:Jt,onRowClick:jn,openContextMenuForRow:U,registerButton:Ke,registerRenameInput:Je,renameView:Qe,renderDecorationForRow:Ct,resolveIcon:Ze,shouldSuppressContextMenu:Nt,visualFocusPath:Sn},Pn={...Nn,registerButton:qe};return Q(`div`,{ref:S,id:ut,"data-file-tree-context-menu-button-visibility":Ve&&Ue?We:void 0,"data-file-tree-context-menu-trigger-mode":Ve?He:void 0,"data-file-tree-has-context-menu-action-lane":Ve&&Ue?`true`:void 0,"data-file-tree-has-git-lane":Xe?`true`:void 0,"data-file-tree-virtualized-root":`true`,onDragLeave:at?sn:void 0,onDragOver:at?on:void 0,onDrop:at?cn:void 0,onKeyDown:Jt,onPointerLeave:Ve?an:void 0,onPointerOver:Ve?rn:void 0,role:`tree`,tabIndex:-1,style:{outline:`none`,position:`relative`},children:[Q(`style`,{"data-file-tree-guide-style":`true`,dangerouslySetInnerHTML:{__html:bn}}),Q(`slot`,{name:cA,"data-type":`header-slot`}),f?Q(`div`,{"data-file-tree-search-container":!0,"data-open":tt?`true`:`false`,children:Q(`input`,{ref:w,"aria-activedescendant":xn,"aria-controls":ut,placeholder:`Search…`,"data-file-tree-search-input":!0,"data-file-tree-search-input-fake-focus":Ne?`true`:void 0,value:nt,onBlur:()=>{(d!==`retain`||Fe.current)&&t.closeSearch()},onFocus:Ie,onPointerDown:Ie,onInput:e=>{Ie();let n=e.currentTarget;t.setSearch(n.value)}})}):null,Q(`div`,{ref:C,"data-file-tree-virtualized-scroll":`true`,children:[h&&ze&&_t.length>0?Q(`div`,{"aria-hidden":`true`,"data-file-tree-sticky-overlay":`true`,children:Q(`div`,{"data-file-tree-sticky-overlay-content":`true`,style:{height:`${dt}px`},children:_t.map((e,t)=>uR(Pn,e.row,`sticky:${EL(e.row)}`,{mode:`sticky`,style:{left:`0`,position:`absolute`,right:`0`,top:`${e.top}px`,zIndex:`${_t.length-t}`}}))})}):null,Q(`div`,{ref:b,"data-file-tree-virtualized-list":`true`,style:{height:`${yt}px`},children:[Q(`div`,{"data-file-tree-virtualized-sticky-offset":`true`,"aria-hidden":`true`,style:{height:`${un}px`}}),Q(`div`,{"data-file-tree-virtualized-sticky":`true`,style:{height:`${ln}px`,top:`${dn}px`,bottom:`${fn}px`},children:[dR(Nn,gt,xt),mn!=null&&hn!=null?uR(Nn,mn,`parked:${mn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:lt===mn.path?`none`:void 0,position:`absolute`,right:`0`,top:`${hn}px`}}):null,vn!=null&&yn!=null?uR(Nn,vn,`parked-drag:${vn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:`none`,position:`absolute`,right:`0`,top:`${yn}px`}}):null]})]})]}),Ve?Q(`div`,{ref:_,"data-type":`context-menu-anchor`,"data-visible":En?`true`:`false`,style:kn,children:[Q(`button`,{ref:v,type:`button`,"data-type":uA,"aria-label":`Options`,"aria-haspopup":`menu`,"aria-expanded":V==null?`false`:`true`,"data-visible":Tn?`true`:`false`,onMouseDown:e=>{e.preventDefault()},onClick:e=>{e.preventDefault(),e.stopPropagation(),V==null?Mn():kt()},tabIndex:-1,style:An,children:Q(rI,{...Ze(`file-tree-icon-ellipsis`)})}),V==null?null:Q(`slot`,{name:lA})]}):null,V==null?null:Q(`div`,{"data-type":`context-menu-wash`,"aria-hidden":`true`,onMouseDownCapture:e=>{e.preventDefault(),kt()},onTouchStartCapture:e=>{e.preventDefault(),e.stopPropagation(),kt()},onTouchMoveCapture:e=>{e.preventDefault(),e.stopPropagation()},onWheelCapture:e=>{e.preventDefault(),e.stopPropagation()}})]})}var pR={hydrateRoot:(e,t)=>{QF(OF(fR,t),e)},renderRoot:(e,t)=>{ZF(OF(fR,t),e)},unmountRoot:e=>{ZF(null,e)}};function mR(e,t){pR.renderRoot(e,t)}function hR(e,t){pR.hydrateRoot(e,t)}function gR(e){pR.unmountRoot(e)}var _R=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);n===t?t!=null&&(this.#e.set(e,t),this.#r(e,t)):(n?.remove(),t==null?this.#e.delete(e):(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 vR=0;function yR(e){return e!=null&&e.length>0?e:(vR+=1,`pst_ft_${vR}`)}function bR({initialVisibleRowCount:e,itemHeight:t}){return e==null?420:Math.max(0,e)*(t??tP)}function xR(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 SR(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 CR(e){return Array.from(e.children).filter(e=>e instanceof SVGElement)}var wR=class{static LoadedCustomComponent=!0;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=new _R;#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=yR(a),this.#p=rF(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=eP(n,c),this.#d={itemHeight:this.#u.itemHeight,overscan:d,stickyFolders:_,initialVisibleRowCount:y},this.#t=new QP({...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&&(gR(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(()=>{t?e():t=!0})}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=iF(this.#p,e);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&mR(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(),mR(t.wrapper,this.#w()))}setGitStatus(e){let t=rF(e,this.#p);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&mR(n.wrapper,this.#w())}setIcons(e){this.#m=e;let t=this.#T();t!=null&&(this.#E(t.host,t.wrapper),mR(t.wrapper,this.#w()))}hydrate({fileTreeContainer:e}){let t=this.#P(e),n=this.#N(t);this.#O(),hR(n,this.#w())}render({containerWrapper:e,fileTreeContainer:t}){let n=this.#P(t??this.#f,e),r=this.#N(n);this.#O(),mR(r,this.#w())}#C(){return{initialViewportHeight:bR({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;e==null?this.#l.setSlotHtml(cA,this.#e?.header?.html??null):this.#l.setSlotContent(cA,e())}#k(e){let t=CR(e).find(e=>SR(e)),n=xR(Qk(fA(this.#m).set));n!=null&&(t==null||t.outerHTML!==n.outerHTML)&&(t==null?e.prepend(n):t.replaceWith(n))}#A(e){let t=CR(e),n=t.find(e=>SR(e)),r=t.filter(e=>e!==n),i=fA(this.#m).spriteSheet?.trim()??``;if(i.length===0){for(let e of r)e.remove();return}let a=xR(i);if(a==null)for(let e of r)e.remove();else if(r.length!==1||r[0].outerHTML!==a.outerHTML){for(let e of r)e.remove();e.appendChild(a)}}#j(e){let t=fA(this.#m);t.colored&&eA(t.set)?e.dataset.fileTreeColoredIcons=`true`:delete e.dataset.fileTreeColoredIcons}#M(e){let t=e.querySelector(`style[${iA}]`);this.#g==null&&t instanceof HTMLStyleElement&&(this.#g=t),this.#h==null||this.#h===``?(this.#g?.remove(),this.#g=void 0,this.#_=void 0):(this.#g?.parentNode!==e||this.#_!==this.#h)&&(this.#g??=document.createElement(`style`),this.#g.setAttribute(iA,``),this.#g.parentNode!==e&&e.appendChild(this.#g),this.#g.textContent=aP(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 dP(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)}};function TR(e){let r,i,a,o=e.props.prerenderedHTML;function s(){if(!r||!i)return;let n=e.props.options;(n.paths!==i.paths||n.preparedInput!==i.preparedInput)&&(n.preparedInput?r.resetPaths({preparedInput:n.preparedInput}):r.resetPaths(n.paths??[])),n.gitStatus!==i.gitStatus&&r.setGitStatus(n.gitStatus),n.icons!==i.icons&&r.setIcons(n.icons),n.composition!==i.composition&&r.setComposition(n.composition),n.renderRowDecoration!==i.renderRowDecoration&&r.render({}),i=n,e.props.search!==void 0&&e.props.search!==a&&r.setSearch(e.props.search),a=e.props.search,r.getFileTreeContainer()?.shadowRoot?.querySelector(`[role="tree"]`)?.setAttribute(`aria-label`,e.props[`aria-label`]||t(`files.fileTree.projectFiles`))}let c=l((t,n)=>{let a=e.props.options;r=new wR({...a,onSelectionChange:t=>e.props.options.onSelectionChange?.(t),onSearchChange:t=>e.props.options.onSearchChange?.(t),renderRowDecoration:t=>e.props.options.renderRowDecoration?.(t)??null}),i=a;let o=t.querySelector(`file-tree-container`);o?r.hydrate({fileTreeContainer:o}):r.render({containerWrapper:t}),n.addEventListener(`abort`,()=>{r?.cleanUp(),r=void 0},{once:!0}),s(),e.props.onReady?.(r,n)});return()=>{let{options:t,prerenderedHTML:r,search:i,onReady:a,mix:l,...u}=e.props;return e.queueTask(s),n(`div`,{...u,"data-bud-file-tree":``,"data-rmx-preserve-dom":``,innerHTML:LO(o),mix:[c,l]})}}var ER=`h-control min-w-0 rounded-lg border-0 bg-[var(--bud-control)] px-2.5 text-[13px] text-[var(--bud-foreground)] outline-none placeholder:text-[var(--bud-muted)]`;function DR(e){return()=>{let{icon:t,class:r=``,...i}=e.props,a=i.options.find(e=>e.value===i.value);return n(te,{...i,headless:!0,placement:`bottom-end`,class:`bud-interaction inline-flex h-control min-w-0 shrink-0 items-center gap-1.5 rounded-lg px-2 text-muted hover:text-ink disabled:opacity-40 ${r}`,children:[t?n(V,{name:t,size:14,class:`shrink-0`}):null,n(m,{variant:`ui-compact`,class:`truncate`,children:a?.label??i.label}),n(V,{name:`chevron-down`,size:12,class:`shrink-0 opacity-70`})]})}}function OR(e){let i=!1;function a(t){i=t,e.update()}return()=>{let{view:o,repository:c,onChange:l}=e.props;return n(`div`,{class:`flex min-w-0 items-center gap-0.5`,role:`group`,"aria-label":t(`files.reviewControls.reviewControls`),children:[n(DR,{icon:`compare`,label:t(`files.reviewControls.comparison`),value:o.mode,options:[{value:`source`,label:e.props.sourceLabel??t(`files.reviewControls.workingFile`)},{value:`working`,label:t(`files.reviewControls.unstaged`),description:t(`files.reviewControls.indexToWorktree`),disabled:!c?.available},{value:`staged`,label:t(`files.reviewControls.staged`),description:t(`files.reviewControls.headToIndex`),disabled:!c?.available},{value:`commits`,label:t(`files.reviewControls.branchesAndCommits`),disabled:!c?.head}],onChange:e=>l({mode:e})}),o.mode===`source`?null:n(r,{children:[n(DR,{label:t(`files.reviewControls.reviewScope`),class:`max-sm:hidden`,value:o.multiple?`all`:`single`,options:[{value:`single`,label:t(`files.reviewControls.oneFile`)},{value:`all`,label:t(`files.reviewControls.allChanges`)}],onChange:e=>l({multiple:e===`all`})}),n(DR,{label:t(`files.reviewControls.diffLayout`),value:o.layout,options:[{value:`split`,label:t(`files.reviewControls.split`)},{value:`unified`,label:t(`files.reviewControls.unified`)}],onChange:e=>l({layout:e})})]}),n(Me,{children:[n(U,{tooltip:!0,icon:`sliders`,label:t(`files.reviewControls.display`),active:i,"aria-expanded":i,mix:[Ae({placement:`bottom-end`,offset:6}),Pe(),s(`click`,()=>a(!i))]}),n(`div`,{class:`bud-overlay bud-menu m-0 w-64 rounded-xl p-1 text-[var(--bud-foreground)]`,"aria-label":t(`files.reviewControls.displaySettings`),role:`group`,mix:y({open:i,onHide:()=>a(!1)}),children:[[[`wrap`,t(`files.reviewControls.wrapLines`)],[`lineNumbers`,t(`files.reviewControls.lineNumbers`)],[`sticky`,t(`files.reviewControls.stickyHeaders`)],...o.mode===`source`?[]:[[`context`,t(`files.reviewControls.fullContext`)],[`collapsed`,t(`files.reviewControls.collapseFiles`)]]].map(([e,t],r)=>n(`label`,{class:`flex h-8 cursor-pointer items-center justify-between gap-3 rounded-lg px-2.5 hover:bg-[var(--bud-menu-hover)]`,children:[n(m,{variant:`ui`,children:t}),n(`input`,{type:`checkbox`,class:`size-3.5 accent-[var(--bud-foreground)]`,checked:!!o[e],mix:[...r===0?[fe()]:[],s(`change`,t=>l({[e]:t.currentTarget.checked}))]})]},e)),o.mode===`source`?null:n(r,{children:[n(`label`,{class:`flex h-8 items-center justify-between gap-3 px-2.5 sm:hidden`,children:[n(m,{variant:`ui`,children:t(`files.reviewControls.allChanges`)}),n(`input`,{type:`checkbox`,class:`size-3.5 accent-[var(--bud-foreground)]`,checked:o.multiple,mix:s(`change`,e=>l({multiple:e.currentTarget.checked}))})]}),n(`label`,{class:`-mx-1 mt-1 flex flex-col gap-1.5 border-t border-line px-3.5 pt-2.5 pb-1.5`,children:[n(m,{variant:`ui-caption`,tone:`muted`,children:t(`files.reviewControls.inlineHighlights`)}),n(te,{label:t(`files.reviewControls.inlineHighlights`),class:`w-full`,value:o.highlights,options:[{value:`word-alt`,label:t(`files.reviewControls.wordsCompact`)},{value:`word`,label:t(`files.reviewControls.words`)},{value:`word-line`,label:t(`files.reviewControls.wholeChange`)},{value:`char`,label:t(`files.reviewControls.characters`)},{value:`none`,label:t(`files.reviewControls.none`)}],onChange:e=>l({highlights:e})})]})]})]})]})]})}}function kR(e){let r=e.props.view.base,i=e.props.view.target,a=r,o=i,c=``;return()=>{let{view:l,repository:u,onChange:d}=e.props;return l.base!==a&&(r=a=l.base),l.target!==o&&(i=o=l.target),n(`form`,{class:`flex shrink-0 flex-wrap items-center gap-2 border-b border-line px-3 py-1.5`,"aria-label":t(`files.reviewControls.comparedRevisions`),mix:s(`submit`,n=>{n.preventDefault();try{let e={base:Ve(r),target:Ve(i)};c=``,d(e)}catch(e){c=e instanceof Error?e.message:t(`files.reviewControls.chooseValidRevisions`)}e.update()}),children:[n(`label`,{class:`flex min-w-0 flex-1 basis-32 items-center gap-2`,children:[n(m,{variant:`ui-caption`,tone:`muted`,children:t(`files.reviewControls.base`)}),n(`input`,{"aria-label":t(`files.reviewControls.baseRevision`),class:`${ER} w-full pb-0.5`,list:`bud-review-references`,value:r,maxLength:1024,spellcheck:!1,mix:s(`input`,e=>{r=e.currentTarget.value})})]}),n(V,{name:`arrow-right`,size:14,class:`text-muted`}),n(`label`,{class:`flex min-w-0 flex-1 basis-32 items-center gap-2`,children:[n(m,{variant:`ui-caption`,tone:`muted`,children:t(`files.reviewControls.compare`)}),n(`input`,{"aria-label":t(`files.reviewControls.targetRevision`),class:`${ER} w-full pb-0.5`,list:`bud-review-references`,value:i,maxLength:1024,spellcheck:!1,mix:s(`input`,e=>{i=e.currentTarget.value})})]}),n(`datalist`,{id:`bud-review-references`,children:[n(`option`,{value:`HEAD`}),u?.references.map(e=>n(`option`,{value:e.name,children:[e.kind,` · `,e.commit.slice(0,8)]},e.name))]}),n(f,{variant:`secondary`,size:`small`,type:`submit`,children:t(`files.reviewControls.compare`)}),c?n(m,{as:`p`,variant:`ui-caption`,class:`basis-full`,role:`alert`,children:c}):null]})}}var AR={blue:[`#1a85d4`,`#69b1ff`],cyan:[`#1ca1c7`,`#68cdf2`],gray:[`#84848a`,`#adadb1`],green:[`#199f43`,`#5ecc71`],indigo:[`#693acf`,`#9d6afb`],mauve:[`#594c5b`,`#79697b`],orange:[`#d47628`,`#ffa359`],pink:[`#d32a61`,`#ff678d`],purple:[`#a631be`,`#d568ea`],red:[`#d52c36`,`#ff6762`],teal:[`#17a5af`,`#64d1db`],vermilion:[`#ff8c5b`,`#d5512f`],yellow:[`#d5a910`,`#ffd452`]},jR={astro:`purple`,babel:`yellow`,bash:`green`,biome:`blue`,bootstrap:`indigo`,browserslist:`yellow`,bun:`mauve`,c:`blue`,claude:`orange`,cpp:`blue`,css:`indigo`,database:`purple`,default:`gray`,docker:`blue`,eslint:`indigo`,git:`vermilion`,go:`cyan`,graphql:`pink`,html:`orange`,image:`pink`,javascript:`yellow`,json:`orange`,markdown:`green`,mcp:`teal`,npm:`red`,oxc:`cyan`,postcss:`red`,prettier:`teal`,python:`blue`,react:`cyan`,ruby:`red`,rust:`orange`,sass:`pink`,svelte:`red`,svg:`orange`,svgo:`green`,swift:`orange`,table:`teal`,tailwind:`cyan`,terraform:`indigo`,text:`gray`,typescript:`blue`,vite:`purple`,vscode:`blue`,vue:`green`,wasm:`indigo`,webpack:`blue`,yml:`red`,zig:`orange`,zip:`orange`},MR=_A({set:`complete`,colored:!0}),NR=new Map;function PR(e){if(!NR.size)for(let[,e,t,n]of Qk(`complete`).matchAll(/<symbol id="([^"]+)" viewBox="([^"]+)">([\s\S]*?)<\/symbol>/g))NR.set(e,{viewBox:t,markup:n});return NR.get(e)}function FR(e){return()=>{let{path:t,size:r=16,class:i=``}=e.props,o=MR.resolveIcon(`file-tree-icon-file`,t),s=PR(o.name),[c,l]=AR[jR[o.token??`default`]??`gray`];return n(`svg`,{"aria-hidden":`true`,width:r,height:r,viewBox:s?.viewBox??`0 0 16 16`,fill:`currentColor`,class:`shrink-0 ${i}`,style:{color:`light-dark(${c}, ${l})`},innerHTML:a(s?.markup??``)})}}function IR(e){let i=e.props.result?.query??_t({query:` `});i={...i,query:e.props.result?.query.query??``};let a=i.include.join(`, `),o=i.exclude.join(`, `),c=!1,u,d=``,p=!1;function h(t){i={...i,...t},p=!0,d=``,e.props.loading&&e.props.onCancel(),e.update()}return()=>{let g=e.props,_=new Map;for(let e of g.result?.matches??[])_.set(e.path,[..._.get(e.path)??[],e]);return n(`section`,{"aria-label":t(`files.fileSearchPanel.searchProjectContents`),class:`flex h-full min-h-0 w-full flex-col`,mix:[l((e,t)=>{queueMicrotask(()=>{t.aborted||u?.focus()})}),s(`keydown`,e=>{e.key!==`Escape`||g.loading||(e.preventDefault(),g.onClose())})],children:[n(ut,{title:t(`files.fileSearchPanel.search`),children:n(U,{tooltip:!0,icon:`close`,label:t(`files.fileSearchPanel.closeProjectSearch`),mix:s(`click`,g.onClose)})}),n(`form`,{class:`flex shrink-0 flex-col gap-2 border-b border-line p-2`,"aria-label":t(`files.fileSearchPanel.projectContentSearch`),mix:s(`submit`,n=>{n.preventDefault();try{i=_t({...i,include:a.split(`,`).map(e=>e.trim()).filter(Boolean),exclude:o.split(`,`).map(e=>e.trim()).filter(Boolean)}),d=``,p=!1,g.onSearch(i)}catch(e){d=e instanceof Error?e.message:t(`files.fileSearchPanel.invalidSearch`)}e.update()}),children:[n(HD,{label:t(`files.fileSearchPanel.searchProjectText`),value:i.query,maxLength:512,class:`w-full`,placeholder:t(`files.fileSearchPanel.searchFileContents`),mix:[l(e=>{u=e}),s(`input`,e=>h({query:e.currentTarget.value}))]}),n(`div`,{class:`flex flex-wrap items-center gap-x-3 gap-y-1 px-1`,children:[`caseSensitive`,`wholeWord`,`regex`].map(e=>n(`label`,{class:`flex items-center gap-1.5 text-muted`,children:[n(`input`,{type:`checkbox`,class:`size-3.5 accent-[var(--bud-foreground)]`,checked:i[e],mix:s(`change`,t=>h({[e]:t.currentTarget.checked}))}),n(m,{variant:`ui-caption`,children:{caseSensitive:t(`files.fileSearchPanel.matchCase`),wholeWord:t(`files.fileSearchPanel.wholeWord`),regex:t(`files.fileSearchPanel.regularExpression`)}[e]})]},e))}),n(`div`,{class:`flex items-center gap-1`,children:[n(f,{variant:`ghost`,size:`small`,class:`text-muted`,"aria-expanded":c,mix:s(`click`,()=>{c=!c,e.update()}),children:[n(V,{name:c?`chevron-down`:`chevron-right`,size:12}),t(`files.fileSearchPanel.filters`)]}),n(`div`,{class:`ms-auto flex items-center gap-1`,children:[g.loading?n(f,{variant:`ghost`,size:`small`,mix:s(`click`,g.onCancel),children:t(`files.fileSearchPanel.cancel`)}):null,n(f,{variant:`secondary`,size:`small`,type:`submit`,disabled:!i.query||g.loading,children:t(`files.fileSearchPanel.search`)})]})]}),c?n(`div`,{class:`flex flex-col gap-2 px-1 pb-1`,children:[n(`label`,{class:`flex min-w-0 flex-col gap-1`,children:[n(m,{variant:`ui-caption`,tone:`muted`,children:t(`files.fileSearchPanel.withinDirectory`)}),n(`input`,{"aria-label":t(`files.fileSearchPanel.searchDirectory`),value:i.directory,class:ER,placeholder:t(`files.fileSearchPanel.projectRoot`),mix:s(`input`,e=>h({directory:e.currentTarget.value}))})]}),n(`label`,{class:`flex min-w-0 flex-col gap-1`,children:[n(m,{variant:`ui-caption`,tone:`muted`,children:t(`files.fileSearchPanel.includePaths`)}),n(`input`,{"aria-label":t(`files.fileSearchPanel.includeSearchPaths`),value:a,class:ER,placeholder:t(`files.fileSearchPanel.includePathsExample`),mix:s(`input`,e=>{a=e.currentTarget.value,h({})})})]}),n(`label`,{class:`flex min-w-0 flex-col gap-1`,children:[n(m,{variant:`ui-caption`,tone:`muted`,children:t(`files.fileSearchPanel.excludePaths`)}),n(`input`,{"aria-label":t(`files.fileSearchPanel.excludeSearchPaths`),value:o,class:ER,placeholder:t(`files.fileSearchPanel.excludePathsExample`),mix:s(`input`,e=>{o=e.currentTarget.value,h({})})})]}),n(`div`,{class:`flex flex-wrap items-center gap-3 text-muted`,children:[`includeDotfiles`,`includeIgnored`].map(e=>n(`label`,{class:`flex items-center gap-1.5`,children:[n(`input`,{type:`checkbox`,class:`size-3.5 accent-[var(--bud-foreground)]`,checked:i[e],mix:s(`change`,t=>h({[e]:t.currentTarget.checked}))}),n(m,{variant:`ui-caption`,children:t(e===`includeDotfiles`?`files.fileSearchPanel.dotfiles`:`files.fileSearchPanel.ignoredFiles`)})]},e))}),n(m,{variant:`ui-caption`,tone:`muted`,children:t(`files.fileSearchPanel.pathFilterDescription`)})]}):null,i.regex?n(m,{variant:`ui-caption`,tone:`muted`,class:`px-1`,children:t(`files.fileSearchPanel.regexDescription`)}):null]}),n(`div`,{class:`flex min-h-0 flex-1 flex-col overflow-y-auto py-1`,children:[d||g.error?n(m,{as:`p`,variant:`ui-caption`,role:`alert`,class:`px-4 py-2 text-red-600 dark:text-red-400`,children:d||g.error}):null,g.loading||g.notice?n(m,{as:`p`,variant:`ui-caption`,role:`status`,class:`px-4 py-2 text-muted`,children:g.loading?t(`files.fileSearchPanel.searchingFiles`):g.notice}):null,!p&&g.result?n(r,{children:[n(m,{as:`p`,variant:`ui-caption`,tone:`muted`,role:`status`,class:`px-4 py-2`,children:[t(`files.fileSearchPanel.matchCount`,{count:g.result.matches.length}),` in`,` `,t(`files.fileSearchPanel.fileCount`,{count:_.size}),` ·`,` `,t(`files.fileSearchPanel.searchedFileCount`,{count:g.result.scannedFiles}),g.result.truncated?t(`files.fileSearchPanel.truncated`,{reason:g.result.reason??``}):``]}),Object.values(g.result.skipped).some(Boolean)?n(m,{as:`p`,variant:`ui-caption`,tone:`muted`,class:`px-4 pb-2`,children:t(`files.fileSearchPanel.skippedSummary`,{binary:g.result.skipped.binary,large:g.result.skipped.large,unsupported:g.result.skipped.unsupported,unreadable:g.result.skipped.unreadable})}):null,[..._].map(([e,r])=>n(`section`,{"aria-label":t(`files.fileSearchPanel.matchesIn`,{path:e}),class:`px-2 py-0.5`,children:[n(`div`,{class:`flex min-w-0 items-center gap-2 px-2 py-1`,title:e,children:[n(FR,{path:e,size:14,class:`text-muted`}),n(m,{as:`h3`,variant:`ui-compact`,class:`shrink-0`,children:e.split(`/`).at(-1)}),n(m,{variant:`ui-caption`,tone:`muted`,class:`min-w-0 truncate`,children:e.split(`/`).slice(0,-1).join(`/`)}),n(m,{variant:`ui-caption`,tone:`muted`,class:`ms-auto shrink-0 tabular-nums`,children:r.length})]}),r.map(e=>{let t=Math.max(0,Math.min(e.excerpt.length,e.start-e.excerptStart)),r=Math.max(t,Math.min(e.excerpt.length,e.end-e.excerptStart));return n(F,{class:`flex w-full min-w-0 items-baseline gap-2 rounded-md py-1 ps-8 pe-2 text-left hover:bg-[var(--bud-hover)]`,mix:s(`click`,()=>g.onSelect(e)),children:[n(m,{variant:`ui-caption`,tone:`muted`,class:`shrink-0 tabular-nums`,children:e.startLine}),n(m,{variant:`code`,class:`min-w-0 truncate`,children:[t>24?`…${e.excerpt.slice(t-20,t)}`:e.excerpt.slice(0,t).trimStart(),n(`mark`,{class:`rounded-sm bg-amber-400/30 text-[var(--bud-foreground)]`,children:e.excerpt.slice(t,r)||`│`}),e.excerpt.slice(r)]})]},`${e.revision}:${e.start}`)})]},e))]}):!g.loading&&!g.error?n(m,{as:`p`,variant:`ui-caption`,tone:`muted`,class:`px-4 py-2`,children:t(p?`files.fileSearchPanel.pressEnterToUpdate`:`files.fileSearchPanel.searchFilesDescription`)}):null]})]})}}function LR(e){if(!e||typeof e!=`object`||Array.isArray(e))return Ce(e);let t=e,n=t.context;if(n&&typeof n==`object`&&!Array.isArray(n)){let e=n;n={before:e.before,selected:e.selected,after:e.after}}return Ce({type:t.type,version:t.version,path:t.path,revision:t.revision,commit:t.commit,side:t.side,startLine:t.startLine,endLine:t.endLine,context:n})}var RR=new WeakMap,zR={"type.object":`Expected a JSON object.`,"variant.missing_discriminator":`Unsupported comment version.`,"variant.unknown_discriminator":`Unsupported comment version.`,"literal.invalid_value":`Unsupported comment version.`},BR=e=>zR[e.code];function VR(e,t){let n=pt(e,t,{abortEarly:!0,errorMap:BR});if(n.success)return n.value;let r=n.issues[0];throw RR.get(r)??Error(r.message)}function HR(e,t){return P((n,r)=>{let i=e[`~run`](n,r);return i.issues?R(t,r.path):i})}function UR(e){return P((t,n)=>{try{return{value:e(t)}}catch(e){if(!(e instanceof Error))throw e;let t=R(e.message,n.path);return RR.set(t.issues[0],e),t}})}function WR(e,t,n=0){let r=Se(e);return P((e,i)=>!Array.isArray(e)||e.length<n?R(t,i.path):r[`~run`](e,i))}function GR(e,t){return HR(St().pipe(Lt(t)).refine(e=>!!e.trim()),`${e} must be between 1 and ${t} characters.`)}function KR(e,t){return new Set(e.map(t)).size===e.length}var qR=b({}),JR=HR(St().refine(e=>/^[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}$/.test(e)),`Invalid conversation or message ID.`),YR=Fe(HR(St().refine(e=>/^(?:[a-f0-9]{40}|[a-f0-9]{64})$/.test(e)),`A valid comments revision is required.`)),XR=HR(bt([`open`,`in_progress`,`needs_approval`,`resolved`]),`Invalid conversation status.`),ZR=HR(St().refine(e=>Number.isFinite(Date.parse(e))&&new Date(e).toISOString()===e),`Invalid comment timestamp.`);function QR(e){return VR(qR,e),e}function $R(e){let t=QR(e);if(t.type!==void 0)throw Error(`Unsupported canvas anchor discriminator.`);let n=t.element;if(n&&typeof n==`object`&&!Array.isArray(n)){let e=n;n={selector:e.selector,breadcrumb:e.breadcrumb,contentHash:e.contentHash,label:e.label,tagName:e.tagName,text:e.text,offsetX:e.offsetX,offsetY:e.offsetY}}return jt({pageId:t.pageId,pagePath:t.pagePath,viewport:t.viewport,offsetX:t.offsetX,offsetY:t.offsetY,element:n,...t.branch===void 0?{}:{branch:t.branch}})}var ez=b({id:JR,body:GR(`Comment`,1e4),parentId:P((e,t)=>e==null?{value:null}:JR[`~run`](e,t)),createdAt:ZR,author:b({id:HR(St().refine(e=>/^[a-f0-9]{16}$/.test(e)),`Invalid Git author ID.`),name:GR(`Git author name`,1e3),email:GR(`Git author email`,1e3)})});function tz(e){let t=new Map(e.map(e=>[e.id,e.parentId]));return e.every(e=>{let n=new Set([e.id]),r=e.parentId;for(;r!==null;){if(!t.has(r)||n.has(r))return!1;n.add(r),r=t.get(r)}return!0})}function nz(e,t){return b({version:je(e),project:GR(`Project`,4096).refine(e=>e===`.`||!e.startsWith(`/`)&&!e.includes(`\\`)&&!e.split(`/`).some(e=>!e||e===`..`||e===`.`),`Invalid comment project path.`),comments:WR(ez,`A conversation needs at least one message.`,1).refine(e=>KR(e,e=>e.id),`Duplicate message ID.`).refine(tz,`Invalid comment reply ancestry.`),createdCommit:P((e,t)=>{if(e===``)return{value:e};let n=YR[`~run`](e,t);return n.issues?n:n.value===null?R(`Invalid source commit.`,t.path):{value:n.value}}),id:JR,branch:GR(`Source branch`,1024),status:XR,createdAt:ZR,updatedAt:ZR,anchor:t}).transform(e=>({id:e.id,project:e.project,branch:e.branch,createdCommit:e.createdCommit,comments:e.comments,status:e.status,createdAt:e.createdAt,updatedAt:e.updatedAt,version:e.version,anchor:e.anchor}))}var rz=at(`version`,{1:nz(1,UR($R)),2:nz(2,UR(LR))});b({head:YR,threads:WR(rz,`Invalid comments response.`).refine(e=>KR(e,e=>e.id),`Duplicate conversation ID.`)}).refine(({head:e,threads:t})=>e!==null||!t.length,`Comments are missing their Git revision.`);function iz(e,t){if(![e.x,e.y,t].every(Number.isFinite)||t<=0)throw Error(`Canvas coordinates require finite values and a positive width.`);return{offsetX:Math.max(0,Math.min(1,e.x/t)),offsetY:Math.max(0,Math.min(T,e.y))}}function az(e,t){return{x:e.offsetX*t,y:e.offsetY}}var oz=4e3;function sz(e){let i=e.props.width??1440,a=e.props.initialMode??`pan`,o=1,c,u,d={...e.props.initialHeights},f=EO();e.signal.addEventListener(`abort`,()=>f.dispose(),{once:!0});let p={},h={},g=new Set,_=!1,v=``,y=!1,b=!0,x,S,C=e.props.initialThreadId,w,T,E,D,O;async function k(t){return e.props.onWrite(t)}function A(t,n){let r=e.props.onDeleteComment;if(e.props.capabilities.delete&&r)return async i=>{let a=t.messages[0]?.id===i;await r(t.id,i),a&&(x===t.id&&(x=void 0),n?.(),e.update())}}function j(e){return e.pageId??e.id}function M(e){return e.width??i}function N(t,n){if(t.anchor.pageId!==j(n))return!1;if(n.width===void 0)return!0;let r=e.props.artboards.filter(e=>j(e)===j(n));return r.some(e=>M(e)===t.anchor.viewport)?t.anchor.viewport===M(n):r[0]?.id===n.id}function P(t){return e.props.artboards.find(e=>N(t,e))?.id}function F(t,n){if(e.props.commentsUnavailable||!e.props.capabilities.create)return;D=t.id,E={pageId:j(t),pagePath:t.path,viewport:M(t),offsetX:n.offsetX,offsetY:n.offsetY,element:n.element,...e.props.branch?{branch:e.props.branch}:{}};let r=E;O=n.found?.then(t=>{E===r&&t&&(E={...r,element:t},e.update())}),T=void 0,x=void 0,b=!0,e.update()}function ee(t,n){g.has(t.id)||(g.add(t.id),e.update()),(d[t.id]!==n.height||p[t.id]!==n.path||h[t.id]!==n.pins)&&(d[t.id]=n.height,p[t.id]=n.path,h[t.id]=n.pins,e.update())}function te(){E=void 0,e.update()}function ne(){T=void 0,e.update()}function I(n){e.props.onCopyThreadLink?.(n).then(()=>Ye.success(t(`canvas.canvasWorkspace.discussionLinkCopied`)),()=>Ye.error(t(`canvas.canvasWorkspace.couldNotCopyLink`),{description:t(`canvas.canvasWorkspace.tryAgain`)}))}function L(t,r){return n(pO,{location:t.anchor.element?.label?`${t.anchor.pagePath} · ${t.anchor.element.label}`:t.anchor.pagePath,subtitle:r?yD(t):void 0,actions:r?e.props.renderThreadActions?.(t):void 0,status:t.status,busy:e.props.busy,onClose:r,onCopyLink:r&&e.props.onCopyThreadLink?()=>I(t):void 0,onStatusChange:e.props.capabilities.status?e=>{k({id:t.id,status:e}).catch(()=>{})}:void 0})}function R(t,r){return n(st,{heading:L(t,r),source:t.anchor.element?.source?n(bD,{source:t.anchor.element.source}):null,links:e.props.renderThreadLinks?.(t),messagesLoaded:t.messagesLoaded,messagesTruncated:t.messagesTruncated,messageCount:t.messageCount,messages:t.messages,now:e.props.now,busy:e.props.busy,onReply:e.props.capabilities.reply?(e,n)=>k({id:t.id,body:e,parentId:n}):void 0,viewerId:e.props.viewerId,onDelete:A(t,r)},t.id)}function re(t){return e.props.renderArtboard(t,{mode:e.props.commentsUnavailable&&a===`comment`?`pan`:a,viewport:f,onLayout:e=>ee(t,e),onPick:e=>F(t,e),onWheel:(...e)=>u?.wheel(...e)})}function ie(i){if(p[i.id]&&p[i.id]!==i.path)return null;let c=e.props.snapshot.threads.filter(e=>N(e,i)&&e.status!==`resolved`).map(e=>{let n=h[i.id]?.find(t=>t.id===e.id),r=n&&n.x!==null&&n.y!==null?{x:n.x,y:n.y}:az(e.anchor,M(i));return{id:e.id,author:e.messages[0]?.author??{id:`unknown`,name:t(`canvas.canvasWorkspace.unknownAuthor`)},label:e.anchor.pagePath,status:e.status,left:r.x,top:r.y,detached:n?.match===`missing`}});return n(r,{children:[b?n(bO,{items:c,activeId:x,openId:T,scale:o,onSelect:t=>{t&&e.props.onLoadThread?.(t),y||window.matchMedia(`(max-width: 767px)`).matches?(y=!0,x=t,T=void 0):T=t,E=void 0,e.update()},renderCard:(t,r)=>n(xO,{left:t.left,top:t.top,scale:o,onClose:r,children:R(e.props.snapshot.threads.find(e=>e.id===t.id),r)})}):null,E&&D===i.id?n(`div`,{role:`dialog`,"aria-label":t(`canvas.canvasWorkspace.newComment`),class:`pointer-events-auto absolute z-30 overflow-y-auto overscroll-contain rounded-[1.25rem]`,style:{left:E.offsetX*M(i),top:E.offsetY,transform:`translate(calc(12px + var(--canvas-card-x, 0px)), calc(-8px + var(--canvas-card-y, 0px))) scale(var(--canvas-label-scale, ${1/o}))`,transformOrigin:`0 0`},mix:[l(PE),s(`pointerdown`,e=>e.stopPropagation()),s(`click`,e=>e.stopPropagation()),s(`wheel`,e=>e.stopPropagation()),s(`keydown`,e=>{e.stopPropagation(),e.key===`Escape`&&te()})],children:n(le,{busy:e.props.busy||!e.props.loaded,onCancel:te,onSubmit:async t=>{let n=new Set(e.props.snapshot.threads.map(e=>e.id));O&&await Promise.race([O,new Promise(e=>setTimeout(e,15e3))]);let r=await k({anchor:E,body:t});T=r.thread?.id??r.threads.find(e=>!n.has(e.id))?.id,E=void 0,a=`pan`,v=``,e.update()}})}):null]})}return()=>{i=e.props.width??1440;let p=T??x;p&&!e.props.snapshot.threads.find(e=>e.id===p)?.messagesLoaded&&e.queueTask(()=>{e.props.onLoadThread?.(p)});let h=e.props.initialThreadId;if(h!==C&&(C=h,S=void 0),h&&h!==S&&e.props.loaded){let t=e.props.snapshot.threads.find(e=>e.id===h);t?(S=h,x=h,e.queueTask(()=>{e.props.onLoadThread?.(h)}),y=!0,e.queueTask(()=>{let e=P(t);e&&u?.focus(e)})):w!==h&&(w=h,e.queueTask(()=>{e.props.onLoadThread?.(h)}))}let D=!_&&e.props.artboards.some(e=>!g.has(e.id));return n(`div`,{class:`@container relative flex h-full min-h-0 flex-col`,mix:l((t,n)=>{let r=setTimeout(()=>{_=!0,e.update()},oz);n.addEventListener(`abort`,()=>clearTimeout(r),{once:!0})}),children:[n(`div`,{role:`toolbar`,"aria-label":t(`canvas.canvasWorkspace.canvasTools`),class:`bud-toolbar shrink-0`,children:n(Nt,{start:n(Qe,{class:`shrink-0`,children:[e.props.onShowSidebar?n(r,{children:[n(U,{icon:`branch`,label:e.props.sidebarLabel??t(`canvas.canvasWorkspace.showSidebar`),tooltip:!0,mix:s(`click`,()=>e.props.onShowSidebar?.())}),n(Ie,{})]}):null,e.props.interactive===!1?null:n(r,{children:[n(U,{icon:`hand`,label:t(`canvas.canvasWorkspace.panCanvas`),tooltip:!0,active:a===`pan`,mix:s(`click`,()=>{a=`pan`,v=``,te()})}),n(U,{icon:`pointer`,label:t(`canvas.canvasWorkspace.interactWithPages`),tooltip:!0,active:a===`interact`,mix:s(`click`,()=>{a=`interact`,v=``,te()})})]}),e.props.onThemeChange?n(U,{icon:e.props.theme===`dark`?`sun`:`moon`,label:e.props.theme===`dark`?t(`canvas.canvasWorkspace.showLightPages`):t(`canvas.canvasWorkspace.showDarkPages`),tooltip:!0,mix:s(`click`,()=>e.props.onThemeChange?.(e.props.theme===`dark`?`light`:`dark`))}):null,e.props.onTopOnlyChange?n(U,{icon:e.props.topOnly?`unfold`:`fold`,label:e.props.topOnly?t(`canvas.canvasWorkspace.showFullPages`):t(`canvas.canvasWorkspace.showOnlyTopOfEachPage`),tooltip:!0,active:e.props.topOnly,mix:s(`click`,()=>{e.props.onTopOnlyChange?.(!e.props.topOnly),e.queueTask(()=>u?.fit())})}):null,e.props.tools?n(r,{children:[e.props.interactive===!1&&!e.props.onThemeChange&&!e.props.onTopOnlyChange?null:n(Ie,{}),e.props.tools]}):null]}),children:[n(U,{icon:`minus`,label:t(`canvas.zoomOut`),tooltip:!0,shortcut:`-`,class:`@max-md:hidden`,mix:s(`click`,()=>u?.zoom(.8))}),n(ye,{label:t(`canvas.canvasWorkspace.fitAllRoutes`),shortcut:`0`,children:n(`button`,{type:`button`,class:`bud-interaction h-control min-w-10 rounded-lg px-1`,"aria-label":t(`canvas.canvasWorkspace.fitAllRoutes`),mix:s(`click`,()=>u?.fit()),children:n(m,{variant:`ui`,children:n(`span`,{mix:l(e=>c=e),children:[Math.round(o*100),`%`]})})})}),n(U,{icon:`plus`,label:t(`canvas.zoomIn`),tooltip:!0,shortcut:`+`,class:`@max-md:hidden`,mix:s(`click`,()=>u?.zoom(1.25))}),n(U,{icon:`fit`,label:t(`canvas.fit`),tooltip:!0,shortcut:`f`,mix:s(`click`,()=>u?.fit())}),e.props.commentsUnavailable?null:n(Ie,{}),e.props.commentsUnavailable?null:n(_O,{canCreate:e.props.capabilities.create,placing:a===`comment`,pinsVisible:b,commentsOpen:y,onPlacingChange:n=>{a=n?`comment`:`pan`,b=!0,n||(E=void 0),v=n?t(`canvas.canvasWorkspace.clickAnywhereToStartConversation`):``,e.update()},onPinsVisibleChange:t=>{b=t,t||(T=void 0),e.update()},onCommentsOpenChange:t=>{y=t,T=void 0,t||(x=void 0),e.update()}}),!e.props.commentsUnavailable&&e.props.onSync&&e.props.capabilities.sync?n(U,{icon:`sync`,label:e.props.busy?t(`canvas.canvasWorkspace.savingComments`):t(`canvas.canvasWorkspace.syncComments`),tooltip:!0,disabled:e.props.busy,mix:s(`click`,()=>{e.props.onSync?.()})}):null]})}),n(`div`,{class:`relative min-h-0 flex-1`,children:[n(PO,{artboards:e.props.artboards,width:i,heights:d,loading:D,storageKey:e.props.storageKey,renderArtboard:re,renderOverlay:ie,renderLabelActions:e.props.renderArtboardActions,viewport:f,onControls:t=>{u=t,e.props.onControls?.(t)},onScale:e=>{o=e,c&&(c.textContent=`${Math.round(o*100)}%`)}}),e.props.error||e.props.commentsUnavailable||v?n(`div`,{role:e.props.error?`alert`:`status`,class:`absolute top-3 left-3 max-w-[calc(100%-24px)] bud-overlay rounded-lg px-3 py-2 ${e.props.error?`text-red-500`:`text-muted`}`,children:[n(m,{variant:`ui-caption`,children:e.props.error||e.props.commentsUnavailable||v}),e.props.error?n(`button`,{type:`button`,class:`ml-2 underline`,mix:s(`click`,()=>{e.props.onReload?.()}),children:n(m,{variant:`ui-caption`,children:t(`canvas.canvasWorkspace.reload`)})}):null]}):null,y&&!e.props.commentsUnavailable?n(yO,{threads:e.props.snapshot.threads,capabilities:e.props.capabilities,renderThreadLinks:e.props.renderThreadLinks,renderThreadActions:e.props.renderThreadActions,selected:x,loaded:e.props.loaded,busy:e.props.busy,now:e.props.now,error:e.props.error,onSelect:t=>{if(x=t.id,e.props.onLoadThread?.(t.id),T=void 0,t.anchor&&`pageId`in t.anchor){let e=P(t);e&&u?.focus(e)}e.update()},onCloseThread:()=>{x=void 0,e.update()},onClose:()=>{y=!1,x=void 0,ne()},onWrite:e=>k({id:e.id,body:e.body,parentId:e.parentId,status:e.status}),viewerId:e.props.viewerId,onDelete:(e,t)=>A(e)?.(t)??Promise.resolve(),onCopyLink:e.props.onCopyThreadLink,onReload:e.props.onReload?()=>{e.props.onReload?.()}:void 0,onSync:e.props.onSync?()=>{e.props.onSync?.().catch(()=>{})}:void 0}):null,e.props.overlay]})]})}}var cz=`@new`;function lz(e){let r=!1;function i(t){r=t,e.update()}return()=>n(Me,{children:[n(F,{"aria-expanded":r,class:`bud-control flex h-control items-center gap-1.5 rounded-lg ps-2.5 pe-2 text-ink`,mix:[Ae({placement:`bottom-end`,offset:6}),Pe(),s(`click`,()=>i(!r))],children:[n(m,{variant:`ui`,children:t(`tasks.taskWorkspace.sync`)}),n(V,{name:`chevron-down`,size:14,class:`text-muted`})]}),n(`div`,{class:`bud-overlay bud-menu m-0 w-72 rounded-xl p-1 text-ink`,mix:y({open:r,onHide:()=>i(!1)}),children:[n(m,{as:`p`,variant:`ui-caption`,tone:`muted`,class:`px-2.5 pt-2 pb-1.5`,children:t(`tasks.taskWorkspace.remoteDescription`,{adapter:e.props.adapter})}),[[`pull`,`pull`,t(`tasks.taskWorkspace.pullChanges`),t(`tasks.taskWorkspace.bringRemoteWork`)],[`push`,`push`,t(`tasks.taskWorkspace.pushChanges`),t(`tasks.taskWorkspace.shareLocalChanges`)]].map(([t,r,a,o],c)=>n(F,{"aria-label":a,disabled:e.props.busy,class:`flex w-full items-start gap-2.5 rounded-lg px-2.5 py-2 text-left`,mix:[...c===0?[fe()]:[],s(`click`,()=>{i(!1),e.props.onSync(t)})],children:[n(V,{name:r,size:16,class:`mt-0.5 text-muted`}),n(`span`,{class:`flex flex-col`,children:[n(m,{variant:`ui`,weight:`medium`,children:a}),n(m,{variant:`ui-caption`,tone:`muted`,children:o})]})]},t))]})]})}function uz(e){return()=>n(`div`,{class:`sticky left-0 mx-auto flex w-full max-w-md flex-col items-center gap-3 px-4 py-16 text-center`,children:[n(`span`,{class:`flex size-10 items-center justify-center rounded-xl bg-[var(--bud-card)] text-muted ring-1 ring-[var(--bud-card-border)]`,children:n(V,{name:e.props.icon??`tasks`,size:18})}),n(m,{as:`h2`,variant:`ui`,weight:`medium`,children:e.props.title}),n(m,{as:`div`,variant:`ui`,tone:`muted`,class:`w-full text-balance`,children:e.props.children}),e.props.action]})}function dz(e){let i=new Map;try{if(e.props.storageKey){i=wt(xE(`${e.props.storageKey}:drafts`)??[]);let t=i.get(`new`);t?.revision===null&&!i.has(cz)&&(i.set(cz,t),i.delete(`new`))}}catch{}let a=!1,o=!1,u=``;function d(t,n){i.set(t,n),e.props.storageKey&&SE(`${e.props.storageKey}:drafts`,[...i].filter(([,e])=>ct(e)).slice(-25)),e.update()}function h(t,n){let r=i.get(t);return(!r||!ct(r)&&r.revision!==(n?.revision??null))&&(r=Be(e.props.schema,n),i.set(t,r)),r}async function y(n,r){let i=e.props.snapshot?.items.find(e=>e.id===n);if(i&&e.props.operations&&!o&&e.props.schema&&Mt(i,e.props.schema,`status`)!==r){o=!0,u=``,e.update();try{if(!i.revision)throw Error(t(`tasks.taskWorkspace.refreshBeforeMoving`));let a=ae(e.props.schema,`status`);if(!a?.editable)throw Error(t(`tasks.taskWorkspace.statusUnavailable`));await e.props.operations.update(n,{expectedRevision:i.revision,values:{[a.id]:r}}),Ye.success(t(`tasks.taskWorkspace.movedTo`,{id:n,status:e.props.schema.statuses.find(e=>e.value===r)?.label??et(r)}))}catch(e){u=e instanceof Error?e.message:t(`tasks.taskWorkspace.moveFailed`)}finally{o=!1,e.signal.aborted||e.update()}}}async function b(n){if(e.props.operations&&!o){o=!0,u=``,e.update();try{let r=await e.props.operations.sync({direction:n}),i=e.props.schema?.adapter.label;r.state===`complete`?Ye.success(t(n===`pull`?`tasks.taskWorkspace.pulledChanges`:`tasks.taskWorkspace.pushedChanges`,{label:i??t(`tasks.taskWorkspace.task`)})):r.state===`not-configured`?Ye(t(`tasks.taskWorkspace.noRemote`,{label:i??t(`tasks.taskWorkspace.taskLower`)}),{description:t(`tasks.taskWorkspace.configureAdapter`)}):Ye(t(`tasks.taskWorkspace.syncDisabled`,{label:i??t(`tasks.taskWorkspace.taskLower`)}))}catch(e){u=e instanceof Error?e.message:t(`tasks.taskWorkspace.syncFailed`)}finally{o=!1,e.signal.aborted||e.update()}}}let x={...He},S=!1,C=!1,T=null,E=null,D=!1,O=null,A=null,j=null;function M(){e.props.storageKey&&SE(e.props.storageKey,{version:1,view:x,scrollTop:j?.top??A?.top??E?.scrollTop??0,scrollLeft:j?.left??A?.left??E?.scrollLeft??0})}function N(t,n){x={...x,[t]:n},M(),e.update()}function P(t,n){t&&(a=!1),!e.props.selectedId&&n&&(T=n),e.props.onSelect(t)}return()=>{let{snapshot:i,schema:F,loading:ee,error:ne,noProject:I,selectedId:L,detail:R,detailLoading:re,detailError:ie,onReload:oe,onReloadDetail:se}=e.props;L&&!O&&E&&(A={top:E.scrollTop,left:E.scrollLeft}),O&&!L&&e.queueTask(()=>{A&&E?.scrollTo(A),A=null,T?.isConnected?T.focus({preventScroll:!0}):E?.focus({preventScroll:!0})}),O=L;let ce=i&&F?Ge(i,x,F):null;if(j&&!L&&i?.connection.state===`ready`){let t=j;j=null,e.queueTask(()=>E?.scrollTo(t))}let z=F?Re(F,i?.items):[],le=new Set(i?.items.filter(e=>e.ready).map(e=>e.id)??[]),ue=[x.status,x.priority,x.type,x.assignee,x.label,x.epic,...Object.values(x.fields)].filter(Boolean).length,de=JSON.stringify(x)!==JSON.stringify({...He,mode:x.mode}),fe={status:[`status`,`statuses`],priority:[`priority`,`priorities`],type:[`type`,`types`],assignee:[`assignee`,`assignees`],labels:[`label`,`labels`]},B=F&&i?F.fields.filter(e=>e.editable&&[`status`,`priority`,`enum`,`person`,`people`,`labels`].includes(e.kind)&&(e.visibility!==`hidden`||e.role===`type`)).map(e=>{let n=e.role&&e.role in fe?fe[e.role]:null,r=dt(e,i,F);return(e.kind===`person`||e.kind===`people`)&&(r=[{value:`__unassigned`,label:t(`tasks.taskWorkspace.unassigned`)},...r]),{id:e.id,key:n?.[0],label:t(`tasks.taskWorkspace.filterField`,{field:n?.[0]??e.label.toLowerCase()}),any:t(`tasks.taskWorkspace.allField`,{field:n?.[1]??e.label.toLowerCase()}),options:r}}):[];B.sort((e,t)=>(e.key?[`status`,`priority`,`type`,`assignee`,`label`].indexOf(e.key):5)-(t.key?[`status`,`priority`,`type`,`assignee`,`label`].indexOf(t.key):5));let pe=i?.items.filter(e=>e.counts.children!==void 0||e.relations.some(e=>e.direction===`in`&&F?.relations.some(t=>t.type===e.type&&t.kind===`parent`)))??[],me=e.props.design?.card??Tt,he=e.props.design?.page??ft,ge=e.props.design?.column??rt;function _e(t){let n={schema:F,itemHref:e.props.itemHref??H,onSelect:P};return{...n,operations:e.props.operations,project:e.props.project,renderField:Ct(n,t)}}let ve=t=>c(me,{..._e(t),key:t.id,item:t,schema:F,ready:le.has(t.id),blocked:ce?.blockedIds.has(t.id)??!1,done:F?vt(t,F):!1,selected:L===t.id,href:(e.props.itemHref??H)(t.id),draggable:!!e.props.operations&&!!F?.capabilities.update&&!!ae(F,`status`)?.editable&&!o&&!!t.revision,compact:x.mode===`list`,onSelect:P}),ye=ee&&!i&&!ne&&!I,be=e=>n(`div`,{class:`bud-segmented shrink-0 ${e}`,role:`group`,"aria-label":t(`tasks.taskWorkspace.readiness`),children:[`all`,`ready`,`blocked`].filter(e=>e!==`ready`||F?.capabilities.ready).map(e=>n(`button`,{type:`button`,"aria-pressed":x.readiness===e?`true`:`false`,mix:s(`click`,()=>N(`readiness`,e)),children:[n(m,{variant:`ui`,children:et(e)}),n(m,{variant:`ui-caption`,class:`tabular-nums opacity-70`,children:ce?.counts[e]??0})]},e))});return n(`section`,{"aria-label":t(`tasks.taskWorkspace.projectTasks`),class:`relative flex h-full min-h-0 flex-col`,mix:l((t,n)=>{if(D)return;D=!0;let r=window.matchMedia(`(max-width: 767px)`);C=r.matches;try{let t=e.props.storageKey&&xE(e.props.storageKey);if(t&&typeof t==`object`&&`version`in t){if(t.version===1&&`view`in t){x=lt(t.view);let{scrollTop:e,scrollLeft:n}=t;j={top:typeof e==`number`&&Number.isFinite(e)?e:0,left:typeof n==`number`&&Number.isFinite(n)?n:0}}}else C&&(x={...x,mode:`list`})}catch{C&&(x={...x,mode:`list`})}r.addEventListener(`change`,()=>{C=r.matches,e.update()},{signal:n}),t.ownerDocument.addEventListener(`keydown`,n=>{t.checkVisibility()&&n.key===`Escape`&&e.props.selectedId&&(n.preventDefault(),P(null))},{signal:n}),n.addEventListener(`abort`,M,{once:!0}),e.update()}),children:ye?n(v,{label:t(`tasks.taskWorkspace.loadingTasks`)}):n(r,{children:[n(`div`,{class:`flex min-h-0 flex-1 flex-col`,hidden:L?!0:void 0,children:[n(`header`,{class:`flex shrink-0 flex-col`,children:[n(Nt,{divider:!1,start:n(r,{children:[n(`div`,{class:`flex shrink-0 items-center gap-2 ps-2 pe-2`,children:[n(Je,{items:[{label:t(`screens.tasks`)}]}),i?.connection.state===`ready`?n(m,{variant:`ui`,tone:`muted`,class:`truncate max-xl:hidden`,children:[i.items.length,F?.capabilities.ready?` · ${t(`tasks.taskWorkspace.readyCount`,{count:ce?.counts.ready??0})}`:``]}):null]}),n(HD,{label:t(`tasks.taskWorkspace.searchTasks`),placeholder:t(`tasks.taskWorkspace.searchPlaceholder`),value:x.query,class:`w-40 shrink-0 lg:w-48 xl:w-72`,mix:s(`input`,e=>N(`query`,e.currentTarget.value))}),be(`max-md:hidden`)]}),children:n(`div`,{class:`flex shrink-0 items-center gap-2`,children:[be(`md:hidden`),n(`span`,{class:`relative flex shrink-0`,children:[n(U,{tooltip:!0,icon:`filter`,label:t(`tasks.taskWorkspace.filters`),active:S,"aria-expanded":S,"aria-controls":`bud-task-filters`,mix:s(`click`,()=>{S=!S,e.update()})}),ue?n(m,{variant:`ui-caption`,weight:`medium`,"aria-label":t(`tasks.taskWorkspace.activeFilters`,{count:ue}),class:`pointer-events-none absolute -end-0.5 -top-0.5 min-w-4 rounded-full bg-ink px-1 text-center text-[10px]/4 text-[var(--bud-background)] tabular-nums`,children:ue}):null]}),[{key:`sort`,icon:`sort`,label:t(`tasks.taskWorkspace.sortTasks`),options:[{value:`priority`,label:t(`tasks.taskWorkspace.priority`)},{value:`updated`,label:t(`tasks.taskWorkspace.recentlyUpdated`)},{value:`created`,label:t(`tasks.taskWorkspace.newestFirst`)},{value:`title`,label:t(`tasks.taskWorkspace.title`)}]},{key:`group`,icon:`layers`,label:t(`tasks.taskWorkspace.groupTasks`),options:[{value:`none`,label:t(`tasks.taskWorkspace.noGrouping`)},{value:`epic`,label:t(`tasks.taskWorkspace.byEpic`)}]}].map(e=>n(te,{headless:!0,label:e.label,title:t(`tasks.taskWorkspace.menuTitle`,{label:e.label,value:e.options.find(t=>t.value===x[e.key])?.label??``}),value:x[e.key],options:e.options,placement:`bottom-end`,class:`bud-interaction flex size-control shrink-0 items-center justify-center rounded-lg`,onChange:t=>e.key===`sort`?N(`sort`,t):N(`group`,t),children:n(V,{name:e.icon,size:16})},e.key)),n(`div`,{class:`bud-segmented`,role:`group`,"aria-label":t(`tasks.taskWorkspace.taskLayout`),children:[[`board`,`board`,t(`tasks.taskWorkspace.boardView`)],[`list`,`list`,t(`tasks.taskWorkspace.listView`)]].map(([e,t,r])=>n(`button`,{type:`button`,"aria-label":r,title:r,"aria-pressed":x.mode===e?`true`:`false`,mix:s(`click`,()=>N(`mode`,e)),children:n(V,{name:t,size:15})},e))}),n(Ie,{}),n(U,{tooltip:!0,icon:`sync`,label:t(`tasks.taskWorkspace.refreshTasks`),disabled:ee||I,mix:s(`click`,oe)}),e.props.operations&&i?.connection.state===`ready`?n(r,{children:[F?.capabilities.sync?n(lz,{adapter:F.adapter.label,busy:o,onSync:e=>{b(e)}}):null,F?.capabilities.create?n(f,{disabled:o,mix:s(`click`,()=>{a=!0,P(null),T=document.activeElement,e.update()}),children:[n(V,{name:`plus`,size:16}),n(`span`,{class:`max-sm:sr-only`,children:t(`tasks.taskWorkspace.newTask`)})]}):null]}):null]})}),n(`div`,{class:`flex flex-col gap-3 px-4 pt-3 empty:hidden`,children:[S?n(`div`,{id:`bud-task-filters`,class:`grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6`,role:`group`,"aria-label":t(`tasks.taskWorkspace.taskFilters`),children:[B.map(e=>n(te,{label:e.label,value:e.key?x[e.key]:x.fields[e.id]??``,class:`w-full`,search:e.options.length>8,options:[{value:``,label:e.any},...e.options],onChange:t=>e.key?N(e.key,t):N(`fields`,{...x.fields,[e.id]:t})},e.id)),n(te,{label:t(`tasks.taskWorkspace.filterEpic`),value:x.epic,class:`w-full`,search:pe.length>8,options:[{value:``,label:t(`tasks.taskWorkspace.allEpics`)},...pe.map(e=>({value:e.id,label:Mt(e,F,`title`)||e.id}))],onChange:e=>N(`epic`,e)})]}):null,i?.connection.state===`ready`&&ce&&(de||o)?n(`div`,{class:`flex min-h-5 flex-wrap items-center gap-x-3 gap-y-1`,children:[de?n(r,{children:[n(m,{variant:`ui-caption`,tone:`muted`,role:`status`,children:[t(`tasks.taskWorkspace.showingCount`,{shown:ce.issues.length,total:i.items.length}),i.truncated?` · ${t(`tasks.taskWorkspace.limitedResults`)}`:``]}),n(f,{variant:`secondary`,size:`small`,mix:s(`click`,()=>{x={...He,mode:x.mode},M(),e.update()}),children:t(`tasks.taskWorkspace.resetView`)})]}):null,o?n(m,{variant:`ui-caption`,tone:`muted`,role:`status`,class:`sm:ms-auto`,children:t(`tasks.taskWorkspace.saving`)}):null]}):null,u?n(m,{as:`p`,variant:`ui`,role:`alert`,class:`rounded-lg bg-[var(--bud-card)] px-3 py-2 text-red-600 ring-1 ring-[var(--bud-card-border)] dark:text-red-400`,children:u}):null]})]}),n(`div`,{tabindex:-1,class:`flex min-h-0 flex-1 flex-col gap-6 overflow-auto overscroll-contain px-4 pt-4 pb-6 outline-none`,"aria-label":t(`tasks.taskWorkspace.taskResults`),"aria-busy":ee?`true`:`false`,mix:[l(e=>{E=e}),w(`y`),s(`scroll`,M)],children:[ne?n(uz,{title:t(`tasks.taskWorkspace.loadFailed`),icon:`circle-alert`,action:n(f,{mix:s(`click`,oe),children:t(`tasks.taskWorkspace.tryAgain`)}),children:n(`span`,{role:`alert`,children:ne})}):null,I?n(uz,{title:t(`tasks.taskWorkspace.connectProject`),icon:`tasks`,children:[n(m,{as:`p`,variant:`ui`,children:t(`tasks.taskWorkspace.startBud`)}),n(m,{as:`pre`,variant:`code`,class:`mt-3 overflow-auto rounded-lg bg-[var(--bud-card)] p-3 text-left text-ink ring-1 ring-[var(--bud-card-border)]`,children:`npx @bud.sh/app`}),n(m,{as:`p`,variant:`ui`,class:`mt-3`,children:t(`tasks.taskWorkspace.addPlugin`)})]}):i&&i.connection.state!==`ready`?n(uz,{icon:i.connection.state===`not-initialized`?`inbox`:`warning`,title:i.connection.state===`not-initialized`?t(`tasks.taskWorkspace.noWorkspace`,{label:F?.adapter.label??t(`tasks.taskWorkspace.taskLower`)}):i.connection.state===`unavailable`?t(`tasks.taskWorkspace.connectAdapter`,{label:F?.adapter.label??t(`tasks.taskWorkspace.anAdapter`)}):t(`tasks.taskWorkspace.updateAdapter`,{label:F?.adapter.label??t(`tasks.taskWorkspace.taskLower`)}),children:[n(m,{as:`p`,variant:`ui`,children:i.connection.message}),n(m,{as:`p`,variant:`ui`,class:`mt-3`,children:t(`tasks.taskWorkspace.configureWorkspace`)})]}):null,i?.connection.state===`ready`&&ce?ce.issues.length===0?n(uz,{icon:i.items.length?`search`:`inbox`,title:i.items.length?t(`tasks.taskWorkspace.noMatches`):t(`tasks.taskWorkspace.boardEmpty`),children:i.items.length?t(`tasks.taskWorkspace.tryDifferentSearch`):t(`tasks.taskWorkspace.createToPlan`)}):ce.groups.map(e=>n(`section`,{class:`min-w-0`,"aria-label":e.title,children:[x.group===`epic`&&x.mode===`board`?n(`div`,{class:`sticky left-0 mb-3 flex items-center gap-2 text-muted`,children:[n(V,{name:`layers`,size:14}),n(m,{as:`h3`,variant:`ui`,weight:`medium`,class:`text-ink`,children:e.title}),n(m,{variant:`ui-caption`,class:`tabular-nums`,children:e.issues.length})]}):null,x.mode===`list`||!z.length?n(_,{children:[n(g,{title:e.title,headingLevel:3,metadata:n(m,{variant:`ui-caption`,tone:`muted`,class:`tabular-nums`,children:e.issues.length})}),n(p,{flush:!0,children:n(`div`,{class:`flex w-full min-w-0 flex-col gap-px p-1`,children:e.issues.map(ve)})})]}):n(`div`,{class:`flex items-start gap-3`,children:z.filter(e=>!x.status||x.status===e.value).map(r=>{let i=e.issues.filter(e=>Mt(e,F,`status`)===r.value);return n(`section`,{class:`flex flex-col gap-2 ${i.length?`min-w-60 max-w-sm flex-1 basis-0`:`w-32 shrink-0`}`,"aria-label":t(`tasks.taskWorkspace.statusColumn`,{status:r.label}),mix:[s(`dragover`,e=>{e.dataTransfer?.types.includes(`application/x-bud-task`)&&!o&&r.value&&(e.preventDefault(),e.dataTransfer.dropEffect=`move`)}),s(`drop`,e=>{let t=e.dataTransfer?.getData(`application/x-bud-task`);t&&r.value&&(e.preventDefault(),y(t,r.value))})],children:n(ge,{..._e(null),item:null,status:r,items:i,children:i.map(ve)})},r.value)})})]},e.id)):null]})]}),a&&F&&e.props.operations&&i?.connection.state===`ready`?n(k,{label:t(`tasks.taskWorkspace.createTask`),size:`large`,onClose:()=>{a=!1,e.update()},children:n(mt,{snapshot:i,schema:F,operations:e.props.operations,draft:h(cz),onDraft:e=>d(cz,e),onClose:()=>{a=!1,e.queueTask(()=>T?.focus()),e.update()},onSaved:t=>{d(cz,Be(F)),a=!1,P(t.id),e.update()}})}):null,L&&F?c(he,{..._e(R?.item.id===L?R.item:null),item:R?.item.id===L?R.item:null,design:e.props.design,key:L,snapshot:i,schema:F,discussion:e.props.discussion,operations:e.props.operations,draft:R?.item.id===L?h(L,R.item):void 0,onDraft:e=>d(L,e),id:L,itemHref:e.props.itemHref??H,detail:R?.item.id===L?R:null,loading:re,error:ie,onSelect:P,onReload:se}):null]})})}}function fz(e){return()=>{let{item:r,context:i,expanded:a,onAction:o,mutable:c,selectionCount:u=1}=e.props,d=r.kind===`directory`?[{name:`toggle`,label:t(a?`files.fileTreeMenu.collapseFolder`:`files.fileTreeMenu.expandFolder`)},{name:`copy-path`,label:t(`files.fileTreeMenu.copyRelativePath`)}]:[{name:`open`,label:t(`files.fileTreeMenu.openFile`)},{name:`copy-path`,label:t(`files.fileTreeMenu.copyRelativePath`)},{name:`copy-link`,label:t(`files.fileTreeMenu.copyFileLink`)}];return c&&d.push({name:`new-file`,label:t(`files.fileTreeMenu.newFile`)},{name:`new-folder`,label:t(`files.fileTreeMenu.newFolder`)},{name:`rename`,label:t(`files.fileTreeMenu.rename`)},{name:`move`,label:t(`files.fileTreeMenu.moveItems`,{count:u})},{name:`duplicate`,label:t(`files.fileTreeMenu.duplicateItems`,{count:u})},{name:`delete`,label:t(`files.fileTreeMenu.deleteItems`,{count:u})}),n(xe,{label:t(`files.fileTreeMenu.actionsFor`,{name:r.name}),children:n(`div`,{class:`${pe} outline-none`,mix:[N(),l(e=>{queueMicrotask(()=>{e.isConnected&&e.focus()})}),re(e=>{let t=e.item.name;i.close({restoreFocus:t!==`rename`}),o(t)}),s(`keydown`,e=>{(e.key===`Escape`||e.key===`Tab`)&&(e.preventDefault(),i.close())})],children:d.map(e=>n(`div`,{class:ie,mix:De({name:e.name,label:e.label}),children:n(m,{variant:`ui`,children:e.label})},e.name))})})}}function pz(e){let n=[...new Set(e.map(e=>_e(e.replace(/\/$/,``))))].sort((e,t)=>e.length-t.length||e.localeCompare(t)),r=[];for(let e of n)r.some(t=>e.startsWith(`${t}/`))||r.push(e);if(!r.length||r.length>100)throw TypeError(t(`files.fileActions.selectBetween1And100`));return r}function mz(e,t){let n=t?_e(t.replace(/\/$/,``)):``;return pz(e).map(e=>({path:e,destination:_e(`${n?`${n}/`:``}${e.split(`/`).at(-1)}`)}))}function hz(e,n,r){let i=e.lastIndexOf(`/`),a=e.slice(0,i+1),o=e.slice(i+1),s=r?-1:o.lastIndexOf(`.`),c=s>0?o.slice(0,s):o,l=s>0?o.slice(s):``;for(let e=1;e<=1e3;e++){let t=`${a}${c} copy${e>1?` ${e}`:``}${l}`;if(!n.has(t.normalize(`NFC`).toLowerCase()))return t}throw TypeError(t(`files.fileActions.chooseAvailableDestination`))}function gz(e,t){if(e.action===`create-file`||e.action===`create-folder`)return e.directory?`${e.directory}/`:``;if(e.entries?.length===1)return e.entries[0].destination;if(e.paths.length!==1)return e.directory??``;let n=e.paths[0];return e.action===`duplicate`?hz(n,new Set(t?.entries.map(e=>e.path.normalize(`NFC`).toLowerCase())),t?.entries.find(e=>e.path===n)?.kind===`directory`):n}function _z(e,t,n){if(e.action===`create-file`)return Ke({kind:`create-file`,path:t,contents:``});if(e.action===`create-folder`)return Ke({kind:`create-folder`,path:t});if(e.action===`restore`)return Ke({kind:`restore`,recoveryId:e.recoveryId});let r=pz(e.paths);if(e.action===`delete`)return Ke({kind:`delete`,paths:r});let i=(e.entries?.length===1?[{...e.entries[0],destination:t}]:e.entries)??(r.length===1?[{path:r[0],destination:t}]:mz(r,t));if(e.action===`duplicate`&&r.length>1&&!e.entries){let e=new Set(n?.entries.map(e=>e.path.normalize(`NFC`).toLowerCase()));i=i.map(t=>{let r=hz(t.destination,e,n?.entries.find(e=>e.path===t.path)?.kind===`directory`);return e.add(r.normalize(`NFC`).toLowerCase()),{path:t.path,destination:r}})}return Ke({kind:e.action===`duplicate`?`duplicate`:`move`,entries:i})}function vz(e,t,n){let r=n.items.filter(e=>e.status===`applied`),i=t===`move`?r.filter(e=>e.source&&e.destination):[],a=t===`delete`?r.flatMap(e=>e.source??[]):[],o=e=>{if(a.some(t=>e===t||e.startsWith(`${t}/`)))return null;let t=i.find(t=>e===t.source||e.startsWith(`${t.source}/`));return t?`${t.destination}${e.slice(t.source.length)}`:e},s=e=>[...new Set(e.flatMap(e=>o(e)??[]))],c=[`create-file`,`duplicate`,`restore`].includes(t)?r.find(e=>e.kind===`file`&&e.destination)?.destination:null,l=c??(e.selected?o(e.selected):null),u=r.flatMap(e=>{let t=e.destination;if(!t)return[];let n=t.split(`/`),r=n.length-(e.kind===`directory`?0:1);return n.slice(0,r).map((e,t)=>n.slice(0,t+1).join(`/`))});return{...e,selected:l,search:``,filter:`all`,showDotfiles:!0,selection:c?[c]:s(e.selection),expanded:[...new Set([...s(e.expanded),...u])].slice(0,4096),recent:[...new Set([...l?[l]:[],...s(e.recent)])].slice(0,20)}}function yz(e,t){let n=t.items.filter(e=>e.status!==`applied`);return n.length?e.kind===`move`||e.kind===`duplicate`?Ke({kind:e.kind,entries:n.map(e=>({path:e.source,destination:e.destination}))}):e.kind===`delete`?Ke({kind:`delete`,paths:n.map(e=>e.source)}):e:null}var bz={"--trees-bg-override":`var(--bud-editor)`,"--trees-fg-override":`var(--bud-foreground)`,"--trees-fg-muted-override":`var(--bud-muted)`,"--trees-bg-muted-override":`var(--bud-hover)`,"--trees-input-bg-override":`var(--bud-control)`,"--trees-border-color-override":`var(--bud-border)`,"--trees-indent-guide-bg-override":`var(--bud-border)`,"--trees-font-family-override":`var(--bud-font-sans)`,"--trees-font-size-override":`13px`,"--trees-padding-inline-override":`8px`,"--trees-selected-bg-override":`var(--bud-control-active)`,"--trees-selected-fg-override":`var(--bud-foreground)`,"--trees-selected-focused-border-color-override":`var(--bud-muted)`,"--trees-focus-ring-color-override":`var(--bud-muted)`},xz={set:`complete`,colored:!0},Sz=`[data-item-contains-git-change="true"] > [data-item-section="content"] {
1570
+ }`}var oP=new WeakMap;function sP(e){let t=oP.get(e);if(t!=null)return t;let n=document.createElement(`div`);n.setAttribute(aA,`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(),oP.set(e,i),i}function cP(e,t){if(!e.isConnected)return;let n=sP(t);if(n==null)return;let r=t.querySelector(`style[${oA}]`),i=r instanceof HTMLStyleElement?r:document.createElement(`style`);r instanceof HTMLStyleElement||(i.setAttribute(oA,``),t.appendChild(i)),i.textContent=`:host { ${sA}: ${n}px; }`}var lP;function uP(e){if(typeof CSSStyleSheet<`u`&&typeof CSSStyleSheet.prototype.replaceSync==`function`&&`adoptedStyleSheets`in e){lP??(lP=new CSSStyleSheet,lP.replaceSync(iP(nP)));let t=!1;try{e.adoptedStyleSheets=[lP],t=!0}catch{}if(t){e.querySelector(`style[${rA}]`)?.remove();return}}if(e.querySelector(`style[data-file-tree-style]`)==null){let t=document.createElement(`style`);t.setAttribute(rA,``),t.textContent=iP(nP),e.prepend(t)}}function dP(e,t){fP(e,t),uP(t),cP(e,t)}function fP(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`});dP(this,e)}}if(customElements.define(nA,e),typeof document<`u`)for(let e of Array.from(document.querySelectorAll(nA)))e instanceof HTMLElement&&dP(e,e.shadowRoot??e.attachShadow({mode:`open`}))}var pP=e=>e.startsWith(`f::`)?e.slice(3):e;function mP(e){let t=e.lastIndexOf(`/`);return t<0?{parentPath:``,baseName:e}:{parentPath:e.slice(0,t),baseName:e.slice(t+1)}}function hP(e,t){return e===``?t:`${e}/${t}`}function gP({files:e,path:t,isFolder:n,nextBasename:r}){let i=pP(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}=mP(i);if(a===s)return{nextFiles:e,sourcePath:i,destinationPath:i,isFolder:n};let c=hP(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 _P(e){return e.endsWith(`/`)}function vP(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 yP(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 bP(e,t){return t.includes(e)?yP(t):[e]}function xP(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 SP(e,t){return{draggedPaths:e,target:t}}function CP(e,t){if(t.kind!==`directory`||t.directoryPath==null)return!1;for(let n of e)if(_P(n)&&(t.directoryPath===n||t.directoryPath.startsWith(n)))return!0;return!1}function wP(e,t){return t.kind===`root`||t.directoryPath==null?vP(e):t.directoryPath}function TP(e,t){let n=e.map(e=>{let n=wP(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 EP(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 DP(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(!EP(XN.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 OP(e){return e.operation===`add`||e.operation===`remove`||e.operation===`move`||e.operation===`batch`}function kP(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 AP(e,t){if(e===t)return!0;let n=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(n)}function jP(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 AP(e,t.path)?n?e:null:e;case`move`:return kP(e,t.from,t.to);case`batch`:{let r=e;for(let e of t.events)if(r=jP(r,e,n),r==null)return null;return r}}}function MP(e){return{canonicalChanged:e.canonicalChanged,projectionChanged:e.projectionChanged,visibleCountDelta:e.visibleCountDelta}}function NP(e){switch(e.operation){case`add`:return{...MP(e),operation:`add`,path:e.path};case`remove`:return{...MP(e),operation:`remove`,path:e.path,recursive:e.recursive};case`move`:return{...MP(e),from:e.from,operation:`move`,to:e.to}}}function PP(e){return{...MP(e),events:e.events.filter(e=>e.operation===`add`||e.operation===`remove`||e.operation===`move`).map(e=>NP(e)),operation:`batch`}}function FP(e){switch(e.operation){case`add`:case`remove`:case`move`:return NP(e);case`batch`:return PP(e);default:return null}}function IP(e,t){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function LP(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 RP(e){return LP(e).at(-1)??null}function zP(e,t){return t==null?e:e.startsWith(t)?e.slice(t.length):e}function BP(e){return e.endsWith(`/`)}var VP=e=>e.toLowerCase();function HP(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`);return n<0?t:t.slice(n+1)}function UP(e){return e.endsWith(`/`)?e.slice(0,-1):e}function WP(e,t){return t&&!e.endsWith(`/`)?`${e}/`:e}var GP=e=>{let t=e.trim();return t.length===0?``:(t.includes(`\\`)?t.replaceAll(`\\`,`/`):t).toLowerCase()},KP=Symbol(`FILE_TREE_RENAME_VIEW`),qP=512,JP=512;function YP(e){return e===`top`||e===`center`?e:`nearest`}function XP(e,t,n){if(e===0)return-1;if(n!=null){let e=t(n);if(e!=null)return e;let r=LP(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 ZP(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:XP(e.paths.length,r,t),getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex}}var QP=class e{static{Object.defineProperty(e.prototype,KP,{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=DP({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=RP(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:YP(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<=JP){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];r!=null&&r===a+1?a=r:(i>=0&&this.#H.getVisibleSlice(i,a).forEach((e,n)=>{t.set(i+n,e)}),r==null?(i=-1,a=-1):(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);t!=null&&(this.#B.has(t)?this.deselectPath(t):this.selectPath(t))}togglePathSelectionFromInput(e){let t=this.#Ne(e);t!=null&&(this.#B.has(t)?this.#ae([...this.#B].filter(e=>e!==t),t):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=bP(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=SP(t.draggedPaths,n);(CP(t.draggedPaths,n)||this.#r?.canDrop?.(e)===!1)&&(n=null)}xP(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=SP(e.draggedPaths,t);if(CP(e.draggedPaths,t)||this.#r?.canDrop?.(n)===!1)return this.#De(),!1;let r=TP(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=BP(r),a=UP(r);if(this.#C?.({isFolder:i,path:a})===!1)return!1;for(let e of LP(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=HP(r),this.#D=t.removeIfCanceled??!1,this.#De(),!0}#q(){if(this.#T==null)return;let e=this.#T,t=this.#D;this.#T=null,this.#E=``,this.#D=!1,t?this.remove(e,BP(e)?{recursive:!0}:void 0):(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,BP(e)?{recursive:!0}:void 0);return}let t=BP(e),n=gP({files:this.#H.list(),isFolder:t,nextBasename:this.#E,path:UP(e)});this.#T=null,this.#E=``,this.#D=!1,`error`in n?(this.#Pe(e),this.#v?.(n.error),this.#De()):n.sourcePath===n.destinationPath?(this.#Pe(e),this.#De()):(this.#_?.({destinationPath:n.destinationPath,isFolder:n.isFolder,sourcePath:n.sourcePath}),this.move(WP(n.sourcePath,t),WP(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=DP({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=!IP(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=RP(e),n=zP(e,t),r=null,i=null;for(let e of this.#be()){if(RP(e)!==t)continue;let a=zP(e,t);if(a<n)r=e;else if(a>n){i=e;break}}return r??i}#Z(e){let t=this.#Ce(e);if(t!==-1)return t;let n=LP(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=!IP(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 XN({...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 LP(t))e.add(n)}return this.#m=[...e].sort(),this.#m}#fe(){return this.#g??=this.#ue().map(VP),this.#g}#pe(){return this.#f??=this.#de().filter(e=>e.endsWith(`/`)),this.#f}#me(){return this.#p??=this.#pe().map(VP),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 LP(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:GP(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 LP(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 LP(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=ZP(this.#H.getVisibleTreeProjectionData(t?void 0:Math.min(n,qP)),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=jP(this.#T,e);t==null&&this.#T!=null&&(this.#E=``),this.#T=t;let n=jP(this.#c,e,!0),r=[...this.#B].map(t=>jP(t,e)).filter(e=>e!=null).map(e=>this.#H.getPathInfo(e)?.path??null).filter(e=>e!=null),i=jP(this.#z,e),a=i==null?null:this.#H.getPathInfo(i)?.path??null,o=[...new Set(r)];return IP(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&&OP(e)&&(this.#i=null);let t=OP(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=FP(e);i!=null&&this.#Oe(i)})}#ze(e){this.#H.isExpanded(e)?this.#ie(e):this.#ke(e)}},$P=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 eF(e){let t=e.endsWith(`/`),n=``,r=-1;for(let t=0;t<=e.length;t+=1)e[t]!==`/`&&t!==e.length?r===-1&&(r=t):r!==-1&&(n!==``&&(n+=`/`),n+=e.slice(r,t),r=-1);return n===``?null:{isDirectory:t,path:n}}function tF(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 nF(e,t){return t?`${e}/`:e}function rF(e,t=null){let n=$P(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=aF(t);e!=null&&cF({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 iF(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=oF(e);t!=null&&(c=sF({canonicalPath:t.canonicalPath,changeCountByDirectoryPath:s,directoriesWithChanges:a,ignoredDirectoryPaths:o,statusByPath:i})||c)}for(let e of r){let t=aF(e);t!=null&&(c=cF({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:dF(i),statusByPath:i}:e}function aF(e){return oF(e.path)}function oF(e){let t=eF(e);if(t!=null)return{canonicalPath:nF(t.path,t.isDirectory),isDirectory:t.isDirectory}}function sF({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),uF(t,n,e),!0)}function cF({canonicalPath:e,changeCountByDirectoryPath:t,directoriesWithChanges:n,ignoredDirectoryPaths:r,isDirectory:i,status:a,statusByPath:o}){let s=o.get(e);return s!==a&&(s??lF(t,n,e),o.set(e,a),a===`ignored`&&i?r.add(e):i&&r.delete(e),!0)}function lF(e,t,n){for(let r of tF(n))e.set(r,(e.get(r)??0)+1),t.add(r)}function uF(e,t,n){for(let r of tF(n)){let n=(e.get(r)??0)-1;n>0?e.set(r,n):(e.delete(r),t.delete(r))}}function dF(e){let t=`${e.size}`;for(let[n,r]of e)t+=`\0${n}\0${r}`;return t}var fF,pF,mF,hF,gF,_F,vF,yF,bF,xF,SF={},CF=[],wF=Array.isArray,TF=CF.slice,EF=Object.assign;function DF(e){e&&e.parentNode&&e.remove()}function OF(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?TF.call(arguments,2):n),kF(e,o,r,i,null)}function kF(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??++pF,__i:-1,__u:0};return i==null&&fF.vnode!=null&&fF.vnode(a),a}function AF(e){return e.children}function jF(e,t){this.props=e,this.context=t,this.__g=0}function MF(e,t){if(t==null)return e.__?MF(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`?MF(e):null}function NF(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 NF(e)}}function PF(e){(8&e.__g||!(e.__g|=8)||!mF.push(e)||gF++)&&hF==fF.debounceRendering||((hF=fF.debounceRendering)||queueMicrotask)(FF)}function FF(){for(var e,t,n,r,i,a,o,s,c=1;mF.length;)mF.length>c&&mF.sort(_F),e=mF.shift(),c=mF.length,8&e.__g&&(n=void 0,i=(r=(t=e).__v).__e,a=[],o=[],(s=t.__P)&&((n=EF({},r)).__v=r.__v+1,fF.vnode&&fF.vnode(n),UF(s,n,r,t.__n,s.namespaceURI,32&r.__u?[i]:null,a,i??MF(r),!!(32&r.__u),o,s.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,GF(a,n,o),n.__e!=i&&NF(n)));gF=0}function IF(e,t,n,r,i,a,o,s,c,l,u,d){var f,p,m,h,g,_,v,y=r&&r.__k||CF,b=t.length;for(c=LF(n,t,y,c,b),f=0;f<b;f++)(m=n.__k[f])!=null&&(p=m.__i==-1?SF:y[m.__i]||SF,m.__i=f,_=UF(e,m,p,i,a,o,s,c,l,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&JF(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=RF(m,c,e,v):typeof m.type==`function`&&_!==void 0?c=_:h&&(c=h.nextSibling),m.__u&=-7);return n.__e=g,c}function LF(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?kF(null,o,null,null,null):wF(o)?kF(AF,{children:o},null,null,null):o.constructor==null&&o.__b>0?kF(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=zF(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=MF(s)),YF(s,s));return r}function RF(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=RF(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=MF(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function zF(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 BF(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n??``}function VF(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||BF(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||BF(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(vF,`$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=yF,e.addEventListener(t,a?xF:bF,a)):e.removeEventListener(t,a?xF:bF,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 HF(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=yF++;else if(t.u<n.l)return;return n(fF.event?fF.event(t):t)}}}function UF(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M=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=fF.__b)&&d(t);n:if(typeof M==`function`)try{if(v=t.props,y=`prototype`in M&&M.prototype.render,b=(d=M.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 M(v,x):(t.__c=f=new jF(v,x),f.constructor=M,f.render=XF),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&&M.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=EF({},f.__s)),EF(f.__s,M.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&M.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&M.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=fF.__r,w=0,y){for(f.state=f.__s,f.__g&=-9,C&&C(t),d=f.render(f.props,f.state,f.context),T=0;T<f._sb.length;T++)f.__h.push(f._sb[T]);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&&++w<25);f.state=f.__s,f.getChildContext!=null&&(r=EF({},r,f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),E=d,d!=null&&d.type===AF&&d.key==null&&(E=KF(d.props.children)),s=IF(e,wF(E)?E:[E],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(D=0,O=!1,t.__u|=c?160:128,t.__c.__z=[],k=0;k<a.length;k++)(A=a[k])==null||O||(A.nodeType==8&&A.data==`$s`?(D>0&&t.__c.__z.push(A),D++,a[k]=null):A.nodeType==8&&A.data==`/$s`?(--D>0&&t.__c.__z.push(A),O=D===0,s=a[k],a[k]=null):D>0&&(t.__c.__z.push(A),a[k]=null));if(!O){for(;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__c.__z=[s]}t.__e=s}else{for(j=a.length;j--;)DF(a[j]);WF(t)}}else t.__e=n.__e,t.__k=n.__k,e.then||WF(t);fF.__e(e,t,n)}else s=t.__e=qF(n.__e,t,n,r,i,a,o,c,l,u);return(d=fF.diffed)&&d(t),128&t.__u?void 0:s}function WF(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(WF)}function GF(e,t,n){for(var r=0;r<n.length;r++)JF(n[r],n[++r],n[++r]);fF.__c&&fF.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){fF.__e(e,t.__v)}})}function KF(e){return typeof e!=`object`||!e||e.__b&&e.__b>0?e:wF(e)?e.map(KF):EF({},e)}function qF(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&&=(fF.__m&&fF.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a&&=TF.call(e.childNodes),v=n.props||SF,!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;VF(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&&!_||VF(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=``),IF(b==`template`?e.content:e,wF(p)?p:[p],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&MF(n,0),s,c,l),a!=null)for(u=a.length;u--;)DF(a[u]);s||(u=`value`,b==`progress`&&h==null?e.removeAttribute(`value`):h==null||h===e[u]&&(b!==`progress`||h)||VF(e,u,h,v[u],i),u=`checked`,g!=null&&g!=e[u]&&VF(e,u,g,v[u],i))}return e}function JF(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){fF.__e(e,n)}}function YF(e,t,n){var r,i;if(fF.unmount&&fF.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||JF(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){fF.__e(e,t)}r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&YF(r[i],t,n||typeof e.type!=`function`);n||DF(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function XF(e,t,n){return this.constructor(e,n)}function ZF(e,t){var n,r,i,a;t==document&&(t=document.documentElement),fF.__&&fF.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=OF(AF,null,[e]),i=[],a=[],UF(t,e,r||SF,SF,t.namespaceURI,r?null:t.firstChild?TF.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,a,t.ownerDocument),GF(i,e,a)}function QF(e,t){e.__u|=32,ZF(e,t)}fF={__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 gF=0,e}},pF=0,jF.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=EF({},this.state);typeof e==`function`&&(e=e(EF({},n),this.props)),e&&EF(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),PF(this))},jF.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),PF(this))},jF.prototype.render=AF,mF=[],gF=0,_F=function(e,t){return e.__v.__b-t.__v.__b},vF=/(PointerCapture)$|Capture$/i,yF=0,bF=HF(!1),xF=HF(!0);var $F=0;Array.isArray;function Q(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:--$F,__i:-1,__u:0,__source:i,__self:a};return fF.vnode&&fF.vnode(l),l}var eI=16,tI=16,nI={};function rI({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}=nI[e]??{width:eI,height:tI},f=r??l,p=i??u,m=a??d??`0 0 ${l} ${u}`;return Q(`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:Q(`use`,{href:c})})}var iI=e=>e!==void 0&&/\s/.test(e),aI=(e,t)=>{let n=t=>iI(e[t-1])||iI(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},oI=e=>aI(e,Math.ceil(e.length/2)),sI=e=>{if(e.length<2)return[e,``];let t=oI(e);return[e.slice(0,t),e.slice(t)]},cI=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`.`)+1,n=e.length-t>10,r=t>=1&&!n?t:oI(e);return[e.slice(0,r),e.slice(r)]},lI=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)]},uI=(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)]},dI=(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)]},fI=(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 pI({children:e,marker:t,variant:n=`default`}){"use no memo";return Q(`div`,{"aria-hidden":!0,"data-truncate-marker-cell":!0,children:Q(`div`,{"data-truncate-marker":!0,children:typeof t==`function`?t({children:e}):n===`fade`?Q(`span`,{"data-truncate-fade":!0}):t})})}function mI(e){"use no memo";let{mode:t,children:n}=e;return Q(`div`,{children:[Q(`div`,{"data-truncate-content":`visible`,children:t===`fruncate`?Q(`span`,{children:n}):n}),Q(`div`,{"data-truncate-content":`overflow`,"aria-hidden":!0,children:t===`fruncate`?Q(`span`,{children:n}):n})]})}function hI({children:e,mode:t=`truncate`,marker:n=`…`,variant:r=`default`,...i}){"use no memo";let a=Q(mI,{mode:t,children:e},`content`),o=Q(pI,{marker:n,mode:t,variant:r},`marker`),s=Q(`div`,{"data-truncate-fill":!0},`fill`);return Q(`div`,{"data-truncate-container":t,"data-truncate-variant":r,...i,children:Q(`div`,{"data-truncate-grid":!0,children:t===`truncate`?[a,o]:[o,a,s]})})}function gI({children:e,...t}){"use no memo";return Q(hI,{mode:`truncate`,...t,children:e})}function _I({children:e,...t}){"use no memo";return Q(hI,{mode:`fruncate`,...t,children:e})}function vI({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=Q(gI,{...s,children:t[0]}),l=Q(_I,{...s,children:t[1]})}else{if(typeof e!=`string`)return console.error(`MiddleTruncate: children must be a string`),null;if(e.length===0)return Q(`div`,{className:a,style:o});if(e.length<i)return Q(n===`end`?_I:gI,{...s,className:a,style:o,children:e});let t=null,u=null,d=null;if(typeof r==`string`)r===`center`?t=sI:r===`extension`?t=cI:r===`leaf-path`&&(t=lI);else if(typeof r==`number`)t=uI,u=r;else if(Array.isArray(r)){let[e,n]=r;d=n,e===`last`?t=dI:e===`first`&&(t=fI)}else typeof r==`function`&&(t=r);t??=sI;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=Q(gI,{...s,..._,children:f}),l=Q(_I,{...s,...v,children:p})}return Q(`div`,{"data-truncate-group-container":`middle`,className:a,style:o,children:[Q(`div`,{"data-truncate-segment-priority":n===`start`||n===`equal`?`1`:`2`,children:c}),Q(`div`,{"data-truncate-segment-priority":n===`end`||n===`equal`?`1`:`2`,children:l})]})}var yI={endIndex:-1,startIndex:-1};function bI(e,t,n){return Math.min(Math.max(e,t),n)}function xI(e,t){return e<0||t<e?yI:{endIndex:t,startIndex:e}}function SI(e){return e.startIndex<0||e.endIndex<e.startIndex}function CI(e,t){return SI(e)?0:(e.endIndex-e.startIndex+1)*t}function wI(e,t,n){if(t<=0)return-1;let r=t*n;return e<=0?0:e>=r?t:Math.floor(e/n)}function TI(e,t,n){return t<=0||e<=0?-1:e>=t*n?t-1:Math.ceil(e/n)-1}function EI(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);i==null?t.set(r,[n]):i.push(n)}),t}function DI(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;o<=t?(i=a,n=a+1):r=a-1}return i}function OI(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 kI(e,t,n){if(e.length===0||t<=0)return[];let r=OI(e),i=EI(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=DI(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 AI(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=bI(t.scrollTop,0,o),c=t.stickyRows??kI(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=wI(s,n,t.itemHeight),m=wI(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?yI:xI(m,TI(u+d,n,t.itemHeight)),y=g+1,b=SI(v)?yI:xI(Math.max(y,v.startIndex-a),Math.min(n-1,v.endIndex+a)),x=CI(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:SI(b)?0:b.startIndex*t.itemHeight,startIndex:b.startIndex}}}var jI={added:`A`,deleted:`D`,ignored:null,modified:`M`,renamed:`R`,untracked:`U`},MI={added:`Git status: added`,deleted:`Git status: deleted`,ignored:`Git status: ignored`,modified:`Git status: modified`,renamed:`Git status: renamed`,untracked:`Git status: untracked`},NI=`Contains git status items`;function PI(e){return e.current?!0:(e.current=!0,!1)}function FI(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 II(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,offset:i,topInset:a=0,totalHeight:o,viewportHeight:s}=e;if(i===`nearest`)return FI({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 LI(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 RI(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 zI(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 BI(e,t){if(e==null)return t;let n=e.getBoundingClientRect().height;return n>0?n:e.clientHeight>0?e.clientHeight:t}function VI(e,t){return e!=null&&e>0?e:t}function HI(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 UI(e,t,n,r,i=0){let a=FI({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,topInset:i,viewportHeight:r});return a!=null&&(e.scrollTop=a,!0)}function WI(e,t,n,r,i,a,o=0){let s=II({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,offset:a,topInset:o,totalHeight:i,viewportHeight:r});return s!=null&&(e.scrollTop=s,!0)}function GI(e,t,n,r,i,a){let o=LI({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,targetViewportOffset:a,totalHeight:i,viewportHeight:r});return o!=null&&(e.scrollTop=o,!0)}function KI(e,t,n,r){return n.end<n.start?null:e<n.start?-t:e>n.end?r:null}function qI(e){let{renamingPath:t,previousRenamingPath:n,hasRenderedInput:r}=e;return t==null?`reset`:r?n===t?`ignore`:`focus-input`:`reveal-canonical`}function JI({ariaLabel:e,isFlattened:t=!1,ref:n,value:r,onBlur:i,onInput:a}){return Q(`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 YI(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 XI(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 ZI,QI,$I,eL,tL=Object.is,nL=0,rL=[],iL=fF,aL=iL.__b,oL=iL.__r,sL=iL.diffed,cL=iL.__c,lL=iL.unmount,uL=iL.__;function dL(e,t){iL.__h&&iL.__h(QI,e,nL||t),nL=0;var n=QI.__H||(QI.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function fL(e){return nL=1,pL(wL,e)}function pL(e,t,n){var r=dL(ZI++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):wL(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);tL(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=QI,!QI.__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,tL(t,e.__[0])||(o=!0)}}),a&&a.call(this,e,t,n)||o};QI.__f=!0;var a=QI.shouldComponentUpdate,o=QI.componentWillUpdate;QI.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)},QI.shouldComponentUpdate=i}return r.__N||r.__}function mL(e,t){var n=dL(ZI++,3);!iL.__s&&CL(n.__H,t)&&(n.__=e,n.u=t,QI.__H.__h.push(n))}function hL(e,t){var n=dL(ZI++,4);!iL.__s&&CL(n.__H,t)&&(n.__=e,n.u=t,QI.__h.push(n))}function $(e){return nL=5,gL(function(){return{current:e}},[])}function gL(e,t){var n=dL(ZI++,7);return CL(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function _L(e,t){return nL=8,gL(function(){return e},t)}function vL(){for(var e;e=rL.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(xL),e.__H.__h.forEach(SL),e.__H.__h=[]}catch(t){e.__H.__h=[],iL.__e(t,e.__v)}}iL.__b=function(e){QI=null,aL&&aL(e)},iL.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),uL&&uL(e,t)},iL.__r=function(e){oL&&oL(e),ZI=0;var t=(QI=e.__c).__H;t&&($I===QI?(t.__h=[],QI.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(xL),t.__h.forEach(SL),t.__h=[],ZI=0)),$I=QI},iL.diffed=function(e){sL&&sL(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(rL.push(t)!==1&&eL===iL.requestAnimationFrame||((eL=iL.requestAnimationFrame)||bL)(vL)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),$I=QI=null},iL.__c=function(e,t){t.some(function(e){try{e.__h.forEach(xL),e.__h=e.__h.filter(function(e){return!e.__||SL(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],iL.__e(n,e.__v)}}),cL&&cL(e,t)},iL.unmount=function(e){lL&&lL(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{xL(e)}catch(e){t=e}}),n.__H=void 0,t&&iL.__e(t,n.__v))};var yL=typeof requestAnimationFrame==`function`;function bL(e){var t,n=function(){clearTimeout(r),yL&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);yL&&(t=requestAnimationFrame(n))}function xL(e){var t=QI,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),QI=t}function SL(e){var t=QI;e.__c=e.__(),QI=t}function CL(e,t){return!e||e.length!==t.length||t.some(function(t,n){return!tL(t,e[n])})}function wL(e,t){return typeof t==`function`?t(e):t}function TL(e,t=null,n=null){"use no memo";let r=e.flattenedSegments;return r==null||r.length===0?t??e.name:Q(`span`,{"data-item-flattened-subitems":!0,children:r.map((e,i)=>{let a=i===r.length-1;return Q(AF,{children:[Q(`span`,{"data-item-flattened-subitem":e.path,"data-item-flattened-subitem-drag-target":n===e.path?`true`:void 0,children:a&&t!=null?t:Q(gI,{children:e.name})}),i<r.length-1?` / `:``]},e.path)})})}function EL(e){return e.isFlattened?e.flattenedSegments?.findLast(e=>e.isTerminal)?.path??e.path:e.path}function DL(e){let t=e.flattenedSegments;return t==null||t.length===0?e.name:t.map(e=>e.name).join(` / `)}function OL(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 kL({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=AI(c,{itemHeight:t,overscan:n,scrollTop:r,stickyRows:s==null?void 0:OL(s,r,t,o),totalRowCount:o,viewportHeight:a}),u=i&&r<=0&&o>0?e.getStickyRowCandidates(1,t):[],d=u!=null&&r<=0?OL(u,1,t,o):i&&r<=0&&c.length>0?kI(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 AL=400,jL=40,ML=18;function NL(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))?PL(e,t,n):a instanceof HTMLElement?a:null}function PL(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 FL(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 IL(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 LL(){return navigator.vendor!==`Apple Computer, Inc.`}function RL(e,t){let n=e-t.top;if(n<jL)return-Math.ceil((jL-Math.max(0,n))/jL*ML);let r=t.bottom-e;return r<jL?Math.ceil((jL-Math.max(0,r))/jL*ML):0}function zL(e,t){if(e!=null){let t=jI[e];return t==null?null:{text:t,title:MI[e]}}return t?{icon:{name:`file-tree-icon-dot`,width:6,height:6},title:NI}:null}function BL(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 VL(e){return e!=null&&`toggle`in e}function HL(e){return e.code===`Space`||e.key===` `||e.key===`Spacebar`}function UL(e){return e.key.length===1&&/^[\p{L}\p{N}]$/u.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey}function WL(e){return e==null?``:`[data-item-section="spacing-item"][data-ancestor-path="${e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`)}"] { opacity: 1; }`}function GL(e){return e.shiftKey&&e.key===`F10`||e.key===`ContextMenu`}function KL(e,t){return t&&GL(e)||(e.ctrlKey||e.metaKey)&&HL(e)?!0:e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`||e.key===`ArrowUp`}var qL=new Set([`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`]);function JL(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 YL(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 XL(e,t){return{bottom:t,height:0,left:e,right:e,top:t,width:0,x:e,y:t}}function ZL(e,t){if(e==null)return t.offsetTop;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return n.top-r.top}function QL(e,t,n){n==null?e.delete(t):e.set(t,n)}function $L(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 eR(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 tR(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 nR(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=tR(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 rR(e,t){return{kind:e.kind,name:DL(e),path:t}}function iR(e){return e==null?void 0:`${e}__tree`}function aR(e,t,n){if(e!=null)return`${e}__focused-item-${encodeURIComponent(t)}${n?`__parked`:``}`}function oR(e){return e===`file-tree-icon-chevron`||e===`file-tree-icon-dot`||e===`file-tree-icon-file`||e===`file-tree-icon-lock`}function sR(e,t){if(e==null)return null;if(`text`in e)return e.parts==null?Q(`span`,{title:e.title,children:e.text}):Q(`span`,{title:e.title,children:e.parts.map((e,t)=>Q(`span`,{style:{color:e.color},children:e.text},t))});let n=typeof e.icon==`string`?oR(e.icon)?t(e.icon):{name:e.icon}:oR(e.icon.name)?(()=>{let n=t(e.icon.name),{name:r,...i}=e.icon;return{...n,...i}})():e.icon;return Q(`span`,{title:e.title,children:Q(rI,{...n})})}function cR(e){e!=null&&RI(e.querySelector([`button:not([disabled])`,`[href]`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `))??e)}function lR(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=EL(e);return Q(AF,{children:[e.depth>0?Q(`div`,{"data-item-section":`spacing`,children:Array.from({length:e.depth}).map((t,n)=>Q(`div`,{"data-item-section":`spacing-item`,"data-ancestor-path":e.ancestorPaths[n]},n))}):null,Q(`div`,{"data-item-section":`icon`,children:e.kind===`directory`?Q(rI,{...t(`file-tree-icon-chevron`)}):Q(rI,{...t(`file-tree-icon-file`,u)})}),Q(`div`,{"data-item-section":`content`,children:e.isFlattened?TL(e,c,a):c??Q(vI,{minimumLength:5,split:`extension`,children:e.name})}),i?Q(`div`,{"data-item-section":`decoration`,children:r==null?null:sR(r,t)}):null,s?Q(`div`,{"data-item-section":`git`,children:sR(o,t)}):null,n?Q(`div`,{"data-item-section":`action`,children:l?Q(`span`,{"aria-hidden":`true`,"data-item-action-affordance":`decorative`,children:Q(rI,{...t(`file-tree-icon-ellipsis`)})}):null}):null]})}function uR(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:w,contextMenuButtonVisibility:T,contextMenuRightClickEnabled:E,registerRenameInput:D,registerButton:O,resolveIcon:k,renderDecorationForRow:A,openContextMenuForRow:j,onRowClick:M,onKeyDown:N}=e,P=EL(t),{isParked:F=!1,mode:ee=`flow`,style:te}=r,ne=ee===`sticky`,I=_?.get(P)??null??BL(t.ancestorPaths,v,y),L=t.kind===`directory`&&(b?.has(P)??!1),R=A(t,P),re=zL(I,L),ie=S&&w,ae=R!=null||x||ie,oe=ie&&T===`always`,se=a.getPath()===P,ce=se?a.getValue():``,z=ne||!se?null:Q(JI,{ref:D,ariaLabel:`Rename ${DL(t)}`,isFlattened:t.isFlattened,value:ce,onBlur:()=>{a.commit()},onInput:e=>{a.setValue(e.currentTarget.value)}}),le=lR(t,k,{actionLaneEnabled:ie,customDecoration:R,decorationLaneEnabled:ae,dragTargetFlattenedSegmentPath:l?.flattenedSegmentPath??null,gitDecoration:re,gitLaneActive:x,renameInput:z,showDecorativeActionAffordance:oe}),ue={...YI({ariaLabel:DL(t),domId:t.isFocused?aR(h,P,F):void 0,extraStyle:te,features:{actionLaneEnabled:ie,contextMenuButtonVisibility:ie?T:null,contextMenuEnabled:S,contextMenuTriggerMode:S?C:null,gitLaneActive:x},isParked:F,itemHeight:g,mode:ee,row:t,state:{containsGitChange:L,effectiveGitStatus:I,isContextHovered:s===P,isDragTarget:l?.kind===`directory`&&l.directoryPath===P,isDragging:c?.has(P)===!0,isFocusRinged:t.isFocused&&o===P},targetPath:P}),key:n,onContextMenu:S||u?e=>{d()?e.preventDefault():S&&(e.preventDefault(),E&&(i.focusMountedPathFromInput(P),j(t,P,{anchorRect:XL(e.clientX,e.clientY),source:`right-click`})))}:void 0,onFocus:ne?void 0:()=>{i.focusMountedPathFromInput(P)},onKeyDown:ne?void 0:N,ref:e=>{O(P,e)}};return!ne&&se?Q(`div`,{...ue,children:le}):Q(`button`,{...ue,type:`button`,draggable:u&&!F,onDragEnd:u&&!F?p:void 0,onDragStart:u&&!F?e=>{f(e,t,P)}:void 0,onMouseDown:e=>{(ne||i.isSearchOpen())&&e.preventDefault()},onTouchStart:u&&!F?e=>{m(e,t,P)}:void 0,onClick:e=>{M(e,t,P,ee)},children:le})}function dR(e,t,n){return t.end<t.start?[]:e.controller.getVisibleRows(t.start,t.end).filter(e=>!n.has(EL(e))).map((n,r)=>uR(e,n,t.start+r))}function fR({composition:e,controller:t,gitStatusByPath:n,ignoredGitDirectories:r,directoriesWithGitChanges:i,icons:a,instanceId:o,itemHeight:s=tP,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 _=$(null),v=$(null),y=$(!1),b=$(null),x=$(null),S=$(null),C=$(null),w=$(null),T=$(new Map),E=$(new Map),D=$(()=>{}),O=$(null),k=$(0),A=$(!1),j=$(null);j.current!==t&&(A.current=!1,j.current=t);let M=$(!1),N=$(null),P=$(null),F=$(!1),ee=$(null),te=$(null),ne=$(null),I=$(null),L=$(null),R=$(null),re=$(null),ie=$(null),ae=$(!1),oe=$(null),se=$(null),ce=$(null),z=$(null),le=gL(()=>new Map,[]),[,ue]=fL(0),de=$(!1),[fe,B]=fL(null),[pe,me]=fL(null),[he,ge]=fL(null),[_e,ve]=fL(null),[ye,be]=fL(0),[V,xe]=fL(null),Se=$(V);Se.current=V;let Ce=$(null),we=$(null),Te=$(null),Ee=$(null),De=$(null),Oe=$(!1),ke=()=>{we.current=null,Te.current=null,Ee.current=null},Ae=(e,t)=>{we.current=e,Te.current=null,Ee.current=t==null?null:{path:e,scrollTop:t}},je=(e,t)=>{we.current=null,Te.current={path:e,viewportOffset:t},Ee.current=null},Me=$(d===`retain`&&t.isSearchOpen()),[Ne,Pe]=fL(p);mL(()=>{p||Pe(!1)},[p]);let Fe=$(!1),Ie=_L(()=>{Fe.current=!0,Pe(e=>e&&!1)},[]),[Le,Re]=fL(()=>kL({controller:t,itemHeight:s,overscan:c,scrollTop:0,stickyFolders:h,viewportHeight:g})),[ze,Be]=fL(!1);mL(()=>{Be(!0)},[]);let Ve=e?.contextMenu?.enabled===!0||e?.contextMenu?.render!=null||e?.contextMenu?.onOpen!=null||e?.contextMenu?.onClose!=null,He=e?.contextMenu?.triggerMode??(Ve?`right-click`:`both`),Ue=He===`both`||He===`button`,We=e?.contextMenu?.buttonVisibility??`when-needed`,Ge=He===`both`||He===`right-click`;hL(()=>{let e=S.current;if(e==null)return;let t=e=>{if(!(e instanceof CustomEvent))return;let t=e.detail?.path??null;De.current=t,me(t),ve(t==null?null:`pointer`)},n=e=>{e instanceof CustomEvent&&(Oe.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 Ke=_L((e,t)=>{QL(T.current,e,t)},[]),qe=_L((e,t)=>{QL(E.current,e,t)},[]),Je=_L(e=>{x.current=e},[]),Ye=_L(e=>$L(e,E.current,T.current),[]),Xe=n!=null||r!=null||i!=null,{resolveIcon:Ze}=gL(()=>_A(a),[a]),Qe=t[KP](),$e=Qe.getPath(),et=$e!=null,tt=t.isSearchOpen(),nt=t.getSearchValue(),H=t.getFocusedPath(),rt=t.getFocusedIndex(),it=t.getScrollRequest(),at=t.isDragAndDropEnabled(),ot=t.getDragSession(),st=gL(()=>ot==null?null:new Set(ot.draggedPaths),[ot]),ct=ot?.target??null,lt=ot?.primaryPath??null,ut=iR(o),{overlayHeight:dt,overlayRows:ft,snapshot:pt,visibleRows:mt}=Le,ht=pt.physical.viewportHeight,gt=gL(()=>({end:pt.window.endIndex,start:pt.window.startIndex}),[pt.window.endIndex,pt.window.startIndex]),_t=ft,vt=pt.sticky.rows,yt=pt.physical.totalHeight,bt=pt.sticky.height,xt=gL(()=>new Set(vt.map(e=>EL(e.row))),[vt]),St=rt>=0&&rt>=gt.start&&rt<=gt.end,Ct=_L((e,t)=>u?.({item:rR(e,t),row:e})??null,[u]),wt=_L(e=>RI(e==null?null:T.current.get(e)??null)?!0:RI(S.current),[]),Tt=_L(e=>{wt(t.focusNearestPath(e))},[t,wt]),Et=$(Tt);Et.current=Tt;let Dt=$(!0),Ot=$(()=>{}),kt=_L((t=!0)=>{let n=Se.current;n!=null&&(Dt.current=Dt.current&&t,xe(null),e?.contextMenu?.onClose?.(),Dt.current&&Tt(n.path))},[e?.contextMenu,Tt]);Ot.current=kt;let At=_L(e=>{let t=e==null?null:ZL(S.current,e);ge(e=>e===t?e:t)},[]),U=_L((e,n,r)=>{let i=t.getItem(n);if(i==null)return;let a=Ye(n);if(a?.dataset.fileTreeStickyRow===`true`){let e=C.current;Ae(n,e?.scrollTop??null),M.current=!0,B(e=>e===n?e:n)}i.focus(),At(a),Dt.current=!0,xe({anchorRect:r?.anchorRect??null,item:rR(e,n),path:n,source:r?.source??`keyboard`})},[t,Ye,At]),jt=_L(e=>{if(l){if(t.isSearchOpen()){let e=C.current,t=BI(e,ht);ee.current=rt<0||e==null?null:Math.max(0,Math.min(rt*s-e.scrollTop,Math.max(0,t-s))),F.current=!0}t.startRenaming(e)!==!1&&(ve(`focus`),ue(e=>e+1))}},[t,rt,s,l,ht]),Mt=_L((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=BI(i,ht),u=t.getVisibleCount()*s,d=r===`sticky-parents`?o.ancestorPaths.length*s:kL({controller:t,itemHeight:s,overscan:c,scrollTop:i.scrollTop,stickyFolders:h,viewportHeight:l}).snapshot.sticky.height;return M.current=!0,GI(i,a,s,l,u,d),D.current(),Ce.current=n?e:null,!0},[t,s,c,ht,h]),Nt=()=>y.current===!0||z.current!=null||ae.current===!0,Pt=e=>typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>{e()}):window.setTimeout(e,16),Ft=e=>{e!=null&&(typeof window.cancelAnimationFrame==`function`?window.cancelAnimationFrame(e):window.clearTimeout(e))},It=()=>{I.current!=null&&(clearTimeout(I.current),I.current=null),ne.current=null},Lt=()=>{R.current?.remove(),R.current=null},Rt=()=>{Ft(te.current),te.current=null,L.current=null},zt=e=>{let t=S.current?.getRootNode();t instanceof ShadowRoot?t.append(e):document.body.append(e)},Bt=()=>{ie.current?.(),ie.current=null,z.current!=null&&(clearTimeout(z.current),z.current=null),ae.current=!1,oe.current=null,ce.current=null,se.current!=null&&(se.current.setAttribute(`draggable`,`true`),se.current.style.removeProperty(`touch-action`),se.current=null),Lt(),It(),Rt(),re.current=null},Vt=(e,n)=>{let r=S.current?.getRootNode(),i=FL(NL(r instanceof ShadowRoot?r:document,e,n));return t.setDragTarget(i),t.getDragSession()?.target??null},Ht=e=>{let n=t.getDragAndDropConfig()?.openOnDropDelay??800;if(e==null||e.kind!==`directory`||e.directoryPath==null||n<=0){It();return}let r=t.getItem(e.directoryPath),i=VL(r)?r:null;if(i==null||i.isExpanded()){It();return}let a=`${e.directoryPath}::${e.flattenedSegmentPath??``}`;ne.current!==a&&(It(),ne.current=a,I.current=setTimeout(()=>{let n=t.getDragSession()?.target;n?.kind===`directory`&&n.directoryPath===e.directoryPath&&n.flattenedSegmentPath===e.flattenedSegmentPath&&i.expand()},n))},Ut=()=>{te.current=null;let e=L.current,n=C.current;if(e==null||n==null||t.getDragSession()==null)return;let r=n.getBoundingClientRect(),i=RL(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,D.current()),Ht(Vt(e.clientX,e.clientY)),te.current=Pt(Ut)},Wt=(e,t)=>{L.current={clientX:e,clientY:t},te.current??=Pt(Ut)},Gt=(e,n,r)=>{let i=e.currentTarget;if(i!=null){if(Bt(),Lt(),It(),Rt(),t.startDrag(r)===!1)e.preventDefault();else if(re.current=n,e.dataTransfer!=null&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.dropEffect=`move`,e.dataTransfer.setData(`text/plain`,r),LL())){let t=IL(i),n=i.getBoundingClientRect();Object.assign(t.style,{height:`${n.height}px`,opacity:`0.85`,transform:`translate3d(-9999px, 0px, 0)`,width:`${n.width}px`}),zt(t),R.current=t,e.dataTransfer.setDragImage(t,Math.max(0,e.clientX-n.left),Math.max(0,e.clientY-n.top))}}},Kt=()=>{Lt(),It(),Rt(),re.current=null,t.cancelDrag()},qt=(e,n,r)=>{if(z.current!=null||ae.current)return;let i=e.touches[0],a=e.currentTarget;if(i==null||a==null)return;ce.current={clientX:i.clientX,clientY:i.clientY},se.current=a,a.setAttribute(`draggable`,`false`);let o=(e={})=>{let t=e.restoreNativeDraggable??!ae.current;z.current!=null&&(clearTimeout(z.current),z.current=null),document.removeEventListener(`touchmove`,s),document.removeEventListener(`touchend`,c),document.removeEventListener(`touchcancel`,c),ie.current===o&&(ie.current=null),t&&(a.setAttribute(`draggable`,`true`),se.current===a&&(se.current=null),ce.current=null)},s=e=>{let t=e.touches[0],n=ce.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),ie.current=o,z.current=setTimeout(()=>{if(o({restoreNativeDraggable:!1}),t.startDrag(r)===!1){a.setAttribute(`draggable`,`true`),se.current===a&&(se.current=null),ce.current=null;return}ae.current=!0,se.current=a,a.setAttribute(`draggable`,`false`),a.style.setProperty(`touch-action`,`none`),re.current=n;let e=a.getBoundingClientRect(),s=IL(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`}),zt(s),R.current=s,oe.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=oe.current;n!=null&&R.current!=null&&(R.current.style.transform=`translate3d(${t.clientX-n.x}px, ${t.clientY-n.y}px, 0)`),Ht(Vt(t.clientX,t.clientY)),Wt(t.clientX,t.clientY)},l=e=>{let n=e.changedTouches[0];n!=null&&Vt(n.clientX,n.clientY),t.completeDrag(),Bt()},u=()=>{t.cancelDrag(),Bt()};ie.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)},AL)},Jt=e=>{if(V!=null){if(e.key===`Escape`){kt(),e.preventDefault(),e.stopPropagation();return}qL.has(e.key)&&(e.preventDefault(),e.stopPropagation());return}if(Qe.isActive()){if(e.isComposing||e.keyCode===229)return;if(e.key===`Escape`)Qe.cancel();else if(e.key===`Enter`)Qe.commit();else return;ve(`focus`),ue(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(l&&e.key===`F2`){jt(H??void 0),e.preventDefault(),e.stopPropagation();return}if(tt){if(e.key===`Escape`)F.current=!1,ee.current=null,t.closeSearch();else if(e.key===`Enter`){let e=t.getFocusedPath();e!=null&&t.selectOnlyPath(e);let n=C.current,r=BI(n,ht);ee.current=rt<0||n==null?null:Math.max(0,Math.min(rt*s-n.scrollTop,Math.max(0,r-s))),F.current=!0,t.closeSearch()}else if(e.key===`ArrowDown`)t.focusNextSearchMatch();else if(e.key===`ArrowUp`)t.focusPreviousSearchMatch();else return;ve(`focus`),ue(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(f&&UL(e)){t.openSearch(e.key),ue(e=>e+1),e.preventDefault(),e.stopPropagation();return}let n=Ve&&GL(e),r=KL(e,Ve),i=r&&S.current!=null?zI(S.current):null,a=r?new Set(eR(S.current)):new Set,o=i?.dataset.fileTreeStickyPath??null,c=i?.dataset.fileTreeStickyRow===`true`&&o!=null;if(c&&o!==H&&a.has(o)){let e=C.current;Ae(o,e?.scrollTop??null),t.focusPath(o)}let u=t.getFocusedPath(),d=t.getFocusedIndex(),p=t.getFocusedItem();if(p==null)return;let m=VL(p)?p:null,h=u!=null&&(xt.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=$L(u,E.current,T.current);e==null||n==null?y=!1:U(e,u)}else if((e.ctrlKey||e.metaKey)&&HL(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;ve(`focus`);let b=t.getFocusedPath(),x=b!=null&&(xt.has(b)||a.has(b)),w=g&&b!==u,D=n&&c&&o===u&&b===u;if((h||D)&&b!=null&&(w&&x||D))Ae(b,v?.scrollTop??null),M.current=!0,B(e=>e===b?e:b);else{let t=e.key===`ArrowUp`&&h&&b!==u;b!=null&&(t||_&&b===u)?(je(b,nR(S.current,v,i,u,s,bt,ht)),M.current=!0,B(e=>e===b?e:b)):ke()}ue(e=>e+1),e.preventDefault(),e.stopPropagation()};hL(()=>{f&&tt&&(Me.current?Me.current=!1:RI(w.current))},[tt,f]),hL(()=>{let e=x.current;switch(qI({hasRenderedInput:e!=null,previousRenamingPath:P.current,renamingPath:$e})){case`reset`:P.current=null;return;case`reveal-canonical`:$e!=null&&Mt($e,{restoreTreeFocus:!1,targetOffset:`live-overlay`});return;case`ignore`:return;case`focus-input`:e!=null&&(Ce.current=null,P.current=$e,RI(e),e.select());return}},[gt.end,gt.start,$e,Mt,xt]),hL(()=>{let e=S.current;if(e==null)return;let t=null,n=()=>{t!=null&&(clearTimeout(t),t=null)},r=()=>{let t=zI(e)?.dataset.itemPath??null;B(e=>e===t?e:t)},i=()=>{n(),M.current=!0,r()},a=i=>{let a=i.relatedTarget;if(a==null){n(),t=setTimeout(()=>{t=null,zI(e)==null?(M.current=!1,B(null)):r()},0);return}if(!(a instanceof Node)||!e.contains(a)){n(),M.current=!1,B(null);return}let o=a instanceof HTMLElement?a.dataset.itemPath??null:null;B(e=>e===o?e:o)};return e.addEventListener(`focusin`,i),e.addEventListener(`focusout`,a),()=>{n(),e.removeEventListener(`focusin`,i),e.removeEventListener(`focusout`,a)}},[]),hL(()=>{let e=S.current;e!=null&&(pt.physical.scrollTop<=0?e.dataset.scrollAtTop=`true`:delete e.dataset.scrollAtTop)},[pt.physical.scrollTop]),hL(()=>{let e=null,n=C.current,r=b.current,i=S.current;if(n==null)return;O.current=BI(n,g);let a=()=>{let e=t.getVisibleCount(),r=VI(O.current,g),i=Math.max(0,e*s-r);n.scrollTop>i&&(n.scrollTop=i),Re(kL({controller:t,itemHeight:s,overscan:c,scrollTop:Math.min(n.scrollTop,i),stickyFolders:h,viewportHeight:r}))};if(!A.current){A.current=!0;let e=t.getFocusedIndex();if(e>=0){let r=VI(O.current,g),i=t.getVisibleRows(e,e)[0]??null;UI(n,e,s,r,h&&i!=null?Math.max(0,Math.min(i.ancestorPaths.length*s,Math.max(0,r-s))):0)}}D.current=a;let o=t.subscribe(()=>{PI(de)&&ue(e=>e+1),a()}),l=()=>{Oe.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,be(e=>e+1),e=null},50))},u=null,d=()=>{i!=null&&delete i.dataset.overlayReveal,u!=null&&(clearTimeout(u),u=null)},f=()=>{i!=null&&Oe.current!==!0&&(n.scrollTop>0||(i.dataset.overlayReveal=`true`,u!=null&&clearTimeout(u),u=setTimeout(()=>{d()},200)))},p=()=>{a(),n.scrollTop>0&&d(),Se.current!=null&&y.current&&Ot.current(),Oe.current===!0?y.current=!1:(me(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=>{O.current=(e[0]==null?null:HI(e[0]))??BI(n,g),a()}):null;return x?.observe(n),()=>{D.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,O.current=null,x?.disconnect()}},[t,g,s,c,h]),hL(()=>{Ve||V==null||kt(!1)},[kt,Ve,V]);let Yt=gL(()=>V==null?null:`${V.path}::${V.source}`,[V]);hL(()=>{if(Yt==null){m?.clearSlotContent(lA);return}let t=Se.current;if(t==null)return;let n=v.current??_.current;if(n==null)return;let r={anchorElement:n,anchorRect:t.anchorRect??YL(n.getBoundingClientRect()),close:e=>{Ot.current(e?.restoreFocus??!0)},restoreFocus:()=>{Dt.current&&Et.current(Se.current?.path??null)}},i=e?.contextMenu?.render?.(t.item,r)??null;return m?.setSlotContent(lA,i),e?.contextMenu?.onOpen?.(t.item,r),cR(i),queueMicrotask(()=>{i!=null&&i.isConnected&&document.activeElement===i&&cR(i)}),()=>{m?.clearSlotContent(lA)}},[Yt,e?.contextMenu,m]),hL(()=>{V!=null&&t.getItem(V.path)==null&&kt()},[kt,V,t]),hL(()=>{if(V==null)return;let e=S.current?.getRootNode(),t=e instanceof ShadowRoot?e.host:S.current,n=e=>{let n=e.target;n instanceof Node&&(JL(e)||_.current?.contains(n)!==!0&&t?.contains(n)!==!0&&kt())},r=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),kt())};return document.addEventListener(`mousedown`,n,!0),document.addEventListener(`keydown`,r,!0),()=>{document.removeEventListener(`mousedown`,n,!0),document.removeEventListener(`keydown`,r,!0)}},[kt,V]),hL(()=>{let e=C.current,n=S.current;if(e==null||n==null){N.current=H;return}let r=H==null?null:T.current.get(H)??null,i=zI(n),a=i?.dataset.itemPath??null,o=et&&x.current===i,c=f&&w.current===i,l=F.current&&!tt,u=ee.current??0,d=Ce.current,p=we.current,m=Te.current,g=Ee.current,_=i!=null,v=M.current||_,y=N.current!==H,b=p!=null&&p===H&&H!=null,E=!1,O=!1;if(it!=null&&it.id!==k.current){k.current=it.id;let n=it.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,ht-s))):bt;E=!0,O=WI(e,n,s,ht,yt,it.offset,t)}t.clearScrollRequest(it.id)}let A=!E&&l&&GI(e,rt,s,ht,yt,u),j=!E&&d!=null&&d===H&&GI(e,rt,s,ht,yt,bt),P=!E&&m!=null&&m.path===H&&GI(e,rt,s,ht,yt,m.viewportOffset),te=!E&&g!=null&&g.path===H&&e.scrollTop!==g.scrollTop;te&&(e.scrollTop=g.scrollTop),(te||O||j||P||A||v&&y&&d!==H&&!b&&UI(e,rt,s,ht,bt))&&D.current(),E?N.current=H:v?o||c&&!l?N.current=H:r==null?(l&&rt>=0&&(GI(e,rt,s,ht,yt,u),D.current()),N.current=H):((y||l||d===H||p===H||m?.path===H||g?.path===H||a==null||a!==H)&&(RI(r),d===H&&(Ce.current=null),p===H&&(we.current=null),m?.path===H&&(Te.current=null),g?.path===H&&(Ee.current=null),F.current=!1,ee.current=null),N.current=H):N.current=H},[t,rt,H,St,s,et,tt,gt,ht,f,it,h,bt,yt,mt]);let Xt=rt>=0&&rt>=pt.visible.startIndex&&rt<=pt.visible.endIndex,Zt=H!=null&&_t.some(e=>EL(e.row)===H),Qt=Xt||Zt,$t=Ue&&M.current===!0&&Qt?H:null,en=_e===`pointer`?pe:null,tn=V?.path??De.current??en??$t??pe,nn=V?.source===`right-click`;hL(()=>{y.current&&V==null||At(Ye(tn))},[V,Ye,gt,ht,ye,_t,tn,At,mt]);let rn=_L(e=>{if(y.current||JL(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&&ve(e=>e===`pointer`?e:`pointer`),me(e=>e===i?e:i)},[]),an=_L(()=>{me(null)},[]);hL(()=>{if(!at)return;let e=()=>{Bt(),t.cancelDrag()};return window.addEventListener(`dragend`,e),()=>{window.removeEventListener(`dragend`,e),Bt(),t.cancelDrag()}},[t,at]);let on=e=>{if(!at||t.getDragSession()==null||ae.current)return;let n=FL(e.target instanceof HTMLElement?e.target:null);t.setDragTarget(n),Ht(t.getDragSession()?.target??null),Wt(e.clientX,e.clientY),e.dataTransfer!=null&&(e.dataTransfer.dropEffect=`move`),e.preventDefault()},sn=e=>{if(!at||t.getDragSession()==null||ae.current)return;let n=e.relatedTarget;n instanceof Node&&S.current?.contains(n)===!0||(It(),Rt(),t.setDragTarget(null))},cn=e=>{at&&t.getDragSession()!=null&&!ae.current&&(e.preventDefault(),Vt(e.clientX,e.clientY),t.completeDrag(),Lt(),It(),Rt(),re.current=null)},ln=pt.window.height,un=pt.window.offsetTop,dn=Math.min(0,ht-ln),fn=Math.min(0,ht-ln-bt),pn=fe===H||F.current,mn=H!=null&&pn&&!St&&rt>=0?mt[rt]??t.getVisibleRows(rt,rt)[0]??null:null,hn=mn==null?null:KI(rt,s,gt,ln),gn=re.current,_n=lt!=null&&gn!=null&&gn.path===lt&&gn.index>=gt.start&&gn.index<=gt.end,vn=lt!=null&&gn!=null&&gn.path===lt&&!_n&&gn.path!==mn?.path?gn:null,yn=vn==null?null:KI(vn.index,s,gt,ln),bn=WL((rt>=0?mt[rt]??t.getVisibleRows(rt,rt)[0]??null:null)?.ancestorPaths.at(-1)??null),xn=tt&&H!=null?aR(o,H,!St):void 0,Sn=V?.path??(tt?H:fe),Cn=V?.path??pe,wn=Ye(tn),Tn=Ve&&Ue&&!nn&&!et&&wn!=null&&he!=null&&tn!=null,En=Ve&&(Tn||V!=null),Dn=V?.anchorRect,On=Dn==null&&wn!=null&&he!=null&&(V!=null||Tn)?he:null,kn=Dn==null?On==null?void 0:{top:`${On}px`}:{left:`${Dn.left}px`,position:`fixed`,right:`auto`,top:`${Dn.top}px`},An=nn?{opacity:`0`}:void 0,jn=_L((e,n,r,i)=>{let a=XI({event:{ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey},isDirectory:n.kind===`directory`,isSearchOpen:tt,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>=pt.visible.startIndex&&n.index<=pt.visible.endIndex,d=i===`flow`&&u&&l!=null&&l.dataset.itemParked!==`true`;t.focusMountedPathFromInput(c),d&&(M.current=!0,B(e=>e===c?e:c),ve(`focus`)),o&&t.toggleMountedDirectoryFromInput(c),a.closeSearch&&t.closeSearch(),a.revealCanonical&&Mt(c,{targetOffset:`sticky-parents`})},[t,tt,pt.visible.endIndex,pt.visible.startIndex,Mt]),Mn=()=>{if(y.current||!Ue||tn==null||wn==null)return;let e=t.getItem(tn);e!=null&&(At(wn),Dt.current=!0,xe({anchorRect:null,item:{kind:e.isDirectory()?`directory`:`file`,name:wn.getAttribute(`aria-label`)??tn,path:e.getPath()},path:e.getPath(),source:`button`}))},Nn={contextHoverPath:Cn,contextMenuButtonTriggerEnabled:Ue,contextMenuButtonVisibility:We,contextMenuEnabled:Ve,contextMenuRightClickEnabled:Ge,contextMenuTriggerMode:He,controller:t,directoriesWithGitChanges:i,dragAndDropEnabled:at,draggedPathSet:st,dragTarget:ct,gitLaneActive:Xe,gitStatusByPath:n,handleRowDragEnd:Kt,handleRowDragStart:Gt,handleRowTouchStart:qt,ignoredGitDirectories:r,ignoredInheritanceCache:le,instanceId:o,itemHeight:s,onKeyDown:Jt,onRowClick:jn,openContextMenuForRow:U,registerButton:Ke,registerRenameInput:Je,renameView:Qe,renderDecorationForRow:Ct,resolveIcon:Ze,shouldSuppressContextMenu:Nt,visualFocusPath:Sn},Pn={...Nn,registerButton:qe};return Q(`div`,{ref:S,id:ut,"data-file-tree-context-menu-button-visibility":Ve&&Ue?We:void 0,"data-file-tree-context-menu-trigger-mode":Ve?He:void 0,"data-file-tree-has-context-menu-action-lane":Ve&&Ue?`true`:void 0,"data-file-tree-has-git-lane":Xe?`true`:void 0,"data-file-tree-virtualized-root":`true`,onDragLeave:at?sn:void 0,onDragOver:at?on:void 0,onDrop:at?cn:void 0,onKeyDown:Jt,onPointerLeave:Ve?an:void 0,onPointerOver:Ve?rn:void 0,role:`tree`,tabIndex:-1,style:{outline:`none`,position:`relative`},children:[Q(`style`,{"data-file-tree-guide-style":`true`,dangerouslySetInnerHTML:{__html:bn}}),Q(`slot`,{name:cA,"data-type":`header-slot`}),f?Q(`div`,{"data-file-tree-search-container":!0,"data-open":tt?`true`:`false`,children:Q(`input`,{ref:w,"aria-activedescendant":xn,"aria-controls":ut,placeholder:`Search…`,"data-file-tree-search-input":!0,"data-file-tree-search-input-fake-focus":Ne?`true`:void 0,value:nt,onBlur:()=>{(d!==`retain`||Fe.current)&&t.closeSearch()},onFocus:Ie,onPointerDown:Ie,onInput:e=>{Ie();let n=e.currentTarget;t.setSearch(n.value)}})}):null,Q(`div`,{ref:C,"data-file-tree-virtualized-scroll":`true`,children:[h&&ze&&_t.length>0?Q(`div`,{"aria-hidden":`true`,"data-file-tree-sticky-overlay":`true`,children:Q(`div`,{"data-file-tree-sticky-overlay-content":`true`,style:{height:`${dt}px`},children:_t.map((e,t)=>uR(Pn,e.row,`sticky:${EL(e.row)}`,{mode:`sticky`,style:{left:`0`,position:`absolute`,right:`0`,top:`${e.top}px`,zIndex:`${_t.length-t}`}}))})}):null,Q(`div`,{ref:b,"data-file-tree-virtualized-list":`true`,style:{height:`${yt}px`},children:[Q(`div`,{"data-file-tree-virtualized-sticky-offset":`true`,"aria-hidden":`true`,style:{height:`${un}px`}}),Q(`div`,{"data-file-tree-virtualized-sticky":`true`,style:{height:`${ln}px`,top:`${dn}px`,bottom:`${fn}px`},children:[dR(Nn,gt,xt),mn!=null&&hn!=null?uR(Nn,mn,`parked:${mn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:lt===mn.path?`none`:void 0,position:`absolute`,right:`0`,top:`${hn}px`}}):null,vn!=null&&yn!=null?uR(Nn,vn,`parked-drag:${vn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:`none`,position:`absolute`,right:`0`,top:`${yn}px`}}):null]})]})]}),Ve?Q(`div`,{ref:_,"data-type":`context-menu-anchor`,"data-visible":En?`true`:`false`,style:kn,children:[Q(`button`,{ref:v,type:`button`,"data-type":uA,"aria-label":`Options`,"aria-haspopup":`menu`,"aria-expanded":V==null?`false`:`true`,"data-visible":Tn?`true`:`false`,onMouseDown:e=>{e.preventDefault()},onClick:e=>{e.preventDefault(),e.stopPropagation(),V==null?Mn():kt()},tabIndex:-1,style:An,children:Q(rI,{...Ze(`file-tree-icon-ellipsis`)})}),V==null?null:Q(`slot`,{name:lA})]}):null,V==null?null:Q(`div`,{"data-type":`context-menu-wash`,"aria-hidden":`true`,onMouseDownCapture:e=>{e.preventDefault(),kt()},onTouchStartCapture:e=>{e.preventDefault(),e.stopPropagation(),kt()},onTouchMoveCapture:e=>{e.preventDefault(),e.stopPropagation()},onWheelCapture:e=>{e.preventDefault(),e.stopPropagation()}})]})}var pR={hydrateRoot:(e,t)=>{QF(OF(fR,t),e)},renderRoot:(e,t)=>{ZF(OF(fR,t),e)},unmountRoot:e=>{ZF(null,e)}};function mR(e,t){pR.renderRoot(e,t)}function hR(e,t){pR.hydrateRoot(e,t)}function gR(e){pR.unmountRoot(e)}var _R=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);n===t?t!=null&&(this.#e.set(e,t),this.#r(e,t)):(n?.remove(),t==null?this.#e.delete(e):(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 vR=0;function yR(e){return e!=null&&e.length>0?e:(vR+=1,`pst_ft_${vR}`)}function bR({initialVisibleRowCount:e,itemHeight:t}){return e==null?420:Math.max(0,e)*(t??tP)}function xR(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 SR(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 CR(e){return Array.from(e.children).filter(e=>e instanceof SVGElement)}var wR=class{static LoadedCustomComponent=!0;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=new _R;#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=yR(a),this.#p=rF(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=eP(n,c),this.#d={itemHeight:this.#u.itemHeight,overscan:d,stickyFolders:_,initialVisibleRowCount:y},this.#t=new QP({...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&&(gR(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(()=>{t?e():t=!0})}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=iF(this.#p,e);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&mR(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(),mR(t.wrapper,this.#w()))}setGitStatus(e){let t=rF(e,this.#p);if(t===this.#p)return;this.#p=t;let n=this.#T();n!=null&&mR(n.wrapper,this.#w())}setIcons(e){this.#m=e;let t=this.#T();t!=null&&(this.#E(t.host,t.wrapper),mR(t.wrapper,this.#w()))}hydrate({fileTreeContainer:e}){let t=this.#P(e),n=this.#N(t);this.#O(),hR(n,this.#w())}render({containerWrapper:e,fileTreeContainer:t}){let n=this.#P(t??this.#f,e),r=this.#N(n);this.#O(),mR(r,this.#w())}#C(){return{initialViewportHeight:bR({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;e==null?this.#l.setSlotHtml(cA,this.#e?.header?.html??null):this.#l.setSlotContent(cA,e())}#k(e){let t=CR(e).find(e=>SR(e)),n=xR(Qk(fA(this.#m).set));n!=null&&(t==null||t.outerHTML!==n.outerHTML)&&(t==null?e.prepend(n):t.replaceWith(n))}#A(e){let t=CR(e),n=t.find(e=>SR(e)),r=t.filter(e=>e!==n),i=fA(this.#m).spriteSheet?.trim()??``;if(i.length===0){for(let e of r)e.remove();return}let a=xR(i);if(a==null)for(let e of r)e.remove();else if(r.length!==1||r[0].outerHTML!==a.outerHTML){for(let e of r)e.remove();e.appendChild(a)}}#j(e){let t=fA(this.#m);t.colored&&eA(t.set)?e.dataset.fileTreeColoredIcons=`true`:delete e.dataset.fileTreeColoredIcons}#M(e){let t=e.querySelector(`style[${iA}]`);this.#g==null&&t instanceof HTMLStyleElement&&(this.#g=t),this.#h==null||this.#h===``?(this.#g?.remove(),this.#g=void 0,this.#_=void 0):(this.#g?.parentNode!==e||this.#_!==this.#h)&&(this.#g??=document.createElement(`style`),this.#g.setAttribute(iA,``),this.#g.parentNode!==e&&e.appendChild(this.#g),this.#g.textContent=aP(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 dP(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)}};function TR(e){let r,i,a,o=e.props.prerenderedHTML;function s(){if(!r||!i)return;let n=e.props.options;(n.paths!==i.paths||n.preparedInput!==i.preparedInput)&&(n.preparedInput?r.resetPaths({preparedInput:n.preparedInput}):r.resetPaths(n.paths??[])),n.gitStatus!==i.gitStatus&&r.setGitStatus(n.gitStatus),n.icons!==i.icons&&r.setIcons(n.icons),n.composition!==i.composition&&r.setComposition(n.composition),n.renderRowDecoration!==i.renderRowDecoration&&r.render({}),i=n,e.props.search!==void 0&&e.props.search!==a&&r.setSearch(e.props.search),a=e.props.search,r.getFileTreeContainer()?.shadowRoot?.querySelector(`[role="tree"]`)?.setAttribute(`aria-label`,e.props[`aria-label`]||t(`files.fileTree.projectFiles`))}let c=l((t,n)=>{let a=e.props.options;r=new wR({...a,onSelectionChange:t=>e.props.options.onSelectionChange?.(t),onSearchChange:t=>e.props.options.onSearchChange?.(t),renderRowDecoration:t=>e.props.options.renderRowDecoration?.(t)??null}),i=a;let o=t.querySelector(`file-tree-container`);o?r.hydrate({fileTreeContainer:o}):r.render({containerWrapper:t}),n.addEventListener(`abort`,()=>{r?.cleanUp(),r=void 0},{once:!0}),s(),e.props.onReady?.(r,n)});return()=>{let{options:t,prerenderedHTML:r,search:i,onReady:a,mix:l,...u}=e.props;return e.queueTask(s),n(`div`,{...u,"data-bud-file-tree":``,"data-rmx-preserve-dom":``,innerHTML:LO(o),mix:[c,l]})}}var ER=`h-control min-w-0 rounded-lg border-0 bg-[var(--bud-control)] px-2.5 text-[13px] text-[var(--bud-foreground)] outline-none placeholder:text-[var(--bud-muted)]`;function DR(e){return()=>{let{icon:t,class:r=``,...i}=e.props,a=i.options.find(e=>e.value===i.value);return n(te,{...i,headless:!0,placement:`bottom-end`,class:`bud-interaction inline-flex h-control min-w-0 shrink-0 items-center gap-1.5 rounded-lg px-2 text-muted hover:text-ink disabled:opacity-40 ${r}`,children:[t?n(V,{name:t,size:14,class:`shrink-0`}):null,n(m,{variant:`ui-compact`,class:`truncate`,children:a?.label??i.label}),n(V,{name:`chevron-down`,size:12,class:`shrink-0 opacity-70`})]})}}function OR(e){let i=!1;function a(t){i=t,e.update()}return()=>{let{view:o,repository:c,onChange:l}=e.props;return n(`div`,{class:`flex min-w-0 items-center gap-0.5`,role:`group`,"aria-label":t(`files.reviewControls.reviewControls`),children:[n(DR,{icon:`compare`,label:t(`files.reviewControls.comparison`),value:o.mode,options:[{value:`source`,label:e.props.sourceLabel??t(`files.reviewControls.workingFile`)},{value:`working`,label:t(`files.reviewControls.unstaged`),description:t(`files.reviewControls.indexToWorktree`),disabled:!c?.available},{value:`staged`,label:t(`files.reviewControls.staged`),description:t(`files.reviewControls.headToIndex`),disabled:!c?.available},{value:`commits`,label:t(`files.reviewControls.branchesAndCommits`),disabled:!c?.head}],onChange:e=>l({mode:e})}),o.mode===`source`?null:n(r,{children:[n(DR,{label:t(`files.reviewControls.reviewScope`),class:`max-sm:hidden`,value:o.multiple?`all`:`single`,options:[{value:`single`,label:t(`files.reviewControls.oneFile`)},{value:`all`,label:t(`files.reviewControls.allChanges`)}],onChange:e=>l({multiple:e===`all`})}),n(DR,{label:t(`files.reviewControls.diffLayout`),value:o.layout,options:[{value:`split`,label:t(`files.reviewControls.split`)},{value:`unified`,label:t(`files.reviewControls.unified`)}],onChange:e=>l({layout:e})})]}),n(Me,{children:[n(U,{tooltip:!0,icon:`sliders`,label:t(`files.reviewControls.display`),active:i,"aria-expanded":i,mix:[Ae({placement:`bottom-end`,offset:6}),Pe(),s(`click`,()=>a(!i))]}),n(`div`,{class:`bud-overlay bud-menu m-0 w-64 rounded-xl p-1 text-[var(--bud-foreground)]`,"aria-label":t(`files.reviewControls.displaySettings`),role:`group`,mix:y({open:i,onHide:()=>a(!1)}),children:[[[`wrap`,t(`files.reviewControls.wrapLines`)],[`lineNumbers`,t(`files.reviewControls.lineNumbers`)],[`sticky`,t(`files.reviewControls.stickyHeaders`)],...o.mode===`source`?[]:[[`context`,t(`files.reviewControls.fullContext`)],[`collapsed`,t(`files.reviewControls.collapseFiles`)]]].map(([e,t],r)=>n(`label`,{class:`flex h-8 cursor-pointer items-center justify-between gap-3 rounded-lg px-2.5 hover:bg-[var(--bud-menu-hover)]`,children:[n(m,{variant:`ui`,children:t}),n(`input`,{type:`checkbox`,class:`size-3.5 accent-[var(--bud-foreground)]`,checked:!!o[e],mix:[...r===0?[fe()]:[],s(`change`,t=>l({[e]:t.currentTarget.checked}))]})]},e)),o.mode===`source`?null:n(r,{children:[n(`label`,{class:`flex h-8 items-center justify-between gap-3 px-2.5 sm:hidden`,children:[n(m,{variant:`ui`,children:t(`files.reviewControls.allChanges`)}),n(`input`,{type:`checkbox`,class:`size-3.5 accent-[var(--bud-foreground)]`,checked:o.multiple,mix:s(`change`,e=>l({multiple:e.currentTarget.checked}))})]}),n(`label`,{class:`-mx-1 mt-1 flex flex-col gap-1.5 border-t border-line px-3.5 pt-2.5 pb-1.5`,children:[n(m,{variant:`ui-caption`,tone:`muted`,children:t(`files.reviewControls.inlineHighlights`)}),n(te,{label:t(`files.reviewControls.inlineHighlights`),class:`w-full`,value:o.highlights,options:[{value:`word-alt`,label:t(`files.reviewControls.wordsCompact`)},{value:`word`,label:t(`files.reviewControls.words`)},{value:`word-line`,label:t(`files.reviewControls.wholeChange`)},{value:`char`,label:t(`files.reviewControls.characters`)},{value:`none`,label:t(`files.reviewControls.none`)}],onChange:e=>l({highlights:e})})]})]})]})]})]})}}function kR(e){let r=e.props.view.base,i=e.props.view.target,a=r,o=i,c=``;return()=>{let{view:l,repository:u,onChange:d}=e.props;return l.base!==a&&(r=a=l.base),l.target!==o&&(i=o=l.target),n(`form`,{class:`flex shrink-0 flex-wrap items-center gap-2 border-b border-line px-3 py-1.5`,"aria-label":t(`files.reviewControls.comparedRevisions`),mix:s(`submit`,n=>{n.preventDefault();try{let e={base:Ve(r),target:Ve(i)};c=``,d(e)}catch(e){c=e instanceof Error?e.message:t(`files.reviewControls.chooseValidRevisions`)}e.update()}),children:[n(`label`,{class:`flex min-w-0 flex-1 basis-32 items-center gap-2`,children:[n(m,{variant:`ui-caption`,tone:`muted`,children:t(`files.reviewControls.base`)}),n(`input`,{"aria-label":t(`files.reviewControls.baseRevision`),class:`${ER} w-full pb-0.5`,list:`bud-review-references`,value:r,maxLength:1024,spellcheck:!1,mix:s(`input`,e=>{r=e.currentTarget.value})})]}),n(V,{name:`arrow-right`,size:14,class:`text-muted`}),n(`label`,{class:`flex min-w-0 flex-1 basis-32 items-center gap-2`,children:[n(m,{variant:`ui-caption`,tone:`muted`,children:t(`files.reviewControls.compare`)}),n(`input`,{"aria-label":t(`files.reviewControls.targetRevision`),class:`${ER} w-full pb-0.5`,list:`bud-review-references`,value:i,maxLength:1024,spellcheck:!1,mix:s(`input`,e=>{i=e.currentTarget.value})})]}),n(`datalist`,{id:`bud-review-references`,children:[n(`option`,{value:`HEAD`}),u?.references.map(e=>n(`option`,{value:e.name,children:[e.kind,` · `,e.commit.slice(0,8)]},e.name))]}),n(f,{variant:`secondary`,size:`small`,type:`submit`,children:t(`files.reviewControls.compare`)}),c?n(m,{as:`p`,variant:`ui-caption`,class:`basis-full`,role:`alert`,children:c}):null]})}}var AR={blue:[`#1a85d4`,`#69b1ff`],cyan:[`#1ca1c7`,`#68cdf2`],gray:[`#84848a`,`#adadb1`],green:[`#199f43`,`#5ecc71`],indigo:[`#693acf`,`#9d6afb`],mauve:[`#594c5b`,`#79697b`],orange:[`#d47628`,`#ffa359`],pink:[`#d32a61`,`#ff678d`],purple:[`#a631be`,`#d568ea`],red:[`#d52c36`,`#ff6762`],teal:[`#17a5af`,`#64d1db`],vermilion:[`#ff8c5b`,`#d5512f`],yellow:[`#d5a910`,`#ffd452`]},jR={astro:`purple`,babel:`yellow`,bash:`green`,biome:`blue`,bootstrap:`indigo`,browserslist:`yellow`,bun:`mauve`,c:`blue`,claude:`orange`,cpp:`blue`,css:`indigo`,database:`purple`,default:`gray`,docker:`blue`,eslint:`indigo`,git:`vermilion`,go:`cyan`,graphql:`pink`,html:`orange`,image:`pink`,javascript:`yellow`,json:`orange`,markdown:`green`,mcp:`teal`,npm:`red`,oxc:`cyan`,postcss:`red`,prettier:`teal`,python:`blue`,react:`cyan`,ruby:`red`,rust:`orange`,sass:`pink`,svelte:`red`,svg:`orange`,svgo:`green`,swift:`orange`,table:`teal`,tailwind:`cyan`,terraform:`indigo`,text:`gray`,typescript:`blue`,vite:`purple`,vscode:`blue`,vue:`green`,wasm:`indigo`,webpack:`blue`,yml:`red`,zig:`orange`,zip:`orange`},MR=_A({set:`complete`,colored:!0}),NR=new Map;function PR(e){if(!NR.size)for(let[,e,t,n]of Qk(`complete`).matchAll(/<symbol id="([^"]+)" viewBox="([^"]+)">([\s\S]*?)<\/symbol>/g))NR.set(e,{viewBox:t,markup:n});return NR.get(e)}function FR(e){return()=>{let{path:t,size:r=16,class:i=``}=e.props,o=MR.resolveIcon(`file-tree-icon-file`,t),s=PR(o.name),[c,l]=AR[jR[o.token??`default`]??`gray`];return n(`svg`,{"aria-hidden":`true`,width:r,height:r,viewBox:s?.viewBox??`0 0 16 16`,fill:`currentColor`,class:`shrink-0 ${i}`,style:{color:`light-dark(${c}, ${l})`},innerHTML:a(s?.markup??``)})}}function IR(e){let i=e.props.result?.query??_t({query:` `});i={...i,query:e.props.result?.query.query??``};let a=i.include.join(`, `),o=i.exclude.join(`, `),c=!1,u,d=``,p=!1;function h(t){i={...i,...t},p=!0,d=``,e.props.loading&&e.props.onCancel(),e.update()}return()=>{let g=e.props,_=new Map;for(let e of g.result?.matches??[])_.set(e.path,[..._.get(e.path)??[],e]);return n(`section`,{"aria-label":t(`files.fileSearchPanel.searchProjectContents`),class:`flex h-full min-h-0 w-full flex-col`,mix:[l((e,t)=>{queueMicrotask(()=>{t.aborted||u?.focus()})}),s(`keydown`,e=>{e.key!==`Escape`||g.loading||(e.preventDefault(),g.onClose())})],children:[n(ut,{title:t(`files.fileSearchPanel.search`),children:n(U,{tooltip:!0,icon:`close`,label:t(`files.fileSearchPanel.closeProjectSearch`),mix:s(`click`,g.onClose)})}),n(`form`,{class:`flex shrink-0 flex-col gap-2 border-b border-line p-2`,"aria-label":t(`files.fileSearchPanel.projectContentSearch`),mix:s(`submit`,n=>{n.preventDefault();try{i=_t({...i,include:a.split(`,`).map(e=>e.trim()).filter(Boolean),exclude:o.split(`,`).map(e=>e.trim()).filter(Boolean)}),d=``,p=!1,g.onSearch(i)}catch(e){d=e instanceof Error?e.message:t(`files.fileSearchPanel.invalidSearch`)}e.update()}),children:[n(HD,{label:t(`files.fileSearchPanel.searchProjectText`),value:i.query,maxLength:512,class:`w-full`,placeholder:t(`files.fileSearchPanel.searchFileContents`),mix:[l(e=>{u=e}),s(`input`,e=>h({query:e.currentTarget.value}))]}),n(`div`,{class:`flex flex-wrap items-center gap-x-3 gap-y-1 px-1`,children:[`caseSensitive`,`wholeWord`,`regex`].map(e=>n(`label`,{class:`flex items-center gap-1.5 text-muted`,children:[n(`input`,{type:`checkbox`,class:`size-3.5 accent-[var(--bud-foreground)]`,checked:i[e],mix:s(`change`,t=>h({[e]:t.currentTarget.checked}))}),n(m,{variant:`ui-caption`,children:{caseSensitive:t(`files.fileSearchPanel.matchCase`),wholeWord:t(`files.fileSearchPanel.wholeWord`),regex:t(`files.fileSearchPanel.regularExpression`)}[e]})]},e))}),n(`div`,{class:`flex items-center gap-1`,children:[n(f,{variant:`ghost`,size:`small`,class:`text-muted`,"aria-expanded":c,mix:s(`click`,()=>{c=!c,e.update()}),children:[n(V,{name:c?`chevron-down`:`chevron-right`,size:12}),t(`files.fileSearchPanel.filters`)]}),n(`div`,{class:`ms-auto flex items-center gap-1`,children:[g.loading?n(f,{variant:`ghost`,size:`small`,mix:s(`click`,g.onCancel),children:t(`files.fileSearchPanel.cancel`)}):null,n(f,{variant:`secondary`,size:`small`,type:`submit`,disabled:!i.query||g.loading,children:t(`files.fileSearchPanel.search`)})]})]}),c?n(`div`,{class:`flex flex-col gap-2 px-1 pb-1`,children:[n(`label`,{class:`flex min-w-0 flex-col gap-1`,children:[n(m,{variant:`ui-caption`,tone:`muted`,children:t(`files.fileSearchPanel.withinDirectory`)}),n(`input`,{"aria-label":t(`files.fileSearchPanel.searchDirectory`),value:i.directory,class:ER,placeholder:t(`files.fileSearchPanel.projectRoot`),mix:s(`input`,e=>h({directory:e.currentTarget.value}))})]}),n(`label`,{class:`flex min-w-0 flex-col gap-1`,children:[n(m,{variant:`ui-caption`,tone:`muted`,children:t(`files.fileSearchPanel.includePaths`)}),n(`input`,{"aria-label":t(`files.fileSearchPanel.includeSearchPaths`),value:a,class:ER,placeholder:t(`files.fileSearchPanel.includePathsExample`),mix:s(`input`,e=>{a=e.currentTarget.value,h({})})})]}),n(`label`,{class:`flex min-w-0 flex-col gap-1`,children:[n(m,{variant:`ui-caption`,tone:`muted`,children:t(`files.fileSearchPanel.excludePaths`)}),n(`input`,{"aria-label":t(`files.fileSearchPanel.excludeSearchPaths`),value:o,class:ER,placeholder:t(`files.fileSearchPanel.excludePathsExample`),mix:s(`input`,e=>{o=e.currentTarget.value,h({})})})]}),n(`div`,{class:`flex flex-wrap items-center gap-3 text-muted`,children:[`includeDotfiles`,`includeIgnored`].map(e=>n(`label`,{class:`flex items-center gap-1.5`,children:[n(`input`,{type:`checkbox`,class:`size-3.5 accent-[var(--bud-foreground)]`,checked:i[e],mix:s(`change`,t=>h({[e]:t.currentTarget.checked}))}),n(m,{variant:`ui-caption`,children:t(e===`includeDotfiles`?`files.fileSearchPanel.dotfiles`:`files.fileSearchPanel.ignoredFiles`)})]},e))}),n(m,{variant:`ui-caption`,tone:`muted`,children:t(`files.fileSearchPanel.pathFilterDescription`)})]}):null,i.regex?n(m,{variant:`ui-caption`,tone:`muted`,class:`px-1`,children:t(`files.fileSearchPanel.regexDescription`)}):null]}),n(`div`,{class:`flex min-h-0 flex-1 flex-col overflow-y-auto py-1`,children:[d||g.error?n(m,{as:`p`,variant:`ui-caption`,role:`alert`,class:`px-4 py-2 text-red-600 dark:text-red-400`,children:d||g.error}):null,g.loading||g.notice?n(m,{as:`p`,variant:`ui-caption`,role:`status`,class:`px-4 py-2 text-muted`,children:g.loading?t(`files.fileSearchPanel.searchingFiles`):g.notice}):null,!p&&g.result?n(r,{children:[n(m,{as:`p`,variant:`ui-caption`,tone:`muted`,role:`status`,class:`px-4 py-2`,children:[t(`files.fileSearchPanel.matchCount`,{count:g.result.matches.length}),` in`,` `,t(`files.fileSearchPanel.fileCount`,{count:_.size}),` ·`,` `,t(`files.fileSearchPanel.searchedFileCount`,{count:g.result.scannedFiles}),g.result.truncated?t(`files.fileSearchPanel.truncated`,{reason:g.result.reason??``}):``]}),Object.values(g.result.skipped).some(Boolean)?n(m,{as:`p`,variant:`ui-caption`,tone:`muted`,class:`px-4 pb-2`,children:t(`files.fileSearchPanel.skippedSummary`,{binary:g.result.skipped.binary,large:g.result.skipped.large,unsupported:g.result.skipped.unsupported,unreadable:g.result.skipped.unreadable})}):null,[..._].map(([e,r])=>n(`section`,{"aria-label":t(`files.fileSearchPanel.matchesIn`,{path:e}),class:`px-2 py-0.5`,children:[n(`div`,{class:`flex min-w-0 items-center gap-2 px-2 py-1`,title:e,children:[n(FR,{path:e,size:14,class:`text-muted`}),n(m,{as:`h3`,variant:`ui-compact`,class:`shrink-0`,children:e.split(`/`).at(-1)}),n(m,{variant:`ui-caption`,tone:`muted`,class:`min-w-0 truncate`,children:e.split(`/`).slice(0,-1).join(`/`)}),n(m,{variant:`ui-caption`,tone:`muted`,class:`ms-auto shrink-0 tabular-nums`,children:r.length})]}),r.map(e=>{let t=Math.max(0,Math.min(e.excerpt.length,e.start-e.excerptStart)),r=Math.max(t,Math.min(e.excerpt.length,e.end-e.excerptStart));return n(F,{class:`flex w-full min-w-0 items-baseline gap-2 rounded-md py-1 ps-8 pe-2 text-left hover:bg-[var(--bud-hover)]`,mix:s(`click`,()=>g.onSelect(e)),children:[n(m,{variant:`ui-caption`,tone:`muted`,class:`shrink-0 tabular-nums`,children:e.startLine}),n(m,{variant:`code`,class:`min-w-0 truncate`,children:[t>24?`…${e.excerpt.slice(t-20,t)}`:e.excerpt.slice(0,t).trimStart(),n(`mark`,{class:`rounded-sm bg-amber-400/30 text-[var(--bud-foreground)]`,children:e.excerpt.slice(t,r)||`│`}),e.excerpt.slice(r)]})]},`${e.revision}:${e.start}`)})]},e))]}):!g.loading&&!g.error?n(m,{as:`p`,variant:`ui-caption`,tone:`muted`,class:`px-4 py-2`,children:t(p?`files.fileSearchPanel.pressEnterToUpdate`:`files.fileSearchPanel.searchFilesDescription`)}):null]})]})}}function LR(e){if(!e||typeof e!=`object`||Array.isArray(e))return Ce(e);let t=e,n=t.context;if(n&&typeof n==`object`&&!Array.isArray(n)){let e=n;n={before:e.before,selected:e.selected,after:e.after}}return Ce({type:t.type,version:t.version,path:t.path,revision:t.revision,commit:t.commit,side:t.side,startLine:t.startLine,endLine:t.endLine,context:n})}var RR=new WeakMap,zR={"type.object":`Expected a JSON object.`,"variant.missing_discriminator":`Unsupported comment version.`,"variant.unknown_discriminator":`Unsupported comment version.`,"literal.invalid_value":`Unsupported comment version.`},BR=e=>zR[e.code];function VR(e,t){let n=pt(e,t,{abortEarly:!0,errorMap:BR});if(n.success)return n.value;let r=n.issues[0];throw RR.get(r)??Error(r.message)}function HR(e,t){return P((n,r)=>{let i=e[`~run`](n,r);return i.issues?R(t,r.path):i})}function UR(e){return P((t,n)=>{try{return{value:e(t)}}catch(e){if(!(e instanceof Error))throw e;let t=R(e.message,n.path);return RR.set(t.issues[0],e),t}})}function WR(e,t,n=0){let r=Se(e);return P((e,i)=>!Array.isArray(e)||e.length<n?R(t,i.path):r[`~run`](e,i))}function GR(e,t){return HR(St().pipe(Lt(t)).refine(e=>!!e.trim()),`${e} must be between 1 and ${t} characters.`)}function KR(e,t){return new Set(e.map(t)).size===e.length}var qR=b({}),JR=HR(St().refine(e=>/^[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}$/.test(e)),`Invalid conversation or message ID.`),YR=Fe(HR(St().refine(e=>/^(?:[a-f0-9]{40}|[a-f0-9]{64})$/.test(e)),`A valid comments revision is required.`)),XR=HR(bt([`open`,`in_progress`,`needs_approval`,`resolved`]),`Invalid conversation status.`),ZR=HR(St().refine(e=>Number.isFinite(Date.parse(e))&&new Date(e).toISOString()===e),`Invalid comment timestamp.`);function QR(e){return VR(qR,e),e}function $R(e){let t=QR(e);if(t.type!==void 0)throw Error(`Unsupported canvas anchor discriminator.`);let n=t.element;if(n&&typeof n==`object`&&!Array.isArray(n)){let e=n;n={selector:e.selector,breadcrumb:e.breadcrumb,contentHash:e.contentHash,label:e.label,tagName:e.tagName,text:e.text,offsetX:e.offsetX,offsetY:e.offsetY}}return jt({pageId:t.pageId,pagePath:t.pagePath,viewport:t.viewport,offsetX:t.offsetX,offsetY:t.offsetY,element:n,...t.branch===void 0?{}:{branch:t.branch}})}var ez=b({id:JR,body:GR(`Comment`,1e4),parentId:P((e,t)=>e==null?{value:null}:JR[`~run`](e,t)),createdAt:ZR,author:b({id:HR(St().refine(e=>/^[a-f0-9]{16}$/.test(e)),`Invalid Git author ID.`),name:GR(`Git author name`,1e3),email:GR(`Git author email`,1e3)})});function tz(e){let t=new Map(e.map(e=>[e.id,e.parentId]));return e.every(e=>{let n=new Set([e.id]),r=e.parentId;for(;r!==null;){if(!t.has(r)||n.has(r))return!1;n.add(r),r=t.get(r)}return!0})}function nz(e,t){return b({version:je(e),project:GR(`Project`,4096).refine(e=>e===`.`||!e.startsWith(`/`)&&!e.includes(`\\`)&&!e.split(`/`).some(e=>!e||e===`..`||e===`.`),`Invalid comment project path.`),comments:WR(ez,`A conversation needs at least one message.`,1).refine(e=>KR(e,e=>e.id),`Duplicate message ID.`).refine(tz,`Invalid comment reply ancestry.`),createdCommit:P((e,t)=>{if(e===``)return{value:e};let n=YR[`~run`](e,t);return n.issues?n:n.value===null?R(`Invalid source commit.`,t.path):{value:n.value}}),id:JR,branch:GR(`Source branch`,1024),status:XR,createdAt:ZR,updatedAt:ZR,anchor:t}).transform(e=>({id:e.id,project:e.project,branch:e.branch,createdCommit:e.createdCommit,comments:e.comments,status:e.status,createdAt:e.createdAt,updatedAt:e.updatedAt,version:e.version,anchor:e.anchor}))}var rz=at(`version`,{1:nz(1,UR($R)),2:nz(2,UR(LR))});b({head:YR,threads:WR(rz,`Invalid comments response.`).refine(e=>KR(e,e=>e.id),`Duplicate conversation ID.`)}).refine(({head:e,threads:t})=>e!==null||!t.length,`Comments are missing their Git revision.`);function iz(e,t){if(![e.x,e.y,t].every(Number.isFinite)||t<=0)throw Error(`Canvas coordinates require finite values and a positive width.`);return{offsetX:Math.max(0,Math.min(1,e.x/t)),offsetY:Math.max(0,Math.min(T,e.y))}}function az(e,t){return{x:e.offsetX*t,y:e.offsetY}}var oz=4e3;function sz(e){let i=e.props.width??1440,a=e.props.initialMode??`pan`,o=1,c,u,d={...e.props.initialHeights},f=EO();e.signal.addEventListener(`abort`,()=>f.dispose(),{once:!0});let p={},h={},g=new Set,_=!1,v=``,y=!1,b=!0,x,S,C=e.props.initialThreadId,w,T,E,D,O;async function k(t){return e.props.onWrite(t)}function A(t,n){let r=e.props.onDeleteComment;if(e.props.capabilities.delete&&r)return async i=>{let a=t.messages[0]?.id===i;await r(t.id,i),a&&(x===t.id&&(x=void 0),n?.(),e.update())}}function j(e){return e.pageId??e.id}function M(e){return e.width??i}function N(t,n){if(t.anchor.pageId!==j(n))return!1;if(n.width===void 0)return!0;let r=e.props.artboards.filter(e=>j(e)===j(n));return r.some(e=>M(e)===t.anchor.viewport)?t.anchor.viewport===M(n):r[0]?.id===n.id}function P(t){return e.props.artboards.find(e=>N(t,e))?.id}function F(t,n){if(e.props.commentsUnavailable||!e.props.capabilities.create)return;D=t.id,E={pageId:j(t),pagePath:t.path,viewport:M(t),offsetX:n.offsetX,offsetY:n.offsetY,element:n.element,...e.props.branch?{branch:e.props.branch}:{}};let r=E;O=n.found?.then(t=>{E===r&&t&&(E={...r,element:t},e.update())}),T=void 0,x=void 0,b=!0,e.update()}function ee(t,n){g.has(t.id)||(g.add(t.id),e.update()),(d[t.id]!==n.height||p[t.id]!==n.path||h[t.id]!==n.pins)&&(d[t.id]=n.height,p[t.id]=n.path,h[t.id]=n.pins,e.update())}function te(){E=void 0,e.update()}function ne(){T=void 0,e.update()}function I(n){e.props.onCopyThreadLink?.(n).then(()=>Ye.success(t(`canvas.canvasWorkspace.discussionLinkCopied`)),()=>Ye.error(t(`canvas.canvasWorkspace.couldNotCopyLink`),{description:t(`canvas.canvasWorkspace.tryAgain`)}))}function L(t,r){return n(pO,{location:t.anchor.element?.label?`${t.anchor.pagePath} · ${t.anchor.element.label}`:t.anchor.pagePath,subtitle:r?yD(t):void 0,actions:r?e.props.renderThreadActions?.(t):void 0,status:t.status,busy:e.props.busy,onClose:r,onCopyLink:r&&e.props.onCopyThreadLink?()=>I(t):void 0,onStatusChange:e.props.capabilities.status?e=>{k({id:t.id,status:e}).catch(()=>{})}:void 0})}function R(t,r){return n(st,{heading:L(t,r),source:t.anchor.element?.source?n(bD,{source:t.anchor.element.source}):null,links:e.props.renderThreadLinks?.(t),messagesLoaded:t.messagesLoaded,messagesTruncated:t.messagesTruncated,messageCount:t.messageCount,messages:t.messages,now:e.props.now,busy:e.props.busy,onReply:e.props.capabilities.reply?(e,n)=>k({id:t.id,body:e,parentId:n}):void 0,viewerId:e.props.viewerId,onDelete:A(t,r)},t.id)}function re(t){return e.props.renderArtboard(t,{mode:e.props.commentsUnavailable&&a===`comment`?`pan`:a,viewport:f,onLayout:e=>ee(t,e),onPick:e=>F(t,e),onWheel:(...e)=>u?.wheel(...e)})}function ie(i){if(p[i.id]&&p[i.id]!==i.path)return null;let c=e.props.snapshot.threads.filter(e=>N(e,i)&&e.status!==`resolved`).map(e=>{let n=h[i.id]?.find(t=>t.id===e.id),r=n&&n.x!==null&&n.y!==null?{x:n.x,y:n.y}:az(e.anchor,M(i));return{id:e.id,author:e.messages[0]?.author??{id:`unknown`,name:t(`canvas.canvasWorkspace.unknownAuthor`)},label:e.anchor.pagePath,status:e.status,left:r.x,top:r.y,detached:n?.match===`missing`}});return n(r,{children:[b?n(bO,{items:c,activeId:x,openId:T,scale:o,onSelect:t=>{t&&e.props.onLoadThread?.(t),y||window.matchMedia(`(max-width: 767px)`).matches?(y=!0,x=t,T=void 0):T=t,E=void 0,e.update()},renderCard:(t,r)=>n(xO,{left:t.left,top:t.top,scale:o,onClose:r,children:R(e.props.snapshot.threads.find(e=>e.id===t.id),r)})}):null,E&&D===i.id?n(`div`,{role:`dialog`,"aria-label":t(`canvas.canvasWorkspace.newComment`),class:`pointer-events-auto absolute z-30 overflow-y-auto overscroll-contain rounded-[1.25rem]`,style:{left:E.offsetX*M(i),top:E.offsetY,transform:`translate(calc(12px + var(--canvas-card-x, 0px)), calc(-8px + var(--canvas-card-y, 0px))) scale(var(--canvas-label-scale, ${1/o}))`,transformOrigin:`0 0`},mix:[l(PE),s(`pointerdown`,e=>e.stopPropagation()),s(`click`,e=>e.stopPropagation()),s(`wheel`,e=>e.stopPropagation()),s(`keydown`,e=>{e.stopPropagation(),e.key===`Escape`&&te()})],children:n(le,{busy:e.props.busy||!e.props.loaded,onCancel:te,onSubmit:async t=>{let n=new Set(e.props.snapshot.threads.map(e=>e.id));O&&await Promise.race([O,new Promise(e=>setTimeout(e,15e3))]);let r=await k({anchor:E,body:t});T=r.thread?.id??r.threads.find(e=>!n.has(e.id))?.id,E=void 0,a=`pan`,v=``,e.update()}})}):null]})}return()=>{i=e.props.width??1440;let p=T??x;p&&!e.props.snapshot.threads.find(e=>e.id===p)?.messagesLoaded&&e.queueTask(()=>{e.props.onLoadThread?.(p)});let h=e.props.initialThreadId;if(h!==C&&(C=h,S=void 0),h&&h!==S&&e.props.loaded){let t=e.props.snapshot.threads.find(e=>e.id===h);t?(S=h,x=h,e.queueTask(()=>{e.props.onLoadThread?.(h)}),y=!0,e.queueTask(()=>{let e=P(t);e&&u?.focus(e)})):w!==h&&(w=h,e.queueTask(()=>{e.props.onLoadThread?.(h)}))}let D=!_&&e.props.artboards.some(e=>!g.has(e.id));return n(`div`,{class:`@container relative flex h-full min-h-0 flex-col`,mix:l((t,n)=>{let r=setTimeout(()=>{_=!0,e.update()},oz);n.addEventListener(`abort`,()=>clearTimeout(r),{once:!0})}),children:[n(`div`,{role:`toolbar`,"aria-label":t(`canvas.canvasWorkspace.canvasTools`),class:`bud-toolbar shrink-0`,children:n(Nt,{start:n(Qe,{class:`shrink-0`,children:[e.props.onShowSidebar?n(r,{children:[n(U,{icon:`branch`,label:e.props.sidebarLabel??t(`canvas.canvasWorkspace.showSidebar`),tooltip:!0,mix:s(`click`,()=>e.props.onShowSidebar?.())}),n(Ie,{})]}):null,e.props.interactive===!1?null:n(r,{children:[n(U,{icon:`hand`,label:t(`canvas.canvasWorkspace.panCanvas`),tooltip:!0,active:a===`pan`,mix:s(`click`,()=>{a=`pan`,v=``,te()})}),n(U,{icon:`pointer`,label:t(`canvas.canvasWorkspace.interactWithPages`),tooltip:!0,active:a===`interact`,mix:s(`click`,()=>{a=`interact`,v=``,te()})})]}),e.props.onThemeChange?n(U,{icon:e.props.theme===`dark`?`sun`:`moon`,label:e.props.theme===`dark`?t(`canvas.canvasWorkspace.showLightPages`):t(`canvas.canvasWorkspace.showDarkPages`),tooltip:!0,mix:s(`click`,()=>e.props.onThemeChange?.(e.props.theme===`dark`?`light`:`dark`))}):null,e.props.onTopOnlyChange?n(U,{icon:e.props.topOnly?`unfold`:`fold`,label:e.props.topOnly?t(`canvas.canvasWorkspace.showFullPages`):t(`canvas.canvasWorkspace.showOnlyTopOfEachPage`),tooltip:!0,active:e.props.topOnly,mix:s(`click`,()=>{e.props.onTopOnlyChange?.(!e.props.topOnly),e.queueTask(()=>u?.fit())})}):null,e.props.tools?n(r,{children:[e.props.interactive===!1&&!e.props.onThemeChange&&!e.props.onTopOnlyChange?null:n(Ie,{}),e.props.tools]}):null]}),children:[n(U,{icon:`minus`,label:t(`canvas.zoomOut`),tooltip:!0,shortcut:`-`,class:`@max-md:hidden`,mix:s(`click`,()=>u?.zoom(.8))}),n(ye,{label:t(`canvas.canvasWorkspace.fitAllRoutes`),shortcut:`0`,children:n(`button`,{type:`button`,class:`bud-interaction h-control min-w-10 rounded-lg px-1`,"aria-label":t(`canvas.canvasWorkspace.fitAllRoutes`),mix:s(`click`,()=>u?.fit()),children:n(m,{variant:`ui`,children:n(`span`,{mix:l(e=>c=e),children:[Math.round(o*100),`%`]})})})}),n(U,{icon:`plus`,label:t(`canvas.zoomIn`),tooltip:!0,shortcut:`+`,class:`@max-md:hidden`,mix:s(`click`,()=>u?.zoom(1.25))}),n(U,{icon:`fit`,label:t(`canvas.fit`),tooltip:!0,shortcut:`f`,mix:s(`click`,()=>u?.fit())}),e.props.commentsUnavailable?null:n(Ie,{}),e.props.commentsUnavailable?null:n(_O,{canCreate:e.props.capabilities.create,placing:a===`comment`,pinsVisible:b,commentsOpen:y,onPlacingChange:n=>{a=n?`comment`:`pan`,b=!0,n||(E=void 0),v=n?t(`canvas.canvasWorkspace.clickAnywhereToStartConversation`):``,e.update()},onPinsVisibleChange:t=>{b=t,t||(T=void 0),e.update()},onCommentsOpenChange:t=>{y=t,T=void 0,t||(x=void 0),e.update()}}),!e.props.commentsUnavailable&&e.props.onSync&&e.props.capabilities.sync?n(U,{icon:`sync`,label:e.props.busy?t(`canvas.canvasWorkspace.savingComments`):t(`canvas.canvasWorkspace.syncComments`),tooltip:!0,disabled:e.props.busy,mix:s(`click`,()=>{e.props.onSync?.()})}):null]})}),n(`div`,{class:`relative min-h-0 flex-1`,children:[n(PO,{artboards:e.props.artboards,width:i,heights:d,loading:D,storageKey:e.props.storageKey,renderArtboard:re,renderOverlay:ie,renderLabelActions:e.props.renderArtboardActions,viewport:f,onControls:t=>{u=t,e.props.onControls?.(t)},onScale:e=>{o=e,c&&(c.textContent=`${Math.round(o*100)}%`)}}),e.props.commentsUnavailable||v?n(`div`,{role:`status`,class:`absolute top-3 left-3 max-w-[calc(100%-24px)] bud-overlay rounded-lg px-3 py-2 text-muted`,children:n(m,{variant:`ui-caption`,children:e.props.commentsUnavailable||v})}):null,y&&!e.props.commentsUnavailable?n(yO,{threads:e.props.snapshot.threads,capabilities:e.props.capabilities,renderThreadLinks:e.props.renderThreadLinks,renderThreadActions:e.props.renderThreadActions,selected:x,loaded:e.props.loaded,busy:e.props.busy,now:e.props.now,error:e.props.error,onSelect:t=>{if(x=t.id,e.props.onLoadThread?.(t.id),T=void 0,t.anchor&&`pageId`in t.anchor){let e=P(t);e&&u?.focus(e)}e.update()},onCloseThread:()=>{x=void 0,e.update()},onClose:()=>{y=!1,x=void 0,ne()},onWrite:e=>k({id:e.id,body:e.body,parentId:e.parentId,status:e.status}),viewerId:e.props.viewerId,onDelete:(e,t)=>A(e)?.(t)??Promise.resolve(),onCopyLink:e.props.onCopyThreadLink,onReload:e.props.onReload?()=>{e.props.onReload?.()}:void 0,onSync:e.props.onSync?()=>{e.props.onSync?.().catch(()=>{})}:void 0}):null,e.props.overlay]})]})}}var cz=`@new`;function lz(e){let r=!1;function i(t){r=t,e.update()}return()=>n(Me,{children:[n(F,{"aria-expanded":r,class:`bud-control flex h-control items-center gap-1.5 rounded-lg ps-2.5 pe-2 text-ink`,mix:[Ae({placement:`bottom-end`,offset:6}),Pe(),s(`click`,()=>i(!r))],children:[n(m,{variant:`ui`,children:t(`tasks.taskWorkspace.sync`)}),n(V,{name:`chevron-down`,size:14,class:`text-muted`})]}),n(`div`,{class:`bud-overlay bud-menu m-0 w-72 rounded-xl p-1 text-ink`,mix:y({open:r,onHide:()=>i(!1)}),children:[n(m,{as:`p`,variant:`ui-caption`,tone:`muted`,class:`px-2.5 pt-2 pb-1.5`,children:t(`tasks.taskWorkspace.remoteDescription`,{adapter:e.props.adapter})}),[[`pull`,`pull`,t(`tasks.taskWorkspace.pullChanges`),t(`tasks.taskWorkspace.bringRemoteWork`)],[`push`,`push`,t(`tasks.taskWorkspace.pushChanges`),t(`tasks.taskWorkspace.shareLocalChanges`)]].map(([t,r,a,o],c)=>n(F,{"aria-label":a,disabled:e.props.busy,class:`flex w-full items-start gap-2.5 rounded-lg px-2.5 py-2 text-left`,mix:[...c===0?[fe()]:[],s(`click`,()=>{i(!1),e.props.onSync(t)})],children:[n(V,{name:r,size:16,class:`mt-0.5 text-muted`}),n(`span`,{class:`flex flex-col`,children:[n(m,{variant:`ui`,weight:`medium`,children:a}),n(m,{variant:`ui-caption`,tone:`muted`,children:o})]})]},t))]})]})}function uz(e){return()=>n(`div`,{class:`sticky left-0 mx-auto flex w-full max-w-md flex-col items-center gap-3 px-4 py-16 text-center`,children:[n(`span`,{class:`flex size-10 items-center justify-center rounded-xl bg-[var(--bud-card)] text-muted ring-1 ring-[var(--bud-card-border)]`,children:n(V,{name:e.props.icon??`tasks`,size:18})}),n(m,{as:`h2`,variant:`ui`,weight:`medium`,children:e.props.title}),n(m,{as:`div`,variant:`ui`,tone:`muted`,class:`w-full text-balance`,children:e.props.children}),e.props.action]})}function dz(e){let i=new Map;try{if(e.props.storageKey){i=wt(xE(`${e.props.storageKey}:drafts`)??[]);let t=i.get(`new`);t?.revision===null&&!i.has(cz)&&(i.set(cz,t),i.delete(`new`))}}catch{}let a=!1,o=!1,u=``;function d(t,n){i.set(t,n),e.props.storageKey&&SE(`${e.props.storageKey}:drafts`,[...i].filter(([,e])=>ct(e)).slice(-25)),e.update()}function h(t,n){let r=i.get(t);return(!r||!ct(r)&&r.revision!==(n?.revision??null))&&(r=Be(e.props.schema,n),i.set(t,r)),r}async function y(n,r){let i=e.props.snapshot?.items.find(e=>e.id===n);if(i&&e.props.operations&&!o&&e.props.schema&&Mt(i,e.props.schema,`status`)!==r){o=!0,u=``,e.update();try{if(!i.revision)throw Error(t(`tasks.taskWorkspace.refreshBeforeMoving`));let a=ae(e.props.schema,`status`);if(!a?.editable)throw Error(t(`tasks.taskWorkspace.statusUnavailable`));await e.props.operations.update(n,{expectedRevision:i.revision,values:{[a.id]:r}}),Ye.success(t(`tasks.taskWorkspace.movedTo`,{id:n,status:e.props.schema.statuses.find(e=>e.value===r)?.label??et(r)}))}catch(e){u=e instanceof Error?e.message:t(`tasks.taskWorkspace.moveFailed`)}finally{o=!1,e.signal.aborted||e.update()}}}async function b(n){if(e.props.operations&&!o){o=!0,u=``,e.update();try{let r=await e.props.operations.sync({direction:n}),i=e.props.schema?.adapter.label;r.state===`complete`?Ye.success(t(n===`pull`?`tasks.taskWorkspace.pulledChanges`:`tasks.taskWorkspace.pushedChanges`,{label:i??t(`tasks.taskWorkspace.task`)})):r.state===`not-configured`?Ye(t(`tasks.taskWorkspace.noRemote`,{label:i??t(`tasks.taskWorkspace.taskLower`)}),{description:t(`tasks.taskWorkspace.configureAdapter`)}):Ye(t(`tasks.taskWorkspace.syncDisabled`,{label:i??t(`tasks.taskWorkspace.taskLower`)}))}catch(e){u=e instanceof Error?e.message:t(`tasks.taskWorkspace.syncFailed`)}finally{o=!1,e.signal.aborted||e.update()}}}let x={...He},S=!1,C=!1,T=null,E=null,D=!1,O=null,A=null,j=null;function M(){e.props.storageKey&&SE(e.props.storageKey,{version:1,view:x,scrollTop:j?.top??A?.top??E?.scrollTop??0,scrollLeft:j?.left??A?.left??E?.scrollLeft??0})}function N(t,n){x={...x,[t]:n},M(),e.update()}function P(t,n){t&&(a=!1),!e.props.selectedId&&n&&(T=n),e.props.onSelect(t)}return()=>{let{snapshot:i,schema:F,loading:ee,error:ne,noProject:I,selectedId:L,detail:R,detailLoading:re,detailError:ie,onReload:oe,onReloadDetail:se}=e.props;L&&!O&&E&&(A={top:E.scrollTop,left:E.scrollLeft}),O&&!L&&e.queueTask(()=>{A&&E?.scrollTo(A),A=null,T?.isConnected?T.focus({preventScroll:!0}):E?.focus({preventScroll:!0})}),O=L;let ce=i&&F?Ge(i,x,F):null;if(j&&!L&&i?.connection.state===`ready`){let t=j;j=null,e.queueTask(()=>E?.scrollTo(t))}let z=F?Re(F,i?.items):[],le=new Set(i?.items.filter(e=>e.ready).map(e=>e.id)??[]),ue=[x.status,x.priority,x.type,x.assignee,x.label,x.epic,...Object.values(x.fields)].filter(Boolean).length,de=JSON.stringify(x)!==JSON.stringify({...He,mode:x.mode}),fe={status:[`status`,`statuses`],priority:[`priority`,`priorities`],type:[`type`,`types`],assignee:[`assignee`,`assignees`],labels:[`label`,`labels`]},B=F&&i?F.fields.filter(e=>e.editable&&[`status`,`priority`,`enum`,`person`,`people`,`labels`].includes(e.kind)&&(e.visibility!==`hidden`||e.role===`type`)).map(e=>{let n=e.role&&e.role in fe?fe[e.role]:null,r=dt(e,i,F);return(e.kind===`person`||e.kind===`people`)&&(r=[{value:`__unassigned`,label:t(`tasks.taskWorkspace.unassigned`)},...r]),{id:e.id,key:n?.[0],label:t(`tasks.taskWorkspace.filterField`,{field:n?.[0]??e.label.toLowerCase()}),any:t(`tasks.taskWorkspace.allField`,{field:n?.[1]??e.label.toLowerCase()}),options:r}}):[];B.sort((e,t)=>(e.key?[`status`,`priority`,`type`,`assignee`,`label`].indexOf(e.key):5)-(t.key?[`status`,`priority`,`type`,`assignee`,`label`].indexOf(t.key):5));let pe=i?.items.filter(e=>e.counts.children!==void 0||e.relations.some(e=>e.direction===`in`&&F?.relations.some(t=>t.type===e.type&&t.kind===`parent`)))??[],me=e.props.design?.card??Tt,he=e.props.design?.page??ft,ge=e.props.design?.column??rt;function _e(t){let n={schema:F,itemHref:e.props.itemHref??H,onSelect:P};return{...n,operations:e.props.operations,project:e.props.project,renderField:Ct(n,t)}}let ve=t=>c(me,{..._e(t),key:t.id,item:t,schema:F,ready:le.has(t.id),blocked:ce?.blockedIds.has(t.id)??!1,done:F?vt(t,F):!1,selected:L===t.id,href:(e.props.itemHref??H)(t.id),draggable:!!e.props.operations&&!!F?.capabilities.update&&!!ae(F,`status`)?.editable&&!o&&!!t.revision,compact:x.mode===`list`,onSelect:P}),ye=ee&&!i&&!ne&&!I,be=e=>n(`div`,{class:`bud-segmented shrink-0 ${e}`,role:`group`,"aria-label":t(`tasks.taskWorkspace.readiness`),children:[`all`,`ready`,`blocked`].filter(e=>e!==`ready`||F?.capabilities.ready).map(e=>n(`button`,{type:`button`,"aria-pressed":x.readiness===e?`true`:`false`,mix:s(`click`,()=>N(`readiness`,e)),children:[n(m,{variant:`ui`,children:et(e)}),n(m,{variant:`ui-caption`,class:`tabular-nums opacity-70`,children:ce?.counts[e]??0})]},e))});return n(`section`,{"aria-label":t(`tasks.taskWorkspace.projectTasks`),class:`relative flex h-full min-h-0 flex-col`,mix:l((t,n)=>{if(D)return;D=!0;let r=window.matchMedia(`(max-width: 767px)`);C=r.matches;try{let t=e.props.storageKey&&xE(e.props.storageKey);if(t&&typeof t==`object`&&`version`in t){if(t.version===1&&`view`in t){x=lt(t.view);let{scrollTop:e,scrollLeft:n}=t;j={top:typeof e==`number`&&Number.isFinite(e)?e:0,left:typeof n==`number`&&Number.isFinite(n)?n:0}}}else C&&(x={...x,mode:`list`})}catch{C&&(x={...x,mode:`list`})}r.addEventListener(`change`,()=>{C=r.matches,e.update()},{signal:n}),t.ownerDocument.addEventListener(`keydown`,n=>{t.checkVisibility()&&n.key===`Escape`&&e.props.selectedId&&(n.preventDefault(),P(null))},{signal:n}),n.addEventListener(`abort`,M,{once:!0}),e.update()}),children:ye?n(v,{label:t(`tasks.taskWorkspace.loadingTasks`)}):n(r,{children:[n(`div`,{class:`flex min-h-0 flex-1 flex-col`,hidden:L?!0:void 0,children:[n(`header`,{class:`flex shrink-0 flex-col`,children:[n(Nt,{divider:!1,start:n(r,{children:[n(`div`,{class:`flex shrink-0 items-center gap-2 ps-2 pe-2`,children:[n(Je,{items:[{label:t(`screens.tasks`)}]}),i?.connection.state===`ready`?n(m,{variant:`ui`,tone:`muted`,class:`truncate max-xl:hidden`,children:[i.items.length,F?.capabilities.ready?` · ${t(`tasks.taskWorkspace.readyCount`,{count:ce?.counts.ready??0})}`:``]}):null]}),n(HD,{label:t(`tasks.taskWorkspace.searchTasks`),placeholder:t(`tasks.taskWorkspace.searchPlaceholder`),value:x.query,class:`w-40 shrink-0 lg:w-48 xl:w-72`,mix:s(`input`,e=>N(`query`,e.currentTarget.value))}),be(`max-md:hidden`)]}),children:n(`div`,{class:`flex shrink-0 items-center gap-2`,children:[be(`md:hidden`),n(`span`,{class:`relative flex shrink-0`,children:[n(U,{tooltip:!0,icon:`filter`,label:t(`tasks.taskWorkspace.filters`),active:S,"aria-expanded":S,"aria-controls":`bud-task-filters`,mix:s(`click`,()=>{S=!S,e.update()})}),ue?n(m,{variant:`ui-caption`,weight:`medium`,"aria-label":t(`tasks.taskWorkspace.activeFilters`,{count:ue}),class:`pointer-events-none absolute -end-0.5 -top-0.5 min-w-4 rounded-full bg-ink px-1 text-center text-[10px]/4 text-[var(--bud-background)] tabular-nums`,children:ue}):null]}),[{key:`sort`,icon:`sort`,label:t(`tasks.taskWorkspace.sortTasks`),options:[{value:`priority`,label:t(`tasks.taskWorkspace.priority`)},{value:`updated`,label:t(`tasks.taskWorkspace.recentlyUpdated`)},{value:`created`,label:t(`tasks.taskWorkspace.newestFirst`)},{value:`title`,label:t(`tasks.taskWorkspace.title`)}]},{key:`group`,icon:`layers`,label:t(`tasks.taskWorkspace.groupTasks`),options:[{value:`none`,label:t(`tasks.taskWorkspace.noGrouping`)},{value:`epic`,label:t(`tasks.taskWorkspace.byEpic`)}]}].map(e=>n(te,{headless:!0,label:e.label,title:t(`tasks.taskWorkspace.menuTitle`,{label:e.label,value:e.options.find(t=>t.value===x[e.key])?.label??``}),value:x[e.key],options:e.options,placement:`bottom-end`,class:`bud-interaction flex size-control shrink-0 items-center justify-center rounded-lg`,onChange:t=>e.key===`sort`?N(`sort`,t):N(`group`,t),children:n(V,{name:e.icon,size:16})},e.key)),n(`div`,{class:`bud-segmented`,role:`group`,"aria-label":t(`tasks.taskWorkspace.taskLayout`),children:[[`board`,`board`,t(`tasks.taskWorkspace.boardView`)],[`list`,`list`,t(`tasks.taskWorkspace.listView`)]].map(([e,t,r])=>n(`button`,{type:`button`,"aria-label":r,title:r,"aria-pressed":x.mode===e?`true`:`false`,mix:s(`click`,()=>N(`mode`,e)),children:n(V,{name:t,size:15})},e))}),n(Ie,{}),n(U,{tooltip:!0,icon:`sync`,label:t(`tasks.taskWorkspace.refreshTasks`),disabled:ee||I,mix:s(`click`,oe)}),e.props.operations&&i?.connection.state===`ready`?n(r,{children:[F?.capabilities.sync?n(lz,{adapter:F.adapter.label,busy:o,onSync:e=>{b(e)}}):null,F?.capabilities.create?n(f,{disabled:o,mix:s(`click`,()=>{a=!0,P(null),T=document.activeElement,e.update()}),children:[n(V,{name:`plus`,size:16}),n(`span`,{class:`max-sm:sr-only`,children:t(`tasks.taskWorkspace.newTask`)})]}):null]}):null]})}),n(`div`,{class:`flex flex-col gap-3 px-4 pt-3 empty:hidden`,children:[S?n(`div`,{id:`bud-task-filters`,class:`grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6`,role:`group`,"aria-label":t(`tasks.taskWorkspace.taskFilters`),children:[B.map(e=>n(te,{label:e.label,value:e.key?x[e.key]:x.fields[e.id]??``,class:`w-full`,search:e.options.length>8,options:[{value:``,label:e.any},...e.options],onChange:t=>e.key?N(e.key,t):N(`fields`,{...x.fields,[e.id]:t})},e.id)),n(te,{label:t(`tasks.taskWorkspace.filterEpic`),value:x.epic,class:`w-full`,search:pe.length>8,options:[{value:``,label:t(`tasks.taskWorkspace.allEpics`)},...pe.map(e=>({value:e.id,label:Mt(e,F,`title`)||e.id}))],onChange:e=>N(`epic`,e)})]}):null,i?.connection.state===`ready`&&ce&&(de||o)?n(`div`,{class:`flex min-h-5 flex-wrap items-center gap-x-3 gap-y-1`,children:[de?n(r,{children:[n(m,{variant:`ui-caption`,tone:`muted`,role:`status`,children:[t(`tasks.taskWorkspace.showingCount`,{shown:ce.issues.length,total:i.items.length}),i.truncated?` · ${t(`tasks.taskWorkspace.limitedResults`)}`:``]}),n(f,{variant:`secondary`,size:`small`,mix:s(`click`,()=>{x={...He,mode:x.mode},M(),e.update()}),children:t(`tasks.taskWorkspace.resetView`)})]}):null,o?n(m,{variant:`ui-caption`,tone:`muted`,role:`status`,class:`sm:ms-auto`,children:t(`tasks.taskWorkspace.saving`)}):null]}):null,u?n(m,{as:`p`,variant:`ui`,role:`alert`,class:`rounded-lg bg-[var(--bud-card)] px-3 py-2 text-red-600 ring-1 ring-[var(--bud-card-border)] dark:text-red-400`,children:u}):null]})]}),n(`div`,{tabindex:-1,class:`flex min-h-0 flex-1 flex-col gap-6 overflow-auto overscroll-contain px-4 pt-4 pb-6 outline-none`,"aria-label":t(`tasks.taskWorkspace.taskResults`),"aria-busy":ee?`true`:`false`,mix:[l(e=>{E=e}),w(`y`),s(`scroll`,M)],children:[ne?n(uz,{title:t(`tasks.taskWorkspace.loadFailed`),icon:`circle-alert`,action:n(f,{mix:s(`click`,oe),children:t(`tasks.taskWorkspace.tryAgain`)}),children:n(`span`,{role:`alert`,children:ne})}):null,I?n(uz,{title:t(`tasks.taskWorkspace.connectProject`),icon:`tasks`,children:[n(m,{as:`p`,variant:`ui`,children:t(`tasks.taskWorkspace.startBud`)}),n(m,{as:`pre`,variant:`code`,class:`mt-3 overflow-auto rounded-lg bg-[var(--bud-card)] p-3 text-left text-ink ring-1 ring-[var(--bud-card-border)]`,children:`npx @bud.sh/app`}),n(m,{as:`p`,variant:`ui`,class:`mt-3`,children:t(`tasks.taskWorkspace.addPlugin`)})]}):i&&i.connection.state!==`ready`?n(uz,{icon:i.connection.state===`not-initialized`?`inbox`:`warning`,title:i.connection.state===`not-initialized`?t(`tasks.taskWorkspace.noWorkspace`,{label:F?.adapter.label??t(`tasks.taskWorkspace.taskLower`)}):i.connection.state===`unavailable`?t(`tasks.taskWorkspace.connectAdapter`,{label:F?.adapter.label??t(`tasks.taskWorkspace.anAdapter`)}):t(`tasks.taskWorkspace.updateAdapter`,{label:F?.adapter.label??t(`tasks.taskWorkspace.taskLower`)}),children:[n(m,{as:`p`,variant:`ui`,children:i.connection.message}),n(m,{as:`p`,variant:`ui`,class:`mt-3`,children:t(`tasks.taskWorkspace.configureWorkspace`)})]}):null,i?.connection.state===`ready`&&ce?ce.issues.length===0?n(uz,{icon:i.items.length?`search`:`inbox`,title:i.items.length?t(`tasks.taskWorkspace.noMatches`):t(`tasks.taskWorkspace.boardEmpty`),children:i.items.length?t(`tasks.taskWorkspace.tryDifferentSearch`):t(`tasks.taskWorkspace.createToPlan`)}):ce.groups.map(e=>n(`section`,{class:`min-w-0`,"aria-label":e.title,children:[x.group===`epic`&&x.mode===`board`?n(`div`,{class:`sticky left-0 mb-3 flex items-center gap-2 text-muted`,children:[n(V,{name:`layers`,size:14}),n(m,{as:`h3`,variant:`ui`,weight:`medium`,class:`text-ink`,children:e.title}),n(m,{variant:`ui-caption`,class:`tabular-nums`,children:e.issues.length})]}):null,x.mode===`list`||!z.length?n(_,{children:[n(g,{title:e.title,headingLevel:3,metadata:n(m,{variant:`ui-caption`,tone:`muted`,class:`tabular-nums`,children:e.issues.length})}),n(p,{flush:!0,children:n(`div`,{class:`flex w-full min-w-0 flex-col gap-px p-1`,children:e.issues.map(ve)})})]}):n(`div`,{class:`flex items-start gap-3`,children:z.filter(e=>!x.status||x.status===e.value).map(r=>{let i=e.issues.filter(e=>Mt(e,F,`status`)===r.value);return n(`section`,{class:`flex flex-col gap-2 ${i.length?`min-w-60 max-w-sm flex-1 basis-0`:`w-32 shrink-0`}`,"aria-label":t(`tasks.taskWorkspace.statusColumn`,{status:r.label}),mix:[s(`dragover`,e=>{e.dataTransfer?.types.includes(`application/x-bud-task`)&&!o&&r.value&&(e.preventDefault(),e.dataTransfer.dropEffect=`move`)}),s(`drop`,e=>{let t=e.dataTransfer?.getData(`application/x-bud-task`);t&&r.value&&(e.preventDefault(),y(t,r.value))})],children:n(ge,{..._e(null),item:null,status:r,items:i,children:i.map(ve)})},r.value)})})]},e.id)):null]})]}),a&&F&&e.props.operations&&i?.connection.state===`ready`?n(k,{label:t(`tasks.taskWorkspace.createTask`),size:`large`,onClose:()=>{a=!1,e.update()},children:n(mt,{snapshot:i,schema:F,operations:e.props.operations,draft:h(cz),onDraft:e=>d(cz,e),onClose:()=>{a=!1,e.queueTask(()=>T?.focus()),e.update()},onSaved:t=>{d(cz,Be(F)),a=!1,P(t.id),e.update()}})}):null,L&&F?c(he,{..._e(R?.item.id===L?R.item:null),item:R?.item.id===L?R.item:null,design:e.props.design,key:L,snapshot:i,schema:F,discussion:e.props.discussion,operations:e.props.operations,draft:R?.item.id===L?h(L,R.item):void 0,onDraft:e=>d(L,e),id:L,itemHref:e.props.itemHref??H,detail:R?.item.id===L?R:null,loading:re,error:ie,onSelect:P,onReload:se}):null]})})}}function fz(e){return()=>{let{item:r,context:i,expanded:a,onAction:o,mutable:c,selectionCount:u=1}=e.props,d=r.kind===`directory`?[{name:`toggle`,label:t(a?`files.fileTreeMenu.collapseFolder`:`files.fileTreeMenu.expandFolder`)},{name:`copy-path`,label:t(`files.fileTreeMenu.copyRelativePath`)}]:[{name:`open`,label:t(`files.fileTreeMenu.openFile`)},{name:`copy-path`,label:t(`files.fileTreeMenu.copyRelativePath`)},{name:`copy-link`,label:t(`files.fileTreeMenu.copyFileLink`)}];return c&&d.push({name:`new-file`,label:t(`files.fileTreeMenu.newFile`)},{name:`new-folder`,label:t(`files.fileTreeMenu.newFolder`)},{name:`rename`,label:t(`files.fileTreeMenu.rename`)},{name:`move`,label:t(`files.fileTreeMenu.moveItems`,{count:u})},{name:`duplicate`,label:t(`files.fileTreeMenu.duplicateItems`,{count:u})},{name:`delete`,label:t(`files.fileTreeMenu.deleteItems`,{count:u})}),n(xe,{label:t(`files.fileTreeMenu.actionsFor`,{name:r.name}),children:n(`div`,{class:`${pe} outline-none`,mix:[N(),l(e=>{queueMicrotask(()=>{e.isConnected&&e.focus()})}),re(e=>{let t=e.item.name;i.close({restoreFocus:t!==`rename`}),o(t)}),s(`keydown`,e=>{(e.key===`Escape`||e.key===`Tab`)&&(e.preventDefault(),i.close())})],children:d.map(e=>n(`div`,{class:ie,mix:De({name:e.name,label:e.label}),children:n(m,{variant:`ui`,children:e.label})},e.name))})})}}function pz(e){let n=[...new Set(e.map(e=>_e(e.replace(/\/$/,``))))].sort((e,t)=>e.length-t.length||e.localeCompare(t)),r=[];for(let e of n)r.some(t=>e.startsWith(`${t}/`))||r.push(e);if(!r.length||r.length>100)throw TypeError(t(`files.fileActions.selectBetween1And100`));return r}function mz(e,t){let n=t?_e(t.replace(/\/$/,``)):``;return pz(e).map(e=>({path:e,destination:_e(`${n?`${n}/`:``}${e.split(`/`).at(-1)}`)}))}function hz(e,n,r){let i=e.lastIndexOf(`/`),a=e.slice(0,i+1),o=e.slice(i+1),s=r?-1:o.lastIndexOf(`.`),c=s>0?o.slice(0,s):o,l=s>0?o.slice(s):``;for(let e=1;e<=1e3;e++){let t=`${a}${c} copy${e>1?` ${e}`:``}${l}`;if(!n.has(t.normalize(`NFC`).toLowerCase()))return t}throw TypeError(t(`files.fileActions.chooseAvailableDestination`))}function gz(e,t){if(e.action===`create-file`||e.action===`create-folder`)return e.directory?`${e.directory}/`:``;if(e.entries?.length===1)return e.entries[0].destination;if(e.paths.length!==1)return e.directory??``;let n=e.paths[0];return e.action===`duplicate`?hz(n,new Set(t?.entries.map(e=>e.path.normalize(`NFC`).toLowerCase())),t?.entries.find(e=>e.path===n)?.kind===`directory`):n}function _z(e,t,n){if(e.action===`create-file`)return Ke({kind:`create-file`,path:t,contents:``});if(e.action===`create-folder`)return Ke({kind:`create-folder`,path:t});if(e.action===`restore`)return Ke({kind:`restore`,recoveryId:e.recoveryId});let r=pz(e.paths);if(e.action===`delete`)return Ke({kind:`delete`,paths:r});let i=(e.entries?.length===1?[{...e.entries[0],destination:t}]:e.entries)??(r.length===1?[{path:r[0],destination:t}]:mz(r,t));if(e.action===`duplicate`&&r.length>1&&!e.entries){let e=new Set(n?.entries.map(e=>e.path.normalize(`NFC`).toLowerCase()));i=i.map(t=>{let r=hz(t.destination,e,n?.entries.find(e=>e.path===t.path)?.kind===`directory`);return e.add(r.normalize(`NFC`).toLowerCase()),{path:t.path,destination:r}})}return Ke({kind:e.action===`duplicate`?`duplicate`:`move`,entries:i})}function vz(e,t,n){let r=n.items.filter(e=>e.status===`applied`),i=t===`move`?r.filter(e=>e.source&&e.destination):[],a=t===`delete`?r.flatMap(e=>e.source??[]):[],o=e=>{if(a.some(t=>e===t||e.startsWith(`${t}/`)))return null;let t=i.find(t=>e===t.source||e.startsWith(`${t.source}/`));return t?`${t.destination}${e.slice(t.source.length)}`:e},s=e=>[...new Set(e.flatMap(e=>o(e)??[]))],c=[`create-file`,`duplicate`,`restore`].includes(t)?r.find(e=>e.kind===`file`&&e.destination)?.destination:null,l=c??(e.selected?o(e.selected):null),u=r.flatMap(e=>{let t=e.destination;if(!t)return[];let n=t.split(`/`),r=n.length-(e.kind===`directory`?0:1);return n.slice(0,r).map((e,t)=>n.slice(0,t+1).join(`/`))});return{...e,selected:l,search:``,filter:`all`,showDotfiles:!0,selection:c?[c]:s(e.selection),expanded:[...new Set([...s(e.expanded),...u])].slice(0,4096),recent:[...new Set([...l?[l]:[],...s(e.recent)])].slice(0,20)}}function yz(e,t){let n=t.items.filter(e=>e.status!==`applied`);return n.length?e.kind===`move`||e.kind===`duplicate`?Ke({kind:e.kind,entries:n.map(e=>({path:e.source,destination:e.destination}))}):e.kind===`delete`?Ke({kind:`delete`,paths:n.map(e=>e.source)}):e:null}var bz={"--trees-bg-override":`var(--bud-editor)`,"--trees-fg-override":`var(--bud-foreground)`,"--trees-fg-muted-override":`var(--bud-muted)`,"--trees-bg-muted-override":`var(--bud-hover)`,"--trees-input-bg-override":`var(--bud-control)`,"--trees-border-color-override":`var(--bud-border)`,"--trees-indent-guide-bg-override":`var(--bud-border)`,"--trees-font-family-override":`var(--bud-font-sans)`,"--trees-font-size-override":`13px`,"--trees-padding-inline-override":`8px`,"--trees-selected-bg-override":`var(--bud-control-active)`,"--trees-selected-fg-override":`var(--bud-foreground)`,"--trees-selected-focused-border-color-override":`var(--bud-muted)`,"--trees-focus-ring-color-override":`var(--bud-muted)`},xz={set:`complete`,colored:!0},Sz=`[data-item-contains-git-change="true"] > [data-item-section="content"] {
1571
1571
  color: var(--trees-git-modified-color);
1572
1572
  }
1573
1573
  [data-item-contains-git-change="true"] > [data-item-section="git"] {