import{i as e,n as t}from"./rolldown-runtime-ConPGZeh.js";import{i as n,r}from"./api-DvJuMrZn.js";import{ot as i,st as a}from"./dialogService-DIdX_hbW.js";function formatTime(e){return isNaN(e)||e===0?`0:00`:`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,`0`)}`}function getAudioUrlFromPath(e,t=`input`){let[n,i]=splitFilePath(e);return r.apiURL(getResourceURL(n,i,t))}function getResourceURL(e,t,n=`input`){return`/view?${[`filename=`+encodeURIComponent(t),`type=`+n,`subfolder=`+e,i.getRandParam().substring(1)].join(`&`)}`}function splitFilePath(e){let t=e.lastIndexOf(`/`);return t===-1?[``,e]:[e.substring(0,t),e.substring(t+1)]}var o=t((()=>{n(),a()}));export{splitFilePath as a,o as i,getAudioUrlFromPath as n,getResourceURL as r,formatTime as t};
//# sourceMappingURL=audioUtils-DoV5agMU.js.map