import{j as i,R as g,x as w,y as F,z as y}from"../index.D-NvtsOM.js";import{b_ as C}from"./vendor/index.CRpmXtWV.js";async function S(e,t){return i({url:`/file/download/${C(e)}`,method:"get",headers:t?{range:t}:{},responseType:"blob",timeout:6e4})}async function x(e,t=1){t=t*1024*1024;let o=0,a=t-1,n=0,h=0,r=[];async function l(){const R=`bytes=${o}-${a}`,s=await S(e,R);if(s.code===g&&s.status===206){const p=s.headers.get("content-range")||"0/0";n=parseInt(p.split("/")[1]);const c=s.headers.get("content-length")||"0",u=parseInt(c);o+=u,a=Math.min(o+u-1,n-1),r.push(s.data),h+=u,h|]/g,"").replace(/\s/g,"_");const r=t*1024*1024,l=`${a}-${n}`,R=Math.ceil(n/r),s=[];for(let d=0;d