import{getNodeChildren,convertTreeToEntities}from"rc-tree/es/util";var Record;function traverseNodesKey(e,r){(getNodeChildren(e)||[]).forEach(function(e){var t=e.key,n=e.props.children;!1!==r(t)&&traverseNodesKey(n,r)})}!function(e){e[e.None=0]="None",e[e.Start=1]="Start",e[e.End=2]="End"}(Record||(Record={}));export function getFullKeyList(e){var r=convertTreeToEntities(e).keyEntities;return Object.keys(r)};export function calcRangeKeys(e,r,t,n){var o=[],i=Record.None;if(t&&t===n)return[t];if(!t||!n)return[];return traverseNodesKey(e,function(e){if(i===Record.End)return!1;if(function(e){return e===t||e===n}(e)){if(o.push(e),i===Record.None)i=Record.Start;else if(i===Record.Start)return i=Record.End,!1}else i===Record.Start&&o.push(e);return-1!==r.indexOf(e)}),o};