cloudstudio
Version:
Run VS Code on a remote server.
7 lines • 62.4 kB
JavaScript
(()=>{"use strict";var ro={};/**!
* Sortable 1.15.0
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/function Ot(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable})),t.push.apply(t,n)}return t}function ee(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ot(Object(t),!0).forEach(function(n){sn(o,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):Ot(Object(t)).forEach(function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(t,n))})}return o}function qe(o){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qe=function(e){return typeof e}:qe=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qe(o)}function sn(o,e,t){return e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function W(){return W=Object.assign||function(o){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(o[n]=t[n])}return o},W.apply(this,arguments)}function ln(o,e){if(o==null)return{};var t={},n=Object.keys(o),r,i;for(i=0;i<n.length;i++)r=n[i],!(e.indexOf(r)>=0)&&(t[r]=o[r]);return t}function cn(o,e){if(o==null)return{};var t=ln(o,e),n,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(o);for(r=0;r<i.length;r++)n=i[r],!(e.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(o,n)||(t[n]=o[n]))}return t}function dn(o){return un(o)||fn(o)||hn(o)||pn()}function un(o){if(Array.isArray(o))return ft(o)}function fn(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}function hn(o,e){if(!!o){if(typeof o=="string")return ft(o,e);var t=Object.prototype.toString.call(o).slice(8,-1);if(t==="Object"&&o.constructor&&(t=o.constructor.name),t==="Map"||t==="Set")return Array.from(o);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ft(o,e)}}function ft(o,e){(e==null||e>o.length)&&(e=o.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=o[t];return n}function pn(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var gn="1.15.0";function re(o){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(o)}var ie=re(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Pe=re(/Edge/i),Nt=re(/firefox/i),_e=re(/safari/i)&&!re(/chrome/i)&&!re(/android/i),Mt=re(/iP(ad|od|hone)/i),$t=re(/chrome/i)&&re(/android/i),Bt={capture:!1,passive:!1};function C(o,e,t){o.addEventListener(e,t,!ie&&Bt)}function E(o,e,t){o.removeEventListener(e,t,!ie&&Bt)}function Ye(o,e){if(!!e){if(e[0]===">"&&(e=e.substring(1)),o)try{if(o.matches)return o.matches(e);if(o.msMatchesSelector)return o.msMatchesSelector(e);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(e)}catch{return!1}return!1}}function mn(o){return o.host&&o!==document&&o.host.nodeType?o.host:o.parentNode}function U(o,e,t,n){if(o){t=t||document;do{if(e!=null&&(e[0]===">"?o.parentNode===t&&Ye(o,e):Ye(o,e))||n&&o===t)return o;if(o===t)break}while(o=mn(o))}return null}var Rt=/\s+/g;function T(o,e,t){if(o&&e)if(o.classList)o.classList[t?"add":"remove"](e);else{var n=(" "+o.className+" ").replace(Rt," ").replace(" "+e+" "," ");o.className=(n+(t?" "+e:"")).replace(Rt," ")}}function p(o,e,t){var n=o&&o.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(o,""):o.currentStyle&&(t=o.currentStyle),e===void 0?t:t[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=t+(typeof t=="string"?"":"px")}}function fe(o,e){var t="";if(typeof o=="string")t=o;else do{var n=p(o,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!e&&(o=o.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(t)}function Lt(o,e,t){if(o){var n=o.getElementsByTagName(e),r=0,i=n.length;if(t)for(;r<i;r++)t(n[r],r);return n}return[]}function te(){var o=document.scrollingElement;return o||document.documentElement}function P(o,e,t,n,r){if(!(!o.getBoundingClientRect&&o!==window)){var i,a,s,c,l,d,u;if(o!==window&&o.parentNode&&o!==te()?(i=o.getBoundingClientRect(),a=i.top,s=i.left,c=i.bottom,l=i.right,d=i.height,u=i.width):(a=0,s=0,c=window.innerHeight,l=window.innerWidth,d=window.innerHeight,u=window.innerWidth),(e||t)&&o!==window&&(r=r||o.parentNode,!ie))do if(r&&r.getBoundingClientRect&&(p(r,"transform")!=="none"||t&&p(r,"position")!=="static")){var h=r.getBoundingClientRect();a-=h.top+parseInt(p(r,"border-top-width")),s-=h.left+parseInt(p(r,"border-left-width")),c=a+i.height,l=s+i.width;break}while(r=r.parentNode);if(n&&o!==window){var v=fe(r||o),g=v&&v.a,b=v&&v.d;v&&(a/=b,s/=g,u/=g,d/=b,c=a+d,l=s+u)}return{top:a,left:s,bottom:c,right:l,width:u,height:d}}}function Ft(o,e,t){for(var n=se(o,!0),r=P(o)[e];n;){var i=P(n)[t],a=void 0;if(t==="top"||t==="left"?a=r>=i:a=r<=i,!a)return n;if(n===te())break;n=se(n,!1)}return!1}function ye(o,e,t,n){for(var r=0,i=0,a=o.children;i<a.length;){if(a[i].style.display!=="none"&&a[i]!==m.ghost&&(n||a[i]!==m.dragged)&&U(a[i],t.draggable,o,!1)){if(r===e)return a[i];r++}i++}return null}function ht(o,e){for(var t=o.lastElementChild;t&&(t===m.ghost||p(t,"display")==="none"||e&&!Ye(t,e));)t=t.previousElementSibling;return t||null}function A(o,e){var t=0;if(!o||!o.parentNode)return-1;for(;o=o.previousElementSibling;)o.nodeName.toUpperCase()!=="TEMPLATE"&&o!==m.clone&&(!e||Ye(o,e))&&t++;return t}function Ht(o){var e=0,t=0,n=te();if(o)do{var r=fe(o),i=r.a,a=r.d;e+=o.scrollLeft*i,t+=o.scrollTop*a}while(o!==n&&(o=o.parentNode));return[e,t]}function vn(o,e){for(var t in o)if(!!o.hasOwnProperty(t)){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===o[t][n])return Number(t)}return-1}function se(o,e){if(!o||!o.getBoundingClientRect)return te();var t=o,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var r=p(t);if(t.clientWidth<t.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return te();if(n||e)return t;n=!0}}while(t=t.parentNode);return te()}function bn(o,e){if(o&&e)for(var t in e)e.hasOwnProperty(t)&&(o[t]=e[t]);return o}function pt(o,e){return Math.round(o.top)===Math.round(e.top)&&Math.round(o.left)===Math.round(e.left)&&Math.round(o.height)===Math.round(e.height)&&Math.round(o.width)===Math.round(e.width)}var Te;function Kt(o,e){return function(){if(!Te){var t=arguments,n=this;t.length===1?o.call(n,t[0]):o.apply(n,t),Te=setTimeout(function(){Te=void 0},e)}}}function yn(){clearTimeout(Te),Te=void 0}function Vt(o,e,t){o.scrollLeft+=e,o.scrollTop+=t}function gt(o){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(o).cloneNode(!0):t?t(o).clone(!0)[0]:o.cloneNode(!0)}function Xt(o,e){p(o,"position","absolute"),p(o,"top",e.top),p(o,"left",e.left),p(o,"width",e.width),p(o,"height",e.height)}function mt(o){p(o,"position",""),p(o,"top",""),p(o,"left",""),p(o,"width",""),p(o,"height","")}var $="Sortable"+new Date().getTime();function wn(){var o=[],e;return{captureAnimationState:function(){if(o=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(r){if(!(p(r,"display")==="none"||r===m.ghost)){o.push({target:r,rect:P(r)});var i=ee({},o[o.length-1].rect);if(r.thisAnimationDuration){var a=fe(r,!0);a&&(i.top-=a.f,i.left-=a.e)}r.fromRect=i}})}},addAnimationState:function(n){o.push(n)},removeAnimationState:function(n){o.splice(vn(o,{target:n}),1)},animateAll:function(n){var r=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var i=!1,a=0;o.forEach(function(s){var c=0,l=s.target,d=l.fromRect,u=P(l),h=l.prevFromRect,v=l.prevToRect,g=s.rect,b=fe(l,!0);b&&(u.top-=b.f,u.left-=b.e),l.toRect=u,l.thisAnimationDuration&&pt(h,u)&&!pt(d,u)&&(g.top-u.top)/(g.left-u.left)===(d.top-u.top)/(d.left-u.left)&&(c=Cn(g,h,v,r.options)),pt(u,d)||(l.prevFromRect=d,l.prevToRect=u,c||(c=r.options.animation),r.animate(l,g,u,c)),c&&(i=!0,a=Math.max(a,c),clearTimeout(l.animationResetTimer),l.animationResetTimer=setTimeout(function(){l.animationTime=0,l.prevFromRect=null,l.fromRect=null,l.prevToRect=null,l.thisAnimationDuration=null},c),l.thisAnimationDuration=c)}),clearTimeout(e),i?e=setTimeout(function(){typeof n=="function"&&n()},a):typeof n=="function"&&n(),o=[]},animate:function(n,r,i,a){if(a){p(n,"transition",""),p(n,"transform","");var s=fe(this.el),c=s&&s.a,l=s&&s.d,d=(r.left-i.left)/(c||1),u=(r.top-i.top)/(l||1);n.animatingX=!!d,n.animatingY=!!u,p(n,"transform","translate3d("+d+"px,"+u+"px,0)"),this.forRepaintDummy=En(n),p(n,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),p(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){p(n,"transition",""),p(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},a)}}}}function En(o){return o.offsetWidth}function Cn(o,e,t,n){return Math.sqrt(Math.pow(e.top-o.top,2)+Math.pow(e.left-o.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*n.animation}var we=[],vt={initializeByDefault:!0},Ie={mount:function(e){for(var t in vt)vt.hasOwnProperty(t)&&!(t in e)&&(e[t]=vt[t]);we.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),we.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var i=e+"Global";we.forEach(function(a){!t[a.pluginName]||(t[a.pluginName][i]&&t[a.pluginName][i](ee({sortable:t},n)),t.options[a.pluginName]&&t[a.pluginName][e]&&t[a.pluginName][e](ee({sortable:t},n)))})},initializePlugins:function(e,t,n,r){we.forEach(function(s){var c=s.pluginName;if(!(!e.options[c]&&!s.initializeByDefault)){var l=new s(e,t,e.options);l.sortable=e,l.options=e.options,e[c]=l,W(n,l.defaults)}});for(var i in e.options)if(!!e.options.hasOwnProperty(i)){var a=this.modifyOption(e,i,e.options[i]);typeof a<"u"&&(e.options[i]=a)}},getEventProperties:function(e,t){var n={};return we.forEach(function(r){typeof r.eventProperties=="function"&&W(n,r.eventProperties.call(t[r.pluginName],e))}),n},modifyOption:function(e,t,n){var r;return we.forEach(function(i){!e[i.pluginName]||i.optionListeners&&typeof i.optionListeners[t]=="function"&&(r=i.optionListeners[t].call(e[i.pluginName],n))}),r}};function ke(o){var e=o.sortable,t=o.rootEl,n=o.name,r=o.targetEl,i=o.cloneEl,a=o.toEl,s=o.fromEl,c=o.oldIndex,l=o.newIndex,d=o.oldDraggableIndex,u=o.newDraggableIndex,h=o.originalEvent,v=o.putSortable,g=o.extraEventProperties;if(e=e||t&&t[$],!!e){var b,k=e.options,j="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!ie&&!Pe?b=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(b=document.createEvent("Event"),b.initEvent(n,!0,!0)),b.to=a||t,b.from=s||t,b.item=r||t,b.clone=i,b.oldIndex=c,b.newIndex=l,b.oldDraggableIndex=d,b.newDraggableIndex=u,b.originalEvent=h,b.pullMode=v?v.lastPutMode:void 0;var N=ee(ee({},g),Ie.getEventProperties(n,e));for(var V in N)b[V]=N[V];t&&t.dispatchEvent(b),k[j]&&k[j].call(e,b)}}var Sn=["evt"],H=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.evt,i=cn(n,Sn);Ie.pluginEvent.bind(m)(e,t,ee({dragEl:f,parentEl:x,ghostEl:w,rootEl:_,nextEl:he,lastDownEl:We,cloneEl:I,cloneHidden:le,dragStarted:xe,putSortable:M,activeSortable:m.active,originalEvent:r,oldIndex:Ee,oldDraggableIndex:Ae,newIndex:X,newDraggableIndex:ce,hideGhostForTarget:Ut,unhideGhostForTarget:Jt,cloneNowHidden:function(){le=!0},cloneNowShown:function(){le=!1},dispatchSortableEvent:function(s){L({sortable:t,name:s,originalEvent:r})}},i))};function L(o){ke(ee({putSortable:M,cloneEl:I,targetEl:f,rootEl:_,oldIndex:Ee,oldDraggableIndex:Ae,newIndex:X,newDraggableIndex:ce},o))}var f,x,w,_,he,We,I,le,Ee,X,Ae,ce,Ge,M,Ce=!1,ze=!1,je=[],pe,J,bt,yt,qt,Yt,xe,Se,Oe,Ne=!1,Ue=!1,Je,B,wt=[],Et=!1,Ze=[],Qe=typeof document<"u",et=Mt,Wt=Pe||ie?"cssFloat":"float",Dn=Qe&&!$t&&!Mt&&"draggable"in document.createElement("div"),Gt=function(){if(!!Qe){if(ie)return!1;var o=document.createElement("x");return o.style.cssText="pointer-events:auto",o.style.pointerEvents==="auto"}}(),zt=function(e,t){var n=p(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=ye(e,0,t),a=ye(e,1,t),s=i&&p(i),c=a&&p(a),l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+P(i).width,d=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+P(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(i&&s.float&&s.float!=="none"){var u=s.float==="left"?"left":"right";return a&&(c.clear==="both"||c.clear===u)?"vertical":"horizontal"}return i&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||l>=r&&n[Wt]==="none"||a&&n[Wt]==="none"&&l+d>r)?"vertical":"horizontal"},Pn=function(e,t,n){var r=n?e.left:e.top,i=n?e.right:e.bottom,a=n?e.width:e.height,s=n?t.left:t.top,c=n?t.right:t.bottom,l=n?t.width:t.height;return r===s||i===c||r+a/2===s+l/2},_n=function(e,t){var n;return je.some(function(r){var i=r[$].options.emptyInsertThreshold;if(!(!i||ht(r))){var a=P(r),s=e>=a.left-i&&e<=a.right+i,c=t>=a.top-i&&t<=a.bottom+i;if(s&&c)return n=r}}),n},jt=function(e){function t(i,a){return function(s,c,l,d){var u=s.options.group.name&&c.options.group.name&&s.options.group.name===c.options.group.name;if(i==null&&(a||u))return!0;if(i==null||i===!1)return!1;if(a&&i==="clone")return i;if(typeof i=="function")return t(i(s,c,l,d),a)(s,c,l,d);var h=(a?s:c).options.group.name;return i===!0||typeof i=="string"&&i===h||i.join&&i.indexOf(h)>-1}}var n={},r=e.group;(!r||qe(r)!="object")&&(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},Ut=function(){!Gt&&w&&p(w,"display","none")},Jt=function(){!Gt&&w&&p(w,"display","")};Qe&&!$t&&document.addEventListener("click",function(o){if(ze)return o.preventDefault(),o.stopPropagation&&o.stopPropagation(),o.stopImmediatePropagation&&o.stopImmediatePropagation(),ze=!1,!1},!0);var ge=function(e){if(f){e=e.touches?e.touches[0]:e;var t=_n(e.clientX,e.clientY);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[$]._onDragOver(n)}}},Tn=function(e){f&&f.parentNode[$]._isOutsideThisEl(e.target)};function m(o,e){if(!(o&&o.nodeType&&o.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));this.el=o,this.options=e=W({},e),o[$]=this;var t={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 zt(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,s){a.setData("Text",s.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:m.supportPointer!==!1&&"PointerEvent"in window&&!_e,emptyInsertThreshold:5};Ie.initializePlugins(this,o,t);for(var n in t)!(n in e)&&(e[n]=t[n]);jt(e);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=e.forceFallback?!1:Dn,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?C(o,"pointerdown",this._onTapStart):(C(o,"mousedown",this._onTapStart),C(o,"touchstart",this._onTapStart)),this.nativeDraggable&&(C(o,"dragover",this),C(o,"dragenter",this)),je.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),W(this,wn())}m.prototype={constructor:m,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Se=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,f):this.options.direction},_onTapStart:function(e){if(!!e.cancelable){var t=this,n=this.el,r=this.options,i=r.preventOnFilter,a=e.type,s=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,c=(s||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||c,d=r.filter;if($n(n),!f&&!(/mousedown|pointerdown/.test(a)&&e.button!==0||r.disabled)&&!l.isContentEditable&&!(!this.nativeDraggable&&_e&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=U(c,r.draggable,n,!1),!(c&&c.animated)&&We!==c)){if(Ee=A(c),Ae=A(c,r.draggable),typeof d=="function"){if(d.call(this,e,c,this)){L({sortable:t,rootEl:l,name:"filter",targetEl:c,toEl:n,fromEl:n}),H("filter",t,{evt:e}),i&&e.cancelable&&e.preventDefault();return}}else if(d&&(d=d.split(",").some(function(u){if(u=U(l,u.trim(),n,!1),u)return L({sortable:t,rootEl:u,name:"filter",targetEl:c,fromEl:n,toEl:n}),H("filter",t,{evt:e}),!0}),d)){i&&e.cancelable&&e.preventDefault();return}r.handle&&!U(l,r.handle,n,!1)||this._prepareDragStart(e,s,c)}}},_prepareDragStart:function(e,t,n){var r=this,i=r.el,a=r.options,s=i.ownerDocument,c;if(n&&!f&&n.parentNode===i){var l=P(n);if(_=i,f=n,x=f.parentNode,he=f.nextSibling,We=n,Ge=a.group,m.dragged=f,pe={target:f,clientX:(t||e).clientX,clientY:(t||e).clientY},qt=pe.clientX-l.left,Yt=pe.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,f.style["will-change"]="all",c=function(){if(H("delayEnded",r,{evt:e}),m.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!Nt&&r.nativeDraggable&&(f.draggable=!0),r._triggerDragStart(e,t),L({sortable:r,name:"choose",originalEvent:e}),T(f,a.chosenClass,!0)},a.ignore.split(",").forEach(function(d){Lt(f,d.trim(),Ct)}),C(s,"dragover",ge),C(s,"mousemove",ge),C(s,"touchmove",ge),C(s,"mouseup",r._onDrop),C(s,"touchend",r._onDrop),C(s,"touchcancel",r._onDrop),Nt&&this.nativeDraggable&&(this.options.touchStartThreshold=4,f.draggable=!0),H("delayStart",this,{evt:e}),a.delay&&(!a.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Pe||ie))){if(m.eventCanceled){this._onDrop();return}C(s,"mouseup",r._disableDelayedDrag),C(s,"touchend",r._disableDelayedDrag),C(s,"touchcancel",r._disableDelayedDrag),C(s,"mousemove",r._delayedDragTouchMoveHandler),C(s,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&C(s,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(c,a.delay)}else c()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){f&&Ct(f),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;E(e,"mouseup",this._disableDelayedDrag),E(e,"touchend",this._disableDelayedDrag),E(e,"touchcancel",this._disableDelayedDrag),E(e,"mousemove",this._delayedDragTouchMoveHandler),E(e,"touchmove",this._delayedDragTouchMoveHandler),E(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?C(document,"pointermove",this._onTouchMove):t?C(document,"touchmove",this._onTouchMove):C(document,"mousemove",this._onTouchMove):(C(f,"dragend",this),C(_,"dragstart",this._onDragStart));try{document.selection?nt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Ce=!1,_&&f){H("dragStarted",this,{evt:t}),this.nativeDraggable&&C(document,"dragover",Tn);var n=this.options;!e&&T(f,n.dragClass,!1),T(f,n.ghostClass,!0),m.active=this,e&&this._appendGhost(),L({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(J){this._lastX=J.clientX,this._lastY=J.clientY,Ut();for(var e=document.elementFromPoint(J.clientX,J.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(J.clientX,J.clientY),e!==t);)t=e;if(f.parentNode[$]._isOutsideThisEl(e),t)do{if(t[$]){var n=void 0;if(n=t[$]._onDragOver({clientX:J.clientX,clientY:J.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);Jt()}},_onTouchMove:function(e){if(pe){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,i=e.touches?e.touches[0]:e,a=w&&fe(w,!0),s=w&&a&&a.a,c=w&&a&&a.d,l=et&&B&&Ht(B),d=(i.clientX-pe.clientX+r.x)/(s||1)+(l?l[0]-wt[0]:0)/(s||1),u=(i.clientY-pe.clientY+r.y)/(c||1)+(l?l[1]-wt[1]:0)/(c||1);if(!m.active&&!Ce){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(w){a?(a.e+=d-(bt||0),a.f+=u-(yt||0)):a={a:1,b:0,c:0,d:1,e:d,f:u};var h="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");p(w,"webkitTransform",h),p(w,"mozTransform",h),p(w,"msTransform",h),p(w,"transform",h),bt=d,yt=u,J=i}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!w){var e=this.options.fallbackOnBody?document.body:_,t=P(f,!0,et,!0,e),n=this.options;if(et){for(B=e;p(B,"position")==="static"&&p(B,"transform")==="none"&&B!==document;)B=B.parentNode;B!==document.body&&B!==document.documentElement?(B===document&&(B=te()),t.top+=B.scrollTop,t.left+=B.scrollLeft):B=te(),wt=Ht(B)}w=f.cloneNode(!0),T(w,n.ghostClass,!1),T(w,n.fallbackClass,!0),T(w,n.dragClass,!0),p(w,"transition",""),p(w,"transform",""),p(w,"box-sizing","border-box"),p(w,"margin",0),p(w,"top",t.top),p(w,"left",t.left),p(w,"width",t.width),p(w,"height",t.height),p(w,"opacity","0.8"),p(w,"position",et?"absolute":"fixed"),p(w,"zIndex","100000"),p(w,"pointerEvents","none"),m.ghost=w,e.appendChild(w),p(w,"transform-origin",qt/parseInt(w.style.width)*100+"% "+Yt/parseInt(w.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,r=e.dataTransfer,i=n.options;if(H("dragStart",this,{evt:e}),m.eventCanceled){this._onDrop();return}H("setupClone",this),m.eventCanceled||(I=gt(f),I.removeAttribute("id"),I.draggable=!1,I.style["will-change"]="",this._hideClone(),T(I,this.options.chosenClass,!1),m.clone=I),n.cloneId=nt(function(){H("clone",n),!m.eventCanceled&&(n.options.removeCloneOnHide||_.insertBefore(I,f),n._hideClone(),L({sortable:n,name:"clone"}))}),!t&&T(f,i.dragClass,!0),t?(ze=!0,n._loopId=setInterval(n._emulateDragOver,50)):(E(document,"mouseup",n._onDrop),E(document,"touchend",n._onDrop),E(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",i.setData&&i.setData.call(n,r,f)),C(document,"drop",n),p(f,"transform","translateZ(0)")),Ce=!0,n._dragStartId=nt(n._dragStarted.bind(n,t,e)),C(document,"selectstart",n),xe=!0,_e&&p(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,r,i,a,s=this.options,c=s.group,l=m.active,d=Ge===c,u=s.sort,h=M||l,v,g=this,b=!1;if(Et)return;function k(Xe,no){H(Xe,g,ee({evt:e,isOwner:d,axis:v?"vertical":"horizontal",revert:a,dragRect:r,targetRect:i,canSort:u,fromSortable:h,target:n,completed:N,onMove:function(an,oo){return tt(_,t,f,r,an,P(an),e,oo)},changed:V},no))}function j(){k("dragOverAnimationCapture"),g.captureAnimationState(),g!==h&&h.captureAnimationState()}function N(Xe){return k("dragOverCompleted",{insertion:Xe}),Xe&&(d?l._hideClone():l._showClone(g),g!==h&&(T(f,M?M.options.ghostClass:l.options.ghostClass,!1),T(f,s.ghostClass,!0)),M!==g&&g!==m.active?M=g:g===m.active&&M&&(M=null),h===g&&(g._ignoreWhileAnimating=n),g.animateAll(function(){k("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(n===f&&!f.animated||n===t&&!n.animated)&&(Se=null),!s.dragoverBubble&&!e.rootEl&&n!==document&&(f.parentNode[$]._isOutsideThisEl(e.target),!Xe&&ge(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),b=!0}function V(){X=A(f),ce=A(f,s.draggable),L({sortable:g,name:"change",toEl:t,newIndex:X,newDraggableIndex:ce,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=U(n,s.draggable,t,!0),k("dragOver"),m.eventCanceled)return b;if(f.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||g._ignoreWhileAnimating===n)return N(!1);if(ze=!1,l&&!s.disabled&&(d?u||(a=x!==_):M===this||(this.lastPutMode=Ge.checkPull(this,l,f,e))&&c.checkPut(this,l,f,e))){if(v=this._getDirection(e,n)==="vertical",r=P(f),k("dragOverValid"),m.eventCanceled)return b;if(a)return x=_,j(),this._hideClone(),k("revert"),m.eventCanceled||(he?_.insertBefore(f,he):_.appendChild(f)),N(!0);var S=ht(t,s.draggable);if(!S||xn(e,v,this)&&!S.animated){if(S===f)return N(!1);if(S&&t===e.target&&(n=S),n&&(i=P(n)),tt(_,t,f,r,n,i,e,!!n)!==!1)return j(),S&&S.nextSibling?t.insertBefore(f,S.nextSibling):t.appendChild(f),x=t,V(),N(!0)}else if(S&&An(e,v,this)){var ne=ye(t,0,s,!0);if(ne===f)return N(!1);if(n=ne,i=P(n),tt(_,t,f,r,n,i,e,!1)!==!1)return j(),t.insertBefore(f,ne),x=t,V(),N(!0)}else if(n.parentNode===t){i=P(n);var oe=0,ve,Fe=f.parentNode!==t,Y=!Pn(f.animated&&f.toRect||r,n.animated&&n.toRect||i,v),He=v?"top":"left",de=Ft(n,"top","top")||Ft(f,"top","top"),Ke=de?de.scrollTop:void 0;Se!==n&&(ve=i[He],Ne=!1,Ue=!Y&&s.invertSwap||Fe),oe=On(e,n,i,v,Y?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,Ue,Se===n);var ae;if(oe!==0){var be=A(f);do be-=oe,ae=x.children[be];while(ae&&(p(ae,"display")==="none"||ae===w))}if(oe===0||ae===n)return N(!1);Se=n,Oe=oe;var Ve=n.nextElementSibling,ue=!1;ue=oe===1;var ut=tt(_,t,f,r,n,i,e,ue);if(ut!==!1)return(ut===1||ut===-1)&&(ue=ut===1),Et=!0,setTimeout(kn,30),j(),ue&&!Ve?t.appendChild(f):n.parentNode.insertBefore(f,ue?Ve:n),de&&Vt(de,0,Ke-de.scrollTop),x=f.parentNode,ve!==void 0&&!Ue&&(Je=Math.abs(ve-P(n)[He])),V(),N(!0)}if(t.contains(f))return N(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){E(document,"mousemove",this._onTouchMove),E(document,"touchmove",this._onTouchMove),E(document,"pointermove",this._onTouchMove),E(document,"dragover",ge),E(document,"mousemove",ge),E(document,"touchmove",ge)},_offUpEvents:function(){var e=this.el.ownerDocument;E(e,"mouseup",this._onDrop),E(e,"touchend",this._onDrop),E(e,"pointerup",this._onDrop),E(e,"touchcancel",this._onDrop),E(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;if(X=A(f),ce=A(f,n.draggable),H("drop",this,{evt:e}),x=f&&f.parentNode,X=A(f),ce=A(f,n.draggable),m.eventCanceled){this._nulling();return}Ce=!1,Ue=!1,Ne=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),St(this.cloneId),St(this._dragStartId),this.nativeDraggable&&(E(document,"drop",this),E(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),_e&&p(document.body,"user-select",""),p(f,"transform",""),e&&(xe&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),w&&w.parentNode&&w.parentNode.removeChild(w),(_===x||M&&M.lastPutMode!=="clone")&&I&&I.parentNode&&I.parentNode.removeChild(I),f&&(this.nativeDraggable&&E(f,"dragend",this),Ct(f),f.style["will-change"]="",xe&&!Ce&&T(f,M?M.options.ghostClass:this.options.ghostClass,!1),T(f,this.options.chosenClass,!1),L({sortable:this,name:"unchoose",toEl:x,newIndex:null,newDraggableIndex:null,originalEvent:e}),_!==x?(X>=0&&(L({rootEl:x,name:"add",toEl:x,fromEl:_,originalEvent:e}),L({sortable:this,name:"remove",toEl:x,originalEvent:e}),L({rootEl:x,name:"sort",toEl:x,fromEl:_,originalEvent:e}),L({sortable:this,name:"sort",toEl:x,originalEvent:e})),M&&M.save()):X!==Ee&&X>=0&&(L({sortable:this,name:"update",toEl:x,originalEvent:e}),L({sortable:this,name:"sort",toEl:x,originalEvent:e})),m.active&&((X==null||X===-1)&&(X=Ee,ce=Ae),L({sortable:this,name:"end",toEl:x,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){H("nulling",this),_=f=x=w=he=I=We=le=pe=J=xe=X=ce=Ee=Ae=Se=Oe=M=Ge=m.dragged=m.ghost=m.clone=m.active=null,Ze.forEach(function(e){e.checked=!0}),Ze.length=bt=yt=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":f&&(this._onDragOver(e),In(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,r=0,i=n.length,a=this.options;r<i;r++)t=n[r],U(t,a.draggable,this.el,!1)&&e.push(t.getAttribute(a.dataIdAttr)||Mn(t));return e},sort:function(e,t){var n={},r=this.el;this.toArray().forEach(function(i,a){var s=r.children[a];U(s,this.options.draggable,r,!1)&&(n[i]=s)},this),t&&this.captureAnimationState(),e.forEach(function(i){n[i]&&(r.removeChild(n[i]),r.appendChild(n[i]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return U(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var r=Ie.modifyOption(this,e,t);typeof r<"u"?n[e]=r:n[e]=t,e==="group"&&jt(n)},destroy:function(){H("destroy",this);var e=this.el;e[$]=null,E(e,"mousedown",this._onTapStart),E(e,"touchstart",this._onTapStart),E(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(E(e,"dragover",this),E(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),je.splice(je.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!le){if(H("hideClone",this),m.eventCanceled)return;p(I,"display","none"),this.options.removeCloneOnHide&&I.parentNode&&I.parentNode.removeChild(I),le=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(le){if(H("showClone",this),m.eventCanceled)return;f.parentNode==_&&!this.options.group.revertClone?_.insertBefore(I,f):he?_.insertBefore(I,he):_.appendChild(I),this.options.group.revertClone&&this.animate(f,I),p(I,"display",""),le=!1}}};function In(o){o.dataTransfer&&(o.dataTransfer.dropEffect="move"),o.cancelable&&o.preventDefault()}function tt(o,e,t,n,r,i,a,s){var c,l=o[$],d=l.options.onMove,u;return window.CustomEvent&&!ie&&!Pe?c=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(c=document.createEvent("Event"),c.initEvent("move",!0,!0)),c.to=e,c.from=o,c.dragged=t,c.draggedRect=n,c.related=r||e,c.relatedRect=i||P(e),c.willInsertAfter=s,c.originalEvent=a,o.dispatchEvent(c),d&&(u=d.call(l,c,a)),u}function Ct(o){o.draggable=!1}function kn(){Et=!1}function An(o,e,t){var n=P(ye(t.el,0,t.options,!0)),r=10;return e?o.clientX<n.left-r||o.clientY<n.top&&o.clientX<n.right:o.clientY<n.top-r||o.clientY<n.bottom&&o.clientX<n.left}function xn(o,e,t){var n=P(ht(t.el,t.options.draggable)),r=10;return e?o.clientX>n.right+r||o.clientX<=n.right&&o.clientY>n.bottom&&o.clientX>=n.left:o.clientX>n.right&&o.clientY>n.top||o.clientX<=n.right&&o.clientY>n.bottom+r}function On(o,e,t,n,r,i,a,s){var c=n?o.clientY:o.clientX,l=n?t.height:t.width,d=n?t.top:t.left,u=n?t.bottom:t.right,h=!1;if(!a){if(s&&Je<l*r){if(!Ne&&(Oe===1?c>d+l*i/2:c<u-l*i/2)&&(Ne=!0),Ne)h=!0;else if(Oe===1?c<d+Je:c>u-Je)return-Oe}else if(c>d+l*(1-r)/2&&c<u-l*(1-r)/2)return Nn(e)}return h=h||a,h&&(c<d+l*i/2||c>u-l*i/2)?c>d+l/2?1:-1:0}function Nn(o){return A(f)<A(o)?1:-1}function Mn(o){for(var e=o.tagName+o.className+o.src+o.href+o.textContent,t=e.length,n=0;t--;)n+=e.charCodeAt(t);return n.toString(36)}function $n(o){Ze.length=0;for(var e=o.getElementsByTagName("input"),t=e.length;t--;){var n=e[t];n.checked&&Ze.push(n)}}function nt(o){return setTimeout(o,0)}function St(o){return clearTimeout(o)}Qe&&C(document,"touchmove",function(o){(m.active||Ce)&&o.cancelable&&o.preventDefault()}),m.utils={on:C,off:E,css:p,find:Lt,is:function(e,t){return!!U(e,t,e,!1)},extend:bn,throttle:Kt,closest:U,toggleClass:T,clone:gt,index:A,nextTick:nt,cancelNextTick:St,detectDirection:zt,getChild:ye},m.get=function(o){return o[$]},m.mount=function(){for(var o=arguments.length,e=new Array(o),t=0;t<o;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(m.utils=ee(ee({},m.utils),n.utils)),Ie.mount(n)})},m.create=function(o,e){return new m(o,e)},m.version=gn;var O=[],Me,Dt,Pt=!1,_t,Tt,ot,$e;function Bn(){function o(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return o.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?C(document,"dragover",this._handleAutoScroll):this.options.supportPointer?C(document,"pointermove",this._handleFallbackAutoScroll):n.touches?C(document,"touchmove",this._handleFallbackAutoScroll):C(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},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)),Zt(),rt(),yn()},nulling:function(){ot=Dt=Me=Pt=$e=_t=Tt=null,O.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var r=this,i=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,s=document.elementFromPoint(i,a);if(ot=t,n||this.options.forceAutoScrollFallback||Pe||ie||_e){It(t,this.options,s,n);var c=se(s,!0);Pt&&(!$e||i!==_t||a!==Tt)&&($e&&Zt(),$e=setInterval(function(){var l=se(document.elementFromPoint(i,a),!0);l!==c&&(c=l,rt()),It(t,r.options,l,n)},10),_t=i,Tt=a)}else{if(!this.options.bubbleScroll||se(s,!0)===te()){rt();return}It(t,this.options,se(s,!1),!1)}}},W(o,{pluginName:"scroll",initializeByDefault:!0})}function rt(){O.forEach(function(o){clearInterval(o.pid)}),O=[]}function Zt(){clearInterval($e)}var It=Kt(function(o,e,t,n){if(!!e.scroll){var r=(o.touches?o.touches[0]:o).clientX,i=(o.touches?o.touches[0]:o).clientY,a=e.scrollSensitivity,s=e.scrollSpeed,c=te(),l=!1,d;Dt!==t&&(Dt=t,rt(),Me=e.scroll,d=e.scrollFn,Me===!0&&(Me=se(t,!0)));var u=0,h=Me;do{var v=h,g=P(v),b=g.top,k=g.bottom,j=g.left,N=g.right,V=g.width,S=g.height,ne=void 0,oe=void 0,ve=v.scrollWidth,Fe=v.scrollHeight,Y=p(v),He=v.scrollLeft,de=v.scrollTop;v===c?(ne=V<ve&&(Y.overflowX==="auto"||Y.overflowX==="scroll"||Y.overflowX==="visible"),oe=S<Fe&&(Y.overflowY==="auto"||Y.overflowY==="scroll"||Y.overflowY==="visible")):(ne=V<ve&&(Y.overflowX==="auto"||Y.overflowX==="scroll"),oe=S<Fe&&(Y.overflowY==="auto"||Y.overflowY==="scroll"));var Ke=ne&&(Math.abs(N-r)<=a&&He+V<ve)-(Math.abs(j-r)<=a&&!!He),ae=oe&&(Math.abs(k-i)<=a&&de+S<Fe)-(Math.abs(b-i)<=a&&!!de);if(!O[u])for(var be=0;be<=u;be++)O[be]||(O[be]={});(O[u].vx!=Ke||O[u].vy!=ae||O[u].el!==v)&&(O[u].el=v,O[u].vx=Ke,O[u].vy=ae,clearInterval(O[u].pid),(Ke!=0||ae!=0)&&(l=!0,O[u].pid=setInterval(function(){n&&this.layer===0&&m.active._onTouchMove(ot);var Ve=O[this.layer].vy?O[this.layer].vy*s:0,ue=O[this.layer].vx?O[this.layer].vx*s:0;typeof d=="function"&&d.call(m.dragged.parentNode[$],ue,Ve,o,ot,O[this.layer].el)!=="continue"||Vt(O[this.layer].el,ue,Ve)}.bind({layer:u}),24))),u++}while(e.bubbleScroll&&h!==c&&(h=se(h,!1)));Pt=l}},30),Qt=function(e){var t=e.originalEvent,n=e.putSortable,r=e.dragEl,i=e.activeSortable,a=e.dispatchSortableEvent,s=e.hideGhostForTarget,c=e.unhideGhostForTarget;if(!!t){var l=n||i;s();var d=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,u=document.elementFromPoint(d.clientX,d.clientY);c(),l&&!l.el.contains(u)&&(a("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function kt(){}kt.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=ye(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:Qt},W(kt,{pluginName:"revertOnSpill"});function At(){}At.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,r=n||this.sortable;r.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),r.animateAll()},drop:Qt},W(At,{pluginName:"removeOnSpill"});var G;function io(){function o(){this.defaults={swapClass:"sortable-swap-highlight"}}return o.prototype={dragStart:function(t){var n=t.dragEl;G=n},dragOverValid:function(t){var n=t.completed,r=t.target,i=t.onMove,a=t.activeSortable,s=t.changed,c=t.cancel;if(!!a.options.swap){var l=this.sortable.el,d=this.options;if(r&&r!==l){var u=G;i(r)!==!1?(T(r,d.swapClass,!0),G=r):G=null,u&&u!==G&&T(u,d.swapClass,!1)}s(),n(!0),c()}},drop:function(t){var n=t.activeSortable,r=t.putSortable,i=t.dragEl,a=r||this.sortable,s=this.options;G&&T(G,s.swapClass,!1),G&&(s.swap||r&&r.options.swap)&&i!==G&&(a.captureAnimationState(),a!==n&&n.captureAnimationState(),Rn(i,G),a.animateAll(),a!==n&&n.animateAll())},nulling:function(){G=null}},W(o,{pluginName:"swap",eventProperties:function(){return{swapItem:G}}})}function Rn(o,e){var t=o.parentNode,n=e.parentNode,r,i;!t||!n||t.isEqualNode(e)||n.isEqualNode(o)||(r=A(o),i=A(e),t.isEqualNode(n)&&r<i&&i++,t.insertBefore(e,t.children[r]),n.insertBefore(o,n.children[i]))}var y=null,q=null,Be,Z,Re=!1,K=!1,De=!1,D,Le,it;function ao(){function o(e){for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this));e.options.avoidImplicitDeselect||(e.options.supportPointer?C(document,"pointerup",this._deselectMultiDrag):(C(document,"mouseup",this._deselectMultiDrag),C(document,"touchend",this._deselectMultiDrag))),C(document,"keydown",this._checkKeyDown),C(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(r,i){var a="";y.length&&Z===e?y.forEach(function(s,c){a+=(c?", ":"")+s.textContent}):a=i.textContent,r.setData("Text",a)}}}return o.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){var n=t.dragEl;D=n},delayEnded:function(){this.isMultiDrag=~y.indexOf(D)},setupClone:function(t){var n=t.sortable,r=t.cancel;if(!!this.isMultiDrag){for(var i=0;i<y.length;i++)q.push(gt(y[i])),q[i].sortableIndex=y[i].sortableIndex,q[i].draggable=!1,q[i].style["will-change"]="",T(q[i],this.options.selectedClass,!1),y[i]===D&&T(q[i],this.options.chosenClass,!1);n._hideClone(),r()}},clone:function(t){var n=t.sortable,r=t.rootEl,i=t.dispatchSortableEvent,a=t.cancel;!this.isMultiDrag||this.options.removeCloneOnHide||y.length&&Z===n&&(en(!0,r),i("clone"),a())},showClone:function(t){var n=t.cloneNowShown,r=t.rootEl,i=t.cancel;!this.isMultiDrag||(en(!1,r),q.forEach(function(a){p(a,"display","")}),n(),it=!1,i())},hideClone:function(t){var n=this,r=t.sortable,i=t.cloneNowHidden,a=t.cancel;!this.isMultiDrag||(q.forEach(function(s){p(s,"display","none"),n.options.removeCloneOnHide&&s.parentNode&&s.parentNode.removeChild(s)}),i(),it=!0,a())},dragStartGlobal:function(t){var n=t.sortable;!this.isMultiDrag&&Z&&Z.multiDrag._deselectMultiDrag(),y.forEach(function(r){r.sortableIndex=A(r)}),y=y.sort(function(r,i){return r.sortableIndex-i.sortableIndex}),De=!0},dragStarted:function(t){var n=this,r=t.sortable;if(!!this.isMultiDrag){if(this.options.sort&&(r.captureAnimationState(),this.options.animation)){y.forEach(function(a){a!==D&&p(a,"position","absolute")});var i=P(D,!1,!0,!0);y.forEach(function(a){a!==D&&Xt(a,i)}),K=!0,Re=!0}r.animateAll(function(){K=!1,Re=!1,n.options.animation&&y.forEach(function(a){mt(a)}),n.options.sort&&at()})}},dragOver:function(t){var n=t.target,r=t.completed,i=t.cancel;K&&~y.indexOf(n)&&(r(!1),i())},revert:function(t){var n=t.fromSortable,r=t.rootEl,i=t.sortable,a=t.dragRect;y.length>1&&(y.forEach(function(s){i.addAnimationState({target:s,rect:K?P(s):a}),mt(s),s.fromRect=a,n.removeAnimationState(s)}),K=!1,Ln(!this.options.removeCloneOnHide,r))},dragOverCompleted:function(t){var n=t.sortable,r=t.isOwner,i=t.insertion,a=t.activeSortable,s=t.parentEl,c=t.putSortable,l=this.options;if(i){if(r&&a._hideClone(),Re=!1,l.animation&&y.length>1&&(K||!r&&!a.options.sort&&!c)){var d=P(D,!1,!0,!0);y.forEach(function(h){h!==D&&(Xt(h,d),s.appendChild(h))}),K=!0}if(!r)if(K||at(),y.length>1){var u=it;a._showClone(n),a.options.animation&&!it&&u&&q.forEach(function(h){a.addAnimationState({target:h,rect:Le}),h.fromRect=Le,h.thisAnimationDuration=null})}else a._showClone(n)}},dragOverAnimationCapture:function(t){var n=t.dragRect,r=t.isOwner,i=t.activeSortable;if(y.forEach(function(s){s.thisAnimationDuration=null}),i.options.animation&&!r&&i.multiDrag.isMultiDrag){Le=W({},n);var a=fe(D,!0);Le.top-=a.f,Le.left-=a.e}},dragOverAnimationComplete:function(){K&&(K=!1,at())},drop:function(t){var n=t.originalEvent,r=t.rootEl,i=t.parentEl,a=t.sortable,s=t.dispatchSortableEvent,c=t.oldIndex,l=t.putSortable,d=l||this.sortable;if(!!n){var u=this.options,h=i.children;if(!De)if(u.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),T(D,u.selectedClass,!~y.indexOf(D)),~y.indexOf(D))y.splice(y.indexOf(D),1),Be=null,ke({sortable:a,rootEl:r,name:"deselect",targetEl:D,originalEvent:n});else{if(y.push(D),ke({sortable:a,rootEl:r,name:"select",targetEl:D,originalEvent:n}),n.shiftKey&&Be&&a.el.contains(Be)){var v=A(Be),g=A(D);if(~v&&~g&&v!==g){var b,k;for(g>v?(k=v,b=g):(k=g,b=v+1);k<b;k++)~y.indexOf(h[k])||(T(h[k],u.selectedClass,!0),y.push(h[k]),ke({sortable:a,rootEl:r,name:"select",targetEl:h[k],originalEvent:n}))}}else Be=D;Z=d}if(De&&this.isMultiDrag){if(K=!1,(i[$].options.sort||i!==r)&&y.length>1){var j=P(D),N=A(D,":not(."+this.options.selectedClass+")");if(!Re&&u.animation&&(D.thisAnimationDuration=null),d.captureAnimationState(),!Re&&(u.animation&&(D.fromRect=j,y.forEach(function(S){if(S.thisAnimationDuration=null,S!==D){var ne=K?P(S):j;S.fromRect=ne,d.addAnimationState({target:S,rect:ne})}})),at(),y.forEach(function(S){h[N]?i.insertBefore(S,h[N]):i.appendChild(S),N++}),c===A(D))){var V=!1;y.forEach(function(S){if(S.sortableIndex!==A(S)){V=!0;return}}),V&&s("update")}y.forEach(function(S){mt(S)}),d.animateAll()}Z=d}(r===i||l&&l.lastPutMode!=="clone")&&q.forEach(function(S){S.parentNode&&S.parentNode.removeChild(S)})}},nullingGlobal:function(){this.isMultiDrag=De=!1,q.length=0},destroyGlobal:function(){this._deselectMultiDrag(),E(document,"pointerup",this._deselectMultiDrag),E(document,"mouseup",this._deselectMultiDrag),E(document,"touchend",this._deselectMultiDrag),E(document,"keydown",this._checkKeyDown),E(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(typeof De<"u"&&De)&&Z===this.sortable&&!(t&&U(t.target,this.options.draggable,this.sortable.el,!1))&&!(t&&t.button!==0))for(;y.length;){var n=y[0];T(n,this.options.selectedClass,!1),y.shift(),ke({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:n,originalEvent:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},W(o,{pluginName:"multiDrag",utils:{select:function(t){var n=t.parentNode[$];!n||!n.options.multiDrag||~y.indexOf(t)||(Z&&Z!==n&&(Z.multiDrag._deselectMultiDrag(),Z=n),T(t,n.options.selectedClass,!0),y.push(t))},deselect:function(t){var n=t.parentNode[$],r=y.indexOf(t);!n||!n.options.multiDrag||!~r||(T(t,n.options.selectedClass,!1),y.splice(r,1))}},eventProperties:function(){var t=this,n=[],r=[];return y.forEach(function(i){n.push({multiDragElement:i,index:i.sortableIndex});var a;K&&i!==D?a=-1:K?a=A(i,":not(."+t.options.selectedClass+")"):a=A(i),r.push({multiDragElement:i,index:a})}),{items:dn(y),clones:[].concat(q),oldIndicies:n,newIndicies:r}},optionListeners:{multiDragKey:function(t){return t=t.toLowerCase(),t==="ctrl"?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}function Ln(o,e){y.forEach(function(t,n){var r=e.children[t.sortableIndex+(o?Number(n):0)];r?e.insertBefore(t,r):e.appendChild(t)})}function en(o,e){q.forEach(function(t,n){var r=e.children[t.sortableIndex+(o?Number(n):0)];r?e.insertBefore(t,r):e.appendChild(t)})}function at(){y.forEach(function(o){o!==D&&o.parentNode&&o.parentNode.removeChild(o)})}m.mount(new Bn),m.mount(At,kt);const Fn=m;class tn{constructor(e,t=!1){this.method=e,this.overwriteable=t}}class z extends tn{}class st extends tn{}function nn(o,e,t){o.method===e.method&&t(e.params)}const Hn=new z("webview/ready"),so=new z("command/execute"),lo=new z("configuration/preview"),co=new z("configuration/update"),uo=new st("configuration/didChange"),fo=new st("configuration/didPreview"),ho=new st("webview/didOpenAnchor"),Kn=new z("rebase/abort"),Vn=new z("rebase/disable"),Xn=new z("rebase/search"),qn=new z("rebase/start"),Yn=new z("rebase/switch"),Wn=new z("rebase/reorder"),Gn=new z("rebase/change/entry"),zn=new z("rebase/move/entry"),on=new st("rebase/didChange");var Q;(o=>{function e(r,i,a,s){let c=!1;if(typeof r=="string"){const d=function(u){const h=u?.target;!h?.matches(r)||a(u,h)};return document.addEventListener(i,d,s??!0),{dispose:()=>{c||(c=!0,document.removeEventListener(i,d,s??!0))}}}const l=function(d){a(d,this)};return r.addEventListener(i,l,s??!1),{dispose:()=>{c||(c=!0,r.removeEventListener(i,l,s??!1))}}}o.on=e;function t(r,i,a){const s=document.getElementById(r);if(i.replaceChildren(s?.content.cloneNode(!0)),i.className=s.className,a?.visible!=null){const c=i.querySelectorAll("[data-visible]");for(const l of c){const d=l.dataset.visible;!d||(a.visible[d]?l.style.display="initial":l.style.display="none")}}if(a?.bindings!=null){const c=i.querySelectorAll("[data-bind]");for(const l of c){const d=l.dataset.bind;if(!d)continue;const u=a.bindings[d];u!=null&&(l.textContent=String(u))}}}o.insertTemplate=t;function n(r){r.replaceChildren(),r.className=""}o.resetSlot=n})(Q||(Q={}));const jn=/^(?:(#?)([0-9a-f]{3}|[0-9a-f]{6})|((?:rgb|hsl)a?)\((-?\d+%?)[,\s]+(-?\d+%?)[,\s]+(-?\d+%?)[,\s]*(-?[\d.]+%?)?\))$/i;function xt(o,e){const t=o+e,n=e<0?t<0?0:t:t>255?255:t;return Math.round(n)}function R(o,e){return F(o,-e)}function F(o,e){const t=ct(o);if(t==null)return o;const[n,r,i,a]=t,s=255*e/100;return`rgba(${xt(n,s)}, ${xt(r,s)}, ${xt(i,s)}, ${a})`}function me(o,e){const t=ct(o);if(t==null)return o;const[n,r,i,a]=t;return`rgba(${n}, ${r}, ${i}, ${a*(e/100)})`}function po(o,e,t){const n=ct(o),r=ct(e);if(n==null||r==null)return o;const[i,a,s,c]=n,[l,d,u,h]=r;return`rgba(${lt(i,l,t)}, ${lt(a,d,t)}, ${lt(s,u,t)}, ${lt(c,h,t)})`}const lt=(o,e,t)=>o+(e-o)*t/100;function ct(o){o=o.trim();const e=jn.exec(o);if(e==null)return null;if(e[1]==="#"){const t=e[2];switch(t.length){case 3:return[parseInt(t[0]+t[0],16),parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),1];case 6:return[parseInt(t.substring(0,2),16),parseInt(t.substring(2,4),16),parseInt(t.substring(4,6),16),1]}return null}switch(e[3]){case"rgb":return[parseInt(e[4],10),parseInt(e[5],10),parseInt(e[6],10),1];case"rgba":return[parseInt(e[4],10),parseInt(e[5],10),parseInt(e[6],10),parseFloat(e[7])];default:return null}}function Un(o){const e=n=>{const r=document.body,i=window.getComputedStyle(r),a=r.classList.contains("vscode-light")||r.classList.contains("vscode-high-contrast-light"),s=r.style;s.setProperty("--font-family",i.getPropertyValue("--vscode-font-family").trim()),s.setProperty("--font-size",i.getPropertyValue("--vscode-font-size").trim()),s.setProperty("--font-weight",i.getPropertyValue("--vscode-font-weight").trim()),s.setProperty("--editor-font-family",i.getPropertyValue("--vscode-editor-font-family").trim()),s.setProperty("--editor-font-size",i.getPropertyValue("--vscode-editor-font-size").trim()),s.setProperty("--editor-font-weight",i.getPropertyValue("--vscode-editor-font-weight").trim());const c=i.getPropertyValue("--vscode-editor-background").trim();let l=c;s.setProperty("--color-background",l),s.setProperty("--color-background--lighten-05",F(l,5)),s.setProperty("--color-background--darken-05",R(l,5)),s.setProperty("--color-background--lighten-075",F(l,7.5)),s.setProperty("--color-background--darken-075",R(l,7.5)),s.setProperty("--color-background--lighten-10",F(l,10)),s.setProperty("--color-background--darken-10",R(l,10)),s.setProperty("--color-background--lighten-15",F(l,15)),s.setProperty("--color-background--darken-15",R(l,15)),s.setProperty("--color-background--lighten-30",F(l,30)),s.setProperty("--color-background--darken-30",R(l,30)),s.setProperty("--color-background--lighten-50",F(l,50)),s.setProperty("--color-background--darken-50",R(l,50)),l=i.getPropertyValue("--vscode-button-background").trim(),s.setProperty("--color-button-background",l),s.setProperty("--color-button-background--darken-30",R(l,30)),s.setProperty("--color-highlight",l),s.setProperty("--color-highlight--75",me(l,75)),s.setProperty("--color-highlight--50",me(l,50)),s.setProperty("--color-highlight--25",me(l,25)),l=i.getPropertyValue("--vscode-button-secondaryBackground").trim(),s.setProperty("--color-button-secondary-background",l),s.setProperty("--color-button-secondary-background--darken-30",R(l,30)),l=i.getPropertyValue("--vscode-button-foreground").trim(),s.setProperty("--color-button-foreground",l);let d=i.getPropertyValue("--vscode-editor-foreground").trim();d||(d=i.getPropertyValue("--vscode-foreground").trim()),s.setProperty("--color-foreground",d),s.setProperty