function f(o,i,n){function r(c){const t=c[i.key],e=c[i.children];n(t,c)!==!1&&f(e||[],i,n)}o.forEach(r)}function l({treeData:o,expandedKeys:i,startKey:n,endKey:r,fieldNames:c={title:"title",key:"key",children:"children"}}){const t=[];let e=0;if(n&&n===r)return[n];if(!n||!r)return[];function u(s){return s===n||s===r}return f(o,c,s=>{if(e===2)return!1;if(u(s)){if(t.push(s),e===0)e=1;else if(e===1)return e=2,!1}else e===1&&t.push(s);return i.includes(s)}),t}function h(o,i,n){const r=[...i],c=[];return f(o,n,(t,e)=>{const u=r.indexOf(t);return u!==-1&&(c.push(e),r.splice(u,1)),!!r.length}),c}export{l as calcRangeKeys,h as convertDirectoryKeysToNodes};
