rework-table
Advanced tools
Comparing version 2.0.0-beta.1 to 2.0.0-beta.2
@@ -6,3 +6,3 @@ (function(U,T){typeof exports=="object"&&typeof module<"u"?T(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],T):(U=typeof globalThis<"u"?globalThis:U||self,T(U.index={},U.Vue))})(this,function(U,T){"use strict";/**! | ||
* @license MIT | ||
*/function ut(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,o)}return n}function L(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ut(Object(n),!0).forEach(function(o){Nt(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ut(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function Pe(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pe=function(e){return typeof e}:Pe=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pe(t)}function Nt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function z(){return z=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},z.apply(this,arguments)}function kt(t,e){if(t==null)return{};var n={},o=Object.keys(t),r,i;for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&(n[r]=t[r]);return n}function Mt(t,e){if(t==null)return{};var n=kt(t,e),o,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)o=i[r],!(e.indexOf(o)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,o)||(n[o]=t[o]))}return n}var Ft="1.15.0";function V(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var J=V(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),me=V(/Edge/i),ct=V(/firefox/i),ve=V(/safari/i)&&!V(/chrome/i)&&!V(/android/i),dt=V(/iP(ad|od|hone)/i),ft=V(/chrome/i)&&V(/android/i),ht={capture:!1,passive:!1};function y(t,e,n){t.addEventListener(e,n,!J&&ht)}function v(t,e,n){t.removeEventListener(e,n,!J&&ht)}function Ne(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{return!1}return!1}}function Rt(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function j(t,e,n,o){if(t){n=n||document;do{if(e!=null&&(e[0]===">"?t.parentNode===n&&Ne(t,e):Ne(t,e))||o&&t===n)return t;if(t===n)break}while(t=Rt(t))}return null}var pt=/\s+/g;function k(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(pt," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(pt," ")}}function h(t,e,n){var o=t&&t.style;if(o){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),e===void 0?n:n[e];!(e in o)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),o[e]=n+(typeof n=="string"?"":"px")}}function ue(t,e){var n="";if(typeof t=="string")n=t;else do{var o=h(t,"transform");o&&o!=="none"&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function gt(t,e,n){if(t){var o=t.getElementsByTagName(e),r=0,i=o.length;if(n)for(;r<i;r++)n(o[r],r);return o}return[]}function W(){var t=document.scrollingElement;return t||document.documentElement}function O(t,e,n,o,r){if(!(!t.getBoundingClientRect&&t!==window)){var i,l,u,a,s,d,f;if(t!==window&&t.parentNode&&t!==W()?(i=t.getBoundingClientRect(),l=i.top,u=i.left,a=i.bottom,s=i.right,d=i.height,f=i.width):(l=0,u=0,a=window.innerHeight,s=window.innerWidth,d=window.innerHeight,f=window.innerWidth),(e||n)&&t!==window&&(r=r||t.parentNode,!J))do if(r&&r.getBoundingClientRect&&(h(r,"transform")!=="none"||n&&h(r,"position")!=="static")){var m=r.getBoundingClientRect();l-=m.top+parseInt(h(r,"border-top-width")),u-=m.left+parseInt(h(r,"border-left-width")),a=l+i.height,s=u+i.width;break}while(r=r.parentNode);if(o&&t!==window){var E=ue(r||t),b=E&&E.a,w=E&&E.d;E&&(l/=w,u/=b,f/=b,d/=w,a=l+d,s=u+f)}return{top:l,left:u,bottom:a,right:s,width:f,height:d}}}function mt(t,e,n){for(var o=Z(t,!0),r=O(t)[e];o;){var i=O(o)[n],l=void 0;if(n==="top"||n==="left"?l=r>=i:l=r<=i,!l)return o;if(o===W())break;o=Z(o,!1)}return!1}function ce(t,e,n,o){for(var r=0,i=0,l=t.children;i<l.length;){if(l[i].style.display!=="none"&&l[i]!==p.ghost&&(o||l[i]!==p.dragged)&&j(l[i],n.draggable,t,!1)){if(r===e)return l[i];r++}i++}return null}function Ve(t,e){for(var n=t.lastElementChild;n&&(n===p.ghost||h(n,"display")==="none"||e&&!Ne(n,e));)n=n.previousElementSibling;return n||null}function Y(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)t.nodeName.toUpperCase()!=="TEMPLATE"&&t!==p.clone&&(!e||Ne(t,e))&&n++;return n}function vt(t){var e=0,n=0,o=W();if(t)do{var r=ue(t),i=r.a,l=r.d;e+=t.scrollLeft*i,n+=t.scrollTop*l}while(t!==o&&(t=t.parentNode));return[e,n]}function Xt(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 Z(t,e){if(!t||!t.getBoundingClientRect)return W();var n=t,o=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var r=h(n);if(n.clientWidth<n.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return W();if(o||e)return n;o=!0}}while(n=n.parentNode);return W()}function Yt(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function Je(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)}var be;function bt(t,e){return function(){if(!be){var n=arguments,o=this;n.length===1?t.call(o,n[0]):t.apply(o,n),be=setTimeout(function(){be=void 0},e)}}}function $t(){clearTimeout(be),be=void 0}function yt(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function wt(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)}var M="Sortable"+new Date().getTime();function Bt(){var t=[],e;return{captureAnimationState:function(){if(t=[],!!this.options.animation){var o=[].slice.call(this.el.children);o.forEach(function(r){if(!(h(r,"display")==="none"||r===p.ghost)){t.push({target:r,rect:O(r)});var i=L({},t[t.length-1].rect);if(r.thisAnimationDuration){var l=ue(r,!0);l&&(i.top-=l.f,i.left-=l.e)}r.fromRect=i}})}},addAnimationState:function(o){t.push(o)},removeAnimationState:function(o){t.splice(Xt(t,{target:o}),1)},animateAll:function(o){var r=this;if(!this.options.animation){clearTimeout(e),typeof o=="function"&&o();return}var i=!1,l=0;t.forEach(function(u){var a=0,s=u.target,d=s.fromRect,f=O(s),m=s.prevFromRect,E=s.prevToRect,b=u.rect,w=ue(s,!0);w&&(f.top-=w.f,f.left-=w.e),s.toRect=f,s.thisAnimationDuration&&Je(m,f)&&!Je(d,f)&&(b.top-f.top)/(b.left-f.left)===(d.top-f.top)/(d.left-f.left)&&(a=Lt(b,m,E,r.options)),Je(f,d)||(s.prevFromRect=d,s.prevToRect=f,a||(a=r.options.animation),r.animate(s,b,f,a)),a&&(i=!0,l=Math.max(l,a),clearTimeout(s.animationResetTimer),s.animationResetTimer=setTimeout(function(){s.animationTime=0,s.prevFromRect=null,s.fromRect=null,s.prevToRect=null,s.thisAnimationDuration=null},a),s.thisAnimationDuration=a)}),clearTimeout(e),i?e=setTimeout(function(){typeof o=="function"&&o()},l):typeof o=="function"&&o(),t=[]},animate:function(o,r,i,l){if(l){h(o,"transition",""),h(o,"transform","");var u=ue(this.el),a=u&&u.a,s=u&&u.d,d=(r.left-i.left)/(a||1),f=(r.top-i.top)/(s||1);o.animatingX=!!d,o.animatingY=!!f,h(o,"transform","translate3d("+d+"px,"+f+"px,0)"),this.forRepaintDummy=Ht(o),h(o,"transition","transform "+l+"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},l)}}}}function Ht(t){return t.offsetWidth}function Lt(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 de=[],qe={initializeByDefault:!0},ye={mount:function(e){for(var n in qe)qe.hasOwnProperty(n)&&!(n in e)&&(e[n]=qe[n]);de.forEach(function(o){if(o.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),de.push(e)},pluginEvent:function(e,n,o){var r=this;this.eventCanceled=!1,o.cancel=function(){r.eventCanceled=!0};var i=e+"Global";de.forEach(function(l){!n[l.pluginName]||(n[l.pluginName][i]&&n[l.pluginName][i](L({sortable:n},o)),n.options[l.pluginName]&&n[l.pluginName][e]&&n[l.pluginName][e](L({sortable:n},o)))})},initializePlugins:function(e,n,o,r){de.forEach(function(u){var a=u.pluginName;if(!(!e.options[a]&&!u.initializeByDefault)){var s=new u(e,n,e.options);s.sortable=e,s.options=e.options,e[a]=s,z(o,s.defaults)}});for(var i in e.options)if(!!e.options.hasOwnProperty(i)){var l=this.modifyOption(e,i,e.options[i]);typeof l<"u"&&(e.options[i]=l)}},getEventProperties:function(e,n){var o={};return de.forEach(function(r){typeof r.eventProperties=="function"&&z(o,r.eventProperties.call(n[r.pluginName],e))}),o},modifyOption:function(e,n,o){var r;return de.forEach(function(i){!e[i.pluginName]||i.optionListeners&&typeof i.optionListeners[n]=="function"&&(r=i.optionListeners[n].call(e[i.pluginName],o))}),r}};function jt(t){var e=t.sortable,n=t.rootEl,o=t.name,r=t.targetEl,i=t.cloneEl,l=t.toEl,u=t.fromEl,a=t.oldIndex,s=t.newIndex,d=t.oldDraggableIndex,f=t.newDraggableIndex,m=t.originalEvent,E=t.putSortable,b=t.extraEventProperties;if(e=e||n&&n[M],!!e){var w,B=e.options,q="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!J&&!me?w=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(w=document.createEvent("Event"),w.initEvent(o,!0,!0)),w.to=l||n,w.from=u||n,w.item=r||n,w.clone=i,w.oldIndex=a,w.newIndex=s,w.oldDraggableIndex=d,w.newDraggableIndex=f,w.originalEvent=m,w.pullMode=E?E.lastPutMode:void 0;var P=L(L({},b),ye.getEventProperties(o,e));for(var H in P)w[H]=P[H];n&&n.dispatchEvent(w),B[q]&&B[q].call(e,w)}}var Wt=["evt"],N=function(e,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=o.evt,i=Mt(o,Wt);ye.pluginEvent.bind(p)(e,n,L({dragEl:c,parentEl:D,ghostEl:g,rootEl:S,nextEl:oe,lastDownEl:ke,cloneEl:_,cloneHidden:Q,dragStarted:Ee,putSortable:x,activeSortable:p.active,originalEvent:r,oldIndex:fe,oldDraggableIndex:we,newIndex:F,newDraggableIndex:ee,hideGhostForTarget:Ot,unhideGhostForTarget:xt,cloneNowHidden:function(){Q=!0},cloneNowShown:function(){Q=!1},dispatchSortableEvent:function(u){I({sortable:n,name:u,originalEvent:r})}},i))};function I(t){jt(L({putSortable:x,cloneEl:_,targetEl:c,rootEl:S,oldIndex:fe,oldDraggableIndex:we,newIndex:F,newDraggableIndex:ee},t))}var c,D,g,S,oe,ke,_,Q,fe,F,we,ee,Me,x,he=!1,Fe=!1,Re=[],re,$,Ke,Ue,Et,St,Ee,pe,Se,_e=!1,Xe=!1,Ye,A,Ze=[],Qe=!1,$e=[],Be=typeof document<"u",He=dt,_t=me||J?"cssFloat":"float",Gt=Be&&!ft&&!dt&&"draggable"in document.createElement("div"),Dt=function(){if(!!Be){if(J)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),Ct=function(e,n){var o=h(e),r=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),i=ce(e,0,n),l=ce(e,1,n),u=i&&h(i),a=l&&h(l),s=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+O(i).width,d=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+O(l).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(i&&u.float&&u.float!=="none"){var f=u.float==="left"?"left":"right";return l&&(a.clear==="both"||a.clear===f)?"vertical":"horizontal"}return i&&(u.display==="block"||u.display==="flex"||u.display==="table"||u.display==="grid"||s>=r&&o[_t]==="none"||l&&o[_t]==="none"&&s+d>r)?"vertical":"horizontal"},zt=function(e,n,o){var r=o?e.left:e.top,i=o?e.right:e.bottom,l=o?e.width:e.height,u=o?n.left:n.top,a=o?n.right:n.bottom,s=o?n.width:n.height;return r===u||i===a||r+l/2===u+s/2},Vt=function(e,n){var o;return Re.some(function(r){var i=r[M].options.emptyInsertThreshold;if(!(!i||Ve(r))){var l=O(r),u=e>=l.left-i&&e<=l.right+i,a=n>=l.top-i&&n<=l.bottom+i;if(u&&a)return o=r}}),o},Tt=function(e){function n(i,l){return function(u,a,s,d){var f=u.options.group.name&&a.options.group.name&&u.options.group.name===a.options.group.name;if(i==null&&(l||f))return!0;if(i==null||i===!1)return!1;if(l&&i==="clone")return i;if(typeof i=="function")return n(i(u,a,s,d),l)(u,a,s,d);var m=(l?u:a).options.group.name;return i===!0||typeof i=="string"&&i===m||i.join&&i.indexOf(m)>-1}}var o={},r=e.group;(!r||Pe(r)!="object")&&(r={name:r}),o.name=r.name,o.checkPull=n(r.pull,!0),o.checkPut=n(r.put),o.revertClone=r.revertClone,e.group=o},Ot=function(){!Dt&&g&&h(g,"display","none")},xt=function(){!Dt&&g&&h(g,"display","")};Be&&!ft&&document.addEventListener("click",function(t){if(Fe)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Fe=!1,!1},!0);var ie=function(e){if(c){e=e.touches?e.touches[0]:e;var n=Vt(e.clientX,e.clientY);if(n){var o={};for(var r in e)e.hasOwnProperty(r)&&(o[r]=e[r]);o.target=o.rootEl=n,o.preventDefault=void 0,o.stopPropagation=void 0,n[M]._onDragOver(o)}}},Jt=function(e){c&&c.parentNode[M]._isOutsideThisEl(e.target)};function p(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=z({},e),t[M]=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 Ct(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(l,u){l.setData("Text",u.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&&!ve,emptyInsertThreshold:5};ye.initializePlugins(this,t,n);for(var o in n)!(o in e)&&(e[o]=n[o]);Tt(e);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=e.forceFallback?!1:Gt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?y(t,"pointerdown",this._onTapStart):(y(t,"mousedown",this._onTapStart),y(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(y(t,"dragover",this),y(t,"dragenter",this)),Re.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),z(this,Bt())}p.prototype={constructor:p,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(pe=null)},_getDirection:function(e,n){return typeof this.options.direction=="function"?this.options.direction.call(this,e,n,c):this.options.direction},_onTapStart:function(e){if(!!e.cancelable){var n=this,o=this.el,r=this.options,i=r.preventOnFilter,l=e.type,u=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,a=(u||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||a,d=r.filter;if(nn(o),!c&&!(/mousedown|pointerdown/.test(l)&&e.button!==0||r.disabled)&&!s.isContentEditable&&!(!this.nativeDraggable&&ve&&a&&a.tagName.toUpperCase()==="SELECT")&&(a=j(a,r.draggable,o,!1),!(a&&a.animated)&&ke!==a)){if(fe=Y(a),we=Y(a,r.draggable),typeof d=="function"){if(d.call(this,e,a,this)){I({sortable:n,rootEl:s,name:"filter",targetEl:a,toEl:o,fromEl:o}),N("filter",n,{evt:e}),i&&e.cancelable&&e.preventDefault();return}}else if(d&&(d=d.split(",").some(function(f){if(f=j(s,f.trim(),o,!1),f)return I({sortable:n,rootEl:f,name:"filter",targetEl:a,fromEl:o,toEl:o}),N("filter",n,{evt:e}),!0}),d)){i&&e.cancelable&&e.preventDefault();return}r.handle&&!j(s,r.handle,o,!1)||this._prepareDragStart(e,u,a)}}},_prepareDragStart:function(e,n,o){var r=this,i=r.el,l=r.options,u=i.ownerDocument,a;if(o&&!c&&o.parentNode===i){var s=O(o);if(S=i,c=o,D=c.parentNode,oe=c.nextSibling,ke=o,Me=l.group,p.dragged=c,re={target:c,clientX:(n||e).clientX,clientY:(n||e).clientY},Et=re.clientX-s.left,St=re.clientY-s.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,c.style["will-change"]="all",a=function(){if(N("delayEnded",r,{evt:e}),p.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!ct&&r.nativeDraggable&&(c.draggable=!0),r._triggerDragStart(e,n),I({sortable:r,name:"choose",originalEvent:e}),k(c,l.chosenClass,!0)},l.ignore.split(",").forEach(function(d){gt(c,d.trim(),et)}),y(u,"dragover",ie),y(u,"mousemove",ie),y(u,"touchmove",ie),y(u,"mouseup",r._onDrop),y(u,"touchend",r._onDrop),y(u,"touchcancel",r._onDrop),ct&&this.nativeDraggable&&(this.options.touchStartThreshold=4,c.draggable=!0),N("delayStart",this,{evt:e}),l.delay&&(!l.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(me||J))){if(p.eventCanceled){this._onDrop();return}y(u,"mouseup",r._disableDelayedDrag),y(u,"touchend",r._disableDelayedDrag),y(u,"touchcancel",r._disableDelayedDrag),y(u,"mousemove",r._delayedDragTouchMoveHandler),y(u,"touchmove",r._delayedDragTouchMoveHandler),l.supportPointer&&y(u,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(a,l.delay)}else a()}},_delayedDragTouchMoveHandler:function(e){var n=e.touches?e.touches[0]:e;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){c&&et(c),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;v(e,"mouseup",this._disableDelayedDrag),v(e,"touchend",this._disableDelayedDrag),v(e,"touchcancel",this._disableDelayedDrag),v(e,"mousemove",this._delayedDragTouchMoveHandler),v(e,"touchmove",this._delayedDragTouchMoveHandler),v(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,n){n=n||e.pointerType=="touch"&&e,!this.nativeDraggable||n?this.options.supportPointer?y(document,"pointermove",this._onTouchMove):n?y(document,"touchmove",this._onTouchMove):y(document,"mousemove",this._onTouchMove):(y(c,"dragend",this),y(S,"dragstart",this._onDragStart));try{document.selection?je(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,n){if(he=!1,S&&c){N("dragStarted",this,{evt:n}),this.nativeDraggable&&y(document,"dragover",Jt);var o=this.options;!e&&k(c,o.dragClass,!1),k(c,o.ghostClass,!0),p.active=this,e&&this._appendGhost(),I({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if($){this._lastX=$.clientX,this._lastY=$.clientY,Ot();for(var e=document.elementFromPoint($.clientX,$.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint($.clientX,$.clientY),e!==n);)n=e;if(c.parentNode[M]._isOutsideThisEl(e),n)do{if(n[M]){var o=void 0;if(o=n[M]._onDragOver({clientX:$.clientX,clientY:$.clientY,target:e,rootEl:n}),o&&!this.options.dragoverBubble)break}e=n}while(n=n.parentNode);xt()}},_onTouchMove:function(e){if(re){var n=this.options,o=n.fallbackTolerance,r=n.fallbackOffset,i=e.touches?e.touches[0]:e,l=g&&ue(g,!0),u=g&&l&&l.a,a=g&&l&&l.d,s=He&&A&&vt(A),d=(i.clientX-re.clientX+r.x)/(u||1)+(s?s[0]-Ze[0]:0)/(u||1),f=(i.clientY-re.clientY+r.y)/(a||1)+(s?s[1]-Ze[1]:0)/(a||1);if(!p.active&&!he){if(o&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<o)return;this._onDragStart(e,!0)}if(g){l?(l.e+=d-(Ke||0),l.f+=f-(Ue||0)):l={a:1,b:0,c:0,d:1,e:d,f};var m="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");h(g,"webkitTransform",m),h(g,"mozTransform",m),h(g,"msTransform",m),h(g,"transform",m),Ke=d,Ue=f,$=i}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!g){var e=this.options.fallbackOnBody?document.body:S,n=O(c,!0,He,!0,e),o=this.options;if(He){for(A=e;h(A,"position")==="static"&&h(A,"transform")==="none"&&A!==document;)A=A.parentNode;A!==document.body&&A!==document.documentElement?(A===document&&(A=W()),n.top+=A.scrollTop,n.left+=A.scrollLeft):A=W(),Ze=vt(A)}g=c.cloneNode(!0),k(g,o.ghostClass,!1),k(g,o.fallbackClass,!0),k(g,o.dragClass,!0),h(g,"transition",""),h(g,"transform",""),h(g,"box-sizing","border-box"),h(g,"margin",0),h(g,"top",n.top),h(g,"left",n.left),h(g,"width",n.width),h(g,"height",n.height),h(g,"opacity","0.8"),h(g,"position",He?"absolute":"fixed"),h(g,"zIndex","100000"),h(g,"pointerEvents","none"),p.ghost=g,e.appendChild(g),h(g,"transform-origin",Et/parseInt(g.style.width)*100+"% "+St/parseInt(g.style.height)*100+"%")}},_onDragStart:function(e,n){var o=this,r=e.dataTransfer,i=o.options;if(N("dragStart",this,{evt:e}),p.eventCanceled){this._onDrop();return}N("setupClone",this),p.eventCanceled||(_=wt(c),_.removeAttribute("id"),_.draggable=!1,_.style["will-change"]="",this._hideClone(),k(_,this.options.chosenClass,!1),p.clone=_),o.cloneId=je(function(){N("clone",o),!p.eventCanceled&&(o.options.removeCloneOnHide||S.insertBefore(_,c),o._hideClone(),I({sortable:o,name:"clone"}))}),!n&&k(c,i.dragClass,!0),n?(Fe=!0,o._loopId=setInterval(o._emulateDragOver,50)):(v(document,"mouseup",o._onDrop),v(document,"touchend",o._onDrop),v(document,"touchcancel",o._onDrop),r&&(r.effectAllowed="move",i.setData&&i.setData.call(o,r,c)),y(document,"drop",o),h(c,"transform","translateZ(0)")),he=!0,o._dragStartId=je(o._dragStarted.bind(o,n,e)),y(document,"selectstart",o),Ee=!0,ve&&h(document.body,"user-select","none")},_onDragOver:function(e){var n=this.el,o=e.target,r,i,l,u=this.options,a=u.group,s=p.active,d=Me===a,f=u.sort,m=x||s,E,b=this,w=!1;if(Qe)return;function B(Ie,sn){N(Ie,b,L({evt:e,isOwner:d,axis:E?"vertical":"horizontal",revert:l,dragRect:r,targetRect:i,canSort:f,fromSortable:m,target:o,completed:P,onMove:function(Pt,un){return Le(S,n,c,r,Pt,O(Pt),e,un)},changed:H},sn))}function q(){B("dragOverAnimationCapture"),b.captureAnimationState(),b!==m&&m.captureAnimationState()}function P(Ie){return B("dragOverCompleted",{insertion:Ie}),Ie&&(d?s._hideClone():s._showClone(b),b!==m&&(k(c,x?x.options.ghostClass:s.options.ghostClass,!1),k(c,u.ghostClass,!0)),x!==b&&b!==p.active?x=b:b===p.active&&x&&(x=null),m===b&&(b._ignoreWhileAnimating=o),b.animateAll(function(){B("dragOverAnimationComplete"),b._ignoreWhileAnimating=null}),b!==m&&(m.animateAll(),m._ignoreWhileAnimating=null)),(o===c&&!c.animated||o===n&&!o.animated)&&(pe=null),!u.dragoverBubble&&!e.rootEl&&o!==document&&(c.parentNode[M]._isOutsideThisEl(e.target),!Ie&&ie(e)),!u.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),w=!0}function H(){F=Y(c),ee=Y(c,u.draggable),I({sortable:b,name:"change",toEl:n,newIndex:F,newDraggableIndex:ee,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),o=j(o,u.draggable,n,!0),B("dragOver"),p.eventCanceled)return w;if(c.contains(e.target)||o.animated&&o.animatingX&&o.animatingY||b._ignoreWhileAnimating===o)return P(!1);if(Fe=!1,s&&!u.disabled&&(d?f||(l=D!==S):x===this||(this.lastPutMode=Me.checkPull(this,s,c,e))&&a.checkPut(this,s,c,e))){if(E=this._getDirection(e,o)==="vertical",r=O(c),B("dragOverValid"),p.eventCanceled)return w;if(l)return D=S,q(),this._hideClone(),B("revert"),p.eventCanceled||(oe?S.insertBefore(c,oe):S.appendChild(c)),P(!0);var R=Ve(n,u.draggable);if(!R||Zt(e,E,this)&&!R.animated){if(R===c)return P(!1);if(R&&n===e.target&&(o=R),o&&(i=O(o)),Le(S,n,c,r,o,i,e,!!o)!==!1)return q(),R&&R.nextSibling?n.insertBefore(c,R.nextSibling):n.appendChild(c),D=n,H(),P(!0)}else if(R&&Ut(e,E,this)){var ae=ce(n,0,u,!0);if(ae===c)return P(!1);if(o=ae,i=O(o),Le(S,n,c,r,o,i,e,!1)!==!1)return q(),n.insertBefore(c,ae),D=n,H(),P(!0)}else if(o.parentNode===n){i=O(o);var G=0,le,Te=c.parentNode!==n,X=!zt(c.animated&&c.toRect||r,o.animated&&o.toRect||i,E),Oe=E?"top":"left",te=mt(o,"top","top")||mt(c,"top","top"),xe=te?te.scrollTop:void 0;pe!==o&&(le=i[Oe],_e=!1,Xe=!X&&u.invertSwap||Te),G=Qt(e,o,i,E,X?1:u.swapThreshold,u.invertedSwapThreshold==null?u.swapThreshold:u.invertedSwapThreshold,Xe,pe===o);var K;if(G!==0){var se=Y(c);do se-=G,K=D.children[se];while(K&&(h(K,"display")==="none"||K===g))}if(G===0||K===o)return P(!1);pe=o,Se=G;var Ae=o.nextElementSibling,ne=!1;ne=G===1;var ze=Le(S,n,c,r,o,i,e,ne);if(ze!==!1)return(ze===1||ze===-1)&&(ne=ze===1),Qe=!0,setTimeout(Kt,30),q(),ne&&!Ae?n.appendChild(c):o.parentNode.insertBefore(c,ne?Ae:o),te&&yt(te,0,xe-te.scrollTop),D=c.parentNode,le!==void 0&&!Xe&&(Ye=Math.abs(le-O(o)[Oe])),H(),P(!0)}if(n.contains(c))return P(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){v(document,"mousemove",this._onTouchMove),v(document,"touchmove",this._onTouchMove),v(document,"pointermove",this._onTouchMove),v(document,"dragover",ie),v(document,"mousemove",ie),v(document,"touchmove",ie)},_offUpEvents:function(){var e=this.el.ownerDocument;v(e,"mouseup",this._onDrop),v(e,"touchend",this._onDrop),v(e,"pointerup",this._onDrop),v(e,"touchcancel",this._onDrop),v(document,"selectstart",this)},_onDrop:function(e){var n=this.el,o=this.options;if(F=Y(c),ee=Y(c,o.draggable),N("drop",this,{evt:e}),D=c&&c.parentNode,F=Y(c),ee=Y(c,o.draggable),p.eventCanceled){this._nulling();return}he=!1,Xe=!1,_e=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),tt(this.cloneId),tt(this._dragStartId),this.nativeDraggable&&(v(document,"drop",this),v(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ve&&h(document.body,"user-select",""),h(c,"transform",""),e&&(Ee&&(e.cancelable&&e.preventDefault(),!o.dropBubble&&e.stopPropagation()),g&&g.parentNode&&g.parentNode.removeChild(g),(S===D||x&&x.lastPutMode!=="clone")&&_&&_.parentNode&&_.parentNode.removeChild(_),c&&(this.nativeDraggable&&v(c,"dragend",this),et(c),c.style["will-change"]="",Ee&&!he&&k(c,x?x.options.ghostClass:this.options.ghostClass,!1),k(c,this.options.chosenClass,!1),I({sortable:this,name:"unchoose",toEl:D,newIndex:null,newDraggableIndex:null,originalEvent:e}),S!==D?(F>=0&&(I({rootEl:D,name:"add",toEl:D,fromEl:S,originalEvent:e}),I({sortable:this,name:"remove",toEl:D,originalEvent:e}),I({rootEl:D,name:"sort",toEl:D,fromEl:S,originalEvent:e}),I({sortable:this,name:"sort",toEl:D,originalEvent:e})),x&&x.save()):F!==fe&&F>=0&&(I({sortable:this,name:"update",toEl:D,originalEvent:e}),I({sortable:this,name:"sort",toEl:D,originalEvent:e})),p.active&&((F==null||F===-1)&&(F=fe,ee=we),I({sortable:this,name:"end",toEl:D,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){N("nulling",this),S=c=D=g=oe=_=ke=Q=re=$=Ee=F=ee=fe=we=pe=Se=x=Me=p.dragged=p.ghost=p.clone=p.active=null,$e.forEach(function(e){e.checked=!0}),$e.length=Ke=Ue=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":c&&(this._onDragOver(e),qt(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],n,o=this.el.children,r=0,i=o.length,l=this.options;r<i;r++)n=o[r],j(n,l.draggable,this.el,!1)&&e.push(n.getAttribute(l.dataIdAttr)||tn(n));return e},sort:function(e,n){var o={},r=this.el;this.toArray().forEach(function(i,l){var u=r.children[l];j(u,this.options.draggable,r,!1)&&(o[i]=u)},this),n&&this.captureAnimationState(),e.forEach(function(i){o[i]&&(r.removeChild(o[i]),r.appendChild(o[i]))}),n&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,n){return j(e,n||this.options.draggable,this.el,!1)},option:function(e,n){var o=this.options;if(n===void 0)return o[e];var r=ye.modifyOption(this,e,n);typeof r<"u"?o[e]=r:o[e]=n,e==="group"&&Tt(o)},destroy:function(){N("destroy",this);var e=this.el;e[M]=null,v(e,"mousedown",this._onTapStart),v(e,"touchstart",this._onTapStart),v(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(v(e,"dragover",this),v(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Re.splice(Re.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Q){if(N("hideClone",this),p.eventCanceled)return;h(_,"display","none"),this.options.removeCloneOnHide&&_.parentNode&&_.parentNode.removeChild(_),Q=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Q){if(N("showClone",this),p.eventCanceled)return;c.parentNode==S&&!this.options.group.revertClone?S.insertBefore(_,c):oe?S.insertBefore(_,oe):S.appendChild(_),this.options.group.revertClone&&this.animate(c,_),h(_,"display",""),Q=!1}}};function qt(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function Le(t,e,n,o,r,i,l,u){var a,s=t[M],d=s.options.onMove,f;return window.CustomEvent&&!J&&!me?a=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(a=document.createEvent("Event"),a.initEvent("move",!0,!0)),a.to=e,a.from=t,a.dragged=n,a.draggedRect=o,a.related=r||e,a.relatedRect=i||O(e),a.willInsertAfter=u,a.originalEvent=l,t.dispatchEvent(a),d&&(f=d.call(s,a,l)),f}function et(t){t.draggable=!1}function Kt(){Qe=!1}function Ut(t,e,n){var o=O(ce(n.el,0,n.options,!0)),r=10;return e?t.clientX<o.left-r||t.clientY<o.top&&t.clientX<o.right:t.clientY<o.top-r||t.clientY<o.bottom&&t.clientX<o.left}function Zt(t,e,n){var o=O(Ve(n.el,n.options.draggable)),r=10;return e?t.clientX>o.right+r||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+r}function Qt(t,e,n,o,r,i,l,u){var a=o?t.clientY:t.clientX,s=o?n.height:n.width,d=o?n.top:n.left,f=o?n.bottom:n.right,m=!1;if(!l){if(u&&Ye<s*r){if(!_e&&(Se===1?a>d+s*i/2:a<f-s*i/2)&&(_e=!0),_e)m=!0;else if(Se===1?a<d+Ye:a>f-Ye)return-Se}else if(a>d+s*(1-r)/2&&a<f-s*(1-r)/2)return en(e)}return m=m||l,m&&(a<d+s*i/2||a>f-s*i/2)?a>d+s/2?1:-1:0}function en(t){return Y(c)<Y(t)?1:-1}function tn(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function nn(t){$e.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var o=e[n];o.checked&&$e.push(o)}}function je(t){return setTimeout(t,0)}function tt(t){return clearTimeout(t)}Be&&y(document,"touchmove",function(t){(p.active||he)&&t.cancelable&&t.preventDefault()}),p.utils={on:y,off:v,css:h,find:gt,is:function(e,n){return!!j(e,n,e,!1)},extend:Yt,throttle:bt,closest:j,toggleClass:k,clone:wt,index:Y,nextTick:je,cancelNextTick:tt,detectDirection:Ct,getChild:ce},p.get=function(t){return t[M]},p.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(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=L(L({},p.utils),o.utils)),ye.mount(o)})},p.create=function(t,e){return new p(t,e)},p.version=Ft;var C=[],De,nt,ot=!1,rt,it,We,Ce;function on(){function t(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return t.prototype={dragStarted:function(n){var o=n.originalEvent;this.sortable.nativeDraggable?y(document,"dragover",this._handleAutoScroll):this.options.supportPointer?y(document,"pointermove",this._handleFallbackAutoScroll):o.touches?y(document,"touchmove",this._handleFallbackAutoScroll):y(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var o=n.originalEvent;!this.options.dragOverBubble&&!o.rootEl&&this._handleAutoScroll(o)},drop:function(){this.sortable.nativeDraggable?v(document,"dragover",this._handleAutoScroll):(v(document,"pointermove",this._handleFallbackAutoScroll),v(document,"touchmove",this._handleFallbackAutoScroll),v(document,"mousemove",this._handleFallbackAutoScroll)),At(),Ge(),$t()},nulling:function(){We=nt=De=ot=Ce=rt=it=null,C.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,o){var r=this,i=(n.touches?n.touches[0]:n).clientX,l=(n.touches?n.touches[0]:n).clientY,u=document.elementFromPoint(i,l);if(We=n,o||this.options.forceAutoScrollFallback||me||J||ve){at(n,this.options,u,o);var a=Z(u,!0);ot&&(!Ce||i!==rt||l!==it)&&(Ce&&At(),Ce=setInterval(function(){var s=Z(document.elementFromPoint(i,l),!0);s!==a&&(a=s,Ge()),at(n,r.options,s,o)},10),rt=i,it=l)}else{if(!this.options.bubbleScroll||Z(u,!0)===W()){Ge();return}at(n,this.options,Z(u,!1),!1)}}},z(t,{pluginName:"scroll",initializeByDefault:!0})}function Ge(){C.forEach(function(t){clearInterval(t.pid)}),C=[]}function At(){clearInterval(Ce)}var at=bt(function(t,e,n,o){if(!!e.scroll){var r=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,u=e.scrollSpeed,a=W(),s=!1,d;nt!==n&&(nt=n,Ge(),De=e.scroll,d=e.scrollFn,De===!0&&(De=Z(n,!0)));var f=0,m=De;do{var E=m,b=O(E),w=b.top,B=b.bottom,q=b.left,P=b.right,H=b.width,R=b.height,ae=void 0,G=void 0,le=E.scrollWidth,Te=E.scrollHeight,X=h(E),Oe=E.scrollLeft,te=E.scrollTop;E===a?(ae=H<le&&(X.overflowX==="auto"||X.overflowX==="scroll"||X.overflowX==="visible"),G=R<Te&&(X.overflowY==="auto"||X.overflowY==="scroll"||X.overflowY==="visible")):(ae=H<le&&(X.overflowX==="auto"||X.overflowX==="scroll"),G=R<Te&&(X.overflowY==="auto"||X.overflowY==="scroll"));var xe=ae&&(Math.abs(P-r)<=l&&Oe+H<le)-(Math.abs(q-r)<=l&&!!Oe),K=G&&(Math.abs(B-i)<=l&&te+R<Te)-(Math.abs(w-i)<=l&&!!te);if(!C[f])for(var se=0;se<=f;se++)C[se]||(C[se]={});(C[f].vx!=xe||C[f].vy!=K||C[f].el!==E)&&(C[f].el=E,C[f].vx=xe,C[f].vy=K,clearInterval(C[f].pid),(xe!=0||K!=0)&&(s=!0,C[f].pid=setInterval(function(){o&&this.layer===0&&p.active._onTouchMove(We);var Ae=C[this.layer].vy?C[this.layer].vy*u:0,ne=C[this.layer].vx?C[this.layer].vx*u:0;typeof d=="function"&&d.call(p.dragged.parentNode[M],ne,Ae,t,We,C[this.layer].el)!=="continue"||yt(C[this.layer].el,ne,Ae)}.bind({layer:f}),24))),f++}while(e.bubbleScroll&&m!==a&&(m=Z(m,!1)));ot=s}},30),It=function(e){var n=e.originalEvent,o=e.putSortable,r=e.dragEl,i=e.activeSortable,l=e.dispatchSortableEvent,u=e.hideGhostForTarget,a=e.unhideGhostForTarget;if(!!n){var s=o||i;u();var d=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,f=document.elementFromPoint(d.clientX,d.clientY);a(),s&&!s.el.contains(f)&&(l("spill"),this.onSpill({dragEl:r,putSortable:o}))}};function lt(){}lt.prototype={startIndex:null,dragStart:function(e){var n=e.oldDraggableIndex;this.startIndex=n},onSpill:function(e){var n=e.dragEl,o=e.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var r=ce(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(n,r):this.sortable.el.appendChild(n),this.sortable.animateAll(),o&&o.animateAll()},drop:It},z(lt,{pluginName:"revertOnSpill"});function st(){}st.prototype={onSpill:function(e){var n=e.dragEl,o=e.putSortable,r=o||this.sortable;r.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),r.animateAll()},drop:It},z(st,{pluginName:"removeOnSpill"}),p.mount(new on),p.mount(st,lt);const ge={name:"CommonTable",props:{columns:{type:Array,default(){return[]},validator:t=>Array.isArray(t),required:!0},config:{type:Object,default(){return{}}},modelValue:{type:Array,default(){return[]},validator:t=>Array.isArray(t)},options:{type:Object,default(){return{}},validator:t=>typeof t=="object"}},emits:["update:modelValue","select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change"],data(){return{tableKey:1}},methods:{init(){let t=this,e=Object.assign({group:{name:"group",pull:!0,put:!1},sort:!1,delay:0,delayOnTouchOnly:!1,touchStartThreshold:0,disabled:!1,store:null,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",handle:".el-table__row",preventOnFilter:!0,draggable:".el-table__row",dragClass:"el-table__row",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:1,direction:"horizontal",forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,dragoverBubble:!1,removeCloneOnHide:!0,emptyInsertThreshold:5,onEnd:({newIndex:o,oldIndex:r})=>{const i=[...t.modelValue];i.splice(o,0,i.splice(r,1)[0]),o!==r&&(t.tableKey++,t.$emit("update:modelValue",i))}},this.depCopy(this.options,["onEnd","onClone","onChange"]));const n=document.querySelector("#sortTable .el-table__body-wrapper tbody");p.create(n,e)},renderElement(){let t=this.modelValue,{columns:e,config:n}=this,o={stripe:!1,border:!1,fit:!0,"show-header":!0,"highlight-current-row":!1,"empty-text":"\u6682\u65E0\u6570\u636E","default-expand-all":!1,"default-sort":{order:"ascending"},"show-summary":!1,"sum-text":"\u5408\u8BA1","select-on-indeterminate":!0,indent:16,"tree-props":{hasChildren:"hasChildren",children:"children"},ref:"baseTableJsx"},r=n.slots,i=this.depCopy(n,["slots","ref"]),u={...Object.assign(o,i)};return u.on?T.createVNode("div",{id:"sortTable",class:"sortTable"},[T.createVNode(T.resolveComponent("el-table"),T.mergeProps({data:t},u,{key:tableKey}),{default:()=>[e.map((a,s)=>{let d=this.depCopy(a,["scopedSlots"]),f=a.scopedSlots,m={...d};return T.createVNode(T.resolveComponent("el-table-column"),T.mergeProps(m,{key:s}),f)})],...r})]):T.createVNode("div",{id:"sortTable",class:"sortTable"},[T.createVNode(T.resolveComponent("el-table"),T.mergeProps({data:t,onSelectAll:()=>{this.selectAll()},onSelect:(a,s)=>{this.select(a,s)},onCellMouseEnter:(a,s,d,f)=>{this.cellMouseEnter(a,s,d,f)},onSelectionChange:a=>{this.selectionChange(a)},onCellMouseLeave:(a,s,d,f)=>{this.cellMouseLeave(a,s,d,f)},onCellClick:(a,s,d,f)=>{this.cellClick(a,s,d,f)},onCellDblclick:(a,s,d,f)=>{this.cellDblclick(a,s,d,f)},onRowClick:(a,s,d)=>{this.rowClick(a,s,d)},onRowContextmenu:(a,s,d)=>{this.rowContextmenu(a,s,d)},onRowDblclick:(a,s,d)=>{this.rowDblclick(a,s,d)},onHeaderClick:(a,s)=>{this.headerClick(a,s)},onHeaderContextmenu:(a,s)=>{this.headerContextmenu(a,s)},onSortChange:({column:a,prop:s,order:d})=>{this.sortChange({column:a,prop:s,order:d})},onFilterChange:a=>{this.filterChange(a)},onCurrentChange:(a,s)=>{this.currentChange(a,s)},obHeaderDragend:(a,s,d,f)=>{this.headerDragend(a,s,d,f)},onExpandChange:(a,s)=>{this.expandChange(a,s)}},u,{key:this.tableKey}),{default:()=>[e.map((a,s)=>{let d=this.depCopy(a,["scopedSlots"]),f=a.scopedSlots,m={...d};return T.createVNode(T.resolveComponent("el-table-column"),T.mergeProps(m,{key:s}),f)})],...r})])},depCopy(t,e=[]){Array.isArray(e)||(e=[]);let n={};for(let o in t)e.includes(o)||(n[o]=t[o]);return n},select(t,e){this.$emit("select",t,e)},selectAll(){this.$emit("select-all")},selectionChange(t){this.$emit("selection-change",t)},cellMouseEnter(t,e,n,o){this.$emit("cell-mouse-enter",t,e,n,o)},cellMouseLeave(t,e,n,o){this.$emit("cell-mouse-leave",t,e,n,o)},cellClick(t,e,n,o){this.$emit("cell-click",t,e,n,o)},cellDblclick(t,e,n,o){this.$emit("cell-dblclick",t,e,n,o)},rowClick(t,e,n){this.$emit("row-click",t,e,n)},rowContextmenu(t,e,n){this.$emit("row-contextmenu",t,e,n)},rowDblclick(t,e,n){this.$emit("row-dblclick",t,e,n)},headerClick(t,e){this.$emit("header-click",t,e)},headerContextmenu(t,e){this.$emit("header-contextmenu",t,e)},sortChange({column:t,prop:e,order:n}){this.$emit("sort-change",{column:t,prop:e,order:n})},filterChange(t){this.$emit("filter-change",t)},currentChange(t,e){this.$emit("current-change",t,e)},headerDragend(t,e,n,o){this.$emit("header-dragend",t,e,n,o)},expandChange(t,e){this.$emit("expand-change",t,e)},clearSelection(){this.$refs.baseTableJsx.clearSelection()},toggleRowSelection(t,e){this.$refs.baseTableJsx.toggleRowSelection(t,e)},toggleAllSelection(){this.$refs.baseTableJsx.toggleAllSelection()},toggleRowExpansion(t,e){this.$refs.baseTableJsx.toggleRowExpansion(t,e)},setCurrentRow(t){this.$refs.baseTableJsx.setCurrentRow(t)},clearSort(){this.$refs.baseTableJsx.clearSort()},clearFilter(t){this.$refs.baseTableJsx.clearFilter(t)},doLayout(){this.$refs.baseTableJsx.doLayout()},sort(t,e){this.$refs.baseTableJsx.sort(t,e)}},render(){return T.nextTick(()=>{this.init()}),this.renderElement()}};ge.install=function(t){t.component(ge.name,ge)};const rn=[ge];function an(t){rn.forEach(e=>{t.component(e.name,e)})}const ln={install:an,CommonTable:ge};U.CommonTable=ge,U.default=ln,Object.defineProperties(U,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); | ||
*/function ut(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function L(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ut(Object(n),!0).forEach(function(o){Nt(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ut(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function Pe(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pe=function(e){return typeof e}:Pe=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pe(t)}function Nt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function z(){return z=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},z.apply(this,arguments)}function kt(t,e){if(t==null)return{};var n={},o=Object.keys(t),i,r;for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Mt(t,e){if(t==null)return{};var n=kt(t,e),o,i;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i<r.length;i++)o=r[i],!(e.indexOf(o)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,o)||(n[o]=t[o]))}return n}var Ft="1.15.0";function V(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var J=V(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),me=V(/Edge/i),ct=V(/firefox/i),ve=V(/safari/i)&&!V(/chrome/i)&&!V(/android/i),dt=V(/iP(ad|od|hone)/i),ft=V(/chrome/i)&&V(/android/i),ht={capture:!1,passive:!1};function w(t,e,n){t.addEventListener(e,n,!J&&ht)}function v(t,e,n){t.removeEventListener(e,n,!J&&ht)}function Ne(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{return!1}return!1}}function Rt(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function j(t,e,n,o){if(t){n=n||document;do{if(e!=null&&(e[0]===">"?t.parentNode===n&&Ne(t,e):Ne(t,e))||o&&t===n)return t;if(t===n)break}while(t=Rt(t))}return null}var pt=/\s+/g;function k(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(pt," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(pt," ")}}function h(t,e,n){var o=t&&t.style;if(o){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),e===void 0?n:n[e];!(e in o)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),o[e]=n+(typeof n=="string"?"":"px")}}function ue(t,e){var n="";if(typeof t=="string")n=t;else do{var o=h(t,"transform");o&&o!=="none"&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function gt(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 W(){var t=document.scrollingElement;return t||document.documentElement}function O(t,e,n,o,i){if(!(!t.getBoundingClientRect&&t!==window)){var r,l,s,u,a,c,d;if(t!==window&&t.parentNode&&t!==W()?(r=t.getBoundingClientRect(),l=r.top,s=r.left,u=r.bottom,a=r.right,c=r.height,d=r.width):(l=0,s=0,u=window.innerHeight,a=window.innerWidth,c=window.innerHeight,d=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!J))do if(i&&i.getBoundingClientRect&&(h(i,"transform")!=="none"||n&&h(i,"position")!=="static")){var g=i.getBoundingClientRect();l-=g.top+parseInt(h(i,"border-top-width")),s-=g.left+parseInt(h(i,"border-left-width")),u=l+r.height,a=s+r.width;break}while(i=i.parentNode);if(o&&t!==window){var y=ue(i||t),b=y&&y.a,E=y&&y.d;y&&(l/=E,s/=b,d/=b,c/=E,u=l+c,a=s+d)}return{top:l,left:s,bottom:u,right:a,width:d,height:c}}}function mt(t,e,n){for(var o=Z(t,!0),i=O(t)[e];o;){var r=O(o)[n],l=void 0;if(n==="top"||n==="left"?l=i>=r:l=i<=r,!l)return o;if(o===W())break;o=Z(o,!1)}return!1}function ce(t,e,n,o){for(var i=0,r=0,l=t.children;r<l.length;){if(l[r].style.display!=="none"&&l[r]!==p.ghost&&(o||l[r]!==p.dragged)&&j(l[r],n.draggable,t,!1)){if(i===e)return l[r];i++}r++}return null}function Ve(t,e){for(var n=t.lastElementChild;n&&(n===p.ghost||h(n,"display")==="none"||e&&!Ne(n,e));)n=n.previousElementSibling;return n||null}function Y(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)t.nodeName.toUpperCase()!=="TEMPLATE"&&t!==p.clone&&(!e||Ne(t,e))&&n++;return n}function vt(t){var e=0,n=0,o=W();if(t)do{var i=ue(t),r=i.a,l=i.d;e+=t.scrollLeft*r,n+=t.scrollTop*l}while(t!==o&&(t=t.parentNode));return[e,n]}function Xt(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 Z(t,e){if(!t||!t.getBoundingClientRect)return W();var n=t,o=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=h(n);if(n.clientWidth<n.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return W();if(o||e)return n;o=!0}}while(n=n.parentNode);return W()}function Yt(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function Je(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)}var be;function bt(t,e){return function(){if(!be){var n=arguments,o=this;n.length===1?t.call(o,n[0]):t.apply(o,n),be=setTimeout(function(){be=void 0},e)}}}function $t(){clearTimeout(be),be=void 0}function yt(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function wt(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)}var M="Sortable"+new Date().getTime();function Bt(){var t=[],e;return{captureAnimationState:function(){if(t=[],!!this.options.animation){var o=[].slice.call(this.el.children);o.forEach(function(i){if(!(h(i,"display")==="none"||i===p.ghost)){t.push({target:i,rect:O(i)});var r=L({},t[t.length-1].rect);if(i.thisAnimationDuration){var l=ue(i,!0);l&&(r.top-=l.f,r.left-=l.e)}i.fromRect=r}})}},addAnimationState:function(o){t.push(o)},removeAnimationState:function(o){t.splice(Xt(t,{target:o}),1)},animateAll:function(o){var i=this;if(!this.options.animation){clearTimeout(e),typeof o=="function"&&o();return}var r=!1,l=0;t.forEach(function(s){var u=0,a=s.target,c=a.fromRect,d=O(a),g=a.prevFromRect,y=a.prevToRect,b=s.rect,E=ue(a,!0);E&&(d.top-=E.f,d.left-=E.e),a.toRect=d,a.thisAnimationDuration&&Je(g,d)&&!Je(c,d)&&(b.top-d.top)/(b.left-d.left)===(c.top-d.top)/(c.left-d.left)&&(u=Lt(b,g,y,i.options)),Je(d,c)||(a.prevFromRect=c,a.prevToRect=d,u||(u=i.options.animation),i.animate(a,b,d,u)),u&&(r=!0,l=Math.max(l,u),clearTimeout(a.animationResetTimer),a.animationResetTimer=setTimeout(function(){a.animationTime=0,a.prevFromRect=null,a.fromRect=null,a.prevToRect=null,a.thisAnimationDuration=null},u),a.thisAnimationDuration=u)}),clearTimeout(e),r?e=setTimeout(function(){typeof o=="function"&&o()},l):typeof o=="function"&&o(),t=[]},animate:function(o,i,r,l){if(l){h(o,"transition",""),h(o,"transform","");var s=ue(this.el),u=s&&s.a,a=s&&s.d,c=(i.left-r.left)/(u||1),d=(i.top-r.top)/(a||1);o.animatingX=!!c,o.animatingY=!!d,h(o,"transform","translate3d("+c+"px,"+d+"px,0)"),this.forRepaintDummy=Ht(o),h(o,"transition","transform "+l+"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},l)}}}}function Ht(t){return t.offsetWidth}function Lt(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 de=[],qe={initializeByDefault:!0},ye={mount:function(e){for(var n in qe)qe.hasOwnProperty(n)&&!(n in e)&&(e[n]=qe[n]);de.forEach(function(o){if(o.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),de.push(e)},pluginEvent:function(e,n,o){var i=this;this.eventCanceled=!1,o.cancel=function(){i.eventCanceled=!0};var r=e+"Global";de.forEach(function(l){!n[l.pluginName]||(n[l.pluginName][r]&&n[l.pluginName][r](L({sortable:n},o)),n.options[l.pluginName]&&n[l.pluginName][e]&&n[l.pluginName][e](L({sortable:n},o)))})},initializePlugins:function(e,n,o,i){de.forEach(function(s){var u=s.pluginName;if(!(!e.options[u]&&!s.initializeByDefault)){var a=new s(e,n,e.options);a.sortable=e,a.options=e.options,e[u]=a,z(o,a.defaults)}});for(var r in e.options)if(!!e.options.hasOwnProperty(r)){var l=this.modifyOption(e,r,e.options[r]);typeof l<"u"&&(e.options[r]=l)}},getEventProperties:function(e,n){var o={};return de.forEach(function(i){typeof i.eventProperties=="function"&&z(o,i.eventProperties.call(n[i.pluginName],e))}),o},modifyOption:function(e,n,o){var i;return de.forEach(function(r){!e[r.pluginName]||r.optionListeners&&typeof r.optionListeners[n]=="function"&&(i=r.optionListeners[n].call(e[r.pluginName],o))}),i}};function jt(t){var e=t.sortable,n=t.rootEl,o=t.name,i=t.targetEl,r=t.cloneEl,l=t.toEl,s=t.fromEl,u=t.oldIndex,a=t.newIndex,c=t.oldDraggableIndex,d=t.newDraggableIndex,g=t.originalEvent,y=t.putSortable,b=t.extraEventProperties;if(e=e||n&&n[M],!!e){var E,B=e.options,q="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!J&&!me?E=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(E=document.createEvent("Event"),E.initEvent(o,!0,!0)),E.to=l||n,E.from=s||n,E.item=i||n,E.clone=r,E.oldIndex=u,E.newIndex=a,E.oldDraggableIndex=c,E.newDraggableIndex=d,E.originalEvent=g,E.pullMode=y?y.lastPutMode:void 0;var P=L(L({},b),ye.getEventProperties(o,e));for(var H in P)E[H]=P[H];n&&n.dispatchEvent(E),B[q]&&B[q].call(e,E)}}var Wt=["evt"],N=function(e,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.evt,r=Mt(o,Wt);ye.pluginEvent.bind(p)(e,n,L({dragEl:f,parentEl:D,ghostEl:m,rootEl:S,nextEl:oe,lastDownEl:ke,cloneEl:_,cloneHidden:Q,dragStarted:Ee,putSortable:x,activeSortable:p.active,originalEvent:i,oldIndex:fe,oldDraggableIndex:we,newIndex:F,newDraggableIndex:ee,hideGhostForTarget:Ot,unhideGhostForTarget:xt,cloneNowHidden:function(){Q=!0},cloneNowShown:function(){Q=!1},dispatchSortableEvent:function(s){I({sortable:n,name:s,originalEvent:i})}},r))};function I(t){jt(L({putSortable:x,cloneEl:_,targetEl:f,rootEl:S,oldIndex:fe,oldDraggableIndex:we,newIndex:F,newDraggableIndex:ee},t))}var f,D,m,S,oe,ke,_,Q,fe,F,we,ee,Me,x,he=!1,Fe=!1,Re=[],ie,$,Ke,Ue,Et,St,Ee,pe,Se,_e=!1,Xe=!1,Ye,A,Ze=[],Qe=!1,$e=[],Be=typeof document<"u",He=dt,_t=me||J?"cssFloat":"float",Gt=Be&&!ft&&!dt&&"draggable"in document.createElement("div"),Dt=function(){if(!!Be){if(J)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),Ct=function(e,n){var o=h(e),i=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),r=ce(e,0,n),l=ce(e,1,n),s=r&&h(r),u=l&&h(l),a=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+O(r).width,c=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+O(l).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&&s.float&&s.float!=="none"){var d=s.float==="left"?"left":"right";return l&&(u.clear==="both"||u.clear===d)?"vertical":"horizontal"}return r&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||a>=i&&o[_t]==="none"||l&&o[_t]==="none"&&a+c>i)?"vertical":"horizontal"},zt=function(e,n,o){var i=o?e.left:e.top,r=o?e.right:e.bottom,l=o?e.width:e.height,s=o?n.left:n.top,u=o?n.right:n.bottom,a=o?n.width:n.height;return i===s||r===u||i+l/2===s+a/2},Vt=function(e,n){var o;return Re.some(function(i){var r=i[M].options.emptyInsertThreshold;if(!(!r||Ve(i))){var l=O(i),s=e>=l.left-r&&e<=l.right+r,u=n>=l.top-r&&n<=l.bottom+r;if(s&&u)return o=i}}),o},Tt=function(e){function n(r,l){return function(s,u,a,c){var d=s.options.group.name&&u.options.group.name&&s.options.group.name===u.options.group.name;if(r==null&&(l||d))return!0;if(r==null||r===!1)return!1;if(l&&r==="clone")return r;if(typeof r=="function")return n(r(s,u,a,c),l)(s,u,a,c);var g=(l?s:u).options.group.name;return r===!0||typeof r=="string"&&r===g||r.join&&r.indexOf(g)>-1}}var o={},i=e.group;(!i||Pe(i)!="object")&&(i={name:i}),o.name=i.name,o.checkPull=n(i.pull,!0),o.checkPut=n(i.put),o.revertClone=i.revertClone,e.group=o},Ot=function(){!Dt&&m&&h(m,"display","none")},xt=function(){!Dt&&m&&h(m,"display","")};Be&&!ft&&document.addEventListener("click",function(t){if(Fe)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Fe=!1,!1},!0);var re=function(e){if(f){e=e.touches?e.touches[0]:e;var n=Vt(e.clientX,e.clientY);if(n){var o={};for(var i in e)e.hasOwnProperty(i)&&(o[i]=e[i]);o.target=o.rootEl=n,o.preventDefault=void 0,o.stopPropagation=void 0,n[M]._onDragOver(o)}}},Jt=function(e){f&&f.parentNode[M]._isOutsideThisEl(e.target)};function p(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=z({},e),t[M]=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 Ct(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(l,s){l.setData("Text",s.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&&!ve,emptyInsertThreshold:5};ye.initializePlugins(this,t,n);for(var o in n)!(o in e)&&(e[o]=n[o]);Tt(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:Gt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?w(t,"pointerdown",this._onTapStart):(w(t,"mousedown",this._onTapStart),w(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(w(t,"dragover",this),w(t,"dragenter",this)),Re.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),z(this,Bt())}p.prototype={constructor:p,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(pe=null)},_getDirection:function(e,n){return typeof this.options.direction=="function"?this.options.direction.call(this,e,n,f):this.options.direction},_onTapStart:function(e){if(!!e.cancelable){var n=this,o=this.el,i=this.options,r=i.preventOnFilter,l=e.type,s=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,u=(s||e).target,a=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||u,c=i.filter;if(nn(o),!f&&!(/mousedown|pointerdown/.test(l)&&e.button!==0||i.disabled)&&!a.isContentEditable&&!(!this.nativeDraggable&&ve&&u&&u.tagName.toUpperCase()==="SELECT")&&(u=j(u,i.draggable,o,!1),!(u&&u.animated)&&ke!==u)){if(fe=Y(u),we=Y(u,i.draggable),typeof c=="function"){if(c.call(this,e,u,this)){I({sortable:n,rootEl:a,name:"filter",targetEl:u,toEl:o,fromEl:o}),N("filter",n,{evt:e}),r&&e.cancelable&&e.preventDefault();return}}else if(c&&(c=c.split(",").some(function(d){if(d=j(a,d.trim(),o,!1),d)return I({sortable:n,rootEl:d,name:"filter",targetEl:u,fromEl:o,toEl:o}),N("filter",n,{evt:e}),!0}),c)){r&&e.cancelable&&e.preventDefault();return}i.handle&&!j(a,i.handle,o,!1)||this._prepareDragStart(e,s,u)}}},_prepareDragStart:function(e,n,o){var i=this,r=i.el,l=i.options,s=r.ownerDocument,u;if(o&&!f&&o.parentNode===r){var a=O(o);if(S=r,f=o,D=f.parentNode,oe=f.nextSibling,ke=o,Me=l.group,p.dragged=f,ie={target:f,clientX:(n||e).clientX,clientY:(n||e).clientY},Et=ie.clientX-a.left,St=ie.clientY-a.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,f.style["will-change"]="all",u=function(){if(N("delayEnded",i,{evt:e}),p.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!ct&&i.nativeDraggable&&(f.draggable=!0),i._triggerDragStart(e,n),I({sortable:i,name:"choose",originalEvent:e}),k(f,l.chosenClass,!0)},l.ignore.split(",").forEach(function(c){gt(f,c.trim(),et)}),w(s,"dragover",re),w(s,"mousemove",re),w(s,"touchmove",re),w(s,"mouseup",i._onDrop),w(s,"touchend",i._onDrop),w(s,"touchcancel",i._onDrop),ct&&this.nativeDraggable&&(this.options.touchStartThreshold=4,f.draggable=!0),N("delayStart",this,{evt:e}),l.delay&&(!l.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(me||J))){if(p.eventCanceled){this._onDrop();return}w(s,"mouseup",i._disableDelayedDrag),w(s,"touchend",i._disableDelayedDrag),w(s,"touchcancel",i._disableDelayedDrag),w(s,"mousemove",i._delayedDragTouchMoveHandler),w(s,"touchmove",i._delayedDragTouchMoveHandler),l.supportPointer&&w(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(u,l.delay)}else u()}},_delayedDragTouchMoveHandler:function(e){var n=e.touches?e.touches[0]:e;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){f&&et(f),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;v(e,"mouseup",this._disableDelayedDrag),v(e,"touchend",this._disableDelayedDrag),v(e,"touchcancel",this._disableDelayedDrag),v(e,"mousemove",this._delayedDragTouchMoveHandler),v(e,"touchmove",this._delayedDragTouchMoveHandler),v(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,n){n=n||e.pointerType=="touch"&&e,!this.nativeDraggable||n?this.options.supportPointer?w(document,"pointermove",this._onTouchMove):n?w(document,"touchmove",this._onTouchMove):w(document,"mousemove",this._onTouchMove):(w(f,"dragend",this),w(S,"dragstart",this._onDragStart));try{document.selection?je(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,n){if(he=!1,S&&f){N("dragStarted",this,{evt:n}),this.nativeDraggable&&w(document,"dragover",Jt);var o=this.options;!e&&k(f,o.dragClass,!1),k(f,o.ghostClass,!0),p.active=this,e&&this._appendGhost(),I({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if($){this._lastX=$.clientX,this._lastY=$.clientY,Ot();for(var e=document.elementFromPoint($.clientX,$.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint($.clientX,$.clientY),e!==n);)n=e;if(f.parentNode[M]._isOutsideThisEl(e),n)do{if(n[M]){var o=void 0;if(o=n[M]._onDragOver({clientX:$.clientX,clientY:$.clientY,target:e,rootEl:n}),o&&!this.options.dragoverBubble)break}e=n}while(n=n.parentNode);xt()}},_onTouchMove:function(e){if(ie){var n=this.options,o=n.fallbackTolerance,i=n.fallbackOffset,r=e.touches?e.touches[0]:e,l=m&&ue(m,!0),s=m&&l&&l.a,u=m&&l&&l.d,a=He&&A&&vt(A),c=(r.clientX-ie.clientX+i.x)/(s||1)+(a?a[0]-Ze[0]:0)/(s||1),d=(r.clientY-ie.clientY+i.y)/(u||1)+(a?a[1]-Ze[1]:0)/(u||1);if(!p.active&&!he){if(o&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<o)return;this._onDragStart(e,!0)}if(m){l?(l.e+=c-(Ke||0),l.f+=d-(Ue||0)):l={a:1,b:0,c:0,d:1,e:c,f:d};var g="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");h(m,"webkitTransform",g),h(m,"mozTransform",g),h(m,"msTransform",g),h(m,"transform",g),Ke=c,Ue=d,$=r}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!m){var e=this.options.fallbackOnBody?document.body:S,n=O(f,!0,He,!0,e),o=this.options;if(He){for(A=e;h(A,"position")==="static"&&h(A,"transform")==="none"&&A!==document;)A=A.parentNode;A!==document.body&&A!==document.documentElement?(A===document&&(A=W()),n.top+=A.scrollTop,n.left+=A.scrollLeft):A=W(),Ze=vt(A)}m=f.cloneNode(!0),k(m,o.ghostClass,!1),k(m,o.fallbackClass,!0),k(m,o.dragClass,!0),h(m,"transition",""),h(m,"transform",""),h(m,"box-sizing","border-box"),h(m,"margin",0),h(m,"top",n.top),h(m,"left",n.left),h(m,"width",n.width),h(m,"height",n.height),h(m,"opacity","0.8"),h(m,"position",He?"absolute":"fixed"),h(m,"zIndex","100000"),h(m,"pointerEvents","none"),p.ghost=m,e.appendChild(m),h(m,"transform-origin",Et/parseInt(m.style.width)*100+"% "+St/parseInt(m.style.height)*100+"%")}},_onDragStart:function(e,n){var o=this,i=e.dataTransfer,r=o.options;if(N("dragStart",this,{evt:e}),p.eventCanceled){this._onDrop();return}N("setupClone",this),p.eventCanceled||(_=wt(f),_.removeAttribute("id"),_.draggable=!1,_.style["will-change"]="",this._hideClone(),k(_,this.options.chosenClass,!1),p.clone=_),o.cloneId=je(function(){N("clone",o),!p.eventCanceled&&(o.options.removeCloneOnHide||S.insertBefore(_,f),o._hideClone(),I({sortable:o,name:"clone"}))}),!n&&k(f,r.dragClass,!0),n?(Fe=!0,o._loopId=setInterval(o._emulateDragOver,50)):(v(document,"mouseup",o._onDrop),v(document,"touchend",o._onDrop),v(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)")),he=!0,o._dragStartId=je(o._dragStarted.bind(o,n,e)),w(document,"selectstart",o),Ee=!0,ve&&h(document.body,"user-select","none")},_onDragOver:function(e){var n=this.el,o=e.target,i,r,l,s=this.options,u=s.group,a=p.active,c=Me===u,d=s.sort,g=x||a,y,b=this,E=!1;if(Qe)return;function B(Ie,sn){N(Ie,b,L({evt:e,isOwner:c,axis:y?"vertical":"horizontal",revert:l,dragRect:i,targetRect:r,canSort:d,fromSortable:g,target:o,completed:P,onMove:function(Pt,un){return Le(S,n,f,i,Pt,O(Pt),e,un)},changed:H},sn))}function q(){B("dragOverAnimationCapture"),b.captureAnimationState(),b!==g&&g.captureAnimationState()}function P(Ie){return B("dragOverCompleted",{insertion:Ie}),Ie&&(c?a._hideClone():a._showClone(b),b!==g&&(k(f,x?x.options.ghostClass:a.options.ghostClass,!1),k(f,s.ghostClass,!0)),x!==b&&b!==p.active?x=b:b===p.active&&x&&(x=null),g===b&&(b._ignoreWhileAnimating=o),b.animateAll(function(){B("dragOverAnimationComplete"),b._ignoreWhileAnimating=null}),b!==g&&(g.animateAll(),g._ignoreWhileAnimating=null)),(o===f&&!f.animated||o===n&&!o.animated)&&(pe=null),!s.dragoverBubble&&!e.rootEl&&o!==document&&(f.parentNode[M]._isOutsideThisEl(e.target),!Ie&&re(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),E=!0}function H(){F=Y(f),ee=Y(f,s.draggable),I({sortable:b,name:"change",toEl:n,newIndex:F,newDraggableIndex:ee,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),o=j(o,s.draggable,n,!0),B("dragOver"),p.eventCanceled)return E;if(f.contains(e.target)||o.animated&&o.animatingX&&o.animatingY||b._ignoreWhileAnimating===o)return P(!1);if(Fe=!1,a&&!s.disabled&&(c?d||(l=D!==S):x===this||(this.lastPutMode=Me.checkPull(this,a,f,e))&&u.checkPut(this,a,f,e))){if(y=this._getDirection(e,o)==="vertical",i=O(f),B("dragOverValid"),p.eventCanceled)return E;if(l)return D=S,q(),this._hideClone(),B("revert"),p.eventCanceled||(oe?S.insertBefore(f,oe):S.appendChild(f)),P(!0);var R=Ve(n,s.draggable);if(!R||Zt(e,y,this)&&!R.animated){if(R===f)return P(!1);if(R&&n===e.target&&(o=R),o&&(r=O(o)),Le(S,n,f,i,o,r,e,!!o)!==!1)return q(),R&&R.nextSibling?n.insertBefore(f,R.nextSibling):n.appendChild(f),D=n,H(),P(!0)}else if(R&&Ut(e,y,this)){var ae=ce(n,0,s,!0);if(ae===f)return P(!1);if(o=ae,r=O(o),Le(S,n,f,i,o,r,e,!1)!==!1)return q(),n.insertBefore(f,ae),D=n,H(),P(!0)}else if(o.parentNode===n){r=O(o);var G=0,le,Te=f.parentNode!==n,X=!zt(f.animated&&f.toRect||i,o.animated&&o.toRect||r,y),Oe=y?"top":"left",te=mt(o,"top","top")||mt(f,"top","top"),xe=te?te.scrollTop:void 0;pe!==o&&(le=r[Oe],_e=!1,Xe=!X&&s.invertSwap||Te),G=Qt(e,o,r,y,X?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,Xe,pe===o);var K;if(G!==0){var se=Y(f);do se-=G,K=D.children[se];while(K&&(h(K,"display")==="none"||K===m))}if(G===0||K===o)return P(!1);pe=o,Se=G;var Ae=o.nextElementSibling,ne=!1;ne=G===1;var ze=Le(S,n,f,i,o,r,e,ne);if(ze!==!1)return(ze===1||ze===-1)&&(ne=ze===1),Qe=!0,setTimeout(Kt,30),q(),ne&&!Ae?n.appendChild(f):o.parentNode.insertBefore(f,ne?Ae:o),te&&yt(te,0,xe-te.scrollTop),D=f.parentNode,le!==void 0&&!Xe&&(Ye=Math.abs(le-O(o)[Oe])),H(),P(!0)}if(n.contains(f))return P(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){v(document,"mousemove",this._onTouchMove),v(document,"touchmove",this._onTouchMove),v(document,"pointermove",this._onTouchMove),v(document,"dragover",re),v(document,"mousemove",re),v(document,"touchmove",re)},_offUpEvents:function(){var e=this.el.ownerDocument;v(e,"mouseup",this._onDrop),v(e,"touchend",this._onDrop),v(e,"pointerup",this._onDrop),v(e,"touchcancel",this._onDrop),v(document,"selectstart",this)},_onDrop:function(e){var n=this.el,o=this.options;if(F=Y(f),ee=Y(f,o.draggable),N("drop",this,{evt:e}),D=f&&f.parentNode,F=Y(f),ee=Y(f,o.draggable),p.eventCanceled){this._nulling();return}he=!1,Xe=!1,_e=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),tt(this.cloneId),tt(this._dragStartId),this.nativeDraggable&&(v(document,"drop",this),v(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ve&&h(document.body,"user-select",""),h(f,"transform",""),e&&(Ee&&(e.cancelable&&e.preventDefault(),!o.dropBubble&&e.stopPropagation()),m&&m.parentNode&&m.parentNode.removeChild(m),(S===D||x&&x.lastPutMode!=="clone")&&_&&_.parentNode&&_.parentNode.removeChild(_),f&&(this.nativeDraggable&&v(f,"dragend",this),et(f),f.style["will-change"]="",Ee&&!he&&k(f,x?x.options.ghostClass:this.options.ghostClass,!1),k(f,this.options.chosenClass,!1),I({sortable:this,name:"unchoose",toEl:D,newIndex:null,newDraggableIndex:null,originalEvent:e}),S!==D?(F>=0&&(I({rootEl:D,name:"add",toEl:D,fromEl:S,originalEvent:e}),I({sortable:this,name:"remove",toEl:D,originalEvent:e}),I({rootEl:D,name:"sort",toEl:D,fromEl:S,originalEvent:e}),I({sortable:this,name:"sort",toEl:D,originalEvent:e})),x&&x.save()):F!==fe&&F>=0&&(I({sortable:this,name:"update",toEl:D,originalEvent:e}),I({sortable:this,name:"sort",toEl:D,originalEvent:e})),p.active&&((F==null||F===-1)&&(F=fe,ee=we),I({sortable:this,name:"end",toEl:D,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){N("nulling",this),S=f=D=m=oe=_=ke=Q=ie=$=Ee=F=ee=fe=we=pe=Se=x=Me=p.dragged=p.ghost=p.clone=p.active=null,$e.forEach(function(e){e.checked=!0}),$e.length=Ke=Ue=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":f&&(this._onDragOver(e),qt(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],n,o=this.el.children,i=0,r=o.length,l=this.options;i<r;i++)n=o[i],j(n,l.draggable,this.el,!1)&&e.push(n.getAttribute(l.dataIdAttr)||tn(n));return e},sort:function(e,n){var o={},i=this.el;this.toArray().forEach(function(r,l){var s=i.children[l];j(s,this.options.draggable,i,!1)&&(o[r]=s)},this),n&&this.captureAnimationState(),e.forEach(function(r){o[r]&&(i.removeChild(o[r]),i.appendChild(o[r]))}),n&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,n){return j(e,n||this.options.draggable,this.el,!1)},option:function(e,n){var o=this.options;if(n===void 0)return o[e];var i=ye.modifyOption(this,e,n);typeof i<"u"?o[e]=i:o[e]=n,e==="group"&&Tt(o)},destroy:function(){N("destroy",this);var e=this.el;e[M]=null,v(e,"mousedown",this._onTapStart),v(e,"touchstart",this._onTapStart),v(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(v(e,"dragover",this),v(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Re.splice(Re.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Q){if(N("hideClone",this),p.eventCanceled)return;h(_,"display","none"),this.options.removeCloneOnHide&&_.parentNode&&_.parentNode.removeChild(_),Q=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Q){if(N("showClone",this),p.eventCanceled)return;f.parentNode==S&&!this.options.group.revertClone?S.insertBefore(_,f):oe?S.insertBefore(_,oe):S.appendChild(_),this.options.group.revertClone&&this.animate(f,_),h(_,"display",""),Q=!1}}};function qt(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function Le(t,e,n,o,i,r,l,s){var u,a=t[M],c=a.options.onMove,d;return window.CustomEvent&&!J&&!me?u=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(u=document.createEvent("Event"),u.initEvent("move",!0,!0)),u.to=e,u.from=t,u.dragged=n,u.draggedRect=o,u.related=i||e,u.relatedRect=r||O(e),u.willInsertAfter=s,u.originalEvent=l,t.dispatchEvent(u),c&&(d=c.call(a,u,l)),d}function et(t){t.draggable=!1}function Kt(){Qe=!1}function Ut(t,e,n){var o=O(ce(n.el,0,n.options,!0)),i=10;return e?t.clientX<o.left-i||t.clientY<o.top&&t.clientX<o.right:t.clientY<o.top-i||t.clientY<o.bottom&&t.clientX<o.left}function Zt(t,e,n){var o=O(Ve(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 Qt(t,e,n,o,i,r,l,s){var u=o?t.clientY:t.clientX,a=o?n.height:n.width,c=o?n.top:n.left,d=o?n.bottom:n.right,g=!1;if(!l){if(s&&Ye<a*i){if(!_e&&(Se===1?u>c+a*r/2:u<d-a*r/2)&&(_e=!0),_e)g=!0;else if(Se===1?u<c+Ye:u>d-Ye)return-Se}else if(u>c+a*(1-i)/2&&u<d-a*(1-i)/2)return en(e)}return g=g||l,g&&(u<c+a*r/2||u>d-a*r/2)?u>c+a/2?1:-1:0}function en(t){return Y(f)<Y(t)?1:-1}function tn(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function nn(t){$e.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var o=e[n];o.checked&&$e.push(o)}}function je(t){return setTimeout(t,0)}function tt(t){return clearTimeout(t)}Be&&w(document,"touchmove",function(t){(p.active||he)&&t.cancelable&&t.preventDefault()}),p.utils={on:w,off:v,css:h,find:gt,is:function(e,n){return!!j(e,n,e,!1)},extend:Yt,throttle:bt,closest:j,toggleClass:k,clone:wt,index:Y,nextTick:je,cancelNextTick:tt,detectDirection:Ct,getChild:ce},p.get=function(t){return t[M]},p.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(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=L(L({},p.utils),o.utils)),ye.mount(o)})},p.create=function(t,e){return new p(t,e)},p.version=Ft;var C=[],De,nt,ot=!1,it,rt,We,Ce;function on(){function t(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return t.prototype={dragStarted:function(n){var o=n.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(n){var o=n.originalEvent;!this.options.dragOverBubble&&!o.rootEl&&this._handleAutoScroll(o)},drop:function(){this.sortable.nativeDraggable?v(document,"dragover",this._handleAutoScroll):(v(document,"pointermove",this._handleFallbackAutoScroll),v(document,"touchmove",this._handleFallbackAutoScroll),v(document,"mousemove",this._handleFallbackAutoScroll)),At(),Ge(),$t()},nulling:function(){We=nt=De=ot=Ce=it=rt=null,C.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,o){var i=this,r=(n.touches?n.touches[0]:n).clientX,l=(n.touches?n.touches[0]:n).clientY,s=document.elementFromPoint(r,l);if(We=n,o||this.options.forceAutoScrollFallback||me||J||ve){at(n,this.options,s,o);var u=Z(s,!0);ot&&(!Ce||r!==it||l!==rt)&&(Ce&&At(),Ce=setInterval(function(){var a=Z(document.elementFromPoint(r,l),!0);a!==u&&(u=a,Ge()),at(n,i.options,a,o)},10),it=r,rt=l)}else{if(!this.options.bubbleScroll||Z(s,!0)===W()){Ge();return}at(n,this.options,Z(s,!1),!1)}}},z(t,{pluginName:"scroll",initializeByDefault:!0})}function Ge(){C.forEach(function(t){clearInterval(t.pid)}),C=[]}function At(){clearInterval(Ce)}var at=bt(function(t,e,n,o){if(!!e.scroll){var i=(t.touches?t.touches[0]:t).clientX,r=(t.touches?t.touches[0]:t).clientY,l=e.scrollSensitivity,s=e.scrollSpeed,u=W(),a=!1,c;nt!==n&&(nt=n,Ge(),De=e.scroll,c=e.scrollFn,De===!0&&(De=Z(n,!0)));var d=0,g=De;do{var y=g,b=O(y),E=b.top,B=b.bottom,q=b.left,P=b.right,H=b.width,R=b.height,ae=void 0,G=void 0,le=y.scrollWidth,Te=y.scrollHeight,X=h(y),Oe=y.scrollLeft,te=y.scrollTop;y===u?(ae=H<le&&(X.overflowX==="auto"||X.overflowX==="scroll"||X.overflowX==="visible"),G=R<Te&&(X.overflowY==="auto"||X.overflowY==="scroll"||X.overflowY==="visible")):(ae=H<le&&(X.overflowX==="auto"||X.overflowX==="scroll"),G=R<Te&&(X.overflowY==="auto"||X.overflowY==="scroll"));var xe=ae&&(Math.abs(P-i)<=l&&Oe+H<le)-(Math.abs(q-i)<=l&&!!Oe),K=G&&(Math.abs(B-r)<=l&&te+R<Te)-(Math.abs(E-r)<=l&&!!te);if(!C[d])for(var se=0;se<=d;se++)C[se]||(C[se]={});(C[d].vx!=xe||C[d].vy!=K||C[d].el!==y)&&(C[d].el=y,C[d].vx=xe,C[d].vy=K,clearInterval(C[d].pid),(xe!=0||K!=0)&&(a=!0,C[d].pid=setInterval(function(){o&&this.layer===0&&p.active._onTouchMove(We);var Ae=C[this.layer].vy?C[this.layer].vy*s:0,ne=C[this.layer].vx?C[this.layer].vx*s:0;typeof c=="function"&&c.call(p.dragged.parentNode[M],ne,Ae,t,We,C[this.layer].el)!=="continue"||yt(C[this.layer].el,ne,Ae)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&g!==u&&(g=Z(g,!1)));ot=a}},30),It=function(e){var n=e.originalEvent,o=e.putSortable,i=e.dragEl,r=e.activeSortable,l=e.dispatchSortableEvent,s=e.hideGhostForTarget,u=e.unhideGhostForTarget;if(!!n){var a=o||r;s();var c=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,d=document.elementFromPoint(c.clientX,c.clientY);u(),a&&!a.el.contains(d)&&(l("spill"),this.onSpill({dragEl:i,putSortable:o}))}};function lt(){}lt.prototype={startIndex:null,dragStart:function(e){var n=e.oldDraggableIndex;this.startIndex=n},onSpill:function(e){var n=e.dragEl,o=e.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var i=ce(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(n,i):this.sortable.el.appendChild(n),this.sortable.animateAll(),o&&o.animateAll()},drop:It},z(lt,{pluginName:"revertOnSpill"});function st(){}st.prototype={onSpill:function(e){var n=e.dragEl,o=e.putSortable,i=o||this.sortable;i.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),i.animateAll()},drop:It},z(st,{pluginName:"removeOnSpill"}),p.mount(new on),p.mount(st,lt);const ge={name:"CommonTable",props:{columns:{type:Array,default(){return[]},validator:t=>Array.isArray(t),required:!0},config:{type:Object,default(){return{}}},modelValue:{type:Array,default(){return[]},validator:t=>Array.isArray(t)},options:{type:Object,default(){return{}},validator:t=>typeof t=="object"}},emits:["update:modelValue","select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change"],data(){return{tableKey:1,id:"sortTable"+new Date().getTime()}},methods:{init(){let t=this,e=Object.assign({group:{name:"group",pull:!0,put:!1},sort:!1,delay:0,delayOnTouchOnly:!1,touchStartThreshold:0,disabled:!1,store:null,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",handle:".el-table__row",preventOnFilter:!0,draggable:".el-table__row",dragClass:"el-table__row",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:1,direction:"horizontal",forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,dragoverBubble:!1,removeCloneOnHide:!0,emptyInsertThreshold:5,onEnd:({newIndex:o,oldIndex:i})=>{const r=[...t.modelValue];r.splice(o,0,r.splice(i,1)[0]),o!==i&&(t.tableKey++,t.$emit("update:modelValue",r))}},this.depCopy(this.options,["onEnd","onClone","onChange"]));const n=document.querySelector(`#${this.id} .el-table__body-wrapper tbody`);p.create(n,e)},renderElement(){let t=this.modelValue,{columns:e,config:n,id:o}=this,i={stripe:!1,border:!1,fit:!0,"show-header":!0,"highlight-current-row":!1,"empty-text":"\u6682\u65E0\u6570\u636E","default-expand-all":!1,"default-sort":{order:"ascending"},"show-summary":!1,"sum-text":"\u5408\u8BA1","select-on-indeterminate":!0,indent:16,"tree-props":{hasChildren:"hasChildren",children:"children"},ref:"baseTableJsx"},r=n.slots,l=this.depCopy(n,["slots","ref"]),u={...Object.assign(i,l)};return u.on?T.createVNode("div",{id:o,class:o},[T.createVNode(T.resolveComponent("el-table"),T.mergeProps({data:t},u,{key:tableKey}),{default:()=>[e.map((a,c)=>{let d=this.depCopy(a,["scopedSlots"]),g=a.scopedSlots,y={...d};return T.createVNode(T.resolveComponent("el-table-column"),T.mergeProps(y,{key:c}),g)})],...r})]):T.createVNode("div",{id:o,class:o},[T.createVNode(T.resolveComponent("el-table"),T.mergeProps({data:t,onSelectAll:()=>{this.selectAll()},onSelect:(a,c)=>{this.select(a,c)},onCellMouseEnter:(a,c,d,g)=>{this.cellMouseEnter(a,c,d,g)},onSelectionChange:a=>{this.selectionChange(a)},onCellMouseLeave:(a,c,d,g)=>{this.cellMouseLeave(a,c,d,g)},onCellClick:(a,c,d,g)=>{this.cellClick(a,c,d,g)},onCellDblclick:(a,c,d,g)=>{this.cellDblclick(a,c,d,g)},onRowClick:(a,c,d)=>{this.rowClick(a,c,d)},onRowContextmenu:(a,c,d)=>{this.rowContextmenu(a,c,d)},onRowDblclick:(a,c,d)=>{this.rowDblclick(a,c,d)},onHeaderClick:(a,c)=>{this.headerClick(a,c)},onHeaderContextmenu:(a,c)=>{this.headerContextmenu(a,c)},onSortChange:({column:a,prop:c,order:d})=>{this.sortChange({column:a,prop:c,order:d})},onFilterChange:a=>{this.filterChange(a)},onCurrentChange:(a,c)=>{this.currentChange(a,c)},obHeaderDragend:(a,c,d,g)=>{this.headerDragend(a,c,d,g)},onExpandChange:(a,c)=>{this.expandChange(a,c)}},u,{key:this.tableKey}),{default:()=>[e.map((a,c)=>{let d=this.depCopy(a,["scopedSlots"]),g=a.scopedSlots,y={...d};return T.createVNode(T.resolveComponent("el-table-column"),T.mergeProps(y,{key:c}),g)})],...r})])},depCopy(t,e=[]){Array.isArray(e)||(e=[]);let n={};for(let o in t)e.includes(o)||(n[o]=t[o]);return n},select(t,e){this.$emit("select",t,e)},selectAll(){this.$emit("select-all")},selectionChange(t){this.$emit("selection-change",t)},cellMouseEnter(t,e,n,o){this.$emit("cell-mouse-enter",t,e,n,o)},cellMouseLeave(t,e,n,o){this.$emit("cell-mouse-leave",t,e,n,o)},cellClick(t,e,n,o){this.$emit("cell-click",t,e,n,o)},cellDblclick(t,e,n,o){this.$emit("cell-dblclick",t,e,n,o)},rowClick(t,e,n){this.$emit("row-click",t,e,n)},rowContextmenu(t,e,n){this.$emit("row-contextmenu",t,e,n)},rowDblclick(t,e,n){this.$emit("row-dblclick",t,e,n)},headerClick(t,e){this.$emit("header-click",t,e)},headerContextmenu(t,e){this.$emit("header-contextmenu",t,e)},sortChange({column:t,prop:e,order:n}){this.$emit("sort-change",{column:t,prop:e,order:n})},filterChange(t){this.$emit("filter-change",t)},currentChange(t,e){this.$emit("current-change",t,e)},headerDragend(t,e,n,o){this.$emit("header-dragend",t,e,n,o)},expandChange(t,e){this.$emit("expand-change",t,e)},clearSelection(){this.$refs.baseTableJsx.clearSelection()},toggleRowSelection(t,e){this.$refs.baseTableJsx.toggleRowSelection(t,e)},toggleAllSelection(){this.$refs.baseTableJsx.toggleAllSelection()},toggleRowExpansion(t,e){this.$refs.baseTableJsx.toggleRowExpansion(t,e)},setCurrentRow(t){this.$refs.baseTableJsx.setCurrentRow(t)},clearSort(){this.$refs.baseTableJsx.clearSort()},clearFilter(t){this.$refs.baseTableJsx.clearFilter(t)},doLayout(){this.$refs.baseTableJsx.doLayout()},sort(t,e){this.$refs.baseTableJsx.sort(t,e)}},render(){return T.nextTick(()=>{this.init()}),this.renderElement()}};ge.install=function(t){t.component(ge.name,ge)};const rn=[ge];function an(t){rn.forEach(e=>{t.component(e.name,e)})}const ln={install:an,CommonTable:ge};U.CommonTable=ge,U.default=ln,Object.defineProperties(U,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); | ||
//# sourceMappingURL=index.umd.js.map |
{ | ||
"name": "rework-table", | ||
"version": "2.0.0-beta.1", | ||
"version": "2.0.0-beta.2", | ||
"description": "这是对el-table表格的二次封装", | ||
@@ -8,3 +8,2 @@ "keywords": [ | ||
"vue2.0", | ||
"表单", | ||
"vue", | ||
@@ -11,0 +10,0 @@ "jsx", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
49959