/*! Sortable 1.7.0 - MIT | git://github.com/rubaxa/Sortable.git */ !function(t){"use strict";"function"==typeof define&&define.amd?define(t):"undefined"!=typeof module&&void 0!==module.exports?module.exports=t():window.Sortable=t()}(function(){"use strict";if("undefined"==typeof window||!window.document)return function(){throw new Error("Sortable.js requires a window with a document")};var C,E,x,k,N,B,h,v,m,_,P,Y,X,c,o,M,O,d,b,I,t,D={},i=/\s+/g,R=/left|right|inline/,A="Sortable"+(new Date).getTime(),y=window,u=y.document,r=y.parseInt,H=y.setTimeout,e=y.jQuery||y.Zepto,n=y.Polymer,a=!1,l=!1,s="draggable"in u.createElement("div"),f=!navigator.userAgent.match(/(?:Trident.*rv[ :]?11\.|msie)/i)&&((t=u.createElement("x")).style.cssText="pointer-events:auto","auto"===t.style.pointerEvents),L=!1,w=Math.abs,p=Math.min,g=[],T=[],S=function(){return!1},F=it(function(t,e,n){if(n&&e.scroll){var o,i,r,a,l,s,c=n[A],d=e.scrollSensitivity,h=e.scrollSpeed,u=t.clientX,f=t.clientY,p=window.innerWidth,g=window.innerHeight;if(m!==n&&(v=e.scroll,m=n,_=e.scrollFn,!0===v)){v=n;do{if(v.offsetWidth*",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,touchStartThreshold:r(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==j.supportPointer};for(var o in n)!(o in e)&&(e[o]=n[o]);for(var i in W(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&s,q(t,"mousedown",this._onTapStart),q(t,"touchstart",this._onTapStart),e.supportPointer&&q(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(q(t,"dragover",this),q(t,"dragenter",this)),T.push(this._onDragOver),e.store&&this.sort(e.store.get(this))}function U(t,e){"clone"!==t.lastPullMode&&(e=!0),k&&k.state!==e&&(Q(k,"display",e?"none":""),e||k.state&&(t.options.group.revertClone?(N.insertBefore(k,B),t._animate(C,k)):N.insertBefore(k,C)),k.state=e)}function V(t,e,n){if(t){n=n||u;do{if(">*"===e&&t.parentNode===n||ot(t,e))return t}while(void 0,t=(i=(o=t).host)&&i.nodeType?i:o.parentNode)}var o,i;return null}function q(t,e,n){t.addEventListener(e,n,a)}function z(t,e,n){t.removeEventListener(e,n,a)}function G(t,e,n){if(t)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(i," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(i," ")}}function Q(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return u.defaultView&&u.defaultView.getComputedStyle?n=u.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function Z(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i*"!==e&&!ot(t,e)||n++;return n}function ot(t,e){if(t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e)}catch(t){return!1}return!1}function it(t,e){var n,o;return function(){void 0===n&&(n=arguments,o=this,H(function(){1===n.length?t.call(o,n[0]):t.apply(o,n),n=void 0},e))}}function rt(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function at(t){return n&&n.dom?n.dom(t).cloneNode(!0):e?e(t).clone(!0)[0]:t.cloneNode(!0)}function lt(t){return H(t,0)}function st(t){return clearTimeout(t)}return j.prototype={constructor:j,_onTapStart:function(t){var e,n=this,o=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]||s,d=i.filter;if(function(t){g.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&g.push(o)}}(o),!C&&!(/mousedown|pointerdown/.test(a)&&0!==t.button||i.disabled)&&!c.isContentEditable&&(s=V(s,i.draggable,o))&&h!==s){if(e=nt(s,i.draggable),"function"==typeof d){if(d.call(this,t,s,this))return J(n,c,"filter",s,o,o,e),void(r&&t.preventDefault())}else if(d&&(d=d.split(",").some(function(t){if(t=V(c,t.trim(),o))return J(n,t,"filter",s,o,o,e),!0})))return void(r&&t.preventDefault());i.handle&&!V(c,i.handle,o)||this._prepareDragStart(t,l,s,e)}},_prepareDragStart:function(t,e,n,o){var i,r=this,a=r.el,l=r.options,s=a.ownerDocument;n&&!C&&n.parentNode===a&&(d=t,N=a,E=(C=n).parentNode,B=C.nextSibling,h=n,M=l.group,c=o,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,C.style["will-change"]="all",i=function(){r._disableDelayedDrag(),C.draggable=r.nativeDraggable,G(C,l.chosenClass,!0),r._triggerDragStart(t,e),J(r,N,"choose",C,N,N,c)},l.ignore.split(",").forEach(function(t){Z(C,t.trim(),$)}),q(s,"mouseup",r._onDrop),q(s,"touchend",r._onDrop),q(s,"touchcancel",r._onDrop),q(s,"selectstart",r),l.supportPointer&&q(s,"pointercancel",r._onDrop),l.delay?(q(s,"mouseup",r._disableDelayedDrag),q(s,"touchend",r._disableDelayedDrag),q(s,"touchcancel",r._disableDelayedDrag),q(s,"mousemove",r._disableDelayedDrag),q(s,"touchmove",r._delayedDragTouchMoveHandler),l.supportPointer&&q(s,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=H(i,l.delay)):i())},_delayedDragTouchMoveHandler:function(t){p(w(t.clientX-this._lastX),w(t.clientY-this._lastY))>=this.options.touchStartThreshold&&this._disableDelayedDrag()},_disableDelayedDrag:function(){var t=this.el.ownerDocument;clearTimeout(this._dragStartTimer),z(t,"mouseup",this._disableDelayedDrag),z(t,"touchend",this._disableDelayedDrag),z(t,"touchcancel",this._disableDelayedDrag),z(t,"mousemove",this._disableDelayedDrag),z(t,"touchmove",this._disableDelayedDrag),z(t,"pointermove",this._disableDelayedDrag)},_triggerDragStart:function(t,e){(e=e||("touch"==t.pointerType?t:null))?(d={target:C,clientX:e.clientX,clientY:e.clientY},this._onDragStart(d,"touch")):this.nativeDraggable?(q(C,"dragend",this),q(N,"dragstart",this._onDragStart)):this._onDragStart(d,!0);try{u.selection?lt(function(){u.selection.empty()}):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(){if(N&&C){var t=this.options;G(C,t.ghostClass,!0),G(C,t.dragClass,!1),J(j.active=this,N,"start",C,N,N,c)}else this._nulling()},_emulateDragOver:function(){if(b){if(this._lastX===b.clientX&&this._lastY===b.clientY)return;this._lastX=b.clientX,this._lastY=b.clientY,f||Q(x,"display","none");for(var t=u.elementFromPoint(b.clientX,b.clientY),e=t,n=T.length;t&&t.shadowRoot;)e=t=t.shadowRoot.elementFromPoint(b.clientX,b.clientY);if(e)do{if(e[A]){for(;n--;)T[n]({clientX:b.clientX,clientY:b.clientY,target:t,rootEl:e});break}t=e}while(e=e.parentNode);f||Q(x,"display","")}},_onTouchMove:function(t){if(d){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=i.clientX-d.clientX+o.x,a=i.clientY-d.clientY+o.y,l=t.touches?"translate3d("+r+"px,"+a+"px,0)":"translate("+r+"px,"+a+"px)";if(!j.active){if(n&&p(w(i.clientX-this._lastX),w(i.clientY-this._lastY))C.offsetWidth,_=e.offsetHeight>C.offsetHeight,b=.5<(v?(t.clientX-o.left)/p:(t.clientY-o.top)/g),D=e.nextElementSibling,y=!1;if(v){var w=C.offsetTop,T=e.offsetTop;y=w===T?e.previousElementSibling===C&&!m||b&&m:e.previousElementSibling===C||C.previousElementSibling===e?.5<(t.clientY-o.top)/g:w