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C,EAC5C+C,EAAQvF,EAAOwC,EAAgB2G,SAAUoB,EAAKhF,OAC9CiF,EAAUlF,EAAWC,EAAOgF,EAAKE,QAErC3H,EAAoBN,EAAiB,YACrCM,EAAoBN,EAAiB,aACrCM,EAAoBN,EAAiB,aACrCM,EAAoBN,EAAiB,WACrCM,EAAoBN,EAAiB,QAErCmH,EAAmBnH,GAEnBM,EAAoB0H,EAAS,aAC7Bf,EAAiBlE,GACjBsE,EAAetE,GACfmE,EAAsB7B,EAAiBI,GAEvCzF,EAAgB+D,YAAa,CACjC,CAmcIqK,CAAgBpO,EACpB,EACAoH,EAASvB,OAAS,SAAU7F,GACxB8H,EAAe9H,EACnB,EACAoH,EAASiH,QAAU,SAAUrO,IAlaP,SAAUA,GAC5B,IAAI+H,EAAO9K,EAAQ+C,EAAiB,QAChC+C,EAAQvF,EAAOwC,EAAgB2G,SAAUoB,EAAKhF,OAC9CiF,EAAUlF,EAAWC,EAAOgF,EAAKE,QACrC1H,EAAaP,EAAiB,kBAAmB,QACjD/C,EAAQ+C,EAAiB,YAAa,QACtCO,EAAayH,EAAS,YAAa,SACnC1H,EAAoB0H,EAAS,YACjC,CA2ZIsG,CAAgBtO,EACpB,EAEAoH,EAASmH,UAAY,CAEjBhR,KAAMN,EACNgK,iBAAkBA,EAClBI,eAAgBA,EAChBF,mBAAoBA,EACpBD,sBAAuBA,GAG3B,K","sources":["webpack://app/./node_modules/html5sortable/dist/html5sortable.es.js"],"sourcesContent":["/*\n * HTML5Sortable package\n * https://github.com/lukasoppermann/html5sortable\n *\n * Maintained by Lukas Oppermann \n *\n * Released under the MIT license.\n */\n/**\n * Get or set data on element\n * @param {HTMLElement} element\n * @param {string} key\n * @param {any} value\n * @return {*}\n */\nfunction addData(element, key, value) {\n if (value === undefined) {\n return element && element.h5s && element.h5s.data && element.h5s.data[key];\n }\n else {\n element.h5s = element.h5s || {};\n element.h5s.data = element.h5s.data || {};\n element.h5s.data[key] = value;\n }\n}\n/**\n * Remove data from element\n * @param {HTMLElement} element\n */\nfunction removeData(element) {\n if (element.h5s) {\n delete element.h5s.data;\n }\n}\n\n/* eslint-env browser */\n/**\n * Filter only wanted nodes\n * @param {NodeList|HTMLCollection|Array} nodes\n * @param {String} selector\n * @returns {Array}\n */\nvar filter = (function (nodes, selector) {\n if (!(nodes instanceof NodeList || nodes instanceof HTMLCollection || nodes instanceof Array)) {\n throw new Error('You must provide a nodeList/HTMLCollection/Array of elements to be filtered.');\n }\n if (typeof selector !== 'string') {\n return Array.from(nodes);\n }\n return Array.from(nodes).filter(function (item) { return item.nodeType === 1 && item.matches(selector); });\n});\n\n/* eslint-env browser */\n/* eslint-disable no-use-before-define */\nvar stores = new Map();\n/* eslint-enable no-use-before-define */\n/**\n * Stores data & configurations per Sortable\n * @param {Object} config\n */\nvar Store = /** @class */ (function () {\n function Store() {\n this._config = new Map(); // eslint-disable-line no-undef\n this._placeholder = undefined; // eslint-disable-line no-undef\n this._data = new Map(); // eslint-disable-line no-undef\n }\n Object.defineProperty(Store.prototype, \"config\", {\n /**\n * get the configuration map of a class instance\n * @method config\n * @return {object}\n */\n get: function () {\n // transform Map to object\n var config = {};\n this._config.forEach(function (value, key) {\n config[key] = value;\n });\n // return object\n return config;\n },\n /**\n * set the configuration of a class instance\n * @method config\n * @param {object} config object of configurations\n */\n set: function (config) {\n if (typeof config !== 'object') {\n throw new Error('You must provide a valid configuration object to the config setter.');\n }\n // combine config with default\n var mergedConfig = Object.assign({}, config);\n // add config to map\n this._config = new Map(Object.entries(mergedConfig));\n },\n enumerable: false,\n configurable: true\n });\n /**\n * set individual configuration of a class instance\n * @method setConfig\n * @param key valid configuration key\n * @param value any value\n * @return void\n */\n Store.prototype.setConfig = function (key, value) {\n if (!this._config.has(key)) {\n throw new Error(\"Trying to set invalid configuration item: \" + key);\n }\n // set config\n this._config.set(key, value);\n };\n /**\n * get an individual configuration of a class instance\n * @method getConfig\n * @param key valid configuration key\n * @return any configuration value\n */\n Store.prototype.getConfig = function (key) {\n if (!this._config.has(key)) {\n throw new Error(\"Invalid configuration item requested: \" + key);\n }\n return this._config.get(key);\n };\n Object.defineProperty(Store.prototype, \"placeholder\", {\n /**\n * get the placeholder for a class instance\n * @method placeholder\n * @return {HTMLElement|null}\n */\n get: function () {\n return this._placeholder;\n },\n /**\n * set the placeholder for a class instance\n * @method placeholder\n * @param {HTMLElement} placeholder\n * @return {void}\n */\n set: function (placeholder) {\n if (!(placeholder instanceof HTMLElement) && placeholder !== null) {\n throw new Error('A placeholder must be an html element or null.');\n }\n this._placeholder = placeholder;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * set an data entry\n * @method setData\n * @param {string} key\n * @param {any} value\n * @return {void}\n */\n Store.prototype.setData = function (key, value) {\n if (typeof key !== 'string') {\n throw new Error('The key must be a string.');\n }\n this._data.set(key, value);\n };\n /**\n * get an data entry\n * @method getData\n * @param {string} key an existing key\n * @return {any}\n */\n Store.prototype.getData = function (key) {\n if (typeof key !== 'string') {\n throw new Error('The key must be a string.');\n }\n return this._data.get(key);\n };\n /**\n * delete an data entry\n * @method deleteData\n * @param {string} key an existing key\n * @return {boolean}\n */\n Store.prototype.deleteData = function (key) {\n if (typeof key !== 'string') {\n throw new Error('The key must be a string.');\n }\n return this._data.delete(key);\n };\n return Store;\n}());\n/**\n * @param {HTMLElement} sortableElement\n * @returns {Class: Store}\n */\nvar store = (function (sortableElement) {\n // if sortableElement is wrong type\n if (!(sortableElement instanceof HTMLElement)) {\n throw new Error('Please provide a sortable to the store function.');\n }\n // create new instance if not avilable\n if (!stores.has(sortableElement)) {\n stores.set(sortableElement, new Store());\n }\n // return instance\n return stores.get(sortableElement);\n});\n\n/**\n * @param {Array|HTMLElement} element\n * @param {Function} callback\n * @param {string} event\n */\nfunction addEventListener(element, eventName, callback) {\n if (element instanceof Array) {\n for (var i = 0; i < element.length; ++i) {\n addEventListener(element[i], eventName, callback);\n }\n return;\n }\n element.addEventListener(eventName, callback);\n store(element).setData(\"event\" + eventName, callback);\n}\n/**\n * @param {Array|HTMLElement} element\n * @param {string} eventName\n */\nfunction removeEventListener(element, eventName) {\n if (element instanceof Array) {\n for (var i = 0; i < element.length; ++i) {\n removeEventListener(element[i], eventName);\n }\n return;\n }\n element.removeEventListener(eventName, store(element).getData(\"event\" + eventName));\n store(element).deleteData(\"event\" + eventName);\n}\n\n/**\n * @param {Array|HTMLElement} element\n * @param {string} attribute\n * @param {string} value\n */\nfunction addAttribute(element, attribute, value) {\n if (element instanceof Array) {\n for (var i = 0; i < element.length; ++i) {\n addAttribute(element[i], attribute, value);\n }\n return;\n }\n element.setAttribute(attribute, value);\n}\n/**\n * @param {Array|HTMLElement} element\n * @param {string} attribute\n */\nfunction removeAttribute(element, attribute) {\n if (element instanceof Array) {\n for (var i = 0; i < element.length; ++i) {\n removeAttribute(element[i], attribute);\n }\n return;\n }\n element.removeAttribute(attribute);\n}\n\n/**\n * @param {HTMLElement} element\n * @returns {Object}\n */\nvar offset = (function (element) {\n if (!element.parentElement || element.getClientRects().length === 0) {\n throw new Error('target element must be part of the dom');\n }\n var rect = element.getClientRects()[0];\n return {\n left: rect.left + window.pageXOffset,\n right: rect.right + window.pageXOffset,\n top: rect.top + window.pageYOffset,\n bottom: rect.bottom + window.pageYOffset\n };\n});\n\n/**\n * Creates and returns a new debounced version of the passed function which will postpone its execution until after wait milliseconds have elapsed\n * @param {Function} func to debounce\n * @param {number} time to wait before calling function with latest arguments, 0 - no debounce\n * @returns {function} - debounced function\n */\nvar debounce = (function (func, wait) {\n if (wait === void 0) { wait = 0; }\n var timeout;\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n clearTimeout(timeout);\n timeout = setTimeout(function () {\n func.apply(void 0, args);\n }, wait);\n };\n});\n\n/* eslint-env browser */\n/**\n * Get position of the element relatively to its sibling elements\n * @param {HTMLElement} element\n * @returns {number}\n */\nvar getIndex = (function (element, elementList) {\n if (!(element instanceof HTMLElement) || !(elementList instanceof NodeList || elementList instanceof HTMLCollection || elementList instanceof Array)) {\n throw new Error('You must provide an element and a list of elements.');\n }\n return Array.from(elementList).indexOf(element);\n});\n\n/* eslint-env browser */\n/**\n * Test whether element is in DOM\n * @param {HTMLElement} element\n * @returns {boolean}\n */\nvar isInDom = (function (element) {\n if (!(element instanceof HTMLElement)) {\n throw new Error('Element is not a node element.');\n }\n return element.parentNode !== null;\n});\n\n/* eslint-env browser */\n/**\n * Insert node before or after target\n * @param {HTMLElement} referenceNode - reference element\n * @param {HTMLElement} newElement - element to be inserted\n * @param {String} position - insert before or after reference element\n */\nvar insertNode = function (referenceNode, newElement, position) {\n if (!(referenceNode instanceof HTMLElement) || !(referenceNode.parentElement instanceof HTMLElement)) {\n throw new Error('target and element must be a node');\n }\n referenceNode.parentElement.insertBefore(newElement, (position === 'before' ? referenceNode : referenceNode.nextElementSibling));\n};\n/**\n * Insert before target\n * @param {HTMLElement} target\n * @param {HTMLElement} element\n */\nvar insertBefore = function (target, element) { return insertNode(target, element, 'before'); };\n/**\n * Insert after target\n * @param {HTMLElement} target\n * @param {HTMLElement} element\n */\nvar insertAfter = function (target, element) { return insertNode(target, element, 'after'); };\n\n/* eslint-env browser */\n/**\n * Filter only wanted nodes\n * @param {HTMLElement} sortableContainer\n * @param {Function} customSerializer\n * @returns {Array}\n */\nvar serialize = (function (sortableContainer, customItemSerializer, customContainerSerializer) {\n if (customItemSerializer === void 0) { customItemSerializer = function (serializedItem, sortableContainer) { return serializedItem; }; }\n if (customContainerSerializer === void 0) { customContainerSerializer = function (serializedContainer) { return serializedContainer; }; }\n // check for valid sortableContainer\n if (!(sortableContainer instanceof HTMLElement) || !sortableContainer.isSortable === true) {\n throw new Error('You need to provide a sortableContainer to be serialized.');\n }\n // check for valid serializers\n if (typeof customItemSerializer !== 'function' || typeof customContainerSerializer !== 'function') {\n throw new Error('You need to provide a valid serializer for items and the container.');\n }\n // get options\n var options = addData(sortableContainer, 'opts');\n var item = options.items;\n // serialize container\n var items = filter(sortableContainer.children, item);\n var serializedItems = items.map(function (item) {\n return {\n parent: sortableContainer,\n node: item,\n html: item.outerHTML,\n index: getIndex(item, items)\n };\n });\n // serialize container\n var container = {\n node: sortableContainer,\n itemCount: serializedItems.length\n };\n return {\n container: customContainerSerializer(container),\n items: serializedItems.map(function (item) { return customItemSerializer(item, sortableContainer); })\n };\n});\n\n/* eslint-env browser */\n/**\n * create a placeholder element\n * @param {HTMLElement} sortableElement a single sortable\n * @param {string|undefined} placeholder a string representing an html element\n * @param {string} placeholderClasses a string representing the classes that should be added to the placeholder\n */\nvar makePlaceholder = (function (sortableElement, placeholder, placeholderClass) {\n var _a;\n if (placeholderClass === void 0) { placeholderClass = 'sortable-placeholder'; }\n if (!(sortableElement instanceof HTMLElement)) {\n throw new Error('You must provide a valid element as a sortable.');\n }\n // if placeholder is not an element\n if (!(placeholder instanceof HTMLElement) && placeholder !== undefined) {\n throw new Error('You must provide a valid element as a placeholder or set ot to undefined.');\n }\n // if no placeholder element is given\n if (placeholder === undefined) {\n if (['UL', 'OL'].includes(sortableElement.tagName)) {\n placeholder = document.createElement('li');\n }\n else if (['TABLE', 'TBODY'].includes(sortableElement.tagName)) {\n placeholder = document.createElement('tr');\n // set colspan to always all rows, otherwise the item can only be dropped in first column\n placeholder.innerHTML = '';\n }\n else {\n placeholder = document.createElement('div');\n }\n }\n // add classes to placeholder\n if (typeof placeholderClass === 'string') {\n (_a = placeholder.classList).add.apply(_a, placeholderClass.split(' '));\n }\n return placeholder;\n});\n\n/* eslint-env browser */\n/**\n * Get height of an element including padding\n * @param {HTMLElement} element an dom element\n */\nvar getElementHeight = (function (element) {\n if (!(element instanceof HTMLElement)) {\n throw new Error('You must provide a valid dom element');\n }\n // get calculated style of element\n var style = window.getComputedStyle(element);\n // get only height if element has box-sizing: border-box specified\n if (style.getPropertyValue('box-sizing') === 'border-box') {\n return parseInt(style.getPropertyValue('height'), 10);\n }\n // pick applicable properties, convert to int and reduce by adding\n return ['height', 'padding-top', 'padding-bottom']\n .map(function (key) {\n var int = parseInt(style.getPropertyValue(key), 10);\n return isNaN(int) ? 0 : int;\n })\n .reduce(function (sum, value) { return sum + value; });\n});\n\n/* eslint-env browser */\n/**\n * Get width of an element including padding\n * @param {HTMLElement} element an dom element\n */\nvar getElementWidth = (function (element) {\n if (!(element instanceof HTMLElement)) {\n throw new Error('You must provide a valid dom element');\n }\n // get calculated style of element\n var style = window.getComputedStyle(element);\n // pick applicable properties, convert to int and reduce by adding\n return ['width', 'padding-left', 'padding-right']\n .map(function (key) {\n var int = parseInt(style.getPropertyValue(key), 10);\n return isNaN(int) ? 0 : int;\n })\n .reduce(function (sum, value) { return sum + value; });\n});\n\n/* eslint-env browser */\n/**\n * get handle or return item\n * @param {Array} items\n * @param {string} selector\n */\nvar getHandles = (function (items, selector) {\n if (!(items instanceof Array)) {\n throw new Error('You must provide a Array of HTMLElements to be filtered.');\n }\n if (typeof selector !== 'string') {\n return items;\n }\n return items\n // remove items without handle from array\n .filter(function (item) {\n return item.querySelector(selector) instanceof HTMLElement ||\n (item.shadowRoot && item.shadowRoot.querySelector(selector) instanceof HTMLElement);\n })\n // replace item with handle in array\n .map(function (item) {\n return item.querySelector(selector) || (item.shadowRoot && item.shadowRoot.querySelector(selector));\n });\n});\n\n/**\n * @param {Event} event\n * @returns {HTMLElement}\n */\nvar getEventTarget = (function (event) {\n return (event.composedPath && event.composedPath()[0]) || event.target;\n});\n\n/* eslint-env browser */\n/**\n * defaultDragImage returns the current item as dragged image\n * @param {HTMLElement} draggedElement - the item that the user drags\n * @param {object} elementOffset - an object with the offsets top, left, right & bottom\n * @param {Event} event - the original drag event object\n * @return {object} with element, posX and posY properties\n */\nvar defaultDragImage = function (draggedElement, elementOffset, event) {\n return {\n element: draggedElement,\n posX: event.pageX - elementOffset.left,\n posY: event.pageY - elementOffset.top\n };\n};\n/**\n * attaches an element as the drag image to an event\n * @param {Event} event - the original drag event object\n * @param {HTMLElement} draggedElement - the item that the user drags\n * @param {Function} customDragImage - function to create a custom dragImage\n * @return void\n */\nvar setDragImage = (function (event, draggedElement, customDragImage) {\n // check if event is provided\n if (!(event instanceof Event)) {\n throw new Error('setDragImage requires a DragEvent as the first argument.');\n }\n // check if draggedElement is provided\n if (!(draggedElement instanceof HTMLElement)) {\n throw new Error('setDragImage requires the dragged element as the second argument.');\n }\n // set default function of none provided\n if (!customDragImage) {\n customDragImage = defaultDragImage;\n }\n // check if setDragImage method is available\n if (event.dataTransfer && event.dataTransfer.setDragImage) {\n // get the elements offset\n var elementOffset = offset(draggedElement);\n // get the dragImage\n var dragImage = customDragImage(draggedElement, elementOffset, event);\n // check if custom function returns correct values\n if (!(dragImage.element instanceof HTMLElement) || typeof dragImage.posX !== 'number' || typeof dragImage.posY !== 'number') {\n throw new Error('The customDragImage function you provided must return and object with the properties element[string], posX[integer], posY[integer].');\n }\n // needs to be set for HTML5 drag & drop to work\n event.dataTransfer.effectAllowed = 'copyMove';\n // Firefox requires it to use the event target's id for the data\n event.dataTransfer.setData('text/plain', getEventTarget(event).id);\n // set the drag image on the event\n event.dataTransfer.setDragImage(dragImage.element, dragImage.posX, dragImage.posY);\n }\n});\n\n/**\n * Check if curList accepts items from destList\n * @param {sortable} destination the container an item is move to\n * @param {sortable} origin the container an item comes from\n */\nvar listsConnected = (function (destination, origin) {\n // check if valid sortable\n if (destination.isSortable === true) {\n var acceptFrom = store(destination).getConfig('acceptFrom');\n // check if acceptFrom is valid\n if (acceptFrom !== null && acceptFrom !== false && typeof acceptFrom !== 'string') {\n throw new Error('HTML5Sortable: Wrong argument, \"acceptFrom\" must be \"null\", \"false\", or a valid selector string.');\n }\n if (acceptFrom !== null) {\n return acceptFrom !== false && acceptFrom.split(',').filter(function (sel) {\n return sel.length > 0 && origin.matches(sel);\n }).length > 0;\n }\n // drop in same list\n if (destination === origin) {\n return true;\n }\n // check if lists are connected with connectWith\n if (store(destination).getConfig('connectWith') !== undefined && store(destination).getConfig('connectWith') !== null) {\n return store(destination).getConfig('connectWith') === store(origin).getConfig('connectWith');\n }\n }\n return false;\n});\n\n/**\n * default configurations\n */\nvar defaultConfiguration = {\n items: null,\n // deprecated\n connectWith: null,\n // deprecated\n disableIEFix: null,\n acceptFrom: null,\n copy: false,\n placeholder: null,\n placeholderClass: 'sortable-placeholder',\n draggingClass: 'sortable-dragging',\n hoverClass: false,\n dropTargetContainerClass: false,\n debounce: 0,\n throttleTime: 100,\n maxItems: 0,\n itemSerializer: undefined,\n containerSerializer: undefined,\n customDragImage: null,\n orientation: 'vertical'\n};\n\n/**\n * make sure a function is only called once within the given amount of time\n * @param {Function} fn the function to throttle\n * @param {number} threshold time limit for throttling\n */\n// must use function to keep this context\nfunction throttle (fn, threshold) {\n var _this = this;\n if (threshold === void 0) { threshold = 250; }\n // check function\n if (typeof fn !== 'function') {\n throw new Error('You must provide a function as the first argument for throttle.');\n }\n // check threshold\n if (typeof threshold !== 'number') {\n throw new Error('You must provide a number as the second argument for throttle.');\n }\n var lastEventTimestamp = null;\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var now = Date.now();\n if (lastEventTimestamp === null || now - lastEventTimestamp >= threshold) {\n lastEventTimestamp = now;\n fn.apply(_this, args);\n }\n };\n}\n\n/* eslint-env browser */\n/**\n * enable or disable hoverClass on mouseenter/leave if container Items\n * @param {sortable} sortableContainer a valid sortableContainer\n * @param {boolean} enable enable or disable event\n */\n// export default (sortableContainer: sortable, enable: boolean) => {\nvar enableHoverClass = (function (sortableContainer, enable) {\n if (typeof store(sortableContainer).getConfig('hoverClass') === 'string') {\n var hoverClasses_1 = store(sortableContainer).getConfig('hoverClass').split(' ');\n // add class on hover\n if (enable === true) {\n addEventListener(sortableContainer, 'mousemove', throttle(function (event) {\n // check of no mouse button was pressed when mousemove started == no drag\n if (event.buttons === 0) {\n filter(sortableContainer.children, store(sortableContainer).getConfig('items')).forEach(function (item) {\n var _a, _b;\n if (item !== event.target) {\n (_a = item.classList).remove.apply(_a, hoverClasses_1);\n }\n else {\n (_b = item.classList).add.apply(_b, hoverClasses_1);\n }\n });\n }\n }, store(sortableContainer).getConfig('throttleTime')));\n // remove class on leave\n addEventListener(sortableContainer, 'mouseleave', function () {\n filter(sortableContainer.children, store(sortableContainer).getConfig('items')).forEach(function (item) {\n var _a;\n (_a = item.classList).remove.apply(_a, hoverClasses_1);\n });\n });\n // remove events\n }\n else {\n removeEventListener(sortableContainer, 'mousemove');\n removeEventListener(sortableContainer, 'mouseleave');\n }\n }\n});\n\n/* eslint-env browser */\n/*\n * variables global to the plugin\n */\nvar dragging;\nvar draggingHeight;\nvar draggingWidth;\n/*\n * Keeps track of the initialy selected list, where 'dragstart' event was triggered\n * It allows us to move the data in between individual Sortable List instances\n */\n// Origin List - data from before any item was changed\nvar originContainer;\nvar originIndex;\nvar originElementIndex;\nvar originItemsBeforeUpdate;\n// Previous Sortable Container - we dispatch as sortenter event when a\n// dragged item enters a sortableContainer for the first time\nvar previousContainer;\n// Destination List - data from before any item was changed\nvar destinationItemsBeforeUpdate;\n/**\n * remove event handlers from items\n * @param {Array|NodeList} items\n */\nvar removeItemEvents = function (items) {\n removeEventListener(items, 'dragstart');\n removeEventListener(items, 'dragend');\n removeEventListener(items, 'dragover');\n removeEventListener(items, 'dragenter');\n removeEventListener(items, 'drop');\n removeEventListener(items, 'mouseenter');\n removeEventListener(items, 'mouseleave');\n};\n// Remove container events\nvar removeContainerEvents = function (originContainer, previousContainer) {\n if (originContainer) {\n removeEventListener(originContainer, 'dragleave');\n }\n if (previousContainer && (previousContainer !== originContainer)) {\n removeEventListener(previousContainer, 'dragleave');\n }\n};\n/**\n * getDragging returns the current element to drag or\n * a copy of the element.\n * Is Copy Active for sortable\n * @param {HTMLElement} draggedItem - the item that the user drags\n * @param {HTMLElement} sortable a single sortable\n */\nvar getDragging = function (draggedItem, sortable) {\n var ditem = draggedItem;\n if (store(sortable).getConfig('copy') === true) {\n ditem = draggedItem.cloneNode(true);\n addAttribute(ditem, 'aria-copied', 'true');\n draggedItem.parentElement.appendChild(ditem);\n ditem.style.display = 'none';\n ditem.oldDisplay = draggedItem.style.display;\n }\n return ditem;\n};\n/**\n * Remove data from sortable\n * @param {HTMLElement} sortable a single sortable\n */\nvar removeSortableData = function (sortable) {\n removeData(sortable);\n removeAttribute(sortable, 'aria-dropeffect');\n};\n/**\n * Remove data from items\n * @param {Array|HTMLElement} items\n */\nvar removeItemData = function (items) {\n removeAttribute(items, 'aria-grabbed');\n removeAttribute(items, 'aria-copied');\n removeAttribute(items, 'draggable');\n removeAttribute(items, 'role');\n};\n/**\n * find sortable from element. travels up parent element until found or null.\n * @param {HTMLElement} element a single sortable\n * @param {Event} event - the current event. We need to pass it to be able to\n * find Sortable whith shadowRoot (document fragment has no parent)\n */\nfunction findSortable(element, event) {\n if (event.composedPath) {\n return event.composedPath().find(function (el) { return el.isSortable; });\n }\n while (element.isSortable !== true) {\n element = element.parentElement;\n }\n return element;\n}\n/**\n * Dragging event is on the sortable element. finds the top child that\n * contains the element.\n * @param {HTMLElement} sortableElement a single sortable\n * @param {HTMLElement} element is that being dragged\n */\nfunction findDragElement(sortableElement, element) {\n var options = addData(sortableElement, 'opts');\n var items = filter(sortableElement.children, options.items);\n var itemlist = items.filter(function (ele) {\n return ele.contains(element) || (ele.shadowRoot && ele.shadowRoot.contains(element));\n });\n return itemlist.length > 0 ? itemlist[0] : element;\n}\n/**\n * Destroy the sortable\n * @param {HTMLElement} sortableElement a single sortable\n */\nvar destroySortable = function (sortableElement) {\n var opts = addData(sortableElement, 'opts') || {};\n var items = filter(sortableElement.children, opts.items);\n var handles = getHandles(items, opts.handle);\n // remove event handlers & data from sortable\n removeEventListener(sortableElement, 'dragover');\n removeEventListener(sortableElement, 'dragenter');\n removeEventListener(sortableElement, 'dragstart');\n removeEventListener(sortableElement, 'dragend');\n removeEventListener(sortableElement, 'drop');\n // remove event data from sortable\n removeSortableData(sortableElement);\n // remove event handlers & data from items\n removeEventListener(handles, 'mousedown');\n removeItemEvents(items);\n removeItemData(items);\n removeContainerEvents(originContainer, previousContainer);\n // clear sortable flag\n sortableElement.isSortable = false;\n};\n/**\n * Enable the sortable\n * @param {HTMLElement} sortableElement a single sortable\n */\nvar enableSortable = function (sortableElement) {\n var opts = addData(sortableElement, 'opts');\n var items = filter(sortableElement.children, opts.items);\n var handles = getHandles(items, opts.handle);\n addAttribute(sortableElement, 'aria-dropeffect', 'move');\n addData(sortableElement, '_disabled', 'false');\n addAttribute(handles, 'draggable', 'true');\n // @todo: remove this fix\n // IE FIX for ghost\n // can be disabled as it has the side effect that other events\n // (e.g. click) will be ignored\n if (opts.disableIEFix === false) {\n var spanEl = (document || window.document).createElement('span');\n if (typeof spanEl.dragDrop === 'function') {\n addEventListener(handles, 'mousedown', function () {\n if (items.indexOf(this) !== -1) {\n this.dragDrop();\n }\n else {\n var parent = this.parentElement;\n while (items.indexOf(parent) === -1) {\n parent = parent.parentElement;\n }\n parent.dragDrop();\n }\n });\n }\n }\n};\n/**\n * Disable the sortable\n * @param {HTMLElement} sortableElement a single sortable\n */\nvar disableSortable = function (sortableElement) {\n var opts = addData(sortableElement, 'opts');\n var items = filter(sortableElement.children, opts.items);\n var handles = getHandles(items, opts.handle);\n addAttribute(sortableElement, 'aria-dropeffect', 'none');\n addData(sortableElement, '_disabled', 'true');\n addAttribute(handles, 'draggable', 'false');\n removeEventListener(handles, 'mousedown');\n};\n/**\n * Reload the sortable\n * @param {HTMLElement} sortableElement a single sortable\n * @description events need to be removed to not be double bound\n */\nvar reloadSortable = function (sortableElement) {\n var opts = addData(sortableElement, 'opts');\n var items = filter(sortableElement.children, opts.items);\n var handles = getHandles(items, opts.handle);\n addData(sortableElement, '_disabled', 'false');\n // remove event handlers from items\n removeItemEvents(items);\n removeContainerEvents(originContainer, previousContainer);\n removeEventListener(handles, 'mousedown');\n // remove event handlers from sortable\n removeEventListener(sortableElement, 'dragover');\n removeEventListener(sortableElement, 'dragenter');\n removeEventListener(sortableElement, 'drop');\n};\n/**\n * Public sortable object\n * @param {Array|NodeList} sortableElements\n * @param {object|string} options|method\n */\nfunction sortable(sortableElements, options) {\n // get method string to see if a method is called\n var method = String(options);\n options = options || {};\n // check if the user provided a selector instead of an element\n if (typeof sortableElements === 'string') {\n sortableElements = document.querySelectorAll(sortableElements);\n }\n // if the user provided an element, return it in an array to keep the return value consistant\n if (sortableElements instanceof HTMLElement) {\n sortableElements = [sortableElements];\n }\n sortableElements = Array.prototype.slice.call(sortableElements);\n if (/serialize/.test(method)) {\n return sortableElements.map(function (sortableContainer) {\n var opts = addData(sortableContainer, 'opts');\n return serialize(sortableContainer, opts.itemSerializer, opts.containerSerializer);\n });\n }\n sortableElements.forEach(function (sortableElement) {\n if (/enable|disable|destroy/.test(method)) {\n return sortable[method](sortableElement);\n }\n // log deprecation\n ['connectWith', 'disableIEFix'].forEach(function (configKey) {\n if (Object.prototype.hasOwnProperty.call(options, configKey) && options[configKey] !== null) {\n console.warn(\"HTML5Sortable: You are using the deprecated configuration \\\"\" + configKey + \"\\\". This will be removed in an upcoming version, make sure to migrate to the new options when updating.\");\n }\n });\n // merge options with default options\n options = Object.assign({}, defaultConfiguration, store(sortableElement).config, options);\n // init data store for sortable\n store(sortableElement).config = options;\n // set options on sortable\n addData(sortableElement, 'opts', options);\n // property to define as sortable\n sortableElement.isSortable = true;\n // reset sortable\n reloadSortable(sortableElement);\n // initialize\n var listItems = filter(sortableElement.children, options.items);\n // create element if user defined a placeholder element as a string\n var customPlaceholder;\n if (options.placeholder !== null && options.placeholder !== undefined) {\n var tempContainer = document.createElement(sortableElement.tagName);\n if (options.placeholder instanceof HTMLElement) {\n tempContainer.appendChild(options.placeholder);\n }\n else {\n tempContainer.innerHTML = options.placeholder;\n }\n customPlaceholder = tempContainer.children[0];\n }\n // add placeholder\n store(sortableElement).placeholder = makePlaceholder(sortableElement, customPlaceholder, options.placeholderClass);\n addData(sortableElement, 'items', options.items);\n if (options.acceptFrom) {\n addData(sortableElement, 'acceptFrom', options.acceptFrom);\n }\n else if (options.connectWith) {\n addData(sortableElement, 'connectWith', options.connectWith);\n }\n enableSortable(sortableElement);\n addAttribute(listItems, 'role', 'option');\n addAttribute(listItems, 'aria-grabbed', 'false');\n // enable hover class\n enableHoverClass(sortableElement, true);\n /*\n Handle drag events on draggable items\n Handle is set at the sortableElement level as it will bubble up\n from the item\n */\n addEventListener(sortableElement, 'dragstart', function (e) {\n // ignore dragstart events\n var target = getEventTarget(e);\n if (target.isSortable === true) {\n return;\n }\n e.stopImmediatePropagation();\n if ((options.handle && !target.matches(options.handle)) || target.getAttribute('draggable') === 'false') {\n return;\n }\n var sortableContainer = findSortable(target, e);\n var dragItem = findDragElement(sortableContainer, target);\n // grab values\n originItemsBeforeUpdate = filter(sortableContainer.children, options.items);\n originIndex = originItemsBeforeUpdate.indexOf(dragItem);\n originElementIndex = getIndex(dragItem, sortableContainer.children);\n originContainer = sortableContainer;\n // add transparent clone or other ghost to cursor\n setDragImage(e, dragItem, options.customDragImage);\n // cache selsection & add attr for dragging\n draggingHeight = getElementHeight(dragItem);\n draggingWidth = getElementWidth(dragItem);\n dragItem.classList.add(options.draggingClass);\n dragging = getDragging(dragItem, sortableContainer);\n addAttribute(dragging, 'aria-grabbed', 'true');\n // dispatch sortstart event on each element in group\n sortableContainer.dispatchEvent(new CustomEvent('sortstart', {\n detail: {\n origin: {\n elementIndex: originElementIndex,\n index: originIndex,\n container: originContainer\n },\n item: dragging,\n originalTarget: target\n }\n }));\n });\n /*\n We are capturing targetSortable before modifications with 'dragenter' event\n */\n addEventListener(sortableElement, 'dragenter', function (e) {\n var target = getEventTarget(e);\n var sortableContainer = findSortable(target, e);\n if (sortableContainer && sortableContainer !== previousContainer) {\n destinationItemsBeforeUpdate = filter(sortableContainer.children, addData(sortableContainer, 'items'))\n .filter(function (item) { return item !== store(sortableElement).placeholder; });\n if (options.dropTargetContainerClass) {\n sortableContainer.classList.add(options.dropTargetContainerClass);\n }\n sortableContainer.dispatchEvent(new CustomEvent('sortenter', {\n detail: {\n origin: {\n elementIndex: originElementIndex,\n index: originIndex,\n container: originContainer\n },\n destination: {\n container: sortableContainer,\n itemsBeforeUpdate: destinationItemsBeforeUpdate\n },\n item: dragging,\n originalTarget: target\n }\n }));\n addEventListener(sortableContainer, 'dragleave', function (e) {\n // TODO: rename outTarget to be more self-explanatory\n // e.fromElement for very old browsers, similar to relatedTarget\n var outTarget = e.relatedTarget || e.fromElement;\n if (!e.currentTarget.contains(outTarget)) {\n if (options.dropTargetContainerClass) {\n sortableContainer.classList.remove(options.dropTargetContainerClass);\n }\n sortableContainer.dispatchEvent(new CustomEvent('sortleave', {\n detail: {\n origin: {\n elementIndex: originElementIndex,\n index: originIndex,\n container: sortableContainer\n },\n item: dragging,\n originalTarget: target\n }\n }));\n }\n });\n }\n previousContainer = sortableContainer;\n });\n /*\n * Dragend Event - https://developer.mozilla.org/en-US/docs/Web/Events/dragend\n * Fires each time dragEvent end, or ESC pressed\n * We are using it to clean up any draggable elements and placeholders\n */\n addEventListener(sortableElement, 'dragend', function (e) {\n if (!dragging) {\n return;\n }\n dragging.classList.remove(options.draggingClass);\n addAttribute(dragging, 'aria-grabbed', 'false');\n if (dragging.getAttribute('aria-copied') === 'true' && addData(dragging, 'dropped') !== 'true') {\n dragging.remove();\n }\n dragging.style.display = dragging.oldDisplay;\n delete dragging.oldDisplay;\n var visiblePlaceholder = Array.from(stores.values()).map(function (data) { return data.placeholder; })\n .filter(function (placeholder) { return placeholder instanceof HTMLElement; })\n .filter(isInDom)[0];\n if (visiblePlaceholder) {\n visiblePlaceholder.remove();\n }\n // dispatch sortstart event on each element in group\n sortableElement.dispatchEvent(new CustomEvent('sortstop', {\n detail: {\n origin: {\n elementIndex: originElementIndex,\n index: originIndex,\n container: originContainer\n },\n item: dragging\n }\n }));\n previousContainer = null;\n dragging = null;\n draggingHeight = null;\n draggingWidth = null;\n });\n /*\n * Drop Event - https://developer.mozilla.org/en-US/docs/Web/Events/drop\n * Fires when valid drop target area is hit\n */\n addEventListener(sortableElement, 'drop', function (e) {\n if (!listsConnected(sortableElement, dragging.parentElement)) {\n return;\n }\n e.preventDefault();\n e.stopPropagation();\n addData(dragging, 'dropped', 'true');\n // get the one placeholder that is currently visible\n var visiblePlaceholder = Array.from(stores.values()).map(function (data) {\n return data.placeholder;\n })\n // filter only HTMLElements\n .filter(function (placeholder) { return placeholder instanceof HTMLElement; })\n // only elements in DOM\n .filter(isInDom)[0];\n // attach element after placeholder\n insertAfter(visiblePlaceholder, dragging);\n // remove placeholder from dom\n visiblePlaceholder.remove();\n /*\n * Fires Custom Event - 'sortstop'\n */\n sortableElement.dispatchEvent(new CustomEvent('sortstop', {\n detail: {\n origin: {\n elementIndex: originElementIndex,\n index: originIndex,\n container: originContainer\n },\n item: dragging\n }\n }));\n var placeholder = store(sortableElement).placeholder;\n var originItems = filter(originContainer.children, options.items)\n .filter(function (item) { return item !== placeholder; });\n var destinationContainer = this.isSortable === true ? this : this.parentElement;\n var destinationItems = filter(destinationContainer.children, addData(destinationContainer, 'items'))\n .filter(function (item) { return item !== placeholder; });\n var destinationElementIndex = getIndex(dragging, Array.from(dragging.parentElement.children)\n .filter(function (item) { return item !== placeholder; }));\n var destinationIndex = getIndex(dragging, destinationItems);\n if (options.dropTargetContainerClass) {\n destinationContainer.classList.remove(options.dropTargetContainerClass);\n }\n /*\n * When a list item changed container lists or index within a list\n * Fires Custom Event - 'sortupdate'\n */\n if (originElementIndex !== destinationElementIndex || originContainer !== destinationContainer) {\n sortableElement.dispatchEvent(new CustomEvent('sortupdate', {\n detail: {\n origin: {\n elementIndex: originElementIndex,\n index: originIndex,\n container: originContainer,\n itemsBeforeUpdate: originItemsBeforeUpdate,\n items: originItems\n },\n destination: {\n index: destinationIndex,\n elementIndex: destinationElementIndex,\n container: destinationContainer,\n itemsBeforeUpdate: destinationItemsBeforeUpdate,\n items: destinationItems\n },\n item: dragging\n }\n }));\n }\n });\n var debouncedDragOverEnter = debounce(function (sortableElement, element, pageX, pageY) {\n if (!dragging) {\n return;\n }\n // set placeholder height if forcePlaceholderSize option is set\n if (options.forcePlaceholderSize) {\n store(sortableElement).placeholder.style.height = draggingHeight + 'px';\n store(sortableElement).placeholder.style.width = draggingWidth + 'px';\n }\n // if element the draggedItem is dragged onto is within the array of all elements in list\n // (not only items, but also disabled, etc.)\n if (Array.from(sortableElement.children).indexOf(element) > -1) {\n var thisHeight = getElementHeight(element);\n var thisWidth = getElementWidth(element);\n var placeholderIndex = getIndex(store(sortableElement).placeholder, element.parentElement.children);\n var thisIndex = getIndex(element, element.parentElement.children);\n // Check if `element` is bigger than the draggable. If it is, we have to define a dead zone to prevent flickering\n if (thisHeight > draggingHeight || thisWidth > draggingWidth) {\n // Dead zone?\n var deadZoneVertical = thisHeight - draggingHeight;\n var deadZoneHorizontal = thisWidth - draggingWidth;\n var offsetTop = offset(element).top;\n var offsetLeft = offset(element).left;\n if (placeholderIndex < thisIndex &&\n ((options.orientation === 'vertical' && pageY < offsetTop) ||\n (options.orientation === 'horizontal' && pageX < offsetLeft))) {\n return;\n }\n if (placeholderIndex > thisIndex &&\n ((options.orientation === 'vertical' && pageY > offsetTop + thisHeight - deadZoneVertical) ||\n (options.orientation === 'horizontal' && pageX > offsetLeft + thisWidth - deadZoneHorizontal))) {\n return;\n }\n }\n if (dragging.oldDisplay === undefined) {\n dragging.oldDisplay = dragging.style.display;\n }\n if (dragging.style.display !== 'none') {\n dragging.style.display = 'none';\n }\n // To avoid flicker, determine where to position the placeholder\n // based on where the mouse pointer is relative to the elements\n // vertical center.\n var placeAfter = false;\n try {\n var elementMiddleVertical = offset(element).top + element.offsetHeight / 2;\n var elementMiddleHorizontal = offset(element).left + element.offsetWidth / 2;\n placeAfter = (options.orientation === 'vertical' && (pageY >= elementMiddleVertical)) ||\n (options.orientation === 'horizontal' && (pageX >= elementMiddleHorizontal));\n }\n catch (e) {\n placeAfter = placeholderIndex < thisIndex;\n }\n if (placeAfter) {\n insertAfter(element, store(sortableElement).placeholder);\n }\n else {\n insertBefore(element, store(sortableElement).placeholder);\n }\n // get placeholders from all stores & remove all but current one\n Array.from(stores.values())\n // remove empty values\n .filter(function (data) { return data.placeholder !== undefined; })\n // foreach placeholder in array if outside of current sorableContainer -> remove from DOM\n .forEach(function (data) {\n if (data.placeholder !== store(sortableElement).placeholder) {\n data.placeholder.remove();\n }\n });\n }\n else {\n // get all placeholders from store\n var placeholders = Array.from(stores.values())\n .filter(function (data) { return data.placeholder !== undefined; })\n .map(function (data) {\n return data.placeholder;\n });\n // check if element is not in placeholders\n if (placeholders.indexOf(element) === -1 && sortableElement === element && !filter(element.children, options.items).length) {\n placeholders.forEach(function (element) { return element.remove(); });\n element.appendChild(store(sortableElement).placeholder);\n }\n }\n }, options.debounce);\n // Handle dragover and dragenter events on draggable items\n var onDragOverEnter = function (e) {\n var element = e.target;\n var sortableElement = element.isSortable === true ? element : findSortable(element, e);\n element = findDragElement(sortableElement, element);\n if (!dragging || !listsConnected(sortableElement, dragging.parentElement) || addData(sortableElement, '_disabled') === 'true') {\n return;\n }\n var options = addData(sortableElement, 'opts');\n if (parseInt(options.maxItems) && filter(sortableElement.children, addData(sortableElement, 'items')).length >= parseInt(options.maxItems) && dragging.parentElement !== sortableElement) {\n return;\n }\n e.preventDefault();\n e.stopPropagation();\n e.dataTransfer.dropEffect = store(sortableElement).getConfig('copy') === true ? 'copy' : 'move';\n debouncedDragOverEnter(sortableElement, element, e.pageX, e.pageY);\n };\n addEventListener(listItems.concat(sortableElement), 'dragover', onDragOverEnter);\n addEventListener(listItems.concat(sortableElement), 'dragenter', onDragOverEnter);\n });\n return sortableElements;\n}\nsortable.destroy = function (sortableElement) {\n destroySortable(sortableElement);\n};\nsortable.enable = function (sortableElement) {\n enableSortable(sortableElement);\n};\nsortable.disable = function (sortableElement) {\n disableSortable(sortableElement);\n};\n/* START.TESTS_ONLY */\nsortable.__testing = {\n // add internal methods here for testing purposes\n data: addData,\n removeItemEvents: removeItemEvents,\n removeItemData: removeItemData,\n removeSortableData: removeSortableData,\n removeContainerEvents: removeContainerEvents\n};\n\nexport default sortable;\n"],"names":["addData","element","key","value","undefined","h5s","data","filter","nodes","selector","NodeList","HTMLCollection","Array","Error","from","item","nodeType","matches","stores","Map","Store","this","_config","_placeholder","_data","Object","defineProperty","prototype","get","config","forEach","set","mergedConfig","assign","entries","enumerable","configurable","setConfig","has","getConfig","placeholder","HTMLElement","setData","getData","deleteData","delete","store","sortableElement","addEventListener","eventName","callback","i","length","removeEventListener","addAttribute","attribute","setAttribute","removeAttribute","offset","parentElement","getClientRects","rect","left","window","pageXOffset","right","top","pageYOffset","bottom","getIndex","elementList","indexOf","isInDom","parentNode","insertNode","referenceNode","newElement","position","insertBefore","nextElementSibling","insertAfter","target","getElementHeight","style","getComputedStyle","getPropertyValue","parseInt","map","int","isNaN","reduce","sum","getElementWidth","getHandles","items","querySelector","shadowRoot","getEventTarget","event","composedPath","defaultDragImage","draggedElement","elementOffset","posX","pageX","posY","pageY","listsConnected","destination","origin","isSortable","acceptFrom","split","sel","defaultConfiguration","connectWith","disableIEFix","copy","placeholderClass","draggingClass","hoverClass","dropTargetContainerClass","debounce","throttleTime","maxItems","itemSerializer","containerSerializer","customDragImage","orientation","dragging","draggingHeight","draggingWidth","originContainer","originIndex","originElementIndex","originItemsBeforeUpdate","previousContainer","destinationItemsBeforeUpdate","enableHoverClass","sortableContainer","enable","hoverClasses_1","fn","threshold","_this","lastEventTimestamp","args","_i","arguments","now","Date","apply","throttle","buttons","children","_a","_b","classList","remove","add","removeItemEvents","removeContainerEvents","removeSortableData","sortable","removeItemData","findSortable","find","el","findDragElement","options","itemlist","ele","contains","enableSortable","opts","handles","handle","document","createElement","dragDrop","parent","sortableElements","method","String","querySelectorAll","slice","call","test","customItemSerializer","customContainerSerializer","serializedItem","serializedContainer","serializedItems","node","html","outerHTML","index","container","itemCount","serialize","configKey","hasOwnProperty","console","warn","reloadSortable","customPlaceholder","listItems","tempContainer","tagName","appendChild","innerHTML","includes","makePlaceholder","e","stopImmediatePropagation","getAttribute","dragItem","Event","dataTransfer","setDragImage","dragImage","effectAllowed","id","draggedItem","ditem","cloneNode","display","oldDisplay","getDragging","dispatchEvent","CustomEvent","detail","elementIndex","originalTarget","itemsBeforeUpdate","outTarget","relatedTarget","fromElement","currentTarget","visiblePlaceholder","values","preventDefault","stopPropagation","originItems","destinationContainer","destinationItems","destinationElementIndex","destinationIndex","func","wait","timeout","debouncedDragOverEnter","forcePlaceholderSize","height","width","thisHeight","thisWidth","placeholderIndex","thisIndex","deadZoneVertical","deadZoneHorizontal","offsetTop","offsetLeft","placeAfter","elementMiddleVertical","offsetHeight","elementMiddleHorizontal","offsetWidth","placeholders","clearTimeout","setTimeout","onDragOverEnter","dropEffect","concat","destroy","destroySortable","disable","disableSortable","__testing"],"sourceRoot":""}