@yeepay/virtual-keyboard
Version:
YeePay Virtual Keyboard Component
1,292 lines • 443 kB
JavaScript
import se, { ref as $t, computed as fA, watch as vs, onMounted as gs } from "vue";
var Y = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {};
function Gi(r) {
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
}
function ws(r) {
if (r.__esModule)
return r;
var t = r.default;
if (typeof t == "function") {
var e = function A() {
return this instanceof A ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
};
e.prototype = t.prototype;
} else
e = {};
return Object.defineProperty(e, "__esModule", { value: !0 }), Object.keys(r).forEach(function(A) {
var i = Object.getOwnPropertyDescriptor(r, A);
Object.defineProperty(e, A, i.get ? i : {
enumerable: !0,
get: function() {
return r[A];
}
});
}), e;
}
var Xi = { exports: {} }, ft = {}, B0;
function a0() {
if (B0)
return ft;
B0 = 1, ft.__esModule = !0, ft.isInContainer = ft.getScrollContainer = ft.isScroll = ft.getStyle = ft.once = ft.off = ft.on = void 0;
var r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(h) {
return typeof h;
} : function(h) {
return h && typeof Symbol == "function" && h.constructor === Symbol && h !== Symbol.prototype ? "symbol" : typeof h;
};
ft.hasClass = x, ft.addClass = y, ft.removeClass = d, ft.setStyle = m;
var t = se, e = A(t);
function A(h) {
return h && h.__esModule ? h : { default: h };
}
var i = e.default.prototype.$isServer, n = /([\:\-\_]+(.))/g, s = /^moz([A-Z])/, a = i ? 0 : Number(document.documentMode), f = function(o) {
return (o || "").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, "");
}, u = function(o) {
return o.replace(n, function(c, g, w, D) {
return D ? w.toUpperCase() : w;
}).replace(s, "Moz$1");
}, l = ft.on = function() {
return !i && document.addEventListener ? function(h, o, c) {
h && o && c && h.addEventListener(o, c, !1);
} : function(h, o, c) {
h && o && c && h.attachEvent("on" + o, c);
};
}(), C = ft.off = function() {
return !i && document.removeEventListener ? function(h, o, c) {
h && o && h.removeEventListener(o, c, !1);
} : function(h, o, c) {
h && o && h.detachEvent("on" + o, c);
};
}();
ft.once = function(o, c, g) {
var w = function D() {
g && g.apply(this, arguments), C(o, c, D);
};
l(o, c, w);
};
function x(h, o) {
if (!h || !o)
return !1;
if (o.indexOf(" ") !== -1)
throw new Error("className should not contain space.");
return h.classList ? h.classList.contains(o) : (" " + h.className + " ").indexOf(" " + o + " ") > -1;
}
function y(h, o) {
if (h) {
for (var c = h.className, g = (o || "").split(" "), w = 0, D = g.length; w < D; w++) {
var O = g[w];
O && (h.classList ? h.classList.add(O) : x(h, O) || (c += " " + O));
}
h.classList || h.setAttribute("class", c);
}
}
function d(h, o) {
if (!(!h || !o)) {
for (var c = o.split(" "), g = " " + h.className + " ", w = 0, D = c.length; w < D; w++) {
var O = c[w];
O && (h.classList ? h.classList.remove(O) : x(h, O) && (g = g.replace(" " + O + " ", " ")));
}
h.classList || h.setAttribute("class", f(g));
}
}
var E = ft.getStyle = a < 9 ? function(h, o) {
if (!i) {
if (!h || !o)
return null;
o = u(o), o === "float" && (o = "styleFloat");
try {
switch (o) {
case "opacity":
try {
return h.filters.item("alpha").opacity / 100;
} catch (c) {
return 1;
}
default:
return h.style[o] || h.currentStyle ? h.currentStyle[o] : null;
}
} catch (c) {
return h.style[o];
}
}
} : function(h, o) {
if (!i) {
if (!h || !o)
return null;
o = u(o), o === "float" && (o = "cssFloat");
try {
var c = document.defaultView.getComputedStyle(h, "");
return h.style[o] || c ? c[o] : null;
} catch (g) {
return h.style[o];
}
}
};
function m(h, o, c) {
if (!(!h || !o))
if ((typeof o == "undefined" ? "undefined" : r(o)) === "object")
for (var g in o)
o.hasOwnProperty(g) && m(h, g, o[g]);
else
o = u(o), o === "opacity" && a < 9 ? h.style.filter = isNaN(c) ? "" : "alpha(opacity=" + c * 100 + ")" : h.style[o] = c;
}
var B = ft.isScroll = function(o, c) {
if (!i) {
var g = c != null, w = g ? c ? E(o, "overflow-y") : E(o, "overflow-x") : E(o, "overflow");
return w.match(/(scroll|auto|overlay)/);
}
};
return ft.getScrollContainer = function(o, c) {
if (!i) {
for (var g = o; g; ) {
if ([window, document, document.documentElement].includes(g))
return window;
if (B(g, c))
return g;
g = g.parentNode;
}
return g;
}
}, ft.isInContainer = function(o, c) {
if (i || !o || !c)
return !1;
var g = o.getBoundingClientRect(), w = void 0;
return [window, document, document.documentElement, null, void 0].includes(c) ? w = {
top: 0,
right: window.innerWidth,
bottom: window.innerHeight,
left: 0
} : w = c.getBoundingClientRect(), g.top < w.bottom && g.bottom > w.top && g.right > w.left && g.left < w.right;
}, ft;
}
var W = {}, It = {}, D0;
function ys() {
if (D0)
return It;
D0 = 1, It.__esModule = !0, It.isDefined = It.isUndefined = It.isFunction = void 0;
var r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(f) {
return typeof f;
} : function(f) {
return f && typeof Symbol == "function" && f.constructor === Symbol && f !== Symbol.prototype ? "symbol" : typeof f;
};
It.isString = i, It.isObject = n, It.isHtmlElement = s;
var t = se, e = A(t);
function A(f) {
return f && f.__esModule ? f : { default: f };
}
function i(f) {
return Object.prototype.toString.call(f) === "[object String]";
}
function n(f) {
return Object.prototype.toString.call(f) === "[object Object]";
}
function s(f) {
return f && f.nodeType === Node.ELEMENT_NODE;
}
var a = function(u) {
var l = {};
return u && l.toString.call(u) === "[object Function]";
};
return typeof /./ != "function" && (typeof Int8Array == "undefined" ? "undefined" : r(Int8Array)) !== "object" && (e.default.prototype.$isServer || typeof document.childNodes != "function") && (It.isFunction = a = function(u) {
return typeof u == "function" || !1;
}), It.isFunction = a, It.isUndefined = function(u) {
return u === void 0;
}, It.isDefined = function(u) {
return u != null;
}, It;
}
var O0;
function Cs() {
if (O0)
return W;
O0 = 1, W.__esModule = !0, W.isMac = W.isEmpty = W.isEqual = W.arrayEquals = W.looseEqual = W.capitalize = W.kebabCase = W.autoprefixer = W.isFirefox = W.isEdge = W.isIE = W.coerceTruthyValueToArray = W.arrayFind = W.arrayFindIndex = W.escapeRegexpString = W.valueEquals = W.generateId = W.getValueByPath = void 0;
var r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(B) {
return typeof B;
} : function(B) {
return B && typeof Symbol == "function" && B.constructor === Symbol && B !== Symbol.prototype ? "symbol" : typeof B;
};
W.noop = s, W.hasOwn = a, W.toObject = u, W.getPropByPath = l, W.rafThrottle = E, W.objToArray = m;
var t = se, e = i(t), A = ys();
function i(B) {
return B && B.__esModule ? B : { default: B };
}
var n = Object.prototype.hasOwnProperty;
function s() {
}
function a(B, h) {
return n.call(B, h);
}
function f(B, h) {
for (var o in h)
B[o] = h[o];
return B;
}
function u(B) {
for (var h = {}, o = 0; o < B.length; o++)
B[o] && f(h, B[o]);
return h;
}
W.getValueByPath = function(h, o) {
o = o || "";
for (var c = o.split("."), g = h, w = null, D = 0, O = c.length; D < O; D++) {
var j = c[D];
if (!g)
break;
if (D === O - 1) {
w = g[j];
break;
}
g = g[j];
}
return w;
};
function l(B, h, o) {
var c = B;
h = h.replace(/\[(\w+)\]/g, ".$1"), h = h.replace(/^\./, "");
for (var g = h.split("."), w = 0, D = g.length; w < D - 1 && !(!c && !o); ++w) {
var O = g[w];
if (O in c)
c = c[O];
else {
if (o)
throw new Error("please transfer a valid prop path to form item!");
break;
}
}
return {
o: c,
k: g[w],
v: c ? c[g[w]] : null
};
}
W.generateId = function() {
return Math.floor(Math.random() * 1e4);
}, W.valueEquals = function(h, o) {
if (h === o)
return !0;
if (!(h instanceof Array) || !(o instanceof Array) || h.length !== o.length)
return !1;
for (var c = 0; c !== h.length; ++c)
if (h[c] !== o[c])
return !1;
return !0;
}, W.escapeRegexpString = function() {
var h = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
return String(h).replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
};
var C = W.arrayFindIndex = function(h, o) {
for (var c = 0; c !== h.length; ++c)
if (o(h[c]))
return c;
return -1;
};
W.arrayFind = function(h, o) {
var c = C(h, o);
return c !== -1 ? h[c] : void 0;
}, W.coerceTruthyValueToArray = function(h) {
return Array.isArray(h) ? h : h ? [h] : [];
}, W.isIE = function() {
return !e.default.prototype.$isServer && !isNaN(Number(document.documentMode));
}, W.isEdge = function() {
return !e.default.prototype.$isServer && navigator.userAgent.indexOf("Edge") > -1;
}, W.isFirefox = function() {
return !e.default.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
}, W.autoprefixer = function(h) {
if ((typeof h == "undefined" ? "undefined" : r(h)) !== "object")
return h;
var o = ["transform", "transition", "animation"], c = ["ms-", "webkit-"];
return o.forEach(function(g) {
var w = h[g];
g && w && c.forEach(function(D) {
h[D + g] = w;
});
}), h;
}, W.kebabCase = function(h) {
var o = /([^-])([A-Z])/g;
return h.replace(o, "$1-$2").replace(o, "$1-$2").toLowerCase();
}, W.capitalize = function(h) {
return (0, A.isString)(h) ? h.charAt(0).toUpperCase() + h.slice(1) : h;
};
var x = W.looseEqual = function(h, o) {
var c = (0, A.isObject)(h), g = (0, A.isObject)(o);
return c && g ? JSON.stringify(h) === JSON.stringify(o) : !c && !g ? String(h) === String(o) : !1;
}, y = W.arrayEquals = function(h, o) {
if (h = h || [], o = o || [], h.length !== o.length)
return !1;
for (var c = 0; c < h.length; c++)
if (!x(h[c], o[c]))
return !1;
return !0;
};
W.isEqual = function(h, o) {
return Array.isArray(h) && Array.isArray(o) ? y(h, o) : x(h, o);
};
var d = W.isEmpty = function(h) {
if (h == null)
return !0;
if (typeof h == "boolean")
return !1;
if (typeof h == "number")
return !h;
if (h instanceof Error)
return h.message === "";
switch (Object.prototype.toString.call(h)) {
case "[object String]":
case "[object Array]":
return !h.length;
case "[object File]":
case "[object Map]":
case "[object Set]":
return !h.size;
case "[object Object]":
return !Object.keys(h).length;
}
return !1;
};
function E(B) {
var h = !1;
return function() {
for (var o = this, c = arguments.length, g = Array(c), w = 0; w < c; w++)
g[w] = arguments[w];
h || (h = !0, window.requestAnimationFrame(function(D) {
B.apply(o, g), h = !1;
}));
};
}
function m(B) {
return Array.isArray(B) ? B : d(B) ? [] : [B];
}
return W.isMac = function() {
return !e.default.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
}, W;
}
var uA = {}, De = {}, cA = {}, I0;
function ms() {
return I0 || (I0 = 1, cA.__esModule = !0, cA.default = function(r) {
for (var t = 1, e = arguments.length; t < e; t++) {
var A = arguments[t] || {};
for (var i in A)
if (A.hasOwnProperty(i)) {
var n = A[i];
n !== void 0 && (r[i] = n);
}
}
return r;
}), cA;
}
var lA = {}, F0;
function bs() {
if (F0)
return lA;
F0 = 1, lA.__esModule = !0;
var r = se, t = A(r), e = a0();
function A(C) {
return C && C.__esModule ? C : { default: C };
}
var i = !1, n = !1, s = void 0, a = function() {
if (!t.default.prototype.$isServer) {
var x = u.modalDom;
return x ? i = !0 : (i = !1, x = document.createElement("div"), u.modalDom = x, x.addEventListener("touchmove", function(y) {
y.preventDefault(), y.stopPropagation();
}), x.addEventListener("click", function() {
u.doOnModalClick && u.doOnModalClick();
})), x;
}
}, f = {}, u = {
modalFade: !0,
getInstance: function(x) {
return f[x];
},
register: function(x, y) {
x && y && (f[x] = y);
},
deregister: function(x) {
x && (f[x] = null, delete f[x]);
},
nextZIndex: function() {
return u.zIndex++;
},
modalStack: [],
doOnModalClick: function() {
var x = u.modalStack[u.modalStack.length - 1];
if (x) {
var y = u.getInstance(x.id);
y && y.closeOnClickModal && y.close();
}
},
openModal: function(x, y, d, E, m) {
if (!t.default.prototype.$isServer && !(!x || y === void 0)) {
this.modalFade = m;
for (var B = this.modalStack, h = 0, o = B.length; h < o; h++) {
var c = B[h];
if (c.id === x)
return;
}
var g = a();
if ((0, e.addClass)(g, "v-modal"), this.modalFade && !i && (0, e.addClass)(g, "v-modal-enter"), E) {
var w = E.trim().split(/\s+/);
w.forEach(function(D) {
return (0, e.addClass)(g, D);
});
}
setTimeout(function() {
(0, e.removeClass)(g, "v-modal-enter");
}, 200), d && d.parentNode && d.parentNode.nodeType !== 11 ? d.parentNode.appendChild(g) : document.body.appendChild(g), y && (g.style.zIndex = y), g.tabIndex = 0, g.style.display = "", this.modalStack.push({ id: x, zIndex: y, modalClass: E });
}
},
closeModal: function(x) {
var y = this.modalStack, d = a();
if (y.length > 0) {
var E = y[y.length - 1];
if (E.id === x) {
if (E.modalClass) {
var m = E.modalClass.trim().split(/\s+/);
m.forEach(function(h) {
return (0, e.removeClass)(d, h);
});
}
y.pop(), y.length > 0 && (d.style.zIndex = y[y.length - 1].zIndex);
} else
for (var B = y.length - 1; B >= 0; B--)
if (y[B].id === x) {
y.splice(B, 1);
break;
}
}
y.length === 0 && (this.modalFade && (0, e.addClass)(d, "v-modal-leave"), setTimeout(function() {
y.length === 0 && (d.parentNode && d.parentNode.removeChild(d), d.style.display = "none", u.modalDom = void 0), (0, e.removeClass)(d, "v-modal-leave");
}, 200));
}
};
Object.defineProperty(u, "zIndex", {
configurable: !0,
get: function() {
return n || (s = s || (t.default.prototype.$ELEMENT || {}).zIndex || 2e3, n = !0), s;
},
set: function(x) {
s = x;
}
});
var l = function() {
if (!t.default.prototype.$isServer && u.modalStack.length > 0) {
var x = u.modalStack[u.modalStack.length - 1];
if (!x)
return;
var y = u.getInstance(x.id);
return y;
}
};
return t.default.prototype.$isServer || window.addEventListener("keydown", function(C) {
if (C.keyCode === 27) {
var x = l();
x && x.closeOnPressEscape && (x.handleClose ? x.handleClose() : x.handleAction ? x.handleAction("cancel") : x.close());
}
}), lA.default = u, lA;
}
var hA = {}, S0;
function Es() {
if (S0)
return hA;
S0 = 1, hA.__esModule = !0, hA.default = function() {
if (t.default.prototype.$isServer)
return 0;
if (A !== void 0)
return A;
var i = document.createElement("div");
i.className = "el-scrollbar__wrap", i.style.visibility = "hidden", i.style.width = "100px", i.style.position = "absolute", i.style.top = "-9999px", document.body.appendChild(i);
var n = i.offsetWidth;
i.style.overflow = "scroll";
var s = document.createElement("div");
s.style.width = "100%", i.appendChild(s);
var a = s.offsetWidth;
return i.parentNode.removeChild(i), A = n - a, A;
};
var r = se, t = e(r);
function e(i) {
return i && i.__esModule ? i : { default: i };
}
var A = void 0;
return hA;
}
var j0;
function Bs() {
if (j0)
return De;
j0 = 1, De.__esModule = !0, De.PopupManager = void 0;
var r = se, t = u(r), e = ms(), A = u(e), i = bs(), n = u(i), s = Es(), a = u(s), f = a0();
function u(x) {
return x && x.__esModule ? x : { default: x };
}
var l = 1, C = void 0;
return De.default = {
props: {
visible: {
type: Boolean,
default: !1
},
openDelay: {},
closeDelay: {},
zIndex: {},
modal: {
type: Boolean,
default: !1
},
modalFade: {
type: Boolean,
default: !0
},
modalClass: {},
modalAppendToBody: {
type: Boolean,
default: !1
},
lockScroll: {
type: Boolean,
default: !0
},
closeOnPressEscape: {
type: Boolean,
default: !1
},
closeOnClickModal: {
type: Boolean,
default: !1
}
},
beforeMount: function() {
this._popupId = "popup-" + l++, n.default.register(this._popupId, this);
},
beforeDestroy: function() {
n.default.deregister(this._popupId), n.default.closeModal(this._popupId), this.restoreBodyStyle();
},
data: function() {
return {
opened: !1,
bodyPaddingRight: null,
computedBodyPaddingRight: 0,
withoutHiddenClass: !0,
rendered: !1
};
},
watch: {
visible: function(y) {
var d = this;
if (y) {
if (this._opening)
return;
this.rendered ? this.open() : (this.rendered = !0, t.default.nextTick(function() {
d.open();
}));
} else
this.close();
}
},
methods: {
open: function(y) {
var d = this;
this.rendered || (this.rendered = !0);
var E = (0, A.default)({}, this.$props || this, y);
this._closeTimer && (clearTimeout(this._closeTimer), this._closeTimer = null), clearTimeout(this._openTimer);
var m = Number(E.openDelay);
m > 0 ? this._openTimer = setTimeout(function() {
d._openTimer = null, d.doOpen(E);
}, m) : this.doOpen(E);
},
doOpen: function(y) {
if (!this.$isServer && !(this.willOpen && !this.willOpen()) && !this.opened) {
this._opening = !0;
var d = this.$el, E = y.modal, m = y.zIndex;
if (m && (n.default.zIndex = m), E && (this._closing && (n.default.closeModal(this._popupId), this._closing = !1), n.default.openModal(this._popupId, n.default.nextZIndex(), this.modalAppendToBody ? void 0 : d, y.modalClass, y.modalFade), y.lockScroll)) {
this.withoutHiddenClass = !(0, f.hasClass)(document.body, "el-popup-parent--hidden"), this.withoutHiddenClass && (this.bodyPaddingRight = document.body.style.paddingRight, this.computedBodyPaddingRight = parseInt((0, f.getStyle)(document.body, "paddingRight"), 10)), C = (0, a.default)();
var B = document.documentElement.clientHeight < document.body.scrollHeight, h = (0, f.getStyle)(document.body, "overflowY");
C > 0 && (B || h === "scroll") && this.withoutHiddenClass && (document.body.style.paddingRight = this.computedBodyPaddingRight + C + "px"), (0, f.addClass)(document.body, "el-popup-parent--hidden");
}
getComputedStyle(d).position === "static" && (d.style.position = "absolute"), d.style.zIndex = n.default.nextZIndex(), this.opened = !0, this.onOpen && this.onOpen(), this.doAfterOpen();
}
},
doAfterOpen: function() {
this._opening = !1;
},
close: function() {
var y = this;
if (!(this.willClose && !this.willClose())) {
this._openTimer !== null && (clearTimeout(this._openTimer), this._openTimer = null), clearTimeout(this._closeTimer);
var d = Number(this.closeDelay);
d > 0 ? this._closeTimer = setTimeout(function() {
y._closeTimer = null, y.doClose();
}, d) : this.doClose();
}
},
doClose: function() {
this._closing = !0, this.onClose && this.onClose(), this.lockScroll && setTimeout(this.restoreBodyStyle, 200), this.opened = !1, this.doAfterClose();
},
doAfterClose: function() {
n.default.closeModal(this._popupId), this._closing = !1;
},
restoreBodyStyle: function() {
this.modal && this.withoutHiddenClass && (document.body.style.paddingRight = this.bodyPaddingRight, (0, f.removeClass)(document.body, "el-popup-parent--hidden")), this.withoutHiddenClass = !0;
}
}
}, De.PopupManager = n.default, De;
}
var BA = { exports: {} };
BA.exports;
var T0;
function Ds() {
return T0 || (T0 = 1, function(r) {
var t = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
return typeof e;
} : function(e) {
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
};
(function(e, A) {
t(r) === "object" && r.exports ? r.exports = A() : e.Popper = A();
})(void 0, function() {
var e = window, A = {
// placement of the popper
placement: "bottom",
gpuAcceleration: !0,
// shift popper from its origin by the given amount of pixels (can be negative)
offset: 0,
// the element which will act as boundary of the popper
boundariesElement: "viewport",
// amount of pixel used to define a minimum distance between the boundaries and the popper
boundariesPadding: 5,
// popper will try to prevent overflow following this order,
// by default, then, it could overflow on the left and on top of the boundariesElement
preventOverflowOrder: ["left", "right", "top", "bottom"],
// the behavior used by flip to change the placement of the popper
flipBehavior: "flip",
arrowElement: "[x-arrow]",
arrowOffset: 0,
// list of functions used to modify the offsets before they are applied to the popper
modifiers: ["shift", "offset", "preventOverflow", "keepTogether", "arrow", "flip", "applyStyle"],
modifiersIgnored: [],
forceAbsolute: !1
};
function i(o, c, g) {
this._reference = o.jquery ? o[0] : o, this.state = {};
var w = typeof c == "undefined" || c === null, D = c && Object.prototype.toString.call(c) === "[object Object]";
return w || D ? this._popper = this.parse(D ? c : {}) : this._popper = c.jquery ? c[0] : c, this._options = Object.assign({}, A, g), this._options.modifiers = this._options.modifiers.map(function(O) {
if (this._options.modifiersIgnored.indexOf(O) === -1)
return O === "applyStyle" && this._popper.setAttribute("x-placement", this._options.placement), this.modifiers[O] || O;
}.bind(this)), this.state.position = this._getPosition(this._popper, this._reference), y(this._popper, { position: this.state.position, top: 0 }), this.update(), this._setupEventListeners(), this;
}
i.prototype.destroy = function() {
return this._popper.removeAttribute("x-placement"), this._popper.style.left = "", this._popper.style.position = "", this._popper.style.top = "", this._popper.style[h("transform")] = "", this._removeEventListeners(), this._options.removeOnDestroy && this._popper.remove(), this;
}, i.prototype.update = function() {
var o = { instance: this, styles: {} };
o.placement = this._options.placement, o._originalPlacement = this._options.placement, o.offsets = this._getOffsets(this._popper, this._reference, o.placement), o.boundaries = this._getBoundaries(o, this._options.boundariesPadding, this._options.boundariesElement), o = this.runModifiers(o, this._options.modifiers), typeof this.state.updateCallback == "function" && this.state.updateCallback(o);
}, i.prototype.onCreate = function(o) {
return o(this), this;
}, i.prototype.onUpdate = function(o) {
return this.state.updateCallback = o, this;
}, i.prototype.parse = function(o) {
var c = {
tagName: "div",
classNames: ["popper"],
attributes: [],
parent: e.document.body,
content: "",
contentType: "text",
arrowTagName: "div",
arrowClassNames: ["popper__arrow"],
arrowAttributes: ["x-arrow"]
};
o = Object.assign({}, c, o);
var g = e.document, w = g.createElement(o.tagName);
if (j(w, o.classNames), F(w, o.attributes), o.contentType === "node" ? w.appendChild(o.content.jquery ? o.content[0] : o.content) : o.contentType === "html" ? w.innerHTML = o.content : w.textContent = o.content, o.arrowTagName) {
var D = g.createElement(o.arrowTagName);
j(D, o.arrowClassNames), F(D, o.arrowAttributes), w.appendChild(D);
}
var O = o.parent.jquery ? o.parent[0] : o.parent;
if (typeof O == "string") {
if (O = g.querySelectorAll(o.parent), O.length > 1, O.length === 0)
throw "ERROR: the given `parent` doesn't exists!";
O = O[0];
}
return O.length > 1 && !(O instanceof Element) && (O = O[0]), O.appendChild(w), w;
function j(I, _) {
_.forEach(function(P) {
I.classList.add(P);
});
}
function F(I, _) {
_.forEach(function(P) {
I.setAttribute(P.split(":")[0], P.split(":")[1] || "");
});
}
}, i.prototype._getPosition = function(o, c) {
if (l(c), this._options.forceAbsolute)
return "absolute";
var g = x(c);
return g ? "fixed" : "absolute";
}, i.prototype._getOffsets = function(o, c, g) {
g = g.split("-")[0];
var w = {};
w.position = this.state.position;
var D = w.position === "fixed", O = B(c, l(o), D), j = n(o);
return ["right", "left"].indexOf(g) !== -1 ? (w.top = O.top + O.height / 2 - j.height / 2, g === "left" ? w.left = O.left - j.width : w.left = O.right) : (w.left = O.left + O.width / 2 - j.width / 2, g === "top" ? w.top = O.top - j.height : w.top = O.bottom), w.width = j.width, w.height = j.height, {
popper: w,
reference: O
};
}, i.prototype._setupEventListeners = function() {
if (this.state.updateBound = this.update.bind(this), e.addEventListener("resize", this.state.updateBound), this._options.boundariesElement !== "window") {
var o = C(this._reference);
(o === e.document.body || o === e.document.documentElement) && (o = e), o.addEventListener("scroll", this.state.updateBound), this.state.scrollTarget = o;
}
}, i.prototype._removeEventListeners = function() {
e.removeEventListener("resize", this.state.updateBound), this._options.boundariesElement !== "window" && this.state.scrollTarget && (this.state.scrollTarget.removeEventListener("scroll", this.state.updateBound), this.state.scrollTarget = null), this.state.updateBound = null;
}, i.prototype._getBoundaries = function(o, c, g) {
var w = {}, D, O;
if (g === "window") {
var j = e.document.body, F = e.document.documentElement;
O = Math.max(j.scrollHeight, j.offsetHeight, F.clientHeight, F.scrollHeight, F.offsetHeight), D = Math.max(j.scrollWidth, j.offsetWidth, F.clientWidth, F.scrollWidth, F.offsetWidth), w = {
top: 0,
right: D,
bottom: O,
left: 0
};
} else if (g === "viewport") {
var I = l(this._popper), _ = C(this._popper), P = E(I), U = function(At) {
return At == document.body ? Math.max(document.documentElement.scrollTop, document.body.scrollTop) : At.scrollTop;
}, V = function(At) {
return At == document.body ? Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) : At.scrollLeft;
}, $ = o.offsets.popper.position === "fixed" ? 0 : U(_), et = o.offsets.popper.position === "fixed" ? 0 : V(_);
w = {
top: 0 - (P.top - $),
right: e.document.documentElement.clientWidth - (P.left - et),
bottom: e.document.documentElement.clientHeight - (P.top - $),
left: 0 - (P.left - et)
};
} else
l(this._popper) === g ? w = {
top: 0,
left: 0,
right: g.clientWidth,
bottom: g.clientHeight
} : w = E(g);
return w.left += c, w.right -= c, w.top = w.top + c, w.bottom = w.bottom - c, w;
}, i.prototype.runModifiers = function(o, c, g) {
var w = c.slice();
return g !== void 0 && (w = this._options.modifiers.slice(0, f(this._options.modifiers, g))), w.forEach(function(D) {
d(D) && (o = D.call(this, o));
}.bind(this)), o;
}, i.prototype.isModifierRequired = function(o, c) {
var g = f(this._options.modifiers, o);
return !!this._options.modifiers.slice(0, g).filter(function(w) {
return w === c;
}).length;
}, i.prototype.modifiers = {}, i.prototype.modifiers.applyStyle = function(o) {
var c = {
position: o.offsets.popper.position
}, g = Math.round(o.offsets.popper.left), w = Math.round(o.offsets.popper.top), D;
return this._options.gpuAcceleration && (D = h("transform")) ? (c[D] = "translate3d(" + g + "px, " + w + "px, 0)", c.top = 0, c.left = 0) : (c.left = g, c.top = w), Object.assign(c, o.styles), y(this._popper, c), this._popper.setAttribute("x-placement", o.placement), this.isModifierRequired(this.modifiers.applyStyle, this.modifiers.arrow) && o.offsets.arrow && y(o.arrowElement, o.offsets.arrow), o;
}, i.prototype.modifiers.shift = function(o) {
var c = o.placement, g = c.split("-")[0], w = c.split("-")[1];
if (w) {
var D = o.offsets.reference, O = a(o.offsets.popper), j = {
y: {
start: { top: D.top },
end: { top: D.top + D.height - O.height }
},
x: {
start: { left: D.left },
end: { left: D.left + D.width - O.width }
}
}, F = ["bottom", "top"].indexOf(g) !== -1 ? "x" : "y";
o.offsets.popper = Object.assign(O, j[F][w]);
}
return o;
}, i.prototype.modifiers.preventOverflow = function(o) {
var c = this._options.preventOverflowOrder, g = a(o.offsets.popper), w = {
left: function() {
var O = g.left;
return g.left < o.boundaries.left && (O = Math.max(g.left, o.boundaries.left)), { left: O };
},
right: function() {
var O = g.left;
return g.right > o.boundaries.right && (O = Math.min(g.left, o.boundaries.right - g.width)), { left: O };
},
top: function() {
var O = g.top;
return g.top < o.boundaries.top && (O = Math.max(g.top, o.boundaries.top)), { top: O };
},
bottom: function() {
var O = g.top;
return g.bottom > o.boundaries.bottom && (O = Math.min(g.top, o.boundaries.bottom - g.height)), { top: O };
}
};
return c.forEach(function(D) {
o.offsets.popper = Object.assign(g, w[D]());
}), o;
}, i.prototype.modifiers.keepTogether = function(o) {
var c = a(o.offsets.popper), g = o.offsets.reference, w = Math.floor;
return c.right < w(g.left) && (o.offsets.popper.left = w(g.left) - c.width), c.left > w(g.right) && (o.offsets.popper.left = w(g.right)), c.bottom < w(g.top) && (o.offsets.popper.top = w(g.top) - c.height), c.top > w(g.bottom) && (o.offsets.popper.top = w(g.bottom)), o;
}, i.prototype.modifiers.flip = function(o) {
if (!this.isModifierRequired(this.modifiers.flip, this.modifiers.preventOverflow) || o.flipped && o.placement === o._originalPlacement)
return o;
var c = o.placement.split("-")[0], g = s(c), w = o.placement.split("-")[1] || "", D = [];
return this._options.flipBehavior === "flip" ? D = [c, g] : D = this._options.flipBehavior, D.forEach(function(O, j) {
if (!(c !== O || D.length === j + 1)) {
c = o.placement.split("-")[0], g = s(c);
var F = a(o.offsets.popper), I = ["right", "bottom"].indexOf(c) !== -1;
(I && Math.floor(o.offsets.reference[c]) > Math.floor(F[g]) || !I && Math.floor(o.offsets.reference[c]) < Math.floor(F[g])) && (o.flipped = !0, o.placement = D[j + 1], w && (o.placement += "-" + w), o.offsets.popper = this._getOffsets(this._popper, this._reference, o.placement).popper, o = this.runModifiers(o, this._options.modifiers, this._flip));
}
}.bind(this)), o;
}, i.prototype.modifiers.offset = function(o) {
var c = this._options.offset, g = o.offsets.popper;
return o.placement.indexOf("left") !== -1 ? g.top -= c : o.placement.indexOf("right") !== -1 ? g.top += c : o.placement.indexOf("top") !== -1 ? g.left -= c : o.placement.indexOf("bottom") !== -1 && (g.left += c), o;
}, i.prototype.modifiers.arrow = function(o) {
var c = this._options.arrowElement, g = this._options.arrowOffset;
if (typeof c == "string" && (c = this._popper.querySelector(c)), !c || !this._popper.contains(c) || !this.isModifierRequired(this.modifiers.arrow, this.modifiers.keepTogether))
return o;
var w = {}, D = o.placement.split("-")[0], O = a(o.offsets.popper), j = o.offsets.reference, F = ["left", "right"].indexOf(D) !== -1, I = F ? "height" : "width", _ = F ? "top" : "left", P = F ? "left" : "top", U = F ? "bottom" : "right", V = n(c)[I];
j[U] - V < O[_] && (o.offsets.popper[_] -= O[_] - (j[U] - V)), j[_] + V > O[U] && (o.offsets.popper[_] += j[_] + V - O[U]);
var $ = j[_] + (g || j[I] / 2 - V / 2), et = $ - O[_];
return et = Math.max(Math.min(O[I] - V - 8, et), 8), w[_] = et, w[P] = "", o.offsets.arrow = w, o.arrowElement = c, o;
};
function n(o) {
var c = o.style.display, g = o.style.visibility;
o.style.display = "block", o.style.visibility = "hidden", o.offsetWidth;
var w = e.getComputedStyle(o), D = parseFloat(w.marginTop) + parseFloat(w.marginBottom), O = parseFloat(w.marginLeft) + parseFloat(w.marginRight), j = { width: o.offsetWidth + O, height: o.offsetHeight + D };
return o.style.display = c, o.style.visibility = g, j;
}
function s(o) {
var c = { left: "right", right: "left", bottom: "top", top: "bottom" };
return o.replace(/left|right|bottom|top/g, function(g) {
return c[g];
});
}
function a(o) {
var c = Object.assign({}, o);
return c.right = c.left + c.width, c.bottom = c.top + c.height, c;
}
function f(o, c) {
var g = 0, w;
for (w in o) {
if (o[w] === c)
return g;
g++;
}
return null;
}
function u(o, c) {
var g = e.getComputedStyle(o, null);
return g[c];
}
function l(o) {
var c = o.offsetParent;
return c === e.document.body || !c ? e.document.documentElement : c;
}
function C(o) {
var c = o.parentNode;
return c ? c === e.document ? e.document.body.scrollTop || e.document.body.scrollLeft ? e.document.body : e.document.documentElement : ["scroll", "auto"].indexOf(u(c, "overflow")) !== -1 || ["scroll", "auto"].indexOf(u(c, "overflow-x")) !== -1 || ["scroll", "auto"].indexOf(u(c, "overflow-y")) !== -1 ? c : C(o.parentNode) : o;
}
function x(o) {
return o === e.document.body ? !1 : u(o, "position") === "fixed" ? !0 : o.parentNode ? x(o.parentNode) : o;
}
function y(o, c) {
function g(w) {
return w !== "" && !isNaN(parseFloat(w)) && isFinite(w);
}
Object.keys(c).forEach(function(w) {
var D = "";
["width", "height", "top", "right", "bottom", "left"].indexOf(w) !== -1 && g(c[w]) && (D = "px"), o.style[w] = c[w] + D;
});
}
function d(o) {
var c = {};
return o && c.toString.call(o) === "[object Function]";
}
function E(o) {
var c = {
width: o.offsetWidth,
height: o.offsetHeight,
left: o.offsetLeft,
top: o.offsetTop
};
return c.right = c.left + c.width, c.bottom = c.top + c.height, c;
}
function m(o) {
var c = o.getBoundingClientRect(), g = navigator.userAgent.indexOf("MSIE") != -1, w = g && o.tagName === "HTML" ? -o.scrollTop : c.top;
return {
left: c.left,
top: w,
right: c.right,
bottom: c.bottom,
width: c.right - c.left,
height: c.bottom - w
};
}
function B(o, c, g) {
var w = m(o), D = m(c);
if (g) {
var O = C(c);
D.top += O.scrollTop, D.bottom += O.scrollTop, D.left += O.scrollLeft, D.right += O.scrollLeft;
}
var j = {
top: w.top - D.top,
left: w.left - D.left,
bottom: w.top - D.top + w.height,
right: w.left - D.left + w.width,
width: w.width,
height: w.height
};
return j;
}
function h(o) {
for (var c = ["", "ms", "webkit", "moz", "o"], g = 0; g < c.length; g++) {
var w = c[g] ? c[g] + o.charAt(0).toUpperCase() + o.slice(1) : o;
if (typeof e.document.body.style[w] != "undefined")
return w;
}
return null;
}
return Object.assign || Object.defineProperty(Object, "assign", {
enumerable: !1,
configurable: !0,
writable: !0,
value: function(c) {
if (c == null)
throw new TypeError("Cannot convert first argument to object");
for (var g = Object(c), w = 1; w < arguments.length; w++) {
var D = arguments[w];
if (D != null) {
D = Object(D);
for (var O = Object.keys(D), j = 0, F = O.length; j < F; j++) {
var I = O[j], _ = Object.getOwnPropertyDescriptor(D, I);
_ !== void 0 && _.enumerable && (g[I] = D[I]);
}
}
}
return g;
}
}), i;
});
}(BA)), BA.exports;
}
var _0;
function Os() {
if (_0)
return uA;
_0 = 1, uA.__esModule = !0;
var r = se, t = A(r), e = Bs();
function A(s) {
return s && s.__esModule ? s : { default: s };
}
var i = t.default.prototype.$isServer ? function() {
} : Ds(), n = function(a) {
return a.stopPropagation();
};
return uA.default = {
props: {
transformOrigin: {
type: [Boolean, String],
default: !0
},
placement: {
type: String,
default: "bottom"
},
boundariesPadding: {
type: Number,
default: 5
},
reference: {},
popper: {},
offset: {
default: 0
},
value: Boolean,
visibleArrow: Boolean,
arrowOffset: {
type: Number,
default: 35
},
appendToBody: {
type: Boolean,
default: !0
},
popperOptions: {
type: Object,
default: function() {
return {
gpuAcceleration: !1
};
}
}
},
data: function() {
return {
showPopper: !1,
currentPlacement: ""
};
},
watch: {
value: {
immediate: !0,
handler: function(a) {
this.showPopper = a, this.$emit("input", a);
}
},
showPopper: function(a) {
this.disabled || (a ? this.updatePopper() : this.destroyPopper(), this.$emit("input", a));
}
},
methods: {
createPopper: function() {
var a = this;
if (!this.$isServer && (this.currentPlacement = this.currentPlacement || this.placement, !!/^(top|bottom|left|right)(-start|-end)?$/g.test(this.currentPlacement))) {
var f = this.popperOptions, u = this.popperElm = this.popperElm || this.popper || this.$refs.popper, l = this.referenceElm = this.referenceElm || this.reference || this.$refs.reference;
!l && this.$slots.reference && this.$slots.reference[0] && (l = this.referenceElm = this.$slots.reference[0].elm), !(!u || !l) && (this.visibleArrow && this.appendArrow(u), this.appendToBody && document.body.appendChild(this.popperElm), this.popperJS && this.popperJS.destroy && this.popperJS.destroy(), f.placement = this.currentPlacement, f.offset = this.offset, f.arrowOffset = this.arrowOffset, this.popperJS = new i(l, u, f), this.popperJS.onCreate(function(C) {
a.$emit("created", a), a.resetTransformOrigin(), a.$nextTick(a.updatePopper);
}), typeof f.onUpdate == "function" && this.popperJS.onUpdate(f.onUpdate), this.popperJS._popper.style.zIndex = e.PopupManager.nextZIndex(), this.popperElm.addEventListener("click", n));
}
},
updatePopper: function() {
var a = this.popperJS;
a ? (a.update(), a._popper && (a._popper.style.zIndex = e.PopupManager.nextZIndex())) : this.createPopper();
},
doDestroy: function(a) {
!this.popperJS || this.showPopper && !a || (this.popperJS.destroy(), this.popperJS = null);
},
destroyPopper: function() {
this.popperJS && this.resetTransformOrigin();
},
resetTransformOrigin: function() {
if (this.transformOrigin) {
var a = {
top: "bottom",
bottom: "top",
left: "right",
right: "left"
}, f = this.popperJS._popper.getAttribute("x-placement").split("-")[0], u = a[f];
this.popperJS._popper.style.transformOrigin = typeof this.transformOrigin == "string" ? this.transformOrigin : ["top", "bottom"].indexOf(f) > -1 ? "center " + u : u + " center";
}
},
appendArrow: function(a) {
var f = void 0;
if (!this.appended) {
this.appended = !0;
for (var u in a.attributes)
if (/^_v-/.test(a.attributes[u].name)) {
f = a.attributes[u].name;
break;
}
var l = document.createElement("div");
f && l.setAttribute(f, ""), l.setAttribute("x-arrow", ""), l.className = "popper__arrow", a.appendChild(l);
}
}
},
beforeDestroy: function() {
this.doDestroy(!0), this.popperElm && this.popperElm.parentNode === document.body && (this.popperElm.removeEventListener("click", n), document.body.removeChild(this.popperElm));
},
// call destroy in keep-alive mode
deactivated: function() {
this.$options.beforeDestroy[0].call(this);
}
}, uA;
}
(function(r) {
r.exports = /******/
function(t) {
var e = {};
function A(i) {
if (e[i])
return e[i].exports;
var n = e[i] = {
/******/
i,
/******/
l: !1,
/******/
exports: {}
/******/
};
return t[i].call(n.exports, n, n.exports, A), n.l = !0, n.exports;
}
return A.m = t, A.c = e, A.d = function(i, n, s) {
A.o(i, n) || Object.defineProperty(i, n, { enumerable: !0, get: s });
}, A.r = function(i) {
typeof Symbol != "undefined" && Symbol.toStringTag && Object.defineProperty(i, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(i, "__esModule", { value: !0 });
}, A.t = function(i, n) {
if (n & 1 && (i = A(i)), n & 8 || n & 4 && typeof i == "object" && i && i.__esModule)
return i;
var s = /* @__PURE__ */ Object.create(null);
if (A.r(s), Object.defineProperty(s, "default", { enumerable: !0, value: i }), n & 2 && typeof i != "string")
for (var a in i)
A.d(s, a, function(f) {
return i[f];
}.bind(null, a));
return s;
}, A.n = function(i) {
var n = i && i.__esModule ? (
/******/
function() {
return i.default;
}
) : (
/******/
function() {
return i;
}
);
return A.d(n, "a", n), n;
}, A.o = function(i, n) {
return Object.prototype.hasOwnProperty.call(i, n);
}, A.p = "/dist/", A(A.s = 78);
}({
/***/
0: (
/***/
function(t, e, A) {
A.d(e, "a", function() {
return i;
});
function i(n, s, a, f, u, l, C, x) {
var y = typeof n == "function" ? n.options : n;
s && (y.render = s, y.staticRenderFns = a, y._compiled = !0), f && (y.functional = !0), l && (y._scopeId = "data-v-" + l);
var d;
if (C ? (d = function(B) {
B = B || // cached call
this.$vnode && this.$vnode.ssrContext || // stateful
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !B && typeof __VUE_SSR_CONTEXT__ != "undefined" && (B = __VUE_SSR_CONTEXT__), u && u.call(this, B), B && B._registeredComponents && B._registeredComponents.add(C);
}, y._ssrRegister = d) : u && (d = x ? function() {
u.call(this, this.$root.$options.shadowRoot);
} : u), d)
if (y.functional) {
y._injectStyles = d;
var E = y.render;
y.render = function(h, o) {
return d.call(o), E(h, o);
};
} else {
var m = y.beforeCreate;
y.beforeCreate = m ? [].concat(m, d) : [d];
}
return {
exports: n,
options: y
};
}
}
),
/***/
2: (
/***/
function(t, e) {
t.exports = a0();
}
),
/***/
3: (
/***/
function(t, e) {
t.exports = Cs();
}
),
/***/
5: (
/***/
function(t, e) {
t.exports = Os();
}
),
/***/
7: (
/***/
function(t, e) {
t.exports = se;
}
),
/***/
78: (
/***/
function(t, e, A) {
A.r(e);
var i = function() {
var o = this, c = o.$createElement, g = o._self._c || c;
return g(
"span",
[
g(
"transition",
{
attrs: { name: o.transition },
on: {
"after-enter": o.handleAfterEnter,
"after-leave": o.handleAfterLeave
}
},
[
g(
"div",
{
directives: [
{
name: "show",
rawName: "v-show",
value: !o.disabled && o.showPopper,
expression: "!disabled && showPopper"
}
],
ref: "popper",
staticClass: "el-popover el-popper",
class: [o.popperClass, o.content && "el-popover--plain"],
style: { width: o.width + "px" },
attrs: {
role: "tooltip",
id: o.tooltipId,
"aria-hidden": o.disabled || !o.showPopper ? "true" : "false"
}
},
[
o.title ? g("div", {
staticClass: "el-popover__title",
domProps: { textContent: o._s(o.title) }
}) : o._e(),
o._t("default", [o._v(o._s(o.content))])
],
2
)
]
),
g(
"span",
{ ref: "wrapper", staticClass: "el-popover__reference-wrapper" },
[o._t("reference")],
2
)
],
1
);
}, n = [];
i._withStripped = !0;
var s = A(5), a = /* @__PURE__ */ A.n(s), f = A(2), u = A(3), l = {
name: "ElPopover",
mixins: [a.a],
props: {
trigger: {
type: String,
default: "click",
validator: function(c) {
return ["click", "focus", "hover", "manual"].indexOf(c) > -1;
}
},
openDelay: {
type: Number,
default: 0
},
closeDelay: {
type: Number,
default: 200
},
title: String,
disabled: Boolean,
content: String,
reference: {},
popperClass: String,
width: {},
visibleArrow: {
default: