-
+
+
\ No newline at end of file
diff --git a/components/icons/book-svg.vue b/components/icons/book-svg.vue
new file mode 100644
index 00000000..b2e459a4
--- /dev/null
+++ b/components/icons/book-svg.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/components/icons/comic-svg.vue b/components/icons/comic-svg.vue
new file mode 100644
index 00000000..30903253
--- /dev/null
+++ b/components/icons/comic-svg.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/components/icons/database-svg.vue b/components/icons/database-svg.vue
new file mode 100644
index 00000000..10929b16
--- /dev/null
+++ b/components/icons/database-svg.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/components/icons/podcast-svg.vue b/components/icons/podcast-svg.vue
new file mode 100644
index 00000000..d025ab0d
--- /dev/null
+++ b/components/icons/podcast-svg.vue
@@ -0,0 +1,19 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/components/modals/FilterModal.vue b/components/modals/FilterModal.vue
index 83e95619..36b0e922 100644
--- a/components/modals/FilterModal.vue
+++ b/components/modals/FilterModal.vue
@@ -56,7 +56,7 @@ export default {
data() {
return {
sublist: null,
- items: [
+ bookItems: [
{
text: 'All',
value: 'all'
@@ -96,6 +96,22 @@ export default {
value: 'issues',
sublist: false
}
+ ],
+ podcastItems: [
+ {
+ text: 'All',
+ value: 'all'
+ },
+ {
+ text: 'Genre',
+ value: 'genres',
+ sublist: true
+ },
+ {
+ text: 'Tag',
+ value: 'tags',
+ sublist: true
+ }
]
}
},
@@ -124,6 +140,13 @@ export default {
this.$emit('update:filterBy', val)
}
},
+ isPodcast() {
+ return this.$store.getters['libraries/getCurrentLibraryMediaType'] === 'podcast'
+ },
+ items() {
+ if (this.isPodcast) return this.podcastItems
+ return this.bookItems
+ },
selectedItemSublist() {
return this.selected && this.selected.includes('.') ? this.selected.split('.')[0] : false
},
diff --git a/components/modals/LibrariesModal.vue b/components/modals/LibrariesModal.vue
index 83cb6902..1876e030 100644
--- a/components/modals/LibrariesModal.vue
+++ b/components/modals/LibrariesModal.vue
@@ -13,10 +13,7 @@
-
-
+
{{ library.name }}
diff --git a/components/modals/OrderModal.vue b/components/modals/OrderModal.vue
index 06f5bfc9..125f75bd 100644
--- a/components/modals/OrderModal.vue
+++ b/components/modals/OrderModal.vue
@@ -26,7 +26,7 @@ export default {
},
data() {
return {
- items: [
+ bookItems: [
{
text: 'Title',
value: 'media.metadata.title'
@@ -47,6 +47,32 @@ export default {
text: 'Size',
value: 'size'
}
+ ],
+ podcastItems: [
+ {
+ text: 'Title',
+ value: 'media.metadata.title'
+ },
+ {
+ text: 'Author',
+ value: 'media.metadata.author'
+ },
+ {
+ text: 'Added At',
+ value: 'addedAt'
+ },
+ {
+ text: 'Size',
+ value: 'size'
+ },
+ {
+ text: 'File Birthtime',
+ value: 'birthtimeMs'
+ },
+ {
+ text: 'File Modified',
+ value: 'mtimeMs'
+ }
]
}
},
@@ -74,6 +100,13 @@ export default {
set(val) {
this.$emit('update:descending', val)
}
+ },
+ isPodcast() {
+ return this.$store.getters['libraries/getCurrentLibraryMediaType'] === 'podcast'
+ },
+ items() {
+ if (this.isPodcast) return this.podcastItems
+ return this.bookItems
}
},
methods: {
diff --git a/components/tables/podcast/EpisodeRow.vue b/components/tables/podcast/EpisodeRow.vue
index 5f43b19c..24c8e0c9 100644
--- a/components/tables/podcast/EpisodeRow.vue
+++ b/components/tables/podcast/EpisodeRow.vue
@@ -1,12 +1,14 @@
-
-
+
+
-
+
+
Published {{ $formatDate(publishedAt, 'MMM do, yyyy') }}
+
{{ title }}
@@ -19,10 +21,8 @@
{{ timeRemaining }}
-
{{ downloadItem ? 'downloading' : 'download' }}
-
-
Published {{ $formatDate(publishedAt, 'MMM do, yyyy') }}
+
{{ downloadItem ? 'downloading' : 'download' }}
diff --git a/components/tables/podcast/EpisodesTable.vue b/components/tables/podcast/EpisodesTable.vue
index 590ac4dc..8b3516b7 100644
--- a/components/tables/podcast/EpisodesTable.vue
+++ b/components/tables/podcast/EpisodesTable.vue
@@ -1,5 +1,7 @@
+
Episodes ({{ episodes.length }})
+
diff --git a/components/widgets/LibraryIcon.vue b/components/widgets/LibraryIcon.vue
new file mode 100644
index 00000000..7d8d50ff
--- /dev/null
+++ b/components/widgets/LibraryIcon.vue
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/mixins/bookshelfCardsHelpers.js b/mixins/bookshelfCardsHelpers.js
index 15a7ad54..4b9583e7 100644
--- a/mixins/bookshelfCardsHelpers.js
+++ b/mixins/bookshelfCardsHelpers.js
@@ -48,6 +48,11 @@ export default {
bookCoverAspectRatio: this.bookCoverAspectRatio
}
if (this.entityName === 'series-books') props.showSequence = true
+ if (this.entityName === 'books') {
+ props.filterBy = this.filterBy
+ props.orderBy = this.orderBy
+ props.sortingIgnorePrefix = !!this.sortingIgnorePrefix
+ }
var _this = this
var instance = new ComponentClass({
diff --git a/nuxt.config.js b/nuxt.config.js
index ebd84b69..6c997c9f 100644
--- a/nuxt.config.js
+++ b/nuxt.config.js
@@ -24,6 +24,11 @@ export default {
{ hid: 'description', name: 'description', content: '' },
{ name: 'format-detection', content: 'telephone=no' }
],
+ script: [
+ {
+ src: '/libs/sortable.js'
+ }
+ ],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
{ rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Ubuntu+Mono&family=Source+Sans+Pro:wght@300;400;600' },
diff --git a/package-lock.json b/package-lock.json
index 1f530cf6..b1a04c5f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -30494,6 +30494,11 @@
}
}
},
+ "sortablejs": {
+ "version": "1.10.2",
+ "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.10.2.tgz",
+ "integrity": "sha512-YkPGufevysvfwn5rfdlGyrGjt7/CRHwvRPogD/lC+TnvcN29jDpCifKP+rBqf+LRldfXSTh+0CGLcSg0VIxq3A=="
+ },
"source-list-map": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz",
@@ -31910,6 +31915,14 @@
"integrity": "sha512-khZR8t3NWZ/JJ2MZxXLbesHrRJ8AKa75PY5Zq8yMifF9x8lHq8ljYkC0d2PD9yahooygQB5tcFyRDkbbIPx8hw==",
"requires": {}
},
+ "vuedraggable": {
+ "version": "2.24.3",
+ "resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.24.3.tgz",
+ "integrity": "sha512-6/HDXi92GzB+Hcs9fC6PAAozK1RLt1ewPTLjK0anTYguXLAeySDmcnqE8IC0xa7shvSzRjQXq3/+dsZ7ETGF3g==",
+ "requires": {
+ "sortablejs": "1.10.2"
+ }
+ },
"vuex": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz",
diff --git a/package.json b/package.json
index 65c0a2d1..7b195a0b 100644
--- a/package.json
+++ b/package.json
@@ -30,7 +30,8 @@
"libarchive.js": "^1.3.0",
"nuxt": "^2.15.7",
"socket.io-client": "^4.1.3",
- "vue-toastification": "^1.7.11"
+ "vue-toastification": "^1.7.11",
+ "vuedraggable": "^2.24.3"
},
"devDependencies": {
"@babel/core": "7.13.15",
diff --git a/pages/bookshelf/series/_id.vue b/pages/bookshelf/series/_id.vue
index 8bfae679..2167bd5f 100644
--- a/pages/bookshelf/series/_id.vue
+++ b/pages/bookshelf/series/_id.vue
@@ -4,7 +4,7 @@
-
\ No newline at end of file
diff --git a/pages/search.vue b/pages/search.vue
index e76af041..96fdcbba 100644
--- a/pages/search.vue
+++ b/pages/search.vue
@@ -11,28 +11,37 @@
Nothing found
Books
-
-
-
-
+
+
+
+
+
+
+
+
+ Podcasts
+
+
+
+
Series
-
-
-
+
+
+
Authors
-
-
-
+
+
+
@@ -49,6 +58,7 @@ export default {
lastSearch: null,
isFetching: false,
bookResults: [],
+ podcastResults: [],
seriesResults: [],
authorResults: []
}
@@ -61,7 +71,7 @@ export default {
return this.$store.getters['getBookCoverAspectRatio']
},
totalResults() {
- return this.bookResults.length + this.seriesResults.length + this.authorResults.length
+ return this.bookResults.length + this.seriesResults.length + this.authorResults.length + this.podcastResults.length
}
},
methods: {
@@ -69,6 +79,7 @@ export default {
this.lastSearch = value
if (!this.lastSearch) {
this.bookResults = []
+ this.podcastResults = []
this.seriesResults = []
this.authorResults = []
return
@@ -82,7 +93,8 @@ export default {
this.isFetching = false
- this.bookResults = results ? results.audiobooks || [] : []
+ this.bookResults = results ? results.book || [] : []
+ this.podcastResults = results ? results.podcast || [] : []
this.seriesResults = results ? results.series || [] : []
this.authorResults = results ? results.authors || [] : []
},
diff --git a/plugins/capacitor/AbsDatabase.js b/plugins/capacitor/AbsDatabase.js
index 09541c23..bd316aba 100644
--- a/plugins/capacitor/AbsDatabase.js
+++ b/plugins/capacitor/AbsDatabase.js
@@ -111,6 +111,30 @@ class AbsDatabaseWeb extends WebPlugin {
isLocal: true,
localFileId: 'lf1',
audioProbeResult: {}
+ },
+ {
+ index: 2,
+ startOffset: 0,
+ duration: 15000,
+ title: 'Track Title 2',
+ contentUrl: 'test2',
+ mimeType: 'audio/mpeg',
+ metadata: null,
+ isLocal: true,
+ localFileId: 'lf2',
+ audioProbeResult: {}
+ },
+ {
+ index: 3,
+ startOffset: 0,
+ duration: 20000,
+ title: 'Track Title 3',
+ contentUrl: 'test3',
+ mimeType: 'audio/mpeg',
+ metadata: null,
+ isLocal: true,
+ localFileId: 'lf3',
+ audioProbeResult: {}
}
]
},
@@ -170,6 +194,10 @@ class AbsDatabaseWeb extends WebPlugin {
async syncLocalMediaProgressWithServer() {
return null
}
+
+ async updateLocalTrackOrder({ localLibraryItemId, tracks }) {
+ return []
+ }
}
const AbsDatabase = registerPlugin('AbsDatabase', {
diff --git a/plugins/db.js b/plugins/db.js
index 91177e41..5c9755d0 100644
--- a/plugins/db.js
+++ b/plugins/db.js
@@ -94,6 +94,10 @@ class DbService {
syncLocalMediaProgressWithServer() {
return AbsDatabase.syncLocalMediaProgressWithServer()
}
+
+ updateLocalTrackOrder(payload) {
+ return AbsDatabase.updateLocalTrackOrder(payload)
+ }
}
export default ({ app, store }, inject) => {
diff --git a/static/lib/sortable.js b/static/lib/sortable.js
new file mode 100644
index 00000000..17bb16c7
--- /dev/null
+++ b/static/lib/sortable.js
@@ -0,0 +1,2 @@
+/*! Sortable 1.15.0 - MIT | git://github.com/SortableJS/Sortable.git */
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sortable=e()}(this,function(){"use strict";function e(e,t){var n,o=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)),o}function M(o){for(var t=1;tt.length)&&(e=t.length);for(var n=0,o=new Array(e);n"===e[0]&&(e=e.substring(1)),t))try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return}}function N(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"!==e[0]||t.parentNode===n)&&p(t,e)||o&&t===n)return t}while(t!==n&&(t=(i=t).host&&i!==document&&i.host.nodeType?i.host:i.parentNode))}var i;return null}var g,m=/\s+/g;function I(t,e,n){var o;t&&e&&(t.classList?t.classList[n?"add":"remove"](e):(o=(" "+t.className+" ").replace(m," ").replace(" "+e+" "," "),t.className=(o+(n?" "+e:"")).replace(m," ")))}function P(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];o[e=!(e in o||-1!==e.indexOf("webkit"))?"-webkit-"+e:e]=n+("string"==typeof n?"":"px")}}function v(t,e){var n="";if("string"==typeof t)n=t;else do{var o=P(t,"transform")}while(o&&"none"!==o&&(n=o+" "+n),!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function b(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i=n.left-e&&i<=n.right+e,e=r>=n.top-e&&r<=n.bottom+e;return o&&e?a=t:void 0}}),a);if(e){var n,o={};for(n in t)t.hasOwnProperty(n)&&(o[n]=t[n]);o.target=o.rootEl=e,o.preventDefault=void 0,o.stopPropagation=void 0,e[j]._onDragOver(o)}}var i,r,a}function Yt(t){q&&q.parentNode[j]._isOutsideThisEl(t.target)}function Bt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=a({},e),t[j]=this;var n,o,i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return It(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.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:!1!==Bt.supportPointer&&"PointerEvent"in window&&!u,emptyInsertThreshold:5};for(n in K.initializePlugins(this,t,i),i)n in e||(e[n]=i[n]);for(o in Pt(e),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&Mt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?h(t,"pointerdown",this._onTapStart):(h(t,"mousedown",this._onTapStart),h(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(h(t,"dragover",this),h(t,"dragenter",this)),Et.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),a(this,x())}function Ft(t,e,n,o,i,r,a,l){var s,c,u=t[j],d=u.options.onMove;return!window.CustomEvent||y||w?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=i||e,s.relatedRect=r||k(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),c=d?d.call(u,s,a):c}function jt(t){t.draggable=!1}function Ht(){Ct=!1}function Lt(t){return setTimeout(t,0)}function Kt(t){return clearTimeout(t)}Bt.prototype={constructor:Bt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(gt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,q):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,o=this.el,t=this.options,i=t.preventOnFilter,r=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=t.filter;if(!function(t){Tt.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&Tt.push(o)}}(o),!q&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||t.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!u||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=N(l,t.draggable,o,!1))&&l.animated||J===l)){if(nt=B(l),it=B(l,t.draggable),"function"==typeof c){if(c.call(this,e,l,this))return U({sortable:n,rootEl:s,name:"filter",targetEl:l,toEl:o,fromEl:o}),z("filter",n,{evt:e}),void(i&&e.cancelable&&e.preventDefault())}else if(c=c&&c.split(",").some(function(t){if(t=N(s,t.trim(),o,!1))return U({sortable:n,rootEl:t,name:"filter",targetEl:l,fromEl:o,toEl:o}),z("filter",n,{evt:e}),!0}))return void(i&&e.cancelable&&e.preventDefault());t.handle&&!N(s,t.handle,o,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,a=i.options,l=r.ownerDocument;n&&!q&&n.parentNode===r&&(o=k(n),$=r,V=(q=n).parentNode,Q=q.nextSibling,J=n,at=a.group,st={target:Bt.dragged=q,clientX:(e||t).clientX,clientY:(e||t).clientY},ht=st.clientX-o.left,ft=st.clientY-o.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,q.style["will-change"]="all",o=function(){z("delayEnded",i,{evt:t}),Bt.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!s&&i.nativeDraggable&&(q.draggable=!0),i._triggerDragStart(t,e),U({sortable:i,name:"choose",originalEvent:t}),I(q,a.chosenClass,!0))},a.ignore.split(",").forEach(function(t){b(q,t.trim(),jt)}),h(l,"dragover",Xt),h(l,"mousemove",Xt),h(l,"touchmove",Xt),h(l,"mouseup",i._onDrop),h(l,"touchend",i._onDrop),h(l,"touchcancel",i._onDrop),s&&this.nativeDraggable&&(this.options.touchStartThreshold=4,q.draggable=!0),z("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(w||y)?o():Bt.eventCanceled?this._onDrop():(h(l,"mouseup",i._disableDelayedDrag),h(l,"touchend",i._disableDelayedDrag),h(l,"touchcancel",i._disableDelayedDrag),h(l,"mousemove",i._delayedDragTouchMoveHandler),h(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&h(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)))},_delayedDragTouchMoveHandler:function(t){t=t.touches?t.touches[0]:t;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(){q&&jt(q),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;f(t,"mouseup",this._disableDelayedDrag),f(t,"touchend",this._disableDelayedDrag),f(t,"touchcancel",this._disableDelayedDrag),f(t,"mousemove",this._delayedDragTouchMoveHandler),f(t,"touchmove",this._delayedDragTouchMoveHandler),f(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?h(document,"pointermove",this._onTouchMove):h(document,e?"touchmove":"mousemove",this._onTouchMove):(h(q,"dragend",this),h($,"dragstart",this._onDragStart));try{document.selection?Lt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){var n;yt=!1,$&&q?(z("dragStarted",this,{evt:e}),this.nativeDraggable&&h(document,"dragover",Yt),n=this.options,t||I(q,n.dragClass,!1),I(q,n.ghostClass,!0),Bt.active=this,t&&this._appendGhost(),U({sortable:this,name:"start",originalEvent:e})):this._nulling()},_emulateDragOver:function(){if(ct){this._lastX=ct.clientX,this._lastY=ct.clientY,kt();for(var t=document.elementFromPoint(ct.clientX,ct.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ct.clientX,ct.clientY))!==e;)e=t;if(q.parentNode[j]._isOutsideThisEl(t),e)do{if(e[j])if(e[j]._onDragOver({clientX:ct.clientX,clientY:ct.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}while(e=(t=e).parentNode);Rt()}},_onTouchMove:function(t){if(st){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=Z&&v(Z,!0),a=Z&&r&&r.a,l=Z&&r&&r.d,e=Ot&&bt&&E(bt),a=(i.clientX-st.clientX+o.x)/(a||1)+(e?e[0]-_t[0]:0)/(a||1),l=(i.clientY-st.clientY+o.y)/(l||1)+(e?e[1]-_t[1]:0)/(l||1);if(!Bt.active&&!yt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))n.right+10||t.clientX<=n.right&&t.clientY>n.bottom&&t.clientX>=n.left:t.clientX>n.right&&t.clientY>n.top||t.clientX<=n.right&&t.clientY>n.bottom+10}(n,r,this)&&!g.animated){if(g===q)return O(!1);if((l=g&&a===n.target?g:l)&&(w=k(l)),!1!==Ft($,a,q,o,l,w,n,!!l))return x(),g&&g.nextSibling?a.insertBefore(q,g.nextSibling):a.appendChild(q),V=a,A(),O(!0)}else if(g&&function(t,e,n){n=k(X(n.el,0,n.options,!0));return e?t.clientX= n.left - i && t <= n.right + i, a = e >= n.top - i && e <= n.bottom + i; if (r && a) return d[o] } }(t.clientX, t.clientY); e && e[lt]._onDragOver({ clientX: t.clientX, clientY: t.clientY, target: e, rootEl: e }) } }; function mt(t, e) { if (!t || !t.nodeType || 1 !== t.nodeType) throw "Sortable: `el` must be HTMLElement, not " + {}.toString.call(t); this.el = t, this.options = e = Bt({}, e), t[lt] = this; var o = { group: null, sort: !0, disabled: !1, store: null, handle: null, scroll: !0, scrollSensitivity: 30, scrollSpeed: 10, bubbleScroll: !0, draggable: /[uo]l/i.test(t.nodeName) ? ">li" : ">*", swapThreshold: 1, invertSwap: !1, invertedSwapThreshold: null, removeCloneOnHide: !0, direction: function () { return P(t, this.options) }, ghostClass: "sortable-ghost", chosenClass: "sortable-chosen", dragClass: "sortable-drag", ignore: "a, img", filter: null, preventOnFilter: !0, animation: 0, easing: null, setData: function (t, e) { t.setData("Text", e.textContent) }, dropBubble: !1, dragoverBubble: !1, dataIdAttr: "data-id", delay: 0, touchStartThreshold: w(window.devicePixelRatio, 10) || 1, forceFallback: !1, fallbackClass: "sortable-fallback", fallbackOnBody: !1, fallbackTolerance: 0, fallbackOffset: { x: 0, y: 0 }, supportPointer: !1 !== mt.supportPointer && ("PointerEvent" in window || window.navigator && "msPointerEnabled" in window.navigator), emptyInsertThreshold: 5 }; for (var n in o) !(n in e) && (e[n] = o[n]); for (var i in W(e), this) "_" === i.charAt(0) && "function" == typeof this[i] && (this[i] = this[i].bind(this)); this.nativeDraggable = !e.forceFallback && a, this.nativeDraggable && (this.options.touchStartThreshold = 1), e.supportPointer ? wt(t, "pointerdown", this._onTapStart) : (wt(t, "mousedown", this._onTapStart), wt(t, "touchstart", this._onTapStart)), this.nativeDraggable && (wt(t, "dragover", this), wt(t, "dragenter", this)), d.push(this.el), e.store && e.store.get && this.sort(e.store.get(this) || []) } function bt(t, e, o, n) { if (t) { o = o || st; do { if (null != e && (">" === e[0] && t.parentNode === o && kt(t, e.substring(1)) || kt(t, e)) || n && t === o) return t; if (t === o) break } while (t = (i = t).host && i !== st && i.host.nodeType ? i.host : i.parentNode) } var i; return null } function wt(t, e, o) { t.addEventListener(e, o, r) } function _t(t, e, o) { t.removeEventListener(e, o, r) } function yt(t, e, o) { if (t && e) if (t.classList) t.classList[o ? "add" : "remove"](e); else { var n = (" " + t.className + " ").replace(i, " ").replace(" " + e + " ", " "); t.className = (n + (o ? " " + e : "")).replace(i, " ") } } function Dt(t, e, o) { var n = t && t.style; if (n) { if (void 0 === o) return st.defaultView && st.defaultView.getComputedStyle ? o = st.defaultView.getComputedStyle(t, "") : t.currentStyle && (o = t.currentStyle), void 0 === e ? o : o[e]; e in n || -1 !== e.indexOf("webkit") || (e = "-webkit-" + e), n[e] = o + ("string" == typeof o ? "" : "px") } } function St(t) { var e = ""; do { var o = Dt(t, "transform"); o && "none" !== o && (e = o + " " + e) } while (t = t.parentNode); return window.DOMMatrix ? new DOMMatrix(e) : window.WebKitCSSMatrix ? new WebKitCSSMatrix(e) : window.CSSMatrix ? new CSSMatrix(e) : void 0 } function Tt(t, e, o) { if (t) { var n = t.getElementsByTagName(e), i = 0, r = n.length; if (o) for (; i < r; i++)o(n[i], i); return n } return [] } function Ct(t, e, o, n, i, r, a, l, s) { var c, d = (t = t || e[lt]).options, h = "on" + o.charAt(0).toUpperCase() + o.substr(1); !window.CustomEvent || dt || _ ? (c = st.createEvent("Event")).initEvent(o, !0, !0) : c = new CustomEvent(o, { bubbles: !0, cancelable: !0 }), c.to = i || e, c.from = r || e, c.item = n || e, c.clone = u, c.oldIndex = a, c.newIndex = l, c.originalEvent = s, c.pullMode = Q ? Q.lastPutMode : void 0, e && e.dispatchEvent(c), d[h] && d[h].call(t, c) } function Et(t, e, o, n, i, r, a, l) { var s, c, d = t[lt], h = d.options.onMove; return !window.CustomEvent || dt || _ ? (s = st.createEvent("Event")).initEvent("move", !0, !0) : s = new CustomEvent("move", { bubbles: !0, cancelable: !0 }), s.to = e, s.from = t, s.dragged = o, s.draggedRect = n, s.related = i || e, s.relatedRect = r || Lt(e), s.willInsertAfter = l, s.originalEvent = a, t.dispatchEvent(s), h && (c = h.call(d, s, a)), c } function xt(t) { t.draggable = !1 } function Nt() { ht = !1 } function Mt(t, e, o) { for (var n = 0, i = 0, r = t.children; i < r.length;) { if ("none" !== r[i].style.display && r[i] !== f && r[i] !== U && bt(r[i], o.draggable, t, !1)) { if (n === e) return r[i]; n++ } i++ } return null } function Pt(t) { for (var e = t.lastElementChild; e && (e === f || "none" === e.style.display);)e = e.previousElementSibling; return e || null } function Xt(t) { return At(U) < At(t) ? 1 : -1 } function Yt(t) { for (var e = t.tagName + t.className + t.src + t.href + t.textContent, o = e.length, n = 0; o--;)n += e.charCodeAt(o); return n.toString(36) } function At(t, e) { var o = 0; if (!t || !t.parentNode) return -1; for (; t && (t = t.previousElementSibling);)"TEMPLATE" !== t.nodeName.toUpperCase() && t !== u && o++; return o } function kt(t, e) { if (t) try { if (t.matches) return t.matches(e); if (t.msMatchesSelector) return t.msMatchesSelector(e); if (t.webkitMatchesSelector) return t.webkitMatchesSelector(e) } catch (t) { return !1 } return !1 } function It(o, n) { return function () { if (!vt) { var t = arguments, e = this; vt = ct(function () { 1 === t.length ? o.call(e, t[0]) : o.apply(e, t), vt = void 0 }, n) } } } function Bt(t, e) { if (t && e) for (var o in e) e.hasOwnProperty(o) && (t[o] = e[o]); return t } function Ot(t) { return o && o.dom ? o.dom(t).cloneNode(!0) : e ? e(t).clone(!0)[0] : t.cloneNode(!0) } function Ht(t) { return ct(t, 0) } function Rt(t) { return clearTimeout(t) } function Lt(t, e, o, n) { if (t.getBoundingClientRect || t === b) { var i, r, a, l, s, c, d; if (d = t !== b && t !== H() ? (r = (i = t.getBoundingClientRect()).top, a = i.left, l = i.bottom, s = i.right, c = i.height, i.width) : (a = r = 0, l = window.innerHeight, s = window.innerWidth, c = window.innerHeight, window.innerWidth), n && t !== b && (o = o || t.parentNode, !dt)) do { if (o && o.getBoundingClientRect && "none" !== Dt(o, "transform")) { var h = o.getBoundingClientRect(); r -= h.top + w(Dt(o, "border-top-width")), a -= h.left + w(Dt(o, "border-left-width")), l = r + i.height, s = a + i.width; break } } while (o = o.parentNode); if (e && t !== b) { var u = St(o || t), f = u && u.a, p = u && u.d; u && (l = (r /= p) + (c /= p), s = (a /= f) + (d /= f)) } return { top: r, left: a, bottom: l, right: s, width: d, height: c } } } function Wt(t, e) { for (var o = O(t, !0), n = Lt(t)[e]; o;) { var i = Lt(o)[e]; if (!("top" === e || "left" === e ? i <= n : n <= i)) return o; if (o === H()) break; o = O(o, !1) } return !1 } function Ft(t) { var e = 0, o = 0, n = H(); if (t) do { var i = St(t), r = i.a, a = i.d; e += t.scrollLeft * r, o += t.scrollTop * a } while (t !== n && (t = t.parentNode)); return [e, o] } return wt(st, "dragover", t), wt(st, "mousemove", t), wt(st, "touchmove", t), mt.prototype = { constructor: mt, _computeIsAligned: function (t) { var e; if (f && !C ? (z(), e = st.elementFromPoint(t.clientX, t.clientY), j()) : e = t.target, e = bt(e, this.options.draggable, this.el, !1), !E && U && U.parentNode === this.el) { for (var o, n, i, r, a, l, s, c, d = this.el.children, h = 0; h < d.length; h++)bt(d[h], this.options.draggable, this.el, !1) && d[h] !== e && (d[h].sortableMouseAligned = (o = t.clientX, n = t.clientY, i = d[h], r = this._getDirection(t, null), this.options, void 0, a = Lt(i), l = "vertical" === r ? a.left : a.top, s = "vertical" === r ? a.right : a.bottom, l < (c = "vertical" === r ? o : n) && c < s)); bt(e, this.options.draggable, this.el, !0) || ($ = null), E = !0, ct(function () { E = !1 }, 30) } }, _getDirection: function (t, e) { return "function" == typeof this.options.direction ? this.options.direction.call(this, t, e, U) : this.options.direction }, _onTapStart: function (t) { if (t.cancelable) { var e, o = this, n = this.el, i = this.options, r = i.preventOnFilter, a = t.type, l = t.touches && t.touches[0], s = (l || t).target, c = t.target.shadowRoot && (t.path && t.path[0] || t.composedPath && t.composedPath()[0]) || s, d = i.filter; if (function (t) { M.length = 0; var e = t.getElementsByTagName("input"), o = e.length; for (; o--;) { var n = e[o]; n.checked && M.push(n) } }(n), (!dt || t.artificialBubble || pt(n, s)) && !U && !(/mousedown|pointerdown/.test(a) && 0 !== t.button || i.disabled || c.isContentEditable)) if (s = bt(s, i.draggable, n, !1)) { if (h !== s) { if (e = At(s, i.draggable), "function" == typeof d) { if (d.call(this, t, s, this)) return Ct(o, c, "filter", s, n, n, e), void (r && t.cancelable && t.preventDefault()) } else if (d && (d = d.split(",").some(function (t) { if (t = bt(c, t.trim(), n, !1)) return Ct(o, t, "filter", s, n, n, e), !0 }))) return void (r && t.cancelable && t.preventDefault()); i.handle && !bt(c, i.handle, n, !1) || this._prepareDragStart(t, l, s, e) } } else dt && gt(n, t, "_onTapStart") } }, _handleAutoScroll: function (e, o) { if (U && this.options.scroll) { var n = e.clientX, i = e.clientY, t = st.elementFromPoint(n, i), r = this; if (o || _ || dt || D) { R(e, r.options, t, o); var a = O(t, !0); !B || l && n === s && i === c || (l && clearInterval(l), l = setInterval(function () { if (U) { var t = O(st.elementFromPoint(n, i), !0); t !== a && (a = t, L(), R(e, r.options, a, o)) } }, 10), s = n, c = i) } else { if (!r.options.bubbleScroll || O(t, !0) === H()) return void L(); R(e, r.options, O(t, !1), !1) } } }, _prepareDragStart: function (t, e, o, n) { var i, r = this, a = r.el, l = r.options, s = a.ownerDocument; o && !U && o.parentNode === a && (q = a, V = (U = o).parentNode, G = U.nextSibling, h = o, Z = l.group, K = n, p = { target: U, clientX: (e || t).clientX, clientY: (e || t).clientY }, this._lastX = (e || t).clientX, this._lastY = (e || t).clientY, U.style["will-change"] = "all", U.style.transition = "", U.style.transform = "", i = function () { r._disableDelayedDragEvents(), !y && r.nativeDraggable && (U.draggable = !0), r._triggerDragStart(t, e), Ct(r, q, "choose", U, q, q, K), yt(U, l.chosenClass, !0) }, l.ignore.split(",").forEach(function (t) { Tt(U, t.trim(), xt) }), l.supportPointer ? wt(s, "pointerup", r._onDrop) : (wt(s, "mouseup", r._onDrop), wt(s, "touchend", r._onDrop), wt(s, "touchcancel", r._onDrop)), y && this.nativeDraggable && (this.options.touchStartThreshold = 4, U.draggable = !0), !l.delay || this.nativeDraggable && (_ || dt) ? i() : (wt(s, "mouseup", r._disableDelayedDrag), wt(s, "touchend", r._disableDelayedDrag), wt(s, "touchcancel", r._disableDelayedDrag), wt(s, "mousemove", r._delayedDragTouchMoveHandler), wt(s, "touchmove", r._delayedDragTouchMoveHandler), l.supportPointer && wt(s, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = ct(i, l.delay))) }, _delayedDragTouchMoveHandler: function (t) { var e = t.touches ? t.touches[0] : t; N(ut(e.clientX - this._lastX), ut(e.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag() }, _disableDelayedDrag: function () { U && xt(U), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents() }, _disableDelayedDragEvents: function () { var t = this.el.ownerDocument; _t(t, "mouseup", this._disableDelayedDrag), _t(t, "touchend", this._disableDelayedDrag), _t(t, "touchcancel", this._disableDelayedDrag), _t(t, "mousemove", this._delayedDragTouchMoveHandler), _t(t, "touchmove", this._delayedDragTouchMoveHandler), _t(t, "pointermove", this._delayedDragTouchMoveHandler) }, _triggerDragStart: function (t, e) { e = e || ("touch" == t.pointerType ? t : null), !this.nativeDraggable || e ? this.options.supportPointer ? wt(st, "pointermove", this._onTouchMove) : wt(st, e ? "touchmove" : "mousemove", this._onTouchMove) : (wt(U, "dragend", this), wt(q, "dragstart", this._onDragStart)); try { st.selection ? Ht(function () { st.selection.empty() }) : window.getSelection().removeAllRanges() } catch (t) { } }, _dragStarted: function (t, e) { if (v = !1, q && U) { this.nativeDraggable && (wt(st, "dragover", this._handleAutoScroll), wt(st, "dragover", F)); var o = this.options; !t && yt(U, o.dragClass, !1), yt(U, o.ghostClass, !0), Dt(U, "transform", ""), mt.active = this, t && this._appendGhost(), Ct(this, q, "start", U, q, q, K, void 0, e) } else this._nulling() }, _emulateDragOver: function (t) { if (k) { if (this._lastX === k.clientX && this._lastY === k.clientY && !t) return; this._lastX = k.clientX, this._lastY = k.clientY, z(); for (var e = st.elementFromPoint(k.clientX, k.clientY), o = e; e && e.shadowRoot;)o = e = e.shadowRoot.elementFromPoint(k.clientX, k.clientY); if (o) do { if (o[lt]) if (o[lt]._onDragOver({ clientX: k.clientX, clientY: k.clientY, target: e, rootEl: o }) && !this.options.dragoverBubble) break; e = o } while (o = o.parentNode); U.parentNode[lt]._computeIsAligned(k), j() } }, _onTouchMove: function (t, e) { if (p) { var o = this.options, n = o.fallbackTolerance, i = o.fallbackOffset, r = t.touches ? t.touches[0] : t, a = f && St(f), l = f && a && a.a, s = f && a && a.d, c = S && g && Ft(g), d = (r.clientX - p.clientX + i.x) / (l || 1) + (c ? c[0] - m[0] : 0) / (l || 1), h = (r.clientY - p.clientY + i.y) / (s || 1) + (c ? c[1] - m[1] : 0) / (s || 1), u = t.touches ? "translate3d(" + d + "px," + h + "px,0)" : "translate(" + d + "px," + h + "px)"; if (!mt.active && !v) { if (n && x(ut(r.clientX - this._lastX), ut(r.clientY - this._lastY)) < n) return; this._onDragStart(t, !0) } !e && this._handleAutoScroll(r, !0), J = !0, k = r, Dt(f, "webkitTransform", u), Dt(f, "mozTransform", u), Dt(f, "msTransform", u), Dt(f, "transform", u), t.cancelable && t.preventDefault() } }, _appendGhost: function () { if (!f) { var t = this.options.fallbackOnBody ? st.body : q, e = Lt(U, !0, t, !S), o = (Dt(U), this.options); if (S) { for (g = t; "static" === Dt(g, "position") && "none" === Dt(g, "transform") && g !== st;)g = g.parentNode; if (g !== st) { var n = Lt(g, !0); e.top -= n.top, e.left -= n.left } g !== st.body && g !== st.documentElement ? (g === st && (g = H()), e.top += g.scrollTop, e.left += g.scrollLeft) : g = H(), m = Ft(g) } yt(f = U.cloneNode(!0), o.ghostClass, !1), yt(f, o.fallbackClass, !0), yt(f, o.dragClass, !0), Dt(f, "box-sizing", "border-box"), Dt(f, "margin", 0), Dt(f, "top", e.top), Dt(f, "left", e.left), Dt(f, "width", e.width), Dt(f, "height", e.height), Dt(f, "opacity", "0.8"), Dt(f, "position", S ? "absolute" : "fixed"), Dt(f, "zIndex", "100000"), Dt(f, "pointerEvents", "none"), t.appendChild(f) } }, _onDragStart: function (t, e) { var o = this, n = t.dataTransfer, i = o.options; (u = Ot(U)).draggable = !1, u.style["will-change"] = "", this._hideClone(), yt(u, o.options.chosenClass, !1), o._cloneId = Ht(function () { o.options.removeCloneOnHide || q.insertBefore(u, U), Ct(o, q, "clone", U) }), !e && yt(U, i.dragClass, !0), e ? (it = !0, o._loopId = setInterval(o._emulateDragOver, 50)) : (_t(st, "mouseup", o._onDrop), _t(st, "touchend", o._onDrop), _t(st, "touchcancel", o._onDrop), n && (n.effectAllowed = "move", i.setData && i.setData.call(o, n, U)), wt(st, "drop", o), Dt(U, "transform", "translateZ(0)")), v = !0, o._dragStartId = Ht(o._dragStarted.bind(o, e, t)), wt(st, "selectstart", o), D && Dt(st.body, "user-select", "none") }, _onDragOver: function (e) { var o, n, t, i = this.el, r = e.target, a = this.options, l = a.group, s = mt.active, c = Z === l, d = a.sort, h = this; if (!ht && (!dt || e.rootEl || e.artificialBubble || pt(i, r))) { if (void 0 !== e.preventDefault && e.cancelable && e.preventDefault(), J = !0, r = bt(r, a.draggable, i, !0), bt(e.target, null, U, !0) || r.animated) return z(!1); if (r !== U && (it = !1), s && !a.disabled && (c ? d || (t = !q.contains(U)) : Q === this || (this.lastPutMode = Z.checkPull(this, s, U, e)) && l.checkPut(this, s, U, e))) { var u = this._getDirection(e, r); if (o = Lt(U), t) return this._hideClone(), V = q, G ? q.insertBefore(U, G) : q.appendChild(U), z(!0); var f = Pt(i); if (f && (I = e, B = u, O = Lt(Pt(i)), H = "vertical" === B ? I.clientY : I.clientX, R = "vertical" === B ? I.clientX : I.clientY, L = "vertical" === B ? O.bottom : O.right, W = "vertical" === B ? O.left : O.top, F = "vertical" === B ? O.right : O.bottom, !("vertical" === B ? F + 10 < R || R <= F && L < H && W <= R : L < H && W < R || H <= L && F + 10 < R) || f.animated)) { if (r && r !== U && r.parentNode === i) { var p, g = 0, v = r.sortableMouseAligned, m = U.parentNode !== i, b = "vertical" === u ? "top" : "left", w = Wt(r, "top") || Wt(U, "top"), _ = w ? w.scrollTop : void 0; if ($ !== r && (et = null, p = Lt(r)[b], rt = !1), C = r, E = u, x = (T = U) === U && nt || Lt(T), N = C === U && nt || Lt(C), M = "vertical" === E ? x.left : x.top, P = "vertical" === E ? x.right : x.bottom, X = "vertical" === E ? x.width : x.height, Y = "vertical" === E ? N.left : N.top, A = "vertical" === E ? N.right : N.bottom, k = "vertical" === E ? N.width : N.height, et = (M === Y || P === A || M + X / 2 === Y + k / 2) && v || m || w || a.invertSwap || "insert" === et || "swap" === et ? ("swap" !== et && (at = a.invertSwap || m), g = function (t, e, o, n, i, r, a) { var l = Lt(e), s = "vertical" === o ? t.clientY : t.clientX, c = "vertical" === o ? l.height : l.width, d = "vertical" === o ? l.top : l.left, h = "vertical" === o ? l.bottom : l.right, u = Lt(U), f = !1; if (!r) if (a && ot < c * n) if (!rt && (1 === tt ? d + c * i / 2 < s : s < h - c * i / 2) && (rt = !0), rt) f = !0; else { "vertical" === o ? u.top : u.left, "vertical" === o ? u.bottom : u.right; if (1 === tt ? s < d + ot : h - ot < s) return -1 * tt } else if (d + c * (1 - n) / 2 < s && s < h - c * (1 - n) / 2) return Xt(e); if ((f = f || r) && (s < d + c * i / 2 || h - c * i / 2 < s)) return d + c / 2 < s ? 1 : -1; return 0 }(e, r, u, a.swapThreshold, null == a.invertedSwapThreshold ? a.swapThreshold : a.invertedSwapThreshold, at, $ === r), "swap") : (g = Xt(r), "insert"), 0 === g) return z(!1); nt = null, tt = g, n = Lt($ = r); var y = r.nextElementSibling, D = !1, S = Et(q, i, U, o, r, n, e, D = 1 === g); if (!1 !== S) return 1 !== S && -1 !== S || (D = 1 === S), ht = !0, ct(Nt, 30), c ? s._hideClone() : s._showClone(this), D && !y ? i.appendChild(U) : r.parentNode.insertBefore(U, D ? y : r), w && ft(w, 0, _ - w.scrollTop), V = U.parentNode, void 0 === p || at || (ot = ut(p - Lt(r)[b])), j(), z(!0) } } else if (f && i === e.target && (r = f), r && (n = Lt(r)), c ? s._hideClone() : s._showClone(this), !1 !== Et(q, i, U, o, r, n, e, !!r)) return i.appendChild(U), V = i, nt = null, j(), z(!0); if (i.contains(U)) return z(!1) } var T, C, E, x, N, M, P, X, Y, A, k, I, B, O, H, R, L, W, F; return dt && !e.rootEl && gt(i, e, "_onDragOver"), !1 } function z(t) { return t && (c ? s._hideClone() : s._showClone(h), s && (yt(U, Q ? Q.options.ghostClass : s.options.ghostClass, !1), yt(U, a.ghostClass, !0)), Q !== h && h !== mt.active ? Q = h : h === mt.active && (Q = null), o && h._animate(o, U), r && n && h._animate(n, r)), (r === U && !U.animated || r === i && !r.animated) && ($ = null), a.dragoverBubble || e.rootEl || r === st || (h._handleAutoScroll(e), U.parentNode[lt]._computeIsAligned(e)), !a.dragoverBubble && e.stopPropagation && e.stopPropagation(), !0 } function j() { Ct(h, q, "change", r, i, q, K, At(U, a.draggable), e) } }, _animate: function (t, e) { var o = this.options.animation; if (o) { var n = Lt(e); if (e === U && (nt = n), 1 === t.nodeType && (t = Lt(t)), t.left + t.width / 2 !== n.left + n.width / 2 || t.top + t.height / 2 !== n.top + n.height / 2) { var i = St(this.el), r = i && i.a, a = i && i.d; Dt(e, "transition", "none"), Dt(e, "transform", "translate3d(" + (t.left - n.left) / (r || 1) + "px," + (t.top - n.top) / (a || 1) + "px,0)"), e.offsetWidth, Dt(e, "transition", "transform " + o + "ms" + (this.options.easing ? " " + this.options.easing : "")), Dt(e, "transform", "translate3d(0,0,0)") } "number" == typeof e.animated && clearTimeout(e.animated), e.animated = ct(function () { Dt(e, "transition", ""), Dt(e, "transform", ""), e.animated = !1 }, o) } }, _offUpEvents: function () { var t = this.el.ownerDocument; _t(st, "touchmove", this._onTouchMove), _t(st, "pointermove", this._onTouchMove), _t(t, "mouseup", this._onDrop), _t(t, "touchend", this._onDrop), _t(t, "pointerup", this._onDrop), _t(t, "touchcancel", this._onDrop), _t(st, "selectstart", this) }, _onDrop: function (t) { var e = this.el, o = this.options; rt = at = B = v = !1, clearInterval(this._loopId), clearInterval(l), L(), clearTimeout(vt), vt = void 0, clearTimeout(this._dragStartTimer), Rt(this._cloneId), Rt(this._dragStartId), _t(st, "mousemove", this._onTouchMove), this.nativeDraggable && (_t(st, "drop", this), _t(e, "dragstart", this._onDragStart), _t(st, "dragover", this._handleAutoScroll), _t(st, "dragover", F)), D && Dt(st.body, "user-select", ""), this._offUpEvents(), t && (J && (t.cancelable && t.preventDefault(), !o.dropBubble && t.stopPropagation()), f && f.parentNode && f.parentNode.removeChild(f), (q === V || Q && "clone" !== Q.lastPutMode) && u && u.parentNode && u.parentNode.removeChild(u), U && (this.nativeDraggable && _t(U, "dragend", this), xt(U), U.style["will-change"] = "", yt(U, Q ? Q.options.ghostClass : this.options.ghostClass, !1), yt(U, this.options.chosenClass, !1), Ct(this, q, "unchoose", U, V, q, K, null, t), q !== V ? (0 <= (n = At(U, o.draggable)) && (Ct(null, V, "add", U, V, q, K, n, t), Ct(this, q, "remove", U, V, q, K, n, t), Ct(null, V, "sort", U, V, q, K, n, t), Ct(this, q, "sort", U, V, q, K, n, t)), Q && Q.save()) : U.nextSibling !== G && 0 <= (n = At(U, o.draggable)) && (Ct(this, q, "update", U, V, q, K, n, t), Ct(this, q, "sort", U, V, q, K, n, t)), mt.active && (null != n && -1 !== n || (n = K), Ct(this, q, "end", U, V, q, K, n, t), this.save()))), this._nulling() }, _nulling: function () { q = U = V = f = G = u = h = X = Y = I.length = l = s = c = p = k = J = n = K = $ = tt = nt = Q = Z = mt.active = null, M.forEach(function (t) { t.checked = !0 }), M.length = 0 }, handleEvent: function (t) { switch (t.type) { case "drop": case "dragend": this._onDrop(t); break; case "dragenter": case "dragover": U && (this._onDragOver(t), function (t) { t.dataTransfer && (t.dataTransfer.dropEffect = "move"); t.cancelable && t.preventDefault() }(t)); break; case "selectstart": t.preventDefault() } }, toArray: function () { for (var t, e = [], o = this.el.children, n = 0, i = o.length, r = this.options; n < i; n++)bt(t = o[n], r.draggable, this.el, !1) && e.push(t.getAttribute(r.dataIdAttr) || Yt(t)); return e }, sort: function (t) { var n = {}, i = this.el; this.toArray().forEach(function (t, e) { var o = i.children[e]; bt(o, this.options.draggable, i, !1) && (n[t] = o) }, this), t.forEach(function (t) { n[t] && (i.removeChild(n[t]), i.appendChild(n[t])) }) }, save: function () { var t = this.options.store; t && t.set && t.set(this) }, closest: function (t, e) { return bt(t, e || this.options.draggable, this.el, !1) }, option: function (t, e) { var o = this.options; if (void 0 === e) return o[t]; o[t] = e, "group" === t && W(o) }, destroy: function () { var t = this.el; t[lt] = null, _t(t, "mousedown", this._onTapStart), _t(t, "touchstart", this._onTapStart), _t(t, "pointerdown", this._onTapStart), this.nativeDraggable && (_t(t, "dragover", this), _t(t, "dragenter", this)), Array.prototype.forEach.call(t.querySelectorAll("[draggable]"), function (t) { t.removeAttribute("draggable") }), this._onDrop(), d.splice(d.indexOf(this.el), 1), this.el = t = null }, _hideClone: function () { u.cloneHidden || (Dt(u, "display", "none"), u.cloneHidden = !0, u.parentNode && this.options.removeCloneOnHide && u.parentNode.removeChild(u)) }, _showClone: function (t) { "clone" === t.lastPutMode ? u.cloneHidden && (q.contains(U) && !this.options.group.revertClone ? q.insertBefore(u, U) : G ? q.insertBefore(u, G) : q.appendChild(u), this.options.group.revertClone && this._animate(U, u), Dt(u, "display", ""), u.cloneHidden = !1) : this._hideClone() } }, wt(st, "touchmove", function (t) { (mt.active || v) && t.cancelable && t.preventDefault() }), mt.utils = { on: wt, off: _t, css: Dt, find: Tt, is: function (t, e) { return !!bt(t, e, t, !1) }, extend: Bt, throttle: It, closest: bt, toggleClass: yt, clone: Ot, index: At, nextTick: Ht, cancelNextTick: Rt, detectDirection: P, getChild: Mt }, mt.create = function (t, e) { return new mt(t, e) }, mt.version = "1.8.4", mt });
\ No newline at end of file