text: /*! PlainDraggable v2.5.12 (c) anseki https://anseki.github.io/plain-draggable/ */
  var PlainDraggable=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n.r(e);var r=500,o=[],i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return setTimeout(t,1e3/60)},a=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return clearTimeout(t)},l=Date.now(),u=void 0;function s(){var t=void 0,e=void 0;u&&(a.call(window,u),u=null),o.forEach(function(e){var n;(n=e.event)&&(e.event=null,e.listener(n),t=!0)}),t?(l=Date.now(),e=!0):Date.now()-l<r&&(e=!0),e&&(u=i.call(window,s))}function d(t){var e=-1;return o.some(function(n,r){return n.listener===t&&(e=r,!0)}),e}var c={add:function(t){var e=void 0;return-1===d(t)?(o.push(e={listener:t}),function(t){e.event=t,u||s()}):null},remove:function(t){var e;(e=d(t))>-1&&(o.splice(e,1),!o.length&&u&&(a.call(window,u),u=null))}},f=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var p=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){p=!0}}))}catch(t){}function v(t,e,n,r){t.addEventListener(e,n,p?r:r.capture)}function h(t,e){if(null!=t&&null!=e)for(var n=0;n<t.length;n++)if(t[n].identifier===e)return t[n];return null}function m(t){return t&&"number"==typeof t.clientX&&"number"==typeof t.clientY}function g(t){t.preventDefault()}var y=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.startHandlers={},this.lastHandlerId=0,this.curPointerClass=null,this.curTouchId=null,this.lastPointerXY={clientX:0,clientY:0},this.lastTouchTime=0,this.options={preventDefault:!0,stopPropagation:!0},e&&["preventDefault","stopPropagation"].forEach(function(t){"boolean"==typeof e[t]&&(n.options[t]=e[t])})}return f(t,[{key:"regStartHandler",value:function(t){var e=this;return e.startHandlers[++e.lastHandlerId]=function(n){var r="mousedown"===n.type?"mouse":"touch",o=Date.now(),i=void 0,a=void 0;if("touch"===r)e.lastTouchTime=o,i=n.changedTouches[0],a=n.changedTouches[0].identifier;else{if(o-e.lastTouchTime<400)return;i=n}if(!m(i))throw new Error("No clientX/clientY");e.curPointerClass&&e.cancel(),t.call(e,i)&&(e.curPointerClass=r,e.curTouchId="touch"===r?a:null,e.lastPointerXY.clientX=i.clientX,e.lastPointerXY.clientY=i.clientY,e.options.preventDefault&&n.preventDefault(),e.options.stopPropagation&&n.stopPropagation())},e.lastHandlerId}},{key:"unregStartHandler",value:function(t){delete this.startHandlers[t]}},{key:"addStartHandler",value:function(t,e){if(!this.startHandlers[e])throw new Error("Invalid handlerId: "+e);return v(t,"mousedown",this.startHandlers[e],{capture:!1,passive:!1}),v(t,"touchstart",this.startHandlers[e],{capture:!1,passive:!1}),v(t,"dragstart",g,{capture:!1,passive:!1}),e}},{key:"removeStartHandler",value:function(t,e){if(!this.startHandlers[e])throw new Error("Invalid handlerId: "+e);return t.removeEventListener("mousedown",this.startHandlers[e],!1),t.removeEventListener("touchstart",this.startHandlers[e],!1),t.removeEventListener("dragstart",g,!1),e}},{key:"addMoveHandler",value:function(t,e){var n=this,r=c.add(function(t){var e="mousemove"===t.type?"mouse":"touch";if("touch"===e&&(n.lastTouchTime=Date.now()),e===n.curPointerClass){var r="touch"===e?h(t.changedTouches,n.curTouchId):t;m(r)&&(r.clientX===n.lastPointerXY.clientX&&r.clientY===n.lastPointerXY.clientY||n.move(r),n.options.preventDefault&&t.preventDefault(),n.options.stopPropagation&&t.stopPropagation())}});v(t,"mousemove",r,{capture:!1,passive:!1}),v(t,"touchmove",r,{capture:!1,passive:!1}),n.curMoveHandler=e}},{key:"move",value:function(t){m(t)&&(this.lastPointerXY.clientX=t.clientX,this.lastPointerXY.clientY=t.clientY),this.curMoveHandler&&this.curMoveHandler(this.lastPointerXY)}},{key:"addEndHandler",value:function(t,e){var n=this;function r(t){var e="mouseup"===t.type?"mouse":"touch";if("touch"===e&&(n.lastTouchTime=Date.now()),e===n.curPointerClass){var r="touch"===e?h(t.changedTouches,n.curTouchId)||(h(t.touches,n.curTouchId)?null:{}):t;r&&(n.end(r),n.options.preventDefault&&t.preventDefault(),n.options.stopPropagation&&t.stopPropagation())}}v(t,"mouseup",r,{capture:!1,passive:!1}),v(t,"touchend",r,{capture:!1,passive:!1}),n.curEndHandler=e}},{key:"end",value:function(t){m(t)&&(this.lastPointerXY.clientX=t.clientX,this.lastPointerXY.clientY=t.clientY),this.curEndHandler&&this.curEndHandler(this.lastPointerXY),this.curPointerClass=this.curTouchId=null}},{key:"addCancelHandler",value:function(t,e){var n=this;v(t,"touchcancel",function(t){n.lastTouchTime=Date.now(),null!=n.curPointerClass&&(h(t.changedTouches,n.curTouchId)||!h(t.touches,n.curTouchId))&&n.cancel()},{capture:!1,passive:!1}),n.curCancelHandler=e}},{key:"cancel",value:function(){this.curCancelHandler&&this.curCancelHandler(),this.curPointerClass=this.curTouchId=null}}],[{key:"addEventListenerWithOptions",get:function(){return v}}]),t}();function x(t){return t.substr(0,1).toUpperCase()+t.substr(1)}var w,b,S,E,T=["webkit","moz","ms","o"],B=T.reduce(function(t,e){return t.push(e),t.push(x(e)),t},[]),C=T.map(function(t){return"-"+t+"-"}),O=(E=void 0,function(){return E=E||document.createElement("div").style}),H=(b=new RegExp("^(?:"+T.join("|")+")(.)","i"),S=/[A-Z]/,function(t){return"float"===(t=(t+"").replace(/\s/g,"").replace(/-([\da-z])/gi,function(t,e){return e.toUpperCase()}).replace(b,function(t,e){return S.test(e)?e.toLowerCase():t})).toLowerCase()?"cssFloat":t}),k=(w=new RegExp("^(?:"+C.join("|")+")","i"),function(t){return(null!=t?t+"":"").replace(/\s/g,"").replace(w,"")}),P=function(t,e){var n=O();return t=t.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()}),n.setProperty(t,e),null!=n[t]&&n.getPropertyValue(t)===e},I={},_={};function D(t){if((t=H(t))&&null==I[t]){var e=O();if(null!=e[t])I[t]=t;else{var n=x(t);B.some(function(r){var o=r+n;return null!=e[o]&&(I[t]=o,!0)})||(I[t]=!1)}}return I[t]||void 0}var X={getName:D,getValue:function(t,e){var n=void 0;return(t=D(t))?(_[t]=_[t]||{},(Array.isArray(e)?e:[e]).some(function(e){return e=k(e),null!=_[t][e]?!1!==_[t][e]&&(n=_[t][e],!0):P(t,e)?(n=_[t][e]=e,!0):!!C.some(function(r){var o=r+e;return!!P(t,o)&&(n=_[t][e]=o,!0)})||(_[t][e]=!1,!1)}),"string"==typeof n?n:void 0):n}};function Y(t){return(t+"").trim()}function A(t,e){e.setAttribute("class",t.join(" "))}function L(t){return!L.ignoreNative&&t.classList||(e=(t.getAttribute("class")||"").trim().split(/\s+/).filter(function(t){return!!t}),n={length:e.length,item:function(t){return e[t]},contains:function(t){return-1!==e.indexOf(Y(t))},add:function(){return function(t,e,n){n.filter(function(e){return!(!(e=Y(e))||-1!==t.indexOf(e)||(t.push(e),0))}).length&&A(t,e)}(e,t,Array.prototype.slice.call(arguments)),L.methodChain?n:void 0},remove:function(){return function(t,e,n){n.filter(function(e){var n=void 0;return!(!(e=Y(e))||-1===(n=t.indexOf(e))||(t.splice(n,1),0))}).length&&A(t,e)}(e,t,Array.prototype.slice.call(arguments)),L.methodChain?n:void 0},toggle:function(n,r){return function(t,e,n,r){var o=t.indexOf(n=Y(n));return-1!==o?!!r||(t.splice(o,1),A(t,e),!1):!1!==r&&(t.push(n),A(t,e),!0)}(e,t,n,r)},replace:function(r,o){return function(t,e,n,r){var o=void 0;(n=Y(n))&&(r=Y(r))&&n!==r&&-1!==(o=t.indexOf(n))&&(t.splice(o,1),-1===t.indexOf(r)&&t.push(r),A(t,e))}(e,t,r,o),L.methodChain?n:void 0}});var e,n}L.methodChain=!0;var F=L,W=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};F.ignoreNative=!0;var R,M,z,N=9e3,V=20,G="tl",q="both",U="both",Z="containment",$=["tl","tr","bl","br"],J=["start","end"],K=["inside","outside"],Q=[40,200,1e3],tt=[100,40,0],et="-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style&&!window.navigator.msPointerEnabled,nt=!et&&!!document.uniqueID,rt="MozAppearance"in document.documentElement.style,ot=!(et||rt||!window.chrome||!window.CSS),it=!et&&!nt&&!rt&&!ot&&!window.chrome&&"WebkitAppearance"in document.documentElement.style,at=(R={}.toString,M={}.hasOwnProperty.toString,z=M.call(Object),function(t){var e=void 0,n=void 0;return t&&"[object Object]"===R.call(t)&&(!(e=Object.getPrototypeOf(t))||(n=e.hasOwnProperty("constructor")&&e.constructor)&&"function"==typeof n&&M.call(n)===z)}),lt=Number.isFinite||function(t){return"number"==typeof t&&window.isFinite(t)},ut={},st={},dt=new y,ct=0,ft=void 0,pt=void 0,vt=void 0,ht=void 0,mt=void 0,gt=void 0,yt=void 0,xt=void 0,wt=void 0,bt=void 0,St=it?["all-scroll","move"]:["grab","all-scroll","move"],Et=it?"move":["grabbing","move"],Tt="plain-draggable",Bt="plain-draggable-dragging",Ct="plain-draggable-moving",Ot={},Ht=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return setTimeout(t,1e3/60)},kt=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return clearTimeout(t)},Pt=function(){var t=Date.now();["x","y"].forEach(function(e){var n=_t[e];if(n){var r=t-n.lastFrameTime,o=Xt(Dt,e),i=null!=n.lastValue&&Math.abs(n.lastValue-o)<10?n.lastValue:o;if(-1===n.dir?i>n.min:i<n.max){var a=i+n.speed*r*n.dir;a<n.min?a=n.min:a>n.max&&(a=n.max),Xt(Dt,e,a),n.lastValue=a}n.lastFrameTime=t}})},It=function t(){kt.call(window,Yt),Pt(),Yt=Ht.call(window,t)},_t={},Dt=void 0,Xt=void 0,Yt=void 0;function At(t,e,n){return null!=n&&("x"===e?t.scrollTo(n,t.pageYOffset):t.scrollTo(t.pageXOffset,n)),"x"===e?t.pageXOffset:t.pageYOffset}function Lt(t,e,n){var r="x"===e?"scrollLeft":"scrollTop";return null!=n&&(t[r]=n),t[r]}function Ft(t){return t?at(t)?Object.keys(t).reduce(function(e,n){return e[n]=Ft(t[n]),e},{}):Array.isArray(t)?t.map(Ft):t:t}function Wt(t,e){var n=void 0,r=void 0;return(void 0===t?"undefined":j(t))!==(void 0===e?"undefined":j(e))||(n=at(t)?"obj":Array.isArray(t)?"array":"")!=(at(e)?"obj":Array.isArray(e)?"array":"")||("obj"===n?Wt(r=Object.keys(t).sort(),Object.keys(e).sort())||r.some(function(n){return Wt(t[n],e[n])}):"array"===n?t.length!==e.length||t.some(function(t,n){return Wt(t,e[n])}):t!==e)}function jt(t){return!(!t||t.nodeType!==Node.ELEMENT_NODE||"function"!=typeof t.getBoundingClientRect||t.compareDocumentPosition(document)&Node.DOCUMENT_POSITION_DISCONNECTED)}function Rt(t){if(!at(t))return null;var e=void 0;if(!lt(e=t.left)&&!lt(e=t.x))return null;if(t.left=t.x=e,!lt(e=t.top)&&!lt(e=t.y))return null;if(t.top=t.y=e,lt(t.width)&&t.width>=0)t.right=t.left+t.width;else{if(!(lt(t.right)&&t.right>=t.left))return null;t.width=t.right-t.left}if(lt(t.height)&&t.height>=0)t.bottom=t.top+t.height;else{if(!(lt(t.bottom)&&t.bottom>=t.top))return null;t.height=t.bottom-t.top}return t}function Mt(t){return lt(t)?{value:t,isRatio:!1}:"string"==typeof t?function(t){var e=/^(.+?)(%)?$/.exec(t),n=void 0,r=void 0;return e&&lt(n=parseFloat(e[1]))?{value:(r=!(!e[2]||!n))?n/100:n,isRatio:r}:null}(t.replace(/\s/g,"")):null}function zt(t){return t.isRatio?100*t.value+"%":t.value}function Nt(t,e,n){return"number"==typeof t?t:e+t.value*(t.isRatio?n:1)}function Vt(t){if(!at(t))return null;var e=void 0;if(!(e=Mt(t.left))&&!(e=Mt(t.x)))return null;if(t.left=t.x=e,!(e=Mt(t.top))&&!(e=Mt(t.y)))return null;if(t.top=t.y=e,(e=Mt(t.width))&&e.value>=0)t.width=e,delete t.right;else{if(!(e=Mt(t.right)))return null;t.right=e,delete t.width}if((e=Mt(t.height))&&e.value>=0)t.height=e,delete t.bottom;else{if(!(e=Mt(t.bottom)))return null;t.bottom=e,delete t.height}return t}function Gt(t){return Object.keys(t).reduce(function(e,n){return e[n]=zt(t[n]),e},{})}function qt(t,e){var n={left:"x",right:"x",x:"x",width:"x",top:"y",bottom:"y",y:"y",height:"y"},r={x:e.left,y:e.top},o={x:e.width,y:e.height};return Rt(Object.keys(t).reduce(function(e,i){return e[i]=Nt(t[i],"width"===i||"height"===i?0:r[n[i]],o[n[i]]),e},{}))}function Ut(t,e){var n=t.getBoundingClientRect(),r={left:n.left,top:n.top,width:n.width,height:n.height};if(r.left+=window.pageXOffset,r.top+=window.pageYOffset,e){var o=window.getComputedStyle(t,""),i=parseFloat(o.borderTopWidth)||0,a=parseFloat(o.borderRightWidth)||0,l=parseFloat(o.borderBottomWidth)||0,u=parseFloat(o.borderLeftWidth)||0;r.left+=u,r.top+=i,r.width-=u+a,r.height-=i+l}return Rt(r)}function Zt(t,e){null==ht&&(!1!==St&&(ht=X.getValue("cursor",St)),null==ht&&(ht=!1)),t.style.cursor=!1===ht?e:ht}function $t(t){null==mt&&(!1!==Et&&(mt=X.getValue("cursor",Et)),null==mt&&(mt=!1)),!1!==mt&&(t.style.cursor=mt)}function Jt(t,e,n){var r=t.svgPoint;return r.x=e,r.y=n,r.matrixTransform(t.svgCtmElement.getScreenCTM().inverse())}function Kt(t,e){var n=t.elementBBox;if(e.left!==n.left||e.top!==n.top){var r=t.htmlOffset;return t.elementStyle[xt]="translate("+(e.left+r.left)+"px, "+(e.top+r.top)+"px)",!0}return!1}function Qt(t,e){var n=t.elementBBox,r=t.elementStyle,o=t.htmlOffset,i=!1;return e.left!==n.left&&(r.left=e.left+o.left+"px",i=!0),e.top!==n.top&&(r.top=e.top+o.top+"px",i=!0),i}function te(t,e){var n=t.elementBBox;if(e.left!==n.left||e.top!==n.top){var r=t.svgOffset,o=t.svgOriginBBox,i=Jt(t,e.left-window.pageXOffset,e.top-window.pageYOffset);return t.svgTransform.setTranslate(i.x+r.x-o.x,i.y+r.y-o.y),!0}return!1}function ee(t,e,n){var r=t.elementBBox;function o(){t.minLeft>=t.maxLeft?e.left=r.left:e.left<t.minLeft?e.left=t.minLeft:e.left>t.maxLeft&&(e.left=t.maxLeft),t.minTop>=t.maxTop?e.top=r.top:e.top<t.minTop?e.top=t.minTop:e.top>t.maxTop&&(e.top=t.maxTop)}if(o(),n){if(!1===n(e))return!1;o()}var i=t.moveElm(t,e);return i&&(t.elementBBox=Rt({left:e.left,top:e.top,width:r.width,height:r.height})),i}function ne(t){var e=t.element,n=t.elementStyle,r=Ut(e),o=["display","marginTop","marginBottom","width","height"];o.unshift(xt);var i=n[yt];n[yt]="none";var a=Ut(e);t.orgStyle?o.forEach(function(e){null!=t.lastStyle[e]&&n[e]!==t.lastStyle[e]||(n[e]=t.orgStyle[e])}):(t.orgStyle=o.reduce(function(t,e){return t[e]=n[e]||"",t},{}),t.lastStyle={});var l=Ut(e),u=window.getComputedStyle(e,"");"inline"===u.display&&(n.display="inline-block",["Top","Bottom"].forEach(function(t){var e=parseFloat(u["padding"+t]);n["margin"+t]=e?"-"+e+"px":"0"})),n[xt]="translate(0, 0)";var s=Ut(e),d=t.htmlOffset={left:s.left?-s.left:0,top:s.top?-s.top:0};return n[xt]="translate("+(r.left+d.left)+"px, "+(r.top+d.top)+"px)",["width","height"].forEach(function(r){s[r]!==l[r]&&(n[r]=l[r]+"px",(s=Ut(e))[r]!==l[r]&&(n[r]=l[r]-(s[r]-l[r])+"px")),t.lastStyle[r]=n[r]}),e.offsetWidth,n[yt]=i,a.left===r.left&&a.top===r.top||(n[xt]="translate("+(a.left+d.left)+"px, "+(a.top+d.top)+"px)"),a}function re(t){var e=t.element,n=t.elementStyle,r=Ut(e),o=["position","marginTop","marginRight","marginBottom","marginLeft","width","height"],i=n[yt];n[yt]="none";var a=Ut(e);t.orgStyle?o.forEach(function(e){null!=t.lastStyle[e]&&n[e]!==t.lastStyle[e]||(n[e]=t.orgStyle[e])}):(t.orgStyle=o.reduce(function(t,e){return t[e]=n[e]||"",t},{}),t.lastStyle={});var l=Ut(e);n.position="absolute",n.left=n.top=n.margin="0";var u=Ut(e),s=t.htmlOffset={left:u.left?-u.left:0,top:u.top?-u.top:0};return n.left=r.left+s.left+"px",n.top=r.top+s.top+"px",["width","height"].forEach(function(r){u[r]!==l[r]&&(n[r]=l[r]+"px",(u=Ut(e))[r]!==l[r]&&(n[r]=l[r]-(u[r]-l[r])+"px")),t.lastStyle[r]=n[r]}),e.offsetWidth,n[yt]=i,a.left===r.left&&a.top===r.top||(n.left=a.left+s.left+"px",n.top=a.top+s.top+"px"),a}function oe(t){var e=t.element,n=t.svgTransform,r=e.getBoundingClientRect(),o=Ut(e);n.setTranslate(0,0);var i=t.svgOriginBBox=e.getBBox(),a=e.getBoundingClientRect(),l=Jt(t,a.left,a.top),u=t.svgOffset={x:i.x-l.x,y:i.y-l.y},s=Jt(t,r.left,r.top);return n.setTranslate(s.x+u.x-i.x,s.y+u.y-i.y),o}function ie(t,e){var n=Ut(document.documentElement),r=t.elementBBox=t.initElm(t),o=t.containmentBBox=t.containmentIsBBox?qt(t.options.containment,n)||n:Ut(t.options.containment,!0);if(t.minLeft=o.left,t.maxLeft=o.right-r.width,t.minTop=o.top,t.maxTop=o.bottom-r.height,ee(t,{left:r.left,top:r.top}),t.parsedSnapTargets){var i={x:r.width,y:r.height},a={x:t.minLeft,y:t.minTop},l={x:t.maxLeft,y:t.maxTop},u={left:"x",right:"x",x:"x",width:"x",xStart:"x",xEnd:"x",xStep:"x",top:"y",bottom:"y",y:"y",height:"y",yStart:"y",yEnd:"y",yStep:"y"},s=t.parsedSnapTargets.reduce(function(t,e){var s="containment"===e.base?o:n,d={x:s.left,y:s.top},c={x:s.width,y:s.height};function f(n){if(null==n.center&&(n.center=e.center),null==n.xGravity&&(n.xGravity=e.gravity),null==n.yGravity&&(n.yGravity=e.gravity),null!=n.x&&null!=n.y)n.x=Nt(n.x,d.x,c.x),n.y=Nt(n.y,d.y,c.y),n.center&&(n.x-=i.x/2,n.y-=i.y/2,n.corners=["tl"]),(n.corners||e.corners).forEach(function(e){var r=n.x-("tr"===e||"br"===e?i.x:0),o=n.y-("bl"===e||"br"===e?i.y:0);if(r>=a.x&&r<=l.x&&o>=a.y&&o<=l.y){var u={x:r,y:o},s=r-n.xGravity,d=r+n.xGravity,c=o-n.yGravity,f=o+n.yGravity;s>a.x&&(u.gravityXStart=s),d<l.x&&(u.gravityXEnd=d),c>a.y&&(u.gravityYStart=c),f<l.y&&(u.gravityYEnd=f),t.push(u)}});else{var r=null!=n.x?"x":"y",o="x"===r?"y":"x",u=o+"Start",s=o+"End",f=r+"Gravity",p=r.toUpperCase(),v=o.toUpperCase(),h="gravity"+p+"Start",m="gravity"+p+"End",g="gravity"+v+"Start",y="gravity"+v+"End";if(n[r]=Nt(n[r],d[r],c[r]),n[u]=Nt(n[u],d[o],c[o]),n[s]=Nt(n[s],d[o],c[o])-i[o],n[u]>n[s]||n[u]>l[o]||n[s]<a[o])return;n.center&&(n[r]-=i[r]/2,n.sides=["start"]),(n.sides||e.sides).forEach(function(e){var d=n[r]-("end"===e?i[r]:0);if(d>=a[r]&&d<=l[r]){var c={},p=d-n[f],v=d+n[f];c[r]=d,p>a[r]&&(c[h]=p),v<l[r]&&(c[m]=v),n[u]>a[o]&&(c[g]=n[u]),n[s]<l[o]&&(c[y]=n[s]),t.push(c)}})}}var p=void 0;if((p=e.element?Ut(e.element):null)||e.ppBBox)e.ppBBox&&(p=qt(e.ppBBox,s)),p&&e.edges.forEach(function(t){var n=e.gravity,o=e.gravity;"outside"===t&&(n+=r.width,o+=r.height);var i=p.left-n,a=p.right+n,l=p.top-o,u=p.bottom+o,s="inside"===t?"start":"end";f({xStart:i,xEnd:a,y:p.top,sides:[s],center:!1}),f({x:p.left,yStart:l,yEnd:u,sides:[s],center:!1}),s="inside"===t?"end":"start",f({xStart:i,xEnd:a,y:p.bottom,sides:[s],center:!1}),f({x:p.right,yStart:l,yEnd:u,sides:[s],center:!1})});else{var v=[["x","y","xStart","xEnd","xStep","yStart","yEnd","yStep"].reduce(function(t,n){return e[n]&&(t[n]=Nt(e[n],"xStep"===n||"yStep"===n?0:d[u[n]],c[u[n]])),t},{})];["x","y"].forEach(function(t){var n=t+"Start",r=t+"End",o=t+"Step",i=t+"Gravity";v=v.reduce(function(a,l){var u=l[n],s=l[r],d=l[o];if(null!=u&&null!=s&&u>=s)return a;if(null!=d){if(d<2)return a;var c=d/2;c=e.gravity>c?c:null;for(var f=u;f<=s;f+=d){var p=Object.keys(l).reduce(function(t,e){return e!==n&&e!==r&&e!==o&&(t[e]=l[e]),t},{});p[t]=f,p[i]=c,a.push(p)}}else a.push(l);return a},[])}),v.forEach(function(t){f(t)})}return t},[]);t.snapTargets=s.length?s:null}var d={},c=t.options.autoScroll;if(c){d.isWindow=c.target===window,d.target=c.target;var f="scroll"===e,p=function(t,e,n){var r,o={},i=void 0,a=void 0,l=void 0;r=e?document.documentElement:t,o.clientWidth=r.clientWidth,o.clientHeight=r.clientHeight;var u=0,s=0;if(!n){var d=void 0,c=void 0;e?(d=At(t,"x"),c=At(t,"y"),i=getComputedStyle(document.documentElement,""),a=getComputedStyle(document.body,""),u=At(t,"x",document.documentElement.scrollWidth+o.clientWidth+["marginLeft","marginRight","borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"].reduce(function(t,e){return t+(parseFloat(i[e])||0)+(parseFloat(a[e])||0)},0)),s=At(t,"y",document.documentElement.scrollHeight+o.clientHeight+["marginTop","marginBottom","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"].reduce(function(t,e){return t+(parseFloat(i[e])||0)+(parseFloat(a[e])||0)},0)),At(t,"x",d),At(t,"y",c)):(d=Lt(t,"x"),c=Lt(t,"y"),l=getComputedStyle(t,""),u=Lt(t,"x",t.scrollWidth+o.clientWidth+["marginLeft","marginRight","borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"].reduce(function(t,e){return t+(parseFloat(l[e])||0)},0)),s=Lt(t,"y",t.scrollHeight+o.clientHeight+["marginTop","marginBottom","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"].reduce(function(t,e){return t+(parseFloat(l[e])||0)},0)),Lt(t,"x",d),Lt(t,"y",c))}o.scrollWidth=o.clientWidth+u,o.scrollHeight=o.clientHeight+s;var f=void 0;return e?o.clientX=o.clientY=0:(f=t.getBoundingClientRect(),l||(l=getComputedStyle(t,"")),o.clientX=f.left+(parseFloat(l.borderLeftWidth)||0),o.clientY=f.top+(parseFloat(l.borderTopWidth)||0)),o}(c.target,d.isWindow,f),v=Rt({left:p.clientX,top:p.clientY,width:p.clientWidth,height:p.clientHeight});f?t.autoScroll&&(d.scrollWidth=t.autoScroll.scrollWidth,d.scrollHeight=t.autoScroll.scrollHeight):(d.scrollWidth=p.scrollWidth,d.scrollHeight=p.scrollHeight),[["X","Width","left","right"],["Y","Height","top","bottom"]].forEach(function(t){var e=t[0],n=t[1],o=t[2],i=t[3],a=(d["scroll"+n]||0)-p["client"+n],l=c["min"+e]||0,u=lt(c["max"+e])?c["max"+e]:a;if(l<u&&l<a){u>a&&(u=a);for(var s=[],f=r[n.toLowerCase()],h=c.sensitivity.length-1;h>=0;h--){var m=c.sensitivity[h],g=c.speed[h];s.push({dir:-1,speed:g,position:v[o]+m}),s.push({dir:1,speed:g,position:v[i]-m-f})}d[e.toLowerCase()]={min:l,max:u,lines:s}}})}t.autoScroll=d.x||d.y?d:null}function ae(t){Ot.stop(),Zt(t.options.handle,t.orgCursor),vt.style.cursor=gt,!1!==t.options.zIndex&&(t.elementStyle.zIndex=t.orgZIndex),wt&&(vt.style[wt]=bt);var e=F(t.element);Ct&&e.remove(Ct),Bt&&e.remove(Bt),ft=null,dt.cancel(),t.onDragEnd&&t.onDragEnd({left:t.elementBBox.left,top:t.elementBBox.top})}function le(t,e){var n=t.options,r=void 0;if(e.containment){var o=void 0;jt(e.containment)?e.containment!==n.containment&&(n.containment=e.containment,t.containmentIsBBox=!1,r=!0):(o=Vt(Ft(e.containment)))&&Wt(o,n.containment)&&(n.containment=o,t.containmentIsBBox=!0,r=!0)}function i(t,e){function n(t){return"string"==typeof t?t.replace(/[, ]+/g," ").trim().toLowerCase():null}lt(e.gravity)&&e.gravity>0&&(t.gravity=e.gravity);var r=n(e.corner);if(r){if("all"!==r){var o={},i=r.split(/\s/).reduce(function(t,e){return(e="tl"===(e=e.trim().replace(/^(.).*?-(.).*$/,"$1$2"))||"lt"===e?"tl":"tr"===e||"rt"===e?"tr":"bl"===e||"lb"===e?"bl":"br"===e||"rb"===e?"br":null)&&!o[e]&&(t.push(e),o[e]=!0),t},[]),a=i.length;r=a?4===a?"all":i.join(" "):null}r&&(t.corner=r)}var l=n(e.side);l&&("start"===l||"end"===l||"both"===l?t.side=l:"start end"!==l&&"end start"!==l||(t.side="both")),"boolean"==typeof e.center&&(t.center=e.center);var u=n(e.edge);u&&("inside"===u||"outside"===u||"both"===u?t.edge=u:"inside outside"!==u&&"outside inside"!==u||(t.edge="both"));var s="string"==typeof e.base?e.base.trim().toLowerCase():null;return!s||"containment"!==s&&"document"!==s||(t.base=s),t}if(null!=e.snap){var a=at(e.snap)&&null!=e.snap.targets?e.snap:{targets:e.snap},l=[],u=i({targets:l},a);u.gravity||(u.gravity=V),u.corner||(u.corner=G),u.side||(u.side=q),"boolean"!=typeof u.center&&(u.center=!1),u.edge||(u.edge=U),u.base||(u.base=Z);var s=(Array.isArray(a.targets)?a.targets:[a.targets]).reduce(function(t,e){if(null==e)return t;var n=jt(e),r=Vt(Ft(e)),o=n||r?{boundingBox:e}:at(e)&&null==e.start&&null==e.end&&null==e.step?e:{x:e,y:e},a=[],s={},d=o.boundingBox,c=void 0;if(n||jt(d))a.push({element:d}),s.boundingBox=d;else if(c=r||Vt(Ft(d)))a.push({ppBBox:c}),s.boundingBox=Gt(c);else{var f=void 0,p=["x","y"].reduce(function(t,e){var n,r=o[e];if(n=Mt(r))t[e]=n,s[e]=zt(n);else{var i=void 0,a=void 0,l=void 0;at(r)&&(i=Mt(r.start),a=Mt(r.end),l=Mt(r.step),i&&a&&i.isRatio===a.isRatio&&i.value>=a.value&&(f=!0)),i=t[e+"Start"]=i||{value:0,isRatio:!1},a=t[e+"End"]=a||{value:1,isRatio:!0},s[e]={start:zt(i),end:zt(a)},l&&((l.isRatio?l.value>0:l.value>=2)?(t[e+"Step"]=l,s[e].step=zt(l)):f=!0)}return t},{});if(f)return t;p.xStart&&!p.xStep&&p.yStart&&!p.yStep?a.push({xStart:p.xStart,xEnd:p.xEnd,y:p.yStart},{xStart:p.xStart,xEnd:p.xEnd,y:p.yEnd},{x:p.xStart,yStart:p.yStart,yEnd:p.yEnd},{x:p.xEnd,yStart:p.yStart,yEnd:p.yEnd}):a.push(p)}if(a.length){l.push(i(s,o));var v=s.corner||u.corner,h=s.side||u.side,m=s.edge||u.edge,g={gravity:s.gravity||u.gravity,base:s.base||u.base,center:"boolean"==typeof s.center?s.center:u.center,corners:"all"===v?$:v.split(" "),sides:"both"===h?J:[h],edges:"both"===m?K:[m]};a.forEach(function(e){["gravity","corners","sides","center","edges","base"].forEach(function(t){e[t]=g[t]}),t.push(e)})}return t},[]);s.length&&(n.snap=u,Wt(s,t.parsedSnapTargets)&&(t.parsedSnapTargets=s,r=!0))}else e.hasOwnProperty("snap")&&t.parsedSnapTargets&&(n.snap=t.parsedSnapTargets=t.snapTargets=void 0);if(e.autoScroll){var d=at(e.autoScroll)?e.autoScroll:{target:!0===e.autoScroll?window:e.autoScroll},c={};c.target=jt(d.target)?d.target:window,c.speed=[],(Array.isArray(d.speed)?d.speed:[d.speed]).every(function(t,e){return!!(e<=2&&lt(t))&&(c.speed[e]=t,!0)}),c.speed.length||(c.speed=Q);var f=Array.isArray(d.sensitivity)?d.sensitivity:[d.sensitivity];c.sensitivity=c.speed.map(function(t,e){return lt(f[e])?f[e]:tt[e]}),["X","Y"].forEach(function(t){var e="min"+t,n="max"+t;lt(d[e])&&d[e]>=0&&(c[e]=d[e]),lt(d[n])&&d[n]>=0&&(!c[e]||d[n]>=c[e])&&(c[n]=d[n])}),Wt(c,n.autoScroll)&&(n.autoScroll=c,r=!0)}else e.hasOwnProperty("autoScroll")&&(n.autoScroll&&(r=!0),n.autoScroll=void 0);if(r&&ie(t),jt(e.handle)&&e.handle!==n.handle){n.handle&&(n.handle.style.cursor=t.orgCursor,wt&&(n.handle.style[wt]=t.orgUserSelect),dt.removeStartHandler(n.handle,t.pointerEventHandlerId));var p=n.handle=e.handle;t.orgCursor=p.style.cursor,Zt(p,t.orgCursor),wt&&(t.orgUserSelect=p.style[wt],p.style[wt]="none"),dt.addStartHandler(p,t.pointerEventHandlerId)}(lt(e.zIndex)||!1===e.zIndex)&&(n.zIndex=e.zIndex,t===ft&&(t.elementStyle.zIndex=!1===n.zIndex?t.orgZIndex:n.zIndex));var v={left:t.elementBBox.left,top:t.elementBBox.top},h=void 0;lt(e.left)&&e.left!==v.left&&(v.left=e.left,h=!0),lt(e.top)&&e.top!==v.top&&(v.top=e.top,h=!0),h&&ee(t,v),["onDrag","onMove","onDragStart","onMoveStart","onDragEnd"].forEach(function(r){"function"==typeof e[r]?(n[r]=e[r],t[r]=n[r].bind(t.ins)):e.hasOwnProperty(r)&&null==e[r]&&(n[r]=t[r]=void 0)})}Ot.move=function(t,e,n){kt.call(window,Yt),Pt(),Dt===t&&(e.x&&_t.x&&(e.x.lastValue=_t.x.lastValue),e.y&&_t.y&&(e.y.lastValue=_t.y.lastValue)),Dt=t,_t=e,Xt=n;var r=Date.now();["x","y"].forEach(function(t){var e=_t[t];e&&(e.lastFrameTime=r)}),Yt=Ht.call(window,It)},Ot.stop=function(){kt.call(window,Yt),Pt(),_t={},Dt=null};var ue=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var r={ins:this,options:{zIndex:N},disabled:!1};if(Object.defineProperty(this,"_id",{value:++ct}),r._id=this._id,ut[this._id]=r,!jt(e)||e===vt)throw new Error("This element is not accepted.");if(n){if(!at(n))throw new Error("Invalid options.")}else n={};var o=!0,i=void 0;if(e instanceof SVGElement&&(i=e.ownerSVGElement)){if(!e.getBBox)throw new Error("This element is not accepted. (SVGLocatable)");if(!e.transform)throw new Error("This element is not accepted. (SVGAnimatedTransformList)");r.svgTransform=e.transform.baseVal.appendItem(i.createSVGTransform()),r.svgPoint=i.createSVGPoint();var a=e.nearestViewportElement;r.svgCtmElement=rt?a.appendChild(document.createElementNS(i.namespaceURI,"rect")):a,o=!1,r.initElm=oe,r.moveElm=te}else{var l=X.getName("willChange");l&&(o=!1),!n.leftTop&&xt?(l&&(e.style[l]="transform"),r.initElm=ne,r.moveElm=Kt):(l&&(e.style[l]="left, top"),r.initElm=re,r.moveElm=Qt)}if(r.element=function(t,e){var n=t.style;n.webkitTapHighlightColor="transparent";var r=X.getName("boxShadow"),o=window.getComputedStyle(t,"")[r];return o&&"none"!==o||(n[r]="0 0 1px transparent"),e&&xt&&(n[xt]="translateZ(0)"),t}(e,o),r.elementStyle=e.style,r.orgZIndex=r.elementStyle.zIndex,Tt&&F(e).add(Tt),r.pointerEventHandlerId=dt.regStartHandler(function(t){return function(t,e){return!(t.disabled||t.onDragStart&&!1===t.onDragStart(e)||(ft&&ae(ft),$t(t.options.handle),vt.style.cursor=mt||window.getComputedStyle(t.options.handle,"").cursor,!1!==t.options.zIndex&&(t.elementStyle.zIndex=t.options.zIndex),wt&&(vt.style[wt]="none"),Bt&&F(t.element).add(Bt),ft=t,pt=!1,st.left=t.elementBBox.left-(e.clientX+window.pageXOffset),st.top=t.elementBBox.top-(e.clientY+window.pageYOffset),0))}(r,t)}),!n.containment){var u;n.containment=(u=e.parentNode)&&jt(u)?u:vt}n.handle||(n.handle=e),le(r,n)}return W(t,[{key:"remove",value:function(){var t=ut[this._id];this.disabled=!0,dt.unregStartHandler(dt.removeStartHandler(t.options.handle,t.pointerEventHandlerId)),delete ut[this._id]}},{key:"setOptions",value:function(t){return at(t)&&le(ut[this._id],t),this}},{key:"position",value:function(){return ie(ut[this._id]),this}},{key:"disabled",get:function(){return ut[this._id].disabled},set:function(t){var e=ut[this._id];(t=!!t)!==e.disabled&&(e.disabled=t,e.disabled?(e===ft&&ae(e),e.options.handle.style.cursor=e.orgCursor,wt&&(e.options.handle.style[wt]=e.orgUserSelect),Tt&&F(e.element).remove(Tt)):(Zt(e.options.handle,e.orgCursor),wt&&(e.options.handle.style[wt]="none"),Tt&&F(e.element).add(Tt)))}},{key:"element",get:function(){return ut[this._id].element}},{key:"rect",get:function(){return Ft(ut[this._id].elementBBox)}},{key:"left",get:function(){return ut[this._id].elementBBox.left},set:function(t){le(ut[this._id],{left:t})}},{key:"top",get:function(){return ut[this._id].elementBBox.top},set:function(t){le(ut[this._id],{top:t})}},{key:"containment",get:function(){var t=ut[this._id];return t.containmentIsBBox?Gt(t.options.containment):t.options.containment},set:function(t){le(ut[this._id],{containment:t})}},{key:"snap",get:function(){return Ft(ut[this._id].options.snap)},set:function(t){le(ut[this._id],{snap:t})}},{key:"autoScroll",get:function(){return Ft(ut[this._id].options.autoScroll)},set:function(t){le(ut[this._id],{autoScroll:t})}},{key:"handle",get:function(){return ut[this._id].options.handle},set:function(t){le(ut[this._id],{handle:t})}},{key:"zIndex",get:function(){return ut[this._id].options.zIndex},set:function(t){le(ut[this._id],{zIndex:t})}},{key:"onDrag",get:function(){return ut[this._id].options.onDrag},set:function(t){le(ut[this._id],{onDrag:t})}},{key:"onMove",get:function(){return ut[this._id].options.onMove},set:function(t){le(ut[this._id],{onMove:t})}},{key:"onDragStart",get:function(){return ut[this._id].options.onDragStart},set:function(t){le(ut[this._id],{onDragStart:t})}},{key:"onMoveStart",get:function(){return ut[this._id].options.onMoveStart},set:function(t){le(ut[this._id],{onMoveStart:t})}},{key:"onDragEnd",get:function(){return ut[this._id].options.onDragEnd},set:function(t){le(ut[this._id],{onDragEnd:t})}}],[{key:"draggableCursor",get:function(){return St},set:function(t){St!==t&&(St=t,ht=null,Object.keys(ut).forEach(function(t){var e=ut[t];e.disabled||e===ft&&!1!==mt||(Zt(e.options.handle,e.orgCursor),e===ft&&(vt.style.cursor=gt,vt.style.cursor=window.getComputedStyle(e.options.handle,"").cursor))}))}},{key:"draggingCursor",get:function(){return Et},set:function(t){Et!==t&&(Et=t,mt=null,ft&&($t(ft.options.handle),!1===mt&&(Zt(ft.options.handle,ft.orgCursor),vt.style.cursor=gt),vt.style.cursor=mt||window.getComputedStyle(ft.options.handle,"").cursor))}},{key:"draggableClass",get:function(){return Tt},set:function(t){(t=t?t+"":void 0)!==Tt&&(Object.keys(ut).forEach(function(e){var n=ut[e];if(!n.disabled){var r=F(n.element);Tt&&r.remove(Tt),t&&r.add(t)}}),Tt=t)}},{key:"draggingClass",get:function(){return Bt},set:function(t){if((t=t?t+"":void 0)!==Bt){if(ft){var e=F(ft.element);Bt&&e.remove(Bt),t&&e.add(t)}Bt=t}}},{key:"movingClass",get:function(){return Ct},set:function(t){if((t=t?t+"":void 0)!==Ct){if(ft&&pt){var e=F(ft.element);Ct&&e.remove(Ct),t&&e.add(t)}Ct=t}}}]),t}();dt.addMoveHandler(document,function(t){if(ft){var e={left:t.clientX+window.pageXOffset+st.left,top:t.clientY+window.pageYOffset+st.top};if(ee(ft,e,ft.snapTargets?function(t){var e=ft.snapTargets.length,n=!1,r=!1,o=void 0;for(o=0;o<e&&(!n||!r);o++){var i=ft.snapTargets[o];(null==i.gravityXStart||t.left>=i.gravityXStart)&&(null==i.gravityXEnd||t.left<=i.gravityXEnd)&&(null==i.gravityYStart||t.top>=i.gravityYStart)&&(null==i.gravityYEnd||t.top<=i.gravityYEnd)&&(n||null==i.x||(t.left=i.x,n=!0,o=-1),r||null==i.y||(t.top=i.y,r=!0,o=-1))}return t.snapped=n||r,!ft.onDrag||ft.onDrag(t)}:ft.onDrag)){var n={},r=ft.autoScroll;if(r){var o={x:ft.elementBBox.left-window.pageXOffset,y:ft.elementBBox.top-window.pageYOffset};["x","y"].forEach(function(t){if(r[t]){var e=r[t].min,i=r[t].max;r[t].lines.some(function(r){return(-1===r.dir?o[t]<=r.position:o[t]>=r.position)&&(n[t]={dir:r.dir,speed:r.speed/1e3,min:e,max:i},!0)})}})}n.x||n.y?(Ot.move(r.target,n,r.isWindow?At:Lt),e.autoScroll=!0):Ot.stop(),pt||(pt=!0,Ct&&F(ft.element).add(Ct),ft.onMoveStart&&ft.onMoveStart(e)),ft.onMove&&ft.onMove(e)}}});var se=function(){ft&&ae(ft)};dt.addEndHandler(document,se),dt.addCancelHandler(document,se);var de=function(){yt=X.getName("transitionProperty"),xt=X.getName("transform"),gt=vt.style.cursor,(wt=X.getName("userSelect"))&&(bt=vt.style[wt]);var t={},e=void 0;function n(t,e){t.initElm&&ie(t,e)}var r=!1;c.add(function(o){r||(r=!0,ft&&(n(ft,o.type),dt.move(),t[ft._id]=!0),clearTimeout(e),e=setTimeout(function(){var r;r=o.type,clearTimeout(e),Object.keys(ut).forEach(function(e){t[e]||n(ut[e],r)}),t={}},200),r=!1)})};(vt=document.body)?de():document.addEventListener("DOMContentLoaded",function(){vt=document.body,de()},!0);e.default=ue}]).default;