import{b3 as s,b5 as k,b9 as S,ba as m,bb as v}from"./index-4533c179.js";var p;(function(n){n[n.Audio=1]="Audio",n[n.Cache=2]="Cache",n[n.Config=3]="Config",n[n.Data=4]="Data",n[n.LocalData=5]="LocalData",n[n.Document=6]="Document",n[n.Download=7]="Download",n[n.Picture=8]="Picture",n[n.Public=9]="Public",n[n.Video=10]="Video",n[n.Resource=11]="Resource",n[n.Temp=12]="Temp",n[n.AppConfig=13]="AppConfig",n[n.AppData=14]="AppData",n[n.AppLocalData=15]="AppLocalData",n[n.AppCache=16]="AppCache",n[n.AppLog=17]="AppLog",n[n.Desktop=18]="Desktop",n[n.Executable=19]="Executable",n[n.Font=20]="Font",n[n.Home=21]="Home",n[n.Runtime=22]="Runtime",n[n.Template=23]="Template"})(p||(p={}));var g;(function(n){n[n.Start=0]="Start",n[n.Current=1]="Current",n[n.End=2]="End"})(g||(g={}));function L(n){return{isFile:n.isFile,isDirectory:n.isDirectory,isSymlink:n.isSymlink,size:n.size,mtime:n.mtime!==null?new Date(n.mtime):null,atime:n.atime!==null?new Date(n.atime):null,birthtime:n.birthtime!==null?new Date(n.birthtime):null,readonly:n.readonly,fileAttributes:n.fileAttributes,dev:n.dev,ino:n.ino,mode:n.mode,nlink:n.nlink,uid:n.uid,gid:n.gid,rdev:n.rdev,blksize:n.blksize,blocks:n.blocks}}function F(n){const e=new Uint8ClampedArray(n),i=e.byteLength;let t=0;for(let o=0;o{if(t.path=d(n,t.name),t.isPwd=!1,t.isFile){const o=t.name.split(".");if(t.ext=o[1],t.title=o[0],t.ext=="exe"||t.ext=="lnk"){const u=d(i,t.path);t.content=await U(u,{baseDir:a})}}else t.title=t.name}),{success:!0,data:e}}async function w(n,e){n=await f(n);const i=await z(n,{baseDir:a});return E(n,i)}async function V(n,e){return n=await f(n),{success:!0,data:await U(n,{baseDir:a})}}async function J(n){return n=await f(n),await $(n,{baseDir:a})}async function q(){const n=await w("C/Users/Desktop"),e=await w("C/Users/Menulist");return{apps:n.data,menulist:e.data}}async function W(n){return n=await f(n),await A(n,{baseDir:a})}async function G(n){return n.length<2||n.charAt(1)=="B"?!1:(n=await f(n),await R(n,{baseDir:a}))}async function K(n){return n.length<3||n.split(".").pop()=="exe"?!1:(n=await f(n),await b(n,{baseDir:a}))}function Q(n){return n.length<2,!1}function X(n){return n.length<2,!1}function Y(n,e){return n.length<2,!1}function Z(n,e){return n.length<2,!1}async function P(n,e){return n.length<2?!1:(n=await f(n),e=await f(e),await M(n,e,{oldPathBaseDir:a,newPathBaseDir:a}))}async function y(){const n=await l();return await b(n,{baseDir:a})}function h(n,e){return!1}async function D(n,e){return n=await f(n),e=await f(e),await O(n,e,{fromPathBaseDir:a,toPathBaseDir:a})}async function B(n){return n.length<2||n.split(".").pop()=="exe"?!1:(n=await f(n),await b(n,{baseDir:a}))}function nn(n,e){if(!n||n=="")return new Blob([],{type:"text/plain;charset=utf-8"});if(e=="text")return new Blob([n],{type:"text/plain;charset=utf-8"});if(e=="base64")return n.indexOf(";base64,")>-1&&(n=n.split(";base64,")[1]),n=m(n),new Blob([n]);if(typeof n=="object"&&n!==null&&"data"in n&&Array.isArray(n.data))return new Blob([new Uint8Array(n.data).buffer]);if(e=="buffer")return new Blob([n])}function en(n){let e;if(typeof n=="string")n?v(n)?(n.indexOf(";base64,")>-1&&(n=n.split(";base64,")[1]),n=m(n),e=new Blob([n])):e=new Blob([n],{type:"text/plain;charset=utf-8"}):e=new Blob([],{type:"text/plain;charset=utf-8"});else if(n instanceof Blob)e=n;else if("data"in n&&Array.isArray(n.data)){const t=new Uint8Array(n.data).buffer;e=new Blob([t])}else if(n instanceof ArrayBuffer)e=new Blob([n]);else if(n instanceof Array||n instanceof Object)e=new Blob([JSON.stringify(n)],{type:"text/plain;charset=utf-8"});else throw new Error("Unsupported content format");const i=new FormData;return i.append("content",e),i}async function tn(n,e,i){return n.length<2?!1:(n=await f(n),await I(n,e,{baseDir:a}),!0)}async function an(n,e){return n.length<2?!1:(n=await f(n),await H(n,e,{baseDir:a,append:!0}))}function sn(n,e){return n.length<2,!1}function fn(n){return n.length<2,!1}function on(n){const e=r(n),i=n.split(e);return i[1]==="C"&&i[2]==="Users"&&i[3]==="Desktop"&&i.length===4}function d(n,...e){const i=r(n);return n.endsWith(i)?n+e.join(i):n+i+e.join(i)}function rn(n){const e=r(n);return n.split(e).pop()||n}function un(n){const e=r(n);return n.indexOf(".")>-1?n.split(e).slice(0,-1).join(e):n}function r(n){return n.indexOf("\\")>-1?"\\":"/"}function ln(n){const e=r(n),i=n.split(e);return i.pop(),i.join(e)}function pn(n){const e=r(n),i=n.split(e);return i[0]==""?i[1]:i[0]}function cn(n){return n.split(".").pop()||""}const dn=Object.freeze(Object.defineProperty({__proto__:null,appPath:l,appendFile:an,basename:rn,clear:y,copy:D,desktop:q,dirname:un,exists:W,favorite:X,getExt:cn,getFormData:en,getParentPath:ln,getSp:r,getTopPath:pn,isDesktop:on,join:d,mkdir:G,parseDir:E,parserFormData:nn,pwd:Y,read:w,readFile:V,rename:P,resolvePath:f,restore:Q,rmdir:K,search:h,stat:J,unlink:B,unpwd:Z,unzip:fn,writeFile:tn,zip:sn},Symbol.toStringTag,{value:"Module"}));export{l as a,A as e,dn as f,C as j,R as m,H as w};