var e={"application/vnd.openxmlformats-officedocument.wordprocessingml.document":`docx`,"application/msword":`docx`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":`xlsx`,"application/vnd.ms-excel":`xls`,"text/csv":`csv`,"application/vnd.openxmlformats-officedocument.presentationml.presentation":`pptx`,"application/vnd.ms-powerpoint":`ppt`,"application/pdf":`pdf`,"text/plain":`txt`,"text/markdown":`md`,"text/md":`md`,"text/rtf":`rtf`,"application/rtf":`rtf`,"text/html":`html`,"application/xhtml+xml":`html`,"application/json":`json`,"text/json":`json`,"application/xml":`xml`,"text/xml":`xml`},t=[[/wordprocessingml|msword/,`docx`],[/spreadsheetml/,`xlsx`],[/ms-excel/,`xls`],[/presentationml/,`pptx`],[/ms-powerpoint/,`ppt`],[/pdf/,`pdf`],[/markdown|^text\/md/,`md`],[/^text\/plain|txt$/,`txt`],[/csv/,`csv`],[/json/,`json`],[/xml/,`xml`],[/html|xhtml/,`html`],[/rtf/,`rtf`]];function n(n){if(!n)return``;let r=n.toLowerCase().trim(),i=e[r];if(i)return i;for(let[e,n]of t)if(e.test(r))return n;return``}export{n as t};