@aiquants/directory-tree 6.1.2 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -10
- package/dist/DirectoryTree.d.ts +1 -1
- package/dist/DirectoryTreeGrid.d.ts +4 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1466 -1041
- package/dist/styles/directory-tree.standalone.css +1 -1
- package/dist/useEntryInteraction.d.ts +6 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -138,7 +138,7 @@ The main component for rendering the directory tree.
|
|
|
138
138
|
| Prop | Type | Required | Default | Description |
|
|
139
139
|
| --- | --- | --- | --- | --- |
|
|
140
140
|
| `onEntryClick` | `(event: DirectoryTreeClickEvent) => void` | Yes | - | Callback function triggered when an entry is clicked |
|
|
141
|
-
| `selectedPath` | `string \| null` | No | - | The currently selected file path (highlighted with `data-entry-selected`).
|
|
141
|
+
| `selectedPath` | `string \| null` | No | - | The currently selected file path (highlighted with `data-entry-selected`). The selected row is also where the tree's Tab stop starts, in classic and grid mode alike — see [Keyboard and focus](#keyboard-and-focus) |
|
|
142
142
|
| `currentPath` | `string \| null` | No | - | The entry the host shows as current (for example the open document). Its row carries `aria-current="page"` in every selection mode, so assistive technology can tell the shown entry from the selected set in multiple selection. The tree draws no style for it; style `[aria-current="page"]` yourself |
|
|
143
143
|
| `mode` | `'none' \| 'single' \| 'multiple'` | No | `'none'` | Selection mode for items |
|
|
144
144
|
| `selectedItems` | `Set<string>` | No | - | Set of paths for currently selected items |
|
|
@@ -152,7 +152,7 @@ The main component for rendering the directory tree.
|
|
|
152
152
|
| `style` | `React.CSSProperties` | No | - | Optional inline styles for the container |
|
|
153
153
|
| `lineColor` | `string` | No | `'#71829b'` (`DEFAULT_LINE_COLOR`) | The colour of the connector lines and the expand glyphs drawn with them, on a canvas above the rows: any colour a canvas reads, one value for both schemes (a canvas cannot resolve `light-dark()`). The default keeps 3.5:1 or more on every ground a row can show in both schemes. See [Colours and color-scheme](#colours-and-color-scheme) |
|
|
154
154
|
| `showTreeLines` | `boolean` | No | `true` | Flag indicating whether to render tree connector lines |
|
|
155
|
-
| `showExpandIcons` | `boolean` | No | `true` | Flag indicating whether to render directory expand icons |
|
|
155
|
+
| `showExpandIcons` | `boolean` | No | `true` | Flag indicating whether to render directory expand icons. It also governs the glyphs drawn on the tree-line canvas while `showTreeLines` is `true`: with `false` no directory draws a glyph, the lines run through a directory row as they run through a file row (a last directory child ends in the same elbow as a last file), and the expand box keeps its column, so every line stays where it was |
|
|
156
156
|
| `showDirectoryIcons` | `boolean` | No | `true` | Flag indicating whether to render directory type icons |
|
|
157
157
|
| `showFileIcons` | `boolean` | No | `true` | Flag indicating whether to render file type icons |
|
|
158
158
|
| `iconOverrides` | `DirectoryTreeIconOverrides` | No | - | Icon overrides applied globally |
|
|
@@ -180,7 +180,7 @@ The main component for rendering the directory tree.
|
|
|
180
180
|
|
|
181
181
|
- `overscanCount`: Adjust how many items render beyond the viewport for smoother scrolling (default: `15`).
|
|
182
182
|
- `scrollBarOptions`: Configure scrollbar appearance and behavior (width, thumb drag, track click, arrow buttons, tap scroll circle).
|
|
183
|
-
A host that drives the
|
|
183
|
+
A host that drives the tree from the keyboard (classic or grid mode) can pass `enableArrowButtonTabStops: false` to make the scrollbar and the
|
|
184
184
|
Top/Bottom buttons pointer-only: the tree's own arrow keys, Home and End keep the focused row in view. In grid mode the option
|
|
185
185
|
reaches the vertical scrollbar and the Top/Bottom buttons only; the horizontal scrollbar of the numeric columns keeps its arrow
|
|
186
186
|
buttons as Tab stops, because it is the only keyboard path to the columns scrolled out of view.
|
|
@@ -233,7 +233,9 @@ Example:
|
|
|
233
233
|
|
|
234
234
|
### Keyboard and focus
|
|
235
235
|
|
|
236
|
-
The
|
|
236
|
+
The tree follows the WAI-ARIA tree pattern (grid mode: the treegrid pattern with focus on rows) with a roving tabindex:
|
|
237
|
+
it always has exactly one Tab stop. Grid mode has the same keyboard model as the classic tree; only the roles differ
|
|
238
|
+
(`treegrid` / `row` instead of `tree` / `treeitem`).
|
|
237
239
|
|
|
238
240
|
- **Where Tab enters**: the row that last received focus — while it still holds focus, or while the selection has not
|
|
239
241
|
changed since it received focus — else the selected row (`selection.selectedPath`), else the first row. A candidate
|
|
@@ -248,7 +250,9 @@ The classic tree follows the WAI-ARIA tree pattern with a roving tabindex: it al
|
|
|
248
250
|
collapsed folder or moves to its first child (an open folder without child rows keeps the focus), `ArrowLeft` closes
|
|
249
251
|
an open folder or moves to the parent, `Enter` and `Space` activate the row once per press (the auto-repeat of a held
|
|
250
252
|
key only has its default action prevented, so a held key never flips a folder or a gathered entry back and forth).
|
|
251
|
-
|
|
253
|
+
Activation does what a click does — `selection.onEntryClick`, and the selection toggle of a file in a selection
|
|
254
|
+
mode — except that a folder opens or closes at once: a click waits 500 ms to tell a single click from a double click
|
|
255
|
+
(which expands the folder recursively), and a key press has no double press to wait for.
|
|
252
256
|
- **Keys with Alt, Ctrl or ⌘ are not the tree's**: an arrow key, `Home` or `End` held with Alt, Ctrl or Meta (⌘) is
|
|
253
257
|
neither handled nor has its default action prevented, so the browser's history keys (Alt+Left / Alt+Right,
|
|
254
258
|
⌘+Left / ⌘+Right) and a host's own shortcuts on them (for example Alt+Shift+Arrow) work while a row has focus.
|
|
@@ -263,9 +267,11 @@ The classic tree follows the WAI-ARIA tree pattern with a roving tabindex: it al
|
|
|
263
267
|
double-click hit the same row. A row that gets focus back because the window or browser tab became active again is not
|
|
264
268
|
scrolled: focus never left it, and the browser does not scroll there either.
|
|
265
269
|
- **Rows outside the render window**: when the Tab stop row is virtualized away, a visually hidden stand-in Tab stop
|
|
266
|
-
(`data-directory-tree-tab-stop`, outside `role="tree"`) takes its place in the Tab order; when it receives focus it
|
|
270
|
+
(`data-directory-tree-tab-stop`, outside `role="tree"` in classic mode) takes its place in the Tab order; when it receives focus it
|
|
267
271
|
scrolls the Tab stop row into view and hands the focus to it. A host that hands focus to the tree by selector should
|
|
268
|
-
look for `[role="tree"] [role="treeitem"][tabindex="0"]`
|
|
272
|
+
look for `[role="tree"] [role="treeitem"][tabindex="0"]` (grid mode: `[role="treegrid"] [role="row"][tabindex="0"]`)
|
|
273
|
+
and then `[data-directory-tree-tab-stop]`. Only the Tab stop row carries `tabindex="0"`; every other row carries
|
|
274
|
+
`tabindex="-1"`, so a selector for `tabindex="0"` finds that one row, not every row. The stand-in
|
|
269
275
|
appears in the render that follows the one where the Tab stop row left the render window (the tree measures that
|
|
270
276
|
in its own layout effect), so look it up after that commit, not in a layout effect of the same commit.
|
|
271
277
|
|
|
@@ -274,9 +280,9 @@ content element, which owns only the rows: the scrollbar, the Top/Bottom buttons
|
|
|
274
280
|
(`virtualScroll.liveRegion`) stay outside the tree, and the wrappers between the tree and its rows carry no role,
|
|
275
281
|
tabindex or ARIA attribute. The root container has no role; target it through `visual.className`.
|
|
276
282
|
|
|
277
|
-
Grid mode (`grid`) differs
|
|
278
|
-
|
|
279
|
-
the
|
|
283
|
+
Grid mode (`grid`) differs in structure only: `role="treegrid"` sits on the root container, so the vertical and
|
|
284
|
+
horizontal scrollbars, the live region and the stand-in Tab stop are inside the treegrid. The stand-in stands just before
|
|
285
|
+
the rowgroup of the body rows (outside every rowgroup), at the rows' place in the Tab order.
|
|
280
286
|
|
|
281
287
|
### Scroll handle (`ref`)
|
|
282
288
|
|
package/dist/DirectoryTree.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { directoryTreeClasses } from "./entryRendering.tsx";
|
|
2
2
|
import { TreeLineLayout } from "./rowSizing.ts";
|
|
3
3
|
import { DirectoryTreeProps, TreeLineGeometry, TreeLineItemInfo } from "./types.ts";
|
|
4
|
-
export declare const buildTreeLineGeometry: (items: TreeLineItemInfo[], itemHeights: number[], itemOffsets: number[], layout: TreeLineLayout) => TreeLineGeometry;
|
|
4
|
+
export declare const buildTreeLineGeometry: (items: TreeLineItemInfo[], itemHeights: number[], itemOffsets: number[], layout: TreeLineLayout, showExpandGlyphs: boolean) => TreeLineGeometry;
|
|
5
5
|
export declare const DirectoryTree: ({ entries, expansion: { toggle, isExpanded, expandMultiple, collapseMultiple, isPending, alwaysExpanded, doubleClickAction }, selection: { onEntryClick, selectedPath, currentPath, mode: selectionMode, selectedItems, onSelectionChange }, visual: { className, style, ariaLabel, ariaLabelledBy, lineColor, showTreeLines, showExpandIcons, showDirectoryIcons, showFileIcons, iconOverrides, expandIconSize, typeIconSize, fontSize, indentSize, itemHeight, removeRootIndent, highlightStyles, entryClassName, entryStyle, nameClassName, nameStyle, directoryNameClassName, directoryNameStyle, fileNameClassName, fileNameStyle, expandIconClassName, expandIconStyle, }, virtualScroll: virtualScrollOptions, grid, sort, locale, labels, ref, }: DirectoryTreeProps) => import("react").JSX.Element;
|
|
6
6
|
export { directoryTreeClasses };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { KeyboardEvent } from "react";
|
|
1
2
|
import { DirectoryTreeExpandIconStyle } from "./hostStyle.ts";
|
|
2
3
|
import { DirectoryEntry, DirectoryTreeColumn, DirectoryTreeIconOverrides, HighlightStyles } from "./types.ts";
|
|
3
4
|
export type GridRowVisual = {
|
|
@@ -22,6 +23,9 @@ export type DirectoryTreeGridRowProps = {
|
|
|
22
23
|
setSize: number;
|
|
23
24
|
rowIndex: number;
|
|
24
25
|
flatIndex: number;
|
|
26
|
+
isActive: boolean;
|
|
27
|
+
registerRowRef: (index: number, node: HTMLDivElement | null) => void;
|
|
28
|
+
onNavigationKeyDown: (event: KeyboardEvent<HTMLDivElement>, index: number) => void;
|
|
25
29
|
onRowFocus: (index: number, path: string, row: HTMLElement) => void;
|
|
26
30
|
onRowBlur: (path: string, row: HTMLElement) => void;
|
|
27
31
|
isSelectedForAria: boolean;
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),ce=require("@aiquants/virtualscroll"),s=require("react"),B=require("tailwind-merge"),ne=require("@phosphor-icons/react");function ar(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ae=ar(s);function lr({title:e,titleId:t,...n},r){return ae.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?ae.createElement("title",{id:t},e):null,ae.createElement("path",{fillRule:"evenodd",d:"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",clipRule:"evenodd"}))}const ir=ae.forwardRef(lr);function cr({title:e,titleId:t,...n},r){return ae.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?ae.createElement("title",{id:t},e):null,ae.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))}const dr=ae.forwardRef(cr);function ur({title:e,titleId:t,...n},r){return ae.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?ae.createElement("title",{id:t},e):null,ae.createElement("path",{d:"M19.5 21a3 3 0 0 0 3-3v-4.5a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3V18a3 3 0 0 0 3 3h15ZM1.5 10.146V6a3 3 0 0 1 3-3h5.379a2.25 2.25 0 0 1 1.59.659l2.122 2.121c.14.141.331.22.53.22H19.5a3 3 0 0 1 3 3v1.146A4.483 4.483 0 0 0 19.5 9h-15a4.483 4.483 0 0 0-3 1.146Z"}))}const fr=ae.forwardRef(ur),kn={icon:{light:"#6a7282",dark:"#99a1af"},iconSelected:{light:"#1447e6",dark:"#51a2ff"},checkedRing:{light:"#155dfc",dark:"#51a2ff"}},hr={markdown:{light:"#0084d1",dark:"#00bcff"},pdf:{light:"#e7000b",dark:"#ff6467"},spreadsheet:{light:"#007a55",dark:"#00d492"},csv:{light:"#007a55",dark:"#00d492"},document:{light:"#155dfc",dark:"#51a2ff"},presentation:{light:"#ca3500",dark:"#ff8904"},image:{light:"#00786f",dark:"#00d5be"},audio:{light:"#e60076",dark:"#fb64b6"},video:{light:"#7f22fe",dark:"#a684ff"},archive:{light:"#bb4d00",dark:"#ffb900"},code:{light:"#9810fa",dark:"#c27aff"},text:kn.icon},Nn="#71829b",re={rowHover:"hover:bg-[color:light-dark(#f3f4f6,#1e2939)]",rowSelected:"bg-[color:light-dark(#eff6ff,#162456)]",checkedRing:"inset-ring-1 inset-ring-[color:light-dark(#155dfc,#51a2ff)]",name:"text-[color:light-dark(#364153,#e5e7eb)]",nameSelected:"text-[color:light-dark(#193cb8,#bedbff)]",gridEdge:"text-[color:light-dark(#4a5565,#d1d5dc)]",icon:"text-[color:light-dark(#6a7282,#99a1af)]",iconSelected:"text-[color:light-dark(#1447e6,#51a2ff)]"},se={markdown:"text-[color:light-dark(#0084d1,#00bcff)]",pdf:"text-[color:light-dark(#e7000b,#ff6467)]",spreadsheet:"text-[color:light-dark(#007a55,#00d492)]",csv:"text-[color:light-dark(#007a55,#00d492)]",document:"text-[color:light-dark(#155dfc,#51a2ff)]",presentation:"text-[color:light-dark(#ca3500,#ff8904)]",image:"text-[color:light-dark(#00786f,#00d5be)]",audio:"text-[color:light-dark(#e60076,#fb64b6)]",video:"text-[color:light-dark(#7f22fe,#a684ff)]",archive:"text-[color:light-dark(#bb4d00,#ffb900)]",code:"text-[color:light-dark(#9810fa,#c27aff)]",text:"text-[color:light-dark(#6a7282,#99a1af)]"},Ln="text-[length:var(--dt-font-size-body,0.8125rem)]",mr=`${Ln} leading-[max(var(--dt-line-height-body,1.25rem),1.5em)]`,Ct=44,pr=12,yr=8,oe=14,gr=14,Pn=e=>e===void 0?void 0:{fontSize:typeof e=="number"?`${e}px`:e},q=e=>({width:e,height:e}),P={container:"directory-tree-container relative h-full overflow-y-hidden pb-[3px] pr-[2px]",containerPending:"cursor-progress",entry:`directory-tree-entry flex items-center cursor-pointer relative select-none ${mr}`,entryHover:`directory-tree-entry--hover ${re.rowHover}`,entrySelected:`directory-tree-entry--selected ${re.rowSelected}`,entryItemSelected:`directory-tree-entry--item-selected ${re.rowSelected} ${re.checkedRing}`,expandIcon:`directory-tree-expand-icon flex-shrink-0 flex items-center justify-center ${re.icon}`,expandIconSelected:`directory-tree-expand-icon--selected ${re.iconSelected}`,typeIcon:`directory-tree-type-icon flex-shrink-0 flex items-center justify-center ${re.icon}`,typeIconSelected:`directory-tree-type-icon--selected ${re.iconSelected}`,name:`directory-tree-name overflow-hidden text-ellipsis whitespace-nowrap ml-1 ${Ln} font-normal ${re.name}`,nameDirectory:"directory-tree-name--directory font-medium",nameSelected:`directory-tree-name--selected font-semibold ${re.nameSelected}`},Mt=e=>{const t=e.slice(e.lastIndexOf("/")+1),n=t.lastIndexOf(".");return n<=0?"":t.slice(n+1).toLowerCase()},br=/^[a-z][a-z\d+.-]*:\/\//i,bn=e=>Mt(br.test(e)?e.split(/[?#]/,1)[0]:e),Tn=e=>Mt(e.name)||bn(e.relativePath)||bn(e.absolutePath),On=({isDirectory:e,isExpanded:t,showExpandIcons:n,useCanvasExpandIcons:r,expandIconSize:a})=>{const i=a?{width:a,height:a}:void 0,l=a?"":"h-4 w-4";return!(n&&e)||r?d.jsx("span",{className:l,style:i,"aria-hidden":"true"}):t?d.jsx(ir,{className:l,style:i}):d.jsx(dr,{className:l,style:i})},Nt=(e,t)=>{if(e==null||typeof e=="boolean")return null;if(typeof e=="function")return console.warn(`[DirectoryTree] Function returned by renderer for "${t}". Return a node.`),null;if(typeof e=="object"){if("then"in e)return console.warn(`[DirectoryTree] Promise returned for "${t}". Not supported.`),null;if(Array.isArray(e)){const r=e.map(a=>Nt(a,t)).filter(Boolean);return r.length?r:null}const n=e.type;if(n&&n.$$typeof===Symbol.for("react.lazy"))return console.warn(`[DirectoryTree] Lazy component for "${t}". Not supported.`),null}return e},Sr={markdown:e=>d.jsx(ne.FileMd,{className:se.markdown,style:q(e)}),pdf:e=>d.jsx(ne.FilePdf,{className:se.pdf,style:q(e)}),spreadsheet:e=>d.jsx(ne.FileXls,{className:se.spreadsheet,style:q(e)}),csv:e=>d.jsx(ne.FileCsv,{className:se.csv,style:q(e)}),document:e=>d.jsx(ne.FileDoc,{className:se.document,style:q(e)}),presentation:e=>d.jsx(ne.FilePpt,{className:se.presentation,style:q(e)}),image:e=>d.jsx(ne.FileImage,{className:se.image,style:q(e)}),audio:e=>d.jsx(ne.FileAudio,{className:se.audio,style:q(e)}),video:e=>d.jsx(ne.FileVideo,{className:se.video,style:q(e)}),archive:e=>d.jsx(ne.FileZip,{className:se.archive,style:q(e)}),code:e=>d.jsx(ne.FileCode,{className:se.code,style:q(e)}),text:e=>d.jsx(ne.FileText,{className:se.text,style:q(e)})},wr={markdown:["md","markdown","mdx"],pdf:["pdf"],spreadsheet:["xls","xlsx","xlsm","xlsb","ods"],csv:["csv","tsv"],document:["doc","docx","rtf","odt"],presentation:["ppt","pptx","odp"],image:["png","jpg","jpeg","gif","svg","webp","ico","bmp","tiff","avif"],audio:["mp3","wav","ogg","m4a","flac","aac","wma"],video:["mp4","webm","mov","avi","mkv","wmv","flv"],archive:["zip","tar","gz","7z","rar","tgz","bz2"],code:["js","mjs","cjs","ts","tsx","jsx","json","html","htm","css","scss","py","go","rs","c","cpp","h","hpp","sh","bash","yaml","yml","sql","xml","toml"],text:["txt","log"]},vr=new Map(Object.entries(wr).flatMap(([e,t])=>t.map(n=>[n,e]))),xr=new Set(["","application/octet-stream","binary/octet-stream","text/plain","application/x-empty"]),Er=e=>(e??"").split(";",1)[0].trim().toLowerCase(),Ir=e=>{if(e==="text/markdown"||e==="text/x-markdown")return"markdown";if(e==="application/pdf")return"pdf";if(e.includes("excel")||e.includes("spreadsheet"))return"spreadsheet";if(e==="text/csv"||e==="text/tab-separated-values")return"csv";if(e.includes("word")||e.includes("google-apps.document")||e==="application/rtf")return"document";if(e.includes("powerpoint")||e.includes("presentation"))return"presentation";if(e.startsWith("image/"))return"image";if(e.startsWith("audio/"))return"audio";if(e.startsWith("video/"))return"video";if(e.includes("zip")||e.includes("tar")||e.includes("compressed")||e.includes("archive"))return"archive";if(e==="application/json"||e.includes("javascript")||e.includes("typescript")||e.includes("xml")||e.startsWith("text/html")||e.startsWith("text/css")||e.includes("x-python")||e.includes("x-sh")||e.includes("x-go")||e.includes("x-rust"))return"code";if(e.startsWith("text/"))return"text"},Rr=(e,t,n,r)=>{const a=Er(e),i=Ir(a),l=vr.get((t||(n?Mt(n):"")).toLowerCase()),f=(xr.has(a)?[l,i]:[i,l]).find(g=>g!==void 0);return f===void 0?d.jsx(ne.FileIcon,{className:re.icon,style:q(r)}):Sr[f](r)},Mn=(e,t,n)=>{const{entry:r,isDirectory:a,isExpanded:i,extension:l,mimeType:u}=e;let f;const g=u||r.mimeType;return r.icon!==void 0?f=r.icon:a?f=i&&t?.directoryExpanded||t?.directory||d.jsx(fr,{style:q(n)}):l&&t?.fileByExtension?.[l]?f=t.fileByExtension[l]:f=t?.file||Rr(g,l,r.name,n),Nt(typeof f=="function"?f(e):f,r.absolutePath)},Cr=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_n=e=>{if(!e)return;const t=Object.entries(e).filter(([,n])=>n!=null);if(t.length!==0)return Object.fromEntries(t.map(([n,r])=>[`data-${Cr(n)}`,String(r)]))},jn=["color","background","backgroundColor","backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundClip","backgroundOrigin","backgroundAttachment","backgroundBlendMode","opacity","boxShadow","filter","backdropFilter","mixBlendMode","borderColor","borderRadius","outline","outlineColor","outlineStyle","outlineWidth","outlineOffset","textShadow","accentColor","caretColor","cursor","fontFamily","fontSize","fontStyle","fontWeight","fontVariant","fontFeatureSettings","fontVariationSettings","fontKerning","letterSpacing","lineHeight","textDecoration","textDecorationColor","textDecorationLine","textDecorationStyle","textDecorationThickness","textUnderlineOffset","textTransform"],An=["color","opacity"],kr="the row's box belongs to the tree (height: visual.itemHeight, indent: visual.indentSize, icons: visual.typeIconSize, text size: visual.fontSize)",Nr=new Set(jn),Lr=new Set(An),Sn=(e,t)=>{const n=t===void 0?e.option:`${e.option}.${t}`;return e.absolutePath===void 0?n:`${n} of "${e.absolutePath}"`},Dn=(e,t,n,r)=>{if(e!==void 0){if(typeof e!="object"||e===null)throw new RangeError(`${Sn(n,void 0)} must be an object of CSS properties or undefined, got ${e===null?"null":typeof e}.`);for(const[a,i]of Object.entries(e))if(i!==void 0&&!t.has(a))throw new RangeError(`${Sn(n,a)} cannot be set: ${kr}, so ${r}.`)}},He=(e,t)=>Dn(e,Nr,t,"a row style accepts only paint and text properties (ROW_STYLE_PROPERTIES)"),Pr=(e,t)=>Dn(e,Lr,t,"the expand icon style accepts only the glyph's colour and opacity (EXPAND_ICON_STYLE_PROPERTIES), and the 14 px expand box is the tree's"),Tr=500,zn=({entry:e,isDirectory:t,isExpanded:n,isItemSelected:r,selectionMode:a,onSelectionChange:i,onEntryClick:l,toggleDirectory:u,onToggleDirectoryRecursive:f})=>{const g=s.useRef(null);return s.useEffect(()=>()=>{g.current&&window.clearTimeout(g.current)},[]),s.useCallback(R=>{R.stopPropagation(),a!=="none"&&!t&&i&&i(e,!r);let x=!1;l({entry:e,isDirectory:t,isExpanded:n,preventDefault:()=>{x=!0}}),!(!t||x)&&(g.current?(window.clearTimeout(g.current),g.current=null,f(e)):g.current=window.setTimeout(()=>{u(e.absolutePath),g.current=null},Tr))},[t,e,n,f,u,l,a,i,r])},Fn=e=>e==="right"?"dt-grid-cell--right":e==="center"?"dt-grid-cell--center":"",wn=(e,t)=>e.children!==void 0&&t(e.absolutePath),$n=(e,t)=>({width:e,gridTemplateColumns:t}),Bn=s.memo(({entry:e,indentLevel:t,positionInSet:n,setSize:r,rowIndex:a,flatIndex:i,onRowFocus:l,onRowBlur:u,isSelectedForAria:f,rowHeight:g,isDirOpen:R,columns:x,numericTemplate:C,numericTotal:m,nameWidth:p,rowClassName:h,selection:{onEntryClick:w,selectedPath:S,currentPath:j,mode:I="none",selectedItems:k,onSelectionChange:y},expansion:{toggleDirectory:T,onToggleDirectoryRecursive:O},visual:{iconOverrides:L,showExpandIcons:le=!0,showDirectoryIcons:X=!0,showFileIcons:D=!0,useCanvasExpandIcons:K=!1,expandIconSize:ge,typeIconSize:F,fontSize:de,indentSize:be,highlightStyles:U,expandIconClassName:J,expandIconStyle:Oe}})=>{He(e.style,{option:"entry.style",absolutePath:e.absolutePath});const[Ie,Re]=s.useState(!1),M=e.children!==void 0,Q=M&&R(e.absolutePath),z=e.absolutePath===S,We=e.absolutePath===j,E=!M&&!!k?.has(e.absolutePath),Me=M?void 0:Tn(e),Se=zn({entry:e,isDirectory:M,isExpanded:Q,isItemSelected:E,selectionMode:I,onSelectionChange:y,onEntryClick:w,toggleDirectory:T,onToggleDirectoryRecursive:O}),Ce=Ie?U?.hoverClassName!==void 0?U.hoverClassName:P.entryHover:"",_e=(()=>{if(M){if(z)return U?.directorySelectedClassName!==void 0?U.directorySelectedClassName:P.entrySelected}else if(z||E)return U?.itemSelectedClassName!==void 0?U.itemSelectedClassName:B.twMerge(z&&P.entrySelected,E&&P.entryItemSelected);return""})(),N=typeof h=="function"?h(e):h,ue=B.twMerge("dt-grid-row cursor-pointer select-none",Ce,_e,N,e.className),H=B.twMerge(P.expandIcon,J,(z||E)&&P.expandIconSelected),je=B.twMerge(P.typeIcon,(z||E)&&P.typeIconSelected),Z=B.twMerge("dt-grid-name-label ml-1",re.name,M&&P.nameDirectory,(z||E)&&P.nameSelected),Y=On({isDirectory:M,isExpanded:Q,showExpandIcons:le,useCanvasExpandIcons:K,expandIconSize:ge}),ee=(M?X:D)?Mn({entry:e,isDirectory:M,isExpanded:Q,isSelected:z,isItemSelected:E,extension:Me,mimeType:e.mimeType},L,F):null,we={indentLevel:t,isDirectory:M,isExpanded:Q},[he,...ke]=x,me=he?.render?he.render(e,we):e.label??e.name,Ke={...Ie?U?.hoverStyle:{},...M&&z?U?.directorySelectedStyle:{},...!M&&(z||E)?U?.itemSelectedStyle:{}};return d.jsxs("div",{className:ue,style:{...Ke,...e.style,height:g},role:"row","aria-expanded":M?Q:void 0,"aria-level":t+1,"aria-posinset":n,"aria-setsize":r,"aria-rowindex":a,"aria-selected":I==="none"?void 0:f,"aria-current":We?"page":void 0,..._n(e.data),"data-entry-type":M?"directory":"file","data-entry-expanded":M?String(Q):void 0,"data-entry-selected":z?"true":void 0,"data-entry-item-selected":E?"true":void 0,onClick:Se,onMouseEnter:()=>Re(!0),onMouseLeave:()=>Re(!1),onFocus:A=>l(i,e.absolutePath,A.currentTarget),onBlur:A=>u(e.absolutePath,A.currentTarget),onKeyDown:A=>{if(A.key==="Enter"){if(A.repeat){A.preventDefault();return}Se(A)}},tabIndex:0,children:[d.jsxs("div",{className:B.twMerge("dt-grid-name-cell",he?.className),role:"gridcell",style:{width:p,paddingLeft:Math.max(0,t*be)},children:[(le||K)&&d.jsx("span",{className:H,style:{...Oe,width:oe,height:oe},children:Y}),(M?X:D)&&d.jsx("span",{className:je,style:{width:F,height:F},children:ee}),d.jsx("span",{className:Z,style:Pn(de),children:me})]}),ke.length>0&&d.jsx("div",{className:"dt-grid-numeric-viewport",children:d.jsx("div",{className:"dt-grid-numeric-track",style:$n(m,C),children:ke.map(A=>d.jsx("div",{className:B.twMerge("dt-grid-cell",Fn(A.align),A.className),role:"gridcell",children:A.render?A.render(e,we):null},A.key))})})]})},(e,t)=>{if(e.entry!==t.entry)return!1;const n=wn(e.entry,e.isDirOpen),r=wn(t.entry,t.isDirOpen);return e.indentLevel===t.indentLevel&&e.positionInSet===t.positionInSet&&e.setSize===t.setSize&&e.rowIndex===t.rowIndex&&e.flatIndex===t.flatIndex&&e.isSelectedForAria===t.isSelectedForAria&&e.rowHeight===t.rowHeight&&n===r&&e.columns===t.columns&&e.numericTemplate===t.numericTemplate&&e.numericTotal===t.numericTotal&&e.nameWidth===t.nameWidth&&e.rowClassName===t.rowClassName&&e.selection.selectedPath===t.selection.selectedPath&&e.selection.currentPath===t.selection.currentPath&&e.selection.mode===t.selection.mode&&e.selection.selectedItems===t.selection.selectedItems&&e.visual===t.visual});Bn.displayName="DirectoryTreeGridRow";const Hn=({kind:e,columns:t,numericTemplate:n,numericTotal:r,nameWidth:a,scrollBarWidth:i,className:l,nameContent:u,renderCell:f})=>{const[,...g]=t,R=e==="header"?"dt-grid-name-header":"dt-grid-name-footer",x=e==="header"?"dt-grid-header":"dt-grid-footer",C=e==="header"?"columnheader":"gridcell";return d.jsxs("div",{className:B.twMerge(x,re.gridEdge,l),role:"row",children:[d.jsx("div",{className:B.twMerge(R,"px-1",t[0]?.className),role:C,style:{width:a},children:u}),g.length>0&&d.jsx("div",{className:"dt-grid-numeric-viewport",children:d.jsx("div",{className:"dt-grid-numeric-track",style:$n(r,n),children:g.map(m=>d.jsx("div",{className:B.twMerge("dt-grid-cell",Fn(m.align),m.className),role:C,children:f(m)},m.key))})}),d.jsx("div",{className:"dt-grid-scrollbar-spacer",style:{width:i},"aria-hidden":"true"})]})},Or=({columns:e,className:t,...n})=>d.jsx(Hn,{kind:"header",columns:e,className:t,nameContent:e[0]?.header??null,renderCell:r=>r.header??null,...n}),vn=(e,t)=>typeof e=="function"?e(t):e??null,Mr=({columns:e,allEntries:t,className:n,...r})=>d.jsx(Hn,{kind:"footer",columns:e,className:n,nameContent:vn(e[0]?.footer,t),renderCell:a=>vn(a.footer,t),...r}),_r=240,Wn=96,Kn=12,Lt=(e,t)=>{const n=e?.width;return typeof n=="number"&&Number.isFinite(n)&&n>0?n:t},jr=e=>e.slice(1).map(t=>`${Lt(t,Wn)}px`).join(" "),Ar=({measuredWidth:e,columns:t,scrollBarWidth:n=Kn})=>{const r=Lt(t[0],_r),a=t.slice(1).reduce((f,g)=>f+Lt(g,Wn),0),i=Number.isFinite(e)&&e>0?e:0,l=Math.max(0,i-r-Math.max(0,n)),u=Math.max(0,a-l);return{nameWidth:r,numericTotal:a,numericVisible:l,maxHScroll:u}},kt=(e,t)=>!Number.isFinite(e)||e<0?0:e>t?t:e,Dr=e=>{const t=[],n=r=>{for(const a of r)t.push(a),a.children&&a.children.length>0&&n(a.children)};return n(e),t},Yn=["entryKindDirectory","entryKindFile"],Pt=[...ce.VIRTUAL_SCROLL_LABEL_KEYS,...Yn],Tt=Object.freeze({en:Object.freeze({entryKindDirectory:"directory",entryKindFile:"file"}),ja:Object.freeze({entryKindDirectory:"ディレクトリ",entryKindFile:"ファイル"})}),Gn=Object.freeze({en:Object.freeze({...ce.VIRTUAL_SCROLL_LABEL_CATALOGS.en,...Tt.en}),ja:Object.freeze({...ce.VIRTUAL_SCROLL_LABEL_CATALOGS.ja,...Tt.ja})}),xn=e=>typeof e=="string"?JSON.stringify(e):e===null?"null":typeof e,zr=e=>{const t={};let n=!1;for(const r of ce.VIRTUAL_SCROLL_LABEL_KEYS){const a=Object.hasOwn(e,r)?e[r]:void 0;a!==void 0&&(t[r]=a,n=!0)}return n?t:void 0},Vn=(e,t)=>{const n=ce.resolveVirtualScrollLocale(e);if(t===void 0)return Gn[n];if(t===null||typeof t!="object")throw new RangeError(`[directory-tree] labels must be an object; got ${xn(t)}`);const r=Object.getPrototypeOf(t);if(r!==Object.prototype&&r!==null)throw new RangeError(`[directory-tree] labels must be a plain object (prototype Object.prototype or null); got ${Array.isArray(t)?"an array":"an object with a non-plain prototype"}`);for(const l of Object.keys(t))if(!Pt.includes(l))throw new RangeError(`[directory-tree] labels.${l} is not a known label key; expected one of ${Pt.join(", ")}`);const i={...ce.resolveVirtualScrollLabels(n,zr(t)),...Tt[n]};for(const l of Yn){const u=Object.hasOwn(t,l)?t[l]:void 0;if(u!==void 0){if(typeof u!="string"||u.trim()==="")throw new RangeError(`[directory-tree] labels.${l} must be a non-blank string; got ${xn(u)}`);i[l]=u}}return Object.freeze(i)},Fr=e=>{const t={};for(const n of ce.VIRTUAL_SCROLL_LABEL_KEYS)t[n]=e[n];return Object.freeze(t)},$r=()=>{let e=null;return{mark:t=>{const n=t.composedPath();e=n,setTimeout(()=>{e===n&&(e=null)},0)},landedOn:t=>e?.includes(t)===!0}},Je=e=>typeof e=="string"?JSON.stringify(e):String(e),Ot=(e,t)=>{if(typeof t!="number"||!Number.isFinite(t)||t<=0)throw new RangeError(`[directory-tree] visual.${e} must be a finite number greater than 0 (px); got ${Je(t)}.`);return t},Br=e=>{if(typeof e=="string"&&e.trim()!==""||typeof e=="number"&&Number.isFinite(e)&&e>0)return e;throw new RangeError(`[directory-tree] visual.fontSize must be a finite number greater than 0 (px) or a CSS font size that is not blank; got ${Je(e)}.`)},Hr=({indentSize:e,typeIconSize:t,fontSize:n})=>({indentSize:e===void 0?pr:Ot("indentSize",e),typeIconSize:t===void 0?gr:Ot("typeIconSize",t),fontSize:n===void 0?void 0:Br(n)}),Wr=({indentSize:e,removeRootIndent:t,hasExpandBox:n})=>t?Math.max(0,e-(n?oe:0)):0,Kr=(e,t,n)=>{if(typeof e!="function")return Ot("itemHeight",e);const r=e(t,n);if(typeof r!="number"||!Number.isFinite(r)||r<=0)throw new RangeError(`[directory-tree] visual.itemHeight returned ${Je(r)} for ${JSON.stringify(t.absolutePath)} (row ${n}); it must return a finite number greater than 0 (px).`);return r},Yr=(e,t,n)=>{const r=t===void 0?yr:t;if(typeof r!="number"||!Number.isFinite(r)||r<=0||r>oe)throw new RangeError(`[directory-tree] visual.expandIconSize must be a finite number greater than 0 and at most ${oe} (the expand box, px) while tree lines are drawn; got ${Je(r)}.`);const{indentSize:a,typeIconSize:i}=e,l=r/2,u=oe+i-r/2;if(a<l||a>u)throw new RangeError(`[directory-tree] visual.indentSize ${Je(a)} does not fit the tree lines: with typeIconSize ${i} and an expand glyph of ${r} px it must be from ${l} (half the glyph) to ${u} (the ${oe} px expand box + typeIconSize − half the glyph).`);return{indentSize:a,typeIconSize:i,glyphSize:r,originX:n}},Gr=({indentSize:e,typeIconSize:t,glyphSize:n})=>Math.min(Math.max(oe+t/2-e,n/2),oe-n/2),Vr=(e,t)=>{const n=e.length-1;if(n<=0)return 0;let r=0,a=n-1,i=0;for(;r<=a;){const l=r+a>>>1;e[l]<=t?(i=l,r=l+1):a=l-1}return i},Xr=(e,t,n)=>{if(n<=0||e.length===0||t.length!==e.length+1)return null;const r=Vr(t,n),a=e[r];return a?{path:a.entry.absolutePath,offsetInViewport:n-t[r]}:null},Ur=(e,t,n)=>{if(t.length===0||n.length!==t.length+1)return null;for(let r=0;r<t.length;r++)if(t[r].entry.absolutePath===e.path)return Math.max(0,n[r]+e.offsetInViewport);return null},Jr=(e,t,n)=>{const r=[];for(let a=t;a<n;a++){const i=e[a];if(!(!i||i.length===0))for(const l of i)r.push(l)}return r},Zr=(e,t,n)=>{const r=[];for(let a=t;a<n;a++){const i=e[a];if(!(!i||i.length===0))for(const l of i)r.push(l)}return r},qr=(e,t,n,r)=>{const a=Math.max(1,Math.floor(t*r)),i=Math.max(1,Math.floor(n*r));(e.width!==a||e.height!==i)&&(e.width=a,e.height=i);const l=e.style;l.width!==`${t}px`&&(l.width=`${t}px`),l.height!==`${n}px`&&(l.height=`${n}px`)},Qr=(e,t,n)=>{e.lineWidth=n,e.beginPath();for(const r of t)e.moveTo(r.x1,r.y1),e.lineTo(r.x2,r.y2);e.stroke()},eo=(e,t,n,r)=>{if(t.length===0)return;const a=e.strokeStyle,i=e.lineWidth,l=e.lineCap,u=e.lineJoin;e.strokeStyle=n,e.lineCap="round",e.lineJoin="round";for(const f of t){const g=r??f.size,R=Math.max(0,g/2),x=Math.max(1,Math.round(g*.08)),C=Math.max(1,Math.round(g*.14)),m=Math.max(0,R-x*.8),p=Math.max(0,m*.55);e.lineWidth=x,e.beginPath(),e.arc(f.centerX,f.centerY,Math.max(0,R-x*.3),0,Math.PI*2),e.stroke(),e.lineWidth=C,e.beginPath(),e.moveTo(f.centerX-p,f.centerY),e.lineTo(f.centerX+p,f.centerY),e.stroke(),f.isExpanded||(e.beginPath(),e.moveTo(f.centerX,f.centerY-p),e.lineTo(f.centerX,f.centerY+p),e.stroke())}e.strokeStyle=a,e.lineWidth=i,e.lineCap=l,e.lineJoin=u},Xn=s.memo(({segmentsByItem:e,glyphsByItem:t,itemHeight:n,width:r,viewportHeight:a,scrollPosition:i,color:l=Nn,strokeWidth:u=1,renderStartIndex:f,renderEndIndex:g,lookaheadEndIndex:R,devicePixelRatio:x,expandGlyphColor:C,expandGlyphSize:m})=>{const p=s.useRef(null),h=s.useRef(null),w=s.useRef({segmentsByItem:e,glyphsByItem:t,itemHeight:n,width:r,viewportHeight:a,scrollPosition:i,color:l,strokeWidth:u,renderStartIndex:f,renderEndIndex:g,lookaheadEndIndex:R,devicePixelRatio:x,expandGlyphColor:C,expandGlyphSize:m}),S=s.useCallback(()=>{h.current=null;const I=p.current;if(!I)return;const k=I.getContext("2d");if(!k)return;const y=w.current;if(y.width<=0||y.viewportHeight<=0){k.clearRect(0,0,I.width,I.height);return}const T=Number.isFinite(y.devicePixelRatio??NaN)?y.devicePixelRatio:typeof window<"u"&&window.devicePixelRatio||1;qr(I,y.width,y.viewportHeight,T);const O=y.segmentsByItem.length,L=typeof y.renderStartIndex=="number"&&Number.isFinite(y.renderStartIndex)?Math.max(0,Math.floor(y.renderStartIndex)):Math.max(0,Math.floor(y.scrollPosition/y.itemHeight)),le=Math.min(O,Math.ceil((y.scrollPosition+y.viewportHeight)/y.itemHeight)),X=(()=>{if(typeof y.renderEndIndex=="number"&&Number.isFinite(y.renderEndIndex)){const F=Math.floor(y.renderEndIndex);return Math.max(Math.min(O,F+1),L)}return Math.max(le,L)})(),D=(()=>{if(typeof y.lookaheadEndIndex=="number"&&Number.isFinite(y.lookaheadEndIndex)){const F=Math.floor(y.lookaheadEndIndex),de=Math.min(O,F+1);return Math.max(de,X)}return Math.max(le,X)})(),K=Jr(y.segmentsByItem,L,D),ge=Zr(y.glyphsByItem,L,D);k.save(),k.scale(T,T),k.clearRect(0,0,y.width,y.viewportHeight),k.translate(0,-y.scrollPosition),k.strokeStyle=y.color,Qr(k,K,y.strokeWidth),eo(k,ge,y.expandGlyphColor??y.color,y.expandGlyphSize),k.restore()},[]),j=s.useCallback(()=>{h.current===null&&(h.current=window.requestAnimationFrame(S))},[S]);return s.useEffect(()=>{w.current={segmentsByItem:e,glyphsByItem:t,itemHeight:n,width:r,viewportHeight:a,scrollPosition:i,color:l,strokeWidth:u,renderStartIndex:f,renderEndIndex:g,lookaheadEndIndex:R,devicePixelRatio:x,expandGlyphColor:C,expandGlyphSize:m},j()},[e,t,n,r,a,i,l,u,f,g,R,x,C,m,j]),s.useEffect(()=>()=>{h.current!==null&&(window.cancelAnimationFrame(h.current),h.current=null)},[]),d.jsx("canvas",{ref:p,className:"pointer-events-none absolute top-0 left-0 z-0"})});Xn.displayName="TreeLineCanvas";const to=e=>{const t=new Map;for(let n=0;n<e.length;n++){const r=e[n].entry.absolutePath;t.has(r)||t.set(r,n)}return t},En=(e,t)=>e.selectedPath===t?e:{selectedPath:t,selectionGeneration:e.selectionGeneration+1,anchor:e.anchor},no=(e,t)=>({...e,anchor:{path:t,selectionGeneration:e.selectionGeneration,focused:!0}}),ro=(e,t)=>{const{anchor:n,selectionGeneration:r,selectedPath:a}=t;if(n!==null&&(n.focused||n.selectionGeneration===r)){const i=e.get(n.path);if(i!==void 0)return i}if(a!==null){const i=e.get(a);if(i!==void 0)return i}return 0},oo={msOverflowStyle:"none",scrollbarWidth:"none"},so=()=>{let e=document.getElementById("directory-tree-webkit-scrollbar-hide");e||(e=document.createElement("style"),e.id="directory-tree-webkit-scrollbar-hide",e.textContent=".directory-tree-container::-webkit-scrollbar { display: none; }",document.head.appendChild(e))},ao=()=>()=>{},lo=()=>!0,io=()=>!1,co=e=>{const t=s.useRef(null),n=t.current;return n!==null&&ce.VIRTUAL_SCROLL_LABEL_KEYS.every(r=>n[r]===e[r])?n:(t.current=e,e)},In=new Set(["top","bottom","center","nearest"]),Rn=e=>{const t=e?.align;if(t===void 0)return"top";if(!In.has(t))throw new RangeError(`[directory-tree] Unsupported scroll alignment ${JSON.stringify(t)}; expected one of ${[...In].join(", ")}.`);return t},uo={position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap"},fo=(e,t,n,r,a)=>{const i=[],l=[];let u=0;const f=(g,R,x)=>{const C=a?[...g].sort(a):g;for(let m=0;m<C.length;m++){const p=C[m],h=m===C.length-1,w=[...x,h],S=p.children!==void 0,j=S&&t(p.absolutePath,p.relativePath);let I=R,k=x;r&&(I=R-1,k=x.slice(1)),i.push({entry:p,indentLevel:I,depth:R,positionInSet:m+1,setSize:C.length}),n&&(I>u&&(u=I),l.push({id:p.absolutePath,name:p.name,absolutePath:p.absolutePath,indentLevel:I,isLastChild:h,isDirectory:S,isExpanded:j,ancestorIsLast:[...k],hideLines:r&&R===0})),S&&j&&p.children&&f(p.children,R+1,w)}};return f(e,0,[]),{flatItems:i,lineItems:l,maxIndent:u}},Cn=(e,t)=>{const n=e.length-1;if(n<=0)return 0;let r=0,a=n-1,i=0;for(;r<=a;){const l=r+a>>>1;e[l]<=t?(i=l,r=l+1):a=l-1}return i},ho=(e,t,n,r,a,i)=>{const l=r?.renderStart??Math.max(0,Cn(i,a)),u=t>0?Cn(i,a+t)+n:l+n,f=e>0?Math.min(e-1,Math.max(l,u)):l,g=r?.renderEnd??f,R=e>0?Math.min(e-1,g+n):g;return{renderStart:l,renderEnd:g,lookaheadEnd:R}},mo=(e,t,n,r)=>{if(e.length===0)return{segmentsByItem:[],glyphsByItem:[]};const{indentSize:a,typeIconSize:i,glyphSize:l,originX:u}=r,f=Array.from({length:e.length},()=>[]),g=Array.from({length:e.length},()=>[]),R=u+Gr(r),x=m=>m*a+R,C=l/2+2;for(let m=0;m<e.length;m++){const p=e[m],h=t[m]??0,w=n[m]??0,S=w+h/2,j=e[m+1],I=S+i/2,k=w+h,y=j!==void 0&&j.indentLevel===p.indentLevel+1&&I<k?{key:`${p.id}-connector-children`,x1:x(j.indentLevel),y1:I,x2:x(j.indentLevel),y2:k,itemIndex:m}:null;if(p.hideLines){y!==null&&(f[m]=[y]);continue}const T=[];for(let L=0;L<p.indentLevel;L++){if(p.ancestorIsLast[L]??!1)continue;let X=!1;for(let D=m;D<e.length;D++){const K=e[D];if(K.indentLevel>L&&K.ancestorIsLast.length>L&&!K.ancestorIsLast[L]){X=!0;break}if(D>m&&K.indentLevel===L)break}if(X){const D=x(L);T.push({key:`${p.id}-ancestor-${L}`,x1:D,y1:w,x2:D,y2:w+h,itemIndex:m})}}const O=x(p.indentLevel);m>0&&T.push({key:`${p.id}-connector-top`,x1:O,y1:w,x2:O,y2:p.isDirectory?S-C:S,itemIndex:m}),!p.isDirectory&&p.isLastChild&&T.push({key:`${p.id}-connector-horizontal`,x1:O,y1:S,x2:u+p.indentLevel*a+oe,y2:S,itemIndex:m}),p.isLastChild||(p.isDirectory?T.push({key:`${p.id}-connector-bottom`,x1:O,y1:S+C,x2:O,y2:w+h,itemIndex:m}):T.push({key:`${p.id}-connector-bottom`,x1:O,y1:S,x2:O,y2:w+h,itemIndex:m})),y!==null&&T.push(y),f[m]=T,p.isDirectory&&(g[m]=[{key:`${p.id}-glyph`,itemIndex:m,centerX:O,centerY:S,size:l,isExpanded:p.isExpanded}])}return{segmentsByItem:f,glyphsByItem:g}},Un=s.memo(({entry:e,indentLevel:t,originX:n,depth:r,positionInSet:a,setSize:i,isSelectedForAria:l,flatIndex:u,isActive:f,registerRowRef:g,onNavigationKeyDown:R,onRowFocus:x,onRowBlur:C,rowHeight:m,entryKindDirectory:p,entryKindFile:h,isDirOpen:w,expansion:{toggleDirectory:S,onToggleDirectoryRecursive:j},selection:{onEntryClick:I,selectedPath:k,currentPath:y,mode:T="none",selectedItems:O,onSelectionChange:L},visual:{iconOverrides:le,showExpandIcons:X=!0,showDirectoryIcons:D=!0,showFileIcons:K=!0,useCanvasExpandIcons:ge=!1,expandIconSize:F,typeIconSize:de,fontSize:be,indentSize:U,highlightStyles:J,entryClassName:Oe,entryStyle:Ie,nameClassName:Re,nameStyle:M,directoryNameClassName:Q,directoryNameStyle:z,fileNameClassName:We,fileNameStyle:E,expandIconClassName:Me,expandIconStyle:Se}})=>{He(e.style,{option:"entry.style",absolutePath:e.absolutePath});const[Ce,_e]=s.useState(!1),N=e.children!==void 0,ue=N&&w(e.absolutePath),H=e.absolutePath===k,je=e.absolutePath===y,Z=!N&&O?.has(e.absolutePath),Y=s.useCallback(G=>g(u,G),[g,u]),ee=N?void 0:Tn(e),we=zn({entry:e,isDirectory:N,isExpanded:ue,isItemSelected:!!Z,selectionMode:T,onSelectionChange:L,onEntryClick:I,toggleDirectory:S,onToggleDirectoryRecursive:j}),he=Ce?J?.hoverClassName!==void 0?J.hoverClassName:P.entryHover:"",ke=(()=>{if(N){if(H)return J?.directorySelectedClassName!==void 0?J.directorySelectedClassName:P.entrySelected}else if(H||Z)return J?.itemSelectedClassName!==void 0?J.itemSelectedClassName:B.twMerge(H&&P.entrySelected,Z&&P.entryItemSelected);return""})(),me=B.twMerge(P.entry,he,ke,Oe,e.className),Ke=B.twMerge(P.expandIcon,Me,(H||Z)&&P.expandIconSelected),A=B.twMerge(P.typeIcon,(H||Z)&&P.typeIconSelected),Ze=B.twMerge(P.name,Re,N&&P.nameDirectory,N&&Q,!N&&We,(H||Z)&&P.nameSelected),ct=On({isDirectory:N,isExpanded:ue,showExpandIcons:X&&t>=0,useCanvasExpandIcons:ge,expandIconSize:F}),Ye=(N?D:K)?Mn({entry:e,isDirectory:N,isExpanded:ue,isSelected:H,isItemSelected:!!Z,extension:ee,mimeType:e.mimeType},le,de):null,Ge={...Ce?J?.hoverStyle:{},...N&&H?J?.directorySelectedStyle:{},...!N&&(H||Z)?J?.itemSelectedStyle:{}},qe=_n(e.data),dt={width:de,height:de},Ne=Pn(be),ve=n+t*U;return d.jsxs("div",{className:me,style:{...Ne,...Ge,...Ie,...e.style,paddingLeft:`${Math.max(0,ve)}px`,transform:ve<0?`translateX(${ve}px)`:void 0,width:ve<0?`calc(100% + ${-ve}px)`:void 0,height:`${m}px`},...qe,"data-entry-type":N?"directory":"file","data-entry-expanded":N?String(ue):void 0,"data-entry-selected":H?"true":void 0,"data-entry-item-selected":Z?"true":void 0,onClick:we,onMouseEnter:()=>_e(!0),onMouseLeave:()=>_e(!1),onFocus:G=>x(u,e.absolutePath,G.currentTarget),onBlur:G=>C(e.absolutePath,G.currentTarget),ref:Y,onKeyDown:G=>{if(G.key==="Enter"||G.key===" "){G.preventDefault(),G.repeat||we(G);return}R(G,u)},tabIndex:f?0:-1,role:"treeitem","aria-expanded":N?ue:void 0,"aria-level":r+1,"aria-posinset":a,"aria-setsize":i,"aria-selected":T==="none"?void 0:l,"aria-current":je?"page":void 0,"aria-label":`${e.name} (${N?p:h})`,children:[(X||ge)&&d.jsx("span",{className:Ke,style:{...Se,width:oe,height:oe},children:ct}),(N?D:K)&&d.jsx("span",{className:A,style:dt,children:Ye}),d.jsx("span",{className:Ze,style:{...Ne,...M,...N?z:E},"data-entry-type":N?"directory":"file","data-entry-role":"name",children:e.label??e.name})]})},(e,t)=>{if(e.entry!==t.entry)return!1;const n=e.entry.children!==void 0,r=t.entry.children!==void 0,a=n&&e.isDirOpen(e.entry.absolutePath),i=r&&t.isDirOpen(t.entry.absolutePath);return e.indentLevel===t.indentLevel&&e.originX===t.originX&&e.depth===t.depth&&e.positionInSet===t.positionInSet&&e.setSize===t.setSize&&e.isSelectedForAria===t.isSelectedForAria&&e.flatIndex===t.flatIndex&&e.isActive===t.isActive&&e.rowHeight===t.rowHeight&&e.entryKindDirectory===t.entryKindDirectory&&e.entryKindFile===t.entryKindFile&&a===i&&e.selection.selectedPath===t.selection.selectedPath&&e.selection.currentPath===t.selection.currentPath&&e.selection.mode===t.selection.mode&&e.selection.selectedItems===t.selection.selectedItems&&e.visual.iconOverrides===t.visual.iconOverrides&&e.visual.showExpandIcons===t.visual.showExpandIcons&&e.visual.showDirectoryIcons===t.visual.showDirectoryIcons&&e.visual.showFileIcons===t.visual.showFileIcons&&e.visual.useCanvasExpandIcons===t.visual.useCanvasExpandIcons&&e.visual.expandIconSize===t.visual.expandIconSize&&e.visual.typeIconSize===t.visual.typeIconSize&&e.visual.fontSize===t.visual.fontSize&&e.visual.indentSize===t.visual.indentSize&&e.visual.highlightStyles===t.visual.highlightStyles&&e.visual.entryClassName===t.visual.entryClassName&&e.visual.entryStyle===t.visual.entryStyle&&e.visual.nameClassName===t.visual.nameClassName&&e.visual.nameStyle===t.visual.nameStyle&&e.visual.directoryNameClassName===t.visual.directoryNameClassName&&e.visual.directoryNameStyle===t.visual.directoryNameStyle&&e.visual.fileNameClassName===t.visual.fileNameClassName&&e.visual.fileNameStyle===t.visual.fileNameStyle&&e.visual.expandIconClassName===t.visual.expandIconClassName&&e.visual.expandIconStyle===t.visual.expandIconStyle});Un.displayName="DirectoryEntryItem";const Jn=e=>{const t=[];if(e.children)for(const n of e.children)n.type==="directory"&&(t.push(n.absolutePath),t.push(...Jn(n)));return t},po=({entries:e,expansion:{toggle:t,isExpanded:n,expandMultiple:r,collapseMultiple:a,isPending:i,alwaysExpanded:l=!1,doubleClickAction:u="recursive"},selection:{onEntryClick:f,selectedPath:g,currentPath:R,mode:x="none",selectedItems:C,onSelectionChange:m},visual:{className:p,style:h,ariaLabel:w,ariaLabelledBy:S,lineColor:j=Nn,showTreeLines:I=!0,showExpandIcons:k=!0,showDirectoryIcons:y=!0,showFileIcons:T=!0,iconOverrides:O,expandIconSize:L,typeIconSize:le,fontSize:X,indentSize:D,itemHeight:K=Ct,removeRootIndent:ge=!1,highlightStyles:F,entryClassName:de,entryStyle:be,nameClassName:U,nameStyle:J,directoryNameClassName:Oe,directoryNameStyle:Ie,fileNameClassName:Re,fileNameStyle:M,expandIconClassName:Q,expandIconStyle:z}={},virtualScroll:We,grid:E,sort:Me,locale:Se,labels:Ce,ref:_e})=>{const N=ce.resolveVirtualScrollLocale(Se),ue=s.useMemo(()=>Vn(Se,Ce),[Se,Ce]),H=co(Fr(ue)),{entryKindDirectory:je,entryKindFile:Z}=ue,Y=s.useMemo(()=>Hr({indentSize:D,typeIconSize:le,fontSize:X}),[D,le,X]);s.useMemo(()=>{He(be,{option:"visual.entryStyle"}),He(F?.hoverStyle,{option:"visual.highlightStyles.hoverStyle"}),He(F?.directorySelectedStyle,{option:"visual.highlightStyles.directorySelectedStyle"}),He(F?.itemSelectedStyle,{option:"visual.highlightStyles.itemSelectedStyle"}),Pr(z,{option:"visual.expandIconStyle"})},[be,F,z]);const ee=E!==void 0,we=s.useSyncExternalStore(ao,lo,io),he=s.useRef(null),ke=s.useRef(null),me=s.useRef(null),[Ke,A]=s.useState(0),[Ze,ct]=s.useState(0),[Ye,Ge]=s.useState(0),[qe,dt]=s.useState(null),{overscanCount:Ne=15,className:ve,background:G,onScroll:_t,onRangeChange:jt,onScrollAdjust:At,liveRegion:Dt,initialScrollIndex:zt,initialScrollOffset:Ae,initialScrollAnchor:Ft,callbackThrottleMs:$t=5,contentInsets:Bt,onItemFocus:Ht,viewportHeightOverride:te,scrollBarOptions:ut,behaviorOptions:Wt,preserveScrollAnchor:Kt=!1,getItemKey:Zn,testId:Yt,contentProps:ft}=We??{},Gt=s.useMemo(()=>ee?{...ft,role:"rowgroup"}:{...ft,role:"tree","aria-label":S?void 0:w,"aria-labelledby":S,"aria-multiselectable":x==="multiple"?!0:void 0,"aria-busy":i?!0:void 0},[ee,ft,w,S,x,i]),Vt=s.useMemo(()=>({...Wt,enableKeyboardNavigation:!1}),[Wt]),[Qe,Xt]=s.useState(typeof Ae=="number"?Ae:0),ht=s.useRef(typeof Ae=="number"?Ae:0),Ut=s.useCallback((o,c)=>{ht.current=o,Xt(o),_t?.(o,c)},[_t]),Jt=s.useCallback(o=>{const{renderingStartIndex:c,renderingEndIndex:b}=o;dt(v=>v&&v.renderStart===c&&v.renderEnd===b?v:{renderStart:c,renderEnd:b}),jt?.(o)},[jt]);s.useEffect(()=>{so()},[]),s.useEffect(()=>{const o=he.current,c=ee?ke.current:o,b=()=>{if(o){const _=o.clientWidth;ct(W=>Math.abs(W-_)>1?_:W)}if(typeof te=="number")A(_=>Math.abs(_-te)>1?te:_);else if(c){const _=c.clientHeight;A(W=>Math.abs(W-_)>1?_:W)}};if(!(o||c))return A(0);b();const v=new ResizeObserver(b);return o&&v.observe(o),c&&c!==o&&v.observe(c),()=>v.disconnect()},[te,ee]);const De=typeof te=="number"?te:Ke,fe=s.useCallback(o=>l||(we?n(o):!1),[we,n,l]),Zt=B.twMerge(P.container,i&&P.containerPending,p),qt=s.useMemo(()=>({...oo,...h??{},...typeof te=="number"?{height:te,minHeight:te}:{}}),[h,te]),mt=s.useCallback((o,c)=>{const b=[o.absolutePath,...Jn(o)],v=c||u;if(b.every(ye=>fe(ye)))return a(b);if(b.every(ye=>!fe(ye))||v==="recursive")return r(b);if(v==="toggle")return a(b);console.warn(`[DirectoryTree] Unknown double click action: ${v}. No action taken.`)},[fe,r,a,u]),pt=ee?!1:ge,{flatItems:Le,lineItems:yt,maxIndent:Qt}=s.useMemo(()=>fo(e,fe,I,pt,Me),[e,fe,I,pt,Me]),et=Wr({indentSize:Y.indentSize,removeRootIndent:pt,hasExpandBox:k||I}),ie=s.useMemo(()=>I?Yr(Y,L,et):null,[I,Y,L,et]),$=s.useMemo(()=>Le.map((o,c)=>({...o,rowHeight:Kr(K,o.entry,c)})),[Le,K]),xe=s.useMemo(()=>$.map(o=>o.rowHeight),[$]),Pe=s.useMemo(()=>{const o=new Array(xe.length+1);o[0]=0;for(let c=0;c<xe.length;c++)o[c+1]=o[c]+xe[c];return o},[xe]),en=s.useCallback(o=>$[o]?.rowHeight??Ct,[$]),qn=s.useCallback(o=>$[o]?.entry.absolutePath??o,[$]),tn=Zn??qn,ze=g??null,gt=R??null,[nn,Ve]=s.useState(()=>({selectedPath:ze,selectionGeneration:0,anchor:null})),bt=En(nn,ze);bt!==nn&&Ve(o=>En(o,ze));const tt=s.useMemo(()=>to(Le),[Le]),Fe=s.useMemo(()=>ro(tt,bt),[tt,bt]),Xe=s.useRef(new Map),nt=s.useRef(null),[rt]=s.useState($r),Ue=s.useRef(null),[Qn,rn]=s.useState(!0),St=s.useRef(Le);St.current=Le;const on=s.useRef(fe);on.current=fe;const wt=s.useRef(t);wt.current=t;const sn=s.useRef(tt);sn.current=tt;const vt=s.useRef(Fe);vt.current=Fe;const an=s.useRef(Ht);an.current=Ht;const Te=s.useCallback(o=>{const c=me.current;return!c||c.getViewportSize()<=0?!1:(c.scrollToIndex(o,{align:"nearest"}),!0)},[]),pe=s.useCallback(o=>{const c=Xe.current.get(o);if(c===void 0){Ue.current=o,Te(o)||(Ue.current=null);return}Ue.current=null,Te(o),c.focus({preventScroll:!0})},[Te]),ln=s.useCallback((o,c)=>{if(c)Xe.current.set(o,c),Ue.current===o?(Ue.current=null,c.focus({preventScroll:!0})):c.contains(c.ownerDocument.activeElement)&&Ve(b=>b.anchor===null?b:{...b,anchor:{...b.anchor,focused:!0}});else{const b=Xe.current.get(o);Xe.current.delete(o),b?.contains(b.ownerDocument.activeElement)&&Ve(v=>v.anchor===null?v:{...v,anchor:{...v.anchor,focused:!1}})}o===vt.current&&rn(c!==null)},[]);s.useLayoutEffect(()=>{rn(Xe.current.has(Fe))},[Fe]);const xt=s.useCallback((o,c,b)=>{const v=nt.current===b;nt.current=null,v||(Ve(_=>no(_,c)),rt.landedOn(b)||Te(o)),an.current?.(o)},[Te,rt]),ot=s.useCallback(o=>rt.mark(o.nativeEvent),[rt]),Et=s.useCallback((o,c)=>{const{ownerDocument:b}=c;if(!b.hasFocus()&&c.contains(b.activeElement)){nt.current=c;return}nt.current=null,Ve(v=>v.anchor!==null&&v.anchor.path===o?{...v,anchor:{...v.anchor,focused:!1}}:v)},[]),er=s.useCallback(()=>pe(vt.current),[pe]),It=s.useCallback((o,c)=>{const b=Rn(c),v=St.current.length;if(!Number.isInteger(o)||o<0||o>=v)throw new RangeError(`[directory-tree] scrollToIndex: ${String(o)} is not a row index (${v===0?"the tree has no rows":`expected an integer in 0..${String(v-1)}`}).`);if(b==="nearest"){Te(o);return}me.current?.scrollToIndex(o,{align:b})},[Te]);s.useImperativeHandle(_e,()=>({scrollToIndex:It,scrollToPath:(o,c)=>{Rn(c);const b=sn.current.get(o);return b===void 0?!1:(It(b,c),!0)},getScrollAnchor:()=>me.current?.getScrollAnchor()??null}),[It]);const cn=s.useCallback((o,c)=>{if(o.altKey||o.ctrlKey||o.metaKey)return;const b=St.current,v=b.length-1;if(v<0)return;const _=b[c],W=_?.entry.children!==void 0,ye=W&&on.current(_.entry.absolutePath);switch(o.key){case"ArrowDown":o.preventDefault(),pe(Math.min(c+1,v));break;case"ArrowUp":o.preventDefault(),pe(Math.max(c-1,0));break;case"Home":o.preventDefault(),pe(0);break;case"End":o.preventDefault(),pe(v);break;case"ArrowRight":o.preventDefault(),W&&!ye?wt.current(_.entry.absolutePath):W&&c<v&&b[c+1].depth>_.depth&&pe(c+1);break;case"ArrowLeft":{if(o.preventDefault(),W&&ye){wt.current(_.entry.absolutePath);break}const sr=_?.depth??0;for(let it=c-1;it>=0;it--)if(b[it].depth<sr){pe(it);break}break}}},[pe]),st=s.useMemo(()=>ie===null||yt.length===0?{segmentsByItem:[],glyphsByItem:[]}:mo(yt,xe,Pe,ie),[yt,xe,Pe,ie]),at=s.useMemo(()=>ie===null||e.length===0?0:ie.originX+Qt*ie.indentSize+oe+ie.typeIconSize,[e.length,Qt,ie]),{renderStart:dn,renderEnd:un,lookaheadEnd:fn}=s.useMemo(()=>ho($.length,De,Ne,qe,Qe,Pe),[$.length,De,Ne,qe,Qe,Pe]),Rt=s.useMemo(()=>ie===null||at<=0||De<=0||st.segmentsByItem.length===0?null:d.jsx("div",{className:"pointer-events-none absolute inset-0 z-1","aria-hidden":"true",children:d.jsx("div",{className:"absolute top-0 left-0",style:{width:at,height:De},children:d.jsx(Xn,{segmentsByItem:st.segmentsByItem,glyphsByItem:st.glyphsByItem,itemHeight:xe[0]??Ct,width:at,viewportHeight:De,scrollPosition:Qe,color:j,expandGlyphColor:j,expandGlyphSize:ie.glyphSize,renderStartIndex:dn,renderEndIndex:un,lookaheadEndIndex:fn})})}),[at,De,dn,un,fn,Qe,st,j,ie,xe]),hn=s.useCallback(o=>$[o],[$]),mn=s.useRef(null);s.useLayoutEffect(()=>{const o=mn.current;if(mn.current={items:$,offsets:Pe},!Kt||!o||o.items===$)return;const c=me.current,b=c?.getScrollPosition(),v=typeof b=="number"&&b>=0?b:ht.current,_=Xr(o.items,o.offsets,v);if(!_)return;const W=Ur(_,$,Pe);if(W===null||Math.abs(W-v)<1)return;const ye=c?c.scrollTo(W):W;ht.current=ye,Xt(ye)},[$,Pe,Kt]);const Ee=E?.columns,$e=E?.scrollBarWidth??ut?.width??Kn,V=s.useMemo(()=>Ee?Ar({measuredWidth:Ze,columns:Ee,scrollBarWidth:$e}):null,[Ee,Ze,$e]),lt=s.useMemo(()=>Ee?jr(Ee):"",[Ee]),tr=s.useMemo(()=>E?.showFooter&&Ee?Dr(e):[],[E?.showFooter,Ee,e]),Be=V?.maxHScroll??0;s.useEffect(()=>{Ge(o=>kt(o,Be))},[Be]);const pn=s.useCallback(o=>Ge(c=>kt(c+o,Be)),[Be]),yn=s.useMemo(()=>({iconOverrides:O,showExpandIcons:k,showDirectoryIcons:y,showFileIcons:T,useCanvasExpandIcons:I,expandIconSize:L,typeIconSize:Y.typeIconSize,fontSize:Y.fontSize,indentSize:Y.indentSize,highlightStyles:F,expandIconClassName:Q,expandIconStyle:z}),[O,k,y,T,I,L,Y,F,Q,z]),gn=s.useMemo(()=>d.jsx(ce.VirtualScroll,{ref:me,itemCount:$.length,getItem:hn,getItemHeight:en,getItemKey:tn,testId:Yt,contentProps:Gt,locale:N,labels:H,viewportSize:typeof te=="number"?te:void 0,overscanCount:Ne,onScroll:Ut,onRangeChange:Jt,onScrollAdjust:At,liveRegion:Dt,className:ve,onWheelHorizontal:ee?pn:void 0,background:d.jsxs(d.Fragment,{children:[ee&&V?d.jsx("div",{className:"pointer-events-none absolute top-0 left-0 z-1 h-full overflow-hidden",style:{width:V.nameWidth},"aria-hidden":"true",children:Rt}):Rt,G]}),initialScrollIndex:zt,initialScrollOffset:Ae,initialScrollAnchor:Ft,callbackThrottleMs:$t,contentInsets:Bt,scrollBarOptions:ut,behaviorOptions:Vt,children:(o,c)=>o?ee&&E&&V?d.jsx(Bn,{entry:o.entry,indentLevel:o.indentLevel,positionInSet:o.positionInSet,setSize:o.setSize,rowIndex:c+(E.showHeader??!0?2:1),flatIndex:c,onRowFocus:xt,onRowBlur:Et,isSelectedForAria:!!C?.has(o.entry.absolutePath),rowHeight:o.rowHeight,isDirOpen:fe,columns:E.columns,numericTemplate:lt,numericTotal:V.numericTotal,nameWidth:V.nameWidth,rowClassName:E.rowClassName,selection:{onEntryClick:f,selectedPath:ze,currentPath:gt,mode:x,selectedItems:C,onSelectionChange:m},expansion:{toggleDirectory:t,onToggleDirectoryRecursive:mt},visual:yn},o.entry.absolutePath):d.jsx(Un,{entry:o.entry,indentLevel:o.indentLevel,originX:et,depth:o.depth,positionInSet:o.positionInSet,setSize:o.setSize,isSelectedForAria:!!C?.has(o.entry.absolutePath),flatIndex:c,isActive:c===Fe,registerRowRef:ln,onNavigationKeyDown:cn,onRowFocus:xt,onRowBlur:Et,rowHeight:o.rowHeight,entryKindDirectory:je,entryKindFile:Z,isDirOpen:fe,expansion:{toggleDirectory:t,onToggleDirectoryRecursive:mt},selection:{onEntryClick:f,selectedPath:ze,currentPath:gt,mode:x,selectedItems:C,onSelectionChange:m},visual:{iconOverrides:O,showExpandIcons:k,showDirectoryIcons:y,showFileIcons:T,useCanvasExpandIcons:I,expandIconSize:L,typeIconSize:Y.typeIconSize,fontSize:Y.fontSize,indentSize:Y.indentSize,highlightStyles:F,entryClassName:de,entryStyle:be,nameClassName:U,nameStyle:J,directoryNameClassName:Oe,directoryNameStyle:Ie,fileNameClassName:Re,fileNameStyle:M,expandIconClassName:Q,expandIconStyle:z}},o.entry.absolutePath):null}),[$.length,hn,en,tn,Yt,Gt,N,H,je,Z,Fe,ln,cn,xt,Et,te,Ne,Ut,Jt,At,Dt,ve,ee,pn,V,Rt,G,zt,Ae,Ft,$t,Bt,ut,Vt,E,lt,fe,f,ze,gt,x,C,m,t,mt,yn,O,k,y,T,I,L,Y,et,F,de,be,U,J,Oe,Ie,Re,M,Q,z]);if(!(E&&V))return d.jsxs("div",{ref:he,className:Zt,style:qt,onPointerDownCapture:ot,onMouseDownCapture:ot,children:[Le.length>0&&!Qn&&d.jsx("span",{tabIndex:0,"data-directory-tree-tab-stop":"",style:uo,onFocus:er}),gn]});const nr=E.showHeader??!0,rr=E.showFooter??!1,or={...qt,"--dt-hscroll":`${Ye}px`};return d.jsxs("div",{ref:he,className:B.twMerge(Zt,"dt-grid"),style:or,role:"treegrid","aria-label":S?void 0:w,"aria-labelledby":S,"aria-multiselectable":x==="multiple"?!0:void 0,"aria-busy":i?!0:void 0,"aria-rowcount":$.length+(E.showHeader??!0?1:0),onPointerDownCapture:ot,onMouseDownCapture:ot,children:[nr&&d.jsx("div",{role:"rowgroup",children:d.jsx(Or,{columns:E.columns,numericTemplate:lt,numericTotal:V.numericTotal,nameWidth:V.nameWidth,scrollBarWidth:$e,className:E.headerClassName})}),d.jsx("div",{ref:ke,className:"dt-grid-body",children:gn}),Be>0&&d.jsxs("div",{className:"dt-grid-hscrollbar-row",children:[d.jsx("div",{className:"dt-grid-scrollbar-spacer",style:{width:V.nameWidth},"aria-hidden":"true"}),d.jsx(ce.ScrollBar,{horizontal:!0,contentSize:V.numericTotal,viewportSize:V.numericVisible,scrollPosition:Ye,scrollBarWidth:$e,locale:N,labels:H,onScroll:o=>{const c=typeof o=="function"?o(Ye):o,b=kt(c,Be);return Ge(b),b}}),d.jsx("div",{className:"dt-grid-scrollbar-spacer",style:{width:$e},"aria-hidden":"true"})]}),rr&&d.jsx("div",{role:"rowgroup",children:d.jsx(Mr,{columns:E.columns,numericTemplate:lt,numericTotal:V.numericTotal,nameWidth:V.nameWidth,scrollBarWidth:$e,allEntries:tr,className:E.footerClassName})})]})},yo=({initialExpanded:e=new Set,storageKey:t}={})=>{const[n,r]=s.useTransition(),[a,i]=s.useState(()=>{if(typeof window<"u"&&t)try{const h=window.localStorage.getItem(t);if(h){const w=JSON.parse(h);return new Set(w)}}catch(h){console.error("[useDirectoryTreeState] Error reading from localStorage",h)}return e}),l=s.useCallback(h=>{r(()=>{i(w=>{const S=new Set(w);return h(S),S})})},[]),u=s.useCallback((h,w)=>{l(S=>{for(const j of h)w(S,j)})},[l]);s.useEffect(()=>{if(t&&typeof window<"u")try{window.localStorage.setItem(t,JSON.stringify(Array.from(a)))}catch(h){console.warn(`Error setting localStorage key "${t}":`,h)}},[a,t]);const f=s.useCallback(h=>{u([h],(w,S)=>{w.has(S)?w.delete(S):w.add(S)})},[u]),g=s.useCallback(h=>{u([h],(w,S)=>{w.add(S)})},[u]),R=s.useCallback(h=>{u([h],(w,S)=>{w.delete(S)})},[u]),x=s.useCallback(h=>{u(h,(w,S)=>{w.delete(S)})},[u]),C=s.useCallback(h=>{u(h,(w,S)=>{w.add(S)})},[u]),m=s.useCallback(()=>{l(h=>{h.clear()})},[l]),p=s.useCallback(h=>a.has(h),[a]);return{expanded:a,toggle:f,expand:g,collapse:R,collapseMultiple:x,expandMultiple:C,collapseAll:m,isExpanded:p,isPending:n}};exports.DIRECTORY_TREE_LABEL_CATALOGS=Gn;exports.DIRECTORY_TREE_LABEL_KEYS=Pt;exports.DirectoryTree=po;exports.EXPAND_ICON_STYLE_PROPERTIES=An;exports.FILE_ICON_PAIRS=hr;exports.MARK_PAIRS=kn;exports.ROW_STYLE_PROPERTIES=jn;exports.directoryTreeClasses=P;exports.resolveDirectoryTreeLabels=Vn;exports.useDirectoryTreeState=yo;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),u0=require("@aiquants/virtualscroll"),o=require("react"),z=require("tailwind-merge");function H2(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(a,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return a.default=e,Object.freeze(a)}const t=H2(o);function V2({title:e,titleId:a,...n},r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":a},n),e?t.createElement("title",{id:a},e):null,t.createElement("path",{fillRule:"evenodd",d:"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",clipRule:"evenodd"}))}const Z2=t.forwardRef(V2);function M2({title:e,titleId:a,...n},r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":a},n),e?t.createElement("title",{id:a},e):null,t.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))}const y2=t.forwardRef(M2);function E2({title:e,titleId:a,...n},r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":a},n),e?t.createElement("title",{id:a},e):null,t.createElement("path",{d:"M19.5 21a3 3 0 0 0 3-3v-4.5a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3V18a3 3 0 0 0 3 3h15ZM1.5 10.146V6a3 3 0 0 1 3-3h5.379a2.25 2.25 0 0 1 1.59.659l2.122 2.121c.14.141.331.22.53.22H19.5a3 3 0 0 1 3 3v1.146A4.483 4.483 0 0 0 19.5 9h-15a4.483 4.483 0 0 0-3 1.146Z"}))}const b2=t.forwardRef(E2),w2=o.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),t0=t.forwardRef((e,a)=>{const{alt:n,color:r,size:c,weight:s,mirrored:i,children:h,weights:f,...p}=e,{color:y="currentColor",size:b,weight:E="regular",mirrored:V=!1,...A}=t.useContext(w2);return t.createElement("svg",{ref:a,xmlns:"http://www.w3.org/2000/svg",width:c??b,height:c??b,fill:r??y,viewBox:"0 0 256 256",transform:i||V?"scale(-1, 1)":void 0,...A,...p},!!n&&t.createElement("title",null,n),h,f.get(s??E))});t0.displayName="IconBase";const S2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.52ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Z"}))]]),Se=t.forwardRef((e,a)=>t.createElement(t0,{ref:a,...e,weights:S2}));Se.displayName="FileIcon";const L2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M96.59,124.91a12,12,0,0,0-13.08,2.6L63,148H44a12,12,0,0,0-12,12v40a12,12,0,0,0,12,12H63l20.48,20.48A12,12,0,0,0,104,224V136A12,12,0,0,0,96.59,124.91ZM80,195l-3.51-3.52A12,12,0,0,0,68,188H56V172H68a12,12,0,0,0,8.49-3.51L80,165Zm80-15a44.55,44.55,0,0,1-21.95,38.36A12,12,0,1,1,126,197.64a20.51,20.51,0,0,0,0-35.28,12,12,0,1,1,12.1-20.72A44.55,44.55,0,0,1,160,180ZM216.49,79.51l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v72a12,12,0,0,0,24,0V44h76V92a12,12,0,0,0,12,12h48V212H180a12,12,0,0,0,0,24h20a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.51ZM160,57l23,23H160Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M72,160l24-24v88L72,200H48V160ZM152,32V88h56Z",opacity:"0.2"}),t.createElement("path",{d:"M99.06,128.61a8,8,0,0,0-8.72,1.73L68.69,152H48a8,8,0,0,0-8,8v40a8,8,0,0,0,8,8H68.69l21.65,21.66A8,8,0,0,0,104,224V136A8,8,0,0,0,99.06,128.61ZM88,204.69,77.66,194.34A8,8,0,0,0,72,192H56V168H72a8,8,0,0,0,5.66-2.34L88,155.31ZM152,180a40.55,40.55,0,0,1-20,34.91A8,8,0,0,1,124,201.09a24.49,24.49,0,0,0,0-42.18A8,8,0,0,1,132,145.09,40.55,40.55,0,0,1,152,180Zm61.66-97.66-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v80a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216H168a8,8,0,0,0,0,16h32a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M152,180a40.55,40.55,0,0,1-20,34.91A8,8,0,0,1,124,201.09a24.49,24.49,0,0,0,0-42.18A8,8,0,0,1,132,145.09,40.55,40.55,0,0,1,152,180ZM99.06,128.61a8,8,0,0,0-8.72,1.73L68.69,152H48a8,8,0,0,0-8,8v40a8,8,0,0,0,8,8H68.69l21.65,21.66A8,8,0,0,0,104,224V136A8,8,0,0,0,99.06,128.61ZM216,88V216a16,16,0,0,1-16,16H168a8,8,0,0,1,0-16h32V96H152a8,8,0,0,1-8-8V40H56v80a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M98.3,130.46a6,6,0,0,0-6.54,1.3L69.51,154H48a6,6,0,0,0-6,6v40a6,6,0,0,0,6,6H69.51l22.25,22.24A6,6,0,0,0,102,224V136A6,6,0,0,0,98.3,130.46Zm-8.3,79L76.24,195.76A6,6,0,0,0,72,194H54V166H72a6,6,0,0,0,4.24-1.76L90,150.49ZM150,180a38.53,38.53,0,0,1-19,33.18A6,6,0,0,1,125,202.82a26.5,26.5,0,0,0,0-45.64A6,6,0,0,1,131,146.82,38.53,38.53,0,0,1,150,180Zm62.24-96.24-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v80a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216a2,2,0,0,1-2,2H168a6,6,0,0,0,0,12h32a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M99.06,128.61a8,8,0,0,0-8.72,1.73L68.69,152H48a8,8,0,0,0-8,8v40a8,8,0,0,0,8,8H68.69l21.65,21.66A8,8,0,0,0,104,224V136A8,8,0,0,0,99.06,128.61ZM88,204.69,77.66,194.34A8,8,0,0,0,72,192H56V168H72a8,8,0,0,0,5.66-2.34L88,155.31ZM152,180a40.55,40.55,0,0,1-20,34.91A8,8,0,0,1,124,201.09a24.49,24.49,0,0,0,0-42.18A8,8,0,0,1,132,145.09,40.55,40.55,0,0,1,152,180Zm61.66-97.66-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v80a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216H168a8,8,0,0,0,0,16h32a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M97.53,132.3a4,4,0,0,0-4.36.87L70.34,156H48a4,4,0,0,0-4,4v40a4,4,0,0,0,4,4H70.34l22.83,22.83A4,4,0,0,0,100,224V136A4,4,0,0,0,97.53,132.3Zm-5.53,82L74.83,197.17A4,4,0,0,0,72,196H52V164H72a4,4,0,0,0,2.83-1.17L92,145.66ZM148,180a36.52,36.52,0,0,1-18,31.45,4,4,0,0,1-4-6.9,28.5,28.5,0,0,0,0-49.1,4,4,0,0,1,4-6.9A36.52,36.52,0,0,1,148,180Zm62.83-94.83-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v80a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216a4,4,0,0,1-4,4H168a4,4,0,0,0,0,8h32a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156Z"}))]]),Le=t.forwardRef((e,a)=>t.createElement(t0,{ref:a,...e,weights:L2}));Le.displayName="FileAudioIcon";const x2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M180.49,143.51a12,12,0,0,1,0,17l-24,24a12,12,0,0,1-17-17L155,152l-15.52-15.51a12,12,0,1,1,17-17Zm-64-24a12,12,0,0,0-17,0l-24,24a12,12,0,0,0,0,17l24,24a12,12,0,0,0,17-17L101,152l15.52-15.51A12,12,0,0,0,116.49,119.51ZM220,88V216a20,20,0,0,1-20,20H56a20,20,0,0,1-20-20V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.52l56,56A12,12,0,0,1,220,88ZM160,57V80h23Zm36,155V104H148a12,12,0,0,1-12-12V44H60V212Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),t.createElement("path",{d:"M181.66,146.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32Zm-72-24a8,8,0,0,0-11.32,0l-24,24a8,8,0,0,0,0,11.32l24,24a8,8,0,0,0,11.32-11.32L91.31,152l18.35-18.34A8,8,0,0,0,109.66,122.34ZM216,88V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31Zm40,136V96H152a8,8,0,0,1-8-8V40H56V216H200Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34Zm-104,88a8,8,0,0,1-11.32,11.32l-24-24a8,8,0,0,1,0-11.32l24-24a8,8,0,0,1,11.32,11.32L91.31,152Zm72-12.68-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32l24,24A8,8,0,0,1,181.66,157.66ZM152,88V44l44,44Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M180.24,147.76a6,6,0,0,1,0,8.48l-24,24a6,6,0,0,1-8.48-8.48L167.51,152l-19.75-19.76a6,6,0,1,1,8.48-8.48Zm-72-24a6,6,0,0,0-8.48,0l-24,24a6,6,0,0,0,0,8.48l24,24a6,6,0,1,0,8.48-8.48L88.49,152l19.75-19.76A6,6,0,0,0,108.24,123.76ZM214,88V216a14,14,0,0,1-14,14H56a14,14,0,0,1-14-14V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88Zm-56-6h35.52L158,46.48Zm44,134V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2V216a2,2,0,0,0,2,2H200A2,2,0,0,0,202,216Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M181.66,146.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32Zm-72-24a8,8,0,0,0-11.32,0l-24,24a8,8,0,0,0,0,11.32l24,24a8,8,0,0,0,11.32-11.32L91.31,152l18.35-18.34A8,8,0,0,0,109.66,122.34ZM216,88V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31Zm40,136V96H152a8,8,0,0,1-8-8V40H56V216H200Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M178.83,149.17a4,4,0,0,1,0,5.66l-24,24a4,4,0,0,1-5.66-5.66L170.34,152l-21.17-21.17a4,4,0,1,1,5.66-5.66Zm-72-24a4,4,0,0,0-5.66,0l-24,24a4,4,0,0,0,0,5.66l24,24a4,4,0,1,0,5.66-5.66L85.66,152l21.17-21.17A4,4,0,0,0,106.83,125.17ZM212,88V216a12,12,0,0,1-12,12H56a12,12,0,0,1-12-12V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88Zm-56-4h42.34L156,41.65Zm48,132V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H200A4,4,0,0,0,204,216Z"}))]]),xe=t.forwardRef((e,a)=>t.createElement(t0,{ref:a,...e,weights:x2}));xe.displayName="FileCodeIcon";const C2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M48,180c0,8.67,5.49,16,12,16a10.27,10.27,0,0,0,7.33-3.43,12,12,0,1,1,17.34,16.6A34,34,0,0,1,60,220C40.15,220,24,202,24,180s16.15-40,36-40a34,34,0,0,1,24.67,10.83,12,12,0,1,1-17.34,16.6A10.27,10.27,0,0,0,60,164C53.49,164,48,171.31,48,180Zm97.51-5.71c-5.13-3.45-11.33-5.24-16.8-6.82a79.5,79.5,0,0,1-7.91-2.59c2.45-1.18,9.71-1.3,16.07.33A12,12,0,0,0,143,142a69.24,69.24,0,0,0-12-1.86c-9.93-.66-18,1.08-24.1,5.17a24.45,24.45,0,0,0-10.69,17.76c-1.1,8.74,2.48,16.27,10.11,21.19,4.78,3.09,10.36,4.7,15.75,6.26,3,.89,7.94,2.3,9.88,3.53a2,2,0,0,1-.22.71c-1.36,1.55-9.57,1.79-16.39-.06a12,12,0,0,0-6.45,23.11A63.73,63.73,0,0,0,125.09,220c6.47,0,13.74-1.17,19.74-5.15a24.73,24.73,0,0,0,10.95-18C157,187.53,153.32,179.53,145.51,174.27ZM216,140.68A12,12,0,0,0,200.7,148L192,172.3,183.3,148A12,12,0,1,0,160.7,156l20,56a12,12,0,0,0,22.6,0l20-56A12,12,0,0,0,216,140.68ZM36,108V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.51l56,56A12,12,0,0,1,220,88v20a12,12,0,1,1-24,0v-4H148a12,12,0,0,1-12-12V44H60v64a12,12,0,1,1-24,0ZM160,80h23L160,57Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),t.createElement("path",{d:"M48,180c0,11,7.18,20,16,20a14.24,14.24,0,0,0,10.22-4.66A8,8,0,0,1,85.78,206.4,30.06,30.06,0,0,1,64,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a30.06,30.06,0,0,1,21.78,9.6,8,8,0,0,1-11.56,11.06A14.24,14.24,0,0,0,64,160C55.18,160,48,169,48,180Zm79.6-8.69c-4-1.16-8.14-2.35-10.45-3.84-1.25-.81-1.23-1-1.12-1.9a4.57,4.57,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.83-.56A8,8,0,0,0,142,145.86c-2.12-.55-21-5.22-32.84,2.76a20.58,20.58,0,0,0-9,14.95c-2,15.88,13.65,20.41,23,23.11,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.14,3.93-4.6,3.06-15.17,1.56-19.55.36A8,8,0,0,0,109.94,214a61.34,61.34,0,0,0,15.19,2c5.82,0,12.3-1,17.49-4.46a20.82,20.82,0,0,0,9.19-15.23C154,179,137.49,174.17,127.6,171.31Zm83.09-26.84a8,8,0,0,0-10.23,4.84L188,184.21l-12.47-34.9a8,8,0,0,0-15.07,5.38l20,56a8,8,0,0,0,15.07,0l20-56A8,8,0,0,0,210.69,144.47ZM216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-27.31-8L160,51.31V80Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76a4,4,0,0,0,4,4H212a4,4,0,0,0,4-4V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44ZM48,180c0,11,7.18,20,16,20a14.18,14.18,0,0,0,10.06-4.5,8.21,8.21,0,0,1,10.9-.91,8,8,0,0,1,.82,11.81A30.06,30.06,0,0,1,64,216c-17.64,0-32-16.15-32-36s14.36-36,32-36a30,30,0,0,1,21.39,9.19,8.26,8.26,0,0,1,.73,11.09,8,8,0,0,1-11.9.38A14.17,14.17,0,0,0,64,160C55.18,160,48,169,48,180Zm103.81,16.31a20.82,20.82,0,0,1-9.19,15.23C137.43,215,131,216,125.13,216A61.14,61.14,0,0,1,110,214a8,8,0,1,1,4.3-15.41c4.38,1.2,14.95,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.35-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.56,20.56,0,0,1,9-14.95c11.84-8,30.71-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.09,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C137.49,174.17,154.05,179,151.81,196.31ZM215.42,155l-19.89,55.68a8,8,0,0,1-15.06,0L160.58,155a8.21,8.21,0,0,1,4.5-10.45,8,8,0,0,1,10.45,4.76L188,184.21l12.47-34.9a8,8,0,0,1,10.45-4.76A8.23,8.23,0,0,1,215.42,155Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M46,180c0,12.13,8.07,22,18,22a16.24,16.24,0,0,0,11.67-5.28,6,6,0,0,1,8.66,8.3A28.06,28.06,0,0,1,64,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a28.06,28.06,0,0,1,20.33,9,6,6,0,0,1-8.66,8.3A16.23,16.23,0,0,0,64,158C54.07,158,46,167.86,46,180Zm81.05-6.77c-10.86-3.13-13.41-4.69-13-7.91a6.59,6.59,0,0,1,2.88-5.08c5.6-3.79,17.66-1.82,21.45-.84a6,6,0,0,0,3.06-11.6c-2-.53-20.1-5-31.21,2.48a18.61,18.61,0,0,0-8.08,13.54c-1.8,14.19,12.26,18.25,21.57,20.94,12.12,3.5,14.78,5.33,14.2,9.76a6.85,6.85,0,0,1-3,5.34c-5.61,3.73-17.48,1.64-21.19.62A6,6,0,0,0,110.48,212a59.41,59.41,0,0,0,14.68,2c5.49,0,11.54-.95,16.36-4.14a18.89,18.89,0,0,0,8.31-13.81C151.84,180.39,136.92,176.08,127.05,173.22Zm83-26.88a6,6,0,0,0-7.67,3.63L188,190.15,173.65,150a6,6,0,1,0-11.3,4l20,56a6,6,0,0,0,11.3,0l20-56A6,6,0,0,0,210,146.34ZM214,88v24a6,6,0,1,1-12,0V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,1,1-12,0V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.24,1.76l56,56A6,6,0,0,1,214,88Zm-20.49-6L158,46.48V82Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M48,180c0,11,7.18,20,16,20a14.24,14.24,0,0,0,10.22-4.66A8,8,0,0,1,85.78,206.4,30.06,30.06,0,0,1,64,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a30.06,30.06,0,0,1,21.78,9.6,8,8,0,0,1-11.56,11.06A14.24,14.24,0,0,0,64,160C55.18,160,48,169,48,180Zm79.6-8.69c-4-1.16-8.14-2.35-10.45-3.84-1.25-.81-1.23-1-1.12-1.9a4.57,4.57,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.82-.56A8,8,0,0,0,142,145.86c-2.12-.55-21-5.22-32.84,2.76a20.58,20.58,0,0,0-9,14.95c-2,15.88,13.65,20.41,23,23.11,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.14,3.93-4.6,3.06-15.17,1.56-19.55.36A8,8,0,0,0,109.94,214a61.34,61.34,0,0,0,15.19,2c5.82,0,12.3-1,17.49-4.46a20.82,20.82,0,0,0,9.19-15.23C154,179,137.49,174.17,127.6,171.31Zm83.09-26.84a8,8,0,0,0-10.23,4.84L188,184.21l-12.47-34.9a8,8,0,0,0-15.07,5.38l20,56a8,8,0,0,0,15.07,0l20-56A8,8,0,0,0,210.69,144.47ZM216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-27.31-8L160,51.31V80Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M44,180c0,13.23,9,24,20,24a18.15,18.15,0,0,0,13.11-5.9,4,4,0,1,1,5.78,5.54A26.11,26.11,0,0,1,64,212c-15.44,0-28-14.36-28-32s12.56-32,28-32a26.11,26.11,0,0,1,18.89,8.36,4,4,0,1,1-5.78,5.54A18.15,18.15,0,0,0,64,156C53,156,44,166.77,44,180Zm82.49-4.85c-10.53-3-15.08-4.91-14.42-10.08a8.51,8.51,0,0,1,3.75-6.49c6.25-4.23,18.77-2.24,23.06-1.11a4,4,0,0,0,2-7.74,61.11,61.11,0,0,0-10.47-1.61c-8.12-.54-14.54.75-19.1,3.82a16.66,16.66,0,0,0-7.22,12.13c-1.58,12.49,10.46,16,20.14,18.77,11.26,3.25,16.47,5.49,15.64,11.94a8.94,8.94,0,0,1-3.91,6.75c-6.27,4.17-18.61,2.05-22.83.88a4,4,0,1,0-2.15,7.7A57.89,57.89,0,0,0,125.19,212c5.18,0,10.83-.86,15.22-3.77a17,17,0,0,0,7.43-12.41C149.64,181.84,136.26,178,126.49,175.15Zm82.85-26.92a4,4,0,0,0-5.11,2.42L188,196.11l-16.23-45.46a4,4,0,1,0-7.54,2.7l20,56a4,4,0,0,0,7.54,0l20-56A4,4,0,0,0,209.34,148.23ZM212,88v24a4,4,0,0,1-8,0V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4v72a4,4,0,0,1-8,0V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88Zm-13.66-4L156,41.65V84Z"}))]]),Ce=t.forwardRef((e,a)=>t.createElement(t0,{ref:a,...e,weights:C2}));Ce.displayName="FileCsvIcon";const I2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M48,140H32a12,12,0,0,0-12,12v56a12,12,0,0,0,12,12H48a40,40,0,0,0,0-80Zm0,56H44V164h4a16,16,0,0,1,0,32Zm180.3-3.8a12,12,0,0,1,.37,17A34,34,0,0,1,204,220c-19.85,0-36-17.94-36-40s16.15-40,36-40a34,34,0,0,1,24.67,10.83,12,12,0,0,1-17.34,16.6A10.27,10.27,0,0,0,204,164c-6.5,0-12,7.33-12,16s5.5,16,12,16a10.27,10.27,0,0,0,7.33-3.43A12,12,0,0,1,228.3,192.2ZM128,140c-19.85,0-36,17.94-36,40s16.15,40,36,40,36-17.94,36-40S147.85,140,128,140Zm0,56c-6.5,0-12-7.33-12-16s5.5-16,12-16,12,7.33,12,16S134.5,196,128,196ZM48,120a12,12,0,0,0,12-12V44h76V92a12,12,0,0,0,12,12h48v4a12,12,0,0,0,24,0V88a12,12,0,0,0-3.51-8.48l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68A12,12,0,0,0,48,120ZM160,57l23,23H160Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),t.createElement("path",{d:"M52,144H36a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8H52a36,36,0,0,0,0-72Zm0,56H44V160h8a20,20,0,0,1,0,40Zm169.53-4.91a8,8,0,0,1,.25,11.31A30.06,30.06,0,0,1,200,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a30.06,30.06,0,0,1,21.78,9.6,8,8,0,0,1-11.56,11.06A14.24,14.24,0,0,0,200,160c-8.82,0-16,9-16,20s7.18,20,16,20a14.18,14.18,0,0,0,10.22-4.66A8,8,0,0,1,221.53,195.09ZM128,144c-17.64,0-32,16.15-32,36s14.36,36,32,36,32-16.15,32-36S145.64,144,128,144Zm0,56c-8.82,0-16-9-16-20s7.18-20,16-20,16,9,16,20S136.82,200,128,200ZM48,120a8,8,0,0,0,8-8V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72A8,8,0,0,0,48,120ZM160,51.31,188.69,80H160Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M44,120H212.07a4,4,0,0,0,4-4V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152.05,24H56A16,16,0,0,0,40,40v76A4,4,0,0,0,44,120Zm108-76,44,44h-44ZM52,144H36a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8H51.33C71,216,87.55,200.52,88,180.87A36,36,0,0,0,52,144Zm-.49,56H44V160h8a20,20,0,0,1,20,20.77C71.59,191.59,62.35,200,51.52,200Zm170.67-4.28a8.26,8.26,0,0,1-.73,11.09,30,30,0,0,1-21.4,9.19c-17.65,0-32-16.15-32-36s14.36-36,32-36a30,30,0,0,1,21.4,9.19,8.26,8.26,0,0,1,.73,11.09,8,8,0,0,1-11.9.38A14.21,14.21,0,0,0,200.06,160c-8.82,0-16,9-16,20s7.18,20,16,20a14.25,14.25,0,0,0,10.23-4.66A8,8,0,0,1,222.19,195.72ZM128,144c-17.65,0-32,16.15-32,36s14.37,36,32,36,32-16.15,32-36S145.69,144,128,144Zm0,56c-8.83,0-16-9-16-20s7.18-20,16-20,16,9,16,20S136.86,200,128,200Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M52,146H36a6,6,0,0,0-6,6v56a6,6,0,0,0,6,6H52a34,34,0,0,0,0-68Zm0,56H42V158H52a22,22,0,0,1,0,44Zm168.15-5.46a6,6,0,0,1,.18,8.48A28.06,28.06,0,0,1,200,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a28.06,28.06,0,0,1,20.33,9,6,6,0,0,1-8.66,8.3A16.23,16.23,0,0,0,200,158c-9.93,0-18,9.87-18,22s8.07,22,18,22a16.23,16.23,0,0,0,11.67-5.28A6,6,0,0,1,220.15,196.54ZM128,146c-16.54,0-30,15.25-30,34s13.46,34,30,34,30-15.25,30-34S144.54,146,128,146Zm0,56c-9.93,0-18-9.87-18-22s8.07-22,18-22,18,9.87,18,22S137.93,202,128,202ZM48,118a6,6,0,0,0,6-6V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88a6,6,0,0,0-1.76-4.24l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72A6,6,0,0,0,48,118ZM158,46.48,193.52,82H158Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M52,144H36a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8H52a36,36,0,0,0,0-72Zm0,56H44V160h8a20,20,0,0,1,0,40Zm169.53-4.91a8,8,0,0,1,.25,11.31A30.06,30.06,0,0,1,200,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a30.06,30.06,0,0,1,21.78,9.6,8,8,0,0,1-11.56,11.06A14.24,14.24,0,0,0,200,160c-8.82,0-16,9-16,20s7.18,20,16,20a14.24,14.24,0,0,0,10.22-4.66A8,8,0,0,1,221.53,195.09ZM128,144c-17.65,0-32,16.15-32,36s14.35,36,32,36,32-16.15,32-36S145.65,144,128,144Zm0,56c-8.82,0-16-9-16-20s7.18-20,16-20,16,9,16,20S136.82,200,128,200ZM48,120a8,8,0,0,0,8-8V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72A8,8,0,0,0,48,120ZM160,51.31,188.69,80H160Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M52,148H36a4,4,0,0,0-4,4v56a4,4,0,0,0,4,4H52a32,32,0,0,0,0-64Zm0,56H40V156H52a24,24,0,0,1,0,48Zm166.77-6a4,4,0,0,1,.12,5.66A26.11,26.11,0,0,1,200,212c-15.44,0-28-14.36-28-32s12.56-32,28-32a26.11,26.11,0,0,1,18.89,8.36,4,4,0,1,1-5.78,5.54A18.15,18.15,0,0,0,200,156c-11,0-20,10.77-20,24s9,24,20,24a18.15,18.15,0,0,0,13.11-5.9A4,4,0,0,1,218.77,198ZM128,148c-15.44,0-28,14.36-28,32s12.56,32,28,32,28-14.36,28-32S143.44,148,128,148Zm0,56c-11,0-20-10.77-20-24s9-24,20-24,20,10.77,20,24S139,204,128,204ZM48,116a4,4,0,0,0,4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52v20a4,4,0,0,0,8,0V88a4,4,0,0,0-1.17-2.83l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72A4,4,0,0,0,48,116ZM156,41.65,198.34,84H156Z"}))]]),Ie=t.forwardRef((e,a)=>t.createElement(t0,{ref:a,...e,weights:I2}));Ie.displayName="FileDocIcon";const R2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M114,145.34a12,12,0,0,0-20,0L79,167.82,72.3,157.73a12,12,0,0,0-20.07.17L13.91,217.51A12,12,0,0,0,24,236H152a12,12,0,0,0,10-18.66ZM46,212,62.5,186.3l6.55,9.81a12,12,0,0,0,20,0l15-22.48L129.58,212ZM216.49,79.51l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v84a12,12,0,0,0,24,0V44h76V92a12,12,0,0,0,12,12h48V212a12,12,0,0,0,0,24h4a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.51ZM160,57l23,23H160Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M104,152l48,72H24l36-56,16.36,25.45ZM152,32V88h56Z",opacity:"0.2"}),t.createElement("path",{d:"M110.66,147.56a8,8,0,0,0-13.32,0L76.49,178.85l-9.76-15.18a8,8,0,0,0-13.46,0l-36,56A8,8,0,0,0,24,232H152a8,8,0,0,0,6.66-12.44ZM38.65,216,60,182.79l9.63,15a8,8,0,0,0,13.39.11l21-31.47L137.05,216Zm175-133.66-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v88a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216h-8a8,8,0,0,0,0,16h8a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M158.66,219.56A8,8,0,0,1,152,232H24a8,8,0,0,1-6.73-12.33l36-56a8,8,0,0,1,13.46,0l9.76,15.18,20.85-31.29a8,8,0,0,1,13.32,0ZM216,88V216a16,16,0,0,1-16,16h-8a8,8,0,0,1,0-16h8V96H152a8,8,0,0,1-8-8V40H56v88a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M109,148.67a6,6,0,0,0-10,0L76.46,182.5,65.05,164.76a6,6,0,0,0-10.1,0l-36,56A6,6,0,0,0,24,230H152a6,6,0,0,0,5-9.33ZM35,218l25-38.9,11.32,17.6a6,6,0,0,0,10,.08l22.64-34L140.79,218ZM212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v88a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216a2,2,0,0,1-2,2h-8a6,6,0,0,0,0,12h8a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M110.66,147.56a8,8,0,0,0-13.32,0L76.49,178.85l-9.76-15.18a8,8,0,0,0-13.46,0l-36,56A8,8,0,0,0,24,232H152a8,8,0,0,0,6.66-12.44ZM38.65,216,60,182.79l9.63,15a8,8,0,0,0,13.39.11l21-31.47L137.05,216Zm175-133.66-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v88a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216h-8a8,8,0,0,0,0,16h8a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M107.33,149.78a4,4,0,0,0-6.66,0L76.42,186.15,63.36,165.84a4,4,0,0,0-6.72,0l-36,56A4,4,0,0,0,24,228H152a4,4,0,0,0,3.33-6.22ZM31.33,220,60,175.4l13,20.22a4,4,0,0,0,3.33,1.83,3.93,3.93,0,0,0,3.36-1.78L104,159.21,144.53,220ZM210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v88a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216a4,4,0,0,1-4,4h-8a4,4,0,0,0,0,8h8a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156Z"}))]]),Re=t.forwardRef((e,a)=>t.createElement(t0,{ref:a,...e,weights:R2}));Re.displayName="FileImageIcon";const k2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M100,152v56a12,12,0,0,1-24,0V190.07l-6.17,8.81a12,12,0,0,1-19.66,0L44,190.07V208a12,12,0,0,1-24,0V152a12,12,0,0,1,21.83-6.88L60,171.07l18.17-25.95A12,12,0,0,1,100,152Zm84,28a40,40,0,0,1-40,40H128a12,12,0,0,1-12-12V152a12,12,0,0,1,12-12h16A40,40,0,0,1,184,180Zm-24,0a16,16,0,0,0-16-16h-4v32h4A16,16,0,0,0,160,180Zm60-92V224a12,12,0,0,1-24,0V104H148a12,12,0,0,1-12-12V44H60v64a12,12,0,0,1-24,0V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.52l56,56A12,12,0,0,1,220,88Zm-60-8h23L160,57Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V224a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM144,144H128a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8h16a36,36,0,0,0,0-72Zm0,56h-8V160h8a20,20,0,0,1,0,40Zm-40-48v56a8,8,0,0,1-16,0V177.38L74.55,196.59a8,8,0,0,1-13.1,0L48,177.38V208a8,8,0,0,1-16,0V152a8,8,0,0,1,14.55-4.59L68,178.05l21.45-30.64A8,8,0,0,1,104,152Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76a4,4,0,0,0,4,4H196a4,4,0,0,1,4,4V224a8,8,0,0,0,9.19,7.91,8.15,8.15,0,0,0,6.81-8.16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Zm-8,56H128a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8h15.32c19.66,0,36.21-15.48,36.67-35.13A36,36,0,0,0,144,144Zm-.49,56H136V160h8a20,20,0,0,1,20,20.77C163.58,191.59,154.34,200,143.51,200ZM104,152v55.73A8.17,8.17,0,0,1,96.53,216,8,8,0,0,1,88,208V177.38l-13.32,19a8.3,8.3,0,0,1-4.2,3.2,8,8,0,0,1-9-3L48,177.38v30.35A8.17,8.17,0,0,1,40.53,216,8,8,0,0,1,32,208V152.31a8.27,8.27,0,0,1,4.56-7.53,8,8,0,0,1,10,2.63L68,178.05l21.27-30.39a8.28,8.28,0,0,1,8.06-3.55A8,8,0,0,1,104,152Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V224a6,6,0,0,0,12,0V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM144,146H128a6,6,0,0,0-6,6v56a6,6,0,0,0,6,6h16a34,34,0,0,0,0-68Zm0,56H134V158h10a22,22,0,0,1,0,44Zm-42-50v56a6,6,0,0,1-12,0V171L72.92,195.44a6,6,0,0,1-9.84,0L46,171v37a6,6,0,0,1-12,0V152a6,6,0,0,1,10.92-3.44l23.08,33,23.08-33A6,6,0,0,1,102,152Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V224a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM144,144H128a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8h16a36,36,0,0,0,0-72Zm0,56h-8V160h8a20,20,0,0,1,0,40Zm-40-48v56a8,8,0,0,1-16,0V177.38L74.55,196.59a8,8,0,0,1-13.1,0L48,177.38V208a8,8,0,0,1-16,0V152a8,8,0,0,1,14.55-4.59L68,178.05l21.45-30.64A8,8,0,0,1,104,152Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V224a4,4,0,0,0,8,0V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM144,148H128a4,4,0,0,0-4,4v56a4,4,0,0,0,4,4h16a32,32,0,0,0,0-64Zm0,56H132V156h12a24,24,0,0,1,0,48Zm-44-52v56a4,4,0,0,1-8,0V164.69l-20.72,29.6a4,4,0,0,1-6.56,0L44,164.69V208a4,4,0,0,1-8,0V152a4,4,0,0,1,7.28-2.29L68,185l24.72-35.31A4,4,0,0,1,100,152Z"}))]]),ke=t.forwardRef((e,a)=>t.createElement(t0,{ref:a,...e,weights:k2}));ke.displayName="FileMdIcon";const N2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M200,164v8h12a12,12,0,0,1,0,24H200v12a12,12,0,0,1-24,0V152a12,12,0,0,1,12-12h32a12,12,0,0,1,0,24ZM92,172a32,32,0,0,1-32,32H56v4a12,12,0,0,1-24,0V152a12,12,0,0,1,12-12H60A32,32,0,0,1,92,172Zm-24,0a8,8,0,0,0-8-8H56v16h4A8,8,0,0,0,68,172Zm100,8a40,40,0,0,1-40,40H112a12,12,0,0,1-12-12V152a12,12,0,0,1,12-12h16A40,40,0,0,1,168,180Zm-24,0a16,16,0,0,0-16-16h-4v32h4A16,16,0,0,0,144,180ZM36,108V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.52l56,56A12,12,0,0,1,220,88v20a12,12,0,0,1-24,0v-4H148a12,12,0,0,1-12-12V44H60v64a12,12,0,0,1-24,0ZM160,57V80h23Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),t.createElement("path",{d:"M224,152a8,8,0,0,1-8,8H192v16h16a8,8,0,0,1,0,16H192v16a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8h32A8,8,0,0,1,224,152ZM92,172a28,28,0,0,1-28,28H56v8a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8H64A28,28,0,0,1,92,172Zm-16,0a12,12,0,0,0-12-12H56v24h8A12,12,0,0,0,76,172Zm88,8a36,36,0,0,1-36,36H112a8,8,0,0,1-8-8V152a8,8,0,0,1,8-8h16A36,36,0,0,1,164,180Zm-16,0a20,20,0,0,0-20-20h-8v40h8A20,20,0,0,0,148,180ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.69L160,51.31Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M44,120H212a4,4,0,0,0,4-4V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76A4,4,0,0,0,44,120ZM152,44l44,44H152Zm72,108.53a8.18,8.18,0,0,1-8.25,7.47H192v16h15.73a8.17,8.17,0,0,1,8.25,7.47,8,8,0,0,1-8,8.53H192v15.73a8.17,8.17,0,0,1-7.47,8.25,8,8,0,0,1-8.53-8V152a8,8,0,0,1,8-8h32A8,8,0,0,1,224,152.53ZM64,144H48a8,8,0,0,0-8,8v55.73A8.17,8.17,0,0,0,47.47,216,8,8,0,0,0,56,208v-8h7.4c15.24,0,28.14-11.92,28.59-27.15A28,28,0,0,0,64,144Zm-.35,40H56V160h8a12,12,0,0,1,12,13.16A12.25,12.25,0,0,1,63.65,184ZM128,144H112a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8h15.32c19.66,0,36.21-15.48,36.67-35.13A36,36,0,0,0,128,144Zm-.49,56H120V160h8a20,20,0,0,1,20,20.77C147.58,191.59,138.34,200,127.51,200Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M222,152a6,6,0,0,1-6,6H190v20h18a6,6,0,0,1,0,12H190v18a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6h32A6,6,0,0,1,222,152ZM90,172a26,26,0,0,1-26,26H54v10a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6H64A26,26,0,0,1,90,172Zm-12,0a14,14,0,0,0-14-14H54v28H64A14,14,0,0,0,78,172Zm84,8a34,34,0,0,1-34,34H112a6,6,0,0,1-6-6V152a6,6,0,0,1,6-6h16A34,34,0,0,1,162,180Zm-12,0a22,22,0,0,0-22-22H118v44h10A22,22,0,0,0,150,180ZM42,112V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88v24a6,6,0,0,1-12,0V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,0,1-12,0ZM158,82h35.52L158,46.48Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M224,152a8,8,0,0,1-8,8H192v16h16a8,8,0,0,1,0,16H192v16a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8h32A8,8,0,0,1,224,152ZM92,172a28,28,0,0,1-28,28H56v8a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8H64A28,28,0,0,1,92,172Zm-16,0a12,12,0,0,0-12-12H56v24h8A12,12,0,0,0,76,172Zm88,8a36,36,0,0,1-36,36H112a8,8,0,0,1-8-8V152a8,8,0,0,1,8-8h16A36,36,0,0,1,164,180Zm-16,0a20,20,0,0,0-20-20h-8v40h8A20,20,0,0,0,148,180ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.69L160,51.31Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M220,152a4,4,0,0,1-4,4H188v24h20a4,4,0,0,1,0,8H188v20a4,4,0,0,1-8,0V152a4,4,0,0,1,4-4h32A4,4,0,0,1,220,152ZM88,172a24,24,0,0,1-24,24H52v12a4,4,0,0,1-8,0V152a4,4,0,0,1,4-4H64A24,24,0,0,1,88,172Zm-8,0a16,16,0,0,0-16-16H52v32H64A16,16,0,0,0,80,172Zm80,8a32,32,0,0,1-32,32H112a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4h16A32,32,0,0,1,160,180Zm-8,0a24,24,0,0,0-24-24H116v48h12A24,24,0,0,0,152,180ZM44,112V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88v24a4,4,0,0,1-8,0V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4v72a4,4,0,0,1-8,0ZM156,84h42.34L156,41.65Z"}))]]),Ne=t.forwardRef((e,a)=>t.createElement(t0,{ref:a,...e,weights:N2}));Ne.displayName="FilePdfIcon";const F2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M232,152a12,12,0,0,1-12,12h-8v44a12,12,0,0,1-24,0V164h-8a12,12,0,0,1,0-24h40A12,12,0,0,1,232,152ZM92,172a32,32,0,0,1-32,32H56v4a12,12,0,0,1-24,0V152a12,12,0,0,1,12-12H60A32,32,0,0,1,92,172Zm-24,0a8,8,0,0,0-8-8H56v16h4A8,8,0,0,0,68,172Zm96,0a32,32,0,0,1-32,32h-4v4a12,12,0,0,1-24,0V152a12,12,0,0,1,12-12h16A32,32,0,0,1,164,172Zm-24,0a8,8,0,0,0-8-8h-4v16h4A8,8,0,0,0,140,172ZM36,108V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.52l56,56A12,12,0,0,1,220,88v20a12,12,0,0,1-24,0v-4H148a12,12,0,0,1-12-12V44H60v64a12,12,0,0,1-24,0ZM160,80h23L160,57Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),t.createElement("path",{d:"M224,152a8,8,0,0,1-8,8H204v48a8,8,0,0,1-16,0V160H176a8,8,0,0,1,0-16h40A8,8,0,0,1,224,152ZM92,172a28,28,0,0,1-28,28H56v8a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8H64A28,28,0,0,1,92,172Zm-16,0a12,12,0,0,0-12-12H56v24h8A12,12,0,0,0,76,172Zm84,0a28,28,0,0,1-28,28h-8v8a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8h16A28,28,0,0,1,160,172Zm-16,0a12,12,0,0,0-12-12h-8v24h8A12,12,0,0,0,144,172ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.69L160,51.31Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M224,152.53a8.17,8.17,0,0,1-8.25,7.47H204v47.73a8.17,8.17,0,0,1-7.47,8.25,8,8,0,0,1-8.53-8V160H176.27a8.17,8.17,0,0,1-8.25-7.47,8,8,0,0,1,8-8.53h40A8,8,0,0,1,224,152.53ZM92,172.85C91.54,188.08,78.64,200,63.4,200H56v7.73A8.17,8.17,0,0,1,48.53,216,8,8,0,0,1,40,208V152a8,8,0,0,1,8-8H64A28,28,0,0,1,92,172.85Zm-16-2A12.25,12.25,0,0,0,63.65,160H56v24h8A12,12,0,0,0,76,170.84Zm84,2C159.54,188.08,146.64,200,131.4,200H124v7.73a8.17,8.17,0,0,1-7.47,8.25,8,8,0,0,1-8.53-8V152a8,8,0,0,1,8-8h16A28,28,0,0,1,160,172.85Zm-16-2A12.25,12.25,0,0,0,131.65,160H124v24h8A12,12,0,0,0,144,170.84ZM40,116V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v28a4,4,0,0,1-4,4H44A4,4,0,0,1,40,116ZM152,88h44L152,44Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M222,152a6,6,0,0,1-6,6H202v50a6,6,0,0,1-12,0V158H176a6,6,0,0,1,0-12h40A6,6,0,0,1,222,152ZM90,172a26,26,0,0,1-26,26H54v10a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6H64A26,26,0,0,1,90,172Zm-12,0a14,14,0,0,0-14-14H54v28H64A14,14,0,0,0,78,172Zm80,0a26,26,0,0,1-26,26H122v10a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6h16A26,26,0,0,1,158,172Zm-12,0a14,14,0,0,0-14-14H122v28h10A14,14,0,0,0,146,172ZM42,112V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88v24a6,6,0,0,1-12,0V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,0,1-12,0ZM158,82h35.52L158,46.48Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M224,152a8,8,0,0,1-8,8H204v48a8,8,0,0,1-16,0V160H176a8,8,0,0,1,0-16h40A8,8,0,0,1,224,152ZM92,172a28,28,0,0,1-28,28H56v8a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8H64A28,28,0,0,1,92,172Zm-16,0a12,12,0,0,0-12-12H56v24h8A12,12,0,0,0,76,172Zm84,0a28,28,0,0,1-28,28h-8v8a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8h16A28,28,0,0,1,160,172Zm-16,0a12,12,0,0,0-12-12h-8v24h8A12,12,0,0,0,144,172ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.69L160,51.31Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M220,152a4,4,0,0,1-4,4H200v52a4,4,0,0,1-8,0V156H176a4,4,0,0,1,0-8h40A4,4,0,0,1,220,152ZM88,172a24,24,0,0,1-24,24H52v12a4,4,0,0,1-8,0V152a4,4,0,0,1,4-4H64A24,24,0,0,1,88,172Zm-8,0a16,16,0,0,0-16-16H52v32H64A16,16,0,0,0,80,172Zm76,0a24,24,0,0,1-24,24H120v12a4,4,0,0,1-8,0V152a4,4,0,0,1,4-4h16A24,24,0,0,1,156,172Zm-8,0a16,16,0,0,0-16-16H120v32h12A16,16,0,0,0,148,172ZM44,112V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88v24a4,4,0,0,1-8,0V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4v72a4,4,0,0,1-8,0ZM156,84h42.34L156,41.65Z"}))]]),Fe=t.forwardRef((e,a)=>t.createElement(t0,{ref:a,...e,weights:F2}));Fe.displayName="FilePptIcon";const P2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.52ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Zm112-80a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,132Zm0,40a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,172Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-32-80a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,136Zm0,32a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,168Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,176H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm-8-56V44l44,44Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Zm-34-82a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,136Zm0,32a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,168Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-32-80a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,136Zm0,32a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,168Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Zm-36-84a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,136Zm0,32a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,168Z"}))]]),Pe=t.forwardRef((e,a)=>t.createElement(t0,{ref:a,...e,weights:P2}));Pe.displayName="FileTextIcon";const T2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M216.49,79.51l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68a12,12,0,0,0,24,0V44h76V92a12,12,0,0,0,12,12h48V212a12,12,0,0,0,0,24h4a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.51ZM160,57l23,23H160Zm-1.91,84.69a12,12,0,0,0-11.92-.15L126.5,152.44A20,20,0,0,0,108,140H48a20,20,0,0,0-20,20v48a20,20,0,0,0,20,20h60a20,20,0,0,0,18.5-12.44l19.67,10.93A12,12,0,0,0,164,216V152A12,12,0,0,0,158.09,141.66ZM104,204H52V164h52Zm36-8.39-12-6.67v-9.88l12-6.67Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,88H152V32Zm-88,72a8,8,0,0,0-8-8H48a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V196l32,20V152l-32,20Z",opacity:"0.2"}),t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216h-8a8,8,0,0,0,0,16h8a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM155.88,145a8,8,0,0,0-8.12.22l-19.95,12.46A16,16,0,0,0,112,144H48a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h64a16,16,0,0,0,15.81-13.68l19.95,12.46A8,8,0,0,0,160,216V152A8,8,0,0,0,155.88,145ZM112,208H48V160h64v48Zm32-6.43-16-10V176.43l16-10Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216h-8a8,8,0,0,0,0,16h8a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM155.88,145a8,8,0,0,0-8.12.22l-19.95,12.46A16,16,0,0,0,112,144H48a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h64a16,16,0,0,0,15.81-13.68l19.95,12.46A8,8,0,0,0,160,216V152A8,8,0,0,0,155.88,145ZM144,201.57l-16-10V176.43l16-10Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216a2,2,0,0,1-2,2h-8a6,6,0,0,0,0,12h8a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158Zm-3.09,100.27a6,6,0,0,0-6.09.16L126,161.17V160a14,14,0,0,0-14-14H48a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h64a14,14,0,0,0,14-14v-1.17l22.82,14.26A6,6,0,0,0,158,216V152A6,6,0,0,0,154.91,146.75ZM114,208a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V160a2,2,0,0,1,2-2h64a2,2,0,0,1,2,2Zm32-2.83-20-12.5V175.33l20-12.5Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216h-8a8,8,0,0,0,0,16h8a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM155.88,145a8,8,0,0,0-8.12.22l-19.95,12.46A16,16,0,0,0,112,144H48a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h64a16,16,0,0,0,15.81-13.68l19.95,12.46A8,8,0,0,0,160,216V152A8,8,0,0,0,155.88,145ZM112,208H48V160h64v48Zm32-6.43-16-10V176.43l16-10Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216a4,4,0,0,1-4,4h-8a4,4,0,0,0,0,8h8a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM153.94,148.5a4,4,0,0,0-4.06.11L124,164.78V160a12,12,0,0,0-12-12H48a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h64a12,12,0,0,0,12-12v-4.78l25.88,16.17A4,4,0,0,0,152,220a4.06,4.06,0,0,0,1.94-.5A4,4,0,0,0,156,216V152A4,4,0,0,0,153.94,148.5ZM116,208a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V160a4,4,0,0,1,4-4h64a4,4,0,0,1,4,4Zm32,.78-24-15V174.22l24-15Z"}))]]),Te=t.forwardRef((e,a)=>t.createElement(t0,{ref:a,...e,weights:T2}));Te.displayName="FileVideoIcon";const O2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M160,208a12,12,0,0,1-12,12H120a12,12,0,0,1-12-12V152a12,12,0,0,1,24,0v44h16A12,12,0,0,1,160,208ZM91,142.22A12,12,0,0,0,74.24,145L64,159.34,53.77,145a12,12,0,1,0-19.53,14l15,21-15,21A12,12,0,1,0,53.77,215L64,200.62,74.24,215A12,12,0,0,0,93.77,201l-15-21,15-21A12,12,0,0,0,91,142.22Zm122.53,32.05c-5.12-3.45-11.32-5.24-16.79-6.82a79.69,79.69,0,0,1-7.92-2.59c2.45-1.18,9.71-1.3,16.07.33A12,12,0,0,0,211,142a69,69,0,0,0-12-1.86c-9.93-.66-18,1.08-24.1,5.17a24.45,24.45,0,0,0-10.69,17.76c-1.1,8.74,2.49,16.27,10.11,21.19,4.78,3.09,10.36,4.7,15.75,6.26,3,.89,7.94,2.3,9.88,3.53a2.48,2.48,0,0,1-.21.71c-1.37,1.55-9.58,1.79-16.39-.06a12,12,0,1,0-6.46,23.11A63.75,63.75,0,0,0,193.1,220c6.46,0,13.73-1.17,19.73-5.15a24.73,24.73,0,0,0,10.95-18C225,187.53,221.33,179.53,213.51,174.27ZM36,108V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.51l56,56A12,12,0,0,1,220,88v20a12,12,0,1,1-24,0v-4H148a12,12,0,0,1-12-12V44H60v64a12,12,0,1,1-24,0ZM160,80h23L160,57Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),t.createElement("path",{d:"M156,208a8,8,0,0,1-8,8H120a8,8,0,0,1-8-8V152a8,8,0,0,1,16,0v48h20A8,8,0,0,1,156,208ZM92.65,145.49a8,8,0,0,0-11.16,1.86L68,166.24,54.51,147.35a8,8,0,1,0-13,9.3L58.17,180,41.49,203.35a8,8,0,0,0,13,9.3L68,193.76l13.49,18.89a8,8,0,0,0,13-9.3L77.83,180l16.68-23.35A8,8,0,0,0,92.65,145.49Zm98.94,25.82c-4-1.16-8.14-2.35-10.45-3.84-1.25-.82-1.23-1-1.12-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.82-.56a8,8,0,0,0,4.07-15.48c-2.11-.55-21-5.22-32.83,2.76a20.58,20.58,0,0,0-8.95,14.94c-2,15.89,13.65,20.42,23,23.12,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.33-2.15,3.93-4.6,3.06-15.16,1.56-19.54.35A8,8,0,0,0,173.93,214a60.63,60.63,0,0,0,15.19,2c5.82,0,12.3-1,17.49-4.46a20.81,20.81,0,0,0,9.18-15.23C218,179,201.48,174.17,191.59,171.31ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,1,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.68L160,51.31Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M44,120H212a4,4,0,0,0,4-4V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76A4,4,0,0,0,44,120ZM152,44l44,44H152Zm4,164.53a8.18,8.18,0,0,1-8.25,7.47H120a8,8,0,0,1-8-8V152.27a8.18,8.18,0,0,1,7.47-8.25,8,8,0,0,1,8.53,8v48h20A8,8,0,0,1,156,208.53ZM94.51,156.65,77.83,180l16.68,23.35a8,8,0,0,1-13,9.3L68,193.76,54.51,212.65a8,8,0,1,1-13-9.3L58.17,180,41.49,156.65a8,8,0,0,1,2.3-11.46,8.19,8.19,0,0,1,10.88,2.38L68,166.24l13.49-18.89a8,8,0,0,1,13,9.3Zm121.28,39.66a20.81,20.81,0,0,1-9.18,15.23C201.42,215,194.94,216,189.12,216a60.63,60.63,0,0,1-15.19-2,8,8,0,0,1,4.31-15.41c4.38,1.21,14.94,2.71,19.54-.35.89-.6,1.84-1.52,2.15-3.93.34-2.67-.72-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.12a20.58,20.58,0,0,1,8.95-14.94c11.84-8,30.72-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.48-1.17-15.22-2.56-19.82.56a4.54,4.54,0,0,0-2,3.67c-.11.9-.13,1.08,1.12,1.9,2.31,1.49,6.45,2.68,10.45,3.84C201.48,174.17,218,179,215.79,196.31Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M154,208a6,6,0,0,1-6,6H120a6,6,0,0,1-6-6V152a6,6,0,1,1,12,0v50h22A6,6,0,0,1,154,208ZM91.48,147.11a6,6,0,0,0-8.36,1.39L68,169.67,52.88,148.5a6,6,0,1,0-9.76,7L60.63,180,43.12,204.5a6,6,0,1,0,9.76,7L68,190.31l15.12,21.16A6,6,0,0,0,88,214a5.91,5.91,0,0,0,3.48-1.12,6,6,0,0,0,1.4-8.37L75.37,180l17.51-24.51A6,6,0,0,0,91.48,147.11ZM191,173.22c-10.85-3.13-13.41-4.69-13-7.91a6.59,6.59,0,0,1,2.88-5.08c5.6-3.79,17.65-1.83,21.44-.84a6,6,0,0,0,3.07-11.6c-2-.54-20.1-5-31.21,2.48a18.64,18.64,0,0,0-8.08,13.54c-1.8,14.19,12.26,18.25,21.57,20.94,12.12,3.5,14.77,5.33,14.2,9.76a6.85,6.85,0,0,1-3,5.34c-5.61,3.73-17.48,1.64-21.19.62A6,6,0,0,0,174.47,212a59.41,59.41,0,0,0,14.68,2c5.49,0,11.54-.95,16.36-4.14a18.89,18.89,0,0,0,8.31-13.81C215.83,180.39,200.91,176.08,191,173.22ZM42,112V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.24,1.76l56,56A6,6,0,0,1,214,88v24a6,6,0,1,1-12,0V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,1,1-12,0ZM158,82H193.5L158,46.48Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M156,208a8,8,0,0,1-8,8H120a8,8,0,0,1-8-8V152a8,8,0,0,1,16,0v48h20A8,8,0,0,1,156,208ZM92.65,145.49a8,8,0,0,0-11.16,1.86L68,166.24,54.51,147.35a8,8,0,1,0-13,9.3L58.17,180,41.49,203.35a8,8,0,0,0,13,9.3L68,193.76l13.49,18.89a8,8,0,0,0,13-9.3L77.83,180l16.68-23.35A8,8,0,0,0,92.65,145.49Zm98.94,25.82c-4-1.16-8.14-2.35-10.45-3.84-1.25-.82-1.23-1-1.12-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.34-1.72,19.82-.56a8,8,0,0,0,4.07-15.48c-2.11-.55-21-5.22-32.83,2.76a20.58,20.58,0,0,0-8.95,14.95c-2,15.88,13.65,20.41,23,23.11,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.33-2.15,3.93-4.6,3.06-15.16,1.55-19.54.35A8,8,0,0,0,173.93,214a60.63,60.63,0,0,0,15.19,2c5.82,0,12.3-1,17.49-4.46a20.81,20.81,0,0,0,9.18-15.23C218,179,201.48,174.17,191.59,171.31ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,1,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.68L160,51.31Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M152,208a4,4,0,0,1-4,4H120a4,4,0,0,1-4-4V152a4,4,0,0,1,8,0v52h24A4,4,0,0,1,152,208ZM90.32,148.75a4,4,0,0,0-5.58.92L68,173.12,51.25,149.67a4,4,0,0,0-6.5,4.66L63.08,180,44.75,205.67a4,4,0,0,0,.93,5.58A3.91,3.91,0,0,0,48,212a4,4,0,0,0,3.25-1.67L68,186.88l16.74,23.45A4,4,0,0,0,88,212a3.91,3.91,0,0,0,2.32-.75,4,4,0,0,0,.93-5.58L72.91,180l18.34-25.67A4,4,0,0,0,90.32,148.75Zm100.17,26.4c-10.53-3-15.08-4.91-14.43-10.08a8.57,8.57,0,0,1,3.75-6.49c6.26-4.23,18.77-2.24,23.07-1.11a4,4,0,0,0,2-7.74,61.33,61.33,0,0,0-10.48-1.61c-8.11-.54-14.54.75-19.09,3.82a16.63,16.63,0,0,0-7.22,12.13c-1.59,12.49,10.46,16,20.14,18.77,11.25,3.25,16.46,5.49,15.63,11.94a8.93,8.93,0,0,1-3.9,6.75c-6.28,4.17-18.61,2.05-22.83.88a4,4,0,1,0-2.15,7.7A57.7,57.7,0,0,0,189.19,212c5.17,0,10.83-.86,15.22-3.77a17,17,0,0,0,7.43-12.41C213.63,181.84,200.26,178,190.49,175.15ZM204,92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4v72a4,4,0,0,1-8,0V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88v24a4,4,0,0,1-8,0Zm-5.65-8L156,41.65V84Z"}))]]),Oe=t.forwardRef((e,a)=>t.createElement(t0,{ref:a,...e,weights:O2}));Oe.displayName="FileXlsIcon";const _2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M188,140H172a12,12,0,0,0-12,12v56a12,12,0,0,0,24,0v-4h4a32,32,0,0,0,0-64Zm0,40h-4V164h4a8,8,0,0,1,0,16Zm-48-28v56a12,12,0,0,1-24,0V152a12,12,0,0,1,24,0ZM96,208a12,12,0,0,1-12,12H52a12,12,0,0,1-10.42-17.95L63.32,164H52a12,12,0,0,1,0-24H84A12,12,0,0,1,94.42,158L72.68,196H84A12,12,0,0,1,96,208ZM216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68a12,12,0,0,0,24,0V44h76V92a12,12,0,0,0,12,12h48v4a12,12,0,0,0,24,0V88A12,12,0,0,0,216.49,79.52ZM160,80V57l23,23Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),t.createElement("path",{d:"M184,144H168a8,8,0,0,0-8,8v56a8,8,0,0,0,16,0v-8h8a28,28,0,0,0,0-56Zm0,40h-8V160h8a12,12,0,0,1,0,24Zm-48-32v56a8,8,0,0,1-16,0V152a8,8,0,0,1,16,0ZM96,208a8,8,0,0,1-8,8H56a8,8,0,0,1-7-12l25.16-44H56a8,8,0,0,1,0-16H88a8,8,0,0,1,7,12L69.79,200H88A8,8,0,0,1,96,208ZM213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM160,80V51.31L188.69,80Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M184,144H168a8,8,0,0,0-8,8v55.73a8.17,8.17,0,0,0,7.47,8.25,8,8,0,0,0,8.53-8v-8h7.4c15.24,0,28.14-11.92,28.59-27.15A28,28,0,0,0,184,144Zm-.35,40H176V160h8A12,12,0,0,1,196,173.16,12.25,12.25,0,0,1,183.65,184ZM136,152v55.73a8.17,8.17,0,0,1-7.47,8.25,8,8,0,0,1-8.53-8V152.27a8.17,8.17,0,0,1,7.47-8.25A8,8,0,0,1,136,152ZM96,208.53A8.17,8.17,0,0,1,87.73,216H56.23a8.27,8.27,0,0,1-6-2.5A8,8,0,0,1,49.05,204l25.16-44H56.27A8.17,8.17,0,0,1,48,152.53,8,8,0,0,1,56,144H87.77a8.27,8.27,0,0,1,6,2.5A8,8,0,0,1,95,156L69.79,200H88A8,8,0,0,1,96,208.53ZM213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76a4,4,0,0,0,4,4H212a4,4,0,0,0,4-4V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M184,146H168a6,6,0,0,0-6,6v56a6,6,0,0,0,12,0V198h10a26,26,0,0,0,0-52Zm0,40H174V158h10a14,14,0,0,1,0,28Zm-50-34v56a6,6,0,0,1-12,0V152a6,6,0,0,1,12,0ZM94,208a6,6,0,0,1-6,6H56a6,6,0,0,1-5.21-9l26.87-47H56a6,6,0,0,1,0-12H88a6,6,0,0,1,5.21,9L66.34,202H88A6,6,0,0,1,94,208ZM212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88A6,6,0,0,0,212.24,83.76ZM158,82V46.48L193.52,82Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M184,144H168a8,8,0,0,0-8,8v56a8,8,0,0,0,16,0v-8h8a28,28,0,0,0,0-56Zm0,40h-8V160h8a12,12,0,0,1,0,24Zm-48-32v56a8,8,0,0,1-16,0V152a8,8,0,0,1,16,0ZM96,208a8,8,0,0,1-8,8H56a8,8,0,0,1-7-12l25.16-44H56a8,8,0,0,1,0-16H88a8,8,0,0,1,7,12L69.79,200H88A8,8,0,0,1,96,208ZM213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM160,80V51.31L188.69,80Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M184,148H168a4,4,0,0,0-4,4v56a4,4,0,0,0,8,0V196h12a24,24,0,0,0,0-48Zm0,40H172V156h12a16,16,0,0,1,0,32Zm-52-36v56a4,4,0,0,1-8,0V152a4,4,0,0,1,8,0Zm-40.53,2L62.89,204H88a4,4,0,0,1,0,8H56a4,4,0,0,1-3.47-6l28.58-50H56a4,4,0,0,1,0-8H88a4,4,0,0,1,3.47,6ZM210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52v20a4,4,0,0,0,8,0V88A4,4,0,0,0,210.83,85.17ZM156,84V41.65L198.34,84Z"}))]]),_e=t.forwardRef((e,a)=>t.createElement(t0,{ref:a,...e,weights:_2}));_e.displayName="FileZipIcon";const je={icon:{light:"#6a7282",dark:"#99a1af"},iconSelected:{light:"#1447e6",dark:"#51a2ff"},checkedRing:{light:"#155dfc",dark:"#51a2ff"}},j2={markdown:{light:"#0084d1",dark:"#00bcff"},pdf:{light:"#e7000b",dark:"#ff6467"},spreadsheet:{light:"#007a55",dark:"#00d492"},csv:{light:"#007a55",dark:"#00d492"},document:{light:"#155dfc",dark:"#51a2ff"},presentation:{light:"#ca3500",dark:"#ff8904"},image:{light:"#00786f",dark:"#00d5be"},audio:{light:"#e60076",dark:"#fb64b6"},video:{light:"#7f22fe",dark:"#a684ff"},archive:{light:"#bb4d00",dark:"#ffb900"},code:{light:"#9810fa",dark:"#c27aff"},text:je.icon},$e="#71829b",l0={rowHover:"hover:bg-[color:light-dark(#f3f4f6,#1e2939)]",rowSelected:"bg-[color:light-dark(#eff6ff,#162456)]",checkedRing:"inset-ring-1 inset-ring-[color:light-dark(#155dfc,#51a2ff)]",name:"text-[color:light-dark(#364153,#e5e7eb)]",nameSelected:"text-[color:light-dark(#193cb8,#bedbff)]",gridEdge:"text-[color:light-dark(#4a5565,#d1d5dc)]",icon:"text-[color:light-dark(#6a7282,#99a1af)]",iconSelected:"text-[color:light-dark(#1447e6,#51a2ff)]"},c0={markdown:"text-[color:light-dark(#0084d1,#00bcff)]",pdf:"text-[color:light-dark(#e7000b,#ff6467)]",spreadsheet:"text-[color:light-dark(#007a55,#00d492)]",csv:"text-[color:light-dark(#007a55,#00d492)]",document:"text-[color:light-dark(#155dfc,#51a2ff)]",presentation:"text-[color:light-dark(#ca3500,#ff8904)]",image:"text-[color:light-dark(#00786f,#00d5be)]",audio:"text-[color:light-dark(#e60076,#fb64b6)]",video:"text-[color:light-dark(#7f22fe,#a684ff)]",archive:"text-[color:light-dark(#bb4d00,#ffb900)]",code:"text-[color:light-dark(#9810fa,#c27aff)]",text:"text-[color:light-dark(#6a7282,#99a1af)]"},De="text-[length:var(--dt-font-size-body,0.8125rem)]",$2=`${De} leading-[max(var(--dt-line-height-body,1.25rem),1.5em)]`,x1=44,D2=12,z2=8,o0=14,B2=14,ze=e=>e===void 0?void 0:{fontSize:typeof e=="number"?`${e}px`:e},e0=e=>({width:e,height:e}),I={container:"directory-tree-container relative h-full overflow-y-hidden pb-[3px] pr-[2px]",containerPending:"cursor-progress",entry:`directory-tree-entry flex items-center cursor-pointer relative select-none ${$2}`,entryHover:`directory-tree-entry--hover ${l0.rowHover}`,entrySelected:`directory-tree-entry--selected ${l0.rowSelected}`,entryItemSelected:`directory-tree-entry--item-selected ${l0.rowSelected} ${l0.checkedRing}`,expandIcon:`directory-tree-expand-icon flex-shrink-0 flex items-center justify-center ${l0.icon}`,expandIconSelected:`directory-tree-expand-icon--selected ${l0.iconSelected}`,typeIcon:`directory-tree-type-icon flex-shrink-0 flex items-center justify-center ${l0.icon}`,typeIconSelected:`directory-tree-type-icon--selected ${l0.iconSelected}`,name:`directory-tree-name overflow-hidden text-ellipsis whitespace-nowrap ml-1 ${De} font-normal ${l0.name}`,nameDirectory:"directory-tree-name--directory font-medium",nameSelected:`directory-tree-name--selected font-semibold ${l0.nameSelected}`},P1=e=>{const a=e.slice(e.lastIndexOf("/")+1),n=a.lastIndexOf(".");return n<=0?"":a.slice(n+1).toLowerCase()},W2=/^[a-z][a-z\d+.-]*:\/\//i,ve=e=>P1(W2.test(e)?e.split(/[?#]/,1)[0]:e),Be=e=>P1(e.name)||ve(e.relativePath)||ve(e.absolutePath),We=({isDirectory:e,isExpanded:a,showExpandIcons:n,useCanvasExpandIcons:r,expandIconSize:c})=>{const s=c?{width:c,height:c}:void 0,i=c?"":"h-4 w-4";return!(n&&e)||r?m.jsx("span",{className:i,style:s,"aria-hidden":"true"}):a?m.jsx(Z2,{className:i,style:s}):m.jsx(y2,{className:i,style:s})},I1=(e,a)=>{if(e==null||typeof e=="boolean")return null;if(typeof e=="function")return console.warn(`[DirectoryTree] Function returned by renderer for "${a}". Return a node.`),null;if(typeof e=="object"){if("then"in e)return console.warn(`[DirectoryTree] Promise returned for "${a}". Not supported.`),null;if(Array.isArray(e)){const r=e.map(c=>I1(c,a)).filter(Boolean);return r.length?r:null}const n=e.type;if(n&&n.$$typeof===Symbol.for("react.lazy"))return console.warn(`[DirectoryTree] Lazy component for "${a}". Not supported.`),null}return e},K2={markdown:e=>m.jsx(ke,{className:c0.markdown,style:e0(e)}),pdf:e=>m.jsx(Ne,{className:c0.pdf,style:e0(e)}),spreadsheet:e=>m.jsx(Oe,{className:c0.spreadsheet,style:e0(e)}),csv:e=>m.jsx(Ce,{className:c0.csv,style:e0(e)}),document:e=>m.jsx(Ie,{className:c0.document,style:e0(e)}),presentation:e=>m.jsx(Fe,{className:c0.presentation,style:e0(e)}),image:e=>m.jsx(Re,{className:c0.image,style:e0(e)}),audio:e=>m.jsx(Le,{className:c0.audio,style:e0(e)}),video:e=>m.jsx(Te,{className:c0.video,style:e0(e)}),archive:e=>m.jsx(_e,{className:c0.archive,style:e0(e)}),code:e=>m.jsx(xe,{className:c0.code,style:e0(e)}),text:e=>m.jsx(Pe,{className:c0.text,style:e0(e)})},Y2={markdown:["md","markdown","mdx"],pdf:["pdf"],spreadsheet:["xls","xlsx","xlsm","xlsb","ods"],csv:["csv","tsv"],document:["doc","docx","rtf","odt"],presentation:["ppt","pptx","odp"],image:["png","jpg","jpeg","gif","svg","webp","ico","bmp","tiff","avif"],audio:["mp3","wav","ogg","m4a","flac","aac","wma"],video:["mp4","webm","mov","avi","mkv","wmv","flv"],archive:["zip","tar","gz","7z","rar","tgz","bz2"],code:["js","mjs","cjs","ts","tsx","jsx","json","html","htm","css","scss","py","go","rs","c","cpp","h","hpp","sh","bash","yaml","yml","sql","xml","toml"],text:["txt","log"]},G2=new Map(Object.entries(Y2).flatMap(([e,a])=>a.map(n=>[n,e]))),X2=new Set(["","application/octet-stream","binary/octet-stream","text/plain","application/x-empty"]),U2=e=>(e??"").split(";",1)[0].trim().toLowerCase(),J2=e=>{if(e==="text/markdown"||e==="text/x-markdown")return"markdown";if(e==="application/pdf")return"pdf";if(e.includes("excel")||e.includes("spreadsheet"))return"spreadsheet";if(e==="text/csv"||e==="text/tab-separated-values")return"csv";if(e.includes("word")||e.includes("google-apps.document")||e==="application/rtf")return"document";if(e.includes("powerpoint")||e.includes("presentation"))return"presentation";if(e.startsWith("image/"))return"image";if(e.startsWith("audio/"))return"audio";if(e.startsWith("video/"))return"video";if(e.includes("zip")||e.includes("tar")||e.includes("compressed")||e.includes("archive"))return"archive";if(e==="application/json"||e.includes("javascript")||e.includes("typescript")||e.includes("xml")||e.startsWith("text/html")||e.startsWith("text/css")||e.includes("x-python")||e.includes("x-sh")||e.includes("x-go")||e.includes("x-rust"))return"code";if(e.startsWith("text/"))return"text"},q2=(e,a,n,r)=>{const c=U2(e),s=J2(c),i=G2.get((a||(n?P1(n):"")).toLowerCase()),f=(X2.has(c)?[i,s]:[s,i]).find(p=>p!==void 0);return f===void 0?m.jsx(Se,{className:l0.icon,style:e0(r)}):K2[f](r)},Ke=(e,a,n)=>{const{entry:r,isDirectory:c,isExpanded:s,extension:i,mimeType:h}=e;let f;const p=h||r.mimeType;return r.icon!==void 0?f=r.icon:c?f=s&&a?.directoryExpanded||a?.directory||m.jsx(b2,{style:e0(n)}):i&&a?.fileByExtension?.[i]?f=a.fileByExtension[i]:f=a?.file||q2(p,i,r.name,n),I1(typeof f=="function"?f(e):f,r.absolutePath)},Q2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ye=e=>{if(!e)return;const a=Object.entries(e).filter(([,n])=>n!=null);if(a.length!==0)return Object.fromEntries(a.map(([n,r])=>[`data-${Q2(n)}`,String(r)]))},Ge=["color","background","backgroundColor","backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundClip","backgroundOrigin","backgroundAttachment","backgroundBlendMode","opacity","boxShadow","filter","backdropFilter","mixBlendMode","borderColor","borderRadius","outline","outlineColor","outlineStyle","outlineWidth","outlineOffset","textShadow","accentColor","caretColor","cursor","fontFamily","fontSize","fontStyle","fontWeight","fontVariant","fontFeatureSettings","fontVariationSettings","fontKerning","letterSpacing","lineHeight","textDecoration","textDecorationColor","textDecorationLine","textDecorationStyle","textDecorationThickness","textUnderlineOffset","textTransform"],Xe=["color","opacity"],et="the row's box belongs to the tree (height: visual.itemHeight, indent: visual.indentSize, icons: visual.typeIconSize, text size: visual.fontSize)",tt=new Set(Ge),at=new Set(Xe),He=(e,a)=>{const n=a===void 0?e.option:`${e.option}.${a}`;return e.absolutePath===void 0?n:`${n} of "${e.absolutePath}"`},Ue=(e,a,n,r)=>{if(e!==void 0){if(typeof e!="object"||e===null)throw new RangeError(`${He(n,void 0)} must be an object of CSS properties or undefined, got ${e===null?"null":typeof e}.`);for(const[c,s]of Object.entries(e))if(s!==void 0&&!a.has(c))throw new RangeError(`${He(n,c)} cannot be set: ${et}, so ${r}.`)}},G0=(e,a)=>Ue(e,tt,a,"a row style accepts only paint and text properties (ROW_STYLE_PROPERTIES)"),nt=(e,a)=>Ue(e,at,a,"the expand icon style accepts only the glyph's colour and opacity (EXPAND_ICON_STYLE_PROPERTIES), and the 14 px expand box is the tree's"),rt=500,Je=({entry:e,isDirectory:a,isExpanded:n,isItemSelected:r,selectionMode:c,onSelectionChange:s,onEntryClick:i,toggleDirectory:h,onToggleDirectoryRecursive:f})=>{const p=o.useRef(null);o.useEffect(()=>()=>{p.current&&window.clearTimeout(p.current)},[]);const y=o.useCallback(()=>{c!=="none"&&!a&&s&&s(e,!r);let V=!1;return i({entry:e,isDirectory:a,isExpanded:n,preventDefault:()=>{V=!0}}),a&&!V},[e,a,n,r,c,s,i]),b=o.useCallback(V=>{V.stopPropagation(),y()&&(p.current?(window.clearTimeout(p.current),p.current=null,f(e)):p.current=window.setTimeout(()=>{h(e.absolutePath),p.current=null},rt))},[y,e,f,h]),E=o.useCallback(V=>{V.stopPropagation(),y()&&h(e.absolutePath)},[y,e,h]);return{handleClick:b,handleKeyActivate:E}},qe=e=>e==="right"?"dt-grid-cell--right":e==="center"?"dt-grid-cell--center":"",Ve=(e,a)=>e.children!==void 0&&a(e.absolutePath),Qe=(e,a)=>({width:e,gridTemplateColumns:a}),e2=o.memo(({entry:e,indentLevel:a,positionInSet:n,setSize:r,rowIndex:c,flatIndex:s,isActive:i,registerRowRef:h,onNavigationKeyDown:f,onRowFocus:p,onRowBlur:y,isSelectedForAria:b,rowHeight:E,isDirOpen:V,columns:A,numericTemplate:u,numericTotal:M,nameWidth:H,rowClassName:x,selection:{onEntryClick:w,selectedPath:S,currentPath:g,mode:_="none",selectedItems:F,onSelectionChange:P},expansion:{toggleDirectory:j,onToggleDirectoryRecursive:T},visual:{iconOverrides:s0,showExpandIcons:a0=!0,showDirectoryIcons:$=!0,showFileIcons:k=!0,useCanvasExpandIcons:i0=!1,expandIconSize:H0,typeIconSize:V0,fontSize:J,indentSize:N0,highlightStyles:q,expandIconClassName:F0,expandIconStyle:P0}})=>{G0(e.style,{option:"entry.style",absolutePath:e.absolutePath});const[A0,d0]=o.useState(!1),O=e.children!==void 0,L=O&&V(e.absolutePath),K=e.absolutePath===S,w0=e.absolutePath===g,Y=!O&&!!F?.has(e.absolutePath),T0=O?void 0:Be(e),C=o.useCallback(R=>h(s,R),[h,s]),{handleClick:m0,handleKeyActivate:B}=Je({entry:e,isDirectory:O,isExpanded:L,isItemSelected:Y,selectionMode:_,onSelectionChange:P,onEntryClick:w,toggleDirectory:j,onToggleDirectoryRecursive:T}),O0=A0?q?.hoverClassName!==void 0?q.hoverClassName:I.entryHover:"",Q=(()=>{if(O){if(K)return q?.directorySelectedClassName!==void 0?q.directorySelectedClassName:I.entrySelected}else if(K||Y)return q?.itemSelectedClassName!==void 0?q.itemSelectedClassName:z.twMerge(K&&I.entrySelected,Y&&I.entryItemSelected);return""})(),G=typeof x=="function"?x(e):x,n0=z.twMerge("dt-grid-row cursor-pointer select-none",O0,Q,G,e.className),_0=z.twMerge(I.expandIcon,F0,(K||Y)&&I.expandIconSelected),S0=z.twMerge(I.typeIcon,(K||Y)&&I.typeIconSelected),j0=z.twMerge("dt-grid-name-label ml-1",l0.name,O&&I.nameDirectory,(K||Y)&&I.nameSelected),p0=We({isDirectory:O,isExpanded:L,showExpandIcons:a0,useCanvasExpandIcons:i0,expandIconSize:H0}),X0=(O?$:k)?Ke({entry:e,isDirectory:O,isExpanded:L,isSelected:K,isItemSelected:Y,extension:T0,mimeType:e.mimeType},s0,V0):null,Z0={indentLevel:a,isDirectory:O,isExpanded:L},[M0,...$0]=A,L0=M0?.render?M0.render(e,Z0):e.label??e.name,x0={...A0?q?.hoverStyle:{},...O&&K?q?.directorySelectedStyle:{},...!O&&(K||Y)?q?.itemSelectedStyle:{}};return m.jsxs("div",{className:n0,style:{...x0,...e.style,height:E},role:"row","aria-expanded":O?L:void 0,"aria-level":a+1,"aria-posinset":n,"aria-setsize":r,"aria-rowindex":c,"aria-selected":_==="none"?void 0:b,"aria-current":w0?"page":void 0,...Ye(e.data),"data-entry-type":O?"directory":"file","data-entry-expanded":O?String(L):void 0,"data-entry-selected":K?"true":void 0,"data-entry-item-selected":Y?"true":void 0,onClick:m0,onMouseEnter:()=>d0(!0),onMouseLeave:()=>d0(!1),onFocus:R=>p(s,e.absolutePath,R.currentTarget),onBlur:R=>y(e.absolutePath,R.currentTarget),ref:C,onKeyDown:R=>{if(R.key==="Enter"||R.key===" "){R.preventDefault(),R.repeat||B(R);return}f(R,s)},tabIndex:i?0:-1,children:[m.jsxs("div",{className:z.twMerge("dt-grid-name-cell",M0?.className),role:"gridcell",style:{width:H,paddingLeft:Math.max(0,a*N0)},children:[(a0||i0)&&m.jsx("span",{className:_0,style:{...P0,width:o0,height:o0},children:p0}),(O?$:k)&&m.jsx("span",{className:S0,style:{width:V0,height:V0},children:X0}),m.jsx("span",{className:j0,style:ze(J),children:L0})]}),$0.length>0&&m.jsx("div",{className:"dt-grid-numeric-viewport",children:m.jsx("div",{className:"dt-grid-numeric-track",style:Qe(M,u),children:$0.map(R=>m.jsx("div",{className:z.twMerge("dt-grid-cell",qe(R.align),R.className),role:"gridcell",children:R.render?R.render(e,Z0):null},R.key))})})]})},(e,a)=>{if(e.entry!==a.entry)return!1;const n=Ve(e.entry,e.isDirOpen),r=Ve(a.entry,a.isDirOpen);return e.indentLevel===a.indentLevel&&e.positionInSet===a.positionInSet&&e.setSize===a.setSize&&e.rowIndex===a.rowIndex&&e.flatIndex===a.flatIndex&&e.isActive===a.isActive&&e.isSelectedForAria===a.isSelectedForAria&&e.rowHeight===a.rowHeight&&n===r&&e.columns===a.columns&&e.numericTemplate===a.numericTemplate&&e.numericTotal===a.numericTotal&&e.nameWidth===a.nameWidth&&e.rowClassName===a.rowClassName&&e.selection.selectedPath===a.selection.selectedPath&&e.selection.currentPath===a.selection.currentPath&&e.selection.mode===a.selection.mode&&e.selection.selectedItems===a.selection.selectedItems&&e.visual===a.visual});e2.displayName="DirectoryTreeGridRow";const t2=({kind:e,columns:a,numericTemplate:n,numericTotal:r,nameWidth:c,scrollBarWidth:s,className:i,nameContent:h,renderCell:f})=>{const[,...p]=a,y=e==="header"?"dt-grid-name-header":"dt-grid-name-footer",b=e==="header"?"dt-grid-header":"dt-grid-footer",E=e==="header"?"columnheader":"gridcell";return m.jsxs("div",{className:z.twMerge(b,l0.gridEdge,i),role:"row",children:[m.jsx("div",{className:z.twMerge(y,"px-1",a[0]?.className),role:E,style:{width:c},children:h}),p.length>0&&m.jsx("div",{className:"dt-grid-numeric-viewport",children:m.jsx("div",{className:"dt-grid-numeric-track",style:Qe(r,n),children:p.map(V=>m.jsx("div",{className:z.twMerge("dt-grid-cell",qe(V.align),V.className),role:E,children:f(V)},V.key))})}),m.jsx("div",{className:"dt-grid-scrollbar-spacer",style:{width:s},"aria-hidden":"true"})]})},lt=({columns:e,className:a,...n})=>m.jsx(t2,{kind:"header",columns:e,className:a,nameContent:e[0]?.header??null,renderCell:r=>r.header??null,...n}),Ze=(e,a)=>typeof e=="function"?e(a):e??null,ot=({columns:e,allEntries:a,className:n,...r})=>m.jsx(t2,{kind:"footer",columns:e,className:n,nameContent:Ze(e[0]?.footer,a),renderCell:c=>Ze(c.footer,a),...r}),ct=240,a2=96,n2=12,R1=(e,a)=>{const n=e?.width;return typeof n=="number"&&Number.isFinite(n)&&n>0?n:a},st=e=>e.slice(1).map(a=>`${R1(a,a2)}px`).join(" "),it=({measuredWidth:e,columns:a,scrollBarWidth:n=n2})=>{const r=R1(a[0],ct),c=a.slice(1).reduce((f,p)=>f+R1(p,a2),0),s=Number.isFinite(e)&&e>0?e:0,i=Math.max(0,s-r-Math.max(0,n)),h=Math.max(0,c-i);return{nameWidth:r,numericTotal:c,numericVisible:i,maxHScroll:h}},C1=(e,a)=>!Number.isFinite(e)||e<0?0:e>a?a:e,dt=e=>{const a=[],n=r=>{for(const c of r)a.push(c),c.children&&c.children.length>0&&n(c.children)};return n(e),a},r2=["entryKindDirectory","entryKindFile"],k1=[...u0.VIRTUAL_SCROLL_LABEL_KEYS,...r2],N1=Object.freeze({en:Object.freeze({entryKindDirectory:"directory",entryKindFile:"file"}),ja:Object.freeze({entryKindDirectory:"ディレクトリ",entryKindFile:"ファイル"})}),l2=Object.freeze({en:Object.freeze({...u0.VIRTUAL_SCROLL_LABEL_CATALOGS.en,...N1.en}),ja:Object.freeze({...u0.VIRTUAL_SCROLL_LABEL_CATALOGS.ja,...N1.ja})}),Me=e=>typeof e=="string"?JSON.stringify(e):e===null?"null":typeof e,ht=e=>{const a={};let n=!1;for(const r of u0.VIRTUAL_SCROLL_LABEL_KEYS){const c=Object.hasOwn(e,r)?e[r]:void 0;c!==void 0&&(a[r]=c,n=!0)}return n?a:void 0},o2=(e,a)=>{const n=u0.resolveVirtualScrollLocale(e);if(a===void 0)return l2[n];if(a===null||typeof a!="object")throw new RangeError(`[directory-tree] labels must be an object; got ${Me(a)}`);const r=Object.getPrototypeOf(a);if(r!==Object.prototype&&r!==null)throw new RangeError(`[directory-tree] labels must be a plain object (prototype Object.prototype or null); got ${Array.isArray(a)?"an array":"an object with a non-plain prototype"}`);for(const i of Object.keys(a))if(!k1.includes(i))throw new RangeError(`[directory-tree] labels.${i} is not a known label key; expected one of ${k1.join(", ")}`);const s={...u0.resolveVirtualScrollLabels(n,ht(a)),...N1[n]};for(const i of r2){const h=Object.hasOwn(a,i)?a[i]:void 0;if(h!==void 0){if(typeof h!="string"||h.trim()==="")throw new RangeError(`[directory-tree] labels.${i} must be a non-blank string; got ${Me(h)}`);s[i]=h}}return Object.freeze(s)},ut=e=>{const a={};for(const n of u0.VIRTUAL_SCROLL_LABEL_KEYS)a[n]=e[n];return Object.freeze(a)},mt=()=>{let e=null;return{mark:a=>{const n=a.composedPath();e=n,setTimeout(()=>{e===n&&(e=null)},0)},landedOn:a=>e?.includes(a)===!0}},e1=e=>typeof e=="string"?JSON.stringify(e):String(e),F1=(e,a)=>{if(typeof a!="number"||!Number.isFinite(a)||a<=0)throw new RangeError(`[directory-tree] visual.${e} must be a finite number greater than 0 (px); got ${e1(a)}.`);return a},ft=e=>{if(typeof e=="string"&&e.trim()!==""||typeof e=="number"&&Number.isFinite(e)&&e>0)return e;throw new RangeError(`[directory-tree] visual.fontSize must be a finite number greater than 0 (px) or a CSS font size that is not blank; got ${e1(e)}.`)},At=({indentSize:e,typeIconSize:a,fontSize:n})=>({indentSize:e===void 0?D2:F1("indentSize",e),typeIconSize:a===void 0?B2:F1("typeIconSize",a),fontSize:n===void 0?void 0:ft(n)}),pt=({indentSize:e,removeRootIndent:a,hasExpandBox:n})=>a?Math.max(0,e-(n?o0:0)):0,gt=(e,a,n)=>{if(typeof e!="function")return F1("itemHeight",e);const r=e(a,n);if(typeof r!="number"||!Number.isFinite(r)||r<=0)throw new RangeError(`[directory-tree] visual.itemHeight returned ${e1(r)} for ${JSON.stringify(a.absolutePath)} (row ${n}); it must return a finite number greater than 0 (px).`);return r},vt=(e,a,n)=>{const r=a===void 0?z2:a;if(typeof r!="number"||!Number.isFinite(r)||r<=0||r>o0)throw new RangeError(`[directory-tree] visual.expandIconSize must be a finite number greater than 0 and at most ${o0} (the expand box, px) while tree lines are drawn; got ${e1(r)}.`);const{indentSize:c,typeIconSize:s}=e,i=r/2,h=o0+s-r/2;if(c<i||c>h)throw new RangeError(`[directory-tree] visual.indentSize ${e1(c)} does not fit the tree lines: with typeIconSize ${s} and an expand glyph of ${r} px it must be from ${i} (half the glyph) to ${h} (the ${o0} px expand box + typeIconSize − half the glyph).`);return{indentSize:c,typeIconSize:s,glyphSize:r,originX:n}},Ht=({indentSize:e,typeIconSize:a,glyphSize:n})=>Math.min(Math.max(o0+a/2-e,n/2),o0-n/2),Vt=(e,a)=>{const n=e.length-1;if(n<=0)return 0;let r=0,c=n-1,s=0;for(;r<=c;){const i=r+c>>>1;e[i]<=a?(s=i,r=i+1):c=i-1}return s},Zt=(e,a,n)=>{if(n<=0||e.length===0||a.length!==e.length+1)return null;const r=Vt(a,n),c=e[r];return c?{path:c.entry.absolutePath,offsetInViewport:n-a[r]}:null},Mt=(e,a,n)=>{if(a.length===0||n.length!==a.length+1)return null;for(let r=0;r<a.length;r++)if(a[r].entry.absolutePath===e.path)return Math.max(0,n[r]+e.offsetInViewport);return null},yt=(e,a,n)=>{const r=[];for(let c=a;c<n;c++){const s=e[c];if(!(!s||s.length===0))for(const i of s)r.push(i)}return r},Et=(e,a,n)=>{const r=[];for(let c=a;c<n;c++){const s=e[c];if(!(!s||s.length===0))for(const i of s)r.push(i)}return r},bt=(e,a,n,r)=>{const c=Math.max(1,Math.floor(a*r)),s=Math.max(1,Math.floor(n*r));(e.width!==c||e.height!==s)&&(e.width=c,e.height=s);const i=e.style;i.width!==`${a}px`&&(i.width=`${a}px`),i.height!==`${n}px`&&(i.height=`${n}px`)},wt=(e,a,n)=>{e.lineWidth=n,e.beginPath();for(const r of a)e.moveTo(r.x1,r.y1),e.lineTo(r.x2,r.y2);e.stroke()},St=(e,a,n,r)=>{if(a.length===0)return;const c=e.strokeStyle,s=e.lineWidth,i=e.lineCap,h=e.lineJoin;e.strokeStyle=n,e.lineCap="round",e.lineJoin="round";for(const f of a){const p=r??f.size,y=Math.max(0,p/2),b=Math.max(1,Math.round(p*.08)),E=Math.max(1,Math.round(p*.14)),V=Math.max(0,y-b*.8),A=Math.max(0,V*.55);e.lineWidth=b,e.beginPath(),e.arc(f.centerX,f.centerY,Math.max(0,y-b*.3),0,Math.PI*2),e.stroke(),e.lineWidth=E,e.beginPath(),e.moveTo(f.centerX-A,f.centerY),e.lineTo(f.centerX+A,f.centerY),e.stroke(),f.isExpanded||(e.beginPath(),e.moveTo(f.centerX,f.centerY-A),e.lineTo(f.centerX,f.centerY+A),e.stroke())}e.strokeStyle=c,e.lineWidth=s,e.lineCap=i,e.lineJoin=h},c2=o.memo(({segmentsByItem:e,glyphsByItem:a,itemHeight:n,width:r,viewportHeight:c,scrollPosition:s,color:i=$e,strokeWidth:h=1,renderStartIndex:f,renderEndIndex:p,lookaheadEndIndex:y,devicePixelRatio:b,expandGlyphColor:E,expandGlyphSize:V})=>{const A=o.useRef(null),u=o.useRef(null),M=o.useRef({segmentsByItem:e,glyphsByItem:a,itemHeight:n,width:r,viewportHeight:c,scrollPosition:s,color:i,strokeWidth:h,renderStartIndex:f,renderEndIndex:p,lookaheadEndIndex:y,devicePixelRatio:b,expandGlyphColor:E,expandGlyphSize:V}),H=o.useCallback(()=>{u.current=null;const w=A.current;if(!w)return;const S=w.getContext("2d");if(!S)return;const g=M.current;if(g.width<=0||g.viewportHeight<=0){S.clearRect(0,0,w.width,w.height);return}const _=Number.isFinite(g.devicePixelRatio??NaN)?g.devicePixelRatio:typeof window<"u"&&window.devicePixelRatio||1;bt(w,g.width,g.viewportHeight,_);const F=g.segmentsByItem.length,P=typeof g.renderStartIndex=="number"&&Number.isFinite(g.renderStartIndex)?Math.max(0,Math.floor(g.renderStartIndex)):Math.max(0,Math.floor(g.scrollPosition/g.itemHeight)),j=Math.min(F,Math.ceil((g.scrollPosition+g.viewportHeight)/g.itemHeight)),T=(()=>{if(typeof g.renderEndIndex=="number"&&Number.isFinite(g.renderEndIndex)){const k=Math.floor(g.renderEndIndex);return Math.max(Math.min(F,k+1),P)}return Math.max(j,P)})(),s0=(()=>{if(typeof g.lookaheadEndIndex=="number"&&Number.isFinite(g.lookaheadEndIndex)){const k=Math.floor(g.lookaheadEndIndex),i0=Math.min(F,k+1);return Math.max(i0,T)}return Math.max(j,T)})(),a0=yt(g.segmentsByItem,P,s0),$=Et(g.glyphsByItem,P,s0);S.save(),S.scale(_,_),S.clearRect(0,0,g.width,g.viewportHeight),S.translate(0,-g.scrollPosition),S.strokeStyle=g.color,wt(S,a0,g.strokeWidth),St(S,$,g.expandGlyphColor??g.color,g.expandGlyphSize),S.restore()},[]),x=o.useCallback(()=>{u.current===null&&(u.current=window.requestAnimationFrame(H))},[H]);return o.useEffect(()=>{M.current={segmentsByItem:e,glyphsByItem:a,itemHeight:n,width:r,viewportHeight:c,scrollPosition:s,color:i,strokeWidth:h,renderStartIndex:f,renderEndIndex:p,lookaheadEndIndex:y,devicePixelRatio:b,expandGlyphColor:E,expandGlyphSize:V},x()},[e,a,n,r,c,s,i,h,f,p,y,b,E,V,x]),o.useEffect(()=>()=>{u.current!==null&&(window.cancelAnimationFrame(u.current),u.current=null)},[]),m.jsx("canvas",{ref:A,className:"pointer-events-none absolute top-0 left-0 z-0"})});c2.displayName="TreeLineCanvas";const Lt=e=>{const a=new Map;for(let n=0;n<e.length;n++){const r=e[n].entry.absolutePath;a.has(r)||a.set(r,n)}return a},ye=(e,a)=>e.selectedPath===a?e:{selectedPath:a,selectionGeneration:e.selectionGeneration+1,anchor:e.anchor},xt=(e,a)=>({...e,anchor:{path:a,selectionGeneration:e.selectionGeneration,focused:!0}}),Ct=(e,a)=>{const{anchor:n,selectionGeneration:r,selectedPath:c}=a;if(n!==null&&(n.focused||n.selectionGeneration===r)){const s=e.get(n.path);if(s!==void 0)return s}if(c!==null){const s=e.get(c);if(s!==void 0)return s}return 0},It={msOverflowStyle:"none",scrollbarWidth:"none"},Rt=()=>{let e=document.getElementById("directory-tree-webkit-scrollbar-hide");e||(e=document.createElement("style"),e.id="directory-tree-webkit-scrollbar-hide",e.textContent=".directory-tree-container::-webkit-scrollbar { display: none; }",document.head.appendChild(e))},kt=()=>()=>{},Nt=()=>!0,Ft=()=>!1,Pt=e=>{const a=o.useRef(null),n=a.current;return n!==null&&u0.VIRTUAL_SCROLL_LABEL_KEYS.every(r=>n[r]===e[r])?n:(a.current=e,e)},Ee=new Set(["top","bottom","center","nearest"]),be=e=>{const a=e?.align;if(a===void 0)return"top";if(!Ee.has(a))throw new RangeError(`[directory-tree] Unsupported scroll alignment ${JSON.stringify(a)}; expected one of ${[...Ee].join(", ")}.`);return a},Tt={position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap"},Ot=(e,a,n,r,c)=>{const s=[],i=[];let h=0;const f=(p,y,b)=>{const E=c?[...p].sort(c):p;for(let V=0;V<E.length;V++){const A=E[V],u=V===E.length-1,M=[...b,u],H=A.children!==void 0,x=H&&a(A.absolutePath,A.relativePath);let w=y,S=b;r&&(w=y-1,S=b.slice(1)),s.push({entry:A,indentLevel:w,depth:y,positionInSet:V+1,setSize:E.length}),n&&(w>h&&(h=w),i.push({id:A.absolutePath,name:A.name,absolutePath:A.absolutePath,indentLevel:w,isLastChild:u,isDirectory:H,isExpanded:x,ancestorIsLast:[...S],hideLines:r&&y===0})),H&&x&&A.children&&f(A.children,y+1,M)}};return f(e,0,[]),{flatItems:s,lineItems:i,maxIndent:h}},we=(e,a)=>{const n=e.length-1;if(n<=0)return 0;let r=0,c=n-1,s=0;for(;r<=c;){const i=r+c>>>1;e[i]<=a?(s=i,r=i+1):c=i-1}return s},_t=(e,a,n,r,c,s)=>{const i=r?.renderStart??Math.max(0,we(s,c)),h=a>0?we(s,c+a)+n:i+n,f=e>0?Math.min(e-1,Math.max(i,h)):i,p=r?.renderEnd??f,y=e>0?Math.min(e-1,p+n):p;return{renderStart:i,renderEnd:p,lookaheadEnd:y}},jt=(e,a,n,r,c)=>{if(e.length===0)return{segmentsByItem:[],glyphsByItem:[]};const{indentSize:s,typeIconSize:i,glyphSize:h,originX:f}=r,p=Array.from({length:e.length},()=>[]),y=Array.from({length:e.length},()=>[]),b=f+Ht(r),E=A=>A*s+b,V=h/2+2;for(let A=0;A<e.length;A++){const u=e[A],M=a[A]??0,H=n[A]??0,x=H+M/2,w=e[A+1],S=x+i/2,g=H+M,_=w!==void 0&&w.indentLevel===u.indentLevel+1&&S<g?{key:`${u.id}-connector-children`,x1:E(w.indentLevel),y1:S,x2:E(w.indentLevel),y2:g,itemIndex:A}:null;if(u.hideLines){_!==null&&(p[A]=[_]);continue}const F=[],P=u.isDirectory&&c;for(let T=0;T<u.indentLevel;T++){if(u.ancestorIsLast[T]??!1)continue;let a0=!1;for(let $=A;$<e.length;$++){const k=e[$];if(k.indentLevel>T&&k.ancestorIsLast.length>T&&!k.ancestorIsLast[T]){a0=!0;break}if($>A&&k.indentLevel===T)break}if(a0){const $=E(T);F.push({key:`${u.id}-ancestor-${T}`,x1:$,y1:H,x2:$,y2:H+M,itemIndex:A})}}const j=E(u.indentLevel);A>0&&F.push({key:`${u.id}-connector-top`,x1:j,y1:H,x2:j,y2:P?x-V:x,itemIndex:A}),!P&&u.isLastChild&&F.push({key:`${u.id}-connector-horizontal`,x1:j,y1:x,x2:f+u.indentLevel*s+o0,y2:x,itemIndex:A}),u.isLastChild||(P?F.push({key:`${u.id}-connector-bottom`,x1:j,y1:x+V,x2:j,y2:H+M,itemIndex:A}):F.push({key:`${u.id}-connector-bottom`,x1:j,y1:x,x2:j,y2:H+M,itemIndex:A})),_!==null&&F.push(_),p[A]=F,P&&(y[A]=[{key:`${u.id}-glyph`,itemIndex:A,centerX:j,centerY:x,size:h,isExpanded:u.isExpanded}])}return{segmentsByItem:p,glyphsByItem:y}},s2=o.memo(({entry:e,indentLevel:a,originX:n,depth:r,positionInSet:c,setSize:s,isSelectedForAria:i,flatIndex:h,isActive:f,registerRowRef:p,onNavigationKeyDown:y,onRowFocus:b,onRowBlur:E,rowHeight:V,entryKindDirectory:A,entryKindFile:u,isDirOpen:M,expansion:{toggleDirectory:H,onToggleDirectoryRecursive:x},selection:{onEntryClick:w,selectedPath:S,currentPath:g,mode:_="none",selectedItems:F,onSelectionChange:P},visual:{iconOverrides:j,showExpandIcons:T=!0,showDirectoryIcons:s0=!0,showFileIcons:a0=!0,useCanvasExpandIcons:$=!1,expandIconSize:k,typeIconSize:i0,fontSize:H0,indentSize:V0,highlightStyles:J,entryClassName:N0,entryStyle:q,nameClassName:F0,nameStyle:P0,directoryNameClassName:A0,directoryNameStyle:d0,fileNameClassName:O,fileNameStyle:L,expandIconClassName:K,expandIconStyle:w0}})=>{G0(e.style,{option:"entry.style",absolutePath:e.absolutePath});const[Y,T0]=o.useState(!1),C=e.children!==void 0,m0=C&&M(e.absolutePath),B=e.absolutePath===S,O0=e.absolutePath===g,Q=!C&&F?.has(e.absolutePath),G=o.useCallback(X=>p(h,X),[p,h]),n0=C?void 0:Be(e),{handleClick:_0,handleKeyActivate:S0}=Je({entry:e,isDirectory:C,isExpanded:m0,isItemSelected:!!Q,selectionMode:_,onSelectionChange:P,onEntryClick:w,toggleDirectory:H,onToggleDirectoryRecursive:x}),j0=Y?J?.hoverClassName!==void 0?J.hoverClassName:I.entryHover:"",p0=(()=>{if(C){if(B)return J?.directorySelectedClassName!==void 0?J.directorySelectedClassName:I.entrySelected}else if(B||Q)return J?.itemSelectedClassName!==void 0?J.itemSelectedClassName:z.twMerge(B&&I.entrySelected,Q&&I.entryItemSelected);return""})(),X0=z.twMerge(I.entry,j0,p0,N0,e.className),Z0=z.twMerge(I.expandIcon,K,(B||Q)&&I.expandIconSelected),M0=z.twMerge(I.typeIcon,(B||Q)&&I.typeIconSelected),$0=z.twMerge(I.name,F0,C&&I.nameDirectory,C&&A0,!C&&O,(B||Q)&&I.nameSelected),L0=We({isDirectory:C,isExpanded:m0,showExpandIcons:T&&a>=0,useCanvasExpandIcons:$,expandIconSize:k}),x0=(C?s0:a0)?Ke({entry:e,isDirectory:C,isExpanded:m0,isSelected:B,isItemSelected:!!Q,extension:n0,mimeType:e.mimeType},j,i0):null,R={...Y?J?.hoverStyle:{},...C&&B?J?.directorySelectedStyle:{},...!C&&(B||Q)?J?.itemSelectedStyle:{}},h1=Ye(e.data),D0={width:i0,height:i0},U0=ze(H0),y0=n+a*V0;return m.jsxs("div",{className:X0,style:{...U0,...R,...q,...e.style,paddingLeft:`${Math.max(0,y0)}px`,transform:y0<0?`translateX(${y0}px)`:void 0,width:y0<0?`calc(100% + ${-y0}px)`:void 0,height:`${V}px`},...h1,"data-entry-type":C?"directory":"file","data-entry-expanded":C?String(m0):void 0,"data-entry-selected":B?"true":void 0,"data-entry-item-selected":Q?"true":void 0,onClick:_0,onMouseEnter:()=>T0(!0),onMouseLeave:()=>T0(!1),onFocus:X=>b(h,e.absolutePath,X.currentTarget),onBlur:X=>E(e.absolutePath,X.currentTarget),ref:G,onKeyDown:X=>{if(X.key==="Enter"||X.key===" "){X.preventDefault(),X.repeat||S0(X);return}y(X,h)},tabIndex:f?0:-1,role:"treeitem","aria-expanded":C?m0:void 0,"aria-level":r+1,"aria-posinset":c,"aria-setsize":s,"aria-selected":_==="none"?void 0:i,"aria-current":O0?"page":void 0,"aria-label":`${e.name} (${C?A:u})`,children:[(T||$)&&m.jsx("span",{className:Z0,style:{...w0,width:o0,height:o0},children:L0}),(C?s0:a0)&&m.jsx("span",{className:M0,style:D0,children:x0}),m.jsx("span",{className:$0,style:{...U0,...P0,...C?d0:L},"data-entry-type":C?"directory":"file","data-entry-role":"name",children:e.label??e.name})]})},(e,a)=>{if(e.entry!==a.entry)return!1;const n=e.entry.children!==void 0,r=a.entry.children!==void 0,c=n&&e.isDirOpen(e.entry.absolutePath),s=r&&a.isDirOpen(a.entry.absolutePath);return e.indentLevel===a.indentLevel&&e.originX===a.originX&&e.depth===a.depth&&e.positionInSet===a.positionInSet&&e.setSize===a.setSize&&e.isSelectedForAria===a.isSelectedForAria&&e.flatIndex===a.flatIndex&&e.isActive===a.isActive&&e.rowHeight===a.rowHeight&&e.entryKindDirectory===a.entryKindDirectory&&e.entryKindFile===a.entryKindFile&&c===s&&e.selection.selectedPath===a.selection.selectedPath&&e.selection.currentPath===a.selection.currentPath&&e.selection.mode===a.selection.mode&&e.selection.selectedItems===a.selection.selectedItems&&e.visual.iconOverrides===a.visual.iconOverrides&&e.visual.showExpandIcons===a.visual.showExpandIcons&&e.visual.showDirectoryIcons===a.visual.showDirectoryIcons&&e.visual.showFileIcons===a.visual.showFileIcons&&e.visual.useCanvasExpandIcons===a.visual.useCanvasExpandIcons&&e.visual.expandIconSize===a.visual.expandIconSize&&e.visual.typeIconSize===a.visual.typeIconSize&&e.visual.fontSize===a.visual.fontSize&&e.visual.indentSize===a.visual.indentSize&&e.visual.highlightStyles===a.visual.highlightStyles&&e.visual.entryClassName===a.visual.entryClassName&&e.visual.entryStyle===a.visual.entryStyle&&e.visual.nameClassName===a.visual.nameClassName&&e.visual.nameStyle===a.visual.nameStyle&&e.visual.directoryNameClassName===a.visual.directoryNameClassName&&e.visual.directoryNameStyle===a.visual.directoryNameStyle&&e.visual.fileNameClassName===a.visual.fileNameClassName&&e.visual.fileNameStyle===a.visual.fileNameStyle&&e.visual.expandIconClassName===a.visual.expandIconClassName&&e.visual.expandIconStyle===a.visual.expandIconStyle});s2.displayName="DirectoryEntryItem";const i2=e=>{const a=[];if(e.children)for(const n of e.children)n.type==="directory"&&(a.push(n.absolutePath),a.push(...i2(n)));return a},$t=({entries:e,expansion:{toggle:a,isExpanded:n,expandMultiple:r,collapseMultiple:c,isPending:s,alwaysExpanded:i=!1,doubleClickAction:h="recursive"},selection:{onEntryClick:f,selectedPath:p,currentPath:y,mode:b="none",selectedItems:E,onSelectionChange:V},visual:{className:A,style:u,ariaLabel:M,ariaLabelledBy:H,lineColor:x=$e,showTreeLines:w=!0,showExpandIcons:S=!0,showDirectoryIcons:g=!0,showFileIcons:_=!0,iconOverrides:F,expandIconSize:P,typeIconSize:j,fontSize:T,indentSize:s0,itemHeight:a0=x1,removeRootIndent:$=!1,highlightStyles:k,entryClassName:i0,entryStyle:H0,nameClassName:V0,nameStyle:J,directoryNameClassName:N0,directoryNameStyle:q,fileNameClassName:F0,fileNameStyle:P0,expandIconClassName:A0,expandIconStyle:d0}={},virtualScroll:O,grid:L,sort:K,locale:w0,labels:Y,ref:T0})=>{const C=u0.resolveVirtualScrollLocale(w0),m0=o.useMemo(()=>o2(w0,Y),[w0,Y]),B=Pt(ut(m0)),{entryKindDirectory:O0,entryKindFile:Q}=m0,G=o.useMemo(()=>At({indentSize:s0,typeIconSize:j,fontSize:T}),[s0,j,T]);o.useMemo(()=>{G0(H0,{option:"visual.entryStyle"}),G0(k?.hoverStyle,{option:"visual.highlightStyles.hoverStyle"}),G0(k?.directorySelectedStyle,{option:"visual.highlightStyles.directorySelectedStyle"}),G0(k?.itemSelectedStyle,{option:"visual.highlightStyles.itemSelectedStyle"}),nt(d0,{option:"visual.expandIconStyle"})},[H0,k,d0]);const n0=L!==void 0,_0=o.useSyncExternalStore(kt,Nt,Ft),S0=o.useRef(null),j0=o.useRef(null),p0=o.useRef(null),[X0,Z0]=o.useState(0),[M0,$0]=o.useState(0),[L0,x0]=o.useState(0),[R,h1]=o.useState(null),{overscanCount:D0=15,className:U0,background:y0,onScroll:X,onRangeChange:T1,onScrollAdjust:O1,liveRegion:_1,initialScrollIndex:j1,initialScrollOffset:z0,initialScrollAnchor:$1,callbackThrottleMs:D1=5,contentInsets:z1,onItemFocus:B1,viewportHeightOverride:r0,scrollBarOptions:u1,behaviorOptions:W1,preserveScrollAnchor:K1=!1,getItemKey:d2,testId:Y1,contentProps:m1}=O??{},G1=o.useMemo(()=>n0?{...m1,role:"rowgroup"}:{...m1,role:"tree","aria-label":H?void 0:M,"aria-labelledby":H,"aria-multiselectable":b==="multiple"?!0:void 0,"aria-busy":s?!0:void 0},[n0,m1,M,H,b,s]),X1=o.useMemo(()=>({...W1,enableKeyboardNavigation:!1}),[W1]),[t1,U1]=o.useState(typeof z0=="number"?z0:0),f1=o.useRef(typeof z0=="number"?z0:0),J1=o.useCallback((l,d)=>{f1.current=l,U1(l),X?.(l,d)},[X]),q1=o.useCallback(l=>{const{renderingStartIndex:d,renderingEndIndex:v}=l;h1(Z=>Z&&Z.renderStart===d&&Z.renderEnd===v?Z:{renderStart:d,renderEnd:v}),T1?.(l)},[T1]);o.useEffect(()=>{Rt()},[]),o.useEffect(()=>{const l=S0.current,d=n0?j0.current:l,v=()=>{if(l){const N=l.clientWidth;$0(W=>Math.abs(W-N)>1?N:W)}if(typeof r0=="number")Z0(N=>Math.abs(N-r0)>1?r0:N);else if(d){const N=d.clientHeight;Z0(W=>Math.abs(W-N)>1?N:W)}};if(!(l||d))return Z0(0);v();const Z=new ResizeObserver(v);return l&&Z.observe(l),d&&d!==l&&Z.observe(d),()=>Z.disconnect()},[r0,n0]);const B0=typeof r0=="number"?r0:X0,f0=o.useCallback(l=>i||(_0?n(l):!1),[_0,n,i]),Q1=z.twMerge(I.container,s&&I.containerPending,A),ee=o.useMemo(()=>({...It,...u??{},...typeof r0=="number"?{height:r0,minHeight:r0}:{}}),[u,r0]),A1=o.useCallback((l,d)=>{const v=[l.absolutePath,...i2(l)],Z=d||h;if(v.every(v0=>f0(v0)))return c(v);if(v.every(v0=>!f0(v0))||Z==="recursive")return r(v);if(Z==="toggle")return c(v);console.warn(`[DirectoryTree] Unknown double click action: ${Z}. No action taken.`)},[f0,r,c,h]),p1=n0?!1:$,{flatItems:C0,lineItems:g1,maxIndent:te}=o.useMemo(()=>Ot(e,f0,w,p1,K),[e,f0,w,p1,K]),a1=pt({indentSize:G.indentSize,removeRootIndent:p1,hasExpandBox:S||w}),h0=o.useMemo(()=>w?vt(G,P,a1):null,[w,G,P,a1]),D=o.useMemo(()=>C0.map((l,d)=>({...l,rowHeight:gt(a0,l.entry,d)})),[C0,a0]),E0=o.useMemo(()=>D.map(l=>l.rowHeight),[D]),I0=o.useMemo(()=>{const l=new Array(E0.length+1);l[0]=0;for(let d=0;d<E0.length;d++)l[d+1]=l[d]+E0[d];return l},[E0]),ae=o.useCallback(l=>D[l]?.rowHeight??x1,[D]),h2=o.useCallback(l=>D[l]?.entry.absolutePath??l,[D]),ne=d2??h2,W0=p??null,v1=y??null,[re,J0]=o.useState(()=>({selectedPath:W0,selectionGeneration:0,anchor:null})),H1=ye(re,W0);H1!==re&&J0(l=>ye(l,W0));const n1=o.useMemo(()=>Lt(C0),[C0]),R0=o.useMemo(()=>Ct(n1,H1),[n1,H1]),q0=o.useRef(new Map),r1=o.useRef(null),[l1]=o.useState(mt),Q0=o.useRef(null),[u2,le]=o.useState(!0),V1=o.useRef(C0);V1.current=C0;const oe=o.useRef(f0);oe.current=f0;const Z1=o.useRef(a);Z1.current=a;const ce=o.useRef(n1);ce.current=n1;const M1=o.useRef(R0);M1.current=R0;const se=o.useRef(B1);se.current=B1;const k0=o.useCallback(l=>{const d=p0.current;return!d||d.getViewportSize()<=0?!1:(d.scrollToIndex(l,{align:"nearest"}),!0)},[]),g0=o.useCallback(l=>{const d=q0.current.get(l);if(d===void 0){Q0.current=l,k0(l)||(Q0.current=null);return}Q0.current=null,k0(l),d.focus({preventScroll:!0})},[k0]),y1=o.useCallback((l,d)=>{if(d)q0.current.set(l,d),Q0.current===l?(Q0.current=null,d.focus({preventScroll:!0})):d.contains(d.ownerDocument.activeElement)&&J0(v=>v.anchor===null?v:{...v,anchor:{...v.anchor,focused:!0}});else{const v=q0.current.get(l);q0.current.delete(l),v?.contains(v.ownerDocument.activeElement)&&J0(Z=>Z.anchor===null?Z:{...Z,anchor:{...Z.anchor,focused:!1}})}l===M1.current&&le(d!==null)},[]);o.useLayoutEffect(()=>{le(q0.current.has(R0))},[R0]);const E1=o.useCallback((l,d,v)=>{const Z=r1.current===v;r1.current=null,Z||(J0(N=>xt(N,d)),l1.landedOn(v)||k0(l)),se.current?.(l)},[k0,l1]),o1=o.useCallback(l=>l1.mark(l.nativeEvent),[l1]),b1=o.useCallback((l,d)=>{const{ownerDocument:v}=d;if(!v.hasFocus()&&d.contains(v.activeElement)){r1.current=d;return}r1.current=null,J0(Z=>Z.anchor!==null&&Z.anchor.path===l?{...Z,anchor:{...Z.anchor,focused:!1}}:Z)},[]),m2=o.useCallback(()=>g0(M1.current),[g0]),w1=o.useCallback((l,d)=>{const v=be(d),Z=V1.current.length;if(!Number.isInteger(l)||l<0||l>=Z)throw new RangeError(`[directory-tree] scrollToIndex: ${String(l)} is not a row index (${Z===0?"the tree has no rows":`expected an integer in 0..${String(Z-1)}`}).`);if(v==="nearest"){k0(l);return}p0.current?.scrollToIndex(l,{align:v})},[k0]);o.useImperativeHandle(T0,()=>({scrollToIndex:w1,scrollToPath:(l,d)=>{be(d);const v=ce.current.get(l);return v===void 0?!1:(w1(v,d),!0)},getScrollAnchor:()=>p0.current?.getScrollAnchor()??null}),[w1]);const S1=o.useCallback((l,d)=>{if(l.altKey||l.ctrlKey||l.metaKey)return;const v=V1.current,Z=v.length-1;if(Z<0)return;const N=v[d],W=N?.entry.children!==void 0,v0=W&&oe.current(N.entry.absolutePath);switch(l.key){case"ArrowDown":l.preventDefault(),g0(Math.min(d+1,Z));break;case"ArrowUp":l.preventDefault(),g0(Math.max(d-1,0));break;case"Home":l.preventDefault(),g0(0);break;case"End":l.preventDefault(),g0(Z);break;case"ArrowRight":l.preventDefault(),W&&!v0?Z1.current(N.entry.absolutePath):W&&d<Z&&v[d+1].depth>N.depth&&g0(d+1);break;case"ArrowLeft":{if(l.preventDefault(),W&&v0){Z1.current(N.entry.absolutePath);break}const v2=N?.depth??0;for(let d1=d-1;d1>=0;d1--)if(v[d1].depth<v2){g0(d1);break}break}}},[g0]),c1=o.useMemo(()=>h0===null||g1.length===0?{segmentsByItem:[],glyphsByItem:[]}:jt(g1,E0,I0,h0,S),[g1,E0,I0,h0,S]),s1=o.useMemo(()=>h0===null||e.length===0?0:h0.originX+te*h0.indentSize+o0+h0.typeIconSize,[e.length,te,h0]),{renderStart:ie,renderEnd:de,lookaheadEnd:he}=o.useMemo(()=>_t(D.length,B0,D0,R,t1,I0),[D.length,B0,D0,R,t1,I0]),L1=o.useMemo(()=>h0===null||s1<=0||B0<=0||c1.segmentsByItem.length===0?null:m.jsx("div",{className:"pointer-events-none absolute inset-0 z-1","aria-hidden":"true",children:m.jsx("div",{className:"absolute top-0 left-0",style:{width:s1,height:B0},children:m.jsx(c2,{segmentsByItem:c1.segmentsByItem,glyphsByItem:c1.glyphsByItem,itemHeight:E0[0]??x1,width:s1,viewportHeight:B0,scrollPosition:t1,color:x,expandGlyphColor:x,expandGlyphSize:h0.glyphSize,renderStartIndex:ie,renderEndIndex:de,lookaheadEndIndex:he})})}),[s1,B0,ie,de,he,t1,c1,x,h0,E0]),ue=o.useCallback(l=>D[l],[D]),me=o.useRef(null);o.useLayoutEffect(()=>{const l=me.current;if(me.current={items:D,offsets:I0},!K1||!l||l.items===D)return;const d=p0.current,v=d?.getScrollPosition(),Z=typeof v=="number"&&v>=0?v:f1.current,N=Zt(l.items,l.offsets,Z);if(!N)return;const W=Mt(N,D,I0);if(W===null||Math.abs(W-Z)<1)return;const v0=d?d.scrollTo(W):W;f1.current=v0,U1(v0)},[D,I0,K1]);const b0=L?.columns,K0=L?.scrollBarWidth??u1?.width??n2,U=o.useMemo(()=>b0?it({measuredWidth:M0,columns:b0,scrollBarWidth:K0}):null,[b0,M0,K0]),i1=o.useMemo(()=>b0?st(b0):"",[b0]),f2=o.useMemo(()=>L?.showFooter&&b0?dt(e):[],[L?.showFooter,b0,e]),Y0=U?.maxHScroll??0;o.useEffect(()=>{x0(l=>C1(l,Y0))},[Y0]);const fe=o.useCallback(l=>x0(d=>C1(d+l,Y0)),[Y0]),Ae=o.useMemo(()=>({iconOverrides:F,showExpandIcons:S,showDirectoryIcons:g,showFileIcons:_,useCanvasExpandIcons:w,expandIconSize:P,typeIconSize:G.typeIconSize,fontSize:G.fontSize,indentSize:G.indentSize,highlightStyles:k,expandIconClassName:A0,expandIconStyle:d0}),[F,S,g,_,w,P,G,k,A0,d0]),pe=o.useMemo(()=>m.jsx(u0.VirtualScroll,{ref:p0,itemCount:D.length,getItem:ue,getItemHeight:ae,getItemKey:ne,testId:Y1,contentProps:G1,locale:C,labels:B,viewportSize:typeof r0=="number"?r0:void 0,overscanCount:D0,onScroll:J1,onRangeChange:q1,onScrollAdjust:O1,liveRegion:_1,className:U0,onWheelHorizontal:n0?fe:void 0,background:m.jsxs(m.Fragment,{children:[n0&&U?m.jsx("div",{className:"pointer-events-none absolute top-0 left-0 z-1 h-full overflow-hidden",style:{width:U.nameWidth},"aria-hidden":"true",children:L1}):L1,y0]}),initialScrollIndex:j1,initialScrollOffset:z0,initialScrollAnchor:$1,callbackThrottleMs:D1,contentInsets:z1,scrollBarOptions:u1,behaviorOptions:X1,children:(l,d)=>l?n0&&L&&U?m.jsx(e2,{entry:l.entry,indentLevel:l.indentLevel,positionInSet:l.positionInSet,setSize:l.setSize,rowIndex:d+(L.showHeader??!0?2:1),flatIndex:d,isActive:d===R0,registerRowRef:y1,onNavigationKeyDown:S1,onRowFocus:E1,onRowBlur:b1,isSelectedForAria:!!E?.has(l.entry.absolutePath),rowHeight:l.rowHeight,isDirOpen:f0,columns:L.columns,numericTemplate:i1,numericTotal:U.numericTotal,nameWidth:U.nameWidth,rowClassName:L.rowClassName,selection:{onEntryClick:f,selectedPath:W0,currentPath:v1,mode:b,selectedItems:E,onSelectionChange:V},expansion:{toggleDirectory:a,onToggleDirectoryRecursive:A1},visual:Ae},l.entry.absolutePath):m.jsx(s2,{entry:l.entry,indentLevel:l.indentLevel,originX:a1,depth:l.depth,positionInSet:l.positionInSet,setSize:l.setSize,isSelectedForAria:!!E?.has(l.entry.absolutePath),flatIndex:d,isActive:d===R0,registerRowRef:y1,onNavigationKeyDown:S1,onRowFocus:E1,onRowBlur:b1,rowHeight:l.rowHeight,entryKindDirectory:O0,entryKindFile:Q,isDirOpen:f0,expansion:{toggleDirectory:a,onToggleDirectoryRecursive:A1},selection:{onEntryClick:f,selectedPath:W0,currentPath:v1,mode:b,selectedItems:E,onSelectionChange:V},visual:{iconOverrides:F,showExpandIcons:S,showDirectoryIcons:g,showFileIcons:_,useCanvasExpandIcons:w,expandIconSize:P,typeIconSize:G.typeIconSize,fontSize:G.fontSize,indentSize:G.indentSize,highlightStyles:k,entryClassName:i0,entryStyle:H0,nameClassName:V0,nameStyle:J,directoryNameClassName:N0,directoryNameStyle:q,fileNameClassName:F0,fileNameStyle:P0,expandIconClassName:A0,expandIconStyle:d0}},l.entry.absolutePath):null}),[D.length,ue,ae,ne,Y1,G1,C,B,O0,Q,R0,y1,S1,E1,b1,r0,D0,J1,q1,O1,_1,U0,n0,fe,U,L1,y0,j1,z0,$1,D1,z1,u1,X1,L,i1,f0,f,W0,v1,b,E,V,a,A1,Ae,F,S,g,_,w,P,G,a1,k,i0,H0,V0,J,N0,q,F0,P0,A0,d0]),ge=C0.length>0&&!u2&&m.jsx("span",{tabIndex:0,"data-directory-tree-tab-stop":"",style:Tt,onFocus:m2});if(!(L&&U))return m.jsxs("div",{ref:S0,className:Q1,style:ee,onPointerDownCapture:o1,onMouseDownCapture:o1,children:[ge,pe]});const A2=L.showHeader??!0,p2=L.showFooter??!1,g2={...ee,"--dt-hscroll":`${L0}px`};return m.jsxs("div",{ref:S0,className:z.twMerge(Q1,"dt-grid"),style:g2,role:"treegrid","aria-label":H?void 0:M,"aria-labelledby":H,"aria-multiselectable":b==="multiple"?!0:void 0,"aria-busy":s?!0:void 0,"aria-rowcount":D.length+(L.showHeader??!0?1:0),onPointerDownCapture:o1,onMouseDownCapture:o1,children:[A2&&m.jsx("div",{role:"rowgroup",children:m.jsx(lt,{columns:L.columns,numericTemplate:i1,numericTotal:U.numericTotal,nameWidth:U.nameWidth,scrollBarWidth:K0,className:L.headerClassName})}),m.jsxs("div",{ref:j0,className:"dt-grid-body",children:[ge,pe]}),Y0>0&&m.jsxs("div",{className:"dt-grid-hscrollbar-row",children:[m.jsx("div",{className:"dt-grid-scrollbar-spacer",style:{width:U.nameWidth},"aria-hidden":"true"}),m.jsx(u0.ScrollBar,{horizontal:!0,contentSize:U.numericTotal,viewportSize:U.numericVisible,scrollPosition:L0,scrollBarWidth:K0,locale:C,labels:B,onScroll:l=>{const d=typeof l=="function"?l(L0):l,v=C1(d,Y0);return x0(v),v}}),m.jsx("div",{className:"dt-grid-scrollbar-spacer",style:{width:K0},"aria-hidden":"true"})]}),p2&&m.jsx("div",{role:"rowgroup",children:m.jsx(ot,{columns:L.columns,numericTemplate:i1,numericTotal:U.numericTotal,nameWidth:U.nameWidth,scrollBarWidth:K0,allEntries:f2,className:L.footerClassName})})]})},Dt=({initialExpanded:e=new Set,storageKey:a}={})=>{const[n,r]=o.useTransition(),[c,s]=o.useState(()=>{if(typeof window<"u"&&a)try{const u=window.localStorage.getItem(a);if(u){const M=JSON.parse(u);return new Set(M)}}catch(u){console.error("[useDirectoryTreeState] Error reading from localStorage",u)}return e}),i=o.useCallback(u=>{r(()=>{s(M=>{const H=new Set(M);return u(H),H})})},[]),h=o.useCallback((u,M)=>{i(H=>{for(const x of u)M(H,x)})},[i]);o.useEffect(()=>{if(a&&typeof window<"u")try{window.localStorage.setItem(a,JSON.stringify(Array.from(c)))}catch(u){console.warn(`Error setting localStorage key "${a}":`,u)}},[c,a]);const f=o.useCallback(u=>{h([u],(M,H)=>{M.has(H)?M.delete(H):M.add(H)})},[h]),p=o.useCallback(u=>{h([u],(M,H)=>{M.add(H)})},[h]),y=o.useCallback(u=>{h([u],(M,H)=>{M.delete(H)})},[h]),b=o.useCallback(u=>{h(u,(M,H)=>{M.delete(H)})},[h]),E=o.useCallback(u=>{h(u,(M,H)=>{M.add(H)})},[h]),V=o.useCallback(()=>{i(u=>{u.clear()})},[i]),A=o.useCallback(u=>c.has(u),[c]);return{expanded:c,toggle:f,expand:p,collapse:y,collapseMultiple:b,expandMultiple:E,collapseAll:V,isExpanded:A,isPending:n}};exports.DIRECTORY_TREE_LABEL_CATALOGS=l2;exports.DIRECTORY_TREE_LABEL_KEYS=k1;exports.DirectoryTree=$t;exports.EXPAND_ICON_STYLE_PROPERTIES=Xe;exports.FILE_ICON_PAIRS=j2;exports.MARK_PAIRS=je;exports.ROW_STYLE_PROPERTIES=Ge;exports.directoryTreeClasses=I;exports.resolveDirectoryTreeLabels=o2;exports.useDirectoryTreeState=Dt;
|