varsortable=function(){"use strict";functiond(e,t,n){if(void0===n)returne&&e.h5s&&e.h5s.data&&e.h5s.data[t];e.h5s=e.h5s||{},e.h5s.data=e.h5s.data||{},e.h5s.data[t]=n}functionu(e,t){if(!(einstanceofNodeList||einstanceofHTMLCollection||einstanceofArray))thrownewError("You must provide a nodeList/HTMLCollection/Array of elements to be filtered.");return"string"!=typeoft?Array.from(e):Array.from(e).filter(function(e){return1===e.nodeType&&e.matches(t)})}varp=newMap,t=function(){functione(){this._config=newMap,this._placeholder=void0,this._data=newMap}returnObject.defineProperty(e.prototype,"config",{get:function(){varn={};returnthis._config.forEach(function(e,t){n[t]=e}),n},set:function(e){if("object"!=typeofe)thrownewError("You must provide a valid configuration object to the config setter.");vart=Object.assign({},e);this._config=newMap(Object.entries(t))},enumerable:!0,configurable:!0}),e.prototype.setConfig=function(e,t){if(!this._config.has(e))thrownewError("Trying to set invalid configuration item: "+e);this._config.set(e,t)},e.prototype.getConfig=function(e){if(!this._config.has(e))thrownewError("Invalid configuration item requested: "+e);returnthis._config.get(e)},Object.defineProperty(e.prototype,"placeholder",{get:function(){returnthis._placeholder},set:function(e){if(!(einstanceofHTMLElement)&&null!==e)thrownewError("A placeholder must be an html element or null.");this._placeholder=e},enumerable:!0,configurable:!0}),e.prototype.setData=function(e,t){if("string"!=typeofe)thrownewError("The key must be a string.");this._data.set(e,t)},e.prototype.getData=function(e){if("string"!=typeofe)thrownewError("The key must be a string.");returnthis._data.get(e)},e.prototype.deleteData=function(e){if("string"!=typeofe)thrownewError("The key must be a string.");returnthis._data.delete(e)},e}();functionm(e){if(!(einstanceofHTMLElement))thrownewError("Please provide a sortable to the store function.");returnp.has(e)||p.set(e,newt),p.get(e)}functiong(e,t,n){if(einstanceofArray)for(varr=0;r<e.length;++r)g(e[r],t,n);elsee.addEventListener(t,n),m(e).setData("event"+t,n)}functionl(e,t){if(einstanceofArray)for(varn=0;n<e.length;++n)l(e[n],t);elsee.removeEventListener(t,m(e).getData("event"+t)),m(e).deleteData("event"+t)}functionh(e,t,n){if(einstanceofArray)for(varr=0;r<e.length;++r)h(e[r],t,n);elsee.setAttribute(t,n)}functions(e,t){if(einstanceofArray)for(varn=0;n<e.length;++n)s(e[n],t);elsee.removeAttribute(t)}functionv(e){if(!e.parentElement||0===e.getClientRects().length)thrownewError("target element must be part of the dom");vart=e.getClientRects()[0];return{left:t.left+window.scrollX,right:t.right+window.scrollX,top:t.top+window.scrollY,bottom:t.bottom+window.scrollY}}functiony(e,t){if(!(einstanceofHTMLElement&&(tinstanceofNodeList||tinstanceofHTMLCollection||tinstanceofArray)))thrownewError("You must provide an element and a list of elements.");returnArray.from(t).indexOf(e)}functionE(e){if(!(einstanceofHTMLElement))thrownewError("Element is not a node element.");returnnull!==e.parentNode}varn=function(e,t,n){if(!(einstanceofHTMLElement&&e.parentElementinstanceofHTMLElement))thrownewError("target and element must be a node");e.parentElement.insertBefore(t,"before"===n?e:e.nextElementSibling)},b=function(e,t){returnn(e,t,"before")},w=function(e,t){returnn(e,t,"after")};functionT(e){if(!(einstanceofHTMLElement))thrownewError("You must provide a valid dom element");varn=window.getComputedStyle(e);return["height","padding-top","padding-bottom"].map(function(e){vart=parseInt(n.getPropertyValue(e),10);returnisNaN(t)?0:t}).reduce(function(e,t){returne+t})}functionc(e,t){if(!(einstanceofArray))thrownewError("You must provide a Array of HTMLElements to be filtered.");return"string"!=typeoft?e:e.filter(function(e){returne.querySelector(t)instanceofHTMLElement}).map(function(e){returne.querySelector(t)})}varC=function(e,t,n){return{element:e,posX:n.pageX-t.left,posY:n.pageY-t.top}};functionL(e,t){if(!0===e.isSort