/*! * filename: ej2-lists.min.js * version : 19.1.56 * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved. * Use of this code is subject to the terms of our license. * A copy of the current license can be obtained at any time by e-mailing * licensing@syncfusion.com. Any infringement will be prosecuted under * applicable laws. */ this.ej=this.ej||{},this.ej.lists=function(e,t,i,s){"use strict";function n(e,i){var s={};if(t.isNullOrUndefined(e)||"string"==typeof e||"number"==typeof e||!t.isNullOrUndefined(e.isHeader))return e;for(var n=0,l=Object.keys(i);nli");r.classList.remove("json-parent");for(var c=0;c=0;a--)(n=e[a])&&(r=(l<3?n(r):l>3?n(t,i,r):n(t,i))||r);return l>3&&r&&Object.defineProperty(t,i,r),r},o={None:[],SlideLeft:["SlideRightOut","SlideLeftOut","SlideLeftIn","SlideRightIn"],SlideDown:["SlideTopOut","SlideBottomOut","SlideBottomIn","SlideTopIn"],Zoom:["FadeOut","FadeZoomOut","FadeZoomIn","FadeIn"],Fade:["FadeOut","FadeOut","FadeIn","FadeIn"]},c={None:[],SlideLeft:["SlideLeftOut","SlideRightOut","SlideRightIn","SlideLeftIn"],SlideDown:["SlideBottomOut","SlideTopOut","SlideTopIn","SlideBottomIn"],Zoom:["FadeZoomOut","FadeOut","FadeIn","FadeZoomIn"],Fade:["FadeOut","FadeOut","FadeIn","FadeIn"]},h={root:"e-listview",hover:"e-hover",selected:"e-active",focused:"e-focused",parentItem:"e-list-parent",listItem:"e-list-item",listIcon:"e-list-icon",textContent:"e-text-content",listItemText:"e-list-text",groupListItem:"e-list-group-item",hasChild:"e-has-child",view:"e-view",header:"e-list-header",headerText:"e-headertext",headerTemplateText:"e-headertemplate-text",text:"e-text",disable:"e-disabled",content:"e-content",icon:"e-icons",backIcon:"e-icon-back",checkboxWrapper:"e-checkbox-wrapper",checkbox:"e-checkbox",checked:"e-check",checklist:"e-checklist",checkboxIcon:"e-frame",checkboxRight:"e-checkbox-right",checkboxLeft:"e-checkbox-left",listviewCheckbox:"e-listview-checkbox",itemCheckList:"e-checklist",virtualElementContainer:"e-list-virtualcontainer"},d=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return r(i,e),a([t.Property("id")],i.prototype,"id",void 0),a([t.Property("text")],i.prototype,"text",void 0),a([t.Property("isChecked")],i.prototype,"isChecked",void 0),a([t.Property("isVisible")],i.prototype,"isVisible",void 0),a([t.Property("enabled")],i.prototype,"enabled",void 0),a([t.Property("iconCss")],i.prototype,"iconCss",void 0),a([t.Property("child")],i.prototype,"child",void 0),a([t.Property("tooltip")],i.prototype,"tooltip",void 0),a([t.Property("groupBy")],i.prototype,"groupBy",void 0),a([t.Property("text")],i.prototype,"sortBy",void 0),a([t.Property("htmlAttributes")],i.prototype,"htmlAttributes",void 0),a([t.Property("tableName")],i.prototype,"tableName",void 0),i}(t.ChildProperty),u=function(l){function u(e,t){var i=l.call(this,e,t)||this;return i.itemReRender=!1,i.previousSelectedItems=[],i.hiddenItems=[],i.enabledItems=[],i.disabledItems=[],i}return r(u,l),u.prototype.onPropertyChanged=function(e,i){for(var s=0,n=Object.keys(e);su&&(!0===this.isWindow?window.scroll(0,pageYOffset+(a-u)):this.element.scrollTop=this.element.scrollTop+(a-u))}}else if(this.enableVirtualization&&t&&this.virtualizationModule.uiFirstIndex)this.onUIScrolled=function(){i.onArrowKeyDown(e,t),i.onUIScrolled=void 0},a=this.virtualizationModule.listItemHeight,!0===this.isWindow?window.scroll(0,pageYOffset-a):this.element.scrollTop=this.element.scrollTop-a;else if(t)if(this.showHeader&&this.headerEle){var p=o?o.top:r.top,m=this.headerEle.getBoundingClientRect();a=m.top<0?m.height-p:0,!0===this.isWindow?window.scroll(0,pageYOffset-a):this.element.scrollTop=0}else this.fields.groupBy&&(a=this.isWindow?o.top<0?o.top:0:n-r.top+o.height,!0===this.isWindow?window.scroll(0,pageYOffset+a):this.element.scrollTop=this.element.scrollTop-a)}},u.prototype.enterKeyHandler=function(e){if(Object.keys(this.dataSource).length&&this.curUL){var i=!t.isNullOrUndefined(this.curUL.querySelector("."+h.hasChild)),s=this.curUL.querySelector("."+h.focused);i&&s&&(s.classList.remove(h.focused),this.showCheckBox&&(this.removeSelect(),this.removeSelect(s),this.removeHover()),this.setSelectLI(s,e))}},u.prototype.spaceKeyHandler=function(){if(this.enable&&this.showCheckBox&&Object.keys(this.dataSource).length&&this.curUL){var e=this.curUL.querySelector("."+h.focused);if(!t.isNullOrUndefined(e)&&t.isNullOrUndefined(e.querySelector("."+h.checked))){var i={curData:void 0,dataSource:void 0,fields:void 0,options:void 0,text:void 0,item:e};this.checkInternally(i,i.item.querySelector("."+h.checkboxWrapper))}else this.uncheckItem(e)}},u.prototype.keyActionHandler=function(e){switch(e.keyCode){case 36:this.homeKeyHandler(e);break;case 35:this.homeKeyHandler(e,!0);break;case 40:this.arrowKeyHandler(e);break;case 38:this.arrowKeyHandler(e,!0);break;case 13:this.enterKeyHandler(e);break;case 8:this.showCheckBox&&this.curDSLevel[this.curDSLevel.length-1]&&this.uncheckAllItems(),this.back();break;case 32:this.spaceKeyHandler()}},u.prototype.swipeActionHandler=function(e){"Right"===e.swipeDirection&&e.velocity>.5&&"touchend"===e.originalEvent.type&&(this.showCheckBox&&this.curDSLevel[this.curDSLevel.length-1]&&this.uncheckAllItems(),this.back())},u.prototype.focusout=function(){if(Object.keys(this.dataSource).length&&this.curUL){var e=this.curUL.querySelector("."+h.focused),t=this.curUL.querySelector("[aria-selected = true]");e&&(e.classList.remove(h.focused),t&&!this.showCheckBox&&t.classList.add(h.selected))}},u.prototype.wireEvents=function(){t.EventHandler.add(this.element,"keydown",this.keyActionHandler,this),t.EventHandler.add(this.element,"click",this.clickHandler,this),t.EventHandler.add(this.element,"mouseover",this.hoverHandler,this),t.EventHandler.add(this.element,"mouseout",this.leaveHandler,this),t.EventHandler.add(this.element,"focusout",this.focusout,this),this.touchModule=new t.Touch(this.element,{swipe:this.swipeActionHandler.bind(this)})},u.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler),t.EventHandler.remove(this.element,"mouseover",this.hoverHandler),t.EventHandler.remove(this.element,"mouseout",this.leaveHandler),t.EventHandler.remove(this.element,"mouseover",this.hoverHandler),t.EventHandler.remove(this.element,"mouseout",this.leaveHandler),this.touchModule.destroy()},u.prototype.removeFocus=function(){for(var e=0,t=this.element.querySelectorAll("."+h.focused);e0)for(var r=0;r0)for(var a=0;a0)for(var o=0;o0)for(var c=0;c=0;t--)e.push(this.curDSLevel[t]);return e},u.prototype.getSelectedItems=function(){var e,s=!1;this.selectedId=[];var l=this.dataSource instanceof i.DataManager?this.localData:this.dataSource;if(this.enableVirtualization&&!s)e=this.virtualizationModule.getSelectedItems(),s=!0;else if(this.showCheckBox&&!s){var r=this.curUL.getElementsByClassName(h.selected),a=[],o=[];this.selectedId=[];for(var c=[],d=0;d0)for(;this.curDSLevel.some(function(e){return e.toString().toLowerCase()===t});)this.back()},u.prototype.removeMultipleItems=function(e){if(e.length){for(var t=0;te&&(i=e),i},s.prototype.uiIndicesInitialization=function(){this.uiIndices={activeIndices:[],disabledItemIndices:[],hiddenItemIndices:[]};for(var e=this.listViewInstance.curViewDS,i=0;i=3||l-2-this.elementDifference<=-1){var r={listDiff:l-2,selectedItems:this.listViewInstance.previousSelectedItems};this.listViewInstance.interopAdaptor.invokeMethodAsync("VirtalScrolling",r),this.listViewInstance.ulElement.querySelector(".e-focused")&&this.listViewInstance.ulElement.querySelector(".e-focused").classList.remove("e-focused"),this.elementDifference=l-2}}else this.topElementHeight!==parseFloat(this.topElement.style.height)&&(this.topElement.style.height=this.topElementHeight+"px",this.bottomElement.style.height=this.bottomElementHeight+"px",n>this.scrollPosition?(l=Math.round(this.topElementHeight/this.listItemHeight-this.listDiff))>this.expectedDomItemCount+5?this.onLongScroll(l,!0):this.onNormalScroll(l,!0):(l=Math.round(this.listDiff-this.topElementHeight/this.listItemHeight))>this.expectedDomItemCount+5?this.onLongScroll(l,!1):this.onNormalScroll(l,!1)),this.listDiff=Math.round(this.topElementHeight/this.listItemHeight),"function"==typeof this.listViewInstance.onUIScrolled&&this.listViewInstance.onUIScrolled();this.scrollPosition=n},s.prototype.onLongScroll=function(e,t){for(var i=t?this.uiFirstIndex+e:this.uiFirstIndex-e,s=this.listViewInstance.ulElement.querySelectorAll("li"),n=0;n-1&&this.listViewInstance.previousSelectedItems.splice(o,1)}else this.listViewInstance.previousSelectedItems.push(a);else this.listViewInstance.previousSelectedItems[0]=a;this.listViewInstance.removeActiveClass()}},s.prototype.enableItem=function(e){var i=this.findDSAndIndexFromId(this.listViewInstance.curViewDS,e);if(t.isBlazor()&&this.listViewInstance.isServerRendered){var s=i.data[this.listViewInstance.fields.id];if(this.listViewInstance.enabledItems.includes(s)||(this.listViewInstance.enabledItems.push(s),this.listViewInstance.removeActiveClass()),this.listViewInstance.disabledItems.includes(s)){var n=this.listViewInstance.disabledItems.indexOf(s);n>-1&&this.listViewInstance.disabledItems.splice(n,1)}}else Object.keys(i).length&&this.uiIndices.disabledItemIndices.splice(this.uiIndices.disabledItemIndices.indexOf(i.index),1)},s.prototype.disableItem=function(e){var i=this.findDSAndIndexFromId(this.listViewInstance.curViewDS,e);if(t.isBlazor()&&this.listViewInstance.isServerRendered){var s=i.data[this.listViewInstance.fields.id];if(this.listViewInstance.disabledItems.includes(s)||(this.listViewInstance.disabledItems.push(s),this.listViewInstance.removeActiveClass()),this.listViewInstance.enabledItems.includes(s)){var n=this.listViewInstance.enabledItems.indexOf(s);n>-1&&this.listViewInstance.enabledItems.splice(n,1)}}else Object.keys(i).length&&-1===this.uiIndices.disabledItemIndices.indexOf(i.index)&&this.uiIndices.disabledItemIndices.push(i.index)},s.prototype.showItem=function(e){var i=this.findDSAndIndexFromId(this.listViewInstance.curViewDS,e);if(t.isBlazor()&&this.listViewInstance.isServerRendered){var s=i.data[this.listViewInstance.fields.id];if(this.listViewInstance.hiddenItems.includes(s)){var n=this.listViewInstance.hiddenItems.indexOf(s);n>-1&&(this.listViewInstance.previousSelectedItems.splice(n,1),this.listViewInstance.removeActiveClass())}}else Object.keys(i).length&&this.uiIndices.hiddenItemIndices.splice(this.uiIndices.hiddenItemIndices.indexOf(i.index),1)},s.prototype.hideItem=function(e){var i=this.findDSAndIndexFromId(this.listViewInstance.curViewDS,e);if(t.isBlazor()&&this.listViewInstance.isServerRendered){var s=i.data[this.listViewInstance.fields.id];this.listViewInstance.hiddenItems.includes(s)||(this.listViewInstance.hiddenItems.push(s),this.listViewInstance.removeActiveClass())}else Object.keys(i).length&&-1===this.uiIndices.hiddenItemIndices.indexOf(i.index)&&this.uiIndices.hiddenItemIndices.push(i.index)},s.prototype.removeItem=function(e){var s,n=this.listViewInstance.curViewDS,l=this.findDSAndIndexFromId(n,e);t.isBlazor()&&this.listViewInstance.isServerRendered&&void 0!==l.index&&this.listViewInstance.interopAdaptor.invokeMethodAsync("RemoveItemPosition",l.index),Object.keys(l).length&&(s=l.data,n[l.index-1]&&n[l.index-1].isHeader&&1===n[l.index-1].items.length?(this.removeUiItem(l.index-1),this.removeUiItem(l.index-1)):t.isBlazor()&&this.listViewInstance.isServerRendered||this.removeUiItem(l.index));var r=this.listViewInstance.dataSource instanceof i.DataManager?this.listViewInstance.localData:this.listViewInstance.dataSource,a=r.indexOf(s);-1!==a&&(r.splice(a,1),this.listViewInstance.setViewDataSource(r)),this.listViewInstance.liCollection=this.listViewInstance.curUL.querySelectorAll("li")},s.prototype.setCheckboxLI=function(e,i){t.isBlazor()&&this.listViewInstance.isServerRendered&&(this.uiFirstIndex=Math.round(this.listViewInstance.element.scrollTop/36)-4,this.uiFirstIndex<0&&(this.uiFirstIndex=0));var s=Array.prototype.indexOf.call(this.listViewInstance.curUL.querySelectorAll("li"),e)+this.uiFirstIndex;this.activeIndex=Array.prototype.indexOf.call(this.listViewInstance.curUL.querySelectorAll("li"),e)+this.uiFirstIndex,e.classList.contains(h.selected)?-1===this.uiIndices.activeIndices.indexOf(s)&&this.uiIndices.activeIndices.push(s):this.uiIndices.activeIndices.splice(this.uiIndices.activeIndices.indexOf(s),1)},s.prototype.setSelectLI=function(e,t){this.activeIndex=Array.prototype.indexOf.call(this.listViewInstance.curUL.querySelectorAll("li"),e)+this.uiFirstIndex},s.prototype.checkedItem=function(e){if(e){this.uiIndices.activeIndices=[],this.activeIndex=void 0;for(var t=this.listViewInstance.curViewDS,i=0;i=e&&this.activeIndex++,this.listViewInstance.showCheckBox&&t[e][this.listViewInstance.fields.isChecked]&&this.uiIndices.activeIndices.push(e),parseFloat(this.bottomElement.style.height)||parseFloat(this.topElement.style.height)||(this.bottomElement.style.height=parseFloat(this.bottomElement.style.height)+this.listItemHeight+"px"),parseFloat(this.bottomElement.style.height)){i=this.listViewInstance.curUL.lastElementChild.previousSibling;(s=this.listViewInstance.getLiFromObjOrElement(t[e+1])||this.listViewInstance.getLiFromObjOrElement(t[e+2]))&&(this.bottomElement.style.height=parseFloat(this.bottomElement.style.height)+this.listItemHeight+"px",this.updateUI(i,e,s))}else{var i=this.listViewInstance.curUL.firstElementChild.nextSibling,s=void 0;s=Object.keys(this.listViewInstance.curViewDS).length-1===e?this.listViewInstance.curUL.lastElementChild:this.listViewInstance.getLiFromObjOrElement(t[e+1])||this.listViewInstance.getLiFromObjOrElement(t[e+2]),this.topElement.style.height=parseFloat(this.topElement.style.height)+this.listItemHeight+"px",this.uiFirstIndex++,this.uiLastIndex++,s&&(this.updateUI(i,e,s),!0===this.listViewInstance.isWindow?window.scrollTo(0,pageYOffset+this.listItemHeight):this.listViewInstance.element.scrollTop+=this.listItemHeight)}this.totalHeight+=this.listItemHeight,this.listDiff=Math.round(parseFloat(this.topElement.style.height)/this.listItemHeight)},s.prototype.removeUiItem=function(e){this.totalHeight-=this.listItemHeight;var i=this.listViewInstance.curViewDS[e],s=this.listViewInstance.getLiFromObjOrElement(i);if(this.listViewInstance.curViewDS.splice(e,1),this.activeIndex&&this.activeIndex>=e&&this.activeIndex--,s)if(this.domItemCount>Object.keys(this.listViewInstance.curViewDS).length)t.detach(s),this.domItemCount--,this.uiLastIndex--,this.totalHeight=0;else{if(s.classList.contains(h.disable)&&(s.classList.remove(h.disable),this.uiIndices.disabledItemIndices.splice(this.uiIndices.disabledItemIndices.indexOf(e),1)),"none"===s.style.display&&(s.style.display="",this.uiIndices.hiddenItemIndices.splice(this.uiIndices.hiddenItemIndices.indexOf(e),1)),this.listViewInstance.showCheckBox&&s.classList.contains(h.selected)){this.listViewInstance.removeSelect(),this.uiIndices.activeIndices.splice(this.uiIndices.activeIndices.indexOf(e),1);var n=s.querySelector("."+h.checkboxWrapper);n.removeAttribute("aria-checked"),n.firstElementChild.classList.remove(h.checked),s.classList.contains(h.focused)&&(s.classList.remove(h.focused),this.activeIndex=void 0)}else s.classList.contains(h.selected)&&(this.listViewInstance.removeSelect(),this.activeIndex=void 0);parseFloat(this.bottomElement.style.height)||parseFloat(this.topElement.style.height)?parseFloat(this.bottomElement.style.height)?(this.bottomElement.style.height=parseFloat(this.bottomElement.style.height)-this.listItemHeight+"px",this.updateUI(s,this.uiLastIndex,this.bottomElement)):(this.topElement.style.height=parseFloat(this.topElement.style.height)-this.listItemHeight+"px",this.updateUI(s,this.uiFirstIndex-1,this.topElement.nextSibling),this.uiLastIndex--,this.uiFirstIndex--):this.updateUI(s,this.uiLastIndex,this.bottomElement)}this.changeUiIndices(e,!1),this.listDiff=Math.round(parseFloat(this.topElement.style.height)/this.listItemHeight)},s.prototype.changeUiIndices=function(e,t){for(var i=Object.keys(this.uiIndices),s=0;s=e?t?++i:--i:i})},s.prototype.addItem=function(e,t,i){for(var s=0;s ${'+this.listViewInstance.fields.text+"} ";if(this.listViewInstance.showCheckBox){if(this.listViewInstance.renderCheckbox(e),!t.isNullOrUndefined(this.listViewInstance.virtualCheckBox)&&!t.isNullOrUndefined(this.listViewInstance.virtualCheckBox.outerHTML)){var l=document.createElement("div");l.innerHTML=this.listViewInstance.template||n,l.children[0].classList.add("e-checkbox"),"Left"===this.listViewInstance.checkBoxPosition?l.children[0].classList.add("e-checkbox-left"):l.children[0].classList.add("e-checkbox-right"),"Left"===this.listViewInstance.checkBoxPosition?l.children[0].insertBefore(this.listViewInstance.virtualCheckBox,l.childNodes[0].children[0]):l.children[0].appendChild(this.listViewInstance.virtualCheckBox),this.listViewInstance.template=l.innerHTML}s.innerHTML=this.listViewInstance.template,this.listViewInstance.template=i}else s.innerHTML=this.listViewInstance.template||n;var r=s.getElementsByTagName("*"),a=this.listViewInstance.createElement("div");this.listViewInstance.fields.groupBy&&(a.innerHTML=this.listViewInstance.groupTemplate||n);var o=a.getElementsByTagName("*");e.curData.isHeader&&(this.headerData=e.curData),this.templateData=e.curData.isHeader?e.curData.items[0]:e.curData,e.item.innerHTML="",e.item.context={data:e.curData,nodes:{flatTemplateNodes:[],groupTemplateNodes:[]}};for(c=0;c=0;a--)(n=e[a])&&(r=(l<3?n(r):l>3?n(t,i,r):n(t,i))||r);return l>3&&r&&Object.defineProperty(t,i,r),r},v=function(e){function i(i,s){var n=e.call(this,s,i)||this;return n.getHelper=function(e){var i=n.getSortableElement(e.sender.target);if(!n.isValidTarget(i,n))return!1;var s;return n.helper?s=n.helper({sender:i,element:e.element}):((s=i.cloneNode(!0)).style.width=i.offsetWidth+"px",s.style.height=i.offsetHeight+"px"),t.addClass([s],["e-sortableclone"]),document.body.appendChild(s),s},n.onDrag=function(e){n.trigger("drag",{event:e.event,element:n.element,target:e.target});var i=n.getSortableInstance(e.target),s=n.getSortableElement(e.target,i);if((n.isValidTarget(s,i)||e.target.className.indexOf("e-list-group-item")>-1)&&(n.curTarget!==s||!t.isNullOrUndefined(i.placeHolder))&&(!i.placeHolderElement||i.placeHolderElement!==e.target)){if(e.target.className.indexOf("e-list-group-item")>-1&&(s=e.target),n.curTarget=s,n.target===s)return;var l=n.getIndex(i.placeHolderElement,i),r=n.getPlaceHolder(s,i),a=void 0;if(r){l=t.isNullOrUndefined(l)?n.getIndex(n.target):l,a=n.getIndex(s,i,e.event);var o=n.isPlaceHolderPresent(i);if(o&&l===a)return;o&&t.remove(i.placeHolderElement),i.placeHolderElement=r,e.target.className.indexOf("e-list-group-item")>-1?i.element.insertBefore(i.placeHolderElement,i.element.children[a]):i.element!==n.element&&a===i.element.childElementCount?i.element.appendChild(i.placeHolderElement):i.element.insertBefore(i.placeHolderElement,i.element.children[a]),n.refreshDisabled(l,a,i)}else{l=t.isNullOrUndefined(l)?n.getIndex(n.target):n.getIndex(s,i)1?i-1:i,currentIndex:o,target:e.target,droppedElement:n.target,helper:e.helper,cancel:!1,handled:!1};n.trigger("beforeDrop",c,function(s){if(!s.cancel){if(l=s.handled,n.updateItemClass(r),s.handled){var a=n.target.cloneNode(!0);n.target.classList.remove("e-grabbed"),n.target=a}r.element.insertBefore(n.target,r.placeHolderElement);var o=n.getIndex(n.target,r);i=n===r&&i-o>1?i-1:i,n.trigger("drop",{event:e.event,element:r.element,previousIndex:i,currentIndex:o,target:e.target,helper:e.helper,droppedElement:n.target,scopeName:n.scope,handled:l})}t.remove(r.placeHolderElement)})}if(r=n.getSortableInstance(e.target),s=r.element.childElementCount,i=n.getIndex(n.target),r.element===e.target||!a&&n.curTarget===n.target){var h={previousIndex:i,currentIndex:n.curTarget===n.target?i:s,target:e.target,droppedElement:n.target,helper:e.helper,cancel:!1};n.trigger("beforeDrop",h,function(t){r.element!==e.target||t.cancel||(n.updateItemClass(r),r.element.appendChild(n.target),n.trigger("drop",{event:e.event,element:r.element,previousIndex:i,currentIndex:s,target:e.target,helper:e.helper,droppedElement:n.target,scopeName:n.scope}))})}n.target.classList.remove("e-grabbed"),n.target=null,n.curTarget=null,t.remove(e.helper),t.getComponent(n.element,t.Draggable).intDestroy(e.event)},n.bind(),n}m(i,e),s=i,i.prototype.bind=function(){this.element.id||(this.element.id=t.getUniqueID("sortable")),this.itemClass||(this.itemClass="e-sort-item",this.dataBind()),this.initializeDraggable()},i.prototype.initializeDraggable=function(){new t.Draggable(this.element,{helper:this.getHelper,dragStart:this.onDragStart,drag:this.onDrag,dragStop:this.onDragStop,dragTarget:"."+this.itemClass,enableTapHold:!0,tapHoldThreshold:200,queryPositionInfo:this.queryPositionInfo,distance:5})},i.prototype.getPlaceHolder=function(e,t){if(t.placeHolder){var i=t.placeHolder({element:t.element,grabbedElement:this.target,target:e});return i.classList.add("e-sortable-placeholder"),i}return null},i.prototype.isValidTarget=function(e,i){return e&&t.compareElementParent(e,i.element)&&e.classList.contains(i.itemClass)&&!e.classList.contains("e-disabled")},i.prototype.removePlaceHolder=function(e){t.remove(e.placeHolderElement),e.placeHolderElement=null},i.prototype.updateItemClass=function(e){this!==e&&(this.target.classList.remove(this.itemClass),this.target.classList.add(e.itemClass))},i.prototype.getSortableInstance=function(e){if(e=t.closest(e,".e-"+this.getModuleName())){var i=t.getComponent(e,s);return i.scope&&this.scope&&i.scope===this.scope?i:this}return this},i.prototype.refreshDisabled=function(e,t,i){if(i===this)for(var s=void 0,n=e