harvester-ui-extension/extensions/harvester/1.0.0/plugin/harvester-1.0.0.umd.min.52.js
Francesco Torchia 1cb57b8998
build
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
2024-11-13 11:30:25 +01:00

9 lines
38 KiB
JavaScript

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