UNPKG

vue-data-ui

Version:

A user-empowering data visualization Vue 3 components library for eloquent data storytelling

853 lines (852 loc) 43.7 kB
import { useSlots as E, onMounted as G, ref as R, computed as _, watch as T, createElementBlock as s, openBlock as i, normalizeStyle as a, createCommentVNode as d, createElementVNode as l, toDisplayString as c, unref as o, withKeys as z, normalizeClass as M, createTextVNode as S, createStaticVNode as $ } from "vue"; import { u as P, o as q, e as J, i as x, f as b, X as f, w as k } from "./index-CHWA6Lnw.js"; import { u as Q } from "./useNestedProp-ByBiJC9_.js"; import { _ as W } from "./_plugin-vue_export-helper-CHgC5LLL.js"; const Z = { key: 0, class: "vue-ui-rating-title", style: { width: "100%" } }, tt = ["xmlns", "stroke"], et = { id: "vueUiSmiley0" }, lt = ["stop-color"], ot = ["stop-color"], at = ["fill"], st = ["stroke"], it = ["xmlns", "viewBox", "stroke"], nt = { id: "vueUiSmiley0" }, rt = ["stop-color"], dt = ["stop-color"], ut = ["fill"], vt = ["viewBox", "stroke"], pt = ["xmlns", "stroke"], yt = { id: "vueUiSmiley1" }, ft = ["stop-color"], ht = ["stop-color"], ct = ["fill"], gt = ["xmlns", "stroke"], mt = ["xmlns", "viewBox", "stroke"], kt = { id: "vueUiSmiley1" }, xt = ["stop-color"], bt = ["stop-color"], $t = ["fill"], wt = ["viewBox", "stroke"], zt = ["xmlns", "stroke"], Mt = { id: "vueUiSmiley2" }, St = ["stop-color"], _t = ["stop-color"], Rt = ["fill"], Ct = ["xmlns", "stroke"], Bt = ["xmlns", "viewBox", "stroke"], jt = { id: "vueUiSmiley2" }, Ht = ["stop-color"], Ut = ["stop-color"], Gt = ["fill"], Vt = ["xmlns", "viewBox", "stroke"], At = ["xmlns", "stroke"], Xt = { id: "vueUiSmiley3" }, Yt = ["stop-color"], Nt = ["stop-color"], Ft = ["fill"], It = ["xmlns", "stroke"], Kt = ["xmlns", "viewBox", "stroke"], Ot = { id: "vueUiSmiley3" }, Lt = ["stop-color"], Dt = ["stop-color"], Et = ["fill"], Tt = ["xmlns", "viewBox", "stroke"], Pt = ["xmlns", "stroke"], qt = { id: "vueUiSmiley4" }, Jt = ["stop-color"], Qt = ["stop-color"], Wt = ["fill"], Zt = ["xmlns", "stroke"], te = ["xmlns", "viewBox", "stroke"], ee = { id: "vueUiSmiley4" }, le = ["stop-color"], oe = ["stop-color"], ae = ["fill"], se = ["xmlns", "viewBox", "stroke"], ie = { __name: "vue-ui-smiley", props: { config: { type: Object, default() { return {}; } }, dataset: { type: Object, default() { return {}; } } }, emits: ["rate"], setup(V, { expose: A, emit: X }) { const { vue_ui_smiley: Y } = P(), u = V, N = E(); G(() => { N["chart-background"] && console.warn("VueUiSmiley does not support the #chart-background slot."); }), G(() => { C(); }); function C() { (!Object.hasOwn(u.dataset, "rating") || q(u.dataset)) && J({ componentName: "VueUiSmiley", type: "datasetAttribute", property: "rating" }); } const B = R(!1), v = R(void 0), F = X, t = _({ get: () => j(), set: (r) => r }); function j() { return Q({ userConfig: u.config, defaultConfig: Y }); } T(() => u.config, (r) => { t.value = j(), C(); }, { deep: !0 }); const I = _(() => typeof u.dataset.rating == "object" && !Array.isArray(u.dataset.rating) ? K(u.dataset.rating) : u.dataset.rating || null), w = _(() => typeof u.dataset.rating == "object" && !Array.isArray(u.dataset.rating)), p = R(I.value), y = _(() => t.value.readonly); function K(r) { if (r === null) return null; let e = 0, n = 0; for (const H in r) { const D = parseInt(H), U = r[H]; e += D * U, n += U; } return n === 0 ? 0 : e / n; } function g(r) { const e = p.value - r, n = 24; switch (!0) { case e < 0: return 0; case e > 1: return 1 * n; default: return e * n; } } function m(r) { y.value || (p.value = r, F("rate", r)); } function O() { return p.value; } function L(r = !0) { y.value = r; } A({ getData: O, toggleReadonly: L }); function h(r) { return t.value.readonly ? t.value.style.colors.inactive[r] : p.value === r + 1 ? t.value.style.icons.useGradient && t.value.style.icons.filled ? `url(#vueUiSmiley${r})` : t.value.style.colors.active[r] : v.value !== void 0 && v.value === r ? t.value.style.icons.useGradient && t.value.style.icons.filled ? `url(#vueUiSmiley${r})` : t.value.style.colors.active[r] : t.value.style.colors.inactive[r]; } return (r, e) => (i(), s("div", { class: "vue-ui-smiley", style: a(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%;`), onMouseover: e[20] || (e[20] = (n) => B.value = !0), onMouseleave: e[21] || (e[21] = (n) => { B.value = !1, v.value = void 0; }) }, [ t.value.style.title.text ? (i(), s("div", Z, [ l("div", { style: a(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold ? "bold" : "normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`) }, c(t.value.style.title.text), 5), t.value.style.title.subtitle.text ? (i(), s("div", { key: 0, style: a(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold ? "bold" : "normal"}`) }, c(t.value.style.title.subtitle.text), 5)) : d("", !0) ])) : d("", !0), t.value.style.rating.show && t.value.style.rating.position === "top" ? (i(), s("div", { key: 1, style: a(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold ? "bold" : "normal"};margin-left:${t.value.style.rating.offsetX}px`) }, c(o(x)( t.value.style.rating.formatter, p.value, o(b)({ v: p.value, r: t.value.style.rating.roundingValue }), t.value )), 5)) : d("", !0), l("div", { class: "vue-ui-smiley-wrapper", style: a(`overflow:visible;height:${t.value.style.itemSize}px;width:fit-content;margin:0 auto;display:flex;align-items:center;justify-content:center;`) }, [ t.value.style.rating.show && t.value.style.rating.position === "left" ? (i(), s("div", { key: 0, style: a(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold ? "bold" : "normal"};padding-right:${t.value.style.rating.offsetX}px`) }, c(o(x)( t.value.style.rating.formatter, p.value, o(b)({ v: p.value, r: t.value.style.rating.roundingValue }), t.value )), 5)) : d("", !0), l("div", { tabindex: "0", class: M({ "vue-ui-smiley-rated": !t.value.readonly && p.value === 1 }), style: a(`cursor:${t.value.readonly ? "default" : "pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1; position:relative`), onMouseenter: e[0] || (e[0] = (n) => v.value = 0), onMouseleave: e[1] || (e[1] = (n) => v.value = void 0), onClick: e[2] || (e[2] = (n) => m(1)), onKeyup: e[3] || (e[3] = z((n) => m(1), ["enter"])) }, [ t.value.style.tooltip.show && w.value && y.value ? (i(), s("div", { key: 0, class: "vue-ui-rating-tooltip", style: a(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48 + t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${v.value === 0 ? "block" : "none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`) }, [ l("div", { style: a(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`) }, [ l("span", { style: a(`font-size:${t.value.style.tooltip.fontSize}px`) }, "1:", 4), e[22] || (e[22] = S()), l("span", { style: a(`font-weight:${t.value.style.tooltip.bold ? "bold" : "normal"};font-size:${t.value.style.tooltip.fontSize}px`) }, c(o(x)( t.value.style.tooltip.formatter, u.dataset.rating[1], o(b)({ v: u.dataset.rating[1], r: t.value.style.tooltip.roundingValue }), t.value )), 5), l("div", { style: a(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`) }, " ▼ ", 4) ], 4) ], 4)) : d("", !0), t.value.style.icons.filled ? (i(), s("svg", { key: 1, xmlns: o(f), style: { transition: "all 0.1s ease-in-out", position: "absolute", top: "0", left: "0" }, height: "100%", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: h(0), fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, [ l("defs", null, [ l("radialGradient", et, [ l("stop", { offset: "0%", "stop-color": o(k)(t.value.style.colors.active[0], 0.05) }, null, 8, lt), l("stop", { offset: "100%", "stop-color": t.value.style.colors.active[0] }, null, 8, ot) ]) ]), e[23] || (e[23] = l("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1)), l("path", { d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-5 9.86a4.5 4.5 0 0 0 -3.214 1.35a1 1 0 1 0 1.428 1.4a2.5 2.5 0 0 1 3.572 0a1 1 0 0 0 1.428 -1.4a4.5 4.5 0 0 0 -3.214 -1.35zm-2.99 -4.2l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z", "stroke-width": "0", fill: h(0) }, null, 8, at) ], 8, tt)) : (i(), s("svg", { key: 2, style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: h(0), fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, e[24] || (e[24] = [ $('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dabd0325></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-dabd0325></path><path d="M9 10l.01 0" data-v-dabd0325></path><path d="M15 10l.01 0" data-v-dabd0325></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-dabd0325></path>', 5) ]), 8, st)), t.value.style.icons.filled && y.value ? (i(), s("svg", { key: 3, xmlns: o(f), style: { transition: "all 0.1s ease-in-out", position: "absolute", top: "0", left: "0" }, height: "100%", viewBox: `0 0 ${g(0)} 24`, "stroke-width": "1.5", stroke: t.value.style.colors.activeReadonly[0], fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, [ l("defs", null, [ l("radialGradient", nt, [ l("stop", { offset: "0%", "stop-color": o(k)(t.value.style.colors.activeReadonly[0], 0.05) }, null, 8, rt), l("stop", { offset: "100%", "stop-color": t.value.style.colors.activeReadonly[0] }, null, 8, dt) ]) ]), e[25] || (e[25] = l("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1)), l("path", { d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-5 9.86a4.5 4.5 0 0 0 -3.214 1.35a1 1 0 1 0 1.428 1.4a2.5 2.5 0 0 1 3.572 0a1 1 0 0 0 1.428 -1.4a4.5 4.5 0 0 0 -3.214 -1.35zm-2.99 -4.2l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z", "stroke-width": "0", fill: t.value.style.icons.useGradient ? "url(#vueUiSmiley0)" : t.value.style.colors.activeReadonly[0] }, null, 8, ut) ], 8, it)) : d("", !0), !t.value.style.icons.filled && y.value ? (i(), s("svg", { key: 4, style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: `0 0 ${g(0)} 24`, "stroke-width": "1.5", stroke: t.value.style.colors.activeReadonly[0], fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, e[26] || (e[26] = [ $('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dabd0325></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-dabd0325></path><path d="M9 10l.01 0" data-v-dabd0325></path><path d="M15 10l.01 0" data-v-dabd0325></path><path d="M9.5 15.25a3.5 3.5 0 0 1 5 0" data-v-dabd0325></path>', 5) ]), 8, vt)) : d("", !0) ], 38), l("div", { tabindex: "0", class: M({ "vue-ui-smiley-rated": !t.value.readonly && p.value === 2 }), style: a(`cursor:${t.value.readonly ? "default" : "pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`), onMouseenter: e[4] || (e[4] = (n) => v.value = 1), onMouseleave: e[5] || (e[5] = (n) => v.value = void 0), onClick: e[6] || (e[6] = (n) => m(2)), onKeyup: e[7] || (e[7] = z((n) => m(2), ["enter"])) }, [ t.value.style.tooltip.show && w.value && y.value ? (i(), s("div", { key: 0, class: "vue-ui-rating-tooltip", style: a(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48 + t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${v.value === 1 ? "block" : "none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`) }, [ l("div", { style: a(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`) }, [ l("span", { style: a(`font-size:${t.value.style.tooltip.fontSize}px`) }, "2:", 4), e[27] || (e[27] = S()), l("span", { style: a(`font-weight:${t.value.style.tooltip.bold ? "bold" : "normal"};font-size:${t.value.style.tooltip.fontSize}px`) }, c(o(x)( t.value.style.tooltip.formatter, u.dataset.rating[2], o(b)({ v: u.dataset.rating[2], r: t.value.style.tooltip.roundingValue }), t.value )), 5), l("div", { style: a(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`) }, " ▼ ", 4) ], 4) ], 4)) : d("", !0), t.value.style.icons.filled ? (i(), s("svg", { key: 1, xmlns: o(f), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: h(1), fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, [ l("defs", null, [ l("radialGradient", yt, [ l("stop", { offset: "0%", "stop-color": o(k)(t.value.style.colors.active[1], 0.05) }, null, 8, ft), l("stop", { offset: "100%", "stop-color": t.value.style.colors.active[1] }, null, 8, ht) ]) ]), e[28] || (e[28] = l("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1)), l("path", { d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 10.66h-6l-.117 .007a1 1 0 0 0 0 1.986l.117 .007h6l.117 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-5.99 -5l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z", "stroke-width": "0", fill: h(1) }, null, 8, ct) ], 8, pt)) : (i(), s("svg", { key: 2, xmlns: o(f), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: h(1), fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, e[29] || (e[29] = [ $('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dabd0325></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-dabd0325></path><path d="M9 10l.01 0" data-v-dabd0325></path><path d="M15 10l.01 0" data-v-dabd0325></path><path d="M9 15l6 0" data-v-dabd0325></path>', 5) ]), 8, gt)), t.value.style.icons.filled && y.value ? (i(), s("svg", { key: 3, xmlns: o(f), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: `0 0 ${g(1)} 24`, "stroke-width": "1.5", stroke: t.value.style.colors.activeReadonly[1], fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, [ l("defs", null, [ l("radialGradient", kt, [ l("stop", { offset: "0%", "stop-color": o(k)(t.value.style.colors.activeReadonly[1], 0.05) }, null, 8, xt), l("stop", { offset: "100%", "stop-color": t.value.style.colors.activeReadonly[1] }, null, 8, bt) ]) ]), e[30] || (e[30] = l("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1)), l("path", { d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 10.66h-6l-.117 .007a1 1 0 0 0 0 1.986l.117 .007h6l.117 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-5.99 -5l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z", "stroke-width": "0", fill: t.value.style.icons.useGradient ? "url(#vueUiSmiley1)" : t.value.style.colors.activeReadonly[1] }, null, 8, $t) ], 8, mt)) : d("", !0), !t.value.style.icons.filled && y.value ? (i(), s("svg", { key: 4, style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: `0 0 ${g(1)} 24`, "stroke-width": "1.5", stroke: t.value.style.colors.activeReadonly[1], fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, e[31] || (e[31] = [ $('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dabd0325></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-dabd0325></path><path d="M9 10l.01 0" data-v-dabd0325></path><path d="M15 10l.01 0" data-v-dabd0325></path><path d="M9 15l6 0" data-v-dabd0325></path>', 5) ]), 8, wt)) : d("", !0) ], 38), l("div", { tabindex: "0", class: M({ "vue-ui-smiley-rated": !t.value.readonly && p.value === 3 }), style: a(`cursor:${t.value.readonly ? "default" : "pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`), onMouseenter: e[8] || (e[8] = (n) => v.value = 2), onMouseleave: e[9] || (e[9] = (n) => v.value = void 0), onClick: e[10] || (e[10] = (n) => m(3)), onKeyup: e[11] || (e[11] = z((n) => m(3), ["enter"])) }, [ t.value.style.tooltip.show && w.value && y.value ? (i(), s("div", { key: 0, class: "vue-ui-rating-tooltip", style: a(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48 + t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${v.value === 2 ? "block" : "none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`) }, [ l("div", { style: a(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`) }, [ l("span", { style: a(`font-size:${t.value.style.tooltip.fontSize}px`) }, "3:", 4), e[32] || (e[32] = S()), l("span", { style: a(`font-weight:${t.value.style.tooltip.bold ? "bold" : "normal"};font-size:${t.value.style.tooltip.fontSize}px`) }, c(o(x)( t.value.style.tooltip.formatter, u.dataset.rating[3], o(b)({ v: u.dataset.rating[3], r: t.value.style.tooltip.roundingValue }), t.value )), 5), l("div", { style: a(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`) }, " ▼ ", 4) ], 4) ], 4)) : d("", !0), t.value.style.icons.filled ? (i(), s("svg", { key: 1, xmlns: o(f), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: h(2), fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, [ l("defs", null, [ l("radialGradient", Mt, [ l("stop", { offset: "0%", "stop-color": o(k)(t.value.style.colors.activeReadonly[2], 0.05) }, null, 8, St), l("stop", { offset: "100%", "stop-color": t.value.style.colors.activeReadonly[2] }, null, 8, _t) ]) ]), e[33] || (e[33] = l("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1)), l("path", { d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-7.99 5.66l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z", "stroke-width": "0", fill: h(2) }, null, 8, Rt) ], 8, zt)) : (i(), s("svg", { key: 2, xmlns: o(f), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: h(2), fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, e[34] || (e[34] = [ l("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1), l("path", { d: "M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" }, null, -1), l("path", { d: "M9 10l.01 0" }, null, -1), l("path", { d: "M15 10l.01 0" }, null, -1) ]), 8, Ct)), t.value.style.icons.filled && y.value ? (i(), s("svg", { key: 3, xmlns: o(f), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: `0 0 ${g(2)} 24`, "stroke-width": "1.5", stroke: t.value.style.colors.activeReadonly[2], fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, [ e[35] || (e[35] = l("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1)), l("defs", null, [ l("radialGradient", jt, [ l("stop", { offset: "0%", "stop-color": o(k)(t.value.style.colors.activeReadonly[2], 0.05) }, null, 8, Ht), l("stop", { offset: "100%", "stop-color": t.value.style.colors.activeReadonly[2] }, null, 8, Ut) ]) ]), l("path", { d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-7.99 5.66l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm6 0l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z", "stroke-width": "0", fill: t.value.style.icons.useGradient ? "url(#vueUiSmiley2)" : t.value.style.colors.activeReadonly[2] }, null, 8, Gt) ], 8, Bt)) : d("", !0), !t.value.style.icons.filled && y.value ? (i(), s("svg", { key: 4, xmlns: o(f), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: `0 0 ${g(2)} 24`, "stroke-width": "1.5", stroke: t.value.style.colors.activeReadonly[2], fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, e[36] || (e[36] = [ l("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1), l("path", { d: "M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" }, null, -1), l("path", { d: "M9 10l.01 0" }, null, -1), l("path", { d: "M15 10l.01 0" }, null, -1) ]), 8, Vt)) : d("", !0) ], 38), l("div", { tabindex: "0", class: M({ "vue-ui-smiley-rated": !t.value.readonly && p.value === 4 }), style: a(`cursor:${t.value.readonly ? "default" : "pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`), onMouseenter: e[12] || (e[12] = (n) => v.value = 3), onMouseleave: e[13] || (e[13] = (n) => v.value = void 0), onClick: e[14] || (e[14] = (n) => m(4)), onKeyup: e[15] || (e[15] = z((n) => m(4), ["enter"])) }, [ t.value.style.tooltip.show && w.value && y.value ? (i(), s("div", { key: 0, class: "vue-ui-rating-tooltip", style: a(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48 + t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${v.value === 3 ? "block" : "none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`) }, [ l("div", { style: a(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`) }, [ l("span", { style: a(`font-size:${t.value.style.tooltip.fontSize}px`) }, "4:", 4), e[37] || (e[37] = S()), l("span", { style: a(`font-weight:${t.value.style.tooltip.bold ? "bold" : "normal"};font-size:${t.value.style.tooltip.fontSize}px`) }, c(o(x)( t.value.style.tooltip.formatter, u.dataset.rating[4], o(b)({ v: u.dataset.rating[4], r: t.value.style.tooltip.roundingValue }), t.value )), 5), l("div", { style: a(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`) }, " ▼ ", 4) ], 4) ], 4)) : d("", !0), t.value.style.icons.filled ? (i(), s("svg", { key: 1, xmlns: o(f), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: h(3), fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, [ l("defs", null, [ l("radialGradient", Xt, [ l("stop", { offset: "0%", "stop-color": o(k)(t.value.style.colors.activeReadonly[3], 0.95) }, null, 8, Yt), l("stop", { offset: "100%", "stop-color": t.value.style.colors.activeReadonly[3] }, null, 8, Nt) ]) ]), e[38] || (e[38] = l("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1)), l("path", { d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.8 10.946a1 1 0 0 0 -1.414 .014a2.5 2.5 0 0 1 -3.572 0a1 1 0 0 0 -1.428 1.4a4.5 4.5 0 0 0 6.428 0a1 1 0 0 0 -.014 -1.414zm-6.19 -5.286l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z", "stroke-width": "0", fill: h(3) }, null, 8, Ft) ], 8, At)) : (i(), s("svg", { key: 2, xmlns: o(f), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: h(3), fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, e[39] || (e[39] = [ $('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dabd0325></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-dabd0325></path><path d="M9 10l.01 0" data-v-dabd0325></path><path d="M15 10l.01 0" data-v-dabd0325></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-dabd0325></path>', 5) ]), 8, It)), t.value.style.icons.filled && y.value ? (i(), s("svg", { key: 3, xmlns: o(f), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: `0 0 ${g(3)} 24`, "stroke-width": "1.5", stroke: t.value.style.colors.activeReadonly[3], fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, [ e[40] || (e[40] = l("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1)), l("defs", null, [ l("radialGradient", Ot, [ l("stop", { offset: "0%", "stop-color": o(k)(t.value.style.colors.activeReadonly[3], 0.95) }, null, 8, Lt), l("stop", { offset: "100%", "stop-color": t.value.style.colors.activeReadonly[3] }, null, 8, Dt) ]) ]), l("path", { d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.8 10.946a1 1 0 0 0 -1.414 .014a2.5 2.5 0 0 1 -3.572 0a1 1 0 0 0 -1.428 1.4a4.5 4.5 0 0 0 6.428 0a1 1 0 0 0 -.014 -1.414zm-6.19 -5.286l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z", "stroke-width": "0", fill: t.value.style.icons.useGradient ? "url(#vueUiSmiley3)" : t.value.style.colors.activeReadonly[3] }, null, 8, Et) ], 8, Kt)) : d("", !0), !t.value.style.icons.filled && y.value ? (i(), s("svg", { key: 4, xmlns: o(f), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: `0 0 ${g(3)} 24`, "stroke-width": "1.5", stroke: t.value.style.colors.activeReadonly[3], fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, e[41] || (e[41] = [ $('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dabd0325></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-dabd0325></path><path d="M9 10l.01 0" data-v-dabd0325></path><path d="M15 10l.01 0" data-v-dabd0325></path><path d="M9.5 15a3.5 3.5 0 0 0 5 0" data-v-dabd0325></path>', 5) ]), 8, Tt)) : d("", !0) ], 38), l("div", { tabindex: "0", class: M({ "vue-ui-smiley-rated": !t.value.readonly && p.value === 5 }), style: a(`cursor:${t.value.readonly ? "default" : "pointer"};height:${t.value.style.itemSize}px;aspect-ratio:1/1;position:relative`), onMouseenter: e[16] || (e[16] = (n) => v.value = 4), onMouseleave: e[17] || (e[17] = (n) => v.value = void 0), onClick: e[18] || (e[18] = (n) => m(5)), onKeyup: e[19] || (e[19] = z((n) => m(5), ["enter"])) }, [ t.value.style.tooltip.show && w.value && y.value ? (i(), s("div", { key: 0, class: "vue-ui-rating-tooltip", style: a(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48 + t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${v.value === 4 ? "block" : "none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`) }, [ l("div", { style: a(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`) }, [ l("span", { style: a(`font-size:${t.value.style.tooltip.fontSize}px`) }, "5:", 4), e[42] || (e[42] = S()), l("span", { style: a(`font-weight:${t.value.style.tooltip.bold ? "bold" : "normal"};font-size:${t.value.style.tooltip.fontSize}px`) }, c(o(x)( t.value.style.tooltip.formatter, u.dataset.rating[5], o(b)({ v: u.dataset.rating[5], r: t.value.style.tooltip.roundingValue }), t.value )), 5), l("div", { style: a(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`) }, " ▼ ", 4) ], 4) ], 4)) : d("", !0), t.value.style.icons.filled ? (i(), s("svg", { key: 1, xmlns: o(f), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: h(4), fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, [ l("defs", null, [ l("radialGradient", qt, [ l("stop", { offset: "0%", "stop-color": o(k)(t.value.style.colors.activeReadonly[4], 0.9) }, null, 8, Jt), l("stop", { offset: "100%", "stop-color": t.value.style.colors.activeReadonly[4] }, null, 8, Qt) ]) ]), e[43] || (e[43] = l("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1)), l("path", { d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 9.66h-6a1 1 0 0 0 -1 1v.05a3.975 3.975 0 0 0 3.777 3.97l.227 .005a4.026 4.026 0 0 0 3.99 -3.79l.006 -.206a1 1 0 0 0 -1 -1.029zm-5.99 -5l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z", "stroke-width": "0", fill: h(4) }, null, 8, Wt) ], 8, Pt)) : (i(), s("svg", { key: 2, xmlns: o(f), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: h(4), fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, e[44] || (e[44] = [ $('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dabd0325></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-dabd0325></path><path d="M9 9l.01 0" data-v-dabd0325></path><path d="M15 9l.01 0" data-v-dabd0325></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-dabd0325></path>', 5) ]), 8, Zt)), t.value.style.icons.filled && y.value ? (i(), s("svg", { key: 3, xmlns: o(f), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: `0 0 ${g(4)} 24`, "stroke-width": "1.5", stroke: t.value.style.colors.activeReadonly[4], fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, [ e[45] || (e[45] = l("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, null, -1)), l("defs", null, [ l("radialGradient", ee, [ l("stop", { offset: "0%", "stop-color": o(k)(t.value.style.colors.activeReadonly[4], 0.9) }, null, 8, le), l("stop", { offset: "100%", "stop-color": t.value.style.colors.activeReadonly[4] }, null, 8, oe) ]) ]), l("path", { d: "M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-2 9.66h-6a1 1 0 0 0 -1 1v.05a3.975 3.975 0 0 0 3.777 3.97l.227 .005a4.026 4.026 0 0 0 3.99 -3.79l.006 -.206a1 1 0 0 0 -1 -1.029zm-5.99 -5l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993zm6 0l-.127 .007a1 1 0 0 0 .117 1.993l.127 -.007a1 1 0 0 0 -.117 -1.993z", "stroke-width": "0", fill: t.value.style.icons.useGradient ? "url(#vueUiSmiley4)" : t.value.style.colors.activeReadonly[4] }, null, 8, ae) ], 8, te)) : d("", !0), !t.value.style.icons.filled && y.value ? (i(), s("svg", { key: 4, xmlns: o(f), style: { position: "absolute", top: "0", left: "0", transition: "all 0.1s ease-in-out" }, height: "100%", viewBox: `0 0 ${g(4)} 24`, "stroke-width": "1.5", stroke: t.value.style.colors.activeReadonly[4], fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, e[46] || (e[46] = [ $('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-dabd0325></path><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" data-v-dabd0325></path><path d="M9 9l.01 0" data-v-dabd0325></path><path d="M15 9l.01 0" data-v-dabd0325></path><path d="M8 13a4 4 0 1 0 8 0h-8" data-v-dabd0325></path>', 5) ]), 8, se)) : d("", !0) ], 38), t.value.style.rating.show && t.value.style.rating.position === "right" ? (i(), s("div", { key: 1, style: a(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold ? "bold" : "normal"};padding-left:${t.value.style.rating.offsetX}px`) }, c(o(x)( t.value.style.rating.formatter, p.value, o(b)({ v: p.value, r: t.value.style.rating.roundingValue }), t.value )), 5)) : d("", !0) ], 4), t.value.style.rating.show && t.value.style.rating.position === "bottom" ? (i(), s("div", { key: 2, style: a(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold ? "bold" : "normal"};margin-left:${t.value.style.rating.offsetX}px`) }, c(o(x)( t.value.style.rating.formatter, p.value, o(b)({ v: p.value, r: t.value.style.rating.roundingValue }), t.value )), 5)) : d("", !0) ], 36)); } }, pe = /* @__PURE__ */ W(ie, [["__scopeId", "data-v-dabd0325"]]); export { pe as default };