@scenetechnology/cj_iview_table 0.0.50 → 0.0.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cj_iview_table.common.js +17 -8
- package/dist/cj_iview_table.common.js.map +1 -1
- package/dist/cj_iview_table.css +1 -1
- package/dist/cj_iview_table.umd.js +17 -8
- package/dist/cj_iview_table.umd.js.map +1 -1
- package/dist/cj_iview_table.umd.min.js +1 -1
- package/dist/cj_iview_table.umd.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
* @author owenm <owen23355@gmail.com>
|
|
14
14
|
* @license MIT
|
|
15
15
|
*/
|
|
16
|
-
function Lr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Pr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Lr(Object(n),!0).forEach((function(e){Ur(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Lr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Mr(t){return Mr="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mr(t)}function Ur(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zr(){return zr=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},zr.apply(this,arguments)}function Vr(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}function Gr(t,e){if(null==t)return{};var n,r,i=Vr(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var Yr="1.15.6";function Qr(t){if("undefined"!==typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var Jr=Qr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Wr=Qr(/Edge/i),Hr=Qr(/firefox/i),qr=Qr(/safari/i)&&!Qr(/chrome/i)&&!Qr(/android/i),Xr=Qr(/iP(ad|od|hone)/i),Zr=Qr(/chrome/i)&&Qr(/android/i),Kr={capture:!1,passive:!1};function $r(t,e,n){t.addEventListener(e,n,!Jr&&Kr)}function ti(t,e,n){t.removeEventListener(e,n,!Jr&&Kr)}function ei(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(n){return!1}return!1}}function ni(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function ri(t,e,n,r){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&ei(t,e):ei(t,e))||r&&t===n)return t;if(t===n)break}while(t=ni(t))}return null}var ii,oi=/\s+/g;function ai(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(oi," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(oi," ")}}function si(t,e,n){var r=t&&t.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in r||-1!==e.indexOf("webkit")||(e="-webkit-"+e),r[e]=n+("string"===typeof n?"":"px")}}function li(t,e){var n="";if("string"===typeof t)n=t;else do{var r=si(t,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function ui(t,e,n){if(t){var r=t.getElementsByTagName(e),i=0,o=r.length;if(n)for(;i<o;i++)n(r[i],i);return r}return[]}function ci(){var t=document.scrollingElement;return t||document.documentElement}function fi(t,e,n,r,i){if(t.getBoundingClientRect||t===window){var o,a,s,l,u,c,f;if(t!==window&&t.parentNode&&t!==ci()?(o=t.getBoundingClientRect(),a=o.top,s=o.left,l=o.bottom,u=o.right,c=o.height,f=o.width):(a=0,s=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,f=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!Jr))do{if(i&&i.getBoundingClientRect&&("none"!==si(i,"transform")||n&&"static"!==si(i,"position"))){var h=i.getBoundingClientRect();a-=h.top+parseInt(si(i,"border-top-width")),s-=h.left+parseInt(si(i,"border-left-width")),l=a+o.height,u=s+o.width;break}}while(i=i.parentNode);if(r&&t!==window){var p=li(i||t),d=p&&p.a,g=p&&p.d;p&&(a/=g,s/=d,f/=d,c/=g,l=a+c,u=s+f)}return{top:a,left:s,bottom:l,right:u,width:f,height:c}}}function hi(t,e,n){var r=yi(t,!0),i=fi(t)[e];while(r){var o=fi(r)[n],a=void 0;if(a="top"===n||"left"===n?i>=o:i<=o,!a)return r;if(r===ci())break;r=yi(r,!1)}return!1}function pi(t,e,n,r){var i=0,o=0,a=t.children;while(o<a.length){if("none"!==a[o].style.display&&a[o]!==Do.ghost&&(r||a[o]!==Do.dragged)&&ri(a[o],n.draggable,t,!1)){if(i===e)return a[o];i++}o++}return null}function di(t,e){var n=t.lastElementChild;while(n&&(n===Do.ghost||"none"===si(n,"display")||e&&!ei(n,e)))n=n.previousElementSibling;return n||null}function gi(t,e){var n=0;if(!t||!t.parentNode)return-1;while(t=t.previousElementSibling)"TEMPLATE"===t.nodeName.toUpperCase()||t===Do.clone||e&&!ei(t,e)||n++;return n}function vi(t){var e=0,n=0,r=ci();if(t)do{var i=li(t),o=i.a,a=i.d;e+=t.scrollLeft*o,n+=t.scrollTop*a}while(t!==r&&(t=t.parentNode));return[e,n]}function mi(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var r in e)if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n);return-1}function yi(t,e){if(!t||!t.getBoundingClientRect)return ci();var n=t,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=si(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return ci();if(r||e)return n;r=!0}}}while(n=n.parentNode);return ci()}function Ai(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function bi(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function wi(t,e){return function(){if(!ii){var n=arguments,r=this;1===n.length?t.call(r,n[0]):t.apply(r,n),ii=setTimeout((function(){ii=void 0}),e)}}}function Si(){clearTimeout(ii),ii=void 0}function _i(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function xi(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function Ei(t,e,n){var r={};return Array.from(t.children).forEach((function(i){var o,a,s,l;if(ri(i,e.draggable,t,!1)&&!i.animated&&i!==n){var u=fi(i);r.left=Math.min(null!==(o=r.left)&&void 0!==o?o:1/0,u.left),r.top=Math.min(null!==(a=r.top)&&void 0!==a?a:1/0,u.top),r.right=Math.max(null!==(s=r.right)&&void 0!==s?s:-1/0,u.right),r.bottom=Math.max(null!==(l=r.bottom)&&void 0!==l?l:-1/0,u.bottom)}})),r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}var Oi="Sortable"+(new Date).getTime();function Ci(){var t,e=[];return{captureAnimationState:function(){if(e=[],this.options.animation){var t=[].slice.call(this.el.children);t.forEach((function(t){if("none"!==si(t,"display")&&t!==Do.ghost){e.push({target:t,rect:fi(t)});var n=Pr({},e[e.length-1].rect);if(t.thisAnimationDuration){var r=li(t,!0);r&&(n.top-=r.f,n.left-=r.e)}t.fromRect=n}}))}},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(mi(e,{target:t}),1)},animateAll:function(n){var r=this;if(!this.options.animation)return clearTimeout(t),void("function"===typeof n&&n());var i=!1,o=0;e.forEach((function(t){var e=0,n=t.target,a=n.fromRect,s=fi(n),l=n.prevFromRect,u=n.prevToRect,c=t.rect,f=li(n,!0);f&&(s.top-=f.f,s.left-=f.e),n.toRect=s,n.thisAnimationDuration&&bi(l,s)&&!bi(a,s)&&(c.top-s.top)/(c.left-s.left)===(a.top-s.top)/(a.left-s.left)&&(e=Ii(c,l,u,r.options)),bi(s,a)||(n.prevFromRect=a,n.prevToRect=s,e||(e=r.options.animation),r.animate(n,c,s,e)),e&&(i=!0,o=Math.max(o,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),e),n.thisAnimationDuration=e)})),clearTimeout(t),i?t=setTimeout((function(){"function"===typeof n&&n()}),o):"function"===typeof n&&n(),e=[]},animate:function(t,e,n,r){if(r){si(t,"transition",""),si(t,"transform","");var i=li(this.el),o=i&&i.a,a=i&&i.d,s=(e.left-n.left)/(o||1),l=(e.top-n.top)/(a||1);t.animatingX=!!s,t.animatingY=!!l,si(t,"transform","translate3d("+s+"px,"+l+"px,0)"),this.forRepaintDummy=ki(t),si(t,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),si(t,"transform","translate3d(0,0,0)"),"number"===typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){si(t,"transition",""),si(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),r)}}}}function ki(t){return t.offsetWidth}function Ii(t,e,n,r){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))*r.animation}var Di=[],Ri={initializeByDefault:!0},ji={mount:function(t){for(var e in Ri)Ri.hasOwnProperty(e)&&!(e in t)&&(t[e]=Ri[e]);Di.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),Di.push(t)},pluginEvent:function(t,e,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var i=t+"Global";Di.forEach((function(r){e[r.pluginName]&&(e[r.pluginName][i]&&e[r.pluginName][i](Pr({sortable:e},n)),e.options[r.pluginName]&&e[r.pluginName][t]&&e[r.pluginName][t](Pr({sortable:e},n)))}))},initializePlugins:function(t,e,n,r){for(var i in Di.forEach((function(r){var i=r.pluginName;if(t.options[i]||r.initializeByDefault){var o=new r(t,e,t.options);o.sortable=t,o.options=t.options,t[i]=o,zr(n,o.defaults)}})),t.options)if(t.options.hasOwnProperty(i)){var o=this.modifyOption(t,i,t.options[i]);"undefined"!==typeof o&&(t.options[i]=o)}},getEventProperties:function(t,e){var n={};return Di.forEach((function(r){"function"===typeof r.eventProperties&&zr(n,r.eventProperties.call(e[r.pluginName],t))})),n},modifyOption:function(t,e,n){var r;return Di.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"===typeof i.optionListeners[e]&&(r=i.optionListeners[e].call(t[i.pluginName],n))})),r}};function Ti(t){var e=t.sortable,n=t.rootEl,r=t.name,i=t.targetEl,o=t.cloneEl,a=t.toEl,s=t.fromEl,l=t.oldIndex,u=t.newIndex,c=t.oldDraggableIndex,f=t.newDraggableIndex,h=t.originalEvent,p=t.putSortable,d=t.extraEventProperties;if(e=e||n&&n[Oi],e){var g,v=e.options,m="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||Jr||Wr?(g=document.createEvent("Event"),g.initEvent(r,!0,!0)):g=new CustomEvent(r,{bubbles:!0,cancelable:!0}),g.to=a||n,g.from=s||n,g.item=i||n,g.clone=o,g.oldIndex=l,g.newIndex=u,g.oldDraggableIndex=c,g.newDraggableIndex=f,g.originalEvent=h,g.pullMode=p?p.lastPutMode:void 0;var y=Pr(Pr({},d),ji.getEventProperties(r,e));for(var A in y)g[A]=y[A];n&&n.dispatchEvent(g),v[m]&&v[m].call(e,g)}}var Bi=["evt"],Ni=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,i=Gr(n,Bi);ji.pluginEvent.bind(Do)(t,e,Pr({dragEl:Li,parentEl:Pi,ghostEl:Mi,rootEl:Ui,nextEl:zi,lastDownEl:Vi,cloneEl:Gi,cloneHidden:Yi,dragStarted:ro,putSortable:Xi,activeSortable:Do.active,originalEvent:r,oldIndex:Qi,oldDraggableIndex:Wi,newIndex:Ji,newDraggableIndex:Hi,hideGhostForTarget:Oo,unhideGhostForTarget:Co,cloneNowHidden:function(){Yi=!0},cloneNowShown:function(){Yi=!1},dispatchSortableEvent:function(t){Fi({sortable:e,name:t,originalEvent:r})}},i))};function Fi(t){Ti(Pr({putSortable:Xi,cloneEl:Gi,targetEl:Li,rootEl:Ui,oldIndex:Qi,oldDraggableIndex:Wi,newIndex:Ji,newDraggableIndex:Hi},t))}var Li,Pi,Mi,Ui,zi,Vi,Gi,Yi,Qi,Ji,Wi,Hi,qi,Xi,Zi,Ki,$i,to,eo,no,ro,io,oo,ao,so,lo=!1,uo=!1,co=[],fo=!1,ho=!1,po=[],go=!1,vo=[],mo="undefined"!==typeof document,yo=Xr,Ao=Wr||Jr?"cssFloat":"float",bo=mo&&!Zr&&!Xr&&"draggable"in document.createElement("div"),wo=function(){if(mo){if(Jr)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),So=function(t,e){var n=si(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=pi(t,0,e),o=pi(t,1,e),a=i&&si(i),s=o&&si(o),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+fi(i).width,u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+fi(o).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a["float"]&&"none"!==a["float"]){var c="left"===a["float"]?"left":"right";return!o||"both"!==s.clear&&s.clear!==c?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=r&&"none"===n[Ao]||o&&"none"===n[Ao]&&l+u>r)?"vertical":"horizontal"},_o=function(t,e,n){var r=n?t.left:t.top,i=n?t.right:t.bottom,o=n?t.width:t.height,a=n?e.left:e.top,s=n?e.right:e.bottom,l=n?e.width:e.height;return r===a||i===s||r+o/2===a+l/2},xo=function(t,e){var n;return co.some((function(r){var i=r[Oi].options.emptyInsertThreshold;if(i&&!di(r)){var o=fi(r),a=t>=o.left-i&&t<=o.right+i,s=e>=o.top-i&&e<=o.bottom+i;return a&&s?n=r:void 0}})),n},Eo=function(t){function e(t,n){return function(r,i,o,a){var s=r.options.group.name&&i.options.group.name&&r.options.group.name===i.options.group.name;if(null==t&&(n||s))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"===typeof t)return e(t(r,i,o,a),n)(r,i,o,a);var l=(n?r:i).options.group.name;return!0===t||"string"===typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},r=t.group;r&&"object"==Mr(r)||(r={name:r}),n.name=r.name,n.checkPull=e(r.pull,!0),n.checkPut=e(r.put),n.revertClone=r.revertClone,t.group=n},Oo=function(){!wo&&Mi&&si(Mi,"display","none")},Co=function(){!wo&&Mi&&si(Mi,"display","")};mo&&!Zr&&document.addEventListener("click",(function(t){if(uo)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),uo=!1,!1}),!0);var ko=function(t){if(Li){t=t.touches?t.touches[0]:t;var e=xo(t.clientX,t.clientY);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[Oi]._onDragOver(n)}}},Io=function(t){Li&&Li.parentNode[Oi]._isOutsideThisEl(t.target)};function Do(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=zr({},e),t[Oi]=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 So(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Do.supportPointer&&"PointerEvent"in window&&(!qr||Xr),emptyInsertThreshold:5};for(var r in ji.initializePlugins(this,t,n),n)!(r in e)&&(e[r]=n[r]);for(var i in Eo(e),this)"_"===i.charAt(0)&&"function"===typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&bo,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?$r(t,"pointerdown",this._onTapStart):($r(t,"mousedown",this._onTapStart),$r(t,"touchstart",this._onTapStart)),this.nativeDraggable&&($r(t,"dragover",this),$r(t,"dragenter",this)),co.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),zr(this,Ci())}function Ro(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function jo(t,e,n,r,i,o,a,s){var l,u,c=t[Oi],f=c.options.onMove;return!window.CustomEvent||Jr||Wr?(l=document.createEvent("Event"),l.initEvent("move",!0,!0)):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=r,l.related=i||e,l.relatedRect=o||fi(e),l.willInsertAfter=s,l.originalEvent=a,t.dispatchEvent(l),f&&(u=f.call(c,l,a)),u}function To(t){t.draggable=!1}function Bo(){go=!1}function No(t,e,n){var r=fi(pi(n.el,0,n.options,!0)),i=Ei(n.el,n.options,Mi),o=10;return e?t.clientX<i.left-o||t.clientY<r.top&&t.clientX<r.right:t.clientY<i.top-o||t.clientY<r.bottom&&t.clientX<r.left}function Fo(t,e,n){var r=fi(di(n.el,n.options.draggable)),i=Ei(n.el,n.options,Mi),o=10;return e?t.clientX>i.right+o||t.clientY>r.bottom&&t.clientX>r.left:t.clientY>i.bottom+o||t.clientX>r.right&&t.clientY>r.top}function Lo(t,e,n,r,i,o,a,s){var l=r?t.clientY:t.clientX,u=r?n.height:n.width,c=r?n.top:n.left,f=r?n.bottom:n.right,h=!1;if(!a)if(s&&ao<u*i){if(!fo&&(1===oo?l>c+u*o/2:l<f-u*o/2)&&(fo=!0),fo)h=!0;else if(1===oo?l<c+ao:l>f-ao)return-oo}else if(l>c+u*(1-i)/2&&l<f-u*(1-i)/2)return Po(e);return h=h||a,h&&(l<c+u*o/2||l>f-u*o/2)?l>c+u/2?1:-1:0}function Po(t){return gi(Li)<gi(t)?1:-1}function Mo(t){var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;while(n--)r+=e.charCodeAt(n);return r.toString(36)}function Uo(t){vo.length=0;var e=t.getElementsByTagName("input"),n=e.length;while(n--){var r=e[n];r.checked&&vo.push(r)}}function zo(t){return setTimeout(t,0)}function Vo(t){return clearTimeout(t)}Do.prototype={constructor:Do,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(io=null)},_getDirection:function(t,e){return"function"===typeof this.options.direction?this.options.direction.call(this,t,e,Li):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,i=r.preventOnFilter,o=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,u=r.filter;if(Uo(n),!Li&&!(/mousedown|pointerdown/.test(o)&&0!==t.button||r.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!qr||!s||"SELECT"!==s.tagName.toUpperCase())&&(s=ri(s,r.draggable,n,!1),(!s||!s.animated)&&Vi!==s)){if(Qi=gi(s),Wi=gi(s,r.draggable),"function"===typeof u){if(u.call(this,t,s,this))return Fi({sortable:e,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),Ni("filter",e,{evt:t}),void(i&&t.preventDefault())}else if(u&&(u=u.split(",").some((function(r){if(r=ri(l,r.trim(),n,!1),r)return Fi({sortable:e,rootEl:r,name:"filter",targetEl:s,fromEl:n,toEl:n}),Ni("filter",e,{evt:t}),!0})),u))return void(i&&t.preventDefault());r.handle&&!ri(l,r.handle,n,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,n){var r,i=this,o=i.el,a=i.options,s=o.ownerDocument;if(n&&!Li&&n.parentNode===o){var l=fi(n);if(Ui=o,Li=n,Pi=Li.parentNode,zi=Li.nextSibling,Vi=n,qi=a.group,Do.dragged=Li,Zi={target:Li,clientX:(e||t).clientX,clientY:(e||t).clientY},eo=Zi.clientX-l.left,no=Zi.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Li.style["will-change"]="all",r=function(){Ni("delayEnded",i,{evt:t}),Do.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!Hr&&i.nativeDraggable&&(Li.draggable=!0),i._triggerDragStart(t,e),Fi({sortable:i,name:"choose",originalEvent:t}),ai(Li,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){ui(Li,t.trim(),To)})),$r(s,"dragover",ko),$r(s,"mousemove",ko),$r(s,"touchmove",ko),a.supportPointer?($r(s,"pointerup",i._onDrop),!this.nativeDraggable&&$r(s,"pointercancel",i._onDrop)):($r(s,"mouseup",i._onDrop),$r(s,"touchend",i._onDrop),$r(s,"touchcancel",i._onDrop)),Hr&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Li.draggable=!0),Ni("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(Wr||Jr))r();else{if(Do.eventCanceled)return void this._onDrop();a.supportPointer?($r(s,"pointerup",i._disableDelayedDrag),$r(s,"pointercancel",i._disableDelayedDrag)):($r(s,"mouseup",i._disableDelayedDrag),$r(s,"touchend",i._disableDelayedDrag),$r(s,"touchcancel",i._disableDelayedDrag)),$r(s,"mousemove",i._delayedDragTouchMoveHandler),$r(s,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&$r(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(r,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Li&&To(Li),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;ti(t,"mouseup",this._disableDelayedDrag),ti(t,"touchend",this._disableDelayedDrag),ti(t,"touchcancel",this._disableDelayedDrag),ti(t,"pointerup",this._disableDelayedDrag),ti(t,"pointercancel",this._disableDelayedDrag),ti(t,"mousemove",this._delayedDragTouchMoveHandler),ti(t,"touchmove",this._delayedDragTouchMoveHandler),ti(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?$r(document,"pointermove",this._onTouchMove):$r(document,e?"touchmove":"mousemove",this._onTouchMove):($r(Li,"dragend",this),$r(Ui,"dragstart",this._onDragStart));try{document.selection?zo((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if(lo=!1,Ui&&Li){Ni("dragStarted",this,{evt:e}),this.nativeDraggable&&$r(document,"dragover",Io);var n=this.options;!t&&ai(Li,n.dragClass,!1),ai(Li,n.ghostClass,!0),Do.active=this,t&&this._appendGhost(),Fi({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Ki){this._lastX=Ki.clientX,this._lastY=Ki.clientY,Oo();var t=document.elementFromPoint(Ki.clientX,Ki.clientY),e=t;while(t&&t.shadowRoot){if(t=t.shadowRoot.elementFromPoint(Ki.clientX,Ki.clientY),t===e)break;e=t}if(Li.parentNode[Oi]._isOutsideThisEl(t),e)do{if(e[Oi]){var n=void 0;if(n=e[Oi]._onDragOver({clientX:Ki.clientX,clientY:Ki.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=ni(e));Co()}},_onTouchMove:function(t){if(Zi){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,i=t.touches?t.touches[0]:t,o=Mi&&li(Mi,!0),a=Mi&&o&&o.a,s=Mi&&o&&o.d,l=yo&&so&&vi(so),u=(i.clientX-Zi.clientX+r.x)/(a||1)+(l?l[0]-po[0]:0)/(a||1),c=(i.clientY-Zi.clientY+r.y)/(s||1)+(l?l[1]-po[1]:0)/(s||1);if(!Do.active&&!lo){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(Mi){o?(o.e+=u-($i||0),o.f+=c-(to||0)):o={a:1,b:0,c:0,d:1,e:u,f:c};var f="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");si(Mi,"webkitTransform",f),si(Mi,"mozTransform",f),si(Mi,"msTransform",f),si(Mi,"transform",f),$i=u,to=c,Ki=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Mi){var t=this.options.fallbackOnBody?document.body:Ui,e=fi(Li,!0,yo,!0,t),n=this.options;if(yo){so=t;while("static"===si(so,"position")&&"none"===si(so,"transform")&&so!==document)so=so.parentNode;so!==document.body&&so!==document.documentElement?(so===document&&(so=ci()),e.top+=so.scrollTop,e.left+=so.scrollLeft):so=ci(),po=vi(so)}Mi=Li.cloneNode(!0),ai(Mi,n.ghostClass,!1),ai(Mi,n.fallbackClass,!0),ai(Mi,n.dragClass,!0),si(Mi,"transition",""),si(Mi,"transform",""),si(Mi,"box-sizing","border-box"),si(Mi,"margin",0),si(Mi,"top",e.top),si(Mi,"left",e.left),si(Mi,"width",e.width),si(Mi,"height",e.height),si(Mi,"opacity","0.8"),si(Mi,"position",yo?"absolute":"fixed"),si(Mi,"zIndex","100000"),si(Mi,"pointerEvents","none"),Do.ghost=Mi,t.appendChild(Mi),si(Mi,"transform-origin",eo/parseInt(Mi.style.width)*100+"% "+no/parseInt(Mi.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,r=t.dataTransfer,i=n.options;Ni("dragStart",this,{evt:t}),Do.eventCanceled?this._onDrop():(Ni("setupClone",this),Do.eventCanceled||(Gi=xi(Li),Gi.removeAttribute("id"),Gi.draggable=!1,Gi.style["will-change"]="",this._hideClone(),ai(Gi,this.options.chosenClass,!1),Do.clone=Gi),n.cloneId=zo((function(){Ni("clone",n),Do.eventCanceled||(n.options.removeCloneOnHide||Ui.insertBefore(Gi,Li),n._hideClone(),Fi({sortable:n,name:"clone"}))})),!e&&ai(Li,i.dragClass,!0),e?(uo=!0,n._loopId=setInterval(n._emulateDragOver,50)):(ti(document,"mouseup",n._onDrop),ti(document,"touchend",n._onDrop),ti(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",i.setData&&i.setData.call(n,r,Li)),$r(document,"drop",n),si(Li,"transform","translateZ(0)")),lo=!0,n._dragStartId=zo(n._dragStarted.bind(n,e,t)),$r(document,"selectstart",n),ro=!0,window.getSelection().removeAllRanges(),qr&&si(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,r,i,o=this.el,a=t.target,s=this.options,l=s.group,u=Do.active,c=qi===l,f=s.sort,h=Xi||u,p=this,d=!1;if(!go){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),a=ri(a,s.draggable,o,!0),I("dragOver"),Do.eventCanceled)return d;if(Li.contains(t.target)||a.animated&&a.animatingX&&a.animatingY||p._ignoreWhileAnimating===a)return R(!1);if(uo=!1,u&&!s.disabled&&(c?f||(r=Pi!==Ui):Xi===this||(this.lastPutMode=qi.checkPull(this,u,Li,t))&&l.checkPut(this,u,Li,t))){if(i="vertical"===this._getDirection(t,a),e=fi(Li),I("dragOverValid"),Do.eventCanceled)return d;if(r)return Pi=Ui,D(),this._hideClone(),I("revert"),Do.eventCanceled||(zi?Ui.insertBefore(Li,zi):Ui.appendChild(Li)),R(!0);var g=di(o,s.draggable);if(!g||Fo(t,i,this)&&!g.animated){if(g===Li)return R(!1);if(g&&o===t.target&&(a=g),a&&(n=fi(a)),!1!==jo(Ui,o,Li,e,a,n,t,!!a))return D(),g&&g.nextSibling?o.insertBefore(Li,g.nextSibling):o.appendChild(Li),Pi=o,j(),R(!0)}else if(g&&No(t,i,this)){var v=pi(o,0,s,!0);if(v===Li)return R(!1);if(a=v,n=fi(a),!1!==jo(Ui,o,Li,e,a,n,t,!1))return D(),o.insertBefore(Li,v),Pi=o,j(),R(!0)}else if(a.parentNode===o){n=fi(a);var m,y,A=0,b=Li.parentNode!==o,w=!_o(Li.animated&&Li.toRect||e,a.animated&&a.toRect||n,i),S=i?"top":"left",_=hi(a,"top","top")||hi(Li,"top","top"),x=_?_.scrollTop:void 0;if(io!==a&&(m=n[S],fo=!1,ho=!w&&s.invertSwap||b),A=Lo(t,a,n,i,w?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,ho,io===a),0!==A){var E=gi(Li);do{E-=A,y=Pi.children[E]}while(y&&("none"===si(y,"display")||y===Mi))}if(0===A||y===a)return R(!1);io=a,oo=A;var O=a.nextElementSibling,C=!1;C=1===A;var k=jo(Ui,o,Li,e,a,n,t,C);if(!1!==k)return 1!==k&&-1!==k||(C=1===k),go=!0,setTimeout(Bo,30),D(),C&&!O?o.appendChild(Li):a.parentNode.insertBefore(Li,C?O:a),_&&_i(_,0,x-_.scrollTop),Pi=Li.parentNode,void 0===m||ho||(ao=Math.abs(m-fi(a)[S])),j(),R(!0)}if(o.contains(Li))return R(!1)}return!1}function I(s,l){Ni(s,p,Pr({evt:t,isOwner:c,axis:i?"vertical":"horizontal",revert:r,dragRect:e,targetRect:n,canSort:f,fromSortable:h,target:a,completed:R,onMove:function(n,r){return jo(Ui,o,Li,e,n,fi(n),t,r)},changed:j},l))}function D(){I("dragOverAnimationCapture"),p.captureAnimationState(),p!==h&&h.captureAnimationState()}function R(e){return I("dragOverCompleted",{insertion:e}),e&&(c?u._hideClone():u._showClone(p),p!==h&&(ai(Li,Xi?Xi.options.ghostClass:u.options.ghostClass,!1),ai(Li,s.ghostClass,!0)),Xi!==p&&p!==Do.active?Xi=p:p===Do.active&&Xi&&(Xi=null),h===p&&(p._ignoreWhileAnimating=a),p.animateAll((function(){I("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(a===Li&&!Li.animated||a===o&&!a.animated)&&(io=null),s.dragoverBubble||t.rootEl||a===document||(Li.parentNode[Oi]._isOutsideThisEl(t.target),!e&&ko(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),d=!0}function j(){Ji=gi(Li),Hi=gi(Li,s.draggable),Fi({sortable:p,name:"change",toEl:o,newIndex:Ji,newDraggableIndex:Hi,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){ti(document,"mousemove",this._onTouchMove),ti(document,"touchmove",this._onTouchMove),ti(document,"pointermove",this._onTouchMove),ti(document,"dragover",ko),ti(document,"mousemove",ko),ti(document,"touchmove",ko)},_offUpEvents:function(){var t=this.el.ownerDocument;ti(t,"mouseup",this._onDrop),ti(t,"touchend",this._onDrop),ti(t,"pointerup",this._onDrop),ti(t,"pointercancel",this._onDrop),ti(t,"touchcancel",this._onDrop),ti(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;Ji=gi(Li),Hi=gi(Li,n.draggable),Ni("drop",this,{evt:t}),Pi=Li&&Li.parentNode,Ji=gi(Li),Hi=gi(Li,n.draggable),Do.eventCanceled||(lo=!1,ho=!1,fo=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Vo(this.cloneId),Vo(this._dragStartId),this.nativeDraggable&&(ti(document,"drop",this),ti(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),qr&&si(document.body,"user-select",""),si(Li,"transform",""),t&&(ro&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Mi&&Mi.parentNode&&Mi.parentNode.removeChild(Mi),(Ui===Pi||Xi&&"clone"!==Xi.lastPutMode)&&Gi&&Gi.parentNode&&Gi.parentNode.removeChild(Gi),Li&&(this.nativeDraggable&&ti(Li,"dragend",this),To(Li),Li.style["will-change"]="",ro&&!lo&&ai(Li,Xi?Xi.options.ghostClass:this.options.ghostClass,!1),ai(Li,this.options.chosenClass,!1),Fi({sortable:this,name:"unchoose",toEl:Pi,newIndex:null,newDraggableIndex:null,originalEvent:t}),Ui!==Pi?(Ji>=0&&(Fi({rootEl:Pi,name:"add",toEl:Pi,fromEl:Ui,originalEvent:t}),Fi({sortable:this,name:"remove",toEl:Pi,originalEvent:t}),Fi({rootEl:Pi,name:"sort",toEl:Pi,fromEl:Ui,originalEvent:t}),Fi({sortable:this,name:"sort",toEl:Pi,originalEvent:t})),Xi&&Xi.save()):Ji!==Qi&&Ji>=0&&(Fi({sortable:this,name:"update",toEl:Pi,originalEvent:t}),Fi({sortable:this,name:"sort",toEl:Pi,originalEvent:t})),Do.active&&(null!=Ji&&-1!==Ji||(Ji=Qi,Hi=Wi),Fi({sortable:this,name:"end",toEl:Pi,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Ni("nulling",this),Ui=Li=Pi=Mi=zi=Gi=Vi=Yi=Zi=Ki=ro=Ji=Hi=Qi=Wi=io=oo=Xi=qi=Do.dragged=Do.ghost=Do.clone=Do.active=null,vo.forEach((function(t){t.checked=!0})),vo.length=$i=to=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Li&&(this._onDragOver(t),Ro(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t,e=[],n=this.el.children,r=0,i=n.length,o=this.options;r<i;r++)t=n[r],ri(t,o.draggable,this.el,!1)&&e.push(t.getAttribute(o.dataIdAttr)||Mo(t));return e},sort:function(t,e){var n={},r=this.el;this.toArray().forEach((function(t,e){var i=r.children[e];ri(i,this.options.draggable,r,!1)&&(n[t]=i)}),this),e&&this.captureAnimationState(),t.forEach((function(t){n[t]&&(r.removeChild(n[t]),r.appendChild(n[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return ri(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var r=ji.modifyOption(this,t,e);n[t]="undefined"!==typeof r?r:e,"group"===t&&Eo(n)},destroy:function(){Ni("destroy",this);var t=this.el;t[Oi]=null,ti(t,"mousedown",this._onTapStart),ti(t,"touchstart",this._onTapStart),ti(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(ti(t,"dragover",this),ti(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),co.splice(co.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Yi){if(Ni("hideClone",this),Do.eventCanceled)return;si(Gi,"display","none"),this.options.removeCloneOnHide&&Gi.parentNode&&Gi.parentNode.removeChild(Gi),Yi=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(Yi){if(Ni("showClone",this),Do.eventCanceled)return;Li.parentNode!=Ui||this.options.group.revertClone?zi?Ui.insertBefore(Gi,zi):Ui.appendChild(Gi):Ui.insertBefore(Gi,Li),this.options.group.revertClone&&this.animate(Li,Gi),si(Gi,"display",""),Yi=!1}}else this._hideClone()}},mo&&$r(document,"touchmove",(function(t){(Do.active||lo)&&t.cancelable&&t.preventDefault()})),Do.utils={on:$r,off:ti,css:si,find:ui,is:function(t,e){return!!ri(t,e,t,!1)},extend:Ai,throttle:wi,closest:ri,toggleClass:ai,clone:xi,index:gi,nextTick:zo,cancelNextTick:Vo,detectDirection:So,getChild:pi,expando:Oi},Do.get=function(t){return t[Oi]},Do.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Do.utils=Pr(Pr({},Do.utils),t.utils)),ji.mount(t)}))},Do.create=function(t,e){return new Do(t,e)},Do.version=Yr;var Go,Yo,Qo,Jo,Wo,Ho,qo=[],Xo=!1;function Zo(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"===typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?$r(document,"dragover",this._handleAutoScroll):this.options.supportPointer?$r(document,"pointermove",this._handleFallbackAutoScroll):e.touches?$r(document,"touchmove",this._handleFallbackAutoScroll):$r(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?ti(document,"dragover",this._handleAutoScroll):(ti(document,"pointermove",this._handleFallbackAutoScroll),ti(document,"touchmove",this._handleFallbackAutoScroll),ti(document,"mousemove",this._handleFallbackAutoScroll)),$o(),Ko(),Si()},nulling:function(){Wo=Yo=Go=Xo=Ho=Qo=Jo=null,qo.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,r=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,o=document.elementFromPoint(r,i);if(Wo=t,e||this.options.forceAutoScrollFallback||Wr||Jr||qr){ta(t,this.options,o,e);var a=yi(o,!0);!Xo||Ho&&r===Qo&&i===Jo||(Ho&&$o(),Ho=setInterval((function(){var o=yi(document.elementFromPoint(r,i),!0);o!==a&&(a=o,Ko()),ta(t,n.options,o,e)}),10),Qo=r,Jo=i)}else{if(!this.options.bubbleScroll||yi(o,!0)===ci())return void Ko();ta(t,this.options,yi(o,!1),!1)}}},zr(t,{pluginName:"scroll",initializeByDefault:!0})}function Ko(){qo.forEach((function(t){clearInterval(t.pid)})),qo=[]}function $o(){clearInterval(Ho)}var ta=wi((function(t,e,n,r){if(e.scroll){var i,o=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,s=e.scrollSensitivity,l=e.scrollSpeed,u=ci(),c=!1;Yo!==n&&(Yo=n,Ko(),Go=e.scroll,i=e.scrollFn,!0===Go&&(Go=yi(n,!0)));var f=0,h=Go;do{var p=h,d=fi(p),g=d.top,v=d.bottom,m=d.left,y=d.right,A=d.width,b=d.height,w=void 0,S=void 0,_=p.scrollWidth,x=p.scrollHeight,E=si(p),O=p.scrollLeft,C=p.scrollTop;p===u?(w=A<_&&("auto"===E.overflowX||"scroll"===E.overflowX||"visible"===E.overflowX),S=b<x&&("auto"===E.overflowY||"scroll"===E.overflowY||"visible"===E.overflowY)):(w=A<_&&("auto"===E.overflowX||"scroll"===E.overflowX),S=b<x&&("auto"===E.overflowY||"scroll"===E.overflowY));var k=w&&(Math.abs(y-o)<=s&&O+A<_)-(Math.abs(m-o)<=s&&!!O),I=S&&(Math.abs(v-a)<=s&&C+b<x)-(Math.abs(g-a)<=s&&!!C);if(!qo[f])for(var D=0;D<=f;D++)qo[D]||(qo[D]={});qo[f].vx==k&&qo[f].vy==I&&qo[f].el===p||(qo[f].el=p,qo[f].vx=k,qo[f].vy=I,clearInterval(qo[f].pid),0==k&&0==I||(c=!0,qo[f].pid=setInterval(function(){r&&0===this.layer&&Do.active._onTouchMove(Wo);var e=qo[this.layer].vy?qo[this.layer].vy*l:0,n=qo[this.layer].vx?qo[this.layer].vx*l:0;"function"===typeof i&&"continue"!==i.call(Do.dragged.parentNode[Oi],n,e,t,Wo,qo[this.layer].el)||_i(qo[this.layer].el,n,e)}.bind({layer:f}),24))),f++}while(e.bubbleScroll&&h!==u&&(h=yi(h,!1)));Xo=c}}),30),ea=function(t){var e=t.originalEvent,n=t.putSortable,r=t.dragEl,i=t.activeSortable,o=t.dispatchSortableEvent,a=t.hideGhostForTarget,s=t.unhideGhostForTarget;if(e){var l=n||i;a();var u=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,c=document.elementFromPoint(u.clientX,u.clientY);s(),l&&!l.el.contains(c)&&(o("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function na(){}function ra(){}na.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=pi(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(e,r):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:ea},zr(na,{pluginName:"revertOnSpill"}),ra.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable,r=n||this.sortable;r.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),r.animateAll()},drop:ea},zr(ra,{pluginName:"removeOnSpill"});Do.mount(new Zo),Do.mount(ra,na);var ia=Do,oa={name:"cj_iview_table",components:{tableSetting:sr,saveViewModal:mr,viewEdit:_r,OrgPicker:Fr},props:{customPath:{type:String,default:""},filterGridSpan:{type:Number,default:6},filterLabelWidth:{type:Number,default:80},border:{type:Boolean,default:!1},height:{type:String,default:""},maxHeight:{type:String,default:""},size:{type:String,default:"default"},loading:{type:Boolean,required:!1},isShowtoolBarRight:{type:Boolean,required:!1,default:!0},columns:{type:Array,required:!0},toolBar:{type:[Array,Boolean],default:!0},defaultSize:{type:Number,default:10},params:{type:Object,default:()=>({})},pagination:{type:Object,default:()=>({})},data:{type:Object,required:!1},request:{type:Function,required:!1}},data(){return{person_icon:xr,viewSaveIcon:lr,viewSettingIcon:ur,table_no_flod:zn,table_flod:Vn,filterForm:{},filtersupplementnNum:0,tableData:[],tableLoading:!1,isClickFilterBtn:!1,isClickResetBtn:!1,filterFold:!1,columnSettingObj:"",columnSettingId:"",columnsList:fr().cloneDeep(this.columns),defaultColumnsList:fr().cloneDeep(this.columns),viewList:[],viewListP:[],filterViewValue:"",filterCount:0,selectionItems:[],defToolBar:[{text:"新增",type:"primary"}],init_status:!0,page:{current:1,pageSize:10,total:0},personList:[],initShow:!0,all_names:[],personObj:{},person_ids:[],currentFilterItem:null,sortableInstance:null}},computed:{tableColumns(){return this.columnsList.filter((t=>!t.hideInTable)).map((t=>{const e=t.render,n={...t,render:(n,r)=>{if(t.slot){const e=this.$scopedSlots[t.slot]?this.$scopedSlots[t.slot]({row:r.row}):n("span",r.row[t.key]);return console.log("slotContent--",e),n("Tooltip",{props:{content:"",maxWidth:800,theme:"light",transfer:!0,placement:r.row._index>=this.dataSource.length-1?"top":r.row._index<5?"bottom":"top"},style:{width:"100%"},scopedSlots:{default:()=>[n("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:"0",cursor:"pointer",width:"100%"}},[e])],content:()=>{const e=r.row[t.key],i=this.$scopedSlots[t.slot]?this.$scopedSlots[t.slot]({row:r.row}):n("span",r.row[t.key]);return this.isJsonString(e)?n("json-viewer",{props:{value:JSON.parse(e),expandDepth:999,copyable:!0,sort:!0,boxed:!0,theme:"light",collapsed:!0},style:{overflowY:"auto",padding:"8px",boxSizing:"border-box",width:"800px",minWidth:"800px",maxHeight:"300px"},class:"custom-json-viewer"}):n("div",[i])}}})}if("操作"===t.title)return e?e(n,r):n("span",r.row[t.key]);const i=r.row[t.key],o=r.column.width||r.column.minWidth,a=.85*o;let s;return s=e?e(n,r):n("span",{style:{display:"inline-block",maxWidth:`${a}px`,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%"}},i),n("Tooltip",{props:{content:"",maxWidth:800,theme:"light",transfer:!0,placement:r.row._index>=this.dataSource.length-1?"top":r.row._index<5?"bottom":"top"},style:{width:"100%"},scopedSlots:{default:()=>[n("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:"0",cursor:"pointer",width:"100%"}},[s])],content:()=>{const t=i;return this.isJsonString(t)?n("json-viewer",{props:{value:JSON.parse(t),expandDepth:999,expanded:!0,copyable:!0,sort:!0,boxed:!0,theme:"light",collapsed:!0},style:{overflowY:"auto",padding:"8px",boxSizing:"border-box",width:"800px",minWidth:"800px",maxHeight:"300px"},class:"custom-json-viewer"}):n("div",[s])}}})}};return t.headerConfig&&(n.renderHeader=(e,n)=>e("div",{class:"custom-header"},[e("Poptip",{props:{trigger:"click",transfer:!0,placement:"bottom-start",style:{maxHeight:"300px"}},class:"header-poptip",on:{"on-popper-show":()=>{this.$nextTick((()=>{this.$emit("on-header-click",t);const e=document.querySelectorAll(".header-options");e.forEach((t=>{this.initSortable(t)}))}))}}},[e("div",{class:"header-title"},[e("span",{style:{cursor:"pointer"}},t.title),e("Icon",{props:{type:"ios-cog-outline",size:18},class:"header-icon",style:{cursor:"pointer",color:(t.as||t.key)==this.filterForm.sort?"#2d8cf0":""},on:{click:()=>{this.filterForm.sort!=(t.as||t.key)&&setTimeout((()=>{this.filterForm.sort=t.as||t.key,console.log(t.headerConfig),console.log(t.headerConfig.options),this.$set(t.headerConfig,"options",[...t.headerConfig.options]);let e=[];t.headerConfig.options.forEach((t=>{e.push(t.value)})),this.filterForm.sortOrder=e.join(","),console.log(this.filterForm),this.reload()}),0)}}})]),e("div",{slot:"content",class:"header-content",style:{maxHeight:"300px",overflowY:"auto"}},[e("div",{class:"header-options",style:{padding:"2px 0"}},[...(t.headerConfig.options||[]).map((n=>e("div",{class:"header-option",attrs:{"data-id":(t.as||t.key)+n.value,"data-value":n.value},style:{padding:"5px 0px",display:"flex",alignItems:"center",fontSize:"14px"},on:{click:()=>this.handleHeaderSelect(n,t)}},[e("img",{attrs:{src:Hn},class:"drag-handle",style:{cursor:"move",marginRight:"8px",width:"8px",height:"15px",touchAction:"none",verticalAlign:"middle"}}),e("span",{style:{fontSize:"14px !important;"}},n.label)])))])])])])),n}))},setcolumnsList(){return this.columns.filter((t=>t.title&&"操作"!=t.title))},exportcolumnsList(){return this.columnsList.filter((t=>t.title&&"操作"!=t.title&&"selection"!=t.type))},filterItems(){console.log("filterItems----------");let t=this.columns.filter((t=>t.filter)).sort(((t,e)=>t.filterSort-e.filterSort));this.filterCount=t.length;const e=24/this.filterGridSpan;this.calculateSupplementNum(t.length,e);return this.filterFold||(t=t.slice(0,t.length<e-1?t.length:e-1)),console.log("filtersupplementnNum---",t),t},toolBarList(){return Array.isArray(this.toolBar)?this.toolBar:!0===this.toolBar?this.defToolBar:[]},tableSlot(){return console.log("tableSlot---",this.columns.filter((t=>t.slot))),this.columns.filter((t=>t.slot))},requestParams(){const{page:t,params:e,defaultSize:n}=this,r=e.pageSize?e.pageSize:t.pageSize;return{current:t.current,...e,pageSize:r||n}},dataSource(){return this.data&&this.data.data?Array.isArray(this.data.data)?this.data.data:[]:this.tableData},formKey(){return t=>t.as?t.as:t.key}},watch:{filterFold(t,e){console.log(t,e)},filterForm:{immediate:!1,deep:!0,handler(){this.isClickResetBtn||this.init_status&&(this.filterItems.map((t=>{for(let e in this.filterForm)t.as&&t.key===e&&this.$set(this.filterForm,t.as,this.filterForm[e])})),this.init_status=!1)}},loading:{immediate:!0,handler(t){void 0!=t&&(this.tableLoading=t)}},"data.total":{handler(t){this.page.total=t}},requestParams(){this.reload()}},methods:{isJsonString(t){if("string"!==typeof t)return!1;try{const e=JSON.parse(t);return"object"===typeof e&&null!==e}catch(e){return!1}},calculateSupplementNum(t,e){console.log(this.filterGridSpan),console.log(t%e);let n=0;return n=t%e===0?e-1:e-(t%e+1),this.filtersupplementnNum=n,n},filterViewList(){console.log(this.filterViewValue),this.viewList=this.viewListP.filter((t=>{if(~t.name.indexOf(this.filterViewValue))return t}))},clickFlod(){this.filterFold=!this.filterFold},clickSetting(){this.$refs.tableSetting.exportModal=!0},clickItem(t){if("viewSave"==t)this.$refs.saveViewModal.title="保存视图",this.$refs.saveViewModal.exportModal=!0;else if("viewSetting"==t)this.$refs.viewEdit.exportModal=!0;else if(console.log(t),t.content){let n=JSON.parse(t.content);if(this.filterForm={...n.filterForm},n.filterForm&&(n.filterForm.sort?this.columnsList.forEach((t=>{t.sortable&&t.key==n.filterForm.sort?t.sortType=n.filterForm.sortOrder:t.sortType=""})):this.columnsList.forEach((t=>{t.sortable&&(t.sortType=n.filterForm.sortOrder)}))),this.$refs.selection&&this.$refs.selection.handleSort)try{this.$refs.selection.handleSort({column:void 0,key:"",order:"normal"})}catch(e){}this.page.current=n.current,this.page.pageSize=n.pageSize,this.reload()}},updateView(t){this.$refs.saveViewModal.exportBtnLoading=!0,jn(t).then((t=>{let e=t.data;200==e.code&&(this.$refs.saveViewModal.exportModal=!1,this.handleGetUserQueryView())})).finally((()=>{this.$refs.saveViewModal.exportBtnLoading=!1}))},saveView(t){console.log("执行---saveView");let e="";if(console.log("user--",sessionStorage.getItem("user")),console.log("formObj---",t),sessionStorage.getItem("user"))e="string"==typeof sessionStorage.getItem("user")&&"undefined"!=sessionStorage.getItem("user")?JSON.parse(sessionStorage.getItem("user")):sessionStorage.getItem("user");else if(1==t.type)return void this.$Message.warning("请先前往账号管理,绑定人员");let n="";(this.customPath||this.$route&&this.$route.path)&&(n=(this.customPath||this.$route.path).replace(/^\/?/,""));let r={current:this.page.current,pageSize:this.page.pageSize,filterForm:this.delValueEmptyProperty(this.filterForm)};console.log(r);let i={tag:n+"tableSetView",name:t.name,type:t.type,user_id:e.id,content:JSON.stringify(r),project_id:JSON.parse(localStorage.getItem("selectedProject")).id,simp_token:s()};console.log(i),console.log(this.columns),this.$refs.saveViewModal.exportBtnLoading=!0,Rn(i).then((t=>{console.log(t);let e=t.data;200==e.code&&(this.$refs.saveViewModal.exportModal=!1,this.handleGetUserQueryView())})).finally((()=>{this.$refs.saveViewModal.exportBtnLoading=!1}))},getStringValue(t){let e=t.value||t.id||t.month||"";return"number"===typeof t.value?e=String(t.value):"number"===typeof t.id?e=String(t.id):"number"===typeof t.month&&(e=String(t.month)),e},init(){let t={};this.columns.forEach((e=>{if(e.filter)if(["typelist"].includes(e.valueType),["daterange","datetimerange"].includes(e.valueType)&&e.defaultValue)if("daterange"==e.valueType){if(e.vs){var n=new Date(e.defaultValue[0]),r=new Date(e.defaultValue[1]),i=[];while(n<=r){var o=n.toISOString().split("T")[0];i.push(o),n.setDate(n.getDate()+1)}t["day"]=i,e.newkey&&2===e.newkey.length?(t[e.newkey[0]]=e.defaultValue[0],t[e.newkey[1]]=e.defaultValue[1]):(t["start"]=e.defaultValue[0],t["end"]=e.defaultValue[1])}else e.newkey&&2===e.newkey.length?(t[e.newkey[0]]=e.defaultValue[0]+" 00:00:00",t[e.newkey[1]]=e.defaultValue[1]+" 23:59:59"):(t["start"]=e.defaultValue[0]+" 00:00:00",t["end"]=e.defaultValue[1]+" 23:59:59"),t[this.formKey(e)]=[e.defaultValue[0]+" 00:00:00",e.defaultValue[1]+" 23:59:59"];t[this.formKey(e)]=[e.defaultValue[0],e.defaultValue[1]]}else e.newkey&&2===e.newkey.length?(t[e.newkey[0]]=e.defaultValue[0],t[e.newkey[1]]=e.defaultValue[1]):(t["start"]=e.defaultValue[0],t["end"]=e.defaultValue[1]),t[this.formKey(e)]=[e.defaultValue[0],e.defaultValue[1]];else["timerange"].includes(e.valueType)&&e.defaultValue?t["hour"]=e.defaultValue:t[e.key]=e.defaultValue})),console.log(JSON.stringify(t)),this.filterForm=Object.assign({},t)},async getDataSource(t=this.requestParams){if(this.request){console.log(t),this.tableLoading=!0,console.log("getDataSource----",this.filterForm);const e=this.delValueEmptyProperty(this.filterForm),n=await this.request(t,e);this.isClickResetBtn=!1,this.tableData=n.data||[],this.page.total=n.total||0,this.tableLoading=!1}},delValueEmptyProperty(t){for(const e in t)Object.hasOwnProperty.call(t,e)&&(t[e]||delete t[e]);return t},reset(){if(this.page.current=1,this.isClickResetBtn=!0,this.columnsList.forEach((t=>{if(t.sortable&&(t.sortType=""),t.headerConfig&&t.headerConfig.options){const e=this.defaultColumnsList.find((e=>e.key===t.key));e&&e.headerConfig&&(t.headerConfig.options=[...e.headerConfig.options])}})),this.$nextTick((()=>{const t=document.querySelectorAll(".header-options");t.forEach((t=>{t&&this.initSortable(t)}))})),this.$refs.selection&&this.$refs.selection.handleSort)try{this.$refs.selection.handleSort({column:void 0,key:"",order:"normal"})}catch(t){}for(const e in this.filterForm)Object.hasOwnProperty.call(this.filterForm,e)&&(Array.isArray(this.filterForm[e])?this.filterForm[e]=[]:this.filterForm[e]="",this.$refs.element&&this.$refs.element.forEach(((t,e)=>{const n=t.$el||t;"typelist"===n.id?this.$refs.element[e].clearSelect():this.$refs.element[e].handleClear()})));delete this.filterForm.sort,delete this.filterForm.sortOrder,this.page.current=1,this.getDataSource({current:this.page.current,pageSize:this.page.pageSize})},onSelectionChange(t){this.selectionItems=t},onSortChange({column:t,key:e,order:n}){let r="";r=t.ns?t.ns:e,console.log(r),this.filterForm=Object.assign({},this.filterForm,{sort:"normal"!=n?r:"",sortOrder:"normal"!=n?n:""}),this.reload()},onToolBar(t){const e=this.columns.some((t=>"selection"===t.type));if(!e)return this.$emit("onToolBar",t);this.$emit("onToolBar",t,this.selectionItems)},isEmptyFilterForm(){let t=!0;for(const e of Object.values(this.filterForm))if(e){t=!1;break}return t},onFilter(){console.log(this.tableColumns);const t=this.$listeners.onFilter;if(t)return this.$emit("onFilter",this.filterForm);this.page.current=1,this.getDataSource({current:this.page.current,pageSize:this.page.pageSize})},onPageChange(t){this.page.current=t;const{onChange:e}=this.pagination;e&&"function"===typeof e&&e(t)},onPageSizeChange(t){console.log(this.pagination),this.page.pageSize=t;const{onChange:e}=this.pagination;e&&"function"===typeof e&&e(this.page.current)},setSelectionItem(t){this.$refs.selection.selectAll(t)},reload(){this.selectionItems.length>0&&(this.selectionItems.length=0),this.getDataSource()},changeDatePicker(t,e,n={}){this.isClickResetBtn||this.$nextTick((()=>{if("datetimerange"==n.valueType||"daterange"==n.valueType)if("daterange"==n.valueType)if(n.vs)if(t[0]&&t[1]){var r=new Date(t[0]),i=new Date(t[1]),o=[];while(r<=i){var a=r.toISOString().split("T")[0];o.push(a),r.setDate(r.getDate()+1)}1==o.length&&o.push(o[0]);const e=n.newkey&&n.newkey[0]?n.newkey[0]:"start",s=n.newkey&&n.newkey[1]?n.newkey[1]:"end";this.filterForm=Object.assign({},this.filterForm,{day:o,[e]:t[0],[s]:t[1],[this.formKey(n)]:[t[0],t[1]]})}else delete this.filterForm.hour,this.filterForm=Object.assign({},this.filterForm,{day:["",""],start:"",end:"",[this.formKey(n)]:[t[0],t[1]]});else{const e=n.newkey&&n.newkey[0]?n.newkey[0]:"start",r=n.newkey&&n.newkey[1]?n.newkey[1]:"end";this.filterForm=Object.assign({},this.filterForm,{[e]:t[0]?t[0]+" 00:00:00":"",[r]:t[1]?t[1]+" 23:59:59":""}),this.filterForm[this.formKey(n)]=[t[0]?t[0]+" 00:00:00":"",t[1]?t[1]+" 23:59:59":""]}else{const e=n.newkey&&n.newkey[0]?n.newkey[0]:"start",r=n.newkey&&n.newkey[1]?n.newkey[1]:"end";this.filterForm=Object.assign({},this.filterForm,{[e]:t[0],[r]:t[1],[this.formKey(n)]:[t[0],t[1]]})}else this.$set(this.filterForm,e,t)}))},changeTimePicker(t,e,n={}){this.isClickResetBtn||this.$nextTick((()=>{t[0]&&t[1]?"timerange"==n.valueType?this.filterForm=Object.assign({},this.filterForm,{hour:[t[0],t[1]]}):this.$set(this.filterForm,e,t):delete this.filterForm.hour}))},changeInput(t,e,n={}){this.$set(this.filterForm,e,t)},changeSelect(t,e,n={}){this.isClickResetBtn||this.$nextTick((()=>{n.jl?this.$parent.doJlMsg(n,t):this.$set(this.filterForm,e,t)}))},sortAndFilterColumns(t,e,n=!0){const r=t.filter((t=>e.includes(t.title)||n&&"操作"===t.title||n&&"selection"===t.type)),i=r.filter((t=>"selection"===t.type)),o=e.map((t=>r.find((e=>e.title===t)))).filter((t=>t&&"selection"!==t.type));if(n){const t=r.find((t=>"操作"===t.title));t&&o.push(t)}const a=[...i,...o];return a},handleGetUserQueryView(){let t="";(this.customPath||this.$route&&this.$route.path)&&(t=(this.customPath||this.$route.path).replace(/^\/?/,""));let e={tag:t+"tableSetView",project_id:JSON.parse(localStorage.getItem("selectedProject")).id,simp_token:s()};Tn(e).then((t=>{let e=t.data;200==e.code?(console.log("tableSetView-----",e),this.viewList=e.data,this.viewListP=fr().cloneDeep(this.viewList)):this.$Message.error(e.msg)}))},getPerson(){let t={project_id:JSON.parse(localStorage.getItem("selectedProject")).id,simp_token:s(),rows:3e3,page:1,work:1};Fn(t).then((t=>{let e=t.data;200==e.code?this.personList=e.data.rows:this.$Message.error(e.msg)}))},handleGetUserQuery(){let t="";(this.customPath||this.$route&&this.$route.path)&&(t=(this.customPath||this.$route.path).replace(/^\/?/,""));let e={tag:t+"tableSet",project_id:JSON.parse(localStorage.getItem("selectedProject")).id,simp_token:s()};this.tableLoading=!0,Tn(e).then((t=>{let e=t.data;if(200==e.code){let t="";if(t=Array.isArray(e.data)&&e.data.length>0?e.data[0]:"",t){t.content=JSON.parse(t.content);let{checkColumnData:e,freeze:n}=t.content;this.columnSettingId=t.id,this.columnSettingObj=t.content,console.log(this.columns);let r=this.sortAndFilterColumns(fr().cloneDeep(this.columns),e);console.log("columnsList---getUserQuery",r);let i=r[0]&&"selection"==r[0].type?n+1:n;r.forEach(((t,e)=>{"操作"==t.title?t.fixed="right":e<i?t.fixed="left":delete t.fixed})),console.log("columnsList----",r),this.columnsList=r}}else this.$Message.error(e.msg)})).finally((()=>{this.reload()}))},changeTypelist(t,e,n={}){t=t[t.length-1],this.isClickResetBtn||this.$nextTick((()=>{n.jl?this.$parent.doJlMsg(n,t):this.$set(this.filterForm,e,t)}))},choosePerson(t){this.filterForm[this.formKey(t)]||this.$set(this.filterForm,this.formKey(t),[]),this.all_names||(this.all_names=[]);const e=new Set(this.filterForm[this.formKey(t)]||[]),n=this.all_names.filter((t=>e.has(t.id)));this.all_names=n;const r=new Set(this.all_names.map((t=>t.id))),i=(this.filterForm[this.formKey(t)]||[]).filter((t=>!r.has(t)));i.length>0&&i.forEach(((t,e)=>{this.personList.forEach(((e,n)=>{if(e.id==t){let n={id:t,name:e.name,app_avatar:e.app_avatar,type:"user",avatar:e.avatar,count:0,selected:!0};this.all_names.push(n)}}))})),console.log(i,"missingIds"),this.initShow=!0,this.currentFilterItem=t,this.$nextTick((()=>{this.$refs.orgPicker.initShow=!0,this.$refs.orgPicker.show()}))},selected(t){console.log("选择的人",t),this.person_ids=[],this.personObj=[];let e=[],n=[];if(t.length>0&&t.forEach((t=>{this.person_ids.push(t.id),e.push(t.name)})),this.names=e.join("、"),this.all_names=t,this.currentFilterItem&&(this.filterForm[this.formKey(this.currentFilterItem)]=this.person_ids),e.length>0){let t={departName:"人员",names:e};this.personObj.push(t)}if(n.length>0){let t={departName:"部门",names:n};this.personObj.push(t)}},handleHeaderSelect(t,e){this.$emit("on-header-select",{option:t,column:e})},initSortable(t){t&&(t._sortable&&t._sortable.destroy(),t._sortable=new ia(t,{animation:150,handle:".drag-handle",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",forceFallback:!0,fallbackClass:"sortable-fallback",onEnd:e=>{const{oldIndex:n,newIndex:r}=e,i=Array.from(t.children).map((t=>({value:t.getAttribute("data-value"),label:t.textContent.trim()})));console.log("options---",i),console.log("columnsList---",this.columnsList);const o=this.columnsList.find((t=>t.headerConfig&&t.headerConfig.options&&t.headerConfig.options.some((t=>t.value===i[0].value))));if(console.log(o,"column----"),o){const t=[...i];this.$set(o.headerConfig,"options",[]),this.$nextTick((()=>{this.$set(o.headerConfig,"options",t)}))}console.log({oldIndex:n,newIndex:r,options:i,column:o});let a=[];console.log(i),i.forEach((t=>{a.push(t.value)})),this.filterForm.sortOrder=a.join(","),this.reload(),this.$emit("on-header-sort",{oldIndex:n,newIndex:r,options:i,column:o})}}))}},created(){this.init()},mounted(){this.handleGetUserQueryView(),this.handleGetUserQuery(),this.getPerson(),window.$wujie&&window.$wujie.bus.$on("window-resize",(()=>{this.$nextTick((()=>{this.$refs.selection&&this.$refs.selection.handleResize()}))}))}},aa=oa,sa=tr(aa,o,a,!1,null,"afaf1e76",null),la=sa.exports;const ua=[la],ca=function(t){ua.forEach((e=>{t.component(e.name,e)}))};"undefined"!==typeof window&&window.Vue&&ca(window.Vue);var fa={install:ca},ha=fa}(),r}()}));
|
|
16
|
+
function Lr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Pr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Lr(Object(n),!0).forEach((function(e){Ur(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Lr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Mr(t){return Mr="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mr(t)}function Ur(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zr(){return zr=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},zr.apply(this,arguments)}function Vr(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}function Gr(t,e){if(null==t)return{};var n,r,i=Vr(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var Yr="1.15.6";function Qr(t){if("undefined"!==typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var Jr=Qr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Wr=Qr(/Edge/i),Hr=Qr(/firefox/i),qr=Qr(/safari/i)&&!Qr(/chrome/i)&&!Qr(/android/i),Xr=Qr(/iP(ad|od|hone)/i),Zr=Qr(/chrome/i)&&Qr(/android/i),Kr={capture:!1,passive:!1};function $r(t,e,n){t.addEventListener(e,n,!Jr&&Kr)}function ti(t,e,n){t.removeEventListener(e,n,!Jr&&Kr)}function ei(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(n){return!1}return!1}}function ni(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function ri(t,e,n,r){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&ei(t,e):ei(t,e))||r&&t===n)return t;if(t===n)break}while(t=ni(t))}return null}var ii,oi=/\s+/g;function ai(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(oi," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(oi," ")}}function si(t,e,n){var r=t&&t.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in r||-1!==e.indexOf("webkit")||(e="-webkit-"+e),r[e]=n+("string"===typeof n?"":"px")}}function li(t,e){var n="";if("string"===typeof t)n=t;else do{var r=si(t,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function ui(t,e,n){if(t){var r=t.getElementsByTagName(e),i=0,o=r.length;if(n)for(;i<o;i++)n(r[i],i);return r}return[]}function ci(){var t=document.scrollingElement;return t||document.documentElement}function fi(t,e,n,r,i){if(t.getBoundingClientRect||t===window){var o,a,s,l,u,c,f;if(t!==window&&t.parentNode&&t!==ci()?(o=t.getBoundingClientRect(),a=o.top,s=o.left,l=o.bottom,u=o.right,c=o.height,f=o.width):(a=0,s=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,f=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!Jr))do{if(i&&i.getBoundingClientRect&&("none"!==si(i,"transform")||n&&"static"!==si(i,"position"))){var h=i.getBoundingClientRect();a-=h.top+parseInt(si(i,"border-top-width")),s-=h.left+parseInt(si(i,"border-left-width")),l=a+o.height,u=s+o.width;break}}while(i=i.parentNode);if(r&&t!==window){var p=li(i||t),d=p&&p.a,g=p&&p.d;p&&(a/=g,s/=d,f/=d,c/=g,l=a+c,u=s+f)}return{top:a,left:s,bottom:l,right:u,width:f,height:c}}}function hi(t,e,n){var r=yi(t,!0),i=fi(t)[e];while(r){var o=fi(r)[n],a=void 0;if(a="top"===n||"left"===n?i>=o:i<=o,!a)return r;if(r===ci())break;r=yi(r,!1)}return!1}function pi(t,e,n,r){var i=0,o=0,a=t.children;while(o<a.length){if("none"!==a[o].style.display&&a[o]!==Do.ghost&&(r||a[o]!==Do.dragged)&&ri(a[o],n.draggable,t,!1)){if(i===e)return a[o];i++}o++}return null}function di(t,e){var n=t.lastElementChild;while(n&&(n===Do.ghost||"none"===si(n,"display")||e&&!ei(n,e)))n=n.previousElementSibling;return n||null}function gi(t,e){var n=0;if(!t||!t.parentNode)return-1;while(t=t.previousElementSibling)"TEMPLATE"===t.nodeName.toUpperCase()||t===Do.clone||e&&!ei(t,e)||n++;return n}function vi(t){var e=0,n=0,r=ci();if(t)do{var i=li(t),o=i.a,a=i.d;e+=t.scrollLeft*o,n+=t.scrollTop*a}while(t!==r&&(t=t.parentNode));return[e,n]}function mi(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var r in e)if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n);return-1}function yi(t,e){if(!t||!t.getBoundingClientRect)return ci();var n=t,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=si(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return ci();if(r||e)return n;r=!0}}}while(n=n.parentNode);return ci()}function Ai(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function bi(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function wi(t,e){return function(){if(!ii){var n=arguments,r=this;1===n.length?t.call(r,n[0]):t.apply(r,n),ii=setTimeout((function(){ii=void 0}),e)}}}function Si(){clearTimeout(ii),ii=void 0}function _i(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function xi(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function Ei(t,e,n){var r={};return Array.from(t.children).forEach((function(i){var o,a,s,l;if(ri(i,e.draggable,t,!1)&&!i.animated&&i!==n){var u=fi(i);r.left=Math.min(null!==(o=r.left)&&void 0!==o?o:1/0,u.left),r.top=Math.min(null!==(a=r.top)&&void 0!==a?a:1/0,u.top),r.right=Math.max(null!==(s=r.right)&&void 0!==s?s:-1/0,u.right),r.bottom=Math.max(null!==(l=r.bottom)&&void 0!==l?l:-1/0,u.bottom)}})),r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}var Oi="Sortable"+(new Date).getTime();function Ci(){var t,e=[];return{captureAnimationState:function(){if(e=[],this.options.animation){var t=[].slice.call(this.el.children);t.forEach((function(t){if("none"!==si(t,"display")&&t!==Do.ghost){e.push({target:t,rect:fi(t)});var n=Pr({},e[e.length-1].rect);if(t.thisAnimationDuration){var r=li(t,!0);r&&(n.top-=r.f,n.left-=r.e)}t.fromRect=n}}))}},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(mi(e,{target:t}),1)},animateAll:function(n){var r=this;if(!this.options.animation)return clearTimeout(t),void("function"===typeof n&&n());var i=!1,o=0;e.forEach((function(t){var e=0,n=t.target,a=n.fromRect,s=fi(n),l=n.prevFromRect,u=n.prevToRect,c=t.rect,f=li(n,!0);f&&(s.top-=f.f,s.left-=f.e),n.toRect=s,n.thisAnimationDuration&&bi(l,s)&&!bi(a,s)&&(c.top-s.top)/(c.left-s.left)===(a.top-s.top)/(a.left-s.left)&&(e=Ii(c,l,u,r.options)),bi(s,a)||(n.prevFromRect=a,n.prevToRect=s,e||(e=r.options.animation),r.animate(n,c,s,e)),e&&(i=!0,o=Math.max(o,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),e),n.thisAnimationDuration=e)})),clearTimeout(t),i?t=setTimeout((function(){"function"===typeof n&&n()}),o):"function"===typeof n&&n(),e=[]},animate:function(t,e,n,r){if(r){si(t,"transition",""),si(t,"transform","");var i=li(this.el),o=i&&i.a,a=i&&i.d,s=(e.left-n.left)/(o||1),l=(e.top-n.top)/(a||1);t.animatingX=!!s,t.animatingY=!!l,si(t,"transform","translate3d("+s+"px,"+l+"px,0)"),this.forRepaintDummy=ki(t),si(t,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),si(t,"transform","translate3d(0,0,0)"),"number"===typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){si(t,"transition",""),si(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),r)}}}}function ki(t){return t.offsetWidth}function Ii(t,e,n,r){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))*r.animation}var Di=[],Ri={initializeByDefault:!0},ji={mount:function(t){for(var e in Ri)Ri.hasOwnProperty(e)&&!(e in t)&&(t[e]=Ri[e]);Di.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),Di.push(t)},pluginEvent:function(t,e,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var i=t+"Global";Di.forEach((function(r){e[r.pluginName]&&(e[r.pluginName][i]&&e[r.pluginName][i](Pr({sortable:e},n)),e.options[r.pluginName]&&e[r.pluginName][t]&&e[r.pluginName][t](Pr({sortable:e},n)))}))},initializePlugins:function(t,e,n,r){for(var i in Di.forEach((function(r){var i=r.pluginName;if(t.options[i]||r.initializeByDefault){var o=new r(t,e,t.options);o.sortable=t,o.options=t.options,t[i]=o,zr(n,o.defaults)}})),t.options)if(t.options.hasOwnProperty(i)){var o=this.modifyOption(t,i,t.options[i]);"undefined"!==typeof o&&(t.options[i]=o)}},getEventProperties:function(t,e){var n={};return Di.forEach((function(r){"function"===typeof r.eventProperties&&zr(n,r.eventProperties.call(e[r.pluginName],t))})),n},modifyOption:function(t,e,n){var r;return Di.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"===typeof i.optionListeners[e]&&(r=i.optionListeners[e].call(t[i.pluginName],n))})),r}};function Ti(t){var e=t.sortable,n=t.rootEl,r=t.name,i=t.targetEl,o=t.cloneEl,a=t.toEl,s=t.fromEl,l=t.oldIndex,u=t.newIndex,c=t.oldDraggableIndex,f=t.newDraggableIndex,h=t.originalEvent,p=t.putSortable,d=t.extraEventProperties;if(e=e||n&&n[Oi],e){var g,v=e.options,m="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||Jr||Wr?(g=document.createEvent("Event"),g.initEvent(r,!0,!0)):g=new CustomEvent(r,{bubbles:!0,cancelable:!0}),g.to=a||n,g.from=s||n,g.item=i||n,g.clone=o,g.oldIndex=l,g.newIndex=u,g.oldDraggableIndex=c,g.newDraggableIndex=f,g.originalEvent=h,g.pullMode=p?p.lastPutMode:void 0;var y=Pr(Pr({},d),ji.getEventProperties(r,e));for(var A in y)g[A]=y[A];n&&n.dispatchEvent(g),v[m]&&v[m].call(e,g)}}var Bi=["evt"],Ni=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,i=Gr(n,Bi);ji.pluginEvent.bind(Do)(t,e,Pr({dragEl:Li,parentEl:Pi,ghostEl:Mi,rootEl:Ui,nextEl:zi,lastDownEl:Vi,cloneEl:Gi,cloneHidden:Yi,dragStarted:ro,putSortable:Xi,activeSortable:Do.active,originalEvent:r,oldIndex:Qi,oldDraggableIndex:Wi,newIndex:Ji,newDraggableIndex:Hi,hideGhostForTarget:Oo,unhideGhostForTarget:Co,cloneNowHidden:function(){Yi=!0},cloneNowShown:function(){Yi=!1},dispatchSortableEvent:function(t){Fi({sortable:e,name:t,originalEvent:r})}},i))};function Fi(t){Ti(Pr({putSortable:Xi,cloneEl:Gi,targetEl:Li,rootEl:Ui,oldIndex:Qi,oldDraggableIndex:Wi,newIndex:Ji,newDraggableIndex:Hi},t))}var Li,Pi,Mi,Ui,zi,Vi,Gi,Yi,Qi,Ji,Wi,Hi,qi,Xi,Zi,Ki,$i,to,eo,no,ro,io,oo,ao,so,lo=!1,uo=!1,co=[],fo=!1,ho=!1,po=[],go=!1,vo=[],mo="undefined"!==typeof document,yo=Xr,Ao=Wr||Jr?"cssFloat":"float",bo=mo&&!Zr&&!Xr&&"draggable"in document.createElement("div"),wo=function(){if(mo){if(Jr)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),So=function(t,e){var n=si(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=pi(t,0,e),o=pi(t,1,e),a=i&&si(i),s=o&&si(o),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+fi(i).width,u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+fi(o).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a["float"]&&"none"!==a["float"]){var c="left"===a["float"]?"left":"right";return!o||"both"!==s.clear&&s.clear!==c?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=r&&"none"===n[Ao]||o&&"none"===n[Ao]&&l+u>r)?"vertical":"horizontal"},_o=function(t,e,n){var r=n?t.left:t.top,i=n?t.right:t.bottom,o=n?t.width:t.height,a=n?e.left:e.top,s=n?e.right:e.bottom,l=n?e.width:e.height;return r===a||i===s||r+o/2===a+l/2},xo=function(t,e){var n;return co.some((function(r){var i=r[Oi].options.emptyInsertThreshold;if(i&&!di(r)){var o=fi(r),a=t>=o.left-i&&t<=o.right+i,s=e>=o.top-i&&e<=o.bottom+i;return a&&s?n=r:void 0}})),n},Eo=function(t){function e(t,n){return function(r,i,o,a){var s=r.options.group.name&&i.options.group.name&&r.options.group.name===i.options.group.name;if(null==t&&(n||s))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"===typeof t)return e(t(r,i,o,a),n)(r,i,o,a);var l=(n?r:i).options.group.name;return!0===t||"string"===typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},r=t.group;r&&"object"==Mr(r)||(r={name:r}),n.name=r.name,n.checkPull=e(r.pull,!0),n.checkPut=e(r.put),n.revertClone=r.revertClone,t.group=n},Oo=function(){!wo&&Mi&&si(Mi,"display","none")},Co=function(){!wo&&Mi&&si(Mi,"display","")};mo&&!Zr&&document.addEventListener("click",(function(t){if(uo)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),uo=!1,!1}),!0);var ko=function(t){if(Li){t=t.touches?t.touches[0]:t;var e=xo(t.clientX,t.clientY);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[Oi]._onDragOver(n)}}},Io=function(t){Li&&Li.parentNode[Oi]._isOutsideThisEl(t.target)};function Do(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=zr({},e),t[Oi]=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 So(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Do.supportPointer&&"PointerEvent"in window&&(!qr||Xr),emptyInsertThreshold:5};for(var r in ji.initializePlugins(this,t,n),n)!(r in e)&&(e[r]=n[r]);for(var i in Eo(e),this)"_"===i.charAt(0)&&"function"===typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&bo,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?$r(t,"pointerdown",this._onTapStart):($r(t,"mousedown",this._onTapStart),$r(t,"touchstart",this._onTapStart)),this.nativeDraggable&&($r(t,"dragover",this),$r(t,"dragenter",this)),co.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),zr(this,Ci())}function Ro(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function jo(t,e,n,r,i,o,a,s){var l,u,c=t[Oi],f=c.options.onMove;return!window.CustomEvent||Jr||Wr?(l=document.createEvent("Event"),l.initEvent("move",!0,!0)):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=r,l.related=i||e,l.relatedRect=o||fi(e),l.willInsertAfter=s,l.originalEvent=a,t.dispatchEvent(l),f&&(u=f.call(c,l,a)),u}function To(t){t.draggable=!1}function Bo(){go=!1}function No(t,e,n){var r=fi(pi(n.el,0,n.options,!0)),i=Ei(n.el,n.options,Mi),o=10;return e?t.clientX<i.left-o||t.clientY<r.top&&t.clientX<r.right:t.clientY<i.top-o||t.clientY<r.bottom&&t.clientX<r.left}function Fo(t,e,n){var r=fi(di(n.el,n.options.draggable)),i=Ei(n.el,n.options,Mi),o=10;return e?t.clientX>i.right+o||t.clientY>r.bottom&&t.clientX>r.left:t.clientY>i.bottom+o||t.clientX>r.right&&t.clientY>r.top}function Lo(t,e,n,r,i,o,a,s){var l=r?t.clientY:t.clientX,u=r?n.height:n.width,c=r?n.top:n.left,f=r?n.bottom:n.right,h=!1;if(!a)if(s&&ao<u*i){if(!fo&&(1===oo?l>c+u*o/2:l<f-u*o/2)&&(fo=!0),fo)h=!0;else if(1===oo?l<c+ao:l>f-ao)return-oo}else if(l>c+u*(1-i)/2&&l<f-u*(1-i)/2)return Po(e);return h=h||a,h&&(l<c+u*o/2||l>f-u*o/2)?l>c+u/2?1:-1:0}function Po(t){return gi(Li)<gi(t)?1:-1}function Mo(t){var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;while(n--)r+=e.charCodeAt(n);return r.toString(36)}function Uo(t){vo.length=0;var e=t.getElementsByTagName("input"),n=e.length;while(n--){var r=e[n];r.checked&&vo.push(r)}}function zo(t){return setTimeout(t,0)}function Vo(t){return clearTimeout(t)}Do.prototype={constructor:Do,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(io=null)},_getDirection:function(t,e){return"function"===typeof this.options.direction?this.options.direction.call(this,t,e,Li):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,i=r.preventOnFilter,o=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,u=r.filter;if(Uo(n),!Li&&!(/mousedown|pointerdown/.test(o)&&0!==t.button||r.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!qr||!s||"SELECT"!==s.tagName.toUpperCase())&&(s=ri(s,r.draggable,n,!1),(!s||!s.animated)&&Vi!==s)){if(Qi=gi(s),Wi=gi(s,r.draggable),"function"===typeof u){if(u.call(this,t,s,this))return Fi({sortable:e,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),Ni("filter",e,{evt:t}),void(i&&t.preventDefault())}else if(u&&(u=u.split(",").some((function(r){if(r=ri(l,r.trim(),n,!1),r)return Fi({sortable:e,rootEl:r,name:"filter",targetEl:s,fromEl:n,toEl:n}),Ni("filter",e,{evt:t}),!0})),u))return void(i&&t.preventDefault());r.handle&&!ri(l,r.handle,n,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,n){var r,i=this,o=i.el,a=i.options,s=o.ownerDocument;if(n&&!Li&&n.parentNode===o){var l=fi(n);if(Ui=o,Li=n,Pi=Li.parentNode,zi=Li.nextSibling,Vi=n,qi=a.group,Do.dragged=Li,Zi={target:Li,clientX:(e||t).clientX,clientY:(e||t).clientY},eo=Zi.clientX-l.left,no=Zi.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Li.style["will-change"]="all",r=function(){Ni("delayEnded",i,{evt:t}),Do.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!Hr&&i.nativeDraggable&&(Li.draggable=!0),i._triggerDragStart(t,e),Fi({sortable:i,name:"choose",originalEvent:t}),ai(Li,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){ui(Li,t.trim(),To)})),$r(s,"dragover",ko),$r(s,"mousemove",ko),$r(s,"touchmove",ko),a.supportPointer?($r(s,"pointerup",i._onDrop),!this.nativeDraggable&&$r(s,"pointercancel",i._onDrop)):($r(s,"mouseup",i._onDrop),$r(s,"touchend",i._onDrop),$r(s,"touchcancel",i._onDrop)),Hr&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Li.draggable=!0),Ni("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(Wr||Jr))r();else{if(Do.eventCanceled)return void this._onDrop();a.supportPointer?($r(s,"pointerup",i._disableDelayedDrag),$r(s,"pointercancel",i._disableDelayedDrag)):($r(s,"mouseup",i._disableDelayedDrag),$r(s,"touchend",i._disableDelayedDrag),$r(s,"touchcancel",i._disableDelayedDrag)),$r(s,"mousemove",i._delayedDragTouchMoveHandler),$r(s,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&$r(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(r,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Li&&To(Li),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;ti(t,"mouseup",this._disableDelayedDrag),ti(t,"touchend",this._disableDelayedDrag),ti(t,"touchcancel",this._disableDelayedDrag),ti(t,"pointerup",this._disableDelayedDrag),ti(t,"pointercancel",this._disableDelayedDrag),ti(t,"mousemove",this._delayedDragTouchMoveHandler),ti(t,"touchmove",this._delayedDragTouchMoveHandler),ti(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?$r(document,"pointermove",this._onTouchMove):$r(document,e?"touchmove":"mousemove",this._onTouchMove):($r(Li,"dragend",this),$r(Ui,"dragstart",this._onDragStart));try{document.selection?zo((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if(lo=!1,Ui&&Li){Ni("dragStarted",this,{evt:e}),this.nativeDraggable&&$r(document,"dragover",Io);var n=this.options;!t&&ai(Li,n.dragClass,!1),ai(Li,n.ghostClass,!0),Do.active=this,t&&this._appendGhost(),Fi({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Ki){this._lastX=Ki.clientX,this._lastY=Ki.clientY,Oo();var t=document.elementFromPoint(Ki.clientX,Ki.clientY),e=t;while(t&&t.shadowRoot){if(t=t.shadowRoot.elementFromPoint(Ki.clientX,Ki.clientY),t===e)break;e=t}if(Li.parentNode[Oi]._isOutsideThisEl(t),e)do{if(e[Oi]){var n=void 0;if(n=e[Oi]._onDragOver({clientX:Ki.clientX,clientY:Ki.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=ni(e));Co()}},_onTouchMove:function(t){if(Zi){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,i=t.touches?t.touches[0]:t,o=Mi&&li(Mi,!0),a=Mi&&o&&o.a,s=Mi&&o&&o.d,l=yo&&so&&vi(so),u=(i.clientX-Zi.clientX+r.x)/(a||1)+(l?l[0]-po[0]:0)/(a||1),c=(i.clientY-Zi.clientY+r.y)/(s||1)+(l?l[1]-po[1]:0)/(s||1);if(!Do.active&&!lo){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(Mi){o?(o.e+=u-($i||0),o.f+=c-(to||0)):o={a:1,b:0,c:0,d:1,e:u,f:c};var f="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");si(Mi,"webkitTransform",f),si(Mi,"mozTransform",f),si(Mi,"msTransform",f),si(Mi,"transform",f),$i=u,to=c,Ki=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Mi){var t=this.options.fallbackOnBody?document.body:Ui,e=fi(Li,!0,yo,!0,t),n=this.options;if(yo){so=t;while("static"===si(so,"position")&&"none"===si(so,"transform")&&so!==document)so=so.parentNode;so!==document.body&&so!==document.documentElement?(so===document&&(so=ci()),e.top+=so.scrollTop,e.left+=so.scrollLeft):so=ci(),po=vi(so)}Mi=Li.cloneNode(!0),ai(Mi,n.ghostClass,!1),ai(Mi,n.fallbackClass,!0),ai(Mi,n.dragClass,!0),si(Mi,"transition",""),si(Mi,"transform",""),si(Mi,"box-sizing","border-box"),si(Mi,"margin",0),si(Mi,"top",e.top),si(Mi,"left",e.left),si(Mi,"width",e.width),si(Mi,"height",e.height),si(Mi,"opacity","0.8"),si(Mi,"position",yo?"absolute":"fixed"),si(Mi,"zIndex","100000"),si(Mi,"pointerEvents","none"),Do.ghost=Mi,t.appendChild(Mi),si(Mi,"transform-origin",eo/parseInt(Mi.style.width)*100+"% "+no/parseInt(Mi.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,r=t.dataTransfer,i=n.options;Ni("dragStart",this,{evt:t}),Do.eventCanceled?this._onDrop():(Ni("setupClone",this),Do.eventCanceled||(Gi=xi(Li),Gi.removeAttribute("id"),Gi.draggable=!1,Gi.style["will-change"]="",this._hideClone(),ai(Gi,this.options.chosenClass,!1),Do.clone=Gi),n.cloneId=zo((function(){Ni("clone",n),Do.eventCanceled||(n.options.removeCloneOnHide||Ui.insertBefore(Gi,Li),n._hideClone(),Fi({sortable:n,name:"clone"}))})),!e&&ai(Li,i.dragClass,!0),e?(uo=!0,n._loopId=setInterval(n._emulateDragOver,50)):(ti(document,"mouseup",n._onDrop),ti(document,"touchend",n._onDrop),ti(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",i.setData&&i.setData.call(n,r,Li)),$r(document,"drop",n),si(Li,"transform","translateZ(0)")),lo=!0,n._dragStartId=zo(n._dragStarted.bind(n,e,t)),$r(document,"selectstart",n),ro=!0,window.getSelection().removeAllRanges(),qr&&si(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,r,i,o=this.el,a=t.target,s=this.options,l=s.group,u=Do.active,c=qi===l,f=s.sort,h=Xi||u,p=this,d=!1;if(!go){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),a=ri(a,s.draggable,o,!0),I("dragOver"),Do.eventCanceled)return d;if(Li.contains(t.target)||a.animated&&a.animatingX&&a.animatingY||p._ignoreWhileAnimating===a)return R(!1);if(uo=!1,u&&!s.disabled&&(c?f||(r=Pi!==Ui):Xi===this||(this.lastPutMode=qi.checkPull(this,u,Li,t))&&l.checkPut(this,u,Li,t))){if(i="vertical"===this._getDirection(t,a),e=fi(Li),I("dragOverValid"),Do.eventCanceled)return d;if(r)return Pi=Ui,D(),this._hideClone(),I("revert"),Do.eventCanceled||(zi?Ui.insertBefore(Li,zi):Ui.appendChild(Li)),R(!0);var g=di(o,s.draggable);if(!g||Fo(t,i,this)&&!g.animated){if(g===Li)return R(!1);if(g&&o===t.target&&(a=g),a&&(n=fi(a)),!1!==jo(Ui,o,Li,e,a,n,t,!!a))return D(),g&&g.nextSibling?o.insertBefore(Li,g.nextSibling):o.appendChild(Li),Pi=o,j(),R(!0)}else if(g&&No(t,i,this)){var v=pi(o,0,s,!0);if(v===Li)return R(!1);if(a=v,n=fi(a),!1!==jo(Ui,o,Li,e,a,n,t,!1))return D(),o.insertBefore(Li,v),Pi=o,j(),R(!0)}else if(a.parentNode===o){n=fi(a);var m,y,A=0,b=Li.parentNode!==o,w=!_o(Li.animated&&Li.toRect||e,a.animated&&a.toRect||n,i),S=i?"top":"left",_=hi(a,"top","top")||hi(Li,"top","top"),x=_?_.scrollTop:void 0;if(io!==a&&(m=n[S],fo=!1,ho=!w&&s.invertSwap||b),A=Lo(t,a,n,i,w?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,ho,io===a),0!==A){var E=gi(Li);do{E-=A,y=Pi.children[E]}while(y&&("none"===si(y,"display")||y===Mi))}if(0===A||y===a)return R(!1);io=a,oo=A;var O=a.nextElementSibling,C=!1;C=1===A;var k=jo(Ui,o,Li,e,a,n,t,C);if(!1!==k)return 1!==k&&-1!==k||(C=1===k),go=!0,setTimeout(Bo,30),D(),C&&!O?o.appendChild(Li):a.parentNode.insertBefore(Li,C?O:a),_&&_i(_,0,x-_.scrollTop),Pi=Li.parentNode,void 0===m||ho||(ao=Math.abs(m-fi(a)[S])),j(),R(!0)}if(o.contains(Li))return R(!1)}return!1}function I(s,l){Ni(s,p,Pr({evt:t,isOwner:c,axis:i?"vertical":"horizontal",revert:r,dragRect:e,targetRect:n,canSort:f,fromSortable:h,target:a,completed:R,onMove:function(n,r){return jo(Ui,o,Li,e,n,fi(n),t,r)},changed:j},l))}function D(){I("dragOverAnimationCapture"),p.captureAnimationState(),p!==h&&h.captureAnimationState()}function R(e){return I("dragOverCompleted",{insertion:e}),e&&(c?u._hideClone():u._showClone(p),p!==h&&(ai(Li,Xi?Xi.options.ghostClass:u.options.ghostClass,!1),ai(Li,s.ghostClass,!0)),Xi!==p&&p!==Do.active?Xi=p:p===Do.active&&Xi&&(Xi=null),h===p&&(p._ignoreWhileAnimating=a),p.animateAll((function(){I("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(a===Li&&!Li.animated||a===o&&!a.animated)&&(io=null),s.dragoverBubble||t.rootEl||a===document||(Li.parentNode[Oi]._isOutsideThisEl(t.target),!e&&ko(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),d=!0}function j(){Ji=gi(Li),Hi=gi(Li,s.draggable),Fi({sortable:p,name:"change",toEl:o,newIndex:Ji,newDraggableIndex:Hi,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){ti(document,"mousemove",this._onTouchMove),ti(document,"touchmove",this._onTouchMove),ti(document,"pointermove",this._onTouchMove),ti(document,"dragover",ko),ti(document,"mousemove",ko),ti(document,"touchmove",ko)},_offUpEvents:function(){var t=this.el.ownerDocument;ti(t,"mouseup",this._onDrop),ti(t,"touchend",this._onDrop),ti(t,"pointerup",this._onDrop),ti(t,"pointercancel",this._onDrop),ti(t,"touchcancel",this._onDrop),ti(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;Ji=gi(Li),Hi=gi(Li,n.draggable),Ni("drop",this,{evt:t}),Pi=Li&&Li.parentNode,Ji=gi(Li),Hi=gi(Li,n.draggable),Do.eventCanceled||(lo=!1,ho=!1,fo=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Vo(this.cloneId),Vo(this._dragStartId),this.nativeDraggable&&(ti(document,"drop",this),ti(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),qr&&si(document.body,"user-select",""),si(Li,"transform",""),t&&(ro&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Mi&&Mi.parentNode&&Mi.parentNode.removeChild(Mi),(Ui===Pi||Xi&&"clone"!==Xi.lastPutMode)&&Gi&&Gi.parentNode&&Gi.parentNode.removeChild(Gi),Li&&(this.nativeDraggable&&ti(Li,"dragend",this),To(Li),Li.style["will-change"]="",ro&&!lo&&ai(Li,Xi?Xi.options.ghostClass:this.options.ghostClass,!1),ai(Li,this.options.chosenClass,!1),Fi({sortable:this,name:"unchoose",toEl:Pi,newIndex:null,newDraggableIndex:null,originalEvent:t}),Ui!==Pi?(Ji>=0&&(Fi({rootEl:Pi,name:"add",toEl:Pi,fromEl:Ui,originalEvent:t}),Fi({sortable:this,name:"remove",toEl:Pi,originalEvent:t}),Fi({rootEl:Pi,name:"sort",toEl:Pi,fromEl:Ui,originalEvent:t}),Fi({sortable:this,name:"sort",toEl:Pi,originalEvent:t})),Xi&&Xi.save()):Ji!==Qi&&Ji>=0&&(Fi({sortable:this,name:"update",toEl:Pi,originalEvent:t}),Fi({sortable:this,name:"sort",toEl:Pi,originalEvent:t})),Do.active&&(null!=Ji&&-1!==Ji||(Ji=Qi,Hi=Wi),Fi({sortable:this,name:"end",toEl:Pi,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Ni("nulling",this),Ui=Li=Pi=Mi=zi=Gi=Vi=Yi=Zi=Ki=ro=Ji=Hi=Qi=Wi=io=oo=Xi=qi=Do.dragged=Do.ghost=Do.clone=Do.active=null,vo.forEach((function(t){t.checked=!0})),vo.length=$i=to=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Li&&(this._onDragOver(t),Ro(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t,e=[],n=this.el.children,r=0,i=n.length,o=this.options;r<i;r++)t=n[r],ri(t,o.draggable,this.el,!1)&&e.push(t.getAttribute(o.dataIdAttr)||Mo(t));return e},sort:function(t,e){var n={},r=this.el;this.toArray().forEach((function(t,e){var i=r.children[e];ri(i,this.options.draggable,r,!1)&&(n[t]=i)}),this),e&&this.captureAnimationState(),t.forEach((function(t){n[t]&&(r.removeChild(n[t]),r.appendChild(n[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return ri(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var r=ji.modifyOption(this,t,e);n[t]="undefined"!==typeof r?r:e,"group"===t&&Eo(n)},destroy:function(){Ni("destroy",this);var t=this.el;t[Oi]=null,ti(t,"mousedown",this._onTapStart),ti(t,"touchstart",this._onTapStart),ti(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(ti(t,"dragover",this),ti(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),co.splice(co.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Yi){if(Ni("hideClone",this),Do.eventCanceled)return;si(Gi,"display","none"),this.options.removeCloneOnHide&&Gi.parentNode&&Gi.parentNode.removeChild(Gi),Yi=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(Yi){if(Ni("showClone",this),Do.eventCanceled)return;Li.parentNode!=Ui||this.options.group.revertClone?zi?Ui.insertBefore(Gi,zi):Ui.appendChild(Gi):Ui.insertBefore(Gi,Li),this.options.group.revertClone&&this.animate(Li,Gi),si(Gi,"display",""),Yi=!1}}else this._hideClone()}},mo&&$r(document,"touchmove",(function(t){(Do.active||lo)&&t.cancelable&&t.preventDefault()})),Do.utils={on:$r,off:ti,css:si,find:ui,is:function(t,e){return!!ri(t,e,t,!1)},extend:Ai,throttle:wi,closest:ri,toggleClass:ai,clone:xi,index:gi,nextTick:zo,cancelNextTick:Vo,detectDirection:So,getChild:pi,expando:Oi},Do.get=function(t){return t[Oi]},Do.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Do.utils=Pr(Pr({},Do.utils),t.utils)),ji.mount(t)}))},Do.create=function(t,e){return new Do(t,e)},Do.version=Yr;var Go,Yo,Qo,Jo,Wo,Ho,qo=[],Xo=!1;function Zo(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"===typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?$r(document,"dragover",this._handleAutoScroll):this.options.supportPointer?$r(document,"pointermove",this._handleFallbackAutoScroll):e.touches?$r(document,"touchmove",this._handleFallbackAutoScroll):$r(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?ti(document,"dragover",this._handleAutoScroll):(ti(document,"pointermove",this._handleFallbackAutoScroll),ti(document,"touchmove",this._handleFallbackAutoScroll),ti(document,"mousemove",this._handleFallbackAutoScroll)),$o(),Ko(),Si()},nulling:function(){Wo=Yo=Go=Xo=Ho=Qo=Jo=null,qo.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,r=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,o=document.elementFromPoint(r,i);if(Wo=t,e||this.options.forceAutoScrollFallback||Wr||Jr||qr){ta(t,this.options,o,e);var a=yi(o,!0);!Xo||Ho&&r===Qo&&i===Jo||(Ho&&$o(),Ho=setInterval((function(){var o=yi(document.elementFromPoint(r,i),!0);o!==a&&(a=o,Ko()),ta(t,n.options,o,e)}),10),Qo=r,Jo=i)}else{if(!this.options.bubbleScroll||yi(o,!0)===ci())return void Ko();ta(t,this.options,yi(o,!1),!1)}}},zr(t,{pluginName:"scroll",initializeByDefault:!0})}function Ko(){qo.forEach((function(t){clearInterval(t.pid)})),qo=[]}function $o(){clearInterval(Ho)}var ta=wi((function(t,e,n,r){if(e.scroll){var i,o=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,s=e.scrollSensitivity,l=e.scrollSpeed,u=ci(),c=!1;Yo!==n&&(Yo=n,Ko(),Go=e.scroll,i=e.scrollFn,!0===Go&&(Go=yi(n,!0)));var f=0,h=Go;do{var p=h,d=fi(p),g=d.top,v=d.bottom,m=d.left,y=d.right,A=d.width,b=d.height,w=void 0,S=void 0,_=p.scrollWidth,x=p.scrollHeight,E=si(p),O=p.scrollLeft,C=p.scrollTop;p===u?(w=A<_&&("auto"===E.overflowX||"scroll"===E.overflowX||"visible"===E.overflowX),S=b<x&&("auto"===E.overflowY||"scroll"===E.overflowY||"visible"===E.overflowY)):(w=A<_&&("auto"===E.overflowX||"scroll"===E.overflowX),S=b<x&&("auto"===E.overflowY||"scroll"===E.overflowY));var k=w&&(Math.abs(y-o)<=s&&O+A<_)-(Math.abs(m-o)<=s&&!!O),I=S&&(Math.abs(v-a)<=s&&C+b<x)-(Math.abs(g-a)<=s&&!!C);if(!qo[f])for(var D=0;D<=f;D++)qo[D]||(qo[D]={});qo[f].vx==k&&qo[f].vy==I&&qo[f].el===p||(qo[f].el=p,qo[f].vx=k,qo[f].vy=I,clearInterval(qo[f].pid),0==k&&0==I||(c=!0,qo[f].pid=setInterval(function(){r&&0===this.layer&&Do.active._onTouchMove(Wo);var e=qo[this.layer].vy?qo[this.layer].vy*l:0,n=qo[this.layer].vx?qo[this.layer].vx*l:0;"function"===typeof i&&"continue"!==i.call(Do.dragged.parentNode[Oi],n,e,t,Wo,qo[this.layer].el)||_i(qo[this.layer].el,n,e)}.bind({layer:f}),24))),f++}while(e.bubbleScroll&&h!==u&&(h=yi(h,!1)));Xo=c}}),30),ea=function(t){var e=t.originalEvent,n=t.putSortable,r=t.dragEl,i=t.activeSortable,o=t.dispatchSortableEvent,a=t.hideGhostForTarget,s=t.unhideGhostForTarget;if(e){var l=n||i;a();var u=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,c=document.elementFromPoint(u.clientX,u.clientY);s(),l&&!l.el.contains(c)&&(o("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function na(){}function ra(){}na.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=pi(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(e,r):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:ea},zr(na,{pluginName:"revertOnSpill"}),ra.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable,r=n||this.sortable;r.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),r.animateAll()},drop:ea},zr(ra,{pluginName:"removeOnSpill"});Do.mount(new Zo),Do.mount(ra,na);var ia=Do,oa={name:"cj_iview_table",components:{tableSetting:sr,saveViewModal:mr,viewEdit:_r,OrgPicker:Fr},props:{customPath:{type:String,default:""},filterGridSpan:{type:Number,default:6},filterLabelWidth:{type:Number,default:80},border:{type:Boolean,default:!1},height:{type:String,default:""},maxHeight:{type:String,default:""},size:{type:String,default:"default"},loading:{type:Boolean,required:!1},isShowtoolBarRight:{type:Boolean,required:!1,default:!0},columns:{type:Array,required:!0},toolBar:{type:[Array,Boolean],default:!0},defaultSize:{type:Number,default:10},params:{type:Object,default:()=>({})},pagination:{type:Object,default:()=>({})},data:{type:Object,required:!1},request:{type:Function,required:!1}},data(){return{person_icon:xr,viewSaveIcon:lr,viewSettingIcon:ur,table_no_flod:zn,table_flod:Vn,filterForm:{},filtersupplementnNum:0,tableData:[],tableLoading:!1,isClickFilterBtn:!1,isClickResetBtn:!1,filterFold:!1,columnSettingObj:"",columnSettingId:"",columnsList:fr().cloneDeep(this.columns),defaultColumnsList:fr().cloneDeep(this.columns),viewList:[],viewListP:[],filterViewValue:"",filterCount:0,selectionItems:[],defToolBar:[{text:"新增",type:"primary"}],init_status:!0,page:{current:1,pageSize:10,total:0},personList:[],initShow:!0,all_names:[],personObj:{},person_ids:[],currentFilterItem:null,sortableInstance:null}},computed:{tableColumns(){return this.columnsList.filter((t=>!t.hideInTable)).map((t=>{const e=t.render,n={...t,render:(n,r)=>{if(t.slot){const e=this.$scopedSlots[t.slot]?this.$scopedSlots[t.slot]({row:r.row}):n("span",r.row[t.key]);return console.log("slotContent--",e),n("Tooltip",{props:{content:"",maxWidth:800,theme:"light",transfer:!0,placement:r.row._index>=this.dataSource.length-1?"top":r.row._index<5?"bottom":"top"},style:{width:"100%"},scopedSlots:{default:()=>[n("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:"0",cursor:"pointer",width:"100%"}},[e])],content:()=>{const e=r.row[t.key],i=this.$scopedSlots[t.slot]?this.$scopedSlots[t.slot]({row:r.row}):n("span",r.row[t.key]);return this.isJsonString(e)?n("json-viewer",{props:{value:JSON.parse(e),expandDepth:999,copyable:!0,sort:!0,boxed:!0,theme:"light",collapsed:!0},style:{overflowY:"auto",padding:"8px",boxSizing:"border-box",width:"800px",minWidth:"800px",maxHeight:"300px"},class:"custom-json-viewer"}):n("div",[i])}}})}if("操作"===t.title)return e?e(n,r):n("span",r.row[t.key]);const i=r.row[t.key],o=r.column.width||r.column.minWidth,a=.85*o;let s;return s=e?e(n,r):n("span",{style:{display:"inline-block",maxWidth:`${a}px`,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%"}},i),n("Tooltip",{props:{content:"",maxWidth:800,theme:"light",transfer:!0,placement:r.row._index>=this.dataSource.length-1?"top":r.row._index<5?"bottom":"top"},style:{width:"100%"},scopedSlots:{default:()=>[n("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:"0",cursor:"pointer",width:"100%"}},[s])],content:()=>{const t=i;return this.isJsonString(t)?n("json-viewer",{props:{value:JSON.parse(t),expandDepth:999,expanded:!0,copyable:!0,sort:!0,boxed:!0,theme:"light",collapsed:!0},style:{overflowY:"auto",padding:"8px",boxSizing:"border-box",width:"800px",minWidth:"800px",maxHeight:"300px"},class:"custom-json-viewer"}):n("div",[s])}}})}};return t.headerConfig&&(n.renderHeader=(e,n)=>e("div",{class:"custom-header"},[e("Poptip",{props:{trigger:"click",transfer:!0,placement:"bottom-start",style:{maxHeight:"300px"}},class:"header-poptip",on:{"on-popper-show":()=>{this.$nextTick((()=>{this.$emit("on-header-click",t);const e=document.querySelectorAll(".header-options");e.forEach((t=>{this.initSortable(t)}))}))}}},[e("div",{class:"header-title"},[e("span",{style:{cursor:"pointer"}},t.title),e("Icon",{props:{type:"ios-cog-outline",size:18},class:"header-icon",style:{cursor:"pointer",color:(t.as||t.key)==this.filterForm.sort?"#2d8cf0":""},on:{click:()=>{this.filterForm.sort!=(t.as||t.key)&&setTimeout((()=>{this.filterForm.sort=t.as||t.key,console.log(t.headerConfig),console.log(t.headerConfig.options),this.$set(t.headerConfig,"options",[...t.headerConfig.options]);let e=[];t.headerConfig.options.forEach((t=>{e.push(t.value)})),this.filterForm.sortOrder=e.join(","),console.log(this.filterForm),this.reload()}),0)}}})]),e("div",{slot:"content",class:"header-content",style:{maxHeight:"300px",overflowY:"auto"}},[e("div",{class:"header-options",style:{padding:"2px 0"}},[...(t.headerConfig.options||[]).map((n=>e("div",{class:"header-option",attrs:{"data-key":t.as||t.key,"data-id":(t.as||t.key)+n.value,"data-value":n.value},style:{padding:"5px 0px",display:"flex",alignItems:"center",fontSize:"14px"},on:{click:()=>this.handleHeaderSelect(n,t)}},[e("img",{attrs:{src:Hn},class:"drag-handle",style:{cursor:"move",marginRight:"8px",width:"8px",height:"15px",touchAction:"none",verticalAlign:"middle"}}),e("span",{style:{fontSize:"14px !important;"}},n.label)])))])])])])),n}))},setcolumnsList(){return this.columns.filter((t=>t.title&&"操作"!=t.title))},exportcolumnsList(){return this.columnsList.filter((t=>t.title&&"操作"!=t.title&&"selection"!=t.type))},filterItems(){console.log("filterItems----------");let t=this.columns.filter((t=>t.filter)).sort(((t,e)=>t.filterSort-e.filterSort));this.filterCount=t.length;const e=24/this.filterGridSpan;this.calculateSupplementNum(t.length,e);return this.filterFold||(t=t.slice(0,t.length<e-1?t.length:e-1)),console.log("filtersupplementnNum---",t),t},toolBarList(){return Array.isArray(this.toolBar)?this.toolBar:!0===this.toolBar?this.defToolBar:[]},tableSlot(){return console.log("tableSlot---",this.columns.filter((t=>t.slot))),this.columns.filter((t=>t.slot))},requestParams(){const{page:t,params:e,defaultSize:n}=this,r=e.pageSize?e.pageSize:t.pageSize;return{current:t.current,...e,pageSize:r||n}},dataSource(){return this.data&&this.data.data?Array.isArray(this.data.data)?this.data.data:[]:this.tableData},formKey(){return t=>t.as?t.as:t.key}},watch:{filterFold(t,e){console.log(t,e)},filterForm:{immediate:!1,deep:!0,handler(){this.isClickResetBtn||this.init_status&&(this.filterItems.map((t=>{for(let e in this.filterForm)t.as&&t.key===e&&this.$set(this.filterForm,t.as,this.filterForm[e])})),this.init_status=!1)}},loading:{immediate:!0,handler(t){void 0!=t&&(this.tableLoading=t)}},"data.total":{handler(t){this.page.total=t}},requestParams(){this.reload()}},methods:{isJsonString(t){if("string"!==typeof t)return!1;try{const e=JSON.parse(t);return"object"===typeof e&&null!==e}catch(e){return!1}},calculateSupplementNum(t,e){console.log(this.filterGridSpan),console.log(t%e);let n=0;return n=t%e===0?e-1:e-(t%e+1),this.filtersupplementnNum=n,n},filterViewList(){console.log(this.filterViewValue),this.viewList=this.viewListP.filter((t=>{if(~t.name.indexOf(this.filterViewValue))return t}))},clickFlod(){this.filterFold=!this.filterFold},clickSetting(){this.$refs.tableSetting.exportModal=!0},clickItem(t){if("viewSave"==t)this.$refs.saveViewModal.title="保存视图",this.$refs.saveViewModal.exportModal=!0;else if("viewSetting"==t)this.$refs.viewEdit.exportModal=!0;else if(console.log(t),t.content){let n=JSON.parse(t.content);if(this.filterForm={...n.filterForm},n.filterForm&&(n.filterForm.sort?this.columnsList.forEach((t=>{t.sortable&&t.key==n.filterForm.sort?t.sortType=n.filterForm.sortOrder:t.sortType=""})):this.columnsList.forEach((t=>{t.sortable&&(t.sortType=n.filterForm.sortOrder)}))),this.$refs.selection&&this.$refs.selection.handleSort)try{this.$refs.selection.handleSort({column:void 0,key:"",order:"normal"})}catch(e){}this.page.current=n.current,this.page.pageSize=n.pageSize,this.reload()}},updateView(t){this.$refs.saveViewModal.exportBtnLoading=!0,jn(t).then((t=>{let e=t.data;200==e.code&&(this.$refs.saveViewModal.exportModal=!1,this.handleGetUserQueryView())})).finally((()=>{this.$refs.saveViewModal.exportBtnLoading=!1}))},saveView(t){console.log("执行---saveView");let e="";if(console.log("user--",sessionStorage.getItem("user")),console.log("formObj---",t),sessionStorage.getItem("user"))e="string"==typeof sessionStorage.getItem("user")&&"undefined"!=sessionStorage.getItem("user")?JSON.parse(sessionStorage.getItem("user")):sessionStorage.getItem("user");else if(1==t.type)return void this.$Message.warning("请先前往账号管理,绑定人员");let n="";(this.customPath||this.$route&&this.$route.path)&&(n=(this.customPath||this.$route.path).replace(/^\/?/,""));let r={current:this.page.current,pageSize:this.page.pageSize,filterForm:this.delValueEmptyProperty(this.filterForm)};console.log(r);let i={tag:n+"tableSetView",name:t.name,type:t.type,user_id:e.id,content:JSON.stringify(r),project_id:JSON.parse(localStorage.getItem("selectedProject")).id,simp_token:s()};console.log(i),console.log(this.columns),this.$refs.saveViewModal.exportBtnLoading=!0,Rn(i).then((t=>{console.log(t);let e=t.data;200==e.code&&(this.$refs.saveViewModal.exportModal=!1,this.handleGetUserQueryView())})).finally((()=>{this.$refs.saveViewModal.exportBtnLoading=!1}))},getStringValue(t){let e=t.value||t.id||t.month||"";return"number"===typeof t.value?e=String(t.value):"number"===typeof t.id?e=String(t.id):"number"===typeof t.month&&(e=String(t.month)),e},init(){let t={};this.columns.forEach((e=>{if(e.filter)if(["typelist"].includes(e.valueType),["daterange","datetimerange"].includes(e.valueType)&&e.defaultValue)if("daterange"==e.valueType){if(e.vs){var n=new Date(e.defaultValue[0]),r=new Date(e.defaultValue[1]),i=[];while(n<=r){var o=n.toISOString().split("T")[0];i.push(o),n.setDate(n.getDate()+1)}t["day"]=i,e.newkey&&2===e.newkey.length?(t[e.newkey[0]]=e.defaultValue[0],t[e.newkey[1]]=e.defaultValue[1]):(t["start"]=e.defaultValue[0],t["end"]=e.defaultValue[1])}else e.newkey&&2===e.newkey.length?(t[e.newkey[0]]=e.defaultValue[0]+" 00:00:00",t[e.newkey[1]]=e.defaultValue[1]+" 23:59:59"):(t["start"]=e.defaultValue[0]+" 00:00:00",t["end"]=e.defaultValue[1]+" 23:59:59"),t[this.formKey(e)]=[e.defaultValue[0]+" 00:00:00",e.defaultValue[1]+" 23:59:59"];t[this.formKey(e)]=[e.defaultValue[0],e.defaultValue[1]]}else e.newkey&&2===e.newkey.length?(t[e.newkey[0]]=e.defaultValue[0],t[e.newkey[1]]=e.defaultValue[1]):(t["start"]=e.defaultValue[0],t["end"]=e.defaultValue[1]),t[this.formKey(e)]=[e.defaultValue[0],e.defaultValue[1]];else["timerange"].includes(e.valueType)&&e.defaultValue?t["hour"]=e.defaultValue:t[e.key]=e.defaultValue})),console.log(JSON.stringify(t)),this.filterForm=Object.assign({},t)},async getDataSource(t=this.requestParams){if(this.request){console.log(t),this.tableLoading=!0,console.log("getDataSource----",this.filterForm);const e=this.delValueEmptyProperty(this.filterForm),n=await this.request(t,e);this.isClickResetBtn=!1,this.tableData=n.data||[],this.page.total=n.total||0,this.tableLoading=!1}},delValueEmptyProperty(t){for(const e in t)Object.hasOwnProperty.call(t,e)&&(t[e]||delete t[e]);return t},reset(){if(this.page.current=1,this.isClickResetBtn=!0,this.columnsList.forEach((t=>{if(t.sortable&&(t.sortType=""),t.headerConfig&&t.headerConfig.options){const e=this.defaultColumnsList.find((e=>e.key===t.key));e&&e.headerConfig&&(t.headerConfig.options=[...e.headerConfig.options])}})),this.$nextTick((()=>{const t=document.querySelectorAll(".header-options");t.forEach((t=>{t&&this.initSortable(t)}))})),this.$refs.selection&&this.$refs.selection.handleSort)try{this.$refs.selection.handleSort({column:void 0,key:"",order:"normal"})}catch(t){}for(const e in this.filterForm)Object.hasOwnProperty.call(this.filterForm,e)&&(Array.isArray(this.filterForm[e])?this.filterForm[e]=[]:this.filterForm[e]="",this.$refs.element&&this.$refs.element.forEach(((t,e)=>{const n=t.$el||t;"typelist"===n.id?this.$refs.element[e].clearSelect():this.$refs.element[e].handleClear()})));delete this.filterForm.sort,delete this.filterForm.sortOrder,this.page.current=1,this.getDataSource({current:this.page.current,pageSize:this.page.pageSize})},onSelectionChange(t){this.selectionItems=t},onSortChange({column:t,key:e,order:n}){let r="";r=t.ns?t.ns:e,console.log(r),this.filterForm=Object.assign({},this.filterForm,{sort:"normal"!=n?r:"",sortOrder:"normal"!=n?n:""}),this.reload()},onToolBar(t){const e=this.columns.some((t=>"selection"===t.type));if(!e)return this.$emit("onToolBar",t);this.$emit("onToolBar",t,this.selectionItems)},isEmptyFilterForm(){let t=!0;for(const e of Object.values(this.filterForm))if(e){t=!1;break}return t},onFilter(){console.log(this.tableColumns);const t=this.$listeners.onFilter;if(t)return this.$emit("onFilter",this.filterForm);this.page.current=1,this.getDataSource({current:this.page.current,pageSize:this.page.pageSize})},onPageChange(t){this.page.current=t;const{onChange:e}=this.pagination;e&&"function"===typeof e&&e(t)},onPageSizeChange(t){console.log(this.pagination),this.page.pageSize=t;const{onChange:e}=this.pagination;e&&"function"===typeof e&&e(this.page.current)},setSelectionItem(t){this.$refs.selection.selectAll(t)},reload(){this.selectionItems.length>0&&(this.selectionItems.length=0),this.getDataSource()},changeDatePicker(t,e,n={}){this.isClickResetBtn||this.$nextTick((()=>{if("datetimerange"==n.valueType||"daterange"==n.valueType)if("daterange"==n.valueType)if(n.vs)if(t[0]&&t[1]){var r=new Date(t[0]),i=new Date(t[1]),o=[];while(r<=i){var a=r.toISOString().split("T")[0];o.push(a),r.setDate(r.getDate()+1)}1==o.length&&o.push(o[0]);const e=n.newkey&&n.newkey[0]?n.newkey[0]:"start",s=n.newkey&&n.newkey[1]?n.newkey[1]:"end";this.filterForm=Object.assign({},this.filterForm,{day:o,[e]:t[0],[s]:t[1],[this.formKey(n)]:[t[0],t[1]]})}else delete this.filterForm.hour,this.filterForm=Object.assign({},this.filterForm,{day:["",""],start:"",end:"",[this.formKey(n)]:[t[0],t[1]]});else{const e=n.newkey&&n.newkey[0]?n.newkey[0]:"start",r=n.newkey&&n.newkey[1]?n.newkey[1]:"end";this.filterForm=Object.assign({},this.filterForm,{[e]:t[0]?t[0]+" 00:00:00":"",[r]:t[1]?t[1]+" 23:59:59":""}),this.filterForm[this.formKey(n)]=[t[0]?t[0]+" 00:00:00":"",t[1]?t[1]+" 23:59:59":""]}else{const e=n.newkey&&n.newkey[0]?n.newkey[0]:"start",r=n.newkey&&n.newkey[1]?n.newkey[1]:"end";this.filterForm=Object.assign({},this.filterForm,{[e]:t[0],[r]:t[1],[this.formKey(n)]:[t[0],t[1]]})}else this.$set(this.filterForm,e,t)}))},changeTimePicker(t,e,n={}){this.isClickResetBtn||this.$nextTick((()=>{t[0]&&t[1]?"timerange"==n.valueType?this.filterForm=Object.assign({},this.filterForm,{hour:[t[0],t[1]]}):this.$set(this.filterForm,e,t):delete this.filterForm.hour}))},changeInput(t,e,n={}){this.$set(this.filterForm,e,t)},changeSelect(t,e,n={}){this.isClickResetBtn||this.$nextTick((()=>{n.jl?this.$parent.doJlMsg(n,t):this.$set(this.filterForm,e,t)}))},sortAndFilterColumns(t,e,n=!0){const r=t.filter((t=>e.includes(t.title)||n&&"操作"===t.title||n&&"selection"===t.type)),i=r.filter((t=>"selection"===t.type)),o=e.map((t=>r.find((e=>e.title===t)))).filter((t=>t&&"selection"!==t.type));if(n){const t=r.find((t=>"操作"===t.title));t&&o.push(t)}const a=[...i,...o];return a},handleGetUserQueryView(){let t="";(this.customPath||this.$route&&this.$route.path)&&(t=(this.customPath||this.$route.path).replace(/^\/?/,""));let e={tag:t+"tableSetView",project_id:JSON.parse(localStorage.getItem("selectedProject")).id,simp_token:s()};Tn(e).then((t=>{let e=t.data;200==e.code?(console.log("tableSetView-----",e),this.viewList=e.data,this.viewListP=fr().cloneDeep(this.viewList)):this.$Message.error(e.msg)}))},getPerson(){let t={project_id:JSON.parse(localStorage.getItem("selectedProject")).id,simp_token:s(),rows:3e3,page:1,work:1};Fn(t).then((t=>{let e=t.data;200==e.code?this.personList=e.data.rows:this.$Message.error(e.msg)}))},handleGetUserQuery(){let t="";(this.customPath||this.$route&&this.$route.path)&&(t=(this.customPath||this.$route.path).replace(/^\/?/,""));let e={tag:t+"tableSet",project_id:JSON.parse(localStorage.getItem("selectedProject")).id,simp_token:s()};this.tableLoading=!0,Tn(e).then((t=>{let e=t.data;if(200==e.code){let t="";if(t=Array.isArray(e.data)&&e.data.length>0?e.data[0]:"",t){t.content=JSON.parse(t.content);let{checkColumnData:e,freeze:n}=t.content;this.columnSettingId=t.id,this.columnSettingObj=t.content,console.log(this.columns);let r=this.sortAndFilterColumns(fr().cloneDeep(this.columns),e);console.log("columnsList---getUserQuery",r);let i=r[0]&&"selection"==r[0].type?n+1:n;r.forEach(((t,e)=>{"操作"==t.title?t.fixed="right":e<i?t.fixed="left":delete t.fixed})),console.log("columnsList----",r),this.columnsList=r}}else this.$Message.error(e.msg)})).finally((()=>{this.reload()}))},changeTypelist(t,e,n={}){t=t[t.length-1],this.isClickResetBtn||this.$nextTick((()=>{n.jl?this.$parent.doJlMsg(n,t):this.$set(this.filterForm,e,t)}))},choosePerson(t){this.filterForm[this.formKey(t)]||this.$set(this.filterForm,this.formKey(t),[]),this.all_names||(this.all_names=[]);const e=new Set(this.filterForm[this.formKey(t)]||[]),n=this.all_names.filter((t=>e.has(t.id)));this.all_names=n;const r=new Set(this.all_names.map((t=>t.id))),i=(this.filterForm[this.formKey(t)]||[]).filter((t=>!r.has(t)));i.length>0&&i.forEach(((t,e)=>{this.personList.forEach(((e,n)=>{if(e.id==t){let n={id:t,name:e.name,app_avatar:e.app_avatar,type:"user",avatar:e.avatar,count:0,selected:!0};this.all_names.push(n)}}))})),console.log(i,"missingIds"),this.initShow=!0,this.currentFilterItem=t,this.$nextTick((()=>{this.$refs.orgPicker.initShow=!0,this.$refs.orgPicker.show()}))},selected(t){console.log("选择的人",t),this.person_ids=[],this.personObj=[];let e=[],n=[];if(t.length>0&&t.forEach((t=>{this.person_ids.push(t.id),e.push(t.name)})),this.names=e.join("、"),this.all_names=t,this.currentFilterItem&&(this.filterForm[this.formKey(this.currentFilterItem)]=this.person_ids),e.length>0){let t={departName:"人员",names:e};this.personObj.push(t)}if(n.length>0){let t={departName:"部门",names:n};this.personObj.push(t)}},handleHeaderSelect(t,e){this.$emit("on-header-select",{option:t,column:e})},initSortable(t){t&&(t._sortable&&t._sortable.destroy(),t._sortable=new ia(t,{animation:150,handle:".drag-handle",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",forceFallback:!0,fallbackClass:"sortable-fallback",onEnd:e=>{const{oldIndex:n,newIndex:r}=e,i=Array.from(t.children).map((t=>({value:t.getAttribute("data-value"),label:t.textContent.trim(),keyValue:t.getAttribute("data-key")})));console.log("options---",i),console.log("columnsList---",this.columnsList);const o=this.columnsList.find((t=>t.headerConfig&&t.as==i[0].keyValue||t.headerConfig&&t.key==i[0].keyValue));if(console.log(o,"column----"),o){const t=[...i];this.$set(o.headerConfig,"options",[]),this.$nextTick((()=>{this.$set(o.headerConfig,"options",t)}))}console.log({oldIndex:n,newIndex:r,options:i,column:o});let a=[];console.log(i),i.forEach((t=>{a.push(t.value)})),this.filterForm.sortOrder=a.join(","),this.reload(),this.$emit("on-header-sort",{oldIndex:n,newIndex:r,options:i,column:o})}}))}},created(){this.init()},mounted(){this.handleGetUserQueryView(),this.handleGetUserQuery(),this.getPerson(),window.$wujie&&window.$wujie.bus.$on("window-resize",(()=>{this.$nextTick((()=>{this.$refs.selection&&this.$refs.selection.handleResize()}))}))}},aa=oa,sa=tr(aa,o,a,!1,null,"7057ef90",null),la=sa.exports;const ua=[la],ca=function(t){ua.forEach((e=>{t.component(e.name,e)}))};"undefined"!==typeof window&&window.Vue&&ca(window.Vue);var fa={install:ca},ha=fa}(),r}()}));
|
|
17
17
|
//# sourceMappingURL=cj_iview_table.umd.min.js.map
|