/**! * Sortable 1.15.3 * @author RubaXa * @author owenm * @license MIT */function se(o,t){var e=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(o,i).enumerable})),e.push.apply(e,n)}return e}function j(o){for(var t=1;t=0)&&(e[i]=o[i]);return e}function Xe(o,t){if(o==null)return{};var e=Re(o,t),n,i;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(o,n)&&(e[n]=o[n])}return e}var Ye="1.15.3";function V(o){if(typeof window!="undefined"&&window.navigator)return!!navigator.userAgent.match(o)}var K=V(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ot=V(/Edge/i),ue=V(/firefox/i),St=V(/safari/i)&&!V(/chrome/i)&&!V(/android/i),ve=V(/iP(ad|od|hone)/i),be=V(/chrome/i)&&V(/android/i),we={capture:!1,passive:!1};function w(o,t,e){o.addEventListener(t,e,!K&&we)}function b(o,t,e){o.removeEventListener(t,e,!K&&we)}function Bt(o,t){if(t){if(t[0]===">"&&(t=t.substring(1)),o)try{if(o.matches)return o.matches(t);if(o.msMatchesSelector)return o.msMatchesSelector(t);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function Ee(o){return o.host&&o!==document&&o.host.nodeType?o.host:o.parentNode}function G(o,t,e,n){if(o){e=e||document;do{if(t!=null&&(t[0]===">"?o.parentNode===e&&Bt(o,t):Bt(o,t))||n&&o===e)return o;if(o===e)break}while(o=Ee(o))}return null}var fe=/\s+/g;function A(o,t,e){if(o&&t)if(o.classList)o.classList[e?"add":"remove"](t);else{var n=(" "+o.className+" ").replace(fe," ").replace(" "+t+" "," ");o.className=(n+(e?" "+t:"")).replace(fe," ")}}function h(o,t,e){var n=o&&o.style;if(n){if(e===void 0)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(o,""):o.currentStyle&&(e=o.currentStyle),t===void 0?e:e[t];!(t in n)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),n[t]=e+(typeof e=="string"?"":"px")}}function dt(o,t){var e="";if(typeof o=="string")e=o;else do{var n=h(o,"transform");n&&n!=="none"&&(e=n+" "+e)}while(!t&&(o=o.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(e)}function ye(o,t,e){if(o){var n=o.getElementsByTagName(t),i=0,r=n.length;if(e)for(;i=r,!a)return n;if(n===z())break;n=et(n,!1)}return!1}function ht(o,t,e,n){for(var i=0,r=0,a=o.children;r2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,r=Xe(n,je);It.pluginEvent.bind(p)(t,e,j({dragEl:f,parentEl:_,ghostEl:g,rootEl:S,nextEl:lt,lastDownEl:Rt,cloneEl:D,cloneHidden:tt,dragStarted:wt,putSortable:O,activeSortable:p.active,originalEvent:i,oldIndex:ct,oldDraggableIndex:_t,newIndex:Y,newDraggableIndex:J,hideGhostForTarget:Ae,unhideGhostForTarget:Pe,cloneNowHidden:function(){tt=!0},cloneNowShown:function(){tt=!1},dispatchSortableEvent:function(l){N({sortable:e,name:l,originalEvent:i})}},r))};function N(o){ze(j({putSortable:O,cloneEl:D,targetEl:f,rootEl:S,oldIndex:ct,oldDraggableIndex:_t,newIndex:Y,newDraggableIndex:J},o))}var f,_,g,S,lt,Rt,D,tt,ct,Y,_t,J,Pt,O,ft=!1,Ht=!1,Wt=[],rt,W,qt,Ut,he,pe,wt,ut,Tt,Ct=!1,Nt=!1,Xt,I,Vt=[],te=!1,Gt=[],zt=typeof document!="undefined",xt=ve,ge=Ot||K?"cssFloat":"float",$e=zt&&!be&&!ve&&"draggable"in document.createElement("div"),Ce=function(){if(zt){if(K)return!1;var o=document.createElement("x");return o.style.cssText="pointer-events:auto",o.style.pointerEvents==="auto"}}(),Oe=function(t,e){var n=h(t),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=ht(t,0,e),a=ht(t,1,e),l=r&&h(r),s=a&&h(a),u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+C(r).width,d=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+C(a).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&l.float&&l.float!=="none"){var c=l.float==="left"?"left":"right";return a&&(s.clear==="both"||s.clear===c)?"vertical":"horizontal"}return r&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||u>=i&&n[ge]==="none"||a&&n[ge]==="none"&&u+d>i)?"vertical":"horizontal"},qe=function(t,e,n){var i=n?t.left:t.top,r=n?t.right:t.bottom,a=n?t.width:t.height,l=n?e.left:e.top,s=n?e.right:e.bottom,u=n?e.width:e.height;return i===l||r===s||i+a/2===l+u/2},Ue=function(t,e){var n;return Wt.some(function(i){var r=i[F].options.emptyInsertThreshold;if(!(!r||ie(i))){var a=C(i),l=t>=a.left-r&&t<=a.right+r,s=e>=a.top-r&&e<=a.bottom+r;if(l&&s)return n=i}}),n},Ie=function(t){function e(r,a){return function(l,s,u,d){var c=l.options.group.name&&s.options.group.name&&l.options.group.name===s.options.group.name;if(r==null&&(a||c))return!0;if(r==null||r===!1)return!1;if(a&&r==="clone")return r;if(typeof r=="function")return e(r(l,s,u,d),a)(l,s,u,d);var m=(a?l:s).options.group.name;return r===!0||typeof r=="string"&&r===m||r.join&&r.indexOf(m)>-1}}var n={},i=t.group;(!i||Ft(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=e(i.pull,!0),n.checkPut=e(i.put),n.revertClone=i.revertClone,t.group=n},Ae=function(){!Ce&&g&&h(g,"display","none")},Pe=function(){!Ce&&g&&h(g,"display","")};zt&&!be&&document.addEventListener("click",function(o){if(Ht)return o.preventDefault(),o.stopPropagation&&o.stopPropagation(),o.stopImmediatePropagation&&o.stopImmediatePropagation(),Ht=!1,!1},!0);var at=function(t){if(f){t=t.touches?t.touches[0]:t;var e=Ue(t.clientX,t.clientY);if(e){var n={};for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[F]._onDragOver(n)}}},Ve=function(t){f&&f.parentNode[F]._isOutsideThisEl(t.target)};function p(o,t){if(!(o&&o.nodeType&&o.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));this.el=o,this.options=t=$({},t),o[F]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(o.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Oe(o,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,l){a.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:p.supportPointer!==!1&&"PointerEvent"in window&&!St,emptyInsertThreshold:5};It.initializePlugins(this,o,e);for(var n in e)!(n in t)&&(t[n]=e[n]);Ie(t);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=t.forceFallback?!1:$e,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?w(o,"pointerdown",this._onTapStart):(w(o,"mousedown",this._onTapStart),w(o,"touchstart",this._onTapStart)),this.nativeDraggable&&(w(o,"dragover",this),w(o,"dragenter",this)),Wt.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),$(this,We())}p.prototype={constructor:p,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(ut=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,f):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,i=this.options,r=i.preventOnFilter,a=t.type,l=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,s=(l||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,d=i.filter;if(on(n),!f&&!(/mousedown|pointerdown/.test(a)&&t.button!==0||i.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&St&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=G(s,i.draggable,n,!1),!(s&&s.animated)&&Rt!==s)){if(ct=M(s),_t=M(s,i.draggable),typeof d=="function"){if(d.call(this,t,s,this)){N({sortable:e,rootEl:u,name:"filter",targetEl:s,toEl:n,fromEl:n}),x("filter",e,{evt:t}),r&&t.cancelable&&t.preventDefault();return}}else if(d&&(d=d.split(",").some(function(c){if(c=G(u,c.trim(),n,!1),c)return N({sortable:e,rootEl:c,name:"filter",targetEl:s,fromEl:n,toEl:n}),x("filter",e,{evt:t}),!0}),d)){r&&t.cancelable&&t.preventDefault();return}i.handle&&!G(u,i.handle,n,!1)||this._prepareDragStart(t,l,s)}}},_prepareDragStart:function(t,e,n){var i=this,r=i.el,a=i.options,l=r.ownerDocument,s;if(n&&!f&&n.parentNode===r){var u=C(n);if(S=r,f=n,_=f.parentNode,lt=f.nextSibling,Rt=n,Pt=a.group,p.dragged=f,rt={target:f,clientX:(e||t).clientX,clientY:(e||t).clientY},he=rt.clientX-u.left,pe=rt.clientY-u.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,f.style["will-change"]="all",s=function(){if(x("delayEnded",i,{evt:t}),p.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!ue&&i.nativeDraggable&&(f.draggable=!0),i._triggerDragStart(t,e),N({sortable:i,name:"choose",originalEvent:t}),A(f,a.chosenClass,!0)},a.ignore.split(",").forEach(function(d){ye(f,d.trim(),Kt)}),w(l,"dragover",at),w(l,"mousemove",at),w(l,"touchmove",at),w(l,"mouseup",i._onDrop),w(l,"touchend",i._onDrop),w(l,"touchcancel",i._onDrop),ue&&this.nativeDraggable&&(this.options.touchStartThreshold=4,f.draggable=!0),x("delayStart",this,{evt:t}),a.delay&&(!a.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(Ot||K))){if(p.eventCanceled){this._onDrop();return}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(s,a.delay)}else s()}},_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(){f&&Kt(f),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;b(t,"mouseup",this._disableDelayedDrag),b(t,"touchend",this._disableDelayedDrag),b(t,"touchcancel",this._disableDelayedDrag),b(t,"mousemove",this._delayedDragTouchMoveHandler),b(t,"touchmove",this._delayedDragTouchMoveHandler),b(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?w(document,"pointermove",this._onTouchMove):e?w(document,"touchmove",this._onTouchMove):w(document,"mousemove",this._onTouchMove):(w(f,"dragend",this),w(S,"dragstart",this._onDragStart));try{document.selection?Yt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if(ft=!1,S&&f){x("dragStarted",this,{evt:e}),this.nativeDraggable&&w(document,"dragover",Ve);var n=this.options;!t&&A(f,n.dragClass,!1),A(f,n.ghostClass,!0),p.active=this,t&&this._appendGhost(),N({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(W){this._lastX=W.clientX,this._lastY=W.clientY,Ae();for(var t=document.elementFromPoint(W.clientX,W.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(W.clientX,W.clientY),t!==e);)e=t;if(f.parentNode[F]._isOutsideThisEl(t),e)do{if(e[F]){var n=void 0;if(n=e[F]._onDragOver({clientX:W.clientX,clientY:W.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=Ee(e));Pe()}},_onTouchMove:function(t){if(rt){var e=this.options,n=e.fallbackTolerance,i=e.fallbackOffset,r=t.touches?t.touches[0]:t,a=g&&dt(g,!0),l=g&&a&&a.a,s=g&&a&&a.d,u=xt&&I&&de(I),d=(r.clientX-rt.clientX+i.x)/(l||1)+(u?u[0]-Vt[0]:0)/(l||1),c=(r.clientY-rt.clientY+i.y)/(s||1)+(u?u[1]-Vt[1]:0)/(s||1);if(!p.active&&!ft){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))=0&&(N({rootEl:_,name:"add",toEl:_,fromEl:S,originalEvent:t}),N({sortable:this,name:"remove",toEl:_,originalEvent:t}),N({rootEl:_,name:"sort",toEl:_,fromEl:S,originalEvent:t}),N({sortable:this,name:"sort",toEl:_,originalEvent:t})),O&&O.save()):Y!==ct&&Y>=0&&(N({sortable:this,name:"update",toEl:_,originalEvent:t}),N({sortable:this,name:"sort",toEl:_,originalEvent:t})),p.active&&((Y==null||Y===-1)&&(Y=ct,J=_t),N({sortable:this,name:"end",toEl:_,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){x("nulling",this),S=f=_=g=lt=D=Rt=tt=rt=W=wt=Y=J=ct=_t=ut=Tt=O=Pt=p.dragged=p.ghost=p.clone=p.active=null,Gt.forEach(function(t){t.checked=!0}),Gt.length=qt=Ut=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":f&&(this._onDragOver(t),Ke(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,n=this.el.children,i=0,r=n.length,a=this.options;ii.right+r||o.clientY>n.bottom&&o.clientX>n.left:o.clientY>i.bottom+r||o.clientX>n.right&&o.clientY>n.top}function tn(o,t,e,n,i,r,a,l){var s=n?o.clientY:o.clientX,u=n?e.height:e.width,d=n?e.top:e.left,c=n?e.bottom:e.right,m=!1;if(!a){if(l&&Xtd+u*r/2:sc-Xt)return-Tt}else if(s>d+u*(1-i)/2&&sc-u*r/2)?s>d+u/2?1:-1:0}function en(o){return M(f)