function u(){return{root(e){this.addClassToHast(e.children?.[0],"tree-view-root")},line(e){this.addClassToHast(e,"tree-view-line");const r=e.children?.[0]?.children?.[0];if(r?.type!=="text")return e;const s=r.value||"",t=s.match(/^(.*?)(\s*#.*)?$/);let a=s,i="";t&&(a=(t[1]||"").trimEnd(),i=t[2]||"");const f=a.trim().split(" "),c=[],o=[];let p=!1;f.forEach(n=>{n.match(/(\w+|\.|\/|-|_)/g)||p?(o.push(n),p=!0):c.push(n)});const l=o.join(" ").trim(),m=l.split("."),h=m.length>1?m.pop():void 0;return e.children=[{type:"element",tagName:"span",properties:{class:"tree-view-branch"},children:[{type:"text",value:c.join(" ")}]},{type:"element",tagName:"span",properties:{class:`tree-view-file ${l?"ext-"+(h||"folder"):"no-file"}`},children:[{type:"text",value:l}]}],i&&e.children.push({type:"element",tagName:"span",properties:{class:"tree-view-comment"},children:[{type:"text",value:i}]}),e}}}export{u as default};
