var e=`/www/wwwroot`;function t(e){let t=(e??``).trim();if(!t||t===`.`)return`/`;let n=t.startsWith(`/`)?t:`/${t}`;return n=n.replace(/\/+/g,`/`),n.length>1&&n.endsWith(`/`)&&(n=n.slice(0,-1)),n}function n(e){return t(e).split(`/`).filter(Boolean)}function r(e,r){let i=t(e),a=r.replace(/\/+/g,``).trim();if(!a||a===`.`)return i;if(a===`..`){let e=n(i);return e.pop(),e.length?`/${e.join(`/`)}`:`/`}return i===`/`?`/${a}`:`${i}/${a}`}function i(e){let t=n(e);return t.length?(t.pop(),t.length?`/${t.join(`/`)}`:`/`):null}function a(e){let t=e.trim();return t?t.includes(`/`)||t.includes(`\\`)||t.includes(`\0`)?`名称不能包含路径分隔符`:t===`.`||t===`..`?`非法名称`:!0:`名称不能为空`}function o(e){let i=n(t(e)),a=[{title:`/`,path:`/`,disabled:i.length===0}],o=``;for(let e=0;e<i.length;e++)o=r(o||`/`,i[e]),a.push({title:i[e],path:o,disabled:e===i.length-1});return a}export{i as a,t as i,o as n,a as o,r,e as t};