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

vue-dndrop

Package Overview
Dependencies
Maintainers
2
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-dndrop - npm Package Compare versions

Comparing version 1.2.6 to 1.2.7

2

dist/vue-dndrop.min.js

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).VueDndrop={})}(this,function(e){"use strict";var M="dndrop-container-instance",v="dndrop-draggable-wrapper",F="animated",u="__smooth_dnd_draggable_translation_value",a="__smooth_dnd_draggable_visibility_value",f="dndrop-ghost",y="dndrop-container",j="dndrop-stretcher-element",d="dndrop-stretcher-instance",_="dndrop-disable-touch-action",V="dndrop-no-user-select",X="dndrop-drop-preview-default-class",k="dndrop-drop-preview-inner-class",Y="dndrop-drop-preview-constant-class",H="dndrop-drop-preview-flex-container-class",b={groupName:void 0,behaviour:"move",orientation:"vertical",getChildPayload:void 0,animationDuration:250,autoScrollEnabled:!0,shouldAcceptDrop:void 0,shouldAnimateDrop:void 0};function G(e){e.element;var l=e.draggables;return function(e,t){var n,o=e.removedIndex,i=e.addedIndex,r=e.element,a=null;null!==o&&(a=r.removeChild(r.children[o]),l.splice(o,1)),null!==i&&((o=window.document.createElement("div")).className="dndrop-draggable-wrapper",o.appendChild(a&&a.firstElementChild?a.firstElementChild:r),a=o,(n=i)>=(r=r).children.length?r.appendChild(a):r.insertBefore(a,r.children[n]),i>=l.length?l.push(o):l.splice(i,0,o)),t&&t(e)}}function $(e,t){var n=(e=window.getComputedStyle(e)).overflow,e=e["overflow-"+t];return"auto"===n||"scroll"===n||("auto"===e||"scroll"===e)}function W(e,t){for(var n=e,o=t||J(e),n=e.parentElement;n;)l(n,"x")&&i(n,"x")&&(o=U(o,n.getBoundingClientRect(),"x")),l(n,"y")&&i(n,"y")&&(o=U(o,n.getBoundingClientRect(),"y")),n=n.parentElement;return o}function q(e,t){return-1<e.className.split(" ").map(function(e){return e}).indexOf(t)}var r={x:"x",y:"y",xy:"xy"},U=function(e,t,n){return"x"===n?{left:Math.max(e.left,t.left),top:e.top,right:Math.min(e.right,t.right),bottom:e.bottom}:{left:e.left,top:Math.max(e.top,t.top),right:e.right,bottom:Math.min(e.bottom,t.bottom)}},J=function(e){var t,n=e.getBoundingClientRect(),n={left:n.left,right:n.right,top:n.top,bottom:n.bottom};return l(e,"x")&&!i(e,"x")&&(t=n.right-n.left,n.right=n.right+e.scrollWidth-t),l(e,"y")&&!i(e,"y")&&(t=n.bottom-n.top,n.bottom=n.bottom+e.scrollHeight-t),n},i=function(e,t){var e=window.getComputedStyle(e),n=e.overflow,e=e["overflow-"+t];return"auto"===n||"scroll"===n||"hidden"===n||("auto"===e||"scroll"===e||"hidden"===e)},l=function(e,t){return"x"===t?e.scrollWidth>e.clientWidth:e.scrollHeight>e.clientHeight},K=function(e,t){for(var n=[],o=e;o;)($(o,"x")||$(o,"y"))&&n.push(o),o=o.parentElement;function i(){n&&(n.forEach(function(e){return e.removeEventListener("scroll",t)}),window.removeEventListener("scroll",t))}return{dispose:function(){i(),n=null},start:function(){n&&(n.forEach(function(e){return e.addEventListener("scroll",t)}),window.addEventListener("scroll",t))},stop:i}},w=function(e,t){for(var n=e;n;){if(n.matches(t))return n;n=n.parentElement}return null},x=function(e,t){var n;e&&-1===(n=e.className.split(" ").filter(function(e){return e})).indexOf(t)&&(n.unshift(t),e.className=n.join(" "))},c=function(e,t){var n;e&&(n=e.className.split(" ").filter(function(e){return e&&e!==t}),e.className=n.join(" "))},Q=function(){window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():window.document.selection&&window.document.selection.empty()},Z=function(e){if(e){e=window.getComputedStyle(e);if(e)return e.cursor}return null};function ee(e){return!(e.bottom<=e.top||e.right<=e.left)}var te={size:"offsetWidth",distanceToParent:"offsetLeft",translate:"transform",begin:"left",end:"right",dragPosition:"x",scrollSize:"scrollWidth",offsetSize:"offsetWidth",scrollValue:"scrollLeft",scale:"scaleX",setSize:"width",setters:{translate:function(e){return"translate3d("+e+"px, 0, 0)"}}},ne={size:"offsetHeight",distanceToParent:"offsetTop",translate:"transform",begin:"top",end:"bottom",dragPosition:"y",scrollSize:"scrollHeight",offsetSize:"offsetHeight",scrollValue:"scrollTop",scale:"scaleY",setSize:"height",setters:{translate:function(e){return"translate3d(0,"+e+"px, 0)"}}};function oe(o){return{get:function(e,t){return e[o[t]||t]},set:function(e,t,n){e[o[t]]=o.setters[t]?o.setters[t](n):n}}}function ie(n,l){n["dndrop-extra-size-for-insertion"]=0;var o=oe("horizontal"===l?te:ne),s={translation:0};function e(){var e,t;i(n),t=(e=n).getBoundingClientRect(),s.scaleX=e.offsetWidth?(t.right-t.left)/e.offsetWidth:1,s.scaleY=e.offsetHeight?(t.bottom-t.top)/e.offsetHeight:1}function i(e){s.rect=J(e);e=W(e,s.rect);ee(e)&&(s.lastVisibleRect=s.visibleRect),s.visibleRect=e}function r(e){var t=e;return t.tagName?(t=t.getBoundingClientRect(),"vertical"===l?t.bottom-t.top:t.right-t.left):o.get(e,"size")*o.get(s,"scale")}function t(e){return o.get(e,"dragPosition")}return window.addEventListener("resize",function(){i(n)}),setTimeout(function(){e()},10),{getSize:r,getContainerRectangles:function(){return{rect:s.rect,visibleRect:s.visibleRect,lastVisibleRect:s.lastVisibleRect}},getBeginEndOfDOMRect:function(e){return{begin:o.get(e,"begin"),end:o.get(e,"end")}},getBeginEndOfContainer:function(){return{begin:o.get(s.rect,"begin")+s.translation,end:o.get(s.rect,"end")+s.translation}},getBeginEndOfContainerVisibleRect:function(){return{begin:o.get(s.visibleRect,"begin")+s.translation,end:o.get(s.visibleRect,"end")+s.translation}},getBeginEnd:function(e){t=e;var t=(o.get(t,"distanceToParent")+(t[u]||0))*o.get(s,"scale")+(o.get(s.rect,"begin")+s.translation)-o.get(n,"scrollValue");return{begin:t,end:t+r(e)*o.get(s,"scale")}},getAxisValue:t,setTranslation:function(e,t){t?o.set(e.style,"translate",t):e.style.removeProperty("transform"),e[u]=t},getTranslation:function(e){return e[u]},setVisibility:function(e,t){void 0!==e[a]&&e[a]===t||(t?e.style.removeProperty("visibility"):e.style.visibility="hidden",e[a]=t)},isVisible:function(e){return void 0===e[a]||e[a]},isInVisibleRect:function(e,t){var n=s.visibleRect,o=n.left,i=n.top,r=n.right,a=((n=n.bottom)-i<2&&(n=i+30),s.rect);return"vertical"===l?e>a.left&&e<a.right&&i<t&&t<n:o<e&&e<r&&t>a.top&&t<a.bottom},setSize:function(e,t){o.set(e,"setSize",t)},getTopLeftOfElementBegin:function(e){var t=0;return{top:"horizontal"===l?(t=e,s.rect.top):(t=s.rect.left,e),left:t}},getScrollSize:function(e){return o.get(e,"scrollSize")},getScrollValue:function(e){return o.get(e,"scrollValue")},setScrollValue:function(e,t){return o.set(e,"scrollValue",t)},invalidate:e,invalidateRects:function(){i(n)},getPosition:t,setBegin:function(e,t){o.set(e,"begin",t)}}}var re="x",ae="y",le="xy";function se(e,t,n){var o,i,r=n.left,a=n.right,l=n.top,n=n.bottom,s=e.x,e=e.y;if(s<r||a<s||e<l||n<e)return null;t="x"===t?(o=r,i=a,s):(o=l,i=n,e),r=i-o,a=400<r?100:r/4;return i-t<a?{direction:"end",speedFactor:(a-(i-t))/a}:t-o<a?{direction:"begin",speedFactor:(a-(t-o))/a}:null}function ue(e,t,n){e&&(e!==window?"x"===t?e.scrollLeft+=n:e.scrollTop+=n:"x"===t?e.scrollBy(n,0):e.scrollBy(0,n))}function s(o,i){void 0===i&&(i="y");var r=null,a=null,l=null,s=null;return{animate:function(e,t){l=e,s=t,function n(){null===r&&(r=requestAnimationFrame(function(e){var t=e-(a=null===a?e:a),e=(a=e,t/1e3*s);ue(o,i,e="begin"===l?0-e:e),r=null,n()}))}()},stop:function(){null!==r&&(cancelAnimationFrame(r),r=null),a=null}}}function de(e){for(var t=[],n=e.element;n;){var o=function(e){var e=window.getComputedStyle(e),t=e.overflow;if("auto"===t||"scroll"===t)return r.xy;t=e["overflow-x"],t="auto"===t||"scroll"===t,e=e["overflow-y"],e="auto"===e||"scroll"===e;return t&&e?r.xy:t?r.x:e?r.y:null}(n);if(o&&!q(n,"dndrop-prevent-auto-scroll-class")){var i={};switch(o){case le:i.x={animator:s(n,"x")},i.y={animator:s(n,"y")};break;case re:i.x={animator:s(n,"x")};break;case ae:i.y={animator:s(n,"y")}}t.push({axisAnimations:i,getRect:function(e){return function(){return W(e,e.getBoundingClientRect())}}(n),scrollerElement:n})}n=n.parentElement}return t}function ce(e,i){void 0===i&&(i=1500);var r=e.reduce(function(e,t){t=de(t).filter(function(t){return!e.find(function(e){return e.scrollerElement===t.scrollerElement})});return e.concat(t)},[]);return function(e){var t,o,n=e.draggableInfo;e.reset?r.forEach(function(e){e.axisAnimations.x&&e.axisAnimations.x.animator.stop(),e.axisAnimations.y&&e.axisAnimations.y.animator.stop()}):n&&(o=n.mousePosition,r.forEach(function(e){var t=e.axisAnimations,n=(0,e.getRect)();t.x&&(t.x.scrollParams=se(o,"x",n),e.cachedRect=n),t.y&&(t.y.scrollParams=se(o,"y",n),e.cachedRect=n)}),r.forEach(function(e){var t,n,e=e.axisAnimations,o=e.x,e=e.y;o&&(o.scrollParams?(t=(n=o.scrollParams).direction,n=n.speedFactor,o.animator.animate(t,n*i)):o.animator.stop()),e&&(e.scrollParams?(n=(t=e.scrollParams).direction,o=t.speedFactor,e.animator.animate(n,o*i)):e.animator.stop())}),(e=r.filter(function(e){return e.cachedRect})).length&&1<e.length&&((t=function(e,t){for(var n=document.elementFromPoint(t.x,t.y);n;){var o=e.find(function(e){return e.scrollerElement===n});if(o)return o;n=n.parentElement}return null}(e,n.mousePosition))&&e.forEach(function(e){e!==t&&(e.axisAnimations.x&&e.axisAnimations.x.animator.stop(),e.axisAnimations.y&&e.axisAnimations.y.animator.stop())})))}}"undefined"!=typeof window&&((t=Element)&&t.prototype&&!t.prototype.matches&&(t.prototype.matches=t.prototype.matchesSelector||t.prototype.mozMatchesSelector||t.prototype.msMatchesSelector||t.prototype.oMatchesSelector||t.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;0<=--n&&t.item(n)!==this;);return-1<n}),Array.prototype.some||(Array.prototype.some=function(e){if(null==this)throw new TypeError("Array.prototype.some called on null or undefined");if("function"!=typeof e)throw new TypeError;for(var t=Object(this),n=t.length>>>0,o=2<=arguments.length?arguments[1]:void 0,i=0;i<n;i++)if(i in t&&e.call(o,t[i],i,t))return!0;return!1}));var t={overflow:"hidden",display:"block"},n={height:"100%",display:"table-cell","vertical-align":"top"},o={};function fe(o){return Object.keys(o).reduce(function(e,t){var n=o[t];return"object"==typeof n?""+e+t+"{"+fe(n)+"}":""+e+t+":"+n+";"},"")}function ge(e){var t,n;return e&&"undefined"!=typeof window?(t=window.document.head||window.document.getElementsByTagName("head")[0],n=window.document.createElement("style"),e=fe({"body *":{cursor:e+" !important"}}),n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(window.document.createTextNode(e)),t.appendChild(n),n):null}o["."+y]={position:"relative","min-height":"30px","min-width":"30px"},o["."+y+".horizontal"]={display:"table"},o["."+y+".horizontal > ."+j]={display:"inline-block"},o["."+y+".horizontal > ."+v]=n,o["."+y+".vertical > ."+v]=t,o["."+v]={"box-sizing":"border-box"},o["."+v+".horizontal"]=n,o["."+v+".vertical"]=t,o["."+v+".animated"]={transition:"transform ease"},o["."+f]={"box-sizing":"border-box"},o["."+f+".animated"]={transition:"all ease-in-out"},o["."+f+" *"]={"pointer-events":"none"},o["."+_+" *"]={"touch-action":"none","-ms-touch-action":"none"},o["."+V]={"-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"},o["."+k]={flex:"1"},o["."+y+".horizontal > ."+Y]={height:"100%",overflow:"hidden",display:"table-cell","vertical-align":"top"},o["."+y+".vertical > ."+Y]={overflow:"hidden",display:"block",width:"100%"},o["."+H]={width:"100%",height:"100%",display:"flex","justify-content":"stretch","align-items":"stretch"},o["."+X]={"background-color":"rgba(150, 150, 150, 0.1)",border:"1px solid #ccc"};var g,p,pe=["mousedown","touchstart"],me=["mousemove","touchmove"],he=["mouseup","touchend"],m=null,h=null,E=null,D=null,O=[],S=!1,ve=!1,C=!1,ye=!1,R=null,A=null,B=null,I=null,be=(g=null,p=!1,{start:function(){p||(p=!0,function e(){g=requestAnimationFrame(function(){m.forEach(function(e){return e.layout.invalidateRects()}),setTimeout(function(){null!==g&&e()},50)})}())},stop:function(){null!==g&&(cancelAnimationFrame(g),g=null),p=!1}}),we="undefined"!=typeof window&&!!(window.navigator.userAgent.match(/Android/i)||window.navigator.userAgent.match(/webOS/i)||window.navigator.userAgent.match(/iPhone/i)||window.navigator.userAgent.match(/iPad/i)||window.navigator.userAgent.match(/iPod/i)||window.navigator.userAgent.match(/BlackBerry/i)||window.navigator.userAgent.match(/Windows Phone/i));function xe(){"undefined"!=typeof window&&pe.forEach(function(e){window.document.addEventListener(e,Me,{passive:!1})})}function Ee(){return D&&D.ghostParent?D.ghostParent:h&&h.parentElement||window.document.body}function De(e,t,n,o){var i=t.x,t=t.y,r=e.getBoundingClientRect(),a=r.left,l=r.top,s=r.right,u=r.bottom,d=(d=n.layout.getContainerRectangles().visibleRect,r=r,{left:Math.max(d.left,r.left),top:Math.max(d.top,r.top),right:Math.min(d.right,r.right),bottom:Math.min(d.bottom,r.bottom)}),r=d.left+(d.right-d.left)/2,d=d.top+(d.bottom-d.top)/2,c=e.cloneNode(!0);return c.style.zIndex="1000",c.style.boxSizing="border-box",c.style.position="fixed",c.style.top="0px",c.style.left="0px",c.style.transform="none",c.style.removeProperty("transform"),n.shouldUseTransformForGhost()?c.style.transform="translate3d("+a+"px, "+l+"px, 0)":(c.style.top=l+"px",c.style.left=a+"px"),c.style.width=s-a+"px",c.style.height=u-l+"px",c.style.overflow="visible",c.style.transition=null,c.style.removeProperty("transition"),c.style.pointerEvents="none",c.style.userSelect="none",n.getOptions().dragClass?setTimeout(function(){x(c.firstElementChild,n.getOptions().dragClass);var e=window.getComputedStyle(c.firstElementChild).cursor;I=ge(e)}):I=ge(o),x(c,n.getOptions().orientation||"vertical"),x(c,f),{ghost:c,centerDelta:{x:r-i,y:d-t},positionDelta:{left:a-i,top:l-t},topLeft:{x:a,y:l}}}function Oe(e){function i(){c(E.ghost,"animated"),E.ghost.style.transitionDuration=null,Ee().removeChild(E.ghost),e()}function t(e,t,n){var o=e.top,e=e.left;x(E.ghost,"animated"),n&&x(E.ghost.firstElementChild,n),E.topLeft.x=e,E.topLeft.y=o,Je(t),setTimeout(function(){i()},t+20)}function n(e,t){x(E.ghost,"animated"),Je(e,.9,!0),setTimeout(function(){t()},e+20)}var o,r,a,l,s;D.targetElement?(o=O.filter(function(e){return e.element===D.targetElement})[0],!(s=o.getOptions()).shouldAnimateDrop||s.shouldAnimateDrop(D.container.getOptions(),D.payload)?t(o.getDragResult().shadowBeginEnd.rect,Math.max(150,o.getOptions().animationDuration/2),o.getOptions().dropClass):i()):(s=O.filter(function(e){return e===D.container})[0])?(r=(o=s.getOptions()).behaviour,l=o.removeOnDropOut,"move"!==r&&"contain"!==r||!ve&&l||!s.getDragResult()?n(s.getOptions().animationDuration,i):!ee((r=s.layout.getContainerRectangles()).visibleRect)&&ee(r.lastVisibleRect)?t({top:r.lastVisibleRect.top,left:r.lastVisibleRect.left},s.getOptions().animationDuration,s.getOptions().dropClass):(r=(l=s.getDragResult()).removedIndex,l=l.elementSize,a=s.layout,s.getTranslateCalculator({dragResult:{removedIndex:r,addedIndex:r,elementSize:l,pos:void 0,shadowBeginEnd:void 0}}),l=0<r?a.getBeginEnd(s.draggables[r-1]).end:a.getBeginEndOfContainer().begin,t(a.getTopLeftOfElementBegin(l),s.getOptions().animationDuration,s.getOptions().dropClass))):n(b.animationDuration,i)}Ae=1,Be=5;var T,Se,Ce,Re,Ae,Be,Ie=function(e,t,n){T=Ye(e),Ce=n,(Se="number"==typeof t?t:we?200:0)&&(Re=setTimeout(Le,Se)),me.forEach(function(e){return window.document.addEventListener(e,Te)},{passive:!1}),he.forEach(function(e){return window.document.addEventListener(e,Pe)},{passive:!1}),window.document.addEventListener("drag",Ne,{passive:!1})};function Te(e){var e=Ye(e),t=e.clientX,e=e.clientY;if(Se)(Math.abs(T.clientX-t)>Be||Math.abs(T.clientY-e)>Be)&&ze();else if(Math.abs(T.clientX-t)>Ae||Math.abs(T.clientY-e)>Ae)return Le()}function Pe(){ze()}function Ne(){ze()}function ze(){clearTimeout(Re),me.forEach(function(e){return window.document.removeEventListener(e,Te)},{passive:!1}),he.forEach(function(e){return window.document.removeEventListener(e,Pe)},{passive:!1}),window.document.removeEventListener("drag",Ne,{passive:!1})}function Le(){clearTimeout(Re),ze(),Ce()}function Me(e){var t,n,o,i,r,a,l=Ye(e);S||void 0!==l.button&&0!==l.button||(h=w(l.target,"."+v))&&(t=w(h,"."+y),o=(n=O.filter(function(e){return e.element===t})[0]).getOptions().dragHandleSelector,i=n.getOptions().nonDragAreaSelector,r=!0,o&&!w(l.target,o)&&(r=!1),(r=i&&w(l.target,i)?!1:r)&&(n.layout.invalidate(),x(window.document.body,_),x(window.document.body,V),a=function(){c(window.document.body,_),c(window.document.body,V),window.document.removeEventListener("mouseup",a)},window.document.addEventListener("mouseup",a),window.document.addEventListener("touchend",a),Ie(l,n.getOptions().dragBeginDelay,function(){Q(),qe(l,Z(e.target)),me.forEach(function(e){window.document.addEventListener(e,Fe,{passive:!1})}),he.forEach(function(e){window.document.addEventListener(e,ke,{passive:!1})})})))}function Fe(e){e.preventDefault();var t,n,o,i,r,a,l,s=Ye(e);D?("contain"===(n=D.container.getOptions()).behaviour?(t=s,n=n.orientation,a=t.clientX,t=t.clientY,void 0===n&&(n="vertical"),l=D.container.layout.getBeginEndOfContainerVisibleRect(),n="vertical"===n?(o=t,i="y",r="top",D.size.offsetHeight):(o=a,i="x",r="left",D.size.offsetWidth),t=l.begin,a=l.end-n,t=Math.max(t,Math.min(a,o+E.positionDelta[r])),E.topLeft[i]=t,D.position[i]=Math.max(l.begin,Math.min(l.end,o+E.centerDelta[i])),D.mousePosition[i]=Math.max(l.begin,Math.min(l.end,o)),D.position[i]<l.begin+n/2&&(D.position[i]=l.begin+2),D.position[i]>l.end-n/2&&(D.position[i]=l.end-2)):B?"y"===B?(E.topLeft.y=s.clientY+E.positionDelta.top,D.position.y=s.clientY+E.centerDelta.y,D.mousePosition.y=s.clientY):"x"===B&&(E.topLeft.x=s.clientX+E.positionDelta.left,D.position.x=s.clientX+E.centerDelta.x,D.mousePosition.x=s.clientX):(E.topLeft.x=s.clientX+E.positionDelta.left,E.topLeft.y=s.clientY+E.positionDelta.top,D.position.x=s.clientX+E.centerDelta.x,D.position.y=s.clientY+E.centerDelta.y,D.mousePosition.x=s.clientX,D.mousePosition.y=s.clientY),Je(),(ye=!R(D))&&Ve()):qe(s,Z(e.target))}P=Xe,_e=!(je=20);var P,je,_e,N,Ve=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];N&&clearTimeout(N),_e&&!N?P.call.apply(P,[null].concat(e)):N=setTimeout(function(){N=null,P.call.apply(P,[null].concat(e))},je)};function Xe(){ye&&(ye=!1,He(D,m))}function ke(){var e;me.forEach(function(e){window.document.removeEventListener(e,Fe,{passive:!1})}),he.forEach(function(e){window.document.removeEventListener(e,ke,{passive:!1})}),pe.forEach(function(e){window.document.addEventListener(e,ke,{passive:!1})}),A&&"function"==typeof A&&A({reset:!0}),I&&((e=I)&&"undefined"!=typeof window&&(window.document.head||window.document.getElementsByTagName("head")[0]).removeChild(e),I=null),D&&(be.stop(),Xe(),C=!0,Oe(function(){We(S=!1);for(var e=m||[],t=e.shift();void 0!==t;)t.handleDrop(D),t=e.shift();R=B=D=E=h=m=null,C=!1}))}function Ye(e){return e.touches?e.touches[0]:e}function He(t,e){var n=!1;e.forEach(function(e){e=e.handleDrag(t);n=!!e.containerBoxChanged||!1,e.containerBoxChanged=!1}),n&&(n=!1,requestAnimationFrame(function(){O.forEach(function(e){e.layout.invalidateRects(),e.onTranslated()})}))}function Ge(e){var t=e,n=null;return function(e){return!(null!==n||!S||C)&&(n=requestAnimationFrame(function(){S&&!C&&(He(e,t),A({draggableInfo:e})),n=null}),!0)}}function $e(e,t){return e.getOptions().autoScrollEnabled?ce(t,e.getScrollMaxSpeed()):function(e){return null}}function We(o){var i=D.container,r=D.payload;O.forEach(function(e){var t,n;i.getOptions().fireRelatedEventsOnly&&e!==i||(t=(n=e.getOptions()).onDragStart,n=n.onDragEnd,(t=o?t:n)&&(n={isSource:e===i,payload:r,willAcceptDrop:!1},e.isDragRelevant(i,r)&&(n.willAcceptDrop=!0),t(n)))})}function qe(e,t){var n,o,i,r,a,l;null===h||h.classList.contains("dndrop-not-draggable")||(S=!0,(n=O.filter(function(e){return h.parentElement===e.element})[0]).setDraggables(),B=n.getOptions().lockAxis?n.getOptions().lockAxis.toLowerCase():null,o=h,i=O.filter(function(e){return o.parentElement===e.element})[0],r=i.draggables.indexOf(o),a=i.getOptions().getGhostParent,l=o.getBoundingClientRect(),D={container:i,element:o,size:{offsetHeight:l.bottom-l.top,offsetWidth:l.right-l.left},elementIndex:r,payload:i.getOptions().getChildPayload?i.getOptions().getChildPayload(r):void 0,targetElement:null,position:{x:0,y:0},groupName:i.getOptions().groupName,ghostParent:a?a():null,invalidateShadow:null,mousePosition:null,relevantContainers:null},E=De(h,{x:e.clientX,y:e.clientY},D.container,t),D.position={x:e.clientX+E.centerDelta.x,y:e.clientY+E.centerDelta.y},D.mousePosition={x:e.clientX,y:e.clientY},m=O.filter(function(e){return e.isDragRelevant(n,D.payload)}),D.relevantContainers=m,R=Ge(m),A&&"function"==typeof A&&A({reset:!0,draggableInfo:void 0}),A=$e(n,m),m.forEach(function(e){return e.prepareDrag(e,m)}),We(!0),R(D),Ee().appendChild(E.ghost),be.start())}var z,Ue=N=Re=null;function Je(e,t,n){void 0===e&&(e=0),void 0===t&&(t=1),void 0===n&&(n=!1);var o=E.ghost,i=E.topLeft,r=i.x,a=i.y,l=!D.container||D.container.shouldUseTransformForGhost(),s=l?"translate3d("+r+"px,"+a+"px, 0)":null;if(1!==t&&(s=s?s+" scale("+t+")":"scale("+t+")"),0<e)return E.ghost.style.transitionDuration=e+"ms",void requestAnimationFrame(function(){s&&(o.style.transform=s),l||(o.style.left=r+"px",o.style.top=a+"px"),Ue=null,n&&(o.style.opacity="0")});null===Ue&&(Ue=requestAnimationFrame(function(){s&&(o.style.transform=s),l||(o.style.left=r+"px",o.style.top=a+"px"),Ue=null,n&&(o.style.opacity="0")}))}function Ke(){var t;!S||ve||C||(ye=!(ve=!0),t=Object.assign({},D,{targetElement:null,position:{x:Number.MAX_SAFE_INTEGER,y:Number.MAX_SAFE_INTEGER},mousePosition:{x:Number.MAX_SAFE_INTEGER,y:Number.MAX_SAFE_INTEGER}}),m.forEach(function(e){e.handleDrag(t)}),D&&(D.targetElement=null,D.cancelDrop=!0,ke(),ve=!1))}"undefined"!=typeof window&&"undefined"!=typeof window&&(n=window.document.head||window.document.getElementsByTagName("head")[0],(z=window.document.createElement("style")).id="dndrop-style-definitions",o=fe(o),z.type="text/css",z.styleSheet?z.styleSheet.cssText=o:z.appendChild(window.document.createTextNode(o)),n.appendChild(z));xe();var Qe={register:function(e){e=e,O.push(e),S&&D&&e.isDragRelevant(D.container,D.payload)&&(m.push(e),e.prepareDrag(e,m),A&&"function"==typeof A&&A({reset:!0,draggableInfo:void 0}),A=$e(e,m),R=Ge(m),e.handleDrag(D))},unregister:function(e){var t;e=e,O.splice(O.indexOf(e),1),S&&D&&(D.container===e&&e.fireRemoveElement(),D.targetElement===e.element&&(D.targetElement=null),-1<(t=m.indexOf(e))&&(m.splice(t,1),A&&"function"==typeof A&&A({reset:!0,draggableInfo:void 0}),A=$e(e,m),R=Ge(m)))},isDragging:function(){return S},cancelDrag:Ke};function Ze(e,t,n){void 0===n&&(n=b.animationDuration),t?(x(e,F),e.style.transitionDuration=n+"ms"):(c(e,F),e.style.removeProperty("transition-duration"))}function et(i){var r=[];return Array.prototype.forEach.call(i.children,function(e){var t,n,o;e.nodeType===Node.ELEMENT_NODE?(q(t=e,v)||(n=e,t=L.wrapChild?((o=window.document.createElement("div")).className=""+v,n.parentElement.insertBefore(o,n),o.appendChild(n),o):n),t[u]=0,r.push(t)):i.removeChild(e)}),r}function tt(e){function s(e,t,n,o,i){return void 0===i&&(i=!1),o<n?n:n===o?(l=(r=u.getBeginEnd(e[n])).begin,r=r.end,!i||t<(r+l)/2?n:n+1):(r=Math.floor((o+n)/2),a=(l=u.getBeginEnd(e[r])).begin,l=l.end,t<a?s(e,t,n,r-1,i):l<t?s(e,t,r+1,o,i):!i||t<(l+a)/2?r:r+1);var r,a,l}var u=e.layout;return function(e,t,n){return s(e,t,0,e.length-1,n=void 0===n?!1:n)}}function nt(e){var t,n,o,i=e.element,r=e.draggables,a=e.layout,l=e.getOptions,s=(t=(e={element:i,draggables:r,layout:a,getOptions:l}).element,n=e.draggables,o=e.layout,function(){n.forEach(function(e){Ze(e,!1),o.setTranslation(e,0),o.setVisibility(e,!0)}),t[d]&&(t[d].parentNode.removeChild(t[d]),t[d]=null)}),u=(L.dropHandler||G)({element:i,draggables:r,layout:a,getOptions:l});return function(e,t,n){var o=t.addedIndex,t=t.removedIndex;if(void 0===n&&(n=!1),s(),e&&!e.cancelDrop)if(e.targetElement||l().removeOnDropOut||n){var n=function(e){return null!==e},o=n(o)?n(t)&&t<o?o-1:o:null,i=e.payload,r=e.element,i={removedIndex:t,addedIndex:o,payload:i,element:r.firstElementChild||r};(!e.container.getOptions().fireRelatedEventsOnly||n(t)||n(o))&&u(i,l().onDrop)}else if(l().dropNotAllowed)return r=e.payload,t=e.container,l().dropNotAllowed({payload:r,container:t})}}function ot(e){var n=e.element,o=e.getOptions,i=null;return function(e){var e=e.draggableInfo,t=i;return{removedIndex:t=null==i&&e.container.element===n&&"copy"!==o().behaviour?i=e.elementIndex:t}}}function it(e){var t=e.draggables,n=e.layout;return function(e){e=e.dragResult;null!==e.removedIndex&&n.setVisibility(t[e.removedIndex],!1)}}function rt(e){var n=e.element,o=e.layout;return function(e){var e=e.draggableInfo,t=document.elementFromPoint(e.position.x,e.position.y);if(t){t=function(e,t){for(var n=e;n;){if(n[M]){var o=n[M];if(t.some(function(e){return e===o}))return o}n=n.parentElement}return null}(t,e.relevantContainers);if(t&&t.element===n)return{pos:o.getPosition(e.position)}}return{pos:null}}}function at(e){var n=e.layout,o=null;return function(e){var t=e.draggableInfo;return null===e.dragResult.pos?o=null:{elementSize:o=o||n.getSize(t.size)}}}function lt(e){var o=e.element;return function(e){var t,n=e.draggableInfo,e=e.dragResult;n=n,t=o,void 0===(e=!!e.pos)&&(e=!0),t&&e?n.targetElement=t:n.targetElement===t&&(n.targetElement=null)}}function st(){return function(e){return null!==e.dragResult.pos?{addedIndex:0}:{addedIndex:null}}}function ut(e){var t=e.layout,n=null;return function(e){var e=e.dragResult.addedIndex;return e!==n?(n=e,e=t.getBeginEndOfContainer().begin,{shadowBeginEnd:{rect:t.getTopLeftOfElementBegin(e)}}):null}}function dt(e){var u=e.layout,d=e.element,c=e.getOptions,f=null;return function(e){var t,n,o,i,e=e.dragResult,r=e.elementSize,a=e.shadowBeginEnd,l=e.addedIndex,e=e.dropPlaceholderContainer,s=c();return s.dropPlaceholder?(t=(s="boolean"==typeof s.dropPlaceholder?{}:s.dropPlaceholder).animationDuration,n=s.className,s=s.showOnTop,null!==l?(e||(o=document.createElement("div"),(i=document.createElement("div")).className=H,o.className=k+" "+(n||X),(e=document.createElement("div")).className=Y,e.style.position="absolute",void 0!==t&&(e.style.transition="all "+t+"ms ease"),e.appendChild(i),i.appendChild(o),u.setSize(e.style,r+"px"),e.style.pointerEvents="none",s?d.appendChild(e):d.insertBefore(e,d.firstElementChild)),f!==l&&a.dropArea&&u.setBegin(e.style,a.dropArea.begin-u.getBeginEndOfContainer().begin+"px"),f=l,{dropPlaceholderContainer:e}):(e&&null!==f&&d.removeChild(e),f=null,{dropPlaceholderContainer:void 0})):null}}function ct(e){var n=ht(e);return function(e){var t=e.draggableInfo,e=e.dragResult;return t.invalidateShadow?n({draggableInfo:t,dragResult:e}):null}}function ft(e){n=e.draggables,o=tt({layout:e.layout});var n,o,i=function(e){var e=e.dragResult,t=e.shadowBeginEnd,e=e.pos;return t?t.begin+t.beginAdjustment<=e&&t.end>=e?null:e<t.begin+t.beginAdjustment?o(n,e):e>t.end?o(n,e)+1:n.length:null!==(t=o(n,e,!0))?t:n.length};return function(e){var e=e.dragResult,t=null;return{addedIndex:t=null!==e.pos&&null===(t=i({dragResult:e}))?e.addedIndex:t}}}function gt(){var n=null;return function(e){var e=e.dragResult,t=e.addedIndex,e=e.shadowBeginEnd;t!==n&&null!==n&&e&&(e.beginAdjustment=0),n=t}}function pt(e){var o=e.element,i=e.draggables,r=e.layout,a=e.getOptions,l=null;return function(e){var e=e.dragResult,t=e.addedIndex,n=e.removedIndex,e=e.elementSize;if(null===n)if(null!==t){if(!l){n=r.getBeginEndOfContainer();n.end=n.begin+r.getSize(o);var t=r.getScrollSize(o)>r.getSize(o)?n.begin+r.getScrollSize(o)-r.getScrollValue(o):n.end,n=0<i.length?r.getBeginEnd(i[i.length-1]).end-i[i.length-1][u]:n.begin;if(t<n+e)return(l=window.document.createElement("div")).className=j+" "+a().orientation,n=0<i.length?e+n-t:e,r.setSize(l.style,n+"px"),o.appendChild(l),o[d]=l,{containerBoxChanged:!0}}}else if(l)return r.setTranslation(l,0),t=l,l=null,o.removeChild(t),{containerBoxChanged:!(o[d]=null)}}}function mt(e){var l=e.draggables,s=e.layout,u=null,d=null;return function(e){var e=e.dragResult,t=e.addedIndex,n=e.removedIndex,o=e.elementSize;if(t!==u||n!==d){for(var i,r,a=0;a<l.length;a++)a!==n&&(i=l[a],r=0,null!==n&&n<a&&(r-=o),null!==t&&t<=a&&(r+=o),s.setTranslation(i,r));return{addedIndex:u=t,removedIndex:d=n}}}}function ht(e){var c=e.draggables,f=e.layout,g=null;return function(e){var t,n,o,i,r,a=e.draggableInfo,e=e.dragResult,l=e.addedIndex,s=e.removedIndex,u=e.elementSize,d=e.pos,e=e.shadowBeginEnd;return null!==d?null===l||!a.invalidateShadow&&l===g?null:(d=l-1,a=Number.MIN_SAFE_INTEGER,n=t=0,o=i=null,d===s&&d--,t=-1<d?(r=f.getSize(c[d]),o=f.getBeginEnd(c[d]),a=u<r?o.end-(r-u)/2:o.end,o.end):(o={end:f.getBeginEndOfContainer().begin},f.getBeginEndOfContainer().begin),d=Number.MAX_SAFE_INTEGER,(r=l)===s&&r++,n=r<c.length?(s=f.getSize(c[r]),i=f.getBeginEnd(c[r]),d=u<s?i.begin+(s-u)/2:i.begin,i.begin):(i={begin:f.getContainerRectangles().rect.end},f.getContainerRectangles().rect.end-f.getContainerRectangles().rect.begin),r=o&&i?f.getTopLeftOfElementBegin(o.end):null,g=l,{shadowBeginEnd:{dropArea:{begin:t,end:n},begin:a,end:d,rect:r,beginAdjustment:e?e.beginAdjustment:0}}):{shadowBeginEnd:g=null}}}function vt(){var o=null;return function(e){var e=e.dragResult,t=e.pos,n=e.addedIndex,e=e.shadowBeginEnd;null!==t?null!=n&&null===o&&(t<e.begin&&(t=t-e.begin-5,e.beginAdjustment=t),o=n):o=null}}function yt(e){var e=e.getOptions,t=!1,n=e();return function(e){e=!!e.dragResult.pos;e!==t&&((t=e)?n.onDragEnter&&n.onDragEnter():n.onDragLeave&&n.onDragLeave())}}function bt(e){var e=e.getOptions,r=null,a=e();return function(e){var t,n=e.dragResult,o=n.addedIndex,n=n.removedIndex,e=e.draggableInfo,i=e.payload,e=e.element;a.onDropReady&&null!==o&&r!==o&&(t=r=o,null!==n&&n<o&&t--,a.onDropReady({addedIndex:t,removedIndex:n,payload:i,element:e?e.firstElementChild||e:void 0}))}}function wt(e){return"drop-zone"===e.getOptions().behaviour?xt(e)(ot,it,rt,at,lt,st,ut,yt,bt):xt(e)(ot,it,rt,at,lt,ct,ft,gt,pt,mt,ht,dt,vt,yt,bt)}function xt(n){return function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var o=e.map(function(e){return e(n)}),i=null;return function(n){return i=o.reduce(function(e,t){return Object.assign(e,t({draggableInfo:n,dragResult:e}))},i||{addedIndex:null,removedIndex:null,elementSize:null,pos:null,shadowBeginEnd:null})}}}function Et(h){return function(e){var t,n,o,i,r,a=Object.assign({},b,e),l=null,s=null,u=(e=m,o=et(t=h),n=e(),x(t,y+" "+n.orientation),{element:t,draggables:o,getOptions:e,layout:ie(t,n.orientation,n.animationDuration)}),d=wt(u),c=nt(u),f=K(h,function(){u.layout.invalidateRects(),g()});function g(){null!==s&&(s.invalidateShadow=!0,l=d(s),s.invalidateShadow=!1)}function p(e,t){for(var n=et(t),o=0;o<n.length;o++)e[o]=n[o];for(var i=0;i<e.length-n.length;i++)e.pop()}function m(){return a}return{element:h,draggables:u.draggables,isDragRelevant:(i=(o=u).element,r=o.getOptions,function(e,t){var n=r();if(n.shouldAcceptDrop)return n.shouldAcceptDrop(e.getOptions(),t);t=e.getOptions();return"copy"!==n.behaviour&&(w(i,"."+v)!==e.element&&(e.element===i||!(!t.groupName||t.groupName!==n.groupName)))}),layout:u.layout,dispose:function(e){var t;f.dispose(),t=e.element,L.wrapChild&&Array.prototype.forEach.call(t.children,function(e){e.nodeType===Node.ELEMENT_NODE&&q(e,v)&&(t.insertBefore(e.firstElementChild,e),t.removeChild(e))})},prepareDrag:function(e,t){var n=e.element,o=u.draggables;p(o,n),e.layout.invalidateRects(),o.forEach(function(e){return Ze(e,!0,a.animationDuration)}),f.start()},handleDrag:function(e){return l=d(s=e)},handleDrop:function(e){f.stop(),l&&l.dropPlaceholderContainer&&h.removeChild(l.dropPlaceholderContainer),s=null,d=wt(u),c(e,l),l=null},fireRemoveElement:function(){c(s,Object.assign({},l,{addedIndex:null}),!0),l=null},getDragResult:function(){return l},getTranslateCalculator:function(e){return mt(u)(e)},onTranslated:function(){g()},setDraggables:function(){p(u.draggables,h)},getScrollMaxSpeed:function(){return L.maxScrollSpeed},shouldUseTransformForGhost:function(){return!0===L.useTransformForGhost},getOptions:m,setOptions:function(e,t){a=!1===(t=void 0===t?!0:t)?Object.assign({},b,e):Object.assign({},b,a,e)}}}}var L=function(e,t){var n=Et(e)(t);return e[M]=n,Qe.register(n),{dispose:function(){Qe.unregister(n),n.dispose(n)},setOptions:function(e,t){n.setOptions(e,t)}}};L.wrapChild=!0,L.cancelDrag=function(){Qe.cancelDrag()},L.isDragging=function(){return Qe.isDragging()};function Dt(e,t){var n,e=e.$props.tag;if(e){if("string"==typeof e)return n={value:e},t&&(n.props={class:t}),n;if("object"==typeof e)return n={value:e.value||"div",props:e.props||{}},t&&(n.props.class?(e=n.props.class,"[object Array]"===Object.prototype.toString.call(e)?n.props.class.push(t):n.props.class=[t,n.props.class]):n.props.class=t),n}return{value:"div"}}function Ot(e){return!e||("string"==typeof e||"object"==typeof e&&("string"==typeof e.value||"function"==typeof e.value||"object"==typeof e.value))}L.dropHandler=function(){return function(e,t){t&&t(e)}},L.wrapChild=!1;var St={drop:"onDrop","drag-end":"onDragEnd","drag-start":"onDragStart","drag-enter":"onDragEnter","drag-leave":"onDragLeave","drop-ready":"onDropReady","drop-not-allowed":"dropNotAllowed"};function Ct(e){var i,r,t=Object.assign({},e.$props,e.$listeners);return i=t,r=e,Object.keys(i).reduce(function(e,t){var n=t,o=i[n];return void 0!==o&&("function"==typeof o?St[n]?e[St[n]]=function(e){r.$emit(n,e)}:e[n]=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return o.apply(void 0,e)}:e[n]=o),e},{})}o={name:"Container",mounted:function(){this.containerElement=this.$refs.container||this.$el,this.container=L(this.containerElement,Ct(this))},updated:function(){if(this.$refs.container!==this.containerElement&&this.$el!==this.containerElement)return this.container&&this.container.dispose(),this.containerElement=this.$refs.container||this.$el,void(this.container=L(this.containerElement,Ct(this)));this.container.setOptions(Ct(this))},destroyed:function(){this.container&&this.container.dispose()},props:{behaviour:String,groupName:String,orientation:String,dragHandleSelector:String,nonDragAreaSelector:String,dragBeginDelay:Number,animationDuration:Number,autoScrollEnabled:{type:Boolean,default:!0},lockAxis:String,dragClass:String,dropClass:String,removeOnDropOut:{type:Boolean,default:!1},"drag-start":Function,"drag-end":Function,drop:Function,getChildPayload:Function,shouldAnimateDrop:Function,fireRelatedEventsOnly:{type:Boolean,default:!1},shouldAcceptDrop:Function,"drag-enter":Function,"drag-leave":Function,tag:{validator:Ot,default:"div"},getGhostParent:Function,"drop-ready":Function,dropPlaceholder:[Object,Boolean]},render:function(e){var t=Dt(this);return e(t.value,Object.assign({},{ref:"container"},t.props),this.$slots.default)}},n={name:"Draggable",props:{tag:{validator:Ot,default:"div"},dragNotAllowed:{type:Boolean,default:!1}},render:function(e){return e=e,n=Dt(t=this,["dndrop-draggable-wrapper",t.dragNotAllowed?"dndrop-not-draggable":""]),e(n.value,Object.assign({},n.props),t.$slots.default);var t,n}};e.Container=o,e.Draggable=n,e.smoothDnD=L,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).VueDndrop={},e.Vue)}(this,function(e,M){"use strict";var F="dndrop-container-instance",v="dndrop-draggable-wrapper",j="animated",u="__dndrop_draggable_translation_value",a="__dndrop_draggable_visibility_value",f="dndrop-ghost",y="dndrop-container",_="dndrop-stretcher-element",d="dndrop-stretcher-instance",V="dndrop-disable-touch-action",X="dndrop-no-user-select",k="dndrop-drop-preview-default-class",Y="dndrop-drop-preview-inner-class",H="dndrop-drop-preview-constant-class",G="dndrop-drop-preview-flex-container-class",b={groupName:void 0,behaviour:"move",orientation:"vertical",getChildPayload:void 0,animationDuration:250,autoScrollEnabled:!0,shouldAcceptDrop:void 0,shouldAnimateDrop:void 0};function $(e){e.element;var l=e.draggables;return function(e,t){var n,o=e.removedIndex,i=e.addedIndex,r=e.element,a=null;null!==o&&(a=r.removeChild(r.children[o]),l.splice(o,1)),null!==i&&((o=window.document.createElement("div")).className="dndrop-draggable-wrapper",o.appendChild(a&&a.firstElementChild?a.firstElementChild:r),a=o,(n=i)>=(r=r).children.length?r.appendChild(a):r.insertBefore(a,r.children[n]),i>=l.length?l.push(o):l.splice(i,0,o)),t&&t(e)}}function W(e,t){var n=(e=window.getComputedStyle(e)).overflow,e=e["overflow-"+t];return"auto"===n||"scroll"===n||("auto"===e||"scroll"===e)}function q(e,t){for(var n=e,o=t||K(e),n=e.parentElement;n;)l(n,"x")&&i(n,"x")&&(o=J(o,n.getBoundingClientRect(),"x")),l(n,"y")&&i(n,"y")&&(o=J(o,n.getBoundingClientRect(),"y")),n=n.parentElement;return o}function U(e,t){return-1<e.className.split(" ").map(function(e){return e}).indexOf(t)}var r={x:"x",y:"y",xy:"xy"},J=function(e,t,n){return"x"===n?{left:Math.max(e.left,t.left),top:e.top,right:Math.min(e.right,t.right),bottom:e.bottom}:{left:e.left,top:Math.max(e.top,t.top),right:e.right,bottom:Math.min(e.bottom,t.bottom)}},K=function(e){var t,n=e.getBoundingClientRect(),n={left:n.left,right:n.right,top:n.top,bottom:n.bottom};return l(e,"x")&&!i(e,"x")&&(t=n.right-n.left,n.right=n.right+e.scrollWidth-t),l(e,"y")&&!i(e,"y")&&(t=n.bottom-n.top,n.bottom=n.bottom+e.scrollHeight-t),n},i=function(e,t){var e=window.getComputedStyle(e),n=e.overflow,e=e["overflow-"+t];return"auto"===n||"scroll"===n||"hidden"===n||("auto"===e||"scroll"===e||"hidden"===e)},l=function(e,t){return"x"===t?e.scrollWidth>e.clientWidth:e.scrollHeight>e.clientHeight},Q=function(e,t){for(var n=[],o=e;o;)(W(o,"x")||W(o,"y"))&&n.push(o),o=o.parentElement;function i(){n&&(n.forEach(function(e){return e.removeEventListener("scroll",t)}),window.removeEventListener("scroll",t))}return{dispose:function(){i(),n=null},start:function(){n&&(n.forEach(function(e){return e.addEventListener("scroll",t)}),window.addEventListener("scroll",t))},stop:i}},w=function(e,t){for(var n=e;n;){if(n.matches(t))return n;n=n.parentElement}return null},E=function(e,t){var n;e&&-1===(n=e.className.split(" ").filter(function(e){return e})).indexOf(t)&&(n.unshift(t),e.className=n.join(" "))},c=function(e,t){var n;e&&(n=e.className.split(" ").filter(function(e){return e&&e!==t}),e.className=n.join(" "))},Z=function(){window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():window.document.selection&&window.document.selection.empty()},ee=function(e){if(e){e=window.getComputedStyle(e);if(e)return e.cursor}return null};function te(e){return!(e.bottom<=e.top||e.right<=e.left)}var ne={size:"offsetWidth",distanceToParent:"offsetLeft",translate:"transform",begin:"left",end:"right",dragPosition:"x",scrollSize:"scrollWidth",offsetSize:"offsetWidth",scrollValue:"scrollLeft",scale:"scaleX",setSize:"width",setters:{translate:function(e){return"translate3d("+e+"px, 0, 0)"}}},oe={size:"offsetHeight",distanceToParent:"offsetTop",translate:"transform",begin:"top",end:"bottom",dragPosition:"y",scrollSize:"scrollHeight",offsetSize:"offsetHeight",scrollValue:"scrollTop",scale:"scaleY",setSize:"height",setters:{translate:function(e){return"translate3d(0,"+e+"px, 0)"}}};function ie(o){return{get:function(e,t){return e[o[t]||t]},set:function(e,t,n){e[o[t]]=o.setters[t]?o.setters[t](n):n}}}function re(n,l){n["dndrop-extra-size-for-insertion"]=0;var o=ie("horizontal"===l?ne:oe),s={translation:0};function e(){var e,t;i(n),t=(e=n).getBoundingClientRect(),s.scaleX=e.offsetWidth?(t.right-t.left)/e.offsetWidth:1,s.scaleY=e.offsetHeight?(t.bottom-t.top)/e.offsetHeight:1}function i(e){s.rect=K(e);e=q(e,s.rect);te(e)&&(s.lastVisibleRect=s.visibleRect),s.visibleRect=e}function r(e){var t=e;return t.tagName?(t=t.getBoundingClientRect(),"vertical"===l?t.bottom-t.top:t.right-t.left):o.get(e,"size")*o.get(s,"scale")}function t(e){return o.get(e,"dragPosition")}return window.addEventListener("resize",function(){i(n)}),setTimeout(function(){e()},10),{getSize:r,getContainerRectangles:function(){return{rect:s.rect,visibleRect:s.visibleRect,lastVisibleRect:s.lastVisibleRect}},getBeginEndOfDOMRect:function(e){return{begin:o.get(e,"begin"),end:o.get(e,"end")}},getBeginEndOfContainer:function(){return{begin:o.get(s.rect,"begin")+s.translation,end:o.get(s.rect,"end")+s.translation}},getBeginEndOfContainerVisibleRect:function(){return{begin:o.get(s.visibleRect,"begin")+s.translation,end:o.get(s.visibleRect,"end")+s.translation}},getBeginEnd:function(e){t=e;var t=(o.get(t,"distanceToParent")+(t[u]||0))*o.get(s,"scale")+(o.get(s.rect,"begin")+s.translation)-o.get(n,"scrollValue");return{begin:t,end:t+r(e)*o.get(s,"scale")}},getAxisValue:t,setTranslation:function(e,t){t?o.set(e.style,"translate",t):e.style.removeProperty("transform"),e[u]=t},getTranslation:function(e){return e[u]},setVisibility:function(e,t){void 0!==e[a]&&e[a]===t||(t?e.style.removeProperty("visibility"):e.style.visibility="hidden",e[a]=t)},isVisible:function(e){return void 0===e[a]||e[a]},isInVisibleRect:function(e,t){var n=s.visibleRect,o=n.left,i=n.top,r=n.right,a=((n=n.bottom)-i<2&&(n=i+30),s.rect);return"vertical"===l?e>a.left&&e<a.right&&i<t&&t<n:o<e&&e<r&&t>a.top&&t<a.bottom},setSize:function(e,t){o.set(e,"setSize",t)},getTopLeftOfElementBegin:function(e){var t=0;return{top:"horizontal"===l?(t=e,s.rect.top):(t=s.rect.left,e),left:t}},getScrollSize:function(e){return o.get(e,"scrollSize")},getScrollValue:function(e){return o.get(e,"scrollValue")},setScrollValue:function(e,t){return o.set(e,"scrollValue",t)},invalidate:e,invalidateRects:function(){i(n)},getPosition:t,setBegin:function(e,t){o.set(e,"begin",t)}}}var ae="x",le="y",se="xy";function ue(e,t,n){var o,i,r=n.left,a=n.right,l=n.top,n=n.bottom,s=e.x,e=e.y;if(s<r||a<s||e<l||n<e)return null;t="x"===t?(o=r,i=a,s):(o=l,i=n,e),r=i-o,a=400<r?100:r/4;return i-t<a?{direction:"end",speedFactor:(a-(i-t))/a}:t-o<a?{direction:"begin",speedFactor:(a-(t-o))/a}:null}function de(e,t,n){e&&(e!==window?"x"===t?e.scrollLeft+=n:e.scrollTop+=n:"x"===t?e.scrollBy(n,0):e.scrollBy(0,n))}function s(o,i){void 0===i&&(i="y");var r=null,a=null,l=null,s=null;return{animate:function(e,t){l=e,s=t,function n(){null===r&&(r=requestAnimationFrame(function(e){var t=e-(a=null===a?e:a),e=(a=e,t/1e3*s);de(o,i,e="begin"===l?0-e:e),r=null,n()}))}()},stop:function(){null!==r&&(cancelAnimationFrame(r),r=null),a=null}}}function ce(e){for(var t=[],n=e.element;n;){var o=function(e){var e=window.getComputedStyle(e),t=e.overflow;if("auto"===t||"scroll"===t)return r.xy;t=e["overflow-x"],t="auto"===t||"scroll"===t,e=e["overflow-y"],e="auto"===e||"scroll"===e;return t&&e?r.xy:t?r.x:e?r.y:null}(n);if(o&&!U(n,"dndrop-prevent-auto-scroll-class")){var i={};switch(o){case se:i.x={animator:s(n,"x")},i.y={animator:s(n,"y")};break;case ae:i.x={animator:s(n,"x")};break;case le:i.y={animator:s(n,"y")}}t.push({axisAnimations:i,getRect:function(e){return function(){return q(e,e.getBoundingClientRect())}}(n),scrollerElement:n})}n=n.parentElement}return t}function fe(e,i){void 0===i&&(i=1500);var r=e.reduce(function(e,t){t=ce(t).filter(function(t){return!e.find(function(e){return e.scrollerElement===t.scrollerElement})});return e.concat(t)},[]);return function(e){var t,o,n=e.draggableInfo;e.reset?r.forEach(function(e){e.axisAnimations.x&&e.axisAnimations.x.animator.stop(),e.axisAnimations.y&&e.axisAnimations.y.animator.stop()}):n&&(o=n.mousePosition,r.forEach(function(e){var t=e.axisAnimations,n=(0,e.getRect)();t.x&&(t.x.scrollParams=ue(o,"x",n),e.cachedRect=n),t.y&&(t.y.scrollParams=ue(o,"y",n),e.cachedRect=n)}),r.forEach(function(e){var t,n,e=e.axisAnimations,o=e.x,e=e.y;o&&(o.scrollParams?(t=(n=o.scrollParams).direction,n=n.speedFactor,o.animator.animate(t,n*i)):o.animator.stop()),e&&(e.scrollParams?(n=(t=e.scrollParams).direction,o=t.speedFactor,e.animator.animate(n,o*i)):e.animator.stop())}),(e=r.filter(function(e){return e.cachedRect})).length&&1<e.length&&((t=function(e,t){for(var n=document.elementFromPoint(t.x,t.y);n;){var o=e.find(function(e){return e.scrollerElement===n});if(o)return o;n=n.parentElement}return null}(e,n.mousePosition))&&e.forEach(function(e){e!==t&&(e.axisAnimations.x&&e.axisAnimations.x.animator.stop(),e.axisAnimations.y&&e.axisAnimations.y.animator.stop())})))}}"undefined"!=typeof window&&((t=Element)&&t.prototype&&!t.prototype.matches&&(t.prototype.matches=t.prototype.matchesSelector||t.prototype.mozMatchesSelector||t.prototype.msMatchesSelector||t.prototype.oMatchesSelector||t.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;0<=--n&&t.item(n)!==this;);return-1<n}),Array.prototype.some||(Array.prototype.some=function(e){if(null==this)throw new TypeError("Array.prototype.some called on null or undefined");if("function"!=typeof e)throw new TypeError;for(var t=Object(this),n=t.length>>>0,o=2<=arguments.length?arguments[1]:void 0,i=0;i<n;i++)if(i in t&&e.call(o,t[i],i,t))return!0;return!1}));var t={overflow:"hidden",display:"block"},n={height:"100%",display:"table-cell","vertical-align":"top"},o={};function ge(o){return Object.keys(o).reduce(function(e,t){var n=o[t];return"object"==typeof n?""+e+t+"{"+ge(n)+"}":""+e+t+":"+n+";"},"")}function pe(e){var t,n;return e&&"undefined"!=typeof window?(t=window.document.head||window.document.getElementsByTagName("head")[0],n=window.document.createElement("style"),e=ge({"body *":{cursor:e+" !important"}}),n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(window.document.createTextNode(e)),t.appendChild(n),n):null}o["."+y]={position:"relative","min-height":"30px","min-width":"30px"},o["."+y+".horizontal"]={display:"table"},o["."+y+".horizontal > ."+_]={display:"inline-block"},o["."+y+".horizontal > ."+v]=n,o["."+y+".vertical > ."+v]=t,o["."+v]={"box-sizing":"border-box"},o["."+v+".horizontal"]=n,o["."+v+".vertical"]=t,o["."+v+".animated"]={transition:"transform ease"},o["."+f]={"box-sizing":"border-box"},o["."+f+".animated"]={transition:"all ease-in-out"},o["."+f+" *"]={"pointer-events":"none"},o["."+V+" *"]={"touch-action":"none","-ms-touch-action":"none"},o["."+X]={"-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"},o["."+Y]={flex:"1"},o["."+y+".horizontal > ."+H]={height:"100%",overflow:"hidden",display:"table-cell","vertical-align":"top"},o["."+y+".vertical > ."+H]={overflow:"hidden",display:"block",width:"100%"},o["."+G]={width:"100%",height:"100%",display:"flex","justify-content":"stretch","align-items":"stretch"},o["."+k]={"background-color":"rgba(150, 150, 150, 0.1)",border:"1px solid #ccc"};var g,p,me=["mousedown","touchstart"],he=["mousemove","touchmove"],ve=["mouseup","touchend"],m=null,h=null,x=null,D=null,O=[],S=!1,ye=!1,C=!1,be=!1,R=null,A=null,B=null,I=null,we=(g=null,p=!1,{start:function(){p||(p=!0,function e(){g=requestAnimationFrame(function(){m.forEach(function(e){return e.layout.invalidateRects()}),setTimeout(function(){null!==g&&e()},50)})}())},stop:function(){null!==g&&(cancelAnimationFrame(g),g=null),p=!1}}),Ee="undefined"!=typeof window&&!!(window.navigator.userAgent.match(/Android/i)||window.navigator.userAgent.match(/webOS/i)||window.navigator.userAgent.match(/iPhone/i)||window.navigator.userAgent.match(/iPad/i)||window.navigator.userAgent.match(/iPod/i)||window.navigator.userAgent.match(/BlackBerry/i)||window.navigator.userAgent.match(/Windows Phone/i));function xe(){"undefined"!=typeof window&&me.forEach(function(e){window.document.addEventListener(e,Fe,{passive:!1})})}function De(){return D&&D.ghostParent?D.ghostParent:h&&h.parentElement||window.document.body}function Oe(e,t,n,o){var i=t.x,t=t.y,r=e.getBoundingClientRect(),a=r.left,l=r.top,s=r.right,u=r.bottom,d=(d=n.layout.getContainerRectangles().visibleRect,r=r,{left:Math.max(d.left,r.left),top:Math.max(d.top,r.top),right:Math.min(d.right,r.right),bottom:Math.min(d.bottom,r.bottom)}),r=d.left+(d.right-d.left)/2,d=d.top+(d.bottom-d.top)/2,c=e.cloneNode(!0);return c.style.zIndex="1000",c.style.boxSizing="border-box",c.style.position="fixed",c.style.top="0px",c.style.left="0px",c.style.transform="none",c.style.removeProperty("transform"),n.shouldUseTransformForGhost()?c.style.transform="translate3d("+a+"px, "+l+"px, 0)":(c.style.top=l+"px",c.style.left=a+"px"),c.style.width=s-a+"px",c.style.height=u-l+"px",c.style.overflow="visible",c.style.transition=null,c.style.removeProperty("transition"),c.style.pointerEvents="none",c.style.userSelect="none",n.getOptions().dragClass?setTimeout(function(){E(c.firstElementChild,n.getOptions().dragClass);var e=window.getComputedStyle(c.firstElementChild).cursor;I=pe(e)}):I=pe(o),E(c,n.getOptions().orientation||"vertical"),E(c,f),{ghost:c,centerDelta:{x:r-i,y:d-t},positionDelta:{left:a-i,top:l-t},topLeft:{x:a,y:l}}}function Se(e){function i(){c(x.ghost,"animated"),x.ghost.style.transitionDuration=null,De().removeChild(x.ghost),e()}function t(e,t,n){var o=e.top,e=e.left;E(x.ghost,"animated"),n&&E(x.ghost.firstElementChild,n),x.topLeft.x=e,x.topLeft.y=o,Ke(t),setTimeout(function(){i()},t+20)}function n(e,t){E(x.ghost,"animated"),Ke(e,.9,!0),setTimeout(function(){t()},e+20)}var o,r,a,l,s;D.targetElement?(o=O.filter(function(e){return e.element===D.targetElement})[0],!(s=o.getOptions()).shouldAnimateDrop||s.shouldAnimateDrop(D.container.getOptions(),D.payload)?t(o.getDragResult().shadowBeginEnd.rect,Math.max(150,o.getOptions().animationDuration/2),o.getOptions().dropClass):i()):(s=O.filter(function(e){return e===D.container})[0])?(r=(o=s.getOptions()).behaviour,l=o.removeOnDropOut,"move"!==r&&"contain"!==r||!ye&&l||!s.getDragResult()?n(s.getOptions().animationDuration,i):!te((r=s.layout.getContainerRectangles()).visibleRect)&&te(r.lastVisibleRect)?t({top:r.lastVisibleRect.top,left:r.lastVisibleRect.left},s.getOptions().animationDuration,s.getOptions().dropClass):(r=(l=s.getDragResult()).removedIndex,l=l.elementSize,a=s.layout,s.getTranslateCalculator({dragResult:{removedIndex:r,addedIndex:r,elementSize:l,pos:void 0,shadowBeginEnd:void 0}}),l=0<r?a.getBeginEnd(s.draggables[r-1]).end:a.getBeginEndOfContainer().begin,t(a.getTopLeftOfElementBegin(l),s.getOptions().animationDuration,s.getOptions().dropClass))):n(b.animationDuration,i)}Be=1,Ie=5;var T,Ce,Re,Ae,Be,Ie,Te=function(e,t,n){T=He(e),Re=n,(Ce="number"==typeof t?t:Ee?200:0)&&(Ae=setTimeout(Me,Ce)),he.forEach(function(e){return window.document.addEventListener(e,Pe)},{passive:!1}),ve.forEach(function(e){return window.document.addEventListener(e,Ne)},{passive:!1}),window.document.addEventListener("drag",ze,{passive:!1})};function Pe(e){var e=He(e),t=e.clientX,e=e.clientY;if(Ce)(Math.abs(T.clientX-t)>Ie||Math.abs(T.clientY-e)>Ie)&&Le();else if(Math.abs(T.clientX-t)>Be||Math.abs(T.clientY-e)>Be)return Me()}function Ne(){Le()}function ze(){Le()}function Le(){clearTimeout(Ae),he.forEach(function(e){return window.document.removeEventListener(e,Pe)},{passive:!1}),ve.forEach(function(e){return window.document.removeEventListener(e,Ne)},{passive:!1}),window.document.removeEventListener("drag",ze,{passive:!1})}function Me(){clearTimeout(Ae),Le(),Re()}function Fe(e){var t,n,o,i,r,a,l=He(e);S||void 0!==l.button&&0!==l.button||(h=w(l.target,"."+v))&&(t=w(h,"."+y),o=(n=O.filter(function(e){return e.element===t})[0]).getOptions().dragHandleSelector,i=n.getOptions().nonDragAreaSelector,r=!0,o&&!w(l.target,o)&&(r=!1),(r=i&&w(l.target,i)?!1:r)&&(n.layout.invalidate(),E(window.document.body,V),E(window.document.body,X),a=function(){c(window.document.body,V),c(window.document.body,X),window.document.removeEventListener("mouseup",a),window.document.removeEventListener("touchend",a)},window.document.addEventListener("mouseup",a),window.document.addEventListener("touchend",a),Te(l,n.getOptions().dragBeginDelay,function(){Z(),Ue(l,ee(e.target)),he.forEach(function(e){window.document.addEventListener(e,je,{passive:!1})}),ve.forEach(function(e){window.document.addEventListener(e,Ye,{passive:!1})})})))}function je(e){e.preventDefault();var t,n,o,i,r,a,l,s=He(e);D?("contain"===(n=D.container.getOptions()).behaviour?(t=s,n=n.orientation,a=t.clientX,t=t.clientY,void 0===n&&(n="vertical"),l=D.container.layout.getBeginEndOfContainerVisibleRect(),n="vertical"===n?(o=t,i="y",r="top",D.size.offsetHeight):(o=a,i="x",r="left",D.size.offsetWidth),t=l.begin,a=l.end-n,t=Math.max(t,Math.min(a,o+x.positionDelta[r])),x.topLeft[i]=t,D.position[i]=Math.max(l.begin,Math.min(l.end,o+x.centerDelta[i])),D.mousePosition[i]=Math.max(l.begin,Math.min(l.end,o)),D.position[i]<l.begin+n/2&&(D.position[i]=l.begin+2),D.position[i]>l.end-n/2&&(D.position[i]=l.end-2)):B?"y"===B?(x.topLeft.y=s.clientY+x.positionDelta.top,D.position.y=s.clientY+x.centerDelta.y,D.mousePosition.y=s.clientY):"x"===B&&(x.topLeft.x=s.clientX+x.positionDelta.left,D.position.x=s.clientX+x.centerDelta.x,D.mousePosition.x=s.clientX):(x.topLeft.x=s.clientX+x.positionDelta.left,x.topLeft.y=s.clientY+x.positionDelta.top,D.position.x=s.clientX+x.centerDelta.x,D.position.y=s.clientY+x.centerDelta.y,D.mousePosition.x=s.clientX,D.mousePosition.y=s.clientY),Ke(),(be=!R(D))&&Xe()):Ue(s,ee(e.target))}P=ke,Ve=!(_e=20);var P,_e,Ve,N,Xe=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];N&&clearTimeout(N),Ve&&!N?P.call.apply(P,[null].concat(e)):N=setTimeout(function(){N=null,P.call.apply(P,[null].concat(e))},_e)};function ke(){be&&(be=!1,Ge(D,m))}function Ye(){var e;he.forEach(function(e){window.document.removeEventListener(e,je,{passive:!1})}),ve.forEach(function(e){window.document.removeEventListener(e,Ye,{passive:!1})}),me.forEach(function(e){window.document.addEventListener(e,Ye,{passive:!1})}),A&&"function"==typeof A&&A({reset:!0}),I&&((e=I)&&"undefined"!=typeof window&&(window.document.head||window.document.getElementsByTagName("head")[0]).removeChild(e),I=null),D&&(we.stop(),ke(),C=!0,Se(function(){qe(S=!1);for(var e=m||[],t=e.shift();void 0!==t;)t.handleDrop(D),t=e.shift();R=B=D=x=h=m=null,C=!1}))}function He(e){return e.touches?e.touches[0]:e}function Ge(t,e){var n=!1;e.forEach(function(e){e=e.handleDrag(t);n=!!e.containerBoxChanged||!1,e.containerBoxChanged=!1}),n&&(n=!1,requestAnimationFrame(function(){O.forEach(function(e){e.layout.invalidateRects(),e.onTranslated()})}))}function $e(e){var t=e,n=null;return function(e){return!(null!==n||!S||C)&&(n=requestAnimationFrame(function(){S&&!C&&(Ge(e,t),A({draggableInfo:e})),n=null}),!0)}}function We(e,t){return e.getOptions().autoScrollEnabled?fe(t,e.getScrollMaxSpeed()):function(e){return null}}function qe(o){var i=D.container,r=D.payload;O.forEach(function(e){var t,n;i.getOptions().fireRelatedEventsOnly&&e!==i||(t=(n=e.getOptions()).onDragStart,n=n.onDragEnd,(t=o?t:n)&&(n={isSource:e===i,payload:r,willAcceptDrop:!1},e.isDragRelevant(i,r)&&(n.willAcceptDrop=!0),t(n)))})}function Ue(e,t){var n,o,i,r,a,l;null===h||h.classList.contains("dndrop-not-draggable")||(S=!0,(n=O.filter(function(e){return h.parentElement===e.element})[0]).setDraggables(),B=n.getOptions().lockAxis?n.getOptions().lockAxis.toLowerCase():null,o=h,i=O.filter(function(e){return o.parentElement===e.element})[0],r=i.draggables.indexOf(o),a=i.getOptions().getGhostParent,l=o.getBoundingClientRect(),D={container:i,element:o,size:{offsetHeight:l.bottom-l.top,offsetWidth:l.right-l.left},elementIndex:r,payload:i.getOptions().getChildPayload?i.getOptions().getChildPayload(r):void 0,targetElement:null,position:{x:0,y:0},groupName:i.getOptions().groupName,ghostParent:a?a():null,invalidateShadow:null,mousePosition:null,relevantContainers:null},x=Oe(h,{x:e.clientX,y:e.clientY},D.container,t),D.position={x:e.clientX+x.centerDelta.x,y:e.clientY+x.centerDelta.y},D.mousePosition={x:e.clientX,y:e.clientY},m=O.filter(function(e){return e.isDragRelevant(n,D.payload)}),D.relevantContainers=m,R=$e(m),A&&"function"==typeof A&&A({reset:!0,draggableInfo:void 0}),A=We(n,m),m.forEach(function(e){return e.prepareDrag(e,m)}),qe(!0),R(D),De().appendChild(x.ghost),we.start())}var z,Je=N=Ae=null;function Ke(e,t,n){void 0===e&&(e=0),void 0===t&&(t=1),void 0===n&&(n=!1);var o=x.ghost,i=x.topLeft,r=i.x,a=i.y,l=!D.container||D.container.shouldUseTransformForGhost(),s=l?"translate3d("+r+"px,"+a+"px, 0)":null;if(1!==t&&(s=s?s+" scale("+t+")":"scale("+t+")"),0<e)return x.ghost.style.transitionDuration=e+"ms",void requestAnimationFrame(function(){s&&(o.style.transform=s),l||(o.style.left=r+"px",o.style.top=a+"px"),Je=null,n&&(o.style.opacity="0")});null===Je&&(Je=requestAnimationFrame(function(){s&&(o.style.transform=s),l||(o.style.left=r+"px",o.style.top=a+"px"),Je=null,n&&(o.style.opacity="0")}))}function Qe(){var t;!S||ye||C||(be=!(ye=!0),t=Object.assign({},D,{targetElement:null,position:{x:Number.MAX_SAFE_INTEGER,y:Number.MAX_SAFE_INTEGER},mousePosition:{x:Number.MAX_SAFE_INTEGER,y:Number.MAX_SAFE_INTEGER}}),m.forEach(function(e){e.handleDrag(t)}),D&&(D.targetElement=null,D.cancelDrop=!0,Ye(),ye=!1))}"undefined"!=typeof window&&"undefined"!=typeof window&&(n=window.document.head||window.document.getElementsByTagName("head")[0],(z=window.document.createElement("style")).id="dndrop-style-definitions",o=ge(o),z.type="text/css",z.styleSheet?z.styleSheet.cssText=o:z.appendChild(window.document.createTextNode(o)),n.appendChild(z));xe();var Ze={register:function(e){e=e,O.push(e),S&&D&&e.isDragRelevant(D.container,D.payload)&&(m.push(e),e.prepareDrag(e,m),A&&"function"==typeof A&&A({reset:!0,draggableInfo:void 0}),A=We(e,m),R=$e(m),e.handleDrag(D))},unregister:function(e){var t;e=e,O.splice(O.indexOf(e),1),S&&D&&(D.container===e&&e.fireRemoveElement(),D.targetElement===e.element&&(D.targetElement=null),-1<(t=m.indexOf(e))&&(m.splice(t,1),A&&"function"==typeof A&&A({reset:!0,draggableInfo:void 0}),A=We(e,m),R=$e(m)))},isDragging:function(){return S},cancelDrag:Qe};function et(e,t,n){void 0===n&&(n=b.animationDuration),t?(E(e,j),e.style.transitionDuration=n+"ms"):(c(e,j),e.style.removeProperty("transition-duration"))}function tt(i){var r=[];return Array.prototype.forEach.call(i.children,function(e){var t,n,o;e.nodeType===Node.ELEMENT_NODE?(U(t=e,v)||(n=e,t=L.wrapChild?((o=window.document.createElement("div")).className=""+v,n.parentElement.insertBefore(o,n),o.appendChild(n),o):n),t[u]=0,r.push(t)):i.removeChild(e)}),r}function nt(e){function s(e,t,n,o,i){return void 0===i&&(i=!1),o<n?n:n===o?(l=(r=u.getBeginEnd(e[n])).begin,r=r.end,!i||t<(r+l)/2?n:n+1):(r=Math.floor((o+n)/2),a=(l=u.getBeginEnd(e[r])).begin,l=l.end,t<a?s(e,t,n,r-1,i):l<t?s(e,t,r+1,o,i):!i||t<(l+a)/2?r:r+1);var r,a,l}var u=e.layout;return function(e,t,n){return s(e,t,0,e.length-1,n=void 0===n?!1:n)}}function ot(e){var t,n,o,i=e.element,r=e.draggables,a=e.layout,l=e.getOptions,s=(t=(e={element:i,draggables:r,layout:a,getOptions:l}).element,n=e.draggables,o=e.layout,function(){n.forEach(function(e){et(e,!1),o.setTranslation(e,0),o.setVisibility(e,!0)}),t[d]&&(t[d].parentNode.removeChild(t[d]),t[d]=null)}),u=(L.dropHandler||$)({element:i,draggables:r,layout:a,getOptions:l});return function(e,t,n){var o=t.addedIndex,t=t.removedIndex;if(void 0===n&&(n=!1),s(),e&&!e.cancelDrop)if(e.targetElement||l().removeOnDropOut||n){var n=function(e){return null!==e},o=n(o)?n(t)&&t<o?o-1:o:null,i=e.payload,r=e.element,i={removedIndex:t,addedIndex:o,payload:i,element:r.firstElementChild||r};(!e.container.getOptions().fireRelatedEventsOnly||n(t)||n(o))&&u(i,l().onDrop)}else if(l().dropNotAllowed)return r=e.payload,t=e.container,l().dropNotAllowed({payload:r,container:t})}}function it(e){var n=e.element,o=e.getOptions,i=null;return function(e){var e=e.draggableInfo,t=i;return{removedIndex:t=null==i&&e.container.element===n&&"copy"!==o().behaviour?i=e.elementIndex:t}}}function rt(e){var t=e.draggables,n=e.layout;return function(e){e=e.dragResult;null!==e.removedIndex&&n.setVisibility(t[e.removedIndex],!1)}}function at(e){var n=e.element,o=e.layout;return function(e){var e=e.draggableInfo,t=document.elementFromPoint(e.position.x,e.position.y);if(t){t=function(e,t){for(var n=e;n;){if(n[F]){var o=n[F];if(t.some(function(e){return e===o}))return o}n=n.parentElement}return null}(t,e.relevantContainers);if(t&&t.element===n)return{pos:o.getPosition(e.position)}}return{pos:null}}}function lt(e){var n=e.layout,o=null;return function(e){var t=e.draggableInfo;return null===e.dragResult.pos?o=null:{elementSize:o=o||n.getSize(t.size)}}}function st(e){var o=e.element;return function(e){var t,n=e.draggableInfo,e=e.dragResult;n=n,t=o,void 0===(e=!!e.pos)&&(e=!0),t&&e?n.targetElement=t:n.targetElement===t&&(n.targetElement=null)}}function ut(){return function(e){return null!==e.dragResult.pos?{addedIndex:0}:{addedIndex:null}}}function dt(e){var t=e.layout,n=null;return function(e){var e=e.dragResult.addedIndex;return e!==n?(n=e,e=t.getBeginEndOfContainer().begin,{shadowBeginEnd:{rect:t.getTopLeftOfElementBegin(e)}}):null}}function ct(e){var u=e.layout,d=e.element,c=e.getOptions,f=null;return function(e){var t,n,o,i,e=e.dragResult,r=e.elementSize,a=e.shadowBeginEnd,l=e.addedIndex,e=e.dropPlaceholderContainer,s=c();return s.dropPlaceholder?(t=(s="boolean"==typeof s.dropPlaceholder?{}:s.dropPlaceholder).animationDuration,n=s.className,s=s.showOnTop,null!==l?(e||(o=document.createElement("div"),(i=document.createElement("div")).className=G,o.className=Y+" "+(n||k),(e=document.createElement("div")).className=H,e.style.position="absolute",void 0!==t&&(e.style.transition="all "+t+"ms ease"),e.appendChild(i),i.appendChild(o),u.setSize(e.style,r+"px"),e.style.pointerEvents="none",s?d.appendChild(e):d.insertBefore(e,d.firstElementChild)),f!==l&&a.dropArea&&u.setBegin(e.style,a.dropArea.begin-u.getBeginEndOfContainer().begin+"px"),f=l,{dropPlaceholderContainer:e}):(e&&null!==f&&d.removeChild(e),f=null,{dropPlaceholderContainer:void 0})):null}}function ft(e){var n=vt(e);return function(e){var t=e.draggableInfo,e=e.dragResult;return t.invalidateShadow?n({draggableInfo:t,dragResult:e}):null}}function gt(e){n=e.draggables,o=nt({layout:e.layout});var n,o,i=function(e){var e=e.dragResult,t=e.shadowBeginEnd,e=e.pos;return t?t.begin+t.beginAdjustment<=e&&t.end>=e?null:e<t.begin+t.beginAdjustment?o(n,e):e>t.end?o(n,e)+1:n.length:null!==(t=o(n,e,!0))?t:n.length};return function(e){var e=e.dragResult,t=null;return{addedIndex:t=null!==e.pos&&null===(t=i({dragResult:e}))?e.addedIndex:t}}}function pt(){var n=null;return function(e){var e=e.dragResult,t=e.addedIndex,e=e.shadowBeginEnd;t!==n&&null!==n&&e&&(e.beginAdjustment=0),n=t}}function mt(e){var o=e.element,i=e.draggables,r=e.layout,a=e.getOptions,l=null;return function(e){var e=e.dragResult,t=e.addedIndex,n=e.removedIndex,e=e.elementSize;if(null===n)if(null!==t){if(!l){n=r.getBeginEndOfContainer();n.end=n.begin+r.getSize(o);var t=r.getScrollSize(o)>r.getSize(o)?n.begin+r.getScrollSize(o)-r.getScrollValue(o):n.end,n=0<i.length?r.getBeginEnd(i[i.length-1]).end-i[i.length-1][u]:n.begin;if(t<n+e)return(l=window.document.createElement("div")).className=_+" "+a().orientation,n=0<i.length?e+n-t:e,r.setSize(l.style,n+"px"),o.appendChild(l),o[d]=l,{containerBoxChanged:!0}}}else if(l)return r.setTranslation(l,0),t=l,l=null,o.removeChild(t),{containerBoxChanged:!(o[d]=null)}}}function ht(e){var l=e.draggables,s=e.layout,u=null,d=null;return function(e){var e=e.dragResult,t=e.addedIndex,n=e.removedIndex,o=e.elementSize;if(t!==u||n!==d){for(var i,r,a=0;a<l.length;a++)a!==n&&(i=l[a],r=0,null!==n&&n<a&&(r-=o),null!==t&&t<=a&&(r+=o),s.setTranslation(i,r));return{addedIndex:u=t,removedIndex:d=n}}}}function vt(e){var c=e.draggables,f=e.layout,g=null;return function(e){var t,n,o,i,r,a=e.draggableInfo,e=e.dragResult,l=e.addedIndex,s=e.removedIndex,u=e.elementSize,d=e.pos,e=e.shadowBeginEnd;return null!==d?null===l||!a.invalidateShadow&&l===g?null:(d=l-1,a=Number.MIN_SAFE_INTEGER,n=t=0,o=i=null,d===s&&d--,t=-1<d?(r=f.getSize(c[d]),o=f.getBeginEnd(c[d]),a=u<r?o.end-(r-u)/2:o.end,o.end):(o={end:f.getBeginEndOfContainer().begin},f.getBeginEndOfContainer().begin),d=Number.MAX_SAFE_INTEGER,(r=l)===s&&r++,n=r<c.length?(s=f.getSize(c[r]),i=f.getBeginEnd(c[r]),d=u<s?i.begin+(s-u)/2:i.begin,i.begin):(i={begin:f.getContainerRectangles().rect.end},f.getContainerRectangles().rect.end-f.getContainerRectangles().rect.begin),r=o&&i?f.getTopLeftOfElementBegin(o.end):null,g=l,{shadowBeginEnd:{dropArea:{begin:t,end:n},begin:a,end:d,rect:r,beginAdjustment:e?e.beginAdjustment:0}}):{shadowBeginEnd:g=null}}}function yt(){var o=null;return function(e){var e=e.dragResult,t=e.pos,n=e.addedIndex,e=e.shadowBeginEnd;null!==t?null!=n&&null===o&&(t<e.begin&&(t=t-e.begin-5,e.beginAdjustment=t),o=n):o=null}}function bt(e){var e=e.getOptions,t=!1,n=e();return function(e){e=!!e.dragResult.pos;e!==t&&((t=e)?n.onDragEnter&&n.onDragEnter():n.onDragLeave&&n.onDragLeave())}}function wt(e){var e=e.getOptions,r=null,a=e();return function(e){var t,n=e.dragResult,o=n.addedIndex,n=n.removedIndex,e=e.draggableInfo,i=e.payload,e=e.element;a.onDropReady&&null!==o&&r!==o&&(t=r=o,null!==n&&n<o&&t--,a.onDropReady({addedIndex:t,removedIndex:n,payload:i,element:e?e.firstElementChild||e:void 0}))}}function Et(e){return"drop-zone"===e.getOptions().behaviour?xt(e)(it,rt,at,lt,st,ut,dt,bt,wt):xt(e)(it,rt,at,lt,st,ft,gt,pt,mt,ht,vt,ct,yt,bt,wt)}function xt(n){return function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var o=e.map(function(e){return e(n)}),i=null;return function(n){return i=o.reduce(function(e,t){return Object.assign(e,t({draggableInfo:n,dragResult:e}))},i||{addedIndex:null,removedIndex:null,elementSize:null,pos:null,shadowBeginEnd:null})}}}function Dt(h){return function(e){var t,n,o,i,r,a=Object.assign({},b,e),l=null,s=null,u=(e=m,o=tt(t=h),n=e(),E(t,y+" "+n.orientation),{element:t,draggables:o,getOptions:e,layout:re(t,n.orientation,n.animationDuration)}),d=Et(u),c=ot(u),f=Q(h,function(){u.layout.invalidateRects(),g()});function g(){null!==s&&(s.invalidateShadow=!0,l=d(s),s.invalidateShadow=!1)}function p(e,t){for(var n=tt(t),o=0;o<n.length;o++)e[o]=n[o];for(var i=0;i<e.length-n.length;i++)e.pop()}function m(){return a}return{element:h,draggables:u.draggables,isDragRelevant:(i=(o=u).element,r=o.getOptions,function(e,t){var n=r();if(n.shouldAcceptDrop)return n.shouldAcceptDrop(e.getOptions(),t);t=e.getOptions();return"copy"!==n.behaviour&&(w(i,"."+v)!==e.element&&(e.element===i||!(!t.groupName||t.groupName!==n.groupName)))}),layout:u.layout,dispose:function(e){var t;f.dispose(),t=e.element,L.wrapChild&&Array.prototype.forEach.call(t.children,function(e){e.nodeType===Node.ELEMENT_NODE&&U(e,v)&&(t.insertBefore(e.firstElementChild,e),t.removeChild(e))})},prepareDrag:function(e,t){var n=e.element,o=u.draggables;p(o,n),e.layout.invalidateRects(),o.forEach(function(e){return et(e,!0,a.animationDuration)}),f.start()},handleDrag:function(e){return l=d(s=e)},handleDrop:function(e){f.stop(),l&&l.dropPlaceholderContainer&&h.removeChild(l.dropPlaceholderContainer),s=null,d=Et(u),c(e,l),l=null},fireRemoveElement:function(){c(s,Object.assign({},l,{addedIndex:null}),!0),l=null},getDragResult:function(){return l},getTranslateCalculator:function(e){return ht(u)(e)},onTranslated:function(){g()},setDraggables:function(){p(u.draggables,h)},getScrollMaxSpeed:function(){return L.maxScrollSpeed},shouldUseTransformForGhost:function(){return!0===L.useTransformForGhost},getOptions:m,setOptions:function(e,t){a=!1===(t=void 0===t?!0:t)?Object.assign({},b,e):Object.assign({},b,a,e)}}}}var L=function(e,t){var n=Dt(e)(t);return e[F]=n,Ze.register(n),{dispose:function(){Ze.unregister(n),n.dispose(n)},setOptions:function(e,t){n.setOptions(e,t)}}};L.wrapChild=!0,L.cancelDrag=function(){Ze.cancelDrag()},L.isDragging=function(){return Ze.isDragging()};function Ot(e,t){var n,e=e.$props.tag;if(e){if("string"==typeof e)return n={value:e},t&&(n.props={class:t}),n;if("object"==typeof e)return n={value:e.value||"div",props:e.props||{}},t&&(n.props.class?(e=n.props.class,"[object Array]"===Object.prototype.toString.call(e)?n.props.class.push(t):n.props.class=[t,n.props.class]):n.props.class=t),n}return{value:"div"}}function St(e){return!e||("string"==typeof e||"object"==typeof e&&("string"==typeof e.value||"function"==typeof e.value||"object"==typeof e.value))}L.dropHandler=function(){return function(e,t){t&&t(e)}},L.wrapChild=!1;var Ct={drop:"onDrop","drag-end":"onDragEnd","drag-start":"onDragStart","drag-enter":"onDragEnter","drag-leave":"onDragLeave","drop-ready":"onDropReady","drop-not-allowed":"dropNotAllowed"};function Rt(e){var i,r,t=Object.assign({},e.$props,e.$attrs);return i=t,r=e,Object.keys(i).reduce(function(e,t){var n=t,o=i[n];return void 0!==o&&("function"==typeof o?Ct[n]?e[Ct[n]]=function(e){r.$emit(n,e)}:e[n]=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return o.apply(void 0,e)}:e[n]=o),e},{})}o={name:"Container",mounted:function(){this.containerElement=this.$refs.container||this.$el,this.container=L(this.containerElement,Rt(this))},updated:function(){if(this.$refs.container!==this.containerElement&&this.$el!==this.containerElement)return this.container&&this.container.dispose(),this.containerElement=this.$refs.container||this.$el,void(this.container=L(this.containerElement,Rt(this)));this.container.setOptions(Rt(this))},destroyed:function(){this.container&&this.container.dispose()},props:{behaviour:String,groupName:String,orientation:String,dragHandleSelector:String,nonDragAreaSelector:String,dragBeginDelay:Number,animationDuration:Number,autoScrollEnabled:{type:Boolean,default:!0},lockAxis:String,dragClass:String,dropClass:String,removeOnDropOut:{type:Boolean,default:!1},"drag-start":Function,"drag-end":Function,drop:Function,getChildPayload:Function,shouldAnimateDrop:Function,fireRelatedEventsOnly:{type:Boolean,default:!1},shouldAcceptDrop:Function,"drag-enter":Function,"drag-leave":Function,tag:{validator:St,default:"div"},getGhostParent:Function,"drop-ready":Function,dropPlaceholder:[Object,Boolean]},render:function(){var e=Ot(this);return M.h(e.value,Object.assign({},{ref:"container"},e.props),this.$slots.default())}},n={name:"Draggable",props:{tag:{validator:St,default:"div"},dragNotAllowed:{type:Boolean,default:!1}},render:function(){return e=M.h,n=Ot(t=this,["dndrop-draggable-wrapper",t.dragNotAllowed?"dndrop-not-draggable":""]),e(n.value,Object.assign({},n.props),t.$slots.default());var e,t,n}};e.Container=o,e.Draggable=n,e.smoothDnD=L,Object.defineProperty(e,"__esModule",{value:!0})});
{
"name": "vue-dndrop",
"version": "1.2.6",
"version": "1.2.7",
"description": "Vue wrappers for drag and drop",

@@ -21,2 +21,5 @@ "author": "amendx && kutlugsahin",

"Vue.js",
"vue3",
"vue3.js",
"vue 3.x",
"sortable",

@@ -23,0 +26,0 @@ "drag and drop",

@@ -46,3 +46,3 @@ <p align="center">

```shell
npm i vue-dndrop
npm i vue-dndrop@next
```

@@ -115,7 +115,7 @@

Component that contains the draggable elements or components. Each of its children should be wrapped by **Draggable** component
> Component that contains the draggable elements or components. Each of its children should be wrapped by **Draggable** component
### Properties
Properties define the visual behaviour of the library:
> Properties define the visual behaviour of the library:

@@ -142,4 +142,4 @@ | Property | Type | Default | Description |

Tag name or the node definition to render the root element of the Container.
Default value is 'div'.
> Tag name or the node definition to render the root element of the Container.
> Default value is 'div'.

@@ -165,3 +165,3 @@ ```ts

The lifecycle of a drag is both described, and can be controlled, by a series of [callbacks](#callbacks) and [events](#events), which are illustrated below for a example **containing 3 containers**:
> The lifecycle of a drag is both described, and can be controlled, by a series of [callbacks](#callbacks) and [events](#events), which are illustrated below for a example **containing 3 containers**:

@@ -234,11 +234,11 @@ ```

This can provide handler functions context-sensitive data, such as the loop index or current item.
> This can provide handler functions context-sensitive data, such as the loop index or current item.
## Callbacks
Callbacks provide additional logic and checks before and during user interaction.
> Callbacks provide additional logic and checks before and during user interaction.
### `get-child-payload()`
The function to be called to get the payload object to be passed **onDrop** function.
> The function to be called to get the payload object to be passed **onDrop** function.

@@ -267,3 +267,3 @@ ```jsx

The function to be called by all containers before drag starts to determine the containers to which the drop is possible. Setting this function will override the **group-name** property and only the return value of this function will be taken into account.
> The function to be called by all containers before drag starts to determine the containers to which the drop is possible. Setting this function will override the **group-name** property and only the return value of this function will be taken into account.

@@ -291,4 +291,4 @@ ```jsx

The function to be called by the target container to which the dragged item will be dropped.
Sometimes dragged item's dimensions are not suitable with the target container and dropping animation can be wierd. So it can be disabled by returning **false**. If not set drop animations are enabled.
> The function to be called by the target container to which the dragged item will be dropped.
> Sometimes dragged item's dimensions are not suitable with the target container and dropping animation can be wierd. So it can be disabled by returning **false**. If not set drop animations are enabled.

@@ -316,5 +316,5 @@ ```jsx

The function to be called to get the element that the dragged ghost will be appended. Default parent element is the container itself.
The ghost element is positioned as 'fixed' and appended to given parent element.
But if any anchestor of container has a transform property, ghost element will be positioned relative to that element which breaks the calculations. Thats why if you have any transformed parent element of Containers you should set this property so that it returns any element that has not transformed parent element.
> The function to be called to get the element that the dragged ghost will be appended. Default parent element is the container itself.
> The ghost element is positioned as 'fixed' and appended to given parent element.
> But if any anchestor of container has a transform property, ghost element will be positioned relative to that element which breaks the calculations. Thats why if you have any transformed parent element of Containers you should set this property so that it returns any element that has not transformed parent element.

@@ -339,7 +339,7 @@ ```jsx

Events may call user-defined handlers at particular points in the drag-and-drop lifecycle.
> Events may call user-defined handlers at particular points in the drag-and-drop lifecycle.
### `@drag-start`
Event to be emitted by all containers on drag start.
> Event to be emitted by all containers on drag start.

@@ -366,3 +366,3 @@ ```jsx

The function to be called by all containers on drag end. Called before [drop](#drop) event.
> The function to be called by all containers on drag end. Called before [drop](#drop) event.

@@ -403,3 +403,3 @@ ```jsx

The event to be emitted by the relevant container whenever a dragged item leaves its boundaries while dragging.
> The event to be emitted by the relevant container whenever a dragged item leaves its boundaries while dragging.

@@ -418,3 +418,3 @@ ```jsx

The function to be called by the container which is being drag over, when the index of possible drop position changed in container. Basically it is called each time the draggables in a container slides for opening a space for dragged item. **dropResult** is the only parameter passed to the function which contains the following properties.
> The function to be called by the container which is being drag over, when the index of possible drop position changed in container. Basically it is called each time the draggables in a container slides for opening a space for dragged item. **dropResult** is the only parameter passed to the function which contains the following properties.

@@ -442,3 +442,3 @@ ```jsx

The event to be emitted by any relevant container when drop is over. (After drop animation ends). Source container and any container that could accept drop is considered relevant.
> The event to be emitted by any relevant container when drop is over. (After drop animation ends). Source container and any container that could accept drop is considered relevant.

@@ -467,3 +467,3 @@ ```jsx

Event to be emitted by the current container when drop is not allowed or does not fit the rule applied inside the column/element validation.
> Event to be emitted by the current container when drop is not allowed or does not fit the rule applied inside the column/element validation.

@@ -501,4 +501,4 @@ ```jsx

Tag name or the node definition to render the root element of the Draggable.
Default value is 'div'.
> Tag name or the node definition to render the root element of the Draggable.
> Default value is 'div'.

@@ -505,0 +505,0 @@ ```jsx

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

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