@r365/react-calendar-timeline
Version:
react-calendar-timeline
936 lines • 321 kB
JavaScript
import { jsxs as vt, jsx as W } from "react/jsx-runtime";
import se, { useContext as Aa, Component as Ee, PureComponent as Su, createElement as Tu } from "react";
import { g as pi, c as er, w as Bs } from "./index-D7SJTurs.mjs";
import { a as xw } from "./index-D7SJTurs.mjs";
import './styles.css';/* empty css */
var jr = { exports: {} };
jr.exports;
(function(e, t) {
(function(r, s) {
e.exports = s();
})(er, function() {
function r(i, n) {
var a = Object.keys(i);
if (Object.getOwnPropertySymbols) {
var o = Object.getOwnPropertySymbols(i);
n && (o = o.filter(function(u) {
return Object.getOwnPropertyDescriptor(i, u).enumerable;
})), a.push.apply(a, o);
}
return a;
}
function s(i) {
for (var n = 1; n < arguments.length; n++) {
var a = arguments[n] != null ? arguments[n] : {};
n % 2 ? r(Object(a), !0).forEach(function(o) {
_(i, o, a[o]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(a)) : r(Object(a)).forEach(function(o) {
Object.defineProperty(i, o, Object.getOwnPropertyDescriptor(a, o));
});
}
return i;
}
function l(i) {
return l = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
return typeof n;
} : function(n) {
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
}, l(i);
}
function c(i, n) {
if (!(i instanceof n)) throw new TypeError("Cannot call a class as a function");
}
function p(i, n) {
for (var a = 0; a < n.length; a++) {
var o = n[a];
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(i, A(o.key), o);
}
}
function y(i, n, a) {
return n && p(i.prototype, n), Object.defineProperty(i, "prototype", { writable: !1 }), i;
}
function _(i, n, a) {
return (n = A(n)) in i ? Object.defineProperty(i, n, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : i[n] = a, i;
}
function S(i, n) {
if (typeof n != "function" && n !== null) throw new TypeError("Super expression must either be null or a function");
i.prototype = Object.create(n && n.prototype, { constructor: { value: i, writable: !0, configurable: !0 } }), Object.defineProperty(i, "prototype", { writable: !1 }), n && k(i, n);
}
function E(i) {
return E = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(n) {
return n.__proto__ || Object.getPrototypeOf(n);
}, E(i);
}
function k(i, n) {
return k = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(a, o) {
return a.__proto__ = o, a;
}, k(i, n);
}
function w(i) {
if (i === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return i;
}
function D(i) {
var n = function() {
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
if (typeof Proxy == "function") return !0;
try {
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
})), !0;
} catch {
return !1;
}
}();
return function() {
var a, o = E(i);
if (n) {
var u = E(this).constructor;
a = Reflect.construct(o, arguments, u);
} else a = o.apply(this, arguments);
return function(d, h) {
if (h && (typeof h == "object" || typeof h == "function")) return h;
if (h !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
return w(d);
}(this, a);
};
}
function C() {
return C = typeof Reflect < "u" && Reflect.get ? Reflect.get.bind() : function(i, n, a) {
var o = function(d, h) {
for (; !Object.prototype.hasOwnProperty.call(d, h) && (d = E(d)) !== null; ) ;
return d;
}(i, n);
if (o) {
var u = Object.getOwnPropertyDescriptor(o, n);
return u.get ? u.get.call(arguments.length < 3 ? i : a) : u.value;
}
}, C.apply(this, arguments);
}
function A(i) {
var n = function(a, o) {
if (typeof a != "object" || a === null) return a;
var u = a[Symbol.toPrimitive];
if (u !== void 0) {
var d = u.call(a, o);
if (typeof d != "object") return d;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return String(a);
}(i, "string");
return typeof n == "symbol" ? n : n + "";
}
var L = function(i) {
return !(!i || !i.Window) && i instanceof i.Window;
}, B = void 0, V = void 0;
function fe(i) {
B = i;
var n = i.document.createTextNode("");
n.ownerDocument !== i.document && typeof i.wrap == "function" && i.wrap(n) === n && (i = i.wrap(i)), V = i;
}
function re(i) {
return L(i) ? i : (i.ownerDocument || i).defaultView || V.window;
}
typeof window < "u" && window && fe(window);
var de = function(i) {
return !!i && l(i) === "object";
}, Oe = function(i) {
return typeof i == "function";
}, x = { window: function(i) {
return i === V || L(i);
}, docFrag: function(i) {
return de(i) && i.nodeType === 11;
}, object: de, func: Oe, number: function(i) {
return typeof i == "number";
}, bool: function(i) {
return typeof i == "boolean";
}, string: function(i) {
return typeof i == "string";
}, element: function(i) {
if (!i || l(i) !== "object") return !1;
var n = re(i) || V;
return /object|function/.test(typeof Element > "u" ? "undefined" : l(Element)) ? i instanceof Element || i instanceof n.Element : i.nodeType === 1 && typeof i.nodeName == "string";
}, plainObject: function(i) {
return de(i) && !!i.constructor && /function Object\b/.test(i.constructor.toString());
}, array: function(i) {
return de(i) && i.length !== void 0 && Oe(i.splice);
} };
function Je(i) {
var n = i.interaction;
if (n.prepared.name === "drag") {
var a = n.prepared.axis;
a === "x" ? (n.coords.cur.page.y = n.coords.start.page.y, n.coords.cur.client.y = n.coords.start.client.y, n.coords.velocity.client.y = 0, n.coords.velocity.page.y = 0) : a === "y" && (n.coords.cur.page.x = n.coords.start.page.x, n.coords.cur.client.x = n.coords.start.client.x, n.coords.velocity.client.x = 0, n.coords.velocity.page.x = 0);
}
}
function qi(i) {
var n = i.iEvent, a = i.interaction;
if (a.prepared.name === "drag") {
var o = a.prepared.axis;
if (o === "x" || o === "y") {
var u = o === "x" ? "y" : "x";
n.page[u] = a.coords.start.page[u], n.client[u] = a.coords.start.client[u], n.delta[u] = 0;
}
}
}
var dr = { id: "actions/drag", install: function(i) {
var n = i.actions, a = i.Interactable, o = i.defaults;
a.prototype.draggable = dr.draggable, n.map.drag = dr, n.methodDict.drag = "draggable", o.actions.drag = dr.defaults;
}, listeners: { "interactions:before-action-move": Je, "interactions:action-resume": Je, "interactions:action-move": qi, "auto-start:check": function(i) {
var n = i.interaction, a = i.interactable, o = i.buttons, u = a.options.drag;
if (u && u.enabled && (!n.pointerIsDown || !/mouse|pointer/.test(n.pointerType) || o & a.options.drag.mouseButtons)) return i.action = { name: "drag", axis: u.lockAxis === "start" ? u.startAxis : u.lockAxis }, !1;
} }, draggable: function(i) {
return x.object(i) ? (this.options.drag.enabled = i.enabled !== !1, this.setPerAction("drag", i), this.setOnEvents("drag", i), /^(xy|x|y|start)$/.test(i.lockAxis) && (this.options.drag.lockAxis = i.lockAxis), /^(xy|x|y)$/.test(i.startAxis) && (this.options.drag.startAxis = i.startAxis), this) : x.bool(i) ? (this.options.drag.enabled = i, this) : this.options.drag;
}, beforeMove: Je, move: qi, defaults: { startAxis: "xy", lockAxis: "xy" }, getCursor: function() {
return "move";
}, filterEventType: function(i) {
return i.search("drag") === 0;
} }, Ji = dr, _e = { init: function(i) {
var n = i;
_e.document = n.document, _e.DocumentFragment = n.DocumentFragment || wt, _e.SVGElement = n.SVGElement || wt, _e.SVGSVGElement = n.SVGSVGElement || wt, _e.SVGElementInstance = n.SVGElementInstance || wt, _e.Element = n.Element || wt, _e.HTMLElement = n.HTMLElement || _e.Element, _e.Event = n.Event, _e.Touch = n.Touch || wt, _e.PointerEvent = n.PointerEvent || n.MSPointerEvent;
}, document: null, DocumentFragment: null, SVGElement: null, SVGSVGElement: null, SVGElementInstance: null, Element: null, HTMLElement: null, Event: null, Touch: null, PointerEvent: null };
function wt() {
}
var pe = _e, Se = { init: function(i) {
var n = pe.Element, a = i.navigator || {};
Se.supportsTouch = "ontouchstart" in i || x.func(i.DocumentTouch) && pe.document instanceof i.DocumentTouch, Se.supportsPointerEvent = a.pointerEnabled !== !1 && !!pe.PointerEvent, Se.isIOS = /iP(hone|od|ad)/.test(a.platform), Se.isIOS7 = /iP(hone|od|ad)/.test(a.platform) && /OS 7[^\d]/.test(a.appVersion), Se.isIe9 = /MSIE 9/.test(a.userAgent), Se.isOperaMobile = a.appName === "Opera" && Se.supportsTouch && /Presto/.test(a.userAgent), Se.prefixedMatchesSelector = "matches" in n.prototype ? "matches" : "webkitMatchesSelector" in n.prototype ? "webkitMatchesSelector" : "mozMatchesSelector" in n.prototype ? "mozMatchesSelector" : "oMatchesSelector" in n.prototype ? "oMatchesSelector" : "msMatchesSelector", Se.pEventTypes = Se.supportsPointerEvent ? pe.PointerEvent === i.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, Se.wheelEvent = pe.document && "onmousewheel" in pe.document ? "mousewheel" : "wheel";
}, supportsTouch: null, supportsPointerEvent: null, isIOS7: null, isIOS: null, isIe9: null, isOperaMobile: null, prefixedMatchesSelector: null, pEventTypes: null, wheelEvent: null }, ke = Se;
function ut(i, n) {
if (i.contains) return i.contains(n);
for (; n; ) {
if (n === i) return !0;
n = n.parentNode;
}
return !1;
}
function Qi(i, n) {
for (; x.element(i); ) {
if (Qe(i, n)) return i;
i = Le(i);
}
return null;
}
function Le(i) {
var n = i.parentNode;
if (x.docFrag(n)) {
for (; (n = n.host) && x.docFrag(n); ) ;
return n;
}
return n;
}
function Qe(i, n) {
return V !== B && (n = n.replace(/\/deep\//g, " ")), i[ke.prefixedMatchesSelector](n);
}
var hn = function(i) {
return i.parentNode || i.host;
};
function es(i, n) {
for (var a, o = [], u = i; (a = hn(u)) && u !== n && a !== u.ownerDocument; ) o.unshift(u), u = a;
return o;
}
function fn(i, n, a) {
for (; x.element(i); ) {
if (Qe(i, n)) return !0;
if ((i = Le(i)) === a) return Qe(i, n);
}
return !1;
}
function ts(i) {
return i.correspondingUseElement || i;
}
function pn(i) {
var n = i instanceof pe.SVGElement ? i.getBoundingClientRect() : i.getClientRects()[0];
return n && { left: n.left, right: n.right, top: n.top, bottom: n.bottom, width: n.width || n.right - n.left, height: n.height || n.bottom - n.top };
}
function mn(i) {
var n, a = pn(i);
if (!ke.isIOS7 && a) {
var o = { x: (n = (n = re(i)) || V).scrollX || n.document.documentElement.scrollLeft, y: n.scrollY || n.document.documentElement.scrollTop };
a.left += o.x, a.right += o.x, a.top += o.y, a.bottom += o.y;
}
return a;
}
function rs(i) {
for (var n = []; i; ) n.push(i), i = Le(i);
return n;
}
function ns(i) {
return !!x.string(i) && (pe.document.querySelector(i), !0);
}
function N(i, n) {
for (var a in n) i[a] = n[a];
return i;
}
function is(i, n, a) {
return i === "parent" ? Le(a) : i === "self" ? n.getRect(a) : Qi(a, i);
}
function Wt(i, n, a, o) {
var u = i;
return x.string(u) ? u = is(u, n, a) : x.func(u) && (u = u.apply(void 0, o)), x.element(u) && (u = mn(u)), u;
}
function hr(i) {
return i && { x: "x" in i ? i.x : i.left, y: "y" in i ? i.y : i.top };
}
function vn(i) {
return !i || "x" in i && "y" in i || ((i = N({}, i)).x = i.left || 0, i.y = i.top || 0, i.width = i.width || (i.right || 0) - i.x, i.height = i.height || (i.bottom || 0) - i.y), i;
}
function fr(i, n, a) {
i.left && (n.left += a.x), i.right && (n.right += a.x), i.top && (n.top += a.y), i.bottom && (n.bottom += a.y), n.width = n.right - n.left, n.height = n.bottom - n.top;
}
function $t(i, n, a) {
var o = a && i.options[a];
return hr(Wt(o && o.origin || i.options.origin, i, n, [i && n])) || { x: 0, y: 0 };
}
function ct(i, n) {
var a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function(m) {
return !0;
}, o = arguments.length > 3 ? arguments[3] : void 0;
if (o = o || {}, x.string(i) && i.search(" ") !== -1 && (i = ss(i)), x.array(i)) return i.forEach(function(m) {
return ct(m, n, a, o);
}), o;
if (x.object(i) && (n = i, i = ""), x.func(n) && a(i)) o[i] = o[i] || [], o[i].push(n);
else if (x.array(n)) for (var u = 0, d = n; u < d.length; u++) {
var h = d[u];
ct(i, h, a, o);
}
else if (x.object(n)) for (var f in n)
ct(ss(f).map(function(m) {
return "".concat(i).concat(m);
}), n[f], a, o);
return o;
}
function ss(i) {
return i.trim().split(/ +/);
}
var Ft = function(i, n) {
return Math.sqrt(i * i + n * n);
}, ul = ["webkit", "moz"];
function pr(i, n) {
i.__set || (i.__set = {});
var a = function(u) {
if (ul.some(function(d) {
return u.indexOf(d) === 0;
})) return 1;
typeof i[u] != "function" && u !== "__set" && Object.defineProperty(i, u, { get: function() {
return u in i.__set ? i.__set[u] : i.__set[u] = n[u];
}, set: function(d) {
i.__set[u] = d;
}, configurable: !0 });
};
for (var o in n) a(o);
return i;
}
function mr(i, n) {
i.page = i.page || {}, i.page.x = n.page.x, i.page.y = n.page.y, i.client = i.client || {}, i.client.x = n.client.x, i.client.y = n.client.y, i.timeStamp = n.timeStamp;
}
function as(i) {
i.page.x = 0, i.page.y = 0, i.client.x = 0, i.client.y = 0;
}
function os(i) {
return i instanceof pe.Event || i instanceof pe.Touch;
}
function vr(i, n, a) {
return i = i || "page", (a = a || {}).x = n[i + "X"], a.y = n[i + "Y"], a;
}
function ls(i, n) {
return n = n || { x: 0, y: 0 }, ke.isOperaMobile && os(i) ? (vr("screen", i, n), n.x += window.scrollX, n.y += window.scrollY) : vr("page", i, n), n;
}
function Nt(i) {
return x.number(i.pointerId) ? i.pointerId : i.identifier;
}
function cl(i, n, a) {
var o = n.length > 1 ? us(n) : n[0];
ls(o, i.page), function(u, d) {
d = d || {}, ke.isOperaMobile && os(u) ? vr("screen", u, d) : vr("client", u, d);
}(o, i.client), i.timeStamp = a;
}
function gn(i) {
var n = [];
return x.array(i) ? (n[0] = i[0], n[1] = i[1]) : i.type === "touchend" ? i.touches.length === 1 ? (n[0] = i.touches[0], n[1] = i.changedTouches[0]) : i.touches.length === 0 && (n[0] = i.changedTouches[0], n[1] = i.changedTouches[1]) : (n[0] = i.touches[0], n[1] = i.touches[1]), n;
}
function us(i) {
for (var n = { pageX: 0, pageY: 0, clientX: 0, clientY: 0, screenX: 0, screenY: 0 }, a = 0; a < i.length; a++) {
var o = i[a];
for (var u in n) n[u] += o[u];
}
for (var d in n) n[d] /= i.length;
return n;
}
function yn(i) {
if (!i.length) return null;
var n = gn(i), a = Math.min(n[0].pageX, n[1].pageX), o = Math.min(n[0].pageY, n[1].pageY), u = Math.max(n[0].pageX, n[1].pageX), d = Math.max(n[0].pageY, n[1].pageY);
return { x: a, y: o, left: a, top: o, right: u, bottom: d, width: u - a, height: d - o };
}
function bn(i, n) {
var a = n + "X", o = n + "Y", u = gn(i), d = u[0][a] - u[1][a], h = u[0][o] - u[1][o];
return Ft(d, h);
}
function wn(i, n) {
var a = n + "X", o = n + "Y", u = gn(i), d = u[1][a] - u[0][a], h = u[1][o] - u[0][o];
return 180 * Math.atan2(h, d) / Math.PI;
}
function cs(i) {
return x.string(i.pointerType) ? i.pointerType : x.number(i.pointerType) ? [void 0, void 0, "touch", "pen", "mouse"][i.pointerType] : /touch/.test(i.type || "") || i instanceof pe.Touch ? "touch" : "mouse";
}
function ds(i) {
var n = x.func(i.composedPath) ? i.composedPath() : i.path;
return [ts(n ? n[0] : i.target), ts(i.currentTarget)];
}
var gr = function() {
function i(n) {
c(this, i), this.immediatePropagationStopped = !1, this.propagationStopped = !1, this._interaction = n;
}
return y(i, [{ key: "preventDefault", value: function() {
} }, { key: "stopPropagation", value: function() {
this.propagationStopped = !0;
} }, { key: "stopImmediatePropagation", value: function() {
this.immediatePropagationStopped = this.propagationStopped = !0;
} }]), i;
}();
Object.defineProperty(gr.prototype, "interaction", { get: function() {
return this._interaction._proxy;
}, set: function() {
} });
var hs = function(i, n) {
for (var a = 0; a < n.length; a++) {
var o = n[a];
i.push(o);
}
return i;
}, fs = function(i) {
return hs([], i);
}, Ht = function(i, n) {
for (var a = 0; a < i.length; a++) if (n(i[a], a, i)) return a;
return -1;
}, Ut = function(i, n) {
return i[Ht(i, n)];
}, _t = function(i) {
S(a, i);
var n = D(a);
function a(o, u, d) {
var h;
c(this, a), (h = n.call(this, u._interaction)).dropzone = void 0, h.dragEvent = void 0, h.relatedTarget = void 0, h.draggable = void 0, h.propagationStopped = !1, h.immediatePropagationStopped = !1;
var f = d === "dragleave" ? o.prev : o.cur, m = f.element, g = f.dropzone;
return h.type = d, h.target = m, h.currentTarget = m, h.dropzone = g, h.dragEvent = u, h.relatedTarget = u.target, h.draggable = u.interactable, h.timeStamp = u.timeStamp, h;
}
return y(a, [{ key: "reject", value: function() {
var o = this, u = this._interaction.dropState;
if (this.type === "dropactivate" || this.dropzone && u.cur.dropzone === this.dropzone && u.cur.element === this.target) if (u.prev.dropzone = this.dropzone, u.prev.element = this.target, u.rejected = !0, u.events.enter = null, this.stopImmediatePropagation(), this.type === "dropactivate") {
var d = u.activeDrops, h = Ht(d, function(m) {
var g = m.dropzone, v = m.element;
return g === o.dropzone && v === o.target;
});
u.activeDrops.splice(h, 1);
var f = new a(u, this.dragEvent, "dropdeactivate");
f.dropzone = this.dropzone, f.target = this.target, this.dropzone.fire(f);
} else this.dropzone.fire(new a(u, this.dragEvent, "dragleave"));
} }, { key: "preventDefault", value: function() {
} }, { key: "stopPropagation", value: function() {
this.propagationStopped = !0;
} }, { key: "stopImmediatePropagation", value: function() {
this.immediatePropagationStopped = this.propagationStopped = !0;
} }]), a;
}(gr);
function ps(i, n) {
for (var a = 0, o = i.slice(); a < o.length; a++) {
var u = o[a], d = u.dropzone, h = u.element;
n.dropzone = d, n.target = h, d.fire(n), n.propagationStopped = n.immediatePropagationStopped = !1;
}
}
function _n(i, n) {
for (var a = function(d, h) {
for (var f = [], m = 0, g = d.interactables.list; m < g.length; m++) {
var v = g[m];
if (v.options.drop.enabled) {
var b = v.options.drop.accept;
if (!(x.element(b) && b !== h || x.string(b) && !Qe(h, b) || x.func(b) && !b({ dropzone: v, draggableElement: h }))) for (var T = 0, O = v.getAllElements(); T < O.length; T++) {
var M = O[T];
M !== h && f.push({ dropzone: v, element: M, rect: v.getRect(M) });
}
}
}
return f;
}(i, n), o = 0; o < a.length; o++) {
var u = a[o];
u.rect = u.dropzone.getRect(u.element);
}
return a;
}
function ms(i, n, a) {
for (var o = i.dropState, u = i.interactable, d = i.element, h = [], f = 0, m = o.activeDrops; f < m.length; f++) {
var g = m[f], v = g.dropzone, b = g.element, T = g.rect, O = v.dropCheck(n, a, u, d, b, T);
h.push(O ? b : null);
}
var M = function(I) {
for (var Y, z, $, G = [], q = 0; q < I.length; q++) {
var H = I[q], K = I[Y];
if (H && q !== Y) if (K) {
var ge = hn(H), le = hn(K);
if (ge !== H.ownerDocument) if (le !== H.ownerDocument) if (ge !== le) {
G = G.length ? G : es(K);
var be = void 0;
if (K instanceof pe.HTMLElement && H instanceof pe.SVGElement && !(H instanceof pe.SVGSVGElement)) {
if (H === le) continue;
be = H.ownerSVGElement;
} else be = H;
for (var De = es(be, K.ownerDocument), Fe = 0; De[Fe] && De[Fe] === G[Fe]; ) Fe++;
var Or = [De[Fe - 1], De[Fe], G[Fe]];
if (Or[0]) for (var Zt = Or[0].lastChild; Zt; ) {
if (Zt === Or[1]) {
Y = q, G = De;
break;
}
if (Zt === Or[2]) break;
Zt = Zt.previousSibling;
}
} else $ = K, (parseInt(re(z = H).getComputedStyle(z).zIndex, 10) || 0) >= (parseInt(re($).getComputedStyle($).zIndex, 10) || 0) && (Y = q);
else Y = q;
} else Y = q;
}
return Y;
}(h);
return o.activeDrops[M] || null;
}
function Sn(i, n, a) {
var o = i.dropState, u = { enter: null, leave: null, activate: null, deactivate: null, move: null, drop: null };
return a.type === "dragstart" && (u.activate = new _t(o, a, "dropactivate"), u.activate.target = null, u.activate.dropzone = null), a.type === "dragend" && (u.deactivate = new _t(o, a, "dropdeactivate"), u.deactivate.target = null, u.deactivate.dropzone = null), o.rejected || (o.cur.element !== o.prev.element && (o.prev.dropzone && (u.leave = new _t(o, a, "dragleave"), a.dragLeave = u.leave.target = o.prev.element, a.prevDropzone = u.leave.dropzone = o.prev.dropzone), o.cur.dropzone && (u.enter = new _t(o, a, "dragenter"), a.dragEnter = o.cur.element, a.dropzone = o.cur.dropzone)), a.type === "dragend" && o.cur.dropzone && (u.drop = new _t(o, a, "drop"), a.dropzone = o.cur.dropzone, a.relatedTarget = o.cur.element), a.type === "dragmove" && o.cur.dropzone && (u.move = new _t(o, a, "dropmove"), a.dropzone = o.cur.dropzone)), u;
}
function Tn(i, n) {
var a = i.dropState, o = a.activeDrops, u = a.cur, d = a.prev;
n.leave && d.dropzone.fire(n.leave), n.enter && u.dropzone.fire(n.enter), n.move && u.dropzone.fire(n.move), n.drop && u.dropzone.fire(n.drop), n.deactivate && ps(o, n.deactivate), a.prev.dropzone = u.dropzone, a.prev.element = u.element;
}
function vs(i, n) {
var a = i.interaction, o = i.iEvent, u = i.event;
if (o.type === "dragmove" || o.type === "dragend") {
var d = a.dropState;
n.dynamicDrop && (d.activeDrops = _n(n, a.element));
var h = o, f = ms(a, h, u);
d.rejected = d.rejected && !!f && f.dropzone === d.cur.dropzone && f.element === d.cur.element, d.cur.dropzone = f && f.dropzone, d.cur.element = f && f.element, d.events = Sn(a, 0, h);
}
}
var gs = { id: "actions/drop", install: function(i) {
var n = i.actions, a = i.interactStatic, o = i.Interactable, u = i.defaults;
i.usePlugin(Ji), o.prototype.dropzone = function(d) {
return function(h, f) {
if (x.object(f)) {
if (h.options.drop.enabled = f.enabled !== !1, f.listeners) {
var m = ct(f.listeners), g = Object.keys(m).reduce(function(b, T) {
return b[/^(enter|leave)/.test(T) ? "drag".concat(T) : /^(activate|deactivate|move)/.test(T) ? "drop".concat(T) : T] = m[T], b;
}, {}), v = h.options.drop.listeners;
v && h.off(v), h.on(g), h.options.drop.listeners = g;
}
return x.func(f.ondrop) && h.on("drop", f.ondrop), x.func(f.ondropactivate) && h.on("dropactivate", f.ondropactivate), x.func(f.ondropdeactivate) && h.on("dropdeactivate", f.ondropdeactivate), x.func(f.ondragenter) && h.on("dragenter", f.ondragenter), x.func(f.ondragleave) && h.on("dragleave", f.ondragleave), x.func(f.ondropmove) && h.on("dropmove", f.ondropmove), /^(pointer|center)$/.test(f.overlap) ? h.options.drop.overlap = f.overlap : x.number(f.overlap) && (h.options.drop.overlap = Math.max(Math.min(1, f.overlap), 0)), "accept" in f && (h.options.drop.accept = f.accept), "checker" in f && (h.options.drop.checker = f.checker), h;
}
return x.bool(f) ? (h.options.drop.enabled = f, h) : h.options.drop;
}(this, d);
}, o.prototype.dropCheck = function(d, h, f, m, g, v) {
return function(b, T, O, M, I, Y, z) {
var $ = !1;
if (!(z = z || b.getRect(Y))) return !!b.options.drop.checker && b.options.drop.checker(T, O, $, b, Y, M, I);
var G = b.options.drop.overlap;
if (G === "pointer") {
var q = $t(M, I, "drag"), H = ls(T);
H.x += q.x, H.y += q.y;
var K = H.x > z.left && H.x < z.right, ge = H.y > z.top && H.y < z.bottom;
$ = K && ge;
}
var le = M.getRect(I);
if (le && G === "center") {
var be = le.left + le.width / 2, De = le.top + le.height / 2;
$ = be >= z.left && be <= z.right && De >= z.top && De <= z.bottom;
}
return le && x.number(G) && ($ = Math.max(0, Math.min(z.right, le.right) - Math.max(z.left, le.left)) * Math.max(0, Math.min(z.bottom, le.bottom) - Math.max(z.top, le.top)) / (le.width * le.height) >= G), b.options.drop.checker && ($ = b.options.drop.checker(T, O, $, b, Y, M, I)), $;
}(this, d, h, f, m, g, v);
}, a.dynamicDrop = function(d) {
return x.bool(d) ? (i.dynamicDrop = d, a) : i.dynamicDrop;
}, N(n.phaselessTypes, { dragenter: !0, dragleave: !0, dropactivate: !0, dropdeactivate: !0, dropmove: !0, drop: !0 }), n.methodDict.drop = "dropzone", i.dynamicDrop = !1, u.actions.drop = gs.defaults;
}, listeners: { "interactions:before-action-start": function(i) {
var n = i.interaction;
n.prepared.name === "drag" && (n.dropState = { cur: { dropzone: null, element: null }, prev: { dropzone: null, element: null }, rejected: null, events: null, activeDrops: [] });
}, "interactions:after-action-start": function(i, n) {
var a = i.interaction, o = (i.event, i.iEvent);
if (a.prepared.name === "drag") {
var u = a.dropState;
u.activeDrops = [], u.events = {}, u.activeDrops = _n(n, a.element), u.events = Sn(a, 0, o), u.events.activate && (ps(u.activeDrops, u.events.activate), n.fire("actions/drop:start", { interaction: a, dragEvent: o }));
}
}, "interactions:action-move": vs, "interactions:after-action-move": function(i, n) {
var a = i.interaction, o = i.iEvent;
if (a.prepared.name === "drag") {
var u = a.dropState;
Tn(a, u.events), n.fire("actions/drop:move", { interaction: a, dragEvent: o }), u.events = {};
}
}, "interactions:action-end": function(i, n) {
if (i.interaction.prepared.name === "drag") {
var a = i.interaction, o = i.iEvent;
vs(i, n), Tn(a, a.dropState.events), n.fire("actions/drop:end", { interaction: a, dragEvent: o });
}
}, "interactions:stop": function(i) {
var n = i.interaction;
if (n.prepared.name === "drag") {
var a = n.dropState;
a && (a.activeDrops = null, a.events = null, a.cur.dropzone = null, a.cur.element = null, a.prev.dropzone = null, a.prev.element = null, a.rejected = !1);
}
} }, getActiveDrops: _n, getDrop: ms, getDropEvents: Sn, fireDropEvents: Tn, filterEventType: function(i) {
return i.search("drag") === 0 || i.search("drop") === 0;
}, defaults: { enabled: !1, accept: null, overlap: "pointer" } }, dl = gs;
function xn(i) {
var n = i.interaction, a = i.iEvent, o = i.phase;
if (n.prepared.name === "gesture") {
var u = n.pointers.map(function(g) {
return g.pointer;
}), d = o === "start", h = o === "end", f = n.interactable.options.deltaSource;
if (a.touches = [u[0], u[1]], d) a.distance = bn(u, f), a.box = yn(u), a.scale = 1, a.ds = 0, a.angle = wn(u, f), a.da = 0, n.gesture.startDistance = a.distance, n.gesture.startAngle = a.angle;
else if (h || n.pointers.length < 2) {
var m = n.prevEvent;
a.distance = m.distance, a.box = m.box, a.scale = m.scale, a.ds = 0, a.angle = m.angle, a.da = 0;
} else a.distance = bn(u, f), a.box = yn(u), a.scale = a.distance / n.gesture.startDistance, a.angle = wn(u, f), a.ds = a.scale - n.gesture.scale, a.da = a.angle - n.gesture.angle;
n.gesture.distance = a.distance, n.gesture.angle = a.angle, x.number(a.scale) && a.scale !== 1 / 0 && !isNaN(a.scale) && (n.gesture.scale = a.scale);
}
}
var Mn = { id: "actions/gesture", before: ["actions/drag", "actions/resize"], install: function(i) {
var n = i.actions, a = i.Interactable, o = i.defaults;
a.prototype.gesturable = function(u) {
return x.object(u) ? (this.options.gesture.enabled = u.enabled !== !1, this.setPerAction("gesture", u), this.setOnEvents("gesture", u), this) : x.bool(u) ? (this.options.gesture.enabled = u, this) : this.options.gesture;
}, n.map.gesture = Mn, n.methodDict.gesture = "gesturable", o.actions.gesture = Mn.defaults;
}, listeners: { "interactions:action-start": xn, "interactions:action-move": xn, "interactions:action-end": xn, "interactions:new": function(i) {
i.interaction.gesture = { angle: 0, distance: 0, scale: 1, startAngle: 0, startDistance: 0 };
}, "auto-start:check": function(i) {
if (!(i.interaction.pointers.length < 2)) {
var n = i.interactable.options.gesture;
if (n && n.enabled) return i.action = { name: "gesture" }, !1;
}
} }, defaults: {}, getCursor: function() {
return "";
}, filterEventType: function(i) {
return i.search("gesture") === 0;
} }, hl = Mn;
function fl(i, n, a, o, u, d, h) {
if (!n) return !1;
if (n === !0) {
var f = x.number(d.width) ? d.width : d.right - d.left, m = x.number(d.height) ? d.height : d.bottom - d.top;
if (h = Math.min(h, Math.abs((i === "left" || i === "right" ? f : m) / 2)), f < 0 && (i === "left" ? i = "right" : i === "right" && (i = "left")), m < 0 && (i === "top" ? i = "bottom" : i === "bottom" && (i = "top")), i === "left") {
var g = f >= 0 ? d.left : d.right;
return a.x < g + h;
}
if (i === "top") {
var v = m >= 0 ? d.top : d.bottom;
return a.y < v + h;
}
if (i === "right") return a.x > (f >= 0 ? d.right : d.left) - h;
if (i === "bottom") return a.y > (m >= 0 ? d.bottom : d.top) - h;
}
return !!x.element(o) && (x.element(n) ? n === o : fn(o, n, u));
}
function ys(i) {
var n = i.iEvent, a = i.interaction;
if (a.prepared.name === "resize" && a.resizeAxes) {
var o = n;
a.interactable.options.resize.square ? (a.resizeAxes === "y" ? o.delta.x = o.delta.y : o.delta.y = o.delta.x, o.axes = "xy") : (o.axes = a.resizeAxes, a.resizeAxes === "x" ? o.delta.y = 0 : a.resizeAxes === "y" && (o.delta.x = 0));
}
}
var We, dt, $e = { id: "actions/resize", before: ["actions/drag"], install: function(i) {
var n = i.actions, a = i.browser, o = i.Interactable, u = i.defaults;
$e.cursors = function(d) {
return d.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" };
}(a), $e.defaultMargin = a.supportsTouch || a.supportsPointerEvent ? 20 : 10, o.prototype.resizable = function(d) {
return function(h, f, m) {
return x.object(f) ? (h.options.resize.enabled = f.enabled !== !1, h.setPerAction("resize", f), h.setOnEvents("resize", f), x.string(f.axis) && /^x$|^y$|^xy$/.test(f.axis) ? h.options.resize.axis = f.axis : f.axis === null && (h.options.resize.axis = m.defaults.actions.resize.axis), x.bool(f.preserveAspectRatio) ? h.options.resize.preserveAspectRatio = f.preserveAspectRatio : x.bool(f.square) && (h.options.resize.square = f.square), h) : x.bool(f) ? (h.options.resize.enabled = f, h) : h.options.resize;
}(this, d, i);
}, n.map.resize = $e, n.methodDict.resize = "resizable", u.actions.resize = $e.defaults;
}, listeners: { "interactions:new": function(i) {
i.interaction.resizeAxes = "xy";
}, "interactions:action-start": function(i) {
(function(n) {
var a = n.iEvent, o = n.interaction;
if (o.prepared.name === "resize" && o.prepared.edges) {
var u = a, d = o.rect;
o._rects = { start: N({}, d), corrected: N({}, d), previous: N({}, d), delta: { left: 0, right: 0, width: 0, top: 0, bottom: 0, height: 0 } }, u.edges = o.prepared.edges, u.rect = o._rects.corrected, u.deltaRect = o._rects.delta;
}
})(i), ys(i);
}, "interactions:action-move": function(i) {
(function(n) {
var a = n.iEvent, o = n.interaction;
if (o.prepared.name === "resize" && o.prepared.edges) {
var u = a, d = o.interactable.options.resize.invert, h = d === "reposition" || d === "negate", f = o.rect, m = o._rects, g = m.start, v = m.corrected, b = m.delta, T = m.previous;
if (N(T, v), h) {
if (N(v, f), d === "reposition") {
if (v.top > v.bottom) {
var O = v.top;
v.top = v.bottom, v.bottom = O;
}
if (v.left > v.right) {
var M = v.left;
v.left = v.right, v.right = M;
}
}
} else v.top = Math.min(f.top, g.bottom), v.bottom = Math.max(f.bottom, g.top), v.left = Math.min(f.left, g.right), v.right = Math.max(f.right, g.left);
for (var I in v.width = v.right - v.left, v.height = v.bottom - v.top, v) b[I] = v[I] - T[I];
u.edges = o.prepared.edges, u.rect = v, u.deltaRect = b;
}
})(i), ys(i);
}, "interactions:action-end": function(i) {
var n = i.iEvent, a = i.interaction;
if (a.prepared.name === "resize" && a.prepared.edges) {
var o = n;
o.edges = a.prepared.edges, o.rect = a._rects.corrected, o.deltaRect = a._rects.delta;
}
}, "auto-start:check": function(i) {
var n = i.interaction, a = i.interactable, o = i.element, u = i.rect, d = i.buttons;
if (u) {
var h = N({}, n.coords.cur.page), f = a.options.resize;
if (f && f.enabled && (!n.pointerIsDown || !/mouse|pointer/.test(n.pointerType) || d & f.mouseButtons)) {
if (x.object(f.edges)) {
var m = { left: !1, right: !1, top: !1, bottom: !1 };
for (var g in m) m[g] = fl(g, f.edges[g], h, n._latestPointer.eventTarget, o, u, f.margin || $e.defaultMargin);
m.left = m.left && !m.right, m.top = m.top && !m.bottom, (m.left || m.right || m.top || m.bottom) && (i.action = { name: "resize", edges: m });
} else {
var v = f.axis !== "y" && h.x > u.right - $e.defaultMargin, b = f.axis !== "x" && h.y > u.bottom - $e.defaultMargin;
(v || b) && (i.action = { name: "resize", axes: (v ? "x" : "") + (b ? "y" : "") });
}
return !i.action && void 0;
}
}
} }, defaults: { square: !1, preserveAspectRatio: !1, axis: "xy", margin: NaN, edges: null, invert: "none" }, cursors: null, getCursor: function(i) {
var n = i.edges, a = i.axis, o = i.name, u = $e.cursors, d = null;
if (a) d = u[o + a];
else if (n) {
for (var h = "", f = 0, m = ["top", "bottom", "left", "right"]; f < m.length; f++) {
var g = m[f];
n[g] && (h += g);
}
d = u[h];
}
return d;
}, filterEventType: function(i) {
return i.search("resize") === 0;
}, defaultMargin: null }, pl = $e, ml = { id: "actions", install: function(i) {
i.usePlugin(hl), i.usePlugin(pl), i.usePlugin(Ji), i.usePlugin(dl);
} }, bs = 0, et = { request: function(i) {
return We(i);
}, cancel: function(i) {
return dt(i);
}, init: function(i) {
if (We = i.requestAnimationFrame, dt = i.cancelAnimationFrame, !We) for (var n = ["ms", "moz", "webkit", "o"], a = 0; a < n.length; a++) {
var o = n[a];
We = i["".concat(o, "RequestAnimationFrame")], dt = i["".concat(o, "CancelAnimationFrame")] || i["".concat(o, "CancelRequestAnimationFrame")];
}
We = We && We.bind(i), dt = dt && dt.bind(i), We || (We = function(u) {
var d = Date.now(), h = Math.max(0, 16 - (d - bs)), f = i.setTimeout(function() {
u(d + h);
}, h);
return bs = d + h, f;
}, dt = function(u) {
return clearTimeout(u);
});
} }, U = { 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(i) {
U.isScrolling = !0, et.cancel(U.i), i.autoScroll = U, U.interaction = i, U.prevTime = U.now(), U.i = et.request(U.scroll);
}, stop: function() {
U.isScrolling = !1, U.interaction && (U.interaction.autoScroll = null), et.cancel(U.i);
}, scroll: function() {
var i = U.interaction, n = i.interactable, a = i.element, o = i.prepared.name, u = n.options[o].autoScroll, d = ws(u.container, n, a), h = U.now(), f = (h - U.prevTime) / 1e3, m = u.speed * f;
if (m >= 1) {
var g = { x: U.x * m, y: U.y * m };
if (g.x || g.y) {
var v = _s(d);
x.window(d) ? d.scrollBy(g.x, g.y) : d && (d.scrollLeft += g.x, d.scrollTop += g.y);
var b = _s(d), T = { x: b.x - v.x, y: b.y - v.y };
(T.x || T.y) && n.fire({ type: "autoscroll", target: a, interactable: n, delta: T, interaction: i, container: d });
}
U.prevTime = h;
}
U.isScrolling && (et.cancel(U.i), U.i = et.request(U.scroll));
}, check: function(i, n) {
var a;
return (a = i.options[n].autoScroll) == null ? void 0 : a.enabled;
}, onInteractionMove: function(i) {
var n = i.interaction, a = i.pointer;
if (n.interacting() && U.check(n.interactable, n.prepared.name)) if (n.simulation) U.x = U.y = 0;
else {
var o, u, d, h, f = n.interactable, m = n.element, g = n.prepared.name, v = f.options[g].autoScroll, b = ws(v.container, f, m);
if (x.window(b)) h = a.clientX < U.margin, o = a.clientY < U.margin, u = a.clientX > b.innerWidth - U.margin, d = a.clientY > b.innerHeight - U.margin;
else {
var T = pn(b);
h = a.clientX < T.left + U.margin, o = a.clientY < T.top + U.margin, u = a.clientX > T.right - U.margin, d = a.clientY > T.bottom - U.margin;
}
U.x = u ? 1 : h ? -1 : 0, U.y = d ? 1 : o ? -1 : 0, U.isScrolling || (U.margin = v.margin, U.speed = v.speed, U.start(n));
}
} };
function ws(i, n, a) {
return (x.string(i) ? is(i, n, a) : i) || re(a);
}
function _s(i) {
return x.window(i) && (i = window.document.body), { x: i.scrollLeft, y: i.scrollTop };
}
var vl = { id: "auto-scroll", install: function(i) {
var n = i.defaults, a = i.actions;
i.autoScroll = U, U.now = function() {
return i.now();
}, a.phaselessTypes.autoscroll = !0, n.perAction.autoScroll = U.defaults;
}, listeners: { "interactions:new": function(i) {
i.interaction.autoScroll = null;
}, "interactions:destroy": function(i) {
i.interaction.autoScroll = null, U.stop(), U.interaction && (U.interaction = null);
}, "interactions:stop": U.stop, "interactions:action-move": function(i) {
return U.onInteractionMove(i);
} } }, gl = vl;
function Gt(i, n) {
var a = !1;
return function() {
return a || (V.console.warn(n), a = !0), i.apply(this, arguments);
};
}
function On(i, n) {
return i.name = n.name, i.axis = n.axis, i.edges = n.edges, i;
}
function yl(i) {
return x.bool(i) ? (this.options.styleCursor = i, this) : i === null ? (delete this.options.styleCursor, this) : this.options.styleCursor;
}
function bl(i) {
return x.func(i) ? (this.options.actionChecker = i, this) : i === null ? (delete this.options.actionChecker, this) : this.options.actionChecker;
}
var wl = { id: "auto-start/interactableMethods", install: function(i) {
var n = i.Interactable;
n.prototype.getAction = function(a, o, u, d) {
var h = function(f, m, g, v, b) {
var T = f.getRect(v), O = m.buttons || { 0: 1, 1: 4, 3: 8, 4: 16 }[m.button], M = { action: null, interactable: f, interaction: g, element: v, rect: T, buttons: O };
return b.fire("auto-start:check", M), M.action;
}(this, o, u, d, i);
return this.options.actionChecker ? this.options.actionChecker(a, o, h, this, d, u) : h;
}, n.prototype.ignoreFrom = Gt(function(a) {
return this._backCompatOption("ignoreFrom", a);
}, "Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."), n.prototype.allowFrom = Gt(function(a) {
return this._backCompatOption("allowFrom", a);
}, "Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."), n.prototype.actionChecker = bl, n.prototype.styleCursor = yl;
} };
function Ss(i, n, a, o, u) {
return n.testIgnoreAllow(n.options[i.name], a, o) && n.options[i.name].enabled && yr(n, a, i, u) ? i : null;
}
function _l(i, n, a, o, u, d, h) {
for (var f = 0, m = o.length; f < m; f++) {
var g = o[f], v = u[f], b = g.getAction(n, a, i, v);
if (b) {
var T = Ss(b, g, v, d, h);
if (T) return { action: T, interactable: g, element: v };
}
}
return { action: null, interactable: null, element: null };
}
function Ts(i, n, a, o, u) {
var d = [], h = [], f = o;
function m(v) {
d.push(v), h.push(f);
}
for (; x.element(f); ) {
d = [], h = [], u.interactables.forEachMatch(f, m);
var g = _l(i, n, a, d, h, o, u);
if (g.action && !g.interactable.options[g.action.name].manualStart) return g;
f = Le(f);
}
return { action: null, interactable: null, element: null };
}
function xs(i, n, a) {
var o = n.action, u = n.interactable, d = n.element;
o = o || { name: null }, i.interactable = u, i.element = d, On(i.prepared, o), i.rect = u && o.name ? u.getRect(d) : null, Os(i, a), a.fire("autoStart:prepared", { interaction: i });
}
function yr(i, n, a, o) {
var u = i.options, d = u[a.name].max, h = u[a.name].maxPerElement, f = o.autoStart.maxInteractions, m = 0, g = 0, v = 0;
if (!(d && h && f)) return !1;
for (var b = 0, T = o.interactions.list; b < T.length; b++) {
var O = T[b], M = O.prepared.name;
if (O.interacting() && (++m >= f || O.interactable === i && ((g += M === a.name ? 1 : 0) >= d || O.element === n && (v++, M === a.name && v >= h))))
return !1;
}
return f > 0;
}
function Ms(i, n) {
return x.number(i) ? (n.autoStart.maxInteractions = i, this) : n.autoStart.maxInteractions;
}
function kn(i, n, a) {
var o = a.autoStart.cursorElement;
o && o !== i && (o.style.cursor = ""), i.ownerDocument.documentElement.style.cursor = n, i.style.cursor = n, a.autoStart.cursorElement = n ? i : null;
}
function Os(i, n) {
var a = i.interactable, o = i.element, u = i.prepared;
if (i.pointerType === "mouse" && a && a.options.styleCursor) {
var d = "";
if (u.name) {
var h = a.options[u.name].cursorChecker;
d = x.func(h) ? h(u, a, o, i._interacting) : n.actions.map[u.name].getCursor(u);
}
kn(i.element, d || "", n);
} else n.autoStart.cursorElement && kn(n.autoStart.cursorElement, "", n);
}
var Sl = { id: "auto-start/base", before: ["actions"], install: function(i) {
var n = i.interactStatic, a = i.defaults;
i.usePlugin(wl), a.base.actionChecker = null, a.base.styleCursor = !0, N(a.perAction, { manualStart: !1, max: 1 / 0, maxPerElement: 1, allowFrom: null, ignoreFrom: null, mouseButtons: 1 }), n.maxInteractions = function(o) {
return Ms(o, i);
}, i.autoStart = { maxInteractions: 1 / 0, withinInteractionLimit: yr, cursorElement: null };
}, listeners: { "interactions:down": function(i, n) {
var a = i.interaction, o = i.pointer, u = i.event, d = i.eventTarget;
a.interacting() || xs(a, Ts(a, o, u, d, n), n);
}, "interactions:move": function(i, n) {
(function(a, o) {
var u = a.interaction, d = a.pointer, h = a.event, f = a.eventTarget;
u.pointerType !== "mouse" || u.pointerIsDown || u.interacting() || xs(u, Ts(u, d, h, f, o), o);
})(i, n), function(a, o) {
var u = a.interaction;
if (u.pointerIsDown && !u.interacting() && u.pointerWasMoved && u.prepared.name) {
o.fire("autoStart:before-start", a);
var d = u.interactable, h = u.prepared.name;
h && d && (d.options[h].manualStart || !yr(d, u.element, u.prepared, o) ? u.stop() : (u.start(u.prepared, d, u.element), Os(u, o)));
}
}(i, n);
}, "interactions:stop": function(i, n) {
var a = i.interaction, o = a.interactable;
o && o.options.styleCursor && kn(a.element, "", n);
} }, maxInteractions: Ms, withinInteractionLimit: yr, validateAction: Ss }, Dn = Sl, Tl = { id: "auto-start/dragAxis", listeners: { "autoStart:before-start": function(i, n) {
var a = i.interaction, o = i.eventTarget, u = i.dx, d = i.dy;
if (a.prepared.name === "drag") {
var h = Math.abs(u), f = Math.abs(d), m = a.interactable.options.drag, g = m.startAxis, v = h > f ? "x" : h < f ? "y" : "xy";
if (a.prepared.axis = m.lockAxis === "start" ? v[0] : m.lockAxis, v !== "xy" && g !== "xy" && g !== v) {
a.prepared.name = null;
for (var b = o, T = function(M) {
if (M !== a.interactable) {
var I = a.interactable.options.drag;
if (!I.manualStart && M.testIgnoreAllow(I, b, o)) {
var Y = M.getAction(a.downPointer, a.downEvent, a, b);
if (Y && Y.name === "drag" && function(z, $) {
if (!$) return !1;
var G = $.options.drag.startAxis;
return z === "xy" || G === "xy" || G === z;
}(v, M) && Dn.validateAction(Y, M, b, o, n)) return M;
}
}
}; x.element(b); ) {
var O = n.interactables.forEachMatch(b, T);
if (O) {
a.prepared.name = "drag", a.interactable = O, a.element = b;
break;
}
b = Le(b);
}
}
}
} } };
function Pn(i) {
var n = i.prepared && i.prepared.name;
if (!n) return null;
var a = i.interactable.options;
return a[n].hold || a[n].delay;
}
var xl = { id: "auto-start/hold", install: function(i) {
var n = i.defaults;
i.usePlugin(Dn), n.perAction.hold = 0, n.perAction.delay = 0;
}, listeners: { "interactions:new": function(i) {
i.interaction.autoStartHoldTimer = null;
}, "autoStart:prepared": function(i) {
var n = i.interaction, a = Pn(n);
a > 0 && (n.autoStartHoldTimer = setTimeout(function() {
n.start(n.prepared, n.interactable, n.element);
}, a));
}, "interactions:move": function(i) {
var n = i.interaction, a = i.duplicate;
n.autoStartHoldTimer && n.pointerWasMoved && !a && (clearTimeout(n.autoStartHoldTimer), n.autoStartHoldTimer = null);
}, "autoStart:before-start": function(i) {
var n = i.interaction;
Pn(n) > 0 && (n.prepared.name = null);
} }, getHoldDuration: Pn }, Ml = xl, Ol = { id: "auto-start", install: function(i) {
i.usePl