chunk-2d212b99.b700d975.js 43 KB

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