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AElB/G,OAAO4G,eAAe2L,EAAqBlS,UAAW,kBAAmB,CAMrEwG,IAAK,WACD,MAAO,CAAEF,sBAAuBhG,KAAK8R,WAAYE,aAAchS,KAAK+R,iBACxE,EACA5L,YAAY,EACZC,cAAc,IAWlBwL,EAAqBlS,UAAU2S,iBAAmB,WAC9C,GAAIrS,KAAK6R,aAAe7R,KAAKsS,cAAe,CACxC,IAAI/N,EAAKvE,KAAKuS,oBAAoBC,wBAAyBC,EAAQlO,EAAGwM,IACtE,OAAI0B,EADgFlO,EAAGmO,OAClE1S,KAAK0B,MAAMyG,QA7Jd,EA8JP,QAEFnI,KAAK0B,MAAMyG,QAAUsK,EAhKZ,EAiKP,SAGA,OAEf,CAIJ,EACAb,EAAqBlS,UAAUwS,mBAAqB,SAAUnQ,GAE1D,IADA,IAAI4Q,EAAO5Q,EACJ4Q,IAASA,EAAK5T,IACjB4T,EAAOA,EAAKC,WAEZD,GAAQA,EAAK5T,KACbiB,KAAKuS,oBAAsBI,EAC3B3S,KAAK8R,WAAaa,EAAK5T,GACvBiB,KAAK+R,iBAAmBY,EAAK3T,GAErC,EACO4S,CACX,CA5F0C,E","sources":["../node_modules/@progress/kendo-react-treeview/dist/es/utils/getItemIdUponKeyboardNavigation.js","../node_modules/@progress/kendo-react-treeview/dist/es/utils/consts.js","../node_modules/@progress/kendo-react-treeview/dist/es/TreeViewItem.js","../node_modules/@progress/kendo-react-treeview/dist/es/package-metadata.js","../node_modules/@progress/kendo-react-treeview/dist/es/TreeView.js","../node_modules/@progress/kendo-react-treeview/dist/es/processTreeViewItems.js","../node_modules/@progress/kendo-react-treeview/dist/es/moveTreeViewItem.js","../node_modules/@progress/kendo-react-treeview/dist/es/handleTreeViewCheckChange.js","../node_modules/@progress/kendo-react-treeview/dist/es/TreeViewDragClue.js","../node_modules/@progress/kendo-react-treeview/dist/es/TreeViewDragAnalyzer.js"],"sourcesContent":["import { Keys } from '@progress/kendo-react-common';\nimport { isItemExpandedAndWithChildren, isEnabledAndAllParentsEnabled, treeIdUtils } from '@progress/kendo-react-common';\n/**\n * @hidden\n */\nexport default function getItemIdUponKeyboardNavigation(item, itemId, items, keyCode, fieldsSvc) {\n    switch (keyCode) {\n        case Keys.left:\n            return getIdUponLeftKey();\n        case Keys.right:\n            return getIdUponRightKey();\n        case Keys.up:\n            return getIdUponUpKey();\n        case Keys.down:\n            return getIdUponDownKey();\n        case Keys.home:\n            return treeIdUtils.ZERO_LEVEL_ZERO_NODE_ID;\n        case Keys.end:\n            return getIdUponEndKey();\n        default:\n            return itemId;\n    }\n    function getIdUponLeftKey() {\n        return treeIdUtils.isIdZeroLevel(itemId)\n            // For expanded disabled items, navigate directly to the parent.\n            // Collapse cannot happen because an event is not fired to the client.\n            || (fieldsSvc.expanded(item) && isEnabledAndAllParentsEnabled(itemId, items, fieldsSvc)) ?\n            itemId : treeIdUtils.getDirectParentId(itemId);\n    }\n    function getIdUponRightKey() {\n        return isItemExpandedAndWithChildren(item, fieldsSvc) ? treeIdUtils.getFirstChildId(itemId) : itemId;\n    }\n    function getIdUponUpKey() {\n        var index = Number(treeIdUtils.getShortId(itemId));\n        var parentId = treeIdUtils.getDirectParentId(itemId);\n        return index ? getLastNotOpenedChildId(treeIdUtils.createId(index - 1, parentId), items, fieldsSvc) :\n            treeIdUtils.isIdZeroLevel(itemId) ? itemId : parentId;\n    }\n    function getIdUponDownKey() {\n        if (isItemExpandedAndWithChildren(item, fieldsSvc)) {\n            return treeIdUtils.getFirstChildId(itemId);\n        }\n        else {\n            return getNextItemId(itemId, items, fieldsSvc) || itemId;\n        }\n    }\n    function getIdUponEndKey() {\n        var result = (items.length - 1).toString();\n        var currentItem = items[items.length - 1];\n        var children;\n        while (isItemExpandedAndWithChildren(currentItem, fieldsSvc)) {\n            children = currentItem[fieldsSvc.getChildrenField()];\n            result = treeIdUtils.createId(children.length - 1, result);\n            currentItem = children[children.length - 1];\n        }\n        return result;\n    }\n}\nfunction getNextItemId(itemId, items, fieldsSvc) {\n    var parentId = treeIdUtils.getDirectParentId(itemId);\n    var parent = parentId ? treeIdUtils.getItemById(parentId, items, fieldsSvc.getChildrenField()) : undefined;\n    var siblings = parent ? parent[fieldsSvc.getChildrenField()] : items;\n    var index = Number(treeIdUtils.getShortId(itemId));\n    return index < siblings.length - 1 ?\n        treeIdUtils.createId(index + 1, parentId) :\n        parent ? getNextItemId(parentId, items, fieldsSvc) : undefined;\n}\nfunction getLastNotOpenedChildId(itemId, items, fieldsSvc) {\n    var item = treeIdUtils.getItemById(itemId, items, fieldsSvc.getChildrenField());\n    if (isItemExpandedAndWithChildren(item, fieldsSvc)) {\n        return getLastNotOpenedChildId(treeIdUtils.createId(item[fieldsSvc.getChildrenField()].length - 1, itemId), items, fieldsSvc);\n    }\n    else {\n        return itemId;\n    }\n}\n","/**\n * @hidden\n */\nexport var EXPAND_FIELD = 'expanded';\n/**\n * @hidden\n */\nexport var TEXT_FIELD = 'text';\n/**\n * @hidden\n */\nexport var DISABLED_FIELD = 'disabled';\n/**\n * @hidden\n */\nexport var CHILDREN_FIELD = 'items';\n/**\n * @hidden\n */\nexport var HAS_CHILDREN_FIELD = 'hasChildren';\n/**\n * @hidden\n */\nexport var SELECT_FIELD = 'selected';\n/**\n * @hidden\n */\nexport var CHECK_FIELD = 'checked';\n/**\n * @hidden\n */\nexport var CHECK_INDETERMINATE_FIELD = 'checkIndeterminate';\n/**\n * @hidden\n */\nexport var DOM_KENDO_ITEM_ID_FIELD = '_kendoItemId';\n/**\n * @hidden\n */\nexport var DOM_KENDO_TREEVIEW_GUID_FIELD = '_kendoTreeViewGuid';\n","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport * as React from 'react';\nimport { classNames, guid, Draggable, kendoThemeMaps, IconWrap } from '@progress/kendo-react-common';\nimport { caretAltDownIcon, caretAltLeftIcon, caretAltRightIcon } from '@progress/kendo-svg-icons';\nimport { isItemExpandedAndWithChildren, hasChildren, treeIdUtils } from '@progress/kendo-react-common';\nimport { Reveal } from '@progress/kendo-react-animation';\nimport { DOM_KENDO_ITEM_ID_FIELD, DOM_KENDO_TREEVIEW_GUID_FIELD } from './utils/consts';\nvar sizeMap = kendoThemeMaps.sizeMap;\n/**\n * @hidden\n */\nexport var TreeViewItemPropsContext = React.createContext(function (props) { return props; });\n/**\n * @hidden\n */\nvar TreeViewItemWithoutContext = /** @class */ (function (_super) {\n    __extends(TreeViewItemWithoutContext, _super);\n    function TreeViewItemWithoutContext() {\n        var _this = _super !== null && _super.apply(this, arguments) || this;\n        _this.itemGuid = guid();\n        _this.onCheckChange = function (e) {\n            _this.props.onCheckChange(e, _this.item, _this.itemId);\n        };\n        _this.onExpandChange = function (e) {\n            _this.props.onExpandChange(e, _this.item, _this.itemId);\n        };\n        _this.onItemClick = function (e) {\n            _this.props.onItemClick(e, _this.item, _this.itemId);\n        };\n        _this.onPress = function (e) {\n            _this.props.onPress(e.event, _this.item, _this.itemId);\n        };\n        _this.onDrag = function (e) {\n            _this.props.onDrag(e.event, _this.item, _this.itemId);\n        };\n        _this.onRelease = function (e) {\n            _this.props.onRelease(e.event, _this.item, _this.itemId);\n        };\n        _this.onContextMenu = function (e) {\n            _this.props.onContextMenu(e, _this.item, _this.itemId);\n        };\n        _this.assignDraggableMeta = function (element) {\n            if (element) {\n                element[DOM_KENDO_ITEM_ID_FIELD] = _this.props.itemId;\n                element[DOM_KENDO_TREEVIEW_GUID_FIELD] = _this.props.treeGuid;\n            }\n        };\n        return _this;\n    }\n    TreeViewItemWithoutContext.prototype.render = function () {\n        var _this = this;\n        var subitems = this.renderSubitemsIfApplicable();\n        var itemInPart = this.renderItemInPart();\n        return (React.createElement(\"li\", { className: classNames('k-treeview-item'), tabIndex: this.tabIndex, role: \"treeitem\", \"aria-expanded\": this.ariaExpanded, \"aria-selected\": this.ariaSelected, \"aria-checked\": this.ariaChecked, \"aria-disabled\": this.disabled ? true : undefined, ref: function (el) { return _this.itemElement = el; } },\n            React.createElement(\"div\", { className: \"k-treeview-\".concat(this.props.position), ref: this.assignDraggableMeta },\n                this.renderExpandIcon(),\n                this.renderCheckbox(),\n                this.props.draggable ?\n                    React.createElement(Draggable, { onPress: this.onPress, onDrag: this.onDrag, onRelease: this.onRelease }, itemInPart) : itemInPart),\n            this.props.animate ?\n                React.createElement(Reveal, { transitionEnterDuration: 200, transitionExitDuration: 200, style: { display: 'block' }, children: subitems }) : subitems));\n    };\n    TreeViewItemWithoutContext.prototype.componentDidMount = function () {\n        var focusedItemId = this.props.focusedItemId;\n        var currentItemId = this.itemId;\n        if (focusedItemId && focusedItemId === currentItemId) {\n            this.props.onFocusDomElNeeded(this.itemElement);\n        }\n        if (this.checkboxElement) {\n            this.checkboxElement.indeterminate = this.fieldsSvc.checkIndeterminate(this.item);\n        }\n    };\n    TreeViewItemWithoutContext.prototype.componentDidUpdate = function (prevProps) {\n        var focusedItemId = this.props.focusedItemId;\n        if (focusedItemId &&\n            focusedItemId !== prevProps.focusedItemId &&\n            focusedItemId === this.itemId) {\n            this.props.onFocusDomElNeeded(this.itemElement);\n        }\n        if (this.checkboxElement) {\n            var indeterminate = this.fieldsSvc.checkIndeterminate(this.item);\n            if (indeterminate !== prevProps.fieldsService.checkIndeterminate(prevProps.item)) {\n                this.checkboxElement.indeterminate = indeterminate;\n            }\n        }\n    };\n    TreeViewItemWithoutContext.prototype.renderCheckbox = function () {\n        var _a;\n        var _this = this;\n        if (this.props.checkboxes) {\n            var size = this.props.size;\n            return (React.createElement(\"div\", { className: classNames('k-checkbox-wrap') },\n                React.createElement(\"input\", { type: \"checkbox\", className: classNames('k-checkbox k-rounded-md', (_a = {},\n                        _a[\"k-checkbox-\".concat(sizeMap[size] || size)] = size,\n                        _a['k-disabled'] = this.disabled,\n                        _a)), \"aria-label\": this.item.text, checked: Boolean(this.fieldsSvc.checked(this.item)), id: this.itemGuid, tabIndex: -1, onChange: this.onCheckChange, ref: function (el) { return _this.checkboxElement = el; } }),\n                React.createElement(\"label\", { className: \"k-checkbox-label\", htmlFor: this.itemGuid })));\n        }\n        else {\n            return undefined;\n        }\n    };\n    TreeViewItemWithoutContext.prototype.renderExpandIcon = function () {\n        var renderExpand = this.props.expandIcons &&\n            // If it is explicitly said that the item has children (even not loaded yet)\n            // or if the item actually has children, then render the icon.\n            (this.fieldsSvc.hasChildren(this.item) || hasChildren(this.item, this.fieldsSvc.getChildrenField()));\n        return renderExpand && (\n        // Allowing the toggle-button even with `disabled=true` might be a valid case!\n        // Re-evaluate the classes bellow if such scenario occurs\n        React.createElement(\"span\", { className: classNames('k-treeview-toggle', { 'k-disabled': this.disabled }), onClick: this.onExpandChange },\n            React.createElement(IconWrap, __assign({}, this.getIconProps()))));\n    };\n    TreeViewItemWithoutContext.prototype.renderSubitemsIfApplicable = function () {\n        var _this = this;\n        var data = this.fieldsSvc.children(this.item);\n        return isItemExpandedAndWithChildren(this.item, this.fieldsSvc) ?\n            (React.createElement(\"ul\", { className: \"k-treeview-group\", role: \"group\" }, data.map(function (item, index) {\n                return (React.createElement(TreeViewItem, { item: item, position: index === 0 ? 'top' : index === data.length - 1 ? 'bot' : 'mid', itemId: treeIdUtils.createId(index, _this.itemId), treeGuid: _this.props.treeGuid, animate: _this.props.animate, focusedItemId: _this.props.focusedItemId, tabbableItemId: _this.props.tabbableItemId, fieldsService: _this.props.fieldsService, itemUI: _this.props.itemUI, checkboxes: _this.props.checkboxes, ariaMultiSelectable: _this.props.ariaMultiSelectable, onItemClick: _this.props.onItemClick, onFocusDomElNeeded: _this.props.onFocusDomElNeeded, draggable: _this.props.draggable, onPress: _this.props.onPress, onDrag: _this.props.onDrag, onRelease: _this.props.onRelease, expandIcons: _this.props.expandIcons, onExpandChange: _this.props.onExpandChange, onCheckChange: _this.props.onCheckChange, onContextMenu: _this.props.onContextMenu, key: index, size: _this.props.size, disabled: _this.disabled, isRtl: _this.props.isRtl }));\n            }))) : undefined;\n    };\n    TreeViewItemWithoutContext.prototype.renderItemInPart = function () {\n        return (React.createElement(\"span\", { className: classNames('k-treeview-leaf', {\n                'k-focus': this.props.focusedItemId === this.itemId,\n                'k-selected': this.fieldsSvc.selected(this.item),\n                'k-disabled': this.disabled\n            }), style: { touchAction: 'none' }, onClick: this.onItemClick, onContextMenu: this.onContextMenu },\n            React.createElement(\"span\", { className: \"k-treeview-leaf-text\" }, this.props.itemUI ?\n                React.createElement(this.props.itemUI, { item: this.item, itemHierarchicalIndex: this.itemId }) :\n                this.fieldsSvc.text(this.item))));\n    };\n    Object.defineProperty(TreeViewItemWithoutContext.prototype, \"fieldsSvc\", {\n        get: function () {\n            return this.props.fieldsService;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(TreeViewItemWithoutContext.prototype, \"itemId\", {\n        get: function () {\n            return this.props.itemId;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(TreeViewItemWithoutContext.prototype, \"item\", {\n        get: function () {\n            return this.props.item;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(TreeViewItemWithoutContext.prototype, \"tabIndex\", {\n        get: function () {\n            return (this.props.focusedItemId || this.props.tabbableItemId) === this.itemId ? 0 : -1;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(TreeViewItemWithoutContext.prototype, \"ariaExpanded\", {\n        get: function () {\n            return this.fieldsSvc.hasChildren(this.item) || hasChildren(this.item, this.fieldsSvc.getChildrenField()) ?\n                Boolean(this.fieldsSvc.expanded(this.item)) : undefined;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(TreeViewItemWithoutContext.prototype, \"disabled\", {\n        get: function () {\n            return this.props.disabled || this.fieldsSvc.disabled(this.item);\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(TreeViewItemWithoutContext.prototype, \"ariaChecked\", {\n        get: function () {\n            if (this.props.checkboxes) {\n                if (this.fieldsSvc.checked(this.item)) {\n                    return 'true';\n                }\n                else {\n                    return this.fieldsSvc.checkIndeterminate(this.item) ? 'mixed' : 'false';\n                }\n            }\n            else {\n                return undefined;\n            }\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(TreeViewItemWithoutContext.prototype, \"ariaSelected\", {\n        get: function () {\n            if (this.fieldsSvc.selected(this.item)) {\n                return true;\n            }\n            else if (this.props.ariaMultiSelectable) {\n                return this.disabled ? undefined : false;\n            }\n            else {\n                return undefined;\n            }\n        },\n        enumerable: false,\n        configurable: true\n    });\n    TreeViewItemWithoutContext.prototype.getIconProps = function () {\n        var expanded = this.fieldsSvc.expanded(this.item);\n        var loading = expanded && !hasChildren(this.item, this.fieldsSvc.getChildrenField());\n        if (loading) {\n            return { name: 'loading' };\n        }\n        return expanded\n            ? { name: 'caret-alt-down', icon: caretAltDownIcon }\n            : { name: this.props.isRtl ? 'caret-alt-left' : 'caret-alt-right', icon: this.props.isRtl ? caretAltLeftIcon : caretAltRightIcon };\n    };\n    TreeViewItemWithoutContext.defaultProps = {\n        position: 'top'\n    };\n    return TreeViewItemWithoutContext;\n}(React.Component));\n/**\n * @hidden\n */\nexport var TreeViewItem = React.forwardRef(function (props, ref) {\n    var contextPropsCallback = React.useContext(TreeViewItemPropsContext);\n    var treeViewItemProps = contextPropsCallback.call(undefined, props);\n    return (React.createElement(TreeViewItemWithoutContext, __assign({ ref: ref }, treeViewItemProps)));\n});\nTreeViewItem.displayName = 'TreeViewItem';\n","/**\n * @hidden\n */\nexport var packageMetadata = {\n    name: '@progress/kendo-react-treeview',\n    productName: 'KendoReact',\n    productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],\n    publishDate: 1700064084,\n    version: '',\n    licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'\n};\n","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { Keys, dispatchEvent, guid, kendoThemeMaps, classNames, resolveItemId, isEnabledAndAllParentsEnabled, hasChildren, TreeFieldsService as FieldsService, treeIdUtils } from '@progress/kendo-react-common';\nimport nav from './utils/getItemIdUponKeyboardNavigation';\nimport { TreeViewItem } from './TreeViewItem';\nimport { validatePackage } from '@progress/kendo-react-common';\nimport { packageMetadata } from './package-metadata';\nimport { CHECK_FIELD, CHECK_INDETERMINATE_FIELD, CHILDREN_FIELD, DISABLED_FIELD, EXPAND_FIELD, HAS_CHILDREN_FIELD, SELECT_FIELD, TEXT_FIELD } from './utils/consts';\nvar sizeMap = kendoThemeMaps.sizeMap;\n/**\n * Represents the [KendoReact TreeView component]({% slug overview_treeview %}).\n *\n * @example\n * ```jsx\n * const data = [{\n *     text: 'Furniture', expanded: true, items: [\n *         { text: 'Tables & Chairs' }, { text: 'Sofas' }, { text: 'Occasional Furniture' }]\n * }, {\n *     text: 'Decor', expanded: true, items: [\n *         { text: 'Bed Linen' }, { text: 'Curtains & Blinds' }, { text: 'Carpets' }]\n * }];\n * class App extends React.Component {\n *     render() {\n *         return <TreeView data={data} />;\n *     }\n * }\n * ReactDOM.render(<App />, document.querySelector('my-app'));\n * ```\n */\nvar TreeView = /** @class */ (function (_super) {\n    __extends(TreeView, _super);\n    function TreeView(props) {\n        var _this = _super.call(this, props) || this;\n        /**\n         * @hidden\n         */\n        _this.state = { focusedItemId: undefined, focusedItemPublicId: undefined, tabbableItemId: treeIdUtils.ZERO_LEVEL_ZERO_NODE_ID };\n        _this.fieldsSvc = null;\n        // When there is a change in state.focusedItemId, calling focus() on the dom element of the focused item\n        // is most often not needed, because the browser focuses the element on its own.\n        // https://github.com/telerik/kendo-react/issues/190\n        _this.allowExplicitFocus = false;\n        _this.treeGuid = guid();\n        _this._element = null;\n        _this.onFocusDomElNeeded = function (domItem) {\n            if (_this.allowExplicitFocus) {\n                _this.focusDomItem(domItem);\n            }\n        };\n        _this.onCheckChange = function (event, item, itemId) {\n            _this.setFocus(itemId);\n            _this.dispatchCheckChange(event, item, itemId);\n        };\n        _this.onExpandChange = function (event, item, itemId) {\n            _this.setFocus(itemId);\n            _this.dispatchExpandChange(event, item, itemId);\n        };\n        _this.onPress = function (_event, item, itemId) {\n            if (_this.props.onItemDragStart) {\n                _this.props.onItemDragStart.call(undefined, { target: _this, item: item, itemHierarchicalIndex: itemId });\n            }\n        };\n        _this.onDrag = function (event, item, itemId) {\n            var pageX = event.pageX, pageY = event.pageY, clientX = event.clientX, clientY = event.clientY;\n            if (_this.props.onItemDragOver) {\n                _this.props.onItemDragOver.call(undefined, {\n                    target: _this,\n                    item: item,\n                    itemHierarchicalIndex: itemId,\n                    pageX: pageX,\n                    pageY: pageY,\n                    clientX: clientX,\n                    clientY: clientY\n                });\n            }\n        };\n        _this.onRelease = function (event, item, itemId) {\n            var pageX = event.pageX, pageY = event.pageY, clientX = event.clientX, clientY = event.clientY;\n            if (_this.props.onItemDragEnd) {\n                _this.props.onItemDragEnd.call(undefined, {\n                    target: _this,\n                    item: item,\n                    itemHierarchicalIndex: itemId,\n                    pageX: pageX,\n                    pageY: pageY,\n                    clientX: clientX,\n                    clientY: clientY\n                });\n            }\n        };\n        _this.onItemClick = function (event, item, itemId) {\n            _this.setFocus(itemId);\n            _this.dispatchItemClick(event, item, itemId);\n        };\n        _this.onFocus = function () {\n            clearTimeout(_this.blurRequest);\n            if (_this.state.focusedItemId === undefined && _this.data.length) {\n                _this.setFocus(_this.state.tabbableItemId);\n            }\n        };\n        _this.onBlur = function () {\n            clearTimeout(_this.blurRequest);\n            _this.blurRequest = window.setTimeout(function () { return _this.setFocus(undefined); }, 0);\n        };\n        _this.onKeyDown = function (event) {\n            var focusedItem = _this.getFocusedItem();\n            if (focusedItem && _this.fieldsSvc) {\n                var newItemId = nav(focusedItem, _this.state.focusedItemId, _this.data, event.keyCode, _this.fieldsSvc);\n                if (newItemId !== _this.state.focusedItemId) {\n                    // This disables the auto-scroll. The scroll is achieved via item focusing.\n                    event.preventDefault();\n                    _this.allowExplicitFocus = true;\n                    _this.setFocus(newItemId);\n                }\n                _this.dispatchEventsOnKeyDown(event, focusedItem);\n            }\n        };\n        _this.onContextMenu = function (event, item, itemId) {\n            if (_this.props.onContextMenu) {\n                var ev = {\n                    target: _this,\n                    syntheticEvent: event,\n                    nativeEvent: event.nativeEvent,\n                    item: item,\n                    itemID: itemId\n                };\n                _this.props.onContextMenu.call(undefined, ev);\n            }\n        };\n        validatePackage(packageMetadata);\n        return _this;\n    }\n    Object.defineProperty(TreeView.prototype, \"element\", {\n        /**\n         * @hidden\n         */\n        get: function () {\n            return this._element;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    /**\n     * @hidden\n     */\n    TreeView.prototype.render = function () {\n        var _a;\n        var _this = this;\n        this.fieldsSvc = new FieldsService(this.props);\n        var _b = this.props, size = _b.size, className = _b.className;\n        return (React.createElement(\"div\", { className: classNames('k-treeview', (_a = {},\n                _a[\"k-treeview-\".concat(sizeMap[size] || size)] = size,\n                _a['k-user-select-none'] = this.props.draggable,\n                _a['k-rtl'] = this.props.dir === 'rtl',\n                _a), className), onKeyDown: this.onKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, role: \"tree\", \"aria-multiselectable\": this.ariaMultiSelectable ? true : undefined, \"aria-label\": this.props['aria-label'], \"aria-labelledby\": this.props['aria-labelledby'], ref: function (element) { return _this._element = element; }, tabIndex: this.props.tabIndex },\n            React.createElement(\"ul\", { className: \"k-treeview-lines k-treeview-group\", role: \"group\" }, this.data.map(function (item, index) {\n                return (React.createElement(TreeViewItem, { item: item, position: index === 0 ? 'top' : index === _this.data.length - 1 ? 'bot' : 'mid', itemId: index.toString(), treeGuid: _this.treeGuid, animate: _this.props.animate, focusedItemId: _this.state.focusedItemId, tabbableItemId: _this.state.tabbableItemId, fieldsService: _this.fieldsSvc, itemUI: _this.props.item, checkboxes: _this.props.checkboxes, ariaMultiSelectable: _this.ariaMultiSelectable, onItemClick: _this.onItemClick, onFocusDomElNeeded: _this.onFocusDomElNeeded, draggable: _this.props.draggable, onPress: _this.onPress, onDrag: _this.onDrag, onRelease: _this.onRelease, expandIcons: _this.props.expandIcons, onExpandChange: _this.onExpandChange, onCheckChange: _this.onCheckChange, onContextMenu: _this.onContextMenu, key: index, size: size, isRtl: _this.props.dir === 'rtl' }));\n            }))));\n    };\n    /**\n     * @hidden\n     */\n    TreeView.prototype.componentDidUpdate = function () {\n        this.allowExplicitFocus = false;\n        this.refocusDueToFocusIdField();\n    };\n    TreeView.prototype.dispatchEventsOnKeyDown = function (event, focusedItem) {\n        var _this = this;\n        if (this.fieldsSvc === null) {\n            return;\n        }\n        // isEnabled is the most expensive op and that is why is left last.\n        var isEnabled = function () {\n            return _this.fieldsSvc && isEnabledAndAllParentsEnabled(_this.state.focusedItemId, _this.data, _this.fieldsSvc);\n        };\n        if (event.keyCode === Keys.left && this.fieldsSvc.expanded(focusedItem) && isEnabled()) {\n            this.dispatchExpandChange(event, focusedItem, this.state.focusedItemId);\n        }\n        else if (event.keyCode === Keys.right && !this.fieldsSvc.expanded(focusedItem) &&\n            (this.fieldsSvc.hasChildren(focusedItem) || hasChildren(focusedItem, this.props.childrenField)) && isEnabled()) {\n            this.dispatchExpandChange(event, focusedItem, this.state.focusedItemId);\n        }\n        else if (event.keyCode === Keys.enter && isEnabled()) {\n            this.dispatchItemClick(event, focusedItem, this.state.focusedItemId);\n        }\n        else if (event.keyCode === Keys.space && isEnabled()) {\n            // W/o preventDefault() long TreeViews gets incorrectly scrolled.\n            event.preventDefault();\n            this.dispatchCheckChange(event, focusedItem, this.state.focusedItemId);\n        }\n    };\n    TreeView.prototype.setFocus = function (focusedItemId) {\n        if (focusedItemId && this.fieldsSvc) {\n            if (this.fieldsSvc.focusIdField) {\n                var item = this.getItemById(focusedItemId);\n                this.setState({ focusedItemId: focusedItemId, focusedItemPublicId: this.fieldsSvc.focusId(item) });\n            }\n            else {\n                this.setState({ focusedItemId: focusedItemId });\n            }\n        }\n        else {\n            this.setState(function (state) {\n                return {\n                    focusedItemId: undefined,\n                    focusedItemPublicId: undefined,\n                    tabbableItemId: state.focusedItemId\n                };\n            });\n        }\n    };\n    TreeView.prototype.getFocusedItem = function () {\n        return this.state.focusedItemId ? this.getItemById(this.state.focusedItemId) : undefined;\n    };\n    TreeView.prototype.getItemById = function (itemId) {\n        return treeIdUtils.getItemById(itemId, this.data, this.props.childrenField || CHILDREN_FIELD);\n    };\n    TreeView.prototype.dispatchCheckChange = function (dispatchedEvent, item, itemId) {\n        dispatchEvent(this.props.onCheckChange, dispatchedEvent, this, { item: item, itemHierarchicalIndex: itemId });\n    };\n    TreeView.prototype.dispatchExpandChange = function (dispatchedEvent, item, itemId) {\n        dispatchEvent(this.props.onExpandChange, dispatchedEvent, this, { item: item, itemHierarchicalIndex: itemId });\n    };\n    TreeView.prototype.dispatchItemClick = function (dispatchedEvent, item, itemId) {\n        dispatchEvent(this.props.onItemClick, dispatchedEvent, this, { item: item, itemHierarchicalIndex: itemId });\n    };\n    TreeView.prototype.refocusDueToFocusIdField = function () {\n        if (this.fieldsSvc && this.fieldsSvc.focusIdField) {\n            var focusedItemPublicId = this.state.focusedItemPublicId;\n            if (focusedItemPublicId) {\n                var focusedItemId = this.props.getFocusHierarchicalIndex ?\n                    this.props.getFocusHierarchicalIndex(focusedItemPublicId) :\n                    resolveItemId(focusedItemPublicId, this.fieldsSvc.focusIdField, this.data, this.props.childrenField);\n                if (focusedItemId !== this.state.focusedItemId) {\n                    this.allowExplicitFocus = true;\n                    this.setState({ focusedItemId: focusedItemId });\n                }\n            }\n        }\n    };\n    Object.defineProperty(TreeView.prototype, \"ariaMultiSelectable\", {\n        get: function () {\n            return this.props['aria-multiselectable'] === true || this.props['aria-multiselectable'] === 'true';\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(TreeView.prototype, \"data\", {\n        get: function () {\n            return this.props.data || [];\n        },\n        enumerable: false,\n        configurable: true\n    });\n    TreeView.prototype.focusDomItem = function (domItem) {\n        domItem.focus();\n    };\n    Object.defineProperty(TreeView.prototype, \"guid\", {\n        /**\n         * Returns the `guid` which is associated with the TreeView.\n         */\n        get: function () {\n            return this.treeGuid;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    /**\n     * @hidden\n     */\n    TreeView.propTypes = {\n        data: PropTypes.arrayOf(PropTypes.any),\n        animate: PropTypes.bool,\n        tabIndex: PropTypes.number,\n        focusIdField: PropTypes.string,\n        getHierarchicalIndexById: PropTypes.func,\n        onExpandChange: PropTypes.func,\n        onItemClick: PropTypes.func,\n        expandField: PropTypes.string,\n        selectField: PropTypes.string,\n        childrenField: PropTypes.string,\n        hasChildrenField: PropTypes.string,\n        textField: PropTypes.string,\n        disableField: PropTypes.string,\n        item: PropTypes.any,\n        'aria-multiselectable': function (props, propName, componentName) {\n            if (props[propName] !== undefined\n                && props[propName] !== true\n                && props[propName] !== false\n                && props[propName] !== 'true'\n                && props[propName] !== 'false') {\n                return new Error('Invalid prop `' + propName + '` supplied to' +\n                    ' `' + componentName + '`. Validation failed.');\n            }\n            return null;\n        },\n        'aria-label': PropTypes.string,\n        'aria-labelledby': PropTypes.string,\n        size: PropTypes.oneOf([null, 'small', 'medium', 'large']),\n        dir: PropTypes.string\n    };\n    /**\n     * @hidden\n     */\n    TreeView.defaultProps = {\n        animate: true,\n        expandField: EXPAND_FIELD,\n        selectField: SELECT_FIELD,\n        hasChildrenField: HAS_CHILDREN_FIELD,\n        childrenField: CHILDREN_FIELD,\n        textField: TEXT_FIELD,\n        disableField: DISABLED_FIELD,\n        checkField: CHECK_FIELD,\n        checkIndeterminateField: CHECK_INDETERMINATE_FIELD,\n        size: 'medium'\n    };\n    return TreeView;\n}(React.Component));\nexport { TreeView };\n","/* eslint-disable max-len */\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport { updateItem, resolveItemsIds, getNestedValue, isArray } from '@progress/kendo-react-common';\nimport { EXPAND_FIELD, SELECT_FIELD, CHECK_FIELD, CHECK_INDETERMINATE_FIELD, CHILDREN_FIELD } from './utils/consts';\n/**\n * A helper function which applies the specified operation descriptors to the data.\n * * [Expanding and collapsing items]({% slug expansion_ways_treeview %}#toc-using-a-helper-function)\n * * [Selecting and deselecting items]({% slug selection_ways_treeview %}#toc-using-a-helper-function)\n * * [Checking and unchecking items]({% slug check_helper_funcs_treeview %})\n *\n * @param data - The data that will be processed.\n * @param operations - The operation descriptors that will be applied to the data.\n * @returns - The processed copy of the input data.\n *\n * @example\n * ```jsx\n * class App extends React.Component {\n *     state = { items: tree, expand: [], select: [], check: [] };\n *     render() {\n *         const { expand, select, check } = this.state;\n *         return (\n *             <TreeView\n *                 data={processTreeViewItems(this.state.items, { expand, select, check })}\n *                 expandIcons={true} onExpandChange={this.onExpandChange} checkboxes={true}\n *                 onCheckChange={event => this.setState({ check: [ event.itemHierarchicalIndex ] })}\n *                 onItemClick={event => this.setState({ select: [ event.itemHierarchicalIndex ] })}\n *             />\n *         );\n *     }\n *     onExpandChange = (event) => {\n *         let expand = this.state.expand.slice();\n *         const index = expand.indexOf(event.itemHierarchicalIndex);\n *         index === -1 ? expand.push(event.itemHierarchicalIndex) : expand.splice(index, 1);\n *         this.setState({ expand });\n *     }\n * }\n *\n * const tree = [{\n *     text: 'Item1',\n *     items: [\n *         { text: 'Item1.1' },\n *         { text: 'Item1.2' },\n *         { text: 'Item1.3', items: [{ text: 'Item1.3.1' }] }]\n * }, {\n *     text: 'Item2', disabled: true,\n *     items: [{ text: 'Item2.1' }, { text: 'Item2.2' }, { text: 'Item2.3' }]\n * }, {\n *     text: 'Item3'\n * }];\n *\n * ReactDOM.render(<App />, document.querySelector('my-app'));\n * ```\n */\nexport function processTreeViewItems(data, operations) {\n    if (!data || !data.length) {\n        return [];\n    }\n    var result = data;\n    var cloneField = operations.cloneField || 'cloned';\n    var expandField = operations.expandField || EXPAND_FIELD;\n    var selectField = operations.selectField || SELECT_FIELD;\n    var checkField = operations.checkField || CHECK_FIELD;\n    var childrenField = operations.childrenField || CHILDREN_FIELD;\n    result = handleOperation(result, expandField, operations.expand, cloneField, childrenField);\n    result = handleOperation(result, selectField, operations.select, cloneField, childrenField);\n    result = handleOperation(result, checkField, operations.check, cloneField, childrenField);\n    applyCheckIndeterminate(result, childrenField, operations.check);\n    return result;\n}\nfunction handleOperation(items, defaultField, operation, cloneField, childrenField) {\n    if (operation) {\n        var _a = parseOperation(operation, defaultField), ids = _a.ids, field = _a.field;\n        var indices = !isArray(operation) && operation.idField ? resolveItemsIds(ids, operation.idField, items, childrenField) : ids;\n        return raiseFlags(items, indices, field, cloneField, childrenField);\n    }\n    else {\n        return items;\n    }\n}\nfunction parseOperation(operation, defaultField) {\n    var ids;\n    var field;\n    if (isArray(operation)) {\n        ids = operation;\n        field = defaultField;\n    }\n    else {\n        ids = operation.ids || [];\n        field = operation.operationField || defaultField;\n    }\n    return { ids: ids, field: field };\n}\nfunction raiseFlags(items, indices, field, cloneField, childrenField) {\n    var result = items;\n    indices.forEach(function (itemIndex) {\n        result = updateItem(result, itemIndex, function (item) { return raiseNestedFlag(field, item); }, cloneField, childrenField);\n    });\n    return result;\n}\nfunction raiseNestedFlag(fieldName, dataItem) {\n    var fields = (fieldName || '').split('.');\n    var item = dataItem;\n    for (var index = 0; index < fields.length; index++) {\n        var field = fields[index];\n        if (index === fields.length - 1) {\n            item[field] = true;\n        }\n        else if (item[field] !== undefined) {\n            item[field] = __assign({}, item[field]);\n            item = item[field];\n        }\n        else {\n            return;\n        }\n    }\n}\nfunction applyCheckIndeterminate(items, childrenField, check) {\n    if (check && !isArray(check) && check.applyCheckIndeterminate) {\n        var checkField = parseOperation(check, CHECK_FIELD).field;\n        var checkIndeterminateField = check.checkIndeterminateField || CHECK_INDETERMINATE_FIELD;\n        for (var i = 0; i < items.length; i++) {\n            var item = items[i];\n            var subItems = item[childrenField];\n            if (subItems) {\n                applyCheckIndeterminateHelper(subItems, getNestedValue(checkField, item) ? [] : [item], childrenField, checkField, checkIndeterminateField);\n            }\n        }\n    }\n}\nfunction applyCheckIndeterminateHelper(data, parents, childrenField, checkField, checkIndeterminateField) {\n    // The updates will be direct because the corresponding items\n    // are already cloned because of their checked children.\n    var parentsAlreadyUpdated = false;\n    for (var i = 0; i < data.length; i++) {\n        var item = data[i];\n        if (getNestedValue(checkField, item)) {\n            if (!parentsAlreadyUpdated) {\n                for (var j = 0; j < parents.length; j++) {\n                    raiseNestedFlag(checkIndeterminateField, parents[j]);\n                }\n            }\n            parentsAlreadyUpdated = true;\n            if (item[childrenField]) {\n                applyCheckIndeterminateHelper(item[childrenField], [], childrenField, checkField, checkIndeterminateField);\n            }\n        }\n        else {\n            if (item[childrenField]) {\n                applyCheckIndeterminateHelper(item[childrenField], parentsAlreadyUpdated ? [item] : parents.concat([item]), childrenField, checkField, checkIndeterminateField);\n            }\n        }\n    }\n}\n","import { addItem, removeItem, treeIdUtils } from '@progress/kendo-react-common';\nimport { CHILDREN_FIELD } from './utils/consts';\n/**\n *  A helper function which moves a TreeView item in an immutable way.\n *\n * @param sourceItemHierarchicalIndex - The hierarchical index of the item that will be moved.\n * @param sourceData - The tree which contains the item that will be moved.\n * @param operation - The specific move operation.\n *\n * The available options are:\n *  * `before`&mdash;Indicates that the source item will become the previous sibling of the target item.\n *  * `after`&mdash;Indicates that the source item will become the next sibling of the target item.\n *  * `child`&mdash;Indicates that the source item will become a child of the target item.\n * @param targetItemHierarchicalIndex - The hierarchical index of the item next to which the source item will be moved.\n * @param targetData - The tree which contains the target item.\n * If the argument is skipped, then the move operation will be executed within the same tree.\n * Setting the `sourceData` and `targetData` arguments to the same tree is also supported.\n * @param childrenField - The field that points to the dataItem sub items. Defaults to `items`.\n * @returns - The updated copies of the `sourceData` and `targetData` input arguments.\n * If `targetData` is not passed, then only the updated copy of the `sourceData` will be returned.\n *\n * @example\n * ```jsx\n * class App extends React.Component {\n *     dragClue;\n *     state = { tree };\n *\n *     render() {\n *         return (\n *             <div>\n *                 <TreeView data={this.state.tree} draggable={true}\n *                     onItemDragOver={this.onItemDragOver} onItemDragEnd={this.onItemDragEnd} />\n *                 <TreeViewDragClue ref={dragClue => this.dragClue = dragClue} />\n *             </div>\n *         );\n *     }\n *\n *     onItemDragOver = (event) => {\n *         this.dragClue.show(event.pageY + 10, event.pageX, event.item.text, this.getClueClassName(event));\n *     }\n *     onItemDragEnd = (event) => {\n *         this.dragClue.hide();\n *         const eventAnalyzer = new TreeViewDragAnalyzer(event).init();\n *\n *         if (eventAnalyzer.isDropAllowed) {\n *             const updatedTree = moveTreeViewItem(\n *                 event.itemHierarchicalIndex,\n *                 this.state.tree,\n *                 eventAnalyzer.getDropOperation(),\n *                 eventAnalyzer.destinationMeta.itemHierarchicalIndex,\n *             );\n *\n *             this.setState({ tree: updatedTree });\n *         }\n *     }\n *     getClueClassName(event) {\n *         const eventAnalyzer = new TreeViewDragAnalyzer(event).init();\n *         const itemIndex = eventAnalyzer.destinationMeta.itemHierarchicalIndex;\n *\n *         if (eventAnalyzer.isDropAllowed) {\n *             switch (eventAnalyzer.getDropOperation()) {\n *                 case 'child':\n *                     return 'k-i-plus';\n *                 case 'before':\n *                     return itemIndex === '0' || itemIndex.endsWith(`${SEPARATOR}0`) ?\n *                         'k-i-insert-up' : 'k-i-insert-middle';\n *                 case 'after':\n *                     const siblings = getSiblings(itemIndex, this.state.tree);\n *                     const lastIndex = Number(itemIndex.split(SEPARATOR).pop());\n *\n *                     return lastIndex < siblings.length - 1 ? 'k-i-insert-middle' : 'k-i-insert-down';\n *                 default:\n *                     break;\n *             }\n *         }\n *\n *         return 'k-i-cancel';\n *     }\n * }\n *\n * function getSiblings(itemIndex, data) {\n *     let result = data;\n *\n *     const indices = itemIndex.split(SEPARATOR).map(index => Number(index));\n *     for (let i = 0; i < indices.length - 1; i++) {\n *         result = result[indices[i]].items;\n *     }\n *\n *     return result;\n * }\n *\n * const SEPARATOR = '_';\n * const tree = [{\n *     text: 'Furniture', expanded: true, items: [\n *         { text: 'Tables & Chairs', expanded: true },\n *         { text: 'Sofas', expanded: true },\n *         { text: 'Occasional Furniture', expanded: true }]\n * }, {\n *     text: 'Decor', expanded: true, items: [\n *         { text: 'Bed Linen', expanded: true },\n *         { text: 'Curtains & Blinds', expanded: true },\n *         { text: 'Carpets', expanded: true }]\n * }];\n *\n * ReactDOM.render(<App />, document.querySelector('my-app'));\n * ```\n */\nexport function moveTreeViewItem(sourceItemHierarchicalIndex, sourceData, operation, targetItemHierarchicalIndex, targetData, childrenField) {\n    var subItemsField = childrenField || CHILDREN_FIELD;\n    if (!validateInput()) {\n        return prepareInputDataForReturn();\n    }\n    var sourceItem = treeIdUtils.getItemById(sourceItemHierarchicalIndex, sourceData, subItemsField);\n    if (!sourceItem) {\n        return prepareInputDataForReturn();\n    }\n    // The source and the target tree are the same.\n    if (!targetData || targetData === sourceData) {\n        if (!validateNoCircularReference()) {\n            return prepareInputDataForReturn();\n        }\n        var updatedSourceData = removeItem(sourceItemHierarchicalIndex, subItemsField, sourceData);\n        var resultData = addItem(sourceItem, operation, subItemsField, treeIdUtils.getDecrementedItemIdAfterRemoval(sourceItemHierarchicalIndex, targetItemHierarchicalIndex), updatedSourceData);\n        // A simpler output is explicitly returned when the source and the target tree are\n        // the same, that is, the targetData argument is skipped.\n        return targetData ? { sourceData: resultData, targetData: resultData } : resultData;\n    }\n    else {\n        var updatedSource = removeItem(sourceItemHierarchicalIndex, subItemsField, sourceData);\n        var updatedTarget = addItem(sourceItem, operation, subItemsField, targetItemHierarchicalIndex, targetData);\n        return { sourceData: updatedSource, targetData: updatedTarget };\n    }\n    function prepareInputDataForReturn() {\n        return targetData ? { sourceData: sourceData, targetData: targetData } : sourceData;\n    }\n    function validateNoCircularReference() {\n        return !\"\".concat(targetItemHierarchicalIndex, \"_\").startsWith(\"\".concat(sourceItemHierarchicalIndex, \"_\"));\n    }\n    function validateInput() {\n        if (!sourceData || !sourceData.length ||\n            !sourceItemHierarchicalIndex || !targetItemHierarchicalIndex) {\n            return false;\n        }\n        if (targetData && !targetData.length) {\n            // Dropping over an empty tree is not supported.\n            return false;\n        }\n        // Validate that the target item exists.\n        var data = !targetData || targetData === sourceData ? sourceData : targetData;\n        if (!treeIdUtils.getItemById(targetItemHierarchicalIndex, data, subItemsField)) {\n            return false;\n        }\n        return true;\n    }\n}\n","var __generator = (this && this.__generator) || function (thisArg, body) {\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n    function verb(n) { return function (v) { return step([n, v]); }; }\n    function step(op) {\n        if (f) throw new TypeError(\"Generator is already executing.\");\n        while (_) try {\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n            if (y = 0, t) op = [op[0] & 2, t.value];\n            switch (op[0]) {\n                case 0: case 1: t = op; break;\n                case 4: _.label++; return { value: op[1], done: false };\n                case 5: _.label++; y = op[1]; op = [0]; continue;\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\n                default:\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n                    if (t[2]) _.ops.pop();\n                    _.trys.pop(); continue;\n            }\n            op = body.call(thisArg, _);\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n    }\n};\nimport { getAllDirectIndirectChildrenIds, areAllDirectChildrenChecked, getAllParents, isArray, getNestedValue, treeIdUtils } from '@progress/kendo-react-common';\nimport { CHILDREN_FIELD } from './utils/consts';\n/**\n * A helper function which updates the check descriptor.\n *\n * @param event - The event that triggered the change.\n * @param check - The check descriptor that will be updated.\n * @param data - The TreeView items.\n * @param settings - The additional settings that configure the update of the check descriptor.\n * @param childrenField - The field that points to the dataItem sub items. Defaults to `items`.\n * The default behavior allows the selection of multiple items.\n * @returns - The updated copy of the input check descriptor.\n *\n * @example\n * ```jsx\n * class App extends React.Component {\n *    state = { check: [], items: tree };\n *    render() {\n *        return (\n *            <div>\n *                <TreeView\n *                    checkboxes={true} onCheckChange={this.onCheckChange}\n *                    data={processTreeViewItems(this.state.items, { check: this.state.check })}\n *                />\n *                <div style={{ marginTop: 5 }}>\n *                    <i>Press SPACE to check/uncheck the active item</i>\n *                    <div className=\"example-config\">\n *                        Checked Indices: {this.state.check.join(\",\")}\n *                    </div>\n *                </div>\n *            </div>\n *        );\n *    }\n *    onCheckChange = (event) => {\n *        this.setState({ check: handleTreeViewCheckChange(event, this.state.check, this.state.items) });\n *    }\n * }\n *\n * const tree = [ {\n *    text: 'Furniture', expanded: true, items: [\n *        { text: 'Tables & Chairs' }, { text: 'Sofas' }, { text: 'Occasional Furniture' } ]\n * }, {\n *    text: 'Decor', expanded: true, items: [\n *        { text: 'Bed Linen' }, { text: 'Curtains & Blinds' }, { text: 'Carpets' } ]\n * } ];\n *\n * ReactDOM.render(<App />, document.querySelector('my-app'));\n * ```\n */\nexport function handleTreeViewCheckChange(event, check, data, settings, childrenField) {\n    if (settings === void 0) { settings = {}; }\n    if (!data || !data.length) {\n        return [];\n    }\n    var _a = parseOperation(check), ids = _a.ids, idField = _a.idField;\n    var itemId = idField ? getNestedValue(idField, event.item) : event.itemHierarchicalIndex;\n    var idIndex = ids.indexOf(itemId);\n    var itemJustChecked = idIndex === -1;\n    var subItemsField = childrenField || CHILDREN_FIELD;\n    var newIds;\n    if (settings.singleMode) {\n        newIds = itemJustChecked ? [itemId] : [];\n    }\n    else {\n        newIds = ids.slice();\n        itemJustChecked ? newIds.push(itemId) : newIds.splice(idIndex, 1);\n        if (settings.checkChildren) {\n            checkChildren(event.item, event.itemHierarchicalIndex, itemJustChecked, idField, subItemsField, newIds);\n        }\n        if (settings.checkParents) {\n            checkParents(event.itemHierarchicalIndex, itemJustChecked, idField, subItemsField, newIds, data);\n        }\n    }\n    return isArray(check) ? newIds : Object.assign({}, check, { ids: newIds });\n}\nfunction parseOperation(operation) {\n    var ids;\n    var idField = undefined;\n    if (isArray(operation)) {\n        ids = operation;\n    }\n    else {\n        ids = operation.ids || [];\n        idField = operation.idField;\n    }\n    return { ids: ids, idField: idField };\n}\nfunction checkChildren(item, itemHierarchicalIndex, itemJustChecked, idField, childrenField, ids) {\n    getAllDirectIndirectChildrenIds(item, itemHierarchicalIndex, childrenField, idField).forEach(function (itemId) {\n        if (itemJustChecked && ids.indexOf(itemId) === -1) {\n            ids.push(itemId);\n        }\n        else if (!itemJustChecked && ids.indexOf(itemId) > -1) {\n            ids.splice(ids.indexOf(itemId), 1);\n        }\n    });\n}\nfunction checkParents(itemHierarchicalIndex, itemJustChecked, idField, childrenField, ids, data) {\n    var it = makeParentsIterator();\n    var result = it.next();\n    itemJustChecked ? check() : uncheck();\n    function check() {\n        // Check all parents which have all their children checked.\n        while (!result.done) {\n            var _a = result.value, id = _a.id, item = _a.item;\n            // The first check is needed. However, it is not sure whether to stop the entire loop.\n            if (ids.indexOf(id) === -1 &&\n                areAllDirectChildrenChecked(item, id, idField, childrenField, ids)) {\n                ids.push(id);\n                result = it.next();\n            }\n            else {\n                break;\n            }\n        }\n    }\n    function uncheck() {\n        // Uncheck parents until an already unchecked parent is reached.\n        while (!result.done) {\n            var id = result.value.id;\n            var idIndex = ids.indexOf(id);\n            if (idIndex > -1) {\n                ids.splice(idIndex, 1);\n                result = it.next();\n            }\n            else {\n                break;\n            }\n        }\n    }\n    // When called for unchecking, the parent items are not needed.\n    // That is why, for optimization, they are not returned.\n    function makeParentsIterator() {\n        var parents, i, parentId;\n        return __generator(this, function (_a) {\n            switch (_a.label) {\n                case 0:\n                    if (!idField) return [3 /*break*/, 5];\n                    parents = getAllParents(itemHierarchicalIndex, childrenField, data);\n                    i = parents.length - 1;\n                    _a.label = 1;\n                case 1:\n                    if (!(i > -1)) return [3 /*break*/, 4];\n                    return [4 /*yield*/, { id: getNestedValue(idField, parents[i]), item: itemJustChecked ? parents[i] : undefined }];\n                case 2:\n                    _a.sent();\n                    _a.label = 3;\n                case 3:\n                    i--;\n                    return [3 /*break*/, 1];\n                case 4: return [3 /*break*/, 8];\n                case 5:\n                    parentId = treeIdUtils.getDirectParentId(itemHierarchicalIndex);\n                    _a.label = 6;\n                case 6:\n                    if (!parentId) return [3 /*break*/, 8];\n                    return [4 /*yield*/, { id: parentId, item: itemJustChecked ? treeIdUtils.getItemById(parentId, data, childrenField) : undefined }];\n                case 7:\n                    _a.sent();\n                    parentId = treeIdUtils.getDirectParentId(parentId);\n                    return [3 /*break*/, 6];\n                case 8: return [2 /*return*/];\n            }\n        });\n    }\n}\n","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport * as React from 'react';\nimport { IconWrap, classNames, toIconName } from '@progress/kendo-react-common';\nimport { cancelIcon, insertBottomIcon, insertMiddleIcon, insertTopIcon, plusIcon } from '@progress/kendo-svg-icons';\n/**\n * Represents the KendoReact TreeViewDragClue component which renders a clue when an item is dragged.\n *\n * @example\n * ```jsx\n * class App extends React.Component {\n *     dragClue;\n *     state = { tree };\n *\n *     render() {\n *         return (\n *             <div>\n *                 <TreeView data={this.state.tree} draggable={true}\n *                     onItemDragOver={this.onItemDragOver} onItemDragEnd={this.onItemDragEnd} />\n *                 <TreeViewDragClue ref={dragClue => this.dragClue = dragClue} />\n *             </div>\n *         );\n *     }\n *\n *     onItemDragOver = (event) => {\n *         this.dragClue.show(event.pageY + 10, event.pageX, event.item.text, this.getClueClassName(event));\n *     }\n *     onItemDragEnd = (event) => {\n *         this.dragClue.hide();\n *         const eventAnalyzer = new TreeViewDragAnalyzer(event).init();\n *\n *         if (eventAnalyzer.isDropAllowed) {\n *             const updatedTree = moveTreeViewItem(\n *                 event.itemHierarchicalIndex,\n *                 this.state.tree,\n *                 eventAnalyzer.getDropOperation(),\n *                 eventAnalyzer.destinationMeta.itemHierarchicalIndex,\n *             );\n *\n *             this.setState({ tree: updatedTree });\n *         }\n *     }\n *     getClueClassName(event) {\n *         const eventAnalyzer = new TreeViewDragAnalyzer(event).init();\n *         const itemIndex = eventAnalyzer.destinationMeta.itemHierarchicalIndex;\n *\n *         if (eventAnalyzer.isDropAllowed) {\n *             switch (eventAnalyzer.getDropOperation()) {\n *                 case 'child':\n *                     return 'k-i-plus';\n *                 case 'before':\n *                     return itemIndex === '0' || itemIndex.endsWith(`${SEPARATOR}0`) ?\n *                         'k-i-insert-up' : 'k-i-insert-middle';\n *                 case 'after':\n *                     const siblings = getSiblings(itemIndex, this.state.tree);\n *                     const lastIndex = Number(itemIndex.split(SEPARATOR).pop());\n *\n *                     return lastIndex < siblings.length - 1 ? 'k-i-insert-middle' : 'k-i-insert-down';\n *                 default:\n *                     break;\n *             }\n *         }\n *\n *         return 'k-i-cancel';\n *     }\n * }\n *\n * function getSiblings(itemIndex, data) {\n *     let result = data;\n *\n *     const indices = itemIndex.split(SEPARATOR).map(index => Number(index));\n *     for (let i = 0; i < indices.length - 1; i++) {\n *         result = result[indices[i]].items;\n *     }\n *\n *     return result;\n * }\n *\n * const SEPARATOR = '_';\n * const tree = [{\n *     text: 'Furniture', expanded: true, items: [\n *         { text: 'Tables & Chairs', expanded: true },\n *         { text: 'Sofas', expanded: true },\n *         { text: 'Occasional Furniture', expanded: true }]\n * }, {\n *     text: 'Decor', expanded: true, items: [\n *         { text: 'Bed Linen', expanded: true },\n *         { text: 'Curtains & Blinds', expanded: true },\n *         { text: 'Carpets', expanded: true }]\n * }];\n *\n * ReactDOM.render(<App />, document.querySelector('my-app'));\n * ```\n */\nvar TreeViewDragClue = /** @class */ (function (_super) {\n    __extends(TreeViewDragClue, _super);\n    function TreeViewDragClue() {\n        var _this = _super !== null && _super.apply(this, arguments) || this;\n        /**\n         * @hidden\n         */\n        _this.state = {\n            visible: false,\n            top: 0,\n            left: 0,\n            text: '',\n            operationClassName: 'cancel'\n        };\n        return _this;\n    }\n    /**\n     * @hidden\n     */\n    TreeViewDragClue.prototype.render = function () {\n        var dynamicStyle = { top: this.state.top + 'px', left: this.state.left + 'px' };\n        return this.state.visible && (React.createElement(\"div\", { className: \"k-header k-drag-clue\", style: __assign(__assign({}, this.props.style), dynamicStyle) },\n            React.createElement(IconWrap, { className: classNames('k-drag-status'), name: this.state.operationClassName && toIconName(this.state.operationClassName), icon: this.state.operationClassName === 'k-i-plus' ? plusIcon\n                    : this.state.operationClassName === 'k-i-insert-up' ? insertTopIcon\n                        : this.state.operationClassName === 'k-i-insert-up' ? insertBottomIcon\n                            : this.state.operationClassName === 'k-i-insert-middle' ? insertMiddleIcon\n                                : cancelIcon }),\n            this.state.text));\n    };\n    /**\n     * Displays the TreeViewDragClue component.\n     *\n     * @param top - The `top` CSS position of the component.\n     * @param left - The `left` CSS position of the component.\n     * @param text - The text of the component.\n     * @param operationClassName - The CSS class name which is related to the specific drop operation.\n     */\n    TreeViewDragClue.prototype.show = function (top, left, text, operationClassName) {\n        this.setState({ visible: true, top: top, left: left, text: text, operationClassName: operationClassName });\n    };\n    /**\n     * Hides the TreeViewDragClue component.\n     */\n    TreeViewDragClue.prototype.hide = function () {\n        this.setState({ visible: false });\n    };\n    /**\n     * @hidden\n     */\n    TreeViewDragClue.defaultProps = { style: { display: 'block', position: 'absolute', zIndex: 20000, padding: '4px 6px' } };\n    return TreeViewDragClue;\n}(React.PureComponent));\nexport { TreeViewDragClue };\n","import { DOM_KENDO_ITEM_ID_FIELD, DOM_KENDO_TREEVIEW_GUID_FIELD } from './utils/consts';\nvar DROPZONE_BOUNDARY_DELTA = 6;\n/**\n * A class which provides an API for analyzing the `drag` events\n * of the TreeView.\n *\n * @example\n * ```jsx\n * class App extends React.Component {\n *     dragClue;\n *     state = { tree };\n *\n *     render() {\n *         return (\n *             <div>\n *                 <TreeView data={this.state.tree} draggable={true}\n *                     onItemDragOver={this.onItemDragOver} onItemDragEnd={this.onItemDragEnd} />\n *                 <TreeViewDragClue ref={dragClue => this.dragClue = dragClue} />\n *             </div>\n *         );\n *     }\n *\n *     onItemDragOver = (event) => {\n *         this.dragClue.show(event.pageY + 10, event.pageX, event.item.text, this.getClueClassName(event));\n *     }\n *     onItemDragEnd = (event) => {\n *         this.dragClue.hide();\n *         const eventAnalyzer = new TreeViewDragAnalyzer(event).init();\n *\n *         if (eventAnalyzer.isDropAllowed) {\n *             const updatedTree = moveTreeViewItem(\n *                 event.itemHierarchicalIndex,\n *                 this.state.tree,\n *                 eventAnalyzer.getDropOperation(),\n *                 eventAnalyzer.destinationMeta.itemHierarchicalIndex,\n *             );\n *\n *             this.setState({ tree: updatedTree });\n *         }\n *     }\n *     getClueClassName(event) {\n *         const eventAnalyzer = new TreeViewDragAnalyzer(event).init();\n *         const itemIndex = eventAnalyzer.destinationMeta.itemHierarchicalIndex;\n *\n *         if (eventAnalyzer.isDropAllowed) {\n *             switch (eventAnalyzer.getDropOperation()) {\n *                 case 'child':\n *                     return 'k-i-plus';\n *                 case 'before':\n *                     return itemIndex === '0' || itemIndex.endsWith(`${SEPARATOR}0`) ?\n *                         'k-i-insert-up' : 'k-i-insert-middle';\n *                 case 'after':\n *                     const siblings = getSiblings(itemIndex, this.state.tree);\n *                     const lastIndex = Number(itemIndex.split(SEPARATOR).pop());\n *\n *                     return lastIndex < siblings.length - 1 ? 'k-i-insert-middle' : 'k-i-insert-down';\n *                 default:\n *                     break;\n *             }\n *         }\n *\n *         return 'k-i-cancel';\n *     }\n * }\n *\n * function getSiblings(itemIndex, data) {\n *     let result = data;\n *\n *     const indices = itemIndex.split(SEPARATOR).map(index => Number(index));\n *     for (let i = 0; i < indices.length - 1; i++) {\n *         result = result[indices[i]].items;\n *     }\n *\n *     return result;\n * }\n *\n * const SEPARATOR = '_';\n * const tree = [{\n *     text: 'Furniture', expanded: true, items: [\n *         { text: 'Tables & Chairs', expanded: true },\n *         { text: 'Sofas', expanded: true },\n *         { text: 'Occasional Furniture', expanded: true }]\n * }, {\n *     text: 'Decor', expanded: true, items: [\n *         { text: 'Bed Linen', expanded: true },\n *         { text: 'Curtains & Blinds', expanded: true },\n *         { text: 'Carpets', expanded: true }]\n * }];\n *\n * ReactDOM.render(<App />, document.querySelector('my-app'));\n * ```\n */\nvar TreeViewDragAnalyzer = /** @class */ (function () {\n    /**\n     * @param event - The event that will be analyzed.\n     */\n    function TreeViewDragAnalyzer(event) {\n        this.event = event;\n        this.initialized = false;\n        this.destItemId = '';\n        this.destTreeViewGuid = '';\n        this.itemId = event.itemHierarchicalIndex;\n        this.treeViewGuid = event.target.guid;\n    }\n    /**\n     * The method which initializes the analyzer.\n     * Invoke the method before you call any other methods.\n     *\n     * @returns - The analyzer object of the `drag` event.\n     */\n    TreeViewDragAnalyzer.prototype.init = function () {\n        if (!this.initialized) {\n            this.setDestimationMeta(document.elementFromPoint(this.event.clientX, this.event.clientY));\n            this.initialized = true;\n        }\n        return this;\n    };\n    Object.defineProperty(TreeViewDragAnalyzer.prototype, \"isDropAllowed\", {\n        /**\n         * Returns `true` if dropping is allowed. Otherwise, returns `false`.\n         */\n        get: function () {\n            if (this.initialized && this.destItemId && this.destTreeViewGuid) {\n                // Disallow circular references.\n                return !((\"\".concat(this.destTreeViewGuid, \"_\").concat(this.destItemId, \"_\")).\n                    startsWith(\"\".concat(this.treeViewGuid, \"_\").concat(this.itemId, \"_\")));\n            }\n            else {\n                return false;\n            }\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(TreeViewDragAnalyzer.prototype, \"destinationMeta\", {\n        /**\n         * Returns an object which contains:\n         * * The `itemHierarchicalIndex` of the destination item (the item below the dragged item) and\n         * * The `guid` of the destination TreeView (the TreeView which renders the destination item).\n         */\n        get: function () {\n            return { itemHierarchicalIndex: this.destItemId, treeViewGuid: this.destTreeViewGuid };\n        },\n        enumerable: false,\n        configurable: true\n    });\n    /**\n     * Returns the specific drop operation.\n     *\n     * @returns - The following values are returned:\n     * * `before`&mdash;Indicates that the dragged item is positioned at the beginning of the destination item.\n     * * `after`&mdash;Indicates that the dragged item is positioned at the end of the destination item.\n     * * `child`&mdash;Indicates that the dragged item is positioned in the middle of the destination item.\n     * * `undefined`&mdash;Indicates that dropping is not allowed.\n     */\n    TreeViewDragAnalyzer.prototype.getDropOperation = function () {\n        if (this.initialized && this.isDropAllowed) {\n            var _a = this.destDomNodeWithMeta.getBoundingClientRect(), top_1 = _a.top, height = _a.height;\n            if (top_1 + height - this.event.clientY < DROPZONE_BOUNDARY_DELTA) {\n                return 'after';\n            }\n            else if (this.event.clientY - top_1 < DROPZONE_BOUNDARY_DELTA) {\n                return 'before';\n            }\n            else {\n                return 'child';\n            }\n        }\n        else {\n            return undefined;\n        }\n    };\n    TreeViewDragAnalyzer.prototype.setDestimationMeta = function (element) {\n        var node = element;\n        while (node && !node[DOM_KENDO_ITEM_ID_FIELD]) {\n            node = node.parentNode;\n        }\n        if (node && node[DOM_KENDO_ITEM_ID_FIELD]) {\n            this.destDomNodeWithMeta = node;\n            this.destItemId = node[DOM_KENDO_ITEM_ID_FIELD];\n            this.destTreeViewGuid = node[DOM_KENDO_TREEVIEW_GUID_FIELD];\n        }\n    };\n    return TreeViewDragAnalyzer;\n}());\nexport { TreeViewDragAnalyzer };\n"],"names":["getItemIdUponKeyboardNavigation","item","itemId","items","keyCode","fieldsSvc","Keys","left","treeIdUtils","isIdZeroLevel","expanded","isEnabledAndAllParentsEnabled","getDirectParentId","right","isItemExpandedAndWithChildren","getFirstChildId","up","index","Number","getShortId","parentId","getLastNotOpenedChildId","createId","getIdUponUpKey","down","getNextItemId","home","ZERO_LEVEL_ZERO_NODE_ID","end","children","result","length","toString","currentItem","getChildrenField","getIdUponEndKey","parent","getItemById","undefined","siblings","EXPAND_FIELD","CHILDREN_FIELD","SELECT_FIELD","CHECK_FIELD","CHECK_INDETERMINATE_FIELD","DOM_KENDO_ITEM_ID_FIELD","DOM_KENDO_TREEVIEW_GUID_FIELD","__extends","extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","TypeError","String","__","this","constructor","create","__assign","assign","t","s","i","n","arguments","apply","sizeMap","kendoThemeMaps","TreeViewItemPropsContext","React","props","TreeViewItemWithoutContext","_super","_this","itemGuid","guid","onCheckChange","e","onExpandChange","onItemClick","onPress","event","onDrag","onRelease","onContextMenu","assignDraggableMeta","element","treeGuid","render","subitems","renderSubitemsIfApplicable","itemInPart","renderItemInPart","className","classNames","tabIndex","role","ariaExpanded","ariaSelected","ariaChecked","disabled","ref","el","itemElement","concat","position","renderExpandIcon","renderCheckbox","draggable","Draggable","animate","Reveal","transitionEnterDuration","transitionExitDuration","style","display","componentDidMount","focusedItemId","currentItemId","onFocusDomElNeeded","checkboxElement","indeterminate","checkIndeterminate","componentDidUpdate","prevProps","fieldsService","_a","checkboxes","size","type","text","checked","Boolean","id","onChange","htmlFor","expandIcons","hasChildren","onClick","IconWrap","getIconProps","data","map","TreeViewItem","tabbableItemId","itemUI","ariaMultiSelectable","key","isRtl","selected","touchAction","itemHierarchicalIndex","defineProperty","get","enumerable","configurable","name","icon","caretAltDownIcon","caretAltLeftIcon","caretAltRightIcon","defaultProps","treeViewItemProps","displayName","packageMetadata","productName","productCodes","publishDate","version","licensingDocsUrl","TreeView","state","focusedItemPublicId","allowExplicitFocus","_element","domItem","focusDomItem","setFocus","dispatchCheckChange","dispatchExpandChange","_event","onItemDragStart","target","pageX","pageY","clientX","clientY","onItemDragOver","onItemDragEnd","dispatchItemClick","onFocus","clearTimeout","blurRequest","onBlur","window","setTimeout","onKeyDown","focusedItem","getFocusedItem","newItemId","nav","preventDefault","dispatchEventsOnKeyDown","ev","syntheticEvent","nativeEvent","itemID","validatePackage","FieldsService","_b","dir","refocusDueToFocusIdField","isEnabled","childrenField","enter","space","focusIdField","setState","focusId","dispatchedEvent","dispatchEvent","getFocusHierarchicalIndex","resolveItemId","focus","propTypes","PropTypes","getHierarchicalIndexById","expandField","selectField","hasChildrenField","textField","disableField","propName","componentName","Error","checkField","checkIndeterminateField","processTreeViewItems","operations","cloneField","handleOperation","expand","select","check","isArray","applyCheckIndeterminate","parseOperation","field","subItems","applyCheckIndeterminateHelper","getNestedValue","defaultField","operation","ids","indices","forEach","itemIndex","updateItem","raiseNestedFlag","raiseFlags","idField","resolveItemsIds","operationField","fieldName","dataItem","fields","split","parents","parentsAlreadyUpdated","j","moveTreeViewItem","sourceItemHierarchicalIndex","sourceData","targetItemHierarchicalIndex","targetData","subItemsField","validateInput","prepareInputDataForReturn","sourceItem","removeItem","addItem","startsWith","updatedSourceData","resultData","getDecrementedItemIdAfterRemoval","__generator","thisArg","body","f","y","g","_","label","sent","trys","ops","next","verb","Symbol","iterator","v","op","done","value","pop","push","step","handleTreeViewCheckChange","settings","newIds","idIndex","indexOf","itemJustChecked","singleMode","slice","splice","checkChildren","getAllDirectIndirectChildrenIds","checkParents","it","makeParentsIterator","areAllDirectChildrenChecked","uncheck","getAllParents","TreeViewDragClue","visible","top","operationClassName","dynamicStyle","toIconName","plusIcon","insertTopIcon","insertBottomIcon","insertMiddleIcon","cancelIcon","show","hide","zIndex","padding","TreeViewDragAnalyzer","initialized","destItemId","destTreeViewGuid","treeViewGuid","init","setDestimationMeta","document","elementFromPoint","getDropOperation","isDropAllowed","destDomNodeWithMeta","getBoundingClientRect","top_1","height","node","parentNode"],"sourceRoot":""}