UNPKG

epic-designer-gold

Version:

基于vue3的设计器,可视化开发页面表单

1,861 lines (1,860 loc) 1.29 MB
import { g as xn, c as De } from "./_commonjsHelpers-BVfed4GL.js"; import { r as Ae } from "./_vue_commonjs-external-NwvjgbHK.js"; import { ref as je, readonly as Bt, watch as Fa, computed as ut, getCurrentInstance as Wh, onMounted as zn, onBeforeUnmount as sa, onBeforeMount as xu, reactive as H2, createTextVNode as I2, Fragment as iW, Comment as V2, defineComponent as da, provide as oW, inject as ud, withDirectives as sW, toRef as kn, h as Be, Teleport as X2, nextTick as dW, renderSlot as uW, onActivated as q2, onDeactivated as Y2, mergeProps as B2 } from "vue"; function lW(e) { const n = je(!!e.value); if (n.value) return Bt(n); const a = Fa(e, (i) => { i && (n.value = !0, a()); }); return Bt(n); } function Wn(e) { const n = ut(e), a = je(n.value); return Fa(n, (i) => { a.value = i; }), typeof e == "function" ? a : { __v_isRef: !0, get value() { return a.value; }, set value(i) { e.set(i); } }; } function zu() { return Wh() !== null; } const ld = typeof window < "u"; let Zn, id; const G2 = () => { var e, n; Zn = ld ? (n = (e = document) === null || e === void 0 ? void 0 : e.fonts) === null || n === void 0 ? void 0 : n.ready : void 0, id = !1, Zn !== void 0 ? Zn.then(() => { id = !0; }) : id = !0; }; G2(); function cW(e) { if (id) return; let n = !1; zn(() => { id || Zn == null || Zn.then(() => { n || e(); }); }), sa(() => { n = !0; }); } function wu(e) { return e.composedPath()[0]; } const K2 = { mousemoveoutside: /* @__PURE__ */ new WeakMap(), clickoutside: /* @__PURE__ */ new WeakMap() }; function Q2(e, n, a) { if (e === "mousemoveoutside") { const i = (o) => { n.contains(wu(o)) || a(o); }; return { mousemove: i, touchstart: i }; } else if (e === "clickoutside") { let i = !1; const o = (v) => { i = !n.contains(wu(v)); }, h = (v) => { i && (n.contains(wu(v)) || a(v)); }; return { mousedown: o, mouseup: h, touchstart: o, touchend: h }; } return console.error( // eslint-disable-next-line @typescript-eslint/restrict-template-expressions `[evtd/create-trap-handler]: name \`${e}\` is invalid. This could be a bug of evtd.` ), {}; } function mW(e, n, a) { const i = K2[e]; let o = i.get(n); o === void 0 && i.set(n, o = /* @__PURE__ */ new WeakMap()); let h = o.get(a); return h === void 0 && o.set(a, h = Q2(e, n, a)), h; } function J2(e, n, a, i) { if (e === "mousemoveoutside" || e === "clickoutside") { const o = mW(e, n, a); return Object.keys(o).forEach((h) => { Et(h, document, o[h], i); }), !0; } return !1; } function Z2(e, n, a, i) { if (e === "mousemoveoutside" || e === "clickoutside") { const o = mW(e, n, a); return Object.keys(o).forEach((h) => { bt(h, document, o[h], i); }), !0; } return !1; } function U2() { if (typeof window > "u") return { on: () => { }, off: () => { } }; const e = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(); function a() { e.set(this, !0); } function i() { e.set(this, !0), n.set(this, !0); } function o(C, A, K) { const ne = C[A]; return C[A] = function() { return K.apply(C, arguments), ne.apply(C, arguments); }, C; } function h(C, A) { C[A] = Event.prototype[A]; } const v = /* @__PURE__ */ new WeakMap(), b = Object.getOwnPropertyDescriptor(Event.prototype, "currentTarget"); function w() { var C; return (C = v.get(this)) !== null && C !== void 0 ? C : null; } function P(C, A) { b !== void 0 && Object.defineProperty(C, "currentTarget", { configurable: !0, enumerable: !0, get: A ?? b.get }); } const $ = { bubble: {}, capture: {} }, T = {}; function z() { const C = function(A) { const { type: K, eventPhase: ne, bubbles: fe } = A, _e = wu(A); if (ne === 2) return; const R = ne === 1 ? "capture" : "bubble"; let X = _e; const ee = []; for (; X === null && (X = window), ee.push(X), X !== window; ) X = X.parentNode || null; const ce = $.capture[K], ue = $.bubble[K]; if (o(A, "stopPropagation", a), o(A, "stopImmediatePropagation", i), P(A, w), R === "capture") { if (ce === void 0) return; for (let se = ee.length - 1; se >= 0 && !e.has(A); --se) { const ve = ee[se], ye = ce.get(ve); if (ye !== void 0) { v.set(A, ve); for (const pe of ye) { if (n.has(A)) break; pe(A); } } if (se === 0 && !fe && ue !== void 0) { const pe = ue.get(ve); if (pe !== void 0) for (const pt of pe) { if (n.has(A)) break; pt(A); } } } } else if (R === "bubble") { if (ue === void 0) return; for (let se = 0; se < ee.length && !e.has(A); ++se) { const ve = ee[se], ye = ue.get(ve); if (ye !== void 0) { v.set(A, ve); for (const pe of ye) { if (n.has(A)) break; pe(A); } } } } h(A, "stopPropagation"), h(A, "stopImmediatePropagation"), P(A); }; return C.displayName = "evtdUnifiedHandler", C; } function L() { const C = function(A) { const { type: K, eventPhase: ne } = A; if (ne !== 2) return; const fe = T[K]; fe !== void 0 && fe.forEach((_e) => _e(A)); }; return C.displayName = "evtdUnifiedWindowEventHandler", C; } const k = z(), I = L(); function D(C, A) { const K = $[C]; return K[A] === void 0 && (K[A] = /* @__PURE__ */ new Map(), window.addEventListener(A, k, C === "capture")), K[A]; } function F(C) { return T[C] === void 0 && (T[C] = /* @__PURE__ */ new Set(), window.addEventListener(C, I)), T[C]; } function B(C, A) { let K = C.get(A); return K === void 0 && C.set(A, K = /* @__PURE__ */ new Set()), K; } function G(C, A, K, ne) { const fe = $[A][K]; if (fe !== void 0) { const _e = fe.get(C); if (_e !== void 0 && _e.has(ne)) return !0; } return !1; } function ie(C, A) { const K = T[C]; return !!(K !== void 0 && K.has(A)); } function be(C, A, K, ne) { let fe; if (typeof ne == "object" && ne.once === !0 ? fe = (ce) => { ke(C, A, fe, ne), K(ce); } : fe = K, J2(C, A, fe, ne)) return; const R = ne === !0 || typeof ne == "object" && ne.capture === !0 ? "capture" : "bubble", X = D(R, C), ee = B(X, A); if (ee.has(fe) || ee.add(fe), A === window) { const ce = F(C); ce.has(fe) || ce.add(fe); } } function ke(C, A, K, ne) { if (Z2(C, A, K, ne)) return; const _e = ne === !0 || typeof ne == "object" && ne.capture === !0, R = _e ? "capture" : "bubble", X = D(R, C), ee = B(X, A); if (A === window && !G(A, _e ? "bubble" : "capture", C, K) && ie(C, K)) { const ue = T[C]; ue.delete(K), ue.size === 0 && (window.removeEventListener(C, I), T[C] = void 0); } ee.has(K) && ee.delete(K), ee.size === 0 && X.delete(A), X.size === 0 && (window.removeEventListener(C, k, R === "capture"), $[R][C] = void 0); } return { on: be, off: ke }; } const { on: Et, off: bt } = U2(), eC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, off: bt, on: Et }, Symbol.toStringTag, { value: "Module" })), rd = je(null); function x_(e) { if (e.clientX > 0 || e.clientY > 0) rd.value = { x: e.clientX, y: e.clientY }; else { const { target: n } = e; if (n instanceof Element) { const { left: a, top: i, width: o, height: h } = n.getBoundingClientRect(); a > 0 || i > 0 ? rd.value = { x: a + o / 2, y: i + h / 2 } : rd.value = { x: 0, y: 0 }; } else rd.value = null; } } let su = 0, z_ = !0; function tC() { if (!ld) return Bt(je(null)); su === 0 && Et("click", document, x_, !0); const e = () => { su += 1; }; return z_ && (z_ = zu()) ? (xu(e), sa(() => { su -= 1, su === 0 && bt("click", document, x_, !0); })) : e(), Bt(rd); } const aC = je(void 0); let du = 0; function D_() { aC.value = Date.now(); } let j_ = !0; function nC(e) { if (!ld) return Bt(je(!1)); const n = je(!1); let a = null; function i() { a !== null && window.clearTimeout(a); } function o() { i(), n.value = !0, a = window.setTimeout(() => { n.value = !1; }, e); } du === 0 && Et("click", window, D_, !0); const h = () => { du += 1, Et("click", window, o, !0); }; return j_ && (j_ = zu()) ? (xu(h), sa(() => { du -= 1, du === 0 && bt("click", window, D_, !0), bt("click", window, o, !0), i(); })) : h(), Bt(n); } let uu = 0; const rC = typeof window < "u" && window.matchMedia !== void 0, Ha = je(null); let Yt, wn; function $u(e) { e.matches && (Ha.value = "dark"); } function ku(e) { e.matches && (Ha.value = "light"); } function iC() { Yt = window.matchMedia("(prefers-color-scheme: dark)"), wn = window.matchMedia("(prefers-color-scheme: light)"), Yt.matches ? Ha.value = "dark" : wn.matches ? Ha.value = "light" : Ha.value = null, Yt.addEventListener ? (Yt.addEventListener("change", $u), wn.addEventListener("change", ku)) : Yt.addListener && (Yt.addListener($u), wn.addListener(ku)); } function oC() { "removeEventListener" in Yt ? (Yt.removeEventListener("change", $u), wn.removeEventListener("change", ku)) : "removeListener" in Yt && (Yt.removeListener($u), wn.removeListener(ku)), Yt = void 0, wn = void 0; } let T_ = !0; function sC() { return process.env.NODE_ENV !== "test" && !rC ? Bt(Ha) : process.env.NODE_ENV === "test" && window.matchMedia === void 0 ? Bt(Ha) : (uu === 0 && iC(), T_ && (T_ = zu()) && (xu(() => { uu += 1; }), sa(() => { uu -= 1, uu === 0 && oC(); })), Bt(Ha)); } function dC(e, n) { return Fa(e, (a) => { a !== void 0 && (n.value = a); }), ut(() => e.value === void 0 ? n.value : e.value); } function hW() { const e = je(!1); return zn(() => { e.value = !0; }), Bt(e); } function uC(e, n) { return ut(() => { for (const a of n) if (e[a] !== void 0) return e[a]; return e[n[n.length - 1]]; }); } const fW = (typeof window > "u" ? !1 : /iPad|iPhone|iPod/.test(navigator.platform) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1) && // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions !window.MSStream; function lC() { return fW; } const cC = { // mobile // 0 ~ 640 doesn't mean it should display well in all the range, // but means you should treat it like a mobile phone.) xs: 0, s: 640, m: 1024, l: 1280, xl: 1536, "2xl": 1920 // normal desktop display }; function mC(e) { return `(min-width: ${e}px)`; } const Hr = {}; function lh(e = cC) { if (!ld) return ut(() => []); if (typeof window.matchMedia != "function") return ut(() => []); const n = je({}), a = Object.keys(e), i = (o, h) => { o.matches ? n.value[h] = !0 : n.value[h] = !1; }; return a.forEach((o) => { const h = e[o]; let v, b; Hr[h] === void 0 ? (v = window.matchMedia(mC(h)), v.addEventListener ? v.addEventListener("change", (w) => { b.forEach((P) => { P(w, o); }); }) : v.addListener && v.addListener((w) => { b.forEach((P) => { P(w, o); }); }), b = /* @__PURE__ */ new Set(), Hr[h] = { mql: v, cbs: b }) : (v = Hr[h].mql, b = Hr[h].cbs), b.add(i), v.matches && b.forEach((w) => { w(v, o); }); }), sa(() => { a.forEach((o) => { const { cbs: h } = Hr[e[o]]; h.has(i) && h.delete(i); }); }), ut(() => { const { value: o } = n; return a.filter((h) => o[h]); }); } function hC(e) { if (!ld) return ut(() => { }); const n = e !== void 0 ? lh(e) : lh(); return ut(() => { const { value: a } = n; if (a.length !== 0) return a[a.length - 1]; }); } function fC(e = {}, n) { const a = H2({ ctrl: !1, command: !1, win: !1, shift: !1, tab: !1 }), { keydown: i, keyup: o } = e, h = (w) => { switch (w.key) { case "Control": a.ctrl = !0; break; case "Meta": a.command = !0, a.win = !0; break; case "Shift": a.shift = !0; break; case "Tab": a.tab = !0; break; } i !== void 0 && Object.keys(i).forEach((P) => { if (P !== w.key) return; const $ = i[P]; if (typeof $ == "function") $(w); else { const { stop: T = !1, prevent: z = !1 } = $; T && w.stopPropagation(), z && w.preventDefault(), $.handler(w); } }); }, v = (w) => { switch (w.key) { case "Control": a.ctrl = !1; break; case "Meta": a.command = !1, a.win = !1; break; case "Shift": a.shift = !1; break; case "Tab": a.tab = !1; break; } o !== void 0 && Object.keys(o).forEach((P) => { if (P !== w.key) return; const $ = o[P]; if (typeof $ == "function") $(w); else { const { stop: T = !1, prevent: z = !1 } = $; T && w.stopPropagation(), z && w.preventDefault(), $.handler(w); } }); }, b = () => { (n === void 0 || n.value) && (Et("keydown", document, h), Et("keyup", document, v)), n !== void 0 && Fa(n, (w) => { w ? (Et("keydown", document, h), Et("keyup", document, v)) : (bt("keydown", document, h), bt("keyup", document, v)); }); }; return zu() ? (xu(b), sa(() => { (n === void 0 || n.value) && (bt("keydown", document, h), bt("keyup", document, v)); })) : b(), Bt(a); } const vC = typeof window > "u" ? !1 : fW || window.safari !== void 0; function gC() { return vC; } const bC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, onFontsReady: cW, useBreakpoint: hC, useBreakpoints: lh, useClickPosition: tC, useClicked: nC, useCompitable: uC, useFalseUntilTruthy: lW, useIsIos: lC, useIsMounted: hW, useIsSafari: gC, useKeyboard: fC, useMemo: Wn, useMergedState: dC, useOsTheme: sC }, Symbol.toStringTag, { value: "Module" })), pC = /* @__PURE__ */ xn(bC); let _u = []; const vW = /* @__PURE__ */ new WeakMap(); function yC() { _u.forEach((e) => e(...vW.get(e))), _u = []; } function xh(e, ...n) { vW.set(e, n), !_u.includes(e) && _u.push(e) === 1 && requestAnimationFrame(yC); } let ch = [], mh = []; function wC() { ch.forEach((e, n) => e(...mh[n])), ch = [], mh = []; } function PC(e, ...n) { ch.push(e) === 1 && requestAnimationFrame(wC), mh.push(n); } function MC(e) { return e.nodeType === 9 ? null : e.parentNode; } function gW(e) { if (e === null) return null; const n = MC(e); if (n === null) return null; if (n.nodeType === 9) return document.documentElement; if (n.nodeType === 1) { const { overflow: a, overflowX: i, overflowY: o } = getComputedStyle(n); if (/(auto|scroll|overlay)/.test(a + o + i)) return n; } return gW(n); } function $C(e) { return typeof e == "string" ? document.querySelector(e) : typeof e == "function" ? e() : e; } function kC(e, n) { let { target: a } = e; for (; a; ) { if (a.dataset && a.dataset[n] !== void 0) return !0; a = a.parentElement; } return !1; } function bW(e) { return e.composedPath()[0] || null; } function pW(e) { if (typeof e == "number") return { "": e.toString() }; const n = {}; return e.split(/ +/).forEach((a) => { if (a === "") return; const [i, o] = a.split(":"); o === void 0 ? n[""] = i : n[i] = o; }), n; } function _C(e, n) { var a; if (e == null) return; const i = pW(e); if (n === void 0) return i[""]; if (typeof n == "string") return (a = i[n]) !== null && a !== void 0 ? a : i[""]; if (Array.isArray(n)) { for (let o = n.length - 1; o >= 0; --o) { const h = n[o]; if (h in i) return i[h]; } return i[""]; } else { let o, h = -1; return Object.keys(i).forEach((v) => { const b = Number(v); !Number.isNaN(b) && n >= b && b >= h && (h = b, o = i[v]); }), o; } } function hh(e) { return typeof e == "string" ? e.endsWith("px") ? Number(e.slice(0, e.length - 2)) : Number(e) : e; } function Jn(e) { if (e != null) return typeof e == "number" ? `${e}px` : e.endsWith("px") ? e : `${e}px`; } function S_(e, n) { const a = e.trim().split(/\s+/g), i = { top: a[0] }; switch (a.length) { case 1: i.right = a[0], i.bottom = a[0], i.left = a[0]; break; case 2: i.right = a[1], i.left = a[1], i.bottom = a[0]; break; case 3: i.right = a[1], i.bottom = a[2], i.left = a[1]; break; case 4: i.right = a[1], i.bottom = a[2], i.left = a[3]; break; default: throw new Error("[seemly/getMargin]:" + e + " is not a valid value."); } return n === void 0 ? i : i[n]; } function FC(e, n) { const [a, i] = e.split(" "); return n ? n === "row" ? a : i : { row: a, col: i || a }; } const L_ = { black: "#000", silver: "#C0C0C0", gray: "#808080", white: "#FFF", maroon: "#800000", red: "#F00", purple: "#800080", fuchsia: "#F0F", green: "#008000", lime: "#0F0", olive: "#808000", yellow: "#FF0", navy: "#000080", blue: "#00F", teal: "#008080", aqua: "#0FF", transparent: "#0000" }; function WC(e, n, a) { n /= 100, a /= 100; const i = n * Math.min(a, 1 - a) + a; return [e, i ? (2 - 2 * a / i) * 100 : 0, i * 100]; } function xC(e, n, a) { n /= 100, a /= 100; const i = a - a * n / 2, o = Math.min(i, 1 - i); return [e, o ? (a - i) / o * 100 : 0, i * 100]; } function zC(e, n, a) { n /= 100, a /= 100; let i = (o, h = (o + e / 60) % 6) => a - a * n * Math.max(Math.min(h, 4 - h, 1), 0); return [i(5) * 255, i(3) * 255, i(1) * 255]; } function DC(e, n, a) { e /= 255, n /= 255, a /= 255; let i = Math.max(e, n, a), o = i - Math.min(e, n, a), h = o && (i == e ? (n - a) / o : i == n ? 2 + (a - e) / o : 4 + (e - n) / o); return [60 * (h < 0 ? h + 6 : h), i && o / i * 100, i * 100]; } function jC(e, n, a) { e /= 255, n /= 255, a /= 255; let i = Math.max(e, n, a), o = i - Math.min(e, n, a), h = 1 - Math.abs(i + i - o - 1), v = o && (i == e ? (n - a) / o : i == n ? 2 + (a - e) / o : 4 + (e - n) / o); return [60 * (v < 0 ? v + 6 : v), h ? o / h * 100 : 0, (i + i - o) * 50]; } function TC(e, n, a) { n /= 100, a /= 100; let i = n * Math.min(a, 1 - a), o = (h, v = (h + e / 30) % 12) => a - i * Math.max(Math.min(v - 3, 9 - v, 1), -1); return [o(0) * 255, o(8) * 255, o(4) * 255]; } const ua = "^\\s*", la = "\\s*$", Va = "\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))%\\s*", Ft = "\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*", Pn = "([0-9A-Fa-f])", Mn = "([0-9A-Fa-f]{2})", SC = new RegExp(`${ua}hsl\\s*\\(${Ft},${Va},${Va}\\)${la}`), LC = new RegExp(`${ua}hsv\\s*\\(${Ft},${Va},${Va}\\)${la}`), CC = new RegExp(`${ua}hsla\\s*\\(${Ft},${Va},${Va},${Ft}\\)${la}`), EC = new RegExp(`${ua}hsva\\s*\\(${Ft},${Va},${Va},${Ft}\\)${la}`), OC = new RegExp(`${ua}rgb\\s*\\(${Ft},${Ft},${Ft}\\)${la}`), NC = new RegExp(`${ua}rgba\\s*\\(${Ft},${Ft},${Ft},${Ft}\\)${la}`), zh = new RegExp(`${ua}#${Pn}${Pn}${Pn}${la}`), Dh = new RegExp(`${ua}#${Mn}${Mn}${Mn}${la}`), jh = new RegExp(`${ua}#${Pn}${Pn}${Pn}${Pn}${la}`), Th = new RegExp(`${ua}#${Mn}${Mn}${Mn}${Mn}${la}`); function vt(e) { return parseInt(e, 16); } function AC(e) { try { let n; if (n = CC.exec(e)) return [ Gt(n[1]), Ne(n[5]), Ne(n[9]), oa(n[13]) ]; if (n = SC.exec(e)) return [Gt(n[1]), Ne(n[5]), Ne(n[9]), 1]; throw new Error(`[seemly/hsla]: Invalid color value ${e}.`); } catch (n) { throw n; } } function RC(e) { try { let n; if (n = EC.exec(e)) return [ Gt(n[1]), Ne(n[5]), Ne(n[9]), oa(n[13]) ]; if (n = LC.exec(e)) return [Gt(n[1]), Ne(n[5]), Ne(n[9]), 1]; throw new Error(`[seemly/hsva]: Invalid color value ${e}.`); } catch (n) { throw n; } } function Xa(e) { try { let n; if (n = Dh.exec(e)) return [vt(n[1]), vt(n[2]), vt(n[3]), 1]; if (n = OC.exec(e)) return [Le(n[1]), Le(n[5]), Le(n[9]), 1]; if (n = NC.exec(e)) return [ Le(n[1]), Le(n[5]), Le(n[9]), oa(n[13]) ]; if (n = zh.exec(e)) return [ vt(n[1] + n[1]), vt(n[2] + n[2]), vt(n[3] + n[3]), 1 ]; if (n = Th.exec(e)) return [ vt(n[1]), vt(n[2]), vt(n[3]), oa(vt(n[4]) / 255) ]; if (n = jh.exec(e)) return [ vt(n[1] + n[1]), vt(n[2] + n[2]), vt(n[3] + n[3]), oa(vt(n[4] + n[4]) / 255) ]; if (e in L_) return Xa(L_[e]); throw new Error(`[seemly/rgba]: Invalid color value ${e}.`); } catch (n) { throw n; } } function HC(e) { return e > 1 ? 1 : e < 0 ? 0 : e; } function IC(e, n, a) { return `rgb(${Le(e)}, ${Le(n)}, ${Le(a)})`; } function fh(e, n, a, i) { return `rgba(${Le(e)}, ${Le(n)}, ${Le(a)}, ${HC(i)})`; } function oc(e, n, a, i, o) { return Le((e * n * (1 - i) + a * i) / o); } function VC(e, n) { Array.isArray(e) || (e = Xa(e)), Array.isArray(n) || (n = Xa(n)); const a = e[3], i = n[3], o = oa(a + i - a * i); return fh(oc(e[0], a, n[0], i, o), oc(e[1], a, n[1], i, o), oc(e[2], a, n[2], i, o), o); } function XC(e, n) { const [a, i, o, h = 1] = Array.isArray(e) ? e : Xa(e); return n.alpha ? fh(a, i, o, n.alpha) : fh(a, i, o, h); } function qC(e, n) { const [a, i, o, h = 1] = Array.isArray(e) ? e : Xa(e), { lightness: v = 1, alpha: b = 1 } = n; return wW([a * v, i * v, o * v, h * b]); } function yW(e) { var n; return (n = (Array.isArray(e) ? e : Xa(e))[3]) !== null && n !== void 0 ? n : 1; } function YC(e) { return `${yW(e)}`; } function oa(e) { const n = Math.round(Number(e) * 100) / 100; return n > 1 ? 1 : n < 0 ? 0 : n; } function Gt(e) { const n = Math.round(Number(e)); return n >= 360 || n < 0 ? 0 : n; } function Le(e) { const n = Math.round(Number(e)); return n > 255 ? 255 : n < 0 ? 0 : n; } function Ne(e) { const n = Math.round(Number(e)); return n > 100 ? 100 : n < 0 ? 0 : n; } function BC(e) { const [n, a, i] = Array.isArray(e) ? e : Xa(e); return IC(n, a, i); } function wW(e) { const [n, a, i] = e; return 3 in e ? `rgba(${Le(n)}, ${Le(a)}, ${Le(i)}, ${oa(e[3])})` : `rgba(${Le(n)}, ${Le(a)}, ${Le(i)}, 1)`; } function GC(e) { return `hsv(${Gt(e[0])}, ${Ne(e[1])}%, ${Ne(e[2])}%)`; } function KC(e) { const [n, a, i] = e; return 3 in e ? `hsva(${Gt(n)}, ${Ne(a)}%, ${Ne(i)}%, ${oa(e[3])})` : `hsva(${Gt(n)}, ${Ne(a)}%, ${Ne(i)}%, 1)`; } function QC(e) { return `hsl(${Gt(e[0])}, ${Ne(e[1])}%, ${Ne(e[2])}%)`; } function JC(e) { const [n, a, i] = e; return 3 in e ? `hsla(${Gt(n)}, ${Ne(a)}%, ${Ne(i)}%, ${oa(e[3])})` : `hsla(${Gt(n)}, ${Ne(a)}%, ${Ne(i)}%, 1)`; } function ZC(e) { if (typeof e == "string") { let i; if (i = Dh.exec(e)) return `${i[0]}FF`; if (i = Th.exec(e)) return i[0]; if (i = zh.exec(e)) return `#${i[1]}${i[1]}${i[2]}${i[2]}${i[3]}${i[3]}FF`; if (i = jh.exec(e)) return `#${i[1]}${i[1]}${i[2]}${i[2]}${i[3]}${i[3]}${i[4]}${i[4]}`; throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`); } const n = `#${e.slice(0, 3).map((i) => Le(i).toString(16).toUpperCase().padStart(2, "0")).join("")}`, a = e.length === 3 ? "FF" : Le(e[3] * 255).toString(16).padStart(2, "0").toUpperCase(); return n + a; } function UC(e) { if (typeof e == "string") { let n; if (n = Dh.exec(e)) return n[0]; if (n = Th.exec(e)) return n[0].slice(0, 7); if (n = zh.exec(e) || jh.exec(e)) return `#${n[1]}${n[1]}${n[2]}${n[2]}${n[3]}${n[3]}`; throw new Error(`[seemly/toHexString]: Invalid hex value ${e}.`); } return `#${e.slice(0, 3).map((n) => Le(n).toString(16).toUpperCase().padStart(2, "0")).join("")}`; } function PW(e = 8) { return Math.random().toString(16).slice(2, 2 + e); } function eE(e, n) { const a = []; for (let i = 0; i < e; ++i) a.push(n); return a; } function tE(e, n) { const a = []; if (!n) { for (let i = 0; i < e; ++i) a.push(i); return a; } for (let i = 0; i < e; ++i) a.push(n(i)); return a; } async function aE(e) { return new Promise((n) => { setTimeout(n, e); }); } const nE = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, beforeNextFrame: PC, beforeNextFrameOnce: xh, changeColor: XC, composite: VC, createId: PW, depx: hh, getAlpha: yW, getAlphaString: YC, getGap: FC, getMargin: S_, getPadding: S_, getPreciseEventTarget: bW, getScrollParent: gW, happensIn: kC, hsl2hsv: WC, hsl2rgb: TC, hsla: AC, hsv2hsl: xC, hsv2rgb: zC, hsva: RC, indexMap: tE, parseResponsiveProp: pW, parseResponsivePropValue: _C, pxfy: Jn, repeat: eE, rgb2hsl: jC, rgb2hsv: DC, rgba: Xa, roundAlpha: oa, roundChannel: Le, roundDeg: Gt, roundPercent: Ne, scaleColor: qC, sleep: aE, toHexString: UC, toHexaString: ZC, toHslString: QC, toHslaString: JC, toHsvString: GC, toHsvaString: KC, toRgbString: BC, toRgbaString: wW, unwrapElement: $C }, Symbol.toStringTag, { value: "Module" })), Sh = /* @__PURE__ */ xn(nE); function vh(e, n, a = "default") { const i = n[a]; if (i === void 0) throw new Error(`[vueuc/${e}]: slot[${a}] is empty.`); return i(); } function gh(e, n = !0, a = []) { return e.forEach((i) => { if (i !== null) { if (typeof i != "object") { (typeof i == "string" || typeof i == "number") && a.push(I2(String(i))); return; } if (Array.isArray(i)) { gh(i, n, a); return; } if (i.type === iW) { if (i.children === null) return; Array.isArray(i.children) && gh(i.children, n, a); } else i.type !== V2 && a.push(i); } }), a; } function C_(e, n, a = "default") { const i = n[a]; if (i === void 0) throw new Error(`[vueuc/${e}]: slot[${a}] is empty.`); const o = gh(i()); if (o.length === 1) return o[0]; throw new Error(`[vueuc/${e}]: slot[${a}] should have exactly one child.`); } let Aa = null; function MW() { if (Aa === null && (Aa = document.getElementById("v-binder-view-measurer"), Aa === null)) { Aa = document.createElement("div"), Aa.id = "v-binder-view-measurer"; const { style: e } = Aa; e.position = "fixed", e.left = "0", e.right = "0", e.top = "0", e.bottom = "0", e.pointerEvents = "none", e.visibility = "hidden", document.body.appendChild(Aa); } return Aa.getBoundingClientRect(); } function rE(e, n) { const a = MW(); return { top: n, left: e, height: 0, width: 0, right: a.width - e, bottom: a.height - n }; } function sc(e) { const n = e.getBoundingClientRect(), a = MW(); return { left: n.left - a.left, top: n.top - a.top, bottom: a.height + a.top - n.bottom, right: a.width + a.left - n.right, width: n.width, height: n.height }; } function iE(e) { return e.nodeType === 9 ? null : e.parentNode; } function $W(e) { if (e === null) return null; const n = iE(e); if (n === null) return null; if (n.nodeType === 9) return document; if (n.nodeType === 1) { const { overflow: a, overflowX: i, overflowY: o } = getComputedStyle(n); if (/(auto|scroll|overlay)/.test(a + o + i)) return n; } return $W(n); } const E_ = da({ name: "Binder", props: { syncTargetWithParent: Boolean, syncTarget: { type: Boolean, default: !0 } }, setup(e) { var n; oW("VBinder", (n = Wh()) === null || n === void 0 ? void 0 : n.proxy); const a = ud("VBinder", null), i = je(null), o = (F) => { i.value = F, a && e.syncTargetWithParent && a.setTargetRef(F); }; let h = []; const v = () => { let F = i.value; for (; F = $W(F), F !== null; ) h.push(F); for (const B of h) Et("scroll", B, T, !0); }, b = () => { for (const F of h) bt("scroll", F, T, !0); h = []; }, w = /* @__PURE__ */ new Set(), P = (F) => { w.size === 0 && v(), w.has(F) || w.add(F); }, $ = (F) => { w.has(F) && w.delete(F), w.size === 0 && b(); }, T = () => { xh(z); }, z = () => { w.forEach((F) => F()); }, L = /* @__PURE__ */ new Set(), k = (F) => { L.size === 0 && Et("resize", window, D), L.has(F) || L.add(F); }, I = (F) => { L.has(F) && L.delete(F), L.size === 0 && bt("resize", window, D); }, D = () => { L.forEach((F) => F()); }; return sa(() => { bt("resize", window, D), b(); }), { targetRef: i, setTargetRef: o, addScrollListener: P, removeScrollListener: $, addResizeListener: k, removeResizeListener: I }; }, render() { return vh("binder", this.$slots); } }), O_ = da({ name: "Target", setup() { const { setTargetRef: e, syncTarget: n } = ud("VBinder"); return { syncTarget: n, setTargetDirective: { mounted: e, updated: e } }; }, render() { const { syncTarget: e, setTargetDirective: n } = this; return e ? sW(C_("follower", this.$slots), [ [n] ]) : C_("follower", this.$slots); } }); function oE(e, n) { console.error(`[vdirs/${e}]: ${n}`); } class sE { constructor() { this.elementZIndex = /* @__PURE__ */ new Map(), this.nextZIndex = 2e3; } get elementCount() { return this.elementZIndex.size; } ensureZIndex(n, a) { const { elementZIndex: i } = this; if (a !== void 0) { n.style.zIndex = `${a}`, i.delete(n); return; } const { nextZIndex: o } = this; i.has(n) && i.get(n) + 1 === this.nextZIndex || (n.style.zIndex = `${o}`, i.set(n, o), this.nextZIndex = o + 1, this.squashState()); } unregister(n, a) { const { elementZIndex: i } = this; i.has(n) ? i.delete(n) : a === void 0 && oE("z-index-manager/unregister-element", "Element not found when unregistering."), this.squashState(); } squashState() { const { elementCount: n } = this; n || (this.nextZIndex = 2e3), this.nextZIndex - n > 2500 && this.rearrange(); } rearrange() { const n = Array.from(this.elementZIndex.entries()); n.sort((a, i) => a[1] - i[1]), this.nextZIndex = 2e3, n.forEach((a) => { const i = a[0], o = this.nextZIndex++; `${o}` !== i.style.zIndex && (i.style.zIndex = `${o}`); }); } } const dc = new sE(), Qn = "@@ziContext", dE = { mounted(e, n) { const { value: a = {} } = n, { zIndex: i, enabled: o } = a; e[Qn] = { enabled: !!o, initialized: !1 }, o && (dc.ensureZIndex(e, i), e[Qn].initialized = !0); }, updated(e, n) { const { value: a = {} } = n, { zIndex: i, enabled: o } = a, h = e[Qn].enabled; o && !h && (dc.ensureZIndex(e, i), e[Qn].initialized = !0), e[Qn].enabled = !!o; }, unmounted(e, n) { if (!e[Qn].initialized) return; const { value: a = {} } = n, { zIndex: i } = a; dc.unregister(e, i); } }, kW = "@css-render/vue3-ssr"; function uE(e, n) { return `<style cssr-id="${e}"> ${n} </style>`; } function lE(e, n, a) { const { styles: i, ids: o } = a; o.has(e) || i !== null && (o.add(e), i.push(uE(e, n))); } const cE = typeof document < "u"; function cd() { if (cE) return; const e = ud(kW, null); if (e !== null) return { adapter: (n, a) => lE(n, a, e), context: e }; } function mE(e) { const n = [], a = { styles: n, ids: /* @__PURE__ */ new Set() }; return e.provide(kW, a), { collect() { const i = n.join(` `); return n.length = 0, i; } }; } const hE = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, setup: mE, useSsrAdapter: cd }, Symbol.toStringTag, { value: "Module" })); function N_(e, n) { console.error(`[vueuc/${e}]: ${n}`); } function fE(e) { let n = 0; for (let a = 0; a < e.length; ++a) e[a] === "&" && ++n; return n; } const _W = /\s*,(?![^(]*\))\s*/g, vE = /\s+/g; function gE(e, n) { const a = []; return n.split(_W).forEach((i) => { let o = fE(i); if (o) { if (o === 1) { e.forEach((v) => { a.push(i.replace("&", v)); }); return; } } else { e.forEach((v) => { a.push( // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions (v && v + " ") + i ); }); return; } let h = [ i ]; for (; o--; ) { const v = []; h.forEach((b) => { e.forEach((w) => { v.push(b.replace("&", w)); }); }), h = v; } h.forEach((v) => a.push(v)); }), a; } function bE(e, n) { const a = []; return n.split(_W).forEach((i) => { e.forEach((o) => { a.push((o && o + " ") + i); }); }), a; } function pE(e) { let n = [""]; return e.forEach((a) => { a = a && a.trim(), // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions a && (a.includes("&") ? n = gE(n, a) : n = bE(n, a)); }), n.join(", ").replace(vE, " "); } function A_(e) { if (!e) return; const n = e.parentElement; n && n.removeChild(e); } function Du(e, n) { return (n ?? document.head).querySelector(`style[cssr-id="${e}"]`); } function yE(e) { const n = document.createElement("style"); return n.setAttribute("cssr-id", e), n; } function lu(e) { return e ? /^\s*@(s|m)/.test(e) : !1; } const wE = /[A-Z]/g; function FW(e) { return e.replace(wE, (n) => "-" + n.toLowerCase()); } function PE(e, n = " ") { return typeof e == "object" && e !== null ? ` { ` + Object.entries(e).map((a) => n + ` ${FW(a[0])}: ${a[1]};`).join(` `) + ` ` + n + "}" : `: ${e};`; } function ME(e, n, a) { return typeof e == "function" ? e({ context: n.context, props: a }) : e; } function R_(e, n, a, i) { if (!n) return ""; const o = ME(n, a, i); if (!o) return ""; if (typeof o == "string") return `${e} { ${o} }`; const h = Object.keys(o); if (h.length === 0) return a.config.keepEmptyBlock ? e + ` { }` : ""; const v = e ? [ e + " {" ] : []; return h.forEach((b) => { const w = o[b]; if (b === "raw") { v.push(` ` + w + ` `); return; } b = FW(b), w != null && v.push(` ${b}${PE(w)}`); }), e && v.push("}"), v.join(` `); } function bh(e, n, a) { e && e.forEach((i) => { if (Array.isArray(i)) bh(i, n, a); else if (typeof i == "function") { const o = i(n); Array.isArray(o) ? bh(o, n, a) : o && a(o); } else i && a(i); }); } function WW(e, n, a, i, o) { const h = e.$; let v = ""; if (!h || typeof h == "string") lu(h) ? v = h : n.push(h); else if (typeof h == "function") { const P = h({ context: i.context, props: o }); lu(P) ? v = P : n.push(P); } else if (h.before && h.before(i.context), !h.$ || typeof h.$ == "string") lu(h.$) ? v = h.$ : n.push(h.$); else if (h.$) { const P = h.$({ context: i.context, props: o }); lu(P) ? v = P : n.push(P); } const b = pE(n), w = R_(b, e.props, i, o); v ? a.push(`${v} {`) : w.length && a.push(w), e.children && bh(e.children, { context: i.context, props: o }, (P) => { if (typeof P == "string") { const $ = R_(b, { raw: P }, i, o); a.push($); } else WW(P, n, a, i, o); }), n.pop(), v && a.push("}"), h && h.after && h.after(i.context); } function $E(e, n, a) { const i = []; return WW(e, [], i, n, a), i.join(` `); } function xW(e) { for (var n = 0, a, i = 0, o = e.length; o >= 4; ++i, o -= 4) a = e.charCodeAt(i) & 255 | (e.charCodeAt(++i) & 255) << 8 | (e.charCodeAt(++i) & 255) << 16 | (e.charCodeAt(++i) & 255) << 24, a = /* Math.imul(k, m): */ (a & 65535) * 1540483477 + ((a >>> 16) * 59797 << 16), a ^= /* k >>> r: */ a >>> 24, n = /* Math.imul(k, m): */ (a & 65535) * 1540483477 + ((a >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */ (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16); switch (o) { case 3: n ^= (e.charCodeAt(i + 2) & 255) << 16; case 2: n ^= (e.charCodeAt(i + 1) & 255) << 8; case 1: n ^= e.charCodeAt(i) & 255, n = /* Math.imul(h, m): */ (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16); } return n ^= n >>> 13, n = /* Math.imul(h, m): */ (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), ((n ^ n >>> 15) >>> 0).toString(36); } typeof window < "u" && (window.__cssrContext = {}); function kE(e, n, a, i) { const { els: o } = n; if (a === void 0) o.forEach(A_), n.els = []; else { const h = Du(a, i); h && o.includes(h) && (A_(h), n.els = o.filter((v) => v !== h)); } } function H_(e, n) { e.push(n); } function _E(e, n, a, i, o, h, v, b, w) { let P; if (a === void 0 && (P = n.render(i), a = xW(P)), w) { w.adapter(a, P ?? n.render(i)); return; } b === void 0 && (b = document.head); const $ = Du(a, b); if ($ !== null && !h) return $; const T = $ ?? yE(a); if (P === void 0 && (P = n.render(i)), T.textContent = P, $ !== null) return $; if (v) { const z = b.querySelector(`meta[name="${v}"]`); if (z) return b.insertBefore(T, z), H_(n.els, T), T; } return o ? b.insertBefore(T, b.querySelector("style, link")) : b.appendChild(T), H_(n.els, T), T; } function FE(e) { return $E(this, this.instance, e); } function WE(e = {}) { const { id: n, ssr: a, props: i, head: o = !1, force: h = !1, anchorMetaName: v, parent: b } = e; return _E(this.instance, this, n, i, o, h, v, b, a); } function xE(e = {}) { const { id: n, parent: a } = e; kE(this.instance, this, n, a); } const cu = function(e, n, a, i) { return { instance: e, $: n, props: a, children: i, els: [], render: FE, mount: WE, unmount: xE }; }, zE = function(e, n, a, i) { return Array.isArray(n) ? cu(e, { $: null }, null, n) : Array.isArray(a) ? cu(e, n, null, a) : Array.isArray(i) ? cu(e, n, a, i) : cu(e, n, a, null); }; function ph(e = {}) { const n = { c: (...a) => zE(n, ...a), use: (a, ...i) => a.install(n, ...i), find: Du, context: {}, config: e }; return n; } function DE(e, n) { if (e === void 0) return !1; if (n) { const { context: { ids: a } } = n; return a.has(e); } return Du(e) !== null; } const jE = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, CssRender: ph, default: ph, exists: DE, hash: xW }, Symbol.toStringTag, { value: "Module" })), { c: ra } = ph(), ju = "vueuc-style"; function I_(e) { return e & -e; } class zW { /** * @param l length of the array * @param min min value of the array */ constructor(n, a) { this.l = n, this.min = a; const i = new Array(n + 1); for (let o = 0; o < n + 1; ++o) i[o] = 0; this.ft = i; } /** * Add arr[i] by n, start from 0 * @param i the index of the element to be added * @param n the value to be added */ add(n, a) { if (a === 0) return; const { l: i, ft: o } = this; for (n += 1; n <= i; ) o[n] += a, n += I_(n); } /** * Get the value of index i * @param i index * @returns value of the index */ get(n) { return this.sum(n + 1) - this.sum(n); } /** * Get the sum of first i elements * @param i count of head elements to be added * @returns the sum of first i elements */ sum(n) { if (n === void 0 && (n = this.l), n <= 0) return 0; const { ft: a, min: i, l: o } = this; if (n > o) throw new Error("[FinweckTree.sum]: `i` is larger than length."); let h = n * i; for (; n > 0; ) h += a[n], n -= I_(n); return h; } /** * Get the largest count of head elements whose sum are <= threshold * @param threshold * @returns the largest count of head elements whose sum are <= threshold */ getBound(n) { let a = 0, i = this.l; for (; i > a; ) { const o = Math.floor((a + i) / 2), h = this.sum(o); if (h > n) { i = o; continue; } else if (h < n) { if (a === o) return this.sum(a + 1) <= n ? a + 1 : o; a = o; } else return o; } return a; } } function V_(e) { return typeof e == "string" ? document.querySelector(e) : e(); } const yh = da({ name: "LazyTeleport", props: { to: { type: [String, Object], default: void 0 }, disabled: Boolean, show: { type: Boolean, required: !0 } }, setup(e) { return { showTeleport: lW(kn(e, "show")), mergedTo: ut(() => { const { to: n } = e; return n ?? "body"; }) }; }, render() { return this.showTeleport ? this.disabled ? vh("lazy-teleport", this.$slots) : Be(X2, { disabled: this.disabled, to: this.mergedTo }, vh("lazy-teleport", this.$slots)) : null; } }), mu = { top: "bottom", bottom: "top", left: "right", right: "left" }, X_ = { start: "end", center: "center", end: "start" }, uc = { top: "height", bottom: "height", left: "width", right: "width" }, TE = { "bottom-start": "top left", bottom: "top center", "bottom-end": "top right", "top-start": "bottom left", top: "bottom center", "top-end": "bottom right", "right-start": "top left", right: "center left", "right-end": "bottom left", "left-start": "top right", left: "center right", "left-end": "bottom right" }, SE = { "bottom-start": "bottom left", bottom: "bottom center", "bottom-end": "bottom right", "top-start": "top left", top: "top center", "top-end": "top right", "right-start": "top right", right: "center right", "right-end": "bottom right", "left-start": "top left", left: "center left", "left-end": "bottom left" }, LE = { "bottom-start": "right", "bottom-end": "left", "top-start": "right", "top-end": "left", "right-start": "bottom", "right-end": "top", "left-start": "bottom", "left-end": "top" }, q_ = { top: !0, bottom: !1, left: !0, right: !1 // left-- }, Y_ = { top: "end", bottom: "start", left: "end", right: "start" }; function CE(e, n, a, i, o, h) { if (!o || h) return { placement: e, top: 0, left: 0 }; const [v, b] = e.split("-"); let w = b ?? "center", P = { top: 0, left: 0 }; const $ = (L, k, I) => { let D = 0, F = 0; const B = a[L] - n[k] - n[L]; return B > 0 && i && (I ? F = q_[k] ? B : -B : D = q_[k] ? B : -B), { left: D, top: F }; }, T = v === "left" || v === "right"; if (w !== "center") { const L = LE[e], k = mu[L], I = uc[L]; if (a[I] > n[I]) { if ( // current space is not enough // ----------[ target ]---------| // -------[ follower ] n[L] + n[I] < a[I] ) { const D = (a[I] - n[I]) / 2; n[L] < D || n[k] < D ? n[L] < n[k] ? (w = X_[b], P = $(I, k, T)) : P = $(I, L, T) : w = "center"; } } else a[I] < n[I] && n[k] < 0 && // opposite align has larger space // ------------[ target ] // ----------------[follower] n[L] > n[k] && (w = X_[b]); } else { const L = v === "bottom" || v === "top" ? "left" : "top", k = mu[L], I = uc[L], D = (a[I] - n[I]) / 2; // center is not enough // ----------- [ target ]--| // -------[ follower ] (n[L] < D || n[k] < D) && (n[L] > n[k] ? (w = Y_[L], P = $(I, L, T)) : (w = Y_[k], P = $(I, k, T))); } let z = v; return ( // space is not enough n[v] < a[uc[v]] && // opposite position's space is larger n[v] < n[mu[v]] && (z = mu[v]), { placement: w !== "center" ? `${z}-${w}` : z, left: P.left, top: P.top } ); } function EE(e, n) { return n ? SE[e] : TE[e]; } function OE(e, n, a, i, o, h) { if (h) switch (e) { case "bottom-start": return { top: `${Math.round(a.top - n.top + a.height)}px`, left: `${Math.round(a.left - n.left)}px`, transform: "translateY(-100%)" }; case "bottom-end": return { top: `${Math.round(a.top - n.top + a.height)}px`, left: `${Math.round(a.left - n.left + a.width)}px`, transform: "translateX(-100%) translateY(-100%)" }; case "top-start": return { top: `${Math.round(a.top - n.top)}px`, left: `${Math.round(a.left - n.left)}px`, transform: "" }; case "top-end": return { top: `${Math.round(a.top - n.top)}px`, left: `${Math.round(a.left - n.left + a.width)}px`, transform: "translateX(-100%)" }; case "right-start": return { top: `${Math.round(a.top - n.top)}px`, left: `${Math.round(a.left - n.left + a.width)}px`, transform: "translateX(-100%)" }; case "right-end": return { top: `${Math.round(a.top - n.top + a.height)}px`, left: `${Math.round(a.left - n.left + a.width)}px`, transform: "translateX(-100%) translateY(-100%)" }; case "left-start": return { top: `${Math.round(a.top - n.top)}px`, left: `${Math.round(a.left - n.left)}px`, transform: "" }; case "left-end": return { top: `${Math.round(a.top - n.top + a.height)}px`, left: `${Math.round(a.left - n.left)}px`, transform: "translateY(-100%)" }; case "top": return { top: `${Math.round(a.top - n.top)}px`, left: `${Math.round(a.left - n.left + a.width / 2)}px`, transform: "translateX(-50%)" }; case "right": return { top: `${Math.round(a.top - n.top + a.height / 2)}px`, left: `${Math.round(a.left - n.left + a.width)}px`, transform: "translateX(-100%) translateY(-50%)" }; case "left": return { top: `${Math.round(a.top - n.top + a.height / 2)}px`, left: `${Math.round(a.left - n.left)}px`, transform: "translateY(-50%)" }; case "bottom": default: return { top: `${Math.round(a.top - n.top + a.height)}px`, left: `${Math.round(a.left - n.left + a.width / 2)}px`, transform: "translateX(-50%) translateY(-100%)" }; } switch (e) { case "bottom-start": return { top: `${Math.round(a.top - n.top + a.height + i)}px`, left: `${Math.round(a.left - n.left + o)}px`, transform: "" }; case "bottom-end": return { top: `${Math.round(a.top - n.top + a.height + i)}px`, left: `${Math.round(a.left - n.left + a.width + o)}px`, transform: "translateX(-100%)" }; case "top-start": return { top: `${Math.round(a.top - n.top + i)}px`, left: `${Math.round(a.left - n.left + o)}px`, transform: "translateY(-100%)" }; case "top-end": return { top: `${Math.round(a.top - n.top + i)}px`, left: `${Math.round(a.left - n.left + a.width + o)}px`, transform: "translateX(-100%) translateY(-100%)" }; case "right-start": return { top: `${Math.round(a.top - n.top + i)}px`, left: `${Math.round(a.left - n.left + a.width + o)}px`, transform: "" }; case "right-end": return { top: `${Math.round(a.top - n.top + a.height + i)}px`, left: `${Math.round(a.left - n.left + a.width + o)}px`, transform: "translateY(-100%)" }; case "left-start": return { top: `${Math.round(a.top - n.top + i)}px`, left: `${Math.round(a.left - n.left + o)}px`, transform: "translateX(-100%)" }; case "left-end": return { top: `${Math.round(a.top - n.top + a.height + i)}px`, left: `${Math.round(a.left - n.left + o)}px`, transform: "translateX(-100%) translateY(-100%)" }; case "top": return { top: `${Math.round(a.top - n.top + i)}px`, left: `${Math.round(a.left - n.left + a.width / 2 + o)}px`, transform: "translateY(-100%) translateX(-50%)" }; case "right": return { top: `${Math.round(a.top - n.top + a.height / 2 + i)}px`, left: `${Math.round(a.left - n.left + a.width + o)}px`, transform: "translateY(-50%)" }; case "left": return { top: `${Math.round(a.top - n.top + a.height / 2 + i)}px`, left: `${Math.round(a.left - n.left + o)}px`, transform: "translateY(-50%) translateX(-100%)" }; case "bottom": default: return { top: `${Math.round(a.top - n.top + a.height + i)}px`, left: `${Math.round(a.left - n.left + a.width / 2 + o)}px`, transform: "translateX(-50%)" }; } } const NE = ra([ ra(".v-binder-follower-container", { position: "absolute", left: "0", right: "0", top: "0", height: "0", pointerEvents: "none", zIndex: "auto" }), ra(".v-binder-follower-content", { position: "absolute", zIndex: "auto" }, [ ra("> *", { pointerEvents: "all" }) ]) ]), B_ = da({ name: "Follower", inheritAttrs: !1, props: { show: Boolean, enabled: { type: