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