UNPKG

tiptapify

Version:

Tiptap3 editor with Vuetify3 menu implementation

1,758 lines 4.83 MB
import { reactive as O7, watchEffect as h0, toRef as U, capitalize as P9, shallowRef as w1, camelize as ea, isVNode as AM, Comment as hM, Fragment as p1, unref as Z, warn as Q8, getCurrentInstance as x9, inject as $, computed as k, provide as n5, ref as J, defineComponent as M1, h as L5, isRef as $6, toValue as W0, createElementVNode as w, normalizeClass as V1, createVNode as p, normalizeStyle as T1, TransitionGroup as ta, Transition as E7, mergeProps as f1, toRefs as vM, watch as y1, onBeforeMount as B9, nextTick as w2, onBeforeUnmount as c5, withDirectives as U2, vShow as C7, onScopeDispose as T5, effectScope as Y8, toRaw as X2, createBlock as h1, openBlock as Q, withCtx as S, createElementBlock as z1, renderList as t5, resolveDynamicComponent as Pt, Text as nl, useId as J0, onMounted as _5, onUpdated as bM, readonly as ra, toDisplayString as o1, Teleport as aa, createTextVNode as l1, markRaw as q1, onDeactivated as yM, createCommentVNode as I5, normalizeProps as SM, guardReactiveProps as ZM, onUnmounted as N9, cloneVNode as kM, renderSlot as Li, vModelText as FM, customRef as OM, render as ci, vModelSelect as EM } from "vue"; const N1 = { variantBtn: "flat", variantField: "solo" }, R2 = typeof window < "u", na = R2 && "IntersectionObserver" in window, ui = R2 && "EyeDropper" in window; function di(e, t, r) { wM(e, t), t.set(e, r); } function wM(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } function Mi(e, t, r) { return e.set(il(e, t), r), r; } function L3(e, t) { return e.get(il(e, t)); } function il(e, t, r) { if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : r; throw new TypeError("Private element is not present on this object"); } function ol(e, t, r) { const a = t.length - 1; if (a < 0) return e === void 0 ? r : e; for (let n = 0; n < a; n++) { if (e == null) return r; e = e[t[n]]; } return e == null || e[t[a]] === void 0 ? r : e[t[a]]; } function X5(e, t) { if (e === t) return !0; if (e instanceof Date && t instanceof Date && e.getTime() !== t.getTime() || e !== Object(e) || t !== Object(t)) return !1; const r = Object.keys(e); return r.length !== Object.keys(t).length ? !1 : r.every((a) => X5(e[a], t[a])); } function TM(e, t, r) { return e == null || !t || typeof t != "string" ? r : e[t] !== void 0 ? e[t] : (t = t.replace(/\[(\w+)\]/g, ".$1"), t = t.replace(/^\./, ""), ol(e, t.split("."), r)); } function m0(e, t, r) { if (t === !0) return e === void 0 ? r : e; if (t == null || typeof t == "boolean") return r; if (e !== Object(e)) { if (typeof t != "function") return r; const n = t(e, r); return typeof n > "u" ? r : n; } if (typeof t == "string") return TM(e, t, r); if (Array.isArray(t)) return ol(e, t, r); if (typeof t != "function") return r; const a = t(e, r); return typeof a > "u" ? r : a; } function _M(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; return Array.from({ length: e }, (r, a) => t + a); } function k1(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "px"; if (e == null || e === "") return; const r = Number(e); return isNaN(r) ? String(e) : isFinite(r) ? `${r}${t}` : void 0; } function z6(e) { return e !== null && typeof e == "object" && !Array.isArray(e); } function mi(e) { let t; return e !== null && typeof e == "object" && ((t = Object.getPrototypeOf(e)) === Object.prototype || t === null); } function Cl(e) { if (e && "$el" in e) { const t = e.$el; return (t == null ? void 0 : t.nodeType) === Node.TEXT_NODE ? t.nextElementSibling : t; } return e; } const PM = Object.freeze({ enter: "Enter", tab: "Tab", delete: "Delete", esc: "Escape", space: "Space", up: "ArrowUp", down: "ArrowDown", left: "ArrowLeft", right: "ArrowRight", end: "End", home: "Home", del: "Delete", backspace: "Backspace", insert: "Insert", pageup: "PageUp", pagedown: "PageDown", shift: "Shift" }); function sl(e) { return Object.keys(e); } function m7(e, t) { return t.every((r) => e.hasOwnProperty(r)); } function X8(e, t) { const r = {}; for (const a of t) Object.prototype.hasOwnProperty.call(e, a) && (r[a] = e[a]); return r; } function fi(e, t, r) { const a = /* @__PURE__ */ Object.create(null), n = /* @__PURE__ */ Object.create(null); for (const i in e) t.some((o) => o instanceof RegExp ? o.test(i) : o === i) ? a[i] = e[i] : n[i] = e[i]; return [a, n]; } function k0(e, t) { const r = { ...e }; return t.forEach((a) => delete r[a]), r; } const ll = /^on[^a-z]/, Hl = (e) => ll.test(e), xM = ["onAfterscriptexecute", "onAnimationcancel", "onAnimationend", "onAnimationiteration", "onAnimationstart", "onAuxclick", "onBeforeinput", "onBeforescriptexecute", "onChange", "onClick", "onCompositionend", "onCompositionstart", "onCompositionupdate", "onContextmenu", "onCopy", "onCut", "onDblclick", "onFocusin", "onFocusout", "onFullscreenchange", "onFullscreenerror", "onGesturechange", "onGestureend", "onGesturestart", "onGotpointercapture", "onInput", "onKeydown", "onKeypress", "onKeyup", "onLostpointercapture", "onMousedown", "onMousemove", "onMouseout", "onMouseover", "onMouseup", "onMousewheel", "onPaste", "onPointercancel", "onPointerdown", "onPointerenter", "onPointerleave", "onPointermove", "onPointerout", "onPointerover", "onPointerup", "onReset", "onSelect", "onSubmit", "onTouchcancel", "onTouchend", "onTouchmove", "onTouchstart", "onTransitioncancel", "onTransitionend", "onTransitionrun", "onTransitionstart", "onWheel"]; function D9(e) { const [t, r] = fi(e, [ll]), a = k0(t, xM), [n, i] = fi(r, ["class", "style", "id", /^data-/]); return Object.assign(n, t), Object.assign(i, a), [n, i]; } function g0(e) { return e == null ? [] : Array.isArray(e) ? e : [e]; } function BM(e, t) { let r = 0; const a = function() { for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o]; clearTimeout(r), r = setTimeout(() => e(...i), Z(t)); }; return a.clear = () => { clearTimeout(r); }, a.immediate = e, a; } function J2(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1; return Math.max(t, Math.min(r, e)); } function pi(e) { const t = e.toString().trim(); return t.includes(".") ? t.length - t.indexOf(".") - 1 : 0; } function gi(e, t) { let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "0"; return e + r.repeat(Math.max(0, t - e.length)); } function NM(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1; const r = []; let a = 0; for (; a < e.length; ) r.push(e.substr(a, t)), a += t; return r; } function g3() { let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 ? arguments[2] : void 0; const a = {}; for (const n in e) a[n] = e[n]; for (const n in t) { const i = e[n], o = t[n]; if (mi(i) && mi(o)) { a[n] = g3(i, o, r); continue; } if (r && Array.isArray(i) && Array.isArray(o)) { a[n] = r(i, o); continue; } a[n] = o; } return a; } function Vl(e) { return e.map((t) => t.type === p1 ? Vl(t.children) : t).flat(); } function v7() { let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ""; if (v7.cache.has(e)) return v7.cache.get(e); const t = e.replace(/[^a-z]/gi, "-").replace(/\B([A-Z])/g, "-$1").toLowerCase(); return v7.cache.set(e, t), t; } v7.cache = /* @__PURE__ */ new Map(); function $4(e, t) { if (!t || typeof t != "object") return []; if (Array.isArray(t)) return t.map((r) => $4(e, r)).flat(1); if (t.suspense) return $4(e, t.ssContent); if (Array.isArray(t.children)) return t.children.map((r) => $4(e, r)).flat(1); if (t.component) { if (Object.getOwnPropertySymbols(t.component.provides).includes(e)) return [t.component]; if (t.component.subTree) return $4(e, t.component.subTree).flat(1); } return []; } var K7 = /* @__PURE__ */ new WeakMap(), u7 = /* @__PURE__ */ new WeakMap(); class DM { constructor(t) { di(this, K7, []), di(this, u7, 0), this.size = t; } get isFull() { return L3(K7, this).length === this.size; } push(t) { L3(K7, this)[L3(u7, this)] = t, Mi(u7, this, (L3(u7, this) + 1) % this.size); } values() { return L3(K7, this).slice(L3(u7, this)).concat(L3(K7, this).slice(0, L3(u7, this))); } clear() { L3(K7, this).length = 0, Mi(u7, this, 0); } } function RM(e) { return "touches" in e ? { clientX: e.touches[0].clientX, clientY: e.touches[0].clientY } : { clientX: e.clientX, clientY: e.clientY }; } function ia(e) { const t = O7({}); h0(() => { const a = e(); for (const n in a) t[n] = a[n]; }, { flush: "sync" }); const r = {}; for (const a in t) r[a] = U(() => t[a]); return r; } function U6(e, t) { return e.includes(t); } function Ll(e) { return e[2].toLowerCase() + e.slice(3); } const z5 = () => [Function, Array]; function Ai(e, t) { return t = "on" + P9(t), !!(e[t] || e[`${t}Once`] || e[`${t}Capture`] || e[`${t}OnceCapture`] || e[`${t}CaptureOnce`]); } function oa(e) { for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), a = 1; a < t; a++) r[a - 1] = arguments[a]; if (Array.isArray(e)) for (const n of e) n(...r); else typeof e == "function" && e(...r); } function o9(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0; const r = ["button", "[href]", 'input:not([type="hidden"])', "select", "textarea", "[tabindex]"].map((a) => `${a}${t ? ':not([tabindex="-1"])' : ""}:not([disabled])`).join(", "); return [...e.querySelectorAll(r)]; } function cl(e, t, r) { let a, n = e.indexOf(document.activeElement); const i = t === "next" ? 1 : -1; do n += i, a = e[n]; while ((!a || a.offsetParent == null || !((r == null ? void 0 : r(a)) ?? !0)) && n < e.length && n >= 0); return a; } function q4(e, t) { var a, n, i, o; const r = o9(e); if (t == null) (e === document.activeElement || !e.contains(document.activeElement)) && ((a = r[0]) == null || a.focus()); else if (t === "first") (n = r[0]) == null || n.focus(); else if (t === "last") (i = r.at(-1)) == null || i.focus(); else if (typeof t == "number") (o = r[t]) == null || o.focus(); else { const C = cl(r, t); C ? C.focus() : q4(e, t === "next" ? "first" : "last"); } } function j6(e, t) { if (!(R2 && typeof CSS < "u" && typeof CSS.supports < "u" && CSS.supports(`selector(${t})`))) return null; try { return !!e && e.matches(t); } catch { return null; } } function ul(e) { return e.some((t) => AM(t) ? t.type === hM ? !1 : t.type !== p1 || ul(t.children) : !0) ? e : null; } function IM(e, t) { if (!R2 || e === 0) return t(), () => { }; const r = window.setTimeout(t, e); return () => window.clearTimeout(r); } function $M(e, t) { const r = e.clientX, a = e.clientY, n = t.getBoundingClientRect(), i = n.left, o = n.top, C = n.right, s = n.bottom; return r >= i && r <= C && a >= o && a <= s; } function xt() { const e = w1(), t = (r) => { e.value = r; }; return Object.defineProperty(t, "value", { enumerable: !0, get: () => e.value, set: (r) => e.value = r }), Object.defineProperty(t, "el", { enumerable: !0, get: () => Cl(e.value) }), t; } function hi(e) { const t = e.key.length === 1, r = !e.ctrlKey && !e.metaKey && !e.altKey; return t && r; } function Bt(e) { return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "bigint"; } function zM(e) { const t = {}; for (const r in e) t[ea(r)] = e[r]; return t; } function UM(e) { const t = ["checked", "disabled"]; return Object.fromEntries(Object.entries(e).filter((r) => { let [a, n] = r; return t.includes(a) ? !!n : n !== void 0; })); } const dl = ["top", "bottom"], jM = ["start", "end", "left", "right"]; function Nt(e, t) { let [r, a] = e.split(" "); return a || (a = U6(dl, r) ? "start" : U6(jM, r) ? "top" : "center"), { side: vi(r, t), align: vi(a, t) }; } function vi(e, t) { return e === "start" ? t ? "right" : "left" : e === "end" ? t ? "left" : "right" : e; } function $e(e) { return { side: { center: "center", top: "bottom", bottom: "top", left: "right", right: "left" }[e.side], align: e.align }; } function ze(e) { return { side: e.side, align: { center: "center", top: "bottom", bottom: "top", left: "right", right: "left" }[e.align] }; } function bi(e) { return { side: e.align, align: e.side }; } function yi(e) { return U6(dl, e.side) ? "y" : "x"; } class $0 { constructor(t) { let { x: r, y: a, width: n, height: i } = t; this.x = r, this.y = a, this.width = n, this.height = i; } get top() { return this.y; } get bottom() { return this.y + this.height; } get left() { return this.x; } get right() { return this.x + this.width; } } function Si(e, t) { return { x: { before: Math.max(0, t.left - e.left), after: Math.max(0, e.right - t.right) }, y: { before: Math.max(0, t.top - e.top), after: Math.max(0, e.bottom - t.bottom) } }; } function Ml(e) { return Array.isArray(e) ? new $0({ x: e[0], y: e[1], width: 0, height: 0 }) : e.getBoundingClientRect(); } function WM(e) { if (e === document.documentElement) return visualViewport ? new $0({ x: visualViewport.scale > 1 ? 0 : visualViewport.offsetLeft, y: visualViewport.scale > 1 ? 0 : visualViewport.offsetTop, width: visualViewport.width * visualViewport.scale, height: visualViewport.height * visualViewport.scale }) : new $0({ x: 0, y: 0, width: document.documentElement.clientWidth, height: document.documentElement.clientHeight }); { const t = e.getBoundingClientRect(); return new $0({ x: t.x, y: t.y, width: e.clientWidth, height: e.clientHeight }); } } function Ca(e) { const t = e.getBoundingClientRect(), r = getComputedStyle(e), a = r.transform; if (a) { let n, i, o, C, s; if (a.startsWith("matrix3d(")) n = a.slice(9, -1).split(/, /), i = Number(n[0]), o = Number(n[5]), C = Number(n[12]), s = Number(n[13]); else if (a.startsWith("matrix(")) n = a.slice(7, -1).split(/, /), i = Number(n[0]), o = Number(n[3]), C = Number(n[4]), s = Number(n[5]); else return new $0(t); const l = r.transformOrigin, H = t.x - C - (1 - i) * parseFloat(l), V = t.y - s - (1 - o) * parseFloat(l.slice(l.indexOf(" ") + 1)), L = i ? t.width / i : e.offsetWidth + 1, c = o ? t.height / o : e.offsetHeight + 1; return new $0({ x: H, y: V, width: L, height: c }); } else return new $0(t); } function f7(e, t, r) { if (typeof e.animate > "u") return { finished: Promise.resolve() }; let a; try { a = e.animate(t, r); } catch { return { finished: Promise.resolve() }; } return typeof a.finished > "u" && (a.finished = new Promise((n) => { a.onfinish = () => { n(a); }; })), a; } const w6 = /* @__PURE__ */ new WeakMap(); function GM(e, t) { Object.keys(t).forEach((r) => { if (Hl(r)) { const a = Ll(r), n = w6.get(e); if (t[r] == null) n == null || n.forEach((i) => { const [o, C] = i; o === a && (e.removeEventListener(a, C), n.delete(i)); }); else if (!n || ![...n].some((i) => i[0] === a && i[1] === t[r])) { e.addEventListener(a, t[r]); const i = n || /* @__PURE__ */ new Set(); i.add([a, t[r]]), w6.has(e) || w6.set(e, i); } } else t[r] == null ? e.removeAttribute(r) : e.setAttribute(r, t[r]); }); } function KM(e, t) { Object.keys(t).forEach((r) => { if (Hl(r)) { const a = Ll(r), n = w6.get(e); n == null || n.forEach((i) => { const [o, C] = i; o === a && (e.removeEventListener(a, C), n.delete(i)); }); } else e.removeAttribute(r); }); } const q7 = 2.4, Zi = 0.2126729, ki = 0.7151522, Fi = 0.072175, qM = 0.55, QM = 0.58, YM = 0.57, XM = 0.62, i6 = 0.03, Oi = 1.45, JM = 5e-4, em = 1.25, tm = 1.25, Ei = 0.078, wi = 12.82051282051282, o6 = 0.06, Ti = 1e-3; function _i(e, t) { const r = (e.r / 255) ** q7, a = (e.g / 255) ** q7, n = (e.b / 255) ** q7, i = (t.r / 255) ** q7, o = (t.g / 255) ** q7, C = (t.b / 255) ** q7; let s = r * Zi + a * ki + n * Fi, l = i * Zi + o * ki + C * Fi; if (s <= i6 && (s += (i6 - s) ** Oi), l <= i6 && (l += (i6 - l) ** Oi), Math.abs(l - s) < JM) return 0; let H; if (l > s) { const V = (l ** qM - s ** QM) * em; H = V < Ti ? 0 : V < Ei ? V - V * wi * o6 : V - o6; } else { const V = (l ** XM - s ** YM) * tm; H = V > -Ti ? 0 : V > -Ei ? V - V * wi * o6 : V + o6; } return H * 100; } function Y3(e) { Q8(`Vuetify: ${e}`); } function ml(e) { Q8(`Vuetify error: ${e}`); } function rm(e, t) { t = Array.isArray(t) ? t.slice(0, -1).map((r) => `'${r}'`).join(", ") + ` or '${t.at(-1)}'` : `'${t}'`, Q8(`[Vuetify UPGRADE] '${e}' is deprecated, use ${t} instead.`); } const am = [[0.4124, 0.3576, 0.1805], [0.2126, 0.7152, 0.0722], [0.0193, 0.1192, 0.9505]], nm = (e) => e <= 0.04045 ? e / 12.92 : ((e + 0.055) / 1.055) ** 2.4; function im(e) { let { r: t, g: r, b: a } = e; const n = [0, 0, 0], i = nm, o = am; t = i(t / 255), r = i(r / 255), a = i(a / 255); for (let C = 0; C < 3; ++C) n[C] = o[C][0] * t + o[C][1] * r + o[C][2] * a; return n; } function Dt(e) { return !!e && /^(#|var\(--|(rgb|hsl)a?\()/.test(e); } function om(e) { return Dt(e) && !/^((rgb|hsl)a?\()?var\(--/.test(e); } const Pi = /^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/, Cm = { rgb: (e, t, r, a) => ({ r: e, g: t, b: r, a }), rgba: (e, t, r, a) => ({ r: e, g: t, b: r, a }), hsl: (e, t, r, a) => xi({ h: e, s: t, l: r, a }), hsla: (e, t, r, a) => xi({ h: e, s: t, l: r, a }), hsv: (e, t, r, a) => G0({ h: e, s: t, v: r, a }), hsva: (e, t, r, a) => G0({ h: e, s: t, v: r, a }) }; function A3(e) { if (typeof e == "number") return (isNaN(e) || e < 0 || e > 16777215) && Y3(`'${e}' is not a valid hex color`), { r: (e & 16711680) >> 16, g: (e & 65280) >> 8, b: e & 255 }; if (typeof e == "string" && Pi.test(e)) { const { groups: t } = e.match(Pi), { fn: r, values: a } = t, n = a.split(/,\s*|\s*\/\s*|\s+/).map((i, o) => i.endsWith("%") || // unitless slv are % o > 0 && o < 3 && ["hsl", "hsla", "hsv", "hsva"].includes(r) ? parseFloat(i) / 100 : parseFloat(i)); return Cm[r](...n); } else if (typeof e == "string") { let t = e.startsWith("#") ? e.slice(1) : e; [3, 4].includes(t.length) ? t = t.split("").map((a) => a + a).join("") : [6, 8].includes(t.length) || Y3(`'${e}' is not a valid hex(a) color`); const r = parseInt(t, 16); return (isNaN(r) || r < 0 || r > 4294967295) && Y3(`'${e}' is not a valid hex(a) color`), gl(t); } else if (typeof e == "object") { if (m7(e, ["r", "g", "b"])) return e; if (m7(e, ["h", "s", "l"])) return G0(sa(e)); if (m7(e, ["h", "s", "v"])) return G0(e); } throw new TypeError(`Invalid color: ${e == null ? e : String(e) || e.constructor.name} Expected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`); } function G0(e) { const { h: t, s: r, v: a, a: n } = e, i = (C) => { const s = (C + t / 60) % 6; return a - a * r * Math.max(Math.min(s, 4 - s, 1), 0); }, o = [i(5), i(3), i(1)].map((C) => Math.round(C * 255)); return { r: o[0], g: o[1], b: o[2], a: n }; } function xi(e) { return G0(sa(e)); } function R9(e) { if (!e) return { h: 0, s: 1, v: 1, a: 1 }; const t = e.r / 255, r = e.g / 255, a = e.b / 255, n = Math.max(t, r, a), i = Math.min(t, r, a); let o = 0; n !== i && (n === t ? o = 60 * (0 + (r - a) / (n - i)) : n === r ? o = 60 * (2 + (a - t) / (n - i)) : n === a && (o = 60 * (4 + (t - r) / (n - i)))), o < 0 && (o = o + 360); const C = n === 0 ? 0 : (n - i) / n, s = [o, C, n]; return { h: s[0], s: s[1], v: s[2], a: e.a }; } function Rt(e) { const { h: t, s: r, v: a, a: n } = e, i = a - a * r / 2, o = i === 1 || i === 0 ? 0 : (a - i) / Math.min(i, 1 - i); return { h: t, s: o, l: i, a: n }; } function sa(e) { const { h: t, s: r, l: a, a: n } = e, i = a + r * Math.min(a, 1 - a), o = i === 0 ? 0 : 2 - 2 * a / i; return { h: t, s: o, v: i, a: n }; } function fl(e) { let { r: t, g: r, b: a, a: n } = e; return n === void 0 ? `rgb(${t}, ${r}, ${a})` : `rgba(${t}, ${r}, ${a}, ${n})`; } function pl(e) { return fl(G0(e)); } function C6(e) { const t = Math.round(e).toString(16); return ("00".substr(0, 2 - t.length) + t).toUpperCase(); } function sm(e) { let { r: t, g: r, b: a, a: n } = e; return `#${[C6(t), C6(r), C6(a), n !== void 0 ? C6(Math.round(n * 255)) : ""].join("")}`; } function gl(e) { e = Hm(e); let [t, r, a, n] = NM(e, 2).map((i) => parseInt(i, 16)); return n = n === void 0 ? n : n / 255, { r: t, g: r, b: a, a: n }; } function lm(e) { const t = gl(e); return R9(t); } function Al(e) { return sm(G0(e)); } function Hm(e) { return e.startsWith("#") && (e = e.slice(1)), e = e.replace(/([^0-9a-f])/gi, "F"), (e.length === 3 || e.length === 4) && (e = e.split("").map((t) => t + t).join("")), e.length !== 6 && (e = gi(gi(e, 6), 8, "F")), e; } function Bi(e) { const t = A3(e); return im(t)[1]; } function Vm(e, t) { const r = Bi(e), a = Bi(t), n = Math.max(r, a), i = Math.min(r, a); return (n + 0.05) / (i + 0.05); } function Lm(e) { const t = Math.abs(_i(A3(0), A3(e))); return Math.abs(_i(A3(16777215), A3(e))) > Math.min(t, 50) ? "#fff" : "#000"; } function r1(e, t) { return (r) => Object.keys(e).reduce((a, n) => { const o = typeof e[n] == "object" && e[n] != null && !Array.isArray(e[n]) ? e[n] : { type: e[n] }; return r && n in r ? a[n] = { ...o, default: r[n] } : a[n] = o, t && !a[n].source && (a[n].source = t), a; }, {}); } const I1 = r1({ class: [String, Array, Object], style: { type: [String, Array, Object], default: null } }, "component"); function q2(e, t) { const r = x9(); if (!r) throw new Error(`[Vuetify] ${e} must be called from inside a setup function`); return r; } function e3() { let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "composables"; const t = q2(e).type; return v7((t == null ? void 0 : t.aliasName) || (t == null ? void 0 : t.name)); } function cm(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : q2("injectSelf"); const { provides: r } = t; if (r && e in r) return r[e]; } const W6 = Symbol.for("vuetify:defaults"); function la() { const e = $(W6); if (!e) throw new Error("[Vuetify] Could not find defaults instance"); return e; } function t3(e, t) { const r = la(), a = J(e), n = k(() => { if (Z(t == null ? void 0 : t.disabled)) return r.value; const o = Z(t == null ? void 0 : t.scoped), C = Z(t == null ? void 0 : t.reset), s = Z(t == null ? void 0 : t.root); if (a.value == null && !(o || C || s)) return r.value; let l = g3(a.value, { prev: r.value }); if (o) return l; if (C || s) { const H = Number(C || 1 / 0); for (let V = 0; V <= H && !(!l || !("prev" in l)); V++) l = l.prev; return l && typeof s == "string" && s in l && (l = g3(g3(l, { prev: l }), l[s])), l; } return l.prev ? g3(l.prev, l) : l; }); return n5(W6, n), n; } function um(e, t) { return e.props && (typeof e.props[t] < "u" || typeof e.props[v7(t)] < "u"); } function dm() { let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : la(); const a = q2("useDefaults"); if (t = t ?? a.type.name ?? a.type.__name, !t) throw new Error("[Vuetify] Could not determine component name"); const n = k(() => { var s; return (s = r.value) == null ? void 0 : s[e._as ?? t]; }), i = new Proxy(e, { get(s, l) { var c, u, d, M; const H = Reflect.get(s, l); if (l === "class" || l === "style") return [(c = n.value) == null ? void 0 : c[l], H].filter((m) => m != null); if (um(a.vnode, l)) return H; const V = (u = n.value) == null ? void 0 : u[l]; if (V !== void 0) return V; const L = (M = (d = r.value) == null ? void 0 : d.global) == null ? void 0 : M[l]; return L !== void 0 ? L : H; } }), o = w1(); h0(() => { if (n.value) { const s = Object.entries(n.value).filter((l) => { let [H] = l; return H.startsWith(H[0].toUpperCase()); }); o.value = s.length ? Object.fromEntries(s) : void 0; } else o.value = void 0; }); function C() { const s = cm(W6, a); n5(W6, k(() => o.value ? g3((s == null ? void 0 : s.value) ?? {}, o.value) : s == null ? void 0 : s.value)); } return { props: i, provideSubDefaults: C }; } function r3(e) { if (e._setup = e._setup ?? e.setup, !e.name) return Y3("The component is missing an explicit name, unable to generate default prop value"), e; if (e._setup) { e.props = r1(e.props ?? {}, e.name)(); const t = Object.keys(e.props).filter((r) => r !== "class" && r !== "style"); e.filterProps = function(a) { return X8(a, t); }, e.props._as = String, e.setup = function(a, n) { const i = la(); if (!i.value) return e._setup(a, n); const { props: o, provideSubDefaults: C } = dm(a, a._as ?? e.name, i), s = e._setup(o, n); return C(), s; }; } return e; } function g1() { let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0; return (t) => (e ? r3 : M1)(t); } function J8(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "div", r = arguments.length > 2 ? arguments[2] : void 0; return g1()({ name: r ?? P9(ea(e.replace(/__/g, "-"))), props: { tag: { type: String, default: t }, ...I1() }, setup(a, n) { let { slots: i } = n; return () => { var o; return L5(a.tag, { class: [e, a.class], style: a.style }, (o = i.default) == null ? void 0 : o.call(i)); }; } }); } function hl(e) { if (typeof e.getRootNode != "function") { for (; e.parentNode; ) e = e.parentNode; return e !== document ? null : document; } const t = e.getRootNode(); return t !== document && t.getRootNode({ composed: !0 }) !== document ? null : t; } const C9 = "cubic-bezier(0.4, 0, 0.2, 1)", Mm = "cubic-bezier(0.0, 0, 0.2, 1)", mm = "cubic-bezier(0.4, 0, 1, 1)", fm = { linear: (e) => e, easeInQuad: (e) => e ** 2, easeOutQuad: (e) => e * (2 - e), easeInOutQuad: (e) => e < 0.5 ? 2 * e ** 2 : -1 + (4 - 2 * e) * e, easeInCubic: (e) => e ** 3, easeOutCubic: (e) => --e ** 3 + 1, easeInOutCubic: (e) => e < 0.5 ? 4 * e ** 3 : (e - 1) * (2 * e - 2) * (2 * e - 2) + 1, easeInQuart: (e) => e ** 4, easeOutQuart: (e) => 1 - --e ** 4, easeInOutQuart: (e) => e < 0.5 ? 8 * e ** 4 : 1 - 8 * --e ** 4, easeInQuint: (e) => e ** 5, easeOutQuint: (e) => 1 + --e ** 5, easeInOutQuint: (e) => e < 0.5 ? 16 * e ** 5 : 1 + 16 * --e ** 5 }; function vl(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1; for (; e; ) { if (t ? pm(e) : Ha(e)) return e; e = e.parentElement; } return document.scrollingElement; } function G6(e, t) { const r = []; if (t && e && !t.contains(e)) return r; for (; e && (Ha(e) && r.push(e), e !== t); ) e = e.parentElement; return r; } function Ha(e) { if (!e || e.nodeType !== Node.ELEMENT_NODE) return !1; const t = window.getComputedStyle(e), r = t.overflowY === "scroll" || t.overflowY === "auto" && e.scrollHeight > e.clientHeight, a = t.overflowX === "scroll" || t.overflowX === "auto" && e.scrollWidth > e.clientWidth; return r || a; } function pm(e) { if (!e || e.nodeType !== Node.ELEMENT_NODE) return !1; const t = window.getComputedStyle(e); return ["scroll", "auto"].includes(t.overflowY); } function gm(e) { for (; e; ) { if (window.getComputedStyle(e).position === "fixed") return !0; e = e.offsetParent; } return !1; } function S1(e) { const t = q2("useRender"); t.render = e; } const k3 = r1({ border: [Boolean, Number, String] }, "border"); function F3(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e3(); return { borderClasses: k(() => { const a = e.border; return a === !0 || a === "" ? `${t}--border` : typeof a == "string" || a === 0 ? String(a).split(" ").map((n) => `border-${n}`) : []; }) }; } const Am = [null, "default", "comfortable", "compact"], F0 = r1({ density: { type: String, default: "default", validator: (e) => Am.includes(e) } }, "density"); function a3(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e3(); return { densityClasses: U(() => `${t}--density-${e.density}`) }; } const O3 = r1({ elevation: { type: [Number, String], validator(e) { const t = parseInt(e); return !isNaN(t) && t >= 0 && // Material Design has a maximum elevation of 24 // https://material.io/design/environment/elevation.html#default-elevations t <= 24; } } }, "elevation"); function E3(e) { return { elevationClasses: U(() => { const r = $6(e) ? e.value : e.elevation; return r == null ? [] : [`elevation-${r}`]; }) }; } const e0 = r1({ rounded: { type: [Boolean, Number, String], default: void 0 }, tile: Boolean }, "rounded"); function t0(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e3(); return { roundedClasses: k(() => { const a = $6(e) ? e.value : e.rounded, n = $6(e) ? e.value : e.tile, i = []; if (n || a === !1) i.push("rounded-0"); else if (a === !0 || a === "") i.push(`${t}--rounded`); else if (typeof a == "string" || a === 0) for (const o of String(a).split(" ")) i.push(`rounded-${o}`); return i; }) }; } const y2 = r1({ tag: { type: [String, Object, Function], default: "div" } }, "tag"), It = Symbol.for("vuetify:theme"), W2 = r1({ theme: String }, "theme"); function u5(e) { q2("provideTheme"); const t = $(It, null); if (!t) throw new Error("Could not find Vuetify theme injection"); const r = U(() => e.theme ?? t.name.value), a = U(() => t.themes.value[r.value]), n = U(() => t.isDisabled ? void 0 : `${t.prefix}theme--${r.value}`), i = { ...t, name: r, current: a, themeClasses: n }; return n5(It, i), i; } function ee() { q2("useTheme"); const e = $(It, null); if (!e) throw new Error("Could not find Vuetify theme injection"); return e; } function Va(e) { return ia(() => { const t = W0(e), r = [], a = {}; if (t.background) if (Dt(t.background)) { if (a.backgroundColor = t.background, !t.text && om(t.background)) { const n = A3(t.background); if (n.a == null || n.a === 1) { const i = Lm(n); a.color = i, a.caretColor = i; } } } else r.push(`bg-${t.background}`); return t.text && (Dt(t.text) ? (a.color = t.text, a.caretColor = t.text) : r.push(`text-${t.text}`)), { colorClasses: r, colorStyles: a }; }); } function v0(e) { const { colorClasses: t, colorStyles: r } = Va(() => ({ text: W0(e) })); return { textColorClasses: t, textColorStyles: r }; } function k5(e) { const { colorClasses: t, colorStyles: r } = Va(() => ({ background: W0(e) })); return { backgroundColorClasses: t, backgroundColorStyles: r }; } const hm = ["elevated", "flat", "tonal", "outlined", "text", "plain"]; function I9(e, t) { return w(p1, null, [e && w("span", { key: "overlay", class: V1(`${t}__overlay`) }, null), w("span", { key: "underlay", class: V1(`${t}__underlay`) }, null)]); } const w3 = r1({ color: String, variant: { type: String, default: "elevated", validator: (e) => hm.includes(e) } }, "variant"); function $9(e) { let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : e3(); const r = U(() => { const { variant: i } = W0(e); return `${t}--variant-${i}`; }), { colorClasses: a, colorStyles: n } = Va(() => { const { variant: i, color: o } = W0(e); return { [["elevated", "flat"].includes(i) ? "background" : "text"]: o }; }); return { colorClasses: a, colorStyles: n, variantClasses: r }; } const bl = r1({ baseColor: String, divided: Boolean, direction: { type: String, default: "horizontal" }, ...k3(), ...I1(), ...F0(), ...O3(), ...e0(), ...y2(), ...W2(), ...w3() }, "VBtnGroup"), s9 = g1()({ name: "VBtnGroup", props: bl(), setup(e, t) { let { slots: r } = t; const { themeClasses: a } = u5(e), { densityClasses: n } = a3(e), { borderClasses: i } = F3(e), { elevationClasses: o } = E3(e), { roundedClasses: C } = t0(e); t3({ VBtn: { height: U(() => e.direction === "horizontal" ? "auto" : null), baseColor: U(() => e.baseColor), color: U(() => e.color), density: U(() => e.density), flat: !0, variant: U(() => e.variant) } }), S1(() => p(e.tag, { class: V1(["v-btn-group", `v-btn-group--${e.direction}`, { "v-btn-group--divided": e.divided }, a.value, i.value, n.value, o.value, C.value, e.class]), style: T1(e.style) }, r)); } }), vm = r1({ text: String, ...I1(), ...y2() }, "VToolbarTitle"), bm = g1()({ name: "VToolbarTitle", props: vm(), setup(e, t) { let { slots: r } = t; return S1(() => { const a = !!(r.default || r.text || e.text); return p(e.tag, { class: V1(["v-toolbar-title", e.class]), style: T1(e.style) }, { default: () => { var n; return [a && w("div", { class: "v-toolbar-title__placeholder" }, [r.text ? r.text() : e.text, (n = r.default) == null ? void 0 : n.call(r)])]; } }); }), {}; } }), ym = r1({ disabled: Boolean, group: Boolean, hideOnLeave: Boolean, leaveAbsolute: Boolean, mode: String, origin: String }, "transition"); function r0(e, t, r) { return g1()({ name: e, props: ym({ mode: r, origin: t }), setup(a, n) { let { slots: i } = n; const o = { onBeforeEnter(C) { a.origin && (C.style.transformOrigin = a.origin); }, onLeave(C) { if (a.leaveAbsolute) { const { offsetTop: s, offsetLeft: l, offsetWidth: H, offsetHeight: V } = C; C._transitionInitialStyles = { position: C.style.position, top: C.style.top, left: C.style.left, width: C.style.width, height: C.style.height }, C.style.position = "absolute", C.style.top = `${s}px`, C.style.left = `${l}px`, C.style.width = `${H}px`, C.style.height = `${V}px`; } a.hideOnLeave && C.style.setProperty("display", "none", "important"); }, onAfterLeave(C) { if (a.leaveAbsolute && (C != null && C._transitionInitialStyles)) { const { position: s, top: l, left: H, width: V, height: L } = C._transitionInitialStyles; delete C._transitionInitialStyles, C.style.position = s || "", C.style.top = l || "", C.style.left = H || "", C.style.width = V || "", C.style.height = L || ""; } } }; return () => { const C = a.group ? ta : E7; return L5(C, { name: a.disabled ? "" : e, css: !a.disabled, ...a.group ? void 0 : { mode: a.mode }, ...a.disabled ? {} : o }, i.default); }; } }); } function yl(e, t) { let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "in-out"; return g1()({ name: e, props: { mode: { type: String, default: r }, disabled: Boolean, group: Boolean }, setup(a, n) { let { slots: i } = n; const o = a.group ? ta : E7; return () => L5(o, { name: a.disabled ? "" : e, css: !a.disabled, // mode: props.mode, // TODO: vuejs/vue-next#3104 ...a.disabled ? {} : t }, i.default); } }); } function Sl() { let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ""; const r = (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1) ? "width" : "height", a = ea(`offset-${r}`); return { onBeforeEnter(o) { o._parent = o.parentNode, o._initialStyle = { transition: o.style.transition, overflow: o.style.overflow, [r]: o.style[r] }; }, onEnter(o) { const C = o._initialStyle; if (!C) return; o.style.setProperty("transition", "none", "important"), o.style.overflow = "hidden"; const s = `${o[a]}px`; o.style[r] = "0", o.offsetHeight, o.style.transition = C.transition, e && o._parent && o._parent.classList.add(e), requestAnimationFrame(() => { o.style[r] = s; }); }, onAfterEnter: i, onEnterCancelled: i, onLeave(o) { o._initialStyle = { transition: "", overflow: o.style.overflow, [r]: o.style[r] }, o.style.overflow = "hidden", o.style[r] = `${o[a]}px`, o.offsetHeight, requestAnimationFrame(() => o.style[r] = "0"); }, onAfterLeave: n, onLeaveCancelled: n }; function n(o) { e && o._parent && o._parent.classList.remove(e), i(o); } function i(o) { if (!o._initialStyle) return; const C = o._initialStyle[r]; o.style.overflow = o._initialStyle.overflow, C != null && (o.style[r] = C), delete o._initialStyle; } } const Sm = r1({ target: [Object, Array] }, "v-dialog-transition"), Ue = /* @__PURE__ */ new WeakMap(), La = g1()({ name: "VDialogTransition", props: Sm(), setup(e, t) { let { slots: r } = t; const a = { onBeforeEnter(n) { n.style.pointerEvents = "none", n.style.visibility = "hidden"; }, async onEnter(n, i) { var c; await new Promise((u) => requestAnimationFrame(u)), await new Promise((u) => requestAnimationFrame(u)), n.style.visibility = ""; const o = Di(e.target, n), { x: C, y: s, sx: l, sy: H, speed: V } = o; Ue.set(n, o); const L = f7(n, [{ transform: `translate(${C}px, ${s}px) scale(${l}, ${H})`, opacity: 0 }, {}], { duration: 225 * V, easing: Mm }); (c = Ni(n)) == null || c.forEach((u) => { f7(u, [{ opacity: 0 }, { opacity: 0, offset: 0.33 }, {}], { duration: 450 * V, easing: C9 }); }), L.finished.then(() => i()); }, onAfterEnter(n) { n.style.removeProperty("pointer-events"); }, onBeforeLeave(n) { n.style.pointerEvents = "none"; }, async onLeave(n, i) { var c; await new Promise((u) => requestAnimationFrame(u)); let o; !Ue.has(n) || Array.isArray(e.target) || e.target.offsetParent || e.target.getClientRects().length ? o = Di(e.target, n) : o = Ue.get(n); const { x: C, y: s, sx: l, sy: H, speed: V } = o; f7(n, [{}, { transform: `translate(${C}px, ${s}px) scale(${l}, ${H})`, opacity: 0 }], { duration: 125 * V, easing: mm }).finished.then(() => i()), (c = Ni(n)) == null || c.forEach((u) => { f7(u, [{}, { opacity: 0, offset: 0.2 }, { opacity: 0 }], { duration: 250 * V, easing: C9 }); }); }, onAfterLeave(n) { n.style.removeProperty("pointer-events"); } }; return () => e.target ? p(E7, f1({ name: "dialog-transition" }, a, { css: !1 }), r) : p(E7, { name: "dialog-transition" }, r); } }); function Ni(e) { var r; const t = (r = e.querySelector(":scope > .v-card, :scope > .v-sheet, :scope > .v-list")) == null ? void 0 : r.children; return t && [...t]; } function Di(e, t) { const r = Ml(e), a = Ca(t), [n, i] = getComputedStyle(t).transformOrigin.split(" ").map((m) => parseFloat(m)), [o, C] = getComputedStyle(t).getPropertyValue("--v-overlay-anchor-origin").split(" "); let s = r.left + r.width / 2; o === "left" || C === "left" ? s -= r.width / 2 : (o === "right" || C === "right") && (s += r.width / 2); let l = r.top + r.height / 2; o === "top" || C === "top" ? l -= r.height / 2 : (o === "bottom" || C === "bottom") && (l += r.height / 2); const H = r.width / a.width, V = r.height / a.height, L = Math.max(1, H, V), c = H / L || 0, u = V / L || 0, d = a.width * a.height / (window.innerWidth * window.innerHeight), M = d > 0.12 ? Math.min(1.5, (d - 0.12) * 10 + 1) : 1; return { x: s - (n + a.left), y: l - (i + a.top), sx: c, sy: u, speed: M }; } r0("fab-transition", "center center", "out-in"); r0("dialog-bottom-transition"); r0("dialog-top-transition"); const Ri = r0("fade-transition"), Zl = r0("scale-transition"); r0("scroll-x-transition"); r0("scroll-x-reverse-transition"); r0("scroll-y-transition"); r0("scroll-y-reverse-transition"); r0("slide-x-transition"); r0("slide-x-reverse-transition"); const kl = r0("slide-y-transition"); r0("slide-y-reverse-transition"); const Fl = yl("expand-transition", Sl()), Ol = yl("expand-x-transition", Sl("", !0)), Zm = r1({ defaults: Object, disabled: Boolean, reset: [Number, String], root: [Boolean, String], scoped: Boolean }, "VDefaultsProvider"), E2 = g1(!1)({ name: "VDefaultsProvider", props: Zm(), setup(e, t) { let { slots: r } = t; const { defaults: a, disabled: n, reset: i, root: o, scoped: C } = vM(e); return t3(a, { reset: i, root: o, scoped: C, disabled: n }), () => { var s; return (s = r.default) == null ? void 0 : s.call(r); }; } }), n3 = r1({ height: [Number, String], maxHeight: [Number, String], maxWidth: [Number, String], minHeight: [Number, String], minWidth: [Number, String], width: [Number, String] }, "dimension"); function i3(e) { return { dimensionStyles: k(() => { const r = {}, a = k1(e.height), n = k1(e.maxHeight), i = k1(e.maxWidth), o = k1(e.minHeight), C = k1(e.minWidth), s = k1(e.width); return a != null && (r.height = a), n != null && (r.maxHeight = n), i != null && (r.maxWidth = i), o != null && (r.minHeight = o), C != null && (r.minWidth = C), s != null && (r.width = s), r; }) }; } function km(e) { return { aspectStyles: k(() => { const t = Number(e.aspectRatio); return t ? { paddingBottom: String(1 / t * 100) + "%" } : void 0; }) }; } const El = r1({ aspectRatio: [String, Number], contentClass: null, inline: Boolean, ...I1(), ...n3() }, "VResponsive"), Ii = g1()({ name: "VResponsive", props: El(), setup(e, t) { let { slots: r } = t; const { aspectStyles: a } = km(e), { dimensionStyles: n } = i3(e); return S1(() => { var i; return w("div", { class: V1(["v-responsive", { "v-responsive--inline": e.inline }, e.class]), style: T1([n.value, e.style]) }, [w("div", { class: "v-responsive__sizer", style: T1(a.value) }, null), (i = r.additional) == null ? void 0 : i.call(r), r.default && w("div", { class: V1(["v-responsive__content", e.contentClass]) }, [r.default()])]); }), {}; } }), z9 = r1({ transition: { type: null, default: "fade-transition", validator: (e) => e !== !0 } }, "transition"), h3 = (e, t) => { let { slots: r } = t; const { transition: a, disabled: n, group: i, ...o } = e, { component: C = i ? ta : E7, ...s } = z6(a) ? a : {}; let l; return z6(a) ? l = f1(s, UM({ disabled: n, group: i }), o) : l = f1({ name: n || !a ? "" : a }, o), L5(C, l, r); }; function Fm(e, t) { if (!na) return; const r = t.modifiers || {}, a = t.value, { handler: n, options: i } = typeof a == "object" ? a : { handler: a, options: {} }, o = new IntersectionObserver(function() { var V; let C = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], s = arguments.length > 1 ? arguments[1] : void 0; const l = (V = e._observe) == null ? void 0 : V[t.instance.$.uid]; if (!l) return; const H = C.some((L) => L.isIntersecting); n && (!r.quiet || l.init) && (!r.once || H || l.init) && n(H, C, s), H && r.once ? wl(e, t) : l.init = !0; }, i); e._observe = Object(e._observe), e._observe[t.instance.$.uid] = { init: !1, observer: o }, o.observe(e); } function wl(e, t) { var a; const r = (a = e._observe) == null ? void 0 : a[t.instance.$.uid]; r && (r.observer.unobserve(e), delete e._observe[t.instance.$.uid]); } const c4 = { mounted: Fm, unmounted: wl }, Om = r1({ absolute: Boolean, alt: String, cover: Boolean, color: String, draggable: { type: [Boolean, String], default: void 0 }, eager: Boolean, gradient: String, lazySrc: String, options: { type: Object, // For more information on types, navigate to: // https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API default: () => ({ root: void 0, rootMargin: void 0, threshold: void 0 }) }, sizes: String, src: { type: [String, Object], default: "" }, crossorigin: String, referrerpolicy: String, srcset: String, position: String, ...El(), ...I1(), ...e0(), ...z9() }, "VImg"), ca = g1()({ name: "VImg", directives: { vIntersect: c4 }, props: Om(), emits: { loadstart: (e) => !0, load: (e) => !0, error: (e) => !0 }, setup(e, t) { let { emit: r, slots: a } = t; const { backgroundColorClasses: n, backgroundColorStyles: i } = k5(() => e.color), { roundedClasses: o } = t0(e), C = q2("VImg"), s = w1(""), l = J(), H = w1(e.eager ? "loading" : "idle"), V = w1(), L = w1(), c = k(() => e.src && typeof e.src == "object" ? { src: e.src.src, srcset: e.srcset || e.src.srcset, lazySrc: e.lazySrc || e.src.lazySrc, aspect: Number(e.aspectRatio || e.src.aspect || 0) } : { src: e.src, srcset: e.srcset, lazySrc: e.lazySrc, aspect: Number(e.aspectRatio || 0) }), u = k(() => c.value.aspect || V.value / L.value || 0); y1(() => e.src, () => { d(H.value !== "idle"); }), y1(u, (_, N) => { !_ && N && l.value && g(l.value); }), B9(() => d()); function d(_) { if (!(e.eager && _) && !(na && !_ && !e.eager)) { if (H.value = "loading", c.value.lazySrc) { const N = new Image(); N.src = c.value.lazySrc, g(N, null); } c.value.src && w2(() => { var N; r("loadstart", ((N = l.value) == null ? void 0 : N.currentSrc) || c.value.src), setTimeout(() => { var R; if (!C.isUnmounted) if ((R = l.value) != null && R.complete) { if (l.value.naturalWidth || m(), H.value === "error") return; u.value || g(l.value, null), H.value === "loading" && M(); } else u.value || g(l.value), f(); }); }); } } function M() { var _; C.isUnmounted || (f(), g(l.value), H.value = "loaded", r("load", ((_ = l.value) == null ? void 0 : _.currentSrc) || c.value.src)); } function m() { var _; C.isUnmounted || (H.value = "error", r("error", ((_ = l.value) == null ? void 0 : _.currentSrc) || c.value.src)); } function f() { const _ = l.value; _ && (s.value = _.currentSrc || _.src); } let A = -1; c5(() => { clearTimeout(A); }); function g(_) { let N = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 100; const R = () => { if (clearTimeout(A), C.isUnmounted) return; const { natural