mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-08 09:27:19 +08:00
7 lines
36 KiB
JavaScript
7 lines
36 KiB
JavaScript
/**!
|
|
* Sortable 1.15.1
|
|
* @author RubaXa <trash@rubaxa.org>
|
|
* @author owenm <owen23355@gmail.com>
|
|
* @license MIT
|
|
*/function se(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);t&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),e.push.apply(e,o)}return e}function j(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?se(Object(e),!0).forEach(function(o){Me(n,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):se(Object(e)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(e,o))})}return n}function Ft(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ft=function(t){return typeof t}:Ft=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ft(n)}function Me(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function q(){return q=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}return n},q.apply(this,arguments)}function Fe(n,t){if(n==null)return{};var e={},o=Object.keys(n),i,r;for(r=0;r<o.length;r++)i=o[r],!(t.indexOf(i)>=0)&&(e[i]=n[i]);return e}function Re(n,t){if(n==null)return{};var e=Fe(n,t),o,i;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(n,o)&&(e[o]=n[o])}return e}var Xe="1.15.1";function $(n){if(typeof window!="undefined"&&window.navigator)return!!navigator.userAgent.match(n)}var K=$(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ot=$(/Edge/i),ue=$(/firefox/i),St=$(/safari/i)&&!$(/chrome/i)&&!$(/android/i),ve=$(/iP(ad|od|hone)/i),be=$(/chrome/i)&&$(/android/i),we={capture:!1,passive:!1};function w(n,t,e){n.addEventListener(t,e,!K&&we)}function b(n,t,e){n.removeEventListener(t,e,!K&&we)}function Bt(n,t){if(t){if(t[0]===">"&&(t=t.substring(1)),n)try{if(n.matches)return n.matches(t);if(n.msMatchesSelector)return n.msMatchesSelector(t);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function Ye(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function L(n,t,e,o){if(n){e=e||document;do{if(t!=null&&(t[0]===">"?n.parentNode===e&&Bt(n,t):Bt(n,t))||o&&n===e)return n;if(n===e)break}while(n=Ye(n))}return null}var fe=/\s+/g;function A(n,t,e){if(n&&t)if(n.classList)n.classList[e?"add":"remove"](t);else{var o=(" "+n.className+" ").replace(fe," ").replace(" "+t+" "," ");n.className=(o+(e?" "+t:"")).replace(fe," ")}}function h(n,t,e){var o=n&&n.style;if(o){if(e===void 0)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(e=n.currentStyle),t===void 0?e:e[t];!(t in o)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),o[t]=e+(typeof e=="string"?"":"px")}}function ct(n,t){var e="";if(typeof n=="string")e=n;else do{var o=h(n,"transform");o&&o!=="none"&&(e=o+" "+e)}while(!t&&(n=n.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(e)}function Ee(n,t,e){if(n){var o=n.getElementsByTagName(t),i=0,r=o.length;if(e)for(;i<r;i++)e(o[i],i);return o}return[]}function z(){var n=document.scrollingElement;return n||document.documentElement}function C(n,t,e,o,i){if(!(!n.getBoundingClientRect&&n!==window)){var r,a,l,s,u,c,d;if(n!==window&&n.parentNode&&n!==z()?(r=n.getBoundingClientRect(),a=r.top,l=r.left,s=r.bottom,u=r.right,c=r.height,d=r.width):(a=0,l=0,s=window.innerHeight,u=window.innerWidth,c=window.innerHeight,d=window.innerWidth),(t||e)&&n!==window&&(i=i||n.parentNode,!K))do if(i&&i.getBoundingClientRect&&(h(i,"transform")!=="none"||e&&h(i,"position")!=="static")){var m=i.getBoundingClientRect();a-=m.top+parseInt(h(i,"border-top-width")),l-=m.left+parseInt(h(i,"border-left-width")),s=a+r.height,u=l+r.width;break}while(i=i.parentNode);if(o&&n!==window){var y=ct(i||n),v=y&&y.a,E=y&&y.d;y&&(a/=E,l/=v,d/=v,c/=E,s=a+c,u=l+d)}return{top:a,left:l,bottom:s,right:u,width:d,height:c}}}function ye(n){var t=C(n),e=parseInt(h(n,"padding-left")),o=parseInt(h(n,"padding-top")),i=parseInt(h(n,"padding-right")),r=parseInt(h(n,"padding-bottom"));return t.top+=o+parseInt(h(n,"border-top-width")),t.left+=e+parseInt(h(n,"border-left-width")),t.width=n.clientWidth-e-i,t.height=n.clientHeight-o-r,t.bottom=t.top+t.height,t.right=t.left+t.width,t}function de(n,t,e){for(var o=et(n,!0),i=C(n)[t];o;){var r=C(o)[e],a=void 0;if(e==="top"||e==="left"?a=i>=r:a=i<=r,!a)return o;if(o===z())break;o=et(o,!1)}return!1}function ht(n,t,e,o){for(var i=0,r=0,a=n.children;r<a.length;){if(a[r].style.display!=="none"&&a[r]!==p.ghost&&(o||a[r]!==p.dragged)&&L(a[r],e.draggable,n,!1)){if(i===t)return a[r];i++}r++}return null}function ie(n,t){for(var e=n.lastElementChild;e&&(e===p.ghost||h(e,"display")==="none"||t&&!Bt(e,t));)e=e.previousElementSibling;return e||null}function M(n,t){var e=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==p.clone&&(!t||Bt(n,t))&&e++;return e}function ce(n){var t=0,e=0,o=z();if(n)do{var i=ct(n),r=i.a,a=i.d;t+=n.scrollLeft*r,e+=n.scrollTop*a}while(n!==o&&(n=n.parentNode));return[t,e]}function ke(n,t){for(var e in n)if(n.hasOwnProperty(e)){for(var o in t)if(t.hasOwnProperty(o)&&t[o]===n[e][o])return Number(e)}return-1}function et(n,t){if(!n||!n.getBoundingClientRect)return z();var e=n,o=!1;do if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){var i=h(e);if(e.clientWidth<e.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||e.clientHeight<e.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!e.getBoundingClientRect||e===document.body)return z();if(o||t)return e;o=!0}}while(e=e.parentNode);return z()}function Be(n,t){if(n&&t)for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function jt(n,t){return Math.round(n.top)===Math.round(t.top)&&Math.round(n.left)===Math.round(t.left)&&Math.round(n.height)===Math.round(t.height)&&Math.round(n.width)===Math.round(t.width)}var Dt;function Se(n,t){return function(){if(!Dt){var e=arguments,o=this;e.length===1?n.call(o,e[0]):n.apply(o,e),Dt=setTimeout(function(){Dt=void 0},t)}}}function He(){clearTimeout(Dt),Dt=void 0}function De(n,t,e){n.scrollLeft+=t,n.scrollTop+=e}function _e(n){var t=window.Polymer,e=window.jQuery||window.Zepto;return t&&t.dom?t.dom(n).cloneNode(!0):e?e(n).clone(!0)[0]:n.cloneNode(!0)}var Y="Sortable"+new Date().getTime();function We(){var n=[],t;return{captureAnimationState:function(){if(n=[],!!this.options.animation){var o=[].slice.call(this.el.children);o.forEach(function(i){if(!(h(i,"display")==="none"||i===p.ghost)){n.push({target:i,rect:C(i)});var r=j({},n[n.length-1].rect);if(i.thisAnimationDuration){var a=ct(i,!0);a&&(r.top-=a.f,r.left-=a.e)}i.fromRect=r}})}},addAnimationState:function(o){n.push(o)},removeAnimationState:function(o){n.splice(ke(n,{target:o}),1)},animateAll:function(o){var i=this;if(!this.options.animation){clearTimeout(t),typeof o=="function"&&o();return}var r=!1,a=0;n.forEach(function(l){var s=0,u=l.target,c=u.fromRect,d=C(u),m=u.prevFromRect,y=u.prevToRect,v=l.rect,E=ct(u,!0);E&&(d.top-=E.f,d.left-=E.e),u.toRect=d,u.thisAnimationDuration&&jt(m,d)&&!jt(c,d)&&(v.top-d.top)/(v.left-d.left)===(c.top-d.top)/(c.left-d.left)&&(s=Le(v,m,y,i.options)),jt(d,c)||(u.prevFromRect=c,u.prevToRect=d,s||(s=i.options.animation),i.animate(u,v,d,s)),s&&(r=!0,a=Math.max(a,s),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},s),u.thisAnimationDuration=s)}),clearTimeout(t),r?t=setTimeout(function(){typeof o=="function"&&o()},a):typeof o=="function"&&o(),n=[]},animate:function(o,i,r,a){if(a){h(o,"transition",""),h(o,"transform","");var l=ct(this.el),s=l&&l.a,u=l&&l.d,c=(i.left-r.left)/(s||1),d=(i.top-r.top)/(u||1);o.animatingX=!!c,o.animatingY=!!d,h(o,"transform","translate3d("+c+"px,"+d+"px,0)"),this.forRepaintDummy=Ge(o),h(o,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),h(o,"transform","translate3d(0,0,0)"),typeof o.animated=="number"&&clearTimeout(o.animated),o.animated=setTimeout(function(){h(o,"transition",""),h(o,"transform",""),o.animated=!1,o.animatingX=!1,o.animatingY=!1},a)}}}}function Ge(n){return n.offsetWidth}function Le(n,t,e,o){return Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))/Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))*o.animation}var st=[],qt={initializeByDefault:!0},It={mount:function(t){for(var e in qt)qt.hasOwnProperty(e)&&!(e in t)&&(t[e]=qt[e]);st.forEach(function(o){if(o.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),st.push(t)},pluginEvent:function(t,e,o){var i=this;this.eventCanceled=!1,o.cancel=function(){i.eventCanceled=!0};var r=t+"Global";st.forEach(function(a){e[a.pluginName]&&(e[a.pluginName][r]&&e[a.pluginName][r](j({sortable:e},o)),e.options[a.pluginName]&&e[a.pluginName][t]&&e[a.pluginName][t](j({sortable:e},o)))})},initializePlugins:function(t,e,o,i){st.forEach(function(l){var s=l.pluginName;if(!(!t.options[s]&&!l.initializeByDefault)){var u=new l(t,e,t.options);u.sortable=t,u.options=t.options,t[s]=u,q(o,u.defaults)}});for(var r in t.options)if(t.options.hasOwnProperty(r)){var a=this.modifyOption(t,r,t.options[r]);typeof a!="undefined"&&(t.options[r]=a)}},getEventProperties:function(t,e){var o={};return st.forEach(function(i){typeof i.eventProperties=="function"&&q(o,i.eventProperties.call(e[i.pluginName],t))}),o},modifyOption:function(t,e,o){var i;return st.forEach(function(r){t[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[e]=="function"&&(i=r.optionListeners[e].call(t[r.pluginName],o))}),i}};function ze(n){var t=n.sortable,e=n.rootEl,o=n.name,i=n.targetEl,r=n.cloneEl,a=n.toEl,l=n.fromEl,s=n.oldIndex,u=n.newIndex,c=n.oldDraggableIndex,d=n.newDraggableIndex,m=n.originalEvent,y=n.putSortable,v=n.extraEventProperties;if(t=t||e&&e[Y],!!t){var E,B=t.options,U="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!K&&!Ot?E=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(E=document.createEvent("Event"),E.initEvent(o,!0,!0)),E.to=a||e,E.from=l||e,E.item=i||e,E.clone=r,E.oldIndex=s,E.newIndex=u,E.oldDraggableIndex=c,E.newDraggableIndex=d,E.originalEvent=m,E.pullMode=y?y.lastPutMode:void 0;var P=j(j({},v),It.getEventProperties(o,t));for(var H in P)E[H]=P[H];e&&e.dispatchEvent(E),B[U]&&B[U].call(t,E)}}var je=["evt"],x=function(t,e){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.evt,r=Re(o,je);It.pluginEvent.bind(p)(t,e,j({dragEl:f,parentEl:_,ghostEl:g,rootEl:S,nextEl:lt,lastDownEl:Rt,cloneEl:D,cloneHidden:tt,dragStarted:wt,putSortable:O,activeSortable:p.active,originalEvent:i,oldIndex:dt,oldDraggableIndex:_t,newIndex:X,newDraggableIndex:J,hideGhostForTarget:Ie,unhideGhostForTarget:Ae,cloneNowHidden:function(){tt=!0},cloneNowShown:function(){tt=!1},dispatchSortableEvent:function(l){N({sortable:e,name:l,originalEvent:i})}},r))};function N(n){ze(j({putSortable:O,cloneEl:D,targetEl:f,rootEl:S,oldIndex:dt,oldDraggableIndex:_t,newIndex:X,newDraggableIndex:J},n))}var f,_,g,S,lt,Rt,D,tt,dt,X,_t,J,Pt,O,ft=!1,Ht=!1,Wt=[],rt,W,Ut,Vt,he,pe,wt,ut,Tt,Ct=!1,Nt=!1,Xt,I,$t=[],te=!1,Gt=[],zt=typeof document!="undefined",xt=ve,ge=Ot||K?"cssFloat":"float",qe=zt&&!be&&!ve&&"draggable"in document.createElement("div"),Te=function(){if(zt){if(K)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}}(),Ce=function(t,e){var o=h(t),i=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),r=ht(t,0,e),a=ht(t,1,e),l=r&&h(r),s=a&&h(a),u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+C(r).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+C(a).width;if(o.display==="flex")return o.flexDirection==="column"||o.flexDirection==="column-reverse"?"vertical":"horizontal";if(o.display==="grid")return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&l.float&&l.float!=="none"){var d=l.float==="left"?"left":"right";return a&&(s.clear==="both"||s.clear===d)?"vertical":"horizontal"}return r&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||u>=i&&o[ge]==="none"||a&&o[ge]==="none"&&u+c>i)?"vertical":"horizontal"},Ue=function(t,e,o){var i=o?t.left:t.top,r=o?t.right:t.bottom,a=o?t.width:t.height,l=o?e.left:e.top,s=o?e.right:e.bottom,u=o?e.width:e.height;return i===l||r===s||i+a/2===l+u/2},Ve=function(t,e){var o;return Wt.some(function(i){var r=i[Y].options.emptyInsertThreshold;if(!(!r||ie(i))){var a=C(i),l=t>=a.left-r&&t<=a.right+r,s=e>=a.top-r&&e<=a.bottom+r;if(l&&s)return o=i}}),o},Oe=function(t){function e(r,a){return function(l,s,u,c){var d=l.options.group.name&&s.options.group.name&&l.options.group.name===s.options.group.name;if(r==null&&(a||d))return!0;if(r==null||r===!1)return!1;if(a&&r==="clone")return r;if(typeof r=="function")return e(r(l,s,u,c),a)(l,s,u,c);var m=(a?l:s).options.group.name;return r===!0||typeof r=="string"&&r===m||r.join&&r.indexOf(m)>-1}}var o={},i=t.group;(!i||Ft(i)!="object")&&(i={name:i}),o.name=i.name,o.checkPull=e(i.pull,!0),o.checkPut=e(i.put),o.revertClone=i.revertClone,t.group=o},Ie=function(){!Te&&g&&h(g,"display","none")},Ae=function(){!Te&&g&&h(g,"display","")};zt&&!be&&document.addEventListener("click",function(n){if(Ht)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),Ht=!1,!1},!0);var at=function(t){if(f){t=t.touches?t.touches[0]:t;var e=Ve(t.clientX,t.clientY);if(e){var o={};for(var i in t)t.hasOwnProperty(i)&&(o[i]=t[i]);o.target=o.rootEl=e,o.preventDefault=void 0,o.stopPropagation=void 0,e[Y]._onDragOver(o)}}},$e=function(t){f&&f.parentNode[Y]._isOutsideThisEl(t.target)};function p(n,t){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=t=q({},t),n[Y]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ce(n,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,l){a.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:p.supportPointer!==!1&&"PointerEvent"in window&&!St,emptyInsertThreshold:5};It.initializePlugins(this,n,e);for(var o in e)!(o in t)&&(t[o]=e[o]);Oe(t);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=t.forceFallback?!1:qe,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?w(n,"pointerdown",this._onTapStart):(w(n,"mousedown",this._onTapStart),w(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(w(n,"dragover",this),w(n,"dragenter",this)),Wt.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),q(this,We())}p.prototype={constructor:p,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(ut=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,f):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,o=this.el,i=this.options,r=i.preventOnFilter,a=t.type,l=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,s=(l||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,c=i.filter;if(on(o),!f&&!(/mousedown|pointerdown/.test(a)&&t.button!==0||i.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&St&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=L(s,i.draggable,o,!1),!(s&&s.animated)&&Rt!==s)){if(dt=M(s),_t=M(s,i.draggable),typeof c=="function"){if(c.call(this,t,s,this)){N({sortable:e,rootEl:u,name:"filter",targetEl:s,toEl:o,fromEl:o}),x("filter",e,{evt:t}),r&&t.cancelable&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(d){if(d=L(u,d.trim(),o,!1),d)return N({sortable:e,rootEl:d,name:"filter",targetEl:s,fromEl:o,toEl:o}),x("filter",e,{evt:t}),!0}),c)){r&&t.cancelable&&t.preventDefault();return}i.handle&&!L(u,i.handle,o,!1)||this._prepareDragStart(t,l,s)}}},_prepareDragStart:function(t,e,o){var i=this,r=i.el,a=i.options,l=r.ownerDocument,s;if(o&&!f&&o.parentNode===r){var u=C(o);if(S=r,f=o,_=f.parentNode,lt=f.nextSibling,Rt=o,Pt=a.group,p.dragged=f,rt={target:f,clientX:(e||t).clientX,clientY:(e||t).clientY},he=rt.clientX-u.left,pe=rt.clientY-u.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,f.style["will-change"]="all",s=function(){if(x("delayEnded",i,{evt:t}),p.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!ue&&i.nativeDraggable&&(f.draggable=!0),i._triggerDragStart(t,e),N({sortable:i,name:"choose",originalEvent:t}),A(f,a.chosenClass,!0)},a.ignore.split(",").forEach(function(c){Ee(f,c.trim(),Kt)}),w(l,"dragover",at),w(l,"mousemove",at),w(l,"touchmove",at),w(l,"mouseup",i._onDrop),w(l,"touchend",i._onDrop),w(l,"touchcancel",i._onDrop),ue&&this.nativeDraggable&&(this.options.touchStartThreshold=4,f.draggable=!0),x("delayStart",this,{evt:t}),a.delay&&(!a.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(Ot||K))){if(p.eventCanceled){this._onDrop();return}w(l,"mouseup",i._disableDelayedDrag),w(l,"touchend",i._disableDelayedDrag),w(l,"touchcancel",i._disableDelayedDrag),w(l,"mousemove",i._delayedDragTouchMoveHandler),w(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&w(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(s,a.delay)}else s()}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){f&&Kt(f),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;b(t,"mouseup",this._disableDelayedDrag),b(t,"touchend",this._disableDelayedDrag),b(t,"touchcancel",this._disableDelayedDrag),b(t,"mousemove",this._delayedDragTouchMoveHandler),b(t,"touchmove",this._delayedDragTouchMoveHandler),b(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?w(document,"pointermove",this._onTouchMove):e?w(document,"touchmove",this._onTouchMove):w(document,"mousemove",this._onTouchMove):(w(f,"dragend",this),w(S,"dragstart",this._onDragStart));try{document.selection?Yt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(o){}},_dragStarted:function(t,e){if(ft=!1,S&&f){x("dragStarted",this,{evt:e}),this.nativeDraggable&&w(document,"dragover",$e);var o=this.options;!t&&A(f,o.dragClass,!1),A(f,o.ghostClass,!0),p.active=this,t&&this._appendGhost(),N({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(W){this._lastX=W.clientX,this._lastY=W.clientY,Ie();for(var t=document.elementFromPoint(W.clientX,W.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(W.clientX,W.clientY),t!==e);)e=t;if(f.parentNode[Y]._isOutsideThisEl(t),e)do{if(e[Y]){var o=void 0;if(o=e[Y]._onDragOver({clientX:W.clientX,clientY:W.clientY,target:t,rootEl:e}),o&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Ae()}},_onTouchMove:function(t){if(rt){var e=this.options,o=e.fallbackTolerance,i=e.fallbackOffset,r=t.touches?t.touches[0]:t,a=g&&ct(g,!0),l=g&&a&&a.a,s=g&&a&&a.d,u=xt&&I&&ce(I),c=(r.clientX-rt.clientX+i.x)/(l||1)+(u?u[0]-$t[0]:0)/(l||1),d=(r.clientY-rt.clientY+i.y)/(s||1)+(u?u[1]-$t[1]:0)/(s||1);if(!p.active&&!ft){if(o&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<o)return;this._onDragStart(t,!0)}if(g){a?(a.e+=c-(Ut||0),a.f+=d-(Vt||0)):a={a:1,b:0,c:0,d:1,e:c,f:d};var m="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");h(g,"webkitTransform",m),h(g,"mozTransform",m),h(g,"msTransform",m),h(g,"transform",m),Ut=c,Vt=d,W=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!g){var t=this.options.fallbackOnBody?document.body:S,e=C(f,!0,xt,!0,t),o=this.options;if(xt){for(I=t;h(I,"position")==="static"&&h(I,"transform")==="none"&&I!==document;)I=I.parentNode;I!==document.body&&I!==document.documentElement?(I===document&&(I=z()),e.top+=I.scrollTop,e.left+=I.scrollLeft):I=z(),$t=ce(I)}g=f.cloneNode(!0),A(g,o.ghostClass,!1),A(g,o.fallbackClass,!0),A(g,o.dragClass,!0),h(g,"transition",""),h(g,"transform",""),h(g,"box-sizing","border-box"),h(g,"margin",0),h(g,"top",e.top),h(g,"left",e.left),h(g,"width",e.width),h(g,"height",e.height),h(g,"opacity","0.8"),h(g,"position",xt?"absolute":"fixed"),h(g,"zIndex","100000"),h(g,"pointerEvents","none"),p.ghost=g,t.appendChild(g),h(g,"transform-origin",he/parseInt(g.style.width)*100+"% "+pe/parseInt(g.style.height)*100+"%")}},_onDragStart:function(t,e){var o=this,i=t.dataTransfer,r=o.options;if(x("dragStart",this,{evt:t}),p.eventCanceled){this._onDrop();return}x("setupClone",this),p.eventCanceled||(D=_e(f),D.removeAttribute("id"),D.draggable=!1,D.style["will-change"]="",this._hideClone(),A(D,this.options.chosenClass,!1),p.clone=D),o.cloneId=Yt(function(){x("clone",o),!p.eventCanceled&&(o.options.removeCloneOnHide||S.insertBefore(D,f),o._hideClone(),N({sortable:o,name:"clone"}))}),!e&&A(f,r.dragClass,!0),e?(Ht=!0,o._loopId=setInterval(o._emulateDragOver,50)):(b(document,"mouseup",o._onDrop),b(document,"touchend",o._onDrop),b(document,"touchcancel",o._onDrop),i&&(i.effectAllowed="move",r.setData&&r.setData.call(o,i,f)),w(document,"drop",o),h(f,"transform","translateZ(0)")),ft=!0,o._dragStartId=Yt(o._dragStarted.bind(o,e,t)),w(document,"selectstart",o),wt=!0,St&&h(document.body,"user-select","none")},_onDragOver:function(t){var e=this.el,o=t.target,i,r,a,l=this.options,s=l.group,u=p.active,c=Pt===s,d=l.sort,m=O||u,y,v=this,E=!1;if(te)return;function B(bt,Ne){x(bt,v,j({evt:t,isOwner:c,axis:y?"vertical":"horizontal",revert:a,dragRect:i,targetRect:r,canSort:d,fromSortable:m,target:o,completed:P,onMove:function(le,xe){return Mt(S,e,f,i,le,C(le),t,xe)},changed:H},Ne))}function U(){B("dragOverAnimationCapture"),v.captureAnimationState(),v!==m&&m.captureAnimationState()}function P(bt){return B("dragOverCompleted",{insertion:bt}),bt&&(c?u._hideClone():u._showClone(v),v!==m&&(A(f,O?O.options.ghostClass:u.options.ghostClass,!1),A(f,l.ghostClass,!0)),O!==v&&v!==p.active?O=v:v===p.active&&O&&(O=null),m===v&&(v._ignoreWhileAnimating=o),v.animateAll(function(){B("dragOverAnimationComplete"),v._ignoreWhileAnimating=null}),v!==m&&(m.animateAll(),m._ignoreWhileAnimating=null)),(o===f&&!f.animated||o===e&&!o.animated)&&(ut=null),!l.dragoverBubble&&!t.rootEl&&o!==document&&(f.parentNode[Y]._isOutsideThisEl(t.target),!bt&&at(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),E=!0}function H(){X=M(f),J=M(f,l.draggable),N({sortable:v,name:"change",toEl:e,newIndex:X,newDraggableIndex:J,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),o=L(o,l.draggable,e,!0),B("dragOver"),p.eventCanceled)return E;if(f.contains(t.target)||o.animated&&o.animatingX&&o.animatingY||v._ignoreWhileAnimating===o)return P(!1);if(Ht=!1,u&&!l.disabled&&(c?d||(a=_!==S):O===this||(this.lastPutMode=Pt.checkPull(this,u,f,t))&&s.checkPut(this,u,f,t))){if(y=this._getDirection(t,o)==="vertical",i=C(f),B("dragOverValid"),p.eventCanceled)return E;if(a)return _=S,U(),this._hideClone(),B("revert"),p.eventCanceled||(lt?S.insertBefore(f,lt):S.appendChild(f)),P(!0);var F=ie(e,l.draggable);if(!F||Je(t,y,this)&&!F.animated){if(F===f)return P(!1);if(F&&e===t.target&&(o=F),o&&(r=C(o)),Mt(S,e,f,i,o,r,t,!!o)!==!1)return U(),F&&F.nextSibling?e.insertBefore(f,F.nextSibling):e.appendChild(f),_=e,H(),P(!0)}else if(F&&Qe(t,y,this)){var nt=ht(e,0,l,!0);if(nt===f)return P(!1);if(o=nt,r=C(o),Mt(S,e,f,i,o,r,t,!1)!==!1)return U(),e.insertBefore(f,nt),_=e,H(),P(!0)}else if(o.parentNode===e){r=C(o);var G=0,ot,pt=f.parentNode!==e,R=!Ue(f.animated&&f.toRect||i,o.animated&&o.toRect||r,y),gt=y?"top":"left",Z=de(o,"top","top")||de(f,"top","top"),mt=Z?Z.scrollTop:void 0;ut!==o&&(ot=r[gt],Ct=!1,Nt=!R&&l.invertSwap||pt),G=tn(t,o,r,y,R?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,Nt,ut===o);var V;if(G!==0){var it=M(f);do it-=G,V=_.children[it];while(V&&(h(V,"display")==="none"||V===g))}if(G===0||V===o)return P(!1);ut=o,Tt=G;var vt=o.nextElementSibling,Q=!1;Q=G===1;var At=Mt(S,e,f,i,o,r,t,Q);if(At!==!1)return(At===1||At===-1)&&(Q=At===1),te=!0,setTimeout(Ze,30),U(),Q&&!vt?e.appendChild(f):o.parentNode.insertBefore(f,Q?vt:o),Z&&De(Z,0,mt-Z.scrollTop),_=f.parentNode,ot!==void 0&&!Nt&&(Xt=Math.abs(ot-C(o)[gt])),H(),P(!0)}if(e.contains(f))return P(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){b(document,"mousemove",this._onTouchMove),b(document,"touchmove",this._onTouchMove),b(document,"pointermove",this._onTouchMove),b(document,"dragover",at),b(document,"mousemove",at),b(document,"touchmove",at)},_offUpEvents:function(){var t=this.el.ownerDocument;b(t,"mouseup",this._onDrop),b(t,"touchend",this._onDrop),b(t,"pointerup",this._onDrop),b(t,"touchcancel",this._onDrop),b(document,"selectstart",this)},_onDrop:function(t){var e=this.el,o=this.options;if(X=M(f),J=M(f,o.draggable),x("drop",this,{evt:t}),_=f&&f.parentNode,X=M(f),J=M(f,o.draggable),p.eventCanceled){this._nulling();return}ft=!1,Nt=!1,Ct=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),ee(this.cloneId),ee(this._dragStartId),this.nativeDraggable&&(b(document,"drop",this),b(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),St&&h(document.body,"user-select",""),h(f,"transform",""),t&&(wt&&(t.cancelable&&t.preventDefault(),!o.dropBubble&&t.stopPropagation()),g&&g.parentNode&&g.parentNode.removeChild(g),(S===_||O&&O.lastPutMode!=="clone")&&D&&D.parentNode&&D.parentNode.removeChild(D),f&&(this.nativeDraggable&&b(f,"dragend",this),Kt(f),f.style["will-change"]="",wt&&!ft&&A(f,O?O.options.ghostClass:this.options.ghostClass,!1),A(f,this.options.chosenClass,!1),N({sortable:this,name:"unchoose",toEl:_,newIndex:null,newDraggableIndex:null,originalEvent:t}),S!==_?(X>=0&&(N({rootEl:_,name:"add",toEl:_,fromEl:S,originalEvent:t}),N({sortable:this,name:"remove",toEl:_,originalEvent:t}),N({rootEl:_,name:"sort",toEl:_,fromEl:S,originalEvent:t}),N({sortable:this,name:"sort",toEl:_,originalEvent:t})),O&&O.save()):X!==dt&&X>=0&&(N({sortable:this,name:"update",toEl:_,originalEvent:t}),N({sortable:this,name:"sort",toEl:_,originalEvent:t})),p.active&&((X==null||X===-1)&&(X=dt,J=_t),N({sortable:this,name:"end",toEl:_,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){x("nulling",this),S=f=_=g=lt=D=Rt=tt=rt=W=wt=X=J=dt=_t=ut=Tt=O=Pt=p.dragged=p.ghost=p.clone=p.active=null,Gt.forEach(function(t){t.checked=!0}),Gt.length=Ut=Vt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":f&&(this._onDragOver(t),Ke(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,o=this.el.children,i=0,r=o.length,a=this.options;i<r;i++)e=o[i],L(e,a.draggable,this.el,!1)&&t.push(e.getAttribute(a.dataIdAttr)||nn(e));return t},sort:function(t,e){var o={},i=this.el;this.toArray().forEach(function(r,a){var l=i.children[a];L(l,this.options.draggable,i,!1)&&(o[r]=l)},this),e&&this.captureAnimationState(),t.forEach(function(r){o[r]&&(i.removeChild(o[r]),i.appendChild(o[r]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return L(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var o=this.options;if(e===void 0)return o[t];var i=It.modifyOption(this,t,e);typeof i!="undefined"?o[t]=i:o[t]=e,t==="group"&&Oe(o)},destroy:function(){x("destroy",this);var t=this.el;t[Y]=null,b(t,"mousedown",this._onTapStart),b(t,"touchstart",this._onTapStart),b(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(b(t,"dragover",this),b(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Wt.splice(Wt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!tt){if(x("hideClone",this),p.eventCanceled)return;h(D,"display","none"),this.options.removeCloneOnHide&&D.parentNode&&D.parentNode.removeChild(D),tt=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(tt){if(x("showClone",this),p.eventCanceled)return;f.parentNode==S&&!this.options.group.revertClone?S.insertBefore(D,f):lt?S.insertBefore(D,lt):S.appendChild(D),this.options.group.revertClone&&this.animate(f,D),h(D,"display",""),tt=!1}}};function Ke(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function Mt(n,t,e,o,i,r,a,l){var s,u=n[Y],c=u.options.onMove,d;return window.CustomEvent&&!K&&!Ot?s=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(s=document.createEvent("Event"),s.initEvent("move",!0,!0)),s.to=t,s.from=n,s.dragged=e,s.draggedRect=o,s.related=i||t,s.relatedRect=r||C(t),s.willInsertAfter=l,s.originalEvent=a,n.dispatchEvent(s),c&&(d=c.call(u,s,a)),d}function Kt(n){n.draggable=!1}function Ze(){te=!1}function Qe(n,t,e){var o=C(ht(e.el,0,e.options,!0)),i=ye(e.el),r=10;return t?n.clientX<i.left-r||n.clientY<o.top&&n.clientX<o.right:n.clientY<i.top-r||n.clientY<o.bottom&&n.clientX<o.left}function Je(n,t,e){var o=C(ie(e.el,e.options.draggable)),i=ye(e.el),r=10;return t?n.clientX>i.right+r||n.clientY>o.bottom&&n.clientX>o.left:n.clientY>i.bottom+r||n.clientX>o.right&&n.clientY>o.top}function tn(n,t,e,o,i,r,a,l){var s=o?n.clientY:n.clientX,u=o?e.height:e.width,c=o?e.top:e.left,d=o?e.bottom:e.right,m=!1;if(!a){if(l&&Xt<u*i){if(!Ct&&(Tt===1?s>c+u*r/2:s<d-u*r/2)&&(Ct=!0),Ct)m=!0;else if(Tt===1?s<c+Xt:s>d-Xt)return-Tt}else if(s>c+u*(1-i)/2&&s<d-u*(1-i)/2)return en(t)}return m=m||a,m&&(s<c+u*r/2||s>d-u*r/2)?s>c+u/2?1:-1:0}function en(n){return M(f)<M(n)?1:-1}function nn(n){for(var t=n.tagName+n.className+n.src+n.href+n.textContent,e=t.length,o=0;e--;)o+=t.charCodeAt(e);return o.toString(36)}function on(n){Gt.length=0;for(var t=n.getElementsByTagName("input"),e=t.length;e--;){var o=t[e];o.checked&&Gt.push(o)}}function Yt(n){return setTimeout(n,0)}function ee(n){return clearTimeout(n)}zt&&w(document,"touchmove",function(n){(p.active||ft)&&n.cancelable&&n.preventDefault()});p.utils={on:w,off:b,css:h,find:Ee,is:function(t,e){return!!L(t,e,t,!1)},extend:Be,throttle:Se,closest:L,toggleClass:A,clone:_e,index:M,nextTick:Yt,cancelNextTick:ee,detectDirection:Ce,getChild:ht};p.get=function(n){return n[Y]};p.mount=function(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];t[0].constructor===Array&&(t=t[0]),t.forEach(function(o){if(!o.prototype||!o.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));o.utils&&(p.utils=j(j({},p.utils),o.utils)),It.mount(o)})};p.create=function(n,t){return new p(n,t)};p.version=Xe;var T=[],Et,ne,oe=!1,Zt,Qt,Lt,yt;function rn(){function n(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return n.prototype={dragStarted:function(e){var o=e.originalEvent;this.sortable.nativeDraggable?w(document,"dragover",this._handleAutoScroll):this.options.supportPointer?w(document,"pointermove",this._handleFallbackAutoScroll):o.touches?w(document,"touchmove",this._handleFallbackAutoScroll):w(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var o=e.originalEvent;!this.options.dragOverBubble&&!o.rootEl&&this._handleAutoScroll(o)},drop:function(){this.sortable.nativeDraggable?b(document,"dragover",this._handleAutoScroll):(b(document,"pointermove",this._handleFallbackAutoScroll),b(document,"touchmove",this._handleFallbackAutoScroll),b(document,"mousemove",this._handleFallbackAutoScroll)),me(),kt(),He()},nulling:function(){Lt=ne=Et=oe=yt=Zt=Qt=null,T.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,o){var i=this,r=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,l=document.elementFromPoint(r,a);if(Lt=e,o||this.options.forceAutoScrollFallback||Ot||K||St){Jt(e,this.options,l,o);var s=et(l,!0);oe&&(!yt||r!==Zt||a!==Qt)&&(yt&&me(),yt=setInterval(function(){var u=et(document.elementFromPoint(r,a),!0);u!==s&&(s=u,kt()),Jt(e,i.options,u,o)},10),Zt=r,Qt=a)}else{if(!this.options.bubbleScroll||et(l,!0)===z()){kt();return}Jt(e,this.options,et(l,!1),!1)}}},q(n,{pluginName:"scroll",initializeByDefault:!0})}function kt(){T.forEach(function(n){clearInterval(n.pid)}),T=[]}function me(){clearInterval(yt)}var Jt=Se(function(n,t,e,o){if(t.scroll){var i=(n.touches?n.touches[0]:n).clientX,r=(n.touches?n.touches[0]:n).clientY,a=t.scrollSensitivity,l=t.scrollSpeed,s=z(),u=!1,c;ne!==e&&(ne=e,kt(),Et=t.scroll,c=t.scrollFn,Et===!0&&(Et=et(e,!0)));var d=0,m=Et;do{var y=m,v=C(y),E=v.top,B=v.bottom,U=v.left,P=v.right,H=v.width,F=v.height,nt=void 0,G=void 0,ot=y.scrollWidth,pt=y.scrollHeight,R=h(y),gt=y.scrollLeft,Z=y.scrollTop;y===s?(nt=H<ot&&(R.overflowX==="auto"||R.overflowX==="scroll"||R.overflowX==="visible"),G=F<pt&&(R.overflowY==="auto"||R.overflowY==="scroll"||R.overflowY==="visible")):(nt=H<ot&&(R.overflowX==="auto"||R.overflowX==="scroll"),G=F<pt&&(R.overflowY==="auto"||R.overflowY==="scroll"));var mt=nt&&(Math.abs(P-i)<=a&>+H<ot)-(Math.abs(U-i)<=a&&!!gt),V=G&&(Math.abs(B-r)<=a&&Z+F<pt)-(Math.abs(E-r)<=a&&!!Z);if(!T[d])for(var it=0;it<=d;it++)T[it]||(T[it]={});(T[d].vx!=mt||T[d].vy!=V||T[d].el!==y)&&(T[d].el=y,T[d].vx=mt,T[d].vy=V,clearInterval(T[d].pid),(mt!=0||V!=0)&&(u=!0,T[d].pid=setInterval(function(){o&&this.layer===0&&p.active._onTouchMove(Lt);var vt=T[this.layer].vy?T[this.layer].vy*l:0,Q=T[this.layer].vx?T[this.layer].vx*l:0;typeof c=="function"&&c.call(p.dragged.parentNode[Y],Q,vt,n,Lt,T[this.layer].el)!=="continue"||De(T[this.layer].el,Q,vt)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&m!==s&&(m=et(m,!1)));oe=u}},30),Pe=function(t){var e=t.originalEvent,o=t.putSortable,i=t.dragEl,r=t.activeSortable,a=t.dispatchSortableEvent,l=t.hideGhostForTarget,s=t.unhideGhostForTarget;if(e){var u=o||r;l();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,d=document.elementFromPoint(c.clientX,c.clientY);s(),u&&!u.el.contains(d)&&(a("spill"),this.onSpill({dragEl:i,putSortable:o}))}};function re(){}re.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,o=t.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var i=ht(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(e,i):this.sortable.el.appendChild(e),this.sortable.animateAll(),o&&o.animateAll()},drop:Pe};q(re,{pluginName:"revertOnSpill"});function ae(){}ae.prototype={onSpill:function(t){var e=t.dragEl,o=t.putSortable,i=o||this.sortable;i.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),i.animateAll()},drop:Pe};q(ae,{pluginName:"removeOnSpill"});var k;function sn(){function n(){this.defaults={swapClass:"sortable-swap-highlight"}}return n.prototype={dragStart:function(e){var o=e.dragEl;k=o},dragOverValid:function(e){var o=e.completed,i=e.target,r=e.onMove,a=e.activeSortable,l=e.changed,s=e.cancel;if(a.options.swap){var u=this.sortable.el,c=this.options;if(i&&i!==u){var d=k;r(i)!==!1?(A(i,c.swapClass,!0),k=i):k=null,d&&d!==k&&A(d,c.swapClass,!1)}l(),o(!0),s()}},drop:function(e){var o=e.activeSortable,i=e.putSortable,r=e.dragEl,a=i||this.sortable,l=this.options;k&&A(k,l.swapClass,!1),k&&(l.swap||i&&i.options.swap)&&r!==k&&(a.captureAnimationState(),a!==o&&o.captureAnimationState(),an(r,k),a.animateAll(),a!==o&&o.animateAll())},nulling:function(){k=null}},q(n,{pluginName:"swap",eventProperties:function(){return{swapItem:k}}})}function an(n,t){var e=n.parentNode,o=t.parentNode,i,r;!e||!o||e.isEqualNode(t)||o.isEqualNode(n)||(i=M(n),r=M(t),e.isEqualNode(o)&&i<r&&r++,e.insertBefore(t,e.children[i]),o.insertBefore(n,o.children[r]))}p.mount(new rn);p.mount(ae,re);export{p as S,sn as a};
|