const l=async e=>{const a=await e.getFile();return a.handle=e,a};var p=async(e=[{}])=>{Array.isArray(e)||(e=[e]);const a=[];e.forEach((i,c)=>{a[c]={description:i.description||"",accept:{}},i.mimeTypes?i.mimeTypes.map(n=>{a[c].accept[n]=i.extensions||[]}):a[c].accept["*/*"]=i.extensions||[]});const t=await window.showOpenFilePicker({id:e[0].id,startIn:e[0].startIn,types:a,multiple:e[0].multiple||!1,excludeAcceptAllOption:e[0].excludeAcceptAllOption||!1}),s=await Promise.all(t.map(l));return e[0].multiple?s:s[0]};export{p as default};
