"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const i=({file:e,uploaderTitle:t})=>e&&typeof e!="string"?e.name:t,o=({file:e,maxSizeDescription:t})=>e&&typeof e!="string"?`${(e.size/1e3).toFixed(2)}KB`:t,g=({file:e,fileId:t})=>{if(e){const r=document.getElementById(t);if(r)if(typeof e=="string")r.src=e;else{const a=new FileReader;a.onload=s=>{if(s.target&&s.target.result){const n=s.target.result;r.src=typeof n=="string"?n:""}},a.readAsDataURL(e)}}else return null},c=({file:e,errorMessage:t,inputId:r})=>{if(!e||t){const a=document.getElementById(r);a&&a.click()}},l=e=>{if(typeof e=="string"||!e)return!1;switch(e.type){case"image/apng":case"image/avif":case"image/gif":case"image/jpeg":case"image/png":case"image/svg+xml":case"image/webp":return!0;default:return!1}};exports.getImageUrlFromFile=g;exports.getUploaderDescription=o;exports.getUploaderTitle=i;exports.isImageFile=l;exports.openFileExplorer=c;
