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