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.0.7 to 1.0.8

2

dist/vue-dndrop.min.js

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

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

@@ -5,0 +5,0 @@ "author": "amendx && kutlugsahin",

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