New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vue-virtual-draglist

Package Overview
Dependencies
Maintainers
0
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-virtual-draglist - npm Package Compare versions

Comparing version 2.9.6 to 2.9.7

6

dist/virtual-drag-list.min.js
/*!
* vue-virtual-drag-list v2.9.6
* vue-virtual-drag-list v2.9.7
* open source under the MIT license
* https://github.com/mfuu/vue-virtual-drag-list#readme
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define(["vue"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).VirtualList=e(t.Vue)}(this,(function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t);function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,a(i.key),i)}}function s(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}var u={dataSource:{type:Array,default:function(){return[]}},dataKey:{type:String,required:!0},scroller:{type:[Document,HTMLElement]},direction:{type:String,default:"vertical"},keeps:{type:Number,default:30},size:{type:Number},keepOffset:{type:Boolean,default:!1},tableMode:{type:Boolean,default:!1},draggable:{type:String,default:".virtual-dnd-list-item"},itemClass:{type:String,default:"virtual-dnd-list-item"},sortable:{type:Boolean,default:!0},handle:{type:[Function,String]},group:{type:[String,Object]},lockAxis:{type:String,default:""},debounceTime:{type:Number,default:0},throttleTime:{type:Number,default:0},animation:{type:Number,default:150},autoScroll:{type:Boolean,default:!0},scrollSpeed:{type:Object,default:function(){return{x:10,y:10}}},scrollThreshold:{type:Number,default:55},disabled:{type:Boolean,default:!1},fallbackOnBody:{type:Boolean,default:!1},delay:{type:Number,default:0},delayOnTouchOnly:{type:Boolean,default:!1},rootTag:{type:String,default:"div"},wrapTag:{type:String,default:"div"},wrapClass:{type:String,default:""},wrapStyle:{type:Object,default:function(){return{}}},ghostClass:{type:String,default:""},ghostStyle:{type:Object,default:function(){return{}}},chosenClass:{type:String,default:""},placeholderClass:{type:String,default:""}},c={dataKey:{type:[String,Number]},sizeKey:{type:String}},h=n.default.component("virtual-list-item",{props:c,data:function(){return{sizeObserver:null}},mounted:function(){var t=this;"undefined"!=typeof ResizeObserver&&(this.sizeObserver=new ResizeObserver((function(){t.onSizeChange()})),this.$el&&this.sizeObserver.observe(this.$el))},updated:function(){this.onSizeChange()},beforeDestroy:function(){this.sizeObserver&&(this.sizeObserver.disconnect(),this.sizeObserver=null)},methods:{onSizeChange:function(){this.$emit("resized",this.dataKey,this.getCurrentSize())},getCurrentSize:function(){return this.$el?this.$el[this.sizeKey]:0}},render:function(){return this.$slots.default}});"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function f(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var d={exports:{}};
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define(["vue"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).VirtualList=e(t.Vue)}(this,(function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t);function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,a(i.key),i)}}function s(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}var u={dataSource:{type:Array,default:function(){return[]}},dataKey:{type:String,required:!0},scroller:{type:[Document,HTMLElement],default:void 0},direction:{type:String,default:"vertical"},keeps:{type:Number,default:30},size:{type:Number,default:void 0},keepOffset:{type:Boolean,default:!1},tableMode:{type:Boolean,default:!1},draggable:{type:String,default:".virtual-dnd-list-item"},itemClass:{type:String,default:"virtual-dnd-list-item"},sortable:{type:Boolean,default:!0},handle:{type:[Function,String],default:void 0},group:{type:[String,Object],default:void 0},lockAxis:{type:String,default:""},debounceTime:{type:Number,default:0},throttleTime:{type:Number,default:0},animation:{type:Number,default:150},autoScroll:{type:Boolean,default:!0},scrollSpeed:{type:Object,default:function(){return{x:10,y:10}}},scrollThreshold:{type:Number,default:55},disabled:{type:Boolean,default:!1},fallbackOnBody:{type:Boolean,default:!1},delay:{type:Number,default:0},delayOnTouchOnly:{type:Boolean,default:!1},rootTag:{type:String,default:"div"},wrapTag:{type:String,default:"div"},wrapClass:{type:String,default:""},wrapStyle:{type:Object,default:function(){return{}}},ghostClass:{type:String,default:""},ghostStyle:{type:Object,default:function(){return{}}},chosenClass:{type:String,default:""},placeholderClass:{type:String,default:""}},c={dataKey:{type:[String,Number],default:void 0},sizeKey:{type:String,default:void 0}},h=n.default.component("virtual-list-item",{props:c,data:function(){return{sizeObserver:null}},mounted:function(){var t=this;"undefined"!=typeof ResizeObserver&&(this.sizeObserver=new ResizeObserver((function(){t.onSizeChange()})),this.$el&&this.sizeObserver.observe(this.$el))},updated:function(){this.onSizeChange()},beforeDestroy:function(){this.sizeObserver&&(this.sizeObserver.disconnect(),this.sizeObserver=null)},methods:{onSizeChange:function(){this.$emit("resized",this.dataKey,this.getCurrentSize())},getCurrentSize:function(){return this.$el?this.$el[this.sizeKey]:0}},render:function(){return this.$slots.default}});"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function f(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var d={exports:{}};
/*!

@@ -11,2 +11,2 @@ * sortable-dnd v0.6.20

* https://github.com/mfuu/sortable-dnd#readme
*/!function(t){t.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(){return e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},e.apply(this,arguments)}var n={capture:!1,passive:!1},i=/\s+/g;function o(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var r=o(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),s=o(/Edge/i),l=o(/safari/i)&&!o(/chrome/i)&&!o(/android/i),a=function(){var t=!1;return document.addEventListener("checkIfSupportPassive",null,{get passive(){return t=!0,!0}}),t}();function u(t,e,i){window.addEventListener?t.addEventListener(e,i,!(!a&&r)&&n):window.attachEvent?t.attachEvent("on"+e,i):t["on"+e]=i}function c(t,e,i){window.removeEventListener?t.removeEventListener(e,i,!(!a&&r)&&n):window.detachEvent?t.detachEvent("on"+e,i):t["on"+e]=null}function h(){return document.scrollingElement||document.documentElement}function f(t,e,n){if(t.getBoundingClientRect||t===window){var i,o,r,s,l,a,u;if(t!==window&&t.parentNode&&t!==h()?(o=(i=t.getBoundingClientRect()).top,r=i.left,s=i.bottom,l=i.right,a=i.height,u=i.width):(o=0,r=0,s=window.innerHeight,l=window.innerWidth,a=window.innerHeight,u=window.innerWidth),e&&t!==window){n=n||t.parentNode;do{if(n&&n.getBoundingClientRect){var c=n.getBoundingClientRect();o-=c.top+parseInt(w(n,"border-top-width")),r-=c.left+parseInt(w(n,"border-left-width")),s=o+i.height,l=r+i.width;break}}while(n=n.parentNode)}return{top:o,left:r,bottom:s,right:l,width:u,height:a}}}function d(t,e,n,i){if(t){if(n&&!e)for(var o=Array.prototype.slice.call(n.children),r=0,s=o.length;r<s;r++)if(o[r]===t||p(t,o[r]))return o[r];n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&S(t,e):S(t,e))||i&&t===n)return t;if(t===n)break}while(t=t.parentNode);return null}}function p(t,e){if(!t||!e)return!1;if(e.compareDocumentPosition)return!!(16&e.compareDocumentPosition(t));if(e.contains&&1===t.nodeType)return e.contains(t)&&e!==t;for(;t=t.parentNode;)if(t===e)return!0;return!1}function g(t,e){for(var n=t.lastElementChild;n&&(n===it.ghost||"none"===w(n,"display")||e&&!S(n,e));)n=n.previousElementSibling;return n||null}function m(t,e){if(!t||!t.parentNode)return-1;for(var n=0;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||e&&!S(t,e)||"none"===w(t,"display")||n++;return n}function v(t,e,n,i){for(var o=0,r=0,s=t.children;o<s.length;){if(s[o]!==it.ghost&&"none"!==w(s[o],"display")&&d(s[o],n,t,!1)&&(i||s[o]!==it.dragged)){if(r===e)return s[o];r++}o++}return null}function y(t,e){var n=w(t),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=v(t,0,e),l=v(t,1,e),a=o&&w(o),u=l&&w(l),c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+f(o).width,h=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+f(l).width,d=s||r?"cssFloat":"float";if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&"none"!==a.float){var p="left"===a.float?"left":"right";return!l||"both"!==u.clear&&u.clear!==p?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||c>=i&&"none"===n[d]||l&&"none"===n[d]&&c+h>i)?"vertical":"horizontal"}function b(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(i," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(i," ")}}function S(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function w(t,e,n){var i=t&&t.style;if(i){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in i||-1!==e.indexOf("webkit")||(e="-webkit-"+e),i[e]=n+("string"==typeof n?"":"px")}}function x(t,e){var n,i,o=(i=e,(n=t).compareDocumentPosition?n.compareDocumentPosition(i):n.contains?(n!=i&&n.contains(i)&&16)+(n!=i&&i.contains(n)&&8)+(n.sourceIndex>=0&&i.sourceIndex>=0?(n.sourceIndex<i.sourceIndex&&4)+(n.sourceIndex>i.sourceIndex&&2):1):0);return 2===o?1:4===o?-1:0}function T(t){void 0!==t.preventDefault&&t.cancelable&&t.preventDefault()}function z(t){var n=t.sortable,i=t.name,o=t.params,r=n.options[i];"function"==typeof r&&r(e({},o))}!function(){if("undefined"==typeof window||"undefined"==typeof document)return"";var t=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"];(Array.prototype.slice.call(t).join("").match(/-(moz|webkit|ms)-/)||""===t.OLink&&["","o"])[1]}();var _,k,O,I="Sortable"+Date.now();function C(t){this.options=t,this.autoScrollAnimationFrame=null}function D(t){this.options=t,this.stack=[]}function R(t){this.options=t||{},this.selects=[]}window.requestAnimationFrame||(window.requestAnimationFrame=function(t){return setTimeout(t,17)}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)}),C.prototype={stop:function(){this.autoScrollAnimationFrame&&(cancelAnimationFrame(this.autoScrollAnimationFrame),this.autoScrollAnimationFrame=null)},start:function(t,e,n){var i=this;cancelAnimationFrame(this.autoScrollAnimationFrame),this.autoScrollAnimationFrame=requestAnimationFrame((function(){e&&n&&i.autoScroll(t,n),i.start(t,e,n)}))},autoScroll:function(t,e){if(t&&void 0!==e.clientX&&void 0!==e.clientY){var n=f(t);if(n){var i=e.clientX,o=e.clientY,r=n.top,s=n.right,l=n.bottom,a=n.left,u=n.height,c=n.width;if(!(o<r||i>s||o>l||i<a)){var h=this.options,d=h.scrollThreshold,p=h.scrollSpeed,g=t.scrollTop,m=t.scrollLeft,v=t.scrollHeight,y=g>0&&o>=r&&o<=r+d,b=m+c<t.scrollWidth&&i<=s&&i>=s-d,S=g+u<v&&o<=l&&o>=l-d;m>0&&i>=a&&i<=a+d&&(t.scrollLeft+=Math.floor(Math.max(-1,(i-a)/d-1)*p.x)),b&&(t.scrollLeft+=Math.ceil(Math.min(1,(i-s)/d+1)*p.x)),y&&(t.scrollTop+=Math.floor(Math.max(-1,(o-r)/d-1)*p.y)),S&&(t.scrollTop+=Math.ceil(Math.min(1,(o-l)/d+1)*p.y))}}}}},D.prototype={collect:function(t){if(t){for(var e=f(t),n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,i=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,o=Math.min(e.right,n),r=Math.min(e.bottom,i),s=Array.prototype.slice.call(t.children),l=[],a=0,u=s.length;a<=u;a++){var c=s[a];if(c&&c!==it.ghost&&"none"!==w(c,"display")){var h=f(c);if(!(h.bottom<0||h.right<0)){if(h.top-h.height>r||h.left-h.width>o)break;l.push({el:c,rect:h})}}}this.stack.push(l)}},animate:function(){var t=this.stack.pop();if(t&&this.options.animation)for(var e=0,n=t.length;e<n;e++){var i=t[e],o=i.el,r=i.rect;this._excute(o,r)}},_excute:function(t,e){var n=f(t);if(n.top!==e.top||n.left!==e.left){var i=e.left-n.left,o=e.top-n.top;w(t,"transition",""),w(t,"transform","translate3d(".concat(i,"px, ").concat(o,"px, 0)")),t.offsetWidth;var r=this.options,s=r.animation,l=r.easing;w(t,"transition","transform ".concat(s,"ms ").concat(l?" "+l:"")),w(t,"transform","translate3d(0px, 0px, 0px)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){w(t,"transition",""),w(t,"transform",""),t.animated=null}),s)}}},R.prototype={active:function(){return!!_},nulling:function(){_=k=O=null},params:function(){return{nodes:_||[],clones:k||[]}},select:function(t){b(t,this.options.selectedClass,!0),this.selects.push(t),this.selects.sort((function(t,e){return x(t,e)}))},deselect:function(t){var e=this.selects.indexOf(t);e>-1&&(b(t,this.options.selectedClass,!1),this.selects.splice(e,1))},useSelectHandle:function(t,e){var n=this.options.selectHandle;return!!(O="function"==typeof n&&n(t)||"string"==typeof n&&S(e,n))},getGhostElement:function(){if(!_)return null;var t=document.createElement("div");return b(t,this.options.chosenClass,!0),this.selects.forEach((function(e,n){var i=e.cloneNode(!0),o=0===n?1:.5;i.style="position: absolute;left: 0;top: 0;bottom: 0;right: 0;opacity: ".concat(o,";z-index: ").concat(n,";"),t.appendChild(i)})),t},onChoose:function(){!this.options.multiple||0===this.selects.length||this.selects.indexOf(it.dragged)<0||(this.selects.sort((function(t,e){return x(t,e)})),_=this.selects,this.toggleChosenClass(!0))},onDrop:function(t,e,n){if(_){var i=it.dragged,o=it.clone,r=_.indexOf(i);t!==e&&n?(w(o,"display","none"),this.toggleVisible(!0),k=_.map((function(t){return t.cloneNode(!0)})),this._sortElements(k,r,o)):this._sortElements(_,r,o),t!==e&&(e[I].multiplayer.toggleSelected(k||_,!0),!n&&t[I].multiplayer.toggleSelected(_,!1))}},onSelect:function(t,e,n,i){var o=this.options,r=o.multiple,s=o.selectHandle;if(r&&(s&&O||!s&&!n)){var l=this.selects.indexOf(e);b(e,this.options.selectedClass,l<0);var a={from:i.el,event:t,node:e,index:m(e)};l<0?(this.selects.push(e),z({sortable:i,name:"onSelect",params:a})):(this.selects.splice(l,1),z({sortable:i,name:"onDeselect",params:a})),this.selects.sort((function(t,e){return x(t,e)}))}},toggleChosenClass:function(t){if(_)for(var e=0,n=_.length;e<n;e++)b(_[e],this.options.chosenClass,t)},toggleVisible:function(t){if(_)for(var e=0,n=_.length;e<n;e++)_[e]!=it.dragged&&w(_[e],"display",t?"":"none")},toggleSelected:function(t,e){var n=this;e?t.forEach((function(t){return n.selects.push(t)})):this.selects=this.selects.filter((function(e){return t.indexOf(e)<0}))},_sortElements:function(t,e,n){for(var i=0,o=t.length;i<o;i++)if(w(t[i],"display",""),i<e)n.parentNode.insertBefore(t[i],n);else{var r=i>0?t[i-1]:n;n.parentNode.insertBefore(t[i],r.nextSibling)}}};var E,A,B,M,N,K,L,F,H,j,P,q,U,Y,$,W,X,V,G,J,Q,Z,tt=[];function et(e){var n={},i=e.group;i&&"object"==t(i)||(i={name:i,pull:!0,put:!0,revertDrag:!0}),n.name=i.name,n.pull=i.pull,n.put=i.put,n.revertDrag=i.revertDrag,e.group=n}function nt(t){var e=W||$;return!(void 0!==t.clientX&&void 0!==t.clientY&&Math.abs(t.clientX-e.clientX)<=0&&Math.abs(t.clientY-e.clientY)<=0)}function it(t,n){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable-dnd: `el` must be an HTMLElement, not ".concat({}.toString.call(t));t[I]=this,this.el=t,this.options=n=e({},n);var i={store:null,group:"",handle:null,sortable:!0,disabled:!1,multiple:!1,lockAxis:"",direction:"",animation:150,easing:"",draggable:null,selectHandle:null,customGhost:null,autoScroll:!0,scrollThreshold:55,scrollSpeed:{x:10,y:10},delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,ghostClass:"",ghostStyle:{},chosenClass:"",selectedClass:"",placeholderClass:"",swapOnDrop:!0,removeCloneOnDrop:!0,fallbackOnBody:!1,supportTouch:"ontouchstart"in window,emptyInsertThreshold:-1};for(var o in i)!(o in this.options)&&(this.options[o]=i[o]);for(var r in et(n),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));u(t,this.options.supportTouch?"touchstart":"mousedown",this._onDrag),this.autoScroller=new C(this.options),this.multiplayer=new R(this.options),this.animator=new D(this.options),tt.push(t)}return it.prototype={constructor:it,_onDrag:function(t){var e=this;if(!M&&!this.options.disabled&&this.options.group.pull&&(!/mousedown|pointerdown/.test(t.type)||0===t.button)){var n=t.touches&&t.touches[0],i=(n||t).target;if(!l||!i||"SELECT"!==i.tagName.toUpperCase()){var o=d(i,this.options.draggable,this.el);if(o&&!o.animated&&($={event:t,clientX:(n||t).clientX,clientY:(n||t).clientY},M=o,u(J=n?M:document,"mouseup",this._onDrop),u(J,"touchend",this._onDrop),u(J,"touchcancel",this._onDrop),!this.multiplayer.useSelectHandle(t,i))){var a=this.options.handle;if(("function"!=typeof a||a(t))&&("string"!=typeof a||S(i,a))){var c=this.options,h=c.delay,f=c.delayOnTouchOnly;!h||f&&!n||s||r?this._onStart(n,t):(u(this.el.ownerDocument,"touchmove",this._delayMoveHandler),u(this.el.ownerDocument,"mousemove",this._delayMoveHandler),u(this.el.ownerDocument,"mouseup",this._cancelStart),u(this.el.ownerDocument,"touchend",this._cancelStart),u(this.el.ownerDocument,"touchcancel",this._cancelStart),Z=setTimeout((function(){return e._onStart(n,t)}),h)),u(document,"selectstart",T),l&&w(document.body,"user-select","none")}}}}},_delayMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-$.clientX),Math.abs(e.clientY-$.clientY))>=Math.floor(this.options.touchStartThreshold/(window.devicePixelRatio||1))&&this._cancelStart()},_cancelStart:function(){clearTimeout(Z),c(this.el.ownerDocument,"touchmove",this._delayMoveHandler),c(this.el.ownerDocument,"mousemove",this._delayMoveHandler),c(this.el.ownerDocument,"mouseup",this._cancelStart),c(this.el.ownerDocument,"touchend",this._cancelStart),c(this.el.ownerDocument,"touchcancel",this._cancelStart),c(document,"selectstart",T),l&&w(document.body,"user-select","")},_onStart:function(t,e){T(e);var n=m(M);E=this.el,A=this.el,H=M,q=n,U=n,Y=n,V={to:this.el,target:M,newIndex:n,relative:0},G=M,B=this.el,L=M.cloneNode(!0),j=M.parentNode,P=this.options.group.pull,it.clone=L,it.active=this,it.dragged=M,this.multiplayer.onChoose(),b(M,this.options.chosenClass,!0),z({sortable:this,name:"onChoose",params:this._getParams(e)}),u(J,t?"touchmove":"mousemove",this._nearestSortable);try{document.selection?setTimeout((function(){return document.selection.empty()}),0):window.getSelection().removeAllRanges()}catch(t){}},_onStarted:function(){this.animator.collect(j),b(L,this.options.chosenClass,!0),b(L,this.options.placeholderClass,!0),this._appendGhost(),this.multiplayer.toggleVisible(!1),w(M,"display","none"),M.parentNode.insertBefore(L,M),z({sortable:this,name:"onDrag",params:this._getParams($.event)}),this.animator.animate()},_getGhostElement:function(){var t=this.options.customGhost;if("function"==typeof t){var e=this.multiplayer.selects;return t(e.length?e:[M])}return this.multiplayer.getGhostElement()||M},_appendGhost:function(){if(!F){var t=this.options.fallbackOnBody?document.body:this.el,n=this._getGhostElement();b(F=n.cloneNode(!0),this.options.ghostClass,!0);var i=f(M),o=e({position:"fixed",top:i.top,left:i.left,width:i.width,height:i.height,zIndex:"100000",opacity:"0.8",overflow:"hidden",boxSizing:"border-box",transform:"",transition:"",pointerEvents:"none"},this.options.ghostStyle);for(var r in o)w(F,r,o[r]);it.ghost=F,t.appendChild(F);var s=($.clientX-i.left)/parseInt(F.style.width)*100,l=($.clientY-i.top)/parseInt(F.style.height)*100;w(F,"transform-origin","".concat(s,"% ").concat(l,"%")),w(F,"will-change","transform")}},_nearestSortable:function(t){T(t);var e=t.touches&&t.touches[0]||t;if(M&&nt(e)){!W&&this._onStarted();var n=this.options.lockAxis,i="x"===n?$.clientX:e.clientX,o="y"===n?$.clientY:e.clientY,r=document.elementFromPoint(i,o),s=i-$.clientX,l=o-$.clientY;W={event:t,clientX:i,clientY:o},w(F,"transform","translate3d(".concat(s,"px, ").concat(l,"px, 0)"));var a,u,c,d=(a=i,u=o,tt.reduce((function(t,e){var n=e[I].options.emptyInsertThreshold;if(null!=n){var i=f(e),o=a>=i.left-n&&a<=i.right+n,r=u>=i.top-n&&u<=i.bottom+n;return o&&r&&(!c||c&&i.left>=c.left&&i.right<=c.right&&i.top>=c.top&&i.bottom<=c.bottom)&&(t=e,c=i),t}}),null));if(d&&d[I]._onMove(t,r),!d||d[I].options.autoScroll){var p=function(t,e){if(!t||!t.getBoundingClientRect)return h();var n=t,i=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=w(n);if(n.clientWidth<n.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!n.getBoundingClientRect||n===document.body)return h();if(i||e)return n;i=!0}}}while(n=n.parentNode);return h()}(r,!0);this.autoScroller.start(p,$,W)}else this.autoScroller.stop()}},_allowPut:function(){if(B===this.el)return!0;if(!this.options.group.put)return!1;var t=this.options.group,e=t.name,n=t.put,i=B[I].options.group;return n.join&&n.indexOf(i.name)>-1||i.name&&e&&i.name===e},_getDirection:function(){var t=this.options,e=t.draggable,n=t.direction;return n?"function"==typeof n?n.call(W.event,L,this):n:y(j,e)},_allowSwap:function(){var t=f(N),e="vertical"===this._getDirection(),n=e?"top":"left",i=e?"bottom":"right",o=N[e?"offsetHeight":"offsetWidth"],r=e?W.clientY:W.clientX,s=r>=t[n]&&r<t[i]-o/2?-1:1,l=v(j,0,this.options.draggable),a=g(j),u=f(l),c=f(a);if(N===j||p(j,N))return L===l&&r<u[n]?(K=N,!0):L===a&&r>c[i]&&(K=N.nextSibling,!0);var h=x(L,N);return K=h<0?N.nextSibling:N,X!==N?(Q=s,!0):Q!==s&&(Q=s,s<0?h>0:h<0)},_onMove:function(t,e){if(!this.options.disabled&&this._allowPut()){if(N=d(e,this.options.draggable,this.el),z({sortable:this,name:"onMove",params:this._getParams(t,{target:N})}),this.options.sortable||this.el!==B)return this.el===A||e!==this.el&&g(this.el)?void(N&&!N.animated&&!p(N,L)&&this._allowSwap()&&(N!==L&&K!==L?(this.el!==A?this._onInsert(t):N!==M&&this._onChange(t),X=N):X=N)):(N=X=null,void this._onInsert(t));A!==B&&(N=X=M,Q=0,this._onInsert(t))}},_onInsert:function(t){var e=N||L,n="clone"===P&&this.el!==B&&A===B,i="clone"===P&&this.el===B&&A!==B,o=p(N,document),r=N===M&&!o,s=A[I],l=B[I];E=this.el,q=m(L),H=e,j=o?N.parentNode:this.el,s.animator.collect(L.parentNode),this.animator.collect(j),n&&(V.target=G,V.newIndex=q,V.relative=G===M?0:x(L,G),w(M,"display",""),l.multiplayer.toggleVisible(!0),l.options.group.revertDrag||L.parentNode.insertBefore(M,L)),i&&(q=m(M),w(M,"display","none"),this.multiplayer.toggleVisible(!1)),w(L,"display",r?"none":""),N&&o?j.insertBefore(L,Q<0?N:N.nextSibling):j.appendChild(L),U=r?Y:m(L),n&&l.options.group.revertDrag&&(V.target=M,V.newIndex=Y,V.relative=0,z({sortable:l,name:"onChange",params:this._getParams(t,{to:B,target:M,newIndex:Y,revertDrag:!0})})),n||z({sortable:s,name:"onRemove",params:this._getParams(t,{newIndex:-1})}),i&&e!==M&&(G=e,z({sortable:this,name:"onChange",params:this._getParams(t,{from:B,backToOrigin:!0})})),i||z({sortable:this,name:"onAdd",params:this._getParams(t,{oldIndex:-1})}),s.animator.animate(),this.animator.animate(),A=this.el},_onChange:function(t){this.animator.collect(j),q=m(L),j=N.parentNode,H=N,this.el===B&&(G=N),j.insertBefore(L,K),U=m(L),z({sortable:this,name:"onChange",params:this._getParams(t)}),this.animator.animate(),A=this.el},_onDrop:function(t){this._cancelStart(),c(J,"touchmove",this._nearestSortable),c(J,"mousemove",this._nearestSortable),c(J,"mouseup",this._onDrop),c(J,"touchend",this._onDrop),c(J,"touchcancel",this._onDrop),B&&(A=B,q=Y,H===L&&(H=M),this.animator.collect(j),this.multiplayer.toggleChosenClass(!1),b(M,this.options.chosenClass,!1),z({sortable:this,name:"onUnchoose",params:this._getParams(t)}),W&&this._onEnd(t),!W&&this.animator.animate()),!nt(t.changedTouches?t.changedTouches[0]:t)&&this.multiplayer.onSelect(t,M,B,this),F&&F.parentNode&&F.parentNode.removeChild(F),this.autoScroller.stop(),this.multiplayer.nulling(),this._nulling()},_onEnd:function(t){b(L,this.options.chosenClass,!1),b(L,this.options.placeholderClass,!1);var n="clone"===P;this.multiplayer.onDrop(A,E,n);var i=this._getParams(t),o=this.options,r=o.swapOnDrop,s=o.removeCloneOnDrop;n&&A!==E||!("function"==typeof r?r(i):r)||j.insertBefore(M,L),n&&A!==E&&!this.multiplayer.active()||!("function"==typeof s?s(i):s)||L&&L.parentNode&&L.parentNode.removeChild(L),w(M,"display",""),this.animator.animate(),A!==E&&z({sortable:A[I],name:"onDrop",params:e({},i,n?V:{newIndex:-1})}),z({sortable:E[I],name:"onDrop",params:e({},i,A===E?{}:{oldIndex:-1})})},_getParams:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i={};return i.event=t,i.to=E,i.from=A,i.node=M,i.clone=L,i.target=H,i.oldIndex=q,i.newIndex=U,i.pullMode=P,e(i,this.multiplayer.params(),n),i.relative=H===M?0:x(L,H),i},_nulling:function(){E=A=B=M=N=K=L=F=H=j=P=q=U=Y=$=W=X=V=G=J=Q=Z=it.clone=it.ghost=it.active=it.dragged=null},destroy:function(){this._cancelStart(),this._nulling(),this.multiplayer.nulling(),this.autoScroller.stop(),c(this.el,"touchstart",this._onDrag),c(this.el,"mousedown",this._onDrag);var t=tt.indexOf(this.el);t>-1&&tt.splice(t,1),this.el[I]=this.animator=this.multiplayer=this.autoScroller=null},option:function(t,e){if(void 0===e)return this.options[t];this.options[t]=e,this.animator.options[t]=e,this.multiplayer.options[t]=e,this.autoScroller.options[t]=e,"group"===t&&et(this.options)},select:function(t){this.multiplayer.select(t)},deselect:function(t){this.multiplayer.deselect(t)},getSelectedElements:function(){return this.multiplayer.selects}},it.utils={on:u,off:c,css:w,index:m,closest:d,getRect:f,toggleClass:b,detectDirection:y},it.get=function(t){return t[I]},it.create=function(t,e){return new it(t,e)},it}()}(d);var p=f(d.exports);function g(t,e){var n,i=function(){for(var i=this,o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];n||(e<=0?t.apply(this,r):n=setTimeout((function(){n=null,t.apply(i,r)}),e))};return i.cancel=function(){n&&(clearTimeout(n),n=null)},i}function m(t,e){return t==e}function v(t,e){return(Array.isArray(e)?e:e.replace(/\[/g,".").replace(/\]/g,".").split(".")).reduce((function(t,e){return(t||{})[e]}),t)}function y(t){return t instanceof Document&&9===t.nodeType||t instanceof Window}var b=["delay","group","handle","lockAxis","disabled","sortable","draggable","animation","autoScroll","ghostClass","ghostStyle","chosenClass","scrollSpeed","fallbackOnBody","scrollThreshold","delayOnTouchOnly","placeholderClass"],S=function(){return s((function t(e,n){o(this,t),this.el=e,this.options=n,this.reRendered=!1,this.installSortable()}),[{key:"destroy",value:function(){this.sortable.destroy(),this.reRendered=!1}},{key:"option",value:function(t,e){this.options[t]=e,b.includes(t)&&this.sortable.option(t,e)}},{key:"installSortable",value:function(){var t=this,e=b.reduce((function(e,n){return e[n]=t.options[n],e}),{});this.sortable=new p(this.el,Object.assign(Object.assign({},e),{emptyInsertThreshold:0,swapOnDrop:function(t){return t.from===t.to},removeCloneOnDrop:function(t){return t.from===t.to},onDrag:function(e){return t.onDrag(e)},onDrop:function(e){return t.onDrop(e)},onChoose:function(e){return t.onChoose(e)},onUnchoose:function(e){return t.onUnchoose(e)}}))}},{key:"onChoose",value:function(t){this.dispatchEvent("onChoose",t)}},{key:"onUnchoose",value:function(t){this.dispatchEvent("onUnchoose",t)}},{key:"onDrag",value:function(t){var e=t.node.getAttribute("data-key"),n=this.getIndex(e),i=this.options.list[n],o=this.options.uniqueKeys[n];this.sortable.option("store",{item:i,key:o,index:n}),this.dispatchEvent("onDrag",{item:i,key:o,index:n,event:t})}},{key:"onDrop",value:function(t){var e,n,i,o=null===(e=p.get(t.from))||void 0===e?void 0:e.option("store"),r=o.item,s=o.key,a=o.index,u=this.options.list,c={key:s,item:r,list:u,event:t,changed:!1,oldList:l(u),oldIndex:a,newIndex:a};t.from===t.to&&t.node===t.target||this.handleDropEvent(t,c,a),this.dispatchEvent("onDrop",c),t.from===this.el&&this.reRendered&&(null===(n=p.dragged)||void 0===n||n.remove()),t.from!==t.to&&(null===(i=p.clone)||void 0===i||i.remove()),this.reRendered=!1}},{key:"handleDropEvent",value:function(t,e,n){var i=t.target.getAttribute("data-key"),o=-1,r=n;t.from===t.to?(((r=this.getIndex(e.key))<(o=this.getIndex(i))&&-1===t.relative||r>o&&1===t.relative)&&(o+=t.relative),o!==r&&(e.list.splice(r,1),e.list.splice(o,0,e.item))):(t.from===this.el&&(r=this.getIndex(e.key),e.list.splice(r,1)),t.to===this.el&&(r=-1,o=this.getIndex(i),0===t.relative?o=e.list.length:1===t.relative&&(o+=t.relative),e.list.splice(o,0,e.item))),e.changed=t.from!==t.to||o!==r,e.oldIndex=r,e.newIndex=o}},{key:"getIndex",value:function(t){if(null==t)return-1;for(var e=this.options.uniqueKeys,n=0,i=e.length;n<i;n++)if(m(e[n],t))return n;return-1}},{key:"dispatchEvent",value:function(t,e){var n=this.options[t];n&&n(e)}}])}(),w=["size","keeps","scroller","direction","debounceTime","throttleTime"],x=function(){return s((function t(e){o(this,t),this.options=e;var n={size:0,keeps:0,buffer:0,wrapper:null,scroller:null,direction:"vertical",uniqueKeys:[],debounceTime:null,throttleTime:null};for(var i in n)!(i in this.options)&&(this.options[i]=n[i]);this.sizes=new Map,this.sizeType="INIT",this.fixedSize=0,this.averageSize=0,this.range={start:0,end:0,front:0,behind:0,total:0},this.offset=0,this.direction="STATIONARY",this.updateScrollElement(),this.updateOnScrollFunction(),this.addScrollEventListener(),this.checkIfUpdate(0,e.keeps-1)}),[{key:"isFixed",value:function(){return"FIXED"===this.sizeType}},{key:"isFront",value:function(){return"FRONT"===this.direction}},{key:"isBehind",value:function(){return"BEHIND"===this.direction}},{key:"isHorizontal",value:function(){return"horizontal"===this.options.direction}},{key:"getSize",value:function(t){return this.sizes.get(t)||this.getItemSize()}},{key:"getOffset",value:function(){var t=this.isHorizontal()?"scrollLeft":"scrollTop";return this.scrollEl[t]}},{key:"getScrollSize",value:function(){var t=this.isHorizontal()?"scrollWidth":"scrollHeight";return this.scrollEl[t]}},{key:"getClientSize",value:function(){var t=this.isHorizontal()?"offsetWidth":"offsetHeight";return this.scrollEl[t]}},{key:"scrollToOffset",value:function(t){var e=this.isHorizontal()?"scrollLeft":"scrollTop";this.scrollEl[e]=t}},{key:"scrollToIndex",value:function(t){if(t>=this.options.uniqueKeys.length-1)this.scrollToBottom();else{var e=this.getOffsetByRange(0,t),n=this.getScrollStartOffset();this.scrollToOffset(e+n)}}},{key:"scrollToBottom",value:function(){var t=this,e=this.getScrollSize();this.scrollToOffset(e),setTimeout((function(){var e=t.getClientSize(),n=t.getScrollSize();t.getOffset()+e+1<n&&t.scrollToBottom()}),5)}},{key:"option",value:function(t,e){var n=this,i=this.options[t];this.options[t]=e,"uniqueKeys"===t&&this.sizes.forEach((function(t,i){e.includes(i)||n.sizes.delete(i)})),"scroller"===t&&(i&&p.utils.off(i,"scroll",this.onScroll),this.updateScrollElement(),this.addScrollEventListener())}},{key:"updateRange",value:function(t){if(t)this.handleUpdate(t.start);else{var e=this.range.start;e=Math.max(e,0),this.handleUpdate(e)}}},{key:"onItemResized",value:function(t,e){e&&this.sizes.get(t)!==e&&(this.sizes.set(t,e),"INIT"===this.sizeType?(this.sizeType="FIXED",this.fixedSize=e):this.isFixed()&&this.fixedSize!==e&&(this.sizeType="DYNAMIC",this.fixedSize=0),this.averageSize||"DYNAMIC"!==this.sizeType||this.sizes.size!==this.options.keeps||this.updateAverageSize())}},{key:"updateAverageSize",value:function(){var t=l(this.sizes.values()).reduce((function(t,e){return t+e}),0);this.averageSize=Math.round(t/this.sizes.size)}},{key:"addScrollEventListener",value:function(){this.options.scroller&&p.utils.on(this.options.scroller,"scroll",this.onScroll)}},{key:"removeScrollEventListener",value:function(){this.options.scroller&&p.utils.off(this.options.scroller,"scroll",this.onScroll)}},{key:"enableScroll",value:function(t){var e=this.options.scroller,n=t?p.utils.off:p.utils.on,i="onwheel"in document.createElement("div")?"wheel":"mousewheel";n(e,"DOMMouseScroll",this.preventDefault),n(e,i,this.preventDefault),n(e,"touchmove",this.preventDefault),n(e,"keydown",this.preventDefaultForKeyDown)}},{key:"preventDefault",value:function(t){t.preventDefault()}},{key:"preventDefaultForKeyDown",value:function(t){if({37:1,38:1,39:1,40:1}[t.keyCode])return this.preventDefault(t),!1}},{key:"updateScrollElement",value:function(){var t=this.options.scroller;if(y(t)){var e=document.scrollingElement||document.documentElement||document.body;this.scrollEl=e}else this.scrollEl=t}},{key:"updateOnScrollFunction",value:function(){var t,e,n=this,i=this.options,o=i.debounceTime,r=i.throttleTime;this.onScroll=o?(t=g((function(){return n.handleScroll()}),o),e=function(){t.cancel(),t.apply(this,arguments)},e.cancel=function(){t.cancel()},e):r?g((function(){return n.handleScroll()}),r):function(){return n.handleScroll()}}},{key:"handleScroll",value:function(){var t=this.getOffset(),e=this.getClientSize(),n=this.getScrollSize();t===this.offset?this.direction="STATIONARY":this.direction=t<this.offset?"FRONT":"BEHIND",this.offset=t;var i=this.isFront()&&t<=0,o=this.isBehind()&&e+t+1>=n;this.options.onScroll({top:i,bottom:o,offset:t,direction:this.direction}),this.isFront()?this.handleScrollFront():this.isBehind()&&this.handleScrollBehind()}},{key:"handleScrollFront",value:function(){var t=this.getScrollItems();if(!(t>=this.range.start)){var e=Math.max(t-this.options.buffer,0);this.checkIfUpdate(e,this.getEndByStart(e))}}},{key:"handleScrollBehind",value:function(){var t=this.getScrollItems();t<this.range.start+this.options.buffer||this.checkIfUpdate(t,this.getEndByStart(t))}},{key:"getScrollItems",value:function(){var t=this.offset-this.getScrollStartOffset();if(t<=0)return 0;if(this.isFixed())return Math.floor(t/this.fixedSize);for(var e=0,n=this.options.uniqueKeys.length,i=0,o=0;e<=n;){if(i=e+Math.floor((n-e)/2),(o=this.getOffsetByRange(0,i))===t)return i;o<t?e=i+1:o>t&&(n=i-1)}return e>0?--e:0}},{key:"checkIfUpdate",value:function(t,e){var n=this.options.keeps;this.options.uniqueKeys.length<=n?t=0:e-t<n-1&&(t=e-n+1),this.range.start!==t&&this.handleUpdate(t)}},{key:"handleUpdate",value:function(t){this.range.start=t,this.range.end=this.getEndByStart(t),this.range.front=this.getFrontOffset(),this.range.behind=this.getBehindOffset(),this.range.total=this.getTotalOffset(),this.options.onUpdate(Object.assign({},this.range))}},{key:"getTotalOffset",value:function(){var t=this.range.front+this.range.behind;return t+=this.getOffsetByRange(this.range.start,this.range.end+1)}},{key:"getFrontOffset",value:function(){return this.isFixed()?this.fixedSize*this.range.start:this.getOffsetByRange(0,this.range.start)}},{key:"getBehindOffset",value:function(){var t=this.range.end,e=this.getLastIndex();return this.isFixed()?(e-t)*this.fixedSize:(e-t)*this.getItemSize()}},{key:"getOffsetByRange",value:function(t,e){if(t>=e)return 0;for(var n=0,i=t;i<e;i++){var o=this.sizes.get(this.options.uniqueKeys[i]);n+="number"==typeof o?o:this.getItemSize()}return n}},{key:"getEndByStart",value:function(t){return Math.min(t+this.options.keeps-1,this.getLastIndex())}},{key:"getLastIndex",value:function(){var t=this.options,e=t.uniqueKeys,n=t.keeps;return e.length>0?e.length-1:n-1}},{key:"getItemSize",value:function(){return this.isFixed()?this.fixedSize:this.options.size||this.averageSize}},{key:"getScrollStartOffset",value:function(){var t=this.options,e=t.wrapper,n=t.scroller;if(n===e)return 0;var i=0;if(n&&e){var o=this.isHorizontal()?"left":"top",r=y(n)?p.utils.getRect(e):p.utils.getRect(e,!0,n);i=this.offset+r[o]}return i}}])}();return n.default.component("virtual-list",{model:{prop:"dataSource",event:"updateDataSource"},props:u,data:function(){return{range:{start:0,end:0,front:0,behind:0},chosenKey:"",dragging:!1,lastList:[],lastLength:null,uniqueKeys:[],virtualRef:null,sortableRef:null}},computed:{isHorizontal:function(){return"vertical"!==this.direction},itemSizeKey:function(){return this.isHorizontal?"offsetWidth":"offsetHeight"},virtualAttributes:function(){var t=this;return w.reduce((function(e,n){return e[n]=t[n],e}),{})},sortableAttributes:function(){var t=this;return b.reduce((function(e,n){return e[n]=t[n],e}),{})}},watch:{dataSource:{handler:function(){this._onUpdate()},deep:!0},virtualAttributes:{handler:function(t,e){if(this.virtualRef)for(var n in t)t[n]!=e[n]&&this.virtualRef.option(n,t[n])}},sortableAttributes:{handler:function(t,e){if(this.sortableRef)for(var n in t)t[n]!=e[n]&&this.sortableRef.option(n,t[n])}}},activated:function(){this.scrollToOffset(this.virtualRef.offset),this.virtualRef.addScrollEventListener()},deactivated:function(){this.virtualRef.removeScrollEventListener()},created:function(){this.range.end=this.keeps-1,this._onUpdate()},mounted:function(){this._installVirtual(),this._installSortable()},beforeDestroy:function(){var t,e;null===(t=this.sortableRef)||void 0===t||t.destroy(),null===(e=this.virtualRef)||void 0===e||e.removeScrollEventListener()},methods:{getSize:function(t){return this.virtualRef.getSize(t)},getOffset:function(){return this.virtualRef.getOffset()},getClientSize:function(){return this.virtualRef.getClientSize()},getScrollSize:function(){return this.virtualRef.getScrollSize()},scrollToKey:function(t){var e=this.uniqueKeys.indexOf(t);e>-1&&this.virtualRef.scrollToIndex(e)},scrollToIndex:function(t){this.virtualRef.scrollToIndex(t)},scrollToOffset:function(t){this.virtualRef.scrollToOffset(t)},scrollToTop:function(){this.virtualRef.scrollToOffset(0)},scrollToBottom:function(){this.virtualRef.scrollToBottom()},_onUpdate:function(){var t;if(this._updateUniqueKeys(),this._updateRange(this.lastList,this.dataSource),null===(t=this.sortableRef)||void 0===t||t.option("list",this.dataSource),this.lastLength&&this.keepOffset){var e=this.dataSource.length-this.lastLength;e>0&&this.scrollToIndex(e),this.lastLength=null}this.lastList=l(this.dataSource)},_updateUniqueKeys:function(){var t,e,n=this;this.uniqueKeys=this.dataSource.map((function(t){return v(t,n.dataKey)})),null===(t=this.virtualRef)||void 0===t||t.option("uniqueKeys",this.uniqueKeys),null===(e=this.sortableRef)||void 0===e||e.option("uniqueKeys",this.uniqueKeys)},_updateRange:function(t,e){var n;if((t.length||e.length)&&t.length!==e.length){var i=Object.assign({},this.range);e.length>t.length&&this.range.end===t.length-1&&this._scrolledToBottom()&&i.start++,null===(n=this.virtualRef)||void 0===n||n.updateRange(i)}},_scrolledToBottom:function(){return this.getOffset()+this.getClientSize()+1>=this.getScrollSize()},_installVirtual:function(){var t=this;this.virtualRef=new x(Object.assign(Object.assign({},this.virtualAttributes),{buffer:Math.round(this.keeps/3),wrapper:this.$refs.wrapRef,scroller:this.scroller||this.$refs.rootRef,uniqueKeys:this.uniqueKeys,onScroll:function(e){t.lastLength=null,t.dataSource.length&&e.top?t._handleToTop():e.bottom&&t._handleToBottom()},onUpdate:function(e){var n,i=e.start!==t.range.start;t.dragging&&i&&(t.sortableRef.reRendered=!0),t.range=e,null===(n=t.sortableRef)||void 0===n||n.option("range",e),i&&t.$emit("rangeChange",e)}}))},_installSortable:function(){var t=this;this.sortableRef=new S(this.$refs.rootRef,Object.assign(Object.assign({},this.sortableAttributes),{list:this.dataSource,uniqueKeys:this.uniqueKeys,onChoose:function(e){t.chosenKey=e.node.getAttribute("data-key")},onUnChoose:function(){t.chosenKey=""},onDrag:function(e){t.dragging=!0,t.sortable||(t.virtualRef.enableScroll(!1),t.sortableRef.option("autoScroll",!1)),t.$emit("drag",e)},onDrop:function(e){t.dragging=!1,t.virtualRef.enableScroll(!0),t.sortableRef.option("autoScroll",t.autoScroll),e.changed&&t.$emit("updateDataSource",e.list),t.$emit("drop",e)}}))},_handleToTop:g((function(){this.$emit("top"),this.lastLength=this.dataSource.length}),50),_handleToBottom:g((function(){this.$emit("bottom")}),50),_onItemResized:function(t,e){if(!m(t,this.chosenKey)){var n=this.virtualRef.sizes.size,i=Math.min(this.keeps,this.dataSource.length);this.virtualRef.onItemResized(t,e),n===i-1&&this.virtualRef.updateRange(this.range)}},_renderSpacer:function(t,e){return this.tableMode?t("tr",{},[t("td",{style:{padding:0,border:0,height:"".concat(e,"px")}})]):null},_renderItems:function(t){var e=[],n=this.range,i=n.start,o=n.end,r=n.front,s=n.behind;e.push(this._renderSpacer(t,r));for(var l=i;l<=o;l++){var a=this.dataSource[l];if(a){var u=v(a,this.dataKey),c=m(u,this.chosenKey),f=this.dragging&&c&&{display:"none"};e.push(this.$scopedSlots.item?t(h,{key:u,attrs:{"data-key":u},props:{dataKey:u,sizeKey:this.itemSizeKey},on:{resized:this._onItemResized},style:f,class:this.itemClass},this.$scopedSlots.item({record:a,index:l,dataKey:u})):null)}}return e.push(this._renderSpacer(t,s)),e}},render:function(t){var e=this.range,n=e.front,i=e.behind,o=this.tableMode,r=this.isHorizontal,s=this.rootTag,l=this.wrapTag,a=r?"0px ".concat(i,"px 0px ").concat(n,"px"):"".concat(n,"px 0px ").concat(i,"px"),u=r?"auto hidden":"hidden auto",c=o?"tbody":l;return t(o?"table":s,{ref:"rootRef",style:this.scroller||o?{}:{overflow:u}},[this.$slots.header,t(c,{ref:"wrapRef",class:this.wrapClass,style:Object.assign(Object.assign({},this.wrapStyle),{padding:!o&&a})},this._renderItems(t)),this.$slots.footer])}})}));
*/!function(t){t.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(){return e=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},e.apply(this,arguments)}var n={capture:!1,passive:!1},i=/\s+/g;function o(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var r=o(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),s=o(/Edge/i),l=o(/safari/i)&&!o(/chrome/i)&&!o(/android/i),a=function(){var t=!1;return document.addEventListener("checkIfSupportPassive",null,{get passive(){return t=!0,!0}}),t}();function u(t,e,i){window.addEventListener?t.addEventListener(e,i,!(!a&&r)&&n):window.attachEvent?t.attachEvent("on"+e,i):t["on"+e]=i}function c(t,e,i){window.removeEventListener?t.removeEventListener(e,i,!(!a&&r)&&n):window.detachEvent?t.detachEvent("on"+e,i):t["on"+e]=null}function h(){return document.scrollingElement||document.documentElement}function f(t,e,n){if(t.getBoundingClientRect||t===window){var i,o,r,s,l,a,u;if(t!==window&&t.parentNode&&t!==h()?(o=(i=t.getBoundingClientRect()).top,r=i.left,s=i.bottom,l=i.right,a=i.height,u=i.width):(o=0,r=0,s=window.innerHeight,l=window.innerWidth,a=window.innerHeight,u=window.innerWidth),e&&t!==window){n=n||t.parentNode;do{if(n&&n.getBoundingClientRect){var c=n.getBoundingClientRect();o-=c.top+parseInt(w(n,"border-top-width")),r-=c.left+parseInt(w(n,"border-left-width")),s=o+i.height,l=r+i.width;break}}while(n=n.parentNode)}return{top:o,left:r,bottom:s,right:l,width:u,height:a}}}function d(t,e,n,i){if(t){if(n&&!e)for(var o=Array.prototype.slice.call(n.children),r=0,s=o.length;r<s;r++)if(o[r]===t||p(t,o[r]))return o[r];n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&S(t,e):S(t,e))||i&&t===n)return t;if(t===n)break}while(t=t.parentNode);return null}}function p(t,e){if(!t||!e)return!1;if(e.compareDocumentPosition)return!!(16&e.compareDocumentPosition(t));if(e.contains&&1===t.nodeType)return e.contains(t)&&e!==t;for(;t=t.parentNode;)if(t===e)return!0;return!1}function g(t,e){for(var n=t.lastElementChild;n&&(n===it.ghost||"none"===w(n,"display")||e&&!S(n,e));)n=n.previousElementSibling;return n||null}function m(t,e){if(!t||!t.parentNode)return-1;for(var n=0;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||e&&!S(t,e)||"none"===w(t,"display")||n++;return n}function v(t,e,n,i){for(var o=0,r=0,s=t.children;o<s.length;){if(s[o]!==it.ghost&&"none"!==w(s[o],"display")&&d(s[o],n,t,!1)&&(i||s[o]!==it.dragged)){if(r===e)return s[o];r++}o++}return null}function y(t,e){var n=w(t),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=v(t,0,e),l=v(t,1,e),a=o&&w(o),u=l&&w(l),c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+f(o).width,h=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+f(l).width,d=s||r?"cssFloat":"float";if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&"none"!==a.float){var p="left"===a.float?"left":"right";return!l||"both"!==u.clear&&u.clear!==p?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||c>=i&&"none"===n[d]||l&&"none"===n[d]&&c+h>i)?"vertical":"horizontal"}function b(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(i," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(i," ")}}function S(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function w(t,e,n){var i=t&&t.style;if(i){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in i||-1!==e.indexOf("webkit")||(e="-webkit-"+e),i[e]=n+("string"==typeof n?"":"px")}}function x(t,e){var n,i,o=(i=e,(n=t).compareDocumentPosition?n.compareDocumentPosition(i):n.contains?(n!=i&&n.contains(i)&&16)+(n!=i&&i.contains(n)&&8)+(n.sourceIndex>=0&&i.sourceIndex>=0?(n.sourceIndex<i.sourceIndex&&4)+(n.sourceIndex>i.sourceIndex&&2):1):0);return 2===o?1:4===o?-1:0}function T(t){void 0!==t.preventDefault&&t.cancelable&&t.preventDefault()}function z(t){var n=t.sortable,i=t.name,o=t.params,r=n.options[i];"function"==typeof r&&r(e({},o))}!function(){if("undefined"==typeof window||"undefined"==typeof document)return"";var t=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"];(Array.prototype.slice.call(t).join("").match(/-(moz|webkit|ms)-/)||""===t.OLink&&["","o"])[1]}();var _,k,O,C="Sortable"+Date.now();function I(t){this.options=t,this.autoScrollAnimationFrame=null}function D(t){this.options=t,this.stack=[]}function E(t){this.options=t||{},this.selects=[]}window.requestAnimationFrame||(window.requestAnimationFrame=function(t){return setTimeout(t,17)}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)}),I.prototype={stop:function(){this.autoScrollAnimationFrame&&(cancelAnimationFrame(this.autoScrollAnimationFrame),this.autoScrollAnimationFrame=null)},start:function(t,e,n){var i=this;cancelAnimationFrame(this.autoScrollAnimationFrame),this.autoScrollAnimationFrame=requestAnimationFrame((function(){e&&n&&i.autoScroll(t,n),i.start(t,e,n)}))},autoScroll:function(t,e){if(t&&void 0!==e.clientX&&void 0!==e.clientY){var n=f(t);if(n){var i=e.clientX,o=e.clientY,r=n.top,s=n.right,l=n.bottom,a=n.left,u=n.height,c=n.width;if(!(o<r||i>s||o>l||i<a)){var h=this.options,d=h.scrollThreshold,p=h.scrollSpeed,g=t.scrollTop,m=t.scrollLeft,v=t.scrollHeight,y=g>0&&o>=r&&o<=r+d,b=m+c<t.scrollWidth&&i<=s&&i>=s-d,S=g+u<v&&o<=l&&o>=l-d;m>0&&i>=a&&i<=a+d&&(t.scrollLeft+=Math.floor(Math.max(-1,(i-a)/d-1)*p.x)),b&&(t.scrollLeft+=Math.ceil(Math.min(1,(i-s)/d+1)*p.x)),y&&(t.scrollTop+=Math.floor(Math.max(-1,(o-r)/d-1)*p.y)),S&&(t.scrollTop+=Math.ceil(Math.min(1,(o-l)/d+1)*p.y))}}}}},D.prototype={collect:function(t){if(t){for(var e=f(t),n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,i=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,o=Math.min(e.right,n),r=Math.min(e.bottom,i),s=Array.prototype.slice.call(t.children),l=[],a=0,u=s.length;a<=u;a++){var c=s[a];if(c&&c!==it.ghost&&"none"!==w(c,"display")){var h=f(c);if(!(h.bottom<0||h.right<0)){if(h.top-h.height>r||h.left-h.width>o)break;l.push({el:c,rect:h})}}}this.stack.push(l)}},animate:function(){var t=this.stack.pop();if(t&&this.options.animation)for(var e=0,n=t.length;e<n;e++){var i=t[e],o=i.el,r=i.rect;this._excute(o,r)}},_excute:function(t,e){var n=f(t);if(n.top!==e.top||n.left!==e.left){var i=e.left-n.left,o=e.top-n.top;w(t,"transition",""),w(t,"transform","translate3d(".concat(i,"px, ").concat(o,"px, 0)")),t.offsetWidth;var r=this.options,s=r.animation,l=r.easing;w(t,"transition","transform ".concat(s,"ms ").concat(l?" "+l:"")),w(t,"transform","translate3d(0px, 0px, 0px)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){w(t,"transition",""),w(t,"transform",""),t.animated=null}),s)}}},E.prototype={active:function(){return!!_},nulling:function(){_=k=O=null},params:function(){return{nodes:_||[],clones:k||[]}},select:function(t){b(t,this.options.selectedClass,!0),this.selects.push(t),this.selects.sort((function(t,e){return x(t,e)}))},deselect:function(t){var e=this.selects.indexOf(t);e>-1&&(b(t,this.options.selectedClass,!1),this.selects.splice(e,1))},useSelectHandle:function(t,e){var n=this.options.selectHandle;return!!(O="function"==typeof n&&n(t)||"string"==typeof n&&S(e,n))},getGhostElement:function(){if(!_)return null;var t=document.createElement("div");return b(t,this.options.chosenClass,!0),this.selects.forEach((function(e,n){var i=e.cloneNode(!0),o=0===n?1:.5;i.style="position: absolute;left: 0;top: 0;bottom: 0;right: 0;opacity: ".concat(o,";z-index: ").concat(n,";"),t.appendChild(i)})),t},onChoose:function(){!this.options.multiple||0===this.selects.length||this.selects.indexOf(it.dragged)<0||(this.selects.sort((function(t,e){return x(t,e)})),_=this.selects,this.toggleChosenClass(!0))},onDrop:function(t,e,n){if(_){var i=it.dragged,o=it.clone,r=_.indexOf(i);t!==e&&n?(w(o,"display","none"),this.toggleVisible(!0),k=_.map((function(t){return t.cloneNode(!0)})),this._sortElements(k,r,o)):this._sortElements(_,r,o),t!==e&&(e[C].multiplayer.toggleSelected(k||_,!0),!n&&t[C].multiplayer.toggleSelected(_,!1))}},onSelect:function(t,e,n,i){var o=this.options,r=o.multiple,s=o.selectHandle;if(r&&(s&&O||!s&&!n)){var l=this.selects.indexOf(e);b(e,this.options.selectedClass,l<0);var a={from:i.el,event:t,node:e,index:m(e)};l<0?(this.selects.push(e),z({sortable:i,name:"onSelect",params:a})):(this.selects.splice(l,1),z({sortable:i,name:"onDeselect",params:a})),this.selects.sort((function(t,e){return x(t,e)}))}},toggleChosenClass:function(t){if(_)for(var e=0,n=_.length;e<n;e++)b(_[e],this.options.chosenClass,t)},toggleVisible:function(t){if(_)for(var e=0,n=_.length;e<n;e++)_[e]!=it.dragged&&w(_[e],"display",t?"":"none")},toggleSelected:function(t,e){var n=this;e?t.forEach((function(t){return n.selects.push(t)})):this.selects=this.selects.filter((function(e){return t.indexOf(e)<0}))},_sortElements:function(t,e,n){for(var i=0,o=t.length;i<o;i++)if(w(t[i],"display",""),i<e)n.parentNode.insertBefore(t[i],n);else{var r=i>0?t[i-1]:n;n.parentNode.insertBefore(t[i],r.nextSibling)}}};var R,A,B,M,N,K,L,F,H,j,P,q,U,Y,$,W,X,V,G,J,Q,Z,tt=[];function et(e){var n={},i=e.group;i&&"object"==t(i)||(i={name:i,pull:!0,put:!0,revertDrag:!0}),n.name=i.name,n.pull=i.pull,n.put=i.put,n.revertDrag=i.revertDrag,e.group=n}function nt(t){var e=W||$;return!(void 0!==t.clientX&&void 0!==t.clientY&&Math.abs(t.clientX-e.clientX)<=0&&Math.abs(t.clientY-e.clientY)<=0)}function it(t,n){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable-dnd: `el` must be an HTMLElement, not ".concat({}.toString.call(t));t[C]=this,this.el=t,this.options=n=e({},n);var i={store:null,group:"",handle:null,sortable:!0,disabled:!1,multiple:!1,lockAxis:"",direction:"",animation:150,easing:"",draggable:null,selectHandle:null,customGhost:null,autoScroll:!0,scrollThreshold:55,scrollSpeed:{x:10,y:10},delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,ghostClass:"",ghostStyle:{},chosenClass:"",selectedClass:"",placeholderClass:"",swapOnDrop:!0,removeCloneOnDrop:!0,fallbackOnBody:!1,supportTouch:"ontouchstart"in window,emptyInsertThreshold:-1};for(var o in i)!(o in this.options)&&(this.options[o]=i[o]);for(var r in et(n),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));u(t,this.options.supportTouch?"touchstart":"mousedown",this._onDrag),this.autoScroller=new I(this.options),this.multiplayer=new E(this.options),this.animator=new D(this.options),tt.push(t)}return it.prototype={constructor:it,_onDrag:function(t){var e=this;if(!M&&!this.options.disabled&&this.options.group.pull&&(!/mousedown|pointerdown/.test(t.type)||0===t.button)){var n=t.touches&&t.touches[0],i=(n||t).target;if(!l||!i||"SELECT"!==i.tagName.toUpperCase()){var o=d(i,this.options.draggable,this.el);if(o&&!o.animated&&($={event:t,clientX:(n||t).clientX,clientY:(n||t).clientY},M=o,u(J=n?M:document,"mouseup",this._onDrop),u(J,"touchend",this._onDrop),u(J,"touchcancel",this._onDrop),!this.multiplayer.useSelectHandle(t,i))){var a=this.options.handle;if(("function"!=typeof a||a(t))&&("string"!=typeof a||S(i,a))){var c=this.options,h=c.delay,f=c.delayOnTouchOnly;!h||f&&!n||s||r?this._onStart(n,t):(u(this.el.ownerDocument,"touchmove",this._delayMoveHandler),u(this.el.ownerDocument,"mousemove",this._delayMoveHandler),u(this.el.ownerDocument,"mouseup",this._cancelStart),u(this.el.ownerDocument,"touchend",this._cancelStart),u(this.el.ownerDocument,"touchcancel",this._cancelStart),Z=setTimeout((function(){return e._onStart(n,t)}),h)),u(document,"selectstart",T),l&&w(document.body,"user-select","none")}}}}},_delayMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-$.clientX),Math.abs(e.clientY-$.clientY))>=Math.floor(this.options.touchStartThreshold/(window.devicePixelRatio||1))&&this._cancelStart()},_cancelStart:function(){clearTimeout(Z),c(this.el.ownerDocument,"touchmove",this._delayMoveHandler),c(this.el.ownerDocument,"mousemove",this._delayMoveHandler),c(this.el.ownerDocument,"mouseup",this._cancelStart),c(this.el.ownerDocument,"touchend",this._cancelStart),c(this.el.ownerDocument,"touchcancel",this._cancelStart),c(document,"selectstart",T),l&&w(document.body,"user-select","")},_onStart:function(t,e){T(e);var n=m(M);R=this.el,A=this.el,H=M,q=n,U=n,Y=n,V={to:this.el,target:M,newIndex:n,relative:0},G=M,B=this.el,L=M.cloneNode(!0),j=M.parentNode,P=this.options.group.pull,it.clone=L,it.active=this,it.dragged=M,this.multiplayer.onChoose(),b(M,this.options.chosenClass,!0),z({sortable:this,name:"onChoose",params:this._getParams(e)}),u(J,t?"touchmove":"mousemove",this._nearestSortable);try{document.selection?setTimeout((function(){return document.selection.empty()}),0):window.getSelection().removeAllRanges()}catch(t){}},_onStarted:function(){this.animator.collect(j),b(L,this.options.chosenClass,!0),b(L,this.options.placeholderClass,!0),this._appendGhost(),this.multiplayer.toggleVisible(!1),w(M,"display","none"),M.parentNode.insertBefore(L,M),z({sortable:this,name:"onDrag",params:this._getParams($.event)}),this.animator.animate()},_getGhostElement:function(){var t=this.options.customGhost;if("function"==typeof t){var e=this.multiplayer.selects;return t(e.length?e:[M])}return this.multiplayer.getGhostElement()||M},_appendGhost:function(){if(!F){var t=this.options.fallbackOnBody?document.body:this.el,n=this._getGhostElement();b(F=n.cloneNode(!0),this.options.ghostClass,!0);var i=f(M),o=e({position:"fixed",top:i.top,left:i.left,width:i.width,height:i.height,zIndex:"100000",opacity:"0.8",overflow:"hidden",boxSizing:"border-box",transform:"",transition:"",pointerEvents:"none"},this.options.ghostStyle);for(var r in o)w(F,r,o[r]);it.ghost=F,t.appendChild(F);var s=($.clientX-i.left)/parseInt(F.style.width)*100,l=($.clientY-i.top)/parseInt(F.style.height)*100;w(F,"transform-origin","".concat(s,"% ").concat(l,"%")),w(F,"will-change","transform")}},_nearestSortable:function(t){T(t);var e=t.touches&&t.touches[0]||t;if(M&&nt(e)){!W&&this._onStarted();var n=this.options.lockAxis,i="x"===n?$.clientX:e.clientX,o="y"===n?$.clientY:e.clientY,r=document.elementFromPoint(i,o),s=i-$.clientX,l=o-$.clientY;W={event:t,clientX:i,clientY:o},w(F,"transform","translate3d(".concat(s,"px, ").concat(l,"px, 0)"));var a,u,c,d=(a=i,u=o,tt.reduce((function(t,e){var n=e[C].options.emptyInsertThreshold;if(null!=n){var i=f(e),o=a>=i.left-n&&a<=i.right+n,r=u>=i.top-n&&u<=i.bottom+n;return o&&r&&(!c||c&&i.left>=c.left&&i.right<=c.right&&i.top>=c.top&&i.bottom<=c.bottom)&&(t=e,c=i),t}}),null));if(d&&d[C]._onMove(t,r),!d||d[C].options.autoScroll){var p=function(t,e){if(!t||!t.getBoundingClientRect)return h();var n=t,i=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=w(n);if(n.clientWidth<n.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!n.getBoundingClientRect||n===document.body)return h();if(i||e)return n;i=!0}}}while(n=n.parentNode);return h()}(r,!0);this.autoScroller.start(p,$,W)}else this.autoScroller.stop()}},_allowPut:function(){if(B===this.el)return!0;if(!this.options.group.put)return!1;var t=this.options.group,e=t.name,n=t.put,i=B[C].options.group;return n.join&&n.indexOf(i.name)>-1||i.name&&e&&i.name===e},_getDirection:function(){var t=this.options,e=t.draggable,n=t.direction;return n?"function"==typeof n?n.call(W.event,L,this):n:y(j,e)},_allowSwap:function(){var t=f(N),e="vertical"===this._getDirection(),n=e?"top":"left",i=e?"bottom":"right",o=N[e?"offsetHeight":"offsetWidth"],r=e?W.clientY:W.clientX,s=r>=t[n]&&r<t[i]-o/2?-1:1,l=v(j,0,this.options.draggable),a=g(j),u=f(l),c=f(a);if(N===j||p(j,N))return L===l&&r<u[n]?(K=N,!0):L===a&&r>c[i]&&(K=N.nextSibling,!0);var h=x(L,N);return K=h<0?N.nextSibling:N,X!==N?(Q=s,!0):Q!==s&&(Q=s,s<0?h>0:h<0)},_onMove:function(t,e){if(!this.options.disabled&&this._allowPut()){if(N=d(e,this.options.draggable,this.el),z({sortable:this,name:"onMove",params:this._getParams(t,{target:N})}),this.options.sortable||this.el!==B)return this.el===A||e!==this.el&&g(this.el)?void(N&&!N.animated&&!p(N,L)&&this._allowSwap()&&(N!==L&&K!==L?(this.el!==A?this._onInsert(t):N!==M&&this._onChange(t),X=N):X=N)):(N=X=null,void this._onInsert(t));A!==B&&(N=X=M,Q=0,this._onInsert(t))}},_onInsert:function(t){var e=N||L,n="clone"===P&&this.el!==B&&A===B,i="clone"===P&&this.el===B&&A!==B,o=p(N,document),r=N===M&&!o,s=A[C],l=B[C];R=this.el,q=m(L),H=e,j=o?N.parentNode:this.el,s.animator.collect(L.parentNode),this.animator.collect(j),n&&(V.target=G,V.newIndex=q,V.relative=G===M?0:x(L,G),w(M,"display",""),l.multiplayer.toggleVisible(!0),l.options.group.revertDrag||L.parentNode.insertBefore(M,L)),i&&(q=m(M),w(M,"display","none"),this.multiplayer.toggleVisible(!1)),w(L,"display",r?"none":""),N&&o?j.insertBefore(L,Q<0?N:N.nextSibling):j.appendChild(L),U=r?Y:m(L),n&&l.options.group.revertDrag&&(V.target=M,V.newIndex=Y,V.relative=0,z({sortable:l,name:"onChange",params:this._getParams(t,{to:B,target:M,newIndex:Y,revertDrag:!0})})),n||z({sortable:s,name:"onRemove",params:this._getParams(t,{newIndex:-1})}),i&&e!==M&&(G=e,z({sortable:this,name:"onChange",params:this._getParams(t,{from:B,backToOrigin:!0})})),i||z({sortable:this,name:"onAdd",params:this._getParams(t,{oldIndex:-1})}),s.animator.animate(),this.animator.animate(),A=this.el},_onChange:function(t){this.animator.collect(j),q=m(L),j=N.parentNode,H=N,this.el===B&&(G=N),j.insertBefore(L,K),U=m(L),z({sortable:this,name:"onChange",params:this._getParams(t)}),this.animator.animate(),A=this.el},_onDrop:function(t){this._cancelStart(),c(J,"touchmove",this._nearestSortable),c(J,"mousemove",this._nearestSortable),c(J,"mouseup",this._onDrop),c(J,"touchend",this._onDrop),c(J,"touchcancel",this._onDrop),B&&(A=B,q=Y,H===L&&(H=M),this.animator.collect(j),this.multiplayer.toggleChosenClass(!1),b(M,this.options.chosenClass,!1),z({sortable:this,name:"onUnchoose",params:this._getParams(t)}),W&&this._onEnd(t),!W&&this.animator.animate()),!nt(t.changedTouches?t.changedTouches[0]:t)&&this.multiplayer.onSelect(t,M,B,this),F&&F.parentNode&&F.parentNode.removeChild(F),this.autoScroller.stop(),this.multiplayer.nulling(),this._nulling()},_onEnd:function(t){b(L,this.options.chosenClass,!1),b(L,this.options.placeholderClass,!1);var n="clone"===P;this.multiplayer.onDrop(A,R,n);var i=this._getParams(t),o=this.options,r=o.swapOnDrop,s=o.removeCloneOnDrop;n&&A!==R||!("function"==typeof r?r(i):r)||j.insertBefore(M,L),n&&A!==R&&!this.multiplayer.active()||!("function"==typeof s?s(i):s)||L&&L.parentNode&&L.parentNode.removeChild(L),w(M,"display",""),this.animator.animate(),A!==R&&z({sortable:A[C],name:"onDrop",params:e({},i,n?V:{newIndex:-1})}),z({sortable:R[C],name:"onDrop",params:e({},i,A===R?{}:{oldIndex:-1})})},_getParams:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i={};return i.event=t,i.to=R,i.from=A,i.node=M,i.clone=L,i.target=H,i.oldIndex=q,i.newIndex=U,i.pullMode=P,e(i,this.multiplayer.params(),n),i.relative=H===M?0:x(L,H),i},_nulling:function(){R=A=B=M=N=K=L=F=H=j=P=q=U=Y=$=W=X=V=G=J=Q=Z=it.clone=it.ghost=it.active=it.dragged=null},destroy:function(){this._cancelStart(),this._nulling(),this.multiplayer.nulling(),this.autoScroller.stop(),c(this.el,"touchstart",this._onDrag),c(this.el,"mousedown",this._onDrag);var t=tt.indexOf(this.el);t>-1&&tt.splice(t,1),this.el[C]=this.animator=this.multiplayer=this.autoScroller=null},option:function(t,e){if(void 0===e)return this.options[t];this.options[t]=e,this.animator.options[t]=e,this.multiplayer.options[t]=e,this.autoScroller.options[t]=e,"group"===t&&et(this.options)},select:function(t){this.multiplayer.select(t)},deselect:function(t){this.multiplayer.deselect(t)},getSelectedElements:function(){return this.multiplayer.selects}},it.utils={on:u,off:c,css:w,index:m,closest:d,getRect:f,toggleClass:b,detectDirection:y},it.get=function(t){return t[C]},it.create=function(t,e){return new it(t,e)},it}()}(d);var p=f(d.exports);function g(t,e){var n,i=function(){for(var i=this,o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];n||(e<=0?t.apply(this,r):n=setTimeout((function(){n=null,t.apply(i,r)}),e))};return i.cancel=function(){n&&(clearTimeout(n),n=null)},i}function m(t,e){return t==e}function v(t,e){return(Array.isArray(e)?e:e.replace(/\[/g,".").replace(/\]/g,".").split(".")).reduce((function(t,e){return(t||{})[e]}),t)}function y(t){return t instanceof Document&&9===t.nodeType||t instanceof Window}var b=["delay","group","handle","lockAxis","disabled","sortable","draggable","animation","autoScroll","ghostClass","ghostStyle","chosenClass","scrollSpeed","fallbackOnBody","scrollThreshold","delayOnTouchOnly","placeholderClass"],S=function(){return s((function t(e,n){o(this,t),this.el=e,this.options=n,this.rangeChanged=!1,this.installSortable()}),[{key:"destroy",value:function(){this.sortable.destroy(),this.rangeChanged=!1}},{key:"option",value:function(t,e){this.options[t]=e,b.includes(t)&&this.sortable.option(t,e)}},{key:"installSortable",value:function(){var t=this,e=b.reduce((function(e,n){return e[n]=t.options[n],e}),{});this.sortable=new p(this.el,Object.assign(Object.assign({},e),{emptyInsertThreshold:0,swapOnDrop:function(t){return t.from===t.to},removeCloneOnDrop:function(t){return t.from===t.to},onDrag:function(e){return t.onDrag(e)},onDrop:function(e){return t.onDrop(e)},onChoose:function(e){return t.onChoose(e)},onUnchoose:function(e){return t.onUnchoose(e)}}))}},{key:"onChoose",value:function(t){this.dispatchEvent("onChoose",t)}},{key:"onUnchoose",value:function(t){this.dispatchEvent("onUnchoose",t)}},{key:"onDrag",value:function(t){var e=t.node.getAttribute("data-key"),n=this.getIndex(e),i=this.options.list[n],o=this.options.uniqueKeys[n];this.sortable.option("store",{item:i,key:o,index:n}),this.dispatchEvent("onDrag",{item:i,key:o,index:n,event:t})}},{key:"onDrop",value:function(t){var e,n,i,o=null===(e=p.get(t.from))||void 0===e?void 0:e.option("store"),r=o.item,s=o.key,a=o.index,u=this.options.list,c={key:s,item:r,list:u,event:t,changed:!1,oldList:l(u),oldIndex:a,newIndex:a};t.from===t.to&&t.node===t.target||this.handleDropEvent(t,c,a),this.dispatchEvent("onDrop",c),t.from===this.el&&this.rangeChanged&&(null===(n=p.dragged)||void 0===n||n.remove()),t.from!==t.to&&(null===(i=p.clone)||void 0===i||i.remove()),this.rangeChanged=!1}},{key:"handleDropEvent",value:function(t,e,n){var i=t.target.getAttribute("data-key"),o=-1,r=n;t.from===t.to?(((r=this.getIndex(e.key))<(o=this.getIndex(i))&&-1===t.relative||r>o&&1===t.relative)&&(o+=t.relative),o!==r&&(e.list.splice(r,1),e.list.splice(o,0,e.item))):(t.from===this.el&&(r=this.getIndex(e.key),e.list.splice(r,1)),t.to===this.el&&(r=-1,o=this.getIndex(i),0===t.relative?o=e.list.length:1===t.relative&&(o+=t.relative),e.list.splice(o,0,e.item))),e.changed=t.from!==t.to||o!==r,e.oldIndex=r,e.newIndex=o}},{key:"getIndex",value:function(t){if(null==t)return-1;for(var e=this.options.uniqueKeys,n=0,i=e.length;n<i;n++)if(m(e[n],t))return n;return-1}},{key:"dispatchEvent",value:function(t,e){var n=this.options[t];n&&n(e)}}])}(),w=["size","keeps","scroller","direction","debounceTime","throttleTime"],x=function(){return s((function t(e){o(this,t),this.options=e;var n={size:0,keeps:0,buffer:0,wrapper:null,scroller:null,direction:"vertical",uniqueKeys:[],debounceTime:null,throttleTime:null};for(var i in n)!(i in this.options)&&(this.options[i]=n[i]);this.sizes=new Map,this.sizeType="INIT",this.fixedSize=0,this.averageSize=0,this.range={start:0,end:0,front:0,behind:0},this.offset=0,this.direction="STATIONARY",this.updateScrollElement(),this.updateOnScrollFunction(),this.addScrollEventListener(),this.checkIfUpdate(0,e.keeps-1)}),[{key:"isFixed",value:function(){return"FIXED"===this.sizeType}},{key:"isFront",value:function(){return"FRONT"===this.direction}},{key:"isBehind",value:function(){return"BEHIND"===this.direction}},{key:"isHorizontal",value:function(){return"horizontal"===this.options.direction}},{key:"getSize",value:function(t){return this.sizes.get(t)||this.getItemSize()}},{key:"getOffset",value:function(){var t=this.isHorizontal()?"scrollLeft":"scrollTop";return this.scrollEl[t]}},{key:"getScrollSize",value:function(){var t=this.isHorizontal()?"scrollWidth":"scrollHeight";return this.scrollEl[t]}},{key:"getClientSize",value:function(){var t=this.isHorizontal()?"offsetWidth":"offsetHeight";return this.scrollEl[t]}},{key:"scrollToOffset",value:function(t){var e=this.isHorizontal()?"scrollLeft":"scrollTop";this.scrollEl[e]=t}},{key:"scrollToIndex",value:function(t){if(t>=this.options.uniqueKeys.length-1)this.scrollToBottom();else{var e=this.getOffsetByRange(0,t),n=this.getScrollStartOffset();this.scrollToOffset(e+n)}}},{key:"scrollToBottom",value:function(){var t=this,e=this.getScrollSize();this.scrollToOffset(e),setTimeout((function(){var e=t.getClientSize(),n=t.getScrollSize();t.getOffset()+e+1<n&&t.scrollToBottom()}),5)}},{key:"option",value:function(t,e){var n=this,i=this.options[t];this.options[t]=e,"uniqueKeys"===t&&this.sizes.forEach((function(t,i){e.includes(i)||n.sizes.delete(i)})),"scroller"===t&&(i&&p.utils.off(i,"scroll",this.onScroll),this.updateScrollElement(),this.addScrollEventListener())}},{key:"updateRange",value:function(t){if(t)this.handleUpdate(t.start);else{var e=this.range.start;e=Math.max(e,0),this.handleUpdate(e)}}},{key:"onItemResized",value:function(t,e){e&&this.sizes.get(t)!==e&&(this.sizes.set(t,e),"INIT"===this.sizeType?(this.sizeType="FIXED",this.fixedSize=e):this.isFixed()&&this.fixedSize!==e&&(this.sizeType="DYNAMIC",this.fixedSize=0),this.averageSize||"DYNAMIC"!==this.sizeType||this.sizes.size!==this.options.keeps||this.updateAverageSize())}},{key:"updateAverageSize",value:function(){var t=l(this.sizes.values()).reduce((function(t,e){return t+e}),0);this.averageSize=Math.round(t/this.sizes.size)}},{key:"addScrollEventListener",value:function(){this.options.scroller&&p.utils.on(this.options.scroller,"scroll",this.onScroll)}},{key:"removeScrollEventListener",value:function(){this.options.scroller&&p.utils.off(this.options.scroller,"scroll",this.onScroll)}},{key:"enableScroll",value:function(t){var e=this.options.scroller,n=t?p.utils.off:p.utils.on,i="onwheel"in document.createElement("div")?"wheel":"mousewheel";n(e,"DOMMouseScroll",this.preventDefault),n(e,i,this.preventDefault),n(e,"touchmove",this.preventDefault),n(e,"keydown",this.preventDefaultForKeyDown)}},{key:"preventDefault",value:function(t){t.preventDefault()}},{key:"preventDefaultForKeyDown",value:function(t){if({37:1,38:1,39:1,40:1}[t.keyCode])return this.preventDefault(t),!1}},{key:"updateScrollElement",value:function(){var t=this.options.scroller;if(y(t)){var e=document.scrollingElement||document.documentElement||document.body;this.scrollEl=e}else this.scrollEl=t}},{key:"updateOnScrollFunction",value:function(){var t,e,n=this,i=this.options,o=i.debounceTime,r=i.throttleTime;this.onScroll=o?(t=g((function(){return n.handleScroll()}),o),e=function(){t.cancel(),t.apply(this,arguments)},e.cancel=function(){t.cancel()},e):r?g((function(){return n.handleScroll()}),r):function(){return n.handleScroll()}}},{key:"handleScroll",value:function(){var t=this.getOffset(),e=this.getClientSize(),n=this.getScrollSize();t===this.offset?this.direction="STATIONARY":this.direction=t<this.offset?"FRONT":"BEHIND",this.offset=t;var i=this.isFront()&&t<=0,o=this.isBehind()&&e+t+1>=n;this.options.onScroll({top:i,bottom:o,offset:t,direction:this.direction}),this.isFront()?this.handleScrollFront():this.isBehind()&&this.handleScrollBehind()}},{key:"handleScrollFront",value:function(){var t=this.getScrollItems();if(!(t>=this.range.start)){var e=Math.max(t-this.options.buffer,0);this.checkIfUpdate(e,this.getEndByStart(e))}}},{key:"handleScrollBehind",value:function(){var t=this.getScrollItems();t<this.range.start+this.options.buffer||this.checkIfUpdate(t,this.getEndByStart(t))}},{key:"getScrollItems",value:function(){var t=this.offset-this.getScrollStartOffset();if(t<=0)return 0;if(this.isFixed())return Math.floor(t/this.fixedSize);for(var e=0,n=this.options.uniqueKeys.length,i=0,o=0;e<=n;){if(i=e+Math.floor((n-e)/2),(o=this.getOffsetByRange(0,i))===t)return i;o<t?e=i+1:o>t&&(n=i-1)}return e>0?--e:0}},{key:"checkIfUpdate",value:function(t,e){var n=this.options.keeps;this.options.uniqueKeys.length<=n?t=0:e-t<n-1&&(t=e-n+1),this.range.start!==t&&this.handleUpdate(t)}},{key:"handleUpdate",value:function(t){this.range.start=t,this.range.end=this.getEndByStart(t),this.range.front=this.getFrontOffset(),this.range.behind=this.getBehindOffset(),this.options.onUpdate(Object.assign({},this.range))}},{key:"getFrontOffset",value:function(){return this.isFixed()?this.fixedSize*this.range.start:this.getOffsetByRange(0,this.range.start)}},{key:"getBehindOffset",value:function(){var t=this.range.end,e=this.getLastIndex();return this.isFixed()?(e-t)*this.fixedSize:(e-t)*this.getItemSize()}},{key:"getOffsetByRange",value:function(t,e){if(t>=e)return 0;for(var n=0,i=t;i<e;i++){var o=this.sizes.get(this.options.uniqueKeys[i]);n+="number"==typeof o?o:this.getItemSize()}return n}},{key:"getEndByStart",value:function(t){return Math.min(t+this.options.keeps-1,this.getLastIndex())}},{key:"getLastIndex",value:function(){var t=this.options,e=t.uniqueKeys,n=t.keeps;return e.length>0?e.length-1:n-1}},{key:"getItemSize",value:function(){return this.isFixed()?this.fixedSize:this.options.size||this.averageSize}},{key:"getScrollStartOffset",value:function(){var t=this.options,e=t.wrapper,n=t.scroller;if(n===e)return 0;var i=0;if(n&&e){var o=this.isHorizontal()?"left":"top",r=y(n)?p.utils.getRect(e):p.utils.getRect(e,!0,n);i=this.offset+r[o]}return i}}])}();return n.default.component("virtual-list",{model:{prop:"dataSource",event:"updateDataSource"},props:u,data:function(){return{range:{start:0,end:0,front:0,behind:0},chosenKey:"",dragging:!1,lastList:[],lastLength:null,uniqueKeys:[],virtualRef:null,sortableRef:null}},computed:{isHorizontal:function(){return"vertical"!==this.direction},itemSizeKey:function(){return this.isHorizontal?"offsetWidth":"offsetHeight"},virtualAttributes:function(){var t=this;return w.reduce((function(e,n){return e[n]=t[n],e}),{})},sortableAttributes:function(){var t=this;return b.reduce((function(e,n){return e[n]=t[n],e}),{})}},watch:{dataSource:{handler:function(){this._onUpdate()},deep:!0},virtualAttributes:{handler:function(t,e){if(this.virtualRef)for(var n in t)t[n]!=e[n]&&this.virtualRef.option(n,t[n])}},sortableAttributes:{handler:function(t,e){if(this.sortableRef)for(var n in t)t[n]!=e[n]&&this.sortableRef.option(n,t[n])}}},activated:function(){this.scrollToOffset(this.virtualRef.offset),this.virtualRef.addScrollEventListener()},deactivated:function(){this.virtualRef.removeScrollEventListener()},created:function(){this.range.end=this.keeps-1,this._onUpdate()},mounted:function(){this._installVirtual(),this._installSortable()},beforeDestroy:function(){var t,e;null===(t=this.sortableRef)||void 0===t||t.destroy(),null===(e=this.virtualRef)||void 0===e||e.removeScrollEventListener()},methods:{getSize:function(t){return this.virtualRef.getSize(t)},getOffset:function(){return this.virtualRef.getOffset()},getClientSize:function(){return this.virtualRef.getClientSize()},getScrollSize:function(){return this.virtualRef.getScrollSize()},scrollToKey:function(t){var e=this.uniqueKeys.indexOf(t);e>-1&&this.virtualRef.scrollToIndex(e)},scrollToIndex:function(t){this.virtualRef.scrollToIndex(t)},scrollToOffset:function(t){this.virtualRef.scrollToOffset(t)},scrollToTop:function(){this.virtualRef.scrollToOffset(0)},scrollToBottom:function(){this.virtualRef.scrollToBottom()},_onUpdate:function(){var t;if(this._updateUniqueKeys(),this._updateRange(this.lastList,this.dataSource),null===(t=this.sortableRef)||void 0===t||t.option("list",this.dataSource),this.lastLength&&this.keepOffset){var e=this.dataSource.length-this.lastLength;e>0&&this.scrollToIndex(e),this.lastLength=null}this.lastList=l(this.dataSource)},_updateUniqueKeys:function(){var t,e,n=this;this.uniqueKeys=this.dataSource.map((function(t){return v(t,n.dataKey)})),null===(t=this.virtualRef)||void 0===t||t.option("uniqueKeys",this.uniqueKeys),null===(e=this.sortableRef)||void 0===e||e.option("uniqueKeys",this.uniqueKeys)},_updateRange:function(t,e){var n;if((t.length||e.length)&&t.length!==e.length){var i=Object.assign({},this.range);t.length>this.keeps&&e.length>t.length&&this.range.end===t.length-1&&this._scrolledToBottom()&&i.start++,null===(n=this.virtualRef)||void 0===n||n.updateRange(i)}},_scrolledToBottom:function(){return this.getOffset()+this.getClientSize()+1>=this.getScrollSize()},_installVirtual:function(){var t=this;this.virtualRef=new x(Object.assign(Object.assign({},this.virtualAttributes),{buffer:Math.round(this.keeps/3),wrapper:this.$refs.wrapRef,scroller:this.scroller||this.$refs.rootRef,uniqueKeys:this.uniqueKeys,onScroll:function(e){t.lastLength=null,t.dataSource.length&&e.top?t._handleToTop():e.bottom&&t._handleToBottom()},onUpdate:function(e){var n,i=e.start!==t.range.start;t.dragging&&i&&(t.sortableRef.rangeChanged=!0),t.range=e,null===(n=t.sortableRef)||void 0===n||n.option("range",e),i&&t.$emit("rangeChange",e)}}))},_installSortable:function(){var t=this;this.sortableRef=new S(this.$refs.rootRef,Object.assign(Object.assign({},this.sortableAttributes),{list:this.dataSource,uniqueKeys:this.uniqueKeys,onChoose:function(e){t.chosenKey=e.node.getAttribute("data-key")},onUnChoose:function(){t.chosenKey=""},onDrag:function(e){t.dragging=!0,t.sortable||(t.virtualRef.enableScroll(!1),t.sortableRef.option("autoScroll",!1)),t.$emit("drag",e)},onDrop:function(e){t.dragging=!1,t.virtualRef.enableScroll(!0),t.sortableRef.option("autoScroll",t.autoScroll),e.changed&&t.$emit("updateDataSource",e.list),t.$emit("drop",e)}}))},_handleToTop:g((function(){this.$emit("top"),this.lastLength=this.dataSource.length}),50),_handleToBottom:g((function(){this.$emit("bottom")}),50),_onItemResized:function(t,e){if(!m(t,this.chosenKey)){var n=this.virtualRef.sizes.size,i=Math.min(this.keeps,this.dataSource.length);this.virtualRef.onItemResized(t,e),n===i-1&&this.virtualRef.updateRange(this.range)}},_renderSpacer:function(t,e){return this.tableMode?t("tr",{},[t("td",{style:{padding:0,border:0,height:"".concat(e,"px")}})]):null},_renderItems:function(t){var e=[],n=this.range,i=n.start,o=n.end,r=n.front,s=n.behind;e.push(this._renderSpacer(t,r));for(var l=i;l<=o;l++){var a=this.dataSource[l];if(a){var u=v(a,this.dataKey),c=m(u,this.chosenKey),f=this.dragging&&c&&{display:"none"};e.push(this.$scopedSlots.item?t(h,{key:u,attrs:{"data-key":u},props:{dataKey:u,sizeKey:this.itemSizeKey},on:{resized:this._onItemResized},style:f,class:this.itemClass},this.$scopedSlots.item({record:a,index:l,dataKey:u})):null)}}return e.push(this._renderSpacer(t,s)),e}},render:function(t){var e=this.range,n=e.front,i=e.behind,o=this.tableMode,r=this.isHorizontal,s=this.rootTag,l=this.wrapTag,a=r?"0px ".concat(i,"px 0px ").concat(n,"px"):"".concat(n,"px 0px ").concat(i,"px"),u=r?"auto hidden":"hidden auto",c=o?"tbody":l;return t(o?"table":s,{ref:"rootRef",style:this.scroller||o?{}:{overflow:u}},[this.$slots.header,t(c,{ref:"wrapRef",class:this.wrapClass,style:Object.assign(Object.assign({},this.wrapStyle),{padding:!o&&a})},this._renderItems(t)),this.$slots.footer])}})}));
{
"name": "vue-virtual-draglist",
"version": "2.9.6",
"version": "2.9.7",
"description": "A virtual scrolling list component that can be sorted by dragging",

@@ -5,0 +5,0 @@ "main": "dist/virtual-drag-list.min.js",

@@ -30,3 +30,3 @@ # vue-virtual-draglist

<span class="handle">{{ record.id }}</span>
{{ record.text }}
<p>{{ record.text }}</p>
</div>

@@ -33,0 +33,0 @@ </template>

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc