var e=function(e){try{return Promise.resolve(e.getFile()).then(function(t){return t.handle=e,t})}catch(e){return Promise.reject(e)}};exports.default=function(t){void 0===t&&(t=[{}]);try{Array.isArray(t)||(t=[t]);var r=[];return t.forEach(function(e,t){r[t]={description:e.description||"",accept:{}},e.mimeTypes?e.mimeTypes.map(function(n){r[t].accept[n]=e.extensions||[]}):r[t].accept["*/*"]=e.extensions||[]}),Promise.resolve(window.showOpenFilePicker({id:t[0].id,startIn:t[0].startIn,types:r,multiple:t[0].multiple||!1,excludeAcceptAllOption:t[0].excludeAcceptAllOption||!1})).then(function(r){return Promise.resolve(Promise.all(r.map(e))).then(function(e){return t[0].multiple?e:e[0]})})}catch(e){return Promise.reject(e)}};
