import {
defineStore,
mapState
} from "./chunk-EZG7MI55.js";
import {
AnnotationService
} from "./chunk-NO2C2JJZ.js";
import {
$7,
J7,
V7,
_7,
z7
} from "./chunk-LSNS3ABG.js";
import {
arrow_down_default,
arrow_left_default,
circle_check_default,
circle_close_default,
close_default,
document_delete_default,
loading_default,
warning_default,
warning_filled_default
} from "./chunk-GQENOT3W.js";
import {
Comment,
Fragment,
Teleport,
Text,
Transition,
cloneVNode,
computed,
createApp,
createBaseVNode,
createBlock,
createCommentVNode,
createElementBlock,
createSlots,
createStaticVNode,
createTextVNode,
createVNode,
defineComponent,
getCurrentInstance,
getCurrentScope,
h,
inject,
isRef,
markRaw,
mergeProps,
nextTick,
normalizeClass,
normalizeStyle,
onActivated,
onBeforeMount,
onBeforeUnmount,
onDeactivated,
onMounted,
onScopeDispose,
onUnmounted,
onUpdated,
openBlock,
provide,
reactive,
readonly,
ref,
renderList,
renderSlot,
resolveComponent,
resolveDirective,
resolveDynamicComponent,
shallowRef,
toDisplayString,
toHandlerKey,
toRaw,
toRef,
toRefs,
unref,
useSlots,
vModelCheckbox,
vModelRadio,
vModelText,
vShow,
warn,
watch,
watchEffect,
withCtx,
withDirectives,
withKeys,
withModifiers
} from "./chunk-HM42ZP2D.js";
import "./chunk-EWTE5DHJ.js";
// node_modules/@abi-software/flatmapvuer/node_modules/@abi-software/svg-sprite/dist/svg-sprite.js
var x = (n, t) => {
const e = n.__vccOpts || n;
for (const [i, s] of t)
e[i] = s;
return e;
};
var nn = ["xlink:href"];
var en = {
__name: "SvgIcon",
props: {
/**
* The svg icon to show.
*/
icon: {
type: String,
required: true
},
/**
* The option to spin the icon.
*/
spin: {
type: Boolean,
default: false
}
},
setup(n) {
return (t, e) => (openBlock(), createElementBlock("svg", {
class: normalizeClass(["map-icon", { "map-icon-spin": n.spin }])
}, [
createBaseVNode("use", {
"xlink:href": `#${n.icon}`
}, null, 8, nn)
], 2));
}
};
var wn = x(en, [["__scopeId", "data-v-e172d5ff"]]);
var v = `
2horpanel
?
`;
var w = `
2vertpanel
?
`;
var F = `
3panel
?
`;
var h2 = `
4panel
?
`;
var y = `
2horpanel
?
`;
var k = `
2horpanel
?
`;
var f = `
4panel
?
`;
var m = `
changeBckgd
`;
var u = `
close no bk
`;
var _ = `
close
`;
var C = `
closeFullScreen
`;
var L = `
Comment
`;
var b = `
Connection
`;
var G = `
dock
`;
var B = `
drawLine
`;
var T = `
drawPoint
`;
var q = `
drawPolygon
`;
var O = `
drawTrash
`;
var S = `
fitWindow
`;
var A = `
fullScreen
`;
var z = 'DataPortal-Icons ';
var U = `
magnifyingGlass
`;
var M = `Created by Wahyu Prihantoro from the Noun Project `;
var $ = `
openMap
`;
var H = `
Artboard Copy 6
`;
var V = `
permalink
`;
var R = `
play
`;
var P = `
resetZoom
`;
var Z = `
singlepanel
?
`;
var I = `
tooltips
?
`;
var j = `
undock
`;
var E = `
zoomIn
`;
var N = `
zoomOut
`;
var W = (n, t, e, i) => {
const s = ["title", "desc", "defs", "style"], r = ["width", "height"], J = i || [];
let o = document.createElement("div");
o.innerHTML = n, s.map((l) => {
const c = o.querySelector(l);
c && c.remove();
}), r.map((l) => {
o.querySelector("svg").removeAttribute(l);
}), i && J.map((l) => {
Object.values(o.querySelectorAll(`[${l}]`)).map((Q2) => {
Q2.removeAttribute(l);
});
});
const K = o.innerHTML;
return o = null, K;
};
var D = (n) => [
// Remove XML stuffs and comments
[/<\?xml[\s\S]*?>/gi, ""],
[//gi, ""],
[//gi, ""],
// SVG XML -> HTML5
[/\<([A-Za-z]+)([^\>]*)\/\>/g, "<$1$2>$1>"],
// convert self-closing XML SVG nodes to explicitly closed HTML5 SVG nodes
[/\s+/g, " "],
// replace whitespace sequences with a single space
[/\> \<"]
// remove whitespace between tags
].reduce((i, s) => "".replace.apply(i, s), n).trim();
var tn = true;
var sn = true;
var on = ["fill"];
var a = Object.assign({
"/assets/icons/2horpanel.svg": v,
"/assets/icons/2vertpanel.svg": w,
"/assets/icons/3panel.svg": F,
"/assets/icons/4panel.svg": h2,
"/assets/icons/5panel.svg": y,
"/assets/icons/6panel.svg": k,
"/assets/icons/6panelVertical.svg": f,
"/assets/icons/changeBckgd.svg": m,
"/assets/icons/close-no-bk.svg": u,
"/assets/icons/close.svg": _,
"/assets/icons/closeFullScreen.svg": C,
"/assets/icons/comment.svg": L,
"/assets/icons/connection.svg": b,
"/assets/icons/dock.svg": G,
"/assets/icons/drawLine.svg": B,
"/assets/icons/drawPoint.svg": T,
"/assets/icons/drawPolygon.svg": q,
"/assets/icons/drawTrash.svg": O,
"/assets/icons/fitWindow.svg": S,
"/assets/icons/fullScreen.svg": A,
"/assets/icons/help.svg": z,
"/assets/icons/magnifyingGlass.svg": U,
"/assets/icons/noun-filter.svg": M,
"/assets/icons/openMap.svg": $,
"/assets/icons/pause.svg": H,
"/assets/icons/permalink.svg": V,
"/assets/icons/play.svg": R,
"/assets/icons/resetZoom.svg": P,
"/assets/icons/singlepanel.svg": Z,
"/assets/icons/tooltips.svg": I,
"/assets/icons/undock.svg": j,
"/assets/icons/zoomIn.svg": E,
"/assets/icons/zoomOut.svg": N
});
var ln = Object.keys(a).map((n) => {
const t = W(a[n], tn, sn, on), e = n.replace(/^.+\/(\w+).svg$/, "$1");
return D(t).replace("", "symbol>");
});
var rn = {
name: "MapSvgSprite",
svgContext: a,
svgSprite: ln.join(`
`)
// concatenate all symbols into $options.svgSprite
};
var cn = ["innerHTML"];
function an(n, t, e, i, s, r) {
return openBlock(), createElementBlock("svg", {
width: "0",
height: "0",
style: { display: "none" },
innerHTML: n.$options.svgSprite
}, null, 8, cn);
}
var Fn = x(rn, [["render", an]]);
var g = Object.assign({
"/assets/icons/2horpanel.svg": v,
"/assets/icons/2vertpanel.svg": w,
"/assets/icons/3panel.svg": F,
"/assets/icons/4panel.svg": h2,
"/assets/icons/5panel.svg": y,
"/assets/icons/6panel.svg": k,
"/assets/icons/6panelVertical.svg": f,
"/assets/icons/changeBckgd.svg": m,
"/assets/icons/close-no-bk.svg": u,
"/assets/icons/close.svg": _,
"/assets/icons/closeFullScreen.svg": C,
"/assets/icons/comment.svg": L,
"/assets/icons/connection.svg": b,
"/assets/icons/dock.svg": G,
"/assets/icons/drawLine.svg": B,
"/assets/icons/drawPoint.svg": T,
"/assets/icons/drawPolygon.svg": q,
"/assets/icons/drawTrash.svg": O,
"/assets/icons/fitWindow.svg": S,
"/assets/icons/fullScreen.svg": A,
"/assets/icons/help.svg": z,
"/assets/icons/magnifyingGlass.svg": U,
"/assets/icons/noun-filter.svg": M,
"/assets/icons/openMap.svg": $,
"/assets/icons/pause.svg": H,
"/assets/icons/permalink.svg": V,
"/assets/icons/play.svg": R,
"/assets/icons/resetZoom.svg": P,
"/assets/icons/singlepanel.svg": Z,
"/assets/icons/tooltips.svg": I,
"/assets/icons/undock.svg": j,
"/assets/icons/zoomIn.svg": E,
"/assets/icons/zoomOut.svg": N
});
var gn = Object.keys(g).map((n) => {
const t = W(g[n]), e = n.replace(/^.+\/(\w+).svg$/, "$1");
return D(t).replace("", "symbol>");
});
var dn = {
name: "MapSvgSpriteColor",
svgContext: g,
svgSprite: gn.join(`
`)
// concatenate all symbols into $options.svgSprite
};
var pn = ["innerHTML"];
function xn(n, t, e, i, s, r) {
return openBlock(), createElementBlock("svg", {
width: "0",
height: "0",
style: { display: "none" },
innerHTML: n.$options.svgSprite
}, null, 8, pn);
}
var hn = x(dn, [["render", xn]]);
// node_modules/@abi-software/flatmapvuer/dist/flatmapvuer.js
import * as Br from "https://cdn.jsdelivr.net/npm/@abi-software/flatmap-viewer@4.3.5/+esm";
var it = (e, t, { checkForDefaultPrevented: n = true } = {}) => (i) => {
const a2 = e == null ? void 0 : e(i);
if (n === false || !a2)
return t == null ? void 0 : t(i);
};
var ca;
var se = typeof window < "u";
var du = (e) => typeof e == "string";
var Vr = () => {
};
var si = se && ((ca = window == null ? void 0 : window.navigator) == null ? void 0 : ca.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
function Ti(e) {
return typeof e == "function" ? e() : unref(e);
}
function fu(e) {
return e;
}
function zn(e) {
return getCurrentScope() ? (onScopeDispose(e), true) : false;
}
function pu(e, t = true) {
getCurrentInstance() ? onMounted(e) : t ? e() : nextTick(e);
}
function da(e, t, n = {}) {
const {
immediate: o = true
} = n, i = ref(false);
let a2 = null;
function r() {
a2 && (clearTimeout(a2), a2 = null);
}
function s() {
i.value = false, r();
}
function l(...u2) {
r(), i.value = true, a2 = setTimeout(() => {
i.value = false, a2 = null, e(...u2);
}, Ti(t));
}
return o && (i.value = true, se && l()), zn(s), {
isPending: readonly(i),
start: l,
stop: s
};
}
function rt(e) {
var t;
const n = Ti(e);
return (t = n == null ? void 0 : n.$el) != null ? t : n;
}
var ko = se ? window : void 0;
function ze(...e) {
let t, n, o, i;
if (du(e[0]) || Array.isArray(e[0]) ? ([n, o, i] = e, t = ko) : [t, n, o, i] = e, !t)
return Vr;
Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);
const a2 = [], r = () => {
a2.forEach((c) => c()), a2.length = 0;
}, s = (c, d, f2, m2) => (c.addEventListener(d, f2, m2), () => c.removeEventListener(d, f2, m2)), l = watch(() => [rt(t), Ti(i)], ([c, d]) => {
r(), c && a2.push(...n.flatMap((f2) => o.map((m2) => s(c, f2, m2, d))));
}, { immediate: true, flush: "post" }), u2 = () => {
l(), r();
};
return zn(u2), u2;
}
var fa = false;
function hu(e, t, n = {}) {
const { window: o = ko, ignore: i = [], capture: a2 = true, detectIframe: r = false } = n;
if (!o)
return;
si && !fa && (fa = true, Array.from(o.document.body.children).forEach((f2) => f2.addEventListener("click", Vr)));
let s = true;
const l = (f2) => i.some((m2) => {
if (typeof m2 == "string")
return Array.from(o.document.querySelectorAll(m2)).some((p) => p === f2.target || f2.composedPath().includes(p));
{
const p = rt(m2);
return p && (f2.target === p || f2.composedPath().includes(p));
}
}), c = [
ze(o, "click", (f2) => {
const m2 = rt(e);
if (!(!m2 || m2 === f2.target || f2.composedPath().includes(m2))) {
if (f2.detail === 0 && (s = !l(f2)), !s) {
s = true;
return;
}
t(f2);
}
}, { passive: true, capture: a2 }),
ze(o, "pointerdown", (f2) => {
const m2 = rt(e);
m2 && (s = !f2.composedPath().includes(m2) && !l(f2));
}, { passive: true }),
r && ze(o, "blur", (f2) => {
var m2;
const p = rt(e);
((m2 = o.document.activeElement) == null ? void 0 : m2.tagName) === "IFRAME" && !(p != null && p.contains(o.document.activeElement)) && t(f2);
})
].filter(Boolean);
return () => c.forEach((f2) => f2());
}
function zr(e, t = false) {
const n = ref(), o = () => n.value = !!e();
return o(), pu(o, t), n;
}
var pa = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
var ha = "__vueuse_ssr_handlers__";
pa[ha] = pa[ha] || {};
var ma = Object.getOwnPropertySymbols;
var mu = Object.prototype.hasOwnProperty;
var vu = Object.prototype.propertyIsEnumerable;
var gu = (e, t) => {
var n = {};
for (var o in e)
mu.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
if (e != null && ma)
for (var o of ma(e))
t.indexOf(o) < 0 && vu.call(e, o) && (n[o] = e[o]);
return n;
};
function bt(e, t, n = {}) {
const o = n, { window: i = ko } = o, a2 = gu(o, ["window"]);
let r;
const s = zr(() => i && "ResizeObserver" in i), l = () => {
r && (r.disconnect(), r = void 0);
}, u2 = watch(() => rt(e), (d) => {
l(), s.value && i && d && (r = new ResizeObserver(t), r.observe(d, a2));
}, { immediate: true, flush: "post" }), c = () => {
l(), u2();
};
return zn(c), {
isSupported: s,
stop: c
};
}
var va = Object.getOwnPropertySymbols;
var yu = Object.prototype.hasOwnProperty;
var bu = Object.prototype.propertyIsEnumerable;
var wu = (e, t) => {
var n = {};
for (var o in e)
yu.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
if (e != null && va)
for (var o of va(e))
t.indexOf(o) < 0 && bu.call(e, o) && (n[o] = e[o]);
return n;
};
function Su(e, t, n = {}) {
const o = n, { window: i = ko } = o, a2 = wu(o, ["window"]);
let r;
const s = zr(() => i && "MutationObserver" in i), l = () => {
r && (r.disconnect(), r = void 0);
}, u2 = watch(() => rt(e), (d) => {
l(), s.value && i && d && (r = new MutationObserver(t), r.observe(d, a2));
}, { immediate: true }), c = () => {
l(), u2();
};
return zn(c), {
isSupported: s,
stop: c
};
}
var ga;
(function(e) {
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
})(ga || (ga = {}));
var Cu = Object.defineProperty;
var ya = Object.getOwnPropertySymbols;
var Eu = Object.prototype.hasOwnProperty;
var Iu = Object.prototype.propertyIsEnumerable;
var ba = (e, t, n) => t in e ? Cu(e, t, { enumerable: true, configurable: true, writable: true, value: n }) : e[t] = n;
var ku = (e, t) => {
for (var n in t || (t = {}))
Eu.call(t, n) && ba(e, n, t[n]);
if (ya)
for (var n of ya(t))
Iu.call(t, n) && ba(e, n, t[n]);
return e;
};
var Tu = {
easeInSine: [0.12, 0, 0.39, 0],
easeOutSine: [0.61, 1, 0.88, 1],
easeInOutSine: [0.37, 0, 0.63, 1],
easeInQuad: [0.11, 0, 0.5, 0],
easeOutQuad: [0.5, 1, 0.89, 1],
easeInOutQuad: [0.45, 0, 0.55, 1],
easeInCubic: [0.32, 0, 0.67, 0],
easeOutCubic: [0.33, 1, 0.68, 1],
easeInOutCubic: [0.65, 0, 0.35, 1],
easeInQuart: [0.5, 0, 0.75, 0],
easeOutQuart: [0.25, 1, 0.5, 1],
easeInOutQuart: [0.76, 0, 0.24, 1],
easeInQuint: [0.64, 0, 0.78, 0],
easeOutQuint: [0.22, 1, 0.36, 1],
easeInOutQuint: [0.83, 0, 0.17, 1],
easeInExpo: [0.7, 0, 0.84, 0],
easeOutExpo: [0.16, 1, 0.3, 1],
easeInOutExpo: [0.87, 0, 0.13, 1],
easeInCirc: [0.55, 0, 1, 0.45],
easeOutCirc: [0, 0.55, 0.45, 1],
easeInOutCirc: [0.85, 0, 0.15, 1],
easeInBack: [0.36, 0, 0.66, -0.56],
easeOutBack: [0.34, 1.56, 0.64, 1],
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
};
ku({
linear: fu
}, Tu);
Object.freeze({});
Object.freeze([]);
var Lt = () => {
};
var Au = Object.prototype.hasOwnProperty;
var wa = (e, t) => Au.call(e, t);
var Ie = Array.isArray;
var Se = (e) => typeof e == "function";
var je = (e) => typeof e == "string";
var ke = (e) => e !== null && typeof e == "object";
var Ou = Object.prototype.toString;
var Mu = (e) => Ou.call(e);
var Wo = (e) => Mu(e).slice(8, -1);
var Hr = (e) => {
const t = /* @__PURE__ */ Object.create(null);
return (n) => t[n] || (t[n] = e(n));
};
var _u = /-(\w)/g;
var Pu = Hr(
(e) => e.replace(_u, (t, n) => n ? n.toUpperCase() : "")
);
var Lu = /\B([A-Z])/g;
var xu = Hr(
(e) => e.replace(Lu, "-$1").toLowerCase()
);
var jr = typeof global == "object" && global && global.Object === Object && global;
var Fu = typeof self == "object" && self && self.Object === Object && self;
var tt = jr || Fu || Function("return this")();
var Xe = tt.Symbol;
var Kr = Object.prototype;
var Ru = Kr.hasOwnProperty;
var $u = Kr.toString;
var In = Xe ? Xe.toStringTag : void 0;
function Du(e) {
var t = Ru.call(e, In), n = e[In];
try {
e[In] = void 0;
var o = true;
} catch {
}
var i = $u.call(e);
return o && (t ? e[In] = n : delete e[In]), i;
}
var Nu = Object.prototype;
var Bu = Nu.toString;
function Vu(e) {
return Bu.call(e);
}
var zu = "[object Null]";
var Hu = "[object Undefined]";
var Sa = Xe ? Xe.toStringTag : void 0;
function cn2(e) {
return e == null ? e === void 0 ? Hu : zu : Sa && Sa in Object(e) ? Du(e) : Vu(e);
}
function en2(e) {
return e != null && typeof e == "object";
}
var ju = "[object Symbol]";
function To(e) {
return typeof e == "symbol" || en2(e) && cn2(e) == ju;
}
function Ku(e, t) {
for (var n = -1, o = e == null ? 0 : e.length, i = Array(o); ++n < o; )
i[n] = t(e[n], n, e);
return i;
}
var Ke = Array.isArray;
var Uu = 1 / 0;
var Ca = Xe ? Xe.prototype : void 0;
var Ea = Ca ? Ca.toString : void 0;
function Ur(e) {
if (typeof e == "string")
return e;
if (Ke(e))
return Ku(e, Ur) + "";
if (To(e))
return Ea ? Ea.call(e) : "";
var t = e + "";
return t == "0" && 1 / e == -Uu ? "-0" : t;
}
var Wu = /\s/;
function qu(e) {
for (var t = e.length; t-- && Wu.test(e.charAt(t)); )
;
return t;
}
var Gu = /^\s+/;
function Ju(e) {
return e && e.slice(0, qu(e) + 1).replace(Gu, "");
}
function It(e) {
var t = typeof e;
return e != null && (t == "object" || t == "function");
}
var Ia = NaN;
var Yu = /^[-+]0x[0-9a-f]+$/i;
var Zu = /^0b[01]+$/i;
var Qu = /^0o[0-7]+$/i;
var Xu = parseInt;
function ka(e) {
if (typeof e == "number")
return e;
if (To(e))
return Ia;
if (It(e)) {
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
e = It(t) ? t + "" : t;
}
if (typeof e != "string")
return e === 0 ? e : +e;
e = Ju(e);
var n = Zu.test(e);
return n || Qu.test(e) ? Xu(e.slice(2), n ? 2 : 8) : Yu.test(e) ? Ia : +e;
}
function Wr(e) {
return e;
}
var ec = "[object AsyncFunction]";
var tc = "[object Function]";
var nc = "[object GeneratorFunction]";
var oc = "[object Proxy]";
function qr(e) {
if (!It(e))
return false;
var t = cn2(e);
return t == tc || t == nc || t == ec || t == oc;
}
var qo = tt["__core-js_shared__"];
var Ta = function() {
var e = /[^.]+$/.exec(qo && qo.keys && qo.keys.IE_PROTO || "");
return e ? "Symbol(src)_1." + e : "";
}();
function ic(e) {
return !!Ta && Ta in e;
}
var ac = Function.prototype;
var rc = ac.toString;
function Bt(e) {
if (e != null) {
try {
return rc.call(e);
} catch {
}
try {
return e + "";
} catch {
}
}
return "";
}
var sc = /[\\^$.*+?()[\]{}|]/g;
var lc = /^\[object .+?Constructor\]$/;
var uc = Function.prototype;
var cc = Object.prototype;
var dc = uc.toString;
var fc = cc.hasOwnProperty;
var pc = RegExp(
"^" + dc.call(fc).replace(sc, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function hc(e) {
if (!It(e) || ic(e))
return false;
var t = qr(e) ? pc : lc;
return t.test(Bt(e));
}
function mc(e, t) {
return e == null ? void 0 : e[t];
}
function Vt(e, t) {
var n = mc(e, t);
return hc(n) ? n : void 0;
}
var li = Vt(tt, "WeakMap");
function vc(e, t, n) {
switch (n.length) {
case 0:
return e.call(t);
case 1:
return e.call(t, n[0]);
case 2:
return e.call(t, n[0], n[1]);
case 3:
return e.call(t, n[0], n[1], n[2]);
}
return e.apply(t, n);
}
var gc = 800;
var yc = 16;
var bc = Date.now;
function wc(e) {
var t = 0, n = 0;
return function() {
var o = bc(), i = yc - (o - n);
if (n = o, i > 0) {
if (++t >= gc)
return arguments[0];
} else
t = 0;
return e.apply(void 0, arguments);
};
}
function Sc(e) {
return function() {
return e;
};
}
var yo = function() {
try {
var e = Vt(Object, "defineProperty");
return e({}, "", {}), e;
} catch {
}
}();
var Cc = yo ? function(e, t) {
return yo(e, "toString", {
configurable: true,
enumerable: false,
value: Sc(t),
writable: true
});
} : Wr;
var Ec = wc(Cc);
function Ic(e, t, n, o) {
e.length;
for (var i = n + 1; i--; )
if (t(e[i], i, e))
return i;
return -1;
}
var kc = 9007199254740991;
var Tc = /^(?:0|[1-9]\d*)$/;
function Ai(e, t) {
var n = typeof e;
return t = t ?? kc, !!t && (n == "number" || n != "symbol" && Tc.test(e)) && e > -1 && e % 1 == 0 && e < t;
}
function Ac(e, t, n) {
t == "__proto__" && yo ? yo(e, t, {
configurable: true,
enumerable: true,
value: n,
writable: true
}) : e[t] = n;
}
function Oi(e, t) {
return e === t || e !== e && t !== t;
}
var Oc = Object.prototype;
var Mc = Oc.hasOwnProperty;
function _c(e, t, n) {
var o = e[t];
(!(Mc.call(e, t) && Oi(o, n)) || n === void 0 && !(t in e)) && Ac(e, t, n);
}
var Aa = Math.max;
function Pc(e, t, n) {
return t = Aa(t === void 0 ? e.length - 1 : t, 0), function() {
for (var o = arguments, i = -1, a2 = Aa(o.length - t, 0), r = Array(a2); ++i < a2; )
r[i] = o[t + i];
i = -1;
for (var s = Array(t + 1); ++i < t; )
s[i] = o[i];
return s[t] = n(r), vc(e, this, s);
};
}
var Lc = 9007199254740991;
function Mi(e) {
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Lc;
}
function xc(e) {
return e != null && Mi(e.length) && !qr(e);
}
var Fc = Object.prototype;
function Rc(e) {
var t = e && e.constructor, n = typeof t == "function" && t.prototype || Fc;
return e === n;
}
function $c(e, t) {
for (var n = -1, o = Array(e); ++n < e; )
o[n] = t(n);
return o;
}
var Dc = "[object Arguments]";
function Oa(e) {
return en2(e) && cn2(e) == Dc;
}
var Gr = Object.prototype;
var Nc = Gr.hasOwnProperty;
var Bc = Gr.propertyIsEnumerable;
var _i = Oa(/* @__PURE__ */ function() {
return arguments;
}()) ? Oa : function(e) {
return en2(e) && Nc.call(e, "callee") && !Bc.call(e, "callee");
};
function Vc() {
return false;
}
var Jr = typeof exports == "object" && exports && !exports.nodeType && exports;
var Ma = Jr && typeof module == "object" && module && !module.nodeType && module;
var zc = Ma && Ma.exports === Jr;
var _a = zc ? tt.Buffer : void 0;
var Hc = _a ? _a.isBuffer : void 0;
var ui = Hc || Vc;
var jc = "[object Arguments]";
var Kc = "[object Array]";
var Uc = "[object Boolean]";
var Wc = "[object Date]";
var qc = "[object Error]";
var Gc = "[object Function]";
var Jc = "[object Map]";
var Yc = "[object Number]";
var Zc = "[object Object]";
var Qc = "[object RegExp]";
var Xc = "[object Set]";
var ed = "[object String]";
var td = "[object WeakMap]";
var nd = "[object ArrayBuffer]";
var od = "[object DataView]";
var id = "[object Float32Array]";
var ad = "[object Float64Array]";
var rd = "[object Int8Array]";
var sd = "[object Int16Array]";
var ld = "[object Int32Array]";
var ud = "[object Uint8Array]";
var cd = "[object Uint8ClampedArray]";
var dd = "[object Uint16Array]";
var fd = "[object Uint32Array]";
var ae = {};
ae[id] = ae[ad] = ae[rd] = ae[sd] = ae[ld] = ae[ud] = ae[cd] = ae[dd] = ae[fd] = true;
ae[jc] = ae[Kc] = ae[nd] = ae[Uc] = ae[od] = ae[Wc] = ae[qc] = ae[Gc] = ae[Jc] = ae[Yc] = ae[Zc] = ae[Qc] = ae[Xc] = ae[ed] = ae[td] = false;
function pd(e) {
return en2(e) && Mi(e.length) && !!ae[cn2(e)];
}
function hd(e) {
return function(t) {
return e(t);
};
}
var Yr = typeof exports == "object" && exports && !exports.nodeType && exports;
var On = Yr && typeof module == "object" && module && !module.nodeType && module;
var md = On && On.exports === Yr;
var Go = md && jr.process;
var Pa = function() {
try {
var e = On && On.require && On.require("util").types;
return e || Go && Go.binding && Go.binding("util");
} catch {
}
}();
var La = Pa && Pa.isTypedArray;
var Zr = La ? hd(La) : pd;
var vd = Object.prototype;
var gd = vd.hasOwnProperty;
function yd(e, t) {
var n = Ke(e), o = !n && _i(e), i = !n && !o && ui(e), a2 = !n && !o && !i && Zr(e), r = n || o || i || a2, s = r ? $c(e.length, String) : [], l = s.length;
for (var u2 in e)
gd.call(e, u2) && !(r && // Safari 9 has enumerable `arguments.length` in strict mode.
(u2 == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
i && (u2 == "offset" || u2 == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
a2 && (u2 == "buffer" || u2 == "byteLength" || u2 == "byteOffset") || // Skip index properties.
Ai(u2, l))) && s.push(u2);
return s;
}
function bd(e, t) {
return function(n) {
return e(t(n));
};
}
var wd = bd(Object.keys, Object);
var Sd = Object.prototype;
var Cd = Sd.hasOwnProperty;
function Ed(e) {
if (!Rc(e))
return wd(e);
var t = [];
for (var n in Object(e))
Cd.call(e, n) && n != "constructor" && t.push(n);
return t;
}
function Qr(e) {
return xc(e) ? yd(e) : Ed(e);
}
var Id = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
var kd = /^\w*$/;
function Pi(e, t) {
if (Ke(e))
return false;
var n = typeof e;
return n == "number" || n == "symbol" || n == "boolean" || e == null || To(e) ? true : kd.test(e) || !Id.test(e) || t != null && e in Object(t);
}
var Ln = Vt(Object, "create");
function Td() {
this.__data__ = Ln ? Ln(null) : {}, this.size = 0;
}
function Ad(e) {
var t = this.has(e) && delete this.__data__[e];
return this.size -= t ? 1 : 0, t;
}
var Od = "__lodash_hash_undefined__";
var Md = Object.prototype;
var _d = Md.hasOwnProperty;
function Pd(e) {
var t = this.__data__;
if (Ln) {
var n = t[e];
return n === Od ? void 0 : n;
}
return _d.call(t, e) ? t[e] : void 0;
}
var Ld = Object.prototype;
var xd = Ld.hasOwnProperty;
function Fd(e) {
var t = this.__data__;
return Ln ? t[e] !== void 0 : xd.call(t, e);
}
var Rd = "__lodash_hash_undefined__";
function $d(e, t) {
var n = this.__data__;
return this.size += this.has(e) ? 0 : 1, n[e] = Ln && t === void 0 ? Rd : t, this;
}
function Rt(e) {
var t = -1, n = e == null ? 0 : e.length;
for (this.clear(); ++t < n; ) {
var o = e[t];
this.set(o[0], o[1]);
}
}
Rt.prototype.clear = Td;
Rt.prototype.delete = Ad;
Rt.prototype.get = Pd;
Rt.prototype.has = Fd;
Rt.prototype.set = $d;
function Dd() {
this.__data__ = [], this.size = 0;
}
function Ao(e, t) {
for (var n = e.length; n--; )
if (Oi(e[n][0], t))
return n;
return -1;
}
var Nd = Array.prototype;
var Bd = Nd.splice;
function Vd(e) {
var t = this.__data__, n = Ao(t, e);
if (n < 0)
return false;
var o = t.length - 1;
return n == o ? t.pop() : Bd.call(t, n, 1), --this.size, true;
}
function zd(e) {
var t = this.__data__, n = Ao(t, e);
return n < 0 ? void 0 : t[n][1];
}
function Hd(e) {
return Ao(this.__data__, e) > -1;
}
function jd(e, t) {
var n = this.__data__, o = Ao(n, e);
return o < 0 ? (++this.size, n.push([e, t])) : n[o][1] = t, this;
}
function ft(e) {
var t = -1, n = e == null ? 0 : e.length;
for (this.clear(); ++t < n; ) {
var o = e[t];
this.set(o[0], o[1]);
}
}
ft.prototype.clear = Dd;
ft.prototype.delete = Vd;
ft.prototype.get = zd;
ft.prototype.has = Hd;
ft.prototype.set = jd;
var xn2 = Vt(tt, "Map");
function Kd() {
this.size = 0, this.__data__ = {
hash: new Rt(),
map: new (xn2 || ft)(),
string: new Rt()
};
}
function Ud(e) {
var t = typeof e;
return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
}
function Oo(e, t) {
var n = e.__data__;
return Ud(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
}
function Wd(e) {
var t = Oo(this, e).delete(e);
return this.size -= t ? 1 : 0, t;
}
function qd(e) {
return Oo(this, e).get(e);
}
function Gd(e) {
return Oo(this, e).has(e);
}
function Jd(e, t) {
var n = Oo(this, e), o = n.size;
return n.set(e, t), this.size += n.size == o ? 0 : 1, this;
}
function pt(e) {
var t = -1, n = e == null ? 0 : e.length;
for (this.clear(); ++t < n; ) {
var o = e[t];
this.set(o[0], o[1]);
}
}
pt.prototype.clear = Kd;
pt.prototype.delete = Wd;
pt.prototype.get = qd;
pt.prototype.has = Gd;
pt.prototype.set = Jd;
var Yd = "Expected a function";
function Li(e, t) {
if (typeof e != "function" || t != null && typeof t != "function")
throw new TypeError(Yd);
var n = function() {
var o = arguments, i = t ? t.apply(this, o) : o[0], a2 = n.cache;
if (a2.has(i))
return a2.get(i);
var r = e.apply(this, o);
return n.cache = a2.set(i, r) || a2, r;
};
return n.cache = new (Li.Cache || pt)(), n;
}
Li.Cache = pt;
var Zd = 500;
function Qd(e) {
var t = Li(e, function(o) {
return n.size === Zd && n.clear(), o;
}), n = t.cache;
return t;
}
var Xd = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
var ef = /\\(\\)?/g;
var tf = Qd(function(e) {
var t = [];
return e.charCodeAt(0) === 46 && t.push(""), e.replace(Xd, function(n, o, i, a2) {
t.push(i ? a2.replace(ef, "$1") : o || n);
}), t;
});
function nf(e) {
return e == null ? "" : Ur(e);
}
function Mo(e, t) {
return Ke(e) ? e : Pi(e, t) ? [e] : tf(nf(e));
}
var of = 1 / 0;
function Hn(e) {
if (typeof e == "string" || To(e))
return e;
var t = e + "";
return t == "0" && 1 / e == -of ? "-0" : t;
}
function xi(e, t) {
t = Mo(t, e);
for (var n = 0, o = t.length; e != null && n < o; )
e = e[Hn(t[n++])];
return n && n == o ? e : void 0;
}
function at(e, t, n) {
var o = e == null ? void 0 : xi(e, t);
return o === void 0 ? n : o;
}
function Xr(e, t) {
for (var n = -1, o = t.length, i = e.length; ++n < o; )
e[i + n] = t[n];
return e;
}
var xa = Xe ? Xe.isConcatSpreadable : void 0;
function af(e) {
return Ke(e) || _i(e) || !!(xa && e && e[xa]);
}
function rf(e, t, n, o, i) {
var a2 = -1, r = e.length;
for (n || (n = af), i || (i = []); ++a2 < r; ) {
var s = e[a2];
n(s) ? Xr(i, s) : i[i.length] = s;
}
return i;
}
function sf(e) {
var t = e == null ? 0 : e.length;
return t ? rf(e) : [];
}
function lf(e) {
return Ec(Pc(e, void 0, sf), e + "");
}
function St() {
if (!arguments.length)
return [];
var e = arguments[0];
return Ke(e) ? e : [e];
}
function uf() {
this.__data__ = new ft(), this.size = 0;
}
function cf(e) {
var t = this.__data__, n = t.delete(e);
return this.size = t.size, n;
}
function df(e) {
return this.__data__.get(e);
}
function ff(e) {
return this.__data__.has(e);
}
var pf = 200;
function hf(e, t) {
var n = this.__data__;
if (n instanceof ft) {
var o = n.__data__;
if (!xn2 || o.length < pf - 1)
return o.push([e, t]), this.size = ++n.size, this;
n = this.__data__ = new pt(o);
}
return n.set(e, t), this.size = n.size, this;
}
function st(e) {
var t = this.__data__ = new ft(e);
this.size = t.size;
}
st.prototype.clear = uf;
st.prototype.delete = cf;
st.prototype.get = df;
st.prototype.has = ff;
st.prototype.set = hf;
function mf(e, t) {
for (var n = -1, o = e == null ? 0 : e.length, i = 0, a2 = []; ++n < o; ) {
var r = e[n];
t(r, n, e) && (a2[i++] = r);
}
return a2;
}
function vf() {
return [];
}
var gf = Object.prototype;
var yf = gf.propertyIsEnumerable;
var Fa = Object.getOwnPropertySymbols;
var bf = Fa ? function(e) {
return e == null ? [] : (e = Object(e), mf(Fa(e), function(t) {
return yf.call(e, t);
}));
} : vf;
function wf(e, t, n) {
var o = t(e);
return Ke(e) ? o : Xr(o, n(e));
}
function Ra(e) {
return wf(e, Qr, bf);
}
var ci = Vt(tt, "DataView");
var di = Vt(tt, "Promise");
var fi = Vt(tt, "Set");
var $a = "[object Map]";
var Sf = "[object Object]";
var Da = "[object Promise]";
var Na = "[object Set]";
var Ba = "[object WeakMap]";
var Va = "[object DataView]";
var Cf = Bt(ci);
var Ef = Bt(xn2);
var If = Bt(di);
var kf = Bt(fi);
var Tf = Bt(li);
var wt = cn2;
(ci && wt(new ci(new ArrayBuffer(1))) != Va || xn2 && wt(new xn2()) != $a || di && wt(di.resolve()) != Da || fi && wt(new fi()) != Na || li && wt(new li()) != Ba) && (wt = function(e) {
var t = cn2(e), n = t == Sf ? e.constructor : void 0, o = n ? Bt(n) : "";
if (o)
switch (o) {
case Cf:
return Va;
case Ef:
return $a;
case If:
return Da;
case kf:
return Na;
case Tf:
return Ba;
}
return t;
});
var za = tt.Uint8Array;
var Af = "__lodash_hash_undefined__";
function Of(e) {
return this.__data__.set(e, Af), this;
}
function Mf(e) {
return this.__data__.has(e);
}
function bo(e) {
var t = -1, n = e == null ? 0 : e.length;
for (this.__data__ = new pt(); ++t < n; )
this.add(e[t]);
}
bo.prototype.add = bo.prototype.push = Of;
bo.prototype.has = Mf;
function _f(e, t) {
for (var n = -1, o = e == null ? 0 : e.length; ++n < o; )
if (t(e[n], n, e))
return true;
return false;
}
function Pf(e, t) {
return e.has(t);
}
var Lf = 1;
var xf = 2;
function es(e, t, n, o, i, a2) {
var r = n & Lf, s = e.length, l = t.length;
if (s != l && !(r && l > s))
return false;
var u2 = a2.get(e), c = a2.get(t);
if (u2 && c)
return u2 == t && c == e;
var d = -1, f2 = true, m2 = n & xf ? new bo() : void 0;
for (a2.set(e, t), a2.set(t, e); ++d < s; ) {
var p = e[d], h3 = t[d];
if (o)
var g2 = r ? o(h3, p, d, t, e, a2) : o(p, h3, d, e, t, a2);
if (g2 !== void 0) {
if (g2)
continue;
f2 = false;
break;
}
if (m2) {
if (!_f(t, function(y2, C2) {
if (!Pf(m2, C2) && (p === y2 || i(p, y2, n, o, a2)))
return m2.push(C2);
})) {
f2 = false;
break;
}
} else if (!(p === h3 || i(p, h3, n, o, a2))) {
f2 = false;
break;
}
}
return a2.delete(e), a2.delete(t), f2;
}
function Ff(e) {
var t = -1, n = Array(e.size);
return e.forEach(function(o, i) {
n[++t] = [i, o];
}), n;
}
function Rf(e) {
var t = -1, n = Array(e.size);
return e.forEach(function(o) {
n[++t] = o;
}), n;
}
var $f = 1;
var Df = 2;
var Nf = "[object Boolean]";
var Bf = "[object Date]";
var Vf = "[object Error]";
var zf = "[object Map]";
var Hf = "[object Number]";
var jf = "[object RegExp]";
var Kf = "[object Set]";
var Uf = "[object String]";
var Wf = "[object Symbol]";
var qf = "[object ArrayBuffer]";
var Gf = "[object DataView]";
var Ha = Xe ? Xe.prototype : void 0;
var Jo = Ha ? Ha.valueOf : void 0;
function Jf(e, t, n, o, i, a2, r) {
switch (n) {
case Gf:
if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
return false;
e = e.buffer, t = t.buffer;
case qf:
return !(e.byteLength != t.byteLength || !a2(new za(e), new za(t)));
case Nf:
case Bf:
case Hf:
return Oi(+e, +t);
case Vf:
return e.name == t.name && e.message == t.message;
case jf:
case Uf:
return e == t + "";
case zf:
var s = Ff;
case Kf:
var l = o & $f;
if (s || (s = Rf), e.size != t.size && !l)
return false;
var u2 = r.get(e);
if (u2)
return u2 == t;
o |= Df, r.set(e, t);
var c = es(s(e), s(t), o, i, a2, r);
return r.delete(e), c;
case Wf:
if (Jo)
return Jo.call(e) == Jo.call(t);
}
return false;
}
var Yf = 1;
var Zf = Object.prototype;
var Qf = Zf.hasOwnProperty;
function Xf(e, t, n, o, i, a2) {
var r = n & Yf, s = Ra(e), l = s.length, u2 = Ra(t), c = u2.length;
if (l != c && !r)
return false;
for (var d = l; d--; ) {
var f2 = s[d];
if (!(r ? f2 in t : Qf.call(t, f2)))
return false;
}
var m2 = a2.get(e), p = a2.get(t);
if (m2 && p)
return m2 == t && p == e;
var h3 = true;
a2.set(e, t), a2.set(t, e);
for (var g2 = r; ++d < l; ) {
f2 = s[d];
var y2 = e[f2], C2 = t[f2];
if (o)
var O2 = r ? o(C2, y2, f2, t, e, a2) : o(y2, C2, f2, e, t, a2);
if (!(O2 === void 0 ? y2 === C2 || i(y2, C2, n, o, a2) : O2)) {
h3 = false;
break;
}
g2 || (g2 = f2 == "constructor");
}
if (h3 && !g2) {
var T2 = e.constructor, I2 = t.constructor;
T2 != I2 && "constructor" in e && "constructor" in t && !(typeof T2 == "function" && T2 instanceof T2 && typeof I2 == "function" && I2 instanceof I2) && (h3 = false);
}
return a2.delete(e), a2.delete(t), h3;
}
var ep = 1;
var ja = "[object Arguments]";
var Ka = "[object Array]";
var to = "[object Object]";
var tp = Object.prototype;
var Ua = tp.hasOwnProperty;
function np(e, t, n, o, i, a2) {
var r = Ke(e), s = Ke(t), l = r ? Ka : wt(e), u2 = s ? Ka : wt(t);
l = l == ja ? to : l, u2 = u2 == ja ? to : u2;
var c = l == to, d = u2 == to, f2 = l == u2;
if (f2 && ui(e)) {
if (!ui(t))
return false;
r = true, c = false;
}
if (f2 && !c)
return a2 || (a2 = new st()), r || Zr(e) ? es(e, t, n, o, i, a2) : Jf(e, t, l, n, o, i, a2);
if (!(n & ep)) {
var m2 = c && Ua.call(e, "__wrapped__"), p = d && Ua.call(t, "__wrapped__");
if (m2 || p) {
var h3 = m2 ? e.value() : e, g2 = p ? t.value() : t;
return a2 || (a2 = new st()), i(h3, g2, n, o, a2);
}
}
return f2 ? (a2 || (a2 = new st()), Xf(e, t, n, o, i, a2)) : false;
}
function _o(e, t, n, o, i) {
return e === t ? true : e == null || t == null || !en2(e) && !en2(t) ? e !== e && t !== t : np(e, t, n, o, _o, i);
}
var op = 1;
var ip = 2;
function ap(e, t, n, o) {
var i = n.length, a2 = i;
if (e == null)
return !a2;
for (e = Object(e); i--; ) {
var r = n[i];
if (r[2] ? r[1] !== e[r[0]] : !(r[0] in e))
return false;
}
for (; ++i < a2; ) {
r = n[i];
var s = r[0], l = e[s], u2 = r[1];
if (r[2]) {
if (l === void 0 && !(s in e))
return false;
} else {
var c = new st(), d;
if (!(d === void 0 ? _o(u2, l, op | ip, o, c) : d))
return false;
}
}
return true;
}
function ts(e) {
return e === e && !It(e);
}
function rp(e) {
for (var t = Qr(e), n = t.length; n--; ) {
var o = t[n], i = e[o];
t[n] = [o, i, ts(i)];
}
return t;
}
function ns(e, t) {
return function(n) {
return n == null ? false : n[e] === t && (t !== void 0 || e in Object(n));
};
}
function sp(e) {
var t = rp(e);
return t.length == 1 && t[0][2] ? ns(t[0][0], t[0][1]) : function(n) {
return n === e || ap(n, e, t);
};
}
function lp(e, t) {
return e != null && t in Object(e);
}
function up(e, t, n) {
t = Mo(t, e);
for (var o = -1, i = t.length, a2 = false; ++o < i; ) {
var r = Hn(t[o]);
if (!(a2 = e != null && n(e, r)))
break;
e = e[r];
}
return a2 || ++o != i ? a2 : (i = e == null ? 0 : e.length, !!i && Mi(i) && Ai(r, i) && (Ke(e) || _i(e)));
}
function os(e, t) {
return e != null && up(e, t, lp);
}
var cp = 1;
var dp = 2;
function fp(e, t) {
return Pi(e) && ts(t) ? ns(Hn(e), t) : function(n) {
var o = at(n, e);
return o === void 0 && o === t ? os(n, e) : _o(t, o, cp | dp);
};
}
function pp(e) {
return function(t) {
return t == null ? void 0 : t[e];
};
}
function hp(e) {
return function(t) {
return xi(t, e);
};
}
function mp(e) {
return Pi(e) ? pp(Hn(e)) : hp(e);
}
function vp(e) {
return typeof e == "function" ? e : e == null ? Wr : typeof e == "object" ? Ke(e) ? fp(e[0], e[1]) : sp(e) : mp(e);
}
var Yo = function() {
return tt.Date.now();
};
var gp = "Expected a function";
var yp = Math.max;
var bp = Math.min;
function wp(e, t, n) {
var o, i, a2, r, s, l, u2 = 0, c = false, d = false, f2 = true;
if (typeof e != "function")
throw new TypeError(gp);
t = ka(t) || 0, It(n) && (c = !!n.leading, d = "maxWait" in n, a2 = d ? yp(ka(n.maxWait) || 0, t) : a2, f2 = "trailing" in n ? !!n.trailing : f2);
function m2(k2) {
var A2 = o, $2 = i;
return o = i = void 0, u2 = k2, r = e.apply($2, A2), r;
}
function p(k2) {
return u2 = k2, s = setTimeout(y2, t), c ? m2(k2) : r;
}
function h3(k2) {
var A2 = k2 - l, $2 = k2 - u2, N2 = t - A2;
return d ? bp(N2, a2 - $2) : N2;
}
function g2(k2) {
var A2 = k2 - l, $2 = k2 - u2;
return l === void 0 || A2 >= t || A2 < 0 || d && $2 >= a2;
}
function y2() {
var k2 = Yo();
if (g2(k2))
return C2(k2);
s = setTimeout(y2, h3(k2));
}
function C2(k2) {
return s = void 0, f2 && o ? m2(k2) : (o = i = void 0, r);
}
function O2() {
s !== void 0 && clearTimeout(s), u2 = 0, o = l = i = s = void 0;
}
function T2() {
return s === void 0 ? r : C2(Yo());
}
function I2() {
var k2 = Yo(), A2 = g2(k2);
if (o = arguments, i = this, l = k2, A2) {
if (s === void 0)
return p(l);
if (d)
return clearTimeout(s), s = setTimeout(y2, t), m2(l);
}
return s === void 0 && (s = setTimeout(y2, t)), r;
}
return I2.cancel = O2, I2.flush = T2, I2;
}
function Sp(e, t, n) {
var o = e == null ? 0 : e.length;
if (!o)
return -1;
var i = o - 1;
return Ic(e, vp(t), i);
}
function pi(e) {
for (var t = -1, n = e == null ? 0 : e.length, o = {}; ++t < n; ) {
var i = e[t];
o[i[0]] = i[1];
}
return o;
}
function wo(e, t) {
return _o(e, t);
}
function Po(e) {
return e == null;
}
function is(e) {
return e === void 0;
}
function Cp(e, t, n, o) {
if (!It(e))
return e;
t = Mo(t, e);
for (var i = -1, a2 = t.length, r = a2 - 1, s = e; s != null && ++i < a2; ) {
var l = Hn(t[i]), u2 = n;
if (l === "__proto__" || l === "constructor" || l === "prototype")
return e;
if (i != r) {
var c = s[l];
u2 = void 0, u2 === void 0 && (u2 = It(c) ? c : Ai(t[i + 1]) ? [] : {});
}
_c(s, l, u2), s = s[l];
}
return e;
}
function Ep(e, t, n) {
for (var o = -1, i = t.length, a2 = {}; ++o < i; ) {
var r = t[o], s = xi(e, r);
n(s, r) && Cp(a2, Mo(r, e), s);
}
return a2;
}
function Ip(e, t) {
return Ep(e, t, function(n, o) {
return os(e, o);
});
}
var as = lf(function(e, t) {
return e == null ? {} : Ip(e, t);
});
var Ct = (e) => e === void 0;
var ct = (e) => typeof e == "boolean";
var me = (e) => typeof e == "number";
var xt = (e) => typeof Element > "u" ? false : e instanceof Element;
var Fn2 = (e) => Po(e);
var kp = (e) => je(e) ? !Number.isNaN(Number(e)) : false;
var Tp = (e = "") => e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
var Wa = (e) => Object.keys(e);
var rs = class extends Error {
constructor(t) {
super(t), this.name = "ElementPlusError";
}
};
function ss(e, t) {
throw new rs(`[${e}] ${t}`);
}
function Oe(e, t) {
if (true) {
const n = je(e) ? new rs(`[${e}] ${t}`) : e;
console.warn(n);
}
}
var Ap = "utils/dom/style";
var ls = (e = "") => e.split(" ").filter((t) => !!t.trim());
var qa = (e, t) => {
if (!e || !t)
return false;
if (t.includes(" "))
throw new Error("className should not contain space.");
return e.classList.contains(t);
};
var hi = (e, t) => {
!e || !t.trim() || e.classList.add(...ls(t));
};
var Rn = (e, t) => {
!e || !t.trim() || e.classList.remove(...ls(t));
};
var Zt = (e, t) => {
var n;
if (!se || !e || !t)
return "";
let o = Pu(t);
o === "float" && (o = "cssFloat");
try {
const i = e.style[o];
if (i)
return i;
const a2 = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, "");
return a2 ? a2[o] : "";
} catch {
return e.style[o];
}
};
function $t(e, t = "px") {
if (!e)
return "";
if (me(e) || kp(e))
return `${e}${t}`;
if (je(e))
return e;
Oe(Ap, "binding value must be a string or number");
}
var no;
var Op = (e) => {
var t;
if (!se)
return 0;
if (no !== void 0)
return no;
const n = document.createElement("div");
n.className = `${e}-scrollbar__wrap`, n.style.visibility = "hidden", n.style.width = "100px", n.style.position = "absolute", n.style.top = "-9999px", document.body.appendChild(n);
const o = n.offsetWidth;
n.style.overflow = "scroll";
const i = document.createElement("div");
i.style.width = "100%", n.appendChild(i);
const a2 = i.offsetWidth;
return (t = n.parentNode) == null || t.removeChild(n), no = o - a2, no;
};
function Mp(e, t) {
if (!se)
return;
if (!t) {
e.scrollTop = 0;
return;
}
const n = [];
let o = t.offsetParent;
for (; o !== null && e !== o && e.contains(o); )
n.push(o), o = o.offsetParent;
const i = t.offsetTop + n.reduce((l, u2) => l + u2.offsetTop, 0), a2 = i + t.offsetHeight, r = e.scrollTop, s = r + e.clientHeight;
i < r ? e.scrollTop = i : a2 > s && (e.scrollTop = a2 - e.clientHeight);
}
var us = "__epPropKey";
var U2 = (e) => e;
var _p = (e) => ke(e) && !!e[us];
var Lo = (e, t) => {
if (!ke(e) || _p(e))
return e;
const { values: n, required: o, default: i, type: a2, validator: r } = e, l = {
type: a2,
required: !!o,
validator: n || r ? (u2) => {
let c = false, d = [];
if (n && (d = Array.from(n), wa(e, "default") && d.push(i), c || (c = d.includes(u2))), r && (c || (c = r(u2))), !c && d.length > 0) {
const f2 = [...new Set(d)].map((m2) => JSON.stringify(m2)).join(", ");
warn(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${f2}], got value ${JSON.stringify(u2)}.`);
}
return c;
} : void 0,
[us]: true
};
return wa(e, "default") && (l.default = i), l;
};
var Q = (e) => pi(Object.entries(e).map(([t, n]) => [
t,
Lo(n, t)
]));
var tn2 = U2([
String,
Object,
Function
]);
var Pp = {
Close: close_default
};
var Lp = {
validating: loading_default,
success: circle_check_default,
error: circle_close_default
};
var Me = (e, t) => {
if (e.install = (n) => {
for (const o of [e, ...Object.values(t ?? {})])
n.component(o.name, o);
}, t)
for (const [n, o] of Object.entries(t))
e[n] = o;
return e;
};
var xp = (e, t) => (e.install = (n) => {
n.directive(t, e);
}, e);
var zt = (e) => (e.install = Lt, e);
var Fp = (...e) => (t) => {
e.forEach((n) => {
Se(n) ? n(t) : n.value = t;
});
};
var $n = {
tab: "Tab",
enter: "Enter",
space: "Space",
left: "ArrowLeft",
up: "ArrowUp",
right: "ArrowRight",
down: "ArrowDown",
esc: "Escape",
delete: "Delete",
backspace: "Backspace",
numpadEnter: "NumpadEnter",
pageUp: "PageUp",
pageDown: "PageDown",
home: "Home",
end: "End"
};
var we = "update:modelValue";
var Fi = "change";
var cs = ["", "default", "small", "large"];
var fo = ((e) => (e[e.TEXT = 1] = "TEXT", e[e.CLASS = 2] = "CLASS", e[e.STYLE = 4] = "STYLE", e[e.PROPS = 8] = "PROPS", e[e.FULL_PROPS = 16] = "FULL_PROPS", e[e.HYDRATE_EVENTS = 32] = "HYDRATE_EVENTS", e[e.STABLE_FRAGMENT = 64] = "STABLE_FRAGMENT", e[e.KEYED_FRAGMENT = 128] = "KEYED_FRAGMENT", e[e.UNKEYED_FRAGMENT = 256] = "UNKEYED_FRAGMENT", e[e.NEED_PATCH = 512] = "NEED_PATCH", e[e.DYNAMIC_SLOTS = 1024] = "DYNAMIC_SLOTS", e[e.HOISTED = -1] = "HOISTED", e[e.BAIL = -2] = "BAIL", e))(fo || {});
var Rp = (e) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e);
var kn = (e) => e;
var Xt = ({ from: e, replacement: t, scope: n, version: o, ref: i, type: a2 = "API" }, r) => {
watch(() => unref(r), (s) => {
s && Oe(n, `[${a2}] ${e} is about to be deprecated in version ${o}, please use ${t} instead.
For more detail, please visit: ${i}
`);
}, {
immediate: true
});
};
var $p = (e, t, n, o) => {
let i = {
offsetX: 0,
offsetY: 0
};
const a2 = (u2) => {
const c = u2.clientX, d = u2.clientY, { offsetX: f2, offsetY: m2 } = i, p = e.value.getBoundingClientRect(), h3 = p.left, g2 = p.top, y2 = p.width, C2 = p.height, O2 = document.documentElement.clientWidth, T2 = document.documentElement.clientHeight, I2 = -h3 + f2, k2 = -g2 + m2, A2 = O2 - h3 - y2 + f2, $2 = T2 - g2 - C2 + m2, N2 = (B2) => {
let M2 = f2 + B2.clientX - c, W2 = m2 + B2.clientY - d;
o != null && o.value || (M2 = Math.min(Math.max(M2, I2), A2), W2 = Math.min(Math.max(W2, k2), $2)), i = {
offsetX: M2,
offsetY: W2
}, e.value && (e.value.style.transform = `translate(${$t(M2)}, ${$t(W2)})`);
}, K = () => {
document.removeEventListener("mousemove", N2), document.removeEventListener("mouseup", K);
};
document.addEventListener("mousemove", N2), document.addEventListener("mouseup", K);
}, r = () => {
t.value && e.value && t.value.addEventListener("mousedown", a2);
}, s = () => {
t.value && e.value && t.value.removeEventListener("mousedown", a2);
}, l = () => {
i = {
offsetX: 0,
offsetY: 0
}, e.value && (e.value.style.transform = "none");
};
return onMounted(() => {
watchEffect(() => {
n.value ? r() : s();
});
}), onBeforeUnmount(() => {
s();
}), {
resetPosition: l
};
};
var Dp = {
name: "en",
el: {
breadcrumb: {
label: "Breadcrumb"
},
colorpicker: {
confirm: "OK",
clear: "Clear",
defaultLabel: "color picker",
description: "current color is {color}. press enter to select a new color.",
alphaLabel: "pick alpha value"
},
datepicker: {
now: "Now",
today: "Today",
cancel: "Cancel",
clear: "Clear",
confirm: "OK",
dateTablePrompt: "Use the arrow keys and enter to select the day of the month",
monthTablePrompt: "Use the arrow keys and enter to select the month",
yearTablePrompt: "Use the arrow keys and enter to select the year",
selectedDate: "Selected date",
selectDate: "Select date",
selectTime: "Select time",
startDate: "Start Date",
startTime: "Start Time",
endDate: "End Date",
endTime: "End Time",
prevYear: "Previous Year",
nextYear: "Next Year",
prevMonth: "Previous Month",
nextMonth: "Next Month",
year: "",
month1: "January",
month2: "February",
month3: "March",
month4: "April",
month5: "May",
month6: "June",
month7: "July",
month8: "August",
month9: "September",
month10: "October",
month11: "November",
month12: "December",
week: "week",
weeks: {
sun: "Sun",
mon: "Mon",
tue: "Tue",
wed: "Wed",
thu: "Thu",
fri: "Fri",
sat: "Sat"
},
weeksFull: {
sun: "Sunday",
mon: "Monday",
tue: "Tuesday",
wed: "Wednesday",
thu: "Thursday",
fri: "Friday",
sat: "Saturday"
},
months: {
jan: "Jan",
feb: "Feb",
mar: "Mar",
apr: "Apr",
may: "May",
jun: "Jun",
jul: "Jul",
aug: "Aug",
sep: "Sep",
oct: "Oct",
nov: "Nov",
dec: "Dec"
}
},
inputNumber: {
decrease: "decrease number",
increase: "increase number"
},
select: {
loading: "Loading",
noMatch: "No matching data",
noData: "No data",
placeholder: "Select"
},
mention: {
loading: "Loading"
},
dropdown: {
toggleDropdown: "Toggle Dropdown"
},
cascader: {
noMatch: "No matching data",
loading: "Loading",
placeholder: "Select",
noData: "No data"
},
pagination: {
goto: "Go to",
pagesize: "/page",
total: "Total {total}",
pageClassifier: "",
page: "Page",
prev: "Go to previous page",
next: "Go to next page",
currentPage: "page {pager}",
prevPages: "Previous {pager} pages",
nextPages: "Next {pager} pages",
deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
},
dialog: {
close: "Close this dialog"
},
drawer: {
close: "Close this dialog"
},
messagebox: {
title: "Message",
confirm: "OK",
cancel: "Cancel",
error: "Illegal input",
close: "Close this dialog"
},
upload: {
deleteTip: "press delete to remove",
delete: "Delete",
preview: "Preview",
continue: "Continue"
},
slider: {
defaultLabel: "slider between {min} and {max}",
defaultRangeStartLabel: "pick start value",
defaultRangeEndLabel: "pick end value"
},
table: {
emptyText: "No Data",
confirmFilter: "Confirm",
resetFilter: "Reset",
clearFilter: "All",
sumText: "Sum"
},
tour: {
next: "Next",
previous: "Previous",
finish: "Finish"
},
tree: {
emptyText: "No Data"
},
transfer: {
noMatch: "No matching data",
noData: "No data",
titles: ["List 1", "List 2"],
filterPlaceholder: "Enter keyword",
noCheckedFormat: "{total} items",
hasCheckedFormat: "{checked}/{total} checked"
},
image: {
error: "FAILED"
},
pageHeader: {
title: "Back"
},
popconfirm: {
confirmButtonText: "Yes",
cancelButtonText: "No"
},
carousel: {
leftArrow: "Carousel arrow left",
rightArrow: "Carousel arrow right",
indicator: "Carousel switch to index {index}"
}
}
};
var Np = (e) => (t, n) => Bp(t, n, unref(e));
var Bp = (e, t, n) => at(n, e, e).replace(/\{(\w+)\}/g, (o, i) => {
var a2;
return `${(a2 = t == null ? void 0 : t[i]) != null ? a2 : `{${i}}`}`;
});
var Vp = (e) => {
const t = computed(() => unref(e).name), n = isRef(e) ? e : ref(e);
return {
lang: t,
locale: n,
t: Np(e)
};
};
var ds = Symbol("localeContextKey");
var Ri = (e) => {
const t = e || inject(ds, ref());
return Vp(computed(() => t.value || Dp));
};
var Mn = "el";
var zp = "is-";
var _t = (e, t, n, o, i) => {
let a2 = `${e}-${t}`;
return n && (a2 += `-${n}`), o && (a2 += `__${o}`), i && (a2 += `--${i}`), a2;
};
var fs = Symbol("namespaceContextKey");
var $i = (e) => {
const t = e || (getCurrentInstance() ? inject(fs, ref(Mn)) : ref(Mn));
return computed(() => unref(t) || Mn);
};
var te = (e, t) => {
const n = $i(t);
return {
namespace: n,
b: (h3 = "") => _t(n.value, e, h3, "", ""),
e: (h3) => h3 ? _t(n.value, e, "", h3, "") : "",
m: (h3) => h3 ? _t(n.value, e, "", "", h3) : "",
be: (h3, g2) => h3 && g2 ? _t(n.value, e, h3, g2, "") : "",
em: (h3, g2) => h3 && g2 ? _t(n.value, e, "", h3, g2) : "",
bm: (h3, g2) => h3 && g2 ? _t(n.value, e, h3, "", g2) : "",
bem: (h3, g2, y2) => h3 && g2 && y2 ? _t(n.value, e, h3, g2, y2) : "",
is: (h3, ...g2) => {
const y2 = g2.length >= 1 ? g2[0] : true;
return h3 && y2 ? `${zp}${h3}` : "";
},
cssVar: (h3) => {
const g2 = {};
for (const y2 in h3)
h3[y2] && (g2[`--${n.value}-${y2}`] = h3[y2]);
return g2;
},
cssVarName: (h3) => `--${n.value}-${h3}`,
cssVarBlock: (h3) => {
const g2 = {};
for (const y2 in h3)
h3[y2] && (g2[`--${n.value}-${e}-${y2}`] = h3[y2]);
return g2;
},
cssVarBlockName: (h3) => `--${n.value}-${e}-${h3}`
};
};
var Hp = (e, t = {}) => {
isRef(e) || ss("[useLockscreen]", "You need to pass a ref param to this function");
const n = t.ns || te("popup"), o = computed(() => n.bm("parent", "hidden"));
if (!se || qa(document.body, o.value))
return;
let i = 0, a2 = false, r = "0";
const s = () => {
setTimeout(() => {
Rn(document == null ? void 0 : document.body, o.value), a2 && document && (document.body.style.width = r);
}, 200);
};
watch(e, (l) => {
if (!l) {
s();
return;
}
a2 = !qa(document.body, o.value), a2 && (r = document.body.style.width), i = Op(n.namespace.value);
const u2 = document.documentElement.clientHeight < document.body.scrollHeight, c = Zt(document.body, "overflowY");
i > 0 && (u2 || c === "scroll") && a2 && (document.body.style.width = `calc(100% - ${i}px)`), hi(document.body, o.value);
}), onScopeDispose(() => s());
};
var jp = Lo({
type: U2(Boolean),
default: null
});
var Kp = Lo({
type: U2(Function)
});
var Up = (e) => {
const t = `update:${e}`, n = `onUpdate:${e}`, o = [t], i = {
[e]: jp,
[n]: Kp
};
return {
useModelToggle: ({
indicator: r,
toggleReason: s,
shouldHideWhenRouteChanges: l,
shouldProceed: u2,
onShow: c,
onHide: d
}) => {
const f2 = getCurrentInstance(), { emit: m2 } = f2, p = f2.props, h3 = computed(() => Se(p[n])), g2 = computed(() => p[e] === null), y2 = (A2) => {
r.value !== true && (r.value = true, s && (s.value = A2), Se(c) && c(A2));
}, C2 = (A2) => {
r.value !== false && (r.value = false, s && (s.value = A2), Se(d) && d(A2));
}, O2 = (A2) => {
if (p.disabled === true || Se(u2) && !u2())
return;
const $2 = h3.value && se;
$2 && m2(t, true), (g2.value || !$2) && y2(A2);
}, T2 = (A2) => {
if (p.disabled === true || !se)
return;
const $2 = h3.value && se;
$2 && m2(t, false), (g2.value || !$2) && C2(A2);
}, I2 = (A2) => {
ct(A2) && (p.disabled && A2 ? h3.value && m2(t, false) : r.value !== A2 && (A2 ? y2() : C2()));
}, k2 = () => {
r.value ? T2() : O2();
};
return watch(() => p[e], I2), l && f2.appContext.config.globalProperties.$route !== void 0 && watch(() => ({
...f2.proxy.$route
}), () => {
l.value && r.value && T2();
}), onMounted(() => {
I2(p[e]);
}), {
hide: T2,
show: O2,
toggle: k2,
hasUpdateHandler: h3
};
},
useModelToggleProps: i,
useModelToggleEmits: o
};
};
var ps = (e) => {
const t = getCurrentInstance();
return computed(() => {
var n, o;
return (o = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : o[e];
});
};
var Te = "top";
var De = "bottom";
var Ne = "right";
var Ae = "left";
var Di = "auto";
var jn = [Te, De, Ne, Ae];
var nn2 = "start";
var Dn = "end";
var Wp = "clippingParents";
var hs = "viewport";
var Tn = "popper";
var qp = "reference";
var Ga = jn.reduce(function(e, t) {
return e.concat([t + "-" + nn2, t + "-" + Dn]);
}, []);
var xo = [].concat(jn, [Di]).reduce(function(e, t) {
return e.concat([t, t + "-" + nn2, t + "-" + Dn]);
}, []);
var Gp = "beforeRead";
var Jp = "read";
var Yp = "afterRead";
var Zp = "beforeMain";
var Qp = "main";
var Xp = "afterMain";
var eh = "beforeWrite";
var th = "write";
var nh = "afterWrite";
var oh = [Gp, Jp, Yp, Zp, Qp, Xp, eh, th, nh];
function et(e) {
return e ? (e.nodeName || "").toLowerCase() : null;
}
function We(e) {
if (e == null) return window;
if (e.toString() !== "[object Window]") {
var t = e.ownerDocument;
return t && t.defaultView || window;
}
return e;
}
function on2(e) {
var t = We(e).Element;
return e instanceof t || e instanceof Element;
}
function $e(e) {
var t = We(e).HTMLElement;
return e instanceof t || e instanceof HTMLElement;
}
function Ni(e) {
if (typeof ShadowRoot > "u") return false;
var t = We(e).ShadowRoot;
return e instanceof t || e instanceof ShadowRoot;
}
function ih(e) {
var t = e.state;
Object.keys(t.elements).forEach(function(n) {
var o = t.styles[n] || {}, i = t.attributes[n] || {}, a2 = t.elements[n];
!$e(a2) || !et(a2) || (Object.assign(a2.style, o), Object.keys(i).forEach(function(r) {
var s = i[r];
s === false ? a2.removeAttribute(r) : a2.setAttribute(r, s === true ? "" : s);
}));
});
}
function ah(e) {
var t = e.state, n = { popper: { position: t.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} };
return Object.assign(t.elements.popper.style, n.popper), t.styles = n, t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow), function() {
Object.keys(t.elements).forEach(function(o) {
var i = t.elements[o], a2 = t.attributes[o] || {}, r = Object.keys(t.styles.hasOwnProperty(o) ? t.styles[o] : n[o]), s = r.reduce(function(l, u2) {
return l[u2] = "", l;
}, {});
!$e(i) || !et(i) || (Object.assign(i.style, s), Object.keys(a2).forEach(function(l) {
i.removeAttribute(l);
}));
});
};
}
var ms = { name: "applyStyles", enabled: true, phase: "write", fn: ih, effect: ah, requires: ["computeStyles"] };
function Qe(e) {
return e.split("-")[0];
}
var Ft = Math.max;
var So = Math.min;
var an2 = Math.round;
function rn2(e, t) {
t === void 0 && (t = false);
var n = e.getBoundingClientRect(), o = 1, i = 1;
if ($e(e) && t) {
var a2 = e.offsetHeight, r = e.offsetWidth;
r > 0 && (o = an2(n.width) / r || 1), a2 > 0 && (i = an2(n.height) / a2 || 1);
}
return { width: n.width / o, height: n.height / i, top: n.top / i, right: n.right / o, bottom: n.bottom / i, left: n.left / o, x: n.left / o, y: n.top / i };
}
function Bi(e) {
var t = rn2(e), n = e.offsetWidth, o = e.offsetHeight;
return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - o) <= 1 && (o = t.height), { x: e.offsetLeft, y: e.offsetTop, width: n, height: o };
}
function vs(e, t) {
var n = t.getRootNode && t.getRootNode();
if (e.contains(t)) return true;
if (n && Ni(n)) {
var o = t;
do {
if (o && e.isSameNode(o)) return true;
o = o.parentNode || o.host;
} while (o);
}
return false;
}
function dt(e) {
return We(e).getComputedStyle(e);
}
function rh(e) {
return ["table", "td", "th"].indexOf(et(e)) >= 0;
}
function kt(e) {
return ((on2(e) ? e.ownerDocument : e.document) || window.document).documentElement;
}
function Fo(e) {
return et(e) === "html" ? e : e.assignedSlot || e.parentNode || (Ni(e) ? e.host : null) || kt(e);
}
function Ja(e) {
return !$e(e) || dt(e).position === "fixed" ? null : e.offsetParent;
}
function sh(e) {
var t = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1;
if (n && $e(e)) {
var o = dt(e);
if (o.position === "fixed") return null;
}
var i = Fo(e);
for (Ni(i) && (i = i.host); $e(i) && ["html", "body"].indexOf(et(i)) < 0; ) {
var a2 = dt(i);
if (a2.transform !== "none" || a2.perspective !== "none" || a2.contain === "paint" || ["transform", "perspective"].indexOf(a2.willChange) !== -1 || t && a2.willChange === "filter" || t && a2.filter && a2.filter !== "none") return i;
i = i.parentNode;
}
return null;
}
function Kn(e) {
for (var t = We(e), n = Ja(e); n && rh(n) && dt(n).position === "static"; ) n = Ja(n);
return n && (et(n) === "html" || et(n) === "body" && dt(n).position === "static") ? t : n || sh(e) || t;
}
function Vi(e) {
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
}
function _n(e, t, n) {
return Ft(e, So(t, n));
}
function lh(e, t, n) {
var o = _n(e, t, n);
return o > n ? n : o;
}
function gs() {
return { top: 0, right: 0, bottom: 0, left: 0 };
}
function ys(e) {
return Object.assign({}, gs(), e);
}
function bs(e, t) {
return t.reduce(function(n, o) {
return n[o] = e, n;
}, {});
}
var uh = function(e, t) {
return e = typeof e == "function" ? e(Object.assign({}, t.rects, { placement: t.placement })) : e, ys(typeof e != "number" ? e : bs(e, jn));
};
function ch(e) {
var t, n = e.state, o = e.name, i = e.options, a2 = n.elements.arrow, r = n.modifiersData.popperOffsets, s = Qe(n.placement), l = Vi(s), u2 = [Ae, Ne].indexOf(s) >= 0, c = u2 ? "height" : "width";
if (!(!a2 || !r)) {
var d = uh(i.padding, n), f2 = Bi(a2), m2 = l === "y" ? Te : Ae, p = l === "y" ? De : Ne, h3 = n.rects.reference[c] + n.rects.reference[l] - r[l] - n.rects.popper[c], g2 = r[l] - n.rects.reference[l], y2 = Kn(a2), C2 = y2 ? l === "y" ? y2.clientHeight || 0 : y2.clientWidth || 0 : 0, O2 = h3 / 2 - g2 / 2, T2 = d[m2], I2 = C2 - f2[c] - d[p], k2 = C2 / 2 - f2[c] / 2 + O2, A2 = _n(T2, k2, I2), $2 = l;
n.modifiersData[o] = (t = {}, t[$2] = A2, t.centerOffset = A2 - k2, t);
}
}
function dh(e) {
var t = e.state, n = e.options, o = n.element, i = o === void 0 ? "[data-popper-arrow]" : o;
i != null && (typeof i == "string" && (i = t.elements.popper.querySelector(i), !i) || !vs(t.elements.popper, i) || (t.elements.arrow = i));
}
var fh = { name: "arrow", enabled: true, phase: "main", fn: ch, effect: dh, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] };
function sn2(e) {
return e.split("-")[1];
}
var ph = { top: "auto", right: "auto", bottom: "auto", left: "auto" };
function hh(e) {
var t = e.x, n = e.y, o = window, i = o.devicePixelRatio || 1;
return { x: an2(t * i) / i || 0, y: an2(n * i) / i || 0 };
}
function Ya(e) {
var t, n = e.popper, o = e.popperRect, i = e.placement, a2 = e.variation, r = e.offsets, s = e.position, l = e.gpuAcceleration, u2 = e.adaptive, c = e.roundOffsets, d = e.isFixed, f2 = r.x, m2 = f2 === void 0 ? 0 : f2, p = r.y, h3 = p === void 0 ? 0 : p, g2 = typeof c == "function" ? c({ x: m2, y: h3 }) : { x: m2, y: h3 };
m2 = g2.x, h3 = g2.y;
var y2 = r.hasOwnProperty("x"), C2 = r.hasOwnProperty("y"), O2 = Ae, T2 = Te, I2 = window;
if (u2) {
var k2 = Kn(n), A2 = "clientHeight", $2 = "clientWidth";
if (k2 === We(n) && (k2 = kt(n), dt(k2).position !== "static" && s === "absolute" && (A2 = "scrollHeight", $2 = "scrollWidth")), k2 = k2, i === Te || (i === Ae || i === Ne) && a2 === Dn) {
T2 = De;
var N2 = d && k2 === I2 && I2.visualViewport ? I2.visualViewport.height : k2[A2];
h3 -= N2 - o.height, h3 *= l ? 1 : -1;
}
if (i === Ae || (i === Te || i === De) && a2 === Dn) {
O2 = Ne;
var K = d && k2 === I2 && I2.visualViewport ? I2.visualViewport.width : k2[$2];
m2 -= K - o.width, m2 *= l ? 1 : -1;
}
}
var B2 = Object.assign({ position: s }, u2 && ph), M2 = c === true ? hh({ x: m2, y: h3 }) : { x: m2, y: h3 };
if (m2 = M2.x, h3 = M2.y, l) {
var W2;
return Object.assign({}, B2, (W2 = {}, W2[T2] = C2 ? "0" : "", W2[O2] = y2 ? "0" : "", W2.transform = (I2.devicePixelRatio || 1) <= 1 ? "translate(" + m2 + "px, " + h3 + "px)" : "translate3d(" + m2 + "px, " + h3 + "px, 0)", W2));
}
return Object.assign({}, B2, (t = {}, t[T2] = C2 ? h3 + "px" : "", t[O2] = y2 ? m2 + "px" : "", t.transform = "", t));
}
function mh(e) {
var t = e.state, n = e.options, o = n.gpuAcceleration, i = o === void 0 ? true : o, a2 = n.adaptive, r = a2 === void 0 ? true : a2, s = n.roundOffsets, l = s === void 0 ? true : s, u2 = { placement: Qe(t.placement), variation: sn2(t.placement), popper: t.elements.popper, popperRect: t.rects.popper, gpuAcceleration: i, isFixed: t.options.strategy === "fixed" };
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Ya(Object.assign({}, u2, { offsets: t.modifiersData.popperOffsets, position: t.options.strategy, adaptive: r, roundOffsets: l })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Ya(Object.assign({}, u2, { offsets: t.modifiersData.arrow, position: "absolute", adaptive: false, roundOffsets: l })))), t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-placement": t.placement });
}
var ws = { name: "computeStyles", enabled: true, phase: "beforeWrite", fn: mh, data: {} };
var oo = { passive: true };
function vh(e) {
var t = e.state, n = e.instance, o = e.options, i = o.scroll, a2 = i === void 0 ? true : i, r = o.resize, s = r === void 0 ? true : r, l = We(t.elements.popper), u2 = [].concat(t.scrollParents.reference, t.scrollParents.popper);
return a2 && u2.forEach(function(c) {
c.addEventListener("scroll", n.update, oo);
}), s && l.addEventListener("resize", n.update, oo), function() {
a2 && u2.forEach(function(c) {
c.removeEventListener("scroll", n.update, oo);
}), s && l.removeEventListener("resize", n.update, oo);
};
}
var Ss = { name: "eventListeners", enabled: true, phase: "write", fn: function() {
}, effect: vh, data: {} };
var gh = { left: "right", right: "left", bottom: "top", top: "bottom" };
function po(e) {
return e.replace(/left|right|bottom|top/g, function(t) {
return gh[t];
});
}
var yh = { start: "end", end: "start" };
function Za(e) {
return e.replace(/start|end/g, function(t) {
return yh[t];
});
}
function zi(e) {
var t = We(e), n = t.pageXOffset, o = t.pageYOffset;
return { scrollLeft: n, scrollTop: o };
}
function Hi(e) {
return rn2(kt(e)).left + zi(e).scrollLeft;
}
function bh(e) {
var t = We(e), n = kt(e), o = t.visualViewport, i = n.clientWidth, a2 = n.clientHeight, r = 0, s = 0;
return o && (i = o.width, a2 = o.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (r = o.offsetLeft, s = o.offsetTop)), { width: i, height: a2, x: r + Hi(e), y: s };
}
function wh(e) {
var t, n = kt(e), o = zi(e), i = (t = e.ownerDocument) == null ? void 0 : t.body, a2 = Ft(n.scrollWidth, n.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), r = Ft(n.scrollHeight, n.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), s = -o.scrollLeft + Hi(e), l = -o.scrollTop;
return dt(i || n).direction === "rtl" && (s += Ft(n.clientWidth, i ? i.clientWidth : 0) - a2), { width: a2, height: r, x: s, y: l };
}
function ji(e) {
var t = dt(e), n = t.overflow, o = t.overflowX, i = t.overflowY;
return /auto|scroll|overlay|hidden/.test(n + i + o);
}
function Cs(e) {
return ["html", "body", "#document"].indexOf(et(e)) >= 0 ? e.ownerDocument.body : $e(e) && ji(e) ? e : Cs(Fo(e));
}
function Pn(e, t) {
var n;
t === void 0 && (t = []);
var o = Cs(e), i = o === ((n = e.ownerDocument) == null ? void 0 : n.body), a2 = We(o), r = i ? [a2].concat(a2.visualViewport || [], ji(o) ? o : []) : o, s = t.concat(r);
return i ? s : s.concat(Pn(Fo(r)));
}
function mi(e) {
return Object.assign({}, e, { left: e.x, top: e.y, right: e.x + e.width, bottom: e.y + e.height });
}
function Sh(e) {
var t = rn2(e);
return t.top = t.top + e.clientTop, t.left = t.left + e.clientLeft, t.bottom = t.top + e.clientHeight, t.right = t.left + e.clientWidth, t.width = e.clientWidth, t.height = e.clientHeight, t.x = t.left, t.y = t.top, t;
}
function Qa(e, t) {
return t === hs ? mi(bh(e)) : on2(t) ? Sh(t) : mi(wh(kt(e)));
}
function Ch(e) {
var t = Pn(Fo(e)), n = ["absolute", "fixed"].indexOf(dt(e).position) >= 0, o = n && $e(e) ? Kn(e) : e;
return on2(o) ? t.filter(function(i) {
return on2(i) && vs(i, o) && et(i) !== "body";
}) : [];
}
function Eh(e, t, n) {
var o = t === "clippingParents" ? Ch(e) : [].concat(t), i = [].concat(o, [n]), a2 = i[0], r = i.reduce(function(s, l) {
var u2 = Qa(e, l);
return s.top = Ft(u2.top, s.top), s.right = So(u2.right, s.right), s.bottom = So(u2.bottom, s.bottom), s.left = Ft(u2.left, s.left), s;
}, Qa(e, a2));
return r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
}
function Es(e) {
var t = e.reference, n = e.element, o = e.placement, i = o ? Qe(o) : null, a2 = o ? sn2(o) : null, r = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, l;
switch (i) {
case Te:
l = { x: r, y: t.y - n.height };
break;
case De:
l = { x: r, y: t.y + t.height };
break;
case Ne:
l = { x: t.x + t.width, y: s };
break;
case Ae:
l = { x: t.x - n.width, y: s };
break;
default:
l = { x: t.x, y: t.y };
}
var u2 = i ? Vi(i) : null;
if (u2 != null) {
var c = u2 === "y" ? "height" : "width";
switch (a2) {
case nn2:
l[u2] = l[u2] - (t[c] / 2 - n[c] / 2);
break;
case Dn:
l[u2] = l[u2] + (t[c] / 2 - n[c] / 2);
break;
}
}
return l;
}
function Nn(e, t) {
t === void 0 && (t = {});
var n = t, o = n.placement, i = o === void 0 ? e.placement : o, a2 = n.boundary, r = a2 === void 0 ? Wp : a2, s = n.rootBoundary, l = s === void 0 ? hs : s, u2 = n.elementContext, c = u2 === void 0 ? Tn : u2, d = n.altBoundary, f2 = d === void 0 ? false : d, m2 = n.padding, p = m2 === void 0 ? 0 : m2, h3 = ys(typeof p != "number" ? p : bs(p, jn)), g2 = c === Tn ? qp : Tn, y2 = e.rects.popper, C2 = e.elements[f2 ? g2 : c], O2 = Eh(on2(C2) ? C2 : C2.contextElement || kt(e.elements.popper), r, l), T2 = rn2(e.elements.reference), I2 = Es({ reference: T2, element: y2, strategy: "absolute", placement: i }), k2 = mi(Object.assign({}, y2, I2)), A2 = c === Tn ? k2 : T2, $2 = { top: O2.top - A2.top + h3.top, bottom: A2.bottom - O2.bottom + h3.bottom, left: O2.left - A2.left + h3.left, right: A2.right - O2.right + h3.right }, N2 = e.modifiersData.offset;
if (c === Tn && N2) {
var K = N2[i];
Object.keys($2).forEach(function(B2) {
var M2 = [Ne, De].indexOf(B2) >= 0 ? 1 : -1, W2 = [Te, De].indexOf(B2) >= 0 ? "y" : "x";
$2[B2] += K[W2] * M2;
});
}
return $2;
}
function Ih(e, t) {
t === void 0 && (t = {});
var n = t, o = n.placement, i = n.boundary, a2 = n.rootBoundary, r = n.padding, s = n.flipVariations, l = n.allowedAutoPlacements, u2 = l === void 0 ? xo : l, c = sn2(o), d = c ? s ? Ga : Ga.filter(function(p) {
return sn2(p) === c;
}) : jn, f2 = d.filter(function(p) {
return u2.indexOf(p) >= 0;
});
f2.length === 0 && (f2 = d);
var m2 = f2.reduce(function(p, h3) {
return p[h3] = Nn(e, { placement: h3, boundary: i, rootBoundary: a2, padding: r })[Qe(h3)], p;
}, {});
return Object.keys(m2).sort(function(p, h3) {
return m2[p] - m2[h3];
});
}
function kh(e) {
if (Qe(e) === Di) return [];
var t = po(e);
return [Za(e), t, Za(t)];
}
function Th(e) {
var t = e.state, n = e.options, o = e.name;
if (!t.modifiersData[o]._skip) {
for (var i = n.mainAxis, a2 = i === void 0 ? true : i, r = n.altAxis, s = r === void 0 ? true : r, l = n.fallbackPlacements, u2 = n.padding, c = n.boundary, d = n.rootBoundary, f2 = n.altBoundary, m2 = n.flipVariations, p = m2 === void 0 ? true : m2, h3 = n.allowedAutoPlacements, g2 = t.options.placement, y2 = Qe(g2), C2 = y2 === g2, O2 = l || (C2 || !p ? [po(g2)] : kh(g2)), T2 = [g2].concat(O2).reduce(function(Ge, Ce) {
return Ge.concat(Qe(Ce) === Di ? Ih(t, { placement: Ce, boundary: c, rootBoundary: d, padding: u2, flipVariations: p, allowedAutoPlacements: h3 }) : Ce);
}, []), I2 = t.rects.reference, k2 = t.rects.popper, A2 = /* @__PURE__ */ new Map(), $2 = true, N2 = T2[0], K = 0; K < T2.length; K++) {
var B2 = T2[K], M2 = Qe(B2), W2 = sn2(B2) === nn2, de = [Te, De].indexOf(M2) >= 0, Y = de ? "width" : "height", D2 = Nn(t, { placement: B2, boundary: c, rootBoundary: d, altBoundary: f2, padding: u2 }), ne = de ? W2 ? Ne : Ae : W2 ? De : Te;
I2[Y] > k2[Y] && (ne = po(ne));
var xe = po(ne), ye = [];
if (a2 && ye.push(D2[M2] <= 0), s && ye.push(D2[ne] <= 0, D2[xe] <= 0), ye.every(function(Ge) {
return Ge;
})) {
N2 = B2, $2 = false;
break;
}
A2.set(B2, ye);
}
if ($2) for (var be = p ? 3 : 1, _e = function(Ge) {
var Ce = T2.find(function(ue) {
var Tt = A2.get(ue);
if (Tt) return Tt.slice(0, Ge).every(function(ht) {
return ht;
});
});
if (Ce) return N2 = Ce, "break";
}, qe = be; qe > 0; qe--) {
var jt = _e(qe);
if (jt === "break") break;
}
t.placement !== N2 && (t.modifiersData[o]._skip = true, t.placement = N2, t.reset = true);
}
}
var Ah = { name: "flip", enabled: true, phase: "main", fn: Th, requiresIfExists: ["offset"], data: { _skip: false } };
function Xa(e, t, n) {
return n === void 0 && (n = { x: 0, y: 0 }), { top: e.top - t.height - n.y, right: e.right - t.width + n.x, bottom: e.bottom - t.height + n.y, left: e.left - t.width - n.x };
}
function er(e) {
return [Te, Ne, De, Ae].some(function(t) {
return e[t] >= 0;
});
}
function Oh(e) {
var t = e.state, n = e.name, o = t.rects.reference, i = t.rects.popper, a2 = t.modifiersData.preventOverflow, r = Nn(t, { elementContext: "reference" }), s = Nn(t, { altBoundary: true }), l = Xa(r, o), u2 = Xa(s, i, a2), c = er(l), d = er(u2);
t.modifiersData[n] = { referenceClippingOffsets: l, popperEscapeOffsets: u2, isReferenceHidden: c, hasPopperEscaped: d }, t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-reference-hidden": c, "data-popper-escaped": d });
}
var Mh = { name: "hide", enabled: true, phase: "main", requiresIfExists: ["preventOverflow"], fn: Oh };
function _h(e, t, n) {
var o = Qe(e), i = [Ae, Te].indexOf(o) >= 0 ? -1 : 1, a2 = typeof n == "function" ? n(Object.assign({}, t, { placement: e })) : n, r = a2[0], s = a2[1];
return r = r || 0, s = (s || 0) * i, [Ae, Ne].indexOf(o) >= 0 ? { x: s, y: r } : { x: r, y: s };
}
function Ph(e) {
var t = e.state, n = e.options, o = e.name, i = n.offset, a2 = i === void 0 ? [0, 0] : i, r = xo.reduce(function(c, d) {
return c[d] = _h(d, t.rects, a2), c;
}, {}), s = r[t.placement], l = s.x, u2 = s.y;
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += u2), t.modifiersData[o] = r;
}
var Lh = { name: "offset", enabled: true, phase: "main", requires: ["popperOffsets"], fn: Ph };
function xh(e) {
var t = e.state, n = e.name;
t.modifiersData[n] = Es({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement });
}
var Is = { name: "popperOffsets", enabled: true, phase: "read", fn: xh, data: {} };
function Fh(e) {
return e === "x" ? "y" : "x";
}
function Rh(e) {
var t = e.state, n = e.options, o = e.name, i = n.mainAxis, a2 = i === void 0 ? true : i, r = n.altAxis, s = r === void 0 ? false : r, l = n.boundary, u2 = n.rootBoundary, c = n.altBoundary, d = n.padding, f2 = n.tether, m2 = f2 === void 0 ? true : f2, p = n.tetherOffset, h3 = p === void 0 ? 0 : p, g2 = Nn(t, { boundary: l, rootBoundary: u2, padding: d, altBoundary: c }), y2 = Qe(t.placement), C2 = sn2(t.placement), O2 = !C2, T2 = Vi(y2), I2 = Fh(T2), k2 = t.modifiersData.popperOffsets, A2 = t.rects.reference, $2 = t.rects.popper, N2 = typeof h3 == "function" ? h3(Object.assign({}, t.rects, { placement: t.placement })) : h3, K = typeof N2 == "number" ? { mainAxis: N2, altAxis: N2 } : Object.assign({ mainAxis: 0, altAxis: 0 }, N2), B2 = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, M2 = { x: 0, y: 0 };
if (k2) {
if (a2) {
var W2, de = T2 === "y" ? Te : Ae, Y = T2 === "y" ? De : Ne, D2 = T2 === "y" ? "height" : "width", ne = k2[T2], xe = ne + g2[de], ye = ne - g2[Y], be = m2 ? -$2[D2] / 2 : 0, _e = C2 === nn2 ? A2[D2] : $2[D2], qe = C2 === nn2 ? -$2[D2] : -A2[D2], jt = t.elements.arrow, Ge = m2 && jt ? Bi(jt) : { width: 0, height: 0 }, Ce = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : gs(), ue = Ce[de], Tt = Ce[Y], ht = _n(0, A2[D2], Ge[D2]), qn = O2 ? A2[D2] / 2 - be - ht - ue - K.mainAxis : _e - ht - ue - K.mainAxis, Gn = O2 ? -A2[D2] / 2 + be + ht + Tt + K.mainAxis : qe + ht + Tt + K.mainAxis, mn = t.elements.arrow && Kn(t.elements.arrow), Ho = mn ? T2 === "y" ? mn.clientTop || 0 : mn.clientLeft || 0 : 0, Jn = (W2 = B2 == null ? void 0 : B2[T2]) != null ? W2 : 0, jo = ne + qn - Jn - Ho, Ko = ne + Gn - Jn, At = _n(m2 ? So(xe, jo) : xe, ne, m2 ? Ft(ye, Ko) : ye);
k2[T2] = At, M2[T2] = At - ne;
}
if (s) {
var vn, Kt = T2 === "x" ? Te : Ae, Yn = T2 === "x" ? De : Ne, nt = k2[I2], Ut = I2 === "y" ? "height" : "width", gn2 = nt + g2[Kt], Zn = nt - g2[Yn], Ot = [Te, Ae].indexOf(y2) !== -1, yn = (vn = B2 == null ? void 0 : B2[I2]) != null ? vn : 0, bn = Ot ? gn2 : nt - A2[Ut] - $2[Ut] - yn + K.altAxis, wn2 = Ot ? nt + A2[Ut] + $2[Ut] - yn - K.altAxis : Zn, Sn = m2 && Ot ? lh(bn, nt, wn2) : _n(m2 ? bn : gn2, nt, m2 ? wn2 : Zn);
k2[I2] = Sn, M2[I2] = Sn - nt;
}
t.modifiersData[o] = M2;
}
}
var $h = { name: "preventOverflow", enabled: true, phase: "main", fn: Rh, requiresIfExists: ["offset"] };
function Dh(e) {
return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop };
}
function Nh(e) {
return e === We(e) || !$e(e) ? zi(e) : Dh(e);
}
function Bh(e) {
var t = e.getBoundingClientRect(), n = an2(t.width) / e.offsetWidth || 1, o = an2(t.height) / e.offsetHeight || 1;
return n !== 1 || o !== 1;
}
function Vh(e, t, n) {
n === void 0 && (n = false);
var o = $e(t), i = $e(t) && Bh(t), a2 = kt(t), r = rn2(e, i), s = { scrollLeft: 0, scrollTop: 0 }, l = { x: 0, y: 0 };
return (o || !o && !n) && ((et(t) !== "body" || ji(a2)) && (s = Nh(t)), $e(t) ? (l = rn2(t, true), l.x += t.clientLeft, l.y += t.clientTop) : a2 && (l.x = Hi(a2))), { x: r.left + s.scrollLeft - l.x, y: r.top + s.scrollTop - l.y, width: r.width, height: r.height };
}
function zh(e) {
var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), o = [];
e.forEach(function(a2) {
t.set(a2.name, a2);
});
function i(a2) {
n.add(a2.name);
var r = [].concat(a2.requires || [], a2.requiresIfExists || []);
r.forEach(function(s) {
if (!n.has(s)) {
var l = t.get(s);
l && i(l);
}
}), o.push(a2);
}
return e.forEach(function(a2) {
n.has(a2.name) || i(a2);
}), o;
}
function Hh(e) {
var t = zh(e);
return oh.reduce(function(n, o) {
return n.concat(t.filter(function(i) {
return i.phase === o;
}));
}, []);
}
function jh(e) {
var t;
return function() {
return t || (t = new Promise(function(n) {
Promise.resolve().then(function() {
t = void 0, n(e());
});
})), t;
};
}
function Kh(e) {
var t = e.reduce(function(n, o) {
var i = n[o.name];
return n[o.name] = i ? Object.assign({}, i, o, { options: Object.assign({}, i.options, o.options), data: Object.assign({}, i.data, o.data) }) : o, n;
}, {});
return Object.keys(t).map(function(n) {
return t[n];
});
}
var tr = { placement: "bottom", modifiers: [], strategy: "absolute" };
function nr() {
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n];
return !t.some(function(o) {
return !(o && typeof o.getBoundingClientRect == "function");
});
}
function Ki(e) {
e === void 0 && (e = {});
var t = e, n = t.defaultModifiers, o = n === void 0 ? [] : n, i = t.defaultOptions, a2 = i === void 0 ? tr : i;
return function(r, s, l) {
l === void 0 && (l = a2);
var u2 = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, tr, a2), modifiersData: {}, elements: { reference: r, popper: s }, attributes: {}, styles: {} }, c = [], d = false, f2 = { state: u2, setOptions: function(h3) {
var g2 = typeof h3 == "function" ? h3(u2.options) : h3;
p(), u2.options = Object.assign({}, a2, u2.options, g2), u2.scrollParents = { reference: on2(r) ? Pn(r) : r.contextElement ? Pn(r.contextElement) : [], popper: Pn(s) };
var y2 = Hh(Kh([].concat(o, u2.options.modifiers)));
return u2.orderedModifiers = y2.filter(function(C2) {
return C2.enabled;
}), m2(), f2.update();
}, forceUpdate: function() {
if (!d) {
var h3 = u2.elements, g2 = h3.reference, y2 = h3.popper;
if (nr(g2, y2)) {
u2.rects = { reference: Vh(g2, Kn(y2), u2.options.strategy === "fixed"), popper: Bi(y2) }, u2.reset = false, u2.placement = u2.options.placement, u2.orderedModifiers.forEach(function($2) {
return u2.modifiersData[$2.name] = Object.assign({}, $2.data);
});
for (var C2 = 0; C2 < u2.orderedModifiers.length; C2++) {
if (u2.reset === true) {
u2.reset = false, C2 = -1;
continue;
}
var O2 = u2.orderedModifiers[C2], T2 = O2.fn, I2 = O2.options, k2 = I2 === void 0 ? {} : I2, A2 = O2.name;
typeof T2 == "function" && (u2 = T2({ state: u2, options: k2, name: A2, instance: f2 }) || u2);
}
}
}
}, update: jh(function() {
return new Promise(function(h3) {
f2.forceUpdate(), h3(u2);
});
}), destroy: function() {
p(), d = true;
} };
if (!nr(r, s)) return f2;
f2.setOptions(l).then(function(h3) {
!d && l.onFirstUpdate && l.onFirstUpdate(h3);
});
function m2() {
u2.orderedModifiers.forEach(function(h3) {
var g2 = h3.name, y2 = h3.options, C2 = y2 === void 0 ? {} : y2, O2 = h3.effect;
if (typeof O2 == "function") {
var T2 = O2({ state: u2, name: g2, instance: f2, options: C2 }), I2 = function() {
};
c.push(T2 || I2);
}
});
}
function p() {
c.forEach(function(h3) {
return h3();
}), c = [];
}
return f2;
};
}
Ki();
var Uh = [Ss, Is, ws, ms];
Ki({ defaultModifiers: Uh });
var Wh = [Ss, Is, ws, ms, Lh, Ah, $h, fh, Mh];
var qh = Ki({ defaultModifiers: Wh });
var Gh = (e, t, n = {}) => {
const o = {
name: "updateState",
enabled: true,
phase: "write",
fn: ({ state: l }) => {
const u2 = Jh(l);
Object.assign(r.value, u2);
},
requires: ["computeStyles"]
}, i = computed(() => {
const { onFirstUpdate: l, placement: u2, strategy: c, modifiers: d } = unref(n);
return {
onFirstUpdate: l,
placement: u2 || "bottom",
strategy: c || "absolute",
modifiers: [
...d || [],
o,
{ name: "applyStyles", enabled: false }
]
};
}), a2 = shallowRef(), r = ref({
styles: {
popper: {
position: unref(i).strategy,
left: "0",
top: "0"
},
arrow: {
position: "absolute"
}
},
attributes: {}
}), s = () => {
a2.value && (a2.value.destroy(), a2.value = void 0);
};
return watch(i, (l) => {
const u2 = unref(a2);
u2 && u2.setOptions(l);
}, {
deep: true
}), watch([e, t], ([l, u2]) => {
s(), !(!l || !u2) && (a2.value = qh(l, u2, unref(i)));
}), onBeforeUnmount(() => {
s();
}), {
state: computed(() => {
var l;
return { ...((l = unref(a2)) == null ? void 0 : l.state) || {} };
}),
styles: computed(() => unref(r).styles),
attributes: computed(() => unref(r).attributes),
update: () => {
var l;
return (l = unref(a2)) == null ? void 0 : l.update();
},
forceUpdate: () => {
var l;
return (l = unref(a2)) == null ? void 0 : l.forceUpdate();
},
instanceRef: computed(() => unref(a2))
};
};
function Jh(e) {
const t = Object.keys(e.elements), n = pi(t.map((i) => [i, e.styles[i] || {}])), o = pi(t.map((i) => [i, e.attributes[i]]));
return {
styles: n,
attributes: o
};
}
var ks = (e) => {
if (!e)
return { onClick: Lt, onMousedown: Lt, onMouseup: Lt };
let t = false, n = false;
return { onClick: (r) => {
t && n && e(r), t = n = false;
}, onMousedown: (r) => {
t = r.target === r.currentTarget;
}, onMouseup: (r) => {
n = r.target === r.currentTarget;
} };
};
function or() {
let e;
const t = (o, i) => {
n(), e = window.setTimeout(o, i);
}, n = () => window.clearTimeout(e);
return zn(() => n()), {
registerTimeout: t,
cancelTimeout: n
};
}
var vi = {
prefix: Math.floor(Math.random() * 1e4),
current: 0
};
var Yh = Symbol("elIdInjection");
var Ts = () => getCurrentInstance() ? inject(Yh, vi) : vi;
var Dt = (e) => {
const t = Ts();
!se && t === vi && Oe("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
usage: app.provide(ID_INJECTION_KEY, {
prefix: number,
current: number,
})`);
const n = $i();
return computed(() => unref(e) || `${n.value}-id-${t.prefix}-${t.current++}`);
};
var Qt = [];
var ir = (e) => {
const t = e;
t.key === $n.esc && Qt.forEach((n) => n(t));
};
var Zh = (e) => {
onMounted(() => {
Qt.length === 0 && document.addEventListener("keydown", ir), se && Qt.push(e);
}), onBeforeUnmount(() => {
Qt = Qt.filter((t) => t !== e), Qt.length === 0 && se && document.removeEventListener("keydown", ir);
});
};
var ar;
var As = () => {
const e = $i(), t = Ts(), n = computed(() => `${e.value}-popper-container-${t.prefix}`), o = computed(() => `#${n.value}`);
return {
id: n,
selector: o
};
};
var Qh = (e) => {
const t = document.createElement("div");
return t.id = e, document.body.appendChild(t), t;
};
var Xh = () => {
const { id: e, selector: t } = As();
return onBeforeMount(() => {
se && (!ar || !document.body.querySelector(t.value)) && (ar = Qh(e.value));
}), {
id: e,
selector: t
};
};
var em = Q({
showAfter: {
type: Number,
default: 0
},
hideAfter: {
type: Number,
default: 200
},
autoClose: {
type: Number,
default: 0
}
});
var tm = ({
showAfter: e,
hideAfter: t,
autoClose: n,
open: o,
close: i
}) => {
const { registerTimeout: a2 } = or(), {
registerTimeout: r,
cancelTimeout: s
} = or();
return {
onOpen: (c) => {
a2(() => {
o(c);
const d = unref(n);
me(d) && d > 0 && r(() => {
i(c);
}, d);
}, unref(e));
},
onClose: (c) => {
s(), a2(() => {
i(c);
}, unref(t));
}
};
};
var Os = Symbol("elForwardRef");
var nm = (e) => {
provide(Os, {
setForwardRef: (n) => {
e.value = n;
}
});
};
var om = (e) => ({
mounted(t) {
e(t);
},
updated(t) {
e(t);
},
unmounted() {
e(null);
}
});
var rr = {
current: 0
};
var sr = ref(0);
var Ms = 2e3;
var lr = Symbol("elZIndexContextKey");
var _s = Symbol("zIndexContextKey");
var Ui = (e) => {
const t = getCurrentInstance() ? inject(lr, rr) : rr, n = e || (getCurrentInstance() ? inject(_s, void 0) : void 0), o = computed(() => {
const r = unref(n);
return me(r) ? r : Ms;
}), i = computed(() => o.value + sr.value), a2 = () => (t.current++, sr.value = t.current, i.value);
return !se && !inject(lr) && Oe("ZIndexInjection", `Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`), {
initialZIndex: o,
currentZIndex: i,
nextZIndex: a2
};
};
var dn2 = Lo({
type: String,
values: cs,
required: false
});
var Ps = Symbol("size");
var im = () => {
const e = inject(Ps, {});
return computed(() => unref(e.size) || "");
};
function am(e, {
beforeFocus: t,
afterFocus: n,
beforeBlur: o,
afterBlur: i
} = {}) {
const a2 = getCurrentInstance(), { emit: r } = a2, s = shallowRef(), l = ref(false), u2 = (f2) => {
Se(t) && t(f2) || l.value || (l.value = true, r("focus", f2), n == null || n());
}, c = (f2) => {
var m2;
Se(o) && o(f2) || f2.relatedTarget && ((m2 = s.value) != null && m2.contains(f2.relatedTarget)) || (l.value = false, r("blur", f2), i == null || i());
}, d = () => {
var f2, m2;
(f2 = s.value) != null && f2.contains(document.activeElement) && s.value !== document.activeElement || (m2 = e.value) == null || m2.focus();
};
return watch(s, (f2) => {
f2 && f2.setAttribute("tabindex", "-1");
}), ze(s, "focus", u2, true), ze(s, "blur", c, true), ze(s, "click", d, true), false, {
isFocused: l,
wrapperRef: s,
handleFocus: u2,
handleBlur: c
};
}
function rm({
afterComposition: e,
emit: t
}) {
const n = ref(false), o = (s) => {
t == null || t("compositionstart", s), n.value = true;
}, i = (s) => {
var l;
t == null || t("compositionupdate", s);
const u2 = (l = s.target) == null ? void 0 : l.value, c = u2[u2.length - 1] || "";
n.value = !Rp(c);
}, a2 = (s) => {
t == null || t("compositionend", s), n.value && (n.value = false, nextTick(() => e(s)));
};
return {
isComposing: n,
handleComposition: (s) => {
s.type === "compositionend" ? a2(s) : i(s);
},
handleCompositionStart: o,
handleCompositionUpdate: i,
handleCompositionEnd: a2
};
}
var Ls = Symbol("emptyValuesContextKey");
var sm = "use-empty-values";
var lm = ["", void 0, null];
var um = void 0;
var cm = Q({
emptyValues: Array,
valueOnClear: {
type: [String, Number, Boolean, Function],
default: void 0,
validator: (e) => Se(e) ? !e() : !e
}
});
var dm = (e, t) => {
const n = getCurrentInstance() ? inject(Ls, ref({})) : ref({}), o = computed(() => e.emptyValues || n.value.emptyValues || lm), i = computed(() => Se(e.valueOnClear) ? e.valueOnClear() : e.valueOnClear !== void 0 ? e.valueOnClear : Se(n.value.valueOnClear) ? n.value.valueOnClear() : n.value.valueOnClear !== void 0 ? n.value.valueOnClear : um), a2 = (r) => o.value.includes(r);
return o.value.includes(i.value) || Oe(sm, "value-on-clear should be a value of empty-values"), {
emptyValues: o,
valueOnClear: i,
isEmptyValue: a2
};
};
var fm = Q({
ariaLabel: String,
ariaOrientation: {
type: String,
values: ["horizontal", "vertical", "undefined"]
},
ariaControls: String
});
var Ht = (e) => as(fm, e);
var xs = Symbol();
var Co = ref();
function Ro(e, t = void 0) {
const n = getCurrentInstance() ? inject(xs, Co) : Co;
return e ? computed(() => {
var o, i;
return (i = (o = n.value) == null ? void 0 : o[e]) != null ? i : t;
}) : n;
}
function pm(e, t) {
const n = Ro(), o = te(e, computed(() => {
var s;
return ((s = n.value) == null ? void 0 : s.namespace) || Mn;
})), i = Ri(computed(() => {
var s;
return (s = n.value) == null ? void 0 : s.locale;
})), a2 = Ui(computed(() => {
var s;
return ((s = n.value) == null ? void 0 : s.zIndex) || Ms;
})), r = computed(() => {
var s;
return unref(t) || ((s = n.value) == null ? void 0 : s.size) || "";
});
return hm(computed(() => unref(n) || {})), {
ns: o,
locale: i,
zIndex: a2,
size: r
};
}
var hm = (e, t, n = false) => {
var o;
const i = !!getCurrentInstance(), a2 = i ? Ro() : void 0, r = (o = void 0) != null ? o : i ? provide : void 0;
if (!r) {
Oe("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup().");
return;
}
const s = computed(() => {
const l = unref(e);
return a2 != null && a2.value ? mm(a2.value, l) : l;
});
return r(xs, s), r(ds, computed(() => s.value.locale)), r(fs, computed(() => s.value.namespace)), r(_s, computed(() => s.value.zIndex)), r(Ps, {
size: computed(() => s.value.size || "")
}), r(Ls, computed(() => ({
emptyValues: s.value.emptyValues,
valueOnClear: s.value.valueOnClear
}))), (n || !Co.value) && (Co.value = s.value), s;
};
var mm = (e, t) => {
const n = [.../* @__PURE__ */ new Set([...Wa(e), ...Wa(t)])], o = {};
for (const i of n)
o[i] = t[i] !== void 0 ? t[i] : e[i];
return o;
};
var X = (e, t) => {
const n = e.__vccOpts || e;
for (const [o, i] of t)
n[o] = i;
return n;
};
var vm = Q({
size: {
type: U2([Number, String])
},
color: {
type: String
}
});
var gm = defineComponent({
name: "ElIcon",
inheritAttrs: false
});
var ym = defineComponent({
...gm,
props: vm,
setup(e) {
const t = e, n = te("icon"), o = computed(() => {
const { size: i, color: a2 } = t;
return !i && !a2 ? {} : {
fontSize: Ct(i) ? void 0 : $t(i),
"--color": a2
};
});
return (i, a2) => (openBlock(), createElementBlock("i", mergeProps({
class: unref(n).b(),
style: unref(o)
}, i.$attrs), [
renderSlot(i.$slots, "default")
], 16));
}
});
var bm = X(ym, [["__file", "icon.vue"]]);
var Ue = Me(bm);
var Wi = Symbol("formContextKey");
var Eo = Symbol("formItemContextKey");
var ln2 = (e, t = {}) => {
const n = ref(void 0), o = t.prop ? n : ps("size"), i = t.global ? n : im(), a2 = t.form ? { size: void 0 } : inject(Wi, void 0), r = t.formItem ? { size: void 0 } : inject(Eo, void 0);
return computed(() => o.value || unref(e) || (r == null ? void 0 : r.size) || (a2 == null ? void 0 : a2.size) || i.value || "");
};
var $o = (e) => {
const t = ps("disabled"), n = inject(Wi, void 0);
return computed(() => t.value || unref(e) || (n == null ? void 0 : n.disabled) || false);
};
var fn = () => {
const e = inject(Wi, void 0), t = inject(Eo, void 0);
return {
form: e,
formItem: t
};
};
var Do = (e, {
formItemContext: t,
disableIdGeneration: n,
disableIdManagement: o
}) => {
n || (n = ref(false)), o || (o = ref(false));
const i = ref();
let a2;
const r = computed(() => {
var s;
return !!(!(e.label || e.ariaLabel) && t && t.inputIds && ((s = t.inputIds) == null ? void 0 : s.length) <= 1);
});
return onMounted(() => {
a2 = watch([toRef(e, "id"), n], ([s, l]) => {
const u2 = s ?? (l ? void 0 : Dt().value);
u2 !== i.value && (t != null && t.removeInputId && (i.value && t.removeInputId(i.value), !(o != null && o.value) && !l && u2 && t.addInputId(u2)), i.value = u2);
}, { immediate: true });
}), onUnmounted(() => {
a2 && a2(), t != null && t.removeInputId && i.value && t.removeInputId(i.value);
}), {
isLabeledByFormItem: r,
inputId: i
};
};
var qt = 4;
var wm = {
vertical: {
offset: "offsetHeight",
scroll: "scrollTop",
scrollSize: "scrollHeight",
size: "height",
key: "vertical",
axis: "Y",
client: "clientY",
direction: "top"
},
horizontal: {
offset: "offsetWidth",
scroll: "scrollLeft",
scrollSize: "scrollWidth",
size: "width",
key: "horizontal",
axis: "X",
client: "clientX",
direction: "left"
}
};
var Sm = ({
move: e,
size: t,
bar: n
}) => ({
[n.size]: t,
transform: `translate${n.axis}(${e}%)`
});
var qi = Symbol("scrollbarContextKey");
var Cm = Q({
vertical: Boolean,
size: String,
move: Number,
ratio: {
type: Number,
required: true
},
always: Boolean
});
var Em = "Thumb";
var Im = defineComponent({
__name: "thumb",
props: Cm,
setup(e) {
const t = e, n = inject(qi), o = te("scrollbar");
n || ss(Em, "can not inject scrollbar context");
const i = ref(), a2 = ref(), r = ref({}), s = ref(false);
let l = false, u2 = false, c = se ? document.onselectstart : null;
const d = computed(() => wm[t.vertical ? "vertical" : "horizontal"]), f2 = computed(() => Sm({
size: t.size,
move: t.move,
bar: d.value
})), m2 = computed(() => i.value[d.value.offset] ** 2 / n.wrapElement[d.value.scrollSize] / t.ratio / a2.value[d.value.offset]), p = (k2) => {
var A2;
if (k2.stopPropagation(), k2.ctrlKey || [1, 2].includes(k2.button))
return;
(A2 = window.getSelection()) == null || A2.removeAllRanges(), g2(k2);
const $2 = k2.currentTarget;
$2 && (r.value[d.value.axis] = $2[d.value.offset] - (k2[d.value.client] - $2.getBoundingClientRect()[d.value.direction]));
}, h3 = (k2) => {
if (!a2.value || !i.value || !n.wrapElement)
return;
const A2 = Math.abs(k2.target.getBoundingClientRect()[d.value.direction] - k2[d.value.client]), $2 = a2.value[d.value.offset] / 2, N2 = (A2 - $2) * 100 * m2.value / i.value[d.value.offset];
n.wrapElement[d.value.scroll] = N2 * n.wrapElement[d.value.scrollSize] / 100;
}, g2 = (k2) => {
k2.stopImmediatePropagation(), l = true, document.addEventListener("mousemove", y2), document.addEventListener("mouseup", C2), c = document.onselectstart, document.onselectstart = () => false;
}, y2 = (k2) => {
if (!i.value || !a2.value || l === false)
return;
const A2 = r.value[d.value.axis];
if (!A2)
return;
const $2 = (i.value.getBoundingClientRect()[d.value.direction] - k2[d.value.client]) * -1, N2 = a2.value[d.value.offset] - A2, K = ($2 - N2) * 100 * m2.value / i.value[d.value.offset];
n.wrapElement[d.value.scroll] = K * n.wrapElement[d.value.scrollSize] / 100;
}, C2 = () => {
l = false, r.value[d.value.axis] = 0, document.removeEventListener("mousemove", y2), document.removeEventListener("mouseup", C2), I2(), u2 && (s.value = false);
}, O2 = () => {
u2 = false, s.value = !!t.size;
}, T2 = () => {
u2 = true, s.value = l;
};
onBeforeUnmount(() => {
I2(), document.removeEventListener("mouseup", C2);
});
const I2 = () => {
document.onselectstart !== c && (document.onselectstart = c);
};
return ze(toRef(n, "scrollbarElement"), "mousemove", O2), ze(toRef(n, "scrollbarElement"), "mouseleave", T2), (k2, A2) => (openBlock(), createBlock(Transition, {
name: unref(o).b("fade"),
persisted: ""
}, {
default: withCtx(() => [
withDirectives(createBaseVNode("div", {
ref_key: "instance",
ref: i,
class: normalizeClass([unref(o).e("bar"), unref(o).is(unref(d).key)]),
onMousedown: h3
}, [
createBaseVNode("div", {
ref_key: "thumb",
ref: a2,
class: normalizeClass(unref(o).e("thumb")),
style: normalizeStyle(unref(f2)),
onMousedown: p
}, null, 38)
], 34), [
[vShow, k2.always || s.value]
])
]),
_: 1
}, 8, ["name"]));
}
});
var ur = X(Im, [["__file", "thumb.vue"]]);
var km = Q({
always: {
type: Boolean,
default: true
},
minSize: {
type: Number,
required: true
}
});
var Tm = defineComponent({
__name: "bar",
props: km,
setup(e, { expose: t }) {
const n = e, o = inject(qi), i = ref(0), a2 = ref(0), r = ref(""), s = ref(""), l = ref(1), u2 = ref(1);
return t({
handleScroll: (f2) => {
if (f2) {
const m2 = f2.offsetHeight - qt, p = f2.offsetWidth - qt;
a2.value = f2.scrollTop * 100 / m2 * l.value, i.value = f2.scrollLeft * 100 / p * u2.value;
}
},
update: () => {
const f2 = o == null ? void 0 : o.wrapElement;
if (!f2)
return;
const m2 = f2.offsetHeight - qt, p = f2.offsetWidth - qt, h3 = m2 ** 2 / f2.scrollHeight, g2 = p ** 2 / f2.scrollWidth, y2 = Math.max(h3, n.minSize), C2 = Math.max(g2, n.minSize);
l.value = h3 / (m2 - h3) / (y2 / (m2 - y2)), u2.value = g2 / (p - g2) / (C2 / (p - C2)), s.value = y2 + qt < m2 ? `${y2}px` : "", r.value = C2 + qt < p ? `${C2}px` : "";
}
}), (f2, m2) => (openBlock(), createElementBlock(Fragment, null, [
createVNode(ur, {
move: i.value,
ratio: u2.value,
size: r.value,
always: f2.always
}, null, 8, ["move", "ratio", "size", "always"]),
createVNode(ur, {
move: a2.value,
ratio: l.value,
size: s.value,
vertical: "",
always: f2.always
}, null, 8, ["move", "ratio", "size", "always"])
], 64));
}
});
var Am = X(Tm, [["__file", "bar.vue"]]);
var Om = Q({
height: {
type: [String, Number],
default: ""
},
maxHeight: {
type: [String, Number],
default: ""
},
native: {
type: Boolean,
default: false
},
wrapStyle: {
type: U2([String, Object, Array]),
default: ""
},
wrapClass: {
type: [String, Array],
default: ""
},
viewClass: {
type: [String, Array],
default: ""
},
viewStyle: {
type: [String, Array, Object],
default: ""
},
noresize: Boolean,
tag: {
type: String,
default: "div"
},
always: Boolean,
minSize: {
type: Number,
default: 20
},
tabindex: {
type: [String, Number],
default: void 0
},
id: String,
role: String,
...Ht(["ariaLabel", "ariaOrientation"])
});
var Mm = {
scroll: ({
scrollTop: e,
scrollLeft: t
}) => [e, t].every(me)
};
var gi = "ElScrollbar";
var _m = defineComponent({
name: gi
});
var Pm = defineComponent({
..._m,
props: Om,
emits: Mm,
setup(e, { expose: t, emit: n }) {
const o = e, i = te("scrollbar");
let a2, r, s = 0, l = 0;
const u2 = ref(), c = ref(), d = ref(), f2 = ref(), m2 = computed(() => {
const I2 = {};
return o.height && (I2.height = $t(o.height)), o.maxHeight && (I2.maxHeight = $t(o.maxHeight)), [o.wrapStyle, I2];
}), p = computed(() => [
o.wrapClass,
i.e("wrap"),
{ [i.em("wrap", "hidden-default")]: !o.native }
]), h3 = computed(() => [i.e("view"), o.viewClass]), g2 = () => {
var I2;
c.value && ((I2 = f2.value) == null || I2.handleScroll(c.value), s = c.value.scrollTop, l = c.value.scrollLeft, n("scroll", {
scrollTop: c.value.scrollTop,
scrollLeft: c.value.scrollLeft
}));
};
function y2(I2, k2) {
ke(I2) ? c.value.scrollTo(I2) : me(I2) && me(k2) && c.value.scrollTo(I2, k2);
}
const C2 = (I2) => {
if (!me(I2)) {
Oe(gi, "value must be a number");
return;
}
c.value.scrollTop = I2;
}, O2 = (I2) => {
if (!me(I2)) {
Oe(gi, "value must be a number");
return;
}
c.value.scrollLeft = I2;
}, T2 = () => {
var I2;
(I2 = f2.value) == null || I2.update();
};
return watch(() => o.noresize, (I2) => {
I2 ? (a2 == null || a2(), r == null || r()) : ({ stop: a2 } = bt(d, T2), r = ze("resize", T2));
}, { immediate: true }), watch(() => [o.maxHeight, o.height], () => {
o.native || nextTick(() => {
var I2;
T2(), c.value && ((I2 = f2.value) == null || I2.handleScroll(c.value));
});
}), provide(qi, reactive({
scrollbarElement: u2,
wrapElement: c
})), onActivated(() => {
c.value && (c.value.scrollTop = s, c.value.scrollLeft = l);
}), onMounted(() => {
o.native || nextTick(() => {
T2();
});
}), onUpdated(() => T2()), t({
wrapRef: c,
update: T2,
scrollTo: y2,
setScrollTop: C2,
setScrollLeft: O2,
handleScroll: g2
}), (I2, k2) => (openBlock(), createElementBlock("div", {
ref_key: "scrollbarRef",
ref: u2,
class: normalizeClass(unref(i).b())
}, [
createBaseVNode("div", {
ref_key: "wrapRef",
ref: c,
class: normalizeClass(unref(p)),
style: normalizeStyle(unref(m2)),
tabindex: I2.tabindex,
onScroll: g2
}, [
(openBlock(), createBlock(resolveDynamicComponent(I2.tag), {
id: I2.id,
ref_key: "resizeRef",
ref: d,
class: normalizeClass(unref(h3)),
style: normalizeStyle(I2.viewStyle),
role: I2.role,
"aria-label": I2.ariaLabel,
"aria-orientation": I2.ariaOrientation
}, {
default: withCtx(() => [
renderSlot(I2.$slots, "default")
]),
_: 3
}, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"]))
], 46, ["tabindex"]),
I2.native ? createCommentVNode("v-if", true) : (openBlock(), createBlock(Am, {
key: 0,
ref_key: "barRef",
ref: f2,
always: I2.always,
"min-size": I2.minSize
}, null, 8, ["always", "min-size"]))
], 2));
}
});
var Lm = X(Pm, [["__file", "scrollbar.vue"]]);
var xm = Me(Lm);
var Gi = Symbol("popper");
var Fs = Symbol("popperContent");
var Fm = [
"dialog",
"grid",
"group",
"listbox",
"menu",
"navigation",
"tooltip",
"tree"
];
var Rs = Q({
role: {
type: String,
values: Fm,
default: "tooltip"
}
});
var Rm = defineComponent({
name: "ElPopper",
inheritAttrs: false
});
var $m = defineComponent({
...Rm,
props: Rs,
setup(e, { expose: t }) {
const n = e, o = ref(), i = ref(), a2 = ref(), r = ref(), s = computed(() => n.role), l = {
triggerRef: o,
popperInstanceRef: i,
contentRef: a2,
referenceRef: r,
role: s
};
return t(l), provide(Gi, l), (u2, c) => renderSlot(u2.$slots, "default");
}
});
var Dm = X($m, [["__file", "popper.vue"]]);
var $s = Q({
arrowOffset: {
type: Number,
default: 5
}
});
var Nm = defineComponent({
name: "ElPopperArrow",
inheritAttrs: false
});
var Bm = defineComponent({
...Nm,
props: $s,
setup(e, { expose: t }) {
const n = e, o = te("popper"), { arrowOffset: i, arrowRef: a2, arrowStyle: r } = inject(Fs, void 0);
return watch(() => n.arrowOffset, (s) => {
i.value = s;
}), onBeforeUnmount(() => {
a2.value = void 0;
}), t({
arrowRef: a2
}), (s, l) => (openBlock(), createElementBlock("span", {
ref_key: "arrowRef",
ref: a2,
class: normalizeClass(unref(o).e("arrow")),
style: normalizeStyle(unref(r)),
"data-popper-arrow": ""
}, null, 6));
}
});
var Vm = X(Bm, [["__file", "arrow.vue"]]);
var Zo = "ElOnlyChild";
var zm = defineComponent({
name: Zo,
setup(e, {
slots: t,
attrs: n
}) {
var o;
const i = inject(Os), a2 = om((o = i == null ? void 0 : i.setForwardRef) != null ? o : Lt);
return () => {
var r;
const s = (r = t.default) == null ? void 0 : r.call(t, n);
if (!s)
return null;
if (s.length > 1)
return Oe(Zo, "requires exact only one valid child."), null;
const l = Ds(s);
return l ? withDirectives(cloneVNode(l, n), [[a2]]) : (Oe(Zo, "no valid child node found"), null);
};
}
});
function Ds(e) {
if (!e)
return null;
const t = e;
for (const n of t) {
if (ke(n))
switch (n.type) {
case Comment:
continue;
case Text:
case "svg":
return cr(n);
case Fragment:
return Ds(n.children);
default:
return n;
}
return cr(n);
}
return null;
}
function cr(e) {
const t = te("only-child");
return createVNode("span", {
class: t.e("content")
}, [e]);
}
var Ns = Q({
virtualRef: {
type: U2(Object)
},
virtualTriggering: Boolean,
onMouseenter: {
type: U2(Function)
},
onMouseleave: {
type: U2(Function)
},
onClick: {
type: U2(Function)
},
onKeydown: {
type: U2(Function)
},
onFocus: {
type: U2(Function)
},
onBlur: {
type: U2(Function)
},
onContextmenu: {
type: U2(Function)
},
id: String,
open: Boolean
});
var Hm = defineComponent({
name: "ElPopperTrigger",
inheritAttrs: false
});
var jm = defineComponent({
...Hm,
props: Ns,
setup(e, { expose: t }) {
const n = e, { role: o, triggerRef: i } = inject(Gi, void 0);
nm(i);
const a2 = computed(() => s.value ? n.id : void 0), r = computed(() => {
if (o && o.value === "tooltip")
return n.open && n.id ? n.id : void 0;
}), s = computed(() => {
if (o && o.value !== "tooltip")
return o.value;
}), l = computed(() => s.value ? `${n.open}` : void 0);
let u2;
const c = [
"onMouseenter",
"onMouseleave",
"onClick",
"onKeydown",
"onFocus",
"onBlur",
"onContextmenu"
];
return onMounted(() => {
watch(() => n.virtualRef, (d) => {
d && (i.value = rt(d));
}, {
immediate: true
}), watch(i, (d, f2) => {
u2 == null || u2(), u2 = void 0, xt(d) && (c.forEach((m2) => {
var p;
const h3 = n[m2];
h3 && (d.addEventListener(m2.slice(2).toLowerCase(), h3), (p = f2 == null ? void 0 : f2.removeEventListener) == null || p.call(f2, m2.slice(2).toLowerCase(), h3));
}), u2 = watch([a2, r, s, l], (m2) => {
[
"aria-controls",
"aria-describedby",
"aria-haspopup",
"aria-expanded"
].forEach((p, h3) => {
Po(m2[h3]) ? d.removeAttribute(p) : d.setAttribute(p, m2[h3]);
});
}, { immediate: true })), xt(f2) && [
"aria-controls",
"aria-describedby",
"aria-haspopup",
"aria-expanded"
].forEach((m2) => f2.removeAttribute(m2));
}, {
immediate: true
});
}), onBeforeUnmount(() => {
if (u2 == null || u2(), u2 = void 0, i.value && xt(i.value)) {
const d = i.value;
c.forEach((f2) => {
const m2 = n[f2];
m2 && d.removeEventListener(f2.slice(2).toLowerCase(), m2);
}), i.value = void 0;
}
}), t({
triggerRef: i
}), (d, f2) => d.virtualTriggering ? createCommentVNode("v-if", true) : (openBlock(), createBlock(unref(zm), mergeProps({ key: 0 }, d.$attrs, {
"aria-controls": unref(a2),
"aria-describedby": unref(r),
"aria-expanded": unref(l),
"aria-haspopup": unref(s)
}), {
default: withCtx(() => [
renderSlot(d.$slots, "default")
]),
_: 3
}, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"]));
}
});
var Km = X(jm, [["__file", "trigger.vue"]]);
var Qo = "focus-trap.focus-after-trapped";
var Xo = "focus-trap.focus-after-released";
var Um = "focus-trap.focusout-prevented";
var dr = {
cancelable: true,
bubbles: false
};
var Wm = {
cancelable: true,
bubbles: false
};
var fr = "focusAfterTrapped";
var pr = "focusAfterReleased";
var Bs = Symbol("elFocusTrap");
var Ji = ref();
var No = ref(0);
var Yi = ref(0);
var io = 0;
var Vs = (e) => {
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
acceptNode: (o) => {
const i = o.tagName === "INPUT" && o.type === "hidden";
return o.disabled || o.hidden || i ? NodeFilter.FILTER_SKIP : o.tabIndex >= 0 || o === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
}
});
for (; n.nextNode(); )
t.push(n.currentNode);
return t;
};
var hr = (e, t) => {
for (const n of e)
if (!qm(n, t))
return n;
};
var qm = (e, t) => {
if (false)
return false;
if (getComputedStyle(e).visibility === "hidden")
return true;
for (; e; ) {
if (t && e === t)
return false;
if (getComputedStyle(e).display === "none")
return true;
e = e.parentElement;
}
return false;
};
var Gm = (e) => {
const t = Vs(e), n = hr(t, e), o = hr(t.reverse(), e);
return [n, o];
};
var Jm = (e) => e instanceof HTMLInputElement && "select" in e;
var gt = (e, t) => {
if (e && e.focus) {
const n = document.activeElement;
e.focus({ preventScroll: true }), Yi.value = window.performance.now(), e !== n && Jm(e) && t && e.select();
}
};
function mr(e, t) {
const n = [...e], o = e.indexOf(t);
return o !== -1 && n.splice(o, 1), n;
}
var Ym = () => {
let e = [];
return {
push: (o) => {
const i = e[0];
i && o !== i && i.pause(), e = mr(e, o), e.unshift(o);
},
remove: (o) => {
var i, a2;
e = mr(e, o), (a2 = (i = e[0]) == null ? void 0 : i.resume) == null || a2.call(i);
}
};
};
var Zm = (e, t = false) => {
const n = document.activeElement;
for (const o of e)
if (gt(o, t), document.activeElement !== n)
return;
};
var vr = Ym();
var Qm = () => No.value > Yi.value;
var ao = () => {
Ji.value = "pointer", No.value = window.performance.now();
};
var gr = () => {
Ji.value = "keyboard", No.value = window.performance.now();
};
var Xm = () => (onMounted(() => {
io === 0 && (document.addEventListener("mousedown", ao), document.addEventListener("touchstart", ao), document.addEventListener("keydown", gr)), io++;
}), onBeforeUnmount(() => {
io--, io <= 0 && (document.removeEventListener("mousedown", ao), document.removeEventListener("touchstart", ao), document.removeEventListener("keydown", gr));
}), {
focusReason: Ji,
lastUserFocusTimestamp: No,
lastAutomatedFocusTimestamp: Yi
});
var ro = (e) => new CustomEvent(Um, {
...Wm,
detail: e
});
var ev = defineComponent({
name: "ElFocusTrap",
inheritAttrs: false,
props: {
loop: Boolean,
trapped: Boolean,
focusTrapEl: Object,
focusStartEl: {
type: [Object, String],
default: "first"
}
},
emits: [
fr,
pr,
"focusin",
"focusout",
"focusout-prevented",
"release-requested"
],
setup(e, { emit: t }) {
const n = ref();
let o, i;
const { focusReason: a2 } = Xm();
Zh((p) => {
e.trapped && !r.paused && t("release-requested", p);
});
const r = {
paused: false,
pause() {
this.paused = true;
},
resume() {
this.paused = false;
}
}, s = (p) => {
if (!e.loop && !e.trapped || r.paused)
return;
const { key: h3, altKey: g2, ctrlKey: y2, metaKey: C2, currentTarget: O2, shiftKey: T2 } = p, { loop: I2 } = e, k2 = h3 === $n.tab && !g2 && !y2 && !C2, A2 = document.activeElement;
if (k2 && A2) {
const $2 = O2, [N2, K] = Gm($2);
if (N2 && K) {
if (!T2 && A2 === K) {
const M2 = ro({
focusReason: a2.value
});
t("focusout-prevented", M2), M2.defaultPrevented || (p.preventDefault(), I2 && gt(N2, true));
} else if (T2 && [N2, $2].includes(A2)) {
const M2 = ro({
focusReason: a2.value
});
t("focusout-prevented", M2), M2.defaultPrevented || (p.preventDefault(), I2 && gt(K, true));
}
} else if (A2 === $2) {
const M2 = ro({
focusReason: a2.value
});
t("focusout-prevented", M2), M2.defaultPrevented || p.preventDefault();
}
}
};
provide(Bs, {
focusTrapRef: n,
onKeydown: s
}), watch(() => e.focusTrapEl, (p) => {
p && (n.value = p);
}, { immediate: true }), watch([n], ([p], [h3]) => {
p && (p.addEventListener("keydown", s), p.addEventListener("focusin", c), p.addEventListener("focusout", d)), h3 && (h3.removeEventListener("keydown", s), h3.removeEventListener("focusin", c), h3.removeEventListener("focusout", d));
});
const l = (p) => {
t(fr, p);
}, u2 = (p) => t(pr, p), c = (p) => {
const h3 = unref(n);
if (!h3)
return;
const g2 = p.target, y2 = p.relatedTarget, C2 = g2 && h3.contains(g2);
e.trapped || y2 && h3.contains(y2) || (o = y2), C2 && t("focusin", p), !r.paused && e.trapped && (C2 ? i = g2 : gt(i, true));
}, d = (p) => {
const h3 = unref(n);
if (!(r.paused || !h3))
if (e.trapped) {
const g2 = p.relatedTarget;
!Po(g2) && !h3.contains(g2) && setTimeout(() => {
if (!r.paused && e.trapped) {
const y2 = ro({
focusReason: a2.value
});
t("focusout-prevented", y2), y2.defaultPrevented || gt(i, true);
}
}, 0);
} else {
const g2 = p.target;
g2 && h3.contains(g2) || t("focusout", p);
}
};
async function f2() {
await nextTick();
const p = unref(n);
if (p) {
vr.push(r);
const h3 = p.contains(document.activeElement) ? o : document.activeElement;
if (o = h3, !p.contains(h3)) {
const y2 = new Event(Qo, dr);
p.addEventListener(Qo, l), p.dispatchEvent(y2), y2.defaultPrevented || nextTick(() => {
let C2 = e.focusStartEl;
je(C2) || (gt(C2), document.activeElement !== C2 && (C2 = "first")), C2 === "first" && Zm(Vs(p), true), (document.activeElement === h3 || C2 === "container") && gt(p);
});
}
}
}
function m2() {
const p = unref(n);
if (p) {
p.removeEventListener(Qo, l);
const h3 = new CustomEvent(Xo, {
...dr,
detail: {
focusReason: a2.value
}
});
p.addEventListener(Xo, u2), p.dispatchEvent(h3), !h3.defaultPrevented && (a2.value == "keyboard" || !Qm() || p.contains(document.activeElement)) && gt(o ?? document.body), p.removeEventListener(Xo, u2), vr.remove(r);
}
}
return onMounted(() => {
e.trapped && f2(), watch(() => e.trapped, (p) => {
p ? f2() : m2();
});
}), onBeforeUnmount(() => {
e.trapped && m2(), n.value && (n.value.removeEventListener("keydown", s), n.value.removeEventListener("focusin", c), n.value.removeEventListener("focusout", d), n.value = void 0);
}), {
onKeydown: s
};
}
});
function tv(e, t, n, o, i, a2) {
return renderSlot(e.$slots, "default", { handleKeydown: e.onKeydown });
}
var zs = X(ev, [["render", tv], ["__file", "focus-trap.vue"]]);
var nv = ["fixed", "absolute"];
var ov = Q({
boundariesPadding: {
type: Number,
default: 0
},
fallbackPlacements: {
type: U2(Array),
default: void 0
},
gpuAcceleration: {
type: Boolean,
default: true
},
offset: {
type: Number,
default: 12
},
placement: {
type: String,
values: xo,
default: "bottom"
},
popperOptions: {
type: U2(Object),
default: () => ({})
},
strategy: {
type: String,
values: nv,
default: "absolute"
}
});
var Hs = Q({
...ov,
id: String,
style: {
type: U2([String, Array, Object])
},
className: {
type: U2([String, Array, Object])
},
effect: {
type: U2(String),
default: "dark"
},
visible: Boolean,
enterable: {
type: Boolean,
default: true
},
pure: Boolean,
focusOnShow: {
type: Boolean,
default: false
},
trapping: {
type: Boolean,
default: false
},
popperClass: {
type: U2([String, Array, Object])
},
popperStyle: {
type: U2([String, Array, Object])
},
referenceEl: {
type: U2(Object)
},
triggerTargetEl: {
type: U2(Object)
},
stopPopperMouseEvent: {
type: Boolean,
default: true
},
virtualTriggering: Boolean,
zIndex: Number,
...Ht(["ariaLabel"])
});
var iv = {
mouseenter: (e) => e instanceof MouseEvent,
mouseleave: (e) => e instanceof MouseEvent,
focus: () => true,
blur: () => true,
close: () => true
};
var av = (e, t = []) => {
const { placement: n, strategy: o, popperOptions: i } = e, a2 = {
placement: n,
strategy: o,
...i,
modifiers: [...sv(e), ...t]
};
return lv(a2, i == null ? void 0 : i.modifiers), a2;
};
var rv = (e) => {
if (se)
return rt(e);
};
function sv(e) {
const { offset: t, gpuAcceleration: n, fallbackPlacements: o } = e;
return [
{
name: "offset",
options: {
offset: [0, t ?? 12]
}
},
{
name: "preventOverflow",
options: {
padding: {
top: 2,
bottom: 2,
left: 5,
right: 5
}
}
},
{
name: "flip",
options: {
padding: 5,
fallbackPlacements: o
}
},
{
name: "computeStyles",
options: {
gpuAcceleration: n
}
}
];
}
function lv(e, t) {
t && (e.modifiers = [...e.modifiers, ...t ?? []]);
}
var uv = 0;
var cv = (e) => {
const { popperInstanceRef: t, contentRef: n, triggerRef: o, role: i } = inject(Gi, void 0), a2 = ref(), r = ref(), s = computed(() => ({
name: "eventListeners",
enabled: !!e.visible
})), l = computed(() => {
var y2;
const C2 = unref(a2), O2 = (y2 = unref(r)) != null ? y2 : uv;
return {
name: "arrow",
enabled: !is(C2),
options: {
element: C2,
padding: O2
}
};
}), u2 = computed(() => ({
onFirstUpdate: () => {
p();
},
...av(e, [
unref(l),
unref(s)
])
})), c = computed(() => rv(e.referenceEl) || unref(o)), { attributes: d, state: f2, styles: m2, update: p, forceUpdate: h3, instanceRef: g2 } = Gh(c, n, u2);
return watch(g2, (y2) => t.value = y2), onMounted(() => {
watch(() => {
var y2;
return (y2 = unref(c)) == null ? void 0 : y2.getBoundingClientRect();
}, () => {
p();
});
}), {
attributes: d,
arrowRef: a2,
contentRef: n,
instanceRef: g2,
state: f2,
styles: m2,
role: i,
forceUpdate: h3,
update: p
};
};
var dv = (e, {
attributes: t,
styles: n,
role: o
}) => {
const { nextZIndex: i } = Ui(), a2 = te("popper"), r = computed(() => unref(t).popper), s = ref(me(e.zIndex) ? e.zIndex : i()), l = computed(() => [
a2.b(),
a2.is("pure", e.pure),
a2.is(e.effect),
e.popperClass
]), u2 = computed(() => [
{ zIndex: unref(s) },
unref(n).popper,
e.popperStyle || {}
]), c = computed(() => o.value === "dialog" ? "false" : void 0), d = computed(() => unref(n).arrow || {});
return {
ariaModal: c,
arrowStyle: d,
contentAttrs: r,
contentClass: l,
contentStyle: u2,
contentZIndex: s,
updateZIndex: () => {
s.value = me(e.zIndex) ? e.zIndex : i();
}
};
};
var fv = (e, t) => {
const n = ref(false), o = ref();
return {
focusStartRef: o,
trapped: n,
onFocusAfterReleased: (u2) => {
var c;
((c = u2.detail) == null ? void 0 : c.focusReason) !== "pointer" && (o.value = "first", t("blur"));
},
onFocusAfterTrapped: () => {
t("focus");
},
onFocusInTrap: (u2) => {
e.visible && !n.value && (u2.target && (o.value = u2.target), n.value = true);
},
onFocusoutPrevented: (u2) => {
e.trapping || (u2.detail.focusReason === "pointer" && u2.preventDefault(), n.value = false);
},
onReleaseRequested: () => {
n.value = false, t("close");
}
};
};
var pv = defineComponent({
name: "ElPopperContent"
});
var hv = defineComponent({
...pv,
props: Hs,
emits: iv,
setup(e, { expose: t, emit: n }) {
const o = e, {
focusStartRef: i,
trapped: a2,
onFocusAfterReleased: r,
onFocusAfterTrapped: s,
onFocusInTrap: l,
onFocusoutPrevented: u2,
onReleaseRequested: c
} = fv(o, n), { attributes: d, arrowRef: f2, contentRef: m2, styles: p, instanceRef: h3, role: g2, update: y2 } = cv(o), {
ariaModal: C2,
arrowStyle: O2,
contentAttrs: T2,
contentClass: I2,
contentStyle: k2,
updateZIndex: A2
} = dv(o, {
styles: p,
attributes: d,
role: g2
}), $2 = inject(Eo, void 0), N2 = ref();
provide(Fs, {
arrowStyle: O2,
arrowRef: f2,
arrowOffset: N2
}), $2 && provide(Eo, {
...$2,
addInputId: Lt,
removeInputId: Lt
});
let K;
const B2 = (W2 = true) => {
y2(), W2 && A2();
}, M2 = () => {
B2(false), o.visible && o.focusOnShow ? a2.value = true : o.visible === false && (a2.value = false);
};
return onMounted(() => {
watch(() => o.triggerTargetEl, (W2, de) => {
K == null || K(), K = void 0;
const Y = unref(W2 || m2.value), D2 = unref(de || m2.value);
xt(Y) && (K = watch([g2, () => o.ariaLabel, C2, () => o.id], (ne) => {
["role", "aria-label", "aria-modal", "id"].forEach((xe, ye) => {
Po(ne[ye]) ? Y.removeAttribute(xe) : Y.setAttribute(xe, ne[ye]);
});
}, { immediate: true })), D2 !== Y && xt(D2) && ["role", "aria-label", "aria-modal", "id"].forEach((ne) => {
D2.removeAttribute(ne);
});
}, { immediate: true }), watch(() => o.visible, M2, { immediate: true });
}), onBeforeUnmount(() => {
K == null || K(), K = void 0;
}), t({
popperContentRef: m2,
popperInstanceRef: h3,
updatePopper: B2,
contentStyle: k2
}), (W2, de) => (openBlock(), createElementBlock("div", mergeProps({
ref_key: "contentRef",
ref: m2
}, unref(T2), {
style: unref(k2),
class: unref(I2),
tabindex: "-1",
onMouseenter: (Y) => W2.$emit("mouseenter", Y),
onMouseleave: (Y) => W2.$emit("mouseleave", Y)
}), [
createVNode(unref(zs), {
trapped: unref(a2),
"trap-on-focus-in": true,
"focus-trap-el": unref(m2),
"focus-start-el": unref(i),
onFocusAfterTrapped: unref(s),
onFocusAfterReleased: unref(r),
onFocusin: unref(l),
onFocusoutPrevented: unref(u2),
onReleaseRequested: unref(c)
}, {
default: withCtx(() => [
renderSlot(W2.$slots, "default")
]),
_: 3
}, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
], 16, ["onMouseenter", "onMouseleave"]));
}
});
var mv = X(hv, [["__file", "content.vue"]]);
var vv = Me(Dm);
var Zi = Symbol("elTooltip");
var Le = Q({
...em,
...Hs,
appendTo: {
type: U2([String, Object])
},
content: {
type: String,
default: ""
},
rawContent: Boolean,
persistent: Boolean,
visible: {
type: U2(Boolean),
default: null
},
transition: String,
teleported: {
type: Boolean,
default: true
},
disabled: Boolean,
...Ht(["ariaLabel"])
});
var Bn = Q({
...Ns,
disabled: Boolean,
trigger: {
type: U2([String, Array]),
default: "hover"
},
triggerKeys: {
type: U2(Array),
default: () => [$n.enter, $n.space]
}
});
var {
useModelToggleProps: gv,
useModelToggleEmits: yv,
useModelToggle: bv
} = Up("visible");
var wv = Q({
...Rs,
...gv,
...Le,
...Bn,
...$s,
showArrow: {
type: Boolean,
default: true
}
});
var Sv = [
...yv,
"before-show",
"before-hide",
"show",
"hide",
"open",
"close"
];
var Cv = (e, t) => Ie(e) ? e.includes(t) : e === t;
var Gt = (e, t, n) => (o) => {
Cv(unref(e), t) && n(o);
};
var Ev = defineComponent({
name: "ElTooltipTrigger"
});
var Iv = defineComponent({
...Ev,
props: Bn,
setup(e, { expose: t }) {
const n = e, o = te("tooltip"), { controlled: i, id: a2, open: r, onOpen: s, onClose: l, onToggle: u2 } = inject(Zi, void 0), c = ref(null), d = () => {
if (unref(i) || n.disabled)
return true;
}, f2 = toRef(n, "trigger"), m2 = it(d, Gt(f2, "hover", s)), p = it(d, Gt(f2, "hover", l)), h3 = it(d, Gt(f2, "click", (T2) => {
T2.button === 0 && u2(T2);
})), g2 = it(d, Gt(f2, "focus", s)), y2 = it(d, Gt(f2, "focus", l)), C2 = it(d, Gt(f2, "contextmenu", (T2) => {
T2.preventDefault(), u2(T2);
})), O2 = it(d, (T2) => {
const { code: I2 } = T2;
n.triggerKeys.includes(I2) && (T2.preventDefault(), u2(T2));
});
return t({
triggerRef: c
}), (T2, I2) => (openBlock(), createBlock(unref(Km), {
id: unref(a2),
"virtual-ref": T2.virtualRef,
open: unref(r),
"virtual-triggering": T2.virtualTriggering,
class: normalizeClass(unref(o).e("trigger")),
onBlur: unref(y2),
onClick: unref(h3),
onContextmenu: unref(C2),
onFocus: unref(g2),
onMouseenter: unref(m2),
onMouseleave: unref(p),
onKeydown: unref(O2)
}, {
default: withCtx(() => [
renderSlot(T2.$slots, "default")
]),
_: 3
}, 8, ["id", "virtual-ref", "open", "virtual-triggering", "class", "onBlur", "onClick", "onContextmenu", "onFocus", "onMouseenter", "onMouseleave", "onKeydown"]));
}
});
var kv = X(Iv, [["__file", "trigger.vue"]]);
var Tv = Q({
to: {
type: U2([String, Object]),
required: true
},
disabled: Boolean
});
var Av = defineComponent({
__name: "teleport",
props: Tv,
setup(e) {
return (t, n) => t.disabled ? renderSlot(t.$slots, "default", { key: 0 }) : (openBlock(), createBlock(Teleport, {
key: 1,
to: t.to
}, [
renderSlot(t.$slots, "default")
], 8, ["to"]));
}
});
var Ov = X(Av, [["__file", "teleport.vue"]]);
var js = Me(Ov);
var Mv = defineComponent({
name: "ElTooltipContent",
inheritAttrs: false
});
var _v = defineComponent({
...Mv,
props: Le,
setup(e, { expose: t }) {
const n = e, { selector: o } = As(), i = te("tooltip"), a2 = ref(null);
let r;
const {
controlled: s,
id: l,
open: u2,
trigger: c,
onClose: d,
onOpen: f2,
onShow: m2,
onHide: p,
onBeforeShow: h3,
onBeforeHide: g2
} = inject(Zi, void 0), y2 = computed(() => n.transition || `${i.namespace.value}-fade-in-linear`), C2 = computed(() => false ? true : n.persistent);
onBeforeUnmount(() => {
r == null || r();
});
const O2 = computed(() => unref(C2) ? true : unref(u2)), T2 = computed(() => n.disabled ? false : unref(u2)), I2 = computed(() => n.appendTo || o.value), k2 = computed(() => {
var D2;
return (D2 = n.style) != null ? D2 : {};
}), A2 = ref(true), $2 = () => {
p(), A2.value = true;
}, N2 = () => {
if (unref(s))
return true;
}, K = it(N2, () => {
n.enterable && unref(c) === "hover" && f2();
}), B2 = it(N2, () => {
unref(c) === "hover" && d();
}), M2 = () => {
var D2, ne;
(ne = (D2 = a2.value) == null ? void 0 : D2.updatePopper) == null || ne.call(D2), h3 == null || h3();
}, W2 = () => {
g2 == null || g2();
}, de = () => {
m2(), r = hu(computed(() => {
var D2;
return (D2 = a2.value) == null ? void 0 : D2.popperContentRef;
}), () => {
if (unref(s))
return;
unref(c) !== "hover" && d();
});
}, Y = () => {
n.virtualTriggering || d();
};
return watch(() => unref(u2), (D2) => {
D2 ? A2.value = false : r == null || r();
}, {
flush: "post"
}), watch(() => n.content, () => {
var D2, ne;
(ne = (D2 = a2.value) == null ? void 0 : D2.updatePopper) == null || ne.call(D2);
}), t({
contentRef: a2
}), (D2, ne) => (openBlock(), createBlock(unref(js), {
disabled: !D2.teleported,
to: unref(I2)
}, {
default: withCtx(() => [
createVNode(Transition, {
name: unref(y2),
onAfterLeave: $2,
onBeforeEnter: M2,
onAfterEnter: de,
onBeforeLeave: W2
}, {
default: withCtx(() => [
unref(O2) ? withDirectives((openBlock(), createBlock(unref(mv), mergeProps({
key: 0,
id: unref(l),
ref_key: "contentRef",
ref: a2
}, D2.$attrs, {
"aria-label": D2.ariaLabel,
"aria-hidden": A2.value,
"boundaries-padding": D2.boundariesPadding,
"fallback-placements": D2.fallbackPlacements,
"gpu-acceleration": D2.gpuAcceleration,
offset: D2.offset,
placement: D2.placement,
"popper-options": D2.popperOptions,
strategy: D2.strategy,
effect: D2.effect,
enterable: D2.enterable,
pure: D2.pure,
"popper-class": D2.popperClass,
"popper-style": [D2.popperStyle, unref(k2)],
"reference-el": D2.referenceEl,
"trigger-target-el": D2.triggerTargetEl,
visible: unref(T2),
"z-index": D2.zIndex,
onMouseenter: unref(K),
onMouseleave: unref(B2),
onBlur: Y,
onClose: unref(d)
}), {
default: withCtx(() => [
renderSlot(D2.$slots, "default")
]),
_: 3
}, 16, ["id", "aria-label", "aria-hidden", "boundaries-padding", "fallback-placements", "gpu-acceleration", "offset", "placement", "popper-options", "strategy", "effect", "enterable", "pure", "popper-class", "popper-style", "reference-el", "trigger-target-el", "visible", "z-index", "onMouseenter", "onMouseleave", "onClose"])), [
[vShow, unref(T2)]
]) : createCommentVNode("v-if", true)
]),
_: 3
}, 8, ["name"])
]),
_: 3
}, 8, ["disabled", "to"]));
}
});
var Pv = X(_v, [["__file", "content.vue"]]);
var Lv = defineComponent({
name: "ElTooltip"
});
var xv = defineComponent({
...Lv,
props: wv,
emits: Sv,
setup(e, { expose: t, emit: n }) {
const o = e;
Xh();
const i = Dt(), a2 = ref(), r = ref(), s = () => {
var y2;
const C2 = unref(a2);
C2 && ((y2 = C2.popperInstanceRef) == null || y2.update());
}, l = ref(false), u2 = ref(), { show: c, hide: d, hasUpdateHandler: f2 } = bv({
indicator: l,
toggleReason: u2
}), { onOpen: m2, onClose: p } = tm({
showAfter: toRef(o, "showAfter"),
hideAfter: toRef(o, "hideAfter"),
autoClose: toRef(o, "autoClose"),
open: c,
close: d
}), h3 = computed(() => ct(o.visible) && !f2.value);
provide(Zi, {
controlled: h3,
id: i,
open: readonly(l),
trigger: toRef(o, "trigger"),
onOpen: (y2) => {
m2(y2);
},
onClose: (y2) => {
p(y2);
},
onToggle: (y2) => {
unref(l) ? p(y2) : m2(y2);
},
onShow: () => {
n("show", u2.value);
},
onHide: () => {
n("hide", u2.value);
},
onBeforeShow: () => {
n("before-show", u2.value);
},
onBeforeHide: () => {
n("before-hide", u2.value);
},
updatePopper: s
}), watch(() => o.disabled, (y2) => {
y2 && l.value && (l.value = false);
});
const g2 = (y2) => {
var C2, O2;
const T2 = (O2 = (C2 = r.value) == null ? void 0 : C2.contentRef) == null ? void 0 : O2.popperContentRef, I2 = (y2 == null ? void 0 : y2.relatedTarget) || document.activeElement;
return T2 && T2.contains(I2);
};
return onDeactivated(() => l.value && d()), t({
popperRef: a2,
contentRef: r,
isFocusInsideContent: g2,
updatePopper: s,
onOpen: m2,
onClose: p,
hide: d
}), (y2, C2) => (openBlock(), createBlock(unref(vv), {
ref_key: "popperRef",
ref: a2,
role: y2.role
}, {
default: withCtx(() => [
createVNode(kv, {
disabled: y2.disabled,
trigger: y2.trigger,
"trigger-keys": y2.triggerKeys,
"virtual-ref": y2.virtualRef,
"virtual-triggering": y2.virtualTriggering
}, {
default: withCtx(() => [
y2.$slots.default ? renderSlot(y2.$slots, "default", { key: 0 }) : createCommentVNode("v-if", true)
]),
_: 3
}, 8, ["disabled", "trigger", "trigger-keys", "virtual-ref", "virtual-triggering"]),
createVNode(Pv, {
ref_key: "contentRef",
ref: r,
"aria-label": y2.ariaLabel,
"boundaries-padding": y2.boundariesPadding,
content: y2.content,
disabled: y2.disabled,
effect: y2.effect,
enterable: y2.enterable,
"fallback-placements": y2.fallbackPlacements,
"hide-after": y2.hideAfter,
"gpu-acceleration": y2.gpuAcceleration,
offset: y2.offset,
persistent: y2.persistent,
"popper-class": y2.popperClass,
"popper-style": y2.popperStyle,
placement: y2.placement,
"popper-options": y2.popperOptions,
pure: y2.pure,
"raw-content": y2.rawContent,
"reference-el": y2.referenceEl,
"trigger-target-el": y2.triggerTargetEl,
"show-after": y2.showAfter,
strategy: y2.strategy,
teleported: y2.teleported,
transition: y2.transition,
"virtual-triggering": y2.virtualTriggering,
"z-index": y2.zIndex,
"append-to": y2.appendTo
}, {
default: withCtx(() => [
renderSlot(y2.$slots, "content", {}, () => [
y2.rawContent ? (openBlock(), createElementBlock("span", {
key: 0,
innerHTML: y2.content
}, null, 8, ["innerHTML"])) : (openBlock(), createElementBlock("span", { key: 1 }, toDisplayString(y2.content), 1))
]),
y2.showArrow ? (openBlock(), createBlock(unref(Vm), {
key: 0,
"arrow-offset": y2.arrowOffset
}, null, 8, ["arrow-offset"])) : createCommentVNode("v-if", true)
]),
_: 3
}, 8, ["aria-label", "boundaries-padding", "content", "disabled", "effect", "enterable", "fallback-placements", "hide-after", "gpu-acceleration", "offset", "persistent", "popper-class", "popper-style", "placement", "popper-options", "pure", "raw-content", "reference-el", "trigger-target-el", "show-after", "strategy", "teleported", "transition", "virtual-triggering", "z-index", "append-to"])
]),
_: 3
}, 8, ["role"]));
}
});
var Fv = X(xv, [["__file", "tooltip.vue"]]);
var Ks = Me(Fv);
var Us = Symbol("buttonGroupContextKey");
var Rv = (e, t) => {
Xt({
from: "type.text",
replacement: "link",
version: "3.0.0",
scope: "props",
ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
}, computed(() => e.type === "text"));
const n = inject(Us, void 0), o = Ro("button"), { form: i } = fn(), a2 = ln2(computed(() => n == null ? void 0 : n.size)), r = $o(), s = ref(), l = useSlots(), u2 = computed(() => e.type || (n == null ? void 0 : n.type) || ""), c = computed(() => {
var p, h3, g2;
return (g2 = (h3 = e.autoInsertSpace) != null ? h3 : (p = o.value) == null ? void 0 : p.autoInsertSpace) != null ? g2 : false;
}), d = computed(() => e.tag === "button" ? {
ariaDisabled: r.value || e.loading,
disabled: r.value || e.loading,
autofocus: e.autofocus,
type: e.nativeType
} : {}), f2 = computed(() => {
var p;
const h3 = (p = l.default) == null ? void 0 : p.call(l);
if (c.value && (h3 == null ? void 0 : h3.length) === 1) {
const g2 = h3[0];
if ((g2 == null ? void 0 : g2.type) === Text) {
const y2 = g2.children;
return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(y2.trim());
}
}
return false;
});
return {
_disabled: r,
_size: a2,
_type: u2,
_ref: s,
_props: d,
shouldAddSpace: f2,
handleClick: (p) => {
if (r.value || e.loading) {
p.stopPropagation();
return;
}
e.nativeType === "reset" && (i == null || i.resetFields()), t("click", p);
}
};
};
var $v = [
"default",
"primary",
"success",
"warning",
"info",
"danger",
"text",
""
];
var Dv = ["button", "submit", "reset"];
var yi = Q({
size: dn2,
disabled: Boolean,
type: {
type: String,
values: $v,
default: ""
},
icon: {
type: tn2
},
nativeType: {
type: String,
values: Dv,
default: "button"
},
loading: Boolean,
loadingIcon: {
type: tn2,
default: () => loading_default
},
plain: Boolean,
text: Boolean,
link: Boolean,
bg: Boolean,
autofocus: Boolean,
round: Boolean,
circle: Boolean,
color: String,
dark: Boolean,
autoInsertSpace: {
type: Boolean,
default: void 0
},
tag: {
type: U2([String, Object]),
default: "button"
}
});
var Nv = {
click: (e) => e instanceof MouseEvent
};
function ve(e, t) {
Bv(e) && (e = "100%");
var n = Vv(e);
return e = t === 360 ? e : Math.min(t, Math.max(0, parseFloat(e))), n && (e = parseInt(String(e * t), 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : (t === 360 ? e = (e < 0 ? e % t + t : e % t) / parseFloat(String(t)) : e = e % t / parseFloat(String(t)), e);
}
function so(e) {
return Math.min(1, Math.max(0, e));
}
function Bv(e) {
return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
}
function Vv(e) {
return typeof e == "string" && e.indexOf("%") !== -1;
}
function Ws(e) {
return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
}
function lo(e) {
return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
}
function Pt(e) {
return e.length === 1 ? "0" + e : String(e);
}
function zv(e, t, n) {
return {
r: ve(e, 255) * 255,
g: ve(t, 255) * 255,
b: ve(n, 255) * 255
};
}
function yr(e, t, n) {
e = ve(e, 255), t = ve(t, 255), n = ve(n, 255);
var o = Math.max(e, t, n), i = Math.min(e, t, n), a2 = 0, r = 0, s = (o + i) / 2;
if (o === i)
r = 0, a2 = 0;
else {
var l = o - i;
switch (r = s > 0.5 ? l / (2 - o - i) : l / (o + i), o) {
case e:
a2 = (t - n) / l + (t < n ? 6 : 0);
break;
case t:
a2 = (n - e) / l + 2;
break;
case n:
a2 = (e - t) / l + 4;
break;
}
a2 /= 6;
}
return { h: a2, s: r, l: s };
}
function ei(e, t, n) {
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * (6 * n) : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
}
function Hv(e, t, n) {
var o, i, a2;
if (e = ve(e, 360), t = ve(t, 100), n = ve(n, 100), t === 0)
i = n, a2 = n, o = n;
else {
var r = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - r;
o = ei(s, r, e + 1 / 3), i = ei(s, r, e), a2 = ei(s, r, e - 1 / 3);
}
return { r: o * 255, g: i * 255, b: a2 * 255 };
}
function br(e, t, n) {
e = ve(e, 255), t = ve(t, 255), n = ve(n, 255);
var o = Math.max(e, t, n), i = Math.min(e, t, n), a2 = 0, r = o, s = o - i, l = o === 0 ? 0 : s / o;
if (o === i)
a2 = 0;
else {
switch (o) {
case e:
a2 = (t - n) / s + (t < n ? 6 : 0);
break;
case t:
a2 = (n - e) / s + 2;
break;
case n:
a2 = (e - t) / s + 4;
break;
}
a2 /= 6;
}
return { h: a2, s: l, v: r };
}
function jv(e, t, n) {
e = ve(e, 360) * 6, t = ve(t, 100), n = ve(n, 100);
var o = Math.floor(e), i = e - o, a2 = n * (1 - t), r = n * (1 - i * t), s = n * (1 - (1 - i) * t), l = o % 6, u2 = [n, r, a2, a2, s, n][l], c = [s, n, n, r, a2, a2][l], d = [a2, a2, s, n, n, r][l];
return { r: u2 * 255, g: c * 255, b: d * 255 };
}
function wr(e, t, n, o) {
var i = [
Pt(Math.round(e).toString(16)),
Pt(Math.round(t).toString(16)),
Pt(Math.round(n).toString(16))
];
return o && i[0].startsWith(i[0].charAt(1)) && i[1].startsWith(i[1].charAt(1)) && i[2].startsWith(i[2].charAt(1)) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) : i.join("");
}
function Kv(e, t, n, o, i) {
var a2 = [
Pt(Math.round(e).toString(16)),
Pt(Math.round(t).toString(16)),
Pt(Math.round(n).toString(16)),
Pt(Uv(o))
];
return i && a2[0].startsWith(a2[0].charAt(1)) && a2[1].startsWith(a2[1].charAt(1)) && a2[2].startsWith(a2[2].charAt(1)) && a2[3].startsWith(a2[3].charAt(1)) ? a2[0].charAt(0) + a2[1].charAt(0) + a2[2].charAt(0) + a2[3].charAt(0) : a2.join("");
}
function Uv(e) {
return Math.round(parseFloat(e) * 255).toString(16);
}
function Sr(e) {
return Pe(e) / 255;
}
function Pe(e) {
return parseInt(e, 16);
}
function Wv(e) {
return {
r: e >> 16,
g: (e & 65280) >> 8,
b: e & 255
};
}
var bi = {
aliceblue: "#f0f8ff",
antiquewhite: "#faebd7",
aqua: "#00ffff",
aquamarine: "#7fffd4",
azure: "#f0ffff",
beige: "#f5f5dc",
bisque: "#ffe4c4",
black: "#000000",
blanchedalmond: "#ffebcd",
blue: "#0000ff",
blueviolet: "#8a2be2",
brown: "#a52a2a",
burlywood: "#deb887",
cadetblue: "#5f9ea0",
chartreuse: "#7fff00",
chocolate: "#d2691e",
coral: "#ff7f50",
cornflowerblue: "#6495ed",
cornsilk: "#fff8dc",
crimson: "#dc143c",
cyan: "#00ffff",
darkblue: "#00008b",
darkcyan: "#008b8b",
darkgoldenrod: "#b8860b",
darkgray: "#a9a9a9",
darkgreen: "#006400",
darkgrey: "#a9a9a9",
darkkhaki: "#bdb76b",
darkmagenta: "#8b008b",
darkolivegreen: "#556b2f",
darkorange: "#ff8c00",
darkorchid: "#9932cc",
darkred: "#8b0000",
darksalmon: "#e9967a",
darkseagreen: "#8fbc8f",
darkslateblue: "#483d8b",
darkslategray: "#2f4f4f",
darkslategrey: "#2f4f4f",
darkturquoise: "#00ced1",
darkviolet: "#9400d3",
deeppink: "#ff1493",
deepskyblue: "#00bfff",
dimgray: "#696969",
dimgrey: "#696969",
dodgerblue: "#1e90ff",
firebrick: "#b22222",
floralwhite: "#fffaf0",
forestgreen: "#228b22",
fuchsia: "#ff00ff",
gainsboro: "#dcdcdc",
ghostwhite: "#f8f8ff",
goldenrod: "#daa520",
gold: "#ffd700",
gray: "#808080",
green: "#008000",
greenyellow: "#adff2f",
grey: "#808080",
honeydew: "#f0fff0",
hotpink: "#ff69b4",
indianred: "#cd5c5c",
indigo: "#4b0082",
ivory: "#fffff0",
khaki: "#f0e68c",
lavenderblush: "#fff0f5",
lavender: "#e6e6fa",
lawngreen: "#7cfc00",
lemonchiffon: "#fffacd",
lightblue: "#add8e6",
lightcoral: "#f08080",
lightcyan: "#e0ffff",
lightgoldenrodyellow: "#fafad2",
lightgray: "#d3d3d3",
lightgreen: "#90ee90",
lightgrey: "#d3d3d3",
lightpink: "#ffb6c1",
lightsalmon: "#ffa07a",
lightseagreen: "#20b2aa",
lightskyblue: "#87cefa",
lightslategray: "#778899",
lightslategrey: "#778899",
lightsteelblue: "#b0c4de",
lightyellow: "#ffffe0",
lime: "#00ff00",
limegreen: "#32cd32",
linen: "#faf0e6",
magenta: "#ff00ff",
maroon: "#800000",
mediumaquamarine: "#66cdaa",
mediumblue: "#0000cd",
mediumorchid: "#ba55d3",
mediumpurple: "#9370db",
mediumseagreen: "#3cb371",
mediumslateblue: "#7b68ee",
mediumspringgreen: "#00fa9a",
mediumturquoise: "#48d1cc",
mediumvioletred: "#c71585",
midnightblue: "#191970",
mintcream: "#f5fffa",
mistyrose: "#ffe4e1",
moccasin: "#ffe4b5",
navajowhite: "#ffdead",
navy: "#000080",
oldlace: "#fdf5e6",
olive: "#808000",
olivedrab: "#6b8e23",
orange: "#ffa500",
orangered: "#ff4500",
orchid: "#da70d6",
palegoldenrod: "#eee8aa",
palegreen: "#98fb98",
paleturquoise: "#afeeee",
palevioletred: "#db7093",
papayawhip: "#ffefd5",
peachpuff: "#ffdab9",
peru: "#cd853f",
pink: "#ffc0cb",
plum: "#dda0dd",
powderblue: "#b0e0e6",
purple: "#800080",
rebeccapurple: "#663399",
red: "#ff0000",
rosybrown: "#bc8f8f",
royalblue: "#4169e1",
saddlebrown: "#8b4513",
salmon: "#fa8072",
sandybrown: "#f4a460",
seagreen: "#2e8b57",
seashell: "#fff5ee",
sienna: "#a0522d",
silver: "#c0c0c0",
skyblue: "#87ceeb",
slateblue: "#6a5acd",
slategray: "#708090",
slategrey: "#708090",
snow: "#fffafa",
springgreen: "#00ff7f",
steelblue: "#4682b4",
tan: "#d2b48c",
teal: "#008080",
thistle: "#d8bfd8",
tomato: "#ff6347",
turquoise: "#40e0d0",
violet: "#ee82ee",
wheat: "#f5deb3",
white: "#ffffff",
whitesmoke: "#f5f5f5",
yellow: "#ffff00",
yellowgreen: "#9acd32"
};
function qv(e) {
var t = { r: 0, g: 0, b: 0 }, n = 1, o = null, i = null, a2 = null, r = false, s = false;
return typeof e == "string" && (e = Yv(e)), typeof e == "object" && (ot(e.r) && ot(e.g) && ot(e.b) ? (t = zv(e.r, e.g, e.b), r = true, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : ot(e.h) && ot(e.s) && ot(e.v) ? (o = lo(e.s), i = lo(e.v), t = jv(e.h, o, i), r = true, s = "hsv") : ot(e.h) && ot(e.s) && ot(e.l) && (o = lo(e.s), a2 = lo(e.l), t = Hv(e.h, o, a2), r = true, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = Ws(n), {
ok: r,
format: e.format || s,
r: Math.min(255, Math.max(t.r, 0)),
g: Math.min(255, Math.max(t.g, 0)),
b: Math.min(255, Math.max(t.b, 0)),
a: n
};
}
var Gv = "[-\\+]?\\d+%?";
var Jv = "[-\\+]?\\d*\\.\\d+%?";
var Et = "(?:".concat(Jv, ")|(?:").concat(Gv, ")");
var ti = "[\\s|\\(]+(".concat(Et, ")[,|\\s]+(").concat(Et, ")[,|\\s]+(").concat(Et, ")\\s*\\)?");
var ni = "[\\s|\\(]+(".concat(Et, ")[,|\\s]+(").concat(Et, ")[,|\\s]+(").concat(Et, ")[,|\\s]+(").concat(Et, ")\\s*\\)?");
var Ve = {
CSS_UNIT: new RegExp(Et),
rgb: new RegExp("rgb" + ti),
rgba: new RegExp("rgba" + ni),
hsl: new RegExp("hsl" + ti),
hsla: new RegExp("hsla" + ni),
hsv: new RegExp("hsv" + ti),
hsva: new RegExp("hsva" + ni),
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
};
function Yv(e) {
if (e = e.trim().toLowerCase(), e.length === 0)
return false;
var t = false;
if (bi[e])
e = bi[e], t = true;
else if (e === "transparent")
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
var n = Ve.rgb.exec(e);
return n ? { r: n[1], g: n[2], b: n[3] } : (n = Ve.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = Ve.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = Ve.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = Ve.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = Ve.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = Ve.hex8.exec(e), n ? {
r: Pe(n[1]),
g: Pe(n[2]),
b: Pe(n[3]),
a: Sr(n[4]),
format: t ? "name" : "hex8"
} : (n = Ve.hex6.exec(e), n ? {
r: Pe(n[1]),
g: Pe(n[2]),
b: Pe(n[3]),
format: t ? "name" : "hex"
} : (n = Ve.hex4.exec(e), n ? {
r: Pe(n[1] + n[1]),
g: Pe(n[2] + n[2]),
b: Pe(n[3] + n[3]),
a: Sr(n[4] + n[4]),
format: t ? "name" : "hex8"
} : (n = Ve.hex3.exec(e), n ? {
r: Pe(n[1] + n[1]),
g: Pe(n[2] + n[2]),
b: Pe(n[3] + n[3]),
format: t ? "name" : "hex"
} : false)))))))));
}
function ot(e) {
return !!Ve.CSS_UNIT.exec(String(e));
}
var Zv = (
/** @class */
function() {
function e(t, n) {
t === void 0 && (t = ""), n === void 0 && (n = {});
var o;
if (t instanceof e)
return t;
typeof t == "number" && (t = Wv(t)), this.originalInput = t;
var i = qv(t);
this.originalInput = t, this.r = i.r, this.g = i.g, this.b = i.b, this.a = i.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (o = n.format) !== null && o !== void 0 ? o : i.format, this.gradientType = n.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = i.ok;
}
return e.prototype.isDark = function() {
return this.getBrightness() < 128;
}, e.prototype.isLight = function() {
return !this.isDark();
}, e.prototype.getBrightness = function() {
var t = this.toRgb();
return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
}, e.prototype.getLuminance = function() {
var t = this.toRgb(), n, o, i, a2 = t.r / 255, r = t.g / 255, s = t.b / 255;
return a2 <= 0.03928 ? n = a2 / 12.92 : n = Math.pow((a2 + 0.055) / 1.055, 2.4), r <= 0.03928 ? o = r / 12.92 : o = Math.pow((r + 0.055) / 1.055, 2.4), s <= 0.03928 ? i = s / 12.92 : i = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * o + 0.0722 * i;
}, e.prototype.getAlpha = function() {
return this.a;
}, e.prototype.setAlpha = function(t) {
return this.a = Ws(t), this.roundA = Math.round(100 * this.a) / 100, this;
}, e.prototype.isMonochrome = function() {
var t = this.toHsl().s;
return t === 0;
}, e.prototype.toHsv = function() {
var t = br(this.r, this.g, this.b);
return { h: t.h * 360, s: t.s, v: t.v, a: this.a };
}, e.prototype.toHsvString = function() {
var t = br(this.r, this.g, this.b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), i = Math.round(t.v * 100);
return this.a === 1 ? "hsv(".concat(n, ", ").concat(o, "%, ").concat(i, "%)") : "hsva(".concat(n, ", ").concat(o, "%, ").concat(i, "%, ").concat(this.roundA, ")");
}, e.prototype.toHsl = function() {
var t = yr(this.r, this.g, this.b);
return { h: t.h * 360, s: t.s, l: t.l, a: this.a };
}, e.prototype.toHslString = function() {
var t = yr(this.r, this.g, this.b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), i = Math.round(t.l * 100);
return this.a === 1 ? "hsl(".concat(n, ", ").concat(o, "%, ").concat(i, "%)") : "hsla(".concat(n, ", ").concat(o, "%, ").concat(i, "%, ").concat(this.roundA, ")");
}, e.prototype.toHex = function(t) {
return t === void 0 && (t = false), wr(this.r, this.g, this.b, t);
}, e.prototype.toHexString = function(t) {
return t === void 0 && (t = false), "#" + this.toHex(t);
}, e.prototype.toHex8 = function(t) {
return t === void 0 && (t = false), Kv(this.r, this.g, this.b, this.a, t);
}, e.prototype.toHex8String = function(t) {
return t === void 0 && (t = false), "#" + this.toHex8(t);
}, e.prototype.toHexShortString = function(t) {
return t === void 0 && (t = false), this.a === 1 ? this.toHexString(t) : this.toHex8String(t);
}, e.prototype.toRgb = function() {
return {
r: Math.round(this.r),
g: Math.round(this.g),
b: Math.round(this.b),
a: this.a
};
}, e.prototype.toRgbString = function() {
var t = Math.round(this.r), n = Math.round(this.g), o = Math.round(this.b);
return this.a === 1 ? "rgb(".concat(t, ", ").concat(n, ", ").concat(o, ")") : "rgba(".concat(t, ", ").concat(n, ", ").concat(o, ", ").concat(this.roundA, ")");
}, e.prototype.toPercentageRgb = function() {
var t = function(n) {
return "".concat(Math.round(ve(n, 255) * 100), "%");
};
return {
r: t(this.r),
g: t(this.g),
b: t(this.b),
a: this.a
};
}, e.prototype.toPercentageRgbString = function() {
var t = function(n) {
return Math.round(ve(n, 255) * 100);
};
return this.a === 1 ? "rgb(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%)") : "rgba(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%, ").concat(this.roundA, ")");
}, e.prototype.toName = function() {
if (this.a === 0)
return "transparent";
if (this.a < 1)
return false;
for (var t = "#" + wr(this.r, this.g, this.b, false), n = 0, o = Object.entries(bi); n < o.length; n++) {
var i = o[n], a2 = i[0], r = i[1];
if (t === r)
return a2;
}
return false;
}, e.prototype.toString = function(t) {
var n = !!t;
t = t ?? this.format;
var o = false, i = this.a < 1 && this.a >= 0, a2 = !n && i && (t.startsWith("hex") || t === "name");
return a2 ? t === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (o = this.toRgbString()), t === "prgb" && (o = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (o = this.toHexString()), t === "hex3" && (o = this.toHexString(true)), t === "hex4" && (o = this.toHex8String(true)), t === "hex8" && (o = this.toHex8String()), t === "name" && (o = this.toName()), t === "hsl" && (o = this.toHslString()), t === "hsv" && (o = this.toHsvString()), o || this.toHexString());
}, e.prototype.toNumber = function() {
return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
}, e.prototype.clone = function() {
return new e(this.toString());
}, e.prototype.lighten = function(t) {
t === void 0 && (t = 10);
var n = this.toHsl();
return n.l += t / 100, n.l = so(n.l), new e(n);
}, e.prototype.brighten = function(t) {
t === void 0 && (t = 10);
var n = this.toRgb();
return n.r = Math.max(0, Math.min(255, n.r - Math.round(255 * -(t / 100)))), n.g = Math.max(0, Math.min(255, n.g - Math.round(255 * -(t / 100)))), n.b = Math.max(0, Math.min(255, n.b - Math.round(255 * -(t / 100)))), new e(n);
}, e.prototype.darken = function(t) {
t === void 0 && (t = 10);
var n = this.toHsl();
return n.l -= t / 100, n.l = so(n.l), new e(n);
}, e.prototype.tint = function(t) {
return t === void 0 && (t = 10), this.mix("white", t);
}, e.prototype.shade = function(t) {
return t === void 0 && (t = 10), this.mix("black", t);
}, e.prototype.desaturate = function(t) {
t === void 0 && (t = 10);
var n = this.toHsl();
return n.s -= t / 100, n.s = so(n.s), new e(n);
}, e.prototype.saturate = function(t) {
t === void 0 && (t = 10);
var n = this.toHsl();
return n.s += t / 100, n.s = so(n.s), new e(n);
}, e.prototype.greyscale = function() {
return this.desaturate(100);
}, e.prototype.spin = function(t) {
var n = this.toHsl(), o = (n.h + t) % 360;
return n.h = o < 0 ? 360 + o : o, new e(n);
}, e.prototype.mix = function(t, n) {
n === void 0 && (n = 50);
var o = this.toRgb(), i = new e(t).toRgb(), a2 = n / 100, r = {
r: (i.r - o.r) * a2 + o.r,
g: (i.g - o.g) * a2 + o.g,
b: (i.b - o.b) * a2 + o.b,
a: (i.a - o.a) * a2 + o.a
};
return new e(r);
}, e.prototype.analogous = function(t, n) {
t === void 0 && (t = 6), n === void 0 && (n = 30);
var o = this.toHsl(), i = 360 / n, a2 = [this];
for (o.h = (o.h - (i * t >> 1) + 720) % 360; --t; )
o.h = (o.h + i) % 360, a2.push(new e(o));
return a2;
}, e.prototype.complement = function() {
var t = this.toHsl();
return t.h = (t.h + 180) % 360, new e(t);
}, e.prototype.monochromatic = function(t) {
t === void 0 && (t = 6);
for (var n = this.toHsv(), o = n.h, i = n.s, a2 = n.v, r = [], s = 1 / t; t--; )
r.push(new e({ h: o, s: i, v: a2 })), a2 = (a2 + s) % 1;
return r;
}, e.prototype.splitcomplement = function() {
var t = this.toHsl(), n = t.h;
return [
this,
new e({ h: (n + 72) % 360, s: t.s, l: t.l }),
new e({ h: (n + 216) % 360, s: t.s, l: t.l })
];
}, e.prototype.onBackground = function(t) {
var n = this.toRgb(), o = new e(t).toRgb(), i = n.a + o.a * (1 - n.a);
return new e({
r: (n.r * n.a + o.r * o.a * (1 - n.a)) / i,
g: (n.g * n.a + o.g * o.a * (1 - n.a)) / i,
b: (n.b * n.a + o.b * o.a * (1 - n.a)) / i,
a: i
});
}, e.prototype.triad = function() {
return this.polyad(3);
}, e.prototype.tetrad = function() {
return this.polyad(4);
}, e.prototype.polyad = function(t) {
for (var n = this.toHsl(), o = n.h, i = [this], a2 = 360 / t, r = 1; r < t; r++)
i.push(new e({ h: (o + r * a2) % 360, s: n.s, l: n.l }));
return i;
}, e.prototype.equals = function(t) {
return this.toRgbString() === new e(t).toRgbString();
}, e;
}()
);
function vt(e, t = 20) {
return e.mix("#141414", t).toString();
}
function Qv(e) {
const t = $o(), n = te("button");
return computed(() => {
let o = {}, i = e.color;
if (i) {
const a2 = i.match(/var\((.*?)\)/);
a2 && (i = window.getComputedStyle(window.document.documentElement).getPropertyValue(a2[1]));
const r = new Zv(i), s = e.dark ? r.tint(20).toString() : vt(r, 20);
if (e.plain)
o = n.cssVarBlock({
"bg-color": e.dark ? vt(r, 90) : r.tint(90).toString(),
"text-color": i,
"border-color": e.dark ? vt(r, 50) : r.tint(50).toString(),
"hover-text-color": `var(${n.cssVarName("color-white")})`,
"hover-bg-color": i,
"hover-border-color": i,
"active-bg-color": s,
"active-text-color": `var(${n.cssVarName("color-white")})`,
"active-border-color": s
}), t.value && (o[n.cssVarBlockName("disabled-bg-color")] = e.dark ? vt(r, 90) : r.tint(90).toString(), o[n.cssVarBlockName("disabled-text-color")] = e.dark ? vt(r, 50) : r.tint(50).toString(), o[n.cssVarBlockName("disabled-border-color")] = e.dark ? vt(r, 80) : r.tint(80).toString());
else {
const l = e.dark ? vt(r, 30) : r.tint(30).toString(), u2 = r.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`;
if (o = n.cssVarBlock({
"bg-color": i,
"text-color": u2,
"border-color": i,
"hover-bg-color": l,
"hover-text-color": u2,
"hover-border-color": l,
"active-bg-color": s,
"active-border-color": s
}), t.value) {
const c = e.dark ? vt(r, 50) : r.tint(50).toString();
o[n.cssVarBlockName("disabled-bg-color")] = c, o[n.cssVarBlockName("disabled-text-color")] = e.dark ? "rgba(255, 255, 255, 0.5)" : `var(${n.cssVarName("color-white")})`, o[n.cssVarBlockName("disabled-border-color")] = c;
}
}
}
return o;
});
}
var Xv = defineComponent({
name: "ElButton"
});
var eg = defineComponent({
...Xv,
props: yi,
emits: Nv,
setup(e, { expose: t, emit: n }) {
const o = e, i = Qv(o), a2 = te("button"), { _ref: r, _size: s, _type: l, _disabled: u2, _props: c, shouldAddSpace: d, handleClick: f2 } = Rv(o, n), m2 = computed(() => [
a2.b(),
a2.m(l.value),
a2.m(s.value),
a2.is("disabled", u2.value),
a2.is("loading", o.loading),
a2.is("plain", o.plain),
a2.is("round", o.round),
a2.is("circle", o.circle),
a2.is("text", o.text),
a2.is("link", o.link),
a2.is("has-bg", o.bg)
]);
return t({
ref: r,
size: s,
type: l,
disabled: u2,
shouldAddSpace: d
}), (p, h3) => (openBlock(), createBlock(resolveDynamicComponent(p.tag), mergeProps({
ref_key: "_ref",
ref: r
}, unref(c), {
class: unref(m2),
style: unref(i),
onClick: unref(f2)
}), {
default: withCtx(() => [
p.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
p.$slots.loading ? renderSlot(p.$slots, "loading", { key: 0 }) : (openBlock(), createBlock(unref(Ue), {
key: 1,
class: normalizeClass(unref(a2).is("loading"))
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(p.loadingIcon)))
]),
_: 1
}, 8, ["class"]))
], 64)) : p.icon || p.$slots.icon ? (openBlock(), createBlock(unref(Ue), { key: 1 }, {
default: withCtx(() => [
p.icon ? (openBlock(), createBlock(resolveDynamicComponent(p.icon), { key: 0 })) : renderSlot(p.$slots, "icon", { key: 1 })
]),
_: 3
})) : createCommentVNode("v-if", true),
p.$slots.default ? (openBlock(), createElementBlock("span", {
key: 2,
class: normalizeClass({ [unref(a2).em("text", "expand")]: unref(d) })
}, [
renderSlot(p.$slots, "default")
], 2)) : createCommentVNode("v-if", true)
]),
_: 3
}, 16, ["class", "style", "onClick"]));
}
});
var tg = X(eg, [["__file", "button.vue"]]);
var ng = {
size: yi.size,
type: yi.type
};
var og = defineComponent({
name: "ElButtonGroup"
});
var ig = defineComponent({
...og,
props: ng,
setup(e) {
const t = e;
provide(Us, reactive({
size: toRef(t, "size"),
type: toRef(t, "type")
}));
const n = te("button");
return (o, i) => (openBlock(), createElementBlock("div", {
class: normalizeClass(unref(n).b("group"))
}, [
renderSlot(o.$slots, "default")
], 2));
}
});
var qs = X(ig, [["__file", "button-group.vue"]]);
var Qi = Me(tg, {
ButtonGroup: qs
});
zt(qs);
var ag = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function rg(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var yt = /* @__PURE__ */ new Map();
if (se) {
let e;
document.addEventListener("mousedown", (t) => e = t), document.addEventListener("mouseup", (t) => {
if (e) {
for (const n of yt.values())
for (const { documentHandler: o } of n)
o(t, e);
e = void 0;
}
});
}
function Cr(e, t) {
let n = [];
return Array.isArray(t.arg) ? n = t.arg : xt(t.arg) && n.push(t.arg), function(o, i) {
const a2 = t.instance.popperRef, r = o.target, s = i == null ? void 0 : i.target, l = !t || !t.instance, u2 = !r || !s, c = e.contains(r) || e.contains(s), d = e === r, f2 = n.length && n.some((p) => p == null ? void 0 : p.contains(r)) || n.length && n.includes(s), m2 = a2 && (a2.contains(r) || a2.contains(s));
l || u2 || c || d || f2 || m2 || t.value(o, i);
};
}
var sg = {
beforeMount(e, t) {
yt.has(e) || yt.set(e, []), yt.get(e).push({
documentHandler: Cr(e, t),
bindingFn: t.value
});
},
updated(e, t) {
yt.has(e) || yt.set(e, []);
const n = yt.get(e), o = n.findIndex((a2) => a2.bindingFn === t.oldValue), i = {
documentHandler: Cr(e, t),
bindingFn: t.value
};
o >= 0 ? n.splice(o, 1, i) : n.push(i);
},
unmounted(e) {
yt.delete(e);
}
};
var Gs = {
modelValue: {
type: [Number, String, Boolean],
default: void 0
},
label: {
type: [String, Boolean, Number, Object],
default: void 0
},
value: {
type: [String, Boolean, Number, Object],
default: void 0
},
indeterminate: Boolean,
disabled: Boolean,
checked: Boolean,
name: {
type: String,
default: void 0
},
trueValue: {
type: [String, Number],
default: void 0
},
falseValue: {
type: [String, Number],
default: void 0
},
trueLabel: {
type: [String, Number],
default: void 0
},
falseLabel: {
type: [String, Number],
default: void 0
},
id: {
type: String,
default: void 0
},
border: Boolean,
size: dn2,
tabindex: [String, Number],
validateEvent: {
type: Boolean,
default: true
},
...Ht(["ariaControls"])
};
var Js = {
[we]: (e) => je(e) || me(e) || ct(e),
change: (e) => je(e) || me(e) || ct(e)
};
var pn2 = Symbol("checkboxGroupContextKey");
var lg = ({
model: e,
isChecked: t
}) => {
const n = inject(pn2, void 0), o = computed(() => {
var a2, r;
const s = (a2 = n == null ? void 0 : n.max) == null ? void 0 : a2.value, l = (r = n == null ? void 0 : n.min) == null ? void 0 : r.value;
return !Ct(s) && e.value.length >= s && !t.value || !Ct(l) && e.value.length <= l && t.value;
});
return {
isDisabled: $o(computed(() => (n == null ? void 0 : n.disabled.value) || o.value)),
isLimitDisabled: o
};
};
var ug = (e, {
model: t,
isLimitExceeded: n,
hasOwnLabel: o,
isDisabled: i,
isLabeledByFormItem: a2
}) => {
const r = inject(pn2, void 0), { formItem: s } = fn(), { emit: l } = getCurrentInstance();
function u2(p) {
var h3, g2, y2, C2;
return [true, e.trueValue, e.trueLabel].includes(p) ? (g2 = (h3 = e.trueValue) != null ? h3 : e.trueLabel) != null ? g2 : true : (C2 = (y2 = e.falseValue) != null ? y2 : e.falseLabel) != null ? C2 : false;
}
function c(p, h3) {
l("change", u2(p), h3);
}
function d(p) {
if (n.value)
return;
const h3 = p.target;
l("change", u2(h3.checked), p);
}
async function f2(p) {
n.value || !o.value && !i.value && a2.value && (p.composedPath().some((y2) => y2.tagName === "LABEL") || (t.value = u2([false, e.falseValue, e.falseLabel].includes(t.value)), await nextTick(), c(t.value, p)));
}
const m2 = computed(() => (r == null ? void 0 : r.validateEvent) || e.validateEvent);
return watch(() => e.modelValue, () => {
m2.value && (s == null || s.validate("change").catch((p) => Oe(p)));
}), {
handleChange: d,
onClickRoot: f2
};
};
var cg = (e) => {
const t = ref(false), { emit: n } = getCurrentInstance(), o = inject(pn2, void 0), i = computed(() => Ct(o) === false), a2 = ref(false), r = computed({
get() {
var s, l;
return i.value ? (s = o == null ? void 0 : o.modelValue) == null ? void 0 : s.value : (l = e.modelValue) != null ? l : t.value;
},
set(s) {
var l, u2;
i.value && Ie(s) ? (a2.value = ((l = o == null ? void 0 : o.max) == null ? void 0 : l.value) !== void 0 && s.length > (o == null ? void 0 : o.max.value) && s.length > r.value.length, a2.value === false && ((u2 = o == null ? void 0 : o.changeEvent) == null || u2.call(o, s))) : (n(we, s), t.value = s);
}
});
return {
model: r,
isGroup: i,
isLimitExceeded: a2
};
};
var dg = (e, t, { model: n }) => {
const o = inject(pn2, void 0), i = ref(false), a2 = computed(() => Fn2(e.value) ? e.label : e.value), r = computed(() => {
const c = n.value;
return ct(c) ? c : Ie(c) ? ke(a2.value) ? c.map(toRaw).some((d) => wo(d, a2.value)) : c.map(toRaw).includes(a2.value) : c != null ? c === e.trueValue || c === e.trueLabel : !!c;
}), s = ln2(computed(() => {
var c;
return (c = o == null ? void 0 : o.size) == null ? void 0 : c.value;
}), {
prop: true
}), l = ln2(computed(() => {
var c;
return (c = o == null ? void 0 : o.size) == null ? void 0 : c.value;
})), u2 = computed(() => !!t.default || !Fn2(a2.value));
return {
checkboxButtonSize: s,
isChecked: r,
isFocused: i,
checkboxSize: l,
hasOwnLabel: u2,
actualValue: a2
};
};
var Ys = (e, t) => {
const { formItem: n } = fn(), { model: o, isGroup: i, isLimitExceeded: a2 } = cg(e), {
isFocused: r,
isChecked: s,
checkboxButtonSize: l,
checkboxSize: u2,
hasOwnLabel: c,
actualValue: d
} = dg(e, t, { model: o }), { isDisabled: f2 } = lg({ model: o, isChecked: s }), { inputId: m2, isLabeledByFormItem: p } = Do(e, {
formItemContext: n,
disableIdGeneration: c,
disableIdManagement: i
}), { handleChange: h3, onClickRoot: g2 } = ug(e, {
model: o,
isLimitExceeded: a2,
hasOwnLabel: c,
isDisabled: f2,
isLabeledByFormItem: p
});
return (() => {
function C2() {
var O2, T2;
Ie(o.value) && !o.value.includes(d.value) ? o.value.push(d.value) : o.value = (T2 = (O2 = e.trueValue) != null ? O2 : e.trueLabel) != null ? T2 : true;
}
e.checked && C2();
})(), Xt({
from: "label act as value",
replacement: "value",
version: "3.0.0",
scope: "el-checkbox",
ref: "https://element-plus.org/en-US/component/checkbox.html"
}, computed(() => i.value && Fn2(e.value))), Xt({
from: "true-label",
replacement: "true-value",
version: "3.0.0",
scope: "el-checkbox",
ref: "https://element-plus.org/en-US/component/checkbox.html"
}, computed(() => !!e.trueLabel)), Xt({
from: "false-label",
replacement: "false-value",
version: "3.0.0",
scope: "el-checkbox",
ref: "https://element-plus.org/en-US/component/checkbox.html"
}, computed(() => !!e.falseLabel)), {
inputId: m2,
isLabeledByFormItem: p,
isChecked: s,
isDisabled: f2,
isFocused: r,
checkboxButtonSize: l,
checkboxSize: u2,
hasOwnLabel: c,
model: o,
actualValue: d,
handleChange: h3,
onClickRoot: g2
};
};
var fg = defineComponent({
name: "ElCheckbox"
});
var pg = defineComponent({
...fg,
props: Gs,
emits: Js,
setup(e) {
const t = e, n = useSlots(), {
inputId: o,
isLabeledByFormItem: i,
isChecked: a2,
isDisabled: r,
isFocused: s,
checkboxSize: l,
hasOwnLabel: u2,
model: c,
actualValue: d,
handleChange: f2,
onClickRoot: m2
} = Ys(t, n), p = te("checkbox"), h3 = computed(() => [
p.b(),
p.m(l.value),
p.is("disabled", r.value),
p.is("bordered", t.border),
p.is("checked", a2.value)
]), g2 = computed(() => [
p.e("input"),
p.is("disabled", r.value),
p.is("checked", a2.value),
p.is("indeterminate", t.indeterminate),
p.is("focus", s.value)
]);
return (y2, C2) => (openBlock(), createBlock(resolveDynamicComponent(!unref(u2) && unref(i) ? "span" : "label"), {
class: normalizeClass(unref(h3)),
"aria-controls": y2.indeterminate ? y2.ariaControls : null,
onClick: unref(m2)
}, {
default: withCtx(() => {
var O2, T2, I2, k2;
return [
createBaseVNode("span", {
class: normalizeClass(unref(g2))
}, [
y2.trueValue || y2.falseValue || y2.trueLabel || y2.falseLabel ? withDirectives((openBlock(), createElementBlock("input", {
key: 0,
id: unref(o),
"onUpdate:modelValue": (A2) => isRef(c) ? c.value = A2 : null,
class: normalizeClass(unref(p).e("original")),
type: "checkbox",
indeterminate: y2.indeterminate,
name: y2.name,
tabindex: y2.tabindex,
disabled: unref(r),
"true-value": (T2 = (O2 = y2.trueValue) != null ? O2 : y2.trueLabel) != null ? T2 : true,
"false-value": (k2 = (I2 = y2.falseValue) != null ? I2 : y2.falseLabel) != null ? k2 : false,
onChange: unref(f2),
onFocus: (A2) => s.value = true,
onBlur: (A2) => s.value = false,
onClick: withModifiers(() => {
}, ["stop"])
}, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [
[vModelCheckbox, unref(c)]
]) : withDirectives((openBlock(), createElementBlock("input", {
key: 1,
id: unref(o),
"onUpdate:modelValue": (A2) => isRef(c) ? c.value = A2 : null,
class: normalizeClass(unref(p).e("original")),
type: "checkbox",
indeterminate: y2.indeterminate,
disabled: unref(r),
value: unref(d),
name: y2.name,
tabindex: y2.tabindex,
onChange: unref(f2),
onFocus: (A2) => s.value = true,
onBlur: (A2) => s.value = false,
onClick: withModifiers(() => {
}, ["stop"])
}, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [
[vModelCheckbox, unref(c)]
]),
createBaseVNode("span", {
class: normalizeClass(unref(p).e("inner"))
}, null, 2)
], 2),
unref(u2) ? (openBlock(), createElementBlock("span", {
key: 0,
class: normalizeClass(unref(p).e("label"))
}, [
renderSlot(y2.$slots, "default"),
y2.$slots.default ? createCommentVNode("v-if", true) : (openBlock(), createElementBlock(Fragment, { key: 0 }, [
createTextVNode(toDisplayString(y2.label), 1)
], 64))
], 2)) : createCommentVNode("v-if", true)
];
}),
_: 3
}, 8, ["class", "aria-controls", "onClick"]));
}
});
var hg = X(pg, [["__file", "checkbox.vue"]]);
var mg = defineComponent({
name: "ElCheckboxButton"
});
var vg = defineComponent({
...mg,
props: Gs,
emits: Js,
setup(e) {
const t = e, n = useSlots(), {
isFocused: o,
isChecked: i,
isDisabled: a2,
checkboxButtonSize: r,
model: s,
actualValue: l,
handleChange: u2
} = Ys(t, n), c = inject(pn2, void 0), d = te("checkbox"), f2 = computed(() => {
var p, h3, g2, y2;
const C2 = (h3 = (p = c == null ? void 0 : c.fill) == null ? void 0 : p.value) != null ? h3 : "";
return {
backgroundColor: C2,
borderColor: C2,
color: (y2 = (g2 = c == null ? void 0 : c.textColor) == null ? void 0 : g2.value) != null ? y2 : "",
boxShadow: C2 ? `-1px 0 0 0 ${C2}` : void 0
};
}), m2 = computed(() => [
d.b("button"),
d.bm("button", r.value),
d.is("disabled", a2.value),
d.is("checked", i.value),
d.is("focus", o.value)
]);
return (p, h3) => {
var g2, y2, C2, O2;
return openBlock(), createElementBlock("label", {
class: normalizeClass(unref(m2))
}, [
p.trueValue || p.falseValue || p.trueLabel || p.falseLabel ? withDirectives((openBlock(), createElementBlock("input", {
key: 0,
"onUpdate:modelValue": (T2) => isRef(s) ? s.value = T2 : null,
class: normalizeClass(unref(d).be("button", "original")),
type: "checkbox",
name: p.name,
tabindex: p.tabindex,
disabled: unref(a2),
"true-value": (y2 = (g2 = p.trueValue) != null ? g2 : p.trueLabel) != null ? y2 : true,
"false-value": (O2 = (C2 = p.falseValue) != null ? C2 : p.falseLabel) != null ? O2 : false,
onChange: unref(u2),
onFocus: (T2) => o.value = true,
onBlur: (T2) => o.value = false,
onClick: withModifiers(() => {
}, ["stop"])
}, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [
[vModelCheckbox, unref(s)]
]) : withDirectives((openBlock(), createElementBlock("input", {
key: 1,
"onUpdate:modelValue": (T2) => isRef(s) ? s.value = T2 : null,
class: normalizeClass(unref(d).be("button", "original")),
type: "checkbox",
name: p.name,
tabindex: p.tabindex,
disabled: unref(a2),
value: unref(l),
onChange: unref(u2),
onFocus: (T2) => o.value = true,
onBlur: (T2) => o.value = false,
onClick: withModifiers(() => {
}, ["stop"])
}, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [
[vModelCheckbox, unref(s)]
]),
p.$slots.default || p.label ? (openBlock(), createElementBlock("span", {
key: 2,
class: normalizeClass(unref(d).be("button", "inner")),
style: normalizeStyle(unref(i) ? unref(f2) : void 0)
}, [
renderSlot(p.$slots, "default", {}, () => [
createTextVNode(toDisplayString(p.label), 1)
])
], 6)) : createCommentVNode("v-if", true)
], 2);
};
}
});
var Zs = X(vg, [["__file", "checkbox-button.vue"]]);
var gg = Q({
modelValue: {
type: U2(Array),
default: () => []
},
disabled: Boolean,
min: Number,
max: Number,
size: dn2,
fill: String,
textColor: String,
tag: {
type: String,
default: "div"
},
validateEvent: {
type: Boolean,
default: true
},
...Ht(["ariaLabel"])
});
var yg = {
[we]: (e) => Ie(e),
change: (e) => Ie(e)
};
var bg = defineComponent({
name: "ElCheckboxGroup"
});
var wg = defineComponent({
...bg,
props: gg,
emits: yg,
setup(e, { emit: t }) {
const n = e, o = te("checkbox"), { formItem: i } = fn(), { inputId: a2, isLabeledByFormItem: r } = Do(n, {
formItemContext: i
}), s = async (u2) => {
t(we, u2), await nextTick(), t("change", u2);
}, l = computed({
get() {
return n.modelValue;
},
set(u2) {
s(u2);
}
});
return provide(pn2, {
...as(toRefs(n), [
"size",
"min",
"max",
"disabled",
"validateEvent",
"fill",
"textColor"
]),
modelValue: l,
changeEvent: s
}), watch(() => n.modelValue, () => {
n.validateEvent && (i == null || i.validate("change").catch((u2) => Oe(u2)));
}), (u2, c) => {
var d;
return openBlock(), createBlock(resolveDynamicComponent(u2.tag), {
id: unref(a2),
class: normalizeClass(unref(o).b("group")),
role: "group",
"aria-label": unref(r) ? void 0 : u2.ariaLabel || "checkbox-group",
"aria-labelledby": unref(r) ? (d = unref(i)) == null ? void 0 : d.labelId : void 0
}, {
default: withCtx(() => [
renderSlot(u2.$slots, "default")
]),
_: 3
}, 8, ["id", "class", "aria-label", "aria-labelledby"]);
};
}
});
var Qs = X(wg, [["__file", "checkbox-group.vue"]]);
var Xs = Me(hg, {
CheckboxButton: Zs,
CheckboxGroup: Qs
});
zt(Zs);
var el = zt(Qs);
var tl = Q({
modelValue: {
type: [String, Number, Boolean],
default: void 0
},
size: dn2,
disabled: Boolean,
label: {
type: [String, Number, Boolean],
default: void 0
},
value: {
type: [String, Number, Boolean],
default: void 0
},
name: {
type: String,
default: void 0
}
});
var Sg = Q({
...tl,
border: Boolean
});
var nl = {
[we]: (e) => je(e) || me(e) || ct(e),
[Fi]: (e) => je(e) || me(e) || ct(e)
};
var ol = Symbol("radioGroupKey");
var il = (e, t) => {
const n = ref(), o = inject(ol, void 0), i = computed(() => !!o), a2 = computed(() => Fn2(e.value) ? e.label : e.value), r = computed({
get() {
return i.value ? o.modelValue : e.modelValue;
},
set(d) {
i.value ? o.changeEvent(d) : t && t(we, d), n.value.checked = e.modelValue === a2.value;
}
}), s = ln2(computed(() => o == null ? void 0 : o.size)), l = $o(computed(() => o == null ? void 0 : o.disabled)), u2 = ref(false), c = computed(() => l.value || i.value && r.value !== a2.value ? -1 : 0);
return Xt({
from: "label act as value",
replacement: "value",
version: "3.0.0",
scope: "el-radio",
ref: "https://element-plus.org/en-US/component/radio.html"
}, computed(() => i.value && Fn2(e.value))), {
radioRef: n,
isGroup: i,
radioGroup: o,
focus: u2,
size: s,
disabled: l,
tabIndex: c,
modelValue: r,
actualValue: a2
};
};
var Cg = defineComponent({
name: "ElRadio"
});
var Eg = defineComponent({
...Cg,
props: Sg,
emits: nl,
setup(e, { emit: t }) {
const n = e, o = te("radio"), { radioRef: i, radioGroup: a2, focus: r, size: s, disabled: l, modelValue: u2, actualValue: c } = il(n, t);
function d() {
nextTick(() => t("change", u2.value));
}
return (f2, m2) => {
var p;
return openBlock(), createElementBlock("label", {
class: normalizeClass([
unref(o).b(),
unref(o).is("disabled", unref(l)),
unref(o).is("focus", unref(r)),
unref(o).is("bordered", f2.border),
unref(o).is("checked", unref(u2) === unref(c)),
unref(o).m(unref(s))
])
}, [
createBaseVNode("span", {
class: normalizeClass([
unref(o).e("input"),
unref(o).is("disabled", unref(l)),
unref(o).is("checked", unref(u2) === unref(c))
])
}, [
withDirectives(createBaseVNode("input", {
ref_key: "radioRef",
ref: i,
"onUpdate:modelValue": (h3) => isRef(u2) ? u2.value = h3 : null,
class: normalizeClass(unref(o).e("original")),
value: unref(c),
name: f2.name || ((p = unref(a2)) == null ? void 0 : p.name),
disabled: unref(l),
checked: unref(u2) === unref(c),
type: "radio",
onFocus: (h3) => r.value = true,
onBlur: (h3) => r.value = false,
onChange: d,
onClick: withModifiers(() => {
}, ["stop"])
}, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "checked", "onFocus", "onBlur", "onClick"]), [
[vModelRadio, unref(u2)]
]),
createBaseVNode("span", {
class: normalizeClass(unref(o).e("inner"))
}, null, 2)
], 2),
createBaseVNode("span", {
class: normalizeClass(unref(o).e("label")),
onKeydown: withModifiers(() => {
}, ["stop"])
}, [
renderSlot(f2.$slots, "default", {}, () => [
createTextVNode(toDisplayString(f2.label), 1)
])
], 42, ["onKeydown"])
], 2);
};
}
});
var Ig = X(Eg, [["__file", "radio.vue"]]);
var kg = Q({
...tl
});
var Tg = defineComponent({
name: "ElRadioButton"
});
var Ag = defineComponent({
...Tg,
props: kg,
setup(e) {
const t = e, n = te("radio"), { radioRef: o, focus: i, size: a2, disabled: r, modelValue: s, radioGroup: l, actualValue: u2 } = il(t), c = computed(() => ({
backgroundColor: (l == null ? void 0 : l.fill) || "",
borderColor: (l == null ? void 0 : l.fill) || "",
boxShadow: l != null && l.fill ? `-1px 0 0 0 ${l.fill}` : "",
color: (l == null ? void 0 : l.textColor) || ""
}));
return (d, f2) => {
var m2;
return openBlock(), createElementBlock("label", {
class: normalizeClass([
unref(n).b("button"),
unref(n).is("active", unref(s) === unref(u2)),
unref(n).is("disabled", unref(r)),
unref(n).is("focus", unref(i)),
unref(n).bm("button", unref(a2))
])
}, [
withDirectives(createBaseVNode("input", {
ref_key: "radioRef",
ref: o,
"onUpdate:modelValue": (p) => isRef(s) ? s.value = p : null,
class: normalizeClass(unref(n).be("button", "original-radio")),
value: unref(u2),
type: "radio",
name: d.name || ((m2 = unref(l)) == null ? void 0 : m2.name),
disabled: unref(r),
onFocus: (p) => i.value = true,
onBlur: (p) => i.value = false,
onClick: withModifiers(() => {
}, ["stop"])
}, null, 42, ["onUpdate:modelValue", "value", "name", "disabled", "onFocus", "onBlur", "onClick"]), [
[vModelRadio, unref(s)]
]),
createBaseVNode("span", {
class: normalizeClass(unref(n).be("button", "inner")),
style: normalizeStyle(unref(s) === unref(u2) ? unref(c) : {}),
onKeydown: withModifiers(() => {
}, ["stop"])
}, [
renderSlot(d.$slots, "default", {}, () => [
createTextVNode(toDisplayString(d.label), 1)
])
], 46, ["onKeydown"])
], 2);
};
}
});
var al = X(Ag, [["__file", "radio-button.vue"]]);
var Og = Q({
id: {
type: String,
default: void 0
},
size: dn2,
disabled: Boolean,
modelValue: {
type: [String, Number, Boolean],
default: void 0
},
fill: {
type: String,
default: ""
},
textColor: {
type: String,
default: ""
},
name: {
type: String,
default: void 0
},
validateEvent: {
type: Boolean,
default: true
},
...Ht(["ariaLabel"])
});
var Mg = nl;
var _g = defineComponent({
name: "ElRadioGroup"
});
var Pg = defineComponent({
..._g,
props: Og,
emits: Mg,
setup(e, { emit: t }) {
const n = e, o = te("radio"), i = Dt(), a2 = ref(), { formItem: r } = fn(), { inputId: s, isLabeledByFormItem: l } = Do(n, {
formItemContext: r
}), u2 = (d) => {
t(we, d), nextTick(() => t("change", d));
};
onMounted(() => {
const d = a2.value.querySelectorAll("[type=radio]"), f2 = d[0];
!Array.from(d).some((m2) => m2.checked) && f2 && (f2.tabIndex = 0);
});
const c = computed(() => n.name || i.value);
return provide(ol, reactive({
...toRefs(n),
changeEvent: u2,
name: c
})), watch(() => n.modelValue, () => {
n.validateEvent && (r == null || r.validate("change").catch((d) => Oe(d)));
}), (d, f2) => (openBlock(), createElementBlock("div", {
id: unref(s),
ref_key: "radioGroupRef",
ref: a2,
class: normalizeClass(unref(o).b("group")),
role: "radiogroup",
"aria-label": unref(l) ? void 0 : d.ariaLabel || "radio-group",
"aria-labelledby": unref(l) ? unref(r).labelId : void 0
}, [
renderSlot(d.$slots, "default")
], 10, ["id", "aria-label", "aria-labelledby"]));
}
});
var rl = X(Pg, [["__file", "radio-group.vue"]]);
var sl = Me(Ig, {
RadioButton: al,
RadioGroup: rl
});
var ll = zt(rl);
zt(al);
var wi = Q({
type: {
type: String,
values: ["primary", "success", "info", "warning", "danger"],
default: "primary"
},
closable: Boolean,
disableTransitions: Boolean,
hit: Boolean,
color: String,
size: {
type: String,
values: cs
},
effect: {
type: String,
values: ["dark", "light", "plain"],
default: "light"
},
round: Boolean
});
var Lg = {
close: (e) => e instanceof MouseEvent,
click: (e) => e instanceof MouseEvent
};
var xg = defineComponent({
name: "ElTag"
});
var Fg = defineComponent({
...xg,
props: wi,
emits: Lg,
setup(e, { emit: t }) {
const n = e, o = ln2(), i = te("tag"), a2 = computed(() => {
const { type: u2, hit: c, effect: d, closable: f2, round: m2 } = n;
return [
i.b(),
i.is("closable", f2),
i.m(u2 || "primary"),
i.m(o.value),
i.m(d),
i.is("hit", c),
i.is("round", m2)
];
}), r = (u2) => {
t("close", u2);
}, s = (u2) => {
t("click", u2);
}, l = (u2) => {
u2.component.subTree.component.bum = null;
};
return (u2, c) => u2.disableTransitions ? (openBlock(), createElementBlock("span", {
key: 0,
class: normalizeClass(unref(a2)),
style: normalizeStyle({ backgroundColor: u2.color }),
onClick: s
}, [
createBaseVNode("span", {
class: normalizeClass(unref(i).e("content"))
}, [
renderSlot(u2.$slots, "default")
], 2),
u2.closable ? (openBlock(), createBlock(unref(Ue), {
key: 0,
class: normalizeClass(unref(i).e("close")),
onClick: withModifiers(r, ["stop"])
}, {
default: withCtx(() => [
createVNode(unref(close_default))
]),
_: 1
}, 8, ["class", "onClick"])) : createCommentVNode("v-if", true)
], 6)) : (openBlock(), createBlock(Transition, {
key: 1,
name: `${unref(i).namespace.value}-zoom-in-center`,
appear: "",
onVnodeMounted: l
}, {
default: withCtx(() => [
createBaseVNode("span", {
class: normalizeClass(unref(a2)),
style: normalizeStyle({ backgroundColor: u2.color }),
onClick: s
}, [
createBaseVNode("span", {
class: normalizeClass(unref(i).e("content"))
}, [
renderSlot(u2.$slots, "default")
], 2),
u2.closable ? (openBlock(), createBlock(unref(Ue), {
key: 0,
class: normalizeClass(unref(i).e("close")),
onClick: withModifiers(r, ["stop"])
}, {
default: withCtx(() => [
createVNode(unref(close_default))
]),
_: 1
}, 8, ["class", "onClick"])) : createCommentVNode("v-if", true)
], 6)
]),
_: 3
}, 8, ["name"]));
}
});
var Rg = X(Fg, [["__file", "tag.vue"]]);
var $g = Me(Rg);
var ul = Symbol("rowContextKey");
var Dg = [
"start",
"center",
"end",
"space-around",
"space-between",
"space-evenly"
];
var Ng = ["top", "middle", "bottom"];
var Bg = Q({
tag: {
type: String,
default: "div"
},
gutter: {
type: Number,
default: 0
},
justify: {
type: String,
values: Dg,
default: "start"
},
align: {
type: String,
values: Ng
}
});
var Vg = defineComponent({
name: "ElRow"
});
var zg = defineComponent({
...Vg,
props: Bg,
setup(e) {
const t = e, n = te("row"), o = computed(() => t.gutter);
provide(ul, {
gutter: o
});
const i = computed(() => {
const r = {};
return t.gutter && (r.marginRight = r.marginLeft = `-${t.gutter / 2}px`), r;
}), a2 = computed(() => [
n.b(),
n.is(`justify-${t.justify}`, t.justify !== "start"),
n.is(`align-${t.align}`, !!t.align)
]);
return (r, s) => (openBlock(), createBlock(resolveDynamicComponent(r.tag), {
class: normalizeClass(unref(a2)),
style: normalizeStyle(unref(i))
}, {
default: withCtx(() => [
renderSlot(r.$slots, "default")
]),
_: 3
}, 8, ["class", "style"]));
}
});
var Hg = X(zg, [["__file", "row.vue"]]);
var Un = Me(Hg);
var jg = Q({
tag: {
type: String,
default: "div"
},
span: {
type: Number,
default: 24
},
offset: {
type: Number,
default: 0
},
pull: {
type: Number,
default: 0
},
push: {
type: Number,
default: 0
},
xs: {
type: U2([Number, Object]),
default: () => kn({})
},
sm: {
type: U2([Number, Object]),
default: () => kn({})
},
md: {
type: U2([Number, Object]),
default: () => kn({})
},
lg: {
type: U2([Number, Object]),
default: () => kn({})
},
xl: {
type: U2([Number, Object]),
default: () => kn({})
}
});
var Kg = defineComponent({
name: "ElCol"
});
var Ug = defineComponent({
...Kg,
props: jg,
setup(e) {
const t = e, { gutter: n } = inject(ul, { gutter: computed(() => 0) }), o = te("col"), i = computed(() => {
const r = {};
return n.value && (r.paddingLeft = r.paddingRight = `${n.value / 2}px`), r;
}), a2 = computed(() => {
const r = [];
return ["span", "offset", "pull", "push"].forEach((u2) => {
const c = t[u2];
me(c) && (u2 === "span" ? r.push(o.b(`${t[u2]}`)) : c > 0 && r.push(o.b(`${u2}-${t[u2]}`)));
}), ["xs", "sm", "md", "lg", "xl"].forEach((u2) => {
me(t[u2]) ? r.push(o.b(`${u2}-${t[u2]}`)) : ke(t[u2]) && Object.entries(t[u2]).forEach(([c, d]) => {
r.push(c !== "span" ? o.b(`${u2}-${c}-${d}`) : o.b(`${u2}-${d}`));
});
}), n.value && r.push(o.is("guttered")), [o.b(), r];
});
return (r, s) => (openBlock(), createBlock(resolveDynamicComponent(r.tag), {
class: normalizeClass(unref(a2)),
style: normalizeStyle(unref(i))
}, {
default: withCtx(() => [
renderSlot(r.$slots, "default")
]),
_: 3
}, 8, ["class", "style"]));
}
});
var Wg = X(Ug, [["__file", "col.vue"]]);
var Wn = Me(Wg);
var qg = Q({
mask: {
type: Boolean,
default: true
},
customMaskEvent: Boolean,
overlayClass: {
type: U2([
String,
Array,
Object
])
},
zIndex: {
type: U2([String, Number])
}
});
var Gg = {
click: (e) => e instanceof MouseEvent
};
var Jg = "overlay";
var Yg = defineComponent({
name: "ElOverlay",
props: qg,
emits: Gg,
setup(e, { slots: t, emit: n }) {
const o = te(Jg), i = (l) => {
n("click", l);
}, { onClick: a2, onMousedown: r, onMouseup: s } = ks(e.customMaskEvent ? void 0 : i);
return () => e.mask ? createVNode("div", {
class: [o.b(), e.overlayClass],
style: {
zIndex: e.zIndex
},
onClick: a2,
onMousedown: r,
onMouseup: s
}, [renderSlot(t, "default")], fo.STYLE | fo.CLASS | fo.PROPS, ["onClick", "onMouseup", "onMousedown"]) : h("div", {
class: e.overlayClass,
style: {
zIndex: e.zIndex,
position: "fixed",
top: "0px",
right: "0px",
bottom: "0px",
left: "0px"
}
}, [renderSlot(t, "default")]);
}
});
var Zg = Yg;
var cl = Symbol("dialogInjectionKey");
var dl = Q({
center: Boolean,
alignCenter: Boolean,
closeIcon: {
type: tn2
},
draggable: Boolean,
overflow: Boolean,
fullscreen: Boolean,
showClose: {
type: Boolean,
default: true
},
title: {
type: String,
default: ""
},
ariaLevel: {
type: String,
default: "2"
}
});
var Qg = {
close: () => true
};
var Xg = defineComponent({ name: "ElDialogContent" });
var ey = defineComponent({
...Xg,
props: dl,
emits: Qg,
setup(e, { expose: t }) {
const n = e, { t: o } = Ri(), { Close: i } = Pp, { dialogRef: a2, headerRef: r, bodyId: s, ns: l, style: u2 } = inject(cl), { focusTrapRef: c } = inject(Bs), d = computed(() => [
l.b(),
l.is("fullscreen", n.fullscreen),
l.is("draggable", n.draggable),
l.is("align-center", n.alignCenter),
{ [l.m("center")]: n.center }
]), f2 = Fp(c, a2), m2 = computed(() => n.draggable), p = computed(() => n.overflow), { resetPosition: h3 } = $p(a2, r, m2, p);
return t({
resetPosition: h3
}), (g2, y2) => (openBlock(), createElementBlock("div", {
ref: unref(f2),
class: normalizeClass(unref(d)),
style: normalizeStyle(unref(u2)),
tabindex: "-1"
}, [
createBaseVNode("header", {
ref_key: "headerRef",
ref: r,
class: normalizeClass([unref(l).e("header"), { "show-close": g2.showClose }])
}, [
renderSlot(g2.$slots, "header", {}, () => [
createBaseVNode("span", {
role: "heading",
"aria-level": g2.ariaLevel,
class: normalizeClass(unref(l).e("title"))
}, toDisplayString(g2.title), 11, ["aria-level"])
]),
g2.showClose ? (openBlock(), createElementBlock("button", {
key: 0,
"aria-label": unref(o)("el.dialog.close"),
class: normalizeClass(unref(l).e("headerbtn")),
type: "button",
onClick: (C2) => g2.$emit("close")
}, [
createVNode(unref(Ue), {
class: normalizeClass(unref(l).e("close"))
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(g2.closeIcon || unref(i))))
]),
_: 1
}, 8, ["class"])
], 10, ["aria-label", "onClick"])) : createCommentVNode("v-if", true)
], 2),
createBaseVNode("div", {
id: unref(s),
class: normalizeClass(unref(l).e("body"))
}, [
renderSlot(g2.$slots, "default")
], 10, ["id"]),
g2.$slots.footer ? (openBlock(), createElementBlock("footer", {
key: 0,
class: normalizeClass(unref(l).e("footer"))
}, [
renderSlot(g2.$slots, "footer")
], 2)) : createCommentVNode("v-if", true)
], 6));
}
});
var ty = X(ey, [["__file", "dialog-content.vue"]]);
var ny = Q({
...dl,
appendToBody: Boolean,
appendTo: {
type: U2([String, Object]),
default: "body"
},
beforeClose: {
type: U2(Function)
},
destroyOnClose: Boolean,
closeOnClickModal: {
type: Boolean,
default: true
},
closeOnPressEscape: {
type: Boolean,
default: true
},
lockScroll: {
type: Boolean,
default: true
},
modal: {
type: Boolean,
default: true
},
openDelay: {
type: Number,
default: 0
},
closeDelay: {
type: Number,
default: 0
},
top: {
type: String
},
modelValue: Boolean,
modalClass: String,
width: {
type: [String, Number]
},
zIndex: {
type: Number
},
trapFocus: Boolean,
headerAriaLevel: {
type: String,
default: "2"
}
});
var oy = {
open: () => true,
opened: () => true,
close: () => true,
closed: () => true,
[we]: (e) => ct(e),
openAutoFocus: () => true,
closeAutoFocus: () => true
};
var iy = (e, t) => {
var n;
const i = getCurrentInstance().emit, { nextZIndex: a2 } = Ui();
let r = "";
const s = Dt(), l = Dt(), u2 = ref(false), c = ref(false), d = ref(false), f2 = ref((n = e.zIndex) != null ? n : a2());
let m2, p;
const h3 = Ro("namespace", Mn), g2 = computed(() => {
const Y = {}, D2 = `--${h3.value}-dialog`;
return e.fullscreen || (e.top && (Y[`${D2}-margin-top`] = e.top), e.width && (Y[`${D2}-width`] = $t(e.width))), Y;
}), y2 = computed(() => e.alignCenter ? { display: "flex" } : {});
function C2() {
i("opened");
}
function O2() {
i("closed"), i(we, false), e.destroyOnClose && (d.value = false);
}
function T2() {
i("close");
}
function I2() {
p == null || p(), m2 == null || m2(), e.openDelay && e.openDelay > 0 ? { stop: m2 } = da(() => N2(), e.openDelay) : N2();
}
function k2() {
m2 == null || m2(), p == null || p(), e.closeDelay && e.closeDelay > 0 ? { stop: p } = da(() => K(), e.closeDelay) : K();
}
function A2() {
function Y(D2) {
D2 || (c.value = true, u2.value = false);
}
e.beforeClose ? e.beforeClose(Y) : k2();
}
function $2() {
e.closeOnClickModal && A2();
}
function N2() {
se && (u2.value = true);
}
function K() {
u2.value = false;
}
function B2() {
i("openAutoFocus");
}
function M2() {
i("closeAutoFocus");
}
function W2(Y) {
var D2;
((D2 = Y.detail) == null ? void 0 : D2.focusReason) === "pointer" && Y.preventDefault();
}
e.lockScroll && Hp(u2);
function de() {
e.closeOnPressEscape && A2();
}
return watch(() => e.modelValue, (Y) => {
Y ? (c.value = false, I2(), d.value = true, f2.value = is(e.zIndex) ? a2() : f2.value++, nextTick(() => {
i("open"), t.value && (t.value.scrollTop = 0);
})) : u2.value && k2();
}), watch(() => e.fullscreen, (Y) => {
t.value && (Y ? (r = t.value.style.transform, t.value.style.transform = "") : t.value.style.transform = r);
}), onMounted(() => {
e.modelValue && (u2.value = true, d.value = true, I2());
}), {
afterEnter: C2,
afterLeave: O2,
beforeLeave: T2,
handleClose: A2,
onModalClick: $2,
close: k2,
doClose: K,
onOpenAutoFocus: B2,
onCloseAutoFocus: M2,
onCloseRequested: de,
onFocusoutPrevented: W2,
titleId: s,
bodyId: l,
closed: c,
style: g2,
overlayDialogStyle: y2,
rendered: d,
visible: u2,
zIndex: f2
};
};
var ay = defineComponent({
name: "ElDialog",
inheritAttrs: false
});
var ry = defineComponent({
...ay,
props: ny,
emits: oy,
setup(e, { expose: t }) {
const n = e, o = useSlots();
Xt({
scope: "el-dialog",
from: "the title slot",
replacement: "the header slot",
version: "3.0.0",
ref: "https://element-plus.org/en-US/component/dialog.html#slots"
}, computed(() => !!o.title));
const i = te("dialog"), a2 = ref(), r = ref(), s = ref(), {
visible: l,
titleId: u2,
bodyId: c,
style: d,
overlayDialogStyle: f2,
rendered: m2,
zIndex: p,
afterEnter: h3,
afterLeave: g2,
beforeLeave: y2,
handleClose: C2,
onModalClick: O2,
onOpenAutoFocus: T2,
onCloseAutoFocus: I2,
onCloseRequested: k2,
onFocusoutPrevented: A2
} = iy(n, a2);
provide(cl, {
dialogRef: a2,
headerRef: r,
bodyId: c,
ns: i,
rendered: m2,
style: d
});
const $2 = ks(O2), N2 = computed(() => n.draggable && !n.fullscreen);
return t({
visible: l,
dialogContentRef: s,
resetPosition: () => {
var B2;
(B2 = s.value) == null || B2.resetPosition();
}
}), (B2, M2) => (openBlock(), createBlock(unref(js), {
to: B2.appendTo,
disabled: B2.appendTo !== "body" ? false : !B2.appendToBody
}, {
default: withCtx(() => [
createVNode(Transition, {
name: "dialog-fade",
onAfterEnter: unref(h3),
onAfterLeave: unref(g2),
onBeforeLeave: unref(y2),
persisted: ""
}, {
default: withCtx(() => [
withDirectives(createVNode(unref(Zg), {
"custom-mask-event": "",
mask: B2.modal,
"overlay-class": B2.modalClass,
"z-index": unref(p)
}, {
default: withCtx(() => [
createBaseVNode("div", {
role: "dialog",
"aria-modal": "true",
"aria-label": B2.title || void 0,
"aria-labelledby": B2.title ? void 0 : unref(u2),
"aria-describedby": unref(c),
class: normalizeClass(`${unref(i).namespace.value}-overlay-dialog`),
style: normalizeStyle(unref(f2)),
onClick: unref($2).onClick,
onMousedown: unref($2).onMousedown,
onMouseup: unref($2).onMouseup
}, [
createVNode(unref(zs), {
loop: "",
trapped: unref(l),
"focus-start-el": "container",
onFocusAfterTrapped: unref(T2),
onFocusAfterReleased: unref(I2),
onFocusoutPrevented: unref(A2),
onReleaseRequested: unref(k2)
}, {
default: withCtx(() => [
unref(m2) ? (openBlock(), createBlock(ty, mergeProps({
key: 0,
ref_key: "dialogContentRef",
ref: s
}, B2.$attrs, {
center: B2.center,
"align-center": B2.alignCenter,
"close-icon": B2.closeIcon,
draggable: unref(N2),
overflow: B2.overflow,
fullscreen: B2.fullscreen,
"show-close": B2.showClose,
title: B2.title,
"aria-level": B2.headerAriaLevel,
onClose: unref(C2)
}), createSlots({
header: withCtx(() => [
B2.$slots.title ? renderSlot(B2.$slots, "title", { key: 1 }) : renderSlot(B2.$slots, "header", {
key: 0,
close: unref(C2),
titleId: unref(u2),
titleClass: unref(i).e("title")
})
]),
default: withCtx(() => [
renderSlot(B2.$slots, "default")
]),
_: 2
}, [
B2.$slots.footer ? {
name: "footer",
fn: withCtx(() => [
renderSlot(B2.$slots, "footer")
])
} : void 0
]), 1040, ["center", "align-center", "close-icon", "draggable", "overflow", "fullscreen", "show-close", "title", "aria-level", "onClose"])) : createCommentVNode("v-if", true)
]),
_: 3
}, 8, ["trapped", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
], 46, ["aria-label", "aria-labelledby", "aria-describedby", "onClick", "onMousedown", "onMouseup"])
]),
_: 3
}, 8, ["mask", "overlay-class", "z-index"]), [
[vShow, unref(l)]
])
]),
_: 3
}, 8, ["onAfterEnter", "onAfterLeave", "onBeforeLeave"])
]),
_: 3
}, 8, ["to", "disabled"]));
}
});
var sy = X(ry, [["__file", "dialog.vue"]]);
var ly = Me(sy);
var uy = defineComponent({
inheritAttrs: false
});
function cy(e, t, n, o, i, a2) {
return renderSlot(e.$slots, "default");
}
var dy = X(uy, [["render", cy], ["__file", "collection.vue"]]);
var fy = defineComponent({
name: "ElCollectionItem",
inheritAttrs: false
});
function py(e, t, n, o, i, a2) {
return renderSlot(e.$slots, "default");
}
var hy = X(fy, [["render", py], ["__file", "collection-item.vue"]]);
var my = "data-el-collection-item";
var vy = (e) => {
const t = `El${e}Collection`, n = `${t}Item`, o = Symbol(t), i = Symbol(n), a2 = {
...dy,
name: t,
setup() {
const s = ref(null), l = /* @__PURE__ */ new Map();
provide(o, {
itemMap: l,
getItems: () => {
const c = unref(s);
if (!c)
return [];
const d = Array.from(c.querySelectorAll(`[${my}]`));
return [...l.values()].sort((m2, p) => d.indexOf(m2.ref) - d.indexOf(p.ref));
},
collectionRef: s
});
}
}, r = {
...hy,
name: n,
setup(s, { attrs: l }) {
const u2 = ref(null), c = inject(o, void 0);
provide(i, {
collectionItemRef: u2
}), onMounted(() => {
const d = unref(u2);
d && c.itemMap.set(d, {
ref: d,
...l
});
}), onBeforeUnmount(() => {
const d = unref(u2);
c.itemMap.delete(d);
});
}
};
return {
COLLECTION_INJECTION_KEY: o,
COLLECTION_ITEM_INJECTION_KEY: i,
ElCollection: a2,
ElCollectionItem: r
};
};
var oi = Q({
trigger: Bn.trigger,
effect: {
...Le.effect,
default: "light"
},
type: {
type: U2(String)
},
placement: {
type: U2(String),
default: "bottom"
},
popperOptions: {
type: U2(Object),
default: () => ({})
},
id: String,
size: {
type: String,
default: ""
},
splitButton: Boolean,
hideOnClick: {
type: Boolean,
default: true
},
loop: {
type: Boolean,
default: true
},
showTimeout: {
type: Number,
default: 150
},
hideTimeout: {
type: Number,
default: 150
},
tabindex: {
type: U2([Number, String]),
default: 0
},
maxHeight: {
type: U2([Number, String]),
default: ""
},
popperClass: {
type: String,
default: ""
},
disabled: Boolean,
role: {
type: String,
default: "menu"
},
buttonProps: {
type: U2(Object)
},
teleported: Le.teleported
});
Q({
command: {
type: [Object, String, Number],
default: () => ({})
},
disabled: Boolean,
divided: Boolean,
textValue: String,
icon: {
type: tn2
}
});
Q({
onKeydown: { type: U2(Function) }
});
vy("Dropdown");
var fl = Symbol("ElSelectGroup");
var Bo = Symbol("ElSelect");
function gy(e, t) {
const n = inject(Bo), o = inject(fl, { disabled: false }), i = computed(() => c(St(n.props.modelValue), e.value)), a2 = computed(() => {
var m2;
if (n.props.multiple) {
const p = St((m2 = n.props.modelValue) != null ? m2 : []);
return !i.value && p.length >= n.props.multipleLimit && n.props.multipleLimit > 0;
} else
return false;
}), r = computed(() => e.label || (ke(e.value) ? "" : e.value)), s = computed(() => e.value || e.label || ""), l = computed(() => e.disabled || t.groupDisabled || a2.value), u2 = getCurrentInstance(), c = (m2 = [], p) => {
if (ke(e.value)) {
const h3 = n.props.valueKey;
return m2 && m2.some((g2) => toRaw(at(g2, h3)) === at(p, h3));
} else
return m2 && m2.includes(p);
}, d = () => {
!e.disabled && !o.disabled && (n.states.hoveringIndex = n.optionsArray.indexOf(u2.proxy));
}, f2 = (m2) => {
const p = new RegExp(Tp(m2), "i");
t.visible = p.test(r.value) || e.created;
};
return watch(() => r.value, () => {
!e.created && !n.props.remote && n.setSelected();
}), watch(() => e.value, (m2, p) => {
const { remote: h3, valueKey: g2 } = n.props;
if (m2 !== p && (n.onOptionDestroy(p, u2.proxy), n.onOptionCreate(u2.proxy)), !e.created && !h3) {
if (g2 && ke(m2) && ke(p) && m2[g2] === p[g2])
return;
n.setSelected();
}
}), watch(() => o.disabled, () => {
t.groupDisabled = o.disabled;
}, { immediate: true }), {
select: n,
currentLabel: r,
currentValue: s,
itemSelected: i,
isDisabled: l,
hoverItem: d,
updateOption: f2
};
}
var yy = defineComponent({
name: "ElOption",
componentName: "ElOption",
props: {
value: {
required: true,
type: [String, Number, Boolean, Object]
},
label: [String, Number],
created: Boolean,
disabled: Boolean
},
setup(e) {
const t = te("select"), n = Dt(), o = computed(() => [
t.be("dropdown", "item"),
t.is("disabled", unref(s)),
t.is("selected", unref(r)),
t.is("hovering", unref(f2))
]), i = reactive({
index: -1,
groupDisabled: false,
visible: true,
hover: false
}), {
currentLabel: a2,
itemSelected: r,
isDisabled: s,
select: l,
hoverItem: u2,
updateOption: c
} = gy(e, i), { visible: d, hover: f2 } = toRefs(i), m2 = getCurrentInstance().proxy;
l.onOptionCreate(m2), onBeforeUnmount(() => {
const h3 = m2.value, { selected: g2 } = l.states, C2 = (l.props.multiple ? g2 : [g2]).some((O2) => O2.value === m2.value);
nextTick(() => {
l.states.cachedOptions.get(h3) === m2 && !C2 && l.states.cachedOptions.delete(h3);
}), l.onOptionDestroy(h3, m2);
});
function p() {
s.value || l.handleOptionSelect(m2);
}
return {
ns: t,
id: n,
containerKls: o,
currentLabel: a2,
itemSelected: r,
isDisabled: s,
select: l,
hoverItem: u2,
updateOption: c,
visible: d,
hover: f2,
selectOptionClick: p,
states: i
};
}
});
function by(e, t, n, o, i, a2) {
return withDirectives((openBlock(), createElementBlock("li", {
id: e.id,
class: normalizeClass(e.containerKls),
role: "option",
"aria-disabled": e.isDisabled || void 0,
"aria-selected": e.itemSelected,
onMouseenter: e.hoverItem,
onClick: withModifiers(e.selectOptionClick, ["stop"])
}, [
renderSlot(e.$slots, "default", {}, () => [
createBaseVNode("span", null, toDisplayString(e.currentLabel), 1)
])
], 42, ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"])), [
[vShow, e.visible]
]);
}
var Xi = X(yy, [["render", by], ["__file", "option.vue"]]);
var wy = defineComponent({
name: "ElSelectDropdown",
componentName: "ElSelectDropdown",
setup() {
const e = inject(Bo), t = te("select"), n = computed(() => e.props.popperClass), o = computed(() => e.props.multiple), i = computed(() => e.props.fitInputWidth), a2 = ref("");
function r() {
var s;
a2.value = `${(s = e.selectRef) == null ? void 0 : s.offsetWidth}px`;
}
return onMounted(() => {
r(), bt(e.selectRef, r);
}), {
ns: t,
minWidth: a2,
popperClass: n,
isMultiple: o,
isFitInputWidth: i
};
}
});
function Sy(e, t, n, o, i, a2) {
return openBlock(), createElementBlock("div", {
class: normalizeClass([e.ns.b("dropdown"), e.ns.is("multiple", e.isMultiple), e.popperClass]),
style: normalizeStyle({ [e.isFitInputWidth ? "width" : "minWidth"]: e.minWidth })
}, [
e.$slots.header ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(e.ns.be("dropdown", "header"))
}, [
renderSlot(e.$slots, "header")
], 2)) : createCommentVNode("v-if", true),
renderSlot(e.$slots, "default"),
e.$slots.footer ? (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass(e.ns.be("dropdown", "footer"))
}, [
renderSlot(e.$slots, "footer")
], 2)) : createCommentVNode("v-if", true)
], 6);
}
var Cy = X(wy, [["render", Sy], ["__file", "select-dropdown.vue"]]);
var Ey = 11;
var Iy = (e, t) => {
const { t: n } = Ri(), o = Dt(), i = te("select"), a2 = te("input"), r = reactive({
inputValue: "",
options: /* @__PURE__ */ new Map(),
cachedOptions: /* @__PURE__ */ new Map(),
disabledOptions: /* @__PURE__ */ new Map(),
optionValues: [],
selected: [],
selectionWidth: 0,
calculatorWidth: 0,
collapseItemWidth: 0,
selectedLabel: "",
hoveringIndex: -1,
previousQuery: null,
inputHovering: false,
menuVisibleOnFocus: false,
isBeforeHide: false
}), s = ref(null), l = ref(null), u2 = ref(null), c = ref(null), d = ref(null), f2 = ref(null), m2 = ref(null), p = ref(null), h3 = ref(null), g2 = ref(null), y2 = ref(null), C2 = ref(null), {
isComposing: O2,
handleCompositionStart: T2,
handleCompositionUpdate: I2,
handleCompositionEnd: k2
} = rm({
afterComposition: (S2) => wn2(S2)
}), { wrapperRef: A2, isFocused: $2 } = am(d, {
beforeFocus() {
return D2.value;
},
afterFocus() {
e.automaticDropdown && !N2.value && (N2.value = true, r.menuVisibleOnFocus = true);
},
beforeBlur(S2) {
var R2, J;
return ((R2 = u2.value) == null ? void 0 : R2.isFocusInsideContent(S2)) || ((J = c.value) == null ? void 0 : J.isFocusInsideContent(S2));
},
afterBlur() {
N2.value = false, r.menuVisibleOnFocus = false;
}
}), N2 = ref(false), K = ref(), { form: B2, formItem: M2 } = fn(), { inputId: W2 } = Do(e, {
formItemContext: M2
}), { valueOnClear: de, isEmptyValue: Y } = dm(e), D2 = computed(() => e.disabled || (B2 == null ? void 0 : B2.disabled)), ne = computed(() => Ie(e.modelValue) ? e.modelValue.length > 0 : !Y(e.modelValue)), xe = computed(() => e.clearable && !D2.value && r.inputHovering && ne.value), ye = computed(() => e.remote && e.filterable && !e.remoteShowSuffix ? "" : e.suffixIcon), be = computed(() => i.is("reverse", ye.value && N2.value)), _e = computed(() => (M2 == null ? void 0 : M2.validateState) || ""), qe = computed(() => Lp[_e.value]), jt = computed(() => e.remote ? 300 : 0), Ge = computed(() => e.loading ? e.loadingText || n("el.select.loading") : e.remote && !r.inputValue && r.options.size === 0 ? false : e.filterable && r.inputValue && r.options.size > 0 && Ce.value === 0 ? e.noMatchText || n("el.select.noMatch") : r.options.size === 0 ? e.noDataText || n("el.select.noData") : null), Ce = computed(() => ue.value.filter((S2) => S2.visible).length), ue = computed(() => {
const S2 = Array.from(r.options.values()), R2 = [];
return r.optionValues.forEach((J) => {
const oe = S2.findIndex((mt) => mt.value === J);
oe > -1 && R2.push(S2[oe]);
}), R2.length >= S2.length ? R2 : S2;
}), Tt = computed(() => Array.from(r.cachedOptions.values())), ht = computed(() => {
const S2 = ue.value.filter((R2) => !R2.created).some((R2) => R2.currentLabel === r.inputValue);
return e.filterable && e.allowCreate && r.inputValue !== "" && !S2;
}), qn = () => {
e.filterable && Se(e.filterMethod) || e.filterable && e.remote && Se(e.remoteMethod) || ue.value.forEach((S2) => {
var R2;
(R2 = S2.updateOption) == null || R2.call(S2, r.inputValue);
});
}, Gn = ln2(), mn = computed(() => ["small"].includes(Gn.value) ? "small" : "default"), Ho = computed({
get() {
return N2.value && Ge.value !== false;
},
set(S2) {
N2.value = S2;
}
}), Jn = computed(() => {
if (e.multiple && !Ct(e.modelValue))
return St(e.modelValue).length === 0 && !r.inputValue;
const S2 = Ie(e.modelValue) ? e.modelValue[0] : e.modelValue;
return e.filterable || Ct(S2) ? !r.inputValue : true;
}), jo = computed(() => {
var S2;
const R2 = (S2 = e.placeholder) != null ? S2 : n("el.select.placeholder");
return e.multiple || !ne.value ? R2 : r.selectedLabel;
}), Ko = computed(() => si ? null : "mouseenter");
watch(() => e.modelValue, (S2, R2) => {
e.multiple && e.filterable && !e.reserveKeyword && (r.inputValue = "", At("")), Kt(), !wo(S2, R2) && e.validateEvent && (M2 == null || M2.validate("change").catch((J) => Oe(J)));
}, {
flush: "post",
deep: true
}), watch(() => N2.value, (S2) => {
S2 ? At(r.inputValue) : (r.inputValue = "", r.previousQuery = null, r.isBeforeHide = true), t("visible-change", S2);
}), watch(() => r.options.entries(), () => {
var S2;
if (!se)
return;
const R2 = ((S2 = s.value) == null ? void 0 : S2.querySelectorAll("input")) || [];
(!e.filterable && !e.defaultFirstOption && !Ct(e.modelValue) || !Array.from(R2).includes(document.activeElement)) && Kt(), e.defaultFirstOption && (e.filterable || e.remote) && Ce.value && vn();
}, {
flush: "post"
}), watch(() => r.hoveringIndex, (S2) => {
me(S2) && S2 > -1 ? K.value = ue.value[S2] || {} : K.value = {}, ue.value.forEach((R2) => {
R2.hover = K.value === R2;
});
}), watchEffect(() => {
r.isBeforeHide || qn();
});
const At = (S2) => {
r.previousQuery === S2 || O2.value || (r.previousQuery = S2, e.filterable && Se(e.filterMethod) ? e.filterMethod(S2) : e.filterable && e.remote && Se(e.remoteMethod) && e.remoteMethod(S2), e.defaultFirstOption && (e.filterable || e.remote) && Ce.value ? nextTick(vn) : nextTick(nt));
}, vn = () => {
const S2 = ue.value.filter((oe) => oe.visible && !oe.disabled && !oe.states.groupDisabled), R2 = S2.find((oe) => oe.created), J = S2[0];
r.hoveringIndex = aa(ue.value, R2 || J);
}, Kt = () => {
if (e.multiple)
r.selectedLabel = "";
else {
const R2 = Ie(e.modelValue) ? e.modelValue[0] : e.modelValue, J = Yn(R2);
r.selectedLabel = J.currentLabel, r.selected = [J];
return;
}
const S2 = [];
Ct(e.modelValue) || St(e.modelValue).forEach((R2) => {
S2.push(Yn(R2));
}), r.selected = S2;
}, Yn = (S2) => {
let R2;
const J = Wo(S2).toLowerCase() === "object", oe = Wo(S2).toLowerCase() === "null", mt = Wo(S2).toLowerCase() === "undefined";
for (let Mt = r.cachedOptions.size - 1; Mt >= 0; Mt--) {
const Je = Tt.value[Mt];
if (J ? at(Je.value, e.valueKey) === at(S2, e.valueKey) : Je.value === S2) {
R2 = {
value: S2,
currentLabel: Je.currentLabel,
get isDisabled() {
return Je.isDisabled;
}
};
break;
}
}
if (R2)
return R2;
const Wt = J ? S2.label : !oe && !mt ? S2 : "";
return {
value: S2,
currentLabel: Wt
};
}, nt = () => {
r.hoveringIndex = ue.value.findIndex((S2) => r.selected.some((R2) => Uo(R2) === Uo(S2)));
}, Ut = () => {
r.selectionWidth = l.value.getBoundingClientRect().width;
}, gn2 = () => {
r.calculatorWidth = f2.value.getBoundingClientRect().width;
}, Zn = () => {
r.collapseItemWidth = y2.value.getBoundingClientRect().width;
}, Ot = () => {
var S2, R2;
(R2 = (S2 = u2.value) == null ? void 0 : S2.updatePopper) == null || R2.call(S2);
}, yn = () => {
var S2, R2;
(R2 = (S2 = c.value) == null ? void 0 : S2.updatePopper) == null || R2.call(S2);
}, bn = () => {
r.inputValue.length > 0 && !N2.value && (N2.value = true), At(r.inputValue);
}, wn2 = (S2) => {
if (r.inputValue = S2.target.value, e.remote)
Sn();
else
return bn();
}, Sn = wp(() => {
bn();
}, jt.value), Cn = (S2) => {
wo(e.modelValue, S2) || t(Fi, S2);
}, wl = (S2) => Sp(S2, (R2) => !r.disabledOptions.has(R2)), Sl = (S2) => {
if (e.multiple && S2.code !== $n.delete && S2.target.value.length <= 0) {
const R2 = St(e.modelValue).slice(), J = wl(R2);
if (J < 0)
return;
const oe = R2[J];
R2.splice(J, 1), t(we, R2), Cn(R2), t("remove-tag", oe);
}
}, Cl = (S2, R2) => {
const J = r.selected.indexOf(R2);
if (J > -1 && !D2.value) {
const oe = St(e.modelValue).slice();
oe.splice(J, 1), t(we, oe), Cn(oe), t("remove-tag", R2.value);
}
S2.stopPropagation(), Xn();
}, oa = (S2) => {
S2.stopPropagation();
const R2 = e.multiple ? [] : de.value;
if (e.multiple)
for (const J of r.selected)
J.isDisabled && R2.push(J.value);
t(we, R2), Cn(R2), r.hoveringIndex = -1, N2.value = false, t("clear"), Xn();
}, ia = (S2) => {
var R2;
if (e.multiple) {
const J = St((R2 = e.modelValue) != null ? R2 : []).slice(), oe = aa(J, S2.value);
oe > -1 ? J.splice(oe, 1) : (e.multipleLimit <= 0 || J.length < e.multipleLimit) && J.push(S2.value), t(we, J), Cn(J), S2.created && At(""), e.filterable && !e.reserveKeyword && (r.inputValue = "");
} else
t(we, S2.value), Cn(S2.value), N2.value = false;
Xn(), !N2.value && nextTick(() => {
Qn(S2);
});
}, aa = (S2 = [], R2) => {
if (!ke(R2))
return S2.indexOf(R2);
const J = e.valueKey;
let oe = -1;
return S2.some((mt, Wt) => toRaw(at(mt, J)) === at(R2, J) ? (oe = Wt, true) : false), oe;
}, Qn = (S2) => {
var R2, J, oe, mt, Wt;
const eo = Ie(S2) ? S2[0] : S2;
let Mt = null;
if (eo != null && eo.value) {
const Je = ue.value.filter((ua) => ua.value === eo.value);
Je.length > 0 && (Mt = Je[0].$el);
}
if (u2.value && Mt) {
const Je = (mt = (oe = (J = (R2 = u2.value) == null ? void 0 : R2.popperRef) == null ? void 0 : J.contentRef) == null ? void 0 : oe.querySelector) == null ? void 0 : mt.call(oe, `.${i.be("dropdown", "wrap")}`);
Je && Mp(Je, Mt);
}
(Wt = C2.value) == null || Wt.handleScroll();
}, El = (S2) => {
r.options.set(S2.value, S2), r.cachedOptions.set(S2.value, S2), S2.disabled && r.disabledOptions.set(S2.value, S2);
}, Il = (S2, R2) => {
r.options.get(S2) === R2 && r.options.delete(S2);
}, kl = computed(() => {
var S2, R2;
return (R2 = (S2 = u2.value) == null ? void 0 : S2.popperRef) == null ? void 0 : R2.contentRef;
}), Tl = () => {
r.isBeforeHide = false, nextTick(() => Qn(r.selected));
}, Xn = () => {
var S2;
(S2 = d.value) == null || S2.focus();
}, ra = () => {
var S2;
(S2 = d.value) == null || S2.blur();
}, Al = (S2) => {
oa(S2);
}, Ol = () => {
N2.value = false, $2.value && ra();
}, Ml = () => {
r.inputValue.length > 0 ? r.inputValue = "" : N2.value = false;
}, sa = () => {
D2.value || (si && (r.inputHovering = true), r.menuVisibleOnFocus ? r.menuVisibleOnFocus = false : N2.value = !N2.value);
}, _l = () => {
N2.value ? ue.value[r.hoveringIndex] && ia(ue.value[r.hoveringIndex]) : sa();
}, Uo = (S2) => ke(S2.value) ? at(S2.value, e.valueKey) : S2.value, Pl = computed(() => ue.value.filter((S2) => S2.visible).every((S2) => S2.disabled)), Ll = computed(() => e.multiple ? e.collapseTags ? r.selected.slice(0, e.maxCollapseTags) : r.selected : []), xl = computed(() => e.multiple ? e.collapseTags ? r.selected.slice(e.maxCollapseTags) : [] : []), la = (S2) => {
if (!N2.value) {
N2.value = true;
return;
}
if (!(r.options.size === 0 || r.filteredOptionsCount === 0 || O2.value) && !Pl.value) {
S2 === "next" ? (r.hoveringIndex++, r.hoveringIndex === r.options.size && (r.hoveringIndex = 0)) : S2 === "prev" && (r.hoveringIndex--, r.hoveringIndex < 0 && (r.hoveringIndex = r.options.size - 1));
const R2 = ue.value[r.hoveringIndex];
(R2.disabled === true || R2.states.groupDisabled === true || !R2.visible) && la(S2), nextTick(() => Qn(K.value));
}
}, Fl = () => {
if (!l.value)
return 0;
const S2 = window.getComputedStyle(l.value);
return Number.parseFloat(S2.gap || "6px");
}, Rl = computed(() => {
const S2 = Fl();
return { maxWidth: `${y2.value && e.maxCollapseTags === 1 ? r.selectionWidth - r.collapseItemWidth - S2 : r.selectionWidth}px` };
}), $l = computed(() => ({ maxWidth: `${r.selectionWidth}px` })), Dl = computed(() => ({
width: `${Math.max(r.calculatorWidth, Ey)}px`
}));
return bt(l, Ut), bt(f2, gn2), bt(h3, Ot), bt(A2, Ot), bt(g2, yn), bt(y2, Zn), onMounted(() => {
Kt();
}), {
inputId: W2,
contentId: o,
nsSelect: i,
nsInput: a2,
states: r,
isFocused: $2,
expanded: N2,
optionsArray: ue,
hoverOption: K,
selectSize: Gn,
filteredOptionsCount: Ce,
resetCalculatorWidth: gn2,
updateTooltip: Ot,
updateTagTooltip: yn,
debouncedOnInputChange: Sn,
onInput: wn2,
deletePrevTag: Sl,
deleteTag: Cl,
deleteSelected: oa,
handleOptionSelect: ia,
scrollToOption: Qn,
hasModelValue: ne,
shouldShowPlaceholder: Jn,
currentPlaceholder: jo,
mouseEnterEventName: Ko,
showClose: xe,
iconComponent: ye,
iconReverse: be,
validateState: _e,
validateIcon: qe,
showNewOption: ht,
updateOptions: qn,
collapseTagSize: mn,
setSelected: Kt,
selectDisabled: D2,
emptyText: Ge,
handleCompositionStart: T2,
handleCompositionUpdate: I2,
handleCompositionEnd: k2,
onOptionCreate: El,
onOptionDestroy: Il,
handleMenuEnter: Tl,
focus: Xn,
blur: ra,
handleClearClick: Al,
handleClickOutside: Ol,
handleEsc: Ml,
toggleMenu: sa,
selectOption: _l,
getValueKey: Uo,
navigateOptions: la,
dropdownMenuVisible: Ho,
showTagList: Ll,
collapseTagList: xl,
tagStyle: Rl,
collapseTagStyle: $l,
inputStyle: Dl,
popperRef: kl,
inputRef: d,
tooltipRef: u2,
tagTooltipRef: c,
calculatorRef: f2,
prefixRef: m2,
suffixRef: p,
selectRef: s,
wrapperRef: A2,
selectionRef: l,
scrollbarRef: C2,
menuRef: h3,
tagMenuRef: g2,
collapseItemRef: y2
};
};
var ky = defineComponent({
name: "ElOptions",
setup(e, { slots: t }) {
const n = inject(Bo);
let o = [];
return () => {
var i, a2;
const r = (i = t.default) == null ? void 0 : i.call(t), s = [];
function l(u2) {
Ie(u2) && u2.forEach((c) => {
var d, f2, m2, p;
const h3 = (d = (c == null ? void 0 : c.type) || {}) == null ? void 0 : d.name;
h3 === "ElOptionGroup" ? l(!je(c.children) && !Ie(c.children) && Se((f2 = c.children) == null ? void 0 : f2.default) ? (m2 = c.children) == null ? void 0 : m2.default() : c.children) : h3 === "ElOption" ? s.push((p = c.props) == null ? void 0 : p.value) : Ie(c.children) && l(c.children);
});
}
return r.length && l((a2 = r[0]) == null ? void 0 : a2.children), wo(s, o) || (o = s, n && (n.states.optionValues = s)), r;
};
}
});
var Ty = Q({
name: String,
id: String,
modelValue: {
type: [Array, String, Number, Boolean, Object],
default: void 0
},
autocomplete: {
type: String,
default: "off"
},
automaticDropdown: Boolean,
size: dn2,
effect: {
type: U2(String),
default: "light"
},
disabled: Boolean,
clearable: Boolean,
filterable: Boolean,
allowCreate: Boolean,
loading: Boolean,
popperClass: {
type: String,
default: ""
},
popperOptions: {
type: U2(Object),
default: () => ({})
},
remote: Boolean,
loadingText: String,
noMatchText: String,
noDataText: String,
remoteMethod: Function,
filterMethod: Function,
multiple: Boolean,
multipleLimit: {
type: Number,
default: 0
},
placeholder: {
type: String
},
defaultFirstOption: Boolean,
reserveKeyword: {
type: Boolean,
default: true
},
valueKey: {
type: String,
default: "value"
},
collapseTags: Boolean,
collapseTagsTooltip: Boolean,
maxCollapseTags: {
type: Number,
default: 1
},
teleported: Le.teleported,
persistent: {
type: Boolean,
default: true
},
clearIcon: {
type: tn2,
default: circle_close_default
},
fitInputWidth: Boolean,
suffixIcon: {
type: tn2,
default: arrow_down_default
},
tagType: { ...wi.type, default: "info" },
tagEffect: { ...wi.effect, default: "light" },
validateEvent: {
type: Boolean,
default: true
},
remoteShowSuffix: Boolean,
placement: {
type: U2(String),
values: xo,
default: "bottom-start"
},
fallbackPlacements: {
type: U2(Array),
default: ["bottom-start", "top-start", "right", "left"]
},
appendTo: String,
...cm,
...Ht(["ariaLabel"])
});
var Er = "ElSelect";
var Ay = defineComponent({
name: Er,
componentName: Er,
components: {
ElSelectMenu: Cy,
ElOption: Xi,
ElOptions: ky,
ElTag: $g,
ElScrollbar: xm,
ElTooltip: Ks,
ElIcon: Ue
},
directives: { ClickOutside: sg },
props: Ty,
emits: [
we,
Fi,
"remove-tag",
"clear",
"visible-change",
"focus",
"blur"
],
setup(e, { emit: t }) {
const n = computed(() => {
const { modelValue: a2, multiple: r } = e, s = r ? [] : void 0;
return Ie(a2) ? r ? a2 : s : r ? s : a2;
}), o = reactive({
...toRefs(e),
modelValue: n
}), i = Iy(o, t);
return provide(Bo, reactive({
props: o,
states: i.states,
optionsArray: i.optionsArray,
handleOptionSelect: i.handleOptionSelect,
onOptionCreate: i.onOptionCreate,
onOptionDestroy: i.onOptionDestroy,
selectRef: i.selectRef,
setSelected: i.setSelected
})), {
...i,
modelValue: n
};
}
});
function Oy(e, t, n, o, i, a2) {
const r = resolveComponent("el-tag"), s = resolveComponent("el-tooltip"), l = resolveComponent("el-icon"), u2 = resolveComponent("el-option"), c = resolveComponent("el-options"), d = resolveComponent("el-scrollbar"), f2 = resolveComponent("el-select-menu"), m2 = resolveDirective("click-outside");
return withDirectives((openBlock(), createElementBlock("div", {
ref: "selectRef",
class: normalizeClass([e.nsSelect.b(), e.nsSelect.m(e.selectSize)]),
[toHandlerKey(e.mouseEnterEventName)]: (p) => e.states.inputHovering = true,
onMouseleave: (p) => e.states.inputHovering = false
}, [
createVNode(s, {
ref: "tooltipRef",
visible: e.dropdownMenuVisible,
placement: e.placement,
teleported: e.teleported,
"popper-class": [e.nsSelect.e("popper"), e.popperClass],
"popper-options": e.popperOptions,
"fallback-placements": e.fallbackPlacements,
effect: e.effect,
pure: "",
trigger: "click",
transition: `${e.nsSelect.namespace.value}-zoom-in-top`,
"stop-popper-mouse-event": false,
"gpu-acceleration": false,
persistent: e.persistent,
"append-to": e.appendTo,
onBeforeShow: e.handleMenuEnter,
onHide: (p) => e.states.isBeforeHide = false
}, {
default: withCtx(() => {
var p;
return [
createBaseVNode("div", {
ref: "wrapperRef",
class: normalizeClass([
e.nsSelect.e("wrapper"),
e.nsSelect.is("focused", e.isFocused),
e.nsSelect.is("hovering", e.states.inputHovering),
e.nsSelect.is("filterable", e.filterable),
e.nsSelect.is("disabled", e.selectDisabled)
]),
onClick: withModifiers(e.toggleMenu, ["prevent"])
}, [
e.$slots.prefix ? (openBlock(), createElementBlock("div", {
key: 0,
ref: "prefixRef",
class: normalizeClass(e.nsSelect.e("prefix"))
}, [
renderSlot(e.$slots, "prefix")
], 2)) : createCommentVNode("v-if", true),
createBaseVNode("div", {
ref: "selectionRef",
class: normalizeClass([
e.nsSelect.e("selection"),
e.nsSelect.is("near", e.multiple && !e.$slots.prefix && !!e.states.selected.length)
])
}, [
e.multiple ? renderSlot(e.$slots, "tag", { key: 0 }, () => [
(openBlock(true), createElementBlock(Fragment, null, renderList(e.showTagList, (h3) => (openBlock(), createElementBlock("div", {
key: e.getValueKey(h3),
class: normalizeClass(e.nsSelect.e("selected-item"))
}, [
createVNode(r, {
closable: !e.selectDisabled && !h3.isDisabled,
size: e.collapseTagSize,
type: e.tagType,
effect: e.tagEffect,
"disable-transitions": "",
style: normalizeStyle(e.tagStyle),
onClose: (g2) => e.deleteTag(g2, h3)
}, {
default: withCtx(() => [
createBaseVNode("span", {
class: normalizeClass(e.nsSelect.e("tags-text"))
}, [
renderSlot(e.$slots, "label", {
label: h3.currentLabel,
value: h3.value
}, () => [
createTextVNode(toDisplayString(h3.currentLabel), 1)
])
], 2)
]),
_: 2
}, 1032, ["closable", "size", "type", "effect", "style", "onClose"])
], 2))), 128)),
e.collapseTags && e.states.selected.length > e.maxCollapseTags ? (openBlock(), createBlock(s, {
key: 0,
ref: "tagTooltipRef",
disabled: e.dropdownMenuVisible || !e.collapseTagsTooltip,
"fallback-placements": ["bottom", "top", "right", "left"],
effect: e.effect,
placement: "bottom",
teleported: e.teleported
}, {
default: withCtx(() => [
createBaseVNode("div", {
ref: "collapseItemRef",
class: normalizeClass(e.nsSelect.e("selected-item"))
}, [
createVNode(r, {
closable: false,
size: e.collapseTagSize,
type: e.tagType,
effect: e.tagEffect,
"disable-transitions": "",
style: normalizeStyle(e.collapseTagStyle)
}, {
default: withCtx(() => [
createBaseVNode("span", {
class: normalizeClass(e.nsSelect.e("tags-text"))
}, " + " + toDisplayString(e.states.selected.length - e.maxCollapseTags), 3)
]),
_: 1
}, 8, ["size", "type", "effect", "style"])
], 2)
]),
content: withCtx(() => [
createBaseVNode("div", {
ref: "tagMenuRef",
class: normalizeClass(e.nsSelect.e("selection"))
}, [
(openBlock(true), createElementBlock(Fragment, null, renderList(e.collapseTagList, (h3) => (openBlock(), createElementBlock("div", {
key: e.getValueKey(h3),
class: normalizeClass(e.nsSelect.e("selected-item"))
}, [
createVNode(r, {
class: "in-tooltip",
closable: !e.selectDisabled && !h3.isDisabled,
size: e.collapseTagSize,
type: e.tagType,
effect: e.tagEffect,
"disable-transitions": "",
onClose: (g2) => e.deleteTag(g2, h3)
}, {
default: withCtx(() => [
createBaseVNode("span", {
class: normalizeClass(e.nsSelect.e("tags-text"))
}, [
renderSlot(e.$slots, "label", {
label: h3.currentLabel,
value: h3.value
}, () => [
createTextVNode(toDisplayString(h3.currentLabel), 1)
])
], 2)
]),
_: 2
}, 1032, ["closable", "size", "type", "effect", "onClose"])
], 2))), 128))
], 2)
]),
_: 3
}, 8, ["disabled", "effect", "teleported"])) : createCommentVNode("v-if", true)
]) : createCommentVNode("v-if", true),
e.selectDisabled ? createCommentVNode("v-if", true) : (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass([
e.nsSelect.e("selected-item"),
e.nsSelect.e("input-wrapper"),
e.nsSelect.is("hidden", !e.filterable)
])
}, [
withDirectives(createBaseVNode("input", {
id: e.inputId,
ref: "inputRef",
"onUpdate:modelValue": (h3) => e.states.inputValue = h3,
type: "text",
name: e.name,
class: normalizeClass([e.nsSelect.e("input"), e.nsSelect.is(e.selectSize)]),
disabled: e.selectDisabled,
autocomplete: e.autocomplete,
style: normalizeStyle(e.inputStyle),
role: "combobox",
readonly: !e.filterable,
spellcheck: "false",
"aria-activedescendant": ((p = e.hoverOption) == null ? void 0 : p.id) || "",
"aria-controls": e.contentId,
"aria-expanded": e.dropdownMenuVisible,
"aria-label": e.ariaLabel,
"aria-autocomplete": "none",
"aria-haspopup": "listbox",
onKeydown: [
withKeys(withModifiers((h3) => e.navigateOptions("next"), ["stop", "prevent"]), ["down"]),
withKeys(withModifiers((h3) => e.navigateOptions("prev"), ["stop", "prevent"]), ["up"]),
withKeys(withModifiers(e.handleEsc, ["stop", "prevent"]), ["esc"]),
withKeys(withModifiers(e.selectOption, ["stop", "prevent"]), ["enter"]),
withKeys(withModifiers(e.deletePrevTag, ["stop"]), ["delete"])
],
onCompositionstart: e.handleCompositionStart,
onCompositionupdate: e.handleCompositionUpdate,
onCompositionend: e.handleCompositionEnd,
onInput: e.onInput,
onClick: withModifiers(e.toggleMenu, ["stop"])
}, null, 46, ["id", "onUpdate:modelValue", "name", "disabled", "autocomplete", "readonly", "aria-activedescendant", "aria-controls", "aria-expanded", "aria-label", "onKeydown", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onInput", "onClick"]), [
[vModelText, e.states.inputValue]
]),
e.filterable ? (openBlock(), createElementBlock("span", {
key: 0,
ref: "calculatorRef",
"aria-hidden": "true",
class: normalizeClass(e.nsSelect.e("input-calculator")),
textContent: toDisplayString(e.states.inputValue)
}, null, 10, ["textContent"])) : createCommentVNode("v-if", true)
], 2)),
e.shouldShowPlaceholder ? (openBlock(), createElementBlock("div", {
key: 2,
class: normalizeClass([
e.nsSelect.e("selected-item"),
e.nsSelect.e("placeholder"),
e.nsSelect.is("transparent", !e.hasModelValue || e.expanded && !e.states.inputValue)
])
}, [
e.hasModelValue ? renderSlot(e.$slots, "label", {
key: 0,
label: e.currentPlaceholder,
value: e.modelValue
}, () => [
createBaseVNode("span", null, toDisplayString(e.currentPlaceholder), 1)
]) : (openBlock(), createElementBlock("span", { key: 1 }, toDisplayString(e.currentPlaceholder), 1))
], 2)) : createCommentVNode("v-if", true)
], 2),
createBaseVNode("div", {
ref: "suffixRef",
class: normalizeClass(e.nsSelect.e("suffix"))
}, [
e.iconComponent && !e.showClose ? (openBlock(), createBlock(l, {
key: 0,
class: normalizeClass([e.nsSelect.e("caret"), e.nsSelect.e("icon"), e.iconReverse])
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(e.iconComponent)))
]),
_: 1
}, 8, ["class"])) : createCommentVNode("v-if", true),
e.showClose && e.clearIcon ? (openBlock(), createBlock(l, {
key: 1,
class: normalizeClass([
e.nsSelect.e("caret"),
e.nsSelect.e("icon"),
e.nsSelect.e("clear")
]),
onClick: e.handleClearClick
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(e.clearIcon)))
]),
_: 1
}, 8, ["class", "onClick"])) : createCommentVNode("v-if", true),
e.validateState && e.validateIcon ? (openBlock(), createBlock(l, {
key: 2,
class: normalizeClass([e.nsInput.e("icon"), e.nsInput.e("validateIcon")])
}, {
default: withCtx(() => [
(openBlock(), createBlock(resolveDynamicComponent(e.validateIcon)))
]),
_: 1
}, 8, ["class"])) : createCommentVNode("v-if", true)
], 2)
], 10, ["onClick"])
];
}),
content: withCtx(() => [
createVNode(f2, { ref: "menuRef" }, {
default: withCtx(() => [
e.$slots.header ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(e.nsSelect.be("dropdown", "header")),
onClick: withModifiers(() => {
}, ["stop"])
}, [
renderSlot(e.$slots, "header")
], 10, ["onClick"])) : createCommentVNode("v-if", true),
withDirectives(createVNode(d, {
id: e.contentId,
ref: "scrollbarRef",
tag: "ul",
"wrap-class": e.nsSelect.be("dropdown", "wrap"),
"view-class": e.nsSelect.be("dropdown", "list"),
class: normalizeClass([e.nsSelect.is("empty", e.filteredOptionsCount === 0)]),
role: "listbox",
"aria-label": e.ariaLabel,
"aria-orientation": "vertical"
}, {
default: withCtx(() => [
e.showNewOption ? (openBlock(), createBlock(u2, {
key: 0,
value: e.states.inputValue,
created: true
}, null, 8, ["value"])) : createCommentVNode("v-if", true),
createVNode(c, null, {
default: withCtx(() => [
renderSlot(e.$slots, "default")
]),
_: 3
})
]),
_: 3
}, 8, ["id", "wrap-class", "view-class", "class", "aria-label"]), [
[vShow, e.states.options.size > 0 && !e.loading]
]),
e.$slots.loading && e.loading ? (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass(e.nsSelect.be("dropdown", "loading"))
}, [
renderSlot(e.$slots, "loading")
], 2)) : e.loading || e.filteredOptionsCount === 0 ? (openBlock(), createElementBlock("div", {
key: 2,
class: normalizeClass(e.nsSelect.be("dropdown", "empty"))
}, [
renderSlot(e.$slots, "empty", {}, () => [
createBaseVNode("span", null, toDisplayString(e.emptyText), 1)
])
], 2)) : createCommentVNode("v-if", true),
e.$slots.footer ? (openBlock(), createElementBlock("div", {
key: 3,
class: normalizeClass(e.nsSelect.be("dropdown", "footer")),
onClick: withModifiers(() => {
}, ["stop"])
}, [
renderSlot(e.$slots, "footer")
], 10, ["onClick"])) : createCommentVNode("v-if", true)
]),
_: 3
}, 512)
]),
_: 3
}, 8, ["visible", "placement", "teleported", "popper-class", "popper-options", "fallback-placements", "effect", "transition", "persistent", "append-to", "onBeforeShow", "onHide"])
], 16, ["onMouseleave"])), [
[m2, e.handleClickOutside, e.popperRef]
]);
}
var My = X(Ay, [["render", Oy], ["__file", "select.vue"]]);
var _y = defineComponent({
name: "ElOptionGroup",
componentName: "ElOptionGroup",
props: {
label: String,
disabled: Boolean
},
setup(e) {
const t = te("select"), n = ref(null), o = getCurrentInstance(), i = ref([]);
provide(fl, reactive({
...toRefs(e)
}));
const a2 = computed(() => i.value.some((u2) => u2.visible === true)), r = (u2) => {
var c, d;
return ((c = u2.type) == null ? void 0 : c.name) === "ElOption" && !!((d = u2.component) != null && d.proxy);
}, s = (u2) => {
const c = St(u2), d = [];
return c.forEach((f2) => {
var m2, p;
r(f2) ? d.push(f2.component.proxy) : (m2 = f2.children) != null && m2.length ? d.push(...s(f2.children)) : (p = f2.component) != null && p.subTree && d.push(...s(f2.component.subTree));
}), d;
}, l = () => {
i.value = s(o.subTree);
};
return onMounted(() => {
l();
}), Su(n, l, {
attributes: true,
subtree: true,
childList: true
}), {
groupRef: n,
visible: a2,
ns: t
};
}
});
function Py(e, t, n, o, i, a2) {
return withDirectives((openBlock(), createElementBlock("ul", {
ref: "groupRef",
class: normalizeClass(e.ns.be("group", "wrap"))
}, [
createBaseVNode("li", {
class: normalizeClass(e.ns.be("group", "title"))
}, toDisplayString(e.label), 3),
createBaseVNode("li", null, [
createBaseVNode("ul", {
class: normalizeClass(e.ns.b("group"))
}, [
renderSlot(e.$slots, "default")
], 2)
])
], 2)), [
[vShow, e.visible]
]);
}
var pl = X(_y, [["render", Py], ["__file", "option-group.vue"]]);
var Vo = Me(My, {
Option: Xi,
OptionGroup: pl
});
var ea = zt(Xi);
zt(pl);
var Ly = Q({
trigger: Bn.trigger,
placement: oi.placement,
disabled: Bn.disabled,
visible: Le.visible,
transition: Le.transition,
popperOptions: oi.popperOptions,
tabindex: oi.tabindex,
content: Le.content,
popperStyle: Le.popperStyle,
popperClass: Le.popperClass,
enterable: {
...Le.enterable,
default: true
},
effect: {
...Le.effect,
default: "light"
},
teleported: Le.teleported,
title: String,
width: {
type: [String, Number],
default: 150
},
offset: {
type: Number,
default: void 0
},
showAfter: {
type: Number,
default: 0
},
hideAfter: {
type: Number,
default: 200
},
autoClose: {
type: Number,
default: 0
},
showArrow: {
type: Boolean,
default: true
},
persistent: {
type: Boolean,
default: true
},
"onUpdate:visible": {
type: Function
}
});
var xy = {
"update:visible": (e) => ct(e),
"before-enter": () => true,
"before-leave": () => true,
"after-enter": () => true,
"after-leave": () => true
};
var Fy = "onUpdate:visible";
var Ry = defineComponent({
name: "ElPopover"
});
var $y = defineComponent({
...Ry,
props: Ly,
emits: xy,
setup(e, { expose: t, emit: n }) {
const o = e, i = computed(() => o[Fy]), a2 = te("popover"), r = ref(), s = computed(() => {
var g2;
return (g2 = unref(r)) == null ? void 0 : g2.popperRef;
}), l = computed(() => [
{
width: $t(o.width)
},
o.popperStyle
]), u2 = computed(() => [a2.b(), o.popperClass, { [a2.m("plain")]: !!o.content }]), c = computed(() => o.transition === `${a2.namespace.value}-fade-in-linear`), d = () => {
var g2;
(g2 = r.value) == null || g2.hide();
}, f2 = () => {
n("before-enter");
}, m2 = () => {
n("before-leave");
}, p = () => {
n("after-enter");
}, h3 = () => {
n("update:visible", false), n("after-leave");
};
return t({
popperRef: s,
hide: d
}), (g2, y2) => (openBlock(), createBlock(unref(Ks), mergeProps({
ref_key: "tooltipRef",
ref: r
}, g2.$attrs, {
trigger: g2.trigger,
placement: g2.placement,
disabled: g2.disabled,
visible: g2.visible,
transition: g2.transition,
"popper-options": g2.popperOptions,
tabindex: g2.tabindex,
content: g2.content,
offset: g2.offset,
"show-after": g2.showAfter,
"hide-after": g2.hideAfter,
"auto-close": g2.autoClose,
"show-arrow": g2.showArrow,
"aria-label": g2.title,
effect: g2.effect,
enterable: g2.enterable,
"popper-class": unref(u2),
"popper-style": unref(l),
teleported: g2.teleported,
persistent: g2.persistent,
"gpu-acceleration": unref(c),
"onUpdate:visible": unref(i),
onBeforeShow: f2,
onBeforeHide: m2,
onShow: p,
onHide: h3
}), {
content: withCtx(() => [
g2.title ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(unref(a2).e("title")),
role: "title"
}, toDisplayString(g2.title), 3)) : createCommentVNode("v-if", true),
renderSlot(g2.$slots, "default", {}, () => [
createTextVNode(toDisplayString(g2.content), 1)
])
]),
default: withCtx(() => [
g2.$slots.reference ? renderSlot(g2.$slots, "reference", { key: 0 }) : createCommentVNode("v-if", true)
]),
_: 3
}, 16, ["trigger", "placement", "disabled", "visible", "transition", "popper-options", "tabindex", "content", "offset", "show-after", "hide-after", "auto-close", "show-arrow", "aria-label", "effect", "enterable", "popper-class", "popper-style", "teleported", "persistent", "gpu-acceleration", "onUpdate:visible"]));
}
});
var Dy = X($y, [["__file", "popover.vue"]]);
var Ir = (e, t) => {
const n = t.arg || t.value, o = n == null ? void 0 : n.popperRef;
o && (o.triggerRef = e);
};
var Ny = {
mounted(e, t) {
Ir(e, t);
},
updated(e, t) {
Ir(e, t);
}
};
var By = "popover";
var hl = xp(Ny, By);
var zo = Me(Dy, {
directive: hl
});
function Vy(e) {
let t;
const n = ref(false), o = reactive({
...e,
originalPosition: "",
originalOverflow: "",
visible: false
});
function i(f2) {
o.text = f2;
}
function a2() {
const f2 = o.parent, m2 = d.ns;
if (!f2.vLoadingAddClassList) {
let p = f2.getAttribute("loading-number");
p = Number.parseInt(p) - 1, p ? f2.setAttribute("loading-number", p.toString()) : (Rn(f2, m2.bm("parent", "relative")), f2.removeAttribute("loading-number")), Rn(f2, m2.bm("parent", "hidden"));
}
r(), c.unmount();
}
function r() {
var f2, m2;
(m2 = (f2 = d.$el) == null ? void 0 : f2.parentNode) == null || m2.removeChild(d.$el);
}
function s() {
var f2;
e.beforeClose && !e.beforeClose() || (n.value = true, clearTimeout(t), t = setTimeout(l, 400), o.visible = false, (f2 = e.closed) == null || f2.call(e));
}
function l() {
if (!n.value)
return;
const f2 = o.parent;
n.value = false, f2.vLoadingAddClassList = void 0, a2();
}
const u2 = defineComponent({
name: "ElLoading",
setup(f2, { expose: m2 }) {
const { ns: p, zIndex: h3 } = pm("loading");
return m2({
ns: p,
zIndex: h3
}), () => {
const g2 = o.spinner || o.svg, y2 = h("svg", {
class: "circular",
viewBox: o.svgViewBox ? o.svgViewBox : "0 0 50 50",
...g2 ? { innerHTML: g2 } : {}
}, [
h("circle", {
class: "path",
cx: "25",
cy: "25",
r: "20",
fill: "none"
})
]), C2 = o.text ? h("p", { class: p.b("text") }, [o.text]) : void 0;
return h(Transition, {
name: p.b("fade"),
onAfterLeave: l
}, {
default: withCtx(() => [
withDirectives(createVNode("div", {
style: {
backgroundColor: o.background || ""
},
class: [
p.b("mask"),
o.customClass,
o.fullscreen ? "is-fullscreen" : ""
]
}, [
h("div", {
class: p.b("spinner")
}, [y2, C2])
]), [[vShow, o.visible]])
])
});
};
}
}), c = createApp(u2), d = c.mount(document.createElement("div"));
return {
...toRefs(o),
setText: i,
removeElLoadingChild: r,
close: s,
handleAfterLeave: l,
vm: d,
get $el() {
return d.$el;
}
};
}
var uo;
var Si = function(e = {}) {
if (!se)
return;
const t = zy(e);
if (t.fullscreen && uo)
return uo;
const n = Vy({
...t,
closed: () => {
var i;
(i = t.closed) == null || i.call(t), t.fullscreen && (uo = void 0);
}
});
Hy(t, t.parent, n), kr(t, t.parent, n), t.parent.vLoadingAddClassList = () => kr(t, t.parent, n);
let o = t.parent.getAttribute("loading-number");
return o ? o = `${Number.parseInt(o) + 1}` : o = "1", t.parent.setAttribute("loading-number", o), t.parent.appendChild(n.$el), nextTick(() => n.visible.value = t.visible), t.fullscreen && (uo = n), n;
};
var zy = (e) => {
var t, n, o, i;
let a2;
return je(e.target) ? a2 = (t = document.querySelector(e.target)) != null ? t : document.body : a2 = e.target || document.body, {
parent: a2 === document.body || e.body ? document.body : a2,
background: e.background || "",
svg: e.svg || "",
svgViewBox: e.svgViewBox || "",
spinner: e.spinner || false,
text: e.text || "",
fullscreen: a2 === document.body && ((n = e.fullscreen) != null ? n : true),
lock: (o = e.lock) != null ? o : false,
customClass: e.customClass || "",
visible: (i = e.visible) != null ? i : true,
beforeClose: e.beforeClose,
closed: e.closed,
target: a2
};
};
var Hy = async (e, t, n) => {
const { nextZIndex: o } = n.vm.zIndex || n.vm._.exposed.zIndex, i = {};
if (e.fullscreen)
n.originalPosition.value = Zt(document.body, "position"), n.originalOverflow.value = Zt(document.body, "overflow"), i.zIndex = o();
else if (e.parent === document.body) {
n.originalPosition.value = Zt(document.body, "position"), await nextTick();
for (const a2 of ["top", "left"]) {
const r = a2 === "top" ? "scrollTop" : "scrollLeft";
i[a2] = `${e.target.getBoundingClientRect()[a2] + document.body[r] + document.documentElement[r] - Number.parseInt(Zt(document.body, `margin-${a2}`), 10)}px`;
}
for (const a2 of ["height", "width"])
i[a2] = `${e.target.getBoundingClientRect()[a2]}px`;
} else
n.originalPosition.value = Zt(t, "position");
for (const [a2, r] of Object.entries(i))
n.$el.style[a2] = r;
};
var kr = (e, t, n) => {
const o = n.vm.ns || n.vm._.exposed.ns;
["absolute", "fixed", "sticky"].includes(n.originalPosition.value) ? Rn(t, o.bm("parent", "relative")) : hi(t, o.bm("parent", "relative")), e.fullscreen && e.lock ? hi(t, o.bm("parent", "hidden")) : Rn(t, o.bm("parent", "hidden"));
};
var ho = Symbol("ElLoading");
var Tr = (e, t) => {
var n, o, i, a2;
const r = t.instance, s = (f2) => ke(t.value) ? t.value[f2] : void 0, l = (f2) => {
const m2 = je(f2) && (r == null ? void 0 : r[f2]) || f2;
return m2 && ref(m2);
}, u2 = (f2) => l(s(f2) || e.getAttribute(`element-loading-${xu(f2)}`)), c = (n = s("fullscreen")) != null ? n : t.modifiers.fullscreen, d = {
text: u2("text"),
svg: u2("svg"),
svgViewBox: u2("svgViewBox"),
spinner: u2("spinner"),
background: u2("background"),
customClass: u2("customClass"),
fullscreen: c,
target: (o = s("target")) != null ? o : c ? void 0 : e,
body: (i = s("body")) != null ? i : t.modifiers.body,
lock: (a2 = s("lock")) != null ? a2 : t.modifiers.lock
};
e[ho] = {
options: d,
instance: Si(d)
};
};
var jy = (e, t) => {
for (const n of Object.keys(t))
isRef(t[n]) && (t[n].value = e[n]);
};
var Ci = {
mounted(e, t) {
t.value && Tr(e, t);
},
updated(e, t) {
const n = e[ho];
t.oldValue !== t.value && (t.value && !t.oldValue ? Tr(e, t) : t.value && t.oldValue ? ke(t.value) && jy(t.value, n.options) : n == null || n.instance.close());
},
unmounted(e) {
var t;
(t = e[ho]) == null || t.instance.close(), e[ho] = null;
}
};
var Ky = {
install(e) {
e.directive("loading", Ci), e.config.globalProperties.$loading = Si;
},
directive: Ci,
service: Si
};
var hn2 = (e, t) => {
const n = e.__vccOpts || e;
for (const [o, i] of t)
n[o] = i;
return n;
};
var Uy = {
name: "SelectionsGroup",
components: {
Checkbox: Xs,
CheckboxGroup: el,
Col: Wn,
Icon: Ue,
Row: Un,
ElIconWarning: warning_default
},
methods: {
/**
* Function to toggle paths to default.
* Also called when the associated button is pressed.
*/
reset: function() {
this.checkAll = true, this.checkedItems = [], this.selections.forEach((e) => {
!("enabled" in e) || e.enabled === true ? this.checkedItems.push(e[this.identifierKey]) : this.checkAll = false;
});
},
setCheckboxActionData: function(e, t) {
if (e) {
const n = e.querySelector('input[type="checkbox"]'), o = e.querySelector(".el-checkbox__label"), a2 = e.closest(".selections-container").querySelector(".checkall-display-text");
let r = "";
n && (r = n.checked ? "checked" : "unchecked"), this.checkboxActionData = {
selectionsTitle: a2 ? a2.innerText : "",
property: n && t !== "all" ? n.value : "",
label: o ? o.innerText : "",
checked: r
};
} else
this.checkboxActionData = {
selectionsTitle: "",
property: "",
label: "",
checked: ""
};
},
onCheckboxNativeChange: function(e) {
const t = e.target.closest(".checkbox-container");
this.setCheckboxActionData(t, "individual");
},
onAllCheckboxNativeChange: function(e) {
const t = e.target.closest(".all-checkbox");
this.setCheckboxActionData(t, "all");
},
visibilityToggle: function(e, t) {
this.$emit("changed", { key: e, value: t }), e === this.checkboxActionData.property && (this.checkboxActionData.checked = t ? "checked" : "unchecked"), this.$emit("selections-data-changed", this.checkboxActionData);
},
checkboxMouseEnterEmit: function(e, t) {
this.$emit("checkboxMouseEnter", { key: e, value: t, selections: this.selections, checked: this.checkedItems });
},
handleCheckedItemsChange: function(e) {
let t = e.length;
this.checkAll = t === this.selections.length;
},
handleCheckAllChange: function(e) {
this.checkedItems = e ? this.selections.map((t) => t[this.identifierKey]) : [], this.$emit("checkAll", {
keys: this.selections.map((t) => t[this.identifierKey]),
value: e
}), this.checkboxActionData.property = this.identifierKey, this.checkboxActionData.checked = e ? "checked" : "unchecked", this.$emit("selections-data-changed", this.checkboxActionData);
},
getBackgroundStyles: function(e) {
return "colour" in e && this.colourStyle === "background" ? { background: e.colour } : {};
},
getState: function() {
const t = this.checkedItems.length === this.selections.length;
return {
checkAll: t,
checked: t ? [] : this.checkedItems
};
},
setState: function(e) {
var t;
if (this.checkAll = e.checkAll, this.checkedItems.length = 0, (t = e.checked) != null && t.length)
this.checkedItems.push(...e.checked), this.selections.forEach((n) => {
const o = n[this.identifierKey];
this.$emit("changed", { key: o, value: this.checkedItems.includes(o) });
});
else {
const n = this.selections.map((i) => i[this.identifierKey]);
let o = false;
this.checkAll && (o = true, this.checkedItems.push(...n)), this.$emit("checkAll", { keys: n, value: o });
}
},
hasLineStyles: function(e) {
return "colour" in e && this.colourStyle === "line";
},
getLineStyles: function(e) {
return "colour" in e && this.colourStyle === "line" ? "dashed" in e && e.dashed === true ? { background: `repeating-linear-gradient(90deg,${e.colour},${e.colour} 6px,transparent 0,transparent 9px)` } : { background: e.colour } : { display: "None" };
}
},
props: {
colourStyle: {
type: String,
default: "line"
},
helpMessage: {
type: String,
default: ""
},
identifierKey: {
type: String,
default: "id"
},
labelKey: {
type: String,
default: "label"
},
title: {
type: String,
default: ""
},
selections: {
type: Array,
default: function() {
return [];
}
},
showAsLegend: {
type: Boolean,
default: false
}
},
computed: {
isIndeterminate: function() {
return !(this.checkedItems.length === 0 || this.checkAll);
}
},
data: function() {
return {
checkedItems: [],
checkAll: true,
checkboxActionData: {
selectionsTitle: "",
property: "",
label: "",
checked: ""
}
};
},
mounted: function() {
this.reset();
}
};
var Wy = { class: "selections-container" };
var qy = { class: "checkall-display-text" };
var Gy = { style: { "word-break": "keep-all" } };
var Jy = { class: "checkbox-group-inner" };
var Yy = ["onMouseenter", "onMouseleave"];
function Zy(e, t, n, o, i, a2) {
const r = warning_default, s = Ue, l = zo, u2 = Wn, c = Xs, d = Un, f2 = el;
return openBlock(), createElementBlock("div", Wy, [
createVNode(d, null, {
default: withCtx(() => [
createVNode(u2, { span: 12 }, {
default: withCtx(() => [
createBaseVNode("span", qy, toDisplayString(n.title), 1),
n.helpMessage ? (openBlock(), createBlock(l, {
key: 0,
width: "250",
trigger: "hover",
teleported: false,
"popper-class": "popover-origin-help"
}, createSlots({
default: withCtx(() => [
createBaseVNode("span", Gy, toDisplayString(n.helpMessage), 1)
]),
_: 2
}, [
n.helpMessage ? {
name: "reference",
fn: withCtx(() => [
createVNode(s, { class: "info" }, {
default: withCtx(() => [
createVNode(r)
]),
_: 1
})
]),
key: "0"
} : void 0
]), 1024)) : createCommentVNode("", true)
]),
_: 1
}),
createVNode(u2, { span: 12 }, {
default: withCtx(() => [
n.selections && n.selections.length > 1 && !n.showAsLegend ? (openBlock(), createBlock(c, {
key: 0,
class: "all-checkbox",
indeterminate: a2.isIndeterminate,
modelValue: e.checkAll,
"onUpdate:modelValue": t[0] || (t[0] = (m2) => e.checkAll = m2),
onChange: a2.handleCheckAllChange,
onClick: a2.onAllCheckboxNativeChange
}, {
default: withCtx(() => t[2] || (t[2] = [
createTextVNode("Display all")
])),
_: 1
}, 8, ["indeterminate", "modelValue", "onChange", "onClick"])) : createCommentVNode("", true)
]),
_: 1
})
]),
_: 1
}),
createVNode(f2, {
class: normalizeClass({ "show-as-legend": n.showAsLegend, "checkbox-group": !n.showAsLegend }),
modelValue: e.checkedItems,
"onUpdate:modelValue": t[1] || (t[1] = (m2) => e.checkedItems = m2),
size: "small",
onChange: a2.handleCheckedItemsChange
}, {
default: withCtx(() => [
createBaseVNode("div", Jy, [
(openBlock(true), createElementBlock(Fragment, null, renderList(n.selections, (m2) => (openBlock(), createBlock(d, {
key: m2[n.identifierKey],
label: m2[n.identifierKey]
}, {
default: withCtx(() => [
createBaseVNode("div", {
class: "checkbox-container",
onMouseenter: (p) => a2.checkboxMouseEnterEmit(m2[n.identifierKey], true),
onMouseleave: (p) => a2.checkboxMouseEnterEmit(m2[n.identifierKey], false)
}, [
createVNode(c, {
class: "my-checkbox",
label: m2[n.identifierKey],
value: m2[n.identifierKey],
onChange: (p) => a2.visibilityToggle(m2[n.identifierKey], p),
onClick: a2.onCheckboxNativeChange,
checked: !("enabled" in m2) || m2.enabled === true
}, {
default: withCtx(() => [
createVNode(d, { class: "checkbox-row" }, {
default: withCtx(() => [
a2.hasLineStyles(m2) ? (openBlock(), createBlock(u2, {
key: 0,
span: 4
}, {
default: withCtx(() => [
createBaseVNode("div", {
class: "path-visual",
style: normalizeStyle(a2.getLineStyles(m2))
}, null, 4)
]),
_: 2
}, 1024)) : createCommentVNode("", true),
createVNode(u2, { span: 20 }, {
default: withCtx(() => [
createBaseVNode("div", {
style: normalizeStyle(a2.getBackgroundStyles(m2))
}, toDisplayString(m2[n.labelKey]), 5)
]),
_: 2
}, 1024)
]),
_: 2
}, 1024)
]),
_: 2
}, 1032, ["label", "value", "onChange", "onClick", "checked"])
], 40, Yy)
]),
_: 2
}, 1032, ["label"]))), 128))
])
]),
_: 1
}, 8, ["class", "modelValue", "onChange"])
]);
}
var ml = hn2(Uy, [["render", Zy], ["__scopeId", "data-v-35fb97d0"]]);
var Qy = ' ';
var Xy = {
name: "DynamicLegends",
props: {
identifierKey: {
type: String,
default: "id"
},
styleKey: {
type: String,
default: "style"
},
title: {
type: String,
default: ""
},
legends: {
type: Array,
default: function() {
return [];
}
},
showStarInLegend: {
type: Boolean,
default: false
}
},
computed: {
clipPathLegends: function() {
return ["exoid", "hexagon"];
}
},
methods: {
capitalise: function(e) {
return e.charAt(0).toUpperCase() + e.slice(1).toLowerCase();
},
customStyle: function(e) {
const t = e.color ? e.color : e.colour;
let n = t || "transparent", o = e.border ? e.border : "black";
if (t && !e.border && (o = n), e[this.styleKey] === "star") {
let i = Qy.replace("", n);
return i = i.replace("", o), i = i.replace("", o ? "2" : "0"), i = "data:image/svg+xml," + encodeURIComponent(i), { color: n, "background-image": `url(${i})` };
} else return e[this.styleKey] === "line" ? { color: n } : { "background-color": n, "border-color": o };
},
customClipPathStyle: function(e, t) {
const n = this.customStyle(e);
return t ? n["background-color"] = n["border-color"] : n.scale = 0.7, n;
},
legendStyle: function(e) {
return e[this.styleKey] === "star" ? e[this.identifierKey] === "Featured dataset marker" && !this.showStarInLegend ? void 0 : "star" : this.clipPathLegends.includes(e[this.styleKey]) ? e[this.styleKey] : e[this.styleKey] === "line" ? [e[this.styleKey], e.dashed ? "dashed" : "", e.arrow ? "arrow" : ""] : [e[this.styleKey], "shape"];
}
}
};
var eb = { class: "legend-group" };
var tb = ["label"];
var nb = {
key: 0,
class: "legend-item"
};
var ob = { class: "label" };
function ib(e, t, n, o, i, a2) {
return openBlock(), createElementBlock("div", eb, [
(openBlock(true), createElementBlock(Fragment, null, renderList(n.legends, (r) => (openBlock(), createElementBlock("div", {
class: "legend-container",
key: r[n.identifierKey],
label: r[n.identifierKey]
}, [
a2.legendStyle(r) ? (openBlock(), createElementBlock("div", nb, [
a2.clipPathLegends.includes(a2.legendStyle(r)) ? (openBlock(), createElementBlock("div", {
key: 0,
class: normalizeClass(a2.legendStyle(r)),
style: normalizeStyle(a2.customClipPathStyle(r, true))
}, [
createBaseVNode("div", {
class: normalizeClass(a2.legendStyle(r)),
style: normalizeStyle(a2.customClipPathStyle(r, false))
}, null, 6)
], 6)) : (openBlock(), createElementBlock("div", {
key: 1,
class: normalizeClass(a2.legendStyle(r)),
style: normalizeStyle(a2.customStyle(r))
}, null, 6)),
createBaseVNode("div", ob, toDisplayString(a2.capitalise(r[n.identifierKey])), 1)
])) : createCommentVNode("", true)
], 8, tb))), 128))
]);
}
var ab = hn2(Xy, [["render", ib], ["__scopeId", "data-v-0c2b00a9"]]);
var rb = {
name: "FlatmapError",
// The flatmapError prop is an object that may have the following properties:
// 1. title: string
// 2. messages: string[]
// 3. button: { text: string, callback: Function }
props: {
flatmapError: {
type: Object,
default: () => ({})
}
}
};
var sb = { class: "flatmap-error" };
var lb = { class: "flatmap-error-title" };
var ub = { key: 0 };
var cb = {
key: 0,
class: "flatmap-error-message"
};
var db = { key: 1 };
function fb(e, t, n, o, i, a2) {
const r = document_delete_default, s = Ue, l = Qi;
return openBlock(), createElementBlock("div", sb, [
createBaseVNode("div", lb, [
createVNode(s, { size: "24" }, {
default: withCtx(() => [
createVNode(r)
]),
_: 1
}),
n.flatmapError.title ? (openBlock(), createElementBlock("div", ub, toDisplayString(n.flatmapError.title), 1)) : createCommentVNode("", true)
]),
n.flatmapError.messages ? (openBlock(), createElementBlock("div", cb, [
(openBlock(true), createElementBlock(Fragment, null, renderList(n.flatmapError.messages, (u2, c) => (openBlock(), createElementBlock("div", { key: c }, toDisplayString(u2), 1))), 128))
])) : createCommentVNode("", true),
n.flatmapError.button ? (openBlock(), createElementBlock("div", db, [
createVNode(l, {
class: "button",
type: "primary",
onClick: n.flatmapError.button.callback
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(n.flatmapError.button.text), 1)
]),
_: 1
}, 8, ["onClick"])
])) : createCommentVNode("", true)
]);
}
var ta = hn2(rb, [["render", fb], ["__scopeId", "data-v-7cfcfa1f"]]);
var pb = {
name: "SvgLegends"
};
var hb = { class: "legends-container" };
var mb = {
version: "1.1",
id: "Layer_1",
x: "0px",
y: "0px",
viewBox: "0 0 500 500",
style: { "enable-background": "new 0 0 500 500" },
xmlns: "http://www.w3.org/2000/svg",
"xmlns:bx": "https://boxy-svg.com"
};
function vb(e, t, n, o, i, a2) {
return openBlock(), createElementBlock("div", hb, [
(openBlock(), createElementBlock("svg", mb, t[0] || (t[0] = [
createStaticVNode(' Tissue region Brain nuclei Ganglia Ganglionated nerve plexus ', 9)
]))),
t[1] || (t[1] = createBaseVNode("svg", {
width: "72px",
height: "72px",
viewBox: "0 0 24 24",
fill: "yellow"
}, null, -1))
]);
}
var gb = hn2(pb, [["render", vb], ["__scopeId", "data-v-88079d87"]]);
var yb = ``;
var An = function(e) {
return e ? [...new Set(e.map((t) => JSON.stringify(t)))].map(
(t) => JSON.parse(t)
) : [];
};
var ii = [];
var Ei = async function(e, t) {
const n = t.filter(
(a2) => ii.some((r) => r.taxon === a2)
), o = ii.filter(
(a2) => n.includes(a2.taxon)
), i = t.filter(
(a2) => !n.includes(a2)
);
if (i.length) {
const a2 = await e.queryLabels(i);
if (a2.length)
return a2.forEach((r) => {
let { entity: s, label: l } = r;
l === "Mammalia" && (l = "Mammalia not otherwise specified");
const u2 = { taxon: s, label: l };
o.push(u2), ii.push(u2);
}), o;
} else
return o;
};
var ai = function(e, t) {
if (!e || !t) return false;
let n = JSON.stringify(e), o = JSON.stringify(t);
return n.indexOf(o) !== -1;
};
var Jt = (e, t) => {
const n = e.name ?? e, o = t.name ?? t, i = n.toUpperCase(), a2 = o.toUpperCase();
return i < a2 ? -1 : i > a2 ? 1 : 0;
};
var bb = function() {
this.initialise = function(e) {
this.flatmapAPI = e, this.destinations = [], this.origins = [], this.components = [], this.rawURLs = [], this.controller = void 0, this.uberons = [], this.lookUp = [], this.connectivitySource = "map", this.noMapConnectivity = false;
}, this.createTooltipData = async function(e, t) {
let n = [];
t.feature.hyperlinks && t.feature.hyperlinks.length > 0 ? n = t.feature.hyperlinks : n = this.rawURLs;
let o;
if (t.provenanceTaxonomy) {
o = [];
try {
const a2 = await Ei(e, t.provenanceTaxonomy);
a2.length && a2.forEach((r) => {
const { label: s } = r;
o.push(s);
});
} catch (a2) {
console.log(a2);
}
}
return {
destinations: this.destinations,
origins: this.origins,
components: this.components,
destinationsWithDatasets: this.destinationsWithDatasets,
originsWithDatasets: this.originsWithDatasets,
componentsWithDatasets: this.componentsWithDatasets,
title: t.label,
featureId: t.resource,
hyperlinks: n,
provenanceTaxonomy: t.provenanceTaxonomy,
provenanceTaxonomyLabel: o,
connectivitySource: this.connectivitySource,
noMapConnectivity: this.noMapConnectivity
};
}, this.updateTooltipData = function(e) {
return {
...e,
origins: this.origins,
originsWithDatasets: this.originsWithDatasets,
components: this.components,
componentsWithDatasets: this.componentsWithDatasets,
destinations: this.destinations,
destinationsWithDatasets: this.destinationsWithDatasets,
connectivitySource: this.connectivitySource,
noMapConnectivity: this.noMapConnectivity
};
}, this.createComponentsLabelList = function(e, t) {
let n = [];
return e.forEach((o) => {
n.push(this.createLabelFromNeuralNode(o[0]), t), o.length === 2 && n.push(this.createLabelFromNeuralNode(o[1]), t);
}), n;
}, this.createLabelLookup = function(e, t) {
return new Promise(async (n) => {
let o = {};
this.uberons = [];
const i = await Ei(e, t);
i.length && (i.forEach((a2) => {
const { taxon: r, label: s } = a2;
o[r] = s, this.uberons.push({
id: r,
name: s
});
}), n(o));
});
}, this.buildConnectivitySqlStatement = function(e) {
let t = "select knowledge from knowledge where entity in (";
if (e.length === 1)
t += `'${e[0]}')`;
else if (e.length > 1)
for (let n in e)
t += `'${e[n]}'${n >= e.length - 1 ? ")" : ","} `;
return t;
}, this.buildLabelSqlStatement = function(e) {
let t = "select entity, label from labels where entity in (";
if (e.length === 1)
t += `'${e[0]}')`;
else if (e.length > 1)
for (let n in e)
t += `'${e[n]}'${n >= e.length - 1 ? ")" : ","} `;
return t;
}, this.findAllIdsFromConnectivity = function(e) {
let t = e.connectivity.flat(), n = [...new Set(t)], o = [];
return n.forEach((i) => {
Array.isArray(i) ? o.push(i.flat()) : o.push(i);
}), [...new Set(o.flat())];
}, this.flattenConnectivity = function(e) {
let t = e.flat(), n = [...new Set(t)], o = [];
return n.forEach((i) => {
Array.isArray(i) ? o.push(i.flat()) : o.push(i);
}), o.flat();
}, this.findComponents = function(e, t, n, o) {
let i = e.connectivity.flat(), a2 = An(i), r = [], s = false;
return a2.forEach((l) => {
s = false, ai(t, l) && (s = true), o && ai(o, l) && (s = true), ai(n, l) && (s = true), s || r.push(l);
}), r;
}, this.retrieveFlatmapKnowledgeForEvent = async function(e, t) {
this.controller && this.controller.abort(), this.controller = new AbortController(), this.controller.signal;
const n = t.resource;
if (this.destinations = [], this.origins = [], this.components = [], this.rawURLs = [], !n || n.length === 0 || !n[0]) return;
let o = this.queryForConnectivityNew(e, n[0]);
return await Promise.all([o]);
}, this.queryForConnectivityNew = function(e, t, n = "map", o = true) {
return this.connectivitySource = n, new Promise((i) => {
(n === "map" ? this.queryMapConnectivity(e.mapMetadata.uuid, t) : e.queryKnowledge(t)).then((r) => {
if (this.checkConnectivityExists(r)) {
n === "map" && (this.noMapConnectivity = false);
let s = r;
o ? this.processConnectivity(e, s).then((l) => {
r.references && (this.rawURLs = [...r.references]), i(l);
}) : i(s);
} else n === "map" ? (this.connectivitySource = "sckan", this.noMapConnectivity = true, e.queryKnowledge(t).then((s) => {
if (this.checkConnectivityExists(s)) {
let l = s;
o ? this.processConnectivity(e, l).then((u2) => {
s.references && (this.rawURLs = [...s.references]), i(u2);
}) : i(l);
} else
i(false);
}).catch(() => i(false))) : i(false);
}).catch((r) => {
r.name === "AbortError" || console.warn(`Unable to get the knowledge for the entity ${t}.`), i(false);
});
});
}, this.queryMapConnectivity = async function(e, t) {
const n = this.flatmapAPI + `flatmap/${e}/connectivity/${t}`;
try {
const o = await fetch(n);
if (!o.ok)
throw new Error(`Response status: ${o.status}`);
return await o.json();
} catch (o) {
throw new Error(o);
}
}, this.queryForConnectivity = function(e, t, n, o = true) {
const i = { sql: this.buildConnectivitySqlStatement(t) }, a2 = {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(i),
...n ? { signal: n } : {}
// add signal to header if it exists
};
return new Promise((r) => {
fetch(`${this.flatmapAPI}knowledge/query/`, a2).then((s) => s.json()).then((s) => {
if (this.connectivityExists(s)) {
let l = JSON.parse(s.values[0][0]);
o ? this.processConnectivity(e, l).then((u2) => {
r(u2);
}) : r(l);
} else
r(false);
}).catch((s) => {
s.name === "AbortError" || console.error("Error:", s), r(false);
});
});
}, this.checkConnectivityExists = function(e) {
var t;
return e && ((t = e.connectivity) == null ? void 0 : t.length);
}, this.connectivityExists = function(e) {
return !!(e.values && e.values.length > 0 && JSON.parse(e.values[0][0]).connectivity && JSON.parse(e.values[0][0]).connectivity.length > 0);
}, this.findIfNodeIsSingle = function(e) {
return e.length === 1 ? (console.error("Server returns a single node", e), e[0]) : e.length === 2 && e[1].length === 0 ? e[0] : false;
}, this.createLabelFromNeuralNode = function(e, t) {
let n = this.findIfNodeIsSingle(e);
if (n)
return t[n];
let o = t[e[0]];
return e.length === 2 && e[1].length > 0 && e[1].forEach((i) => {
t[i] == null ? o += `, ${i}` : o += `, ${t[i]}`;
}), o;
}, this.flattenAndFindDatasets = function(e, t, n) {
let o = this.flattenConnectivity(e), i = this.flattenConnectivity(t), a2 = this.flattenConnectivity(n);
this.originsWithDatasets = this.uberons.filter(
(r) => o.indexOf(r.id) !== -1
).sort(Jt), this.componentsWithDatasets = this.uberons.filter(
(r) => i.indexOf(r.id) !== -1
).sort(Jt), this.destinationsWithDatasets = this.uberons.filter(
(r) => a2.indexOf(r.id) !== -1
).sort(Jt);
}, this.processConnectivity = function(e, t) {
return new Promise((n) => {
let o = [], i = [], a2;
if (t && t["node-phenotypes"]) {
const l = ["ilxtr:hasSomaLocatedIn"], u2 = ["ilxtr:hasAxonPresynapticElementIn", "ilxtr:hasAxonSensorySubcellularElementIn"];
l.forEach((c) => {
c in t["node-phenotypes"] && o.push(...t["node-phenotypes"][c]);
}), o = An(o), u2.forEach((c) => {
c in t["node-phenotypes"] && i.push(...t["node-phenotypes"][c]);
}), i = An(i);
} else
i = An(t.axons), t.somas && t.somas.length > 0 && o.push(...t.somas), t.dendrites && t.dendrites.length > 0 && o.push(...t.dendrites), o = An(o), a2 = t.somas;
const r = this.findComponents(t, i, o, a2), s = this.findAllIdsFromConnectivity(t);
this.createLabelLookup(e, s).then((l) => {
this.origins = o.map(
(u2) => this.createLabelFromNeuralNode(u2, l)
).sort(Jt), this.components = r.map(
(u2) => this.createLabelFromNeuralNode(u2, l)
).sort(Jt), this.destinations = i.map(
(u2) => this.createLabelFromNeuralNode(u2, l)
).sort(Jt), this.flattenAndFindDatasets(o, r, i), n({
ids: {
dendrites: o,
components: r,
axons: i
},
labels: {
origins: this.origins,
components: this.components,
destinations: this.destinations
}
});
});
});
}, this.buildPubmedSqlStatement = function(e) {
let t = "select distinct publication from publications where entity in (";
if (e.length === 1)
t += `'${e[0]}')`;
else if (e.length > 1)
for (let n in e)
t += `'${e[n]}'${n >= e.length - 1 ? ")" : ","} `;
return t;
}, this.buildPubmedSqlStatementForModels = function(e) {
return `select distinct publication from publications where entity = '${e}'`;
}, this.queryKnowledge = async (e, t) => {
const n = `${this.flatmapAPI}/knowledge/query/`, i = await fetch(n, {
method: "POST",
headers: {
Accept: "application/json"
},
body: JSON.stringify({ sql: e, params: t })
});
if (!i.ok)
throw new Error(`Cannot access ${n}`);
const a2 = await i.json();
if ("error" in a2)
throw new TypeError(a2.error);
return a2.values;
};
};
async function wb(e) {
const t = sessionStorage.getItem("flatmap-knowledge");
if (t) {
const i = JSON.parse(t).filter((a2) => a2.references && a2.references.length).filter((a2) => a2.references.includes(e));
if (i.length)
return i.map((r) => r.id);
}
return [];
}
async function Sb(e, t, n) {
const i = `select knowledge from knowledge
where source="${na(e)}" and
knowledge like "%${t}%" order by source desc`;
return (await n.queryKnowledge(i)).map((l) => JSON.parse(l)).map((l) => l.id);
}
function na(e) {
return Cb(e.mapMetadata);
}
function Cb(e) {
let t = "";
if (e != null && e.connectivity) {
const n = e.connectivity;
"knowledge-source" in n ? t = n["knowledge-source"] : "npo" in n && (t = `${n.npo.release}-npo`);
}
return t;
}
async function Eb(e, t) {
const n = na(e), o = `select knowledge from knowledge
where source="${n}"
order by source desc`;
vl();
const i = sessionStorage.getItem("flatmap-knowledge"), a2 = sessionStorage.getItem("flatmap-knowledge-source");
if (!i || a2 !== n) {
const s = (await t.queryKnowledge(o)).map((l) => JSON.parse(l));
return sessionStorage.setItem("flatmap-knowledge", JSON.stringify(s)), sessionStorage.setItem("flatmap-knowledge-source", n), Ib(), s;
}
return JSON.parse(i);
}
function Ib() {
const n = (/* @__PURE__ */ new Date()).getTime() + 864e5;
sessionStorage.setItem("flatmap-knowledge-expiry", n);
}
function kb() {
[
"flatmap-knowledge",
"flatmap-knowledge-expiry",
"flatmap-knowledge-source"
].forEach((t) => {
sessionStorage.removeItem(t);
});
}
function vl() {
const e = sessionStorage.getItem("flatmap-knowledge-expiry");
(/* @__PURE__ */ new Date()).getTime() > e && kb();
}
var co = (e) => e && e.charAt(0).toUpperCase() + e.slice(1);
var Tb = 'Featured dataset marker ';
var gl = { exports: {} };
(function(e, t) {
(function(n, o) {
e.exports = o();
})(typeof window < "u" ? window : ag, function() {
if (typeof window > "u")
return null;
var n = typeof window < "u" && window.Math == Math ? window : typeof self < "u" && self.Math == Math ? self : Function("return this")(), o = n.requestAnimationFrame || n.mozRequestAnimationFrame || n.webkitRequestAnimationFrame || function(c) {
return n.setTimeout(c, 20);
}, i = n.cancelAnimationFrame || n.mozCancelAnimationFrame || n.webkitCancelAnimationFrame || function(c) {
n.clearTimeout(c);
};
function a2(c, d) {
var f2 = Object.prototype.toString.call(c), m2 = f2 === "[object Array]" || f2 === "[object NodeList]" || f2 === "[object HTMLCollection]" || f2 === "[object Object]" || typeof jQuery < "u" && c instanceof jQuery || typeof Elements < "u" && c instanceof Elements, p = 0, h3 = c.length;
if (m2)
for (; p < h3; p++)
d(c[p]);
else
d(c);
}
function r(c) {
if (!c.getBoundingClientRect)
return {
width: c.offsetWidth,
height: c.offsetHeight
};
var d = c.getBoundingClientRect();
return {
width: Math.round(d.width),
height: Math.round(d.height)
};
}
function s(c, d) {
Object.keys(d).forEach(function(f2) {
c.style[f2] = d[f2];
});
}
var l = function(c, d) {
var f2 = 0;
function m2() {
var h3 = [];
this.add = function(C2) {
h3.push(C2);
};
var g2, y2;
this.call = function(C2) {
for (g2 = 0, y2 = h3.length; g2 < y2; g2++)
h3[g2].call(this, C2);
}, this.remove = function(C2) {
var O2 = [];
for (g2 = 0, y2 = h3.length; g2 < y2; g2++)
h3[g2] !== C2 && O2.push(h3[g2]);
h3 = O2;
}, this.length = function() {
return h3.length;
};
}
function p(h3, g2) {
if (h3) {
if (h3.resizedAttached) {
h3.resizedAttached.add(g2);
return;
}
h3.resizedAttached = new m2(), h3.resizedAttached.add(g2), h3.resizeSensor = document.createElement("div"), h3.resizeSensor.dir = "ltr", h3.resizeSensor.className = "resize-sensor";
var y2 = {
pointerEvents: "none",
position: "absolute",
left: "0px",
top: "0px",
right: "0px",
bottom: "0px",
overflow: "hidden",
zIndex: "-1",
visibility: "hidden",
maxWidth: "100%"
}, C2 = {
position: "absolute",
left: "0px",
top: "0px",
transition: "0s"
};
s(h3.resizeSensor, y2);
var O2 = document.createElement("div");
O2.className = "resize-sensor-expand", s(O2, y2);
var T2 = document.createElement("div");
s(T2, C2), O2.appendChild(T2);
var I2 = document.createElement("div");
I2.className = "resize-sensor-shrink", s(I2, y2);
var k2 = document.createElement("div");
s(k2, C2), s(k2, { width: "200%", height: "200%" }), I2.appendChild(k2), h3.resizeSensor.appendChild(O2), h3.resizeSensor.appendChild(I2), h3.appendChild(h3.resizeSensor);
var A2 = window.getComputedStyle(h3), $2 = A2 ? A2.getPropertyValue("position") : null;
$2 !== "absolute" && $2 !== "relative" && $2 !== "fixed" && $2 !== "sticky" && (h3.style.position = "relative");
var N2 = false, K = 0, B2 = r(h3), M2 = 0, W2 = 0, de = true;
f2 = 0;
var Y = function() {
var be = h3.offsetWidth, _e = h3.offsetHeight;
T2.style.width = be + 10 + "px", T2.style.height = _e + 10 + "px", O2.scrollLeft = be + 10, O2.scrollTop = _e + 10, I2.scrollLeft = be + 10, I2.scrollTop = _e + 10;
}, D2 = function() {
if (de) {
var be = h3.offsetWidth === 0 && h3.offsetHeight === 0;
if (be) {
f2 || (f2 = o(function() {
f2 = 0, D2();
}));
return;
} else
de = false;
}
Y();
};
h3.resizeSensor.resetSensor = D2;
var ne = function() {
K = 0, N2 && (M2 = B2.width, W2 = B2.height, h3.resizedAttached && h3.resizedAttached.call(B2));
}, xe = function() {
B2 = r(h3), N2 = B2.width !== M2 || B2.height !== W2, N2 && !K && (K = o(ne)), D2();
}, ye = function(be, _e, qe) {
be.attachEvent ? be.attachEvent("on" + _e, qe) : be.addEventListener(_e, qe);
};
ye(O2, "scroll", xe), ye(I2, "scroll", xe), f2 = o(function() {
f2 = 0, D2();
});
}
}
a2(c, function(h3) {
p(h3, d);
}), this.detach = function(h3) {
f2 || (i(f2), f2 = 0), l.detach(c, h3);
}, this.reset = function() {
c.resizeSensor.resetSensor();
};
};
if (l.reset = function(c) {
a2(c, function(d) {
d.resizeSensor.resetSensor();
});
}, l.detach = function(c, d) {
a2(c, function(f2) {
f2 && (f2.resizedAttached && typeof d == "function" && (f2.resizedAttached.remove(d), f2.resizedAttached.length()) || f2.resizeSensor && (f2.contains(f2.resizeSensor) && f2.removeChild(f2.resizeSensor), delete f2.resizeSensor, delete f2.resizedAttached));
});
}, typeof MutationObserver < "u") {
var u2 = new MutationObserver(function(c) {
for (var d in c)
if (c.hasOwnProperty(d))
for (var f2 = c[d].addedNodes, m2 = 0; m2 < f2.length; m2++)
f2[m2].resizeSensor && l.reset(f2[m2]);
});
document.addEventListener("DOMContentLoaded", function(c) {
u2.observe(document.body, {
childList: true,
subtree: true
});
});
}
return l;
});
})(gl);
var Ab = gl.exports;
var Ob = rg(Ab);
var Mb = defineStore("main", {
state: () => ({
userProfile: {
token: ""
}
}),
getters: {
userToken(e) {
return e.userProfile.token;
}
},
actions: {
setUserToken(e) {
this.userProfile.token = e;
}
}
});
function _b(e) {
return { all: e = e || /* @__PURE__ */ new Map(), on: function(t, n) {
var o = e.get(t);
o ? o.push(n) : e.set(t, [n]);
}, off: function(t, n) {
var o = e.get(t);
o && (n ? o.splice(o.indexOf(n) >>> 0, 1) : e.set(t, []));
}, emit: function(t, n) {
var o = e.get(t);
o && o.slice().map(function(i) {
i(n);
}), (o = e.get("*")) && o.slice().map(function(i) {
i(t, n);
});
} };
}
var Ii = new _b();
var Pb = "cannot be found on the map.";
var Lb = (e) => {
let t = { lng: 0, lat: 0 }, n;
return e.type === "Polygon" ? e.coordinates.length && (n = e.coordinates[0]) : n = e.coordinates, n && (e.type !== "Point" ? (n.map((o) => {
t.lng += parseFloat(o[0]), t.lat += parseFloat(o[1]);
}), t.lng = t.lng / n.length, t.lat = t.lat / n.length) : (t.lng += parseFloat(n[0]), t.lat += parseFloat(n[1]))), t;
};
var yl = (e, t) => {
const n = [];
let o = e.organs ? e.organs : e.ftus;
const i = o ? o.filter(
(a2, r) => o.findIndex((s) => s.label === a2.label) === r
) : void 0;
return i && i.forEach((a2) => {
const r = {
label: a2.label,
models: a2.models,
key: `${t}.${a2.label}`
}, s = yl(a2, r.key);
s.length > 0 && (r.children = s), n.push(r);
}), n;
};
var xb = {
name: "FlatmapVuer",
components: {
Button: Qi,
Col: Wn,
Loading: Ky,
Radio: sl,
Icon: Ue,
RadioGroup: ll,
Row: Un,
Select: Vo,
Dialog: ly,
MapSvgIcon: wn,
MapSvgSpriteColor: hn,
Tooltip: z7,
TreeControls: V7,
SelectionsGroup: ml,
SvgLegends: gb,
ElIconWarningFilled: warning_filled_default,
ElIconArrowDown: arrow_down_default,
ElIconArrowLeft: arrow_left_default,
DrawToolbar: $7,
FlatmapError: ta
},
beforeCreate: function() {
this.setStateRequired = false;
},
setup(e) {
let t = inject("$annotator");
return t || (t = markRaw(new AnnotationService(`${e.flatmapAPI}annotator`)), provide("$annotator", t)), { annotator: t };
},
methods: {
enableFeatureResetOnClick: function(e) {
this.mapImp && this.mapImp.enableFeatureResetOnClick(e);
},
/**
* @public
* Function to set visibility filter for features and paths on the map.
* The param `filter` format should follow `#makeStyleFilter` (flatmap-viewer).
* If the param is `null` or `undefined`, the visibility filter will be cleared.
* Refer to [`setVisibilityFilter` in flatmap-viewer](https://anatomicmaps.github.io/flatmap-viewer/classes/index.FlatMap.html#setvisibilityfilter)
* for more details.
* @param {Object} `filter`
*/
setVisibilityFilter: function(e) {
this.mapImp && (e ? this.mapImp.setVisibilityFilter(e) : this.mapImp.clearVisibilityFilter());
},
/**
* @public
* Function to manually send aborted signal when annotation tooltip popup or sidebar tab closed.
*/
manualAbortedOnClose: function() {
this.annotationSidebar && this.$emit("annotation-close"), this.closeTooltip(), this.annotationEventCallback({}, { type: "aborted" }), this.initialiseDrawing();
},
/**
* @public
* Function to initialise drawing.
*/
initialiseDrawing: function() {
this.connectionEntry = {}, this.activeDrawTool = void 0, this.activeDrawMode = void 0, this.drawnCreatedEvent = {};
},
/**
* @public
* Function to cancel a newly drawn feature.
*/
cancelDrawnFeature: function() {
this.isValidDrawnCreated && (this.annotationSidebar && this.$emit("annotation-close"), this.closeTooltip(), this.annotationEntry = [{
...this.drawnCreatedEvent.feature,
resourceId: this.serverURL
}], this.rollbackAnnotationEvent(), this.initialiseDrawing());
},
/**
* @public
* Function to display connected features' tooltip for drawn connectivity.
* @param {String} `id`
*/
connectedFeatureTooltip: function(e) {
if (this.mapImp)
if (e) {
const t = Number(e);
let o = { feature: t ? this.mapImp.featureProperties(t) : { feature: this.existDrawnFeatures.find((i) => i.id === e.trim()) } };
this.checkAndCreatePopups([o], false);
} else
this.closeTooltip();
},
/**
* @public
* Function to confirm a newly drawn feature.
*/
confirmDrawnFeature: function() {
this.isValidDrawnCreated && (this.checkAndCreatePopups([this.drawnCreatedEvent], false), Object.keys(this.connectionEntry).length > 0 && (this.annotationEntry[0].feature.connection = this.connectionEntry), this.initialiseDrawing());
},
/**
* @public
* Function to process the annotation toolbar click events.
* @arg {String} `type`
* @arg {String} `name`
*/
toolbarEvent: function(e, t) {
if (!this.isValidDrawnCreated) {
if (this.manualAbortedOnClose(), this.doubleClickedFeature = false, this.changeAnnotationDrawMode({ mode: "simple_select" }), e === "mode")
this.activeDrawMode = t;
else if (e === "tool") {
if (this.cancelDrawnFeature(), t) {
const n = t.replace(/[A-Z]/g, (o) => `_${o.toLowerCase()}`);
this.changeAnnotationDrawMode({ mode: `draw${n}` });
}
this.activeDrawTool = t;
}
}
},
/**
* @public
* Function to fire annotation event based on the provided ``data``.
* Either edit or delete action.
* @arg {Object} `data`
*/
annotationDrawModeEvent: function(e) {
this.activeDrawMode === "Edit" ? this.doubleClickedFeature && (e.feature.feature.geometry.type !== "Point" && (this.changeAnnotationDrawMode({
mode: "direct_select",
options: { featureId: e.feature.feature.id }
}), this.modifyAnnotationFeature()), this.doubleClickedFeature = false) : this.activeDrawMode === "Delete" && (this.changeAnnotationDrawMode({
mode: "simple_select",
options: { featureIds: [e.feature.feature.id] }
}), this.modifyAnnotationFeature());
},
/**
* Function to create connectivity body from existing entries.
*/
createConnectivityBody: function() {
if (Object.keys(this.connectionEntry).length > 0) {
const e = Object.values(this.connectionEntry), t = {
type: "connectivity",
source: e[0],
target: e[e.length - 1],
intermediates: e.filter((n, o) => o !== 0 && o !== e.length - 1)
};
this.annotationEntry[0].body = t;
}
},
/**
* @public
* Function to update the annotation draw mode.
* @arg {Object} `mode`
*/
changeAnnotationDrawMode: function(e) {
this.mapImp && this.mapImp.changeAnnotationDrawMode(e);
},
/**
* @public
* Function to remove all drawn annotations from flatmap annotation layer.
*/
clearAnnotationFeature: function() {
this.mapImp && this.mapImp.clearAnnotationFeature();
},
/**
* @public
* Function to fire the ``trash`` action.
* See https://github.com/mapbox/mapbox-gl-draw/blob/main/docs/API.md#trash-draw for more details.
*/
modifyAnnotationFeature: function() {
this.mapImp && this.mapImp.removeAnnotationFeature();
},
/**
* @public
* Function to rollback the failure drawn from flatmap annotation layer.
*/
rollbackAnnotationEvent: function() {
this.mapImp && this.annotationEntry.length > 0 && ["created", "updated", "deleted"].includes(this.annotationEntry[0].type) && (this.mapImp.rollbackAnnotationEvent(this.annotationEntry[0]), this.annotationEntry = []);
},
/**
* @public
* Function to commit the emitted ``annotation`` data from successful new drawn to flatmap annotation layer.
* @arg {Object} `annotation`
*/
commitAnnotationEvent: function(e) {
this.mapImp && (this.offlineAnnotationEnabled && (this.offlineAnnotations = JSON.parse(sessionStorage.getItem("anonymous-annotation")) || [], this.offlineAnnotations.push(e), this.annotationEntry[0].type === "deleted" && (this.offlineAnnotations = this.offlineAnnotations.filter((t) => t.resource !== this.serverURL || t.item.id !== e.item.id)), sessionStorage.setItem("anonymous-annotation", JSON.stringify(this.offlineAnnotations))), ["created", "updated", "deleted"].includes(this.annotationEntry[0].type) && (this.featureAnnotationSubmitted = true, this.mapImp.commitAnnotationEvent(this.annotationEntry[0]), e.body.comment === "Position Updated" ? this.annotationEntry[0].positionUpdated = false : this.annotationEntry[0].type === "deleted" && (this.annotationSidebar && this.$emit("annotation-close"), this.closeTooltip(), this.annotationEntry = []), this.addAnnotationFeature()));
},
/**
* @public
* Function to fetch annotated item id.
* @arg {String} `userId`,
* @arg {String} `participated`
*/
fetchAnnotatedItemIds: async function(e = void 0, t = void 0) {
let n;
return this.offlineAnnotationEnabled ? (this.offlineAnnotations = JSON.parse(sessionStorage.getItem("anonymous-annotation")) || [], n = this.offlineAnnotations.filter((o) => o.resource === this.serverURL).map((o) => o.item.id)) : (n = await this.annotator.annotatedItemIds(this.userToken, this.serverURL, e, t), "resource" in n && (n = n.itemIds)), n;
},
/**
* @public
* Function to add existing drawn annotations to flatmap.
*/
setFeatureAnnotated: async function() {
if (this.mapImp) {
const e = await this.fetchAnnotatedItemIds();
for (const t of e)
this.mapImp.setFeatureAnnotated(t);
}
},
/**
* @public
* Function to fetch drawn features.
* @arg {String} `userId`,
* @arg {String} `participated`
*/
fetchDrawnFeatures: async function(e, t) {
let n;
if (this.offlineAnnotationEnabled)
this.offlineAnnotations = JSON.parse(sessionStorage.getItem("anonymous-annotation")) || [], n = this.offlineAnnotations.filter((o) => o.feature && o.resource === this.serverURL).map((o) => o.feature);
else {
const o = await this.fetchAnnotatedItemIds(e, t);
n = await this.annotator.drawnFeatures(this.userToken, this.serverURL, o), "resource" in n && (n = n.features);
}
return n;
},
/**
* @public
* Function to draw existing drawn annotations based on selector.
*/
addAnnotationFeature: async function() {
if (this.mapImp) {
this.featureAnnotationSubmitted || (this.clearAnnotationFeature(), this.loading = true);
const e = this.annotationFrom === "Anyone" ? void 0 : this.authorisedUser.orcid ? this.authorisedUser.orcid : "0000-0000-0000-0000", t = this.annotationFrom === "Anyone" ? void 0 : this.annotationFrom === "Me", n = await this.fetchDrawnFeatures(e, t);
if (this.existDrawnFeatures = n, this.loading = false, !this.featureAnnotationSubmitted)
for (const o of n)
this.mapImp.addAnnotationFeature(o);
}
},
/**
* @public
* Function to display annotator toolbar.
* @arg {Boolean} `flag`
*/
showAnnotator: function(e) {
this.mapImp && (this.mapImp.showAnnotator(e), this.$el.querySelector(".maplibregl-ctrl-group").style.display = "none");
},
/**
* @public
* Function to switch the type of person who annotated.
* @arg {Boolean} `flag`
*/
setAnnotationFrom: function(e) {
this.annotationFrom = e, this.mapImp && (this.manualAbortedOnClose(), this.addAnnotationFeature());
},
/**
* Function to emit offline annotation enabled status
*/
emitOfflineAnnotationUpdate: function() {
this.$emit("update-offline-annotation-enabled", this.offlineAnnotationEnabled);
},
/**
* @public
* Function to switch from 2D to 3D
* @arg {Boolean} `flag`
*/
setFlightPath3D: function(e) {
this.flightPath3DRadio = e, this.mapImp && this.mapImp.enableFlightPaths(e);
},
/**
* @public
* Function to view the latest map (example when you are on legacy map).
*/
viewLatestMap: function() {
let e = this.biologicalSex ? this.biologicalSex : void 0;
this.entry === "NCBITaxon:9606" && (e = "PATO:0000384");
const t = {
entry: this.entry,
biologicalSex: e,
viewport: this.mapImp.getState()
};
this.$emit("view-latest-map", t);
},
/**
* @public
* Function to change the background colour of the map
* by providing the ``colour``.
* @arg {String} `colour`
*/
backgroundChangeCallback: function(e) {
this.currentBackground = e, this.mapImp && this.mapImp.setBackgroundColour(this.currentBackground, 1);
},
/**
* @public
* Function to process a list of a FC flatmap's systems.
* @arg {Array} `systems`
*/
processSystems: function(e) {
if (this.systems.length = 0, e && e.length > 0) {
const t = { label: "All", key: "All", children: [] };
e.forEach((n) => {
const o = {
colour: n.colour,
enabled: n.enabled,
label: n.id,
key: n.id
}, i = yl(n, o.key);
i.length > 0 && (o.children = i), t.children.push(o);
}), this.systems.push(t);
}
},
/**
* @public
* Function to add taxon identifiers into the taxon connectivity array,
* by retrieving their corresponding labels using the flatmap API.
* @arg {String} `flatmapAPI`,
* @arg {Array} `taxonIdentifiers`
*/
processTaxon: function(e, t) {
this.taxonConnectivity.length = 0, Ei(this.mapImp, e).then((n) => {
n.length && n.forEach((o) => {
let i = true;
t && (i = t.checkAll ? true : t.checked.includes(o.taxon)), this.taxonConnectivity.push({ ...o, enabled: i }), this.mapImp && this.mapImp.enableConnectivityByTaxonIds(o.taxon, i);
});
});
},
/**
* @public
* Function to show or hide the display of the bottom-left drawer container.
*/
toggleDrawer: function() {
this.drawerOpen = !this.drawerOpen;
},
/**
* @public
* Function to toggle colour/greyscale of organs.
* The parameter ``flag`` is a boolean, ``true`` (colour) and ``false`` (greyscale).
* @arg {Boolean} `flag`
*/
setColour: function(e) {
this.colourRadio = e, this.mapImp && this.mapImp.setPaint({ coloured: e, outlined: this.outlinesRadio });
},
/**
* @public
* Function to toggle outlines f organs.
* The parameter ``flag`` is a boolean, ``true`` to show outlines, ``false`` to hide outlines.
* @arg {Boolean} `flag`
*/
setOutlines: function(e) {
this.outlinesRadio = e, this.mapImp && this.mapImp.setPaint({ coloured: this.colourRadio, outlined: e });
},
setInitMapState: function() {
if (this.mapImp) {
const e = this.mapImp.map, t = this.mapImp.options.bounds, n = [
[t[0], t[1]],
[t[2], t[3]]
];
e.setMaxBounds(null), e.setRenderWorldCopies(false), this.initMapState = markRaw({
initBounds: n
});
}
},
/**
* @public
* Function to toggle paths to default.
* Also called when the associated button is pressed.
*/
resetView: function() {
if (this.mapImp) {
const e = this.mapImp.map, { initBounds: t } = this.initMapState;
e.resetNorthPitch({
animate: false
}), t && e.fitBounds(t, {
animate: false
}), this.$refs.skcanSelection && this.$refs.skcanSelection.reset(), this.$refs.layersSelection && this.$refs.layersSelection.reset(), this.$refs.systemsSelection && this.$refs.pathwaysSelection.reset(), this.$refs.pathwaysSelection && this.$refs.pathwaysSelection.reset();
}
},
/**
* @public
* Function to zoom in.
* Also called when the associated button is pressed.
*/
zoomIn: function() {
this.mapImp && this.mapImp.zoomIn();
},
/**
* @public
* Function to zoom out.
* Also called when the associated button is pressed.
*/
zoomOut: function() {
this.mapImp && this.mapImp.zoomOut();
},
onSelectionsDataChanged: function(e) {
this.$emit("pathway-selection-changed", e);
},
/**
* // Currently not in use
* Function to show or hide paths valid in SCKAN
* by providing ``{key, value}`` pair in ``payload``.
* @arg payload
*/
sckanSelected: function(e) {
this.mapImp && this.mapImp.enableSckanPath(e.key, e.value);
},
/**
* // Currently not in use
* Function to show or hide all paths valid in SCKAN.
* @arg payload
*/
checkAllSCKAN: function(e) {
this.mapImp && e.keys.forEach(
(t) => this.mapImp.enableSckanPath(t, e.value)
);
},
/**
* Function to highlight paths and features
* @param data
*/
zoomToFeatures: function(e) {
this.mapImp && this.mapImp.zoomToFeatures(e);
},
/**
* @public
* Function to highlight the connected paths
* by providing path model identifier, ``pathId`` or ``anatomicalId``.
* @arg {string} `pathId` or `anatomicalId`
*/
retrieveConnectedPaths: async function(e, t = {}) {
var n, o, i, a2, r;
if (this.mapImp) {
let s = [], l = (n = t.target) != null && n.length ? t.target : [];
const u2 = [...this.mapImp.pathModelNodes(e)], c = await this.mapImp.queryPathsForFeatures(e);
if (u2.length) {
if (!l.length) {
const d = (o = t.type) != null && o.length ? t.type : ["all"], f2 = await this.flatmapQueries.queryForConnectivityNew(this.mapImp, e[0]), m2 = (i = f2 == null ? void 0 : f2.ids) == null ? void 0 : i.dendrites.flat(1 / 0), p = (a2 = f2 == null ? void 0 : f2.ids) == null ? void 0 : a2.components.flat(1 / 0), h3 = (r = f2 == null ? void 0 : f2.ids) == null ? void 0 : r.axons.flat(1 / 0);
let g2 = [];
d.includes("origins") && g2.push(...m2), d.includes("components") && g2.push(...p), d.includes("destinations") && g2.push(...h3), d.includes("all") && g2.push(...m2, ...p, ...h3), l = [...new Set(g2)];
}
u2.forEach((d) => {
this.mapImp.nodePathModels(d).forEach((m2) => {
const h3 = this.mapImp.pathModelNodes(m2).map((y2) => this.mapImp.featureProperties(y2).models);
l.filter((y2) => h3.includes(y2)).length && !s.includes(m2) && s.push(m2);
});
});
} else c.length && (l.length ? c.forEach((d) => {
const m2 = this.mapImp.pathModelNodes(d).map((h3) => this.mapImp.featureProperties(h3).models);
l.filter((h3) => m2.includes(h3)).length && !s.includes(d) && s.push(d);
}) : s = c);
return s = [.../* @__PURE__ */ new Set([...s, ...e])], s;
}
},
resetMapFilter: function() {
const e = this.mapFilters.alert;
let t;
const n = { "tile-layer": "pathways" }, o = { NOT: n };
e.with && !e.without ? t = {
OR: [o, { AND: [n, { HAS: "alert" }] }]
} : !e.with && e.without ? t = {
OR: [o, { AND: [n, { NOT: { HAS: "alert" } }] }]
} : !e.with && !e.without && (t = o), this.setVisibilityFilter(t);
},
/**
* @public
* Function to enable/disable mouse enter and leave event for
* alert checkbox
* @arg {Object} `payload`
*/
alertMouseEnterEmitted: function(e) {
if (this.mapImp)
if (e.value) {
let t;
const n = { "tile-layer": "pathways" }, o = { NOT: n };
if (e.key === "alert" || e.key === "withoutAlert") {
const i = e.key === "alert" ? { HAS: "alert" } : { NOT: { HAS: "alert" } };
t = { OR: [o, { AND: [n, i] }] };
}
this.setVisibilityFilter(t);
} else
this.resetMapFilter();
},
/**
* @public
* Function to enable/disable (show/hide) pathways with/without alert
* by providing ``kay, value`` ``payload`` object ``{alertKey, true/false}``.
* @arg {Object} `payload`
*/
alertSelected: function(e) {
this.mapImp && (e.key === "alert" ? e.value ? this.mapFilters.alert.with = true : this.mapFilters.alert.with = false : e.key === "withoutAlert" && (e.value ? this.mapFilters.alert.without = true : this.mapFilters.alert.without = false), this.resetMapFilter());
},
/**
* @public
* Function to enable/disable (show/hide) all alerts
* option by providing ``flag`` (true/false).
* @arg {Boolean} `flag`
*/
checkAllAlerts: function(e) {
this.mapImp && (e.value ? (this.mapFilters.alert.without = true, this.mapFilters.alert.with = true) : (this.mapFilters.alert.without = false, this.mapFilters.alert.with = false), this.resetMapFilter());
},
/**
* @public
* Function to enable/disable (show/hide) the system
* by providing ``kay, value`` ``payload`` object ``{systemId, true/false}``.
* @arg {Object} `payload`
*/
systemSelected: function(e) {
this.mapImp && this.mapImp.enableSystem(e.key, e.value);
},
/**
* @public
* Function to enable/disable (show/hide) all systems
* by providing ``flag`` (true/false).
* @arg {Boolean} `flag`
*/
checkAllSystems: function(e) {
this.mapImp && this.systems[0].children.forEach(
(t) => this.mapImp.enableSystem(t.label, e)
);
},
/**
* @public
* Function to display features with annotation matching the provided term.
* @arg {String} `models`
*/
ftuSelected: function(e) {
this.searchAndShowResult(e, true, true);
},
/**
* @public
* Function to show or hide the layer
* by providing ``{layerId, true/false}`` in ``payload``.
* @arg {Object} `payload`
*/
layersSelected: function(e) {
this.mapImp && this.mapImp.enableLayer(e.key, e.value);
},
/**
* @public
* Function to show or hide all layers
* by providing ``payload`` with ``payload.keys`` array and ``payload.value`` flag.
* @arg {Object} `payload`
*/
checkAllLayers: function(e) {
this.mapImp && e.keys.forEach(
(t) => this.mapImp.enableLayer(t, e.value)
);
},
/**
* @public
* Function to show or hide connectivity features studied in particular species
* by providing ``{taxonId, true/false}`` in ``payload.key, payload.value``.
* @arg {Object} `payload`
*/
taxonsSelected: function(e) {
this.mapImp && this.mapImp.enableConnectivityByTaxonIds(e.key, e.value);
},
taxonMouseEnterEmitted: function(e) {
if (this.mapImp)
if (e.value) {
clearTimeout(this.taxonLeaveDelay);
let t = this.mapImp.taxonFeatureIds(e.key);
this.mapImp.enableConnectivityByTaxonIds(e.key, e.value), this.mapImp.zoomToGeoJSONFeatures(t, { noZoomIn: true });
} else
this.taxonLeaveDelay = setTimeout(() => {
this.mapImp.unselectGeoJSONFeatures(), e.selections.forEach((t) => {
let n = e.checked.includes(t.taxon);
this.mapImp.enableConnectivityByTaxonIds(t.taxon, n);
});
}, 1e3);
},
/**
* @public
* Function to show or hide connectivity features studied in particular species
* by providing ``payload`` with ``payload.keys`` array and ``payload.value`` flag.
* @arg {Object} `payload`
*/
checkAllTaxons: function(e) {
this.mapImp && this.mapImp.enableConnectivityByTaxonIds(e.keys, e.value);
},
/**
* @public
* Function to hide or show paths of a given type
* by providing ``{pathType, true/false}`` in ``payload.key, payload.value``.
* @arg {Object} `payload`
*/
pathwaysSelected: function(e) {
this.mapImp && this.mapImp.enablePath(e.key, e.value);
},
/**
* @public
* Function to hide or show paths of a given type
* by providing ``payload`` with ``payload.keys`` array and ``payload.value`` flag.
* @arg {Object} `payload`
*/
checkAllPathways: function(e) {
this.mapImp && e.keys.forEach(
(t) => this.mapImp.enablePath(t, e.value)
);
},
/**
* @public
* Function to generate callbacks as a result of panning/zooming the map.
* ``flag`` (boolean) - generate callbacks when ``true``, otherwise disable them.
* @arg {Boolean} `flag`
*/
enablePanZoomEvents: function(e) {
this.mapImp.enablePanZoomEvents(e);
},
/**
* @public
* Function to process annotation callbacks, invoked when events occur with the map.
* @arg {Object} `payload`,
* @arg {Object} `data`
*/
annotationEventCallback: function(e, t) {
if (t.type === "aborted")
this.featureAnnotationSubmitted ? this.featureAnnotationSubmitted = false : this.rollbackAnnotationEvent(), this.annotationEntry = [];
else if (t.type === "modeChanged")
t.feature.mode === "direct_select" && (this.doubleClickedFeature = true), this.annotationSidebar && t.feature.mode === "simple_select" && this.activeDrawMode === "Deleted" && this.annotationEventCallback({}, { type: "aborted" });
else if (t.type === "selectionChanged") {
if (this.selectedDrawnFeature = t.feature.features.length === 0 ? void 0 : t.feature.features[0], e.feature.feature = this.selectedDrawnFeature, !this.activeDrawTool)
if (this.connectionEntry = {}, this.selectedDrawnFeature) {
const n = this.existDrawnFeatures.find(
(o) => o.id === this.selectedDrawnFeature.id
);
n && n.connection && (this.connectionEntry = n.connection), this.annotationDrawModeEvent(e);
} else
this.annotationSidebar && this.previousEditEvent.type === "updated" && (this.annotationEntry = [{
...this.previousEditEvent,
resourceId: this.serverURL
}], this.annotationEventCallback({}, { type: "aborted" })), this.previousEditEvent = {};
} else {
if (t.type === "created" || t.type === "updated") {
t.type === "updated" && t.feature.action && (t.positionUpdated = t.feature.action === "move");
const n = this.mapImp.refreshAnnotationFeatureGeometry(t.feature);
e.feature.feature = n;
}
t.type === "created" ? this.drawnCreatedEvent = e : this.checkAndCreatePopups([e]);
}
t.type === "updated" && (this.previousEditEvent = t), t.type === "deleted" ? this.previousDeletedEvent = t : this.previousDeletedEvent = {};
},
getTaxons: function(e) {
let t;
return e.taxons && (typeof e.taxons != "object" ? t = JSON.parse(e.taxons) : t = e.taxons), t;
},
/**
* @public
* A callback function, invoked when events occur with the map.
* The first parameter gives the type of event, the second provides details about the event.
* _(This is the ``callback`` function from ``MapManager.loadMap()``)_.
*/
eventCallback: function() {
return (e, t, ...n) => {
if (e === "annotation") {
const o = {
feature: t,
userData: n,
eventType: e
};
this.annotationEventCallback(o, t);
} else if (e === "pan-zoom")
this.$emit("pan-zoom-callback", t);
else {
const o = t.label, i = [t.models], a2 = this.entry, r = this.biologicalSex, s = t.alert, l = this.getTaxons(t);
let u2 = [{
dataset: t.dataset,
biologicalSex: r,
taxonomy: a2,
resource: i,
label: o,
feature: t,
userData: n,
eventType: e,
provenanceTaxonomy: l,
alert: s
}];
if (e === "click") {
const c = !t[0];
if (!c) {
u2 = [];
const f2 = t.mapUUID, m2 = /* @__PURE__ */ new Set();
for (let [p, h3] of Object.entries(t))
if (p !== "mapUUID") {
const g2 = h3.featureId, y2 = h3.label, C2 = [h3.models], O2 = this.getTaxons(h3);
if (m2.has(g2)) continue;
m2.add(g2), u2.push({
dataset: h3.dataset,
biologicalSex: r,
taxonomy: a2,
resource: C2,
label: y2,
feature: h3,
userData: n,
eventType: e,
provenanceTaxonomy: O2,
alert: h3.alert,
mapUUID: f2
});
}
}
const d = c ? t : t[0];
if (this.setConnectivityDataSource(this.viewingMode, d), this.viewingMode !== "Neuron Connection") {
if (this.currentActive = d.models ? d.models : "", this.activeDrawTool && !this.isValidDrawnCreated) {
const f2 = d.featureId || this.existDrawnFeatures.find(
(m2) => m2.id === d.id
);
if (this.activeDrawTool === "LineString" && f2) {
const m2 = d.featureId ? d.featureId : d.id, p = d.label ? d.label : `Feature ${d.id}`;
this.connectionEntry[` ${m2}`] = Object.assign(
{ label: p },
Object.fromEntries(
Object.entries(d).filter(([h3]) => ["featureId", "models"].includes(h3)).map(([h3, g2]) => [h3 === "featureId" ? "id" : h3, g2])
)
);
}
}
}
t && t.type !== "marker" && !this.activeDrawTool && this.checkAndCreatePopups(u2);
} else e === "mouseenter" && this.viewingMode !== "Neuron Connection" && (this.currentHover = t.models ? t.models : "");
this.$emit("resource-selected", u2);
}
};
},
/**
* The data for connectivity data source is just a placeholder data
* to check which part of the map is clicked, e.g., path or feture or empty area,
* based on the viewing mode.
* The "connectivity-info-close" event will be emitted based on this data
* when there has a click event on map.
* @param viewingMode
* @param data
*/
setConnectivityDataSource: function(e, t) {
e === "Exploration" ? this.connectivityDataSource = t.models.startsWith("ilxtr:") ? t.models : "" : this.connectivityDataSource = t.featureId || t.id;
},
/**
* @public
* Function triggered by viewing mode change.
* (e.g., from 'Exploration' to 'Annotation')
* All tooltips and popups currently showing on map will be closed
* @arg {String} `modeName`
*/
changeViewingMode: function(e) {
e && (this.viewingMode = e), this.manualAbortedOnClose();
},
/**
* @public
* Function to remove active tooltips on map.
*/
removeActiveTooltips: function() {
this.mapImp && this.mapImp.removePopup(), this.$el.querySelectorAll(".flatmap-tooltip-popup").forEach((t) => t.remove());
},
/**
* Function to create tooltip for the provided connectivity data.
* @arg {Array} `connectivityData`
*/
createTooltipForConnectivity: function(e, t) {
const n = document.createElement("div");
n.classList.add("flatmap-feature-label"), e.forEach((o, i) => {
const { label: a2 } = o;
if (n.append(co(a2)), i + 1 < e.length) {
const r = document.createElement("hr");
n.appendChild(r);
}
}), this.mapImp.showPopup(
t,
n,
{
className: "custom-popup flatmap-tooltip-popup",
positionAtLastClick: false,
preserveSelection: true
}
);
},
/**
* Function to show connectivity tooltips on the map
* and highlight the nerve.
* @arg {Object} `payload`
*/
showConnectivityTooltips: function(e) {
const { connectivityInfo: t, data: n } = e, o = [], i = [], a2 = [], r = [];
if (t && t.featureId && o.push(...t.featureId), this.mapImp) {
if (n.forEach((f2) => {
const m2 = this.mapImp.search(f2.id);
if (m2 != null && m2.results.length) {
const p = m2 == null ? void 0 : m2.results[0].featureId;
a2.push({ featureId: p, ...f2 });
} else
r.push(f2);
}), a2.length) {
let f2 = a2[0].featureId;
this.mapImp.annotations.forEach((m2) => {
const p = m2["anatomical-nodes"];
if (p) {
const h3 = p.join("");
a2.every(
(y2) => h3.indexOf(y2.id) !== -1
) && (f2 = m2.featureId, i.push(f2));
}
}), this.createTooltipForConnectivity(a2, f2);
} else
this.removeActiveTooltips();
this.emitConnectivityError(r);
const s = o.reduce((f2, m2) => {
const p = this.mapImp.pathways.paths[m2], h3 = p ? p.connectivity : null;
if (h3) {
const g2 = h3.flat(1 / 0);
f2.push(...g2);
}
return f2;
}, []), l = [...new Set(s)], u2 = [...o, ...l], d = [
...this.mapImp.modelFeatureIdList(u2),
...i
];
this.mapImp.selectGeoJSONFeatures(d);
}
},
showConnectivitiesByReference: function(e) {
this.searchConnectivitiesByReference(e).then((t) => {
this.mapImp.selectFeatures(t);
});
},
searchConnectivitiesByReference: async function(e) {
const t = sessionStorage.getItem("flatmap-knowledge");
let n = [];
return t ? n = await wb(e) : n = await Sb(this.mapImp, e, this.flatmapQueries), n;
},
getFlatmapKnowledge: function() {
let e = [];
const t = sessionStorage.getItem("flatmap-knowledge");
return t && (e = JSON.parse(t)), e;
},
emitConnectivityError: function(e) {
this.$emit("connectivity-error", {
data: {
errorData: e,
errorMessage: Pb
}
});
},
checkConnectivityTooltipEntry: function(e) {
return e != null && e.length ? e.find((t) => {
var n, o;
return ((n = t == null ? void 0 : t.destinations) == null ? void 0 : n.length) || ((o = t == null ? void 0 : t.components) == null ? void 0 : o.length);
}) !== void 0 : false;
},
changeConnectivitySource: async function(e) {
const { entry: t, connectivitySource: n } = e;
t.mapId === this.mapImp.id && (await this.flatmapQueries.queryForConnectivityNew(this.mapImp, t.featureId[0], n), this.tooltipEntry = this.tooltipEntry.map((o) => o.featureId[0] === t.featureId[0] ? this.flatmapQueries.updateTooltipData(o) : o), this.checkConnectivityTooltipEntry(this.tooltipEntry) && this.$emit("connectivity-info-open", this.tooltipEntry));
},
/**
* @public
* Function to create/display tooltips from the provided ``data``.
* _checkNeuronClicked shows a neuron path pop up if a path was recently clicked._
* @arg {Object} `data`
*/
checkAndCreatePopups: async function(e, t = true) {
var n;
if (this.viewingMode === "Annotation") {
const o = e.filter((i) => i.feature).map((i) => i.feature);
if (o.length > 0)
if (this.annotationSidebar && this.previousDeletedEvent.type === "deleted" && (this.annotationEntry = [{
...this.previousDeletedEvent,
resourceId: this.serverURL
}], this.annotationEventCallback({}, { type: "aborted" })), this.annotationEntry = [], o.forEach((i) => {
var a2;
this.annotationEntry.push({
...i,
resourceId: this.serverURL,
featureId: i.featureId ? i.featureId : (a2 = i.feature) == null ? void 0 : a2.id,
offline: this.offlineAnnotationEnabled
});
}), o[0].feature)
this.activeDrawTool || this.activeDrawMode || this.isValidDrawnCreated ? (this.featureAnnotationSubmitted = false, this.activeDrawTool && this.createConnectivityBody(), this.displayTooltip(
o[0].feature.id,
Lb(o[0].feature.geometry)
)) : this.rollbackAnnotationEvent();
else {
const i = this.annotationEntry.filter((a2) => a2.featureId && a2.models).map((a2) => a2.models);
i.length > 0 && this.displayTooltip(i);
}
else
this.annotation = {};
} else if (this.viewingMode === "Neuron Connection" && t) {
const o = e.map((a2) => a2.resource[0]);
if (o.find((a2) => !a2.startsWith("ilxtr:"))) {
const a2 = Array.isArray(o) ? [...o] : [o];
a2.length === 1 && a2.push([]);
const r = (n = e[0].feature) == null ? void 0 : n.featureId, s = this.mapImp.annotations.get(r), l = s == null ? void 0 : s["anatomical-nodes"], u2 = s == null ? void 0 : s.models;
let c, d = a2;
const f2 = s == null ? void 0 : s.models;
l != null && l.length && (c = l.find(
(k2) => JSON.parse(k2)[0] === u2
)), c ? d = JSON.parse(c) : f2 && (d = [f2, []]);
const m2 = this.mapImp.knowledgeSource, p = d.flat(1 / 0), h3 = [...new Set(p)], y2 = (await _7(this.flatmapAPI, h3)).reduce((k2, A2) => {
const $2 = A2[0], N2 = JSON.parse(A2[1]);
return k2.push({ id: $2, label: N2.label, source: N2.source }), k2;
}, []);
y2.sort((k2, A2) => k2.id === A2.id ? k2.source === m2 && A2.source !== m2 ? -1 : k2.source !== m2 && A2.source === m2 ? 1 : 0 : k2.id.localeCompare(A2.id));
const C2 = [];
for (let k2 = 0; k2 < h3.length; k2++) {
const A2 = y2.find(($2) => $2.id === h3[k2]);
A2 && C2.push(A2.label);
}
const O2 = co(C2.join(", ")), T2 = {
facet: JSON.stringify(d),
facetPropPath: `flatmap.connectivity.source.${this.connectionType.toLowerCase()}`,
tagLabel: O2,
// used tagLabel here instead of label since the label and value are different
term: this.connectionType
};
this.connectivityFilters.some((k2) => k2.facet === T2.facet && k2.facetPropPath === T2.facetPropPath) || this.connectivityFilters.push(T2), this.$emit("neuron-connection-feature-click", {
filters: this.connectivityFilters,
search: ""
});
} else {
const a2 = o.join();
this.connectionType.toLowerCase() === "all" && this.$emit("neuron-connection-feature-click", {
filters: [],
search: a2
});
}
} else {
Eb(this.mapImp, this.flatmapQueries);
let o = [];
if (this.tooltipEntry = e.filter((i) => i.resource[0] in this.mapImp.pathways.paths).map((i) => ({ title: i.label, featureId: i.resource, ready: false })), this.tooltipEntry.length) {
this.$emit("connectivity-info-open", this.tooltipEntry);
for (let a2 = 0; a2 < e.length; a2++)
o.push(await this.getKnowledgeTooltip(e[a2]));
this.tooltipEntry = await Promise.all(o);
const i = this.tooltipEntry.map((a2) => a2.featureId[0]);
i.length > 0 && this.displayTooltip(i);
}
}
},
/**
* Updates the connectivity filters in flatmap when there are changes in the sidebar.
* @public
* @param {Array} payload - The array of filter items to update.
*/
updateConnectivityFilters: function(e) {
e.length && (this.connectivityFilters = e.filter((t) => t.facet.toLowerCase() !== "show all"));
},
resetConnectivityfilters: function(e) {
e.length ? this.connectivityFilters = this.connectivityFilters.filter(
(t) => e.some((n) => n.facetPropPath === t.facetPropPath && n.facet !== t.facet)
) : this.connectivityFilters = [];
},
getKnowledgeTooltip: async function(e) {
const t = await this.flatmapQueries.retrieveFlatmapKnowledgeForEvent(this.mapImp, e);
let n = await this.flatmapQueries.createTooltipData(this.mapImp, e);
return (t && t[0] || e.feature.hyperlinks && e.feature.hyperlinks.length > 0) && (n.featuresAlert = e.alert, n.knowledgeSource = na(this.mapImp), n.mapId = this.mapImp.mapMetadata.id, n.mapuuid = this.mapImp.mapMetadata.uuid), n.ready = true, n;
},
/**
* A hack to remove flatmap tooltips while popup is open
*/
popUpCssHacks: function() {
const e = document.querySelector(".flatmap-tooltip-popup"), t = document.querySelector(".maplibregl-popup-close-button");
e && (e.style.display = "none"), t.style.display = "block", this.$refs.tooltip.$el.style.display = "flex", t.onclick = () => {
this.$emit("connectivity-info-close"), e && (e.style.display = "block");
};
},
/**
* @public
* Function to close tooltip.
*/
closeTooltip: function() {
this.$refs.tooltip && (this.$refs.tooltip.$el.style.display = "none"), document.querySelectorAll(".maplibregl-popup").forEach((e) => {
e.style.display = "none";
});
},
/**
* @public
* Function to show popup on map.
* @arg {String} `featureId`,
* @arg {Object} `node`,
* @arg {Object} `options`
*/
showPopup: function(e, t, n) {
let o = n;
this.mapImp && (o ? o.className || (o.className = "custom-popup") : o = { className: "custom-popup", positionAtLastClick: true }, this.mapImp.showPopup(e, t, o));
},
/**
* @public
* Function to show marker popup.
* @arg {String} `featureId`,
* @arg {Object} `node`,
* @arg {Object} `options`
*/
showMarkerPopup: function(e, t, n) {
this.mapImp && this.mapImp.showMarkerPopup(e, t, n);
},
/**
* @public
* Function to close minimap.
*/
closeMinimap: function() {
let e = this.$refs.flatmapContainer.querySelector(
".maplibregl-ctrl-minimap"
);
this.minimapSmall ? (e.classList.add("enlarge"), e.classList.remove("shrink")) : (e.classList.add("shrink"), e.classList.remove("enlarge")), this.minimapSmall = !this.minimapSmall;
},
/**
* Function to add resize button to minimap.
*/
addResizeButtonToMinimap: function() {
let e = this.$refs.flatmapContainer.querySelector(
".maplibregl-ctrl-minimap"
);
e && (this.$refs.minimapResize && this.$refs.minimapResize.$el.parentNode && this.$refs.minimapResize.$el.parentNode.removeChild(
this.$refs.minimapResize.$el
), e.appendChild(this.$refs.minimapResize.$el), this.minimapResizeShow = true);
},
/**
* @public
* Function to set help mode
* by providing flag ``helpMode`` (true/false).
* @arg {Boolean} `helpMode`
*/
setHelpMode: function(e) {
const t = this.hoverVisibilities.length, n = t - 1, o = this.hoverVisibilities[this.helpModeActiveIndex];
if (o) {
const i = o == null ? void 0 : o.refs, a2 = o == null ? void 0 : o.ref, r = this.$refs[i || a2];
if (r) {
const { parentElement: s, nextElementSibling: l } = r.$el, u2 = (c) => c && (c.classList.contains("pathway-container") || c.classList.contains("pathway-location"));
(u2(s) || u2(l)) && (this.requiresDrawer ? this.drawerOpen = true : this.helpModeActiveIndex += 1);
} else
this.helpModeActiveIndex += 1;
}
e || (this.helpModeActiveIndex = this.helpModeInitialIndex), this.viewingMode !== "Annotation" && this.helpModeActiveIndex > 9 && (this.helpModeActiveIndex = n), e && this.helpModeActiveIndex >= n && this.$emit("help-mode-last-item", true), e && !this.helpModeDialog ? (this.inHelp = true, this.hoverVisibilities.forEach((i) => {
i.value = true;
})) : e && this.helpModeDialog && t > this.helpModeActiveIndex ? this.helpModeActiveIndex > -1 ? (this.closeFlatmapHelpPopup(), setTimeout(() => {
this.inHelp = false, this.hoverVisibilities.forEach((i) => {
i.value = false;
}), this.showTooltip(this.helpModeActiveIndex, 200);
}, 300)) : this.helpModeActiveIndex === -1 && this.openFlatmapHelpPopup() : (this.inHelp = false, this.hoverVisibilities.forEach((i) => {
i.value = false;
}), this.closeFlatmapHelpPopup());
},
/**
* @public
* Function to show tooltip
* by providing ``tooltipNumber``.
* @arg {Number} `tooltipNumber`
* @arg {Number} `timeout` _(default: `500`)_
*/
showTooltip: function(e, t = 500) {
this.inHelp || (clearTimeout(this.tooltipWait[e]), this.tooltipWait[e] = setTimeout(() => {
this.hoverVisibilities[e].value = true, this.$emit("shown-tooltip");
}, t));
},
/**
* @public
* Function to hide tooltip
* by providing ``tooltipNumber``.
* @arg {Number} `tooltipNumber`
* @arg {Number} `timeout` _(default: `500`)_
*/
hideTooltip: function(e, t = 500) {
this.inHelp || (clearTimeout(this.tooltipWait[e]), this.tooltipWait[e] = setTimeout(() => {
this.hoverVisibilities[e].value = false;
}, t));
},
/**
* @public
* Function to display tooltip
* by providing featureId (``feature``).
* @arg {String} `feature`
* @arg {String} `geometry` _(default: `undefined`)_
*/
displayTooltip: function(e, t = void 0) {
let n, o = { className: "flatmapvuer-popover" };
if (t)
n = e, o.annotationFeatureGeometry = t, this.annotationEntry.length && (o.annotationEvent = {
type: this.annotationEntry[0].type,
feature: this.annotationEntry[0].feature
});
else {
const i = Array.isArray(e) ? e[0] : e;
i && (n = this.mapImp.modelFeatureIds(i)[0]), this.activeDrawTool || (o.positionAtLastClick = true);
}
this.connectivityInfoSidebar && this.tooltipEntry.length && this.viewingMode !== "Annotation" && this.checkConnectivityTooltipEntry(this.tooltipEntry) && this.$emit("connectivity-info-open", this.tooltipEntry), this.annotationSidebar && this.viewingMode === "Annotation" && this.$emit("annotation-open", { annotationEntry: this.annotationEntry, commitCallback: this.commitAnnotationEvent }), n && !this.disableUI && (this.viewingMode === "Annotation" && !this.annotationSidebar || this.viewingMode === "Exploration" && !this.connectivityInfoSidebar) && (this.tooltipDisplay = true, this.$nextTick(() => {
this.mapImp.showPopup(n, this.$refs.tooltip.$el, o), this.popUpCssHacks();
}));
},
/**
* Move the map to the left side
* to the visible area of the feature IDs
* because the sidebar is opened
* @arg featureIds
*/
moveMap: function(e, t = {}) {
if (this.mapImp) {
const { offsetX: n = 0, offsetY: o = 0, zoom: i = 4 } = t, a2 = this.mapImp.map, r = this.mapImp.bounds.toArray();
this.mapImp.zoomToFeatures(e, { noZoomIn: true }), this.showPathwaysDrawer(false), r != null && r.length && setTimeout(() => {
a2.fitBounds(r, {
offset: [n, o],
zoom: i,
animate: true
});
});
}
},
/**
* @public
* Function to open Flatmap Help Popup.
*/
openFlatmapHelpPopup: function() {
if (this.mapImp) {
let e = this.mapImp.modelFeatureIds("UBERON:0000948");
e && e.length > 0 && (this.mapImp.showPopup(e[0], "Click for more information", {
anchor: "top",
className: "flatmap-popup-popper"
}), this.$emit("shown-map-tooltip"));
}
},
/**
* @public
* Function to close Flatmap Help Popup.
*/
closeFlatmapHelpPopup: function() {
this.$el.querySelectorAll(".maplibregl-popup-close-button").forEach((e) => {
e.click();
});
},
/**
* @public
* Function to get annotation labels.
*/
getLabels: function() {
let e = [];
if (this.mapImp) {
let t = this.mapImp.annotations;
for (let n of t.values())
n.label && e.push(n.label);
return Array.from(new Set(e));
}
},
/**
* Function to get and store the state (object) of the map in
* the provided argument
*/
getVisibilityState: function(e) {
if (["alertSelection", "pathwaysSelection", "taxonSelection"].forEach((n) => {
let o = this.$refs[n];
o && (e[n] = o.getState());
}), this.$refs.treeControls) {
const n = this.$refs.treeControls.$refs.regionTree.getCheckedKeys();
e.systemsSelection = n.filter((o) => !o.includes("."));
}
},
/**
* Function to set and restore the visibility state (object) of
* the map with the provided argument
*/
setVisibilityState: function(e) {
["alertSelection", "pathwaysSelection", "taxonSelection"].forEach((n) => {
const o = e[n];
if (o) {
const i = this.$refs[n];
i && i.setState(o);
}
}), "systemsSelection" in e && this.$refs.treeControls && (this.$refs.treeControls.$refs.regionTree.setCheckedKeys(e.systemsSelection), this.systems[0].children.forEach((n) => {
this.mapImp.enableSystem(n.key, e.systemsSelection.includes(n.key));
}));
},
/**
* @public
* Function to get the state (object) of the map.
*/
getState: function() {
if (this.mapImp) {
let e = {
entry: this.entry,
viewport: this.mapImp.getState()
};
const t = this.mapImp.getIdentifier();
return this.biologicalSex ? e.biologicalSex = this.biologicalSex : t && t.biologicalSex && (e.biologicalSex = t.biologicalSex), t && t.uuid && (e.uuid = t.uuid), e.viewingMode = this.viewingMode, e.searchTerm = this.searchTerm, e.flightPath3D = this.flightPath3DRadio, e.colour = this.colourRadio, e.outlines = this.outlinesRadio, e.background = this.currentBackground, this.offlineAnnotationEnabled && (e.offlineAnnotations = sessionStorage.getItem("anonymous-annotation")), this.getVisibilityState(e), e;
}
},
/**
* @public
* Function to set state (object) for the map.
* @arg {Object} `state`
*/
setState: function(e) {
e && (this.mapImp && e.entry && this.entry == e.entry && (!e.biologicalSex || e.biologicalSex === this.biologicalSex) ? this.restoreMapState(e) : this.createFlatmap(e), this.setStateRequired = false);
},
/**
* @public
* Function to restore map's state
* from the ``state`` provided.
* @arg {Object} `state`
*/
restoreMapState: function(e) {
if (e) {
if (e.viewport && this.mapImp.setState(e.viewport), e.offlineAnnotations && sessionStorage.setItem("anonymous-annotation", e.offlineAnnotations), e.viewingMode && this.changeViewingMode(e.viewingMode), "flightPath3D" in e && this.setFlightPath3D(e.flightPath3D), "colour" in e && this.setColour(e.colour), "outlines" in e && this.setOutlines(e.outlines), e.background && this.backgroundChangeCallback(e.background), e.searchTerm) {
const t = e.searchTerm;
this.searchAndShowResult(t, true, true);
}
this.setVisibilityState(e);
}
},
/**
* @public
* Function to show flight path option
* (3D option)
* based on the map version (currently 1.6 and above).
* @arg {String} `mapVersion`
*/
setFlightPathInfo: function(e) {
(e === 1.6 || e > 1.6) && (this.displayFlightPathOption = true, this.setFlightPath3D(false));
},
/**
* @public
* Function to create Flatmap
* by providing the ``state``.
* @arg {Object} `state`
*/
createFlatmap: function(e) {
if (!this.mapImp && !this.loading) {
this.loading = true, this.flatmapError = null;
let t = false;
this.displayMinimap && (t = { position: "top-right" });
let n = { taxon: this.entry };
this.uuid && (n.uuid = this.uuid), e ? (e.uuid ? n = { uuid: e.uuid } : e.entry && (n.taxon = e.entry), e.biologicalSex ? n.biologicalSex = e.biologicalSex : n.taxon === "NCBITaxon:9606" && (n.biologicalSex = "PATO:0000384")) : this.biologicalSex && (n.biologicalSex = this.biologicalSex), this.mapManagerRef.loadMap(
n,
this.eventCallback(),
{
//fullscreenControl: false,
//annotatable: false,
//debug: true,
minZoom: this.minZoom,
tooltips: this.tooltips,
minimap: t,
container: this.$refs.display
// tooltipDelay: 15, // new feature to delay tooltips showing
}
).then((i) => {
this.mapImp = i, this.serverURL = this.mapImp.makeServerUrl("").slice(0, -1);
let a2 = this.mapImp.details.version;
this.setFlightPathInfo(a2);
const r = this._stateToBeSet ? this._stateToBeSet : e;
this.onFlatmapReady(r), this.$nextTick(() => this.restoreMapState(r));
}).catch((i) => {
var a2, r;
if (console.error("Flatmap loading error:", i), this.flatmapError = {}, i.message && i.message.indexOf("Unknown map") !== -1 ? (this.flatmapError.title = "Unknown Map!", this.flatmapError.messages = Object.keys(n).map((s) => `${s === "uuid" ? "UUID" : co(s)}: ${n[s]}`)) : (this.flatmapError.title = "Error Loading Map!", this.flatmapError.messages = [
i.message ? i.message : i.toString(),
"Please try again later or contact support if the problem persists."
]), (r = (a2 = this.$parent) == null ? void 0 : a2.$refs) != null && r.multiContainer) {
const s = this.$parent;
this.flatmapError.button = {
text: "Load Default Map",
callback: () => {
const l = s.initial;
s.setSpecies(l, void 0, 3);
}
};
}
this.loading = false;
});
} else e && (this._stateToBeSet = {
...e
}, this.mapImp && !this.loading && this.restoreMapState(this._stateToBeSet));
},
/**
* @public
* Function to compute path controls maximum height.
*/
computePathControlsMaximumHeight() {
const e = this.$refs.display;
if (e) {
const t = getComputedStyle(e), n = parseInt(t.paddingTop) + parseInt(t.paddingBottom), o = e.clientHeight - n;
this.pathwaysMaxHeight = o - 170;
}
},
/**
* @public
* Function to resize the map.
*/
mapResize: function() {
try {
this.computePathControlsMaximumHeight(), this.mapImp && (this.mapImp.resize(), this.showMinimap(this.displayMinimap));
} catch {
console.error("Map resize error");
}
},
getFilterSources: function() {
const e = ["kind", "taxons"];
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
for (const a2 of this.mapImp.annotations.values())
if (a2.source) {
"alert" in a2 ? t.add(a2.source) : n.add(a2.source);
for (const [r, s] of Object.entries(a2))
if (e.includes(r)) {
o.has(r) || o.set(r, /* @__PURE__ */ new Map());
const l = o.get(r), u2 = (c) => {
const d = c;
l.has(d) || l.set(d, /* @__PURE__ */ new Set()), l.get(d).add(`${a2.source}`);
};
Array.isArray(s) ? s.forEach(u2) : u2(s);
}
}
let i = {
alert: {
with: [...t],
without: [...n]
}
};
for (const [a2, r] of o.entries()) {
i[a2] = {};
for (const [s, l] of r.entries())
i[a2][s] = [...l.values()];
}
return i;
},
getFilterOptions: async function(e, t) {
const n = t || this.getFlatmapKnowledge(), o = this.pathways;
return await J7(this.flatmapAPI, e, n, o);
},
/**
* @public
* This function is used for functions that need to run immediately after the flatmap is loaded.
*/
onFlatmapReady: function(e) {
var t;
this.sensor = markRaw(new Ob(this.$refs.display, this.mapResize)), ((t = this.mapImp.options) == null ? void 0 : t.style) === "functional" && (this.isFC = true), this.mapImp.setBackgroundOpacity(1), this.backgroundChangeCallback(this.currentBackground), this.pathways = this.mapImp.pathTypes(), this.pathways = this.pathways.filter((n) => n.enabled && n.type !== "other"), this.processSystems(this.mapImp.getSystems()), this.processTaxon(this.mapImp.taxonIdentifiers, e ? e.taxonSelection : void 0), this.containsAlert = "alert" in this.mapImp.featureFilterRanges(), this.flatmapLegends = this.mapImp.flatmapLegend, this.addResizeButtonToMinimap(), this.loading = false, this.computePathControlsMaximumHeight(), this.mapResize(), this.handleMapClick(), this.setInitMapState(), this.$emit("ready", this);
},
/**
* @public
* Function to handle mouse click on map area
* after the map is loaded.
*/
handleMapClick: function() {
const e = this.mapImp.map;
e && e.on("click", (t) => {
this.connectivityDataSource || this.$emit("connectivity-info-close"), this.connectivityDataSource = "";
});
},
/**
* @public
* Function to show or hide the minimap
* by providing ``flag`` (boolean) value.
* @arg {Boolean} `flag`
*/
showMinimap: function(e) {
this.mapImp && this.mapImp.showMinimap(e);
},
/**
* @public
* Function to show or hide the pathways drawer
* by providing ``flag`` (boolean) value.
* @arg {Boolean} `flag`
*/
showPathwaysDrawer: function(e) {
this.drawerOpen = e;
},
/**
* @public
* Function to display features with annotation matching the provided term,
* with the option to display the label/connectivity information using displayInfo flag.
* @arg {String} `term`,
* @arg {String} `displayInfo`
* @arg {String} `mapclick` Similate the event as it is triggered by an user click
*/
searchAndShowResult: function(e, t, n = true) {
var o;
if (this.mapImp) {
if (e === void 0 || e === "")
return this.mapImp.clearSearchResults(), this.viewingMode === "Exploration" ? this.$emit("connectivity-info-close") : this.viewingMode === "Annotation" && this.manualAbortedOnClose(), this.searchTerm = "", true;
{
const i = this.mapImp.search(e);
if ((o = i == null ? void 0 : i.results) != null && o.length) {
if (this.mapImp.showSearchResults(i), t) {
let a2;
for (let r = 0; r < i.results.length; r++) {
a2 = i.results[r].featureId;
const s = this.mapImp.annotation(a2);
if (a2 && (s != null && s.label)) break;
}
if (a2) {
const r = this.mapImp.featureProperties(a2), s = {
resource: [r.models],
feature: r,
label: r.label,
provenanceTaxonomy: r.taxons,
alert: r.alert
};
this.checkAndCreatePopups([s], n), this.mapImp.showPopup(a2, co(r.label), {
className: "custom-popup",
positionAtLastClick: false,
preserveSelection: true
});
}
}
return this.searchTerm = e, true;
} else this.mapImp.clearSearchResults();
}
}
return false;
},
/**
* @public
* Public method to highlight connected paths for neuron connection mode,
* to highlight paths for other display maps on spit screen.
* @arg {Array} `paths`
*/
highlightConnectedPaths: function(e) {
if (e.length) {
const t = e.filter((o) => o in this.mapImp.pathways.paths), n = this.mapImp.modelFeatureIdList(t);
this.mapImp.selectGeoJSONFeatures(n);
}
},
/**
* @public
* Function to show search suggestions
* from the ``term`` provided.
* @arg {String} `term`
*/
searchSuggestions: function(e) {
return this.mapImp ? this.mapImp.search(e) : [];
},
onActionClick: function(e) {
Ii.emit("onActionClick", e);
},
setConnectionType: function(e) {
this.connectionType = e;
}
},
props: {
/**
* The taxon identifier of the species represented by the map.
*/
entry: {
type: String,
required: true
},
/**
* The unique ``uuid`` of the flatmap.
* If given then this exact map will be loaded,
* overriding ``taxon`` and ``biologicalSex``.
*/
uuid: String,
/**
* The biological sex of the species represented by the map.
* This is specified as metadata in the map's source file.
*/
biologicalSex: {
type: String,
default: ""
},
/**
* The minimum zoom level of the map.
*/
minZoom: {
type: Number,
default: 1
},
/**
* The option to add another feature label _(`FeatureSmallSymbolLayer`)_
* when this `tooltips` is set to `false`.
*/
tooltips: {
type: Boolean,
default: true
},
/**
* The option to show tooltips for help mode.
*/
helpMode: {
type: Boolean,
default: false
},
/**
* The active item index of help mode.
*/
helpModeActiveItem: {
type: Number,
default: 0
},
/**
* The option to use helpModeDialog.
* On default, `false`, clicking help will show all tooltips.
* If `true`, clicking help will show the help-mode-dialog.
*/
helpModeDialog: {
type: Boolean,
default: false
},
/**
* The last item of help mode.
*/
helpModeLastItem: {
type: Boolean,
default: false
},
/**
* The initial index number for help mode tooltips.
* Set negative (e.g. -2) if there are other tooltips outside of `hoverVisibilities`.
*/
helpModeInitialIndex: {
type: Number,
default: 0
},
/**
* The option to create map on component mounted.
*/
renderAtMounted: {
type: Boolean,
default: true
},
/**
* The option to display minimap at the top-right corner of the map.
*/
displayMinimap: {
type: Boolean,
default: false
},
/**
* The option to show warning. Example for legacy or beta maps.
*/
displayWarning: {
type: Boolean,
default: false
},
/**
* Flag to determine rather open map UI should be
* presented or not.
*/
enableOpenMapUI: {
type: Boolean,
default: false
},
/**
* The data to show different map options.
* Available at the bottom-left corner ("Open new map" tooltip).
*/
openMapOptions: {
type: Array,
default: function() {
return [
{
display: "Open AC Map",
key: "AC"
},
{
display: "Open FC Map",
key: "FC"
},
{
display: "Open 3D Human Map",
key: "3D"
}
];
}
},
/**
* The option to show star in legend area.
*/
showStarInLegend: {
type: Boolean,
default: false
},
/**
* Flag to determine whether this is legacy map or not.
* ``displayWarning`` should be shown for legacy map.
*/
isLegacy: {
type: Boolean,
default: false
},
/**
* The option to show the latest changes.
*/
displayLatestChanges: {
type: Boolean,
default: false
},
/**
* State containing state of the flatmap.
*/
state: {
type: Object,
default: void 0
},
/**
* Flatmap's Map Manager to use as single Map Manager
* if the FlatmapVuer is loaded from MultiFlatmapVuer.
*/
mapManager: {
type: Object,
default: void 0
},
/**
* Specify the endpoint of the flatmap server.
*/
flatmapAPI: {
type: String,
default: "https://mapcore-demo.org/current/flatmap/v3/"
},
/**
* Specify the endpoint of the SPARC API.
*/
sparcAPI: {
type: String,
default: "https://api.sparc.science/"
},
/**
* Flag to disable UIs on Map
*/
disableUI: {
type: Boolean,
default: false
},
/**
* The option to show connectivity information in sidebar
*/
connectivityInfoSidebar: {
type: Boolean,
default: false
},
/**
* The option to show annotation in sidebar
*/
annotationSidebar: {
type: Boolean,
default: false
},
/**
* The option to show local settings UI
* (background colour, flight path, viewing mode, etc.)
*/
showLocalSettings: {
type: Boolean,
default: true
},
/**
* The option to show open new map button
*/
showOpenMapButton: {
type: Boolean,
default: true
},
/**
* The option to show pathway drawer
*/
showPathwayFilter: {
type: Boolean,
default: true
},
/**
* Allow to add and display extra legends to drawer
*/
externalLegends: {
type: Array,
default: function() {
return [];
}
}
},
provide() {
return {
flatmapAPI: this.flatmapAPI,
sparcAPI: this.sparcAPI,
userApiKey: this.userToken
};
},
data: function() {
return {
flatmapError: null,
sensor: null,
mapManagerRef: void 0,
flatmapQueries: void 0,
annotationEntry: [],
//tooltip display has to be set to false until it is rendered
//for the first time, otherwise it may display an arrow at a
//undesired location.
tooltipDisplay: false,
serverURL: void 0,
layers: [],
pathways: [],
initMapState: markRaw({}),
sckanDisplay: [
{
label: "Display Path with SCKAN",
key: "VALID"
}
],
systems: [],
taxonConnectivity: [],
pathwaysMaxHeight: 1e3,
tooltipWait: markRaw([]),
hoverVisibilities: [
{ value: false, ref: "markerPopover" },
// 0
{ value: false, ref: "zoomInPopover" },
// 1
{ value: false, ref: "zoomOutPopover" },
// 2
{ value: false, ref: "zoomFitPopover" },
// 3
{ value: false, ref: "openMapPopover" },
// 4
{ value: false, ref: "settingsPopover" },
// 5
{ value: false, ref: "checkBoxPopover" },
// 6
{ value: false, ref: "warningPopover" },
// 7
{ value: false, ref: "whatsNewPopover" },
// 8
{ value: false, ref: "featuredMarkerPopover" },
// 9
{ value: false, refs: "toolbarPopover", ref: "editPopover" },
// 10
{ value: false, refs: "toolbarPopover", ref: "deletePopover" },
// 11
{ value: false, refs: "toolbarPopover", ref: "pointPopover" },
// 12
{ value: false, refs: "toolbarPopover", ref: "lineStringPopover" },
// 13
{ value: false, refs: "toolbarPopover", ref: "polygonPopover" },
// 14
{ value: false, refs: "toolbarPopover", ref: "connectionPopover" }
// 15
],
helpModeActiveIndex: this.helpModeInitialIndex,
yellowstar: Tb,
isFC: false,
inHelp: false,
currentBackground: "white",
availableBackground: ["white", "lightskyblue", "black"],
loading: false,
flatmapMarker: yb,
tooltipEntry: [],
connectivityDataSource: "",
connectivityTooltipVisible: false,
drawerOpen: false,
flightPath3DRadio: false,
displayFlightPathOption: false,
colourRadio: true,
outlinesRadio: true,
minimapResizeShow: false,
minimapSmall: false,
currentActive: "",
selectedDrawnFeature: void 0,
// Clicked drawn annotation
currentHover: "",
viewingMode: "Exploration",
viewingModes: {
Exploration: "Find relevant research and view detail of neural pathways by selecting a pathway to view its connections and data sources",
"Neuron Connection": "Discover Neuron connections by selecting a neuron and viewing its associated network connections",
Annotation: ["View feature annotations", "Add, comment on and view feature annotations"]
},
connectionType: "All",
offlineAnnotationEnabled: false,
offlineAnnotations: [],
annotationFrom: "Anyone",
annotatedSource: ["Anyone", "Me", "Others"],
openMapRef: void 0,
backgroundIconRef: void 0,
toolbarOptions: [
"Edit",
"Delete",
"Point",
"LineString",
"Polygon",
"Connection"
],
annotator: void 0,
authorisedUser: void 0,
activeDrawMode: void 0,
activeDrawTool: void 0,
featureAnnotationSubmitted: false,
drawnCreatedEvent: {},
previousEditEvent: {},
previousDeletedEvent: {},
connectionEntry: {},
existDrawnFeatures: [],
// Store all exist drawn features
doubleClickedFeature: false,
containsAlert: false,
alertOptions: [
{
label: "Display Path With Alerts",
key: "alert",
enabled: true
},
{
label: "Display Path Without Alerts",
key: "withoutAlert",
enabled: true
}
],
mapFilters: markRaw({
alert: {
with: true,
without: true
}
}),
searchTerm: "",
taxonLeaveDelay: void 0,
connectivityFilters: [],
flatmapLegends: []
};
},
computed: {
...mapState(Mb, ["userToken"]),
isValidDrawnCreated: function() {
return Object.keys(this.drawnCreatedEvent).length > 0;
},
requiresDrawer: function() {
var e, t, n, o;
return this.loading ? (this.drawerOpen = false, false) : ((e = this.systems) == null ? void 0 : e.length) > 0 || this.containsAlert && this.alertOptions || ((t = this.pathways) == null ? void 0 : t.length) > 0 || ((n = this.taxonConnectivity) == null ? void 0 : n.length) > 0 || ((o = this.legendEntry) == null ? void 0 : o.length) > 0 ? (this.drawerOpen = true, true) : (this.drawerOpen = false, false);
},
modeDescription: function() {
let e = this.viewingModes[this.viewingMode];
return this.viewingMode === "Annotation" ? this.authorisedUser ? e[1] : e[0] : e;
},
legendEntry: function() {
return [...this.flatmapLegends, ...this.externalLegends];
}
},
watch: {
entry: function() {
this.state || this.createFlatmap();
},
helpMode: function(e, t) {
e !== t && this.setHelpMode(e);
},
helpModeActiveItem: function() {
this.helpMode && (this.helpModeActiveIndex += 1, this.setHelpMode(this.helpMode));
},
state: {
handler: function(e, t) {
e !== t && (this.mapManagerRef ? this.setState(e) : this.setStateRequired = true);
},
immediate: true,
deep: true
},
viewingMode: function(e) {
this.clearAnnotationFeature(), e === "Annotation" && (this.loading = true, this.annotator.authenticate(this.userToken).then((t) => {
t.name && t.email && t.canUpdate ? (this.authorisedUser = t, this.offlineAnnotationEnabled = false) : (this.authorisedUser = void 0, this.offlineAnnotationEnabled = true), this.emitOfflineAnnotationUpdate(), this.setFeatureAnnotated(), this.addAnnotationFeature(), this.loading = false;
}));
},
disableUI: function(e) {
e && this.closeTooltip();
},
activeDrawTool: function(e) {
let t = [], n = { x: null, y: null };
const o = this.$el.querySelector(".maplibregl-canvas"), i = () => {
o.removeEventListener("keydown", a2), o.removeEventListener("click", r);
}, a2 = (s) => {
if (!["Escape", "Enter"].includes(s.key)) return;
const l = e === "Point" && t.length === 1 || e === "LineString" && t.length >= 2 || e === "Polygon" && t.length >= 3;
(s.key === "Escape" || s.key === "Enter" && !l) && (this.activeDrawTool = void 0), i();
}, r = (s) => {
const l = o.getBoundingClientRect(), u2 = s.clientX - l.left, c = s.clientY - l.top;
if (Math.sqrt((u2 - n.x) ** 2 + (c - n.y) ** 2) < 8) {
this.isValidDrawnCreated || (this.activeDrawTool = void 0), i();
return;
}
n = { x: u2, y: c }, t.push(n);
};
e && (i(), o.addEventListener("keydown", a2), o.addEventListener("click", r));
}
},
created: function() {
this.mapManager ? this.mapManagerRef = this.mapManager : (this.mapManagerRef = markRaw(new Br.MapViewer(this.flatmapAPI, { container: void 0 })), this.$emit("mapmanager-loaded", this.mapManagerRef));
},
mounted: function() {
this.openMapRef = shallowRef(this.$refs.openMapRef), this.backgroundIconRef = shallowRef(this.$refs.backgroundIconRef), this.tooltipWait.length = this.hoverVisibilities.length, this.flatmapQueries = markRaw(new bb()), this.flatmapQueries.initialise(this.flatmapAPI), this.state ? this.setStateRequired && this.setState(this.state) : this.renderAtMounted && this.createFlatmap(), vl();
}
};
var Fb = {
class: "flatmap-container",
ref: "flatmapContainer",
"element-loading-text": "Loading...",
"element-loading-background": "rgba(0, 0, 0, 0.3)"
};
var Rb = { style: { height: "100%", width: "100%", position: "relative", "overflow-y": "none" } };
var $b = {
style: { height: "100%", width: "100%" },
ref: "display",
class: "flatmap-display"
};
var Db = { class: "beta-popovers" };
var Nb = {
key: 2,
class: "warning-text"
};
var Bb = { class: "bottom-right-control" };
var Vb = ["innerHTML"];
var zb = { style: { "margin-bottom": "2px" } };
var Hb = {
key: 0,
class: "viewing-mode-title"
};
var jb = ["onClick"];
var Kb = ["onClick"];
function Ub(e, t, n, o, i, a2) {
const r = resolveComponent("map-svg-sprite-color"), s = ta, l = warning_filled_default, u2 = Ue, c = zo, d = arrow_down_default, f2 = resolveComponent("DrawToolbar"), m2 = resolveComponent("map-svg-icon"), p = ab, h3 = resolveComponent("tree-controls"), g2 = ml, y2 = arrow_left_default, C2 = Qi, O2 = Un, T2 = Wn, I2 = ea, k2 = Vo, A2 = sl, $2 = ll, N2 = resolveComponent("Tooltip"), K = hl, B2 = Ci;
return withDirectives((openBlock(), createElementBlock("div", Fb, [
createVNode(r),
createBaseVNode("div", Rb, [
createBaseVNode("div", $b, null, 512),
e.flatmapError ? (openBlock(), createBlock(s, {
key: 0,
flatmapError: e.flatmapError
}, null, 8, ["flatmapError"])) : createCommentVNode("", true),
withDirectives(createBaseVNode("div", Db, [
createBaseVNode("div", null, [
createVNode(c, {
placement: "right",
"popper-class": "warning-popper flatmap-popper",
teleported: false,
visible: e.hoverVisibilities[7].value,
ref: "warningPopover"
}, {
reference: withCtx(() => [
createBaseVNode("div", {
class: "warning-icon",
onMouseover: t[7] || (t[7] = (M2) => a2.showTooltip(7)),
onMouseout: t[8] || (t[8] = (M2) => a2.hideTooltip(7))
}, [
n.displayWarning || n.isLegacy ? (openBlock(), createBlock(u2, { key: 0 }, {
default: withCtx(() => [
createVNode(l)
]),
_: 1
})) : createCommentVNode("", true),
n.isLegacy ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
t[33] || (t[33] = createBaseVNode("span", { class: "warning-text" }, "Legacy Map", -1)),
createBaseVNode("div", {
class: "latest-map-text",
onClick: t[6] || (t[6] = (...M2) => a2.viewLatestMap && a2.viewLatestMap(...M2))
}, " Click here for the latest map ")
], 64)) : n.displayWarning ? (openBlock(), createElementBlock("span", Nb, "Beta")) : createCommentVNode("", true)
], 32)
]),
default: withCtx(() => [
n.isLegacy ? (openBlock(), createElementBlock("p", {
key: 0,
onMouseover: t[0] || (t[0] = (M2) => a2.showTooltip(7)),
onMouseout: t[1] || (t[1] = (M2) => a2.hideTooltip(7))
}, " This is a legacy map, you may view the latest map instead. ", 32)) : e.isFC ? (openBlock(), createElementBlock("p", {
key: 1,
onMouseover: t[2] || (t[2] = (M2) => a2.showTooltip(7)),
onMouseout: t[3] || (t[3] = (M2) => a2.hideTooltip(7))
}, t[31] || (t[31] = [
createTextVNode(" This map displays the connectivity of individual neurons. Specifically, those which align with (parts of) the neuron populations from the "),
createBaseVNode("a", {
href: "https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",
target: "_blank"
}, " ApiNATOMY ", -1),
createTextVNode(" models available in "),
createBaseVNode("a", {
href: "https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",
target: "_blank"
}, " SCKAN ", -1),
createTextVNode(". ")
]), 32)) : (openBlock(), createElementBlock("p", {
key: 2,
onMouseover: t[4] || (t[4] = (M2) => a2.showTooltip(7)),
onMouseout: t[5] || (t[5] = (M2) => a2.hideTooltip(7))
}, t[32] || (t[32] = [
createTextVNode(" This map displays the connectivity of neuron populations. Specifically, those from the primarily rat-based "),
createBaseVNode("a", {
href: "https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",
target: "_blank"
}, " ApiNATOMY ", -1),
createTextVNode(" models available in "),
createBaseVNode("a", {
href: "https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",
target: "_blank"
}, " SCKAN ", -1),
createTextVNode(". New connectivity and species specificity will be added as the SPARC program progresses. ")
]), 32))
]),
_: 1
}, 8, ["visible"])
]),
n.displayLatestChanges ? (openBlock(), createBlock(c, {
key: 0,
placement: "right",
teleported: false,
trigger: "manual",
"popper-class": "warning-popper flatmap-popper",
visible: e.hoverVisibilities[8].value,
ref: "whatsNewPopover"
}, {
reference: withCtx(() => [
n.displayLatestChanges ? (openBlock(), createElementBlock("div", {
key: 0,
class: "latest-changesicon",
onMouseover: t[9] || (t[9] = (M2) => a2.showTooltip(8)),
onMouseout: t[10] || (t[10] = (M2) => a2.hideTooltip(8))
}, [
createVNode(u2, null, {
default: withCtx(() => [
createVNode(l)
]),
_: 1
}),
t[34] || (t[34] = createBaseVNode("span", { class: "warning-text" }, "What's new?", -1))
], 32)) : createCommentVNode("", true)
]),
default: withCtx(() => t[35] || (t[35] = [
createBaseVNode("b", null, "Connectivity References", -1),
createBaseVNode("p", null, " Connectivity references have been improved and available in various formats. ", -1),
createBaseVNode("b", null, "Improved state storing", -1),
createBaseVNode("p", null, " Current selection and visibility filters are now stored when creating a permalink. ", -1)
])),
_: 1
}, 8, ["visible"])) : createCommentVNode("", true)
], 512), [
[vShow, !n.disableUI]
]),
withDirectives(createVNode(u2, {
class: normalizeClass(["minimap-resize", { enlarge: e.minimapSmall, shrink: !e.minimapSmall }]),
ref: "minimapResize",
onClick: a2.closeMinimap
}, {
default: withCtx(() => [
createVNode(d)
]),
_: 1
}, 8, ["class", "onClick"]), [
[vShow, e.minimapResizeShow]
]),
e.viewingMode === "Annotation" && (e.authorisedUser || e.offlineAnnotationEnabled) && !n.disableUI ? (openBlock(), createBlock(f2, {
key: 1,
mapCanvas: {
containerHTML: this.$el,
class: ".maplibregl-canvas"
},
toolbarOptions: e.toolbarOptions,
activeDrawTool: e.activeDrawTool,
activeDrawMode: e.activeDrawMode,
newlyDrawnEntry: e.drawnCreatedEvent,
connectionEntry: e.connectionEntry,
hoverVisibilities: e.hoverVisibilities,
onClickToolbar: a2.toolbarEvent,
onFeatureTooltip: a2.connectedFeatureTooltip,
onConfirmDrawn: a2.confirmDrawnFeature,
onCancelDrawn: a2.cancelDrawnFeature,
onShowTooltip: a2.showTooltip,
onHideTooltip: a2.hideTooltip,
ref: "toolbarPopover"
}, null, 8, ["mapCanvas", "toolbarOptions", "activeDrawTool", "activeDrawMode", "newlyDrawnEntry", "connectionEntry", "hoverVisibilities", "onClickToolbar", "onFeatureTooltip", "onConfirmDrawn", "onCancelDrawn", "onShowTooltip", "onHideTooltip"])) : createCommentVNode("", true),
withDirectives(createBaseVNode("div", Bb, [
createVNode(c, {
content: "Zoom in",
placement: "left",
teleported: false,
trigger: "manual",
width: "70",
"popper-class": "flatmap-popper",
visible: e.hoverVisibilities[1].value,
ref: "zoomInPopover"
}, {
reference: withCtx(() => [
createBaseVNode("div", {
class: "icon-button-container",
onClick: t[11] || (t[11] = (M2) => a2.zoomIn()),
onMouseover: t[12] || (t[12] = (M2) => a2.showTooltip(1)),
onMouseout: t[13] || (t[13] = (M2) => a2.hideTooltip(1))
}, [
createVNode(m2, {
class: "icon-button zoomIn",
icon: "zoomIn"
})
], 32)
]),
_: 1
}, 8, ["visible"]),
createVNode(c, {
content: "Zoom out",
placement: "top-end",
teleported: false,
trigger: "manual",
width: "70",
"popper-class": "flatmap-popper",
visible: e.hoverVisibilities[2].value,
ref: "zoomOutPopover"
}, {
reference: withCtx(() => [
createBaseVNode("div", {
class: "icon-button-container",
onClick: t[14] || (t[14] = (M2) => a2.zoomOut()),
onMouseover: t[15] || (t[15] = (M2) => a2.showTooltip(2)),
onMouseout: t[16] || (t[16] = (M2) => a2.hideTooltip(2))
}, [
createVNode(m2, {
class: "icon-button zoomOut",
icon: "zoomOut"
})
], 32)
]),
_: 1
}, 8, ["visible"]),
createVNode(c, {
content: "Reset",
placement: "top",
teleported: false,
trigger: "manual",
width: "70",
"popper-class": "flatmap-popper",
visible: e.hoverVisibilities[3].value,
ref: "zoomFitPopover"
}, {
reference: withCtx(() => [
createBaseVNode("div", {
class: "icon-button-container",
onClick: t[17] || (t[17] = (M2) => a2.resetView()),
onMouseover: t[18] || (t[18] = (M2) => a2.showTooltip(3)),
onMouseout: t[19] || (t[19] = (M2) => a2.hideTooltip(3))
}, [
createVNode(m2, {
class: "icon-button fitWindow",
icon: "fitWindow"
})
], 32)
]),
default: withCtx(() => [
t[36] || (t[36] = createBaseVNode("div", null, [
createTextVNode(" Fit to "),
createBaseVNode("br"),
createTextVNode(" window ")
], -1))
]),
_: 1
}, 8, ["visible"])
], 512), [
[vShow, !n.disableUI]
]),
createVNode(c, {
content: "Change pathway visibility",
placement: "right",
teleported: false,
trigger: "manual",
offset: -18,
"popper-class": "flatmap-popper",
visible: e.hoverVisibilities[6].value,
ref: "checkBoxPopover"
}, {
reference: withCtx(() => [
withDirectives(createBaseVNode("div", {
class: normalizeClass(["pathway-location", { open: e.drawerOpen, close: !e.drawerOpen }])
}, [
withDirectives((openBlock(), createElementBlock("div", {
class: normalizeClass(["pathway-container", { open: e.drawerOpen, close: !e.drawerOpen }]),
style: normalizeStyle({ "max-height": e.pathwaysMaxHeight + "px" })
}, [
createVNode(c, {
content: "Location of the featured dataset",
placement: "bottom",
teleported: true,
trigger: "manual",
width: "max-content",
offset: -10,
"popper-class": "flatmap-popper flatmap-teleport-popper",
visible: e.hoverVisibilities[9].value && n.showStarInLegend,
ref: "featuredMarkerPopover"
}, {
reference: withCtx(() => [
withDirectives((openBlock(), createElementBlock("div", {
onMouseover: t[20] || (t[20] = (M2) => a2.showTooltip(9)),
onMouseout: t[21] || (t[21] = (M2) => a2.hideTooltip(9))
}, [
a2.legendEntry.length ? (openBlock(), createBlock(p, {
key: 0,
identifierKey: "prompt",
colourKey: "colour",
styleKey: "style",
legends: a2.legendEntry,
showStarInLegend: true,
class: "svg-legends-container"
}, null, 8, ["legends"])) : createCommentVNode("", true)
], 32)), [
[K, void 0, "featuredMarkerPopover"]
])
]),
_: 1
}, 8, ["visible"]),
createVNode(c, {
content: "Find these markers for data. The number inside the markers is the number of datasets available for each marker.",
placement: "right",
teleported: false,
width: "200",
trigger: "manual",
"popper-class": "flatmap-popper flatmap-marker-popper",
visible: e.hoverVisibilities[0].value,
ref: "markerPopover"
}, {
reference: withCtx(() => [
withDirectives(createBaseVNode("div", {
class: "flatmap-marker-help",
innerHTML: e.flatmapMarker
}, null, 8, Vb), [
[vShow, e.hoverVisibilities[0].value],
[K, void 0, "markerPopover"]
])
]),
_: 1
}, 8, ["visible"]),
e.isFC && e.systems && e.systems.length > 0 ? (openBlock(), createBlock(h3, {
key: 0,
class: "treeControls",
mapType: "flatmap",
title: "Systems",
treeData: e.systems,
active: e.currentActive,
hover: e.currentHover,
onCheckChanged: a2.systemSelected,
onCheckAll: a2.checkAllSystems,
onChangeActive: a2.ftuSelected,
ref: "treeControls"
}, null, 8, ["treeData", "active", "hover", "onCheckChanged", "onCheckAll", "onChangeActive"])) : createCommentVNode("", true),
e.containsAlert && e.alertOptions && n.showPathwayFilter ? (openBlock(), createBlock(g2, {
title: "Alert",
labelKey: "label",
identifierKey: "key",
selections: e.alertOptions,
onChanged: a2.alertSelected,
onCheckboxMouseEnter: a2.alertMouseEnterEmitted,
onSelectionsDataChanged: a2.onSelectionsDataChanged,
onCheckAll: a2.checkAllAlerts,
ref: "alertSelection",
key: "alertSelection"
}, null, 8, ["selections", "onChanged", "onCheckboxMouseEnter", "onSelectionsDataChanged", "onCheckAll"])) : createCommentVNode("", true),
e.pathways && e.pathways.length > 0 ? (openBlock(), createBlock(g2, {
title: "Pathways",
labelKey: "label",
identifierKey: "type",
colourStyle: "line",
selections: e.pathways,
showAsLegend: !n.showPathwayFilter,
onChanged: a2.pathwaysSelected,
onSelectionsDataChanged: a2.onSelectionsDataChanged,
onCheckAll: a2.checkAllPathways,
ref: "pathwaysSelection",
key: "pathwaysSelection"
}, null, 8, ["selections", "showAsLegend", "onChanged", "onSelectionsDataChanged", "onCheckAll"])) : createCommentVNode("", true),
e.taxonConnectivity && e.taxonConnectivity.length > 0 && n.showPathwayFilter ? (openBlock(), createBlock(g2, {
title: "Studied in",
labelKey: "label",
identifierKey: "taxon",
helpMessage: "Evidence exists that this set of neuron populations have been studied in the given species.",
selections: e.taxonConnectivity,
onChanged: a2.taxonsSelected,
onCheckboxMouseEnter: a2.taxonMouseEnterEmitted,
onSelectionsDataChanged: a2.onSelectionsDataChanged,
onCheckAll: a2.checkAllTaxons,
ref: "taxonSelection",
key: "taxonSelection"
}, null, 8, ["selections", "onChanged", "onCheckboxMouseEnter", "onSelectionsDataChanged", "onCheckAll"])) : createCommentVNode("", true)
], 6)), [
[K, void 0, "checkBoxPopover"]
]),
createBaseVNode("div", {
onClick: t[22] || (t[22] = (...M2) => a2.toggleDrawer && a2.toggleDrawer(...M2)),
class: normalizeClass(["drawer-button", { open: e.drawerOpen, close: !e.drawerOpen }])
}, [
createVNode(u2, null, {
default: withCtx(() => [
createVNode(y2)
]),
_: 1
})
], 2)
], 2), [
[vShow, !n.disableUI && a2.requiresDrawer]
])
]),
_: 1
}, 8, ["visible"]),
e.openMapRef ? (openBlock(), createBlock(c, {
key: 2,
ref: "open-map-popover",
"virtual-ref": e.openMapRef,
placement: "top-start",
width: "136",
teleported: false,
trigger: "click",
"popper-class": "open-map-popper non-selectable",
"virtual-triggering": ""
}, {
default: withCtx(() => [
(openBlock(true), createElementBlock(Fragment, null, renderList(n.openMapOptions, (M2) => (openBlock(), createBlock(O2, {
key: M2.key
}, {
default: withCtx(() => [
createVNode(C2, {
type: "primary",
plain: "",
onClick: (W2) => e.$emit("open-map", M2.key)
}, {
default: withCtx(() => [
createTextVNode(toDisplayString(M2.display), 1)
]),
_: 2
}, 1032, ["onClick"])
]),
_: 2
}, 1024))), 128))
]),
_: 1
}, 8, ["virtual-ref"])) : createCommentVNode("", true),
createVNode(c, {
ref: "backgroundPopover",
"virtual-ref": e.backgroundIconRef,
placement: "top-start",
width: "320",
teleported: false,
trigger: "click",
"popper-class": "background-popper h-auto",
"virtual-triggering": ""
}, {
default: withCtx(() => [
createBaseVNode("div", null, [
createVNode(O2, { class: "backgroundText" }, {
default: withCtx(() => t[37] || (t[37] = [
createTextVNode("Viewing Mode")
])),
_: 1
}),
createVNode(O2, { class: "backgroundControl" }, {
default: withCtx(() => [
createBaseVNode("div", zb, [
(openBlock(true), createElementBlock(Fragment, null, renderList(e.viewingModes, (M2, W2, de) => (openBlock(), createElementBlock(Fragment, { key: W2 }, [
W2 === e.viewingMode ? (openBlock(), createElementBlock("span", Hb, [
createBaseVNode("b", null, toDisplayString(W2), 1)
])) : (openBlock(), createElementBlock("span", {
key: 1,
class: "viewing-mode-unselected",
onClick: (Y) => a2.changeViewingMode(W2)
}, toDisplayString(W2), 9, jb))
], 64))), 128))
]),
createVNode(O2, { class: "viewing-mode-description" }, {
default: withCtx(() => [
createTextVNode(toDisplayString(a2.modeDescription), 1)
]),
_: 1
}),
e.viewingMode === "Annotation" && e.offlineAnnotationEnabled ? (openBlock(), createBlock(O2, {
key: 0,
class: "viewing-mode-description"
}, {
default: withCtx(() => t[38] || (t[38] = [
createTextVNode(" (Anonymous annotate) ")
])),
_: 1
})) : createCommentVNode("", true)
]),
_: 1
}),
e.viewingMode === "Annotation" && e.authorisedUser ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
createVNode(O2, { class: "backgroundText" }, {
default: withCtx(() => t[39] || (t[39] = [
createTextVNode("Annotations From")
])),
_: 1
}),
createVNode(O2, { class: "backgroundControl" }, {
default: withCtx(() => [
createVNode(k2, {
teleported: false,
modelValue: e.annotationFrom,
"onUpdate:modelValue": t[23] || (t[23] = (M2) => e.annotationFrom = M2),
placeholder: "Select",
class: "select-box",
"popper-class": "flatmap_dropdown",
onChange: a2.setAnnotationFrom
}, {
default: withCtx(() => [
(openBlock(true), createElementBlock(Fragment, null, renderList(e.annotatedSource, (M2) => (openBlock(), createBlock(I2, {
key: M2,
label: M2,
value: M2
}, {
default: withCtx(() => [
createVNode(O2, null, {
default: withCtx(() => [
createVNode(T2, { span: 12 }, {
default: withCtx(() => [
createTextVNode(toDisplayString(M2), 1)
]),
_: 2
}, 1024)
]),
_: 2
}, 1024)
]),
_: 2
}, 1032, ["label", "value"]))), 128))
]),
_: 1
}, 8, ["modelValue", "onChange"])
]),
_: 1
})
], 64)) : createCommentVNode("", true),
e.displayFlightPathOption ? (openBlock(), createBlock(O2, {
key: 1,
class: "backgroundSpacer"
})) : createCommentVNode("", true),
e.displayFlightPathOption ? (openBlock(), createBlock(O2, {
key: 2,
class: "backgroundText"
}, {
default: withCtx(() => t[40] || (t[40] = [
createTextVNode("Flight path display")
])),
_: 1
})) : createCommentVNode("", true),
e.displayFlightPathOption ? (openBlock(), createBlock(O2, {
key: 3,
class: "backgroundControl"
}, {
default: withCtx(() => [
createVNode($2, {
modelValue: e.flightPath3DRadio,
"onUpdate:modelValue": t[24] || (t[24] = (M2) => e.flightPath3DRadio = M2),
class: "flatmap-radio",
onChange: a2.setFlightPath3D
}, {
default: withCtx(() => [
createVNode(A2, { value: false }, {
default: withCtx(() => t[41] || (t[41] = [
createTextVNode("2D")
])),
_: 1
}),
createVNode(A2, { value: true }, {
default: withCtx(() => t[42] || (t[42] = [
createTextVNode("3D")
])),
_: 1
})
]),
_: 1
}, 8, ["modelValue", "onChange"])
]),
_: 1
})) : createCommentVNode("", true),
createVNode(O2, { class: "backgroundSpacer" }),
createVNode(O2, { class: "backgroundText" }, {
default: withCtx(() => t[43] || (t[43] = [
createTextVNode("Organs display")
])),
_: 1
}),
createVNode(O2, { class: "backgroundControl" }, {
default: withCtx(() => [
createVNode($2, {
modelValue: e.colourRadio,
"onUpdate:modelValue": t[25] || (t[25] = (M2) => e.colourRadio = M2),
class: "flatmap-radio",
onChange: a2.setColour
}, {
default: withCtx(() => [
createVNode(A2, { value: true }, {
default: withCtx(() => t[44] || (t[44] = [
createTextVNode("Colour")
])),
_: 1
}),
createVNode(A2, { value: false }, {
default: withCtx(() => t[45] || (t[45] = [
createTextVNode("Greyscale")
])),
_: 1
})
]),
_: 1
}, 8, ["modelValue", "onChange"])
]),
_: 1
}),
createVNode(O2, { class: "backgroundSpacer" }),
createVNode(O2, { class: "backgroundText" }, {
default: withCtx(() => t[46] || (t[46] = [
createTextVNode("Outlines display")
])),
_: 1
}),
createVNode(O2, { class: "backgroundControl" }, {
default: withCtx(() => [
createVNode($2, {
modelValue: e.outlinesRadio,
"onUpdate:modelValue": t[26] || (t[26] = (M2) => e.outlinesRadio = M2),
class: "flatmap-radio",
onChange: a2.setOutlines
}, {
default: withCtx(() => [
createVNode(A2, { value: true }, {
default: withCtx(() => t[47] || (t[47] = [
createTextVNode("Show")
])),
_: 1
}),
createVNode(A2, { value: false }, {
default: withCtx(() => t[48] || (t[48] = [
createTextVNode("Hide")
])),
_: 1
})
]),
_: 1
}, 8, ["modelValue", "onChange"])
]),
_: 1
}),
createVNode(O2, { class: "backgroundSpacer" }),
createVNode(O2, { class: "backgroundText" }, {
default: withCtx(() => t[49] || (t[49] = [
createTextVNode("Change background")
])),
_: 1
}),
createVNode(O2, { class: "backgroundControl" }, {
default: withCtx(() => [
(openBlock(true), createElementBlock(Fragment, null, renderList(e.availableBackground, (M2) => (openBlock(), createElementBlock("div", {
key: M2,
class: normalizeClass([
"backgroundChoice",
M2,
M2 == e.currentBackground ? "active" : ""
]),
onClick: (W2) => a2.backgroundChangeCallback(M2)
}, null, 10, Kb))), 128))
]),
_: 1
})
])
]),
_: 1
}, 8, ["virtual-ref"]),
withDirectives(createBaseVNode("div", {
class: normalizeClass(["settings-group", { open: e.drawerOpen, close: !e.drawerOpen }])
}, [
n.showOpenMapButton ? (openBlock(), createBlock(O2, { key: 0 }, {
default: withCtx(() => [
createVNode(c, {
visible: e.hoverVisibilities[4].value,
content: "Open new map",
placement: "right",
teleported: false,
"popper-class": "flatmap-popper",
ref: "openMapPopover"
}, {
reference: withCtx(() => [
n.enableOpenMapUI && n.openMapOptions.length > 0 ? (openBlock(), createElementBlock("div", {
key: 0,
ref: "openMapRef",
class: "icon-button-container",
onMouseover: t[27] || (t[27] = (M2) => a2.showTooltip(4)),
onMouseout: t[28] || (t[28] = (M2) => a2.hideTooltip(4))
}, [
createVNode(m2, {
icon: "openMap",
class: "icon-button open-map-button"
})
], 544)) : createCommentVNode("", true)
]),
_: 1
}, 8, ["visible"])
]),
_: 1
})) : createCommentVNode("", true),
n.showLocalSettings ? (openBlock(), createBlock(O2, { key: 1 }, {
default: withCtx(() => [
createVNode(c, {
content: "Change settings",
placement: "right",
visible: e.hoverVisibilities[5].value,
teleported: false,
trigger: "manual",
"popper-class": "flatmap-popper",
ref: "settingsPopover"
}, {
reference: withCtx(() => [
createBaseVNode("div", {
ref: "backgroundIconRef",
class: "icon-button-container",
onMouseover: t[29] || (t[29] = (M2) => a2.showTooltip(5)),
onMouseout: t[30] || (t[30] = (M2) => a2.hideTooltip(5))
}, [
createVNode(m2, {
icon: "changeBckgd",
class: "icon-button"
})
], 544)
]),
_: 1
}, 8, ["visible"])
]),
_: 1
})) : createCommentVNode("", true)
], 2), [
[vShow, !n.disableUI]
]),
e.tooltipDisplay ? (openBlock(), createBlock(N2, {
key: 3,
ref: "tooltip",
class: "tooltip",
annotationEntry: e.annotationEntry,
tooltipEntry: e.tooltipEntry,
annotationDisplay: e.viewingMode === "Annotation",
onAnnotation: a2.commitAnnotationEvent,
onOnActionClick: a2.onActionClick
}, null, 8, ["annotationEntry", "tooltipEntry", "annotationDisplay", "onAnnotation", "onOnActionClick"])) : createCommentVNode("", true)
])
])), [
[B2, e.loading]
]);
}
var bl = hn2(xb, [["render", Ub], ["__scopeId", "data-v-bb2e160c"]]);
var Ar = {
"NCBITaxon:10114": "01fedbf9-d783-509c-a10c-827941ab13da",
"NCBITaxon:9823": "a336ac04-24db-561f-a25f-1c994fe17410",
"NCBITaxon:9606": "42ed6323-f645-5fbe-bada-9581819cf689",
"NCBITaxon:10090": "25285fab-48a0-5620-a6a0-f9a0374837d5",
"NCBITaxon:9685": "73060497-46a6-52bf-b975-cac511c127cb"
};
var Wb = {
name: "MultiFlatmapVuer",
components: {
Col: Wn,
Row: Un,
Option: ea,
Select: Vo,
Popover: zo,
FlatmapVuer: bl
},
created: function() {
this.loadMapManager();
},
mounted: function() {
this.initialise(), Ii.on("onActionClick", (e) => {
this.resourceSelected(e);
}), Ii.on("open-pubmed-url", (e) => {
this.$emit("open-pubmed-url", e);
});
},
methods: {
/**
* @public
* Function to initialise the component when mounted.
* It returns a promise.
*/
initialise: function() {
return this.multiflatmapError = null, new Promise((e) => {
this.requireInitialisation ? (this.requireInitialisation = false, fetch(this.flatmapAPI).then((t) => t.json()).then((t) => {
t.status_code === 404 && (console.error("Flatmap API endpoint is incorrect", t), this.multiflatmapError = {}, this.multiflatmapError.title = "MultiFlatmap Error!", this.multiflatmapError.messages = [
`Sorry, the component could not be loaded because the specified
flatmap API endpoint is incorrect. Please check the endpoint URL
or contact support if the problem persists.`
]), Object.keys(this.availableSpecies).forEach((o) => {
const i = this.availableSpecies[o].uuid;
if (i && t.length && t.map((a2) => a2.uuid).indexOf(i) > 0)
this.speciesList[o] = this.availableSpecies[o];
else
for (let a2 = 0; a2 < t.length; a2++)
if (this.availableSpecies[o].taxo === t[a2].taxon)
if (this.availableSpecies[o].biologicalSex) {
if (t[a2].biologicalSex && t[a2].biologicalSex === this.availableSpecies[o].biologicalSex) {
this.speciesList[o] = this.availableSpecies[o];
break;
}
} else {
this.speciesList[o] = this.availableSpecies[o];
break;
}
});
let n = this.initial;
if (this.state) {
const o = this.state.state;
(!o || !o.uuid && !o.entry) && this.state.species ? n = this.state.species : n = void 0;
}
n && (n && this.speciesList[n] !== void 0 ? this.activeSpecies = n : this.activeSpecies = Object.keys(this.speciesList)[0], this.setSpecies(
this.activeSpecies,
this.state ? this.state.state : void 0,
5
)), this.initialised = true, e(), this.resolveList.forEach((o) => {
o();
});
}).catch((t) => {
console.error("Error fetching flatmap:", t), this.initialised = true, this.multiflatmapError = {}, this.multiflatmapError.title = "MultiFlatmap Error!", this.multiflatmapError.messages = [
`Sorry, the component could not be loaded due to an unexpected error.
Please try again later or contact support if the problem persists.`
], e(), this.resolveList.forEach((n) => {
n();
});
})) : this.initialised ? e() : this.resolveList.push(e);
});
},
/**
* Function to load `mapManager` to create flatmap.
*/
loadMapManager: function() {
this.mapManagerRef || (this.mapManager ? this.mapManagerRef = this.mapManager : (this.mapManagerRef = markRaw(new Br.MapViewer(this.flatmapAPI, { container: void 0 })), this.$emit("mapmanager-loaded", this.mapManagerRef)));
},
/**
* @public
* Function to emit ``resource-selected`` event with provided ``resource``.
* @arg {Object} `action`
*/
resourceSelected: function(e) {
this.$emit("resource-selected", e);
},
/**
* @public
* Function to emit ``ready`` event after the flatmap is loaded.
* @arg {Object} `component`
*/
FlatmapReady: function(e) {
this.$emit("ready", e);
},
/**
* @public
* Function to get the current active map.
*/
getCurrentFlatmap: function() {
return this.$refs[this.activeSpecies][0];
},
/**
* @public
* Function to emit ``pan-zoom-callback`` event
* from the event emitted in ``callback`` function from ``MapManager.loadMap()``.
* @arg {Object} `payload`
*/
panZoomCallback: function(e) {
this.$emit("pan-zoom-callback", e);
},
onAnnotationClose: function() {
this.$emit("annotation-close");
},
onAnnotationOpen: function(e) {
this.$emit("annotation-open", e);
},
updateOfflineAnnotationEnabled: function(e) {
this.$emit("update-offline-annotation-enabled", e);
},
onConnectivityInfoClose: function() {
this.$emit("connectivity-info-close");
},
onConnectivityInfoOpen: function(e) {
this.$emit("connectivity-info-open", e);
},
onConnectivityError: function(e) {
this.$emit("connectivity-error", e);
},
onNeuronConnectionFeatureClick: function(e) {
this.$emit("neuron-connection-feature-click", e);
},
onSelectionsDataChanged: function(e) {
this.$emit("pathway-selection-changed", e);
},
/**
* @public
* Function to show popup on map.
* @arg {String} `featureId`,
* @arg {Object} `node`,
* @arg {Object} `options`
*/
showPopup: function(e, t, n) {
this.getCurrentFlatmap().showPopup(e, t, n);
},
/**
* @public
* Function to show marker popup.
* @arg {String} `featureId`,
* @arg {Object} `node`,
* @arg {Object} `options`
*/
showMarkerPopup: function(e, t, n) {
this.getCurrentFlatmap().showMarkerPopup(e, t, n);
},
/**
* @public
* Function to set species.
* This function is called on the first load and
* when user changes the species.
* @arg {Array} `species`,
* @arg {Object} `state`,
* @arg {Number} `numberOfRetry`
*/
setSpecies: function(e, t, n) {
if (this.$refs && e in this.$refs)
this.activeSpecies = e, this.$refs[this.activeSpecies][0].createFlatmap(t), this.$emit("flatmapChanged", this.activeSpecies);
else if (n) {
const o = n - 1;
o >= 0 && this.$nextTick(() => {
this.setSpecies(e, t, o);
});
}
},
/**
* Function to switch to the latest existing map from
* a legacy map of the same species.
* @arg state
*
* @private
*/
viewLatestMap: function(e) {
const t = Object.keys(this.speciesList);
for (let n = 0; n < t.length; n++) {
const o = this.speciesList[t[n]];
if (!o.isLegacy && o.taxo === e.entry && o.biologicalSex === e.biologicalSex) {
this.setSpecies(t[n], e, 0);
return;
}
}
},
/**
* Create a legacy entry with the provided information
* @arg state,
* @arg taxo,
*
* @private
*/
createLegacyEntry: function(e, t, n) {
if (n && t) {
let o = "Legacy";
return e.species && (e.species.slice(0, 6) === "Legacy" ? o = e.species : o = o + ` ${e.species}`), this.speciesList[o] = {
taxo: t,
isLegacy: true,
displayWarning: true
}, {
species: o,
state: {
entry: t,
uuid: n,
viewport: e.state.viewport,
searchTerm: e.state.searchTerm
}
};
}
},
/**
* Function used to translate the legacy map state to one that can be used in current
* flatmap if required. If it is a legacy, an Select entry will be added
* @arg state
*
* @private
*/
updateState: function(e) {
return new Promise((t) => {
if (e && e.state) {
const n = e.state;
if (n.uuid) {
if (n.entry)
return new Promise(() => {
const o = { taxon: n.entry };
n.biologicalSex && (o.biologicalSex = n.biologicalSex), this.mapManagerRef.findMap(o).then((i) => {
if (i.uuid !== n.uuid)
return this.createLegacyEntry(
e,
n.entry,
n.uuid
);
}).then((i) => {
t(i || e);
}).catch(() => {
t(e);
});
});
} else if (n.entry) {
const o = n.entry in Ar ? Ar[n.entry] : void 0, i = this.createLegacyEntry(
e,
n.entry,
o
);
t(i || e);
}
}
t(e);
});
},
/**
* @public
* Function used for getting the current states of the scene. This exported states
* can be imported using the importStates method.
*/
getState: function() {
let e = {
species: this.activeSpecies,
state: void 0
}, t = this.getCurrentFlatmap();
return e.state = t.getState(), e;
},
/**
* @public
* Function used for importing the states of the scene. This exported states
* can be imported using the read states method.
* @arg {Object} state
*/
setState: function(e) {
e && (this.loadMapManager(), this.updateState(e).then((t) => {
this.initialise().then(() => {
t.species && t.species !== this.activeSpecies ? this.setSpecies(t.species, t.state, 5) : t.state && this.getCurrentFlatmap().setState(t.state);
});
}));
},
/**
* @public
* Function to activate help mode tooltip by item index number
* @arg {Number} `index`
*/
activateTooltipByIndex: function(e) {
return e === this.helpModeActiveItem && this.helpMode;
},
/**
* @public
* Function to check the last item of help mode
* @arg {Boolean} `isLastItem`
*/
onHelpModeLastItem: function(e) {
e && this.$emit("help-mode-last-item", true);
},
/**
* @public
* Function to emit event after a tooltip is shown.
*/
onTooltipShown: function() {
this.$emit("shown-tooltip");
},
/**
* @public
* Function to emit event after a tooltip on the map is shown.
*/
onMapTooltipShown: function() {
this.$emit("shown-map-tooltip");
},
/**
* @public
* Function to change the view mode of the map.
* @arg {String} `modeName`
*/
changeViewingMode: function(e) {
this.getCurrentFlatmap().changeViewingMode(e);
},
setConnectionType: function(e) {
this.getCurrentFlatmap().setConnectionType(e);
}
},
props: {
/**
* Initial species for the flatmap.
* This value will be ignored if a valid state object is provided.
*/
initial: {
type: String,
default: ""
},
/**
* The minimum zoom level of the map.
*/
minZoom: {
type: Number,
default: 1
},
/**
* The option to create map on component mounted.
*/
renderAtMounted: {
type: Boolean,
default: false
},
/**
* The option to show tooltips for help mode.
*/
helpMode: {
type: Boolean,
default: false
},
/**
* The active item index of help mode.
*/
helpModeActiveItem: {
type: Number,
default: 0
},
/**
* The option to use helpModeDialog.
* On default, `false`, clicking help will show all tooltips.
* If `true`, clicking help will show the help-mode-dialog.
*/
helpModeDialog: {
type: Boolean,
default: false
},
/**
* The last item of help mode.
*/
helpModeLastItem: {
type: Boolean,
default: false
},
/**
* The option to display minimap at the top-right corner of the map.
*/
displayMinimap: {
type: Boolean,
default: false
},
/**
* The option to show star in legend area.
*/
showStarInLegend: {
type: Boolean,
default: false
},
/**
* Flag to determine rather open map UI should be
* presented or not.
*/
enableOpenMapUI: {
type: Boolean,
default: false
},
/**
* The data to show different map options.
* Available at the bottom-left corner ("Open new map" tooltip).
*/
openMapOptions: {
type: Array
},
/**
* The available species data for different maps.
* This data is used for multi flatmaps.
*/
availableSpecies: {
type: Object,
/**
* ```{
'Human Female': {
taxo: 'NCBITaxon:9606',
biologicalSex: 'PATO:0000383',
iconClass: 'mapicon-icon_human',
displayWarning: true,
},
'Human Male': {
taxo: 'NCBITaxon:9606',
biologicalSex: 'PATO:0000384',
iconClass: 'mapicon-icon_human',
displayWarning: true,
},
Rat: {
taxo: 'NCBITaxon:10114',
iconClass: 'mapicon-icon_rat',
displayLatestChanges: true,
},
Mouse: {
taxo: 'NCBITaxon:10090',
iconClass: 'mapicon-icon_mouse',
displayWarning: true,
},
Pig: {
taxo: 'NCBITaxon:9823',
iconClass: 'mapicon-icon_pig',
displayWarning: true,
},
Cat: {
taxo: 'NCBITaxon:9685',
iconClass: 'mapicon-icon_cat',
displayWarning: true,
},
}```
*/
default: function() {
return {
"Human Female": {
taxo: "NCBITaxon:9606",
biologicalSex: "PATO:0000383",
iconClass: "mapicon-icon_human",
displayWarning: true
},
"Human Male": {
taxo: "NCBITaxon:9606",
biologicalSex: "PATO:0000384",
iconClass: "mapicon-icon_human",
displayWarning: true
},
Rat: {
taxo: "NCBITaxon:10114",
iconClass: "mapicon-icon_rat",
displayLatestChanges: true
},
Mouse: {
taxo: "NCBITaxon:10090",
iconClass: "mapicon-icon_mouse",
displayWarning: true
},
Pig: {
taxo: "NCBITaxon:9823",
iconClass: "mapicon-icon_pig",
displayWarning: true
},
Cat: {
taxo: "NCBITaxon:9685",
iconClass: "mapicon-icon_cat",
displayWarning: true
}
};
}
},
/**
* State containing state of the flatmap.
*/
state: {
type: Object,
default: void 0
},
/**
* Flatmap's Map Manager to use as single Map Manager
* when the value is provided.
*/
mapManager: {
type: Object,
default: void 0
},
/**
* Specify the endpoint of the flatmap server.
*/
flatmapAPI: {
type: String,
default: "https://mapcore-demo.org/current/flatmap/v3/"
},
/**
* Specify the endpoint of the SPARC API.
*/
sparcAPI: {
type: String,
default: "https://api.sparc.science/"
},
/**
* Flag to disable UIs on Map
*/
disableUI: {
type: Boolean,
default: false
},
/**
* The option to show connectivity information in sidebar
*/
connectivityInfoSidebar: {
type: Boolean,
default: false
},
/**
* The option to show connectivity information in sidebar
*/
annotationSidebar: {
type: Boolean,
default: false
},
/**
* The option to show local settings UI
* (background colour, flight path, viewing mode, etc.)
*/
showLocalSettings: {
type: Boolean,
default: true
},
/**
* The option to show open new map button
*/
showOpenMapButton: {
type: Boolean,
default: true
},
/**
* The option to show pathway drawer
*/
showPathwayFilter: {
type: Boolean,
default: true
},
/**
* Allow to add and display extra legends to drawer
*/
externalLegends: {
type: Array,
default: function() {
return [];
}
}
},
data: function() {
return {
activeSpecies: void 0,
speciesList: {},
requireInitialisation: true,
resolveList: markRaw([]),
initialised: false,
mapManagerRef: void 0,
multiflatmapError: null
};
},
watch: {
state: {
handler: function(e) {
this.setState(e);
},
immediate: true,
deep: true
}
}
};
var qb = {
class: "multi-container",
ref: "multiContainer"
};
var Gb = {
key: 0,
style: { position: "absolute", "z-index": "100" }
};
var Jb = { class: "select-box-icon" };
function Yb(e, t, n, o, i, a2) {
const r = ea, s = Vo, l = zo, u2 = bl, c = ta;
return openBlock(), createElementBlock("div", qb, [
n.disableUI ? createCommentVNode("", true) : (openBlock(), createElementBlock("div", Gb, [
t[2] || (t[2] = createBaseVNode("div", { class: "species-display-text" }, "Species", -1)),
createVNode(l, {
content: "Select a species",
placement: "right",
trigger: "manual",
"popper-class": "flatmap-popper flatmap-teleport-popper right-popper",
width: "max-content",
visible: a2.activateTooltipByIndex(0),
teleported: false,
ref: "selectPopover"
}, {
reference: withCtx(() => [
createVNode(s, {
id: "flatmap-select",
teleported: false,
modelValue: e.activeSpecies,
"onUpdate:modelValue": t[0] || (t[0] = (d) => e.activeSpecies = d),
placeholder: "Select",
class: "select-box",
"popper-class": "flatmap-dropdown",
onChange: a2.setSpecies
}, {
default: withCtx(() => [
(openBlock(true), createElementBlock(Fragment, null, renderList(e.speciesList, (d, f2) => (openBlock(), createBlock(r, {
key: f2,
label: f2,
value: f2
}, {
default: withCtx(() => [
createBaseVNode("span", Jb, [
createBaseVNode("i", {
class: normalizeClass(d.iconClass)
}, null, 2)
]),
createTextVNode(" " + toDisplayString(f2), 1)
]),
_: 2
}, 1032, ["label", "value"]))), 128))
]),
_: 1
}, 8, ["modelValue", "onChange"])
]),
_: 1
}, 8, ["visible"])
])),
(openBlock(true), createElementBlock(Fragment, null, renderList(e.speciesList, (d, f2) => withDirectives((openBlock(), createBlock(u2, {
key: f2,
entry: d.taxo,
uuid: d.uuid,
biologicalSex: d.biologicalSex,
displayWarning: d.displayWarning,
displayLatestChanges: d.displayLatestChanges,
isLegacy: d.isLegacy,
ref_for: true,
ref: f2,
enableOpenMapUI: n.enableOpenMapUI,
openMapOptions: n.openMapOptions,
disableUI: n.disableUI,
onViewLatestMap: a2.viewLatestMap,
onResourceSelected: a2.resourceSelected,
onReady: a2.FlatmapReady,
onPanZoomCallback: a2.panZoomCallback,
annotationSidebar: n.annotationSidebar,
onAnnotationOpen: a2.onAnnotationOpen,
onAnnotationClose: a2.onAnnotationClose,
onUpdateOfflineAnnotationEnabled: a2.updateOfflineAnnotationEnabled,
connectivityInfoSidebar: n.connectivityInfoSidebar,
onConnectivityInfoOpen: a2.onConnectivityInfoOpen,
onConnectivityInfoClose: a2.onConnectivityInfoClose,
onConnectivityError: a2.onConnectivityError,
onNeuronConnectionFeatureClick: a2.onNeuronConnectionFeatureClick,
onOpenMap: t[1] || (t[1] = (m2) => e.$emit("open-map", m2)),
onPathwaySelectionChanged: a2.onSelectionsDataChanged,
minZoom: n.minZoom,
helpMode: e.activeSpecies == f2 && n.helpMode,
helpModeActiveItem: n.helpModeActiveItem,
helpModeDialog: n.helpModeDialog,
helpModeInitialIndex: -2,
onHelpModeLastItem: a2.onHelpModeLastItem,
onShownTooltip: a2.onTooltipShown,
onShownMapTooltip: a2.onMapTooltipShown,
renderAtMounted: n.renderAtMounted,
displayMinimap: n.displayMinimap,
showStarInLegend: n.showStarInLegend,
style: { height: "100%" },
mapManager: e.mapManagerRef,
flatmapAPI: n.flatmapAPI,
sparcAPI: n.sparcAPI,
showLocalSettings: n.showLocalSettings,
showOpenMapButton: n.showOpenMapButton,
showPathwayFilter: n.showPathwayFilter,
externalLegends: n.externalLegends
}, null, 8, ["entry", "uuid", "biologicalSex", "displayWarning", "displayLatestChanges", "isLegacy", "enableOpenMapUI", "openMapOptions", "disableUI", "onViewLatestMap", "onResourceSelected", "onReady", "onPanZoomCallback", "annotationSidebar", "onAnnotationOpen", "onAnnotationClose", "onUpdateOfflineAnnotationEnabled", "connectivityInfoSidebar", "onConnectivityInfoOpen", "onConnectivityInfoClose", "onConnectivityError", "onNeuronConnectionFeatureClick", "onPathwaySelectionChanged", "minZoom", "helpMode", "helpModeActiveItem", "helpModeDialog", "onHelpModeLastItem", "onShownTooltip", "onShownMapTooltip", "renderAtMounted", "displayMinimap", "showStarInLegend", "mapManager", "flatmapAPI", "sparcAPI", "showLocalSettings", "showOpenMapButton", "showPathwayFilter", "externalLegends"])), [
[vShow, e.activeSpecies == f2]
])), 128)),
e.multiflatmapError ? (openBlock(), createBlock(c, {
key: 1,
flatmapError: e.multiflatmapError
}, null, 8, ["flatmapError"])) : createCommentVNode("", true)
], 512);
}
var o0 = hn2(Wb, [["render", Yb], ["__scopeId", "data-v-c2350470"]]);
export {
bl as FlatmapVuer,
o0 as MultiFlatmapVuer
};
/*! Bundled license information:
@abi-software/flatmapvuer/dist/flatmapvuer.js:
(**
* @vue/shared v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**)
*/
//# sourceMappingURL=@abi-software_flatmapvuer.js.map