UNPKG

vue-data-ui

Version:

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

893 lines (892 loc) • 32.1 kB
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js"; import { Jt as t, Ot as n, Vt as r, X as i, b as a, i as o, jt as s, kt as c, q as l, t as u, tt as d } from "./lib-Bttd6u5E.js"; import { n as f, t as p } from "./useHints-Dq_w2E8B.js"; import { t as m } from "./useConfig-D3scuR88.js"; import { t as h } from "./usePrinter-DN5bYhTG.js"; import { n as g, t as _ } from "./BaseScanner-DZvpgOjM.js"; import { t as v } from "./useSvgExport-DH-FfcqQ.js"; import { t as y } from "./useNestedProp-vPNvh7rV.js"; import { t as b } from "./useThemeCheck-C43Tcqmk.js"; import { t as x } from "./img-Bnokohej.js"; import { n as S } from "./Title-BE3qg9xl.js"; import { t as ee } from "./_plugin-vue_export-helper-B3ysoDQm.js"; import { l as C, t as te } from "./useResponsive-ZtArZtUf.js"; import { t as ne } from "./useUserOptionState-DK-_1ddE.js"; import { t as re } from "./useChartAccessibility-DYqac8yF.js"; import { t as ie } from "./usePrefersMotion-BC-CsqR1.js"; import { t as ae } from "./vue_ui_wheel-DZ_nR--t.js"; import { Fragment as w, computed as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as oe, createSlots as se, createVNode as ce, defineAsyncComponent as le, guardReactiveProps as k, nextTick as ue, normalizeClass as A, normalizeProps as j, normalizeStyle as de, onBeforeUnmount as fe, onMounted as pe, openBlock as M, ref as N, renderList as P, renderSlot as F, shallowRef as me, toDisplayString as he, toRefs as ge, unref as I, useCssVars as _e, watch as ve, withCtx as L } from "vue"; //#region src/components/vue-ui-wheel.vue var ye = /* @__PURE__ */ e({ default: () => Be }), be = ["id"], xe = [ "xmlns", "viewBox", "aria-labelledby", "aria-describedby" ], Se = ["id"], Ce = ["id"], we = [ "x", "y", "width", "height" ], Te = [ "d", "stroke", "stroke-width" ], Ee = [ "cx", "cy", "r", "stroke", "stroke-width" ], De = { key: 0 }, Oe = [ "x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-linecap" ], ke = [ "x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-linecap" ], Ae = { key: 1 }, je = [ "d", "fill", "stroke", "stroke-width" ], Me = [ "d", "fill", "stroke", "stroke-width" ], Ne = [ "d", "fill", "stroke", "stroke-width" ], Pe = [ "x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-linecap" ], Fe = [ "d", "fill", "stroke", "stroke-width" ], Ie = ["aria-label"], Le = [ "x", "y", "height" ], Re = [ "x", "y", "font-size", "fill", "font-weight", "stroke", "stroke-width" ], ze = { key: 4, class: "vue-data-ui-watermark" }, Be = /*#__PURE__*/ ee({ __name: "vue-ui-wheel", props: { config: { type: Object, default() { return {}; } }, dataset: { type: Object, default() { return {}; } } }, emits: ["copyAlt"], setup(e, { expose: ee, emit: ye }) { _e((e) => ({ v6abdd623: Lt.value, v51a03449: Rt.value, v51a016dc: zt.value })); let Be = le(() => import("./PenAndPaper-DAE-tnEQ.js").then((e) => e.t)), Ve = le(() => import("./UserOptions-Dt98of5H.js").then((e) => e.n)), He = le(() => import("./PackageVersion-D6d8SCp9.js").then((e) => e.t)), { vue_ui_wheel: Ue } = m(), { isThemeValid: We, warnInvalidTheme: Ge } = b(), R = ie(), z = e, Ke = ye, qe = T(() => !!z.dataset && Object.keys(z.dataset).length), B = N(l()), Je = N(null), Ye = N(0), V = N(null), Xe = N(null), Ze = N(null), Qe = N(null), $e = N(0), et = N(!1), tt = N(!1), H = N(lt()); f({ config: () => H.value, dataset: () => z.dataset, component: "VueUiWheel", rules: [p.noHint] }); let nt = T(() => H.value.userOptions.useCursorPointer), rt = T(() => t({ defaultConfig: { userOptions: { show: !1 }, style: { chart: { backgroundColor: "#99999930", animation: { use: !1 }, layout: { wheel: { ticks: { activeColor: "#6A6A6A80", inactiveColor: "#CACACA80" } }, innerCircle: { stroke: "#CACACA80" } } } } }, userConfig: H.value.skeletonConfig ?? {} })), { loading: it, FINAL_DATASET: U } = g({ ...ge(z), FINAL_CONFIG: H, prepareConfig: lt, skeletonDataset: z.config?.skeletonDataset ?? { percentage: 50 }, skeletonConfig: t({ defaultConfig: H.value, userConfig: rt.value }) }), { userOptionsVisible: at, setUserOptionsVisibility: ot, keepUserOptionState: st } = ne({ config: H.value }), { svgRef: ct } = re({ config: H.value.style.chart.title }); function lt() { let e = y({ userConfig: z.config, defaultConfig: Ue }), t = e.theme; if (!t) return e; if (!We.value(e)) return Ge(e), e; let n = y({ userConfig: ae[t] || z.config, defaultConfig: e }); return y({ userConfig: z.config, defaultConfig: n }); } ve(() => z.config, (e) => { H.value = lt(), at.value = !H.value.userOptions.showOnChartHover, _t(), $e.value += 1; }, { deep: !0 }); let { isPrinting: ut, isImaging: dt, generatePdf: ft, generateImage: pt } = h({ elementId: B.value, fileName: H.value.style.chart.title.text || "vue-ui-wheel", options: H.value.userOptions.print }), mt = T(() => H.value.userOptions.show && !H.value.style.chart.title.text), W = N({ size: 360, height: 360, width: 360 }), G = N(H.value.style.chart.layout.percentage.fontSize), K = T(() => ({ radius: Math.min(W.value.width, W.value.height) * .9 / 2 * H.value.style.chart.layout.wheel.radiusRatio, centerX: W.value.width / 2, centerY: W.value.height / 2 })); function ht(e, t = 1) { let n = 29.85; return { x: K.value.centerX + K.value.radius * Math.cos(n + e * Math.PI / 180) * t, y: K.value.centerY + K.value.radius * Math.sin(n + e * Math.PI / 180) * t }; } let q = N(H.value.style.chart.animation.use && !R.value ? 0 : U.value.percentage || 0); ve(() => U.value, (e) => { H.value.style.chart.animation.use && !R.value ? kt(e.percentage) : q.value = e.percentage || 0; }, { deep: !0 }); let J = me(null), Y = me(null); pe(() => { _t(); }); let gt = T(() => !!H.value.debug); function _t() { if (s(z.dataset) && d({ componentName: "VueUiWheel", type: "dataset", debug: gt.value }), H.value.responsive) { let e = C(() => { let { width: e, height: t } = te({ chart: V.value, title: H.value.style.chart.title.text ? Xe.value : null, source: Ze.value, noTitle: Qe.value }); requestAnimationFrame(() => { W.value.width = e, W.value.height = t, G.value = H.value.style.chart.layout.percentage.fontSize / 360 * Math.min(e, t); }); }); J.value && (Y.value && J.value.unobserve(Y.value), J.value.disconnect()), J.value = new ResizeObserver(e), Y.value = V.value.parentNode, J.value.observe(Y.value); } kt(U.value.percentage || 0), H.value.style.chart.animation.use && !R.value || (q.value = U.value.percentage || 0); } fe(() => { J.value && (Y.value && J.value.unobserve(Y.value), J.value.disconnect()); }); function vt([e, t, n], r) { let i = Math.cos(r), a = Math.sin(r); return [ e, t * i - n * a, t * a + n * i ]; } function yt([e, t, n], r) { let i = r / (r - n); return [ e * i, t * i, n, i ]; } function bt(e, t) { let n = e.replace("#", ""), r = parseInt(n.substring(0, 2), 16), i = parseInt(n.substring(2, 4), 16), a = parseInt(n.substring(4, 6), 16), o = 1 - Math.min(1, Math.max(0, H.value.style.chart.layout.wheel.ticks.shadeColorRatio3d)) * t, s = Math.max(0, Math.min(255, Math.round(r * o))), c = Math.max(0, Math.min(255, Math.round(i * o))), l = Math.max(0, Math.min(255, Math.round(a * o))); return `#${s.toString(16).padStart(2, "0")}${c.toString(16).padStart(2, "0")}${l.toString(16).padStart(2, "0")}`; } function xt({ cx: e, cy: t, radius: n, innerRatio: i = .8, count: a = 120, startDeg: o = 0, axDeg: s = 50, f: c = 520, baseStroke: l = 5, activeColor: u, inactiveColor: d, getActive: f }) { let p = s * Math.PI / 180, m = n, h = n * i, g = []; for (let n = 0; n < a; n += 1) { let i = (n / a * 360 + o) * Math.PI / 180, s = e + m * Math.cos(i), _ = t + m * Math.sin(i), v = e + h * Math.cos(i), y = t + h * Math.sin(i), b = [ s - e, _ - t, 0 ], x = [ v - e, y - t, 0 ], [S, ee, C] = vt(b, p), [te, ne, re] = vt(x, p), [ie, ae, , w] = yt([ S, ee, C ], c), [T, E, , D] = yt([ te, ne, re ], c), O = e + ie, oe = t + ae, se = e + T, ce = t + E, le = (Math.max(C, re) - -m * Math.sin(p)) / (2 * m * Math.sin(p) || 1), k = !f || f(n), ue = H.value.style.chart.layout.wheel.ticks.gradient.show ? r(u, n * Q.value / Z.value * (H.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity / 100)) : u, A = bt(k ? ue : d, le), j = Math.max(1.25, l * w * (Math.min(W.value.width, W.value.height) / 360)); g.push({ i: n, x1: O, y1: oe, x2: se, y2: ce, stroke: j, color: A, z: Math.max(C, re) }); } return g.sort((e, t) => e.z - t.z), g; } let St = T(() => { if (!H.value.layout === "3d") return null; let e = Z.value, t = H.value.style.chart.layout.wheel.ticks.gradient.show ? r(H.value.style.chart.layout.wheel.ticks.activeColor, 0) : H.value.style.chart.layout.wheel.ticks.activeColor, n = H.value.style.chart.layout.wheel.ticks.inactiveColor, i = H.value.style.chart.layout.wheel.ticks.strokeWidth; return xt({ cx: K.value.centerX, cy: K.value.centerY, radius: K.value.radius, innerRatio: H.value.style.chart.layout.wheel.ticks.sizeRatio, count: e, startDeg: -90, axDeg: H.value.style.chart.layout.wheel.tiltAngle3d, f: Math.min(W.value.width, W.value.height) * 1.45, baseStroke: i, activeColor: t, inactiveColor: n, getActive: (e) => q.value > e * Q.value }); }); function Ct({ cx: e, cy: t, r: n, count: r = 180, startDeg: i = -90, axDeg: a = 50, f: o }) { let s = a * Math.PI / 180, c = [], l = 0; for (let a = 0; a < r; a += 1) { let u = (a / r * 360 + i) * Math.PI / 180, [d, f, p] = vt([ n * Math.cos(u), n * Math.sin(u), 0 ], s), [m, h, , g] = yt([ d, f, p ], o); l += g, c.push([e + m, t + h]); } let u = `M ${c[0][0]} ${c[0][1]}`; for (let e = 1; e < c.length; e += 1) u += ` L ${c[e][0]} ${c[e][1]}`; u += " Z"; let d = l / r; return { d: u, avgScale: d, pts: c }; } let X = T(() => { if (H.value.layout !== "3d") return null; let e = Math.min(W.value.width, W.value.height) * 1.45, t = H.value.style.chart.layout.wheel.tiltAngle3d, n = K.value.radius, { pts: r, avgScale: i } = (() => { let r = n, i = t, { d: a, avgScale: o, pts: s } = Ct({ cx: K.value.centerX, cy: K.value.centerY, r, startDeg: -90, axDeg: i, f: e }); return { pts: s, avgScale: o }; })(), a = Infinity, o = Infinity, s = -Infinity, c = -Infinity; for (let [e, t] of r) e < a && (a = e), t < o && (o = t), e > s && (s = e), t > c && (c = t); let l = H.value.style.chart.layout.wheel.ticks.strokeWidth / 360 * Math.min(W.value.width, W.value.height), u = H.value.style.chart.layout.innerCircle.strokeWidth || 0, d = .5 * Math.max(l, u * (i || 1)), f = Math.max(0, Number(H.value.style.chart.layout.wheel.ticks.depth3d) || 0), p = d; return { x: a - p, y: o - f - p, w: s - a + 2 * p, h: c - (o - f) + 2 * p }; }); function wt(e) { let t = Math.min(W.value.width, W.value.height) * 1.45, { d: n, avgScale: r } = Ct({ cx: K.value.centerX, cy: K.value.centerY, r: e, startDeg: -90, axDeg: H.value.style.chart.layout.wheel.tiltAngle3d, f: t }), i = (H.value.style.chart.layout.innerCircle.strokeWidth || 1) * r; return { d: n, stroke: H.value.style.chart.layout.innerCircle.stroke, strokeWidth: i }; } let Tt = T(() => wt(Math.max(0, K.value.radius * .8 * H.value.style.chart.layout.innerCircle.radiusRatio))); function Et({ cx: e, cy: t, r: n, aRad: r, ax: i, f: a }) { let [o, s, c] = vt([ n * Math.cos(r), n * Math.sin(r), 0 ], i), [l, u, , d] = yt([ o, s, c ], a); return { x: e + l, y: t + u, z: c, s: d }; } function Dt({ cx: e, cy: t, radius: n, innerRatio: i = .8, count: a = 120, startDeg: o = -87, axDeg: s = 45, f: c = 600, activeColor: l, inactiveColor: u, getActive: d, Y: f = 0 }) { let p = s * Math.PI / 180, m = n, h = n * i, g = 2 * Math.PI / a, _ = []; for (let n = 0; n < a; n += 1) { let i = o * Math.PI / 180 + g * n, s = i + g * Math.min(1, H.value.style.chart.layout.wheel.ticks.spacingRatio3d), v = Et({ cx: e, cy: t + f, r: m, aRad: i, ax: p, f: c }), y = Et({ cx: e, cy: t + f, r: m, aRad: s, ax: p, f: c }), b = Et({ cx: e, cy: t + f, r: h, aRad: s, ax: p, f: c }), x = Et({ cx: e, cy: t + f, r: h, aRad: i, ax: p, f: c }), S = (v.z + y.z + x.z + b.z) / 4, ee = bt(!d || d(n) ? H.value.style.chart.layout.wheel.ticks.gradient.show ? r(H.value.style.chart.layout.wheel.ticks.activeColor, 100 / a * n / 100 * (H.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity / 100)) : l : u, (() => { let e = m * Math.sin(p) || 1; return (S - -e) / (2 * e); })()), C = `M ${v.x} ${v.y} L ${y.x} ${y.y} L ${b.x} ${b.y} L ${x.x} ${x.y} Z`; _.push({ i: n, d: C, fill: ee, z: S }); } return _.sort((e, t) => e.z - t.z), _; } let Ot = T(() => { if (H.value.layout !== "3d") return null; let e = Z.value; return (t) => Dt({ cx: K.value.centerX, cy: K.value.centerY, radius: K.value.radius, innerRatio: H.value.style.chart.layout.wheel.ticks.sizeRatio, count: e, startDeg: -90, axDeg: H.value.style.chart.layout.wheel.tiltAngle3d, f: Math.min(W.value.width, W.value.height) * 1.45, activeColor: H.value.style.chart.layout.wheel.ticks.activeColor, inactiveColor: H.value.style.chart.layout.wheel.ticks.inactiveColor, getActive: (t) => q.value > 100 / e * t, Y: t }); }); function kt(e) { let t = H.value.style.chart.animation.speed, n = Math.abs(e - q.value) / (t * 120); function r() { q.value < e ? q.value = Math.min(q.value + n, e) : q.value > e && (q.value = Math.max(q.value - n, e)), q.value !== e && requestAnimationFrame(r); } r(); } let Z = T(() => (H.value.debug && H.value.style.chart.layout.wheel.ticks.quantity < 12 && console.warn("VueUiWheel - The min number of ticks is 12"), H.value.debug && H.value.style.chart.layout.wheel.ticks.quantity > 200 && console.warn("VueUiWheel - The max number of ticks is 200"), Math.max(12, Math.min(H.value.style.chart.layout.wheel.ticks.quantity, 200)))), Q = T(() => 100 / Z.value), At = T(() => { let e = []; for (let t = 0; t < Z.value; t += 1) { let n = q.value > t * Q.value ? H.value.style.chart.layout.wheel.ticks.activeColor : H.value.style.chart.layout.wheel.ticks.inactiveColor, { x: i, y: a } = ht(W.value.size / Z.value * t), { x: o, y: s } = ht(W.value.size / Z.value * t, H.value.style.chart.layout.wheel.ticks.sizeRatio); e.push({ x1: i, y1: a, x2: o, y2: s, color: H.value.style.chart.layout.wheel.ticks.gradient.show ? r(n, t * Q.value / Z.value * (H.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity / 100)) : n }); } return e; }), jt = T(() => c({ series: At.value.map((e) => ({ name: "", value: 1, color: e.color })) }, K.value.centerX, K.value.centerY, K.value.radius, K.value.radius, 1.99999, 2, 1, 360, 105.25, K.value.radius * (1 - H.value.style.chart.layout.wheel.ticks.sizeRatio))), Mt = N(!1); function Nt(e) { Mt.value = e, Ye.value += 1; } let Pt = N(!1); function Ft() { Pt.value = !Pt.value; } async function It({ scale: e = 2 } = {}) { if (!V.value) return; let { width: t, height: n } = V.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await x({ domElement: V.value, base64: !0, img: !0, scale: e }); return { imageUri: i, base64: a, title: H.value.style.chart.title.text, width: t, height: n, aspectRatio: r }; } let Lt = T(() => H.value.style.chart.layout.wheel.ticks.strokeWidth * 2), Rt = T(() => H.value.style.chart.layout.wheel.ticks.strokeWidth * 2 * .75), zt = T(() => H.value.style.chart.layout.wheel.ticks.strokeWidth), $ = T(() => Math.max(1, Math.min(20, H.value.style.chart.layout.wheel.ticks.depth3d))), Bt = T(() => H.value.style.chart.backgroundColor), Vt = T(() => H.value.style.chart.title), { exportSvg: Ht, getSvg: Ut } = v({ svg: ct, title: Vt, backgroundColor: Bt, stretchTitle: !0 }); async function Wt({ isCb: e }) { tt.value = !0, await ue(); try { if (e) { let { blob: e, url: t, text: n, dataUrl: r } = await Ut(); await Promise.resolve(H.value.userOptions.callbacks.svg({ blob: e, url: t, text: n, dataUrl: r })); } else await Promise.resolve(Ht()); } finally { tt.value = !1; } } function Gt(e) { if (e?.stage === "start") { et.value = !0; return; } if (e?.stage === "end") { et.value = !1; return; } pt(); } async function Kt() { if (Ke("copyAlt", { config: H.value, dataset: U.value }), !H.value.userOptions.callbacks.altCopy) { console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions."); return; } await Promise.resolve(H.value.userOptions.callbacks.altCopy({ config: H.value, dataset: U.value })); } let qt = T(() => `${B.value}-title`), Jt = T(() => `${B.value}-desc`), Yt = T(() => o(H.value.style.chart.layout.percentage.formatter, a(q.value), i({ v: a(q.value), s: "%", r: H.value.style.chart.layout.percentage.rounding }))), Xt = T(() => H.value.style.chart.title.text || ""), Zt = T(() => it.value ? "..." : `${Yt.value}`); return ee({ getImage: It, generatePdf: ft, generateImage: pt, generateSvg: Wt, toggleAnnotator: Ft, toggleFullscreen: Nt, copyAlt: Kt }), (e, t) => (M(), O("div", { class: A(["vue-ui-wheel", { "vue-data-ui-component": !0, "vue-ui-wheel-3d-wrap": H.value.layout === "3d" }]), ref_key: "wheelChart", ref: V, id: B.value, style: de(`font-family:${H.value.style.fontFamily};width:100%; text-align:center;background:${H.value.style.chart.backgroundColor};${H.value.responsive ? "height:100%" : ""}`), onMouseenter: t[0] ||= () => I(ot)(!0), onMouseleave: t[1] ||= () => I(ot)(!1) }, [ H.value.userOptions.buttons.annotator ? (M(), E(I(Be), { key: 0, svgRef: I(ct), backgroundColor: H.value.style.chart.backgroundColor, color: H.value.style.chart.color, active: Pt.value, isCursorPointer: nt.value, onClose: Ft }, { "annotator-action-close": L(() => [F(e.$slots, "annotator-action-close", {}, void 0, !0)]), "annotator-action-color": L(({ color: t }) => [F(e.$slots, "annotator-action-color", j(k({ color: t })), void 0, !0)]), "annotator-action-draw": L(({ mode: t }) => [F(e.$slots, "annotator-action-draw", j(k({ mode: t })), void 0, !0)]), "annotator-action-undo": L(({ disabled: t }) => [F(e.$slots, "annotator-action-undo", j(k({ disabled: t })), void 0, !0)]), "annotator-action-redo": L(({ disabled: t }) => [F(e.$slots, "annotator-action-redo", j(k({ disabled: t })), void 0, !0)]), "annotator-action-delete": L(({ disabled: t }) => [F(e.$slots, "annotator-action-delete", j(k({ disabled: t })), void 0, !0)]), _: 3 }, 8, [ "svgRef", "backgroundColor", "color", "active", "isCursorPointer" ])) : D("", !0), mt.value ? (M(), O("div", { key: 1, ref_key: "noTitle", ref: Qe, class: "vue-data-ui-no-title-space", style: "height:36px; width: 100%;background:transparent" }, null, 512)) : D("", !0), H.value.style.chart.title.text ? (M(), O("div", { key: 2, ref_key: "chartTitle", ref: Xe, style: "width:100%;background:transparent;padding-bottom:12px" }, [(M(), E(S, { key: `title_${$e.value}`, config: { title: { cy: "wheel-title", ...H.value.style.chart.title }, subtitle: { cy: "wheel-subtitle", ...H.value.style.chart.title.subtitle } } }, null, 8, ["config"]))], 512)) : D("", !0), H.value.userOptions.show && qe.value && (I(st) || I(at)) ? (M(), E(I(Ve), { ref_key: "details", ref: Je, key: `user_options_${Ye.value}`, backgroundColor: H.value.style.chart.backgroundColor, color: H.value.style.chart.color, isPrinting: I(ut), isImaging: I(dt), uid: B.value, hasPdf: H.value.userOptions.buttons.pdf, hasImg: H.value.userOptions.buttons.img, hasSvg: H.value.userOptions.buttons.svg, hasFullscreen: H.value.userOptions.buttons.fullscreen, hasAltCopy: H.value.userOptions.buttons.altCopy, hasXls: !1, isFullscreen: Mt.value, position: H.value.userOptions.position, titles: { ...H.value.userOptions.buttonTitles }, hasAnnotator: H.value.userOptions.buttons.annotator, isAnnotation: Pt.value, chartElement: V.value, callbacks: H.value.userOptions.callbacks, printScale: H.value.userOptions.print.scale, isCursorPointer: nt.value, onToggleFullscreen: Nt, onGeneratePdf: I(ft), onGenerateImage: Gt, onGenerateSvg: Wt, onToggleAnnotator: Ft, onCopyAlt: Kt, style: de({ visibility: I(st) ? I(at) ? "visible" : "hidden" : "visible" }) }, se({ _: 2 }, [ e.$slots.menuIcon ? { name: "menuIcon", fn: L(({ isOpen: t, color: n }) => [F(e.$slots, "menuIcon", j(k({ isOpen: t, color: n })), void 0, !0)]), key: "0" } : void 0, e.$slots.optionPdf ? { name: "optionPdf", fn: L(() => [F(e.$slots, "optionPdf", {}, void 0, !0)]), key: "1" } : void 0, e.$slots.optionImg ? { name: "optionImg", fn: L(() => [F(e.$slots, "optionImg", {}, void 0, !0)]), key: "2" } : void 0, e.$slots.optionSvg ? { name: "optionSvg", fn: L(() => [F(e.$slots, "optionSvg", {}, void 0, !0)]), key: "3" } : void 0, e.$slots.optionFullscreen ? { name: "optionFullscreen", fn: L(({ toggleFullscreen: t, isFullscreen: n }) => [F(e.$slots, "optionFullscreen", j(k({ toggleFullscreen: t, isFullscreen: n })), void 0, !0)]), key: "4" } : void 0, e.$slots.optionAnnotator ? { name: "optionAnnotator", fn: L(({ toggleAnnotator: t, isAnnotator: n }) => [F(e.$slots, "optionAnnotator", j(k({ toggleAnnotator: t, isAnnotator: n })), void 0, !0)]), key: "5" } : void 0, e.$slots.optionAltCopy ? { name: "optionAltCopy", fn: L(({ altCopy: t }) => [F(e.$slots, "optionAltCopy", j(k({ altCopy: t })), void 0, !0)]), key: "6" } : void 0, e.$slots["custom-menu-before"] ? { name: "custom-menu-before", fn: L(() => [F(e.$slots, "custom-menu-before", {}, void 0, !0)]), key: "7" } : void 0, e.$slots["custom-menu-after"] ? { name: "custom-menu-after", fn: L(() => [F(e.$slots, "custom-menu-after", {}, void 0, !0)]), key: "8" } : void 0 ]), 1032, [ "backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasSvg", "hasFullscreen", "hasAltCopy", "isFullscreen", "position", "titles", "hasAnnotator", "isAnnotation", "chartElement", "callbacks", "printScale", "isCursorPointer", "onGeneratePdf", "style" ])) : D("", !0), (M(), O("svg", { ref_key: "svgRef", ref: ct, xmlns: I(u), class: A({ "vue-data-ui-fullscreen--on": Mt.value, "vue-data-ui-fulscreen--off": !Mt.value, "vue-ui-wheel-3d-svg": H.value.layout === "3d" }), viewBox: H.value.layout === "3d" && !H.value.responsive ? `${X.value?.x - 10} ${X.value?.y ?? 0} ${X.value?.w + 20 ?? Math.max(10, W.value.width)} ${X.value?.h ?? Math.max(10, W.value.height)}` : `0 0 ${Math.max(10, W.value.width)} ${Math.max(10, W.value.height)}`, style: de(`max-width:100%;overflow:visible;background:transparent;color:${H.value.style.chart.color}`), role: "img", "aria-labelledby": qt.value, "aria-describedby": Jt.value }, [ oe("title", { id: qt.value }, he(Xt.value), 9, Se), oe("desc", { id: Jt.value }, he(Zt.value), 9, Ce), ce(I(He)), e.$slots["chart-background"] ? (M(), O("foreignObject", { key: 0, x: H.value.layout === "3d" && !H.value.responsive ? X.value?.x - 10 : 0, y: H.value.layout === "3d" && !H.value.responsive ? X.value?.y ?? 0 : 0, width: H.value.layout === "3d" && !H.value.responsive ? X.value?.w + 20 ?? Math.max(10, W.value.width) : Math.max(10, W.value.width), height: H.value.layout === "3d" && !H.value.responsive ? X.value?.h ?? Math.max(10, W.value.height) : Math.max(10, W.value.height), style: { pointerEvents: "none" } }, [F(e.$slots, "chart-background", {}, void 0, !0)], 8, we)) : D("", !0), H.value.layout === "3d" && Tt.value ? (M(), O("path", { key: 1, class: "vue-ui-wheel-inner-circle", d: Tt.value.d, stroke: H.value.style.chart.layout.innerCircle.stroke, "stroke-width": H.value.style.chart.layout.innerCircle.strokeWidth, fill: "none" }, null, 8, Te)) : H.value.style.chart.layout.innerCircle.show ? (M(), O("circle", { key: 2, class: "vue-ui-wheel-inner-circle", cx: K.value.centerX, cy: K.value.centerY, r: Math.max(0, K.value.radius * H.value.style.chart.layout.innerCircle.radiusRatio * .8), stroke: H.value.style.chart.layout.innerCircle.stroke, "stroke-width": H.value.style.chart.layout.innerCircle.strokeWidth, fill: "none" }, null, 8, Ee)) : D("", !0), H.value.layout === "3d" ? (M(), O(w, { key: 3 }, [H.value.style.chart.layout.wheel.ticks.type === "classic" ? (M(), O("g", De, [(M(!0), O(w, null, P($.value, (e) => (M(), O("g", null, [(M(!0), O(w, null, P(St.value || [], (t) => (M(), O("line", { key: t.i, x1: t.x1, y1: t.y1 - e, x2: t.x2, y2: t.y2 - e, stroke: I(n)(t.color, .25 * e / 5), "stroke-width": H.value.style.chart.layout.wheel.ticks.strokeWidth / 360 * Math.min(W.value.width, W.value.height), "stroke-linecap": H.value.style.chart.layout.wheel.ticks.rounded ? "round" : "butt", class: A({ "vue-ui-wheel-tick": !0, "vue-ui-tick-animated": H.value.style.chart.animation.use && !I(R) && t.i * Q.value <= q.value }) }, null, 10, Oe))), 128))]))), 256)), (M(!0), O(w, null, P(St.value || [], (e) => (M(), O("line", { key: e.i, x1: e.x1, y1: e.y1 - $.value, x2: e.x2, y2: e.y2 - $.value, stroke: e.color, "stroke-width": H.value.style.chart.layout.wheel.ticks.strokeWidth / 360 * Math.min(W.value.width, W.value.height), "stroke-linecap": H.value.style.chart.layout.wheel.ticks.rounded ? "round" : "butt", class: A({ "vue-ui-wheel-tick": !0, "vue-ui-tick-animated": H.value.style.chart.animation.use && !I(R) && e.i * Q.value <= q.value }) }, null, 10, ke))), 128))])) : (M(), O("g", Ae, [(M(!0), O(w, null, P($.value, (e) => (M(), O("g", null, [(M(!0), O(w, null, P(Ot.value(-e) || [], (e) => (M(), O("path", { key: e.i, d: e.d, fill: H.value.style.chart.layout.wheel.ticks.inactiveColor, stroke: H.value.style.chart.layout.wheel.ticks.stroke, "stroke-width": H.value.style.chart.layout.wheel.ticks.strokeWidth, "stroke-linecap": "round", "stroke-linejoin": "round", class: "vue-ui-wheel-tick" }, null, 8, je))), 128)), (M(!0), O(w, null, P(Ot.value(-e) || [], (t) => (M(), O("path", { key: t.i, d: t.d, fill: I(n)(t.fill, .5 * e / $.value), stroke: H.value.style.chart.layout.wheel.ticks.stroke, "stroke-width": H.value.style.chart.layout.wheel.ticks.strokeWidth, "stroke-linecap": "round", "stroke-linejoin": "round", class: A({ "vue-ui-wheel-tick": !0, "vue-ui-tick-animated-3d": H.value.style.chart.animation.use && !I(R) && t.i * Q.value <= q.value }) }, null, 10, Me))), 128))]))), 256)), oe("g", null, [(M(!0), O(w, null, P(Ot.value(-$.value) || [], (e) => (M(), O("path", { key: e.i, d: e.d, fill: e.fill, stroke: H.value.style.chart.layout.wheel.ticks.stroke, "stroke-width": H.value.style.chart.layout.wheel.ticks.strokeWidth, "stroke-linecap": "round", "stroke-linejoin": "round", class: A({ "vue-ui-wheel-tick": !0, "vue-ui-tick-animated-3d": H.value.style.chart.animation.use && !I(R) && e.i * Q.value <= q.value }) }, null, 10, Ne))), 128))])]))], 64)) : (M(), O(w, { key: 4 }, [H.value.style.chart.layout.wheel.ticks.type === "classic" ? (M(!0), O(w, { key: 0 }, P(At.value, (e, t) => (M(), O("line", { x1: e.x1, x2: e.x2, y1: e.y1, y2: e.y2, stroke: e.color, "stroke-width": H.value.style.chart.layout.wheel.ticks.strokeWidth / 360 * Math.min(W.value.width, W.value.height), "stroke-linecap": H.value.style.chart.layout.wheel.ticks.rounded ? "round" : "butt", class: A({ "vue-ui-wheel-tick": !0, "vue-ui-tick-animated": H.value.style.chart.animation.use && !I(R) && t * Q.value <= q.value }) }, null, 10, Pe))), 256)) : (M(!0), O(w, { key: 1 }, P(jt.value, (e, t) => (M(), O("path", { d: e.arcSlice, fill: e.color, class: A({ "vue-ui-wheel-tick": !0, "vue-ui-tick-animated": H.value.style.chart.animation.use && !I(R) && t * Q.value <= q.value }), stroke: H.value.style.chart.layout.wheel.ticks.stroke, "stroke-width": H.value.style.chart.layout.wheel.ticks.strokeWidth }, null, 10, Fe))), 256))], 64)), H.value.style.chart.layout.percentage.show ? (M(), O("g", { key: 5, role: "status", "aria-live": "polite", "aria-label": I(it) ? "..." : Yt.value }, [I(it) ? (M(), O("rect", { key: 0, x: K.value.centerX - 40, y: K.value.centerY - G.value / 2, width: 80, height: G.value, fill: "#6A6A6A80", rx: "3" }, null, 8, Le)) : (M(), O("text", { key: 1, "aria-hidden": "true", x: K.value.centerX + H.value.style.chart.layout.percentage.offsetX, y: K.value.centerY + G.value / 3 + H.value.style.chart.layout.percentage.offsetY, "font-size": G.value, fill: H.value.style.chart.layout.wheel.ticks.gradient.show ? I(r)(H.value.style.chart.layout.wheel.ticks.activeColor, q.value / 100 * (H.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity / 100)) : H.value.style.chart.layout.wheel.ticks.activeColor, "text-anchor": "middle", "font-weight": H.value.style.chart.layout.percentage.bold ? "bold" : "normal", style: { "font-variant-numeric": "tabluar-nums" }, stroke: H.value.style.chart.layout.percentage.stroke, "stroke-width": H.value.style.chart.layout.percentage.strokeWidth, "stroke-linecap": "round", "stroke-linejoin": "round", "paint-order": "stroke fill", class: A({ "vue-ui-wheel-label": H.value.layout === "3d" }) }, he(Yt.value), 11, Re))], 8, Ie)) : D("", !0), F(e.$slots, "svg", { svg: { ...W.value, isPrintingImg: I(ut) || I(dt) || et.value, isPrintingSvg: tt.value } }, void 0, !0) ], 14, xe)), e.$slots.watermark ? (M(), O("div", ze, [F(e.$slots, "watermark", j(k({ isPrinting: I(ut) || I(dt) || et.value || tt.value })), void 0, !0)])) : D("", !0), e.$slots.source ? (M(), O("div", { key: 5, ref_key: "source", ref: Ze, dir: "auto" }, [F(e.$slots, "source", {}, void 0, !0)], 512)) : D("", !0), F(e.$slots, "skeleton", {}, () => [I(it) ? (M(), E(_, { key: 0 })) : D("", !0)], !0) ], 46, be)); } }, [["__scopeId", "data-v-8da34f59"]]); //#endregion export { ye as n, Be as t };