1234567 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2d0c84d3"],{"53fe":function(t,e,o){var n;
- /**!
- * Sortable
- * @author RubaXa <trash@rubaxa.org>
- * @author owenm <owen23355@gmail.com>
- * @license MIT
- */!function(i){"use strict";void 0===(n="function"==typeof(n=i)?n.call(e,o,e,t):n)||(t.exports=n)}((function(){"use strict";if("undefined"==typeof window||!window.document)return function(){throw new Error("Sortable.js requires a window with a document")};function t(t,e){if(!t||!t.getBoundingClientRect)return ut();var o=t,n=!1;do{if(o.clientWidth<o.scrollWidth||o.clientHeight<o.scrollHeight){var i=Dt(o);if(o.clientWidth<o.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||o.clientHeight<o.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!o||!o.getBoundingClientRect||o===U.body)return ut();if(n||e)return o;n=!0}}}while(o=o.parentNode);return ut()}function e(t,e,o){t.scrollLeft+=e,t.scrollTop+=o}function o(t){l&&l.parentNode&&l.parentNode[z]&&l.parentNode[z]._computeIsAligned(t)}function n(t,e){for(var o=e;!o[z];)o=o.parentNode;return t===o}function i(t,e,o){for(var n=t.parentNode;n&&!n[z];)n=n.parentNode;n&&n[z][o](It(e,{artificialBubble:!0}))}function r(){!it&&c&&Dt(c,"display","none")}function a(){!it&&c&&Dt(c,"display","")}var l,s,c,d,h,u,p,f,g,v,m,b,w,_,y,D,T,S,C,E,x,N,M,P,X,Y,k,A=[],I=!1,B=!1,O=!1,H=[],R=!1,L=!1,W=[],F=/\s+/g,z="Sortable"+(new Date).getTime(),j=window,U=j.document,V=j.parseInt,q=j.setTimeout,G=j.jQuery||j.Zepto,J=j.Polymer,K={capture:!1,passive:!1},Z=!!navigator.userAgent.match(/(?:Trident.*rv[ :]?11\.|msie|iemobile)/i),Q=!!navigator.userAgent.match(/Edge/i),$=!!navigator.userAgent.match(/firefox/i),tt=!(!navigator.userAgent.match(/safari/i)||navigator.userAgent.match(/chrome/i)||navigator.userAgent.match(/android/i)),et=!!navigator.userAgent.match(/iP(ad|od|hone)/i),ot=Q||Z?"cssFloat":"float",nt="draggable"in U.createElement("div"),it=function(){if(Z)return!1;var t=U.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}(),rt=!1,at=!1,lt=Math.abs,st=Math.min,ct=Math.max,dt=[],ht=function(t,e){var o=Dt(t),n=V(o.width)-V(o.paddingLeft)-V(o.paddingRight)-V(o.borderLeftWidth)-V(o.borderRightWidth),i=Mt(t,0,e),r=Mt(t,1,e),a=i&&Dt(i),l=r&&Dt(r),s=a&&V(a.marginLeft)+V(a.marginRight)+Rt(i).width;t=l&&V(l.marginLeft)+V(l.marginRight)+Rt(r).width;return"flex"===o.display?"column"===o.flexDirection||"column-reverse"===o.flexDirection?"vertical":"horizontal":"grid"===o.display?o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":i&&"none"!==a.float?(e="left"===a.float?"left":"right",!r||"both"!==l.clear&&l.clear!==e?"horizontal":"vertical"):i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||n<=s&&"none"===o[ot]||r&&"none"===o[ot]&&n<s+t)?"vertical":"horizontal"},ut=function(){return Z?U.documentElement:U.scrollingElement},pt=At((function(o,n,i,r){if(n.scroll){var a=i?i[z]:window,l=n.scrollSensitivity,s=n.scrollSpeed,c=o.clientX,d=o.clientY,h=ut(),u=!1;g!==i&&(ft(),f=n.scroll,v=n.scrollFn,!0===f&&(f=t(i,!0),g=f));var p=0,m=f;do{var b,w=m,_=Rt(w),y=_.top,D=_.bottom,T=_.left,S=_.right,E=_.width,x=_.height,N=w.scrollWidth,M=w.scrollHeight,P=Dt(w),X=w.scrollLeft;_=w.scrollTop,P=w===h?(b=E<N&&("auto"===P.overflowX||"scroll"===P.overflowX||"visible"===P.overflowX),x<M&&("auto"===P.overflowY||"scroll"===P.overflowY||"visible"===P.overflowY)):(b=E<N&&("auto"===P.overflowX||"scroll"===P.overflowX),x<M&&("auto"===P.overflowY||"scroll"===P.overflowY)),X=b&&(lt(S-c)<=l&&X+E<N)-(lt(T-c)<=l&&!!X),_=P&&(lt(D-d)<=l&&_+x<M)-(lt(y-d)<=l&&!!_);if(!A[p])for(var Y=0;Y<=p;Y++)A[Y]||(A[Y]={});A[p].vx==X&&A[p].vy==_&&A[p].el===w||(A[p].el=w,A[p].vx=X,A[p].vy=_,clearInterval(A[p].pid),!w||0==X&&0==_||(u=!0,A[p].pid=setInterval(function(){r&&0===this.layer&&(mt.active._emulateDragOver(!0),mt.active._onTouchMove(C,!0));var t=A[this.layer].vy?A[this.layer].vy*s:0,n=A[this.layer].vx?A[this.layer].vx*s:0;"function"==typeof v&&"continue"!==v.call(a,n,t,o,C,A[this.layer].el)||e(A[this.layer].el,n,t)}.bind({layer:p}),24))),p++}while(n.bubbleScroll&&m!==h&&(m=t(m,!1)));I=u}}),30),ft=function(){A.forEach((function(t){clearInterval(t.pid)})),A=[]},gt=function(t){function e(t,o){return function(n,i,r,a){var l=n.options.group.name&&i.options.group.name&&n.options.group.name===i.options.group.name;return!(null!=t||!o&&!l)||null!=t&&!1!==t&&(o&&"clone"===t?t:"function"==typeof t?e(t(n,i,r,a),o)(n,i,r,a):(i=(o?n:i).options.group.name,!0===t||"string"==typeof t&&t===i||t.join&&-1<t.indexOf(i)))}}var o={},n=t.group;o.name=(n=n&&"object"==typeof n?n:{name:n}).name,o.checkPull=e(n.pull,!0),o.checkPut=e(n.put),o.revertClone=n.revertClone,t.group=o};function vt(t){var e;t=t.touches?t.touches[0]:t,!l||(e=function(t,e){for(var o=0;o<H.length;o++)if(!Pt(H[o])){var n=Rt(H[o]),i=H[o][z].options.emptyInsertThreshold,r=t>=n.left-i&&t<=n.right+i;i=e>=n.top-i&&e<=n.bottom+i;if(r&&i)return H[o]}}(t.clientX,t.clientY))&&e[z]._onDragOver({clientX:t.clientX,clientY:t.clientY,target:e,rootEl:e})}function mt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be HTMLElement, not "+{}.toString.call(t);this.el=t,this.options=e=It({},e),t[z]=this;var o,n,i={group:null,sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0,draggable:/[uo]l/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return ht(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,touchStartThreshold:V(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==mt.supportPointer&&("PointerEvent"in window||window.navigator&&"msPointerEnabled"in window.navigator),emptyInsertThreshold:5};for(o in i)o in e||(e[o]=i[o]);for(n in gt(e),this)"_"===n.charAt(0)&&"function"==typeof this[n]&&(this[n]=this[n].bind(this));this.nativeDraggable=!e.forceFallback&&nt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?wt(t,"pointerdown",this._onTapStart):(wt(t,"mousedown",this._onTapStart),wt(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(wt(t,"dragover",this),wt(t,"dragenter",this)),H.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[])}function bt(t,e,o,n){if(t){o=o||U;do{if(null!=e&&(">"===e[0]&&t.parentNode===o&&kt(t,e.substring(1))||kt(t,e))||n&&t===o)return t}while(t!==o&&(t=(i=t).host&&i!==U&&i.host.nodeType?i.host:i.parentNode))}var i;return null}function wt(t,e,o){t.addEventListener(e,o,K)}function _t(t,e,o){t.removeEventListener(e,o,K)}function yt(t,e,o){var n;t&&e&&(t.classList?t.classList[o?"add":"remove"](e):(n=(" "+t.className+" ").replace(F," ").replace(" "+e+" "," "),t.className=(n+(o?" "+e:"")).replace(F," ")))}function Dt(t,e,o){var n=t&&t.style;if(n){if(void 0===o)return U.defaultView&&U.defaultView.getComputedStyle?o=U.defaultView.getComputedStyle(t,""):t.currentStyle&&(o=t.currentStyle),void 0===e?o:o[e];n[e=e in n||-1!==e.indexOf("webkit")?e:"-webkit-"+e]=o+("string"==typeof o?"":"px")}}function Tt(t){var e="";do{var o=Dt(t,"transform")}while(o&&"none"!==o&&(e=o+" "+e),t=t.parentNode);return window.DOMMatrix?new DOMMatrix(e):window.WebKitCSSMatrix?new WebKitCSSMatrix(e):window.CSSMatrix?new CSSMatrix(e):void 0}function St(t,e,o){if(t){var n=t.getElementsByTagName(e),i=0,r=n.length;if(o)for(;i<r;i++)o(n[i],i);return n}return[]}function Ct(t,e,o,n,i,r,a,l,s){var c,h=(t=t||e[z]).options,u="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||Z||Q?(c=U.createEvent("Event")).initEvent(o,!0,!0):c=new CustomEvent(o,{bubbles:!0,cancelable:!0}),c.to=i||e,c.from=r||e,c.item=n||e,c.clone=d,c.oldIndex=a,c.newIndex=l,c.originalEvent=s,c.pullMode=_?_.lastPutMode:void 0,e&&e.dispatchEvent(c),h[u]&&h[u].call(t,c)}function Et(t,e,o,n,i,r,a,l){var s,c,d=t[z],h=d.options.onMove;return!window.CustomEvent||Z||Q?(s=U.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=o,s.draggedRect=n,s.related=i||e,s.relatedRect=r||Rt(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),h?h.call(d,s,a):c}function xt(t){t.draggable=!1}function Nt(){rt=!1}function Mt(t,e,o){for(var n=0,i=0,r=t.children;i<r.length;){if("none"!==r[i].style.display&&r[i]!==c&&r[i]!==l&&bt(r[i],o.draggable,t,!1)){if(n===e)return r[i];n++}i++}return null}function Pt(t){for(var e=t.lastElementChild;e&&(e===c||"none"===e.style.display);)e=e.previousElementSibling;return e||null}function Xt(t){return Yt(l)<Yt(t)?1:-1}function Yt(t,e){var o=0;if(!t||!t.parentNode)return-1;for(;t=t&&t.previousElementSibling;)"TEMPLATE"!==t.nodeName.toUpperCase()&&t!==d&&o++;return o}function kt(t,e){if(t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return}}function At(t,e){return function(){var o,n;k||(o=arguments,n=this,k=q((function(){1===o.length?t.call(n,o[0]):t.apply(n,o),k=void 0}),e))}}function It(t,e){if(t&&e)for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);return t}function Bt(t){return J&&J.dom?J.dom(t).cloneNode(!0):G?G(t).clone(!0)[0]:t.cloneNode(!0)}function Ot(t){return q(t,0)}function Ht(t){return clearTimeout(t)}function Rt(t,e,o,n){if(t.getBoundingClientRect||t===j){var i,r,a,l,s,c,d=t!==j&&t!==ut()?(r=(i=t.getBoundingClientRect()).top,a=i.left,l=i.bottom,s=i.right,c=i.height,i.width):(a=r=0,l=window.innerHeight,s=window.innerWidth,c=window.innerHeight,window.innerWidth);if(n&&t!==j&&(o=o||t.parentNode,!Z))do{if(o&&o.getBoundingClientRect&&"none"!==Dt(o,"transform")){var h=o.getBoundingClientRect();r-=h.top+V(Dt(o,"border-top-width")),a-=h.left+V(Dt(o,"border-left-width")),l=r+i.height,s=a+i.width;break}}while(o=o.parentNode);return e&&t!==j&&(e=(n=Tt(o||t))&&n.a,t=n&&n.d,n&&(l=(r/=t)+(c/=t),s=(a/=e)+(d/=e))),{top:r,left:a,bottom:l,right:s,width:d,height:c}}}function Lt(e,o){for(var n=t(e,!0),i=Rt(e)[o];n;){var r=Rt(n)[o];r="top"===o||"left"===o?r<=i:i<=r;if(!r)return n;if(n===ut())break;n=t(n,!1)}return!1}function Wt(t){var e=0,o=0,n=ut();if(t)do{var i=Tt(t),r=i.a;i=i.d}while(e+=t.scrollLeft*r,o+=t.scrollTop*i,t!==n&&(t=t.parentNode));return[e,o]}return U.addEventListener("click",(function(t){if(O)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),O=!1}),!0),wt(U,"dragover",vt),wt(U,"mousemove",vt),wt(U,"touchmove",vt),mt.prototype={constructor:mt,_computeIsAligned:function(t){var e;if(c&&!it?(r(),e=U.elementFromPoint(t.clientX,t.clientY),a()):e=t.target,e=bt(e,this.options.draggable,this.el,!1),!at&&l&&l.parentNode===this.el){for(var o,n,i,s,d,h=this.el.children,u=0;u<h.length;u++)bt(h[u],this.options.draggable,this.el,!1)&&h[u]!==e&&(h[u].sortableMouseAligned=(o=t.clientX,n=t.clientY,i=h[u],s=this._getDirection(t,null),this.options,d=d=void 0,d=Rt(i),i="vertical"===s?d.left:d.top,d="vertical"===s?d.right:d.bottom,i<(n="vertical"===s?o:n)&&n<d));bt(e,this.options.draggable,this.el,!0)||(x=null),at=!0,q((function(){at=!1}),30)}},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,l):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e,o=this,r=this.el,a=this.options,s=a.preventOnFilter,c=t.type,d=t.touches&&t.touches[0],h=(d||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||h,f=a.filter;if(function(t){dt.length=0;for(var e=t.getElementsByTagName("input"),o=e.length;o--;){var n=e[o];n.checked&&dt.push(n)}}(r),(!Z||t.artificialBubble||n(r,h))&&!l&&!(/mousedown|pointerdown/.test(c)&&0!==t.button||a.disabled||u.isContentEditable))if(h=bt(h,a.draggable,r,!1)){if(p!==h){if(e=Yt(h,a.draggable),"function"==typeof f){if(f.call(this,t,h,this))return Ct(o,u,"filter",h,r,r,e),void(s&&t.cancelable&&t.preventDefault())}else if(f=f&&f.split(",").some((function(t){if(t=bt(u,t.trim(),r,!1))return Ct(o,t,"filter",h,r,r,e),!0})))return void(s&&t.cancelable&&t.preventDefault());a.handle&&!bt(u,a.handle,r,!1)||this._prepareDragStart(t,d,h,e)}}else Z&&i(r,t,"_onTapStart")}},_handleAutoScroll:function(e,o){var n,i,r,a,s;l&&this.options.scroll&&(n=e.clientX,i=e.clientY,r=U.elementFromPoint(n,i),a=this,o||Q||Z||tt?(pt(e,a.options,r,o),s=t(r,!0),!I||y&&n===D&&i===T||(y&&clearInterval(y),y=setInterval((function(){var r;!l||(r=t(U.elementFromPoint(n,i),!0))!==s&&(s=r,ft(),pt(e,a.options,s,o))}),10),D=n,T=i)):a.options.bubbleScroll&&t(r,!0)!==ut()?pt(e,a.options,t(r,!1),!1):ft())},_prepareDragStart:function(t,e,o,n){var i=this,r=i.el,a=i.options,c=r.ownerDocument;o&&!l&&o.parentNode===r&&(h=r,s=(l=o).parentNode,u=l.nextSibling,p=o,w=a.group,m=n,S={target:l,clientX:(e||t).clientX,clientY:(e||t).clientY},this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,l.style["will-change"]="all",l.style.transition="",l.style.transform="",n=function(){i._disableDelayedDragEvents(),!$&&i.nativeDraggable&&(l.draggable=!0),i._triggerDragStart(t,e),Ct(i,h,"choose",l,h,h,m),yt(l,a.chosenClass,!0)},a.ignore.split(",").forEach((function(t){St(l,t.trim(),xt)})),a.supportPointer?wt(c,"pointerup",i._onDrop):(wt(c,"mouseup",i._onDrop),wt(c,"touchend",i._onDrop),wt(c,"touchcancel",i._onDrop)),$&&this.nativeDraggable&&(this.options.touchStartThreshold=4,l.draggable=!0),!a.delay||this.nativeDraggable&&(Q||Z)?n():(wt(c,"mouseup",i._disableDelayedDrag),wt(c,"touchend",i._disableDelayedDrag),wt(c,"touchcancel",i._disableDelayedDrag),wt(c,"mousemove",i._delayedDragTouchMoveHandler),wt(c,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&wt(c,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=q(n,a.delay)))},_delayedDragTouchMoveHandler:function(t){t=t.touches?t.touches[0]:t,ct(lt(t.clientX-this._lastX),lt(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){l&&xt(l),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;_t(t,"mouseup",this._disableDelayedDrag),_t(t,"touchend",this._disableDelayedDrag),_t(t,"touchcancel",this._disableDelayedDrag),_t(t,"mousemove",this._delayedDragTouchMoveHandler),_t(t,"touchmove",this._delayedDragTouchMoveHandler),_t(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||("touch"==t.pointerType?t:null),!this.nativeDraggable||e?this.options.supportPointer?wt(U,"pointermove",this._onTouchMove):wt(U,e?"touchmove":"mousemove",this._onTouchMove):(wt(l,"dragend",this),wt(h,"dragstart",this._onDragStart));try{U.selection?Ot((function(){U.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){var n;B=!1,h&&l?(this.nativeDraggable&&(wt(U,"dragover",this._handleAutoScroll),wt(U,"dragover",o)),n=this.options,t||yt(l,n.dragClass,!1),yt(l,n.ghostClass,!0),Dt(l,"transform",""),mt.active=this,t&&this._appendGhost(),Ct(this,h,"start",l,h,h,m,void 0,e)):this._nulling()},_emulateDragOver:function(t){if(C&&(this._lastX!==C.clientX||this._lastY!==C.clientY||t)){this._lastX=C.clientX,this._lastY=C.clientY,r();for(var e=U.elementFromPoint(C.clientX,C.clientY),o=e;e&&e.shadowRoot;)o=e=e.shadowRoot.elementFromPoint(C.clientX,C.clientY);if(o)do{if(o[z]&&o[z]._onDragOver({clientX:C.clientX,clientY:C.clientY,target:e,rootEl:o})&&!this.options.dragoverBubble)break}while(o=(e=o).parentNode);l.parentNode[z]._computeIsAligned(C),a()}},_onTouchMove:function(t,e){if(S){var o=this.options,n=o.fallbackTolerance,i=o.fallbackOffset,r=t.touches?t.touches[0]:t,a=c&&Tt(c),l=c&&a&&a.a;o=c&&a&&a.d,a=et&&X&&Wt(X),l=(r.clientX-S.clientX+i.x)/(l||1)+(a?a[0]-W[0]:0)/(l||1),o=(r.clientY-S.clientY+i.y)/(o||1)+(a?a[1]-W[1]:0)/(o||1),o=t.touches?"translate3d("+l+"px,"+o+"px,0)":"translate("+l+"px,"+o+"px)";if(!mt.active&&!B){if(n&&st(lt(r.clientX-this._lastX),lt(r.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}e||this._handleAutoScroll(r,!0),E=!0,C=r,Dt(c,"webkitTransform",o),Dt(c,"mozTransform",o),Dt(c,"msTransform",o),Dt(c,"transform",o),t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!c){var t,e=this.options.fallbackOnBody?U.body:h,o=Rt(l,!0,e,!et),n=(Dt(l),this.options);if(et){for(X=e;"static"===Dt(X,"position")&&"none"===Dt(X,"transform")&&X!==U;)X=X.parentNode;X!==U&&(t=Rt(X,!0),o.top-=t.top,o.left-=t.left),X!==U.body&&X!==U.documentElement?(X===U&&(X=ut()),o.top+=X.scrollTop,o.left+=X.scrollLeft):X=ut(),W=Wt(X)}yt(c=l.cloneNode(!0),n.ghostClass,!1),yt(c,n.fallbackClass,!0),yt(c,n.dragClass,!0),Dt(c,"box-sizing","border-box"),Dt(c,"margin",0),Dt(c,"top",o.top),Dt(c,"left",o.left),Dt(c,"width",o.width),Dt(c,"height",o.height),Dt(c,"opacity","0.8"),Dt(c,"position",et?"absolute":"fixed"),Dt(c,"zIndex","100000"),Dt(c,"pointerEvents","none"),e.appendChild(c)}},_onDragStart:function(t,e){var o=this,n=t.dataTransfer,i=o.options;(d=Bt(l)).draggable=!1,d.style["will-change"]="",this._hideClone(),yt(d,o.options.chosenClass,!1),o._cloneId=Ot((function(){o.options.removeCloneOnHide||h.insertBefore(d,l),Ct(o,h,"clone",l)})),e||yt(l,i.dragClass,!0),e?(O=!0,o._loopId=setInterval(o._emulateDragOver,50)):(_t(U,"mouseup",o._onDrop),_t(U,"touchend",o._onDrop),_t(U,"touchcancel",o._onDrop),n&&(n.effectAllowed="move",i.setData&&i.setData.call(o,n,l)),wt(U,"drop",o),Dt(l,"transform","translateZ(0)")),B=!0,o._dragStartId=Ot(o._dragStarted.bind(o,e,t)),wt(U,"selectstart",o),tt&&Dt(U.body,"user-select","none")},_onDragOver:function(t){var o,r,a,c,d,p,f,g=this.el,v=t.target,b=this.options,y=b.group,D=mt.active,T=w===y,S=b.sort,C=this;if(!rt&&(!Z||t.rootEl||t.artificialBubble||n(g,v))){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),E=!0,v=bt(v,b.draggable,g,!0),bt(t.target,null,l,!0)||v.animated)return V(!1);if(v!==l&&(O=!1),D&&!b.disabled&&(T?S||(o=!h.contains(l)):_===this||(this.lastPutMode=w.checkPull(this,D,l,t))&&y.checkPut(this,D,l,t))){var X=this._getDirection(t,v),k=Rt(l);if(o)return this._hideClone(),s=h,u?h.insertBefore(l,u):h.appendChild(l),V(!0);var A=Pt(g);if(A&&(r=t,a=X,d=Rt(Pt(c=g)),p="vertical"===a?r.clientY:r.clientX,f="vertical"===a?r.clientX:r.clientY,c="vertical"===a?d.bottom:d.right,r="vertical"===a?d.left:d.top,d="vertical"===a?d.right:d.bottom,!("vertical"===a?d+10<f||f<=d&&c<p&&r<=f:c<p&&r<f||p<=c&&d+10<f)||A.animated)){if(v&&v!==l&&v.parentNode===g){var I,B=0,H=v.sortableMouseAligned,W=l.parentNode!==g,F="vertical"===X?"top":"left";S=Lt(v,"top")||Lt(l,"top"),y=S?S.scrollTop:void 0;if(x!==v&&(M=null,I=Rt(v)[F],R=!1),o=v,a=X,p=(r=l)===l&&Y||Rt(r),c=o===l&&Y||Rt(o),d="vertical"===a?p.left:p.top,f="vertical"===a?p.right:p.bottom,r="vertical"===a?p.width:p.height,o="vertical"===a?c.left:c.top,p="vertical"===a?c.right:c.bottom,c="vertical"===a?c.width:c.height,M=(d===o||f===p||d+r/2===o+c/2)&&H||W||S||b.invertSwap||"insert"===M||"swap"===M?("swap"!==M&&(L=b.invertSwap||W),B=function(t,e,o,n,i,r,a){var s=Rt(e),c="vertical"===o?t.clientY:t.clientX,d="vertical"===o?s.height:s.width,h="vertical"===o?s.top:s.left,u="vertical"===o?s.bottom:s.right;t=Rt(l),s=!1;if(!r)if(a&&P<d*n){if(R=!R&&(1===N?h+d*i/2<c:c<u-d*i/2)||R)s=!0;else if("vertical"===o?t.top:t.left,"vertical"===o?t.bottom:t.right,1===N?c<h+P:u-P<c)return-1*N}else if(h+d*(1-n)/2<c&&c<u-d*(1-n)/2)return Xt(e);return(s=s||r)&&(c<h+d*i/2||u-d*i/2<c)?h+d/2<c?1:-1:0}(t,v,X,b.swapThreshold,null==b.invertedSwapThreshold?b.swapThreshold:b.invertedSwapThreshold,L,x===v),"swap"):(B=Xt(v),"insert"),0===B)return V(!1);Y=null,N=B;var j=Rt(x=v);W=v.nextElementSibling,X=!1,B=Et(h,g,l,k,v,j,t,X=1===B);if(!1!==B)return 1!==B&&-1!==B||(X=1===B),rt=!0,q(Nt,30),T?D._hideClone():D._showClone(this),X&&!W?g.appendChild(l):v.parentNode.insertBefore(l,X?W:v),S&&e(S,0,y-S.scrollTop),s=l.parentNode,void 0===I||L||(P=lt(I-Rt(v)[F])),G(),V(!0)}}else if((v=A&&g===t.target?A:v)&&(j=Rt(v)),T?D._hideClone():D._showClone(this),!1!==Et(h,g,l,k,v,j,t,!!v))return g.appendChild(l),s=g,Y=null,G(),V(!0);if(g.contains(l))return V(!1)}return Z&&!t.rootEl&&i(g,t,"_onDragOver"),!1}function V(e){return e&&(T?D._hideClone():D._showClone(C),D&&(yt(l,(_||D).options.ghostClass,!1),yt(l,b.ghostClass,!0)),_!==C&&C!==mt.active?_=C:C===mt.active&&(_=null),k&&C._animate(k,l),v&&j&&C._animate(j,v)),(v===l&&!l.animated||v===g&&!v.animated)&&(x=null),b.dragoverBubble||t.rootEl||v===U||(C._handleAutoScroll(t),l.parentNode[z]._computeIsAligned(t)),!b.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),!0}function G(){Ct(C,h,"change",v,g,h,m,Yt(l,b.draggable),t)}},_animate:function(t,e){var o,n,i,r=this.options.animation;r&&(o=Rt(e),e===l&&(Y=o),(t=1===t.nodeType?Rt(t):t).left+t.width/2===o.left+o.width/2&&t.top+t.height/2===o.top+o.height/2||(n=(i=Tt(this.el))&&i.a,i=i&&i.d,Dt(e,"transition","none"),Dt(e,"transform","translate3d("+(t.left-o.left)/(n||1)+"px,"+(t.top-o.top)/(i||1)+"px,0)"),e.offsetWidth,Dt(e,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),Dt(e,"transform","translate3d(0,0,0)")),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=q((function(){Dt(e,"transition",""),Dt(e,"transform",""),e.animated=!1}),r))},_offUpEvents:function(){var t=this.el.ownerDocument;_t(U,"touchmove",this._onTouchMove),_t(U,"pointermove",this._onTouchMove),_t(t,"mouseup",this._onDrop),_t(t,"touchend",this._onDrop),_t(t,"pointerup",this._onDrop),_t(t,"touchcancel",this._onDrop),_t(U,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;R=L=I=B=!1,clearInterval(this._loopId),clearInterval(y),ft(),clearTimeout(k),k=void 0,clearTimeout(this._dragStartTimer),Ht(this._cloneId),Ht(this._dragStartId),_t(U,"mousemove",this._onTouchMove),this.nativeDraggable&&(_t(U,"drop",this),_t(e,"dragstart",this._onDragStart),_t(U,"dragover",this._handleAutoScroll),_t(U,"dragover",o)),tt&&Dt(U.body,"user-select",""),this._offUpEvents(),t&&(E&&(t.cancelable&&t.preventDefault(),n.dropBubble||t.stopPropagation()),c&&c.parentNode&&c.parentNode.removeChild(c),(h===s||_&&"clone"!==_.lastPutMode)&&d&&d.parentNode&&d.parentNode.removeChild(d),l&&(this.nativeDraggable&&_t(l,"dragend",this),xt(l),l.style["will-change"]="",yt(l,(_||this).options.ghostClass,!1),yt(l,this.options.chosenClass,!1),Ct(this,h,"unchoose",l,s,h,m,null,t),h!==s?(0<=(b=Yt(l,n.draggable))&&(Ct(null,s,"add",l,s,h,m,b,t),Ct(this,h,"remove",l,s,h,m,b,t),Ct(null,s,"sort",l,s,h,m,b,t),Ct(this,h,"sort",l,s,h,m,b,t)),_&&_.save()):l.nextSibling!==u&&0<=(b=Yt(l,n.draggable))&&(Ct(this,h,"update",l,s,h,m,b,t),Ct(this,h,"sort",l,s,h,m,b,t)),mt.active&&(Ct(this,h,"end",l,s,h,m,b=null==b||-1===b?m:b,t),this.save()))),this._nulling()},_nulling:function(){h=l=s=c=u=d=p=f=g=A.length=y=D=T=S=C=E=b=m=x=N=Y=_=w=mt.active=null,dt.forEach((function(t){t.checked=!0})),dt.length=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":l&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],o=this.el.children,n=0,i=o.length,r=this.options;n<i;n++)bt(t=o[n],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||function(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,o=e.length,n=0;o--;)n+=e.charCodeAt(o);return n.toString(36)}(t));return e},sort:function(t){var e={},o=this.el;this.toArray().forEach((function(t,n){n=o.children[n],bt(n,this.options.draggable,o,!1)&&(e[t]=n)}),this),t.forEach((function(t){e[t]&&(o.removeChild(e[t]),o.appendChild(e[t]))}))},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return bt(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var o=this.options;if(void 0===e)return o[t];o[t]=e,"group"===t&>(o)},destroy:function(){var t=this.el;t[z]=null,_t(t,"mousedown",this._onTapStart),_t(t,"touchstart",this._onTapStart),_t(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(_t(t,"dragover",this),_t(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),H.splice(H.indexOf(this.el),1),this.el=t=null},_hideClone:function(){d.cloneHidden||(Dt(d,"display","none"),d.cloneHidden=!0,d.parentNode&&this.options.removeCloneOnHide&&d.parentNode.removeChild(d))},_showClone:function(t){"clone"===t.lastPutMode?d.cloneHidden&&(h.contains(l)&&!this.options.group.revertClone?h.insertBefore(d,l):u?h.insertBefore(d,u):h.appendChild(d),this.options.group.revertClone&&this._animate(l,d),Dt(d,"display",""),d.cloneHidden=!1):this._hideClone()}},wt(U,"touchmove",(function(t){(mt.active||B)&&t.cancelable&&t.preventDefault()})),mt.utils={on:wt,off:_t,css:Dt,find:St,is:function(t,e){return!!bt(t,e,t,!1)},extend:It,throttle:At,closest:bt,toggleClass:yt,clone:Bt,index:Yt,nextTick:Ot,cancelNextTick:Ht,detectDirection:ht,getChild:Mt},mt.create=function(t,e){return new mt(t,e)},mt.version="1.8.4",mt}))}}]);
|