export function formatFileSystemTree(t){const n={d:{}};for(const e of Object.keys(t)){const o=t[e];if("file"in o){const t=o.file.contents,r="string"==typeof t?t:binaryString(t),i="string"==typeof t?{}:{b:!0};n.d[e]={f:{c:r,...i}};continue}const r=formatFileSystemTree(o.directory);n.d[e]=r}return n}function binaryString(t){let n="";for(const e of t)n+=String.fromCharCode(e);return n}