const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./memory.F9t1z-IE.js","./config.C6PEK-vI.js","./FileSystemDirectoryHandle.Cy5k_ruS.js","./preload-helper.CAj27AsG.js","./FileSystemHandle.DIBYSYyr.js","./FileSystemFileHandle.B7tMxkkQ.js"])))=>i.map(i=>d[i]);
import{r as e}from"./chunk.DuxOD-Sk.js";import{t}from"./preload-helper.CAj27AsG.js";var n=e({config:()=>i,errors:()=>r,fromDataTransfer:()=>a,getDirHandlesFromInput:()=>o,getFileHandlesFromInput:()=>s}),r={INVALID:[`seeking position failed.`,`InvalidStateError`],GONE:[`A requested file or directory could not be found at the time an operation was processed.`,`NotFoundError`],MISMATCH:[`The path supplied exists, but was not an entry of requested type.`,`TypeMismatchError`],MOD_ERR:[`The object can not be modified in this way.`,`InvalidModificationError`],SYNTAX:e=>[`Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. ${e}`,`SyntaxError`],SECURITY:[`It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources.`,`SecurityError`],DISALLOWED:[`The request is not allowed by the user agent or the platform in the current context.`,`NotAllowedError`]},i={writable:globalThis.WritableStream};async function a(e){console.warn("deprecated fromDataTransfer - use `dt.items[0].getAsFileSystemHandle()` instead");let[n,r,i]=await Promise.all([t(()=>import(`./memory.F9t1z-IE.js`),__vite__mapDeps([0,1]),import.meta.url),t(()=>import(`./sandbox.BSwYA5Ed.js`),[],import.meta.url),t(()=>import(`./FileSystemDirectoryHandle.Cy5k_ruS.js`),__vite__mapDeps([2,3,4]),import.meta.url)]),a=new n.FolderHandle(``,!1);return a._entries=e.map(e=>e.isFile?new r.FileHandle(e,!1):new r.FolderHandle(e,!1)),new i.FileSystemDirectoryHandle(a)}async function o(e){let{FolderHandle:n,FileHandle:r}=await t(async()=>{let{FolderHandle:e,FileHandle:t}=await import(`./memory.F9t1z-IE.js`);return{FolderHandle:e,FileHandle:t}},__vite__mapDeps([0,1]),import.meta.url),{FileSystemDirectoryHandle:i}=await t(async()=>{let{FileSystemDirectoryHandle:e}=await import(`./FileSystemDirectoryHandle.Cy5k_ruS.js`);return{FileSystemDirectoryHandle:e}},__vite__mapDeps([2,3,4]),import.meta.url),a=Array.from(e.files),o=a[0].webkitRelativePath.split(`/`,1)[0],s=new n(o,!1);return a.forEach(e=>{let t=e.webkitRelativePath.split(`/`);t.shift();let i=t.pop(),a=t.reduce((e,t)=>(e._entries[t]||(e._entries[t]=new n(t,!1)),e._entries[t]),s);a._entries[i]=new r(e.name,e,!1)}),new i(s)}async function s(e){let{FileHandle:n}=await t(async()=>{let{FileHandle:e}=await import(`./memory.F9t1z-IE.js`);return{FileHandle:e}},__vite__mapDeps([0,1]),import.meta.url),{FileSystemFileHandle:r}=await t(async()=>{let{FileSystemFileHandle:e}=await import(`./FileSystemFileHandle.B7tMxkkQ.js`);return{FileSystemFileHandle:e}},__vite__mapDeps([5,4,1]),import.meta.url);return Array.from(e.files).map(e=>new r(new n(e.name,e,!1)))}export{n,r as t};