3 lines
109 KiB
JavaScript
3 lines
109 KiB
JavaScript
/* interact.js 1.10.3 | https://raw.github.com/taye/interact.js/master/LICENSE */
|
|
!function(t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).interact=t()}((function(){var t={};Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=function(t){return!(!t||!t.Window)&&t instanceof t.Window};var e={};Object.defineProperty(e,"__esModule",{value:!0}),e.init=i,e.getWindow=function(e){return(0,t.default)(e)?e:(e.ownerDocument||e).defaultView||r.window},e.window=e.realWindow=void 0;var n=void 0;e.realWindow=n;var r=void 0;function i(t){e.realWindow=n=t;var i=t.document.createTextNode("");i.ownerDocument!==t.document&&"function"==typeof t.wrap&&t.wrap(i)===i&&(t=t.wrap(t)),e.window=r=t}e.window=r,"undefined"!=typeof window&&window&&i(window);var o={};Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var a=function(t){return!!t&&"object"==typeof t},s=function(t){return"function"==typeof t},l={window:function(n){return n===e.window||(0,t.default)(n)},docFrag:function(t){return a(t)&&11===t.nodeType},object:a,func:s,number:function(t){return"number"==typeof t},bool:function(t){return"boolean"==typeof t},string:function(t){return"string"==typeof t},element:function(t){if(!t||"object"!=typeof t)return!1;var n=e.getWindow(t)||e.window;return/object|function/.test(typeof n.Element)?t instanceof n.Element:1===t.nodeType&&"string"==typeof t.nodeName},plainObject:function(t){return a(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString())},array:function(t){return a(t)&&void 0!==t.length&&s(t.splice)}};o.default=l;var c={};function u(t){var e=t.interaction;if("drag"===e.prepared.name){var n=e.prepared.axis;"x"===n?(e.coords.cur.page.y=e.coords.start.page.y,e.coords.cur.client.y=e.coords.start.client.y,e.coords.velocity.client.y=0,e.coords.velocity.page.y=0):"y"===n&&(e.coords.cur.page.x=e.coords.start.page.x,e.coords.cur.client.x=e.coords.start.client.x,e.coords.velocity.client.x=0,e.coords.velocity.page.x=0)}}function d(t){var e=t.iEvent,n=t.interaction;if("drag"===n.prepared.name){var r=n.prepared.axis;if("x"===r||"y"===r){var i="x"===r?"y":"x";e.page[i]=n.coords.start.page[i],e.client[i]=n.coords.start.client[i],e.delta[i]=0}}}Object.defineProperty(c,"__esModule",{value:!0}),c.default=void 0;var f={id:"actions/drag",install:function(t){var e=t.actions,n=t.Interactable,r=t.defaults;n.prototype.draggable=f.draggable,e.map.drag=f,e.methodDict.drag="draggable",r.actions.drag=f.defaults},listeners:{"interactions:before-action-move":u,"interactions:action-resume":u,"interactions:action-move":d,"auto-start:check":function(t){var e=t.interaction,n=t.interactable,r=t.buttons,i=n.options.drag;if(i&&i.enabled&&(!e.pointerIsDown||!/mouse|pointer/.test(e.pointerType)||0!=(r&n.options.drag.mouseButtons)))return t.action={name:"drag",axis:"start"===i.lockAxis?i.startAxis:i.lockAxis},!1}},draggable:function(t){return o.default.object(t)?(this.options.drag.enabled=!1!==t.enabled,this.setPerAction("drag",t),this.setOnEvents("drag",t),/^(xy|x|y|start)$/.test(t.lockAxis)&&(this.options.drag.lockAxis=t.lockAxis),/^(xy|x|y)$/.test(t.startAxis)&&(this.options.drag.startAxis=t.startAxis),this):o.default.bool(t)?(this.options.drag.enabled=t,this):this.options.drag},beforeMove:u,move:d,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"}},p=f;c.default=p;var v={};Object.defineProperty(v,"__esModule",{value:!0}),v.default=void 0;var h={init:function(t){var e=t;h.document=e.document,h.DocumentFragment=e.DocumentFragment||g,h.SVGElement=e.SVGElement||g,h.SVGSVGElement=e.SVGSVGElement||g,h.SVGElementInstance=e.SVGElementInstance||g,h.Element=e.Element||g,h.HTMLElement=e.HTMLElement||h.Element,h.Event=e.Event,h.Touch=e.Touch||g,h.PointerEvent=e.PointerEvent||e.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function g(){}var m=h;v.default=m;var y={};Object.defineProperty(y,"__esModule",{value:!0}),y.default=void 0;var b={init:function(t){var n=v.default.Element,r=e.window.navigator;b.supportsTouch="ontouchstart"in t||o.default.func(t.DocumentTouch)&&v.default.document instanceof t.DocumentTouch,b.supportsPointerEvent=!1!==r.pointerEnabled&&!!v.default.PointerEvent,b.isIOS=/iP(hone|od|ad)/.test(r.platform),b.isIOS7=/iP(hone|od|ad)/.test(r.platform)&&/OS 7[^\d]/.test(r.appVersion),b.isIe9=/MSIE 9/.test(r.userAgent),b.isOperaMobile="Opera"===r.appName&&b.supportsTouch&&/Presto/.test(r.userAgent),b.prefixedMatchesSelector="matches"in n.prototype?"matches":"webkitMatchesSelector"in n.prototype?"webkitMatchesSelector":"mozMatchesSelector"in n.prototype?"mozMatchesSelector":"oMatchesSelector"in n.prototype?"oMatchesSelector":"msMatchesSelector",b.pEventTypes=b.supportsPointerEvent?v.default.PointerEvent===t.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,b.wheelEvent="onmousewheel"in v.default.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},x=b;y.default=x;var _={};function w(t){var e=t.parentNode;if(o.default.docFrag(e)){for(;(e=e.host)&&o.default.docFrag(e););return e}return e}function P(t,n){return e.window!==e.realWindow&&(n=n.replace(/\/deep\//g," ")),t[y.default.prefixedMatchesSelector](n)}Object.defineProperty(_,"__esModule",{value:!0}),_.nodeContains=function(t,e){if(t.contains)return t.contains(e);for(;e;){if(e===t)return!0;e=e.parentNode}return!1},_.closest=function(t,e){for(;o.default.element(t);){if(P(t,e))return t;t=w(t)}return null},_.parentNode=w,_.matchesSelector=P,_.indexOfDeepestElement=function(t){for(var n,r=[],i=0;i<t.length;i++){var o=t[i],a=t[n];if(o&&i!==n)if(a){var s=E(o),l=E(a);if(s!==o.ownerDocument)if(l!==o.ownerDocument)if(s!==l){r=r.length?r:S(a);var c=void 0;if(a instanceof v.default.HTMLElement&&o instanceof v.default.SVGElement&&!(o instanceof v.default.SVGSVGElement)){if(o===l)continue;c=o.ownerSVGElement}else c=o;for(var u=S(c,a.ownerDocument),d=0;u[d]&&u[d]===r[d];)d++;for(var f=[u[d-1],u[d],r[d]],p=f[0].lastChild;p;){if(p===f[1]){n=i,r=u;break}if(p===f[2])break;p=p.previousSibling}}else h=o,g=a,void 0,void 0,(parseInt(e.getWindow(h).getComputedStyle(h).zIndex,10)||0)>=(parseInt(e.getWindow(g).getComputedStyle(g).zIndex,10)||0)&&(n=i);else n=i}else n=i}var h,g;return n},_.matchesUpTo=function(t,e,n){for(;o.default.element(t);){if(P(t,e))return!0;if((t=w(t))===n)return P(t,e)}return!1},_.getActualElement=function(t){return t.correspondingUseElement||t},_.getScrollXY=M,_.getElementClientRect=O,_.getElementRect=function(t){var n=O(t);if(!y.default.isIOS7&&n){var r=M(e.getWindow(t));n.left+=r.x,n.right+=r.x,n.top+=r.y,n.bottom+=r.y}return n},_.getPath=function(t){for(var e=[];t;)e.push(t),t=w(t);return e},_.trySelector=function(t){return!!o.default.string(t)&&(v.default.document.querySelector(t),!0)};var E=function(t){return t.parentNode||t.host};function S(t,e){for(var n,r=[],i=t;(n=E(i))&&i!==e&&n!==i.ownerDocument;)r.unshift(i),i=n;return r}function M(t){return{x:(t=t||e.window).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop}}function O(t){var e=t instanceof v.default.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return e&&{left:e.left,right:e.right,top:e.top,bottom:e.bottom,width:e.width||e.right-e.left,height:e.height||e.bottom-e.top}}var T={};Object.defineProperty(T,"__esModule",{value:!0}),T.default=function(t,e){for(var n in e)t[n]=e[n];return t};var I={};function D(t,e,n){return"parent"===t?(0,_.parentNode)(n):"self"===t?e.getRect(n):(0,_.closest)(n,t)}Object.defineProperty(I,"__esModule",{value:!0}),I.getStringOptionResult=D,I.resolveRectLike=function(t,e,n,r){var i=t;return o.default.string(i)?i=D(i,e,n):o.default.func(i)&&(i=i.apply(void 0,r)),o.default.element(i)&&(i=(0,_.getElementRect)(i)),i},I.rectToXY=function(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}},I.xywhToTlbr=function(t){return!t||"left"in t&&"top"in t||((t=(0,T.default)({},t)).left=t.x||0,t.top=t.y||0,t.right=t.right||t.left+t.width,t.bottom=t.bottom||t.top+t.height),t},I.tlbrToXywh=function(t){return!t||"x"in t&&"y"in t||((t=(0,T.default)({},t)).x=t.left||0,t.y=t.top||0,t.width=t.width||(t.right||0)-t.x,t.height=t.height||(t.bottom||0)-t.y),t},I.addEdges=function(t,e,n){t.left&&(e.left+=n.x),t.right&&(e.right+=n.x),t.top&&(e.top+=n.y),t.bottom&&(e.bottom+=n.y),e.width=e.right-e.left,e.height=e.bottom-e.top};var j={};Object.defineProperty(j,"__esModule",{value:!0}),j.default=function(t,e,n){var r=t.options[n],i=r&&r.origin||t.options.origin,o=(0,I.resolveRectLike)(i,t,e,[t&&e]);return(0,I.rectToXY)(o)||{x:0,y:0}};var z={};function A(t){return t.trim().split(/ +/)}Object.defineProperty(z,"__esModule",{value:!0}),z.default=function t(e,n,r){if(r=r||{},o.default.string(e)&&-1!==e.search(" ")&&(e=A(e)),o.default.array(e))return e.reduce((function(e,i){return(0,T.default)(e,t(i,n,r))}),r);if(o.default.object(e)&&(n=e,e=""),o.default.func(n))r[e]=r[e]||[],r[e].push(n);else if(o.default.array(n))for(var i=0;i<n.length;i++){var a;a=n[i],t(e,a,r)}else if(o.default.object(n))for(var s in n){var l=A(s).map((function(t){return""+e+t}));t(l,n[s],r)}return r};var C={};Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0,C.default=function(t,e){return Math.sqrt(t*t+e*e)};var k={};function R(t,e){for(var n in e){var r=R.prefixedPropREs,i=!1;for(var o in r)if(0===n.indexOf(o)&&r[o].test(n)){i=!0;break}i||"function"==typeof e[n]||(t[n]=e[n])}return t}Object.defineProperty(k,"__esModule",{value:!0}),k.default=void 0,R.prefixedPropREs={webkit:/(Movement[XY]|Radius[XY]|RotationAngle|Force)$/,moz:/(Pressure)$/};var F=R;k.default=F;var X={};function Y(t){return t instanceof v.default.Event||t instanceof v.default.Touch}function W(t,e,n){return t=t||"page",(n=n||{}).x=e[t+"X"],n.y=e[t+"Y"],n}function B(t,e){return e=e||{x:0,y:0},y.default.isOperaMobile&&Y(t)?(W("screen",t,e),e.x+=window.scrollX,e.y+=window.scrollY):W("page",t,e),e}function L(t,e){return e=e||{},y.default.isOperaMobile&&Y(t)?W("screen",t,e):W("client",t,e),e}function N(t){var e=[];return o.default.array(t)?(e[0]=t[0],e[1]=t[1]):"touchend"===t.type?1===t.touches.length?(e[0]=t.touches[0],e[1]=t.changedTouches[0]):0===t.touches.length&&(e[0]=t.changedTouches[0],e[1]=t.changedTouches[1]):(e[0]=t.touches[0],e[1]=t.touches[1]),e}function V(t){for(var e={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},n=0;n<t.length;n++){var r=t[n];for(var i in e)e[i]+=r[i]}for(var o in e)e[o]/=t.length;return e}Object.defineProperty(X,"__esModule",{value:!0}),X.copyCoords=function(t,e){t.page=t.page||{},t.page.x=e.page.x,t.page.y=e.page.y,t.client=t.client||{},t.client.x=e.client.x,t.client.y=e.client.y,t.timeStamp=e.timeStamp},X.setCoordDeltas=function(t,e,n){t.page.x=n.page.x-e.page.x,t.page.y=n.page.y-e.page.y,t.client.x=n.client.x-e.client.x,t.client.y=n.client.y-e.client.y,t.timeStamp=n.timeStamp-e.timeStamp},X.setCoordVelocity=function(t,e){var n=Math.max(e.timeStamp/1e3,.001);t.page.x=e.page.x/n,t.page.y=e.page.y/n,t.client.x=e.client.x/n,t.client.y=e.client.y/n,t.timeStamp=n},X.setZeroCoords=function(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0},X.isNativePointer=Y,X.getXY=W,X.getPageXY=B,X.getClientXY=L,X.getPointerId=function(t){return o.default.number(t.pointerId)?t.pointerId:t.identifier},X.setCoords=function(t,e,n){var r=e.length>1?V(e):e[0];B(r,t.page),L(r,t.client),t.timeStamp=n},X.getTouchPair=N,X.pointerAverage=V,X.touchBBox=function(t){if(!t.length)return null;var e=N(t),n=Math.min(e[0].pageX,e[1].pageX),r=Math.min(e[0].pageY,e[1].pageY),i=Math.max(e[0].pageX,e[1].pageX),o=Math.max(e[0].pageY,e[1].pageY);return{x:n,y:r,left:n,top:r,right:i,bottom:o,width:i-n,height:o-r}},X.touchDistance=function(t,e){var n=e+"X",r=e+"Y",i=N(t),o=i[0][n]-i[1][n],a=i[0][r]-i[1][r];return(0,C.default)(o,a)},X.touchAngle=function(t,e){var n=e+"X",r=e+"Y",i=N(t),o=i[1][n]-i[0][n],a=i[1][r]-i[0][r];return 180*Math.atan2(a,o)/Math.PI},X.getPointerType=function(t){return o.default.string(t.pointerType)?t.pointerType:o.default.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof v.default.Touch?"touch":"mouse"},X.getEventTargets=function(t){var e=o.default.func(t.composedPath)?t.composedPath():t.path;return[_.getActualElement(e?e[0]:t.target),_.getActualElement(t.currentTarget)]},X.newCoords=function(){return{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},X.coordsToEvent=function(t){return{coords:t,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}},Object.defineProperty(X,"pointerExtend",{enumerable:!0,get:function(){return k.default}});var q={};Object.defineProperty(q,"__esModule",{value:!0}),q.BaseEvent=void 0;var U=function(){function t(t){this.type=void 0,this.target=void 0,this.currentTarget=void 0,this.interactable=void 0,this._interaction=void 0,this.timeStamp=void 0,this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}var e=t.prototype;return e.preventDefault=function(){},e.stopPropagation=function(){this.propagationStopped=!0},e.stopImmediatePropagation=function(){this.immediatePropagationStopped=this.propagationStopped=!0},t}();q.BaseEvent=U,Object.defineProperty(U.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var G={};Object.defineProperty(G,"__esModule",{value:!0}),G.find=G.findIndex=G.from=G.merge=G.remove=G.contains=void 0,G.contains=function(t,e){return-1!==t.indexOf(e)},G.remove=function(t,e){return t.splice(t.indexOf(e),1)};var H=function(t,e){for(var n=0;n<e.length;n++){var r=e[n];t.push(r)}return t};G.merge=H,G.from=function(t){return H([],t)};var $=function(t,e){for(var n=0;n<t.length;n++)if(e(t[n],n,t))return n;return-1};G.findIndex=$,G.find=function(t,e){return t[$(t,e)]};var K={};Object.defineProperty(K,"__esModule",{value:!0}),K.DropEvent=void 0;var Z=function(t){var e,n;function r(e,n,r){var i;(i=t.call(this,n._interaction)||this).target=void 0,i.dropzone=void 0,i.dragEvent=void 0,i.relatedTarget=void 0,i.draggable=void 0,i.timeStamp=void 0,i.propagationStopped=!1,i.immediatePropagationStopped=!1;var o="dragleave"===r?e.prev:e.cur,a=o.element,s=o.dropzone;return i.type=r,i.target=a,i.currentTarget=a,i.dropzone=s,i.dragEvent=n,i.relatedTarget=n.target,i.draggable=n.interactable,i.timeStamp=n.timeStamp,i}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var i=r.prototype;return i.reject=function(){var t=this,e=this._interaction.dropState;if("dropactivate"===this.type||this.dropzone&&e.cur.dropzone===this.dropzone&&e.cur.element===this.target)if(e.prev.dropzone=this.dropzone,e.prev.element=this.target,e.rejected=!0,e.events.enter=null,this.stopImmediatePropagation(),"dropactivate"===this.type){var n=e.activeDrops,i=G.findIndex(n,(function(e){var n=e.dropzone,r=e.element;return n===t.dropzone&&r===t.target}));e.activeDrops.splice(i,1);var o=new r(e,this.dragEvent,"dropdeactivate");o.dropzone=this.dropzone,o.target=this.target,this.dropzone.fire(o)}else this.dropzone.fire(new r(e,this.dragEvent,"dragleave"))},i.preventDefault=function(){},i.stopPropagation=function(){this.propagationStopped=!0},i.stopImmediatePropagation=function(){this.immediatePropagationStopped=this.propagationStopped=!0},r}(q.BaseEvent);K.DropEvent=Z;var J={};function Q(t,e){for(var n=0;n<t.slice().length;n++){var r=t.slice()[n],i=r.dropzone,o=r.element;e.dropzone=i,e.target=o,i.fire(e),e.propagationStopped=e.immediatePropagationStopped=!1}}function tt(t,e){for(var n=function(t,e){for(var n=t.interactables,r=[],i=0;i<n.list.length;i++){var a=n.list[i];if(a.options.drop.enabled){var s=a.options.drop.accept;if(!(o.default.element(s)&&s!==e||o.default.string(s)&&!_.matchesSelector(e,s)||o.default.func(s)&&!s({dropzone:a,draggableElement:e})))for(var l=o.default.string(a.target)?a._context.querySelectorAll(a.target):o.default.array(a.target)?a.target:[a.target],c=0;c<l.length;c++){var u=l[c];u!==e&&r.push({dropzone:a,element:u,rect:a.getRect(u)})}}}return r}(t,e),r=0;r<n.length;r++){var i=n[r];i.rect=i.dropzone.getRect(i.element)}return n}function et(t,e,n){for(var r=t.dropState,i=t.interactable,o=t.element,a=[],s=0;s<r.activeDrops.length;s++){var l=r.activeDrops[s],c=l.dropzone,u=l.element,d=l.rect;a.push(c.dropCheck(e,n,i,o,u,d)?u:null)}var f=_.indexOfDeepestElement(a);return r.activeDrops[f]||null}function nt(t,e,n){var r=t.dropState,i={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return"dragstart"===n.type&&(i.activate=new K.DropEvent(r,n,"dropactivate"),i.activate.target=null,i.activate.dropzone=null),"dragend"===n.type&&(i.deactivate=new K.DropEvent(r,n,"dropdeactivate"),i.deactivate.target=null,i.deactivate.dropzone=null),r.rejected||(r.cur.element!==r.prev.element&&(r.prev.dropzone&&(i.leave=new K.DropEvent(r,n,"dragleave"),n.dragLeave=i.leave.target=r.prev.element,n.prevDropzone=i.leave.dropzone=r.prev.dropzone),r.cur.dropzone&&(i.enter=new K.DropEvent(r,n,"dragenter"),n.dragEnter=r.cur.element,n.dropzone=r.cur.dropzone)),"dragend"===n.type&&r.cur.dropzone&&(i.drop=new K.DropEvent(r,n,"drop"),n.dropzone=r.cur.dropzone,n.relatedTarget=r.cur.element),"dragmove"===n.type&&r.cur.dropzone&&(i.move=new K.DropEvent(r,n,"dropmove"),i.move.dragmove=n,n.dropzone=r.cur.dropzone)),i}function rt(t,e){var n=t.dropState,r=n.activeDrops,i=n.cur,o=n.prev;e.leave&&o.dropzone.fire(e.leave),e.enter&&i.dropzone.fire(e.enter),e.move&&i.dropzone.fire(e.move),e.drop&&i.dropzone.fire(e.drop),e.deactivate&&Q(r,e.deactivate),n.prev.dropzone=i.dropzone,n.prev.element=i.element}function it(t,e){var n=t.interaction,r=t.iEvent,i=t.event;if("dragmove"===r.type||"dragend"===r.type){var o=n.dropState;e.dynamicDrop&&(o.activeDrops=tt(e,n.element));var a=r,s=et(n,a,i);o.rejected=o.rejected&&!!s&&s.dropzone===o.cur.dropzone&&s.element===o.cur.element,o.cur.dropzone=s&&s.dropzone,o.cur.element=s&&s.element,o.events=nt(n,0,a)}}Object.defineProperty(J,"__esModule",{value:!0}),J.default=void 0;var ot={id:"actions/drop",install:function(t){var e=t.actions,n=t.interactStatic,r=t.Interactable,i=t.defaults;t.usePlugin(c.default),r.prototype.dropzone=function(t){return function(t,e){if(o.default.object(e)){if(t.options.drop.enabled=!1!==e.enabled,e.listeners){var n=(0,z.default)(e.listeners),r=Object.keys(n).reduce((function(t,e){return t[/^(enter|leave)/.test(e)?"drag"+e:/^(activate|deactivate|move)/.test(e)?"drop"+e:e]=n[e],t}),{});t.off(t.options.drop.listeners),t.on(r),t.options.drop.listeners=r}return o.default.func(e.ondrop)&&t.on("drop",e.ondrop),o.default.func(e.ondropactivate)&&t.on("dropactivate",e.ondropactivate),o.default.func(e.ondropdeactivate)&&t.on("dropdeactivate",e.ondropdeactivate),o.default.func(e.ondragenter)&&t.on("dragenter",e.ondragenter),o.default.func(e.ondragleave)&&t.on("dragleave",e.ondragleave),o.default.func(e.ondropmove)&&t.on("dropmove",e.ondropmove),/^(pointer|center)$/.test(e.overlap)?t.options.drop.overlap=e.overlap:o.default.number(e.overlap)&&(t.options.drop.overlap=Math.max(Math.min(1,e.overlap),0)),"accept"in e&&(t.options.drop.accept=e.accept),"checker"in e&&(t.options.drop.checker=e.checker),t}return o.default.bool(e)?(t.options.drop.enabled=e,t):t.options.drop}(this,t)},r.prototype.dropCheck=function(t,e,n,r,i,a){return function(t,e,n,r,i,a,s){var l=!1;if(!(s=s||t.getRect(a)))return!!t.options.drop.checker&&t.options.drop.checker(e,n,l,t,a,r,i);var c=t.options.drop.overlap;if("pointer"===c){var u=(0,j.default)(r,i,"drag"),d=X.getPageXY(e);d.x+=u.x,d.y+=u.y;var f=d.x>s.left&&d.x<s.right,p=d.y>s.top&&d.y<s.bottom;l=f&&p}var v=r.getRect(i);if(v&&"center"===c){var h=v.left+v.width/2,g=v.top+v.height/2;l=h>=s.left&&h<=s.right&&g>=s.top&&g<=s.bottom}return v&&o.default.number(c)&&(l=Math.max(0,Math.min(s.right,v.right)-Math.max(s.left,v.left))*Math.max(0,Math.min(s.bottom,v.bottom)-Math.max(s.top,v.top))/(v.width*v.height)>=c),t.options.drop.checker&&(l=t.options.drop.checker(e,n,l,t,a,r,i)),l}(this,t,e,n,r,i,a)},n.dynamicDrop=function(e){return o.default.bool(e)?(t.dynamicDrop=e,n):t.dynamicDrop},(0,T.default)(e.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),e.methodDict.drop="dropzone",t.dynamicDrop=!1,i.actions.drop=ot.defaults},listeners:{"interactions:before-action-start":function(t){var e=t.interaction;"drag"===e.prepared.name&&(e.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(t,e){var n=t.interaction,r=(t.event,t.iEvent);if("drag"===n.prepared.name){var i=n.dropState;i.activeDrops=null,i.events=null,i.activeDrops=tt(e,n.element),i.events=nt(n,0,r),i.events.activate&&(Q(i.activeDrops,i.events.activate),e.fire("actions/drop:start",{interaction:n,dragEvent:r}))}},"interactions:action-move":it,"interactions:after-action-move":function(t,e){var n=t.interaction,r=t.iEvent;"drag"===n.prepared.name&&(rt(n,n.dropState.events),e.fire("actions/drop:move",{interaction:n,dragEvent:r}),n.dropState.events={})},"interactions:action-end":function(t,e){if("drag"===t.interaction.prepared.name){var n=t.interaction,r=t.iEvent;it(t,e),rt(n,n.dropState.events),e.fire("actions/drop:end",{interaction:n,dragEvent:r})}},"interactions:stop":function(t){var e=t.interaction;if("drag"===e.prepared.name){var n=e.dropState;n&&(n.activeDrops=null,n.events=null,n.cur.dropzone=null,n.cur.element=null,n.prev.dropzone=null,n.prev.element=null,n.rejected=!1)}}},getActiveDrops:tt,getDrop:et,getDropEvents:nt,fireDropEvents:rt,defaults:{enabled:!1,accept:null,overlap:"pointer"}},at=ot;J.default=at;var st={};function lt(t){var e=t.interaction,n=t.iEvent,r=t.phase;if("gesture"===e.prepared.name){var i=e.pointers.map((function(t){return t.pointer})),a="start"===r,s="end"===r,l=e.interactable.options.deltaSource;if(n.touches=[i[0],i[1]],a)n.distance=X.touchDistance(i,l),n.box=X.touchBBox(i),n.scale=1,n.ds=0,n.angle=X.touchAngle(i,l),n.da=0,e.gesture.startDistance=n.distance,e.gesture.startAngle=n.angle;else if(s){var c=e.prevEvent;n.distance=c.distance,n.box=c.box,n.scale=c.scale,n.ds=0,n.angle=c.angle,n.da=0}else n.distance=X.touchDistance(i,l),n.box=X.touchBBox(i),n.scale=n.distance/e.gesture.startDistance,n.angle=X.touchAngle(i,l),n.ds=n.scale-e.gesture.scale,n.da=n.angle-e.gesture.angle;e.gesture.distance=n.distance,e.gesture.angle=n.angle,o.default.number(n.scale)&&n.scale!==1/0&&!isNaN(n.scale)&&(e.gesture.scale=n.scale)}}Object.defineProperty(st,"__esModule",{value:!0}),st.default=void 0;var ct={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(t){var e=t.actions,n=t.Interactable,r=t.defaults;n.prototype.gesturable=function(t){return o.default.object(t)?(this.options.gesture.enabled=!1!==t.enabled,this.setPerAction("gesture",t),this.setOnEvents("gesture",t),this):o.default.bool(t)?(this.options.gesture.enabled=t,this):this.options.gesture},e.map.gesture=ct,e.methodDict.gesture="gesturable",r.actions.gesture=ct.defaults},listeners:{"interactions:action-start":lt,"interactions:action-move":lt,"interactions:action-end":lt,"interactions:new":function(t){t.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(t){if(!(t.interaction.pointers.length<2)){var e=t.interactable.options.gesture;if(e&&e.enabled)return t.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""}},ut=ct;st.default=ut;var dt={};function ft(t,e,n,r,i,a,s){if(!e)return!1;if(!0===e){var l=o.default.number(a.width)?a.width:a.right-a.left,c=o.default.number(a.height)?a.height:a.bottom-a.top;if(s=Math.min(s,Math.abs(("left"===t||"right"===t?l:c)/2)),l<0&&("left"===t?t="right":"right"===t&&(t="left")),c<0&&("top"===t?t="bottom":"bottom"===t&&(t="top")),"left"===t)return n.x<(l>=0?a.left:a.right)+s;if("top"===t)return n.y<(c>=0?a.top:a.bottom)+s;if("right"===t)return n.x>(l>=0?a.right:a.left)-s;if("bottom"===t)return n.y>(c>=0?a.bottom:a.top)-s}return!!o.default.element(r)&&(o.default.element(e)?e===r:_.matchesUpTo(r,e,i))}function pt(t){var e=t.iEvent,n=t.interaction;if("resize"===n.prepared.name&&n.resizeAxes){var r=e;n.interactable.options.resize.square?("y"===n.resizeAxes?r.delta.x=r.delta.y:r.delta.y=r.delta.x,r.axes="xy"):(r.axes=n.resizeAxes,"x"===n.resizeAxes?r.delta.y=0:"y"===n.resizeAxes&&(r.delta.x=0))}}Object.defineProperty(dt,"__esModule",{value:!0}),dt.default=void 0;var vt={id:"actions/resize",before:["actions/drag"],install:function(t){var e=t.actions,n=t.browser,r=t.Interactable,i=t.defaults;vt.cursors=function(t){return t.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(n),vt.defaultMargin=n.supportsTouch||n.supportsPointerEvent?20:10,r.prototype.resizable=function(e){return function(t,e,n){return o.default.object(e)?(t.options.resize.enabled=!1!==e.enabled,t.setPerAction("resize",e),t.setOnEvents("resize",e),o.default.string(e.axis)&&/^x$|^y$|^xy$/.test(e.axis)?t.options.resize.axis=e.axis:null===e.axis&&(t.options.resize.axis=n.defaults.actions.resize.axis),o.default.bool(e.preserveAspectRatio)?t.options.resize.preserveAspectRatio=e.preserveAspectRatio:o.default.bool(e.square)&&(t.options.resize.square=e.square),t):o.default.bool(e)?(t.options.resize.enabled=e,t):t.options.resize}(this,e,t)},e.map.resize=vt,e.methodDict.resize="resizable",i.actions.resize=vt.defaults},listeners:{"interactions:new":function(t){t.interaction.resizeAxes="xy"},"interactions:action-start":function(t){!function(t){var e=t.iEvent,n=t.interaction;if("resize"===n.prepared.name&&n.prepared.edges){var r=e,i=n.rect;n._rects={start:(0,T.default)({},i),corrected:(0,T.default)({},i),previous:(0,T.default)({},i),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},r.edges=n.prepared.edges,r.rect=n._rects.corrected,r.deltaRect=n._rects.delta}}(t),pt(t)},"interactions:action-move":function(t){!function(t){var e=t.iEvent,n=t.interaction;if("resize"===n.prepared.name&&n.prepared.edges){var r=e,i=n.interactable.options.resize.invert,o="reposition"===i||"negate"===i,a=n.rect,s=n._rects,l=s.start,c=s.corrected,u=s.delta,d=s.previous;if((0,T.default)(d,c),o){if((0,T.default)(c,a),"reposition"===i){if(c.top>c.bottom){var f=c.top;c.top=c.bottom,c.bottom=f}if(c.left>c.right){var p=c.left;c.left=c.right,c.right=p}}}else c.top=Math.min(a.top,l.bottom),c.bottom=Math.max(a.bottom,l.top),c.left=Math.min(a.left,l.right),c.right=Math.max(a.right,l.left);for(var v in c.width=c.right-c.left,c.height=c.bottom-c.top,c)u[v]=c[v]-d[v];r.edges=n.prepared.edges,r.rect=c,r.deltaRect=u}}(t),pt(t)},"interactions:action-end":function(t){var e=t.iEvent,n=t.interaction;if("resize"===n.prepared.name&&n.prepared.edges){var r=e;r.edges=n.prepared.edges,r.rect=n._rects.corrected,r.deltaRect=n._rects.delta}},"auto-start:check":function(t){var e=t.interaction,n=t.interactable,r=t.element,i=t.rect,a=t.buttons;if(i){var s=(0,T.default)({},e.coords.cur.page),l=n.options.resize;if(l&&l.enabled&&(!e.pointerIsDown||!/mouse|pointer/.test(e.pointerType)||0!=(a&l.mouseButtons))){if(o.default.object(l.edges)){var c={left:!1,right:!1,top:!1,bottom:!1};for(var u in c)c[u]=ft(u,l.edges[u],s,e._latestPointer.eventTarget,r,i,l.margin||vt.defaultMargin);c.left=c.left&&!c.right,c.top=c.top&&!c.bottom,(c.left||c.right||c.top||c.bottom)&&(t.action={name:"resize",edges:c})}else{var d="y"!==l.axis&&s.x>i.right-vt.defaultMargin,f="x"!==l.axis&&s.y>i.bottom-vt.defaultMargin;(d||f)&&(t.action={name:"resize",axes:(d?"x":"")+(f?"y":"")})}return!t.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(t){var e=t.edges,n=t.axis,r=t.name,i=vt.cursors,o=null;if(n)o=i[r+n];else if(e){for(var a="",s=["top","bottom","left","right"],l=0;l<s.length;l++){var c=s[l];e[c]&&(a+=c)}o=i[a]}return o},defaultMargin:null},ht=vt;dt.default=ht;var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.default=void 0;var mt={id:"actions",install:function(t){t.usePlugin(st.default),t.usePlugin(dt.default),t.usePlugin(c.default),t.usePlugin(J.default)}};gt.default=mt;var yt={};Object.defineProperty(yt,"__esModule",{value:!0}),yt.default=void 0,yt.default={};var bt={};Object.defineProperty(bt,"__esModule",{value:!0}),bt.default=void 0;var xt,_t,wt=0,Pt={request:function(t){return xt(t)},cancel:function(t){return _t(t)},init:function(t){if(xt=t.requestAnimationFrame,_t=t.cancelAnimationFrame,!xt)for(var e=["ms","moz","webkit","o"],n=0;n<e.length;n++){var r=e[n];xt=t[r+"RequestAnimationFrame"],_t=t[r+"CancelAnimationFrame"]||t[r+"CancelRequestAnimationFrame"]}xt=xt&&xt.bind(t),_t=_t&&_t.bind(t),xt||(xt=function(e){var n=Date.now(),r=Math.max(0,16-(n-wt)),i=t.setTimeout((function(){e(n+r)}),r);return wt=n+r,i},_t=function(t){return clearTimeout(t)})}};bt.default=Pt;var Et={};Object.defineProperty(Et,"__esModule",{value:!0}),Et.getContainer=Mt,Et.getScroll=Ot,Et.getScrollSize=function(t){return o.default.window(t)&&(t=window.document.body),{x:t.scrollWidth,y:t.scrollHeight}},Et.getScrollSizeDelta=function(t,e){var n=t.interaction,r=t.element,i=n&&n.interactable.options[n.prepared.name].autoScroll;if(!i||!i.enabled)return e(),{x:0,y:0};var o=Mt(i.container,n.interactable,r),a=Ot(o);e();var s=Ot(o);return{x:s.x-a.x,y:s.y-a.y}},Et.default=void 0;var St={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(t){St.isScrolling=!0,bt.default.cancel(St.i),t.autoScroll=St,St.interaction=t,St.prevTime=St.now(),St.i=bt.default.request(St.scroll)},stop:function(){St.isScrolling=!1,St.interaction&&(St.interaction.autoScroll=null),bt.default.cancel(St.i)},scroll:function(){var t=St.interaction,e=t.interactable,n=t.element,r=t.prepared.name,i=e.options[r].autoScroll,a=Mt(i.container,e,n),s=St.now(),l=(s-St.prevTime)/1e3,c=i.speed*l;if(c>=1){var u={x:St.x*c,y:St.y*c};if(u.x||u.y){var d=Ot(a);o.default.window(a)?a.scrollBy(u.x,u.y):a&&(a.scrollLeft+=u.x,a.scrollTop+=u.y);var f=Ot(a),p={x:f.x-d.x,y:f.y-d.y};(p.x||p.y)&&e.fire({type:"autoscroll",target:n,interactable:e,delta:p,interaction:t,container:a})}St.prevTime=s}St.isScrolling&&(bt.default.cancel(St.i),St.i=bt.default.request(St.scroll))},check:function(t,e){var n;return null==(n=t.options[e].autoScroll)?void 0:n.enabled},onInteractionMove:function(t){var e=t.interaction,n=t.pointer;if(e.interacting()&&St.check(e.interactable,e.prepared.name))if(e.simulation)St.x=St.y=0;else{var r,i,a,s,l=e.interactable,c=e.element,u=e.prepared.name,d=l.options[u].autoScroll,f=Mt(d.container,l,c);if(o.default.window(f))s=n.clientX<St.margin,r=n.clientY<St.margin,i=n.clientX>f.innerWidth-St.margin,a=n.clientY>f.innerHeight-St.margin;else{var p=_.getElementClientRect(f);s=n.clientX<p.left+St.margin,r=n.clientY<p.top+St.margin,i=n.clientX>p.right-St.margin,a=n.clientY>p.bottom-St.margin}St.x=i?1:s?-1:0,St.y=a?1:r?-1:0,St.isScrolling||(St.margin=d.margin,St.speed=d.speed,St.start(e))}}};function Mt(t,n,r){return(o.default.string(t)?(0,I.getStringOptionResult)(t,n,r):t)||(0,e.getWindow)(r)}function Ot(t){return o.default.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}var Tt={id:"auto-scroll",install:function(t){var e=t.defaults,n=t.actions;t.autoScroll=St,St.now=function(){return t.now()},n.phaselessTypes.autoscroll=!0,e.perAction.autoScroll=St.defaults},listeners:{"interactions:new":function(t){t.interaction.autoScroll=null},"interactions:destroy":function(t){t.interaction.autoScroll=null,St.stop(),St.interaction&&(St.interaction=null)},"interactions:stop":St.stop,"interactions:action-move":function(t){return St.onInteractionMove(t)}}};Et.default=Tt;var It={};Object.defineProperty(It,"__esModule",{value:!0}),It.warnOnce=function(t,n){var r=!1;return function(){return r||(e.window.console.warn(n),r=!0),t.apply(this,arguments)}},It.copyAction=function(t,e){return t.name=e.name,t.axis=e.axis,t.edges=e.edges,t};var Dt={};function jt(t){return o.default.bool(t)?(this.options.styleCursor=t,this):null===t?(delete this.options.styleCursor,this):this.options.styleCursor}function zt(t){return o.default.func(t)?(this.options.actionChecker=t,this):null===t?(delete this.options.actionChecker,this):this.options.actionChecker}Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.default=void 0;var At={id:"auto-start/interactableMethods",install:function(t){var e=t.Interactable;e.prototype.getAction=function(e,n,r,i){var o=function(t,e,n,r,i){var o=t.getRect(r),a={action:null,interactable:t,interaction:n,element:r,rect:o,buttons:e.buttons||{0:1,1:4,3:8,4:16}[e.button]};return i.fire("auto-start:check",a),a.action}(this,n,r,i,t);return this.options.actionChecker?this.options.actionChecker(e,n,o,this,i,r):o},e.prototype.ignoreFrom=(0,It.warnOnce)((function(t){return this._backCompatOption("ignoreFrom",t)}),"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),e.prototype.allowFrom=(0,It.warnOnce)((function(t){return this._backCompatOption("allowFrom",t)}),"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),e.prototype.actionChecker=zt,e.prototype.styleCursor=jt}};Dt.default=At;var Ct={};function kt(t,e,n,r,i){return e.testIgnoreAllow(e.options[t.name],n,r)&&e.options[t.name].enabled&&Yt(e,n,t,i)?t:null}function Rt(t,e,n,r,i,o,a){for(var s=0,l=r.length;s<l;s++){var c=r[s],u=i[s],d=c.getAction(e,n,t,u);if(d){var f=kt(d,c,u,o,a);if(f)return{action:f,interactable:c,element:u}}}return{action:null,interactable:null,element:null}}function Ft(t,e,n,r,i){var a=[],s=[],l=r;function c(t){a.push(t),s.push(l)}for(;o.default.element(l);){a=[],s=[],i.interactables.forEachMatch(l,c);var u=Rt(t,e,n,a,s,r,i);if(u.action&&!u.interactable.options[u.action.name].manualStart)return u;l=_.parentNode(l)}return{action:null,interactable:null,element:null}}function Xt(t,e,n){var r=e.action,i=e.interactable,o=e.element;r=r||{name:null},t.interactable=i,t.element=o,(0,It.copyAction)(t.prepared,r),t.rect=i&&r.name?i.getRect(o):null,Lt(t,n),n.fire("autoStart:prepared",{interaction:t})}function Yt(t,e,n,r){var i=t.options,o=i[n.name].max,a=i[n.name].maxPerElement,s=r.autoStart.maxInteractions,l=0,c=0,u=0;if(!(o&&a&&s))return!1;for(var d=0;d<r.interactions.list.length;d++){var f=r.interactions.list[d],p=f.prepared.name;if(f.interacting()){if(++l>=s)return!1;if(f.interactable===t){if((c+=p===n.name?1:0)>=o)return!1;if(f.element===e&&(u++,p===n.name&&u>=a))return!1}}}return s>0}function Wt(t,e){return o.default.number(t)?(e.autoStart.maxInteractions=t,this):e.autoStart.maxInteractions}function Bt(t,e,n){var r=n.autoStart.cursorElement;r&&r!==t&&(r.style.cursor=""),t.ownerDocument.documentElement.style.cursor=e,t.style.cursor=e,n.autoStart.cursorElement=e?t:null}function Lt(t,e){var n=t.interactable,r=t.element,i=t.prepared;if("mouse"===t.pointerType&&n&&n.options.styleCursor){var a="";if(i.name){var s=n.options[i.name].cursorChecker;a=o.default.func(s)?s(i,n,r,t._interacting):e.actions.map[i.name].getCursor(i)}Bt(t.element,a||"",e)}else e.autoStart.cursorElement&&Bt(e.autoStart.cursorElement,"",e)}Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.default=void 0;var Nt={id:"auto-start/base",before:["actions"],install:function(t){var e=t.interactStatic,n=t.defaults;t.usePlugin(Dt.default),n.base.actionChecker=null,n.base.styleCursor=!0,(0,T.default)(n.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),e.maxInteractions=function(e){return Wt(e,t)},t.autoStart={maxInteractions:1/0,withinInteractionLimit:Yt,cursorElement:null}},listeners:{"interactions:down":function(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget;n.interacting()||Xt(n,Ft(n,r,i,o,e),e)},"interactions:move":function(t,e){!function(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget;"mouse"!==n.pointerType||n.pointerIsDown||n.interacting()||Xt(n,Ft(n,r,i,o,e),e)}(t,e),function(t,e){var n=t.interaction;if(n.pointerIsDown&&!n.interacting()&&n.pointerWasMoved&&n.prepared.name){e.fire("autoStart:before-start",t);var r=n.interactable,i=n.prepared.name;i&&r&&(r.options[i].manualStart||!Yt(r,n.element,n.prepared,e)?n.stop():(n.start(n.prepared,r,n.element),Lt(n,e)))}}(t,e)},"interactions:stop":function(t,e){var n=t.interaction,r=n.interactable;r&&r.options.styleCursor&&Bt(n.element,"",e)}},maxInteractions:Wt,withinInteractionLimit:Yt,validateAction:kt};Ct.default=Nt;var Vt={};Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.default=void 0;var qt={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(t,e){var n=t.interaction,r=t.eventTarget,i=t.dx,a=t.dy;if("drag"===n.prepared.name){var s=Math.abs(i),l=Math.abs(a),c=n.interactable.options.drag,u=c.startAxis,d=s>l?"x":s<l?"y":"xy";if(n.prepared.axis="start"===c.lockAxis?d[0]:c.lockAxis,"xy"!==d&&"xy"!==u&&u!==d){n.prepared.name=null;for(var f=r,p=function(t){if(t!==n.interactable){var i=n.interactable.options.drag;if(!i.manualStart&&t.testIgnoreAllow(i,f,r)){var o=t.getAction(n.downPointer,n.downEvent,n,f);if(o&&"drag"===o.name&&function(t,e){if(!e)return!1;var n=e.options.drag.startAxis;return"xy"===t||"xy"===n||n===t}(d,t)&&Ct.default.validateAction(o,t,f,r,e))return t}}};o.default.element(f);){var v=e.interactables.forEachMatch(f,p);if(v){n.prepared.name="drag",n.interactable=v,n.element=f;break}f=(0,_.parentNode)(f)}}}}}};Vt.default=qt;var Ut={};function Gt(t){var e=t.prepared&&t.prepared.name;if(!e)return null;var n=t.interactable.options;return n[e].hold||n[e].delay}Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.default=void 0;var Ht={id:"auto-start/hold",install:function(t){var e=t.defaults;t.usePlugin(Ct.default),e.perAction.hold=0,e.perAction.delay=0},listeners:{"interactions:new":function(t){t.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(t){var e=t.interaction,n=Gt(e);n>0&&(e.autoStartHoldTimer=setTimeout((function(){e.start(e.prepared,e.interactable,e.element)}),n))},"interactions:move":function(t){var e=t.interaction,n=t.duplicate;e.autoStartHoldTimer&&e.pointerWasMoved&&!n&&(clearTimeout(e.autoStartHoldTimer),e.autoStartHoldTimer=null)},"autoStart:before-start":function(t){var e=t.interaction;Gt(e)>0&&(e.prepared.name=null)}},getHoldDuration:Gt};Ut.default=Ht;var $t={};Object.defineProperty($t,"__esModule",{value:!0}),$t.default=void 0;var Kt={id:"auto-start",install:function(t){t.usePlugin(Ct.default),t.usePlugin(Ut.default),t.usePlugin(Vt.default)}};$t.default=Kt;var Zt={};Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.default=void 0,Zt.default={};var Jt={};function Qt(t){return/^(always|never|auto)$/.test(t)?(this.options.preventDefault=t,this):o.default.bool(t)?(this.options.preventDefault=t?"always":"never",this):this.options.preventDefault}function te(t){var e=t.interaction,n=t.event;e.interactable&&e.interactable.checkAndPreventDefault(n)}function ee(t){var n=t.Interactable;n.prototype.preventDefault=Qt,n.prototype.checkAndPreventDefault=function(n){return function(t,n,r){var i=t.options.preventDefault;if("never"!==i)if("always"!==i){if(n.events.supportsPassive&&/^touch(start|move)$/.test(r.type)){var a=(0,e.getWindow)(r.target).document,s=n.getDocOptions(a);if(!s||!s.events||!1!==s.events.passive)return}/^(mouse|pointer|touch)*(down|start)/i.test(r.type)||o.default.element(r.target)&&(0,_.matchesSelector)(r.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||r.preventDefault()}else r.preventDefault()}(this,t,n)},t.interactions.docEvents.push({type:"dragstart",listener:function(e){for(var n=0;n<t.interactions.list.length;n++){var r=t.interactions.list[n];if(r.element&&(r.element===e.target||(0,_.nodeContains)(r.element,e.target)))return void r.interactable.checkAndPreventDefault(e)}}})}Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.install=ee,Jt.default=void 0;var ne={id:"core/interactablePreventDefault",install:ee,listeners:["down","move","up","cancel"].reduce((function(t,e){return t["interactions:"+e]=te,t}),{})};Jt.default=ne;var re,ie={};Object.defineProperty(ie,"__esModule",{value:!0}),ie.default=void 0,function(t){t.touchAction="touchAction",t.boxSizing="boxSizing",t.noListeners="noListeners"}(re||(re={}));var oe="[interact.js] ",ae={touchAction:"https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action",boxSizing:"https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing"},se=[{name:re.touchAction,perform:function(t){return!function(t,e,n){for(var r=t;o.default.element(r);){if(le(r,"touchAction",n))return!0;r=(0,_.parentNode)(r)}return!1}(t.element,0,/pan-|pinch|none/)},getInfo:function(t){return[t.element,ae.touchAction]},text:'Consider adding CSS "touch-action: none" to this element\n'},{name:re.boxSizing,perform:function(t){var e=t.element;return"resize"===t.prepared.name&&e instanceof v.default.HTMLElement&&!le(e,"boxSizing",/border-box/)},text:'Consider adding CSS "box-sizing: border-box" to this resizable element',getInfo:function(t){return[t.element,ae.boxSizing]}},{name:re.noListeners,perform:function(t){var e=t.prepared.name;return!(t.interactable.events.types[e+"move"]||[]).length},getInfo:function(t){return[t.prepared.name,t.interactable]},text:"There are no listeners set for this action"}];function le(t,n,r){var i=t.style[n]||e.window.getComputedStyle(t)[n];return r.test((i||"").toString())}var ce={id:"dev-tools",install:function(t,e){var n=(void 0===e?{}:e).logger,r=t.Interactable,i=t.defaults;t.logger=n||console,i.base.devTools={ignore:{}},r.prototype.devTools=function(t){return t?((0,T.default)(this.options.devTools,t),this):this.options.devTools}},listeners:{"interactions:action-start":function(t,e){for(var n=t.interaction,r=0;r<se.length;r++){var i,o=se[r],a=n.interactable&&n.interactable.options;a&&a.devTools&&a.devTools.ignore[o.name]||!o.perform(n)||(i=e.logger).warn.apply(i,[oe+o.text].concat(o.getInfo(n)))}}},checks:se,CheckName:re,links:ae,prefix:oe};ie.default=ce;var ue={};Object.defineProperty(ue,"__esModule",{value:!0}),ue.default=void 0,ue.default={};var de={};Object.defineProperty(de,"__esModule",{value:!0}),de.default=function t(e){var n={};for(var r in e){var i=e[r];o.default.plainObject(i)?n[r]=t(i):o.default.array(i)?n[r]=G.from(i):n[r]=i}return n};var fe={};Object.defineProperty(fe,"__esModule",{value:!0}),fe.getRectOffset=he,fe.default=void 0;var pe=function(){function t(t){this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=t,this.result=ve()}var e=t.prototype;return e.start=function(t,e){var n=t.phase,r=this.interaction,i=function(t){var e=t.interactable.options[t.prepared.name],n=e.modifiers;return n&&n.length?n:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map((function(t){var n=e[t];return n&&n.enabled&&{options:n,methods:n._methods}})).filter((function(t){return!!t}))}(r);this.prepareStates(i),this.edges=(0,T.default)({},r.edges),this.startOffset=he(r.rect,e),this.startDelta={x:0,y:0};var o=this.fillArg({phase:n,pageCoords:e,preEnd:!1});return this.result=ve(),this.startAll(o),this.result=this.setAll(o)},e.fillArg=function(t){var e=this.interaction;return t.interaction=e,t.interactable=e.interactable,t.element=e.element,t.rect=t.rect||e.rect,t.edges=this.edges,t.startOffset=this.startOffset,t},e.startAll=function(t){for(var e=0;e<this.states.length;e++){var n=this.states[e];n.methods.start&&(t.state=n,n.methods.start(t))}},e.setAll=function(t){var e=t.phase,n=t.preEnd,r=t.skipModifiers,i=t.rect;t.coords=(0,T.default)({},t.pageCoords),t.rect=(0,T.default)({},i);for(var o=r?this.states.slice(r):this.states,a=ve(t.coords,t.rect),s=0;s<o.length;s++){var l,c=o[s],u=c.options,d=(0,T.default)({},t.coords),f=null;null!=(l=c.methods)&&l.set&&this.shouldDo(u,n,e)&&(t.state=c,f=c.methods.set(t),I.addEdges(this.interaction.edges,t.rect,{x:t.coords.x-d.x,y:t.coords.y-d.y})),a.eventProps.push(f)}a.delta.x=t.coords.x-t.pageCoords.x,a.delta.y=t.coords.y-t.pageCoords.y,a.rectDelta.left=t.rect.left-i.left,a.rectDelta.right=t.rect.right-i.right,a.rectDelta.top=t.rect.top-i.top,a.rectDelta.bottom=t.rect.bottom-i.bottom;var p=this.result.coords,v=this.result.rect;if(p&&v){var h=a.rect.left!==v.left||a.rect.right!==v.right||a.rect.top!==v.top||a.rect.bottom!==v.bottom;a.changed=h||p.x!==a.coords.x||p.y!==a.coords.y}return a},e.applyToInteraction=function(t){var e=this.interaction,n=t.phase,r=e.coords.cur,i=e.coords.start,o=this.result,a=this.startDelta,s=o.delta;"start"===n&&(0,T.default)(this.startDelta,o.delta);for(var l=[[i,a],[r,s]],c=0;c<l.length;c++){var u=l[c],d=u[0],f=u[1];d.page.x+=f.x,d.page.y+=f.y,d.client.x+=f.x,d.client.y+=f.y}var p=this.result.rectDelta,v=t.rect||e.rect;v.left+=p.left,v.right+=p.right,v.top+=p.top,v.bottom+=p.bottom,v.width=v.right-v.left,v.height=v.bottom-v.top},e.setAndApply=function(t){var e=this.interaction,n=t.phase,r=t.preEnd,i=t.skipModifiers,o=this.setAll(this.fillArg({preEnd:r,phase:n,pageCoords:t.modifiedCoords||e.coords.cur.page}));if(this.result=o,!o.changed&&(!i||i<this.states.length)&&e.interacting())return!1;if(t.modifiedCoords){var a=e.coords.cur.page,s={x:t.modifiedCoords.x-a.x,y:t.modifiedCoords.y-a.y};o.coords.x+=s.x,o.coords.y+=s.y,o.delta.x+=s.x,o.delta.y+=s.y}this.applyToInteraction(t)},e.beforeEnd=function(t){var e=t.interaction,n=t.event,r=this.states;if(r&&r.length){for(var i=!1,o=0;o<r.length;o++){var a=r[o];t.state=a;var s=a.options,l=a.methods,c=l.beforeEnd&&l.beforeEnd(t);if(c)return this.endResult=c,!1;i=i||!i&&this.shouldDo(s,!0,t.phase,!0)}i&&e.move({event:n,preEnd:!0})}},e.stop=function(t){var e=t.interaction;if(this.states&&this.states.length){var n=(0,T.default)({states:this.states,interactable:e.interactable,element:e.element,rect:null},t);this.fillArg(n);for(var r=0;r<this.states.length;r++){var i=this.states[r];n.state=i,i.methods.stop&&i.methods.stop(n)}this.states=null,this.endResult=null}},e.prepareStates=function(t){this.states=[];for(var e=0;e<t.length;e++){var n=t[e],r=n.options,i=n.methods,o=n.name;this.states.push({options:r,methods:i,index:e,name:o})}return this.states},e.restoreInteractionCoords=function(t){var e=t.interaction,n=e.coords,r=e.rect,i=e.modification;if(i.result){for(var o=i.startDelta,a=i.result,s=a.delta,l=a.rectDelta,c=[[n.start,o],[n.cur,s]],u=0;u<c.length;u++){var d=c[u],f=d[0],p=d[1];f.page.x-=p.x,f.page.y-=p.y,f.client.x-=p.x,f.client.y-=p.y}r.left-=l.left,r.right-=l.right,r.top-=l.top,r.bottom-=l.bottom}},e.shouldDo=function(t,e,n,r){return!(!t||!1===t.enabled||r&&!t.endOnly||t.endOnly&&!e||"start"===n&&!t.setStart)},e.copyFrom=function(t){this.startOffset=t.startOffset,this.startDelta=t.startDelta,this.edges=t.edges,this.states=t.states.map((function(t){return(0,de.default)(t)})),this.result=ve((0,T.default)({},t.result.coords),(0,T.default)({},t.result.rect))},e.destroy=function(){for(var t in this)this[t]=null},t}();function ve(t,e){return{rect:e,coords:t,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function he(t,e){return t?{left:e.x-t.left,top:e.y-t.top,right:t.right-e.x,bottom:t.bottom-e.y}:{left:0,top:0,right:0,bottom:0}}fe.default=pe;var ge={};function me(t){var e=t.iEvent,n=t.interaction.modification.result;n&&(e.modifiers=n.eventProps)}Object.defineProperty(ge,"__esModule",{value:!0}),ge.makeModifier=function(t,e){var n=t.defaults,r={start:t.start,set:t.set,beforeEnd:t.beforeEnd,stop:t.stop},i=function(t){var i=t||{};for(var o in i.enabled=!1!==i.enabled,n)o in i||(i[o]=n[o]);var a={options:i,methods:r,name:e,enable:function(){return i.enabled=!0,a},disable:function(){return i.enabled=!1,a}};return a};return e&&"string"==typeof e&&(i._defaults=n,i._methods=r),i},ge.addEventModifiers=me,ge.default=void 0;var ye={id:"modifiers/base",before:["actions"],install:function(t){t.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(t){var e=t.interaction;e.modification=new fe.default(e)},"interactions:before-action-start":function(t){var e=t.interaction.modification;e.start(t,t.interaction.coords.start.page),t.interaction.edges=e.edges,e.applyToInteraction(t)},"interactions:before-action-move":function(t){return t.interaction.modification.setAndApply(t)},"interactions:before-action-end":function(t){return t.interaction.modification.beforeEnd(t)},"interactions:action-start":me,"interactions:action-move":me,"interactions:action-end":me,"interactions:after-action-start":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-move":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:stop":function(t){return t.interaction.modification.stop(t)}}};ge.default=ye;var be={};Object.defineProperty(be,"__esModule",{value:!0}),be.defaults=void 0,be.defaults={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}};var xe={};Object.defineProperty(xe,"__esModule",{value:!0}),xe.InteractEvent=void 0;var _e=function(t){var e,n;function r(e,n,r,i,o,a,s){var l;(l=t.call(this,e)||this).target=void 0,l.currentTarget=void 0,l.relatedTarget=null,l.screenX=void 0,l.screenY=void 0,l.button=void 0,l.buttons=void 0,l.ctrlKey=void 0,l.shiftKey=void 0,l.altKey=void 0,l.metaKey=void 0,l.page=void 0,l.client=void 0,l.delta=void 0,l.rect=void 0,l.x0=void 0,l.y0=void 0,l.t0=void 0,l.dt=void 0,l.duration=void 0,l.clientX0=void 0,l.clientY0=void 0,l.velocity=void 0,l.speed=void 0,l.swipe=void 0,l.timeStamp=void 0,l.axes=void 0,l.preEnd=void 0,o=o||e.element;var c=e.interactable,u=(c&&c.options||be.defaults).deltaSource,d=(0,j.default)(c,o,r),f="start"===i,p="end"===i,v=f?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(l):e.prevEvent,h=f?e.coords.start:p?{page:v.page,client:v.client,timeStamp:e.coords.cur.timeStamp}:e.coords.cur;return l.page=(0,T.default)({},h.page),l.client=(0,T.default)({},h.client),l.rect=(0,T.default)({},e.rect),l.timeStamp=h.timeStamp,p||(l.page.x-=d.x,l.page.y-=d.y,l.client.x-=d.x,l.client.y-=d.y),l.ctrlKey=n.ctrlKey,l.altKey=n.altKey,l.shiftKey=n.shiftKey,l.metaKey=n.metaKey,l.button=n.button,l.buttons=n.buttons,l.target=o,l.currentTarget=o,l.preEnd=a,l.type=s||r+(i||""),l.interactable=c,l.t0=f?e.pointers[e.pointers.length-1].downTime:v.t0,l.x0=e.coords.start.page.x-d.x,l.y0=e.coords.start.page.y-d.y,l.clientX0=e.coords.start.client.x-d.x,l.clientY0=e.coords.start.client.y-d.y,l.delta=f||p?{x:0,y:0}:{x:l[u].x-v[u].x,y:l[u].y-v[u].y},l.dt=e.coords.delta.timeStamp,l.duration=l.timeStamp-l.t0,l.velocity=(0,T.default)({},e.coords.velocity[u]),l.speed=(0,C.default)(l.velocity.x,l.velocity.y),l.swipe=p||"inertiastart"===i?l.getSwipe():null,l}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var i=r.prototype;return i.getSwipe=function(){var t=this._interaction;if(t.prevEvent.speed<600||this.timeStamp-t.prevEvent.timeStamp>150)return null;var e=180*Math.atan2(t.prevEvent.velocityY,t.prevEvent.velocityX)/Math.PI;e<0&&(e+=360);var n=112.5<=e&&e<247.5,r=202.5<=e&&e<337.5;return{up:r,down:!r&&22.5<=e&&e<157.5,left:n,right:!n&&(292.5<=e||e<67.5),angle:e,speed:t.prevEvent.speed,velocity:{x:t.prevEvent.velocityX,y:t.prevEvent.velocityY}}},i.preventDefault=function(){},i.stopImmediatePropagation=function(){this.immediatePropagationStopped=this.propagationStopped=!0},i.stopPropagation=function(){this.propagationStopped=!0},r}(q.BaseEvent);xe.InteractEvent=_e,Object.defineProperties(_e.prototype,{pageX:{get:function(){return this.page.x},set:function(t){this.page.x=t}},pageY:{get:function(){return this.page.y},set:function(t){this.page.y=t}},clientX:{get:function(){return this.client.x},set:function(t){this.client.x=t}},clientY:{get:function(){return this.client.y},set:function(t){this.client.y=t}},dx:{get:function(){return this.delta.x},set:function(t){this.delta.x=t}},dy:{get:function(){return this.delta.y},set:function(t){this.delta.y=t}},velocityX:{get:function(){return this.velocity.x},set:function(t){this.velocity.x=t}},velocityY:{get:function(){return this.velocity.y},set:function(t){this.velocity.y=t}}});var we={};Object.defineProperty(we,"__esModule",{value:!0}),we.PointerInfo=void 0,we.PointerInfo=function(t,e,n,r,i){this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=t,this.pointer=e,this.event=n,this.downTime=r,this.downTarget=i};var Pe,Ee,Se={};function Me(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)}}Object.defineProperty(Se,"__esModule",{value:!0}),Object.defineProperty(Se,"PointerInfo",{enumerable:!0,get:function(){return we.PointerInfo}}),Se.default=Se.Interaction=Se._ProxyMethods=Se._ProxyValues=void 0,Se._ProxyValues=Pe,function(t){t.interactable="",t.element="",t.prepared="",t.pointerIsDown="",t.pointerWasMoved="",t._proxy=""}(Pe||(Se._ProxyValues=Pe={})),Se._ProxyMethods=Ee,function(t){t.start="",t.move="",t.end="",t.stop="",t.interacting=""}(Ee||(Se._ProxyMethods=Ee={}));var Oe=0,Te=function(){var t,e;function n(t){var e=this,n=t.pointerType,r=t.scopeFire;this.interactable=null,this.element=null,this.rect=void 0,this._rects=void 0,this.edges=void 0,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=null,this.simulation=null,this.doMove=(0,It.warnOnce)((function(t){this.move(t)}),"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:X.newCoords(),prev:X.newCoords(),cur:X.newCoords(),delta:X.newCoords(),velocity:X.newCoords()},this._id=Oe++,this._scopeFire=r,this.pointerType=n;var i=this;this._proxy={};var o=function(t){Object.defineProperty(e._proxy,t,{get:function(){return i[t]}})};for(var a in Pe)o(a);var s=function(t){Object.defineProperty(e._proxy,t,{value:function(){return i[t].apply(i,arguments)}})};for(var l in Ee)s(l);this._scopeFire("interactions:new",{interaction:this})}t=n,(e=[{key:"pointerMoveTolerance",get:function(){return 1}}])&&Me(t.prototype,e);var r=n.prototype;return r.pointerDown=function(t,e,n){var r=this.updatePointer(t,e,n,!0),i=this.pointers[r];this._scopeFire("interactions:down",{pointer:t,event:e,eventTarget:n,pointerIndex:r,pointerInfo:i,type:"down",interaction:this})},r.start=function(t,e,n){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<("gesture"===t.name?2:1)||!e.options[t.name].enabled)&&((0,It.copyAction)(this.prepared,t),this.interactable=e,this.element=n,this.rect=e.getRect(n),this.edges=this.prepared.edges?(0,T.default)({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)},r.pointerMove=function(t,e,n){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,e,n,!1);var r,i,o=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(r=this.coords.cur.client.x-this.coords.start.client.x,i=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=(0,C.default)(r,i)>this.pointerMoveTolerance);var a=this.getPointerIndex(t),s={pointer:t,pointerIndex:a,pointerInfo:this.pointers[a],event:e,type:"move",eventTarget:n,dx:r,dy:i,duplicate:o,interaction:this};o||X.setCoordVelocity(this.coords.velocity,this.coords.delta),this._scopeFire("interactions:move",s),o||this.simulation||(this.interacting()&&(s.type=null,this.move(s)),this.pointerWasMoved&&X.copyCoords(this.coords.prev,this.coords.cur))},r.move=function(t){t&&t.event||X.setZeroCoords(this.coords.delta),(t=(0,T.default)({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},t||{})).phase="move",this._doPhase(t)},r.pointerUp=function(t,e,n,r){var i=this.getPointerIndex(t);-1===i&&(i=this.updatePointer(t,e,n,!1));var o=/cancel$/i.test(e.type)?"cancel":"up";this._scopeFire("interactions:"+o,{pointer:t,pointerIndex:i,pointerInfo:this.pointers[i],event:e,eventTarget:n,type:o,curEventTarget:r,interaction:this}),this.simulation||this.end(e),this.removePointer(t,e)},r.documentBlur=function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})},r.end=function(t){var e;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(e=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,!0===e&&this.stop()},r.currentAction=function(){return this._interacting?this.prepared.name:null},r.interacting=function(){return this._interacting},r.stop=function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null},r.getPointerIndex=function(t){var e=X.getPointerId(t);return"mouse"===this.pointerType||"pen"===this.pointerType?this.pointers.length-1:G.findIndex(this.pointers,(function(t){return t.id===e}))},r.getPointerInfo=function(t){return this.pointers[this.getPointerIndex(t)]},r.updatePointer=function(t,e,n,r){var i=X.getPointerId(t),o=this.getPointerIndex(t),a=this.pointers[o];return r=!1!==r&&(r||/(down|start)$/i.test(e.type)),a?a.pointer=t:(a=new we.PointerInfo(i,t,e,null,null),o=this.pointers.length,this.pointers.push(a)),X.setCoords(this.coords.cur,this.pointers.map((function(t){return t.pointer})),this._now()),X.setCoordDeltas(this.coords.delta,this.coords.prev,this.coords.cur),r&&(this.pointerIsDown=!0,a.downTime=this.coords.cur.timeStamp,a.downTarget=n,X.pointerExtend(this.downPointer,t),this.interacting()||(X.copyCoords(this.coords.start,this.coords.cur),X.copyCoords(this.coords.prev,this.coords.cur),this.downEvent=e,this.pointerWasMoved=!1)),this._updateLatestPointer(t,e,n),this._scopeFire("interactions:update-pointer",{pointer:t,event:e,eventTarget:n,down:r,pointerInfo:a,pointerIndex:o,interaction:this}),o},r.removePointer=function(t,e){var n=this.getPointerIndex(t);if(-1!==n){var r=this.pointers[n];this._scopeFire("interactions:remove-pointer",{pointer:t,event:e,eventTarget:null,pointerIndex:n,pointerInfo:r,interaction:this}),this.pointers.splice(n,1),this.pointerIsDown=!1}},r._updateLatestPointer=function(t,e,n){this._latestPointer.pointer=t,this._latestPointer.event=e,this._latestPointer.eventTarget=n},r.destroy=function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null},r._createPreparedEvent=function(t,e,n,r){return new xe.InteractEvent(this,t,this.prepared.name,e,this.element,n,r)},r._fireEvent=function(t){this.interactable.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)},r._doPhase=function(t){var e=t.event,n=t.phase,r=t.preEnd,i=t.type,o=this.rect;if(o&&"move"===n&&(I.addEdges(this.edges,o,this.coords.delta[this.interactable.options.deltaSource]),o.width=o.right-o.left,o.height=o.bottom-o.top),!1===this._scopeFire("interactions:before-action-"+n,t))return!1;var a=t.iEvent=this._createPreparedEvent(e,n,r,i);return this._scopeFire("interactions:action-"+n,t),"start"===n&&(this.prevEvent=a),this._fireEvent(a),this._scopeFire("interactions:after-action-"+n,t),!0},r._now=function(){return Date.now()},n}();Se.Interaction=Te;var Ie=Te;Se.default=Ie;var De={};function je(t){t.pointerIsDown&&(ke(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}function ze(t){Ae(t.interaction)}function Ae(t){if(!function(t){return!(!t.offset.pending.x&&!t.offset.pending.y)}(t))return!1;var e=t.offset.pending;return ke(t.coords.cur,e),ke(t.coords.delta,e),I.addEdges(t.edges,t.rect,e),e.x=0,e.y=0,!0}function Ce(t){var e=t.x,n=t.y;this.offset.pending.x+=e,this.offset.pending.y+=n,this.offset.total.x+=e,this.offset.total.y+=n}function ke(t,e){var n=t.page,r=t.client,i=e.x,o=e.y;n.x+=i,n.y+=o,r.x+=i,r.y+=o}Object.defineProperty(De,"__esModule",{value:!0}),De.addTotal=je,De.applyPending=Ae,De.default=void 0,Se._ProxyMethods.offsetBy="";var Re={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(t){t.Interaction.prototype.offsetBy=Ce},listeners:{"interactions:new":function(t){t.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(t){return je(t.interaction)},"interactions:before-action-start":ze,"interactions:before-action-move":ze,"interactions:before-action-end":function(t){var e=t.interaction;if(Ae(e))return e.move({offset:!0}),e.end(),!1},"interactions:stop":function(t){var e=t.interaction;e.offset.total.x=0,e.offset.total.y=0,e.offset.pending.x=0,e.offset.pending.y=0}}};De.default=Re;var Fe={};Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.default=Fe.InertiaState=void 0;var Xe=function(){function t(t){this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=t}var e=t.prototype;return e.start=function(t){var e=this.interaction,n=Ye(e);if(!n||!n.enabled)return!1;var r=e.coords.velocity.client,i=(0,C.default)(r.x,r.y),o=this.modification||(this.modification=new fe.default(e));if(o.copyFrom(e.modification),this.t0=e._now(),this.allowResume=n.allowResume,this.v0=i,this.currentOffset={x:0,y:0},this.startCoords=e.coords.cur.page,this.modifierArg=o.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-e.coords.cur.timeStamp<50&&i>n.minSpeed&&i>n.endSpeed)this.startInertia();else{if(o.result=o.setAll(this.modifierArg),!o.result.changed)return!1;this.startSmoothEnd()}return e.modification.result.rect=null,e.offsetBy(this.targetOffset),e._doPhase({interaction:e,event:t,phase:"inertiastart"}),e.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),e.modification.result.rect=null,this.active=!0,e.simulation=this,!0},e.startInertia=function(){var t=this,e=this.interaction.coords.velocity.client,n=Ye(this.interaction),r=n.resistance,i=-Math.log(n.endSpeed/this.v0)/r;this.targetOffset={x:(e.x-i)/r,y:(e.y-i)/r},this.te=i,this.lambda_v0=r/this.v0,this.one_ve_v0=1-n.endSpeed/this.v0;var o=this.modification,a=this.modifierArg;a.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},o.result=o.setAll(a),o.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+o.result.delta.x,y:this.targetOffset.y+o.result.delta.y}),this.onNextFrame((function(){return t.inertiaTick()}))},e.startSmoothEnd=function(){var t=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame((function(){return t.smoothEndTick()}))},e.onNextFrame=function(t){var e=this;this.timeout=bt.default.request((function(){e.active&&t()}))},e.inertiaTick=function(){var t,e,n,r,i,o=this,a=this.interaction,s=Ye(a).resistance,l=(a._now()-this.t0)/1e3;if(l<this.te){var c,u=1-(Math.exp(-s*l)-this.lambda_v0)/this.one_ve_v0;this.isModified?(0,0,t=this.targetOffset.x,e=this.targetOffset.y,n=this.modifiedOffset.x,r=this.modifiedOffset.y,c={x:We(i=u,0,t,n),y:We(i,0,e,r)}):c={x:this.targetOffset.x*u,y:this.targetOffset.y*u};var d={x:c.x-this.currentOffset.x,y:c.y-this.currentOffset.y};this.currentOffset.x+=d.x,this.currentOffset.y+=d.y,a.offsetBy(d),a.move(),this.onNextFrame((function(){return o.inertiaTick()}))}else a.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()},e.smoothEndTick=function(){var t=this,e=this.interaction,n=e._now()-this.t0,r=Ye(e).smoothEndDuration;if(n<r){var i={x:Be(n,0,this.targetOffset.x,r),y:Be(n,0,this.targetOffset.y,r)},o={x:i.x-this.currentOffset.x,y:i.y-this.currentOffset.y};this.currentOffset.x+=o.x,this.currentOffset.y+=o.y,e.offsetBy(o),e.move({skipModifiers:this.modifierCount}),this.onNextFrame((function(){return t.smoothEndTick()}))}else e.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()},e.resume=function(t){var e=t.pointer,n=t.event,r=t.eventTarget,i=this.interaction;i.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),i.updatePointer(e,n,r,!0),i._doPhase({interaction:i,event:n,phase:"resume"}),(0,X.copyCoords)(i.coords.prev,i.coords.cur),this.stop()},e.end=function(){this.interaction.move(),this.interaction.end(),this.stop()},e.stop=function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,bt.default.cancel(this.timeout)},t}();function Ye(t){var e=t.interactable,n=t.prepared;return e&&e.options&&n.name&&e.options[n.name].inertia}function We(t,e,n,r){var i=1-t;return i*i*e+2*i*t*n+t*t*r}function Be(t,e,n,r){return-n*(t/=r)*(t-2)+e}Fe.InertiaState=Xe;var Le={id:"inertia",before:["modifiers","actions"],install:function(t){var e=t.defaults;t.usePlugin(De.default),t.usePlugin(ge.default),t.actions.phases.inertiastart=!0,t.actions.phases.resume=!0,e.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(t){var e=t.interaction;e.inertia=new Xe(e)},"interactions:before-action-end":function(t){var e=t.interaction,n=t.event;return(!e._interacting||e.simulation||!e.inertia.start(n))&&null},"interactions:down":function(t){var e=t.interaction,n=t.eventTarget,r=e.inertia;if(r.active)for(var i=n;o.default.element(i);){if(i===e.element){r.resume(t);break}i=_.parentNode(i)}},"interactions:stop":function(t){var e=t.interaction.inertia;e.active&&e.stop()},"interactions:before-action-resume":function(t){var e=t.interaction.modification;e.stop(t),e.start(t,t.interaction.coords.cur.page),e.applyToInteraction(t)},"interactions:before-action-inertiastart":function(t){return t.interaction.modification.setAndApply(t)},"interactions:action-resume":ge.addEventModifiers,"interactions:action-inertiastart":ge.addEventModifiers,"interactions:after-action-inertiastart":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-resume":function(t){return t.interaction.modification.restoreInteractionCoords(t)}}};Fe.default=Le;var Ne={};function Ve(t,e){for(var n=0;n<e.length;n++){var r=e[n];if(t.immediatePropagationStopped)break;r(t)}}Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.Eventable=void 0;var qe=function(){function t(t){this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=(0,T.default)({},t||{})}var e=t.prototype;return e.fire=function(t){var e,n=this.global;(e=this.types[t.type])&&Ve(t,e),!t.propagationStopped&&n&&(e=n[t.type])&&Ve(t,e)},e.on=function(t,e){var n=(0,z.default)(t,e);for(t in n)this.types[t]=G.merge(this.types[t]||[],n[t])},e.off=function(t,e){var n=(0,z.default)(t,e);for(t in n){var r=this.types[t];if(r&&r.length)for(var i=0;i<n[t].length;i++){var o=n[t][i],a=r.indexOf(o);-1!==a&&r.splice(a,1)}}},e.getRect=function(t){return null},t}();Ne.Eventable=qe;var Ue={};Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.default=function(t,e){if(e.phaselessTypes[t])return!0;for(var n in e.map)if(0===t.indexOf(n)&&t.substr(n.length)in e.phases)return!0;return!1};var Ge={};function He(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)}}Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.Interactable=void 0;var $e=function(){var t,n;function r(t,n,r,i){this.options=void 0,this._actions=void 0,this.target=void 0,this.events=new Ne.Eventable,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._rectChecker=void 0,this._actions=n.actions,this.target=t,this._context=n.context||r,this._win=(0,e.getWindow)((0,_.trySelector)(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=i,this.set(n)}t=r,(n=[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}}])&&He(t.prototype,n);var i=r.prototype;return i.setOnEvents=function(t,e){return o.default.func(e.onstart)&&this.on(t+"start",e.onstart),o.default.func(e.onmove)&&this.on(t+"move",e.onmove),o.default.func(e.onend)&&this.on(t+"end",e.onend),o.default.func(e.oninertiastart)&&this.on(t+"inertiastart",e.oninertiastart),this},i.updatePerActionListeners=function(t,e,n){(o.default.array(e)||o.default.object(e))&&this.off(t,e),(o.default.array(n)||o.default.object(n))&&this.on(t,n)},i.setPerAction=function(t,e){var n=this._defaults;for(var r in e){var i=r,a=this.options[t],s=e[i];"listeners"===i&&this.updatePerActionListeners(t,a.listeners,s),o.default.array(s)?a[i]=G.from(s):o.default.plainObject(s)?(a[i]=(0,T.default)(a[i]||{},(0,de.default)(s)),o.default.object(n.perAction[i])&&"enabled"in n.perAction[i]&&(a[i].enabled=!1!==s.enabled)):o.default.bool(s)&&o.default.object(n.perAction[i])?a[i].enabled=s:a[i]=s}},i.getRect=function(t){return t=t||(o.default.element(this.target)?this.target:null),o.default.string(this.target)&&(t=t||this._context.querySelector(this.target)),(0,_.getElementRect)(t)},i.rectChecker=function(t){var e=this;return o.default.func(t)?(this._rectChecker=t,this.getRect=function(t){var n=(0,T.default)({},e._rectChecker(t));return"width"in n||(n.width=n.right-n.left,n.height=n.bottom-n.top),n},this):null===t?(delete this.getRect,delete this._rectChecker,this):this.getRect},i._backCompatOption=function(t,e){if((0,_.trySelector)(e)||o.default.object(e)){for(var n in this.options[t]=e,this._actions.map)this.options[n][t]=e;return this}return this.options[t]},i.origin=function(t){return this._backCompatOption("origin",t)},i.deltaSource=function(t){return"page"===t||"client"===t?(this.options.deltaSource=t,this):this.options.deltaSource},i.context=function(){return this._context},i.inContext=function(t){return this._context===t.ownerDocument||(0,_.nodeContains)(this._context,t)},i.testIgnoreAllow=function(t,e,n){return!this.testIgnore(t.ignoreFrom,e,n)&&this.testAllow(t.allowFrom,e,n)},i.testAllow=function(t,e,n){return!t||!!o.default.element(n)&&(o.default.string(t)?(0,_.matchesUpTo)(n,t,e):!!o.default.element(t)&&(0,_.nodeContains)(t,n))},i.testIgnore=function(t,e,n){return!(!t||!o.default.element(n))&&(o.default.string(t)?(0,_.matchesUpTo)(n,t,e):!!o.default.element(t)&&(0,_.nodeContains)(t,n))},i.fire=function(t){return this.events.fire(t),this},i._onOff=function(t,e,n,r){o.default.object(e)&&!o.default.array(e)&&(r=n,n=null);var i="on"===t?"add":"remove",a=(0,z.default)(e,n);for(var s in a){"wheel"===s&&(s=y.default.wheelEvent);for(var l=0;l<a[s].length;l++){var c=a[s][l];(0,Ue.default)(s,this._actions)?this.events[t](s,c):o.default.string(this.target)?this._scopeEvents[i+"Delegate"](this.target,this._context,s,c,r):this._scopeEvents[i](this.target,s,c,r)}}return this},i.on=function(t,e,n){return this._onOff("on",t,e,n)},i.off=function(t,e,n){return this._onOff("off",t,e,n)},i.set=function(t){var e=this._defaults;for(var n in o.default.object(t)||(t={}),this.options=(0,de.default)(e.base),this._actions.methodDict){var r=n,i=this._actions.methodDict[r];this.options[r]={},this.setPerAction(r,(0,T.default)((0,T.default)({},e.perAction),e.actions[r])),this[i](t[r])}for(var a in t)o.default.func(this[a])&&this[a](t[a]);return this},i.unset=function(){if(o.default.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var e=this._scopeEvents.delegatedEvents[t],n=e.length-1;n>=0;n--){var r=e[n],i=r.selector,a=r.context,s=r.listeners;i===this.target&&a===this._context&&e.splice(n,1);for(var l=s.length-1;l>=0;l--)this._scopeEvents.removeDelegate(this.target,this._context,t,s[l][0],s[l][1])}else this._scopeEvents.remove(this.target,"all")},r}();Ge.Interactable=$e;var Ke={};Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.InteractableSet=void 0;var Ze=function(){function t(t){var e=this;this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(t){var n=t.interactable,r=n.target,i=n._context,a=o.default.string(r)?e.selectorMap[r]:r[e.scope.id],s=G.findIndex(a,(function(t){return t.context===i}));a[s]&&(a[s].context=null,a[s].interactable=null),a.splice(s,1)}})}var e=t.prototype;return e.new=function(t,e){e=(0,T.default)(e||{},{actions:this.scope.actions});var n=new this.scope.Interactable(t,e,this.scope.document,this.scope.events),r={context:n._context,interactable:n};return this.scope.addDocument(n._doc),this.list.push(n),o.default.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(r)):(n.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(r)),this.scope.fire("interactable:new",{target:t,options:e,interactable:n,win:this.scope._win}),n},e.get=function(t,e){var n=e&&e.context||this.scope.document,r=o.default.string(t),i=r?this.selectorMap[t]:t[this.scope.id];if(!i)return null;var a=G.find(i,(function(e){return e.context===n&&(r||e.interactable.inContext(t))}));return a&&a.interactable},e.forEachMatch=function(t,e){for(var n=0;n<this.list.length;n++){var r=this.list[n],i=void 0;if((o.default.string(r.target)?o.default.element(t)&&_.matchesSelector(t,r.target):t===r.target)&&r.inContext(t)&&(i=e(r)),void 0!==i)return i}},t}();Ke.InteractableSet=Ze;var Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.default=void 0;var Qe=function(){function t(t){this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,(0,k.default)(this,t)}var e=t.prototype;return e.preventOriginalDefault=function(){this.originalEvent.preventDefault()},e.stopPropagation=function(){this.originalEvent.stopPropagation()},e.stopImmediatePropagation=function(){this.originalEvent.stopImmediatePropagation()},t}();function tn(t){if(!o.default.object(t))return{capture:!!t,passive:!1};var e=(0,T.default)({},t);return e.capture=!!t.capture,e.passive=!!t.passive,e}var en={id:"events",install:function(t){var e=[],n={},r=[],i={add:a,remove:s,addDelegate:function(t,e,i,o,s){var u=tn(s);if(!n[i]){n[i]=[];for(var d=0;d<r.length;d++){var f=r[d];a(f,i,l),a(f,i,c,!0)}}var p=n[i],v=G.find(p,(function(n){return n.selector===t&&n.context===e}));v||(v={selector:t,context:e,listeners:[]},p.push(v)),v.listeners.push([o,u])},removeDelegate:function(t,e,r,i,o){var a,u=tn(o),d=n[r],f=!1;if(d)for(a=d.length-1;a>=0;a--){var p=d[a];if(p.selector===t&&p.context===e){for(var v=p.listeners,h=v.length-1;h>=0;h--){var g=v[h],m=g[0],y=g[1],b=y.capture,x=y.passive;if(m===i&&b===u.capture&&x===u.passive){v.splice(h,1),v.length||(d.splice(a,1),s(e,r,l),s(e,r,c,!0)),f=!0;break}}if(f)break}}},delegateListener:l,delegateUseCapture:c,delegatedEvents:n,documents:r,targets:e,supportsOptions:!1,supportsPassive:!1};function a(t,n,r,o){var a=tn(o),s=G.find(e,(function(e){return e.eventTarget===t}));s||(s={eventTarget:t,events:{}},e.push(s)),s.events[n]||(s.events[n]=[]),t.addEventListener&&!G.contains(s.events[n],r)&&(t.addEventListener(n,r,i.supportsOptions?a:a.capture),s.events[n].push(r))}function s(t,n,r,o){var a=tn(o),l=G.findIndex(e,(function(e){return e.eventTarget===t})),c=e[l];if(c&&c.events)if("all"!==n){var u=!1,d=c.events[n];if(d){if("all"===r){for(var f=d.length-1;f>=0;f--)s(t,n,d[f],a);return}for(var p=0;p<d.length;p++)if(d[p]===r){t.removeEventListener(n,r,i.supportsOptions?a:a.capture),d.splice(p,1),0===d.length&&(delete c.events[n],u=!0);break}}u&&!Object.keys(c.events).length&&e.splice(l,1)}else for(n in c.events)c.events.hasOwnProperty(n)&&s(t,n,"all")}function l(t,e){for(var r=tn(e),i=new Qe(t),a=n[t.type],s=X.getEventTargets(t)[0],l=s;o.default.element(l);){for(var c=0;c<a.length;c++){var u=a[c],d=u.selector,f=u.context;if(_.matchesSelector(l,d)&&_.nodeContains(f,s)&&_.nodeContains(f,l)){var p=u.listeners;i.currentTarget=l;for(var v=0;v<p.length;v++){var h=p[v],g=h[0],m=h[1],y=m.capture,b=m.passive;y===r.capture&&b===r.passive&&g(i)}}}l=_.parentNode(l)}}function c(t){return l(t,!0)}return t.document.createElement("div").addEventListener("test",null,{get capture(){return i.supportsOptions=!0},get passive(){return i.supportsPassive=!0}}),t.events=i,i}};Je.default=en;var nn={};Object.defineProperty(nn,"__esModule",{value:!0}),nn.createInteractStatic=function(t){var e=function e(n,r){var i=t.interactables.get(n,r);return i||((i=t.interactables.new(n,r)).events.global=e.globalEvents),i};return e.getPointerAverage=X.pointerAverage,e.getTouchBBox=X.touchBBox,e.getTouchDistance=X.touchDistance,e.getTouchAngle=X.touchAngle,e.getElementRect=_.getElementRect,e.getElementClientRect=_.getElementClientRect,e.matchesSelector=_.matchesSelector,e.closest=_.closest,e.globalEvents={},e.version="1.10.3",e.scope=t,e.use=function(t,e){return this.scope.usePlugin(t,e),this},e.isSet=function(t,e){return!!this.scope.interactables.get(t,e&&e.context)},e.on=(0,It.warnOnce)((function(t,e,n){if(o.default.string(t)&&-1!==t.search(" ")&&(t=t.trim().split(/ +/)),o.default.array(t)){for(var r=0;r<t.length;r++){var i=t[r];this.on(i,e,n)}return this}if(o.default.object(t)){for(var a in t)this.on(a,t[a],e);return this}return(0,Ue.default)(t,this.scope.actions)?this.globalEvents[t]?this.globalEvents[t].push(e):this.globalEvents[t]=[e]:this.scope.events.add(this.scope.document,t,e,{options:n}),this}),"The interact.on() method is being deprecated"),e.off=(0,It.warnOnce)((function(t,e,n){if(o.default.string(t)&&-1!==t.search(" ")&&(t=t.trim().split(/ +/)),o.default.array(t)){for(var r=0;r<t.length;r++){var i=t[r];this.off(i,e,n)}return this}if(o.default.object(t)){for(var a in t)this.off(a,t[a],e);return this}var s;return(0,Ue.default)(t,this.scope.actions)?t in this.globalEvents&&-1!==(s=this.globalEvents[t].indexOf(e))&&this.globalEvents[t].splice(s,1):this.scope.events.remove(this.scope.document,t,e,n),this}),"The interact.off() method is being deprecated"),e.debug=function(){return this.scope},e.supportsTouch=function(){return y.default.supportsTouch},e.supportsPointerEvent=function(){return y.default.supportsPointerEvent},e.stop=function(){for(var t=0;t<this.scope.interactions.list.length;t++)this.scope.interactions.list[t].stop();return this},e.pointerMoveTolerance=function(t){return o.default.number(t)?(this.scope.interactions.pointerMoveTolerance=t,this):this.scope.interactions.pointerMoveTolerance},e.addDocument=function(t,e){this.scope.addDocument(t,e)},e.removeDocument=function(t){this.scope.removeDocument(t)},e};var rn={};Object.defineProperty(rn,"__esModule",{value:!0}),rn.default=void 0;var on={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(t){for(var e=0;e<on.methodOrder.length;e++){var n;n=on.methodOrder[e];var r=on[n](t);if(r)return r}return null},simulationResume:function(t){var e=t.pointerType,n=t.eventType,r=t.eventTarget,i=t.scope;if(!/down|start/i.test(n))return null;for(var o=0;o<i.interactions.list.length;o++){var a=i.interactions.list[o],s=r;if(a.simulation&&a.simulation.allowResume&&a.pointerType===e)for(;s;){if(s===a.element)return a;s=_.parentNode(s)}}return null},mouseOrPen:function(t){var e,n=t.pointerId,r=t.pointerType,i=t.eventType,o=t.scope;if("mouse"!==r&&"pen"!==r)return null;for(var a=0;a<o.interactions.list.length;a++){var s=o.interactions.list[a];if(s.pointerType===r){if(s.simulation&&!an(s,n))continue;if(s.interacting())return s;e||(e=s)}}if(e)return e;for(var l=0;l<o.interactions.list.length;l++){var c=o.interactions.list[l];if(!(c.pointerType!==r||/down/i.test(i)&&c.simulation))return c}return null},hasPointer:function(t){for(var e=t.pointerId,n=t.scope,r=0;r<n.interactions.list.length;r++){var i=n.interactions.list[r];if(an(i,e))return i}return null},idle:function(t){for(var e=t.pointerType,n=t.scope,r=0;r<n.interactions.list.length;r++){var i=n.interactions.list[r];if(1===i.pointers.length){var o=i.interactable;if(o&&(!o.options.gesture||!o.options.gesture.enabled))continue}else if(i.pointers.length>=2)continue;if(!i.interacting()&&e===i.pointerType)return i}return null}};function an(t,e){return t.pointers.some((function(t){return t.id===e}))}var sn=on;rn.default=sn;var ln={};function cn(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)}}Object.defineProperty(ln,"__esModule",{value:!0}),ln.default=void 0;var un=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function dn(t,e){return function(n){var r=e.interactions.list,i=X.getPointerType(n),o=X.getEventTargets(n),a=o[0],s=o[1],l=[];if(/^touch/.test(n.type)){e.prevTouchTime=e.now();for(var c=0;c<n.changedTouches.length;c++){var u=n.changedTouches[c],d={pointer:u,pointerId:X.getPointerId(u),pointerType:i,eventType:n.type,eventTarget:a,curEventTarget:s,scope:e},f=fn(d);l.push([d.pointer,d.eventTarget,d.curEventTarget,f])}}else{var p=!1;if(!y.default.supportsPointerEvent&&/mouse/.test(n.type)){for(var v=0;v<r.length&&!p;v++)p="mouse"!==r[v].pointerType&&r[v].pointerIsDown;p=p||e.now()-e.prevTouchTime<500||0===n.timeStamp}if(!p){var h={pointer:n,pointerId:X.getPointerId(n),pointerType:i,eventType:n.type,curEventTarget:s,eventTarget:a,scope:e},g=fn(h);l.push([h.pointer,h.eventTarget,h.curEventTarget,g])}}for(var m=0;m<l.length;m++){var b=l[m],x=b[0],_=b[1],w=b[2];b[3][t](x,n,_,w)}}}function fn(t){var e=t.pointerType,n=t.scope,r={interaction:rn.default.search(t),searchDetails:t};return n.fire("interactions:find",r),r.interaction||n.interactions.new({pointerType:e})}function pn(t,e){var n=t.doc,r=t.scope,i=t.options,o=r.interactions.docEvents,a=r.events,s=a[e];for(var l in r.browser.isIOS&&!i.events&&(i.events={passive:!1}),a.delegatedEvents)s(n,l,a.delegateListener),s(n,l,a.delegateUseCapture,!0);for(var c=i&&i.events,u=0;u<o.length;u++){var d=o[u];s(n,d.type,d.listener,c)}}var vn={id:"core/interactions",install:function(t){for(var e={},n=0;n<un.length;n++){var r=un[n];e[r]=dn(r,t)}var i,o=y.default.pEventTypes;function a(){for(var e=0;e<t.interactions.list.length;e++){var n=t.interactions.list[e];if(n.pointerIsDown&&"touch"===n.pointerType&&!n._interacting)for(var r=function(){var e=n.pointers[i];t.documents.some((function(t){var n=t.doc;return(0,_.nodeContains)(n,e.downTarget)}))||n.removePointer(e.pointer,e.event)},i=0;i<n.pointers.length;i++)r()}}(i=v.default.PointerEvent?[{type:o.down,listener:a},{type:o.down,listener:e.pointerDown},{type:o.move,listener:e.pointerMove},{type:o.up,listener:e.pointerUp},{type:o.cancel,listener:e.pointerUp}]:[{type:"mousedown",listener:e.pointerDown},{type:"mousemove",listener:e.pointerMove},{type:"mouseup",listener:e.pointerUp},{type:"touchstart",listener:a},{type:"touchstart",listener:e.pointerDown},{type:"touchmove",listener:e.pointerMove},{type:"touchend",listener:e.pointerUp},{type:"touchcancel",listener:e.pointerUp}]).push({type:"blur",listener:function(e){for(var n=0;n<t.interactions.list.length;n++)t.interactions.list[n].documentBlur(e)}}),t.prevTouchTime=0,t.Interaction=function(e){var n,r,i,o;function a(){return e.apply(this,arguments)||this}return r=e,(n=a).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,a.prototype._now=function(){return t.now()},i=a,(o=[{key:"pointerMoveTolerance",get:function(){return t.interactions.pointerMoveTolerance},set:function(e){t.interactions.pointerMoveTolerance=e}}])&&cn(i.prototype,o),a}(Se.default),t.interactions={list:[],new:function(e){e.scopeFire=function(e,n){return t.fire(e,n)};var n=new t.Interaction(e);return t.interactions.list.push(n),n},listeners:e,docEvents:i,pointerMoveTolerance:1},t.usePlugin(Jt.default)},listeners:{"scope:add-document":function(t){return pn(t,"add")},"scope:remove-document":function(t){return pn(t,"remove")},"interactable:unset":function(t,e){for(var n=t.interactable,r=e.interactions.list.length-1;r>=0;r--){var i=e.interactions.list[r];i.interactable===n&&(i.stop(),e.fire("interactions:destroy",{interaction:i}),i.destroy(),e.interactions.list.length>2&&e.interactions.list.splice(r,1))}}},onDocSignal:pn,doOnInteractions:dn,methodNames:un};ln.default=vn;var hn={};function gn(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)}}Object.defineProperty(hn,"__esModule",{value:!0}),hn.initScope=yn,hn.Scope=void 0;var mn=function(){function t(){var t=this;this.id="__interact_scope_"+Math.floor(100*Math.random()),this.isInitialized=!1,this.listenerMaps=[],this.browser=y.default,this.defaults=(0,de.default)(be.defaults),this.Eventable=Ne.Eventable,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=(0,nn.createInteractStatic)(this),this.InteractEvent=xe.InteractEvent,this.Interactable=void 0,this.interactables=new Ke.InteractableSet(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(e){return t.removeDocument(e.target)};var e=this;this.Interactable=function(t){var n,r;function i(){return t.apply(this,arguments)||this}r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var o,a,s=i.prototype;return s.set=function(n){return t.prototype.set.call(this,n),e.fire("interactable:set",{options:n,interactable:this}),this},s.unset=function(){t.prototype.unset.call(this),e.interactables.list.splice(e.interactables.list.indexOf(this),1),e.fire("interactable:unset",{interactable:this})},o=i,(a=[{key:"_defaults",get:function(){return e.defaults}}])&&gn(o.prototype,a),i}(Ge.Interactable)}var n=t.prototype;return n.addListeners=function(t,e){this.listenerMaps.push({id:e,map:t})},n.fire=function(t,e){for(var n=0;n<this.listenerMaps.length;n++){var r=this.listenerMaps[n].map[t];if(r&&!1===r(e,this,t))return!1}},n.init=function(t){return this.isInitialized?this:yn(this,t)},n.pluginIsInstalled=function(t){return this._plugins.map[t.id]||-1!==this._plugins.list.indexOf(t)},n.usePlugin=function(t,e){if(!this.isInitialized)return this;if(this.pluginIsInstalled(t))return this;if(t.id&&(this._plugins.map[t.id]=t),this._plugins.list.push(t),t.install&&t.install(this,e),t.listeners&&t.before){for(var n=0,r=this.listenerMaps.length,i=t.before.reduce((function(t,e){return t[e]=!0,t[bn(e)]=!0,t}),{});n<r;n++){var o=this.listenerMaps[n].id;if(i[o]||i[bn(o)])break}this.listenerMaps.splice(n,0,{id:t.id,map:t.listeners})}else t.listeners&&this.listenerMaps.push({id:t.id,map:t.listeners});return this},n.addDocument=function(t,n){if(-1!==this.getDocIndex(t))return!1;var r=e.getWindow(t);n=n?(0,T.default)({},n):{},this.documents.push({doc:t,options:n}),this.events.documents.push(t),t!==this.document&&this.events.add(r,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:r,scope:this,options:n})},n.removeDocument=function(t){var n=this.getDocIndex(t),r=e.getWindow(t),i=this.documents[n].options;this.events.remove(r,"unload",this.onWindowUnload),this.documents.splice(n,1),this.events.documents.splice(n,1),this.fire("scope:remove-document",{doc:t,window:r,scope:this,options:i})},n.getDocIndex=function(t){for(var e=0;e<this.documents.length;e++)if(this.documents[e].doc===t)return e;return-1},n.getDocOptions=function(t){var e=this.getDocIndex(t);return-1===e?null:this.documents[e].options},n.now=function(){return(this.window.Date||Date).now()},t}();function yn(t,n){return t.isInitialized=!0,e.init(n),v.default.init(n),y.default.init(n),bt.default.init(n),t.window=n,t.document=n.document,t.usePlugin(ln.default),t.usePlugin(Je.default),t}function bn(t){return t&&t.replace(/\/.*$/,"")}hn.Scope=mn;var xn={};Object.defineProperty(xn,"__esModule",{value:!0}),xn.init=xn.default=void 0;var _n=new hn.Scope,wn=_n.interactStatic;xn.default=wn;var Pn=function(t){return _n.init(t)};xn.init=Pn,"object"==typeof window&&window&&Pn(window);var En={};Object.defineProperty(En,"__esModule",{value:!0}),En.default=void 0,En.default=function(){};var Sn={};Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.default=void 0,Sn.default=function(){};var Mn={};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.default=void 0,Mn.default=function(t){var e=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter((function(e){var n=e[0],r=e[1];return n in t||r in t})),n=function(n,r){for(var i=t.range,o=t.limits,a=void 0===o?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:o,s=t.offset,l=void 0===s?{x:0,y:0}:s,c={range:i,grid:t,x:null,y:null},u=0;u<e.length;u++){var d=e[u],f=d[0],p=d[1],v=Math.round((n-l.x)/t[f]),h=Math.round((r-l.y)/t[p]);c[f]=Math.max(a.left,Math.min(a.right,v*t[f]+l.x)),c[p]=Math.max(a.top,Math.min(a.bottom,h*t[p]+l.y))}return c};return n.grid=t,n.coordFields=e,n};var On={};Object.defineProperty(On,"__esModule",{value:!0}),Object.defineProperty(On,"edgeTarget",{enumerable:!0,get:function(){return En.default}}),Object.defineProperty(On,"elements",{enumerable:!0,get:function(){return Sn.default}}),Object.defineProperty(On,"grid",{enumerable:!0,get:function(){return Mn.default}});var Tn={};Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.default=void 0;var In={id:"snappers",install:function(t){var e=t.interactStatic;e.snappers=(0,T.default)(e.snappers||{},On),e.createSnapGrid=e.snappers.grid}};Tn.default=In;var Dn={};function jn(){return(jn=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}Object.defineProperty(Dn,"__esModule",{value:!0}),Dn.aspectRatio=Dn.default=void 0;var zn={start:function(t){var e=t.state,n=t.rect,r=t.edges,i=t.pageCoords,o=e.options.ratio,a=e.options,s=a.equalDelta,l=a.modifiers;"preserve"===o&&(o=n.width/n.height),e.startCoords=(0,T.default)({},i),e.startRect=(0,T.default)({},n),e.ratio=o,e.equalDelta=s;var c=e.linkedEdges={top:r.top||r.left&&!r.bottom,left:r.left||r.top&&!r.right,bottom:r.bottom||r.right&&!r.top,right:r.right||r.bottom&&!r.left};if(e.xIsPrimaryAxis=!(!r.left&&!r.right),e.equalDelta)e.edgeSign=(c.left?1:-1)*(c.top?1:-1);else{var u=e.xIsPrimaryAxis?c.top:c.left;e.edgeSign=u?-1:1}if((0,T.default)(t.edges,c),l&&l.length){var d=new fe.default(t.interaction);d.copyFrom(t.interaction.modification),d.prepareStates(l),e.subModification=d,d.startAll(jn({},t))}},set:function(t){var e=t.state,n=t.rect,r=t.coords,i=(0,T.default)({},r),o=e.equalDelta?An:Cn;if(o(e,e.xIsPrimaryAxis,r,n),!e.subModification)return null;var a=(0,T.default)({},n);(0,I.addEdges)(e.linkedEdges,a,{x:r.x-i.x,y:r.y-i.y});var s=e.subModification.setAll(jn({},t,{rect:a,edges:e.linkedEdges,pageCoords:r,prevCoords:r,prevRect:a})),l=s.delta;return s.changed&&(o(e,Math.abs(l.x)>Math.abs(l.y),s.coords,s.rect),(0,T.default)(r,s.coords)),s.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function An(t,e,n){var r=t.startCoords,i=t.edgeSign;e?n.y=r.y+(n.x-r.x)*i:n.x=r.x+(n.y-r.y)*i}function Cn(t,e,n,r){var i=t.startRect,o=t.startCoords,a=t.ratio,s=t.edgeSign;if(e){var l=r.width/a;n.y=o.y+(l-i.height)*s}else{var c=r.height*a;n.x=o.x+(c-i.width)*s}}Dn.aspectRatio=zn;var kn=(0,ge.makeModifier)(zn,"aspectRatio");Dn.default=kn;var Rn={};Object.defineProperty(Rn,"__esModule",{value:!0}),Rn.default=void 0;var Fn=function(){};Fn._defaults={};var Xn=Fn;Rn.default=Xn;var Yn={};Object.defineProperty(Yn,"__esModule",{value:!0}),Object.defineProperty(Yn,"default",{enumerable:!0,get:function(){return Rn.default}});var Wn={};function Bn(t,e,n){return o.default.func(t)?I.resolveRectLike(t,e.interactable,e.element,[n.x,n.y,e]):I.resolveRectLike(t,e.interactable,e.element)}Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.getRestrictionRect=Bn,Wn.restrict=Wn.default=void 0;var Ln={start:function(t){var e=t.rect,n=t.startOffset,r=t.state,i=t.interaction,o=t.pageCoords,a=r.options,s=a.elementRect,l=(0,T.default)({left:0,top:0,right:0,bottom:0},a.offset||{});if(e&&s){var c=Bn(a.restriction,i,o);if(c){var u=c.right-c.left-e.width,d=c.bottom-c.top-e.height;u<0&&(l.left+=u,l.right+=u),d<0&&(l.top+=d,l.bottom+=d)}l.left+=n.left-e.width*s.left,l.top+=n.top-e.height*s.top,l.right+=n.right-e.width*(1-s.right),l.bottom+=n.bottom-e.height*(1-s.bottom)}r.offset=l},set:function(t){var e=t.coords,n=t.interaction,r=t.state,i=r.options,o=r.offset,a=Bn(i.restriction,n,e);if(a){var s=I.xywhToTlbr(a);e.x=Math.max(Math.min(s.right-o.right,e.x),s.left+o.left),e.y=Math.max(Math.min(s.bottom-o.bottom,e.y),s.top+o.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}};Wn.restrict=Ln;var Nn=(0,ge.makeModifier)(Ln,"restrict");Wn.default=Nn;var Vn={};Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.restrictEdges=Vn.default=void 0;var qn={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Un={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Gn(t,e){for(var n=["top","left","bottom","right"],r=0;r<n.length;r++){var i=n[r];i in t||(t[i]=e[i])}return t}var Hn={noInner:qn,noOuter:Un,start:function(t){var e,n=t.interaction,r=t.startOffset,i=t.state,o=i.options;if(o){var a=(0,Wn.getRestrictionRect)(o.offset,n,n.coords.start.page);e=I.rectToXY(a)}e=e||{x:0,y:0},i.offset={top:e.y+r.top,left:e.x+r.left,bottom:e.y-r.bottom,right:e.x-r.right}},set:function(t){var e=t.coords,n=t.edges,r=t.interaction,i=t.state,o=i.offset,a=i.options;if(n){var s=(0,T.default)({},e),l=(0,Wn.getRestrictionRect)(a.inner,r,s)||{},c=(0,Wn.getRestrictionRect)(a.outer,r,s)||{};Gn(l,qn),Gn(c,Un),n.top?e.y=Math.min(Math.max(c.top+o.top,s.y),l.top+o.top):n.bottom&&(e.y=Math.max(Math.min(c.bottom+o.bottom,s.y),l.bottom+o.bottom)),n.left?e.x=Math.min(Math.max(c.left+o.left,s.x),l.left+o.left):n.right&&(e.x=Math.max(Math.min(c.right+o.right,s.x),l.right+o.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}};Vn.restrictEdges=Hn;var $n=(0,ge.makeModifier)(Hn,"restrictEdges");Vn.default=$n;var Kn={};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.restrictRect=Kn.default=void 0;var Zn=(0,T.default)({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(t){}},Wn.restrict.defaults),Jn={start:Wn.restrict.start,set:Wn.restrict.set,defaults:Zn};Kn.restrictRect=Jn;var Qn=(0,ge.makeModifier)(Jn,"restrictRect");Kn.default=Qn;var tr={};Object.defineProperty(tr,"__esModule",{value:!0}),tr.restrictSize=tr.default=void 0;var er={width:-1/0,height:-1/0},nr={width:1/0,height:1/0},rr={start:function(t){return Vn.restrictEdges.start(t)},set:function(t){var e=t.interaction,n=t.state,r=t.rect,i=t.edges,o=n.options;if(i){var a=I.tlbrToXywh((0,Wn.getRestrictionRect)(o.min,e,t.coords))||er,s=I.tlbrToXywh((0,Wn.getRestrictionRect)(o.max,e,t.coords))||nr;n.options={endOnly:o.endOnly,inner:(0,T.default)({},Vn.restrictEdges.noInner),outer:(0,T.default)({},Vn.restrictEdges.noOuter)},i.top?(n.options.inner.top=r.bottom-a.height,n.options.outer.top=r.bottom-s.height):i.bottom&&(n.options.inner.bottom=r.top+a.height,n.options.outer.bottom=r.top+s.height),i.left?(n.options.inner.left=r.right-a.width,n.options.outer.left=r.right-s.width):i.right&&(n.options.inner.right=r.left+a.width,n.options.outer.right=r.left+s.width),Vn.restrictEdges.set(t),n.options=o}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}};tr.restrictSize=rr;var ir=(0,ge.makeModifier)(rr,"restrictSize");tr.default=ir;var or={};Object.defineProperty(or,"__esModule",{value:!0}),Object.defineProperty(or,"default",{enumerable:!0,get:function(){return Rn.default}});var ar={};Object.defineProperty(ar,"__esModule",{value:!0}),ar.snap=ar.default=void 0;var sr={start:function(t){var e,n=t.interaction,r=t.interactable,i=t.element,o=t.rect,a=t.state,s=t.startOffset,l=a.options,c=l.offsetWithOrigin?function(t){var e=t.interaction.element;return(0,I.rectToXY)((0,I.resolveRectLike)(t.state.options.origin,null,null,[e]))||(0,j.default)(t.interactable,e,t.interaction.prepared.name)}(t):{x:0,y:0};if("startCoords"===l.offset)e={x:n.coords.start.page.x,y:n.coords.start.page.y};else{var u=(0,I.resolveRectLike)(l.offset,r,i,[n]);(e=(0,I.rectToXY)(u)||{x:0,y:0}).x+=c.x,e.y+=c.y}var d=l.relativePoints;a.offsets=o&&d&&d.length?d.map((function(t,n){return{index:n,relativePoint:t,x:s.left-o.width*t.x+e.x,y:s.top-o.height*t.y+e.y}})):[{index:0,relativePoint:null,x:e.x,y:e.y}]},set:function(t){var e=t.interaction,n=t.coords,r=t.state,i=r.options,a=r.offsets,s=(0,j.default)(e.interactable,e.element,e.prepared.name),l=(0,T.default)({},n),c=[];i.offsetWithOrigin||(l.x-=s.x,l.y-=s.y);for(var u=0;u<a.length;u++)for(var d=a[u],f=l.x-d.x,p=l.y-d.y,v=0,h=i.targets.length;v<h;v++){var g,m=i.targets[v];(g=o.default.func(m)?m(f,p,e._proxy,d,v):m)&&c.push({x:(o.default.number(g.x)?g.x:f)+d.x,y:(o.default.number(g.y)?g.y:p)+d.y,range:o.default.number(g.range)?g.range:i.range,source:m,index:v,offset:d})}for(var y={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},b=0;b<c.length;b++){var x=c[b],_=x.range,w=x.x-l.x,P=x.y-l.y,E=(0,C.default)(w,P),S=E<=_;_===1/0&&y.inRange&&y.range!==1/0&&(S=!1),y.target&&!(S?y.inRange&&_!==1/0?E/_<y.distance/y.range:_===1/0&&y.range!==1/0||E<y.distance:!y.inRange&&E<y.distance)||(y.target=x,y.distance=E,y.range=_,y.inRange=S,y.delta.x=w,y.delta.y=P)}return y.inRange&&(n.x=y.target.x,n.y=y.target.y),r.closest=y,y},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}};ar.snap=sr;var lr=(0,ge.makeModifier)(sr,"snap");ar.default=lr;var cr={};Object.defineProperty(cr,"__esModule",{value:!0}),cr.snapSize=cr.default=void 0;var ur={start:function(t){var e=t.state,n=t.edges,r=e.options;if(!n)return null;t.state={options:{targets:null,relativePoints:[{x:n.left?0:1,y:n.top?0:1}],offset:r.offset||"self",origin:{x:0,y:0},range:r.range}},e.targetFields=e.targetFields||[["width","height"],["x","y"]],ar.snap.start(t),e.offsets=t.state.offsets,t.state=e},set:function(t){var e=t.interaction,n=t.state,r=t.coords,i=n.options,a=n.offsets,s={x:r.x-a[0].x,y:r.y-a[0].y};n.options=(0,T.default)({},i),n.options.targets=[];for(var l=0;l<(i.targets||[]).length;l++){var c=(i.targets||[])[l],u=void 0;if(u=o.default.func(c)?c(s.x,s.y,e):c){for(var d=0;d<n.targetFields.length;d++){var f=n.targetFields[d],p=f[0],v=f[1];if(p in u||v in u){u.x=u[p],u.y=u[v];break}}n.options.targets.push(u)}}var h=ar.snap.set(t);return n.options=i,h},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}};cr.snapSize=ur;var dr=(0,ge.makeModifier)(ur,"snapSize");cr.default=dr;var fr={};Object.defineProperty(fr,"__esModule",{value:!0}),fr.snapEdges=fr.default=void 0;var pr={start:function(t){var e=t.edges;return e?(t.state.targetFields=t.state.targetFields||[[e.left?"left":"right",e.top?"top":"bottom"]],cr.snapSize.start(t)):null},set:cr.snapSize.set,defaults:(0,T.default)((0,de.default)(cr.snapSize.defaults),{targets:null,range:null,offset:{x:0,y:0}})};fr.snapEdges=pr;var vr=(0,ge.makeModifier)(pr,"snapEdges");fr.default=vr;var hr={};Object.defineProperty(hr,"__esModule",{value:!0}),Object.defineProperty(hr,"default",{enumerable:!0,get:function(){return Rn.default}});var gr={};Object.defineProperty(gr,"__esModule",{value:!0}),Object.defineProperty(gr,"default",{enumerable:!0,get:function(){return Rn.default}});var mr={};Object.defineProperty(mr,"__esModule",{value:!0}),mr.default=void 0;var yr={aspectRatio:Dn.default,restrictEdges:Vn.default,restrict:Wn.default,restrictRect:Kn.default,restrictSize:tr.default,snapEdges:fr.default,snap:ar.default,snapSize:cr.default,spring:hr.default,avoid:Yn.default,transform:gr.default,rubberband:or.default};mr.default=yr;var br={};Object.defineProperty(br,"__esModule",{value:!0}),br.default=void 0;var xr={id:"modifiers",install:function(t){var e=t.interactStatic;for(var n in t.usePlugin(ge.default),t.usePlugin(Tn.default),e.modifiers=mr.default,mr.default){var r=mr.default[n],i=r._defaults,o=r._methods;i._methods=o,t.defaults.perAction[n]=i}}};br.default=xr;var _r={};Object.defineProperty(_r,"__esModule",{value:!0}),_r.default=void 0,_r.default={};var wr={};function Pr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}Object.defineProperty(wr,"__esModule",{value:!0}),wr.PointerEvent=wr.default=void 0;var Er=function(t){var e,n;function r(e,n,r,i,o,a){var s;if((s=t.call(this,o)||this).type=void 0,s.originalEvent=void 0,s.pointerId=void 0,s.pointerType=void 0,s.double=void 0,s.pageX=void 0,s.pageY=void 0,s.clientX=void 0,s.clientY=void 0,s.dt=void 0,s.eventable=void 0,X.pointerExtend(Pr(s),r),r!==n&&X.pointerExtend(Pr(s),n),s.timeStamp=a,s.originalEvent=r,s.type=e,s.pointerId=X.getPointerId(n),s.pointerType=X.getPointerType(n),s.target=i,s.currentTarget=null,"tap"===e){var l=o.getPointerIndex(n);s.dt=s.timeStamp-o.pointers[l].downTime;var c=s.timeStamp-o.tapTime;s.double=!!(o.prevTap&&"doubletap"!==o.prevTap.type&&o.prevTap.target===s.target&&c<500)}else"doubletap"===e&&(s.dt=n.timeStamp-o.tapTime);return s}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var i=r.prototype;return i._subtractOrigin=function(t){var e=t.x,n=t.y;return this.pageX-=e,this.pageY-=n,this.clientX-=e,this.clientY-=n,this},i._addOrigin=function(t){var e=t.x,n=t.y;return this.pageX+=e,this.pageY+=n,this.clientX+=e,this.clientY+=n,this},i.preventDefault=function(){this.originalEvent.preventDefault()},r}(q.BaseEvent);wr.PointerEvent=wr.default=Er;var Sr={};Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.default=void 0;var Mr={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(t){t.pointerEvents=Mr,t.defaults.actions.pointerEvents=Mr.defaults,(0,T.default)(t.actions.phaselessTypes,Mr.types)},listeners:{"interactions:new":function(t){var e=t.interaction;e.prevTap=null,e.tapTime=0},"interactions:update-pointer":function(t){var e=t.down,n=t.pointerInfo;!e&&n.hold||(n.hold={duration:1/0,timeout:null})},"interactions:move":function(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget;t.duplicate||n.pointerIsDown&&!n.pointerWasMoved||(n.pointerIsDown&&Ir(t),Or({interaction:n,pointer:r,event:i,eventTarget:o,type:"move"},e))},"interactions:down":function(t,e){!function(t,e){for(var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget,a=t.pointerIndex,s=n.pointers[a].hold,l=_.getPath(o),c={interaction:n,pointer:r,event:i,eventTarget:o,type:"hold",targets:[],path:l,node:null},u=0;u<l.length;u++){var d=l[u];c.node=d,e.fire("pointerEvents:collect-targets",c)}if(c.targets.length){for(var f=1/0,p=0;p<c.targets.length;p++){var v=c.targets[p].eventable.options.holdDuration;v<f&&(f=v)}s.duration=f,s.timeout=setTimeout((function(){Or({interaction:n,eventTarget:o,pointer:r,event:i,type:"hold"},e)}),f)}}(t,e),Or(t,e)},"interactions:up":function(t,e){Ir(t),Or(t,e),function(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget;n.pointerWasMoved||Or({interaction:n,eventTarget:o,pointer:r,event:i,type:"tap"},e)}(t,e)},"interactions:cancel":function(t,e){Ir(t),Or(t,e)}},PointerEvent:wr.PointerEvent,fire:Or,collectEventTargets:Tr,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function Or(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget,a=t.type,s=t.targets,l=void 0===s?Tr(t,e):s,c=new wr.PointerEvent(a,r,i,o,n,e.now());e.fire("pointerEvents:new",{pointerEvent:c});for(var u={interaction:n,pointer:r,event:i,eventTarget:o,targets:l,type:a,pointerEvent:c},d=0;d<l.length;d++){var f=l[d];for(var p in f.props||{})c[p]=f.props[p];var v=(0,j.default)(f.eventable,f.node);if(c._subtractOrigin(v),c.eventable=f.eventable,c.currentTarget=f.node,f.eventable.fire(c),c._addOrigin(v),c.immediatePropagationStopped||c.propagationStopped&&d+1<l.length&&l[d+1].node!==c.currentTarget)break}if(e.fire("pointerEvents:fired",u),"tap"===a){var h=c.double?Or({interaction:n,pointer:r,event:i,eventTarget:o,type:"doubletap"},e):c;n.prevTap=h,n.tapTime=h.timeStamp}return c}function Tr(t,e){var n=t.interaction,r=t.pointer,i=t.event,o=t.eventTarget,a=t.type,s=n.getPointerIndex(r),l=n.pointers[s];if("tap"===a&&(n.pointerWasMoved||!l||l.downTarget!==o))return[];for(var c=_.getPath(o),u={interaction:n,pointer:r,event:i,eventTarget:o,type:a,path:c,targets:[],node:null},d=0;d<c.length;d++){var f=c[d];u.node=f,e.fire("pointerEvents:collect-targets",u)}return"hold"===a&&(u.targets=u.targets.filter((function(t){var e;return t.eventable.options.holdDuration===(null==(e=n.pointers[s])?void 0:e.hold.duration)}))),u.targets}function Ir(t){var e=t.interaction,n=t.pointerIndex,r=e.pointers[n].hold;r&&r.timeout&&(clearTimeout(r.timeout),r.timeout=null)}var Dr=Mr;Sr.default=Dr;var jr={};function zr(t){var e=t.interaction;e.holdIntervalHandle&&(clearInterval(e.holdIntervalHandle),e.holdIntervalHandle=null)}Object.defineProperty(jr,"__esModule",{value:!0}),jr.default=void 0;var Ar={id:"pointer-events/holdRepeat",install:function(t){t.usePlugin(Sr.default);var e=t.pointerEvents;e.defaults.holdRepeatInterval=0,e.types.holdrepeat=t.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce((function(t,e){return t["pointerEvents:"+e]=zr,t}),{"pointerEvents:new":function(t){var e=t.pointerEvent;"hold"===e.type&&(e.count=(e.count||0)+1)},"pointerEvents:fired":function(t,e){var n=t.interaction,r=t.pointerEvent,i=t.eventTarget,o=t.targets;if("hold"===r.type&&o.length){var a=o[0].eventable.options.holdRepeatInterval;a<=0||(n.holdIntervalHandle=setTimeout((function(){e.pointerEvents.fire({interaction:n,eventTarget:i,type:"hold",pointer:r,event:r},e)}),a))}}})};jr.default=Ar;var Cr={};function kr(t){return(0,T.default)(this.events.options,t),this}Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.default=void 0;var Rr={id:"pointer-events/interactableTargets",install:function(t){var e=t.Interactable;e.prototype.pointerEvents=kr;var n=e.prototype._backCompatOption;e.prototype._backCompatOption=function(t,e){var r=n.call(this,t,e);return r===this&&(this.events.options[t]=e),r}},listeners:{"pointerEvents:collect-targets":function(t,e){var n=t.targets,r=t.node,i=t.type,o=t.eventTarget;e.interactables.forEachMatch(r,(function(t){var e=t.events,a=e.options;e.types[i]&&e.types[i].length&&t.testIgnoreAllow(a,r,o)&&n.push({node:r,eventable:e,props:{interactable:t}})}))},"interactable:new":function(t){var e=t.interactable;e.events.getRect=function(t){return e.getRect(t)}},"interactable:set":function(t,e){var n=t.interactable,r=t.options;(0,T.default)(n.events.options,e.pointerEvents.defaults),(0,T.default)(n.events.options,r.pointerEvents||{})}}};Cr.default=Rr;var Fr={};Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.default=void 0;var Xr={id:"pointer-events",install:function(t){t.usePlugin(Sr),t.usePlugin(jr.default),t.usePlugin(Cr.default)}};Fr.default=Xr;var Yr={};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.default=void 0,Yr.default={};var Wr={};function Br(t){var e=t.Interactable;t.actions.phases.reflow=!0,e.prototype.reflow=function(e){return function(t,e,n){for(var r=o.default.string(t.target)?G.from(t._context.querySelectorAll(t.target)):[t.target],i=n.window.Promise,a=i?[]:null,s=function(){var o=r[l],s=t.getRect(o);if(!s)return"break";var c=G.find(n.interactions.list,(function(n){return n.interacting()&&n.interactable===t&&n.element===o&&n.prepared.name===e.name})),u=void 0;if(c)c.move(),a&&(u=c._reflowPromise||new i((function(t){c._reflowResolve=t})));else{var d=(0,I.tlbrToXywh)(s),f={page:{x:d.x,y:d.y},client:{x:d.x,y:d.y},timeStamp:n.now()},p=X.coordsToEvent(f);u=function(t,e,n,r,i){var o=t.interactions.new({pointerType:"reflow"}),a={interaction:o,event:i,pointer:i,eventTarget:n,phase:"reflow"};o.interactable=e,o.element=n,o.prevEvent=i,o.updatePointer(i,i,n,!0),X.setZeroCoords(o.coords.delta),(0,It.copyAction)(o.prepared,r),o._doPhase(a);var s=t.window.Promise,l=s?new s((function(t){o._reflowResolve=t})):void 0;return o._reflowPromise=l,o.start(r,e,n),o._interacting?(o.move(a),o.end(i)):(o.stop(),o._reflowResolve()),o.removePointer(i,i),l}(n,t,o,e,p)}a&&a.push(u)},l=0;l<r.length&&"break"!==s();l++);return a&&i.all(a).then((function(){return t}))}(this,e,t)}}Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.install=Br,Wr.default=void 0;var Lr={id:"reflow",install:Br,listeners:{"interactions:stop":function(t,e){var n=t.interaction;"reflow"===n.pointerType&&(n._reflowResolve&&n._reflowResolve(),G.remove(e.interactions.list,n))}}};Wr.default=Lr;var Nr={};Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.default=void 0,Nr.default={};var Vr={exports:{}};Object.defineProperty(Vr.exports,"__esModule",{value:!0}),Vr.exports.default=void 0,xn.default.use(_r.default),xn.default.use(Jt.default),xn.default.use(De.default),xn.default.use(Zt.default),xn.default.use(yt.default),xn.default.use(Fr.default),xn.default.use(Fe.default),xn.default.use(br.default),xn.default.use($t.default),xn.default.use(gt.default),xn.default.use(Et.default),xn.default.use(Wr.default),xn.default.use(ue.default),xn.default.use(Nr.default),xn.default.use(Yr.default),xn.default.use(ie.default);var qr=xn.default;if(Vr.exports.default=qr,Vr)try{Vr.exports=xn.default}catch(t){}xn.default.default=xn.default,Vr=Vr.exports;var Ur={exports:{}};Object.defineProperty(Ur.exports,"__esModule",{value:!0}),Ur.exports.default=void 0;var Gr=Vr.default;if(Ur.exports.default=Gr,Ur)try{Ur.exports=Vr.default}catch(t){}return Vr.default.default=Vr.default,Ur.exports}));
|