Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-virtual-draglist

Package Overview
Dependencies
Maintainers
1
Versions
101
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 3.2.1 to 3.2.2

13

dist/virtual-drag-list.min.js

@@ -1,1 +0,12 @@

!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).VirtualDragList=e(t.Vue)}(this,function(A){"use strict";function N(e,t){var n,i=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)),i}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach(function(t){i(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function i(t,e,n){(e=function(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);n=n.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}function R(t){return function(t){if(Array.isArray(t))return j(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){var n;if(t)return"string"==typeof t?j(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j(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 j(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var F,L,K,u,W,Y,H,X,s,l,a,o,c,r,U,h,d,f,p,m,q,g,v,V,y,S,b,w,x,G,O,T,Z;function $(t){return($="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})(t)}function J(){return(J=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,i=arguments[e];for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}function Q(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}function tt(t,e){t.style["".concat(X.css,"transition-duration")]=null==e?"":"".concat(e,"ms")}function et(t,e){t.style["".concat(X.css,"transform")]=e?"".concat(e):""}function E(t,e,n){window.addEventListener?t.addEventListener(e,n,!(!H&&u)&&F):window.attachEvent?t.attachEvent("on"+e,n):t["on"+e]=n}function _(t,e,n){window.removeEventListener?t.removeEventListener(e,n,!(!H&&u)&&F):window.detachEvent?t.detachEvent("on"+e,n):t["on"+e]=null}function nt(){return document.scrollingElement||document.documentElement}function z(t,e,n){if(t.getBoundingClientRect||t===window){var i,o,r,s,l,a,c=t!==window&&t.parentNode&&t!==nt()?(o=(i=t.getBoundingClientRect()).top,r=i.left,s=i.bottom,l=i.right,a=i.height,i.width):(r=o=0,s=window.innerHeight,l=window.innerWidth,a=window.innerHeight,window.innerWidth);if(e&&t!==window){n=n||t.parentNode;do{if(n&&n.getBoundingClientRect){var u=n.getBoundingClientRect();o-=u.top+parseInt(C(n,"border-top-width")),r-=u.left+parseInt(C(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:c,height:a}}}function it(t,e,n,i){if(t){n=n||document;do{if(null==e){var o=Array.prototype.slice.call(n.children),r=o.indexOf(t);if(-1<r)return o[r];for(var s=0;s<o.length;s++)if(ot(t,o[s]))return o[s]}else if((">"!==e[0]||t.parentNode===n)&&lt(t,e)||i&&t===n)return t}while(t=t.parentNode)}return null}function ot(t,e){if(t&&e){if(e.compareDocumentPosition)return e===t||16&e.compareDocumentPosition(t);if(e.contains&&1===t.nodeType)return e.contains(t)&&e!==t;for(;t=t.parentNode;)if(t===e)return 1}}function D(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||e&&!lt(t,e)||"none"===C(t,"display")||n++;return n}function rt(t,e,n,i){for(var o=0,r=0,s=t.children;o<s.length;){if(s[o]!==M.ghost&&"none"!==C(s[o],"display")&&it(s[o],n,t,!1)&&(i||s[o]!==M.dragged)){if(r===e)return s[o];r++}o++}return null}function st(t,e){var n,i=C(t),o=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),r=rt(t,0,e),t=rt(t,1,e),e=r&&C(r),s=t&&C(t),l=e&&parseInt(e.marginLeft)+parseInt(e.marginRight)+z(r).width,a=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+z(t).width,c=W||u?"cssFloat":"float";return"flex"===i.display?"column"===i.flexDirection||"column-reverse"===i.flexDirection?"vertical":"horizontal":"grid"===i.display?i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":r&&e.float&&"none"!==e.float?(n="left"===e.float?"left":"right",!t||"both"!==s.clear&&s.clear!==n?"horizontal":"vertical"):r&&("block"===e.display||"flex"===e.display||"table"===e.display||"grid"===e.display||o<=l&&"none"===i[c]||t&&"none"===i[c]&&o<l+a)?"vertical":"horizontal"}function I(t,e,n){var i;t&&e&&(t.classList?t.classList[n?"add":"remove"](e):(i=(" "+t.className+" ").replace(L," ").replace(" "+e+" "," "),t.className=(i+(n?" "+e:"")).replace(L," ")))}function lt(t,e){if(e&&(">"===e[0]&&(e=e.substring(1)),t))try{return t.matches?t.matches(e):t.msMatchesSelector?t.msMatchesSelector(e):t.webkitMatchesSelector&&t.webkitMatchesSelector(e)}catch(t){}}function C(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];i[e=e in i||-1!==e.indexOf("webkit")?e:"-webkit-"+e]=n+("string"==typeof n?"":"px")}}function at(t,e){return 2===(t=t.compareDocumentPosition?t.compareDocumentPosition(e):t.contains?(t!=e&&t.contains(e)&&16)+(t!=e&&e.contains(t)&&8)+(0<=t.sourceIndex&&0<=e.sourceIndex?(t.sourceIndex<e.sourceIndex&&4)+(t.sourceIndex>e.sourceIndex&&2):1)+0:0)?1:4===t?-1:0}function ct(t){void 0!==t.preventDefault&&t.cancelable&&t.preventDefault()}function k(t){var e=t.sortable,n=t.name,t=t.params;"function"==typeof(e=e.options[n])&&e(J({},t))}function ut(t){this.options=t,this.autoScrollAnimationFrame=null}function ht(t){this.options=t,this.animations=[]}function dt(t){this.options=t||{},this.selectedElements=[]}function M(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable-dnd: `el` must be an HTMLElement, not ".concat({}.toString.call(t));(t[a]=this).el=t,this.options=e=J({},e);var n,i,o={store:null,disabled:!1,group:"",animation:150,draggable:null,handle:null,multiple:!1,selectHandle:null,customGhost:null,direction:function(){return st(t,e.draggable)},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:"",swapOnDrop:!0,fallbackOnBody:!1,supportTouch:"ontouchstart"in window,emptyInsertThreshold:-5};for(n in o)n in this.options||(this.options[n]=o[n]);for(i in Z(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));var r=this.options.supportTouch;E(t,r?"touchstart":"mousedown",this._onDrag),T.push(t),this.autoScroller=new ut(this.options),this.multiplayer=new dt(this.options),this.animator=new ht(this.options)}F={capture:!1,passive:!1},L=/\s+/g,u=Q(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),W=Q(/Edge/i),Y=Q(/safari/i)&&!Q(/chrome/i)&&!Q(/android/i),K=!1,document.addEventListener("checkIfSupportPassive",null,{get passive(){return K=!0}}),H=K,X="undefined"==typeof window||"undefined"==typeof document?{}:(t=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],t=(Array.prototype.slice.call(t).join("").match(/-(moz|webkit|ms)-/)||""===t.OLink&&["","o"])[1],{dom:"WebKit|Moz|MS|O".match(new RegExp("("+t+")","i"))[1],lowercase:t,css:"-"+t+"-",js:t[0].toUpperCase()+t.substr(1)}),a="Sortable"+Date.now(),window.requestAnimationFrame||(window.requestAnimationFrame=function(t){return setTimeout(t,17)}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)}),ut.prototype={destroy:function(){null!=this.autoScrollAnimationFrame&&(cancelAnimationFrame(this.autoScrollAnimationFrame),this.autoScrollAnimationFrame=null)},update:function(t,e,n){var i=this;cancelAnimationFrame(this.autoScrollAnimationFrame),this.autoScrollAnimationFrame=requestAnimationFrame(function(){e&&n&&i.autoScroll(t,n),i.update(t,e,n)})},autoScroll:function(t,e){var n,i,o,r,s,l,a,c,u,h,d,f,p;t&&void 0!==e.clientX&&void 0!==e.clientY&&(h=z(t))&&(n=e.clientX,e=e.clientY,i=h.top,o=h.right,r=h.bottom,s=h.left,f=h.height,h=h.width,e<i||o<n||r<e||n<s||(l=(a=this.options).scrollThreshold,a=a.scrollSpeed,d=t.scrollTop,c=t.scrollLeft,p=t.scrollHeight,u=0<d&&i<=e&&e<=i+l,h=c+h<t.scrollWidth&&n<=o&&o-l<=n,d=d+f<p&&e<=r&&r-l<=e,(p=f=0)<c&&s<=n&&n<=s+l&&(f=Math.floor(Math.max(-1,(n-s)/l-1)*a.x)),h&&(f=Math.ceil(Math.min(1,(n-o)/l+1)*a.x)),u&&(p=Math.floor(Math.max(-1,(e-i)/l-1)*a.y)),(p=d?Math.ceil(Math.min(1,(e-r)/l+1)*a.y):p)&&(t.scrollTop+=p),f&&(t.scrollLeft+=f)))}},ht.prototype={collect:function(t){if(t){for(var e=z(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;a<=s.length;a++){var c=s[a];if(c&&c!==M.ghost&&"none"!==C(c,"display")){var u=z(c);if(!(u.bottom<0||u.right<0)){if(u.top-u.height>r||u.left-u.width>o)break;l.push({node:c,rect:u})}}}this.animations.push(l)}},animate:function(){for(var t=this.animations.pop(),e=0,n=t.length;e<n;e++){var i=(o=t[e]).node,o=o.rect;this._excute(i,o)}},_excute:function(t,e){var n=e.left,e=e.top,i=z(t);i.top===e&&i.left===n||(e-=i.top,n-=i.left,tt(t),et(t,"translate3d(".concat(n,"px, ").concat(e,"px, 0)")),t.offsetWidth,tt(t,this.options.animation),et(t,"translate3d(0px, 0px, 0px)"),clearTimeout(t.animated),t.animated=setTimeout(function(){tt(t),et(t,""),t.animated=null},this.options.animation))}},dt.prototype={destroy:function(){s=l=null},active:function(){return!!s},setParams:function(t){t.nodes=s||[],t.clones=l||[]},select:function(t){I(t,this.options.selectedClass,!0),this.selectedElements.push(t),this.selectedElements.sort(at)},deselect:function(t){var e=this.selectedElements.indexOf(t);-1<e&&(I(t,this.options.selectedClass,!1),this.selectedElements.splice(e,1))},getGhostElement:function(){var n;return s?(n=document.createElement("div"),this.selectedElements.forEach(function(t,e){(t=t.cloneNode(!0)).style="position: absolute;left: 0;top: 0;bottom: 0;right: 0;opacity: ".concat(0===e?1:.5,";z-index: ").concat(e,";"),n.appendChild(t)}),n):null},toggleSelected:function(e,t){var n=this;t?e.forEach(function(t){return n.selectedElements.push(t)}):this.selectedElements=this.selectedElements.filter(function(t){return e.indexOf(t)<0})},toggleClass:function(t){if(s)for(var e=0;e<s.length;e++)I(s[e],this.options.chosenClass,t)},toggleVisible:function(t){s&&(t?(t=s.indexOf(M.dragged),this._viewElements(s,t,M.dragged)):this._hideElements(s))},onChoose:function(){!this.options.multiple||!this.selectedElements.length||this.selectedElements.indexOf(M.dragged)<0||(this.selectedElements.sort(at),s=this.selectedElements,this.toggleClass(!0))},onDrag:function(t){s&&(t.animator.collect(M.dragged.parentNode),this._hideElements(s),t.animator.animate(),this.toggleClass(!1))},onDrop:function(t,e,n){var i,o,r;s&&(o=M.clone,r=s.indexOf(i=M.dragged),e[a].animator.collect(o.parentNode),t!==e&&"clone"===n?(C(o,"display","none"),l=s.map(function(t){return t.cloneNode(!0)}),this._viewElements(l,r,o),this._viewElements(s,r,i)):this._viewElements(s,r,o),e[a].animator.animate(),t!==e)&&(e[a].multiplayer.toggleSelected(l||s,!0),"clone"!==n)&&t[a].multiplayer.toggleSelected(s,!1)},onSelect:function(t,e,n){var i=this.selectedElements.indexOf(e),t=(I(e,this.options.selectedClass,i<0),{from:n.el,event:t,node:e,index:D(e)});i<0?(this.selectedElements.push(e),k({sortable:n,name:"onSelect",params:t})):(this.selectedElements.splice(i,1),k({sortable:n,name:"onDeselect",params:t})),this.selectedElements.sort(at)},_viewElements:function(t,e,n){for(var i,o=0;o<t.length;o++)C(t[o],"display",""),o<e?n.parentNode.insertBefore(t[o],n):(i=0<o?t[o-1]:n,n.parentNode.insertBefore(t[o],i.nextSibling))},_hideElements:function(t){for(var e=0;e<t.length;e++)t[e]!=M.dragged&&C(t[e],"display","none")}},T=[],Z=function(t){var e={},n=t.group;n&&"object"==$(n)||(n={name:n,pull:!0,put:!0,revertDrag:!0}),e.name=n.name,e.pull=n.pull,e.put=n.put,e.revertDrag=n.revertDrag,t.group=e},M.prototype={constructor:M,_onDrag:function(t){var e,n,i,o,r=this;c||this.options.disabled||!this.options.group.pull||/mousedown|pointerdown/.test(t.type)&&0!==t.button||(i=((e=t.touches&&t.touches[0])||t).target,Y&&i&&"SELECT"===i.tagName.toUpperCase())||!(n=it(i,this.options.draggable,this.el))||n.animated||(p={original:t,clientX:(e||t).clientX,clientY:(e||t).clientY},c=n,E(g=e?c:document,"mouseup",this._onDrop),E(g,"touchend",this._onDrop),E(g,"touchcancel",this._onDrop),o=(n=this.options).handle,"function"==typeof(n=n.selectHandle)&&n(t))||"string"==typeof n&&lt(i,n)||"function"==typeof o&&!o(t)||"string"==typeof o&&!lt(i,o)||(i=(n=this.options).delay,o=n.delayOnTouchOnly,!i||o&&!e||W||u?this._onStart(e,t):(E(this.el.ownerDocument,"touchmove",this._delayMoveHandler),E(this.el.ownerDocument,"mousemove",this._delayMoveHandler),E(this.el.ownerDocument,"mouseup",this._cancelStart),E(this.el.ownerDocument,"touchend",this._cancelStart),E(this.el.ownerDocument,"touchcancel",this._cancelStart),V=setTimeout(function(){return r._onStart(e,t)},i)))},_delayMoveHandler:function(t){t=t.touches?t.touches[0]:t,Math.max(Math.abs(t.clientX-p.clientX),Math.abs(t.clientY-p.clientY))>=Math.floor(this.options.touchStartThreshold/(window.devicePixelRatio||1))&&this._cancelStart()},_cancelStart:function(){clearTimeout(V),_(this.el.ownerDocument,"touchmove",this._delayMoveHandler),_(this.el.ownerDocument,"mousemove",this._delayMoveHandler),_(this.el.ownerDocument,"mouseup",this._cancelStart),_(this.el.ownerDocument,"touchend",this._cancelStart),_(this.el.ownerDocument,"touchcancel",this._cancelStart)},_onStart:function(t,e){var n=D(c);y=this.el,S=this.el,G=x=w=n,O=c,o=this.el,h=c.cloneNode(!0),f=c.parentNode,b=this.options.group.pull,M.clone=h,M.active=this,I(M.dragged=c,this.options.chosenClass,!0),this.multiplayer.onChoose(),k({sortable:this,name:"onChoose",params:this._getParams(e)}),E(g,t?"touchmove":"mousemove",this._nearestSortable);try{document.selection?setTimeout(function(){return document.selection.empty()},0):window.getSelection().removeAllRanges()}catch(t){}},_onStarted:function(){I(h,this.options.chosenClass,!0),this._appendGhost(),this.multiplayer.onDrag(this),k({sortable:this,name:"onDrag",params:this._getParams(p.original)}),C(c,"display","none"),I(c,this.options.chosenClass,!1),c.parentNode.insertBefore(h,c),Y&&C(document.body,"user-select","none")},_getGhostElement:function(){var t=this.options.customGhost;return"function"==typeof t?t((t=this.multiplayer.selectedElements).length?t:[c]):this.multiplayer.getGhostElement()||c},_appendGhost:function(){if(!d){var t,e=(i=this.options).fallbackOnBody,n=i.ghostClass,i=i.ghostStyle,e=e?document.body:this.el,o=this._getGhostElement();I(d=o.cloneNode(!0),n,!0);var r=J({position:"fixed",top:(o=z(c)).top,left:o.left,width:o.width,height:o.height,minWidth:o.width,minHeight:o.height,opacity:"0.8",overflow:"hidden","z-index":"100000","box-sizing":"border-box","pointer-events":"none"},i);for(t in r)C(d,t,r[t]);d.style["".concat(X.css,"transition")]="none",et(d,"translate3d(0px, 0px, 0px)"),M.ghost=d,e.appendChild(d),i=(p.clientX-o.left)/parseInt(d.style.width)*100,n=(p.clientY-o.top)/parseInt(d.style.height)*100,C(d,"transform-origin","".concat(i,"% ").concat(n,"%")),C(d,"transform","translateZ(0)"),C(d,"will-change","transform")}},_nearestSortable:function(t){ct(t);var e,n,o,r,s,i=t.touches&&t.touches[0],l=i||t;!p||!c||(n=m||p,void 0!==(e=l).clientX&&void 0!==e.clientY&&Math.abs(e.clientX-n.clientX)<=0&&Math.abs(e.clientY-n.clientY)<=0)||(m||this._onStarted(),m={original:t,clientX:l.clientX,clientY:l.clientY},e=i?document.elementFromPoint(l.clientX,l.clientY):l.target,n=l.clientX-p.clientX,i=l.clientY-p.clientY,et(d,"translate3d(".concat(n,"px, ").concat(i,"px, 0)")),this.options.autoScroll&&(n=function(t){if(t&&t.getBoundingClientRect){var e=t;do{if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){var n=C(e);if(e.clientWidth<e.scrollWidth&&("auto"==n.overflowX||"scroll"==n.overflowX)||e.clientHeight<e.scrollHeight&&("auto"==n.overflowY||"scroll"==n.overflowY))return e.getBoundingClientRect&&e!==document.body?e:nt()}}while(e=e.parentNode)}return nt()}(e),this.autoScroller.update(n,p,m)),o=l.clientX,r=l.clientY,T.some(function(t){var e,n,i=t[a].options.emptyInsertThreshold;if(null!=i)return n=z(t),e=o>=n.left-i&&o<=n.right+i,n=r>=n.top-i&&r<=n.bottom+i,e&&n?s=t:void 0}),s&&s[a]._onMove(t,e))},_allowPut:function(){var t,e,n;return o===this.el||!!this.options.group.put&&(t=(e=this.options.group).name,e=e.put,n=o[a].options.group,e.join&&-1<e.indexOf(n.name)||n.name&&t&&n.name===t)},_allowSwap:function(){var t=at(h,r),e=(U=t<0?r.nextSibling:r,z(r)),n="vertical"===(o="function"==typeof this.options.direction?this.options.direction.call(m.original,c,this):this.options.direction),i=n?m.clientY:m.clientX,o=r["vertical"===o?"offsetHeight":"offsetWidth"],i=i>=(n?e.top:e.left)&&i<(n?e.bottom:e.right)-o/2?-1:1;return q!==r?(v=i,!0):v!==i&&((v=i)<0?0<t:t<0)},_onMove:function(t,e){var n,i;this._allowPut()&&(k({sortable:this,name:"onMove",params:this._getParams(t)}),this.el===S||e!==this.el&&function(t){for(var e=t.lastElementChild;e&&(e===M.ghost||"none"===C(e,"display"));)e=e.previousElementSibling;return e}(this.el)?(r=it(e,this.options.draggable,this.el))&&!r.animated&&this._allowSwap()&&(r===h||ot(r,h)||(this.el!==S?this._onInsert(t):(n=t,i=i||z(f),n.clientX<=i.right&&n.clientX>=i.left&&n.clientY>=i.top&&n.clientY<=i.bottom&&e===f||this._onChange(t))),q=r):(r=q=null,this._onInsert(t)))},_onInsert:function(t){var e=r||h,n="clone"===b&&this.el!==o&&S===o,i="clone"===b&&this.el===o&&S!==o;y=this.el,w=D(h),O=e,f=r?r.parentNode:this.el,S[a].animator.collect(h.parentNode),this.animator.collect(f),n&&(C(c,"display",""),o[a].multiplayer.toggleVisible(!0),o[a].options.group.revertDrag||S.insertBefore(c,h)),i&&(w=D(c),C(c,"display","none"),this.multiplayer.toggleVisible(!1)),r?f.insertBefore(h,v<0?r:r.nextSibling):f.appendChild(h),x=D(h),n&&o[a].options.group.revertDrag&&k({sortable:o[a],name:"onChange",params:this._getParams(t,{to:o,target:c,newIndex:G,revertDrag:!0})}),n||k({sortable:S[a],name:"onRemove",params:this._getParams(t)}),i&&r!==c&&k({sortable:this,name:"onChange",params:this._getParams(t,{from:o,backToOrigin:!0})}),i||k({sortable:this,name:"onAdd",params:this._getParams(t)}),S[a].animator.animate(),this.animator.animate(),S=this.el},_onChange:function(t){r!==c&&(f=r.parentNode,w=D(h),O=r,this.animator.collect(f),f.insertBefore(h,U),x=D(h),k({sortable:this,name:"onChange",params:this._getParams(t)}),this.animator.animate(),S=this.el)},_onDrop:function(t){var e,n;ct(t),this._cancelStart(),_(g,"touchmove",this._nearestSortable),_(g,"mousemove",this._nearestSortable),_(g,"mouseup",this._onDrop),_(g,"touchend",this._onDrop),_(g,"touchcancel",this._onDrop),I(c,this.options.chosenClass,!1),o&&(S=o,w=G,O===h&&(O=c),this.multiplayer.toggleClass(!1),k({sortable:this,name:"onUnchoose",params:this._getParams(t)}),m)&&this._onEnd(t),o||m||!this.options.multiple||(n=(e=t.changedTouches?t.changedTouches[0]:t).clientX-p.clientX,e=e.clientY-p.clientY,0<=(n=Math.sqrt(n*n+e*e))&&n<=1&&this.multiplayer.onSelect(t,c,this)),d&&d.parentNode&&d.parentNode.removeChild(d),this.multiplayer.destroy(),this.autoScroller.destroy(),this._nulling()},_onEnd:function(t){var t=this._getParams(t),e=(this.multiplayer.onDrop(S,y,b),this.options.swapOnDrop);("clone"!==b||S===y)&&("function"==typeof e?e(t):e)&&f.insertBefore(c,h),"clone"!==b||S===y||this.multiplayer.active()?h&&h.parentNode&&h.parentNode.removeChild(h):I(h,this.options.chosenClass,!1),C(c,"display",""),Y&&C(document.body,"user-select",""),S!==y&&k({sortable:S[a],name:"onDrop",params:t}),k({sortable:y[a],name:"onDrop",params:t})},_getParams:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n={};return n.event=t,n.to=y,n.from=S,n.node=c,n.clone=h,n.target=O,n.oldIndex=w,n.newIndex=x,n.pullMode=b,this.multiplayer.setParams(n),J(n,e),n.relative=n.target===c?0:at(n.target,h),n},_nulling:function(){y=S=o=c=r=U=h=d=f=b=w=x=G=p=m=O=q=g=v=V=M.clone=M.ghost=M.active=M.dragged=null},destroy:function(){this._nulling(),this._cancelStart(),_(this.el,"touchstart",this._onDrag),_(this.el,"mousedown",this._onDrag),T.splice(T.indexOf(this.el),1),this.el[a]=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&&Z(this.options)},select:function(t){this.multiplayer.select(t)},deselect:function(t){this.multiplayer.deselect(t)},getSelectedElements:function(){return this.multiplayer.selectedElements}},M.utils={on:E,off:_,css:C,index:D,closest:it,getRect:z,toggleClass:I,detectDirection:st},M.get=function(t){return t[a]},M.create=function(t,e){return new M(t,e)};function ft(n,i,o){function t(){var t=n.event,e=n.dataKey;o(t,i.value?i.value[n.sizeKey]:0,e)}var e=null;A.onMounted(function(){"undefined"!=typeof ResizeObserver&&(e=new ResizeObserver(function(){t()}),i.value)&&e.observe(i.value)}),A.onUpdated(function(){t()}),A.onUnmounted(function(){e&&(e.disconnect(),e=null)})}var P=M,t={dataSource:{default:[],required:!0},dataKey:{type:String,default:"",required:!0},draggable:{type:[String]},handle:{type:[Function,String]},group:{type:[Object,String]},scroller:{},direction:{type:String,default:"vertical"},keeps:{type:Number,default:30},size:{type:Number},debounceTime:{type:Number,default:0},throttleTime:{type:Number,default:0},animation:{type:Number,default:150},autoScroll:{type:Boolean,default:!0},scrollThreshold:{type:Number,default:55},keepOffset:{type:Boolean,default:!1},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"},headerTag:{type:String,default:"div"},footerTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},wrapClass:{type:String,default:""},wrapStyle:{type:Object,default:function(){return{}}},itemStyle:{type:Object,default:function(){return{}}},itemClass:{type:String,default:""},ghostClass:{type:String,default:""},ghostStyle:{type:Object,default:function(){return{}}},chosenClass:{type:String,default:""},headerStyle:{type:Object,default:function(){return{}}},footerStyle:{type:Object,default:function(){return{}}}},e={tag:{type:String,default:"div"},event:{type:String},dataKey:{type:[String,Number]},sizeKey:{type:String}},pt=A.defineComponent({name:"VirtualDraglistItems",props:e,emits:["resize"],setup:function(n,t){var e=t.emit,i=t.slots,o=A.ref(null);return ft(n,o,e),function(){var t=n.tag,e=n.dataKey;return A.h(t,{ref:o,key:e,"data-key":e},{default:function(){var t;return null==(t=i.default)?void 0:t.call(i)}})}}}),mt=A.defineComponent({name:"VirtualDraglistSlots",props:e,emits:["resize"],setup:function(n,t){var e=t.emit,i=t.slots,o=A.ref(null);return ft(n,o,e),function(){var t=n.tag,e=n.dataKey;return A.h(t,{ref:o,key:e,"data-key":e},{default:function(){var t;return null==(t=i.default)?void 0:t.call(i)}})}}});function gt(o,r){function t(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];s||(r<=0?o.apply(this,n):s=setTimeout(function(){s=void 0,o.apply(t,n)},r))}var s=null;return t.cancel=function(){s&&(clearTimeout(s),s=null)},t}function vt(t,e){return(Array.isArray(e)?e:e.replace(/\[/g,".").replace(/\]/g,".").split(".")).reduce(function(t,e){return(t||{})[e]},t)}var n,yt=["delay","group","handle","disabled","draggable","animation","autoScroll","ghostClass","ghostStyle","chosenClass","fallbackOnBody","scrollThreshold","delayOnTouchOnly"];function St(t,e){this.el=t,this.options=e,this.list=[],this.store={},this.reRendered=!1,this.attrs=yt,this.init()}St.prototype={constructor:St,destroy:function(){this.sortable&&this.sortable.destroy(),this.sortable=this.store=this.reRendered=null},option:function(t,e){"list"===t?this.list=R(e):this.sortable.option(t,e)},init:function(){for(var e=this,t={},n=0;n<yt.length;n++){var i=yt[n];t[i]=this.options[i]}this.sortable=new P(this.el,B(B({},t),{},{swapOnDrop:function(t){return t.from===t.to},onDrag:function(t){return e.onDrag(t)},onAdd:function(t){return e.onAdd(t)},onRemove:function(t){return e.onRemove(t)},onChange:function(t){return e.onChange(t)},onDrop:function(t){return e.onDrop(t)}})),this.list=R(this.options.list)},onDrag:function(t){var t=t.node.dataset.key,e=this.getIndex(this.list,t),n=this.list[e];this.store={item:n,key:t,origin:{index:e,list:this.list},from:{index:e,list:this.list},to:{index:e,list:this.list}},this.sortable.option("store",this.store),this.dispatchEvent("onDrag",{item:n,key:t,index:e})},onRemove:function(t){var t=t.node.dataset.key,e=this.getIndex(this.list,t),n=this.list[e];this.list.splice(e,1),Object.assign(this.store,{key:t,item:n}),this.sortable.option("store",this.store),this.dispatchEvent("onRemove",{item:n,key:t,index:e})},onAdd:function(t){var e=t.from,n=t.target,t=t.relative,e=P.get(e).option("store"),i=e.key,e=e.item,n=this.getIndex(this.list,n.dataset.key);0===t?n=this.list.length:-1===t&&(n+=1),this.list.splice(n,0,e),Object.assign(this.store,{to:{index:n,list:this.list}}),this.sortable.option("store",this.store),this.dispatchEvent("onAdd",{item:e,key:i,index:n})},onChange:function(t){var e,n,i,o,r=P.get(t.from).option("store");t.revertDrag?(this.list=R(this.options.list),Object.assign(this.store,{from:r.origin})):(n=t.node,o=t.target,e=t.relative,t=t.backToOrigin,n=this.getIndex(this.list,n.dataset.key),i=this.list[n],o=this.getIndex(this.list,o.dataset.key),t&&(1===e&&r.from.index<o&&--o,-1===e)&&r.from.index>o&&(o+=1),this.list.splice(n,1),this.list.splice(o,0,i),Object.assign(this.store,{from:{index:o,list:this.list},to:{index:o,list:this.list}}))},onDrop:function(t){var e=this.getStore(t),n=e.from,e=e.to,i=t.from!==t.to||n.origin.index!==e.to.index;this.dispatchEvent("onDrop",{changed:i,list:this.list,item:n.item,key:n.key,from:n.origin,to:e.to}),t.from===this.el&&this.reRendered&&null!=(i=P.dragged)&&i.remove(),t.from!==t.to&&"clone"===t.pullMode&&null!=(n=P.clone)&&n.remove(),this.reRendered=!1},getIndex:function(t,e){for(var n=0;n<t.length;n++)if(vt(t[n],this.options.dataKey)==e)return n;return-1},getStore:function(t){return{from:P.get(t.from).option("store"),to:P.get(t.to).option("store")}},dispatchEvent:function(t,e){t=this.options[t];t&&t(e)}};var bt=["size","keeps","scroller","direction","debounceTime","throttleTime"],wt="INIT",xt="FIXED",Ot="DYNAMIC",Tt="FRONT",Et="BEHIND",_t="STATIONARY",e="horizontal",zt="vertical",Dt=(i(n={},zt,"scrollTop"),i(n,e,"scrollLeft"),n),It=(i(n={},zt,"offsetTop"),i(n,e,"offsetLeft"),n),Ct=(i(n={},zt,"scrollHeight"),i(n,e,"scrollWidth"),n),kt=(i(n={},zt,"offsetHeight"),i(n,e,"offsetWidth"),n);function Mt(t){this.options=t;var e,n={size:0,keeps:0,buffer:0,wrapper:null,scroller:null,direction:"vertical",uniqueKeys:[],debounceTime:null,throttleTime:null};for(e in n)e in this.options||(this.options[e]=n[e]);this.sizes=new Map,this.range={start:0,end:0,front:0,behind:0},this.offset=0,this.calcType=wt,this.calcSize={average:0,total:0,fixed:0,header:0},this.scrollEl=this.getScrollElement(t.scroller),this.direction="",this.useWindowScroll=null,this.onScroll=null,this.updateOnScrollFunction(),this.addScrollEventListener(),this.checkIfUpdate(0,t.keeps-1)}Mt.prototype={constructor:Mt,isFront:function(){return this.direction===Tt},isBehind:function(){return this.direction===Et},isFixed:function(){return this.calcType===xt},getSize:function(t){return this.sizes.get(t)||this.getItemSize()},getOffset:function(){return this.scrollEl[Dt[this.options.direction]]},getScrollSize:function(){return this.scrollEl[Ct[this.options.direction]]},getClientSize:function(){return this.scrollEl[kt[this.options.direction]]},scrollToOffset:function(t){this.scrollEl[Dt[this.options.direction]]=t},scrollToIndex:function(t){t>=this.options.uniqueKeys.length-1?this.scrollToBottom():(t=this.getOffsetByIndex(t),this.scrollToOffset(t))},scrollToBottom:function(){var n=this,t=this.getScrollSize();this.scrollToOffset(t),setTimeout(function(){var t=n.getClientSize(),e=n.getScrollSize();n.getOffset()+t+1<e&&n.scrollToBottom()},5)},option:function(t,n){var i=this,e=this.options[t];this.options[t]=n,"uniqueKeys"===t&&this.sizes.forEach(function(t,e){n.includes(e)||i.sizes.delete(e)}),"scroller"===t&&(e&&P.utils.off(e,"scroll",this.onScroll),this.scrollEl=this.getScrollElement(n),this.addScrollEventListener())},updateRange:function(t){t?this.handleUpdate(t.start,t.end):(t=this.range.start,t=Math.max(t,0),this.handleUpdate(t,this.getEndByStart(t)))},onItemResized:function(t,e){this.sizes.set(t,e),this.calcType===wt?(this.calcType=xt,this.calcSize.fixed=e):this.isFixed()&&this.calcSize.fixed!==e&&(this.calcType=Ot,this.calcSize.fixed=void 0),this.calcType!==xt&&(this.calcSize.total=R(this.sizes.values()).reduce(function(t,e){return t+e},0),this.calcSize.average=Math.round(this.calcSize.total/this.sizes.size))},onSlotResized:function(t,e){this.calcSize[t]=e},addScrollEventListener:function(){this.options.scroller&&P.utils.on(this.options.scroller,"scroll",this.onScroll)},removeScrollEventListener:function(){this.options.scroller&&P.utils.off(this.options.scroller,"scroll",this.onScroll)},updateOnScrollFunction:function(){var t,e=this,n=this.options,i=n.debounceTime,n=n.throttleTime;function o(){t.cancel(),t.apply(this,arguments)}this.onScroll=i?(t=gt(function(){return e.handleScroll()},i),o.cancel=function(){t.cancel()},o):n?gt(function(){return e.handleScroll()},n):function(){return e.handleScroll()}},handleScroll:function(){var t=this.getOffset(),e=this.getClientSize(),n=this.getScrollSize(),i=(t===this.offset?this.direction=_t:this.direction=t<this.offset?Tt:Et,this.offset=t,this.isFront()&&t<=0),n=this.isBehind()&&n<=e+t;this.options.onScroll({top:i,bottom:n,offset:t,direction:this.direction}),this.isFront()?this.handleScrollFront():this.isBehind()&&this.handleScrollBehind()},handleScrollFront:function(){var t=this.getScrollItems();t>this.range.start||(t=Math.max(t-this.options.buffer,0),this.checkIfUpdate(t,this.getEndByStart(t)))},handleScrollBehind:function(){var t=this.getScrollItems();t<this.range.start+this.options.buffer||this.checkIfUpdate(t,this.getEndByStart(t))},getScrollItems:function(){var t=this.offset-this.getScrollStartOffset();if(t<=0)return 0;if(this.isFixed())return Math.floor(t/this.calcSize.fixed);for(var e,n,i=0,o=this.options.uniqueKeys.length;i<=o;){if(e=i+Math.floor((o-i)/2),(n=this.getOffsetByIndex(e))===t)return e;n<t?i=e+1:t<n&&(o=e-1)}return 0<i?--i:0},checkIfUpdate:function(t,e){var n=this.options.keeps;this.options.uniqueKeys.length<=n?(t=0,e=this.getLastIndex()):e-t<n-1&&(t=e-n+1),this.range.start!==t&&this.handleUpdate(t,e)},handleUpdate:function(t,e){this.range.start=t,this.range.end=e,this.range.front=this.getFrontOffset(),this.range.behind=this.getBehindOffset(),this.options.onUpdate(B({},this.range))},getFrontOffset:function(){return this.isFixed()?this.calcSize.fixed*this.range.start:this.getOffsetByIndex(this.range.start)},getBehindOffset:function(){var t=this.range.end,e=this.getLastIndex();return this.isFixed()?(e-t)*this.calcSize.fixed:(e-t)*this.getItemSize()},getOffsetByIndex:function(t){if(!t)return 0;for(var e=0,n=0;n<t;n++){var i=this.sizes.get(this.options.uniqueKeys[n]);e+="number"==typeof i?i:this.getItemSize()}return e},getEndByStart:function(t){return Math.min(t+this.options.keeps-1,this.getLastIndex())},getLastIndex:function(){var t=this.options,e=t.uniqueKeys,t=t.keeps;return 0<e.length?e.length-1:t-1},getItemSize:function(){return this.isFixed()?this.calcSize.fixed:this.calcSize.average||this.options.size},getScrollElement:function(t){return t instanceof Document&&9===t.nodeType||t instanceof Window?(this.useWindowScroll=!0,document.scrollingElement||document.documentElement||document.body):(this.useWindowScroll=!1,t)},getScrollStartOffset:function(){var t=this.calcSize.header;if(this.useWindowScroll&&this.options.wrapper)for(var e=this.options.wrapper;t+=e[It[this.options.direction]],(e=e.offsetParent)&&e!==this.options.wrapper.ownerDocument;);return t}};return A.defineComponent({props:t,emits:["update:dataSource","top","bottom","drag","drop","add","remove"],setup:function(c,t){var i,u,n=this,o=t.emit,r=t.slots,t=t.expose,h=A.ref({start:0,end:c.keeps,front:0,behind:0}),d=A.ref(null),f=A.ref(null),s=A.ref([]),e=A.ref([]),p=A.computed(function(){return"vertical"!==c.direction}),l=A.computed(function(){return"vertical"!==c.direction?"offsetWidth":"offsetHeight"}),a=A.computed(function(){return bt.reduce(function(t,e){return t[e]=c[e],t},{})}),m=A.computed(function(){return yt.reduce(function(t,e){return t[e]=n[e],t},{})}),g=null,v=0;function y(){return u.getOffset()}function S(){return u.getClientSize()}function b(){return u.getScrollSize()}function w(t){u.scrollToOffset(t)}function x(t){u.scrollToIndex(t)}t({getSize:function(t){return u.getSize(t)},getOffset:y,getClientSize:S,getScrollSize:b,scrollToTop:function(){w(0)},scrollToBottom:function(){u.scrollToBottom()},scrollToKey:function(t){-1<(t=e.value.indexOf(t))&&u.scrollToIndex(t)},scrollToIndex:x,scrollToOffset:w}),A.watch(function(){return c.dataSource},function(){E()},{deep:!0}),A.watch(function(){return a},function(t,e){if(u)for(var n in t)t[n]!=e[n]&&u.option(n,t[n])}),A.watch(function(){return m},function(t,e){if(u)for(var n in t)t[n]!=e[n]&&i.option(n,t[n])}),A.onBeforeMount(function(){z(),E()}),A.onActivated(function(){u&&w(u.offset),u.addScrollEventListener()}),A.onDeactivated(function(){u.removeScrollEventListener()}),A.onMounted(function(){u.option("wrapper",f.value),c.scroller||u.option("scroller",d.value)}),A.onUnmounted(function(){i&&i.destroy(),u.removeScrollEventListener()});function O(t,e){var n=r[t];return n?A.h(mt,{key:t,tag:e,style:c["".concat(t,"Style")],dataKey:t,event:"resize",sizeKey:l.value,onResize:B},{default:function(){return null==n?void 0:n()}}):null}function T(){for(var o=[],t=h.value,e=t.start,n=t.end,i=e;i<=n;i++)!function(e){var n,t,i=s.value[e];i&&(n=vt(i,c.dataKey),t=Object.assign(Object.assign({},c.itemStyle),j(n)),o.push(r.item?A.h(pt,{key:n,tag:c.itemTag,class:c.itemClass,style:t,event:"resize",dataKey:n,sizeKey:l.value,onResize:N},{default:function(){var t;return null==(t=r.item)?void 0:t.call(r,{record:i,index:e,dataKey:n})}}):null))}(i);return o}var E=function(){e=c.dataSource;var t,e=A.isRef(e)?e.value:e;e&&(t=R(s.value),s.value=e,_(),I(t,e),i?i.option("list",e):A.nextTick(function(){return D()}),g)&&c.keepOffset&&(0<(t=e.length-g)&&x(t),g=null)},_=function(){e.value=s.value.map(function(t){return vt(t,c.dataKey)}),u.option("uniqueKeys",e.value)},z=function(){u=new Mt({size:c.size,keeps:c.keeps,buffer:Math.round(c.keeps/3),scroller:c.scroller,direction:c.direction,uniqueKeys:e.value,debounceTime:c.debounceTime,throttleTime:c.throttleTime,onScroll:function(t){g=null,s.value.length&&t.top?k():t.bottom&&M()},onUpdate:function(t){P.dragged&&i&&t.start!==h.value.start&&(i.reRendered=!0),h.value=t}})},D=function(){i=new St(f.value,Object.assign(Object.assign({list:s.value},c),{onDrag:function(t){v=h.value.start,o("drag",t)},onAdd:function(t){o("add",t)},onRemove:function(t){o("remove",t)},onDrop:function(t){var e;t.list.length===s.value.length&&v<h.value.start&&(h.value.front+=(null==(e=P.clone)?void 0:e[l.value])||0,v=h.value.start),o("update:dataSource",t.list),o("drop",t)}}))},I=function(t,e){var n=Object.assign({},h.value);e.length>t.length&&n.end===t.length-1&&C()&&(n.end++,n.start=Math.max(0,n.end-c.keeps)),u.updateRange(n)},C=function(){var t=y(),e=S();return b()<=t+e+1},k=gt(function(){o("top"),g=s.value.length},50),M=gt(function(){o("bottom")},50),N=function(t,e){var n=u.sizes.size;u.onItemResized(e,t),0===n&&I(s.value,s.value)},B=function(t,e){u.onSlotResized(e,t)},j=function(t){return t==(null==(t=P.dragged)?void 0:t.dataset.key)?{display:"none"}:{}};return function(){var t=u.useWindowScroll,e=c.rootTag,n=c.wrapTag,i=c.wrapClass,o=c.headerTag,r=c.footerTag,s=h.value,l=s.front,s=s.behind,a=Object.assign(Object.assign({},c.wrapStyle),{padding:p.value?"0px ".concat(s,"px 0px ").concat(l,"px"):"".concat(l,"px 0px ").concat(s,"px")});return A.h(e,{ref:d,style:!t&&{overflow:p.value?"auto hidden":"hidden auto"}},{default:function(){return[O("header",o),A.h(n,{ref:f,class:i,style:a},{default:T}),O("footer",r)]}})}}})});
/*!
* vue-virtual-draglist v3.2.2
* open source under the MIT license
* https://github.com/mfuu/vue3-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).VirtualDragList=e(t.Vue)}(this,(function(t){"use strict";function e(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function n(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?e(Object(o),!0).forEach((function(e){i(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function i(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===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:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t){return function(t){if(Array.isArray(t))return r(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)return;if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(t,e)}(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 r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var s={exports:{}};
/*!
* sortable-dnd v0.6.6
* open source under the MIT license
* https://github.com/mfuu/sortable-dnd#readme
*/
!function(t,e){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}(),c=function(){if("undefined"==typeof window||"undefined"==typeof document)return{};var t=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],e=(Array.prototype.slice.call(t).join("").match(/-(moz|webkit|ms)-/)||""===t.OLink&&["","o"])[1];return{dom:"WebKit|Moz|MS|O".match(new RegExp("("+e+")","i"))[1],lowercase:e,css:"-"+e+"-",js:e[0].toUpperCase()+e.substr(1)}}();function u(t,e){t.style["".concat(c.css,"transition-duration")]=e?"".concat(e,"ms"):""}function h(t,e){t.style["".concat(c.css,"transform")]=e?"".concat(e):""}function d(t,e,i){window.addEventListener?t.addEventListener(e,i,!(!a&&r)&&n):window.attachEvent?t.attachEvent("on"+e,i):t["on"+e]=i}function f(t,e,i){window.removeEventListener?t.removeEventListener(e,i,!(!a&&r)&&n):window.detachEvent?t.detachEvent("on"+e,i):t["on"+e]=null}function p(){return document.scrollingElement||document.documentElement}function m(t,e,n){if(t.getBoundingClientRect||t===window){var i,o,r,s,l,a,c;if(t!==window&&t.parentNode&&t!==p()?(o=(i=t.getBoundingClientRect()).top,r=i.left,s=i.bottom,l=i.right,a=i.height,c=i.width):(o=0,r=0,s=window.innerHeight,l=window.innerWidth,a=window.innerHeight,c=window.innerWidth),e&&t!==window){n=n||t.parentNode;do{if(n&&n.getBoundingClientRect){var u=n.getBoundingClientRect();o-=u.top+parseInt(E(n,"border-top-width")),r-=u.left+parseInt(E(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:c,height:a}}}function g(t,e,n,i){if(!t)return null;if(n&&!e){var o=Array.prototype.slice.call(n.children),r=o.indexOf(t);if(r>-1)return o[r];for(var s=0;s<o.length;s++)if(v(t,o[s]))return o[s]}n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&O(t,e):O(t,e))||i&&t===n)return t;if(t===n)break}while(t=t.parentNode);return null}function v(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 y(t,e){for(var n=t.lastElementChild;n&&(n===it.ghost||"none"===E(n,"display")||e&&!O(n,e));)n=n.previousElementSibling;return n||null}function b(t,e){if(!t||!t.parentNode)return-1;for(var n=0;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||e&&!O(t,e)||"none"===E(t,"display")||n++;return n}function S(t,e,n,i){for(var o=0,r=0,s=t.children;o<s.length;){if(s[o]!==it.ghost&&"none"!==E(s[o],"display")&&g(s[o],n,t,!1)&&(i||s[o]!==it.dragged)){if(r===e)return s[o];r++}o++}return null}function w(t,e){var n=E(t),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=S(t,0,e),l=S(t,1,e),a=o&&E(o),c=l&&E(l),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+m(o).width,h=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+m(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 f="left"===a.float?"left":"right";return!l||"both"!==c.clear&&c.clear!==f?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||u>=i&&"none"===n[d]||l&&"none"===n[d]&&u+h>i)?"vertical":"horizontal"}function x(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 O(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 E(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 T(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 D(t){void 0!==t.preventDefault&&t.cancelable&&t.preventDefault()}function _(t){var n=t.sortable,i=t.name,o=t.params,r=n.options[i];"function"==typeof r&&r(e({},o))}var I,z,C="Sortable"+Date.now();function k(t){this.options=t,this.autoScrollAnimationFrame=null}function M(t){this.options=t,this.animations=[]}function N(t){this.options=t||{},this.selectedElements=[]}window.requestAnimationFrame||(window.requestAnimationFrame=function(t){return setTimeout(t,17)}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)}),k.prototype={destroy:function(){this.autoScrollAnimationFrame&&(cancelAnimationFrame(this.autoScrollAnimationFrame),this.autoScrollAnimationFrame=null)},update:function(t,e,n){var i=this;cancelAnimationFrame(this.autoScrollAnimationFrame),this.autoScrollAnimationFrame=requestAnimationFrame((function(){e&&n&&i.autoScroll(t,n),i.update(t,e,n)}))},autoScroll:function(t,e){if(t&&void 0!==e.clientX&&void 0!==e.clientY){var n=m(t);if(n){var i=e.clientX,o=e.clientY,r=n.top,s=n.right,l=n.bottom,a=n.left,c=n.height,u=n.width;if(!(o<r||i>s||o>l||i<a)){var h=this.options,d=h.scrollThreshold,f=h.scrollSpeed,p=t.scrollTop,g=t.scrollLeft,v=t.scrollHeight,y=p>0&&o>=r&&o<=r+d,b=g+u<t.scrollWidth&&i<=s&&i>=s-d,S=p+c<v&&o<=l&&o>=l-d,w=0,x=0;g>0&&i>=a&&i<=a+d&&(w=Math.floor(Math.max(-1,(i-a)/d-1)*f.x)),b&&(w=Math.ceil(Math.min(1,(i-s)/d+1)*f.x)),y&&(x=Math.floor(Math.max(-1,(o-r)/d-1)*f.y)),S&&(x=Math.ceil(Math.min(1,(o-l)/d+1)*f.y)),t.scrollTop+=x,t.scrollLeft+=w}}}}},M.prototype={collect:function(t){if(t){for(var e=m(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;a<=s.length;a++){var c=s[a];if(c&&c!==it.ghost&&"none"!==E(c,"display")){var u=m(c);if(!(u.bottom<0||u.right<0)){if(u.top-u.height>r||u.left-u.width>o)break;l.push({node:c,rect:u})}}}this.animations.push(l)}},animate:function(){for(var t=this.animations.pop(),e=0,n=t.length;e<n;e++){var i=t[e],o=i.node,r=i.rect;this._excute(o,r)}},_excute:function(t,e){var n=e.left,i=e.top,o=m(t);if(o.top!==i||o.left!==n){var r=i-o.top,s=n-o.left;u(t),h(t,"translate3d(".concat(s,"px, ").concat(r,"px, 0)")),t.offsetWidth,u(t,this.options.animation),h(t,"translate3d(0px, 0px, 0px)"),clearTimeout(t.animated),t.animated=setTimeout((function(){u(t),h(t,""),t.animated=null}),this.options.animation)}}},N.prototype={destroy:function(){I=z=null},active:function(){return!!I},setParams:function(t){t.nodes=I||[],t.clones=z||[]},select:function(t){x(t,this.options.selectedClass,!0),this.selectedElements.push(t),this.selectedElements.sort((function(t,e){return T(t,e)}))},deselect:function(t){var e=this.selectedElements.indexOf(t);e>-1&&(x(t,this.options.selectedClass,!1),this.selectedElements.splice(e,1))},getGhostElement:function(){if(!I)return null;var t=document.createElement("div");return this.selectedElements.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},toggleSelected:function(t,e){var n=this;e?t.forEach((function(t){return n.selectedElements.push(t)})):this.selectedElements=this.selectedElements.filter((function(e){return t.indexOf(e)<0}))},toggleClass:function(t){if(I)for(var e=0;e<I.length;e++)x(I[e],this.options.chosenClass,t)},toggleVisible:function(t){if(I)if(t){var e=I.indexOf(it.dragged);this._viewElements(I,e,it.dragged)}else this._hideElements(I)},onChoose:function(){!this.options.multiple||!this.selectedElements.length||this.selectedElements.indexOf(it.dragged)<0||(this.selectedElements.sort((function(t,e){return T(t,e)})),I=this.selectedElements,this.toggleClass(!0))},onDrag:function(t){I&&(t.animator.collect(it.dragged.parentNode),this._hideElements(I),t.animator.animate(),this.toggleClass(!1))},onDrop:function(t,e,n){if(I){var i=it.dragged,o=it.clone,r=I.indexOf(i);e[C].animator.collect(o.parentNode),t!==e&&"clone"===n?(E(o,"display","none"),z=I.map((function(t){return t.cloneNode(!0)})),this._viewElements(z,r,o),this._viewElements(I,r,i)):this._viewElements(I,r,o),e[C].animator.animate(),t!==e&&(e[C].multiplayer.toggleSelected(z||I,!0),"clone"!==n&&t[C].multiplayer.toggleSelected(I,!1))}},onSelect:function(t,e,n){var i=this.selectedElements.indexOf(e);x(e,this.options.selectedClass,i<0);var o={from:n.el,event:t,node:e,index:b(e)};i<0?(this.selectedElements.push(e),_({sortable:n,name:"onSelect",params:o})):(this.selectedElements.splice(i,1),_({sortable:n,name:"onDeselect",params:o})),this.selectedElements.sort((function(t,e){return T(t,e)}))},_viewElements:function(t,e,n){for(var i=0;i<t.length;i++)if(E(t[i],"display",""),i<e)n.parentNode.insertBefore(t[i],n);else{var o=i>0?t[i-1]:n;n.parentNode.insertBefore(t[i],o.nextSibling)}},_hideElements:function(t){for(var e=0;e<t.length;e++)t[e]!=it.dragged&&E(t[e],"display","none")}};var A,B,j,P,R,F,L,H,K,W,Y,X,U,q,V,G,Z,$,J,Q,tt,et=[],nt=function(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 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,disabled:!1,group:"",lockAxis:"",animation:150,draggable:null,handle:null,multiple:!1,selectHandle:null,customGhost:null,direction:"",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:"",swapOnDrop:!0,fallbackOnBody:!1,supportTouch:"ontouchstart"in window,emptyInsertThreshold:-5};for(var o in i)!(o in this.options)&&(this.options[o]=i[o]);for(var r in nt(n),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));d(t,this.options.supportTouch?"touchstart":"mousedown",this._onDrag),et.push(t),this.autoScroller=new k(this.options),this.multiplayer=new N(this.options),this.animator=new M(this.options)}return it.prototype={constructor:it,_onDrag:function(t){var e=this;if(!B&&!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=g(i,this.options.draggable,this.el);if(o&&!o.animated){H={original:t,clientX:(n||t).clientX,clientY:(n||t).clientY},B=o,d(Y=n?B:document,"mouseup",this._onDrop),d(Y,"touchend",this._onDrop),d(Y,"touchcancel",this._onDrop);var a=this.options,c=a.handle,u=a.selectHandle;if("function"==typeof u&&u(t)||"string"==typeof u&&O(i,u))q=!0;else if(("function"!=typeof c||c(t))&&("string"!=typeof c||O(i,c))){var h=this.options,f=h.delay,p=h.delayOnTouchOnly;!f||p&&!n||s||r?this._onStart(n,t):(d(this.el.ownerDocument,"touchmove",this._delayMoveHandler),d(this.el.ownerDocument,"mousemove",this._delayMoveHandler),d(this.el.ownerDocument,"mouseup",this._cancelStart),d(this.el.ownerDocument,"touchend",this._cancelStart),d(this.el.ownerDocument,"touchcancel",this._cancelStart),U=setTimeout((function(){return e._onStart(n,t)}),f)),d(document,"selectstart",D),l&&E(document.body,"user-select","none")}}}}},_delayMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-H.clientX),Math.abs(e.clientY-H.clientY))>=Math.floor(this.options.touchStartThreshold/(window.devicePixelRatio||1))&&this._cancelStart()},_cancelStart:function(){clearTimeout(U),f(this.el.ownerDocument,"touchmove",this._delayMoveHandler),f(this.el.ownerDocument,"mousemove",this._delayMoveHandler),f(this.el.ownerDocument,"mouseup",this._cancelStart),f(this.el.ownerDocument,"touchend",this._cancelStart),f(this.el.ownerDocument,"touchcancel",this._cancelStart),f(document,"selectstart",D),l&&E(document.body,"user-select","")},_onStart:function(t,e){var n=b(B);V=this.el,G=this.el,$=n,J=n,Q=n,tt=B,A=this.el,R=B.cloneNode(!0),L=B.parentNode,Z=this.options.group.pull,it.clone=R,it.active=this,it.dragged=B,x(B,this.options.chosenClass,!0),this.multiplayer.onChoose(),_({sortable:this,name:"onChoose",params:this._getParams(e)}),d(Y,t?"touchmove":"mousemove",this._nearestSortable);try{document.selection?setTimeout((function(){return document.selection.empty()}),0):window.getSelection().removeAllRanges()}catch(t){}},_onStarted:function(){x(R,this.options.chosenClass,!0),this._appendGhost(),this.multiplayer.onDrag(this),_({sortable:this,name:"onDrag",params:this._getParams(H.original)}),E(B,"display","none"),x(B,this.options.chosenClass,!1),B.parentNode.insertBefore(R,B)},_getGhostElement:function(){var t=this.options.customGhost;if("function"==typeof t){var e=this.multiplayer.selectedElements;return t(e.length?e:[B])}return this.multiplayer.getGhostElement()||B},_appendGhost:function(){if(!F){var t=this.options.fallbackOnBody?document.body:this.el,n=this._getGhostElement();x(F=n.cloneNode(!0),this.options.ghostClass,!0);var i,o=m(B),r=e({position:"fixed",top:o.top,left:o.left,width:o.width,height:o.height,minWidth:o.width,minHeight:o.height,opacity:"0.8",overflow:"hidden","z-index":"100000","box-sizing":"border-box","pointer-events":"none"},this.options.ghostStyle);for(var s in r)E(F,s,r[s]);i="none",F.style["".concat(c.css,"transition")]=i?"none"===i?"none":"".concat(i):"",h(F,"translate3d(0px, 0px, 0px)"),it.ghost=F,t.appendChild(F);var l=(H.clientX-o.left)/parseInt(F.style.width)*100,a=(H.clientY-o.top)/parseInt(F.style.height)*100;E(F,"transform-origin","".concat(l,"% ").concat(a,"%")),E(F,"transform","translateZ(0)"),E(F,"will-change","transform")}},_nearestSortable:function(t){D(t);var e=t.touches&&t.touches[0]||t;if(B&&function(t){var e=K||H;return!(void 0!==t.clientX&&void 0!==t.clientY&&Math.abs(t.clientX-e.clientX)<=0&&Math.abs(t.clientY-e.clientY)<=0)}(e)){!K&&this._onStarted();var n=this.options.lockAxis,i="x"===n?H.clientX:e.clientX,o="y"===n?H.clientY:e.clientY,r=document.elementFromPoint(i,o),s=i-H.clientX,l=o-H.clientY;if(K={original:t,clientX:i,clientY:o},h(F,"translate3d(".concat(s,"px, ").concat(l,"px, 0)")),this.options.autoScroll){var a=function(t,e){if(!t||!t.getBoundingClientRect)return p();var n=t,i=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=E(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 p();if(i||e)return n;i=!0}}}while(n=n.parentNode);return p()}(r,!0);this.autoScroller.update(a,H,K)}var c,u,d,f=(c=i,u=o,et.some((function(t){var e=t[C].options.emptyInsertThreshold;if(null!=e){var n=m(t),i=c>=n.left-e&&c<=n.right+e,o=u>=n.top-e&&u<=n.bottom+e;return i&&o?d=t:void 0}})),d);f&&f[C]._onMove(t,r)}},_allowPut:function(){if(A===this.el)return!0;if(this.options.group.put){var t=this.options.group,e=t.name,n=t.put,i=A[C].options.group;return n.join&&n.indexOf(i.name)>-1||i.name&&e&&i.name===e}return!1},_getDirection:function(){var t=this.options,e=t.draggable,n=t.direction;return n?"function"==typeof n?n.call(K.original,B,this):n:w(L,e)},_allowSwap:function(){var t=m(j),e="vertical"===this._getDirection(),n=e?"top":"left",i=e?"bottom":"right",o=j[e?"offsetHeight":"offsetWidth"],r=e?K.clientY:K.clientX,s=r>=t[n]&&r<t[i]-o/2?-1:1,l=S(L,0,this.options.draggable),a=y(L),c=m(l),u=m(a);if(j===L||v(L,j))return R===l&&r<c[n]?(P=j,!0):R===a&&r>u[i]&&(P=j.nextSibling,!0);var h=T(R,j);return P=h<0?j.nextSibling:j,W!==j?(X=s,!0):X!==s&&(X=s,s<0?h>0:h<0)},_onMove:function(t,e){if(this._allowPut()){if(_({sortable:this,name:"onMove",params:this._getParams(t)}),this.el!==G&&(e===this.el||!y(this.el)))return j=W=null,void this._onInsert(t);(j=g(e,this.options.draggable,this.el))&&!j.animated&&this._allowSwap()&&(j!==R&&P!==R?(this.el!==G?this._onInsert(t):j!==B&&this._onChange(t),W=j):W=j)}},_onInsert:function(t){var e=j||R,n="clone"===Z&&this.el!==A&&G===A,i="clone"===Z&&this.el===A&&G!==A;V=this.el,$=b(R),tt=e,L=j?j.parentNode:this.el,G[C].animator.collect(R.parentNode),this.animator.collect(L),n&&(E(B,"display",""),A[C].multiplayer.toggleVisible(!0),A[C].options.group.revertDrag||G.insertBefore(B,R)),i&&($=b(B),E(B,"display","none"),this.multiplayer.toggleVisible(!1)),j?L.insertBefore(R,X<0?j:j.nextSibling):L.appendChild(R),J=b(R),n&&A[C].options.group.revertDrag&&_({sortable:A[C],name:"onChange",params:this._getParams(t,{to:A,target:B,newIndex:Q,revertDrag:!0})}),n||_({sortable:G[C],name:"onRemove",params:this._getParams(t)}),i&&j!==B&&_({sortable:this,name:"onChange",params:this._getParams(t,{from:A,backToOrigin:!0})}),i||_({sortable:this,name:"onAdd",params:this._getParams(t)}),G[C].animator.animate(),this.animator.animate(),G=this.el},_onChange:function(t){L=j.parentNode,$=b(R),tt=j,this.animator.collect(L),L.insertBefore(R,P),J=b(R),_({sortable:this,name:"onChange",params:this._getParams(t)}),this.animator.animate(),G=this.el},_onDrop:function(t){D(t),this._cancelStart(),f(Y,"touchmove",this._nearestSortable),f(Y,"mousemove",this._nearestSortable),f(Y,"mouseup",this._onDrop),f(Y,"touchend",this._onDrop),f(Y,"touchcancel",this._onDrop),x(B,this.options.chosenClass,!1),A&&(G=A,$=Q,tt===R&&(tt=B),this.multiplayer.toggleClass(!1),_({sortable:this,name:"onUnchoose",params:this._getParams(t)}),K&&this._onEnd(t));var e=this.options,n=e.multiple,i=e.selectHandle;if(n&&(i&&q||!i&&!A)){var o=t.changedTouches?t.changedTouches[0]:t,r=o.clientX-H.clientX,s=o.clientY-H.clientY,l=Math.sqrt(r*r+s*s);l>=0&&l<=1&&this.multiplayer.onSelect(t,B,this)}F&&F.parentNode&&F.parentNode.removeChild(F),this.multiplayer.destroy(),this.autoScroller.destroy(),this._nulling()},_onEnd:function(t){var e=this._getParams(t);this.multiplayer.onDrop(G,V,Z);var n=this.options.swapOnDrop;"clone"===Z&&G!==V||!("function"==typeof n?n(e):n)||L.insertBefore(B,R),"clone"!==Z||G===V||this.multiplayer.active()?R&&R.parentNode&&R.parentNode.removeChild(R):x(R,this.options.chosenClass,!1),E(B,"display",""),G!==V&&_({sortable:G[C],name:"onDrop",params:e}),_({sortable:V[C],name:"onDrop",params:e})},_getParams:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i={};return i.event=t,i.to=V,i.from=G,i.node=B,i.clone=R,i.target=tt,i.oldIndex=$,i.newIndex=J,i.pullMode=Z,this.multiplayer.setParams(i),e(i,n),i.relative=i.target===B?0:T(i.target,R),i},_nulling:function(){V=G=A=B=j=P=R=F=L=Z=$=J=Q=H=K=tt=W=Y=X=U=q=it.clone=it.ghost=it.active=it.dragged=null},destroy:function(){this._cancelStart(),this._nulling(),f(this.el,"touchstart",this._onDrag),f(this.el,"mousedown",this._onDrag),et.splice(et.indexOf(this.el),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&&nt(this.options)},select:function(t){this.multiplayer.select(t)},deselect:function(t){this.multiplayer.deselect(t)},getSelectedElements:function(){return this.multiplayer.selectedElements}},it.utils={on:d,off:f,css:E,index:b,closest:g,getRect:m,toggleClass:x,detectDirection:w},it.get=function(t){return t[C]},it.create=function(t,e){return new it(t,e)},it}()}(s);var l=s.exports,a={dataSource:{},modelValue:{},dataKey:{type:String,default:"",required:!0},draggable:{type:[String]},handle:{type:[Function,String]},group:{type:[Object,String]},scroller:{type:[Document,HTMLElement]},lockAxis:{type:String,default:""},direction:{type:String,default:"vertical"},keeps:{type:Number,default:30},size:{type:Number},debounceTime:{type:Number,default:0},throttleTime:{type:Number,default:0},animation:{type:Number,default:150},autoScroll:{type:Boolean,default:!0},scrollThreshold:{type:Number,default:55},keepOffset:{type:Boolean,default:!1},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"},itemTag:{type:String,default:"div"},wrapClass:{type:String,default:""},wrapStyle:{type:Object,default:function(){return{}}},itemStyle:{type:Object,default:function(){return{}}},itemClass:{type:String,default:""},ghostClass:{type:String,default:""},ghostStyle:{type:Object,default:function(){return{}}},chosenClass:{type:String,default:""}},c={tag:{type:String,default:"div"},dataKey:{type:[String,Number]},sizeKey:{type:String}},u=function(e,n,i){var o=null,r=function(){i("resize",n.value?n.value[e.sizeKey]:0,e.dataKey)};t.onMounted((function(){"undefined"!=typeof ResizeObserver&&(o=new ResizeObserver((function(){r()})),n.value&&o.observe(n.value))})),t.onUpdated((function(){r()})),t.onUnmounted((function(){o&&(o.disconnect(),o=null)}))},h=t.defineComponent({name:"VirtualDraglistItems",props:c,emits:["resize"],setup:function(e,n){var i=n.emit,o=n.slots,r=t.ref(null);return u(e,r,i),function(){var n=e.tag,i=e.dataKey;return t.h(n,{ref:r,key:i,"data-key":i},{default:function(){var t;return null===(t=o.default)||void 0===t?void 0:t.call(o)}})}}});function d(t,e){var n=null,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=void 0,t.apply(i,r)}),e))};return i.cancel=function(){n&&(clearTimeout(n),n=null)},i}function f(t,e){return(Array.isArray(e)?e:e.replace(/\[/g,".").replace(/\]/g,".").split(".")).reduce((function(t,e){return(t||{})[e]}),t)}var p,m,g,v,y=["delay","group","handle","lockAxis","disabled","draggable","animation","autoScroll","ghostClass","ghostStyle","chosenClass","fallbackOnBody","scrollThreshold","delayOnTouchOnly"];function b(t,e){this.el=t,this.options=e,this.list=[],this.store={},this.reRendered=!1,this.init()}b.prototype={constructor:b,destroy:function(){this.sortable&&this.sortable.destroy(),this.sortable=this.store=this.reRendered=null},option:function(t,e){"list"===t?this.list=o(e):this.sortable.option(t,e)},init:function(){var t=this,e=y.reduce((function(e,n){return e[n]=t.options[n],e}),{});this.sortable=new l(this.el,n(n({},e),{},{swapOnDrop:function(t){return t.from===t.to},onDrag:function(e){return t.onDrag(e)},onAdd:function(e){return t.onAdd(e)},onRemove:function(e){return t.onRemove(e)},onChange:function(e){return t.onChange(e)},onDrop:function(e){return t.onDrop(e)}})),this.list=o(this.options.list)},onDrag:function(t){var e=t.node.dataset.key,n=this.getIndex(this.list,e),i=this.list[n];this.store={item:i,key:e,start:{index:n,list:this.list},from:{index:n,list:this.list},to:{index:n,list:this.list}},this.sortable.option("store",this.store),this.dispatchEvent("onDrag",{item:i,key:e,index:n})},onRemove:function(t){var e=t.node.dataset.key,n=this.getIndex(this.list,e),i=this.list[n];this.list.splice(n,1),Object.assign(this.store,{key:e,item:i}),this.sortable.option("store",this.store),this.dispatchEvent("onRemove",{item:i,key:e,index:n})},onAdd:function(t){var e=t.from,n=t.target,i=t.relative,o=l.get(e).option("store"),r=o.key,s=o.item,a=this.getIndex(this.list,n.dataset.key);0===i?a=this.list.length:-1===i&&(a+=1),this.list.splice(a,0,s),Object.assign(this.store,{to:{index:a,list:this.list}}),this.sortable.option("store",this.store),this.dispatchEvent("onAdd",{item:s,key:r,index:a})},onChange:function(t){var e=l.get(t.from).option("store");if(t.revertDrag)return this.list=o(this.options.list),void Object.assign(this.store,{from:e.start});var n=t.node,i=t.target,r=t.relative,s=t.backToOrigin,a=this.getIndex(this.list,n.dataset.key),c=this.list[a],u=this.getIndex(this.list,i.dataset.key);s&&(1===r&&e.from.index<u&&(u-=1),-1===r&&e.from.index>u&&(u+=1)),this.list.splice(a,1),this.list.splice(u,0,c),Object.assign(this.store,{from:{index:u,list:this.list},to:{index:u,list:this.list}})},onDrop:function(t){var e,n,i=l.get(t.from).option("store"),o=i.start,r=i.item,s=i.key,a=l.get(t.to).option("store").to,c=t.from!==t.to||o.index!==a.index;(this.dispatchEvent("onDrop",{changed:c,list:this.list,item:r,key:s,from:o,to:a}),t.from===this.el&&this.reRendered)&&(null===(e=l.dragged)||void 0===e||e.remove());t.from!==t.to&&"clone"===t.pullMode&&(null===(n=l.clone)||void 0===n||n.remove());this.reRendered=!1},getIndex:function(t,e){for(var n=0;n<t.length;n++)if(f(t[n],this.options.dataKey)==e)return n;return-1},dispatchEvent:function(t,e){var n=this.options[t];n&&n(e)}};var S=["size","keeps","scroller","direction","debounceTime","throttleTime"],w="INIT",x="FIXED",O="DYNAMIC",E="FRONT",T="BEHIND",D="STATIONARY",_="horizontal",I="vertical",z=(i(p={},I,"top"),i(p,_,"left"),p),C=(i(m={},I,"scrollTop"),i(m,_,"scrollLeft"),m),k=(i(g={},I,"scrollHeight"),i(g,_,"scrollWidth"),g),M=(i(v={},I,"offsetHeight"),i(v,_,"offsetWidth"),v);function N(t){this.options=t;var e={size:0,keeps:0,buffer:0,wrapper:null,scroller:null,direction:"vertical",uniqueKeys:[],debounceTime:null,throttleTime:null};for(var n in e)!(n in this.options)&&(this.options[n]=e[n]);this.sizes=new Map,this.range={start:0,end:0,front:0,behind:0},this.offset=0,this.calcType=w,this.calcSize={average:0,total:0,fixed:0},this.scrollEl=this.getScrollElement(t.scroller),this.scrollDir="",this.updateOnScrollFunction(),this.addScrollEventListener(),this.checkIfUpdate(0,t.keeps-1)}N.prototype={constructor:N,isFront:function(){return this.scrollDir===E},isBehind:function(){return this.scrollDir===T},isFixed:function(){return this.calcType===x},getSize:function(t){return this.sizes.get(t)||this.getItemSize()},getOffset:function(){return this.scrollEl[C[this.options.direction]]},getScrollSize:function(){return this.scrollEl[k[this.options.direction]]},getClientSize:function(){return this.scrollEl[M[this.options.direction]]},scrollToOffset:function(t){this.scrollEl[C[this.options.direction]]=t},scrollToIndex:function(t){if(t>=this.options.uniqueKeys.length-1)this.scrollToBottom();else{var e=this.getOffsetByIndex(t),n=this.getScrollStartOffset();this.scrollToOffset(e+n)}},scrollToBottom: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)},option: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&&l.utils.off(i,"scroll",this.onScroll),this.scrollEl=this.getScrollElement(e),this.addScrollEventListener())},updateRange:function(t){if(t)this.handleUpdate(t.start,t.end);else{var e=this.range.start;e=Math.max(e,0),this.handleUpdate(e,this.getEndByStart(e))}},onItemResized:function(t,e){this.sizes.set(t,e),this.calcType===w?(this.calcType=x,this.calcSize.fixed=e):this.isFixed()&&this.calcSize.fixed!==e&&(this.calcType=O,this.calcSize.fixed=void 0),this.calcType!==x&&(this.calcSize.total=o(this.sizes.values()).reduce((function(t,e){return t+e}),0),this.calcSize.average=Math.round(this.calcSize.total/this.sizes.size))},addScrollEventListener:function(){this.options.scroller&&l.utils.on(this.options.scroller,"scroll",this.onScroll)},removeScrollEventListener:function(){this.options.scroller&&l.utils.off(this.options.scroller,"scroll",this.onScroll)},updateOnScrollFunction:function(){var t,e,n=this,i=this.options,o=i.debounceTime,r=i.throttleTime;this.onScroll=o?(t=d((function(){return n.handleScroll()}),o),e=function(){t.cancel(),t.apply(this,arguments)},e.cancel=function(){t.cancel()},e):r?d((function(){return n.handleScroll()}),r):function(){return n.handleScroll()}},handleScroll:function(){var t=this.getOffset(),e=this.getClientSize(),n=this.getScrollSize();t===this.offset?this.scrollDir=D:this.scrollDir=t<this.offset?E:T,this.offset=t;var i=this.isFront()&&t<=0,o=this.isBehind()&&e+t>=n;this.options.onScroll({top:i,bottom:o,offset:t,direction:this.scrollDir}),this.isFront()?this.handleScrollFront():this.isBehind()&&this.handleScrollBehind()},handleScrollFront: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))}},handleScrollBehind:function(){var t=this.getScrollItems();t<this.range.start+this.options.buffer||this.checkIfUpdate(t,this.getEndByStart(t))},getScrollItems:function(){var t=this.offset-this.getScrollStartOffset();if(t<=0)return 0;if(this.isFixed())return Math.floor(t/this.calcSize.fixed);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.getOffsetByIndex(i))===t)return i;o<t?e=i+1:o>t&&(n=i-1)}return e>0?--e:0},checkIfUpdate:function(t,e){var n=this.options.keeps;this.options.uniqueKeys.length<=n?(t=0,e=this.getLastIndex()):e-t<n-1&&(t=e-n+1),this.range.start!==t&&this.handleUpdate(t,e)},handleUpdate:function(t,e){this.range.start=t,this.range.end=e,this.range.front=this.getFrontOffset(),this.range.behind=this.getBehindOffset(),this.options.onUpdate(n({},this.range))},getFrontOffset:function(){return this.isFixed()?this.calcSize.fixed*this.range.start:this.getOffsetByIndex(this.range.start)},getBehindOffset:function(){var t=this.range.end,e=this.getLastIndex();return this.isFixed()?(e-t)*this.calcSize.fixed:(e-t)*this.getItemSize()},getOffsetByIndex:function(t){if(!t)return 0;for(var e=0,n=0;n<t;n++){var i=this.sizes.get(this.options.uniqueKeys[n]);e+="number"==typeof i?i:this.getItemSize()}return e},getEndByStart:function(t){return Math.min(t+this.options.keeps-1,this.getLastIndex())},getLastIndex:function(){var t=this.options,e=t.uniqueKeys,n=t.keeps;return e.length>0?e.length-1:n-1},getItemSize:function(){return this.isFixed()?this.calcSize.fixed:this.calcSize.average||this.options.size},getScrollElement:function(t){return t instanceof Document&&9===t.nodeType||t instanceof Window?document.scrollingElement||document.documentElement||document.body:t},getScrollStartOffset:function(){var t=0,e=this.options,n=e.wrapper,i=e.scroller;if(n&&n){var o=l.utils.getRect(n,!0,i);t=this.offset+o[z[this.options.direction]]}return t}};return t.defineComponent({props:a,emits:["update:dataSource","update:modelValue","top","bottom","drag","drop","add","remove"],setup:function(e,n){var i,r,s=this,a=n.emit,c=n.slots,u=n.expose,p=t.ref({start:0,end:e.keeps,front:0,behind:0}),m=t.ref(null),g=t.ref(null),v=t.ref([]),w=t.ref([]),x=t.computed((function(){return"vertical"!==e.direction})),O=t.computed((function(){return"vertical"!==e.direction?"offsetWidth":"offsetHeight"})),E=t.computed((function(){return S.reduce((function(t,n){return t[n]=e[n],t}),{})})),T=t.computed((function(){return y.reduce((function(t,e){return t[e]=s[e],t}),{})})),D=0;function _(){return r.getOffset()}function I(){return r.getClientSize()}function z(){return r.getScrollSize()}function C(t){r.scrollToOffset(t)}function k(t){r.scrollToIndex(t)}u({getSize:function(t){return r.getSize(t)},getOffset:_,getClientSize:I,getScrollSize:z,scrollToTop:function(){C(0)},scrollToBottom:function(){r.scrollToBottom()},scrollToKey:function(t){var e=w.value.indexOf(t);e>-1&&r.scrollToIndex(e)},scrollToIndex:k,scrollToOffset:C}),t.watch((function(){return[e.dataSource,e.modelValue]}),(function(){M()}),{deep:!0}),t.watch((function(){return E}),(function(t,e){if(r)for(var n in t)t[n]!=e[n]&&r.option(n,t[n])})),t.watch((function(){return T}),(function(t,e){if(r)for(var n in t)t[n]!=e[n]&&i.option(n,t[n])})),t.onBeforeMount((function(){B(),M()})),t.onActivated((function(){r&&C(r.offset),r.addScrollEventListener()})),t.onDeactivated((function(){r.removeScrollEventListener()})),t.onMounted((function(){r.option("wrapper",g.value),e.scroller||r.option("scroller",m.value)})),t.onUnmounted((function(){i&&i.destroy(),r.removeScrollEventListener()}));var M=function(){var n,r=(n=e.modelValue||e.dataSource,t.isRef(n)?n.value:n);if(r){var s=o(v.value);if(v.value=r,A(),P(s,r),i?i.option("list",r):t.nextTick((function(){return j()})),D&&e.keepOffset){var l=r.length-D;l>0&&k(l),D=0}}},A=function(){w.value=v.value.map((function(t){return f(t,e.dataKey)})),r.option("uniqueKeys",w.value)},B=function(){r=new N({size:e.size,keeps:e.keeps,buffer:Math.round(e.keeps/3),scroller:e.scroller,direction:e.direction,uniqueKeys:w.value,debounceTime:e.debounceTime,throttleTime:e.throttleTime,onScroll:function(t){D=0,v.value.length&&t.top?F():t.bottom&&L()},onUpdate:function(t){l.dragged&&i&&t.start!==p.value.start&&(i.reRendered=!0),p.value=t}})},j=function(){i=new b(g.value,Object.assign(Object.assign({list:v.value},e),{onDrag:function(t){a("drag",t)},onAdd:function(t){a("add",t)},onRemove:function(t){a("remove",t)},onDrop:function(t){t.changed&&(a("update:dataSource",t.list),a("update:modelValue",t.list)),a("drop",t)}}))},P=function(t,n){var i=Object.assign({},p.value);n.length>t.length&&i.end===t.length-1&&R()&&(i.end++,i.start=Math.max(0,i.end-e.keeps)),r.updateRange(i)},R=function(){return _()+I()+1>=z()},F=d((function(){a("top"),D=v.value.length}),50),L=d((function(){a("bottom")}),50),H=function(t,e){var n=r.sizes.size;r.onItemResized(e,t),0===n&&P(v.value,v.value)},K=function(){for(var n=[],i=p.value,o=i.start,r=i.end,s=function(i){var o=v.value[i];if(o){var r=f(o,e.dataKey),s=Object.assign(Object.assign({},e.itemStyle),function(t){var e;return t==(null===(e=l.dragged)||void 0===e?void 0:e.dataset.key)?{display:"none"}:{}}(r));n.push(c.item?t.h(h,{key:r,tag:e.itemTag,class:e.itemClass,style:s,dataKey:r,sizeKey:O.value,onResize:H},{default:function(){var t;return null===(t=c.item)||void 0===t?void 0:t.call(c,{record:o,index:i,dataKey:r})}}):null)}},a=o;a<=r;a++)s(a);return n};return function(){var n=p.value,i=n.front,o=n.behind,r=e.rootTag,s=e.wrapTag,l=e.scroller,a=e.wrapClass,u=e.wrapStyle,h=x.value?"0px ".concat(o,"px 0px ").concat(i,"px"):"".concat(i,"px 0px ").concat(o,"px");return t.h(r,{ref:m,style:!l&&{overflow:x.value?"auto hidden":"hidden auto"}},{default:function(){var e,n;return[null===(e=c.header)||void 0===e?void 0:e.call(c),t.h(s,{ref:g,class:a,style:Object.assign(Object.assign({},u),{padding:h})},{default:function(){return K()}}),null===(n=c.footer)||void 0===n?void 0:n.call(c)]}})}}})}));

8

package.json
{
"name": "vue-virtual-draglist",
"version": "3.2.1",
"version": "3.2.2",
"description": "A virtual scrolling list component that can be sorted by dragging, support vue3",

@@ -43,3 +43,3 @@ "main": "dist/virtual-drag-list.min.js",

"dependencies": {
"sortable-dnd": "0.6.3"
"sortable-dnd": "0.6.6"
},

@@ -53,2 +53,3 @@ "devDependencies": {

"@rollup/plugin-node-resolve": "^13.3.0",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^8.3.3",

@@ -59,4 +60,3 @@ "cross-env": "^7.0.3",

"rollup": "^2.56.2",
"rollup-plugin-dts": "^5.3.0",
"rollup-plugin-uglify": "^6.0.4",
"rollup-plugin-dts": "^4.2.3",
"typescript": "^4.3.5",

@@ -63,0 +63,0 @@ "vue": "^3.2.2"

@@ -22,3 +22,2 @@ # vue-virtual-draglist

<!--
:dataSource="items"
:handle="'i'" // use tagName

@@ -29,3 +28,3 @@ :handle="'.drag'" // use class

<VirtualList
v-model:dataSource="items"
v-model="items"
:dataKey="'id'"

@@ -79,2 +78,3 @@ :handle="'#drag'"

| `data-source` | Array/Ref | The data that needs to be rendered |
| `v-model` | Array/Ref | Choose between `data-source` and `v-model`(recommend) |

@@ -92,4 +92,5 @@ ### Optional props

| `keepOffset` | `Boolean` | `false` | When scrolling up to load data, keep the same offset as the previous scroll |
| `direction` | `String` | `vertical` | `vertical/horizontal`, scroll direction |
| `scroller` | `HTMLElement` | `false` | Virtual list scrolling element |
| `direction` | `vertical \| horizontal` | `vertical` | Scroll direction |
| `scroller` | `Document \| HTMLElement` | `-` | Virtual list scrolling element |
| `lockAxis` | `x \| y` | `-` | Axis on which dragging will be locked |
| `debounceTime`| `Number` | `0` | scroll debounce time |

@@ -114,6 +115,2 @@ | `throttleTime`| `Number` | `0` | scroll throttle time |

| `itemTag` | `String` | `div` | Label type for list item element |
| `headerTag` | `String` | `div` | Label type for header slot element |
| `headerStyle`| `Object` | `{}` | header slot style |
| `footerTag` | `String` | `div` | Label type for footer slot element |
| `footerStyle`| `Object` | `{}` | footer slot style |
| `wrapClass` | `String` | `''` | List wrapper element class |

@@ -120,0 +117,0 @@ | `wrapStyle` | `Object` | `{}` | List wrapper element style |

import * as vue from 'vue';
declare const VirtualDragList: vue.DefineComponent<{
dataSource: {
default: never[];
required: boolean;
};
dataSource: {};
modelValue: {};
dataKey: {

@@ -22,3 +20,15 @@ type: StringConstructor;

};
scroller: {};
scroller: {
type: ({
new (): Document;
prototype: Document;
} | {
new (): HTMLElement;
prototype: HTMLElement;
})[];
};
lockAxis: {
type: vue.PropType<"x" | "y">;
default: string;
};
direction: {

@@ -83,10 +93,2 @@ type: vue.PropType<"vertical" | "horizontal">;

};
headerTag: {
type: StringConstructor;
default: string;
};
footerTag: {
type: StringConstructor;
default: string;
};
itemTag: {

@@ -124,17 +126,7 @@ type: StringConstructor;

};
headerStyle: {
type: ObjectConstructor;
default: () => {};
};
footerStyle: {
type: ObjectConstructor;
default: () => {};
};
}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
[key: string]: any;
}>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("update:dataSource" | "top" | "bottom" | "drag" | "drop" | "add" | "remove")[], "update:dataSource" | "top" | "bottom" | "drag" | "drop" | "add" | "remove", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
dataSource: {
default: never[];
required: boolean;
};
}>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("update:dataSource" | "update:modelValue" | "top" | "bottom" | "drag" | "drop" | "add" | "remove")[], "update:dataSource" | "update:modelValue" | "top" | "bottom" | "drag" | "drop" | "add" | "remove", vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
dataSource: {};
modelValue: {};
dataKey: {

@@ -154,3 +146,15 @@ type: StringConstructor;

};
scroller: {};
scroller: {
type: ({
new (): Document;
prototype: Document;
} | {
new (): HTMLElement;
prototype: HTMLElement;
})[];
};
lockAxis: {
type: vue.PropType<"x" | "y">;
default: string;
};
direction: {

@@ -215,10 +219,2 @@ type: vue.PropType<"vertical" | "horizontal">;

};
headerTag: {
type: StringConstructor;
default: string;
};
footerTag: {
type: StringConstructor;
default: string;
};
itemTag: {

@@ -256,12 +252,5 @@ type: StringConstructor;

};
headerStyle: {
type: ObjectConstructor;
default: () => {};
};
footerStyle: {
type: ObjectConstructor;
default: () => {};
};
}>> & {
"onUpdate:dataSource"?: ((...args: any[]) => any) | undefined;
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
onTop?: ((...args: any[]) => any) | undefined;

@@ -274,4 +263,4 @@ onBottom?: ((...args: any[]) => any) | undefined;

}, {
dataSource: never[];
dataKey: string;
lockAxis: "x" | "y";
direction: "vertical" | "horizontal";

@@ -291,4 +280,2 @@ keeps: number;

wrapTag: string;
headerTag: string;
footerTag: string;
itemTag: string;

@@ -302,6 +289,4 @@ wrapClass: string;

chosenClass: string;
headerStyle: Record<string, any>;
footerStyle: Record<string, any>;
}>;
export { VirtualDragList as default };

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